!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("inline-interpret-dashboard",[],t):"object"==typeof exports?exports["inline-interpret-dashboard"]=t():e["inline-interpret-dashboard"]=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=277)}([function(e,t,r){"use strict";e.exports=r(286)},function(e,t,r){"use strict";r.d(t,"a",(function(){return k}));var n=r(246),a=r.n(n),i=r(247),o=r(248),s=r(249),l=r(250),c=r(251),u=r(252),d=r(253),p=r(254),h=r(255),f=r(256),m=r(257),g=r(258),v=r(259),y=r(260),b=r(261),_=r(262),x=r(263),w=r(264),k=new a.a({en:s,cs:i,de:o,es:l,fr:c,hu:u,it:d,ja:p,ko:h,nl:f,pl:m,"pt-BR":g,"pt-PT":v,ru:y,sv:b,tr:_,"zh-CN":x,"zh-TW":w})},function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"b",(function(){return s})),r.d(t,"e",(function(){return l}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function a(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}function s(e,t,r,n){var a,i=arguments.length,o=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function l(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n}},function(e,t,r){(function(e,n){var a;
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */(function(){var i,o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",p=1,h=2,f=4,m=1,g=2,v=1,y=2,b=4,_=8,x=16,w=32,k=64,M=128,T=256,C=512,S=30,L="...",A=800,E=16,D=1,I=2,P=1/0,O=9007199254740991,R=17976931348623157e292,F=NaN,z=4294967295,N=z-1,j=z>>>1,B=[["ary",M],["bind",v],["bindKey",y],["curry",_],["curryRight",x],["flip",C],["partial",w],["partialRight",k],["rearg",T]],Y="[object Arguments]",H="[object Array]",V="[object AsyncFunction]",U="[object Boolean]",W="[object Date]",G="[object DOMException]",q="[object Error]",K="[object Function]",X="[object GeneratorFunction]",Z="[object Map]",J="[object Number]",$="[object Null]",Q="[object Object]",ee="[object Proxy]",te="[object RegExp]",re="[object Set]",ne="[object String]",ae="[object Symbol]",ie="[object Undefined]",oe="[object WeakMap]",se="[object WeakSet]",le="[object ArrayBuffer]",ce="[object DataView]",ue="[object Float32Array]",de="[object Float64Array]",pe="[object Int8Array]",he="[object Int16Array]",fe="[object Int32Array]",me="[object Uint8Array]",ge="[object Uint8ClampedArray]",ve="[object Uint16Array]",ye="[object Uint32Array]",be=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,we=/&(?:amp|lt|gt|quot|#39);/g,ke=/[&<>"']/g,Me=RegExp(we.source),Te=RegExp(ke.source),Ce=/<%-([\s\S]+?)%>/g,Se=/<%([\s\S]+?)%>/g,Le=/<%=([\s\S]+?)%>/g,Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ee=/^\w*$/,De=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ie=/[\\^$.*+?()[\]{}|]/g,Pe=RegExp(Ie.source),Oe=/^\s+|\s+$/g,Re=/^\s+/,Fe=/\s+$/,ze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ne=/\{\n\/\* \[wrapped with (.+)\] \*/,je=/,? & /,Be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ye=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ve=/\w*$/,Ue=/^[-+]0x[0-9a-f]+$/i,We=/^0b[01]+$/i,Ge=/^\[object .+?Constructor\]$/,qe=/^0o[0-7]+$/i,Ke=/^(?:0|[1-9]\d*)$/,Xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,$e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Qe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",et="[\\ud800-\\udfff]",tt="["+Qe+"]",rt="["+$e+"]",nt="\\d+",at="[\\u2700-\\u27bf]",it="[a-z\\xdf-\\xf6\\xf8-\\xff]",ot="[^\\ud800-\\udfff"+Qe+nt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",st="\\ud83c[\\udffb-\\udfff]",lt="[^\\ud800-\\udfff]",ct="(?:\\ud83c[\\udde6-\\uddff]){2}",ut="[\\ud800-\\udbff][\\udc00-\\udfff]",dt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pt="(?:"+it+"|"+ot+")",ht="(?:"+dt+"|"+ot+")",ft="(?:"+rt+"|"+st+")"+"?",mt="[\\ufe0e\\ufe0f]?"+ft+("(?:\\u200d(?:"+[lt,ct,ut].join("|")+")[\\ufe0e\\ufe0f]?"+ft+")*"),gt="(?:"+[at,ct,ut].join("|")+")"+mt,vt="(?:"+[lt+rt+"?",rt,ct,ut,et].join("|")+")",yt=RegExp("['’]","g"),bt=RegExp(rt,"g"),_t=RegExp(st+"(?="+st+")|"+vt+mt,"g"),xt=RegExp([dt+"?"+it+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[tt,dt,"$"].join("|")+")",ht+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[tt,dt+pt,"$"].join("|")+")",dt+"?"+pt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",dt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",nt,gt].join("|"),"g"),wt=RegExp("[\\u200d\\ud800-\\udfff"+$e+"\\ufe0e\\ufe0f]"),kt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tt=-1,Ct={};Ct[ue]=Ct[de]=Ct[pe]=Ct[he]=Ct[fe]=Ct[me]=Ct[ge]=Ct[ve]=Ct[ye]=!0,Ct[Y]=Ct[H]=Ct[le]=Ct[U]=Ct[ce]=Ct[W]=Ct[q]=Ct[K]=Ct[Z]=Ct[J]=Ct[Q]=Ct[te]=Ct[re]=Ct[ne]=Ct[oe]=!1;var St={};St[Y]=St[H]=St[le]=St[ce]=St[U]=St[W]=St[ue]=St[de]=St[pe]=St[he]=St[fe]=St[Z]=St[J]=St[Q]=St[te]=St[re]=St[ne]=St[ae]=St[me]=St[ge]=St[ve]=St[ye]=!0,St[q]=St[K]=St[oe]=!1;var Lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},At=parseFloat,Et=parseInt,Dt="object"==typeof e&&e&&e.Object===Object&&e,It="object"==typeof self&&self&&self.Object===Object&&self,Pt=Dt||It||Function("return this")(),Ot=t&&!t.nodeType&&t,Rt=Ot&&"object"==typeof n&&n&&!n.nodeType&&n,Ft=Rt&&Rt.exports===Ot,zt=Ft&&Dt.process,Nt=function(){try{var e=Rt&&Rt.require&&Rt.require("util").types;return e||zt&&zt.binding&&zt.binding("util")}catch(e){}}(),jt=Nt&&Nt.isArrayBuffer,Bt=Nt&&Nt.isDate,Yt=Nt&&Nt.isMap,Ht=Nt&&Nt.isRegExp,Vt=Nt&&Nt.isSet,Ut=Nt&&Nt.isTypedArray;function Wt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Gt(e,t,r,n){for(var a=-1,i=null==e?0:e.length;++a<i;){var o=e[a];t(n,o,r(o),e)}return n}function qt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Kt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Xt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Zt(e,t){for(var r=-1,n=null==e?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}function Jt(e,t){return!!(null==e?0:e.length)&&sr(e,t,0)>-1}function $t(e,t,r){for(var n=-1,a=null==e?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}function Qt(e,t){for(var r=-1,n=null==e?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}function er(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function tr(e,t,r,n){var a=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++a]);++a<i;)r=t(r,e[a],a,e);return r}function rr(e,t,r,n){var a=null==e?0:e.length;for(n&&a&&(r=e[--a]);a--;)r=t(r,e[a],a,e);return r}function nr(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var ar=dr("length");function ir(e,t,r){var n;return r(e,(function(e,r,a){if(t(e,r,a))return n=r,!1})),n}function or(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}function sr(e,t,r){return t==t?function(e,t,r){var n=r-1,a=e.length;for(;++n<a;)if(e[n]===t)return n;return-1}(e,t,r):or(e,cr,r)}function lr(e,t,r,n){for(var a=r-1,i=e.length;++a<i;)if(n(e[a],t))return a;return-1}function cr(e){return e!=e}function ur(e,t){var r=null==e?0:e.length;return r?fr(e,t)/r:F}function dr(e){return function(t){return null==t?i:t[e]}}function pr(e){return function(t){return null==e?i:e[t]}}function hr(e,t,r,n,a){return a(e,(function(e,a,i){r=n?(n=!1,e):t(r,e,a,i)})),r}function fr(e,t){for(var r,n=-1,a=e.length;++n<a;){var o=t(e[n]);o!==i&&(r=r===i?o:r+o)}return r}function mr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function gr(e){return function(t){return e(t)}}function vr(e,t){return Qt(t,(function(t){return e[t]}))}function yr(e,t){return e.has(t)}function br(e,t){for(var r=-1,n=e.length;++r<n&&sr(t,e[r],0)>-1;);return r}function _r(e,t){for(var r=e.length;r--&&sr(t,e[r],0)>-1;);return r}var xr=pr({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),wr=pr({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function kr(e){return"\\"+Lt[e]}function Mr(e){return wt.test(e)}function Tr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function Cr(e,t){return function(r){return e(t(r))}}function Sr(e,t){for(var r=-1,n=e.length,a=0,i=[];++r<n;){var o=e[r];o!==t&&o!==d||(e[r]=d,i[a++]=r)}return i}function Lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function Ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function Er(e){return Mr(e)?function(e){var t=_t.lastIndex=0;for(;_t.test(e);)++t;return t}(e):ar(e)}function Dr(e){return Mr(e)?function(e){return e.match(_t)||[]}(e):function(e){return e.split("")}(e)}var Ir=pr({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Pr=function e(t){var r,n=(t=null==t?Pt:Pr.defaults(Pt.Object(),t,Pr.pick(Pt,Mt))).Array,a=t.Date,$e=t.Error,Qe=t.Function,et=t.Math,tt=t.Object,rt=t.RegExp,nt=t.String,at=t.TypeError,it=n.prototype,ot=Qe.prototype,st=tt.prototype,lt=t["__core-js_shared__"],ct=ot.toString,ut=st.hasOwnProperty,dt=0,pt=(r=/[^.]+$/.exec(lt&&lt.keys&&lt.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ht=st.toString,ft=ct.call(tt),mt=Pt._,gt=rt("^"+ct.call(ut).replace(Ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=Ft?t.Buffer:i,_t=t.Symbol,wt=t.Uint8Array,Lt=vt?vt.allocUnsafe:i,Dt=Cr(tt.getPrototypeOf,tt),It=tt.create,Ot=st.propertyIsEnumerable,Rt=it.splice,zt=_t?_t.isConcatSpreadable:i,Nt=_t?_t.iterator:i,ar=_t?_t.toStringTag:i,pr=function(){try{var e=Ni(tt,"defineProperty");return e({},"",{}),e}catch(e){}}(),Or=t.clearTimeout!==Pt.clearTimeout&&t.clearTimeout,Rr=a&&a.now!==Pt.Date.now&&a.now,Fr=t.setTimeout!==Pt.setTimeout&&t.setTimeout,zr=et.ceil,Nr=et.floor,jr=tt.getOwnPropertySymbols,Br=vt?vt.isBuffer:i,Yr=t.isFinite,Hr=it.join,Vr=Cr(tt.keys,tt),Ur=et.max,Wr=et.min,Gr=a.now,qr=t.parseInt,Kr=et.random,Xr=it.reverse,Zr=Ni(t,"DataView"),Jr=Ni(t,"Map"),$r=Ni(t,"Promise"),Qr=Ni(t,"Set"),en=Ni(t,"WeakMap"),tn=Ni(tt,"create"),rn=en&&new en,nn={},an=uo(Zr),on=uo(Jr),sn=uo($r),ln=uo(Qr),cn=uo(en),un=_t?_t.prototype:i,dn=un?un.valueOf:i,pn=un?un.toString:i;function hn(e){if(Ls(e)&&!vs(e)&&!(e instanceof vn)){if(e instanceof gn)return e;if(ut.call(e,"__wrapped__"))return po(e)}return new gn(e)}var fn=function(){function e(){}return function(t){if(!Ss(t))return{};if(It)return It(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function mn(){}function gn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=z,this.__views__=[]}function yn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function bn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function _n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xn(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new _n;++t<r;)this.add(e[t])}function wn(e){var t=this.__data__=new bn(e);this.size=t.size}function kn(e,t){var r=vs(e),n=!r&&gs(e),a=!r&&!n&&xs(e),i=!r&&!n&&!a&&Fs(e),o=r||n||a||i,s=o?mr(e.length,nt):[],l=s.length;for(var c in e)!t&&!ut.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Wi(c,l))||s.push(c);return s}function Mn(e){var t=e.length;return t?e[xa(0,t-1)]:i}function Tn(e,t){return so(ri(e),On(t,0,e.length))}function Cn(e){return so(ri(e))}function Sn(e,t,r){(r===i||hs(e[t],r))&&(r!==i||t in e)||In(e,t,r)}function Ln(e,t,r){var n=e[t];ut.call(e,t)&&hs(n,r)&&(r!==i||t in e)||In(e,t,r)}function An(e,t){for(var r=e.length;r--;)if(hs(e[r][0],t))return r;return-1}function En(e,t,r,n){return jn(e,(function(e,a,i){t(n,e,r(e),i)})),n}function Dn(e,t){return e&&ni(t,al(t),e)}function In(e,t,r){"__proto__"==t&&pr?pr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Pn(e,t){for(var r=-1,a=t.length,o=n(a),s=null==e;++r<a;)o[r]=s?i:Qs(e,t[r]);return o}function On(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function Rn(e,t,r,n,a,o){var s,l=t&p,c=t&h,u=t&f;if(r&&(s=a?r(e,n,a,o):r(e)),s!==i)return s;if(!Ss(e))return e;var d=vs(e);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&ut.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!l)return ri(e,s)}else{var m=Yi(e),g=m==K||m==X;if(xs(e))return Za(e,l);if(m==Q||m==Y||g&&!a){if(s=c||g?{}:Vi(e),!l)return c?function(e,t){return ni(e,Bi(e),t)}(e,function(e,t){return e&&ni(t,il(t),e)}(s,e)):function(e,t){return ni(e,ji(e),t)}(e,Dn(s,e))}else{if(!St[m])return a?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case le:return Ja(e);case U:case W:return new n(+e);case ce:return function(e,t){var r=t?Ja(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case ue:case de:case pe:case he:case fe:case me:case ge:case ve:case ye:return $a(e,r);case Z:return new n;case J:case ne:return new n(e);case te:return function(e){var t=new e.constructor(e.source,Ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case re:return new n;case ae:return a=e,dn?tt(dn.call(a)):{}}var a}(e,m,l)}}o||(o=new wn);var v=o.get(e);if(v)return v;o.set(e,s),Ps(e)?e.forEach((function(n){s.add(Rn(n,t,r,n,e,o))})):As(e)&&e.forEach((function(n,a){s.set(a,Rn(n,t,r,a,e,o))}));var y=d?i:(u?c?Di:Ei:c?il:al)(e);return qt(y||e,(function(n,a){y&&(n=e[a=n]),Ln(s,a,Rn(n,t,r,a,e,o))})),s}function Fn(e,t,r){var n=r.length;if(null==e)return!n;for(e=tt(e);n--;){var a=r[n],o=t[a],s=e[a];if(s===i&&!(a in e)||!o(s))return!1}return!0}function zn(e,t,r){if("function"!=typeof e)throw new at(l);return no((function(){e.apply(i,r)}),t)}function Nn(e,t,r,n){var a=-1,i=Jt,s=!0,l=e.length,c=[],u=t.length;if(!l)return c;r&&(t=Qt(t,gr(r))),n?(i=$t,s=!1):t.length>=o&&(i=yr,s=!1,t=new xn(t));e:for(;++a<l;){var d=e[a],p=null==r?d:r(d);if(d=n||0!==d?d:0,s&&p==p){for(var h=u;h--;)if(t[h]===p)continue e;c.push(d)}else i(t,p,n)||c.push(d)}return c}hn.templateSettings={escape:Ce,evaluate:Se,interpolate:Le,variable:"",imports:{_:hn}},hn.prototype=mn.prototype,hn.prototype.constructor=hn,gn.prototype=fn(mn.prototype),gn.prototype.constructor=gn,vn.prototype=fn(mn.prototype),vn.prototype.constructor=vn,yn.prototype.clear=function(){this.__data__=tn?tn(null):{},this.size=0},yn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},yn.prototype.get=function(e){var t=this.__data__;if(tn){var r=t[e];return r===c?i:r}return ut.call(t,e)?t[e]:i},yn.prototype.has=function(e){var t=this.__data__;return tn?t[e]!==i:ut.call(t,e)},yn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tn&&t===i?c:t,this},bn.prototype.clear=function(){this.__data__=[],this.size=0},bn.prototype.delete=function(e){var t=this.__data__,r=An(t,e);return!(r<0)&&(r==t.length-1?t.pop():Rt.call(t,r,1),--this.size,!0)},bn.prototype.get=function(e){var t=this.__data__,r=An(t,e);return r<0?i:t[r][1]},bn.prototype.has=function(e){return An(this.__data__,e)>-1},bn.prototype.set=function(e,t){var r=this.__data__,n=An(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},_n.prototype.clear=function(){this.size=0,this.__data__={hash:new yn,map:new(Jr||bn),string:new yn}},_n.prototype.delete=function(e){var t=Fi(this,e).delete(e);return this.size-=t?1:0,t},_n.prototype.get=function(e){return Fi(this,e).get(e)},_n.prototype.has=function(e){return Fi(this,e).has(e)},_n.prototype.set=function(e,t){var r=Fi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},xn.prototype.add=xn.prototype.push=function(e){return this.__data__.set(e,c),this},xn.prototype.has=function(e){return this.__data__.has(e)},wn.prototype.clear=function(){this.__data__=new bn,this.size=0},wn.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},wn.prototype.get=function(e){return this.__data__.get(e)},wn.prototype.has=function(e){return this.__data__.has(e)},wn.prototype.set=function(e,t){var r=this.__data__;if(r instanceof bn){var n=r.__data__;if(!Jr||n.length<o-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new _n(n)}return r.set(e,t),this.size=r.size,this};var jn=oi(qn),Bn=oi(Kn,!0);function Yn(e,t){var r=!0;return jn(e,(function(e,n,a){return r=!!t(e,n,a)})),r}function Hn(e,t,r){for(var n=-1,a=e.length;++n<a;){var o=e[n],s=t(o);if(null!=s&&(l===i?s==s&&!Rs(s):r(s,l)))var l=s,c=o}return c}function Vn(e,t){var r=[];return jn(e,(function(e,n,a){t(e,n,a)&&r.push(e)})),r}function Un(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=Ui),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Un(s,t-1,r,n,a):er(a,s):n||(a[a.length]=s)}return a}var Wn=si(),Gn=si(!0);function qn(e,t){return e&&Wn(e,t,al)}function Kn(e,t){return e&&Gn(e,t,al)}function Xn(e,t){return Zt(t,(function(t){return Ms(e[t])}))}function Zn(e,t){for(var r=0,n=(t=Ga(t,e)).length;null!=e&&r<n;)e=e[co(t[r++])];return r&&r==n?e:i}function Jn(e,t,r){var n=t(e);return vs(e)?n:er(n,r(e))}function $n(e){return null==e?e===i?ie:$:ar&&ar in tt(e)?function(e){var t=ut.call(e,ar),r=e[ar];try{e[ar]=i;var n=!0}catch(e){}var a=ht.call(e);n&&(t?e[ar]=r:delete e[ar]);return a}(e):function(e){return ht.call(e)}(e)}function Qn(e,t){return e>t}function ea(e,t){return null!=e&&ut.call(e,t)}function ta(e,t){return null!=e&&t in tt(e)}function ra(e,t,r){for(var a=r?$t:Jt,o=e[0].length,s=e.length,l=s,c=n(s),u=1/0,d=[];l--;){var p=e[l];l&&t&&(p=Qt(p,gr(t))),u=Wr(p.length,u),c[l]=!r&&(t||o>=120&&p.length>=120)?new xn(l&&p):i}p=e[0];var h=-1,f=c[0];e:for(;++h<o&&d.length<u;){var m=p[h],g=t?t(m):m;if(m=r||0!==m?m:0,!(f?yr(f,g):a(d,g,r))){for(l=s;--l;){var v=c[l];if(!(v?yr(v,g):a(e[l],g,r)))continue e}f&&f.push(g),d.push(m)}}return d}function na(e,t,r){var n=null==(e=eo(e,t=Ga(t,e)))?e:e[co(ko(t))];return null==n?i:Wt(n,e,r)}function aa(e){return Ls(e)&&$n(e)==Y}function ia(e,t,r,n,a){return e===t||(null==e||null==t||!Ls(e)&&!Ls(t)?e!=e&&t!=t:function(e,t,r,n,a,o){var s=vs(e),l=vs(t),c=s?H:Yi(e),u=l?H:Yi(t),d=(c=c==Y?Q:c)==Q,p=(u=u==Y?Q:u)==Q,h=c==u;if(h&&xs(e)){if(!xs(t))return!1;s=!0,d=!1}if(h&&!d)return o||(o=new wn),s||Fs(e)?Li(e,t,r,n,a,o):function(e,t,r,n,a,i,o){switch(r){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case le:return!(e.byteLength!=t.byteLength||!i(new wt(e),new wt(t)));case U:case W:case J:return hs(+e,+t);case q:return e.name==t.name&&e.message==t.message;case te:case ne:return e==t+"";case Z:var s=Tr;case re:var l=n&m;if(s||(s=Lr),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;n|=g,o.set(e,t);var u=Li(s(e),s(t),n,a,i,o);return o.delete(e),u;case ae:if(dn)return dn.call(e)==dn.call(t)}return!1}(e,t,c,r,n,a,o);if(!(r&m)){var f=d&&ut.call(e,"__wrapped__"),v=p&&ut.call(t,"__wrapped__");if(f||v){var y=f?e.value():e,b=v?t.value():t;return o||(o=new wn),a(y,b,r,n,o)}}if(!h)return!1;return o||(o=new wn),function(e,t,r,n,a,o){var s=r&m,l=Ei(e),c=l.length,u=Ei(t).length;if(c!=u&&!s)return!1;var d=c;for(;d--;){var p=l[d];if(!(s?p in t:ut.call(t,p)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var f=!0;o.set(e,t),o.set(t,e);var g=s;for(;++d<c;){p=l[d];var v=e[p],y=t[p];if(n)var b=s?n(y,v,p,t,e,o):n(v,y,p,e,t,o);if(!(b===i?v===y||a(v,y,r,n,o):b)){f=!1;break}g||(g="constructor"==p)}if(f&&!g){var _=e.constructor,x=t.constructor;_!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x)&&(f=!1)}return o.delete(e),o.delete(t),f}(e,t,r,n,a,o)}(e,t,r,n,ia,a))}function oa(e,t,r,n){var a=r.length,o=a,s=!n;if(null==e)return!o;for(e=tt(e);a--;){var l=r[a];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<o;){var c=(l=r[a])[0],u=e[c],d=l[1];if(s&&l[2]){if(u===i&&!(c in e))return!1}else{var p=new wn;if(n)var h=n(u,d,c,e,t,p);if(!(h===i?ia(d,u,m|g,n,p):h))return!1}}return!0}function sa(e){return!(!Ss(e)||(t=e,pt&&pt in t))&&(Ms(e)?gt:Ge).test(uo(e));var t}function la(e){return"function"==typeof e?e:null==e?El:"object"==typeof e?vs(e)?fa(e[0],e[1]):ha(e):jl(e)}function ca(e){if(!Zi(e))return Vr(e);var t=[];for(var r in tt(e))ut.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ua(e){if(!Ss(e))return function(e){var t=[];if(null!=e)for(var r in tt(e))t.push(r);return t}(e);var t=Zi(e),r=[];for(var n in e)("constructor"!=n||!t&&ut.call(e,n))&&r.push(n);return r}function da(e,t){return e<t}function pa(e,t){var r=-1,a=bs(e)?n(e.length):[];return jn(e,(function(e,n,i){a[++r]=t(e,n,i)})),a}function ha(e){var t=zi(e);return 1==t.length&&t[0][2]?$i(t[0][0],t[0][1]):function(r){return r===e||oa(r,e,t)}}function fa(e,t){return qi(e)&&Ji(t)?$i(co(e),t):function(r){var n=Qs(r,e);return n===i&&n===t?el(r,e):ia(t,n,m|g)}}function ma(e,t,r,n,a){e!==t&&Wn(t,(function(o,s){if(a||(a=new wn),Ss(o))!function(e,t,r,n,a,o,s){var l=to(e,r),c=to(t,r),u=s.get(c);if(u)return void Sn(e,r,u);var d=o?o(l,c,r+"",e,t,s):i,p=d===i;if(p){var h=vs(c),f=!h&&xs(c),m=!h&&!f&&Fs(c);d=c,h||f||m?vs(l)?d=l:_s(l)?d=ri(l):f?(p=!1,d=Za(c,!0)):m?(p=!1,d=$a(c,!0)):d=[]:Ds(c)||gs(c)?(d=l,gs(l)?d=Us(l):Ss(l)&&!Ms(l)||(d=Vi(c))):p=!1}p&&(s.set(c,d),a(d,c,n,o,s),s.delete(c));Sn(e,r,d)}(e,t,s,r,ma,n,a);else{var l=n?n(to(e,s),o,s+"",e,t,a):i;l===i&&(l=o),Sn(e,s,l)}}),il)}function ga(e,t){var r=e.length;if(r)return Wi(t+=t<0?r:0,r)?e[t]:i}function va(e,t,r){var n=-1;return t=Qt(t.length?t:[El],gr(Ri())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(pa(e,(function(e,r,a){return{criteria:Qt(t,(function(t){return t(e)})),index:++n,value:e}})),(function(e,t){return function(e,t,r){var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;for(;++n<o;){var l=Qa(a[n],i[n]);if(l){if(n>=s)return l;var c=r[n];return l*("desc"==c?-1:1)}}return e.index-t.index}(e,t,r)}))}function ya(e,t,r){for(var n=-1,a=t.length,i={};++n<a;){var o=t[n],s=Zn(e,o);r(s,o)&&Ca(i,Ga(o,e),s)}return i}function ba(e,t,r,n){var a=n?lr:sr,i=-1,o=t.length,s=e;for(e===t&&(t=ri(t)),r&&(s=Qt(e,gr(r)));++i<o;)for(var l=0,c=t[i],u=r?r(c):c;(l=a(s,u,l,n))>-1;)s!==e&&Rt.call(s,l,1),Rt.call(e,l,1);return e}function _a(e,t){for(var r=e?t.length:0,n=r-1;r--;){var a=t[r];if(r==n||a!==i){var i=a;Wi(a)?Rt.call(e,a,1):Na(e,a)}}return e}function xa(e,t){return e+Nr(Kr()*(t-e+1))}function wa(e,t){var r="";if(!e||t<1||t>O)return r;do{t%2&&(r+=e),(t=Nr(t/2))&&(e+=e)}while(t);return r}function ka(e,t){return ao(Qi(e,t,El),e+"")}function Ma(e){return Mn(hl(e))}function Ta(e,t){var r=hl(e);return so(r,On(t,0,r.length))}function Ca(e,t,r,n){if(!Ss(e))return e;for(var a=-1,o=(t=Ga(t,e)).length,s=o-1,l=e;null!=l&&++a<o;){var c=co(t[a]),u=r;if(a!=s){var d=l[c];(u=n?n(d,c,l):i)===i&&(u=Ss(d)?d:Wi(t[a+1])?[]:{})}Ln(l,c,u),l=l[c]}return e}var Sa=rn?function(e,t){return rn.set(e,t),e}:El,La=pr?function(e,t){return pr(e,"toString",{configurable:!0,enumerable:!1,value:Sl(t),writable:!0})}:El;function Aa(e){return so(hl(e))}function Ea(e,t,r){var a=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=n(i);++a<i;)o[a]=e[a+t];return o}function Da(e,t){var r;return jn(e,(function(e,n,a){return!(r=t(e,n,a))})),!!r}function Ia(e,t,r){var n=0,a=null==e?n:e.length;if("number"==typeof t&&t==t&&a<=j){for(;n<a;){var i=n+a>>>1,o=e[i];null!==o&&!Rs(o)&&(r?o<=t:o<t)?n=i+1:a=i}return a}return Pa(e,t,El,r)}function Pa(e,t,r,n){t=r(t);for(var a=0,o=null==e?0:e.length,s=t!=t,l=null===t,c=Rs(t),u=t===i;a<o;){var d=Nr((a+o)/2),p=r(e[d]),h=p!==i,f=null===p,m=p==p,g=Rs(p);if(s)var v=n||m;else v=u?m&&(n||h):l?m&&h&&(n||!f):c?m&&h&&!f&&(n||!g):!f&&!g&&(n?p<=t:p<t);v?a=d+1:o=d}return Wr(o,N)}function Oa(e,t){for(var r=-1,n=e.length,a=0,i=[];++r<n;){var o=e[r],s=t?t(o):o;if(!r||!hs(s,l)){var l=s;i[a++]=0===o?0:o}}return i}function Ra(e){return"number"==typeof e?e:Rs(e)?F:+e}function Fa(e){if("string"==typeof e)return e;if(vs(e))return Qt(e,Fa)+"";if(Rs(e))return pn?pn.call(e):"";var t=e+"";return"0"==t&&1/e==-P?"-0":t}function za(e,t,r){var n=-1,a=Jt,i=e.length,s=!0,l=[],c=l;if(r)s=!1,a=$t;else if(i>=o){var u=t?null:wi(e);if(u)return Lr(u);s=!1,a=yr,c=new xn}else c=t?[]:l;e:for(;++n<i;){var d=e[n],p=t?t(d):d;if(d=r||0!==d?d:0,s&&p==p){for(var h=c.length;h--;)if(c[h]===p)continue e;t&&c.push(p),l.push(d)}else a(c,p,r)||(c!==l&&c.push(p),l.push(d))}return l}function Na(e,t){return null==(e=eo(e,t=Ga(t,e)))||delete e[co(ko(t))]}function ja(e,t,r,n){return Ca(e,t,r(Zn(e,t)),n)}function Ba(e,t,r,n){for(var a=e.length,i=n?a:-1;(n?i--:++i<a)&&t(e[i],i,e););return r?Ea(e,n?0:i,n?i+1:a):Ea(e,n?i+1:0,n?a:i)}function Ya(e,t){var r=e;return r instanceof vn&&(r=r.value()),tr(t,(function(e,t){return t.func.apply(t.thisArg,er([e],t.args))}),r)}function Ha(e,t,r){var a=e.length;if(a<2)return a?za(e[0]):[];for(var i=-1,o=n(a);++i<a;)for(var s=e[i],l=-1;++l<a;)l!=i&&(o[i]=Nn(o[i]||s,e[l],t,r));return za(Un(o,1),t,r)}function Va(e,t,r){for(var n=-1,a=e.length,o=t.length,s={};++n<a;){var l=n<o?t[n]:i;r(s,e[n],l)}return s}function Ua(e){return _s(e)?e:[]}function Wa(e){return"function"==typeof e?e:El}function Ga(e,t){return vs(e)?e:qi(e,t)?[e]:lo(Ws(e))}var qa=ka;function Ka(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:Ea(e,t,r)}var Xa=Or||function(e){return Pt.clearTimeout(e)};function Za(e,t){if(t)return e.slice();var r=e.length,n=Lt?Lt(r):new e.constructor(r);return e.copy(n),n}function Ja(e){var t=new e.constructor(e.byteLength);return new wt(t).set(new wt(e)),t}function $a(e,t){var r=t?Ja(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Qa(e,t){if(e!==t){var r=e!==i,n=null===e,a=e==e,o=Rs(e),s=t!==i,l=null===t,c=t==t,u=Rs(t);if(!l&&!u&&!o&&e>t||o&&s&&c&&!l&&!u||n&&s&&c||!r&&c||!a)return 1;if(!n&&!o&&!u&&e<t||u&&r&&a&&!n&&!o||l&&r&&a||!s&&a||!c)return-1}return 0}function ei(e,t,r,a){for(var i=-1,o=e.length,s=r.length,l=-1,c=t.length,u=Ur(o-s,0),d=n(c+u),p=!a;++l<c;)d[l]=t[l];for(;++i<s;)(p||i<o)&&(d[r[i]]=e[i]);for(;u--;)d[l++]=e[i++];return d}function ti(e,t,r,a){for(var i=-1,o=e.length,s=-1,l=r.length,c=-1,u=t.length,d=Ur(o-l,0),p=n(d+u),h=!a;++i<d;)p[i]=e[i];for(var f=i;++c<u;)p[f+c]=t[c];for(;++s<l;)(h||i<o)&&(p[f+r[s]]=e[i++]);return p}function ri(e,t){var r=-1,a=e.length;for(t||(t=n(a));++r<a;)t[r]=e[r];return t}function ni(e,t,r,n){var a=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var l=t[o],c=n?n(r[l],e[l],l,r,e):i;c===i&&(c=e[l]),a?In(r,l,c):Ln(r,l,c)}return r}function ai(e,t){return function(r,n){var a=vs(r)?Gt:En,i=t?t():{};return a(r,e,Ri(n,2),i)}}function ii(e){return ka((function(t,r){var n=-1,a=r.length,o=a>1?r[a-1]:i,s=a>2?r[2]:i;for(o=e.length>3&&"function"==typeof o?(a--,o):i,s&&Gi(r[0],r[1],s)&&(o=a<3?i:o,a=1),t=tt(t);++n<a;){var l=r[n];l&&e(t,l,n,o)}return t}))}function oi(e,t){return function(r,n){if(null==r)return r;if(!bs(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=tt(r);(t?i--:++i<a)&&!1!==n(o[i],i,o););return r}}function si(e){return function(t,r,n){for(var a=-1,i=tt(t),o=n(t),s=o.length;s--;){var l=o[e?s:++a];if(!1===r(i[l],l,i))break}return t}}function li(e){return function(t){var r=Mr(t=Ws(t))?Dr(t):i,n=r?r[0]:t.charAt(0),a=r?Ka(r,1).join(""):t.slice(1);return n[e]()+a}}function ci(e){return function(t){return tr(Ml(gl(t).replace(yt,"")),e,"")}}function ui(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=fn(e.prototype),n=e.apply(r,t);return Ss(n)?n:r}}function di(e){return function(t,r,n){var a=tt(t);if(!bs(t)){var o=Ri(r,3);t=al(t),r=function(e){return o(a[e],e,a)}}var s=e(t,r,n);return s>-1?a[o?t[s]:s]:i}}function pi(e){return Ai((function(t){var r=t.length,n=r,a=gn.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new at(l);if(a&&!s&&"wrapper"==Pi(o))var s=new gn([],!0)}for(n=s?n:r;++n<r;){var c=Pi(o=t[n]),u="wrapper"==c?Ii(o):i;s=u&&Ki(u[0])&&u[1]==(M|_|w|T)&&!u[4].length&&1==u[9]?s[Pi(u[0])].apply(s,u[3]):1==o.length&&Ki(o)?s[c]():s.thru(o)}return function(){var e=arguments,n=e[0];if(s&&1==e.length&&vs(n))return s.plant(n).value();for(var a=0,i=r?t[a].apply(this,e):n;++a<r;)i=t[a].call(this,i);return i}}))}function hi(e,t,r,a,o,s,l,c,u,d){var p=t&M,h=t&v,f=t&y,m=t&(_|x),g=t&C,b=f?i:ui(e);return function v(){for(var y=arguments.length,_=n(y),x=y;x--;)_[x]=arguments[x];if(m)var w=Oi(v),k=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(_,w);if(a&&(_=ei(_,a,o,m)),s&&(_=ti(_,s,l,m)),y-=k,m&&y<d){var M=Sr(_,w);return _i(e,t,hi,v.placeholder,r,_,M,c,u,d-y)}var T=h?r:this,C=f?T[e]:e;return y=_.length,c?_=function(e,t){var r=e.length,n=Wr(t.length,r),a=ri(e);for(;n--;){var o=t[n];e[n]=Wi(o,r)?a[o]:i}return e}(_,c):g&&y>1&&_.reverse(),p&&u<y&&(_.length=u),this&&this!==Pt&&this instanceof v&&(C=b||ui(C)),C.apply(T,_)}}function fi(e,t){return function(r,n){return function(e,t,r,n){return qn(e,(function(e,a,i){t(n,r(e),a,i)})),n}(r,e,t(n),{})}}function mi(e,t){return function(r,n){var a;if(r===i&&n===i)return t;if(r!==i&&(a=r),n!==i){if(a===i)return n;"string"==typeof r||"string"==typeof n?(r=Fa(r),n=Fa(n)):(r=Ra(r),n=Ra(n)),a=e(r,n)}return a}}function gi(e){return Ai((function(t){return t=Qt(t,gr(Ri())),ka((function(r){var n=this;return e(t,(function(e){return Wt(e,n,r)}))}))}))}function vi(e,t){var r=(t=t===i?" ":Fa(t)).length;if(r<2)return r?wa(t,e):t;var n=wa(t,zr(e/Er(t)));return Mr(t)?Ka(Dr(n),0,e).join(""):n.slice(0,e)}function yi(e){return function(t,r,a){return a&&"number"!=typeof a&&Gi(t,r,a)&&(r=a=i),t=Bs(t),r===i?(r=t,t=0):r=Bs(r),function(e,t,r,a){for(var i=-1,o=Ur(zr((t-e)/(r||1)),0),s=n(o);o--;)s[a?o:++i]=e,e+=r;return s}(t,r,a=a===i?t<r?1:-1:Bs(a),e)}}function bi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Vs(t),r=Vs(r)),e(t,r)}}function _i(e,t,r,n,a,o,s,l,c,u){var d=t&_;t|=d?w:k,(t&=~(d?k:w))&b||(t&=~(v|y));var p=[e,t,a,d?o:i,d?s:i,d?i:o,d?i:s,l,c,u],h=r.apply(i,p);return Ki(e)&&ro(h,p),h.placeholder=n,io(h,e,t)}function xi(e){var t=et[e];return function(e,r){if(e=Vs(e),(r=null==r?0:Wr(Ys(r),292))&&Yr(e)){var n=(Ws(e)+"e").split("e");return+((n=(Ws(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var wi=Qr&&1/Lr(new Qr([,-0]))[1]==P?function(e){return new Qr(e)}:Rl;function ki(e){return function(t){var r=Yi(t);return r==Z?Tr(t):r==re?Ar(t):function(e,t){return Qt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Mi(e,t,r,a,o,s,c,u){var p=t&y;if(!p&&"function"!=typeof e)throw new at(l);var h=a?a.length:0;if(h||(t&=~(w|k),a=o=i),c=c===i?c:Ur(Ys(c),0),u=u===i?u:Ys(u),h-=o?o.length:0,t&k){var f=a,m=o;a=o=i}var g=p?i:Ii(e),C=[e,t,r,a,o,f,m,s,c,u];if(g&&function(e,t){var r=e[1],n=t[1],a=r|n,i=a<(v|y|M),o=n==M&&r==_||n==M&&r==T&&e[7].length<=t[8]||n==(M|T)&&t[7].length<=t[8]&&r==_;if(!i&&!o)return e;n&v&&(e[2]=t[2],a|=r&v?0:b);var s=t[3];if(s){var l=e[3];e[3]=l?ei(l,s,t[4]):s,e[4]=l?Sr(e[3],d):t[4]}(s=t[5])&&(l=e[5],e[5]=l?ti(l,s,t[6]):s,e[6]=l?Sr(e[5],d):t[6]);(s=t[7])&&(e[7]=s);n&M&&(e[8]=null==e[8]?t[8]:Wr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=a}(C,g),e=C[0],t=C[1],r=C[2],a=C[3],o=C[4],!(u=C[9]=C[9]===i?p?0:e.length:Ur(C[9]-h,0))&&t&(_|x)&&(t&=~(_|x)),t&&t!=v)S=t==_||t==x?function(e,t,r){var a=ui(e);return function o(){for(var s=arguments.length,l=n(s),c=s,u=Oi(o);c--;)l[c]=arguments[c];var d=s<3&&l[0]!==u&&l[s-1]!==u?[]:Sr(l,u);return(s-=d.length)<r?_i(e,t,hi,o.placeholder,i,l,d,i,i,r-s):Wt(this&&this!==Pt&&this instanceof o?a:e,this,l)}}(e,t,u):t!=w&&t!=(v|w)||o.length?hi.apply(i,C):function(e,t,r,a){var i=t&v,o=ui(e);return function t(){for(var s=-1,l=arguments.length,c=-1,u=a.length,d=n(u+l),p=this&&this!==Pt&&this instanceof t?o:e;++c<u;)d[c]=a[c];for(;l--;)d[c++]=arguments[++s];return Wt(p,i?r:this,d)}}(e,t,r,a);else var S=function(e,t,r){var n=t&v,a=ui(e);return function t(){return(this&&this!==Pt&&this instanceof t?a:e).apply(n?r:this,arguments)}}(e,t,r);return io((g?Sa:ro)(S,C),e,t)}function Ti(e,t,r,n){return e===i||hs(e,st[r])&&!ut.call(n,r)?t:e}function Ci(e,t,r,n,a,o){return Ss(e)&&Ss(t)&&(o.set(t,e),ma(e,t,i,Ci,o),o.delete(t)),e}function Si(e){return Ds(e)?i:e}function Li(e,t,r,n,a,o){var s=r&m,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var d=-1,p=!0,h=r&g?new xn:i;for(o.set(e,t),o.set(t,e);++d<l;){var f=e[d],v=t[d];if(n)var y=s?n(v,f,d,t,e,o):n(f,v,d,e,t,o);if(y!==i){if(y)continue;p=!1;break}if(h){if(!nr(t,(function(e,t){if(!yr(h,t)&&(f===e||a(f,e,r,n,o)))return h.push(t)}))){p=!1;break}}else if(f!==v&&!a(f,v,r,n,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function Ai(e){return ao(Qi(e,i,yo),e+"")}function Ei(e){return Jn(e,al,ji)}function Di(e){return Jn(e,il,Bi)}var Ii=rn?function(e){return rn.get(e)}:Rl;function Pi(e){for(var t=e.name+"",r=nn[t],n=ut.call(nn,t)?r.length:0;n--;){var a=r[n],i=a.func;if(null==i||i==e)return a.name}return t}function Oi(e){return(ut.call(hn,"placeholder")?hn:e).placeholder}function Ri(){var e=hn.iteratee||Dl;return e=e===Dl?la:e,arguments.length?e(arguments[0],arguments[1]):e}function Fi(e,t){var r,n,a=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?a["string"==typeof t?"string":"hash"]:a.map}function zi(e){for(var t=al(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,Ji(a)]}return t}function Ni(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return sa(r)?r:i}var ji=jr?function(e){return null==e?[]:(e=tt(e),Zt(jr(e),(function(t){return Ot.call(e,t)})))}:Hl,Bi=jr?function(e){for(var t=[];e;)er(t,ji(e)),e=Dt(e);return t}:Hl,Yi=$n;function Hi(e,t,r){for(var n=-1,a=(t=Ga(t,e)).length,i=!1;++n<a;){var o=co(t[n]);if(!(i=null!=e&&r(e,o)))break;e=e[o]}return i||++n!=a?i:!!(a=null==e?0:e.length)&&Cs(a)&&Wi(o,a)&&(vs(e)||gs(e))}function Vi(e){return"function"!=typeof e.constructor||Zi(e)?{}:fn(Dt(e))}function Ui(e){return vs(e)||gs(e)||!!(zt&&e&&e[zt])}function Wi(e,t){var r=typeof e;return!!(t=null==t?O:t)&&("number"==r||"symbol"!=r&&Ke.test(e))&&e>-1&&e%1==0&&e<t}function Gi(e,t,r){if(!Ss(r))return!1;var n=typeof t;return!!("number"==n?bs(r)&&Wi(t,r.length):"string"==n&&t in r)&&hs(r[t],e)}function qi(e,t){if(vs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Rs(e))||(Ee.test(e)||!Ae.test(e)||null!=t&&e in tt(t))}function Ki(e){var t=Pi(e),r=hn[t];if("function"!=typeof r||!(t in vn.prototype))return!1;if(e===r)return!0;var n=Ii(r);return!!n&&e===n[0]}(Zr&&Yi(new Zr(new ArrayBuffer(1)))!=ce||Jr&&Yi(new Jr)!=Z||$r&&"[object Promise]"!=Yi($r.resolve())||Qr&&Yi(new Qr)!=re||en&&Yi(new en)!=oe)&&(Yi=function(e){var t=$n(e),r=t==Q?e.constructor:i,n=r?uo(r):"";if(n)switch(n){case an:return ce;case on:return Z;case sn:return"[object Promise]";case ln:return re;case cn:return oe}return t});var Xi=lt?Ms:Vl;function Zi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||st)}function Ji(e){return e==e&&!Ss(e)}function $i(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==i||e in tt(r)))}}function Qi(e,t,r){return t=Ur(t===i?e.length-1:t,0),function(){for(var a=arguments,i=-1,o=Ur(a.length-t,0),s=n(o);++i<o;)s[i]=a[t+i];i=-1;for(var l=n(t+1);++i<t;)l[i]=a[i];return l[t]=r(s),Wt(e,this,l)}}function eo(e,t){return t.length<2?e:Zn(e,Ea(t,0,-1))}function to(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ro=oo(Sa),no=Fr||function(e,t){return Pt.setTimeout(e,t)},ao=oo(La);function io(e,t,r){var n=t+"";return ao(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ze,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return qt(B,(function(r){var n="_."+r[0];t&r[1]&&!Jt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(Ne);return t?t[1].split(je):[]}(n),r)))}function oo(e){var t=0,r=0;return function(){var n=Gr(),a=E-(n-r);if(r=n,a>0){if(++t>=A)return arguments[0]}else t=0;return e.apply(i,arguments)}}function so(e,t){var r=-1,n=e.length,a=n-1;for(t=t===i?n:t;++r<t;){var o=xa(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}var lo=function(e){var t=ss(e,(function(e){return r.size===u&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(De,(function(e,r,n,a){t.push(n?a.replace(Ye,"$1"):r||e)})),t}));function co(e){if("string"==typeof e||Rs(e))return e;var t=e+"";return"0"==t&&1/e==-P?"-0":t}function uo(e){if(null!=e){try{return ct.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function po(e){if(e instanceof vn)return e.clone();var t=new gn(e.__wrapped__,e.__chain__);return t.__actions__=ri(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ho=ka((function(e,t){return _s(e)?Nn(e,Un(t,1,_s,!0)):[]})),fo=ka((function(e,t){var r=ko(t);return _s(r)&&(r=i),_s(e)?Nn(e,Un(t,1,_s,!0),Ri(r,2)):[]})),mo=ka((function(e,t){var r=ko(t);return _s(r)&&(r=i),_s(e)?Nn(e,Un(t,1,_s,!0),i,r):[]}));function go(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Ys(r);return a<0&&(a=Ur(n+a,0)),or(e,Ri(t,3),a)}function vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n-1;return r!==i&&(a=Ys(r),a=r<0?Ur(n+a,0):Wr(a,n-1)),or(e,Ri(t,3),a,!0)}function yo(e){return(null==e?0:e.length)?Un(e,1):[]}function bo(e){return e&&e.length?e[0]:i}var _o=ka((function(e){var t=Qt(e,Ua);return t.length&&t[0]===e[0]?ra(t):[]})),xo=ka((function(e){var t=ko(e),r=Qt(e,Ua);return t===ko(r)?t=i:r.pop(),r.length&&r[0]===e[0]?ra(r,Ri(t,2)):[]})),wo=ka((function(e){var t=ko(e),r=Qt(e,Ua);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?ra(r,i,t):[]}));function ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Mo=ka(To);function To(e,t){return e&&e.length&&t&&t.length?ba(e,t):e}var Co=Ai((function(e,t){var r=null==e?0:e.length,n=Pn(e,t);return _a(e,Qt(t,(function(e){return Wi(e,r)?+e:e})).sort(Qa)),n}));function So(e){return null==e?e:Xr.call(e)}var Lo=ka((function(e){return za(Un(e,1,_s,!0))})),Ao=ka((function(e){var t=ko(e);return _s(t)&&(t=i),za(Un(e,1,_s,!0),Ri(t,2))})),Eo=ka((function(e){var t=ko(e);return t="function"==typeof t?t:i,za(Un(e,1,_s,!0),i,t)}));function Do(e){if(!e||!e.length)return[];var t=0;return e=Zt(e,(function(e){if(_s(e))return t=Ur(e.length,t),!0})),mr(t,(function(t){return Qt(e,dr(t))}))}function Io(e,t){if(!e||!e.length)return[];var r=Do(e);return null==t?r:Qt(r,(function(e){return Wt(t,i,e)}))}var Po=ka((function(e,t){return _s(e)?Nn(e,t):[]})),Oo=ka((function(e){return Ha(Zt(e,_s))})),Ro=ka((function(e){var t=ko(e);return _s(t)&&(t=i),Ha(Zt(e,_s),Ri(t,2))})),Fo=ka((function(e){var t=ko(e);return t="function"==typeof t?t:i,Ha(Zt(e,_s),i,t)})),zo=ka(Do);var No=ka((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,Io(e,r)}));function jo(e){var t=hn(e);return t.__chain__=!0,t}function Bo(e,t){return t(e)}var Yo=Ai((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,a=function(t){return Pn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof vn&&Wi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:Bo,args:[a],thisArg:i}),new gn(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(a)}));var Ho=ai((function(e,t,r){ut.call(e,r)?++e[r]:In(e,r,1)}));var Vo=di(go),Uo=di(vo);function Wo(e,t){return(vs(e)?qt:jn)(e,Ri(t,3))}function Go(e,t){return(vs(e)?Kt:Bn)(e,Ri(t,3))}var qo=ai((function(e,t,r){ut.call(e,r)?e[r].push(t):In(e,r,[t])}));var Ko=ka((function(e,t,r){var a=-1,i="function"==typeof t,o=bs(e)?n(e.length):[];return jn(e,(function(e){o[++a]=i?Wt(t,e,r):na(e,t,r)})),o})),Xo=ai((function(e,t,r){In(e,r,t)}));function Zo(e,t){return(vs(e)?Qt:pa)(e,Ri(t,3))}var Jo=ai((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var $o=ka((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Gi(e,t[0],t[1])?t=[]:r>2&&Gi(t[0],t[1],t[2])&&(t=[t[0]]),va(e,Un(t,1),[])})),Qo=Rr||function(){return Pt.Date.now()};function es(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Mi(e,M,i,i,i,i,t)}function ts(e,t){var r;if("function"!=typeof t)throw new at(l);return e=Ys(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var rs=ka((function(e,t,r){var n=v;if(r.length){var a=Sr(r,Oi(rs));n|=w}return Mi(e,n,t,r,a)})),ns=ka((function(e,t,r){var n=v|y;if(r.length){var a=Sr(r,Oi(ns));n|=w}return Mi(t,n,e,r,a)}));function as(e,t,r){var n,a,o,s,c,u,d=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new at(l);function m(t){var r=n,o=a;return n=a=i,d=t,s=e.apply(o,r)}function g(e){var r=e-u;return u===i||r>=t||r<0||h&&e-d>=o}function v(){var e=Qo();if(g(e))return y(e);c=no(v,function(e){var r=t-(e-u);return h?Wr(r,o-(e-d)):r}(e))}function y(e){return c=i,f&&n?m(e):(n=a=i,s)}function b(){var e=Qo(),r=g(e);if(n=arguments,a=this,u=e,r){if(c===i)return function(e){return d=e,c=no(v,t),p?m(e):s}(u);if(h)return Xa(c),c=no(v,t),m(u)}return c===i&&(c=no(v,t)),s}return t=Vs(t)||0,Ss(r)&&(p=!!r.leading,o=(h="maxWait"in r)?Ur(Vs(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),b.cancel=function(){c!==i&&Xa(c),d=0,n=u=a=c=i},b.flush=function(){return c===i?s:y(Qo())},b}var is=ka((function(e,t){return zn(e,1,t)})),os=ka((function(e,t,r){return zn(e,Vs(t)||0,r)}));function ss(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new at(l);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(ss.Cache||_n),r}function ls(e){if("function"!=typeof e)throw new at(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ss.Cache=_n;var cs=qa((function(e,t){var r=(t=1==t.length&&vs(t[0])?Qt(t[0],gr(Ri())):Qt(Un(t,1),gr(Ri()))).length;return ka((function(n){for(var a=-1,i=Wr(n.length,r);++a<i;)n[a]=t[a].call(this,n[a]);return Wt(e,this,n)}))})),us=ka((function(e,t){var r=Sr(t,Oi(us));return Mi(e,w,i,t,r)})),ds=ka((function(e,t){var r=Sr(t,Oi(ds));return Mi(e,k,i,t,r)})),ps=Ai((function(e,t){return Mi(e,T,i,i,i,t)}));function hs(e,t){return e===t||e!=e&&t!=t}var fs=bi(Qn),ms=bi((function(e,t){return e>=t})),gs=aa(function(){return arguments}())?aa:function(e){return Ls(e)&&ut.call(e,"callee")&&!Ot.call(e,"callee")},vs=n.isArray,ys=jt?gr(jt):function(e){return Ls(e)&&$n(e)==le};function bs(e){return null!=e&&Cs(e.length)&&!Ms(e)}function _s(e){return Ls(e)&&bs(e)}var xs=Br||Vl,ws=Bt?gr(Bt):function(e){return Ls(e)&&$n(e)==W};function ks(e){if(!Ls(e))return!1;var t=$n(e);return t==q||t==G||"string"==typeof e.message&&"string"==typeof e.name&&!Ds(e)}function Ms(e){if(!Ss(e))return!1;var t=$n(e);return t==K||t==X||t==V||t==ee}function Ts(e){return"number"==typeof e&&e==Ys(e)}function Cs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=O}function Ss(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ls(e){return null!=e&&"object"==typeof e}var As=Yt?gr(Yt):function(e){return Ls(e)&&Yi(e)==Z};function Es(e){return"number"==typeof e||Ls(e)&&$n(e)==J}function Ds(e){if(!Ls(e)||$n(e)!=Q)return!1;var t=Dt(e);if(null===t)return!0;var r=ut.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ct.call(r)==ft}var Is=Ht?gr(Ht):function(e){return Ls(e)&&$n(e)==te};var Ps=Vt?gr(Vt):function(e){return Ls(e)&&Yi(e)==re};function Os(e){return"string"==typeof e||!vs(e)&&Ls(e)&&$n(e)==ne}function Rs(e){return"symbol"==typeof e||Ls(e)&&$n(e)==ae}var Fs=Ut?gr(Ut):function(e){return Ls(e)&&Cs(e.length)&&!!Ct[$n(e)]};var zs=bi(da),Ns=bi((function(e,t){return e<=t}));function js(e){if(!e)return[];if(bs(e))return Os(e)?Dr(e):ri(e);if(Nt&&e[Nt])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Nt]());var t=Yi(e);return(t==Z?Tr:t==re?Lr:hl)(e)}function Bs(e){return e?(e=Vs(e))===P||e===-P?(e<0?-1:1)*R:e==e?e:0:0===e?e:0}function Ys(e){var t=Bs(e),r=t%1;return t==t?r?t-r:t:0}function Hs(e){return e?On(Ys(e),0,z):0}function Vs(e){if("number"==typeof e)return e;if(Rs(e))return F;if(Ss(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ss(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Oe,"");var r=We.test(e);return r||qe.test(e)?Et(e.slice(2),r?2:8):Ue.test(e)?F:+e}function Us(e){return ni(e,il(e))}function Ws(e){return null==e?"":Fa(e)}var Gs=ii((function(e,t){if(Zi(t)||bs(t))ni(t,al(t),e);else for(var r in t)ut.call(t,r)&&Ln(e,r,t[r])})),qs=ii((function(e,t){ni(t,il(t),e)})),Ks=ii((function(e,t,r,n){ni(t,il(t),e,n)})),Xs=ii((function(e,t,r,n){ni(t,al(t),e,n)})),Zs=Ai(Pn);var Js=ka((function(e,t){e=tt(e);var r=-1,n=t.length,a=n>2?t[2]:i;for(a&&Gi(t[0],t[1],a)&&(n=1);++r<n;)for(var o=t[r],s=il(o),l=-1,c=s.length;++l<c;){var u=s[l],d=e[u];(d===i||hs(d,st[u])&&!ut.call(e,u))&&(e[u]=o[u])}return e})),$s=ka((function(e){return e.push(i,Ci),Wt(sl,i,e)}));function Qs(e,t,r){var n=null==e?i:Zn(e,t);return n===i?r:n}function el(e,t){return null!=e&&Hi(e,t,ta)}var tl=fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=ht.call(t)),e[t]=r}),Sl(El)),rl=fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=ht.call(t)),ut.call(e,t)?e[t].push(r):e[t]=[r]}),Ri),nl=ka(na);function al(e){return bs(e)?kn(e):ca(e)}function il(e){return bs(e)?kn(e,!0):ua(e)}var ol=ii((function(e,t,r){ma(e,t,r)})),sl=ii((function(e,t,r,n){ma(e,t,r,n)})),ll=Ai((function(e,t){var r={};if(null==e)return r;var n=!1;t=Qt(t,(function(t){return t=Ga(t,e),n||(n=t.length>1),t})),ni(e,Di(e),r),n&&(r=Rn(r,p|h|f,Si));for(var a=t.length;a--;)Na(r,t[a]);return r}));var cl=Ai((function(e,t){return null==e?{}:function(e,t){return ya(e,t,(function(t,r){return el(e,r)}))}(e,t)}));function ul(e,t){if(null==e)return{};var r=Qt(Di(e),(function(e){return[e]}));return t=Ri(t),ya(e,r,(function(e,r){return t(e,r[0])}))}var dl=ki(al),pl=ki(il);function hl(e){return null==e?[]:vr(e,al(e))}var fl=ci((function(e,t,r){return t=t.toLowerCase(),e+(r?ml(t):t)}));function ml(e){return kl(Ws(e).toLowerCase())}function gl(e){return(e=Ws(e))&&e.replace(Xe,xr).replace(bt,"")}var vl=ci((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),yl=ci((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),bl=li("toLowerCase");var _l=ci((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var xl=ci((function(e,t,r){return e+(r?" ":"")+kl(t)}));var wl=ci((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),kl=li("toUpperCase");function Ml(e,t,r){return e=Ws(e),(t=r?i:t)===i?function(e){return kt.test(e)}(e)?function(e){return e.match(xt)||[]}(e):function(e){return e.match(Be)||[]}(e):e.match(t)||[]}var Tl=ka((function(e,t){try{return Wt(e,i,t)}catch(e){return ks(e)?e:new $e(e)}})),Cl=Ai((function(e,t){return qt(t,(function(t){t=co(t),In(e,t,rs(e[t],e))})),e}));function Sl(e){return function(){return e}}var Ll=pi(),Al=pi(!0);function El(e){return e}function Dl(e){return la("function"==typeof e?e:Rn(e,p))}var Il=ka((function(e,t){return function(r){return na(r,e,t)}})),Pl=ka((function(e,t){return function(r){return na(e,r,t)}}));function Ol(e,t,r){var n=al(t),a=Xn(t,n);null!=r||Ss(t)&&(a.length||!n.length)||(r=t,t=e,e=this,a=Xn(t,al(t)));var i=!(Ss(r)&&"chain"in r&&!r.chain),o=Ms(e);return qt(a,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__),a=r.__actions__=ri(this.__actions__);return a.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,er([this.value()],arguments))})})),e}function Rl(){}var Fl=gi(Qt),zl=gi(Xt),Nl=gi(nr);function jl(e){return qi(e)?dr(co(e)):function(e){return function(t){return Zn(t,e)}}(e)}var Bl=yi(),Yl=yi(!0);function Hl(){return[]}function Vl(){return!1}var Ul=mi((function(e,t){return e+t}),0),Wl=xi("ceil"),Gl=mi((function(e,t){return e/t}),1),ql=xi("floor");var Kl,Xl=mi((function(e,t){return e*t}),1),Zl=xi("round"),Jl=mi((function(e,t){return e-t}),0);return hn.after=function(e,t){if("function"!=typeof t)throw new at(l);return e=Ys(e),function(){if(--e<1)return t.apply(this,arguments)}},hn.ary=es,hn.assign=Gs,hn.assignIn=qs,hn.assignInWith=Ks,hn.assignWith=Xs,hn.at=Zs,hn.before=ts,hn.bind=rs,hn.bindAll=Cl,hn.bindKey=ns,hn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return vs(e)?e:[e]},hn.chain=jo,hn.chunk=function(e,t,r){t=(r?Gi(e,t,r):t===i)?1:Ur(Ys(t),0);var a=null==e?0:e.length;if(!a||t<1)return[];for(var o=0,s=0,l=n(zr(a/t));o<a;)l[s++]=Ea(e,o,o+=t);return l},hn.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,a=[];++t<r;){var i=e[t];i&&(a[n++]=i)}return a},hn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],a=e;a--;)t[a-1]=arguments[a];return er(vs(r)?ri(r):[r],Un(t,1))},hn.cond=function(e){var t=null==e?0:e.length,r=Ri();return e=t?Qt(e,(function(e){if("function"!=typeof e[1])throw new at(l);return[r(e[0]),e[1]]})):[],ka((function(r){for(var n=-1;++n<t;){var a=e[n];if(Wt(a[0],this,r))return Wt(a[1],this,r)}}))},hn.conforms=function(e){return function(e){var t=al(e);return function(r){return Fn(r,e,t)}}(Rn(e,p))},hn.constant=Sl,hn.countBy=Ho,hn.create=function(e,t){var r=fn(e);return null==t?r:Dn(r,t)},hn.curry=function e(t,r,n){var a=Mi(t,_,i,i,i,i,i,r=n?i:r);return a.placeholder=e.placeholder,a},hn.curryRight=function e(t,r,n){var a=Mi(t,x,i,i,i,i,i,r=n?i:r);return a.placeholder=e.placeholder,a},hn.debounce=as,hn.defaults=Js,hn.defaultsDeep=$s,hn.defer=is,hn.delay=os,hn.difference=ho,hn.differenceBy=fo,hn.differenceWith=mo,hn.drop=function(e,t,r){var n=null==e?0:e.length;return n?Ea(e,(t=r||t===i?1:Ys(t))<0?0:t,n):[]},hn.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?Ea(e,0,(t=n-(t=r||t===i?1:Ys(t)))<0?0:t):[]},hn.dropRightWhile=function(e,t){return e&&e.length?Ba(e,Ri(t,3),!0,!0):[]},hn.dropWhile=function(e,t){return e&&e.length?Ba(e,Ri(t,3),!0):[]},hn.fill=function(e,t,r,n){var a=null==e?0:e.length;return a?(r&&"number"!=typeof r&&Gi(e,t,r)&&(r=0,n=a),function(e,t,r,n){var a=e.length;for((r=Ys(r))<0&&(r=-r>a?0:a+r),(n=n===i||n>a?a:Ys(n))<0&&(n+=a),n=r>n?0:Hs(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},hn.filter=function(e,t){return(vs(e)?Zt:Vn)(e,Ri(t,3))},hn.flatMap=function(e,t){return Un(Zo(e,t),1)},hn.flatMapDeep=function(e,t){return Un(Zo(e,t),P)},hn.flatMapDepth=function(e,t,r){return r=r===i?1:Ys(r),Un(Zo(e,t),r)},hn.flatten=yo,hn.flattenDeep=function(e){return(null==e?0:e.length)?Un(e,P):[]},hn.flattenDepth=function(e,t){return(null==e?0:e.length)?Un(e,t=t===i?1:Ys(t)):[]},hn.flip=function(e){return Mi(e,C)},hn.flow=Ll,hn.flowRight=Al,hn.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var a=e[t];n[a[0]]=a[1]}return n},hn.functions=function(e){return null==e?[]:Xn(e,al(e))},hn.functionsIn=function(e){return null==e?[]:Xn(e,il(e))},hn.groupBy=qo,hn.initial=function(e){return(null==e?0:e.length)?Ea(e,0,-1):[]},hn.intersection=_o,hn.intersectionBy=xo,hn.intersectionWith=wo,hn.invert=tl,hn.invertBy=rl,hn.invokeMap=Ko,hn.iteratee=Dl,hn.keyBy=Xo,hn.keys=al,hn.keysIn=il,hn.map=Zo,hn.mapKeys=function(e,t){var r={};return t=Ri(t,3),qn(e,(function(e,n,a){In(r,t(e,n,a),e)})),r},hn.mapValues=function(e,t){var r={};return t=Ri(t,3),qn(e,(function(e,n,a){In(r,n,t(e,n,a))})),r},hn.matches=function(e){return ha(Rn(e,p))},hn.matchesProperty=function(e,t){return fa(e,Rn(t,p))},hn.memoize=ss,hn.merge=ol,hn.mergeWith=sl,hn.method=Il,hn.methodOf=Pl,hn.mixin=Ol,hn.negate=ls,hn.nthArg=function(e){return e=Ys(e),ka((function(t){return ga(t,e)}))},hn.omit=ll,hn.omitBy=function(e,t){return ul(e,ls(Ri(t)))},hn.once=function(e){return ts(2,e)},hn.orderBy=function(e,t,r,n){return null==e?[]:(vs(t)||(t=null==t?[]:[t]),vs(r=n?i:r)||(r=null==r?[]:[r]),va(e,t,r))},hn.over=Fl,hn.overArgs=cs,hn.overEvery=zl,hn.overSome=Nl,hn.partial=us,hn.partialRight=ds,hn.partition=Jo,hn.pick=cl,hn.pickBy=ul,hn.property=jl,hn.propertyOf=function(e){return function(t){return null==e?i:Zn(e,t)}},hn.pull=Mo,hn.pullAll=To,hn.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?ba(e,t,Ri(r,2)):e},hn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?ba(e,t,i,r):e},hn.pullAt=Co,hn.range=Bl,hn.rangeRight=Yl,hn.rearg=ps,hn.reject=function(e,t){return(vs(e)?Zt:Vn)(e,ls(Ri(t,3)))},hn.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,a=[],i=e.length;for(t=Ri(t,3);++n<i;){var o=e[n];t(o,n,e)&&(r.push(o),a.push(n))}return _a(e,a),r},hn.rest=function(e,t){if("function"!=typeof e)throw new at(l);return ka(e,t=t===i?t:Ys(t))},hn.reverse=So,hn.sampleSize=function(e,t,r){return t=(r?Gi(e,t,r):t===i)?1:Ys(t),(vs(e)?Tn:Ta)(e,t)},hn.set=function(e,t,r){return null==e?e:Ca(e,t,r)},hn.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Ca(e,t,r,n)},hn.shuffle=function(e){return(vs(e)?Cn:Aa)(e)},hn.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&Gi(e,t,r)?(t=0,r=n):(t=null==t?0:Ys(t),r=r===i?n:Ys(r)),Ea(e,t,r)):[]},hn.sortBy=$o,hn.sortedUniq=function(e){return e&&e.length?Oa(e):[]},hn.sortedUniqBy=function(e,t){return e&&e.length?Oa(e,Ri(t,2)):[]},hn.split=function(e,t,r){return r&&"number"!=typeof r&&Gi(e,t,r)&&(t=r=i),(r=r===i?z:r>>>0)?(e=Ws(e))&&("string"==typeof t||null!=t&&!Is(t))&&!(t=Fa(t))&&Mr(e)?Ka(Dr(e),0,r):e.split(t,r):[]},hn.spread=function(e,t){if("function"!=typeof e)throw new at(l);return t=null==t?0:Ur(Ys(t),0),ka((function(r){var n=r[t],a=Ka(r,0,t);return n&&er(a,n),Wt(e,this,a)}))},hn.tail=function(e){var t=null==e?0:e.length;return t?Ea(e,1,t):[]},hn.take=function(e,t,r){return e&&e.length?Ea(e,0,(t=r||t===i?1:Ys(t))<0?0:t):[]},hn.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Ea(e,(t=n-(t=r||t===i?1:Ys(t)))<0?0:t,n):[]},hn.takeRightWhile=function(e,t){return e&&e.length?Ba(e,Ri(t,3),!1,!0):[]},hn.takeWhile=function(e,t){return e&&e.length?Ba(e,Ri(t,3)):[]},hn.tap=function(e,t){return t(e),e},hn.throttle=function(e,t,r){var n=!0,a=!0;if("function"!=typeof e)throw new at(l);return Ss(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),as(e,t,{leading:n,maxWait:t,trailing:a})},hn.thru=Bo,hn.toArray=js,hn.toPairs=dl,hn.toPairsIn=pl,hn.toPath=function(e){return vs(e)?Qt(e,co):Rs(e)?[e]:ri(lo(Ws(e)))},hn.toPlainObject=Us,hn.transform=function(e,t,r){var n=vs(e),a=n||xs(e)||Fs(e);if(t=Ri(t,4),null==r){var i=e&&e.constructor;r=a?n?new i:[]:Ss(e)&&Ms(i)?fn(Dt(e)):{}}return(a?qt:qn)(e,(function(e,n,a){return t(r,e,n,a)})),r},hn.unary=function(e){return es(e,1)},hn.union=Lo,hn.unionBy=Ao,hn.unionWith=Eo,hn.uniq=function(e){return e&&e.length?za(e):[]},hn.uniqBy=function(e,t){return e&&e.length?za(e,Ri(t,2)):[]},hn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?za(e,i,t):[]},hn.unset=function(e,t){return null==e||Na(e,t)},hn.unzip=Do,hn.unzipWith=Io,hn.update=function(e,t,r){return null==e?e:ja(e,t,Wa(r))},hn.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ja(e,t,Wa(r),n)},hn.values=hl,hn.valuesIn=function(e){return null==e?[]:vr(e,il(e))},hn.without=Po,hn.words=Ml,hn.wrap=function(e,t){return us(Wa(t),e)},hn.xor=Oo,hn.xorBy=Ro,hn.xorWith=Fo,hn.zip=zo,hn.zipObject=function(e,t){return Va(e||[],t||[],Ln)},hn.zipObjectDeep=function(e,t){return Va(e||[],t||[],Ca)},hn.zipWith=No,hn.entries=dl,hn.entriesIn=pl,hn.extend=qs,hn.extendWith=Ks,Ol(hn,hn),hn.add=Ul,hn.attempt=Tl,hn.camelCase=fl,hn.capitalize=ml,hn.ceil=Wl,hn.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=Vs(r))==r?r:0),t!==i&&(t=(t=Vs(t))==t?t:0),On(Vs(e),t,r)},hn.clone=function(e){return Rn(e,f)},hn.cloneDeep=function(e){return Rn(e,p|f)},hn.cloneDeepWith=function(e,t){return Rn(e,p|f,t="function"==typeof t?t:i)},hn.cloneWith=function(e,t){return Rn(e,f,t="function"==typeof t?t:i)},hn.conformsTo=function(e,t){return null==t||Fn(e,t,al(t))},hn.deburr=gl,hn.defaultTo=function(e,t){return null==e||e!=e?t:e},hn.divide=Gl,hn.endsWith=function(e,t,r){e=Ws(e),t=Fa(t);var n=e.length,a=r=r===i?n:On(Ys(r),0,n);return(r-=t.length)>=0&&e.slice(r,a)==t},hn.eq=hs,hn.escape=function(e){return(e=Ws(e))&&Te.test(e)?e.replace(ke,wr):e},hn.escapeRegExp=function(e){return(e=Ws(e))&&Pe.test(e)?e.replace(Ie,"\\$&"):e},hn.every=function(e,t,r){var n=vs(e)?Xt:Yn;return r&&Gi(e,t,r)&&(t=i),n(e,Ri(t,3))},hn.find=Vo,hn.findIndex=go,hn.findKey=function(e,t){return ir(e,Ri(t,3),qn)},hn.findLast=Uo,hn.findLastIndex=vo,hn.findLastKey=function(e,t){return ir(e,Ri(t,3),Kn)},hn.floor=ql,hn.forEach=Wo,hn.forEachRight=Go,hn.forIn=function(e,t){return null==e?e:Wn(e,Ri(t,3),il)},hn.forInRight=function(e,t){return null==e?e:Gn(e,Ri(t,3),il)},hn.forOwn=function(e,t){return e&&qn(e,Ri(t,3))},hn.forOwnRight=function(e,t){return e&&Kn(e,Ri(t,3))},hn.get=Qs,hn.gt=fs,hn.gte=ms,hn.has=function(e,t){return null!=e&&Hi(e,t,ea)},hn.hasIn=el,hn.head=bo,hn.identity=El,hn.includes=function(e,t,r,n){e=bs(e)?e:hl(e),r=r&&!n?Ys(r):0;var a=e.length;return r<0&&(r=Ur(a+r,0)),Os(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&sr(e,t,r)>-1},hn.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=null==r?0:Ys(r);return a<0&&(a=Ur(n+a,0)),sr(e,t,a)},hn.inRange=function(e,t,r){return t=Bs(t),r===i?(r=t,t=0):r=Bs(r),function(e,t,r){return e>=Wr(t,r)&&e<Ur(t,r)}(e=Vs(e),t,r)},hn.invoke=nl,hn.isArguments=gs,hn.isArray=vs,hn.isArrayBuffer=ys,hn.isArrayLike=bs,hn.isArrayLikeObject=_s,hn.isBoolean=function(e){return!0===e||!1===e||Ls(e)&&$n(e)==U},hn.isBuffer=xs,hn.isDate=ws,hn.isElement=function(e){return Ls(e)&&1===e.nodeType&&!Ds(e)},hn.isEmpty=function(e){if(null==e)return!0;if(bs(e)&&(vs(e)||"string"==typeof e||"function"==typeof e.splice||xs(e)||Fs(e)||gs(e)))return!e.length;var t=Yi(e);if(t==Z||t==re)return!e.size;if(Zi(e))return!ca(e).length;for(var r in e)if(ut.call(e,r))return!1;return!0},hn.isEqual=function(e,t){return ia(e,t)},hn.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?ia(e,t,i,r):!!n},hn.isError=ks,hn.isFinite=function(e){return"number"==typeof e&&Yr(e)},hn.isFunction=Ms,hn.isInteger=Ts,hn.isLength=Cs,hn.isMap=As,hn.isMatch=function(e,t){return e===t||oa(e,t,zi(t))},hn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,oa(e,t,zi(t),r)},hn.isNaN=function(e){return Es(e)&&e!=+e},hn.isNative=function(e){if(Xi(e))throw new $e(s);return sa(e)},hn.isNil=function(e){return null==e},hn.isNull=function(e){return null===e},hn.isNumber=Es,hn.isObject=Ss,hn.isObjectLike=Ls,hn.isPlainObject=Ds,hn.isRegExp=Is,hn.isSafeInteger=function(e){return Ts(e)&&e>=-O&&e<=O},hn.isSet=Ps,hn.isString=Os,hn.isSymbol=Rs,hn.isTypedArray=Fs,hn.isUndefined=function(e){return e===i},hn.isWeakMap=function(e){return Ls(e)&&Yi(e)==oe},hn.isWeakSet=function(e){return Ls(e)&&$n(e)==se},hn.join=function(e,t){return null==e?"":Hr.call(e,t)},hn.kebabCase=vl,hn.last=ko,hn.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var a=n;return r!==i&&(a=(a=Ys(r))<0?Ur(n+a,0):Wr(a,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,a):or(e,cr,a,!0)},hn.lowerCase=yl,hn.lowerFirst=bl,hn.lt=zs,hn.lte=Ns,hn.max=function(e){return e&&e.length?Hn(e,El,Qn):i},hn.maxBy=function(e,t){return e&&e.length?Hn(e,Ri(t,2),Qn):i},hn.mean=function(e){return ur(e,El)},hn.meanBy=function(e,t){return ur(e,Ri(t,2))},hn.min=function(e){return e&&e.length?Hn(e,El,da):i},hn.minBy=function(e,t){return e&&e.length?Hn(e,Ri(t,2),da):i},hn.stubArray=Hl,hn.stubFalse=Vl,hn.stubObject=function(){return{}},hn.stubString=function(){return""},hn.stubTrue=function(){return!0},hn.multiply=Xl,hn.nth=function(e,t){return e&&e.length?ga(e,Ys(t)):i},hn.noConflict=function(){return Pt._===this&&(Pt._=mt),this},hn.noop=Rl,hn.now=Qo,hn.pad=function(e,t,r){e=Ws(e);var n=(t=Ys(t))?Er(e):0;if(!t||n>=t)return e;var a=(t-n)/2;return vi(Nr(a),r)+e+vi(zr(a),r)},hn.padEnd=function(e,t,r){e=Ws(e);var n=(t=Ys(t))?Er(e):0;return t&&n<t?e+vi(t-n,r):e},hn.padStart=function(e,t,r){e=Ws(e);var n=(t=Ys(t))?Er(e):0;return t&&n<t?vi(t-n,r)+e:e},hn.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),qr(Ws(e).replace(Re,""),t||0)},hn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Gi(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=Bs(e),t===i?(t=e,e=0):t=Bs(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var a=Kr();return Wr(e+a*(t-e+At("1e-"+((a+"").length-1))),t)}return xa(e,t)},hn.reduce=function(e,t,r){var n=vs(e)?tr:hr,a=arguments.length<3;return n(e,Ri(t,4),r,a,jn)},hn.reduceRight=function(e,t,r){var n=vs(e)?rr:hr,a=arguments.length<3;return n(e,Ri(t,4),r,a,Bn)},hn.repeat=function(e,t,r){return t=(r?Gi(e,t,r):t===i)?1:Ys(t),wa(Ws(e),t)},hn.replace=function(){var e=arguments,t=Ws(e[0]);return e.length<3?t:t.replace(e[1],e[2])},hn.result=function(e,t,r){var n=-1,a=(t=Ga(t,e)).length;for(a||(a=1,e=i);++n<a;){var o=null==e?i:e[co(t[n])];o===i&&(n=a,o=r),e=Ms(o)?o.call(e):o}return e},hn.round=Zl,hn.runInContext=e,hn.sample=function(e){return(vs(e)?Mn:Ma)(e)},hn.size=function(e){if(null==e)return 0;if(bs(e))return Os(e)?Er(e):e.length;var t=Yi(e);return t==Z||t==re?e.size:ca(e).length},hn.snakeCase=_l,hn.some=function(e,t,r){var n=vs(e)?nr:Da;return r&&Gi(e,t,r)&&(t=i),n(e,Ri(t,3))},hn.sortedIndex=function(e,t){return Ia(e,t)},hn.sortedIndexBy=function(e,t,r){return Pa(e,t,Ri(r,2))},hn.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=Ia(e,t);if(n<r&&hs(e[n],t))return n}return-1},hn.sortedLastIndex=function(e,t){return Ia(e,t,!0)},hn.sortedLastIndexBy=function(e,t,r){return Pa(e,t,Ri(r,2),!0)},hn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=Ia(e,t,!0)-1;if(hs(e[r],t))return r}return-1},hn.startCase=xl,hn.startsWith=function(e,t,r){return e=Ws(e),r=null==r?0:On(Ys(r),0,e.length),t=Fa(t),e.slice(r,r+t.length)==t},hn.subtract=Jl,hn.sum=function(e){return e&&e.length?fr(e,El):0},hn.sumBy=function(e,t){return e&&e.length?fr(e,Ri(t,2)):0},hn.template=function(e,t,r){var n=hn.templateSettings;r&&Gi(e,t,r)&&(t=i),e=Ws(e),t=Ks({},t,n,Ti);var a,o,s=Ks({},t.imports,n.imports,Ti),l=al(s),c=vr(s,l),u=0,d=t.interpolate||Ze,p="__p += '",h=rt((t.escape||Ze).source+"|"+d.source+"|"+(d===Le?He:Ze).source+"|"+(t.evaluate||Ze).source+"|$","g"),f="//# sourceURL="+(ut.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Tt+"]")+"\n";e.replace(h,(function(t,r,n,i,s,l){return n||(n=i),p+=e.slice(u,l).replace(Je,kr),r&&(a=!0,p+="' +\n__e("+r+") +\n'"),s&&(o=!0,p+="';\n"+s+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),p+="';\n";var m=ut.call(t,"variable")&&t.variable;m||(p="with (obj) {\n"+p+"\n}\n"),p=(o?p.replace(be,""):p).replace(_e,"$1").replace(xe,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Tl((function(){return Qe(l,f+"return "+p).apply(i,c)}));if(g.source=p,ks(g))throw g;return g},hn.times=function(e,t){if((e=Ys(e))<1||e>O)return[];var r=z,n=Wr(e,z);t=Ri(t),e-=z;for(var a=mr(n,t);++r<e;)t(r);return a},hn.toFinite=Bs,hn.toInteger=Ys,hn.toLength=Hs,hn.toLower=function(e){return Ws(e).toLowerCase()},hn.toNumber=Vs,hn.toSafeInteger=function(e){return e?On(Ys(e),-O,O):0===e?e:0},hn.toString=Ws,hn.toUpper=function(e){return Ws(e).toUpperCase()},hn.trim=function(e,t,r){if((e=Ws(e))&&(r||t===i))return e.replace(Oe,"");if(!e||!(t=Fa(t)))return e;var n=Dr(e),a=Dr(t);return Ka(n,br(n,a),_r(n,a)+1).join("")},hn.trimEnd=function(e,t,r){if((e=Ws(e))&&(r||t===i))return e.replace(Fe,"");if(!e||!(t=Fa(t)))return e;var n=Dr(e);return Ka(n,0,_r(n,Dr(t))+1).join("")},hn.trimStart=function(e,t,r){if((e=Ws(e))&&(r||t===i))return e.replace(Re,"");if(!e||!(t=Fa(t)))return e;var n=Dr(e);return Ka(n,br(n,Dr(t))).join("")},hn.truncate=function(e,t){var r=S,n=L;if(Ss(t)){var a="separator"in t?t.separator:a;r="length"in t?Ys(t.length):r,n="omission"in t?Fa(t.omission):n}var o=(e=Ws(e)).length;if(Mr(e)){var s=Dr(e);o=s.length}if(r>=o)return e;var l=r-Er(n);if(l<1)return n;var c=s?Ka(s,0,l).join(""):e.slice(0,l);if(a===i)return c+n;if(s&&(l+=c.length-l),Is(a)){if(e.slice(l).search(a)){var u,d=c;for(a.global||(a=rt(a.source,Ws(Ve.exec(a))+"g")),a.lastIndex=0;u=a.exec(d);)var p=u.index;c=c.slice(0,p===i?l:p)}}else if(e.indexOf(Fa(a),l)!=l){var h=c.lastIndexOf(a);h>-1&&(c=c.slice(0,h))}return c+n},hn.unescape=function(e){return(e=Ws(e))&&Me.test(e)?e.replace(we,Ir):e},hn.uniqueId=function(e){var t=++dt;return Ws(e)+t},hn.upperCase=wl,hn.upperFirst=kl,hn.each=Wo,hn.eachRight=Go,hn.first=bo,Ol(hn,(Kl={},qn(hn,(function(e,t){ut.call(hn.prototype,t)||(Kl[t]=e)})),Kl),{chain:!1}),hn.VERSION="4.17.15",qt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){hn[e].placeholder=hn})),qt(["drop","take"],(function(e,t){vn.prototype[e]=function(r){r=r===i?1:Ur(Ys(r),0);var n=this.__filtered__&&!t?new vn(this):this.clone();return n.__filtered__?n.__takeCount__=Wr(r,n.__takeCount__):n.__views__.push({size:Wr(r,z),type:e+(n.__dir__<0?"Right":"")}),n},vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),qt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=r==D||3==r;vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ri(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),qt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");vn.prototype[e]=function(){return this[r](1).value()[0]}})),qt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");vn.prototype[e]=function(){return this.__filtered__?new vn(this):this[r](1)}})),vn.prototype.compact=function(){return this.filter(El)},vn.prototype.find=function(e){return this.filter(e).head()},vn.prototype.findLast=function(e){return this.reverse().find(e)},vn.prototype.invokeMap=ka((function(e,t){return"function"==typeof e?new vn(this):this.map((function(r){return na(r,e,t)}))})),vn.prototype.reject=function(e){return this.filter(ls(Ri(e)))},vn.prototype.slice=function(e,t){e=Ys(e);var r=this;return r.__filtered__&&(e>0||t<0)?new vn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=Ys(t))<0?r.dropRight(-t):r.take(t-e)),r)},vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},vn.prototype.toArray=function(){return this.take(z)},qn(vn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),a=hn[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);a&&(hn.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,l=t instanceof vn,c=s[0],u=l||vs(t),d=function(e){var t=a.apply(hn,er([e],s));return n&&p?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,h=!!this.__actions__.length,f=o&&!p,m=l&&!h;if(!o&&u){t=m?t:new vn(this);var g=e.apply(t,s);return g.__actions__.push({func:Bo,args:[d],thisArg:i}),new gn(g,p)}return f&&m?e.apply(this,s):(g=this.thru(d),f?n?g.value()[0]:g.value():g)})})),qt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=it[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);hn.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return t.apply(vs(a)?a:[],e)}return this[r]((function(r){return t.apply(vs(r)?r:[],e)}))}})),qn(vn.prototype,(function(e,t){var r=hn[t];if(r){var n=r.name+"";ut.call(nn,n)||(nn[n]=[]),nn[n].push({name:t,func:r})}})),nn[hi(i,y).name]=[{name:"wrapper",func:i}],vn.prototype.clone=function(){var e=new vn(this.__wrapped__);return e.__actions__=ri(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ri(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ri(this.__views__),e},vn.prototype.reverse=function(){if(this.__filtered__){var e=new vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=vs(e),n=t<0,a=r?e.length:0,i=function(e,t,r){var n=-1,a=r.length;for(;++n<a;){var i=r[n],o=i.size;switch(i.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=Wr(t,e+o);break;case"takeRight":e=Ur(e,t-o)}}return{start:e,end:t}}(0,a,this.__views__),o=i.start,s=i.end,l=s-o,c=n?s:o-1,u=this.__iteratees__,d=u.length,p=0,h=Wr(l,this.__takeCount__);if(!r||!n&&a==l&&h==l)return Ya(e,this.__actions__);var f=[];e:for(;l--&&p<h;){for(var m=-1,g=e[c+=t];++m<d;){var v=u[m],y=v.iteratee,b=v.type,_=y(g);if(b==I)g=_;else if(!_){if(b==D)continue e;break e}}f[p++]=g}return f},hn.prototype.at=Yo,hn.prototype.chain=function(){return jo(this)},hn.prototype.commit=function(){return new gn(this.value(),this.__chain__)},hn.prototype.next=function(){this.__values__===i&&(this.__values__=js(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},hn.prototype.plant=function(e){for(var t,r=this;r instanceof mn;){var n=po(r);n.__index__=0,n.__values__=i,t?a.__wrapped__=n:t=n;var a=n;r=r.__wrapped__}return a.__wrapped__=e,t},hn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof vn){var t=e;return this.__actions__.length&&(t=new vn(this)),(t=t.reverse()).__actions__.push({func:Bo,args:[So],thisArg:i}),new gn(t,this.__chain__)}return this.thru(So)},hn.prototype.toJSON=hn.prototype.valueOf=hn.prototype.value=function(){return Ya(this.__wrapped__,this.__actions__)},hn.prototype.first=hn.prototype.head,Nt&&(hn.prototype[Nt]=function(){return this}),hn}();Pt._=Pr,(a=function(){return Pr}.call(t,r,t,n))===i||(n.exports=a)}).call(this)}).call(this,r(68),r(112)(e))},function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return h}));var n,a,i=r(8),o=r(10),s=r(1),l=r(3),c=r.n(l),u=r(23),d=r(22),p=function(){return(p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};!function(e){e.outcome="outcome",e.dataset="dataset",e.index="index",e.explanation="explanation",e.cohort="cohort",e.none="none"}(n||(n={})),function(e){e[e.TrueNegative=0]="TrueNegative",e[e.FalsePositive=1]="FalsePositive",e[e.FalseNegative=2]="FalseNegative",e[e.TruePositive=3]="TruePositive"}(a||(a={}));var h=function(){function e(t){var r=this;if(this.hasDataset=!1,this.hasLocalExplanations=!1,this.hasPredictedY=!1,this.hasPredictedProbabilities=!1,this.hasTrueY=!1,this.datasetFeatureCount=0,this.predictionClassCount=0,this.datasetRowCount=0,this.localExplanationFeatureCount=0,this.binDict={},this.numericValuedColumsCache=[],this.metaDict={},this.ditherScale=.1,this._modelMeta=t.metadata,t.dataset&&t.dataset.length>0&&(this.initializeDataDictIfNeeded(t.dataset),this.datasetRowCount=t.dataset.length,this.datasetFeatureCount=t.dataset[0].length,t.dataset[0].forEach((function(a,i){var o=e.DataLabelRoot+i.toString();if(t.metadata.featureIsCategorical[i]){var s=t.metadata.featureRanges[i].uniqueValues.concat().sort();r.metaDict[o]={label:t.metadata.featureNames[i],abbridgedLabel:t.metadata.featureNamesAbridged[i],isCategorical:!0,treatAsCategorical:!0,sortedCategoricalValues:s,category:n.dataset,index:i}}else r.metaDict[o]={label:t.metadata.featureNames[i],abbridgedLabel:t.metadata.featureNamesAbridged[i],isCategorical:!1,featureRange:t.metadata.featureRanges[i],category:n.dataset,index:i}})),t.dataset.forEach((function(n,a){n.forEach((function(n,i){var o=e.DataLabelRoot+i.toString();t.metadata.featureIsCategorical[i]?r.dataDict[a][o]=r.metaDict[o].sortedCategoricalValues.indexOf(n):r.dataDict[a][o]=n}))})),this.hasDataset=!0),t.predictedY&&(this.initializeDataDictIfNeeded(t.predictedY),t.predictedY.forEach((function(t,n){r.dataDict[n][e.PredictedYLabel]=t})),this.metaDict[e.PredictedYLabel]={label:s.a.ExplanationScatter.predictedY,abbridgedLabel:s.a.ExplanationScatter.predictedY,isCategorical:t.metadata.modelType!==i.a.regression,treatAsCategorical:t.metadata.modelType!==i.a.regression,sortedCategoricalValues:t.metadata.modelType!==i.a.regression?t.metadata.classNames:void 0,category:n.outcome},t.metadata.modelType===i.a.regression&&(this.metaDict[e.PredictedYLabel].featureRange={min:Math.min.apply(Math,t.predictedY),max:Math.max.apply(Math,t.predictedY),rangeType:o.g.numeric}),this.hasPredictedY=!0),t.predictedProbabilities&&t.metadata.modelType!==i.a.regression&&(this.initializeDataDictIfNeeded(t.predictedY),t.predictedProbabilities.forEach((function(t,n){t.forEach((function(t,a){r.dataDict[n][e.ProbabilityYRoot+a.toString()]=t}))})),t.metadata.classNames.forEach((function(a,i){var l=s.a.formatString(s.a.ExplanationScatter.probabilityLabel,a),c=t.predictedProbabilities.map((function(e){return e[i]}));r.metaDict[e.ProbabilityYRoot+i.toString()]={label:l,abbridgedLabel:l,isCategorical:!1,treatAsCategorical:!1,sortedCategoricalValues:void 0,category:n.outcome,featureRange:{min:Math.min.apply(Math,c),max:Math.max.apply(Math,c),rangeType:o.g.numeric}}})),this.hasPredictedProbabilities=!0,this.predictionClassCount=t.metadata.classNames.length),t.trueY&&(this.initializeDataDictIfNeeded(t.trueY),t.trueY.forEach((function(t,n){r.dataDict[n][e.TrueYLabel]=t})),this.metaDict[e.TrueYLabel]={label:s.a.ExplanationScatter.trueY,abbridgedLabel:s.a.ExplanationScatter.trueY,isCategorical:t.metadata.modelType!==i.a.regression,treatAsCategorical:t.metadata.modelType!==i.a.regression,sortedCategoricalValues:t.metadata.modelType!==i.a.regression?t.metadata.classNames:void 0,category:n.outcome},t.metadata.modelType===i.a.regression&&(this.metaDict[e.TrueYLabel].featureRange={min:Math.min.apply(Math,t.trueY),max:Math.max.apply(Math,t.trueY),rangeType:o.g.numeric}),this.hasTrueY=!0),this.hasPredictedY&&this.hasTrueY){if(this.dataDict.forEach((function(t){e.setErrorMetrics(t,r._modelMeta.modelType)})),t.metadata.modelType===i.a.regression){var a=this.dataDict.map((function(t){return t[e.RegressionError]}));this.metaDict[e.RegressionError]={label:s.a.Columns.regressionError,abbridgedLabel:s.a.Columns.error,isCategorical:!1,sortedCategoricalValues:void 0,category:n.outcome,featureRange:{rangeType:o.g.numeric,min:Math.min.apply(Math,a),max:Math.max.apply(Math,a)}}}t.metadata.modelType===i.a.binary&&(this.metaDict[e.ClassificationError]={label:s.a.Columns.classificationOutcome,abbridgedLabel:s.a.Columns.classificationOutcome,isCategorical:!0,treatAsCategorical:!0,sortedCategoricalValues:[s.a.Columns.trueNegative,s.a.Columns.falsePositive,s.a.Columns.falseNegative,s.a.Columns.truePositive],category:n.outcome})}t.localExplanations&&(this.rawLocalImportance=e.buildLocalFeatureMatrix(t.localExplanations.scores,t.metadata.modelType),this.localExplanationFeatureCount=this.rawLocalImportance[0].length,this.initializeDataDictIfNeeded(this.rawLocalImportance),this._localExplanationIndexesComputed=new Array(this.localExplanationFeatureCount).fill(!1),this.buildLocalFlattenMatrix(u.a.absAvg),this.hasLocalExplanations=!0),void 0===this.dataDict&&this.initializeDataDictIfNeeded([])}return e.unwrap=function(e,t,r){return r?e.map((function(e){var n=e[t];return r.findIndex((function(e){return e>=n}))})):e.map((function(e){return e[t]}))},e.datasetSlice=function(t,r,n){for(var a=new Array(n),i=0;i<n;i++){var o=e.DataLabelRoot+i.toString();r[o].isCategorical?a[i]=r[o].sortedCategoricalValues[t[o]]:a[i]=t[o]}return a},e.localExplanationSlice=function(t,r){for(var n=new Array(r),a=0;a<r;a++)n[a]=t[e.ReducedLocalImportanceRoot+a.toString()];return n},e.predictProbabilitySlice=function(t,r){for(var n=new Array(r),a=0;a<r;a++)n[a]=t[e.ProbabilityYRoot+a.toString()];return n},e.setErrorMetrics=function(t,r){if(r!==i.a.regression)if(r!==i.a.binary);else{var n=2*t[e.TrueYLabel]+t[e.PredictedYLabel];t[e.ClassificationError]=n}else t[e.RegressionError]=t[e.TrueYLabel]-t[e.PredictedYLabel]},e.prototype.getRow=function(e){return p({},this.dataDict[e])},e.prototype.unwrap=function(t,r){return e.unwrap(this.dataDict,t,r)},e.prototype.setTreatAsCategorical=function(e,t){var r=this,n=this.metaDict[e];if(n.treatAsCategorical=t,t){var a=this.dataDict.map((function(t){return t[e]})),i=c.a.uniq(a).sort((function(e,t){return e-t}));n.sortedCategoricalValues=i.map((function(e){return e.toString()})),this.dataDict.forEach((function(t,n){var a=t[e];t[e]=i.indexOf(a),r.numericValuedColumsCache[n][e]=a}))}else this.dataDict.forEach((function(t,n){t[e]=r.numericValuedColumsCache[n][e]})),this.addBin(e)},e.prototype.addBin=function(e,t){var r=this.metaDict[e];if(void 0===t){if(r.featureRange.rangeType===o.g.integer){var n=c.a.uniq(this.dataDict.map((function(t){return t[e]})));t=Math.min(5,n.length)}void 0===t&&(t=5)}var a=r.featureRange.max-r.featureRange.min;if(0===a||0===t)return this.binDict[e]=[r.featureRange.max],void(r.sortedCategoricalValues=[r.featureRange.min+" - "+r.featureRange.max]);if(r.featureRange.rangeType===o.g.numeric||a<t-1){var i=a/t,s=new Array(t).fill(0).map((function(e,n){return n!==t-1?r.featureRange.min+i*(1+n):r.featureRange.max})),l=r.featureRange.min,u=s.map((function(e){var t=l.toLocaleString(void 0,{maximumSignificantDigits:3})+" - "+e.toLocaleString(void 0,{maximumSignificantDigits:3});return l=e,t}));return this.binDict[e]=s,void(r.sortedCategoricalValues=u)}var d=a/t,p=new Array(t).fill(0).map((function(e,n){return n===t-1?r.featureRange.max:Math.ceil(r.featureRange.min-1+d*(n+1))})),h=r.featureRange.min,f=p.map((function(e){var t=h===e?h.toLocaleString(void 0,{maximumSignificantDigits:3}):h.toLocaleString(void 0,{maximumSignificantDigits:3})+" - "+e.toLocaleString(void 0,{maximumSignificantDigits:3});return h=e+1,t}));this.binDict[e]=p,r.sortedCategoricalValues=f},e.prototype.initializeDataDictIfNeeded=function(t){var r=this;if(void 0!==t)if(void 0===this.dataDict)this.dataDict=Array.from({length:t.length}).map((function(t,n){var a={};return a[e.IndexLabel]=n,a[e.DitherLabel]=2*r.ditherScale*Math.random()-r.ditherScale,a[e.DitherLabel2]=2*r.ditherScale*Math.random()-r.ditherScale,a})),this.numericValuedColumsCache=Array.from({length:t.length}).map((function(e,t){return{}})),this.metaDict[e.IndexLabel]={label:s.a.ExplanationScatter.index,abbridgedLabel:s.a.ExplanationScatter.index,isCategorical:!1,featureRange:{rangeType:o.g.integer,min:0,max:t.length-1},category:n.index},this.metaDict[d.a.CohortKey]={label:s.a.Cohort.cohort,abbridgedLabel:s.a.Cohort.cohort,isCategorical:!0,treatAsCategorical:!0,category:n.cohort},this.metaDict[n.none]={label:s.a.Columns.none,abbridgedLabel:s.a.Columns.none,isCategorical:!0,treatAsCategorical:!0,category:n.none};else if(this.dataDict.length!==t.length)throw new Error("Differing length inputs. Ensure data matches explanations and predictions.")},e.prototype.buildLocalFlattenMatrix=function(t){var r=this,a=new Array(this.rawLocalImportance[0].length).fill(Number.MAX_SAFE_INTEGER),l=new Array(this.rawLocalImportance[0].length).fill(Number.MIN_SAFE_INTEGER);switch(this._modelMeta.modelType){case i.a.regression:case i.a.binary:this.rawLocalImportance.forEach((function(t,n){t.forEach((function(t,i){var o=t[0];o>l[i]&&(l[i]=o),o<a[i]&&(a[i]=o),r.dataDict[n][e.ReducedLocalImportanceRoot+i.toString()]=t[0],r._localExplanationIndexesComputed[n]=!1}))}));break;case i.a.multiclass:this.rawLocalImportance.forEach((function(n,i){n.forEach((function(n,o){var s;switch(r._localExplanationIndexesComputed[i]=!1,t){case u.a.equal:s=n.reduce((function(e,t){return e+t}))/n.length;break;case u.a.absAvg:s=n.reduce((function(e,t){return e+Math.abs(t)}),0)/n.length;break;default:s=n[t]}s>l[o]&&(l[o]=s),s<a[o]&&(a[o]=s),r.dataDict[i][e.ReducedLocalImportanceRoot+o.toString()]=s}))}))}this.rawLocalImportance[0].forEach((function(t,i){var c=r._modelMeta.featureNames[i],u=e.ReducedLocalImportanceRoot+i.toString();r.metaDict[u]={label:s.a.formatString(s.a.featureImportanceOf,c),abbridgedLabel:s.a.formatString(s.a.featureImportanceOf,c),isCategorical:!1,featureRange:{rangeType:o.g.numeric,min:a[i],max:l[i]},category:n.explanation},r.binDict[u]=void 0}))},e.buildLocalFeatureMatrix=function(t,r){switch(r){case i.a.regression:return t.map((function(e){return e.map((function(e){return[e]}))}));case i.a.binary:return e.transposeLocalImportanceMatrix(t).map((function(e){return e.map((function(e){return e.slice(0,1)}))}));case i.a.multiclass:return e.transposeLocalImportanceMatrix(t)}},e.transposeLocalImportanceMatrix=function(e){var t=e.length,r=e[0].length,n=e[0][0].length,a=Array(r).fill(0).map((function(e){return Array(n).fill(0).map((function(e){return Array(t).fill(0)}))}));return e.forEach((function(e,t){e.forEach((function(e,r){e.forEach((function(e,n){a[r][n][t]=e}))}))})),a},e.IndexLabel="Index",e.DataLabelRoot="Data",e.PredictedYLabel="PredictedY",e.ProbabilityYRoot="ProbabilityClass",e.TrueYLabel="TrueY",e.DitherLabel="Dither",e.DitherLabel2="Dither2",e.ClassificationError="ClassificationError",e.RegressionError="RegressionError",e.ReducedLocalImportanceRoot="LocalImportance",e.ReducedLocalImportanceIntercept="LocalImportanceIntercept",e.ReducedLocalImportanceSortIndexRoot="LocalImportanceSortIndex",e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(9),a=function(){function e(){}return e.limitedSizeMenuDropdown={callout:{maxHeight:"256px",minWidth:"200px"},optionsContainerWrapper:{maxHeight:"256px",minWidth:"200px"}},e.defaultDropdownStyle=Object(n.E)({container:{display:"inline-flex",width:"100%"},root:{flex:1},label:{padding:"5px 10px 0 10px"}},e.limitedSizeMenuDropdown),e.smallDropdownStyle=Object(n.E)({container:{display:"inline-flex",flexWrap:"wrap",width:"150px"},root:{flex:1,minWidth:"150px"},label:{paddingRight:"10px"},callout:{maxHeight:"256px",minWidth:"200px"},optionsContainerWrapper:{maxHeight:"256px",minWidth:"200px"}},e.limitedSizeMenuDropdown),e.missingParameterPlaceholder={height:"300px",width:"100%"},e.calloutWrapper={width:"300px"},e.calloutHeader={padding:"18px 24px 12px"},e.calloutTitle=[Object(n.A)().fonts.xLarge,{margin:0,fontWeight:n.e.semilight}],e.calloutInner={height:"100%",padding:"0 24px 20px"},e.chartEditorButton={color:Object(n.A)().semanticColors.accentButtonText,backgroundColor:Object(n.A)().semanticColors.accentButtonBackground,borderWidth:"1px",borderStyle:"solid",borderColor:Object(n.A)().semanticColors.buttonBorder},e.calloutContainer={zIndex:10},e.calloutProps={doNotLayer:!0,styles:{container:Object(n.F)([e.calloutContainer,{position:"fixed"}]),calloutMain:{maxHeight:"400px"}}},e.placeholderItalic={fontStyle:"italic",padding:"0 0 5px 5px",color:Object(n.A)().semanticColors.disabledBodyText},e.missingParameterPlaceholderSpacer={margin:"25px auto 0 auto",maxWidth:"400px",padding:"23px",width:"fit-content",boxShadow:Object(n.A)().effects.elevation4},e.faintText={fontWeight:"350"},e.plotlyColorPalette=[{r:31,g:119,b:180},{r:255,g:127,b:14},{r:44,g:160,b:44},{r:214,g:39,b:40},{r:148,g:103,b:189},{r:140,g:86,b:75},{r:227,g:119,b:194},{r:127,g:127,b:127},{r:188,g:189,b:34},{r:23,g:190,b:207}],e.plotlyColorHexPalette=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.fabricColorPalette=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.fabricColorInactiveSeries="#949494",e.chartAxisColor="#979797",e.fontFamilies="Segoe UI, Segoe UI Web (West European),  Roboto, Helvetica Neue, sans-serif",e.verticalTabsStyle={root:{height:"100%",width:"100px",display:"flex",flexDirection:"column"},text:{whiteSpace:"normal",lineHeight:"28px"},link:{flex:1,backgroundColor:"#f4f4f4",selectors:{"&:not(:last-child)":{borderBottom:"1px solid grey"},".ms-Button-flexContainer":{justifyContent:"center"},"&:focus, &:focus:not(:last-child)":{border:"3px solid rgb(102, 102, 102)"}}},linkIsSelected:{flex:1,selectors:{"&:not(:last-child)":{borderBottom:"1px solid grey"},".ms-Button-flexContainer":{justifyContent:"center"},"&:focus, &:focus:not(:last-child)":{border:"3px solid rgb(235, 235, 235)"}}}},e.textFieldStyle={root:{minWidth:"150px",padding:"0 5px"},wrapper:{display:"inline-flex"},subComponentStyles:{label:{padding:"5px 10px 0 10px"}}},e}()},,function(e,t,r){(function(e){e.exports=function(){"use strict";var t,n;function a(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var r,n=[];for(r=0;r<e.length;++r)n.push(t(e[r],r));return n}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){for(var r in t)d(t,r)&&(e[r]=t[r]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,r,n){return Pt(e,t,r,n,!0).utc()}function f(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=f(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function g(e){var t=h(NaN);return null!=e?p(f(t),e):f(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),r=t.length>>>0,n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};var v=a.momentProperties=[];function y(e,t){var r,n,a;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=f(t)),s(t._locale)||(e._locale=t._locale),v.length>0)for(r=0;r<v.length;r++)s(a=t[n=v[r]])||(e[n]=a);return e}var b=!1;function _(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,a.updateOffset(this),b=!1)}function x(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function w(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=w(t)),r}function M(e,t,r){var n,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(n=0;n<a;n++)(r&&e[n]!==t[n]||!r&&k(e[n])!==k(t[n]))&&o++;return o+i}function T(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function C(e,t){var r=!0;return p((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),r){for(var n,i=[],o=0;o<arguments.length;o++){if(n="","object"==typeof arguments[o]){for(var s in n+="\n["+o+"] ",arguments[0])n+=s+": "+arguments[0][s]+", ";n=n.slice(0,-2)}else n=arguments[o];i.push(n)}T(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var S,L={};function A(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),L[e]||(T(t),L[e]=!0)}function E(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function D(e,t){var r,n=p({},e);for(r in t)d(t,r)&&(o(e[r])&&o(t[r])?(n[r]={},p(n[r],e[r]),p(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)d(e,r)&&!d(t,r)&&o(e[r])&&(n[r]=p({},n[r]));return n}function I(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)d(e,t)&&r.push(t);return r};var P={};function O(e,t){var r=e.toLowerCase();P[r]=P[r+"s"]=P[t]=e}function R(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function F(e){var t,r,n={};for(r in e)d(e,r)&&(t=R(r))&&(n[t]=e[r]);return n}var z={};function N(e,t){z[e]=t}function j(e,t,r){var n=""+Math.abs(e),a=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var B=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Y=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,H={},V={};function U(e,t,r,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),e&&(V[e]=a),t&&(V[t[0]]=function(){return j(a.apply(this,arguments),t[1],t[2])}),r&&(V[r]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function W(e,t){return e.isValid()?(t=G(t,e.localeData()),H[t]=H[t]||function(e){var t,r,n,a=e.match(B);for(t=0,r=a.length;t<r;t++)V[a[t]]?a[t]=V[a[t]]:a[t]=(n=a[t]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(t){var n,i="";for(n=0;n<r;n++)i+=E(a[n])?a[n].call(t,e):a[n];return i}}(t),H[t](e)):e.localeData().invalidDate()}function G(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(Y.lastIndex=0;r>=0&&Y.test(e);)e=e.replace(Y,n),Y.lastIndex=0,r-=1;return e}var q=/\d/,K=/\d\d/,X=/\d{3}/,Z=/\d{4}/,J=/[+-]?\d{6}/,$=/\d\d?/,Q=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,re=/\d{1,4}/,ne=/[+-]?\d{1,6}/,ae=/\d+/,ie=/[+-]?\d+/,oe=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ce={};function ue(e,t,r){ce[e]=E(t)?t:function(e,n){return e&&r?r:t}}function de(e,t){return d(ce,e)?ce[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,a){return t||r||n||a}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function fe(e,t){var r,n=t;for("string"==typeof e&&(e=[e]),l(t)&&(n=function(e,r){r[t]=k(e)}),r=0;r<e.length;r++)he[e[r]]=n}function me(e,t){fe(e,(function(e,r,n,a){n._w=n._w||{},t(e,n._w,n,a)}))}function ge(e,t,r){null!=t&&d(he,e)&&he[e](t,r._a,r,e)}var ve=0,ye=1,be=2,_e=3,xe=4,we=5,ke=6,Me=7,Te=8;function Ce(e){return Se(e)?366:365}function Se(e){return e%4==0&&e%100!=0||e%400==0}U("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),O("year","y"),N("year",1),ue("Y",ie),ue("YY",$,K),ue("YYYY",re,Z),ue("YYYYY",ne,J),ue("YYYYYY",ne,J),fe(["YYYYY","YYYYYY"],ve),fe("YYYY",(function(e,t){t[ve]=2===e.length?a.parseTwoDigitYear(e):k(e)})),fe("YY",(function(e,t){t[ve]=a.parseTwoDigitYear(e)})),fe("Y",(function(e,t){t[ve]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return k(e)+(k(e)>68?1900:2e3)};var Le,Ae=Ee("FullYear",!0);function Ee(e,t){return function(r){return null!=r?(Ie(this,e,r),a.updateOffset(this,t),this):De(this,e)}}function De(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ie(e,t,r){e.isValid()&&!isNaN(r)&&("FullYear"===t&&Se(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](r,e.month(),Pe(r,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](r))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var r,n=(t%(r=12)+r)%r;return e+=(t-n)/12,1===n?Se(e)?29:28:31-n%7%2}Le=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),O("month","M"),N("month",8),ue("M",$),ue("MM",$,K),ue("MMM",(function(e,t){return t.monthsShortRegex(e)})),ue("MMMM",(function(e,t){return t.monthsRegex(e)})),fe(["M","MM"],(function(e,t){t[ye]=k(e)-1})),fe(["MMM","MMMM"],(function(e,t,r,n){var a=r._locale.monthsParse(e,n,r._strict);null!=a?t[ye]=a:f(r).invalidMonth=e}));var Oe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Re="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Fe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function ze(e,t,r){var n,a,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=h([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(a=Le.call(this._shortMonthsParse,o))?a:null:-1!==(a=Le.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=Le.call(this._shortMonthsParse,o))?a:-1!==(a=Le.call(this._longMonthsParse,o))?a:null:-1!==(a=Le.call(this._longMonthsParse,o))?a:-1!==(a=Le.call(this._shortMonthsParse,o))?a:null}function Ne(e,t){var r;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return r=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,r),e}function je(e){return null!=e?(Ne(this,e),a.updateOffset(this,!0),this):De(this,"Month")}var Be=le,Ye=le;function He(){function e(e,t){return t.length-e.length}var t,r,n=[],a=[],i=[];for(t=0;t<12;t++)r=h([2e3,t]),n.push(this.monthsShort(r,"")),a.push(this.months(r,"")),i.push(this.months(r,"")),i.push(this.monthsShort(r,""));for(n.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)n[t]=pe(n[t]),a[t]=pe(a[t]);for(t=0;t<24;t++)i[t]=pe(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Ve(e,t,r,n,a,i,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,a,i,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,a,i,o),s}function Ue(e){var t;if(e<100&&e>=0){var r=Array.prototype.slice.call(arguments);r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function We(e,t,r){var n=7+t-r;return-(7+Ue(e,0,n).getUTCDay()-t)%7+n-1}function Ge(e,t,r,n,a){var i,o,s=1+7*(t-1)+(7+r-n)%7+We(e,n,a);return s<=0?o=Ce(i=e-1)+s:s>Ce(e)?(i=e+1,o=s-Ce(e)):(i=e,o=s),{year:i,dayOfYear:o}}function qe(e,t,r){var n,a,i=We(e.year(),t,r),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?n=o+Ke(a=e.year()-1,t,r):o>Ke(e.year(),t,r)?(n=o-Ke(e.year(),t,r),a=e.year()+1):(a=e.year(),n=o),{week:n,year:a}}function Ke(e,t,r){var n=We(e,t,r),a=We(e+1,t,r);return(Ce(e)-n+a)/7}function Xe(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),N("week",5),N("isoWeek",5),ue("w",$),ue("ww",$,K),ue("W",$),ue("WW",$,K),me(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=k(e)})),U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),ue("d",$),ue("e",$),ue("E",$),ue("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ue("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ue("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,r,n){var a=r._locale.weekdaysParse(e,n,r._strict);null!=a?t.d=a:f(r).invalidWeekday=e})),me(["d","e","E"],(function(e,t,r,n){t[n]=k(e)}));var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,r){var n,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(a=Le.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Le.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Le.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=Le.call(this._weekdaysParse,o))?a:-1!==(a=Le.call(this._shortWeekdaysParse,o))?a:-1!==(a=Le.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Le.call(this._shortWeekdaysParse,o))?a:-1!==(a=Le.call(this._weekdaysParse,o))?a:-1!==(a=Le.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Le.call(this._minWeekdaysParse,o))?a:-1!==(a=Le.call(this._weekdaysParse,o))?a:-1!==(a=Le.call(this._shortWeekdaysParse,o))?a:null}var et=le,tt=le,rt=le;function nt(){function e(e,t){return t.length-e.length}var t,r,n,a,i,o=[],s=[],l=[],c=[];for(t=0;t<7;t++)r=h([2e3,1]).day(t),n=this.weekdaysMin(r,""),a=this.weekdaysShort(r,""),i=this.weekdays(r,""),o.push(n),s.push(a),l.push(i),c.push(n),c.push(a),c.push(i);for(o.sort(e),s.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),l[t]=pe(l[t]),c[t]=pe(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function at(){return this.hours()%12||12}function it(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function ot(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,at),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+at.apply(this)+j(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+at.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),it("a",!0),it("A",!1),O("hour","h"),N("hour",13),ue("a",ot),ue("A",ot),ue("H",$),ue("h",$),ue("k",$),ue("HH",$,K),ue("hh",$,K),ue("kk",$,K),ue("hmm",Q),ue("hmmss",ee),ue("Hmm",Q),ue("Hmmss",ee),fe(["H","HH"],_e),fe(["k","kk"],(function(e,t,r){var n=k(e);t[_e]=24===n?0:n})),fe(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),fe(["h","hh"],(function(e,t,r){t[_e]=k(e),f(r).bigHour=!0})),fe("hmm",(function(e,t,r){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[xe]=k(e.substr(n)),f(r).bigHour=!0})),fe("hmmss",(function(e,t,r){var n=e.length-4,a=e.length-2;t[_e]=k(e.substr(0,n)),t[xe]=k(e.substr(n,2)),t[we]=k(e.substr(a)),f(r).bigHour=!0})),fe("Hmm",(function(e,t,r){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[xe]=k(e.substr(n))})),fe("Hmmss",(function(e,t,r){var n=e.length-4,a=e.length-2;t[_e]=k(e.substr(0,n)),t[xe]=k(e.substr(n,2)),t[we]=k(e.substr(a))}));var st,lt=Ee("Hours",!0),ct={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Re,monthsShort:Fe,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:Je,meridiemParse:/[ap]\.?m?\.?/i},ut={},dt={};function pt(e){return e?e.toLowerCase().replace("_","-"):e}function ht(t){var n=null;if(!ut[t]&&void 0!==e&&e&&e.exports)try{n=st._abbr,r(310)("./"+t),ft(n)}catch(e){}return ut[t]}function ft(e,t){var r;return e&&((r=s(t)?gt(e):mt(e,t))?st=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),st._abbr}function mt(e,t){if(null!==t){var r,n=ct;if(t.abbr=e,null!=ut[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ut[e]._config;else if(null!=t.parentLocale)if(null!=ut[t.parentLocale])n=ut[t.parentLocale]._config;else{if(null==(r=ht(t.parentLocale)))return dt[t.parentLocale]||(dt[t.parentLocale]=[]),dt[t.parentLocale].push({name:e,config:t}),null;n=r._config}return ut[e]=new I(D(n,t)),dt[e]&&dt[e].forEach((function(e){mt(e.name,e.config)})),ft(e),ut[e]}return delete ut[e],null}function gt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return st;if(!i(e)){if(t=ht(e))return t;e=[e]}return function(e){for(var t,r,n,a,i=0;i<e.length;){for(t=(a=pt(e[i]).split("-")).length,r=(r=pt(e[i+1]))?r.split("-"):null;t>0;){if(n=ht(a.slice(0,t).join("-")))return n;if(r&&r.length>=t&&M(a,r,!0)>=t-1)break;t--}i++}return st}(e)}function vt(e){var t,r=e._a;return r&&-2===f(e).overflow&&(t=r[ye]<0||r[ye]>11?ye:r[be]<1||r[be]>Pe(r[ve],r[ye])?be:r[_e]<0||r[_e]>24||24===r[_e]&&(0!==r[xe]||0!==r[we]||0!==r[ke])?_e:r[xe]<0||r[xe]>59?xe:r[we]<0||r[we]>59?we:r[ke]<0||r[ke]>999?ke:-1,f(e)._overflowDayOfYear&&(t<ve||t>be)&&(t=be),f(e)._overflowWeeks&&-1===t&&(t=Me),f(e)._overflowWeekday&&-1===t&&(t=Te),f(e).overflow=t),e}function yt(e,t,r){return null!=e?e:null!=t?t:r}function bt(e){var t,r,n,i,o,s=[];if(!e._d){for(n=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[be]&&null==e._a[ye]&&function(e){var t,r,n,a,i,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,r=yt(t.GG,e._a[ve],qe(Ot(),1,4).year),n=yt(t.W,1),((a=yt(t.E,1))<1||a>7)&&(l=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var c=qe(Ot(),i,o);r=yt(t.gg,e._a[ve],c.year),n=yt(t.w,c.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i}n<1||n>Ke(r,i,o)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(s=Ge(r,n,a,i,o),e._a[ve]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=yt(e._a[ve],n[ve]),(e._dayOfYear>Ce(o)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),r=Ue(o,0,e._dayOfYear),e._a[ye]=r.getUTCMonth(),e._a[be]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=n[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[xe]&&0===e._a[we]&&0===e._a[ke]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?Ue:Ve).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(f(e).weekdayMismatch=!0)}}var _t=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Tt=/^\/?Date\((\-?\d+)/i;function Ct(e){var t,r,n,a,i,o,s=e._i,l=_t.exec(s)||xt.exec(s);if(l){for(f(e).iso=!0,t=0,r=kt.length;t<r;t++)if(kt[t][1].exec(l[1])){a=kt[t][0],n=!1!==kt[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,r=Mt.length;t<r;t++)if(Mt[t][1].exec(l[3])){i=(l[2]||" ")+Mt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!n&&null!=i)return void(e._isValid=!1);if(l[4]){if(!wt.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),Dt(e)}else e._isValid=!1}var St=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Lt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var At={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Et(e){var t,r,n,a,i,o,s,l=St.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var c=(t=l[4],r=l[3],n=l[2],a=l[5],i=l[6],o=l[7],s=[Lt(t),Fe.indexOf(r),parseInt(n,10),parseInt(a,10),parseInt(i,10)],o&&s.push(parseInt(o,10)),s);if(!function(e,t,r){return!e||Je.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(f(r).weekdayMismatch=!0,r._isValid=!1,!1)}(l[1],c,e))return;e._a=c,e._tzm=function(e,t,r){if(e)return At[e];if(t)return 0;var n=parseInt(r,10),a=n%100;return(n-a)/100*60+a}(l[8],l[9],l[10]),e._d=Ue.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function Dt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],f(e).empty=!0;var t,r,n,i,o,s=""+e._i,l=s.length,c=0;for(n=G(e._f,e._locale).match(B)||[],t=0;t<n.length;t++)i=n[t],(r=(s.match(de(i,e))||[])[0])&&((o=s.substr(0,s.indexOf(r))).length>0&&f(e).unusedInput.push(o),s=s.slice(s.indexOf(r)+r.length),c+=r.length),V[i]?(r?f(e).empty=!1:f(e).unusedTokens.push(i),ge(i,r,e)):e._strict&&!r&&f(e).unusedTokens.push(i);f(e).charsLeftOver=l-c,s.length>0&&f(e).unusedInput.push(s),e._a[_e]<=12&&!0===f(e).bigHour&&e._a[_e]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[_e]=function(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[_e],e._meridiem),bt(e),vt(e)}else Et(e);else Ct(e)}function It(e){var t=e._i,r=e._f;return e._locale=e._locale||gt(e._l),null===t||void 0===r&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),x(t)?new _(vt(t)):(c(t)?e._d=t:i(r)?function(e){var t,r,n,a,i;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)i=0,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],Dt(t),m(t)&&(i+=f(t).charsLeftOver,i+=10*f(t).unusedTokens.length,f(t).score=i,(null==n||i<n)&&(n=i,r=t));p(e,r||t)}(e):r?Dt(e):function(e){var t=e._i;s(t)?e._d=new Date(a.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Tt.exec(e._i);null===t?(Ct(e),!1===e._isValid&&(delete e._isValid,Et(e),!1===e._isValid&&(delete e._isValid,a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=u(t.slice(0),(function(e){return parseInt(e,10)})),bt(e)):o(t)?function(e){if(!e._d){var t=F(e._i);e._a=u([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),bt(e)}}(e):l(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function Pt(e,t,r,n,a){var s,l={};return!0!==r&&!1!==r||(n=r,r=void 0),(o(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=r,l._i=e,l._f=t,l._strict=n,(s=new _(vt(It(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ot(e,t,r,n){return Pt(e,t,r,n,!1)}a.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Rt=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),Ft=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}));function zt(e,t){var r,n;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ot();for(r=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r}var Nt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function jt(e){var t=F(e),r=t.year||0,n=t.quarter||0,a=t.month||0,i=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Le.call(Nt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var r=!1,n=0;n<Nt.length;++n)if(e[Nt[n]]){if(r)return!1;parseFloat(e[Nt[n]])!==k(e[Nt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*s*60*60,this._days=+o+7*i,this._months=+a+3*n+12*r,this._data={},this._locale=gt(),this._bubble()}function Bt(e){return e instanceof jt}function Yt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ht(e,t){U(e,0,0,(function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+j(~~(e/60),2)+t+j(~~e%60,2)}))}Ht("Z",":"),Ht("ZZ",""),ue("Z",se),ue("ZZ",se),fe(["Z","ZZ"],(function(e,t,r){r._useUTC=!0,r._tzm=Ut(se,e)}));var Vt=/([\+\-]|\d\d)/gi;function Ut(e,t){var r=(t||"").match(e);if(null===r)return null;var n=((r[r.length-1]||[])+"").match(Vt)||["-",0,0],a=60*n[1]+k(n[2]);return 0===a?0:"+"===n[0]?a:-a}function Wt(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(x(e)||c(e)?e.valueOf():Ot(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),a.updateOffset(r,!1),r):Ot(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function qt(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Kt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Xt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Zt(e,t){var r,n,a,i,o,s,c=e,u=null;return Bt(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(c={},t?c[t]=e:c.milliseconds=e):(u=Kt.exec(e))?(r="-"===u[1]?-1:1,c={y:0,d:k(u[be])*r,h:k(u[_e])*r,m:k(u[xe])*r,s:k(u[we])*r,ms:k(Yt(1e3*u[ke]))*r}):(u=Xt.exec(e))?(r="-"===u[1]?-1:1,c={y:Jt(u[2],r),M:Jt(u[3],r),w:Jt(u[4],r),d:Jt(u[5],r),h:Jt(u[6],r),m:Jt(u[7],r),s:Jt(u[8],r)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(i=Ot(c.from),o=Ot(c.to),a=i.isValid()&&o.isValid()?(o=Wt(o,i),i.isBefore(o)?s=$t(i,o):((s=$t(o,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(c={}).ms=a.milliseconds,c.M=a.months),n=new jt(c),Bt(e)&&d(e,"_locale")&&(n._locale=e._locale),n}function Jt(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function $t(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function Qt(e,t){return function(r,n){var a;return null===n||isNaN(+n)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=r,r=n,n=a),er(this,Zt(r="string"==typeof r?+r:r,n),e),this}}function er(e,t,r,n){var i=t._milliseconds,o=Yt(t._days),s=Yt(t._months);e.isValid()&&(n=null==n||n,s&&Ne(e,De(e,"Month")+s*r),o&&Ie(e,"Date",De(e,"Date")+o*r),i&&e._d.setTime(e._d.valueOf()+i*r),n&&a.updateOffset(e,o||s))}Zt.fn=jt.prototype,Zt.invalid=function(){return Zt(NaN)};var tr=Qt(1,"add"),rr=Qt(-1,"subtract");function nr(e,t){var r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return-(r+(t-n<0?(t-n)/(n-e.clone().add(r-1,"months")):(t-n)/(e.clone().add(r+1,"months")-n)))||0}function ar(e){var t;return void 0===e?this._locale._abbr:(null!=(t=gt(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ir=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function or(){return this._locale}var sr=1e3,lr=60*sr,cr=60*lr,ur=3506328*cr;function dr(e,t){return(e%t+t)%t}function pr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-ur:new Date(e,t,r).valueOf()}function hr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-ur:Date.UTC(e,t,r)}function fr(e,t){U(0,[e,e.length],0,t)}function mr(e,t,r,n,a){var i;return null==e?qe(this,n,a).year:(t>(i=Ke(e,n,a))&&(t=i),gr.call(this,e,t,r,n,a))}function gr(e,t,r,n,a){var i=Ge(e,t,r,n,a),o=Ue(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),fr("gggg","weekYear"),fr("ggggg","weekYear"),fr("GGGG","isoWeekYear"),fr("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),ue("G",ie),ue("g",ie),ue("GG",$,K),ue("gg",$,K),ue("GGGG",re,Z),ue("gggg",re,Z),ue("GGGGG",ne,J),ue("ggggg",ne,J),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=k(e)})),me(["gg","GG"],(function(e,t,r,n){t[n]=a.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),O("quarter","Q"),N("quarter",7),ue("Q",q),fe("Q",(function(e,t){t[ye]=3*(k(e)-1)})),U("D",["DD",2],"Do","date"),O("date","D"),N("date",9),ue("D",$),ue("DD",$,K),ue("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),fe(["D","DD"],be),fe("Do",(function(e,t){t[be]=k(e.match($)[0])}));var vr=Ee("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),N("dayOfYear",4),ue("DDD",te),ue("DDDD",X),fe(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=k(e)})),U("m",["mm",2],0,"minute"),O("minute","m"),N("minute",14),ue("m",$),ue("mm",$,K),fe(["m","mm"],xe);var yr=Ee("Minutes",!1);U("s",["ss",2],0,"second"),O("second","s"),N("second",15),ue("s",$),ue("ss",$,K),fe(["s","ss"],we);var br,_r=Ee("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),O("millisecond","ms"),N("millisecond",16),ue("S",te,q),ue("SS",te,K),ue("SSS",te,X),br="SSSS";br.length<=9;br+="S")ue(br,ae);function xr(e,t){t[ke]=k(1e3*("0."+e))}for(br="S";br.length<=9;br+="S")fe(br,xr);var wr=Ee("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var kr=_.prototype;function Mr(e){return e}kr.add=tr,kr.calendar=function(e,t){var r=e||Ot(),n=Wt(r,this).startOf("day"),i=a.calendarFormat(this,n)||"sameElse",o=t&&(E(t[i])?t[i].call(this,r):t[i]);return this.format(o||this.localeData().calendar(i,this,Ot(r)))},kr.clone=function(){return new _(this)},kr.diff=function(e,t,r){var n,a,i;if(!this.isValid())return NaN;if(!(n=Wt(e,this)).isValid())return NaN;switch(a=6e4*(n.utcOffset()-this.utcOffset()),t=R(t)){case"year":i=nr(this,n)/12;break;case"month":i=nr(this,n);break;case"quarter":i=nr(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-a)/864e5;break;case"week":i=(this-n-a)/6048e5;break;default:i=this-n}return r?i:w(i)},kr.endOf=function(e){var t;if(void 0===(e=R(e))||"millisecond"===e||!this.isValid())return this;var r=this._isUTC?hr:pr;switch(e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=cr-dr(t+(this._isUTC?0:this.utcOffset()*lr),cr)-1;break;case"minute":t=this._d.valueOf(),t+=lr-dr(t,lr)-1;break;case"second":t=this._d.valueOf(),t+=sr-dr(t,sr)-1}return this._d.setTime(t),a.updateOffset(this,!0),this},kr.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=W(this,e);return this.localeData().postformat(t)},kr.from=function(e,t){return this.isValid()&&(x(e)&&e.isValid()||Ot(e).isValid())?Zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},kr.fromNow=function(e){return this.from(Ot(),e)},kr.to=function(e,t){return this.isValid()&&(x(e)&&e.isValid()||Ot(e).isValid())?Zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},kr.toNow=function(e){return this.to(Ot(),e)},kr.get=function(e){return E(this[e=R(e)])?this[e]():this},kr.invalidAt=function(){return f(this).overflow},kr.isAfter=function(e,t){var r=x(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())},kr.isBefore=function(e,t){var r=x(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())},kr.isBetween=function(e,t,r,n){var a=x(e)?e:Ot(e),i=x(t)?t:Ot(t);return!!(this.isValid()&&a.isValid()&&i.isValid())&&("("===(n=n||"()")[0]?this.isAfter(a,r):!this.isBefore(a,r))&&(")"===n[1]?this.isBefore(i,r):!this.isAfter(i,r))},kr.isSame=function(e,t){var r,n=x(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))},kr.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},kr.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},kr.isValid=function(){return m(this)},kr.lang=ir,kr.locale=ar,kr.localeData=or,kr.max=Ft,kr.min=Rt,kr.parsingFlags=function(){return p({},f(this))},kr.set=function(e,t){if("object"==typeof e)for(var r=function(e){var t=[];for(var r in e)t.push({unit:r,priority:z[r]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=F(e)),n=0;n<r.length;n++)this[r[n].unit](e[r[n].unit]);else if(E(this[e=R(e)]))return this[e](t);return this},kr.startOf=function(e){var t;if(void 0===(e=R(e))||"millisecond"===e||!this.isValid())return this;var r=this._isUTC?hr:pr;switch(e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=dr(t+(this._isUTC?0:this.utcOffset()*lr),cr);break;case"minute":t=this._d.valueOf(),t-=dr(t,lr);break;case"second":t=this._d.valueOf(),t-=dr(t,sr)}return this._d.setTime(t),a.updateOffset(this,!0),this},kr.subtract=rr,kr.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},kr.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},kr.toDate=function(){return new Date(this.valueOf())},kr.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?W(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(r,"Z")):W(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},kr.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=t+'[")]';return this.format(r+n+"-MM-DD[T]HH:mm:ss.SSS"+a)},kr.toJSON=function(){return this.isValid()?this.toISOString():null},kr.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},kr.unix=function(){return Math.floor(this.valueOf()/1e3)},kr.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},kr.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},kr.year=Ae,kr.isLeapYear=function(){return Se(this.year())},kr.weekYear=function(e){return mr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},kr.isoWeekYear=function(e){return mr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},kr.quarter=kr.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},kr.month=je,kr.daysInMonth=function(){return Pe(this.year(),this.month())},kr.week=kr.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},kr.isoWeek=kr.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},kr.weeksInYear=function(){var e=this.localeData()._week;return Ke(this.year(),e.dow,e.doy)},kr.isoWeeksInYear=function(){return Ke(this.year(),1,4)},kr.date=vr,kr.day=kr.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},kr.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},kr.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},kr.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},kr.hour=kr.hours=lt,kr.minute=kr.minutes=yr,kr.second=kr.seconds=_r,kr.millisecond=kr.milliseconds=wr,kr.utcOffset=function(e,t,r){var n,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(se,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(n=Gt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),i!==e&&(!t||this._changeInProgress?er(this,Zt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},kr.utc=function(e){return this.utcOffset(0,e)},kr.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},kr.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},kr.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},kr.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},kr.isLocal=function(){return!!this.isValid()&&!this._isUTC},kr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},kr.isUtc=qt,kr.isUTC=qt,kr.zoneAbbr=function(){return this._isUTC?"UTC":""},kr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},kr.dates=C("dates accessor is deprecated. Use date instead.",vr),kr.months=C("months accessor is deprecated. Use month instead",je),kr.years=C("years accessor is deprecated. Use year instead",Ae),kr.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),kr.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=It(e))._a){var t=e._isUTC?h(e._a):Ot(e._a);this._isDSTShifted=this.isValid()&&M(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var Tr=I.prototype;function Cr(e,t,r,n){var a=gt(),i=h().set(n,t);return a[r](i,e)}function Sr(e,t,r){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return Cr(e,t,r,"month");var n,a=[];for(n=0;n<12;n++)a[n]=Cr(e,n,r,"month");return a}function Lr(e,t,r,n){"boolean"==typeof e?(l(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,l(t)&&(r=t,t=void 0),t=t||"");var a,i=gt(),o=e?i._week.dow:0;if(null!=r)return Cr(t,(r+o)%7,n,"day");var s=[];for(a=0;a<7;a++)s[a]=Cr(t,(a+o)%7,n,"day");return s}Tr.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return E(n)?n.call(t,r):n},Tr.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},Tr.invalidDate=function(){return this._invalidDate},Tr.ordinal=function(e){return this._ordinal.replace("%d",e)},Tr.preparse=Mr,Tr.postformat=Mr,Tr.relativeTime=function(e,t,r,n){var a=this._relativeTime[r];return E(a)?a(e,t,r,n):a.replace(/%d/i,e)},Tr.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return E(r)?r(t):r.replace(/%s/i,t)},Tr.set=function(e){var t,r;for(r in e)E(t=e[r])?this[r]=t:this["_"+r]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Tr.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Tr.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Tr.monthsParse=function(e,t,r){var n,a,i;if(this._monthsParseExact)return ze.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=h([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},Tr.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ye),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Tr.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Be),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Tr.week=function(e){return qe(e,this._week.dow,this._week.doy).week},Tr.firstDayOfYear=function(){return this._week.doy},Tr.firstDayOfWeek=function(){return this._week.dow},Tr.weekdays=function(e,t){var r=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Xe(r,this._week.dow):e?r[e.day()]:r},Tr.weekdaysMin=function(e){return!0===e?Xe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Tr.weekdaysShort=function(e){return!0===e?Xe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Tr.weekdaysParse=function(e,t,r){var n,a,i;if(this._weekdaysParseExact)return Qe.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=h([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}},Tr.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Tr.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Tr.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=rt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Tr.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Tr.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},ft("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=C("moment.lang is deprecated. Use moment.locale instead.",ft),a.langData=C("moment.langData is deprecated. Use moment.localeData instead.",gt);var Ar=Math.abs;function Er(e,t,r,n){var a=Zt(t,r);return e._milliseconds+=n*a._milliseconds,e._days+=n*a._days,e._months+=n*a._months,e._bubble()}function Dr(e){return e<0?Math.floor(e):Math.ceil(e)}function Ir(e){return 4800*e/146097}function Pr(e){return 146097*e/4800}function Or(e){return function(){return this.as(e)}}var Rr=Or("ms"),Fr=Or("s"),zr=Or("m"),Nr=Or("h"),jr=Or("d"),Br=Or("w"),Yr=Or("M"),Hr=Or("Q"),Vr=Or("y");function Ur(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wr=Ur("milliseconds"),Gr=Ur("seconds"),qr=Ur("minutes"),Kr=Ur("hours"),Xr=Ur("days"),Zr=Ur("months"),Jr=Ur("years"),$r=Math.round,Qr={ss:44,s:45,m:45,h:22,d:26,M:11};function en(e,t,r,n,a){return a.relativeTime(t||1,!!r,e,n)}var tn=Math.abs;function rn(e){return(e>0)-(e<0)||+e}function nn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r=tn(this._milliseconds)/1e3,n=tn(this._days),a=tn(this._months);e=w(r/60),t=w(e/60),r%=60,e%=60;var i=w(a/12),o=a%=12,s=n,l=t,c=e,u=r?r.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var p=d<0?"-":"",h=rn(this._months)!==rn(d)?"-":"",f=rn(this._days)!==rn(d)?"-":"",m=rn(this._milliseconds)!==rn(d)?"-":"";return p+"P"+(i?h+i+"Y":"")+(o?h+o+"M":"")+(s?f+s+"D":"")+(l||c||u?"T":"")+(l?m+l+"H":"")+(c?m+c+"M":"")+(u?m+u+"S":"")}var an=jt.prototype;return an.isValid=function(){return this._isValid},an.abs=function(){var e=this._data;return this._milliseconds=Ar(this._milliseconds),this._days=Ar(this._days),this._months=Ar(this._months),e.milliseconds=Ar(e.milliseconds),e.seconds=Ar(e.seconds),e.minutes=Ar(e.minutes),e.hours=Ar(e.hours),e.months=Ar(e.months),e.years=Ar(e.years),this},an.add=function(e,t){return Er(this,e,t,1)},an.subtract=function(e,t){return Er(this,e,t,-1)},an.as=function(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=R(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Ir(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Pr(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},an.asMilliseconds=Rr,an.asSeconds=Fr,an.asMinutes=zr,an.asHours=Nr,an.asDays=jr,an.asWeeks=Br,an.asMonths=Yr,an.asQuarters=Hr,an.asYears=Vr,an.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},an._bubble=function(){var e,t,r,n,a,i=this._milliseconds,o=this._days,s=this._months,l=this._data;return i>=0&&o>=0&&s>=0||i<=0&&o<=0&&s<=0||(i+=864e5*Dr(Pr(s)+o),o=0,s=0),l.milliseconds=i%1e3,e=w(i/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,r=w(t/60),l.hours=r%24,o+=w(r/24),a=w(Ir(o)),s+=a,o-=Dr(Pr(a)),n=w(s/12),s%=12,l.days=o,l.months=s,l.years=n,this},an.clone=function(){return Zt(this)},an.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},an.milliseconds=Wr,an.seconds=Gr,an.minutes=qr,an.hours=Kr,an.days=Xr,an.weeks=function(){return w(this.days()/7)},an.months=Zr,an.years=Jr,an.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),r=function(e,t,r){var n=Zt(e).abs(),a=$r(n.as("s")),i=$r(n.as("m")),o=$r(n.as("h")),s=$r(n.as("d")),l=$r(n.as("M")),c=$r(n.as("y")),u=a<=Qr.ss&&["s",a]||a<Qr.s&&["ss",a]||i<=1&&["m"]||i<Qr.m&&["mm",i]||o<=1&&["h"]||o<Qr.h&&["hh",o]||s<=1&&["d"]||s<Qr.d&&["dd",s]||l<=1&&["M"]||l<Qr.M&&["MM",l]||c<=1&&["y"]||["yy",c];return u[2]=t,u[3]=+e>0,u[4]=r,en.apply(null,u)}(this,!e,t);return e&&(r=t.pastFuture(+this,r)),t.postformat(r)},an.toISOString=nn,an.toString=nn,an.toJSON=nn,an.locale=ar,an.localeData=or,an.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nn),an.lang=ir,U("X",0,0,"unix"),U("x",0,0,"valueOf"),ue("x",ie),ue("X",/[+-]?\d+(\.\d{1,3})?/),fe("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e,10))})),fe("x",(function(e,t,r){r._d=new Date(k(e))})),a.version="2.24.0",t=Ot,a.fn=kr,a.min=function(){return zt("isBefore",[].slice.call(arguments,0))},a.max=function(){return zt("isAfter",[].slice.call(arguments,0))},a.now=function(){return Date.now?Date.now():+new Date},a.utc=h,a.unix=function(e){return Ot(1e3*e)},a.months=function(e,t){return Sr(e,t,"months")},a.isDate=c,a.locale=ft,a.invalid=g,a.duration=Zt,a.isMoment=x,a.weekdays=function(e,t,r){return Lr(e,t,r,"weekdays")},a.parseZone=function(){return Ot.apply(null,arguments).parseZone()},a.localeData=gt,a.isDuration=Bt,a.monthsShort=function(e,t){return Sr(e,t,"monthsShort")},a.weekdaysMin=function(e,t,r){return Lr(e,t,r,"weekdaysMin")},a.defineLocale=mt,a.updateLocale=function(e,t){if(null!=t){var r,n,a=ct;null!=(n=ht(e))&&(a=n._config),t=D(a,t),(r=new I(t)).parentLocale=ut[e],ut[e]=r,ft(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?ut[e]=ut[e].parentLocale:null!=ut[e]&&delete ut[e]);return ut[e]},a.locales=function(){return S(ut)},a.weekdaysShort=function(e,t,r){return Lr(e,t,r,"weekdaysShort")},a.normalizeUnits=R,a.relativeTimeRounding=function(e){return void 0===e?$r:"function"==typeof e&&($r=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Qr[e]&&(void 0===t?Qr[e]:(Qr[e]=t,"s"===e&&(Qr.ss=t-1),!0))},a.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},a.prototype=kr,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,r(112)(e))},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e.regression="regression",e.binary="binary",e.multiclass="multiclass"}(n||(n={}))},function(e,t,r){"use strict";var n=r(19);function a(e){var t={},r=function(r){var a;e.hasOwnProperty(r)&&Object.defineProperty(t,r,{get:function(){return void 0===a&&(a=Object(n.d)(e[r]).toString()),a},enumerable:!0,configurable:!0})};for(var a in e)r(a);return t}var i=r(2),o=r(266),s=r(63),l=r(24),c=r(241),u=r(69),d=o.a.getValue("icons",{__options:{disableWarnings:!1,warnOnMissingIcons:!0},__remapped:{}}),p=l.a.getInstance();p&&p.onReset&&p.onReset((function(){for(var e in d)d.hasOwnProperty(e)&&d[e].subset&&(d[e].subset.className=void 0)}));var h=function(e){return e.toLowerCase()};function f(e,t){var r=Object(i.a)(Object(i.a)({},e),{isRegistered:!1,className:void 0}),n=e.icons;for(var a in t=t?Object(i.a)(Object(i.a)({},d.__options),t):d.__options,n)if(n.hasOwnProperty(a)){var o=n[a],s=h(a);d[s]?b(a):d[s]={code:o,subset:r}}}function m(e,t){d.__remapped[h(e)]=h(t)}function g(e){var t=void 0,r=d.__options;if(e=e?h(e):"",e=d.__remapped[e]||e)if(t=d[e]){var n=t.subset;n&&n.fontFace&&(n.isRegistered||(Object(c.a)(n.fontFace),n.isRegistered=!0),n.className||(n.className=Object(u.a)(n.style,{fontFamily:n.fontFace.fontFamily,fontWeight:n.fontFace.fontWeight||"normal",fontStyle:n.fontFace.fontStyle||"normal"})))}else!r.disableWarnings&&r.warnOnMissingIcons&&Object(s.a)('The icon "'+e+'" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.');return t}var v=[],y=void 0;function b(e){var t=d.__options;t.disableWarnings||(v.push(e),void 0===y&&(y=setTimeout((function(){Object(s.a)("Some icons were re-registered. Applications should only call registerIcons for any given icon once. Redefining what an icon is may have unintended consequences. Duplicates include: \n"+v.slice(0,10).join(", ")+(v.length>10?" (+ "+(v.length-10)+" more)":"")),y=void 0,v=[]}),2e3)))}var _=r(240),x="cubic-bezier(.1,.9,.2,1)",w="cubic-bezier(.1,.25,.75,.9)",k=Object(_.a)({from:{opacity:0},to:{opacity:1}}),M=Object(_.a)({from:{opacity:1},to:{opacity:0,visibility:"hidden"}}),T=ae(-10),C=ae(-20),S=ae(-40),L=ae(-400),A=ae(10),E=ae(20),D=ae(40),I=ae(400),P=ie(10),O=ie(20),R=ie(-10),F=ie(-20),z=oe(10),N=oe(20),j=oe(40),B=oe(400),Y=oe(-10),H=oe(-20),V=oe(-40),U=oe(-400),W=se(-10),G=se(-20),q=se(10),K=se(20),X=Object(_.a)({from:{transform:"scale3d(.98,.98,1)"},to:{transform:"scale3d(1,1,1)"}}),Z=Object(_.a)({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(.98,.98,1)"}}),J=Object(_.a)({from:{transform:"scale3d(1.03,1.03,1)"},to:{transform:"scale3d(1,1,1)"}}),$=Object(_.a)({from:{transform:"scale3d(1,1,1)"},to:{transform:"scale3d(1.03,1.03,1)"}}),Q=Object(_.a)({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(90deg)"}}),ee=Object(_.a)({from:{transform:"rotateZ(0deg)"},to:{transform:"rotateZ(-90deg)"}}),te={easeFunction1:x,easeFunction2:w,durationValue1:"0.167s",durationValue2:"0.267s",durationValue3:"0.367s",durationValue4:"0.467s"},re={slideRightIn10:ne(k+","+T,"0.367s",x),slideRightIn20:ne(k+","+C,"0.367s",x),slideRightIn40:ne(k+","+S,"0.367s",x),slideRightIn400:ne(k+","+L,"0.367s",x),slideLeftIn10:ne(k+","+A,"0.367s",x),slideLeftIn20:ne(k+","+E,"0.367s",x),slideLeftIn40:ne(k+","+D,"0.367s",x),slideLeftIn400:ne(k+","+I,"0.367s",x),slideUpIn10:ne(k+","+P,"0.367s",x),slideUpIn20:ne(k+","+O,"0.367s",x),slideDownIn10:ne(k+","+R,"0.367s",x),slideDownIn20:ne(k+","+F,"0.367s",x),slideRightOut10:ne(M+","+z,"0.367s",x),slideRightOut20:ne(M+","+N,"0.367s",x),slideRightOut40:ne(M+","+j,"0.367s",x),slideRightOut400:ne(M+","+B,"0.367s",x),slideLeftOut10:ne(M+","+Y,"0.367s",x),slideLeftOut20:ne(M+","+H,"0.367s",x),slideLeftOut40:ne(M+","+V,"0.367s",x),slideLeftOut400:ne(M+","+U,"0.367s",x),slideUpOut10:ne(M+","+W,"0.367s",x),slideUpOut20:ne(M+","+G,"0.367s",x),slideDownOut10:ne(M+","+q,"0.367s",x),slideDownOut20:ne(M+","+K,"0.367s",x),scaleUpIn100:ne(k+","+X,"0.367s",x),scaleDownIn100:ne(k+","+J,"0.367s",x),scaleUpOut103:ne(M+","+$,"0.167s",w),scaleDownOut98:ne(M+","+Z,"0.167s",w),fadeIn100:ne(k,"0.167s",w),fadeIn200:ne(k,"0.267s",w),fadeIn400:ne(k,"0.367s",w),fadeIn500:ne(k,"0.467s",w),fadeOut100:ne(M,"0.167s",w),fadeOut200:ne(M,"0.267s",w),fadeOut400:ne(M,"0.367s",w),fadeOut500:ne(M,"0.467s",w),rotate90deg:ne(Q,"0.1s",w),rotateN90deg:ne(ee,"0.1s",w)};function ne(e,t,r){return{animationName:e,animationDuration:t,animationTimingFunction:r,animationFillMode:"both"}}function ae(e){return Object(_.a)({from:{transform:"translate3d("+e+"px,0,0)"},to:{transform:"translate3d(0,0,0)"}})}function ie(e){return Object(_.a)({from:{transform:"translate3d(0,"+e+"px,0)"},to:{transform:"translate3d(0,0,0)"}})}function oe(e){return Object(_.a)({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d("+e+"px,0,0)"}})}function se(e){return Object(_.a)({from:{transform:"translate3d(0,0,0)"},to:{transform:"translate3d(0,"+e+"px,0)"}})}var le,ce,ue={themeDarker:"#004578",themeDark:"#005a9e",themeDarkAlt:"#106ebe",themePrimary:"#0078d4",themeSecondary:"#2b88d8",themeTertiary:"#71afe5",themeLight:"#c7e0f4",themeLighter:"#deecf9",themeLighterAlt:"#eff6fc",black:"#000000",blackTranslucent40:"rgba(0,0,0,.4)",neutralDark:"#201f1e",neutralPrimary:"#323130",neutralPrimaryAlt:"#3b3a39",neutralSecondary:"#605e5c",neutralSecondaryAlt:"#8a8886",neutralTertiary:"#a19f9d",neutralTertiaryAlt:"#c8c6c4",neutralQuaternary:"#d2d0ce",neutralQuaternaryAlt:"#e1dfdd",neutralLight:"#edebe9",neutralLighter:"#f3f2f1",neutralLighterAlt:"#faf9f8",accent:"#0078d4",white:"#ffffff",whiteTranslucent40:"rgba(255,255,255,.4)",yellowDark:"#d29200",yellow:"#ffb900",yellowLight:"#fff100",orange:"#d83b01",orangeLight:"#ea4300",orangeLighter:"#ff8c00",redDark:"#a4262c",red:"#e81123",magentaDark:"#5c005c",magenta:"#b4009e",magentaLight:"#e3008c",purpleDark:"#32145a",purple:"#5c2d91",purpleLight:"#b4a0ff",blueDark:"#002050",blueMid:"#00188f",blue:"#0078d4",blueLight:"#00bcf2",tealDark:"#004b50",teal:"#008272",tealLight:"#00b294",greenDark:"#004b1c",green:"#107c10",greenLight:"#bad80a"},de={elevation4:"0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)",elevation8:"0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)",elevation16:"0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)",elevation64:"0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)",roundedCorner2:"2px"},pe="'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif";!function(e){e.Arabic="Segoe UI Web (Arabic)",e.Cyrillic="Segoe UI Web (Cyrillic)",e.EastEuropean="Segoe UI Web (East European)",e.Greek="Segoe UI Web (Greek)",e.Hebrew="Segoe UI Web (Hebrew)",e.Thai="Leelawadee UI Web",e.Vietnamese="Segoe UI Web (Vietnamese)",e.WestEuropean="Segoe UI Web (West European)",e.Selawik="Selawik Web",e.Armenian="Segoe UI Web (Armenian)",e.Georgian="Segoe UI Web (Georgian)"}(le||(le={})),function(e){e.Arabic="'"+le.Arabic+"'",e.ChineseSimplified="'Microsoft Yahei UI', Verdana, Simsun",e.ChineseTraditional="'Microsoft Jhenghei UI', Pmingliu",e.Cyrillic="'"+le.Cyrillic+"'",e.EastEuropean="'"+le.EastEuropean+"'",e.Greek="'"+le.Greek+"'",e.Hebrew="'"+le.Hebrew+"'",e.Hindi="'Nirmala UI'",e.Japanese="'Yu Gothic UI', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka",e.Korean="'Malgun Gothic', Gulim",e.Selawik="'"+le.Selawik+"'",e.Thai="'Leelawadee UI Web', 'Kmer UI'",e.Vietnamese="'"+le.Vietnamese+"'",e.WestEuropean="'"+le.WestEuropean+"'",e.Armenian="'"+le.Armenian+"'",e.Georgian="'"+le.Georgian+"'"}(ce||(ce={}));var he,fe,me,ge="'Segoe UI', '"+le.WestEuropean+"'",ve={ar:ce.Arabic,bg:ce.Cyrillic,cs:ce.EastEuropean,el:ce.Greek,et:ce.EastEuropean,he:ce.Hebrew,hi:ce.Hindi,hr:ce.EastEuropean,hu:ce.EastEuropean,ja:ce.Japanese,kk:ce.EastEuropean,ko:ce.Korean,lt:ce.EastEuropean,lv:ce.EastEuropean,pl:ce.EastEuropean,ru:ce.Cyrillic,sk:ce.EastEuropean,"sr-latn":ce.EastEuropean,th:ce.Thai,tr:ce.EastEuropean,uk:ce.Cyrillic,vi:ce.Vietnamese,"zh-hans":ce.ChineseSimplified,"zh-hant":ce.ChineseTraditional,hy:ce.Armenian,ka:ce.Georgian};function ye(e,t,r){return{fontFamily:r,MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontSize:e,fontWeight:t}}!function(e){e.mini="10px",e.xSmall="10px",e.small="12px",e.smallPlus="12px",e.medium="14px",e.mediumPlus="16px",e.icon="16px",e.large="18px",e.xLarge="20px",e.xLargePlus="24px",e.xxLarge="28px",e.xxLargePlus="32px",e.superLarge="42px",e.mega="68px"}(he||(he={})),function(e){e.light=100,e.semilight=300,e.regular=400,e.semibold=600,e.bold=700}(fe||(fe={})),function(e){e.xSmall="10px",e.small="12px",e.medium="16px",e.large="20px"}(me||(me={}));var be,_e=r(34),xe=r(17);var we,ke,Me,Te,Ce="https://static2.sharepointonline.com/files/fabric/assets",Se=(we=function(){if(void 0===be){var e=Object(_e.a)(),t=function(e){var t=null;try{var r=Object(xe.a)();t=r?r.localStorage.getItem(e):null}catch(e){}return t}("language");null!==t&&(be=t),void 0===be&&e&&(be=e.documentElement.getAttribute("lang")),void 0===be&&(be="en")}return be}(),ke=function(e){for(var t in ve)if(ve.hasOwnProperty(t)&&e&&0===t.indexOf(e))return ve[t];return ge}(we)+", "+pe,{tiny:ye(he.mini,fe.regular,ke),xSmall:ye(he.xSmall,fe.regular,ke),small:ye(he.small,fe.regular,ke),smallPlus:ye(he.smallPlus,fe.regular,ke),medium:ye(he.medium,fe.regular,ke),mediumPlus:ye(he.mediumPlus,fe.regular,ke),large:ye(he.large,fe.regular,ke),xLarge:ye(he.xLarge,fe.semibold,ke),xLargePlus:ye(he.xLargePlus,fe.semibold,ke),xxLarge:ye(he.xxLarge,fe.semibold,ke),xxLargePlus:ye(he.xxLargePlus,fe.semibold,ke),superLarge:ye(he.superLarge,fe.semibold,ke),mega:ye(he.mega,fe.semibold,ke)});function Le(e,t,r,n){e="'"+e+"'";var a=void 0!==n?"local('"+n+"'),":"";Object(c.a)({fontFamily:e,src:a+"url('"+t+".woff2') format('woff2'),url('"+t+".woff') format('woff')",fontWeight:r,fontStyle:"normal",fontDisplay:"swap"})}function Ae(e,t,r,n,a){void 0===n&&(n="segoeui");var i=e+"/"+r+"/"+n;Le(t,i+"-light",fe.light,a&&a+" Light"),Le(t,i+"-semilight",fe.semilight,a&&a+" SemiLight"),Le(t,i+"-regular",fe.regular,a),Le(t,i+"-semibold",fe.semibold,a&&a+" SemiBold")}!function(e){if(e){var t=e+"/fonts";Ae(t,le.Thai,"leelawadeeui-thai","leelawadeeui"),Ae(t,le.Arabic,"segoeui-arabic"),Ae(t,le.Cyrillic,"segoeui-cyrillic"),Ae(t,le.EastEuropean,"segoeui-easteuropean"),Ae(t,le.Greek,"segoeui-greek"),Ae(t,le.Hebrew,"segoeui-hebrew"),Ae(t,le.Vietnamese,"segoeui-vietnamese"),Ae(t,le.WestEuropean,"segoeui-westeuropean","segoeui","Segoe UI"),Ae(t,ce.Selawik,"selawik","selawik"),Ae(t,le.Armenian,"segoeui-armenian"),Ae(t,le.Georgian,"segoeui-georgian"),Le("Leelawadee UI Web",t+"/leelawadeeui-thai/leelawadeeui-semilight",fe.light),Le("Leelawadee UI Web",t+"/leelawadeeui-thai/leelawadeeui-bold",fe.semibold)}}((Me=Object(xe.a)(),Te=Me?Me.FabricConfig:void 0,Te&&void 0!==Te.fontBaseUrl?Te.fontBaseUrl:Ce));var Ee="@media screen and (-ms-high-contrast: active)";function De(e,t){return"@media only screen and (min-width: "+e+"px) and (max-width: "+t+"px)"}var Ie,Pe=r(64);function Oe(e,t,r,n,a,i,o){return Re(e,"number"!=typeof t&&t?t:{inset:t,position:r,highContrastStyle:n,borderColor:a,outlineColor:i,isFocusedOnly:o})}function Re(e,t){var r,n;void 0===t&&(t={});var a=t.inset,i=void 0===a?0:a,o=t.width,s=void 0===o?1:o,l=t.position,c=void 0===l?"relative":l,u=t.highContrastStyle,d=t.borderColor,p=void 0===d?e.palette.white:d,h=t.outlineColor,f=void 0===h?e.palette.neutralSecondary:h,m=t.isFocusedOnly,g=void 0===m||m;return{outline:"transparent",position:c,selectors:(r={"::-moz-focus-inner":{border:"0"}},r["."+Pe.a+" &"+(g?":focus":"")+":after"]={content:'""',position:"absolute",left:i+1,top:i+1,bottom:i+1,right:i+1,border:s+"px solid "+p,outline:s+"px solid "+f,zIndex:Ie.FocusStyle,selectors:(n={},n[Ee]=u,n)},r)}}function Fe(){return{selectors:{"&::-moz-focus-inner":{border:0},"&":{outline:"transparent"}}}}!function(e){e.Nav=1,e.ScrollablePane=1,e.FocusStyle=1,e.Coachmark=1e3,e.Layer=1e6,e.KeytipLayer=1000001}(Ie||(Ie={}));var ze=function(e,t,r,n){var a,i,o;void 0===r&&(r="border"),void 0===n&&(n=-1);var s="borderBottom"===r;return{borderColor:e,selectors:{":after":(a={pointerEvents:"none",content:"''",position:"absolute",left:s?0:n,top:n,bottom:n,right:s?0:n},a[r]="2px solid "+e,a.borderRadius=t,a.width="borderBottom"===r?"100%":void 0,a.selectors=(i={},i[Ee]=(o={},o["border"===r?"borderColor":"borderBottomColor"]="Highlight",o),i),a)}}},Ne={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden"};var je=r(46),Be=Object(je.b)((function(e,t){var r=l.a.getInstance();return t?Object.keys(e).reduce((function(t,n){return t[n]=r.getClassName(e[n]),t}),{}):e}));function Ye(e,t,r){return Be(e,void 0!==r?r:t.disableGlobalClassNames)}var He=r(39);r(90);function Ve(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,a=t;n<a.length;n++){Ue(e||{},a[n])}return e}function Ue(e,t,r){for(var n in void 0===r&&(r=[]),r.push(t),t)if(t.hasOwnProperty(n)){var a=t[n];if("object"==typeof a){var i=r.indexOf(a)>-1;e[n]=i?a:Ue(e[n]||{},a,r)}else e[n]=a}return r.pop(),e}var We,Ge={s2:"4px",s1:"8px",m:"16px",l1:"20px",l2:"32px"},qe=r(267),Ke=et({palette:ue,semanticColors:tt(ue,!1,!1),fonts:Se,isInverted:!1,disableGlobalClassNames:!1}),Xe=[],Ze="theme";if(!He.a.getSettings([Ze]).theme){var Je=Object(xe.a)();Je&&Je.FabricConfig&&Je.FabricConfig.theme&&(Ke=et(Je.FabricConfig.theme)),He.a.applySettings(((We={})[Ze]=Ke,We))}function $e(e){return void 0===e&&(e=!1),!0===e&&(Ke=et({},e)),Ke}function Qe(e,t){var r;return void 0===t&&(t=!1),Ke=et(e,t),Object(qe.a)(Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},Ke.palette),Ke.semanticColors),Ke.effects),function(e){for(var t={},r=0,n=Object.keys(e.fonts);r<n.length;r++)for(var a=n[r],i=e.fonts[a],o=0,s=Object.keys(i);o<s.length;o++){var l=s[o],c=a+l.charAt(0).toUpperCase()+l.slice(1),u=i[l];"fontSize"===l&&"number"==typeof u&&(u+="px"),t[c]=u}return t}(Ke))),He.a.applySettings(((r={})[Ze]=Ke,r)),Xe.forEach((function(e){try{e(Ke)}catch(e){}})),Ke}function et(e,t){void 0===t&&(t=!1);var r=Object(i.a)(Object(i.a)({},ue),e.palette);e.palette&&e.palette.accent||(r.accent=r.themePrimary);var n=Object(i.a)(Object(i.a)({},tt(r,!!e.isInverted,t)),e.semanticColors),a=Object(i.a)({},Se);if(e.defaultFontStyle)for(var o=0,s=Object.keys(a);o<s.length;o++){a[u=s[o]]=Ve({},a[u],e.defaultFontStyle)}if(e.fonts)for(var l=0,c=Object.keys(e.fonts);l<c.length;l++){var u;a[u=c[l]]=Ve({},a[u],e.fonts[u])}return{palette:r,fonts:Object(i.a)({},a),rtl:e.rtl,semanticColors:n,isInverted:!!e.isInverted,disableGlobalClassNames:!!e.disableGlobalClassNames,spacing:Object(i.a)(Object(i.a)({},Ge),e.spacing),effects:Object(i.a)(Object(i.a)({},de),e.effects)}}function tt(e,t,r){return function(e,t){var r="";!0===t&&(r=" /* @deprecated */");return e.listTextColor=e.listText+r,e.menuItemBackgroundChecked+=r,e}({bodyBackground:e.white,bodyBackgroundHovered:e.neutralLighter,bodyBackgroundChecked:e.neutralLight,bodyStandoutBackground:e.neutralLighterAlt,bodyFrameBackground:e.white,bodyFrameDivider:e.neutralLight,bodyText:e.neutralPrimary,bodyTextChecked:e.black,bodySubtext:e.neutralSecondary,bodyDivider:e.neutralLight,disabledBodyText:e.neutralTertiary,disabledBodySubtext:e.neutralTertiaryAlt,disabledBorder:e.neutralTertiaryAlt,focusBorder:e.neutralSecondary,variantBorder:e.neutralLight,variantBorderHovered:e.neutralTertiary,defaultStateBackground:e.neutralLighterAlt,actionLink:e.neutralPrimary,actionLinkHovered:e.neutralDark,link:e.themePrimary,linkHovered:e.themeDarker,buttonBackground:e.white,buttonBackgroundChecked:e.neutralTertiaryAlt,buttonBackgroundHovered:e.neutralLighter,buttonBackgroundCheckedHovered:e.neutralLight,buttonBackgroundPressed:e.neutralLight,buttonBackgroundDisabled:e.neutralLighter,buttonBorder:e.neutralSecondaryAlt,buttonText:e.neutralPrimary,buttonTextHovered:e.neutralDark,buttonTextChecked:e.neutralDark,buttonTextCheckedHovered:e.black,buttonTextPressed:e.neutralDark,buttonTextDisabled:e.neutralTertiary,buttonBorderDisabled:e.neutralLighter,primaryButtonBackground:e.themePrimary,primaryButtonBackgroundHovered:e.themeDarkAlt,primaryButtonBackgroundPressed:e.themeDark,primaryButtonBackgroundDisabled:e.neutralLighter,primaryButtonBorder:"transparent",primaryButtonText:e.white,primaryButtonTextHovered:e.white,primaryButtonTextPressed:e.white,primaryButtonTextDisabled:e.neutralQuaternary,accentButtonBackground:e.accent,accentButtonText:e.white,inputBorder:e.neutralSecondary,inputBorderHovered:e.neutralPrimary,inputBackground:e.white,inputBackgroundChecked:e.themePrimary,inputBackgroundCheckedHovered:e.themeDark,inputPlaceholderBackgroundChecked:e.themeLighter,inputForegroundChecked:e.white,inputIcon:e.themePrimary,inputIconHovered:e.themeDark,inputIconDisabled:e.neutralTertiary,inputFocusBorderAlt:e.themePrimary,smallInputBorder:e.neutralSecondary,inputText:e.neutralPrimary,inputTextHovered:e.neutralDark,inputPlaceholderText:e.neutralSecondary,disabledBackground:e.neutralLighter,disabledText:e.neutralTertiary,disabledSubtext:e.neutralQuaternary,listBackground:e.white,listText:e.neutralPrimary,listItemBackgroundHovered:e.neutralLighter,listItemBackgroundChecked:e.neutralLight,listItemBackgroundCheckedHovered:e.neutralQuaternaryAlt,listHeaderBackgroundHovered:e.neutralLighter,listHeaderBackgroundPressed:e.neutralLight,menuBackground:e.white,menuDivider:e.neutralTertiaryAlt,menuIcon:e.themePrimary,menuHeader:e.themePrimary,menuItemBackgroundHovered:e.neutralLighter,menuItemBackgroundPressed:e.neutralLight,menuItemText:e.neutralPrimary,menuItemTextHovered:e.neutralDark,errorText:t?"#ff5f5f":e.redDark,warningText:t?"#ffffff":"#333333",successText:t?"#92c353":"#107C10",errorBackground:t?"rgba(232, 17, 35, .5)":"rgba(245, 135, 145, .2)",blockingBackground:t?"rgba(234, 67, 0, .5)":"rgba(250, 65, 0, .2)",warningBackground:t?"rgba(255, 251, 0, .6)":"rgba(255, 200, 10, .2)",warningHighlight:t?"#fff100":"#ffb900",successBackground:t?"rgba(186, 216, 10, .4)":"rgba(95, 210, 85, .2)",listTextColor:"",menuItemBackgroundChecked:e.neutralLight},r)}var rt={boxShadow:"none",margin:0,padding:0,boxSizing:"border-box"};function nt(e){return{selectors:{"::placeholder":e,":-ms-input-placeholder":e,"::-ms-input-placeholder":e}}}var at=a(re),it=(a(Se),{});for(var ot in ue)ue.hasOwnProperty(ot)&&(st(it,ot,"",!1,"color"),st(it,ot,"Hover",!0,"color"),st(it,ot,"Background",!1,"background"),st(it,ot,"BackgroundHover",!0,"background"),st(it,ot,"Border",!1,"borderColor"),st(it,ot,"BorderHover",!0,"borderColor"));function st(e,t,r,n,a){Object.defineProperty(e,t+r,{get:function(){var e,r=((e={})[a]=$e().palette[t],e);return Object(u.a)(n?{selectors:{":hover":r}}:r).toString()},enumerable:!0,configurable:!0})}var lt=r(58);Object(lt.a)("@uifabric/styling","7.10.4"),r.d(t,"a",(function(){return at})),r.d(t,"b",(function(){return re})),r.d(t,"c",(function(){return te})),r.d(t,"d",(function(){return he})),r.d(t,"e",(function(){return fe})),r.d(t,"i",(function(){return me})),r.d(t,"B",(function(){return Ne})),r.d(t,"v",(function(){return Ye})),r.d(t,"A",(function(){return $e})),r.d(t,"D",(function(){return Qe})),r.d(t,"s",(function(){return et})),r.d(t,"u",(function(){return Oe})),r.d(t,"t",(function(){return Fe})),r.d(t,"x",(function(){return ze})),r.d(t,"f",(function(){return Ee})),r.d(t,"h",(function(){return"@media screen and (-ms-high-contrast: black-on-white)"})),r.d(t,"g",(function(){return"@media screen and (-ms-high-contrast: white-on-black)"})),r.d(t,"m",(function(){return 480})),r.d(t,"l",(function(){return 640})),r.d(t,"o",(function(){return 1024})),r.d(t,"p",(function(){return 1366})),r.d(t,"k",(function(){return 479})),r.d(t,"j",(function(){return 639})),r.d(t,"n",(function(){return 768})),r.d(t,"z",(function(){return De})),r.d(t,"G",(function(){return rt})),r.d(t,"y",(function(){return nt})),r.d(t,"q",(function(){return Ie})),r.d(t,"w",(function(){return g})),r.d(t,"I",(function(){return f})),r.d(t,"H",(function(){return m})),r.d(t,"r",(function(){return n.a})),r.d(t,"C",(function(){return n.b})),r.d(t,"E",(function(){return n.c})),r.d(t,"F",(function(){return n.d}))},function(e,t,r){"use strict";var n=r(3),a=r.n(n),i=r(28),o=r(0),s=r(54),l=r.n(s),c=r(7),u=r.n(c);function d(e){if("string"==typeof e||!e)return e;if(n.isDate(e))return u()(e).format();if(!n.isNaN(n.toNumber(e))){var t=n.toNumber(e);return n.isInteger(t)?t.toString():t.toPrecision(4)}return n.isArray(e)?"vaector["+e.length+"]":JSON.stringify(e)}var p,h,f,m={axisColor:"#444",axisGridColor:"#eee",backgroundColor:"#fff",fontColor:"#000"},g={axisColor:"#aaa",axisGridColor:"#222",backgroundColor:"#000",fontColor:"#fff"},v={axisColor:"#000",axisGridColor:"#000",backgroundColor:"#fff",fontColor:"#000"},y={axisColor:"#fff",axisGridColor:"#fff",backgroundColor:"#000",fontColor:"#fff"},b=function(){function e(){}return e.applyTheme=function(e,t,r){var a=n.cloneDeep(e),i=n.merge(this.getTheme(t),r);return n.set(a,"layout.font.color",i.fontColor),n.set(a,"layout.paper_bgcolor",i.backgroundColor),n.set(a,"layout.plot_bgcolor",i.backgroundColor),n.set(a,"layout.xaxis.color",i.axisColor),n.set(a,"layout.yaxis.color",i.axisColor),n.set(a,"layout.xaxis.gridcolor",i.axisGridColor),n.set(a,"layout.yaxis.gridcolor",i.axisGridColor),n.set(a,"layout.yaxis.gridcolor",i.axisGridColor),a},e.getTheme=function(e){if("string"==typeof e||void 0===e)switch(e){case void 0:case"light":return m;case"dark":return g;case"white":return v;case"black":return y;default:return m}return n.defaults({axisColor:e.semanticColors.bodyText,axisGridColor:e.semanticColors.bodySubtext,backgroundColor:e.semanticColors.bodyBackground,fontColor:e.semanticColors.bodyText},m)},e}(),_=(p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),x=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},w=function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},k=(r(311),function(e){function t(t){var r=e.call(this,t)||this;return r.guid=l()(),r.isClickHandled=!1,r}return _(t,e),t.prototype.componentDidMount=function(){this.hasData()&&this.resetRenderTimer()},t.prototype.componentDidUpdate=function(e){n.isEqual(e.plotlyProps,this.props.plotlyProps)&&this.props.theme===e.theme||!this.hasData()?this.props.relayoutArg&&!n.isEqual(this.props.relayoutArg,e.relayoutArg)&&this.guid?i.relayout(this.guid,this.props.relayoutArg):this.props.animateArg&&!n.isEqual(this.props.animateArg,e.animateArg)&&this.guid&&i.animate(this.guid,this.props.animateArg.props,this.props.animateArg.animationAttributes):this.resetRenderTimer()},t.prototype.componentWillUnmount=function(){this.timer&&window.clearTimeout(this.timer)},t.prototype.render=function(){return this.hasData()?o.createElement(o.Fragment,null,o.createElement("div",{className:"GridChart",id:this.guid,"aria-hidden":!0}),this.createTableWithPlotlyData(this.props.plotlyProps.data)):o.createElement("div",{className:"centered"},this.props.localizedStrings?this.props.localizedStrings.noData:"No Data")},t.prototype.hasData=function(){return this.props.plotlyProps&&this.props.plotlyProps.data.length>0&&n.some(this.props.plotlyProps.data,(function(e){return!n.isEmpty(e.y)||!n.isEmpty(e.x)}))},t.prototype.resetRenderTimer=function(){var e=this;this.timer&&window.clearTimeout(this.timer);var t=this.props.theme?b.applyTheme(this.props.plotlyProps,this.props.theme,this.props.themeOverride):n.cloneDeep(this.props.plotlyProps);this.timer=window.setTimeout((function(){return x(e,void 0,void 0,(function(){var e;return w(this,(function(r){switch(r.label){case 0:return e=this,[4,i.react(this.guid,t.data,t.layout,t.config)];case 1:return e.plotlyRef=r.sent(),!this.isClickHandled&&this.props.onClickHandler&&(this.isClickHandled=!0,this.plotlyRef.on("plotly_click",this.props.onClickHandler)),this.setState({loading:!1}),[2]}}))}))}),0)},t.prototype.createTableWithPlotlyData=function(e){return o.createElement("table",{className:"plotly-table visible-to-only-screen-reader"},o.createElement("tbody",null,e.map((function(e,t){var r=e.x?e.x.length:0,n=e.y?e.y.length:0,a=Math.max(r,n);if(!(a>500)){for(var i=[],s=[],l=0;l<a;l++)i.push(o.createElement("td",{key:l+".x"},e.x?d(e.x[l]):"")),s.push(o.createElement("td",{key:l+".y"},e.y?d(e.y[l]):""));return[o.createElement("tr",{key:t+".x"},i),o.createElement("tr",{key:t+".y"},s)]}}))))},t}(o.Component));!function(e){e.stringifyText="string"}(h||(h={}));var M,T=((f={})[h.stringifyText]=function(e,t,r){for(var n=Math.min(r.length,e.length),a=[],i=0;i<n;i++){var o=e[i];"number"==typeof o&&(o=o.toLocaleString(void 0,{minimumFractionDigits:2})),a[i]=r[i]+": "+o}return a.join("<br>")},f),C=r(265),S=function(){function e(){}return e.buildPlotlySeries=function(t,r){var a,i={},o=t.datapointLevelAccessors?", "+Object.keys(t.datapointLevelAccessors).map((function(e){return e+": ["+t.datapointLevelAccessors[e].path.join(", ")+"]"})).join(", "):"",s=C.search(r,(t.xAccessorPrefix||"")+"[*].{x: "+t.xAccessor+", y: "+t.yAccessor+", group: "+t.groupBy+", size: "+t.sizeAccessor+o+"}");s.forEach((function(r,o){var s,l,c;if(t.groupBy&&t.groupBy.length>0){var u=r.group;if(null==u)void 0===a&&(a=e.buildDefaultSeries(t)),c=a;else{if(void 0===i[u]){var d=e.buildDefaultSeries(t);d.name=u,i[u]=d}c=i[u]}}else void 0===a&&(a=e.buildDefaultSeries(t)),c=a;var p=1,h=!1;if(Array.isArray(r.x)&&(h=!0,p=Math.max(p,r.x.length)),Array.isArray(r.y)&&(h=!0,p=Math.max(p,r.y.length)),Array.isArray(r.size)&&(h=!0,p=Math.max(p,r.size.length)),h&&(Array.isArray(r.x)||(r.x=new Array(p).fill(r.x)),Array.isArray(r.y)||(r.y=new Array(p).fill(r.y)),Array.isArray(r.size)||(r.size=new Array(p).fill(r.size)),r.x.length=p,r.y.length=p,r.size.length=p),t.xAccessor&&(Array.isArray(r.x)?(s=c.x).push.apply(s,r.x):c.x.push(r.x)),t.yAccessor&&(Array.isArray(r.y)?(l=c.y).push.apply(l,r.y):c.y.push(r.y)),t.sizeAccessor){var f=r.size*Math.pow(t.maxMarkerSize||40,2)/20;c.marker.size.push(Math.abs(f))}void 0!==t.datapointLevelAccessors&&Object.keys(t.datapointLevelAccessors).forEach((function(e){var a,i=t.datapointLevelAccessors[e],o=i.plotlyPath,s=void 0!==i.mapFunction?T[i.mapFunction](r[e],t,i.mapArgs||[]):r[e];h&&(Array.isArray(s)||(s=new Array(p).fill(s)),s.length=p),n.has(c,o)||n.set(c,o,[]),Array.isArray(s)?(a=n.get(c,o)).push.apply(a,s):n.get(c,o).push(s)}))}));var l=void 0!==a?[a]:[];return Object.keys(i).forEach((function(e){l.push(i[e])})),l},e.buildDefaultSeries=function(e){var t=n.cloneDeep(e);return e.xAccessor&&(t.x=[]),e.yAccessor&&(t.y=[]),e.sizeAccessor&&(t.marker.size=[]),void 0!==e.datapointLevelAccessors&&Object.keys(e.datapointLevelAccessors).forEach((function(r){var a=e.datapointLevelAccessors[r].plotlyPath;n.set(t,a,[])})),t},e}();!function(){function e(){}e.scatterSelection=function(e,t,r){var n=0===t.length?null:r.data.map((function(e){var r=[];return e.customdata&&e.customdata.forEach((function(e,n){-1!==t.indexOf(e)&&r.push(n)})),r}));i.restyle(e,"selectedpoints",n);var a=0===t.length?[0]:r.data.map((function(e){if(e.customdata){var r=e.customdata,n=new Array(r.length).fill(0);return r.forEach((function(e,r){-1!==t.indexOf(e)&&(n[r]=2)})),n}return[0]}));i.restyle(e,"marker.line.width",a)}}();!function(e){e.categorical="categorical",e.integer="integer",e.numeric="numeric"}(M||(M={}));var L,A=function(){function e(){}return e.buildFeatureRanges=function(e,t,r){if(void 0!==e&&void 0!==t)return t.map((function(t,n){if(t){if(r&&void 0!==r[n])return{uniqueValues:r[n],rangeType:M.categorical};var i=e.map((function(e){return e[n]}));return{uniqueValues:a.a.uniq(i),rangeType:M.categorical}}var o=e.map((function(e){return e[n]}));return{min:Math.min.apply(Math,o),max:Math.max.apply(Math,o),rangeType:o.every((function(e){return Number.isInteger(e)}))?M.integer:M.numeric}}))},e.buildIsCategorical=function(e,t,r){var n=Array.from(Array(e).keys());return r?n.map((function(e){return void 0!==r[e]})):t&&t.length>0?n.map((function(e){return!t.every((function(t){return"number"==typeof t[e]}))})):void 0},e}();!function(e){e.lines="lines",e.markers="markers",e.text="text",e.linesMarkers="lines+markers",e.textMarkers="text+markers",e.textLines="text+lines",e.textLinesMarkers="text+lines+markers",e.none="none"}(L||(L={}));var E=function(){function e(e,t){this.selectedIds=[],this.listenerCount=0,this.selectionSubs=new Map,this.hoverSubs=new Map,this.countSubs=new Map,this.propertyOfInterest=e,this.maxItems=t}return e.prototype.onSelect=function(e){void 0!==this.maxItems&&(e=e.slice(Math.max(e.length-this.maxItems,0))),this.selectedIds=e,this.selectionSubs.forEach((function(t){return t(e)}))},e.prototype.onHover=function(e){this.hoveredId=e,this.hoverSubs.forEach((function(t){return t(e)}))},e.prototype.subscribe=function(e){var t=this,r=l()();return this.selectionSubs.set(r,e.selectionCallback),e.hoverCallback&&this.hoverSubs.set(r,e.hoverCallback),e.listenerCountCallback&&this.countSubs.set(r,e.listenerCountCallback),this.listenerCount+=1,this.countSubs.forEach((function(e){return e(t.listenerCount)})),r},e.prototype.unsubscribe=function(e){this.selectionSubs.delete(e),this.hoverSubs.delete(e),this.countSubs.delete(e),this.listenerCount-=1},e}();r.d(t,"a",(function(){return k})),r.d(t,"b",(function(){return h})),r.d(t,"c",(function(){return S})),r.d(t,"d",(function(){return A})),r.d(t,"e",(function(){return L})),r.d(t,"f",(function(){return b})),r.d(t,"g",(function(){return M})),r.d(t,"h",(function(){return E}))},,function(e,t,r){"use strict";var n,a=r(8),i=r(0),o=r.n(i),s=r(1),l=r(28),c=r.n(l),u=r(54),d=r.n(u),p=r(10),h=r(14),f=r(3),m=r.n(f),g=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},y=function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.guid=d()(),t}return g(t,e),t.buildTextArray=function(e,t,r,n,a){return e.map((function(e){var i=[];return i.push(s.a.formatString(s.a.AggregateImportance.featureLabel,r[e]||"unknown feature")),i.push(s.a.formatString(s.a.AggregateImportance.importanceLabel,t[e].toLocaleString(void 0,{minimumFractionDigits:3}))),a&&a.length>e&&i.push(s.a.formatString(s.a.AggregateImportance.valueLabel,a[e])),n&&i.push(s.a.formatString(s.a.BarChart.classLabel,n)),i.join("<br>")}))},t.buildInterceptTooltip=function(e,t){var r=[];return r.push(s.a.intercept),r.push(s.a.formatString(s.a.AggregateImportance.importanceLabel,e.toLocaleString(void 0,{minimumFractionDigits:3}))),t&&r.push(s.a.formatString(s.a.BarChart.classLabel,t)),r.join("<br>")},t.prototype.render=function(){var e=this;if(this.hasData()){var t=this.buildPlotlyProps(),r=this.props.theme?p.f.applyTheme(t,this.props.theme):t;return window.setTimeout((function(){return v(e,void 0,void 0,(function(){return y(this,(function(e){switch(e.label){case 0:return[4,c.a.react(this.guid,r.data,r.layout,r.config)];case 1:return e.sent(),[2]}}))}))}),0),o.a.createElement("div",{className:"feature-importance-bar-chart",id:this.guid})}return o.a.createElement("div",{className:"centered"},s.a.BarChart.noData)},t.prototype.hasData=function(){return this.props.featureByClassMatrix.length>0},t.prototype.buildPlotlyProps=function(){var e=this,r=h.a.transpose2DArray(this.props.featureByClassMatrix),n=this.props.sortedIndexVector.slice(-1*this.props.topK).reverse(),i={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[],layout:{autosize:!0,dragmode:!1,barmode:this.props.barmode,font:{size:10},margin:{t:10,r:10,b:30},hovermode:"closest",xaxis:{automargin:!0},yaxis:{automargin:!0,title:s.a.featureImportance},showlegend:r.length>1}};r.length>0&&r.forEach((function(r,o){var s=void 0===e.props.defaultVisibleClasses||-1!==e.props.defaultVisibleClasses.indexOf(o)||"legendonly",l=n.map((function(e,t){return t})),c=n.map((function(e){return r[e]})),u=t.buildTextArray(n,r,e.props.modelMetadata.featureNames,e.props.modelMetadata.modelType===a.a.multiclass?e.props.modelMetadata.classNames[o]:void 0,e.props.additionalRowData);e.props.intercept&&(l.unshift(-1),c.unshift(e.props.intercept[o]),u.unshift(t.buildInterceptTooltip(e.props.intercept[o],e.props.modelMetadata.modelType===a.a.multiclass?e.props.modelMetadata.classNames[o]:void 0)));i.data.push({hoverinfo:"text",orientation:"v",type:"bar",visible:s,name:e.props.modelMetadata.modelType===a.a.multiclass?e.props.modelMetadata.classNames[o]:"",x:l,y:c,text:u})}));var o=n.map((function(t){return e.props.modelMetadata.featureNamesAbridged[t]})),l=n.map((function(e,t){return t}));return this.props.intercept&&(o.unshift(s.a.intercept),l.unshift(-1)),m.a.set(i,"layout.xaxis.ticktext",o),m.a.set(i,"layout.xaxis.tickvals",l),i},t}(o.a.PureComponent),_=r(375),x=r(5),w=r(374),k=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(314);var M=function(e){function t(t){var r=e.call(this,t)||this;return r.options=void 0!==r.props.enumeratedValues?r.props.enumeratedValues.map((function(e){return{text:e,key:e}})):void 0,r.state={value:r.props.defaultValue.toString()},r.onValueChanged=r.onValueChanged.bind(r),r.onComboSelected=r.onComboSelected.bind(r),r}return k(t,e),t.prototype.componentDidUpdate=function(e){this.props.defaultValue!==e.defaultValue&&this.setState({value:this.props.defaultValue.toString(),errorMessage:void 0})},t.prototype.render=function(){var e="tile";return this.state.value!==this.props.defaultValue.toString()&&void 0===this.state.errorMessage&&(e+=" edited"),void 0!==this.state.errorMessage&&(e+=" error"),o.a.createElement("div",{className:e},o.a.createElement("div",{className:"tile-label"},this.props.featureName),void 0===this.props.enumeratedValues&&o.a.createElement(_.a,{styles:x.a.textFieldStyle,ariaLabel:this.props.featureName,value:this.state.value,onChange:this.onValueChanged,errorMessage:this.state.errorMessage}),void 0!==this.props.enumeratedValues&&o.a.createElement(w.a,{text:this.state.value,allowFreeform:!0,ariaLabel:this.props.featureName,autoComplete:"on",options:this.options,onChange:this.onComboSelected,styles:x.a.defaultDropdownStyle}))},t.prototype.onValueChanged=function(e,t){var r,n=+t;(Number.isNaN(n)||this.props.rangeType===p.g.integer&&!Number.isInteger(n))&&(r=this.props.rangeType===p.g.integer?s.a.IcePlot.integerError:s.a.IcePlot.numericError),this.props.onEdit(this.props.index,n,r),this.setState({value:t,errorMessage:r})},t.prototype.onComboSelected=function(e,t,r,n){var a=void 0!==t?t.text:n;this.props.onEdit(this.props.index,a),this.setState({value:a})},t}(o.a.Component),T=r(40),C=r(383),S=r(43),L=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(317);var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.render=function(){return o.a.createElement(C.a,{className:"explanation-spinner",size:S.a.large,label:s.a.BarChart.calculatingExplanation})},t}(o.a.PureComponent),E=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(319);var D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype.render=function(){return o.a.createElement("div",{className:"centered"},o.a.createElement("div",{className:"primary-message"},s.a.BarChart.noData),this.renderExplanationStrings())},t.prototype.renderExplanationStrings=function(){if(void 0!==this.props.explanationStrings&&0!==this.props.explanationStrings.length){var e=this.props.explanationStrings.map((function(e,t){return o.a.createElement("span",{key:t},e.displayText)}));return o.a.createElement("div",{className:"secondary-message"},e)}},t}(o.a.PureComponent),I=function(){function e(){}return e.setColorProperty=function(t,r,n,a){e.clearColorProperties(t),r.data&&r.data.isCategorical?(void 0!==r.data.sortProperty&&(t.data[0].xAccessorPrefix="sort_by(@, &"+r.data.sortProperty+")"),t.data[0].groupBy=[r.key.toString()],m.a.set(t,"layout.showlegend",!0)):m.a.isEqual([r.key],m.a.get(t.data[0],"datapointLevelAccessors.color.path"))||(m.a.set(t.data[0],"datapointLevelAccessors.color",{path:[r.key],plotlyPath:"marker.color"}),m.a.set(t.data[0],"marker",{colorbar:{title:{side:"right",text:a}},colorscale:"Bluered"}))},e.clearColorProperties=function(e){e.data[0]=m.a.omit(e.data[0],["datapointLevelAccessors.color","marker.colorbar"]),e.data[0].groupBy=void 0,m.a.set(e,"layout.showlegend",!1)},e}(),P=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(321);var O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),t.prototype.render=function(){return o.a.createElement("div",{className:"prediction-area"},o.a.createElement("div",{className:"prediction-label"},this.makePredictionLabel()),void 0!==this.props.predictedProbabilities&&o.a.createElement("div",{className:"probability-label"},this.makeProbabilityLabel()))},t.prototype.makePredictionLabel=function(){return this.props.modelType===a.a.regression?s.a.formatString(s.a.PredictionLabel.predictedValueLabel,this.props.prediction.toLocaleString(void 0,{minimumFractionDigits:3})):s.a.formatString(s.a.PredictionLabel.predictedClassLabel,this.props.classNames[this.props.prediction])},t.prototype.makeProbabilityLabel=function(){var e=this.props.predictedProbabilities[this.props.prediction];return s.a.formatString(s.a.IcePlot.probabilityLabel,e.toLocaleString(void 0,{minimumFractionDigits:3}))},t}(o.a.Component);r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return M})),r.d(t,"c",(function(){return T.a})),r.d(t,"d",(function(){return A})),r.d(t,"e",(function(){return D})),r.d(t,"f",(function(){return I})),r.d(t,"g",(function(){return O}))},function(e,t,r){"use strict";var n,a;r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return a})),function(e){e[e.top=1]="top",e[e.bottom=-1]="bottom",e[e.left=2]="left",e[e.right=-2]="right"}(n||(n={})),function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.start=2]="start",e[e.end=3]="end"}(a||(a={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(){function e(){}return e.getSortIndices=function(e){var t=e.map((function(e,t){return[e,t]}));return t.sort((function(e,t){return e[0]-t[0]})),t.map((function(e){return e[1]}))},e.buildSortedVector=function(t,r){return void 0===r?e.getSortIndices(t.map((function(e){return e.reduce((function(e,t){return e+Math.abs(t)}),0)}))):e.getSortIndices(t.map((function(e){return Math.abs(e[r])})))},e.transpose2DArray=function(e){return e[0].map((function(t,r){return e.map((function(e){return e[r]}))}))},e.absoluteAverageTensor=function(e){var t=e.length,r=e[0].length,n=e[0][0].length;return e.reduce((function(e,t){return e.map((function(e,r){return e.map((function(e,n){return e+Math.abs(t[r][n])}))}))}),Array(r).fill(0).map((function(e){return Array(n).fill(0)}))).map((function(e){return e.map((function(e){return e/t}))}))},e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n={topLeftEdge:0,topCenter:1,topRightEdge:2,topAutoEdge:3,bottomLeftEdge:4,bottomCenter:5,bottomRightEdge:6,bottomAutoEdge:7,leftTopEdge:8,leftCenter:9,leftBottomEdge:10,rightTopEdge:11,rightCenter:12,rightBottomEdge:13}},function(e,t,r){"use strict";var n,a,i;r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return i})),function(e){e[e.center=0]="center",e[e.contain=1]="contain",e[e.cover=2]="cover",e[e.none=3]="none",e[e.centerCover=4]="centerCover",e[e.centerContain=5]="centerContain"}(n||(n={})),function(e){e[e.landscape=0]="landscape",e[e.portrait=1]="portrait"}(a||(a={})),function(e){e[e.notLoaded=0]="notLoaded",e[e.loaded=1]="loaded",e[e.error=2]="error",e[e.errorLoaded=3]="errorLoaded"}(i||(i={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(76),a=void 0;try{a=window}catch(e){}function i(e){if(!n.a&&void 0!==a){var t=e;return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:a}}},function(e,t,r){"use strict";function n(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}t.a=function(e,t){var r;void 0===t&&(t=n);var a,i=[],o=!1;return function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return o&&r===this&&t(n,i)?a:(a=e.apply(this,n),o=!0,r=this,i=n,a)}}},function(e,t,r){"use strict";var n=r(69),a=r(70),i=r(50),o=r(240),s=r(58);Object(s.a)("@uifabric/merge-styles","7.8.5"),r.d(t,"d",(function(){return n.a})),r.d(t,"c",(function(){return a.b})),r.d(t,"a",(function(){return i.a})),r.d(t,"b",(function(){return o.a}))},function(e,t,r){"use strict";var n,a=r(3),i=r.n(a),o=r(18),s=r(386),l=r(275),c=r(371),u=r(374),d=r(384),p=r(0),h=r.n(p),f=r(10),m=r(1),g=r(5),v=r(8),y=r(14),b=r(12),_=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});r(323);var x,w=function(e){function t(t){var r=e.call(this,t)||this;return r._iconId="icon-id",r.sortOptions=r.buildSortOptions(),r.onSortSelect=r.onSortSelect.bind(r),r.setTopK=r.setTopK.bind(r),r.setChart=r.setChart.bind(r),r.onDismiss=r.onDismiss.bind(r),r.onIconClick=r.onIconClick.bind(r),r.state={selectedSorting:b.c.absoluteGlobal,isCalloutVisible:!1},r}return _(t,e),t.prototype.render=function(){var e=this.props.dashboardContext.explanationContext,t=e.globalExplanation;if(void 0!==t&&(void 0!==t.flattenedFeatureImportances||void 0!==t.perClassFeatureImportances)){var r=this.getFeatureByClassMatrix(),n=this.getSortVector(r);return h.a.createElement("div",{className:"feature-bar-explanation-chart"},h.a.createElement("div",{className:"top-controls"},this.props.chartTypeOptions&&this.props.chartTypeOptions.length>1&&h.a.createElement(u.a,{label:m.a.FeatureImportanceWrapper.chartType,className:"pathSelector",selectedKey:this.props.config.displayMode,onChange:this.setChart,options:this.props.chartTypeOptions,ariaLabel:"chart type picker",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle}),h.a.createElement("div",{className:"slider-control"},h.a.createElement("div",{className:"slider-label"},h.a.createElement("span",{className:"label-text"},m.a.AggregateImportance.topKFeatures),h.a.createElement(s.a,{id:this._iconId,iconProps:{iconName:"Info"},title:m.a.AggregateImportance.topKInfo,onClick:this.onIconClick,styles:{root:{marginBottom:-3,color:"rgb(0, 120, 212)"}}})),h.a.createElement(d.a,{className:"feature-slider",max:Math.min(30,e.modelMetadata.featureNames.length),min:1,step:1,value:this.props.config.topK,onChange:this.setTopK,showValue:!0,ariaLabel:m.a.AggregateImportance.topKFeatures})),this.sortOptions.length>0&&h.a.createElement(u.a,{className:"pathSelector",label:m.a.BarChart.sortBy,selectedKey:this.state.selectedSorting,onChange:this.onSortSelect,options:this.sortOptions,ariaLabel:"sort selector",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle})),this.state.isCalloutVisible&&h.a.createElement(c.a,{target:"#"+this._iconId,setInitialFocus:!0,onDismiss:this.onDismiss,role:"alertdialog"},h.a.createElement("div",{className:"callout-info"},h.a.createElement("div",{className:"class-weight-info"},h.a.createElement("span",null,m.a.CrossClass.overviewInfo),h.a.createElement("ul",null,h.a.createElement("li",null,m.a.CrossClass.absoluteValInfo),h.a.createElement("li",null,m.a.CrossClass.predictedClassInfo),h.a.createElement("li",null,m.a.CrossClass.enumeratedClassInfo))),h.a.createElement(l.a,{onClick:this.onDismiss},m.a.CrossClass.close))),h.a.createElement(b.a,{theme:this.props.theme,intercept:this.props.dashboardContext.explanationContext.globalExplanation.intercepts,featureByClassMatrix:r,sortedIndexVector:n,topK:this.props.config.topK,modelMetadata:e.modelMetadata,barmode:"stack"}))}if(e.localExplanation&&void 0!==e.localExplanation.percentComplete)return h.a.createElement(b.d,null);var a=this.props.messages?this.props.messages.LocalOrGlobalAndTestReq:void 0;return h.a.createElement(b.e,{explanationStrings:a})},t.prototype.getSortVector=function(e){return this.state.selectedSorting===b.c.absoluteGlobal?y.a.buildSortedVector(e):y.a.buildSortedVector(e,this.state.selectedSorting)},t.prototype.getFeatureByClassMatrix=function(){return this.props.dashboardContext.explanationContext.globalExplanation.perClassFeatureImportances||this.props.dashboardContext.explanationContext.globalExplanation.flattenedFeatureImportances.map((function(e){return[e]}))},t.prototype.buildSortOptions=function(){if(this.props.dashboardContext.explanationContext.modelMetadata.modelType!==v.a.multiclass||void 0===this.props.dashboardContext.explanationContext.globalExplanation||void 0===this.props.dashboardContext.explanationContext.globalExplanation.perClassFeatureImportances)return[];var e=[{key:b.c.absoluteGlobal,text:m.a.BarChart.absoluteGlobal}];return e.push.apply(e,this.props.dashboardContext.explanationContext.modelMetadata.classNames.map((function(e,t){return{key:t,text:e}}))),e},t.prototype.setTopK=function(e){var t=i.a.cloneDeep(this.props.config);t.topK=e,this.props.onChange(t,this.props.config.id)},t.prototype.setChart=function(e,t){var r=i.a.cloneDeep(this.props.config);r.displayMode=t.key,this.props.onChange(r,this.props.config.id)},t.prototype.onSortSelect=function(e,t){this.setState({selectedSorting:t.key})},t.prototype.onIconClick=function(){this.setState({isCalloutVisible:!this.state.isCalloutVisible})},t.prototype.onDismiss=function(){this.setState({isCalloutVisible:!1})},t}(h.a.PureComponent),k=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(325),function(e){e.none="none",e.predictedY="predictedY",e.trueY="trueY"}(x||(x={}));var M,T=function(e){function t(t){var r=e.call(this,t)||this;return r._crossClassIconId="cross-class-icon-id",r._globalSortIconId="global-sort-icon-id",r.sortOptions=r.buildSortOptions(),r.groupByOptions=r.buildGroupOptions(),r.onSortSelect=r.onSortSelect.bind(r),r.onGroupSelect=r.onGroupSelect.bind(r),r.setTopK=r.setTopK.bind(r),r.setChart=r.setChart.bind(r),r.onDismiss=r.onDismiss.bind(r),r.showCrossClassInfo=r.showCrossClassInfo.bind(r),r.showGlobalSortInfo=r.showGlobalSortInfo.bind(r),r.state={selectedSorting:b.c.absoluteGlobal,groupBy:t.dashboardContext.explanationContext.modelMetadata.modelType===v.a.regression||void 0===t.dashboardContext.explanationContext.testDataset.predictedY?x.none:x.predictedY},r}return k(t,e),t.prototype.render=function(){if(void 0!==this.props.dashboardContext.explanationContext.testDataset&&void 0!==this.props.dashboardContext.explanationContext.localExplanation&&void 0!==this.props.dashboardContext.explanationContext.localExplanation.values){var e=this.getSortVector().slice(-1*t.maxFeatures).reverse(),r=this.props.config.displayMode===M.violin?t.buildViolinPlotlyProps(this.props.dashboardContext.explanationContext,e,this.state.groupBy):t.buildBoxPlotlyProps(this.props.dashboardContext.explanationContext,e,this.state.groupBy),n=this.props.dashboardContext.weightContext,a={"xaxis.range":[-.5,this.props.config.topK-.5]};return i.a.set(r,"layout.xaxis.range",[-.5,this.props.config.topK-.5]),h.a.createElement("div",{className:"aggregate-chart"},h.a.createElement("div",{className:"top-controls"},h.a.createElement(u.a,{label:m.a.FeatureImportanceWrapper.chartType,className:"path-selector",selectedKey:this.props.config.displayMode,onChange:this.setChart,options:this.props.chartTypeOptions,ariaLabel:"chart type picker",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle}),this.props.dashboardContext.explanationContext.modelMetadata.modelType!==v.a.regression&&this.groupByOptions.length>1&&h.a.createElement(u.a,{label:m.a.Violin.groupBy,className:"path-selector",selectedKey:this.state.groupBy,onChange:this.onGroupSelect,options:this.groupByOptions,ariaLabel:"chart type picker",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle}),h.a.createElement("div",{className:"slider-control"},h.a.createElement("div",{className:"slider-label"},h.a.createElement("span",{className:"label-text"},m.a.AggregateImportance.topKFeatures),h.a.createElement(s.a,{id:this._globalSortIconId,iconProps:{iconName:"Info"},title:m.a.CrossClass.info,ariaLabel:"Info",onClick:this.showGlobalSortInfo,styles:{root:{marginBottom:-3,color:"rgb(0, 120, 212)"}}})),h.a.createElement(d.a,{className:"feature-slider",max:Math.min(t.maxFeatures,this.props.dashboardContext.explanationContext.modelMetadata.featureNames.length),min:1,step:1,value:this.props.config.topK,onChange:this.setTopK,showValue:!0})),this.props.dashboardContext.explanationContext.modelMetadata.modelType===v.a.multiclass&&h.a.createElement("div",{className:"selector"},h.a.createElement("div",{className:"selector-label"},h.a.createElement("span",null,m.a.CrossClass.label),h.a.createElement(s.a,{id:this._crossClassIconId,iconProps:{iconName:"Info"},title:m.a.CrossClass.info,ariaLabel:"Info",onClick:this.showCrossClassInfo,styles:{root:{marginBottom:-3,color:"rgb(0, 120, 212)"}}})),h.a.createElement(u.a,{className:"pathSelector",selectedKey:n.selectedKey,onChange:n.onSelection,options:n.options,ariaLabel:"Cross-class weighting selector",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle}))),this.state.calloutContent&&h.a.createElement(c.a,{target:"#"+this.state.calloutId,setInitialFocus:!0,onDismiss:this.onDismiss,role:"alertdialog"},h.a.createElement("div",{className:"callout-info"},this.state.calloutContent,h.a.createElement(l.a,{onClick:this.onDismiss},m.a.CrossClass.close))),h.a.createElement(f.a,{plotlyProps:r,theme:this.props.theme,relayoutArg:a}))}if(this.props.dashboardContext.explanationContext.localExplanation&&void 0!==this.props.dashboardContext.explanationContext.localExplanation.percentComplete)return h.a.createElement(b.d,null);var o=this.props.messages?this.props.messages.LocalExpAndTestReq:void 0;return h.a.createElement(b.e,{explanationStrings:o})},t.prototype.getSortVector=function(){var e=this;if(this.state.selectedSorting===b.c.absoluteGlobal)return y.a.buildSortedVector(this.props.dashboardContext.explanationContext.globalExplanation.perClassFeatureImportances);if(this.state.groupBy===x.none)return y.a.buildSortedVector(this.props.dashboardContext.explanationContext.localExplanation.flattenedValues);var r=t.getClassesArray(this.props.dashboardContext.explanationContext,this.state.groupBy),n=this.props.dashboardContext.explanationContext.localExplanation.flattenedValues.filter((function(t,n){r[n],e.state.selectedSorting})).reduce((function(e,t){return e.map((function(e,r){return e+t[r]}))}),new Array(this.props.dashboardContext.explanationContext.modelMetadata.featureNames.length).fill(0));return y.a.getSortIndices(n)},t.prototype.buildSortOptions=function(){if(this.props.dashboardContext.explanationContext.modelMetadata.modelType===v.a.regression)return[];var e=[{key:b.c.absoluteGlobal,text:m.a.BarChart.absoluteGlobal}];return e.push.apply(e,this.props.dashboardContext.explanationContext.modelMetadata.classNames.map((function(e,t){return{key:t,text:e}}))),e},t.prototype.buildGroupOptions=function(){if(this.props.dashboardContext.explanationContext.modelMetadata.modelType===v.a.regression)return[];var e=[{key:x.none,text:m.a.Violin.groupNone}];return this.props.dashboardContext.explanationContext.testDataset&&void 0!==this.props.dashboardContext.explanationContext.testDataset.predictedY&&e.push({key:x.predictedY,text:m.a.Violin.groupPredicted}),this.props.dashboardContext.explanationContext.testDataset&&void 0!==this.props.dashboardContext.explanationContext.testDataset.trueY&&e.push({key:x.trueY,text:m.a.Violin.groupTrue}),e},t.prototype.setChart=function(e,t){var r=i.a.cloneDeep(this.props.config);r.displayMode=t.key,this.props.onChange(r,this.props.config.id)},t.prototype.setTopK=function(e){var t=i.a.cloneDeep(this.props.config);t.topK=e,this.props.onChange(t,this.props.config.id)},t.prototype.showCrossClassInfo=function(){if(this.state.calloutContent)this.onDismiss();else{var e=h.a.createElement("div",{className:"class-weight-info"},h.a.createElement("span",null,m.a.CrossClass.overviewInfo),h.a.createElement("ul",null,h.a.createElement("li",null,m.a.CrossClass.absoluteValInfo),h.a.createElement("li",null,m.a.CrossClass.predictedClassInfo),h.a.createElement("li",null,m.a.CrossClass.enumeratedClassInfo)));this.setState({calloutContent:e,calloutId:this._crossClassIconId})}},t.prototype.showGlobalSortInfo=function(){if(this.state.calloutContent)this.onDismiss();else{var e=h.a.createElement("div",{className:"class-weight-info"},h.a.createElement("span",null,m.a.FeatureImportanceWrapper.globalImportanceExplanation),this.props.dashboardContext.explanationContext.modelMetadata.modelType===v.a.multiclass&&h.a.createElement("span",null,m.a.FeatureImportanceWrapper.multiclassImportanceAddendum));this.setState({calloutContent:e,calloutId:this._globalSortIconId})}},t.prototype.onDismiss=function(){this.setState({calloutContent:void 0,calloutId:void 0})},t.prototype.onSortSelect=function(e,t){this.setState({selectedSorting:t.key})},t.prototype.onGroupSelect=function(e,t){this.setState({groupBy:t.key})},t.maxFeatures=30,t.maxDefaultSeries=3,t.buildBoxPlotlyProps=o.a((function(e,r,n){var a=i.a.cloneDeep(t.boxPlotlyProps),o=t.getClassesArray(e,n),s=e.localExplanation.flattenedValues.map((function(t,n){return{x:r.map((function(t){return e.modelMetadata.featureNames[t]})),y:r.map((function(e){return t[e]})),classIndex:o[n],class:e.modelMetadata.classNames[o[n]]}})),l=f.c.buildPlotlySeries(a.data[0],s);return 1===l.length&&(a.layout.showlegend=!1),a.data=l,a}),i.a.isEqual),t.buildViolinPlotlyProps=o.a((function(e,r,n){var a=i.a.cloneDeep(t.violinPlotlyProps),o=t.getClassesArray(e,n),s=y.a.transpose2DArray(e.localExplanation.flattenedValues),l=r.map((function(r){var n=i.a.cloneDeep(a.data[0]);n.scalegroup=r.toString(),0!==r&&(n.showlegend=!1);var l=s[r].map((function(t,r){return{y:t,class:e.modelMetadata.classNames[o[r]]}}));n.x0=e.modelMetadata.featureNames[r],n.alignmentgroup=r;var c=f.c.buildPlotlySeries(n,l);return c.forEach((function(n){var a=n.name,i=e.modelMetadata.classNames.indexOf(a);-1===i&&(i=0),n.legendgroup=a,n.alignmentgroup=r,n.offsetgroup=a,n.line={color:g.a.plotlyColorPalette[i%g.a.plotlyColorPalette.length]},i>=t.maxDefaultSeries&&(n.visible="legendonly")})),c})).reduce((function(e,t){return e.push.apply(e,t),e}),[]);return l.sort((function(t,r){return e.modelMetadata.classNames.indexOf(t.name)-e.modelMetadata.classNames.indexOf(r.name)})),a.data=l,l.length===r.length&&(a.layout.showlegend=!1),a}),i.a.isEqual),t.getClassesArray=o.a((function(e,t){switch(t){case x.predictedY:return e.testDataset.predictedY;case x.trueY:return e.testDataset.trueY;case x.none:default:return new Array(e.localExplanation.values.length).fill(0)}}),i.a.isEqual),t.violinPlotlyProps={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[{type:"violin",yAccessor:"y",hoveron:"points+kde",groupBy:"class",meanline:{visible:!0},box:{visible:!0},scalemode:"count",spanmode:"hard",span:[0]}],layout:{dragmode:!1,autosize:!0,font:{size:10},hovermode:"closest",margin:{t:10,b:30},legend:{tracegroupgap:0},showlegend:!0,violinmode:"group",violingap:40,violingroupgap:0,xaxis:{automargin:!0},yaxis:{automargin:!0,title:m.a.featureImportance}}},t.boxPlotlyProps={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[{type:"box",xAccessor:"x",xAccessorPrefix:"sort_by(@, &classIndex)",yAccessor:"y",groupBy:"class",boxpoints:"Outliers",boxmean:"sd"}],layout:{dragmode:!1,autosize:!0,font:{size:10},hovermode:"closest",margin:{t:10,b:30},showlegend:!0,boxmode:"group",xaxis:{automargin:!0},yaxis:{automargin:!0,title:m.a.featureImportance}}},t}(h.a.PureComponent),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),S=function(){return(S=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};!function(e){e.bar="bar",e.beehive="beehive",e.violin="violin",e.box="box"}(M||(M={}));var L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.render=function(){var e=void 0!==this.props.dashboardContext.explanationContext.localExplanation?[{text:m.a.FeatureImportanceWrapper.boxText,key:M.box},{text:m.a.FeatureImportanceWrapper.beehiveText,key:M.beehive},{text:m.a.FeatureImportanceWrapper.violinText,key:M.violin}]:[];switch(this.props.config.displayMode){case M.bar:return h.a.createElement(w,S({},this.props,{chartTypeOptions:e}));case M.beehive:return h.a.createElement(F,S({},this.props,{chartTypeOptions:e}));case M.violin:case M.box:return h.a.createElement(T,S({},this.props,{chartTypeOptions:e}))}},t}(h.a.PureComponent),A=r(360),E=function(){function e(){}return e.defaultDataExpPlotlyProps=function(t){var r=0,n=Number.MIN_SAFE_INTEGER;t.globalExplanation&&t.globalExplanation.perClassFeatureImportances&&t.globalExplanation.perClassFeatureImportances.map((function(e){return e.reduce((function(e,t){return e+t}))}),0).forEach((function(e,t){e>=n&&(r=t,n=e)})),t.globalExplanation&&t.globalExplanation.flattenedFeatureImportances&&t.globalExplanation.flattenedFeatureImportances.forEach((function(e,t){e>=n&&(r=t,n=e)}));var a=i.a.cloneDeep(e.baseScatterProperties),o=void 0!==t.testDataset.predictedY,s="TrainingData["+r+"]",l=o?"PredictedY":"Index",c={key:l,text:o?m.a.ExplanationScatter.predictedY:m.a.ExplanationScatter.index,data:{isCategorical:o&&t.modelMetadata.modelType!==v.a.regression,sortProperty:o&&t.modelMetadata.modelType!==v.a.regression?"PredictedYClassIndex":void 0}},u=t.modelMetadata,d=e.formatItemTextForAxis(c,u);return b.f.setColorProperty(a,c,u,d),a.data[0].yAccessor=s,a.data[0].xAccessor="Index",a.data[0].datapointLevelAccessors.text.path=["Index",s,l],a.data[0].datapointLevelAccessors.text.mapArgs=[m.a.ExplanationScatter.index,u.featureNames[r],m.a.ExplanationScatter.predictedY],i.a.set(a,"layout.xaxis.title.text",m.a.ExplanationScatter.index),i.a.set(a,"layout.yaxis.title.text",u.featureNames[r]),a},e.defaultExplanationPlotlyProps=function(t){var r=0,n=0,a=Number.MIN_SAFE_INTEGER;t.globalExplanation&&t.globalExplanation.flattenedFeatureImportances&&t.globalExplanation.flattenedFeatureImportances.forEach((function(e,t){e>=a&&(n=r,r=t,a=e)}));var o=i.a.cloneDeep(e.baseScatterProperties),s="LocalExplanation["+r+"]",l="TrainingData["+r+"]",c="TrainingData["+n+"]",u={key:c,text:t.modelMetadata.featureNames[n],data:{isCategorical:t.modelMetadata.featureIsCategorical[n]}},d=t.modelMetadata,p=e.formatItemTextForAxis(u,d);b.f.setColorProperty(o,u,d,p),o.data[0].xAccessor=l,o.data[0].yAccessor=s,o.data[0].datapointLevelAccessors.text.path=[l,s,c],o.data[0].datapointLevelAccessors.text.mapArgs=[m.a.formatString(m.a.ExplanationScatter.dataLabel,d.featureNames[r]),m.a.formatString(m.a.ExplanationScatter.importanceLabel,d.featureNames[r]),m.a.formatString(m.a.ExplanationScatter.dataLabel,d.featureNames[n])];var h=d.modelType===v.a.binary?m.a.formatString(m.a.ExplanationScatter.importanceLabel,d.featureNames[r])+" : "+d.classNames[0]:m.a.formatString(m.a.ExplanationScatter.importanceLabel,d.featureNames[r]);return i.a.set(o,"layout.yaxis.title.text",h),i.a.set(o,"layout.xaxis.title.text",m.a.formatString(m.a.ExplanationScatter.dataLabel,d.featureNames[r])),o},e.updateNewXAccessor=function(t,r,n,a){n.key!==r.data[0].xAccessor&&(r.data[0].xAccessor=n.key.toString(),e.updateTooltipArgs(r,n.key.toString(),n.text,0),i.a.set(r,"layout.xaxis.title.text",e.formatItemTextForAxis(n,t.dashboardContext.explanationContext.modelMetadata)),t.onChange(r,a))},e.updateNewYAccessor=function(t,r,n,a){n.key!==r.data[0].yAccessor&&(r.data[0].yAccessor=n.key.toString(),e.updateTooltipArgs(r,n.key.toString(),n.text,1),i.a.set(r,"layout.yaxis.title.text",e.formatItemTextForAxis(n,t.dashboardContext.explanationContext.modelMetadata)),t.onChange(r,a))},e.updateColorAccessor=function(t,r,n,a){var i=e.formatItemTextForAxis(n,t.dashboardContext.explanationContext.modelMetadata);b.f.setColorProperty(r,n,t.dashboardContext.explanationContext.modelMetadata,i),e.updateTooltipArgs(r,n.key.toString(),n.text,2),t.onChange(r,a)},e.getselectedColorOption=function(e,t){var r=t.find((function(t){return i.a.isEqual([t.key],i.a.get(e.data[0],"datapointLevelAccessors.color.path"))}));return void 0!==r?r.key.toString():void 0===e.data[0].groupBy||e.data[0].groupBy.length<1?void 0:(r=t.find((function(t){return t.key===e.data[0].groupBy[0]})))?r.key.toString():void 0},e.updatePropsForSelections=function(e,t){if(void 0===t)return e.data.forEach((function(e){i.a.set(e,"marker.line.width",[0]),i.a.set(e,"selectedpoints",null)})),i.a.cloneDeep(e);var r=void 0!==t?t.toString():void 0;return e.data.forEach((function(e){var t=[],n=[0];if(e.customdata){var a=e.customdata;n=new Array(a.length).fill(0),a.forEach((function(e,a){r===e&&(t.push(a),n[a]=2)}))}e.selectedpoints=t,i.a.set(e,"marker.line.width",n)})),i.a.cloneDeep(e)},e.updateTooltipArgs=function(e,t,r,n){e.data[0].datapointLevelAccessors.text.mapArgs[n]=r,e.data[0].datapointLevelAccessors.text.path[n]=t},e.formatItemTextForAxis=function(e,t){if(t.modelType===v.a.binary&&e.data.isFeatureImportance){var r=t.classNames[0];return e.text+"<br> "+m.a.ExplanationScatter.class+" : "+r}return e.text},e.baseScatterProperties={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[{datapointLevelAccessors:{customdata:{path:["Index"],plotlyPath:"customdata"},text:{mapFunction:f.b.stringifyText,path:[],plotlyPath:"text"}},hoverinfo:"text",mode:f.e.markers,type:"scattergl"}],layout:{dragmode:!1,autosize:!0,font:{size:10},margin:{t:10},hovermode:"closest",showlegend:!1,yaxis:{automargin:!0}}},e.populatePlotlyProps=o.a((function(e,t){var r=i.a.cloneDeep(t);return r.data=r.data.map((function(t){return f.c.buildPlotlySeries(t,e)})).reduce((function(e,t){return e.push.apply(e,t),e}),[]),r}),i.a.isEqual),e.buildOptions=o.a((function(e,t){var r=[];return t&&(r.push({key:"Header0",text:m.a.featureImportance,itemType:A.a.Header}),e.modelMetadata.featureNames.forEach((function(e,t){r.push({key:"LocalExplanation["+t+"]",text:m.a.formatString(m.a.ExplanationScatter.importanceLabel,e),data:{isCategorical:!1,isFeatureImportance:!0}})}))),r.push({key:"divider1",text:"-",itemType:A.a.Divider}),r.push({key:"Header1",text:m.a.ExplanationScatter.dataGroupLabel,itemType:A.a.Header}),e.modelMetadata.featureNames.forEach((function(n,a){r.push({key:"TrainingData["+a+"]",text:t?m.a.formatString(m.a.ExplanationScatter.dataLabel,n):n,data:{isCategorical:e.modelMetadata.featureIsCategorical[a]}})})),r.push({key:"Index",text:m.a.ExplanationScatter.index,data:{isCategorical:!1}}),r.push({key:"divider2",text:"-",itemType:A.a.Divider}),r.push({key:"Header2",text:m.a.ExplanationScatter.output,itemType:A.a.Header}),e.testDataset.predictedY&&r.push({key:"PredictedY",text:m.a.ExplanationScatter.predictedY,data:{isCategorical:e.modelMetadata.modelType!==v.a.regression,sortProperty:e.modelMetadata.modelType!==v.a.regression?"PredictedYClassIndex":void 0}}),e.testDataset.probabilityY&&e.testDataset.probabilityY[0].forEach((function(t,n){var a=e.modelMetadata.classNames[n];a||(a="class "+n),r.push({key:"ProbabilityY["+n+"]",text:m.a.formatString(m.a.ExplanationScatter.probabilityLabel,a),data:{isCategorical:!1}})})),e.testDataset.trueY&&r.push({key:"TrueY",text:m.a.ExplanationScatter.trueY,data:{isCategorical:e.modelMetadata.modelType!==v.a.regression,sortProperty:e.modelMetadata.modelType!==v.a.regression?"TrueYClassIndex":void 0}}),r})),e.projectData=o.a((function(e){return e.testDataset.dataset.map((function(t,r){var n={TrainingData:t,Index:r.toString()};if(e.localExplanation&&e.localExplanation.flattenedValues&&(n.LocalExplanation=e.localExplanation.flattenedValues[r]),e.testDataset.probabilityY&&(n.ProbabilityY=e.testDataset.probabilityY[r]),e.testDataset.predictedY){var a=e.testDataset.predictedY[r];e.modelMetadata.modelType===v.a.regression?n.PredictedY=a:(n.PredictedYClassIndex=a,n.PredictedY=e.modelMetadata.classNames[a])}if(e.testDataset.trueY){var i=e.testDataset.trueY[r];e.modelMetadata.modelType===v.a.regression?n.TrueY=i:(n.TrueY=e.modelMetadata.classNames[i],n.TrueYClassIndex=i)}return n}))}),i.a.isEqual),e}(),D=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(242);var I=function(e){function t(t){var r=e.call(this,t)||this;return r.onXSelected=r.onXSelected.bind(r),r.onYSelected=r.onYSelected.bind(r),r.onColorSelected=r.onColorSelected.bind(r),r.onDismiss=r.onDismiss.bind(r),r.handleClick=r.handleClick.bind(r),r}return D(t,e),t.prototype.render=function(){if(this.props.dashboardContext.explanationContext.testDataset){var e=E.projectData(this.props.dashboardContext.explanationContext);this.plotlyProps=void 0!==this.props.plotlyProps?i.a.cloneDeep(this.props.plotlyProps):E.defaultDataExpPlotlyProps(this.props.dashboardContext.explanationContext);var t=E.buildOptions(this.props.dashboardContext.explanationContext,!1),r=E.getselectedColorOption(this.plotlyProps,t),n=E.populatePlotlyProps(e,i.a.cloneDeep(this.plotlyProps));return n=E.updatePropsForSelections(n,this.props.selectedRow),h.a.createElement("div",{className:"explanation-chart"},h.a.createElement("div",{className:"top-controls"},h.a.createElement("div",{className:"path-selector x-value"},h.a.createElement(u.a,{options:t,onChange:this.onXSelected,label:m.a.ExplanationScatter.xValue,ariaLabel:"x picker",selectedKey:this.plotlyProps.data[0].xAccessor,useComboBoxAsMenuWidth:!0,styles:g.a.defaultDropdownStyle})),h.a.createElement("div",{className:"path-selector"},h.a.createElement(u.a,{options:t,onChange:this.onColorSelected,label:m.a.ExplanationScatter.colorValue,ariaLabel:"color picker",selectedKey:r,useComboBoxAsMenuWidth:!0,styles:g.a.defaultDropdownStyle}))),h.a.createElement("div",{className:"top-controls"},h.a.createElement("div",{className:"path-selector y-value"},h.a.createElement(u.a,{options:t,onChange:this.onYSelected,label:m.a.ExplanationScatter.yValue,ariaLabel:"y picker",selectedKey:this.plotlyProps.data[0].yAccessor,useComboBoxAsMenuWidth:!0,styles:g.a.defaultDropdownStyle}))),h.a.createElement(f.a,{plotlyProps:n,theme:this.props.theme,onClickHandler:this.handleClick}))}var a=this.props.messages?this.props.messages.TestReq:void 0;return h.a.createElement(b.e,{explanationStrings:a})},t.prototype.handleClick=function(e){var t=e.points[0].customdata,r=this.props.selectionContext.selectedIds.slice(),n=r.indexOf(t);-1!==n?r.splice(n,1):r.push(t),this.props.selectionContext.onSelect(r)},t.prototype.onXSelected=function(e,t){E.updateNewXAccessor(this.props,this.plotlyProps,t,"data_scatter_id")},t.prototype.onYSelected=function(e,t){E.updateNewYAccessor(this.props,this.plotlyProps,t,"data_scatter_id")},t.prototype.onColorSelected=function(e,t){E.updateColorAccessor(this.props,this.plotlyProps,t,"data_scatter_id")},t.prototype.onDismiss=function(){this.setState({isCalloutVisible:!1})},t}(h.a.PureComponent),P=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(242);var O=function(e){function t(t){var r=e.call(this,t)||this;return r.iconId="data-exploration-help-icon1",r.state={isCalloutVisible:!1},r.onXSelected=r.onXSelected.bind(r),r.onYSelected=r.onYSelected.bind(r),r.onColorSelected=r.onColorSelected.bind(r),r.onDismiss=r.onDismiss.bind(r),r.onIconClick=r.onIconClick.bind(r),r.handleClick=r.handleClick.bind(r),r}return P(t,e),t.prototype.render=function(){if(this.props.dashboardContext.explanationContext.testDataset&&this.props.dashboardContext.explanationContext.localExplanation&&this.props.dashboardContext.explanationContext.localExplanation.values){var e=E.projectData(this.props.dashboardContext.explanationContext);this.plotlyProps=void 0!==this.props.plotlyProps?i.a.cloneDeep(this.props.plotlyProps):E.defaultExplanationPlotlyProps(this.props.dashboardContext.explanationContext);var t=E.buildOptions(this.props.dashboardContext.explanationContext,!0),r=E.getselectedColorOption(this.plotlyProps,t),n=this.props.dashboardContext.weightContext,a=this.props.dashboardContext.explanationContext.modelMetadata.modelType===v.a.multiclass,o=E.populatePlotlyProps(e,i.a.cloneDeep(this.plotlyProps));return o=E.updatePropsForSelections(o,this.props.selectedRow),h.a.createElement("div",{className:"explanation-chart"},h.a.createElement("div",{className:"top-controls"},h.a.createElement("div",{className:"path-selector x-value"},h.a.createElement(u.a,{options:t,onChange:this.onXSelected,label:m.a.ExplanationScatter.xValue,ariaLabel:"x picker",selectedKey:this.plotlyProps.data[0].xAccessor,useComboBoxAsMenuWidth:!0,styles:g.a.defaultDropdownStyle})),h.a.createElement("div",{className:"path-selector"},h.a.createElement(u.a,{options:t,onChange:this.onColorSelected,label:m.a.ExplanationScatter.colorValue,ariaLabel:"color picker",selectedKey:r,useComboBoxAsMenuWidth:!0,styles:g.a.defaultDropdownStyle}))),h.a.createElement("div",{className:"top-controls"},h.a.createElement("div",{className:"path-selector y-value"},h.a.createElement(u.a,{options:t,onChange:this.onYSelected,label:m.a.ExplanationScatter.yValue,ariaLabel:"y picker",selectedKey:this.plotlyProps.data[0].yAccessor,useComboBoxAsMenuWidth:!0,styles:g.a.defaultDropdownStyle})),a&&h.a.createElement("div",{className:"selector"},h.a.createElement("div",{className:"selector-label"},h.a.createElement("div",{className:"label-text"},m.a.CrossClass.label),h.a.createElement(s.a,{id:this.iconId,iconProps:{iconName:"Info"},title:m.a.CrossClass.info,onClick:this.onIconClick,styles:{root:{marginBottom:-3,color:"rgb(0, 120, 212)"}}})),h.a.createElement(u.a,{selectedKey:n.selectedKey,onChange:n.onSelection,options:n.options,ariaLabel:"Cross-class weighting selector",useComboBoxAsMenuWidth:!0,styles:g.a.defaultDropdownStyle}))),this.state.isCalloutVisible&&h.a.createElement(c.a,{target:"#"+this.iconId,setInitialFocus:!0,onDismiss:this.onDismiss,role:"alertdialog"},h.a.createElement("div",{className:"callout-info"},h.a.createElement("div",{className:"class-weight-info"},h.a.createElement("span",null,m.a.CrossClass.overviewInfo),h.a.createElement("ul",null,h.a.createElement("li",null,m.a.CrossClass.absoluteValInfo),h.a.createElement("li",null,m.a.CrossClass.predictedClassInfo),h.a.createElement("li",null,m.a.CrossClass.enumeratedClassInfo))),h.a.createElement(l.a,{onClick:this.onDismiss},m.a.CrossClass.close))),h.a.createElement(f.a,{plotlyProps:o,theme:this.props.theme,onClickHandler:this.handleClick}))}if(this.props.dashboardContext.explanationContext.localExplanation&&void 0!==this.props.dashboardContext.explanationContext.localExplanation.percentComplete)return h.a.createElement(b.d,null);var d=this.props.messages?this.props.messages.LocalExpAndTestReq:void 0;return h.a.createElement(b.e,{explanationStrings:d})},t.prototype.handleClick=function(e){var t=e.points[0].customdata,r=this.props.selectionContext.selectedIds.slice(),n=r.indexOf(t);-1!==n?r.splice(n,1):r.push(t),this.props.selectionContext.onSelect(r)},t.prototype.onXSelected=function(e,t){E.updateNewXAccessor(this.props,this.plotlyProps,t,"explanation_scatter_id")},t.prototype.onYSelected=function(e,t){E.updateNewYAccessor(this.props,this.plotlyProps,t,"explanation_scatter_id")},t.prototype.onColorSelected=function(e,t){E.updateColorAccessor(this.props,this.plotlyProps,t,"explanation_scatter_id")},t.prototype.onIconClick=function(){this.setState({isCalloutVisible:!this.state.isCalloutVisible})},t.prototype.onDismiss=function(){this.setState({isCalloutVisible:!1})},t}(h.a.PureComponent),R=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(328);var F=function(e){function t(t){var r=e.call(this,t)||this;r._crossClassIconId="cross-class-icon-id",r._globalSortIconId="global-sort-icon-id",r.onDismiss=r.onDismiss.bind(r),r.showCrossClassInfo=r.showCrossClassInfo.bind(r),r.showGlobalSortInfo=r.showGlobalSortInfo.bind(r),r.handleClick=r.handleClick.bind(r),r.setChart=r.setChart.bind(r),r.setK=r.setK.bind(r),r.setColor=r.setColor.bind(r),r.colorOptions=r.buildColorOptions(),r.rowCount=r.props.dashboardContext.explanationContext.localExplanation.flattenedValues.length;var n=r.colorOptions.length>1&&r.rowCount<500?1:0;return r.state={selectedColorOption:r.colorOptions[n].key,plotlyProps:void 0},r}return R(t,e),t.buildTooltip=function(e,t,r){var n=e.localExplanation.flattenedValues.length>500,a=[];a.push(m.a.formatString("AggregateImportance.featureLabel",e.modelMetadata.featureNames[r])),e.testDataset.dataset&&a.push(m.a.formatString("AggregateImportance.valueLabel",e.testDataset.dataset[t][r]));var i=n?e.localExplanation.flattenedValues[t][r]:e.localExplanation.flattenedValues[t][r].toLocaleString(void 0,{minimumFractionDigits:3});if(a.push(m.a.formatString("AggregateImportance.importanceLabel",i)),e.modelMetadata.modelType===v.a.regression)e.testDataset.predictedY&&a.push(m.a.formatString("AggregateImportance.predictedOutputTooltip",e.testDataset.predictedY[t])),e.testDataset.trueY&&a.push(m.a.formatString("AggregateImportance.trueOutputTooltip",e.testDataset.trueY[t]));else{if(e.testDataset.predictedY){var o=e.testDataset.predictedY[t],s=e.modelMetadata.classNames[o]||"unknown class";a.push(m.a.formatString("AggregateImportance.predictedClassTooltip",s))}if(e.testDataset.trueY){o=e.testDataset.trueY[t],s=e.modelMetadata.classNames[o]||"unknown class";a.push(m.a.formatString("AggregateImportance.trueClassTooltip",s))}}return a.join("<br>")},t.prototype.render=function(){var e=this;if(void 0!==this.props.dashboardContext.explanationContext.testDataset&&void 0!==this.props.dashboardContext.explanationContext.localExplanation&&void 0!==this.props.dashboardContext.explanationContext.localExplanation.values){if(this.rowCount>1e4)return p.createElement(b.e,{explanationStrings:[{displayText:m.a.AggregateImportance.tooManyRows,format:"text"}]});if(void 0===this.state.plotlyProps)return this.loadProps(),p.createElement(b.d,null);var r=this.state.plotlyProps,n=this.props.dashboardContext.weightContext,i={"xaxis.range":[-.5,this.props.config.topK-.5]};return a.set(r,"layout.xaxis.range",[-.5,this.props.config.topK-.5]),r=E.updatePropsForSelections(r,this.props.selectedRow),p.createElement("div",{className:"aggregate-chart"},p.createElement("div",{className:"top-controls"},p.createElement(u.a,{label:m.a.FeatureImportanceWrapper.chartType,className:"path-selector",selectedKey:M.beehive,onChange:this.setChart,options:this.props.chartTypeOptions,ariaLabel:"chart type picker",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle}),this.colorOptions.length>1&&p.createElement(u.a,{label:m.a.ExplanationScatter.colorValue,className:"path-selector",selectedKey:this.state.selectedColorOption,onChange:this.setColor,options:this.colorOptions,ariaLabel:"color picker",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle}),p.createElement("div",{className:"slider-control"},p.createElement("div",{className:"slider-label"},p.createElement("span",{className:"label-text"},m.a.AggregateImportance.topKFeatures),this.props.dashboardContext.explanationContext.isGlobalDerived&&p.createElement(s.a,{id:this._globalSortIconId,iconProps:{iconName:"Info"},title:m.a.AggregateImportance.topKInfo,onClick:this.showGlobalSortInfo,styles:{root:{marginBottom:-3,color:"rgb(0, 120, 212)"}}})),p.createElement(d.a,{className:"feature-slider",ariaLabel:m.a.AggregateImportance.topKFeatures,max:Math.min(t.maxFeatures,this.props.dashboardContext.explanationContext.modelMetadata.featureNames.length),min:1,step:1,value:this.props.config.topK,onChange:function(t){return e.setK(t)},showValue:!0})),this.props.dashboardContext.explanationContext.modelMetadata.modelType===v.a.multiclass&&p.createElement("div",{className:"selector"},p.createElement("div",{className:"selector-label"},p.createElement("span",null,m.a.CrossClass.label),p.createElement(s.a,{id:this._crossClassIconId,iconProps:{iconName:"Info"},title:m.a.CrossClass.info,onClick:this.showCrossClassInfo,styles:{root:{marginBottom:-3,color:"rgb(0, 120, 212)"}}})),p.createElement(u.a,{className:"path-selector",selectedKey:n.selectedKey,onChange:n.onSelection,options:n.options,ariaLabel:"Cross-class weighting selector",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle}))),this.state.calloutContent&&p.createElement(c.a,{target:"#"+this.state.calloutId,setInitialFocus:!0,onDismiss:this.onDismiss,role:"alertdialog"},p.createElement("div",{className:"callout-info"},this.state.calloutContent,p.createElement(l.a,{onClick:this.onDismiss},m.a.CrossClass.close))),p.createElement(f.a,{plotlyProps:r,onClickHandler:this.handleClick,theme:this.props.theme,relayoutArg:i}))}if(this.props.dashboardContext.explanationContext.localExplanation&&void 0!==this.props.dashboardContext.explanationContext.localExplanation.percentComplete)return p.createElement(b.d,null);var o=this.props.messages?this.props.messages.LocalExpAndTestReq:void 0;return p.createElement(b.e,{explanationStrings:o})},t.prototype.loadProps=function(){var e=this;setTimeout((function(){var r=t.generateSortVector(e.props.dashboardContext.explanationContext).slice(-1*t.maxFeatures).reverse(),n=t.buildPlotlyProps(e.props.dashboardContext.explanationContext,r,e.colorOptions.find((function(t){return t.key===e.state.selectedColorOption})),e.props.selectionContext.selectedIds);e.setState({plotlyProps:n})}),1)},t.prototype.handleClick=function(e){var t=e.points[0].customdata,r=this.props.selectionContext.selectedIds.slice(),n=r.indexOf(t);-1!==n?r.splice(n,1):r.push(t),this.props.selectionContext.onSelect(r)},t.prototype.showCrossClassInfo=function(){if(this.state.calloutContent)this.onDismiss();else{var e=p.createElement("div",{className:"class-weight-info"},p.createElement("span",null,m.a.CrossClass.overviewInfo),p.createElement("ul",null,p.createElement("li",null,m.a.CrossClass.absoluteValInfo),p.createElement("li",null,m.a.CrossClass.predictedClassInfo),p.createElement("li",null,m.a.CrossClass.enumeratedClassInfo)));this.setState({calloutContent:e,calloutId:this._crossClassIconId})}},t.prototype.showGlobalSortInfo=function(){if(this.state.calloutContent)this.onDismiss();else{var e=p.createElement("div",{className:"class-weight-info"},p.createElement("span",null,m.a.FeatureImportanceWrapper.globalImportanceExplanation),this.props.dashboardContext.explanationContext.modelMetadata.modelType===v.a.multiclass&&p.createElement("span",null,m.a.FeatureImportanceWrapper.multiclassImportanceAddendum),p.createElement("div",null,p.createElement("br",null)));this.setState({calloutContent:e,calloutId:this._globalSortIconId})}},t.prototype.buildColorOptions=function(){var e=this.props.dashboardContext.explanationContext.modelMetadata.modelType===v.a.regression,t=[{key:"none",text:m.a.AggregateImportance.noColor}];return this.props.dashboardContext.explanationContext.testDataset.dataset&&t.push({key:"normalizedFeatureValue",text:m.a.AggregateImportance.scaledFeatureValue,data:{isCategorical:!1,isNormalized:!0}}),this.props.dashboardContext.explanationContext.testDataset.predictedY&&t.push({key:"predictedClass",text:e?m.a.AggregateImportance.predictedValue:m.a.AggregateImportance.predictedClass,data:{isCategorical:!e,sortProperty:e?void 0:"predictedClassIndex"}}),this.props.dashboardContext.explanationContext.testDataset.trueY&&t.push({key:"trueClass",text:e?m.a.AggregateImportance.trueValue:m.a.AggregateImportance.trueClass,data:{isCategorical:!e,sortProperty:e?void 0:"trueClassIndex"}}),t},t.prototype.setChart=function(e,t){var r=a.cloneDeep(this.props.config);r.displayMode=t.key,this.props.onChange(r,this.props.config.id)},t.prototype.onDismiss=function(){this.setState({calloutContent:void 0,calloutId:void 0})},t.prototype.setColor=function(e,t){this.setState({selectedColorOption:t.key,plotlyProps:void 0})},t.prototype.setK=function(e){var t=a.cloneDeep(this.props.config);t.topK=e,this.props.onChange(t,this.props.config.id)},t.maxFeatures=30,t.generateSortVector=o.a((function(e){return y.a.buildSortedVector(e.globalExplanation.perClassFeatureImportances)})),t.projectData=o.a((function(e,r){var n=void 0!==e.testDataset.dataset?t.populateMappers(e):void 0,a=e.modelMetadata.modelType!==v.a.regression;return r.map((function(r,i){return e.localExplanation.flattenedValues.map((function(o,s){var l=e.testDataset.predictedY?e.testDataset.predictedY[s]:void 0,c=e.testDataset.predictedY?a?e.modelMetadata.classNames[l]||"class "+l:l:void 0,u=e.testDataset.trueY?e.testDataset.trueY[s]:void 0,d=e.testDataset.trueY?a?e.modelMetadata.classNames[u]||"class "+u:u:void 0;return{rowIndex:s.toString(),normalizedFeatureValue:void 0!==n?n[r](e.testDataset.dataset[s][r]):void 0,featureIndex:i,ditheredFeatureIndex:i+(.2*Math.random()-.1),featureImportance:o[r],predictedClass:c,predictedClassIndex:l,trueClassIndex:u,trueClass:d,tooltip:t.buildTooltip(e,s,r)}}))})).reduce((function(e,t){return e.push.apply(e,t),e}),[])}),a.isEqual),t.buildPlotlyProps=o.a((function(e,r,n,i){var o=a.cloneDeep(t.BasePlotlyProps),s=t.projectData(e,r);return a.set(o,"layout.xaxis.ticktext",r.map((function(t){return e.modelMetadata.featureNamesAbridged[t]}))),a.set(o,"layout.xaxis.tickvals",r.map((function(e,t){return t}))),e.modelMetadata.modelType===v.a.binary&&a.set(o,"layout.yaxis.title",m.a.featureImportance+"<br> "+m.a.ExplanationScatter.class+" "+e.modelMetadata.classNames[0]),void 0===n||"none"===n.key?b.f.clearColorProperties(o):(b.f.setColorProperty(o,n,e.modelMetadata,n.text),n.data.isNormalized?(o.data[0].marker.colorscale=[[0,"rgba(0,0,255,0.5)"],[1,"rgba(255,0,0,0.5)"]],a.set(o.data[0],"marker.colorbar.tickvals",[0,1]),a.set(o.data[0],"marker.colorbar.ticktext",[m.a.AggregateImportance.low,m.a.AggregateImportance.high])):a.set(o.data[0],"marker.opacity",.6)),o.data=f.c.buildPlotlySeries(o.data[0],s),o}),a.isEqual),t.populateMappers=o.a((function(e){return e.modelMetadata.featureNames.map((function(t,r){if(e.modelMetadata.featureIsCategorical[r]){var n=a.uniq(e.testDataset.dataset.map((function(e){return e[r]}))).sort();return function(e){return n.length>1?n.indexOf(e)/(n.length-1):0}}var i=e.testDataset.dataset.map((function(e){return e[r]})),o=Math.min.apply(Math,i),s=Math.max.apply(Math,i)-o;return function(e){return 0!==s&&"number"==typeof e?(e-o)/s:0}}))})),t.BasePlotlyProps={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[{hoverinfo:"text",datapointLevelAccessors:{customdata:{path:["rowIndex"],plotlyPath:"customdata"},text:{path:["tooltip"],plotlyPath:"text"}},mode:f.e.markers,type:"scattergl",yAccessor:"featureImportance",xAccessor:"ditheredFeatureIndex"}],layout:{dragmode:!1,autosize:!0,font:{size:10},hovermode:"closest",margin:{t:10,b:30},showlegend:!1,yaxis:{automargin:!0,title:m.a.featureImportance},xaxis:{automargin:!0}}},t}(p.PureComponent),z=r(375),N=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),j=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},B=function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Y=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n};r(330);var H=function(e){function t(t){var r=e.call(this,t)||this;return r.updateSelectedOptionKeys=function(e,t){var r=(e=Y(e)).indexOf(t.key);return t.selected&&r<0?e.push(t.key):e.splice(r,1),e},t.explanationContext.localExplanation&&t.explanationContext.localExplanation.values?r.featuresOption=y.a.buildSortedVector(t.explanationContext.localExplanation.values[r.props.datapointIndex]).map((function(e){return{key:e,text:t.explanationContext.modelMetadata.featureNames[e]}})).reverse():r.featuresOption=t.explanationContext.modelMetadata.featureNames.map((function(e,t){return{key:t,text:e}})),r.state={requestFeatureIndex:void 0,fetchedData:void 0,abortController:void 0,rangeView:void 0,requestedRange:void 0},r.onFeatureSelected=r.onFeatureSelected.bind(r),r.onCategoricalRangeChanged=r.onCategoricalRangeChanged.bind(r),r.onMinRangeChanged=r.onMinRangeChanged.bind(r),r.onMaxRangeChanged=r.onMaxRangeChanged.bind(r),r.onStepsRangeChanged=r.onStepsRangeChanged.bind(r),r.fetchData=i.a.debounce(r.fetchData.bind(r),500),r}return N(t,e),t.buildTextArray=function(e,t,r,n,a,i){return n.map((function(n,o){if(void 0!==a[o]){var s=[];if(e!==v.a.regression&&s.push(m.a.formatString(m.a.BarChart.classLabel,i)),!isNaN(+n)){var l=r===f.g.numeric?{minimumFractionDigits:3}:void 0;n=n.toLocaleString(void 0,l)}return s.push(t+": "+n),e===v.a.regression?s.push(m.a.formatString(m.a.IcePlot.predictionLabel,a[o].toLocaleString(void 0,{minimumFractionDigits:3}))):s.push(m.a.formatString(m.a.IcePlot.probabilityLabel,a[o].toLocaleString(void 0,{minimumFractionDigits:3}))),s.join("<br>")}}))},t.prototype.componentDidMount=function(){var e=this;this.featuresOption.length>0&&this.setState({rangeView:this.buildRangeView(this.featuresOption[0].key)},(function(){e.fetchData()}))},t.prototype.componentDidUpdate=function(e){this.props.datapointIndex!==e.datapointIndex&&this.fetchData()},t.prototype.componentWillUnmount=function(){void 0!==this.state.abortController&&this.state.abortController.abort()},t.prototype.render=function(){if(void 0===this.props.invokeModel){var e=this.props.messages?this.props.messages.PredictorReq:void 0;return h.a.createElement(b.e,{explanationStrings:e})}var r=void 0!==this.state.requestFeatureIndex?this.props.explanationContext.modelMetadata.featureRanges[this.state.requestFeatureIndex].rangeType:f.g.categorical,n=t.buildPlotlyProps(this.props.explanationContext.modelMetadata.modelType,this.props.explanationContext.modelMetadata.featureNames[this.state.requestFeatureIndex],this.props.explanationContext.modelMetadata.classNames,r,this.state.requestedRange,this.state.fetchedData),a=void 0!==this.state.rangeView&&(void 0!==this.state.rangeView.maxErrorMessage||void 0!==this.state.rangeView.minErrorMessage||void 0!==this.state.rangeView.stepsErrorMessage);return h.a.createElement("div",{className:"ICE-wrapper"},h.a.createElement("div",{className:"feature-pickers"},h.a.createElement("div",{className:"feature-picker"},h.a.createElement("div",{className:"path-selector"},h.a.createElement(u.a,{options:this.featuresOption,onChange:this.onFeatureSelected,label:m.a.IcePlot.featurePickerLabel,ariaLabel:"feature picker",selectedKey:this.state.rangeView?this.state.rangeView.featureIndex:void 0,useComboBoxAsMenuWidth:!0,styles:g.a.defaultDropdownStyle})),void 0!==this.state.rangeView&&h.a.createElement("div",{className:"rangeview"},this.state.rangeView.type===f.g.categorical&&h.a.createElement(u.a,{multiSelect:!0,selectedKey:this.state.rangeView.selectedOptionKeys,allowFreeform:!0,autoComplete:"on",options:this.state.rangeView.categoricalOptions,onChange:this.onCategoricalRangeChanged,styles:g.a.defaultDropdownStyle}),this.state.rangeView.type!==f.g.categorical&&h.a.createElement("div",{className:"parameter-set"},h.a.createElement(z.a,{label:m.a.IcePlot.minimumInputLabel,styles:g.a.textFieldStyle,value:this.state.rangeView.min.toString(),onChange:this.onMinRangeChanged,errorMessage:this.state.rangeView.minErrorMessage}),h.a.createElement(z.a,{label:m.a.IcePlot.maximumInputLabel,styles:g.a.textFieldStyle,value:this.state.rangeView.max.toString(),onChange:this.onMaxRangeChanged,errorMessage:this.state.rangeView.maxErrorMessage}),h.a.createElement(z.a,{label:m.a.IcePlot.stepInputLabel,styles:g.a.textFieldStyle,value:this.state.rangeView.steps.toString(),onChange:this.onStepsRangeChanged,errorMessage:this.state.rangeView.stepsErrorMessage}))))),void 0!==this.state.abortController&&h.a.createElement("div",{className:"loading"},m.a.IcePlot.loadingMessage),this.state.errorMessage&&h.a.createElement("div",{className:"loading"},this.state.errorMessage),void 0===n&&void 0===this.state.abortController&&h.a.createElement("div",{className:"charting-prompt"},m.a.IcePlot.submitPrompt),a&&h.a.createElement("div",{className:"charting-prompt"},m.a.IcePlot.topLevelErrorMessage),void 0!==n&&void 0===this.state.abortController&&!a&&h.a.createElement("div",{className:"second-wrapper"},h.a.createElement("div",{className:"chart-wrapper"},h.a.createElement(f.a,{plotlyProps:n,theme:this.props.theme}))))},t.prototype.buildRangeView=function(e){var t;return this.props.explanationContext.modelMetadata.featureIsCategorical[e]?(t=this.props.explanationContext.modelMetadata.featureRanges[e]).uniqueValues?{featureIndex:e,selectedOptionKeys:t.uniqueValues,categoricalOptions:t.uniqueValues.map((function(e){return{key:e,text:e}})),type:f.g.categorical}:void 0:{featureIndex:e,min:(t=this.props.explanationContext.modelMetadata.featureRanges[e]).min,max:t.max,steps:20,type:t.rangeType}},t.prototype.onFeatureSelected=function(e,t){var r=this;void 0!==this.props.invokeModel&&this.setState({rangeView:this.buildRangeView(t.key)},(function(){r.fetchData()}))},t.prototype.onMinRangeChanged=function(e,t){var r=this,n=+t,a=i.a.cloneDeep(this.state.rangeView);a.min=+t,Number.isNaN(n)||this.state.rangeView.type===f.g.integer&&!Number.isInteger(n)?(a.minErrorMessage=this.state.rangeView.type===f.g.integer?m.a.IcePlot.integerError:m.a.IcePlot.numericError,this.setState({rangeView:a})):(a.minErrorMessage=void 0,this.setState({rangeView:a},(function(){r.fetchData()})))},t.prototype.onMaxRangeChanged=function(e,t){var r=this,n=+t,a=i.a.cloneDeep(this.state.rangeView);a.max=+t,Number.isNaN(n)||this.state.rangeView.type===f.g.integer&&!Number.isInteger(n)?(a.maxErrorMessage=this.state.rangeView.type===f.g.integer?m.a.IcePlot.integerError:m.a.IcePlot.numericError,this.setState({rangeView:a})):(a.maxErrorMessage=void 0,this.setState({rangeView:a},(function(){r.fetchData()})))},t.prototype.onStepsRangeChanged=function(e,t){var r=this,n=+t,a=i.a.cloneDeep(this.state.rangeView);a.steps=+t,Number.isInteger(n)?(a.stepsErrorMessage=void 0,this.setState({rangeView:a},(function(){r.fetchData()}))):(a.stepsErrorMessage=m.a.IcePlot.integerError,this.setState({rangeView:a}))},t.prototype.onCategoricalRangeChanged=function(e,t,r,n){var a=this,o=i.a.cloneDeep(this.state.rangeView),s=o.selectedOptionKeys||[];if(t)o.selectedOptionKeys=this.updateSelectedOptionKeys(s,t);else if(void 0!==n){var l={key:n,text:n};o.selectedOptionKeys=Y(s,[l.key]),o.categoricalOptions.push(l)}this.setState({rangeView:o},(function(){a.fetchData()}))},t.prototype.fetchData=function(){var e=this;void 0!==this.state.abortController&&this.state.abortController.abort();var t=new AbortController,r=this.buildRange(),n=this.props.invokeModel(this.buildDataSpans(),t.signal);this.setState({abortController:t,requestedRange:r,requestFeatureIndex:this.state.rangeView.featureIndex,errorMessage:void 0},(function(){return j(e,void 0,void 0,(function(){var e,t;return B(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,n];case 1:return e=r.sent(),Array.isArray(e)&&this.setState({fetchedData:e,abortController:void 0}),[3,3];case 2:return"AbortError"===(t=r.sent()).name?[2]:("PythonError"===t.name&&this.setState({errorMessage:m.a.formatString(m.a.IcePlot.errorPrefix,t.message)}),[3,3]);case 3:return[2]}}))}))}))},t.prototype.buildRange=function(){var e=this;if(void 0===this.state.rangeView||void 0!==this.state.rangeView.minErrorMessage||void 0!==this.state.rangeView.maxErrorMessage||void 0!==this.state.rangeView.stepsErrorMessage)return[];var t=+this.state.rangeView.min,r=+this.state.rangeView.max,n=+this.state.rangeView.steps;if(this.state.rangeView.type===f.g.categorical&&Array.isArray(this.state.rangeView.selectedOptionKeys))return this.state.rangeView.selectedOptionKeys;if(Number.isNaN(t)||Number.isNaN(r)||!Number.isInteger(n))return[];var a=n>0?(r-t)/n:r-t;return i.a.uniq(Array.from({length:n},(function(r,n){return e.state.rangeView.type===f.g.integer?Math.round(t+n*a):t+n*a})))},t.prototype.buildDataSpans=function(){var e=this,t=this.props.explanationContext.testDataset.dataset[this.props.datapointIndex];return this.buildRange().map((function(r){var n=i.a.cloneDeep(t);return n[e.state.rangeView.featureIndex]=r,n}))},t.buildPlotlyProps=o.a((function(e,r,n,a,i,o){if(void 0!==o&&void 0!==i){var s=Array.isArray(o[0])?y.a.transpose2DArray(o):[o];return{config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:s.map((function(o,s){return{hoverinfo:"text",mode:a===f.g.categorical?f.e.markers:f.e.linesMarkers,text:t.buildTextArray(e,r,a,i,o,n[s]),type:"scatter",x:i,y:o,name:n[s]}})),layout:{dragmode:!1,autosize:!0,font:{size:10},margin:{t:10,b:30},hovermode:"closest",showlegend:s.length>1,yaxis:{automargin:!0,title:e===v.a.regression?m.a.IcePlot.prediction:m.a.IcePlot.predictedProbability},xaxis:{title:r,automargin:!0}}}}}),i.a.isEqual),t}(h.a.Component),V=(r(51),function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}()),U=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},W=function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};r(332);var G=function(e){function t(t){var r=e.call(this,t)||this;return r.state={perturbedDictionary:{},featureErrors:new Array(t.explanationContext.modelMetadata.featureNames.length),abortController:void 0},r.onValueEdit=r.onValueEdit.bind(r),r.fetchData=i.a.debounce(r.fetchData.bind(r),500),r}return V(t,e),t.prototype.componentDidUpdate=function(e){this.props.datapointIndex!==e.datapointIndex&&(this.state.abortController&&this.state.abortController.abort(),this.setState({perturbedDictionary:{},featureErrors:new Array(this.props.explanationContext.modelMetadata.featureNames.length),abortController:void 0,prediction:void 0,predictionProbabilities:void 0}))},t.prototype.render=function(){var e=this;if(void 0===this.props.invokeModel){var t=this.props.messages?this.props.messages.PredictorReq:void 0;return h.a.createElement(b.e,{explanationStrings:t})}var r=this.state.featureErrors.some((function(e){return e}));return h.a.createElement("div",{className:"flex-wrapper"},void 0!==this.props.explanationContext.testDataset.predictedY&&h.a.createElement("div",{className:"label-group"},h.a.createElement("div",{className:"label-group-label"},"Base:"),h.a.createElement("div",{className:"flex-full"},h.a.createElement(b.g,{prediction:this.props.explanationContext.testDataset.predictedY[this.props.datapointIndex],classNames:this.props.explanationContext.modelMetadata.classNames,modelType:this.props.explanationContext.modelMetadata.modelType,predictedProbabilities:this.props.explanationContext.testDataset.probabilityY?this.props.explanationContext.testDataset.probabilityY[this.props.datapointIndex]:void 0}))),this.state.abortController&&!r&&h.a.createElement("div",{className:"loading-message"},m.a.PerturbationExploration.loadingMessage),this.state.errorMessage&&h.a.createElement("div",{className:"loading-message"}," ",this.state.errorMessage),r&&h.a.createElement("div",{className:"loading-message"},m.a.IcePlot.topLevelErrorMessage),!r&&void 0!==this.state.prediction&&void 0===this.state.abortController&&h.a.createElement("div",{className:"label-group"},h.a.createElement("div",{className:"label-group-label"},m.a.PerturbationExploration.perturbationLabel),h.a.createElement("div",{className:"flex-full"},h.a.createElement(b.g,{prediction:this.state.prediction,classNames:this.props.explanationContext.modelMetadata.classNames,modelType:this.props.explanationContext.modelMetadata.modelType,predictedProbabilities:this.state.predictionProbabilities}))),h.a.createElement("div",{className:"tile-scroller"},i.a.cloneDeep(this.props.explanationContext.testDataset.dataset[this.props.datapointIndex]).map((function(t,r){return h.a.createElement(b.b,{key:r,index:r,featureName:e.props.explanationContext.modelMetadata.featureNames[r],defaultValue:t,onEdit:e.onValueEdit,enumeratedValues:e.props.explanationContext.modelMetadata.featureRanges[r].uniqueValues,rangeType:e.props.explanationContext.modelMetadata.featureRanges[r].rangeType})}))))},t.prototype.onValueEdit=function(e,t,r){var n=this,a=i.a.cloneDeep(this.state.perturbedDictionary),o=i.a.cloneDeep(this.state.featureErrors);o[e]=void 0!==r,t===this.props.explanationContext.testDataset.dataset[this.props.datapointIndex][e]?a[e]=void 0:a[e]=t,this.setState({perturbedDictionary:a,featureErrors:o},(function(){n.fetchData()}))},t.prototype.fetchData=function(){var e=this;if(void 0!==this.state.abortController&&this.state.abortController.abort(),!this.state.featureErrors.some((function(e){return e}))){for(var t=i.a.cloneDeep(this.props.explanationContext.testDataset.dataset[this.props.datapointIndex]),r=0,n=Object.keys(this.state.perturbedDictionary);r<n.length;r++){var a=+n[r];void 0!==this.state.perturbedDictionary[a]&&(t[a]=this.state.perturbedDictionary[a])}var o=new AbortController,s=this.props.invokeModel([t],o.signal);this.setState({abortController:o,errorMessage:void 0},(function(){return U(e,void 0,void 0,(function(){var e,t,r,n,a,i;return W(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,s];case 1:if(e=l.sent(),o.signal.aborted)return[2];if(Array.isArray(e[0])){for(t=e[0],r=0,n=t[0],a=1;a<t.length;a++)t[a]>n&&(r=a,n=t[a]);this.setState({prediction:r,predictionProbabilities:t,abortController:void 0})}else this.setState({prediction:e[0],abortController:void 0});return[3,3];case 2:return"AbortError"===(i=l.sent()).name?[2]:("PythonError"===i.name&&this.setState({errorMessage:m.a.formatString(m.a.IcePlot.errorPrefix,i.message)}),[3,3]);case 3:return[2]}}))}))}))}},t}(h.a.Component),q=r(40),K=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();r(334);var X=function(e){function t(t){var r=e.call(this,t)||this;return r.sortOptions=r.buildSortOptions(),r.onSortSelect=r.onSortSelect.bind(r),r.setTopK=r.setTopK.bind(r),r.state={selectedSorting:r.getDefaultSorting()},r}return K(t,e),t.prototype.render=function(){var e=this.props.explanationContext.localExplanation;if(void 0!==e&&void 0!==e.values){var t=this.getFeatureByClassMatrix(),r=this.getSortVector(),n=this.state.selectedSorting!==q.a.absoluteGlobal&&this.state.selectedSorting!==q.a.absoluteLocal?[this.state.selectedSorting]:void 0;return h.a.createElement("div",{className:"local-summary"},this.props.explanationContext.testDataset&&this.props.explanationContext.testDataset.predictedY&&h.a.createElement(b.g,{prediction:this.props.explanationContext.testDataset.predictedY[this.props.selectedRow],classNames:this.props.explanationContext.modelMetadata.classNames,modelType:this.props.explanationContext.modelMetadata.modelType,predictedProbabilities:this.props.explanationContext.testDataset.probabilityY?this.props.explanationContext.testDataset.probabilityY[this.props.selectedRow]:void 0}),h.a.createElement("div",{className:"feature-bar-explanation-chart"},h.a.createElement("div",{className:"top-controls"},h.a.createElement(d.a,{className:"feature-slider",label:m.a.AggregateImportance.topKFeatures,max:Math.min(30,this.props.explanationContext.modelMetadata.featureNames.length),min:1,step:1,value:this.props.config.topK,onChange:this.setTopK,showValue:!0}),this.sortOptions.length>1&&h.a.createElement(u.a,{className:"pathSelector",label:m.a.BarChart.sortBy,selectedKey:this.state.selectedSorting,onChange:this.onSortSelect,options:this.sortOptions,ariaLabel:"sort selector",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle})),h.a.createElement(b.a,{intercept:this.props.explanationContext.localExplanation.intercepts,featureByClassMatrix:t,sortedIndexVector:r,topK:this.props.config.topK,modelMetadata:this.props.explanationContext.modelMetadata,additionalRowData:void 0!==this.props.explanationContext.testDataset.dataset?this.props.explanationContext.testDataset.dataset[this.props.selectedRow]:void 0,barmode:"group",defaultVisibleClasses:n,theme:this.props.theme})))}if(void 0!==e&&void 0!==e.percentComplete)return h.a.createElement(b.d,null);var a=this.props.messages?this.props.messages.LocalExpAndTestReq:void 0;return h.a.createElement(b.e,{explanationStrings:a})},t.prototype.getSortVector=function(){var e=this.props.explanationContext.localExplanation;return this.state.selectedSorting===q.a.absoluteGlobal?y.a.buildSortedVector(this.props.explanationContext.globalExplanation.perClassFeatureImportances):this.state.selectedSorting===q.a.absoluteLocal?y.a.buildSortedVector(e.values[this.props.selectedRow]):y.a.buildSortedVector(e.values[this.props.selectedRow],this.state.selectedSorting)},t.prototype.getFeatureByClassMatrix=function(){var e=this.props.explanationContext.localExplanation.values[this.props.selectedRow];return this.props.explanationContext.modelMetadata.modelType===v.a.binary&&void 0!==this.props.explanationContext.testDataset.predictedY&&0!==this.props.explanationContext.testDataset.predictedY[this.props.selectedRow]?e.map((function(e){return e.map((function(e){return-1*e}))})):e},t.prototype.buildSortOptions=function(){var e=[{key:q.a.absoluteGlobal,text:m.a.BarChart.absoluteGlobal}];return this.props.explanationContext.modelMetadata.modelType!==v.a.multiclass&&e.push({key:q.a.absoluteLocal,text:m.a.BarChart.absoluteLocal}),this.props.explanationContext.modelMetadata.modelType===v.a.multiclass&&e.push.apply(e,this.props.explanationContext.modelMetadata.classNames.map((function(e,t){return{key:t,text:e}}))),e},t.prototype.getDefaultSorting=function(){return this.props.explanationContext.testDataset.predictedY?this.props.explanationContext.modelMetadata.modelType===v.a.multiclass?this.props.explanationContext.testDataset.predictedY[this.props.selectedRow]:q.a.absoluteLocal:q.a.absoluteGlobal},t.prototype.setTopK=function(e){var t=i.a.cloneDeep(this.props.config);t.topK=e,this.props.onChange(t,"local_bar_id")},t.prototype.onSortSelect=function(e,t){this.setState({selectedSorting:t.key})},t}(h.a.PureComponent);r(74);r.d(t,"f",(function(){return w})),r.d(t,"a",(function(){return"bar_id"})),r.d(t,"i",(function(){return"global_feature_id"})),r.d(t,"g",(function(){return M})),r.d(t,"h",(function(){return L})),r.d(t,"j",(function(){return H})),r.d(t,"l",(function(){return G})),r.d(t,"c",(function(){return"data_scatter_id"})),r.d(t,"b",(function(){return I})),r.d(t,"e",(function(){return"explanation_scatter_id"})),r.d(t,"d",(function(){return O})),r.d(t,"k",(function(){return"local_bar_id"})),r.d(t,"m",(function(){return X}))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(4),a=r(14),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},o=function(){function e(t,r,n){void 0===n&&(n=[]),this.name=t,this.jointDataset=r,this.filters=n,this.rowCount=0,this.mutateCount=0,this.currentSortReversed=!1,this.cohortIndex=e._cohortIndex,this.name=t,e._cohortIndex+=1,this.applyFilters()}return e.prototype.updateFilter=function(e,t){void 0===t&&(t=this.filters.length),this.filters[t]=e,this.applyFilters()},e.prototype.getCohortID=function(){return this.cohortIndex},e.prototype.deleteFilter=function(e){this.filters.splice(e,1),this.applyFilters()},e.prototype.getRow=function(e){return i({},this.jointDataset.dataDict[e])},e.prototype.sort=function(e,t){void 0===e&&(e=n.c.IndexLabel),this.currentSortKey!==e&&(this.filteredData.sort((function(t,r){return t[e]-r[e]})),this.currentSortKey=e,this.currentSortReversed=!1),this.currentSortReversed!==t&&this.filteredData.reverse()},e.prototype.unwrap=function(e,t){if(t&&!this.jointDataset.metaDict[e].isCategorical&&!this.jointDataset.metaDict[e].treatAsCategorical){var r=this.jointDataset.binDict[e];return void 0===r&&(this.jointDataset.addBin(e),r=this.jointDataset.binDict[e]),this.filteredData.map((function(t){var n=t[e];return r.findIndex((function(e){return e>=n}))}))}return this.filteredData.map((function(t){return t[e]}))},e.prototype.calculateAverageImportance=function(){return this.cachedAverageImportance?this.cachedAverageImportance:(this.cachedAverageImportance=this.transposedLocalFeatureImportances().map((function(e){return e&&0!==e.length?e.reduce((function(e,t){return e+Math.abs(t)}),0)/e.length:Number.NaN})),this.cachedAverageImportance)},e.prototype.transposedLocalFeatureImportances=function(){if(this.cachedTransposedLocalFeatureImportances)return this.cachedTransposedLocalFeatureImportances;var e=this.jointDataset.localExplanationFeatureCount,t=this.filteredData.map((function(t){return n.c.localExplanationSlice(t,e)}));return this.cachedTransposedLocalFeatureImportances=a.a.transpose2DArray(t),this.cachedTransposedLocalFeatureImportances},e.prototype.clearCachedImportances=function(){this.cachedAverageImportance=void 0,this.cachedTransposedLocalFeatureImportances=void 0,this.mutateCount+=1},e.prototype.applyFilters=function(){var e=this;this.clearCachedImportances(),this.filteredData=this.jointDataset.dataDict.filter((function(t){return e.filters.every((function(e){var r=t[e.column];switch(e.method){case"equal":return r===e.arg[0];case"greater":return r>e.arg[0];case"greater and equal":return r>=e.arg[0];case"less":return r<e.arg[0];case"less and equal":return r<=e.arg[0];case"includes":return e.arg.includes(r);case"in the range of":return r>=e.arg[0]&&r<=e.arg[1]}}))})),this.rowCount=this.filteredData.length},e.CohortKey="Cohort",e._cohortIndex=0,e}()},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e.equal="equal",e.absAvg="absAvg",e.predicted="predicted"}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n,a=r(2),i={none:0,insertNode:1,appendChild:2},o="undefined"!=typeof navigator&&/rv:11.0/.test(navigator.userAgent),s={};try{s=window}catch(e){}var l=function(){function e(e){this._rules=[],this._preservedRules=[],this._rulesToInsert=[],this._counter=0,this._keyToClassName={},this._onResetCallbacks=[],this._classNameToArgs={},this._config=Object(a.a)({injectionMode:i.insertNode,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},e)}return e.getInstance=function(){if(!(n=s.__stylesheet__)||n._lastStyleElement&&n._lastStyleElement.ownerDocument!==document){var t=s&&s.FabricConfig||{};n=s.__stylesheet__=new e(t.mergeStyles)}return n},e.prototype.setConfig=function(e){this._config=Object(a.a)(Object(a.a)({},this._config),e)},e.prototype.onReset=function(e){this._onResetCallbacks.push(e)},e.prototype.getClassName=function(e){var t=this._config.namespace;return(t?t+"-":"")+(e||this._config.defaultPrefix)+"-"+this._counter++},e.prototype.cacheClassName=function(e,t,r,n){this._keyToClassName[t]=e,this._classNameToArgs[e]={args:r,rules:n}},e.prototype.classNameFromKey=function(e){return this._keyToClassName[e]},e.prototype.argsFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.args},e.prototype.insertedRulesFromClassName=function(e){var t=this._classNameToArgs[e];return t&&t.rules},e.prototype.insertRule=function(e,t){var r=this._config.injectionMode!==i.none?this._getStyleElement():void 0;if(t&&this._preservedRules.push(e),r)switch(this._config.injectionMode){case i.insertNode:var n=r.sheet;try{n.insertRule(e,n.cssRules.length)}catch(e){}break;case i.appendChild:r.appendChild(document.createTextNode(e))}else this._rules.push(e);this._config.onInsertRule&&this._config.onInsertRule(e)},e.prototype.getRules=function(e){return(e?this._preservedRules.join(""):"")+this._rules.join("")+this._rulesToInsert.join("")},e.prototype.reset=function(){this._rules=[],this._rulesToInsert=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach((function(e){return e()}))},e.prototype.resetKeys=function(){this._keyToClassName={}},e.prototype._getStyleElement=function(){var e=this;return this._styleElement||"undefined"==typeof document||(this._styleElement=this._createStyleElement(),o||window.requestAnimationFrame((function(){e._styleElement=void 0}))),this._styleElement},e.prototype._createStyleElement=function(){var e=document.head,t=document.createElement("style");t.setAttribute("data-merge-styles","true");var r=this._config.cspSettings;if(r&&r.nonce&&t.setAttribute("nonce",r.nonce),this._lastStyleElement)e.insertBefore(t,this._lastStyleElement.nextElementSibling);else{var n=this._findPlaceholderStyleTag();n?e.insertBefore(t,n.nextElementSibling):e.insertBefore(t,e.childNodes[0])}return this._lastStyleElement=t,t},e.prototype._findPlaceholderStyleTag=function(){var e=document.head;return e?e.querySelector("style[data-merge-styles]"):null},e}()},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pauseBreak:19,capslock:20,escape:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,del:46,zero:48,one:49,two:50,three:51,four:52,five:53,six:54,seven:55,eight:56,nine:57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftWindow:91,rightWindow:92,select:93,zero_numpad:96,one_numpad:97,two_numpad:98,three_numpad:99,four_numpad:100,five_numpad:101,six_numpad:102,seven_numpad:103,eight_numpad:104,nine_numpad:105,multiply:106,add:107,subtract:109,decimalPoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrollLock:145,semicolon:186,equalSign:187,comma:188,dash:189,period:190,forwardSlash:191,graveAccent:192,openBracket:219,backSlash:220,closeBracket:221,singleQuote:222}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o}));var n=r(46),a=r(9),i={msButton:"ms-Button",msButtonHasMenu:"ms-Button--hasMenu",msButtonIcon:"ms-Button-icon",msButtonMenuIcon:"ms-Button-menuIcon",msButtonLabel:"ms-Button-label",msButtonDescription:"ms-Button-description",msButtonScreenReaderText:"ms-Button-screenReaderText",msButtonFlexContainer:"ms-Button-flexContainer",msButtonTextContainer:"ms-Button-textContainer"},o=Object(n.b)((function(e,t,r,n,o,s,l,c,u,d,p){var h,f,m=Object(a.v)(i,e||{}),g=d&&!p;return Object(a.E)({root:[m.msButton,t.root,n,u&&["is-checked",t.rootChecked],g&&["is-expanded",t.rootExpanded,{selectors:(h={},h[":hover ."+m.msButtonIcon]=t.iconExpandedHovered,h[":hover ."+m.msButtonMenuIcon]=t.menuIconExpandedHovered||t.rootExpandedHovered,h[":hover"]=t.rootExpandedHovered,h)}],c&&[i.msButtonHasMenu,t.rootHasMenu],l&&["is-disabled",t.rootDisabled],!l&&!g&&!u&&{selectors:(f={":hover":t.rootHovered},f[":hover ."+m.msButtonLabel]=t.labelHovered,f[":hover ."+m.msButtonIcon]=t.iconHovered,f[":hover ."+m.msButtonDescription]=t.descriptionHovered,f[":hover ."+m.msButtonMenuIcon]=t.menuIconHovered,f[":focus"]=t.rootFocused,f[":active"]=t.rootPressed,f[":active ."+m.msButtonIcon]=t.iconPressed,f[":active ."+m.msButtonDescription]=t.descriptionPressed,f[":active ."+m.msButtonMenuIcon]=t.menuIconPressed,f)},l&&u&&[t.rootCheckedDisabled],!l&&u&&{selectors:{":hover":t.rootCheckedHovered,":active":t.rootCheckedPressed}},r],flexContainer:[m.msButtonFlexContainer,t.flexContainer],textContainer:[m.msButtonTextContainer,t.textContainer],icon:[m.msButtonIcon,o,t.icon,g&&t.iconExpanded,u&&t.iconChecked,l&&t.iconDisabled],label:[m.msButtonLabel,t.label,u&&t.labelChecked,l&&t.labelDisabled],menuIcon:[m.msButtonMenuIcon,s,t.menuIcon,u&&t.menuIconChecked,l&&!p&&t.menuIconDisabled,!l&&!g&&!u&&{selectors:{":hover":t.menuIconHovered,":active":t.menuIconPressed}},g&&["is-expanded",t.menuIconExpanded]],description:[m.msButtonDescription,t.description,u&&t.descriptionChecked,l&&t.descriptionDisabled],screenReaderText:[m.msButtonScreenReaderText,t.screenReaderText]})}))},function(e,t,r){(function(t){var r;e.exports=function e(t,n,a){function i(s,l){if(!n[s]){if(!t[s]){if(!l&&"function"==typeof r&&r)return r(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return i(t[s][1][e]||e)}),u,u.exports,e,t,n,a)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<a.length;s++)i(a[s]);return i}({1:[function(e,t,r){"use strict";var n=e("../src/lib"),a={"X,X div":"direction:ltr;font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;","X input,X button":"font-family:'Open Sans', verdana, arial, sans-serif;","X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color 0.3s ease 0s;-moz-transition:background-color 0.3s ease 0s;-ms-transition:background-color 0.3s ease 0s;-o-transition:background-color 0.3s ease 0s;transition:background-color 0.3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;","X [data-title]:after":"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:white;","X .select-outline-2":"stroke:black;stroke-dasharray:2px 2px;",Y:"font-family:'Open Sans';position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;","Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in a){var o=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,a[i])}},{"../src/lib":716}],2:[function(e,t,r){"use strict";t.exports=e("../src/transforms/aggregate")},{"../src/transforms/aggregate":1294}],3:[function(e,t,r){"use strict";t.exports=e("../src/traces/bar")},{"../src/traces/bar":863}],4:[function(e,t,r){"use strict";t.exports=e("../src/traces/barpolar")},{"../src/traces/barpolar":875}],5:[function(e,t,r){"use strict";t.exports=e("../src/traces/box")},{"../src/traces/box":885}],6:[function(e,t,r){"use strict";t.exports=e("../src/components/calendars")},{"../src/components/calendars":589}],7:[function(e,t,r){"use strict";t.exports=e("../src/traces/candlestick")},{"../src/traces/candlestick":894}],8:[function(e,t,r){"use strict";t.exports=e("../src/traces/carpet")},{"../src/traces/carpet":913}],9:[function(e,t,r){"use strict";t.exports=e("../src/traces/choropleth")},{"../src/traces/choropleth":927}],10:[function(e,t,r){"use strict";t.exports=e("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":934}],11:[function(e,t,r){"use strict";t.exports=e("../src/traces/cone")},{"../src/traces/cone":940}],12:[function(e,t,r){"use strict";t.exports=e("../src/traces/contour")},{"../src/traces/contour":955}],13:[function(e,t,r){"use strict";t.exports=e("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":966}],14:[function(e,t,r){"use strict";t.exports=e("../src/core")},{"../src/core":694}],15:[function(e,t,r){"use strict";t.exports=e("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":974}],16:[function(e,t,r){"use strict";t.exports=e("../src/transforms/filter")},{"../src/transforms/filter":1295}],17:[function(e,t,r){"use strict";t.exports=e("../src/traces/funnel")},{"../src/traces/funnel":984}],18:[function(e,t,r){"use strict";t.exports=e("../src/traces/funnelarea")},{"../src/traces/funnelarea":993}],19:[function(e,t,r){"use strict";t.exports=e("../src/transforms/groupby")},{"../src/transforms/groupby":1296}],20:[function(e,t,r){"use strict";t.exports=e("../src/traces/heatmap")},{"../src/traces/heatmap":1006}],21:[function(e,t,r){"use strict";t.exports=e("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1015}],22:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram")},{"../src/traces/histogram":1027}],23:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram2d")},{"../src/traces/histogram2d":1033}],24:[function(e,t,r){"use strict";t.exports=e("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1037}],25:[function(e,t,r){"use strict";t.exports=e("../src/traces/image")},{"../src/traces/image":1044}],26:[function(e,t,r){"use strict";var n=e("./core");n.register([e("./bar"),e("./box"),e("./heatmap"),e("./histogram"),e("./histogram2d"),e("./histogram2dcontour"),e("./contour"),e("./scatterternary"),e("./violin"),e("./funnel"),e("./waterfall"),e("./image"),e("./pie"),e("./sunburst"),e("./treemap"),e("./funnelarea"),e("./scatter3d"),e("./surface"),e("./isosurface"),e("./volume"),e("./mesh3d"),e("./cone"),e("./streamtube"),e("./scattergeo"),e("./choropleth"),e("./scattergl"),e("./splom"),e("./pointcloud"),e("./heatmapgl"),e("./parcoords"),e("./parcats"),e("./scattermapbox"),e("./choroplethmapbox"),e("./densitymapbox"),e("./sankey"),e("./indicator"),e("./table"),e("./carpet"),e("./scattercarpet"),e("./contourcarpet"),e("./ohlc"),e("./candlestick"),e("./scatterpolar"),e("./scatterpolargl"),e("./barpolar")]),n.register([e("./aggregate"),e("./filter"),e("./groupby"),e("./sort")]),n.register([e("./calendars")]),t.exports=n},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./image":25,"./indicator":27,"./isosurface":28,"./mesh3d":29,"./ohlc":30,"./parcats":31,"./parcoords":32,"./pie":33,"./pointcloud":34,"./sankey":35,"./scatter3d":36,"./scattercarpet":37,"./scattergeo":38,"./scattergl":39,"./scattermapbox":40,"./scatterpolar":41,"./scatterpolargl":42,"./scatterternary":43,"./sort":44,"./splom":45,"./streamtube":46,"./sunburst":47,"./surface":48,"./table":49,"./treemap":50,"./violin":51,"./volume":52,"./waterfall":53}],27:[function(e,t,r){"use strict";t.exports=e("../src/traces/indicator")},{"../src/traces/indicator":1052}],28:[function(e,t,r){"use strict";t.exports=e("../src/traces/isosurface")},{"../src/traces/isosurface":1058}],29:[function(e,t,r){"use strict";t.exports=e("../src/traces/mesh3d")},{"../src/traces/mesh3d":1063}],30:[function(e,t,r){"use strict";t.exports=e("../src/traces/ohlc")},{"../src/traces/ohlc":1068}],31:[function(e,t,r){"use strict";t.exports=e("../src/traces/parcats")},{"../src/traces/parcats":1077}],32:[function(e,t,r){"use strict";t.exports=e("../src/traces/parcoords")},{"../src/traces/parcoords":1087}],33:[function(e,t,r){"use strict";t.exports=e("../src/traces/pie")},{"../src/traces/pie":1098}],34:[function(e,t,r){"use strict";t.exports=e("../src/traces/pointcloud")},{"../src/traces/pointcloud":1107}],35:[function(e,t,r){"use strict";t.exports=e("../src/traces/sankey")},{"../src/traces/sankey":1113}],36:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatter3d")},{"../src/traces/scatter3d":1150}],37:[function(e,t,r){"use strict";t.exports=e("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1157}],38:[function(e,t,r){"use strict";t.exports=e("../src/traces/scattergeo")},{"../src/traces/scattergeo":1165}],39:[function(e,t,r){"use strict";t.exports=e("../src/traces/scattergl")},{"../src/traces/scattergl":1177}],40:[function(e,t,r){"use strict";t.exports=e("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1187}],41:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1195}],42:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1202}],43:[function(e,t,r){"use strict";t.exports=e("../src/traces/scatterternary")},{"../src/traces/scatterternary":1210}],44:[function(e,t,r){"use strict";t.exports=e("../src/transforms/sort")},{"../src/transforms/sort":1298}],45:[function(e,t,r){"use strict";t.exports=e("../src/traces/splom")},{"../src/traces/splom":1219}],46:[function(e,t,r){"use strict";t.exports=e("../src/traces/streamtube")},{"../src/traces/streamtube":1227}],47:[function(e,t,r){"use strict";t.exports=e("../src/traces/sunburst")},{"../src/traces/sunburst":1235}],48:[function(e,t,r){"use strict";t.exports=e("../src/traces/surface")},{"../src/traces/surface":1244}],49:[function(e,t,r){"use strict";t.exports=e("../src/traces/table")},{"../src/traces/table":1252}],50:[function(e,t,r){"use strict";t.exports=e("../src/traces/treemap")},{"../src/traces/treemap":1261}],51:[function(e,t,r){"use strict";t.exports=e("../src/traces/violin")},{"../src/traces/violin":1273}],52:[function(e,t,r){"use strict";t.exports=e("../src/traces/volume")},{"../src/traces/volume":1281}],53:[function(e,t,r){"use strict";t.exports=e("../src/traces/waterfall")},{"../src/traces/waterfall":1289}],54:[function(e,t,r){"use strict";t.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=n(),d=a(),p=i();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,r,s),p.setDistanceLimits(l[0],l[1]),p.lookAt(0,t,r,s),new o({turntable:u,orbit:d,matrix:p},c)};var n=e("turntable-camera-controller"),a=e("orbit-camera-controller"),i=e("matrix-camera-controller");function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map((function(t){return e[t]})),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach((function(e){for(var t=e[0],r=[],n=0;n<e[1];++n)r.push("a"+n);var a="var cc=this._controllerList;for(var i=0;i<cc.length;++i){cc[i]."+e[0]+"("+r.join()+")}";s[t]=Function.apply(null,r.concat(a))})),s.recalcMatrix=function(e){this._active.recalcMatrix(e)},s.getDistance=function(e){return this._active.getDistance(e)},s.getDistanceLimits=function(e){return this._active.getDistanceLimits(e)},s.lastT=function(){return this._active.lastT()},s.setMode=function(e){if(e!==this._mode){var t=this._controllerNames.indexOf(e);if(!(t<0)){var r=this._active,n=this._controllerList[t],a=Math.max(r.lastT(),n.lastT());r.recalcMatrix(a),n.setMatrix(a,r.computedMatrix),this._active=n,this._mode=e,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}}},s.getMode=function(){return this._mode}},{"matrix-camera-controller":434,"orbit-camera-controller":457,"turntable-camera-controller":540}],55:[function(e,t,r){!function(n,a){"object"==typeof r&&void 0!==t?a(r,e("d3-array"),e("d3-collection"),e("d3-shape"),e("elementary-circuits-directed-graph")):a(n.d3=n.d3||{},n.d3,n.d3,n.d3,null)}(this,(function(e,t,r,n,a){"use strict";function i(e){return e.target.depth}function o(e,t){return e.sourceLinks.length?e.depth:t-1}function s(e){return function(){return e}}a=a&&a.hasOwnProperty("default")?a.default:a;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c(e,t){return d(e.source,t.source)||e.index-t.index}function u(e,t){return d(e.target,t.target)||e.index-t.index}function d(e,t){return e.partOfCycle===t.partOfCycle?e.y0-t.y0:"top"===e.circularLinkType||"bottom"===t.circularLinkType?-1:1}function p(e){return e.value}function h(e){return(e.y0+e.y1)/2}function f(e){return h(e.source)}function m(e){return h(e.target)}function g(e){return e.index}function v(e){return e.nodes}function y(e){return e.links}function b(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function _(e,t){return t(e)}var x=25,w=10,k=.3;function M(e,t){var r=0,n=0;e.links.forEach((function(a){a.circular&&(a.source.circularLinkType||a.target.circularLinkType?a.circularLinkType=a.source.circularLinkType?a.source.circularLinkType:a.target.circularLinkType:a.circularLinkType=r<n?"top":"bottom","top"==a.circularLinkType?r+=1:n+=1,e.nodes.forEach((function(e){_(e,t)!=_(a.source,t)&&_(e,t)!=_(a.target,t)||(e.circularLinkType=a.circularLinkType)})))})),e.links.forEach((function(e){e.circular&&(e.source.circularLinkType==e.target.circularLinkType&&(e.circularLinkType=e.source.circularLinkType),W(e,t)&&(e.circularLinkType=e.source.circularLinkType))}))}function T(e){var t=Math.abs(e.y1-e.y0),r=Math.abs(e.target.x0-e.source.x1);return Math.atan(r/t)}function C(e,t){var r=0;e.sourceLinks.forEach((function(e){r=e.circular&&!W(e,t)?r+1:r}));var n=0;return e.targetLinks.forEach((function(e){n=e.circular&&!W(e,t)?n+1:n})),r+n}function S(e){var t=e.source.sourceLinks,r=0;t.forEach((function(e){r=e.circular?r+1:r}));var n=e.target.targetLinks,a=0;return n.forEach((function(e){a=e.circular?a+1:a})),!(r>1||a>1)}function L(e,t,r){return e.sort(E),e.forEach((function(n,a){var i,o,s=0;if(W(n,r)&&S(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;l<a;l++)if(i=e[a],o=e[l],!(i.source.column<o.target.column||i.target.column>o.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}})),e}function A(e,r,a,i){var o=t.min(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),L(e.links.filter((function(e){return"top"==e.circularLinkType})),r,i),L(e.links.filter((function(e){return"bottom"==e.circularLinkType})),r,i),e.links.forEach((function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+w,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,W(t,i)&&S(t))t.circularPathData.leftSmallArcRadius=w+t.width/2,t.circularPathData.leftLargeArcRadius=w+t.width/2,t.circularPathData.rightSmallArcRadius=w+t.width/2,t.circularPathData.rightLargeArcRadius=w+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+x+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-x-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s=t.source.column,l=t.circularLinkType,c=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==t.circularLinkType?c.sort(I):c.sort(D);var u=0;c.forEach((function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=w+t.width/2+u,t.circularPathData.leftLargeArcRadius=w+t.width/2+n*r+u),u+=e.width})),s=t.target.column,c=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==t.circularLinkType?c.sort(O):c.sort(P),u=0,c.forEach((function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=w+t.width/2+u,t.circularPathData.rightLargeArcRadius=w+t.width/2+n*r+u),u+=e.width})),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(a,t.source.y1,t.target.y1)+x+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=o-x-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}if(t.circular)t.path=function(e){return"top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY}(t);else{var d=n.linkHorizontal().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));t.path=d(t)}}))}function E(e,t){return R(e)==R(t)?"bottom"==e.circularLinkType?I(e,t):D(e,t):R(t)-R(e)}function D(e,t){return e.y0-t.y0}function I(e,t){return t.y0-e.y0}function P(e,t){return e.y1-t.y1}function O(e,t){return t.y1-e.y1}function R(e){return e.target.column-e.source.column}function F(e){return e.target.x0-e.source.x1}function z(e,t){var r=T(e),n=F(t)/Math.tan(r);return"up"==U(e)?e.y1+n:e.y1-n}function N(e,t){var r=T(e),n=F(t)/Math.tan(r);return"up"==U(e)?e.y1-n:e.y1+n}function j(e,t,r,n){e.links.forEach((function(a){if(!a.circular&&a.target.column-a.source.column>1){var i=a.source.column+1,o=a.target.column-1,s=1,l=o-i+1;for(s=1;i<=o;i++,s++)e.nodes.forEach((function(o){if(o.column==i){var c,u=s/(l+1),d=Math.pow(1-u,3),p=3*u*Math.pow(1-u,2),h=3*Math.pow(u,2)*(1-u),f=Math.pow(u,3),m=d*a.y0+p*a.y0+h*a.y1+f*a.y1,g=m-a.width/2,v=m+a.width/2;g>o.y0&&g<o.y1?(c=o.y1-g+10,c="bottom"==o.circularLinkType?c:-c,o=B(o,c,t,r),e.nodes.forEach((function(e){var a,i;_(e,n)!=_(o,n)&&e.column==o.column&&(i=e,(a=o).y0>i.y0&&a.y0<i.y1||a.y1>i.y0&&a.y1<i.y1||a.y0<i.y0&&a.y1>i.y1)&&B(e,c,t,r)}))):v>o.y0&&v<o.y1?(c=v-o.y0+10,o=B(o,c,t,r),e.nodes.forEach((function(e){_(e,n)!=_(o,n)&&e.column==o.column&&e.y0<o.y1&&e.y1>o.y1&&B(e,c,t,r)}))):g<o.y0&&v>o.y1&&(c=v-o.y0+10,o=B(o,c,t,r),e.nodes.forEach((function(e){_(e,n)!=_(o,n)&&e.column==o.column&&e.y0<o.y1&&e.y1>o.y1&&B(e,c,t,r)})))}}))}}))}function B(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function Y(e,t,r,n){e.nodes.forEach((function(a){n&&a.y+(a.y1-a.y0)>t&&(a.y=a.y-(a.y+(a.y1-a.y0)-t));var i=e.links.filter((function(e){return _(e.source,r)==_(a,r)})),o=i.length;o>1&&i.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!V(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var r=N(t,e);return e.y1-r}if(t.target.column>e.target.column)return N(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=a.y0;i.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),i.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,n=0;r<o;r++)n+=i[r].width;e.y0=a.y1-n-e.width/2}}))}))}function H(e,t,r){e.nodes.forEach((function(t){var n=e.links.filter((function(e){return _(e.target,r)==_(t,r)})),a=n.length;a>1&&n.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!V(e,t))return e.y0-t.y0;if(t.source.column<e.source.column){var r=z(t,e);return e.y0-r}if(e.source.column<t.source.column)return z(e,t)-t.y0}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.source.column===t.source.column?e.source.y1-t.source.y1:e.source.column-t.source.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.source.column===t.source.column?e.source.y1-t.source.y1:t.source.column-e.source.column:"top"==e.circularLinkType?-1:1:void 0}));var i=t.y0;n.forEach((function(e){e.y1=i+e.width/2,i+=e.width})),n.forEach((function(e,r){if("bottom"==e.circularLinkType){for(var i=r+1,o=0;i<a;i++)o+=n[i].width;e.y1=t.y1-o-e.width/2}}))}))}function V(e,t){return U(e)==U(t)}function U(e){return e.y0-e.y1>0?"up":"down"}function W(e,t){return _(e.source,t)==_(e.target,t)}e.sankeyCircular=function(){var e,n,i=0,_=0,T=1,S=1,L=24,E=g,D=o,I=v,P=y,O=32,R=2,F=null;function z(){var o={nodes:I.apply(null,arguments),links:P.apply(null,arguments)};!function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=r.map(e.nodes,E);e.links.forEach((function(e,r){e.index=r;var n=e.source,a=e.target;"object"!==(void 0===n?"undefined":l(n))&&(n=e.source=b(t,n)),"object"!==(void 0===a?"undefined":l(a))&&(a=e.target=b(t,a)),n.sourceLinks.push(e),a.targetLinks.push(e)}))}(o),function(e,t,r){var n=0;if(null===r){for(var i=[],o=0;o<e.links.length;o++){var s=e.links[o],l=s.source.index,c=s.target.index;i[l]||(i[l]=[]),i[c]||(i[c]=[]),-1===i[l].indexOf(c)&&i[l].push(c)}var u=a(i);u.sort((function(e,t){return e.length-t.length}));var d={};for(o=0;o<u.length;o++){var p=u[o].slice(-2);d[p[0]]||(d[p[0]]={}),d[p[0]][p[1]]=!0}e.links.forEach((function(e){var t=e.target.index,r=e.source.index;t===r||d[r]&&d[r][t]?(e.circular=!0,e.circularLinkID=n,n+=1):e.circular=!1}))}else e.links.forEach((function(e){e.source[r]<e.target[r]?e.circular=!1:(e.circular=!0,e.circularLinkID=n,n+=1)}))}(o,0,F),function(e){e.nodes.forEach((function(e){e.partOfCycle=!1,e.value=Math.max(t.sum(e.sourceLinks,p),t.sum(e.targetLinks,p)),e.sourceLinks.forEach((function(t){t.circular&&(e.partOfCycle=!0,e.circularLinkType=t.circularLinkType)})),e.targetLinks.forEach((function(t){t.circular&&(e.partOfCycle=!0,e.circularLinkType=t.circularLinkType)}))}))}(o),function(e){var t,r,n;for(t=e.nodes,r=[],n=0;t.length;++n,t=r,r=[])t.forEach((function(e){e.depth=n,e.sourceLinks.forEach((function(e){r.indexOf(e.target)<0&&!e.circular&&r.push(e.target)}))}));for(t=e.nodes,r=[],n=0;t.length;++n,t=r,r=[])t.forEach((function(e){e.height=n,e.targetLinks.forEach((function(e){r.indexOf(e.source)<0&&!e.circular&&r.push(e.source)}))}));e.nodes.forEach((function(e){e.column=Math.floor(D.call(null,e,n))}))}(o),M(o,E),function(a,o,s){var l=r.nest().key((function(e){return e.column})).sortKeys(t.ascending).entries(a.nodes).map((function(e){return e.values}));(function(r){if(n){var o=1/0;l.forEach((function(e){var t=S*n/(e.length+1);o=t<o?t:o})),e=o}var s=t.min(l,(function(r){return(S-_-(r.length-1)*e)/t.sum(r,p)}));s*=k,a.links.forEach((function(e){e.width=e.value*s}));var c=function(e){var r=0,n=0,a=0,i=0,o=t.max(e.nodes,(function(e){return e.column}));return e.links.forEach((function(e){e.circular&&("top"==e.circularLinkType?r+=e.width:n+=e.width,0==e.target.column&&(i+=e.width),e.source.column==o&&(a+=e.width))})),{top:r=r>0?r+x+w:r,bottom:n=n>0?n+x+w:n,left:i=i>0?i+x+w:i,right:a=a>0?a+x+w:a}}(a),u=function(e,r){var n=t.max(e.nodes,(function(e){return e.column})),a=T-i,o=S-_,s=a+r.right+r.left,l=o+r.top+r.bottom,c=a/s,u=o/l;return i=i*c+r.left,T=0==r.right?T:T*c,_=_*u+r.top,S*=u,e.nodes.forEach((function(e){e.x0=i+e.column*((T-i-L)/n),e.x1=e.x0+L})),u}(a,c);s*=u,a.links.forEach((function(e){e.width=e.value*s})),l.forEach((function(e){var t=e.length;e.forEach((function(e,n){e.depth==l.length-1&&1==t?(e.y0=S/2-e.value*s,e.y1=e.y0+e.value*s):0==e.depth&&1==t?(e.y0=S/2-e.value*s,e.y1=e.y0+e.value*s):e.partOfCycle?0==C(e,r)?(e.y0=S/2+n,e.y1=e.y0+e.value*s):"top"==e.circularLinkType?(e.y0=_+n,e.y1=e.y0+e.value*s):(e.y0=S-e.value*s-n,e.y1=e.y0+e.value*s):0==c.top||0==c.bottom?(e.y0=(S-_)/t*n,e.y1=e.y0+e.value*s):(e.y0=(S-_)/2-t/2+n,e.y1=e.y0+e.value*s)}))}))})(s),v();for(var c=1,u=o;u>0;--u)g(c*=.99,s),v();function g(e,r){var n=l.length;l.forEach((function(a){var i=a.length,o=a[0].depth;a.forEach((function(a){var s;if(a.sourceLinks.length||a.targetLinks.length)if(a.partOfCycle&&C(a,r)>0);else if(0==o&&1==i)s=a.y1-a.y0,a.y0=S/2-s/2,a.y1=S/2+s/2;else if(o==n-1&&1==i)s=a.y1-a.y0,a.y0=S/2-s/2,a.y1=S/2+s/2;else{var l=t.mean(a.sourceLinks,m),c=t.mean(a.targetLinks,f),u=((l&&c?(l+c)/2:l||c)-h(a))*e;a.y0+=u,a.y1+=u}}))}))}function v(){l.forEach((function(t){var r,n,a,i=_,o=t.length;for(t.sort(d),a=0;a<o;++a)(n=i-(r=t[a]).y0)>0&&(r.y0+=n,r.y1+=n),i=r.y1+e;if((n=i-e-S)>0)for(i=r.y0-=n,r.y1-=n,a=o-2;a>=0;--a)(n=(r=t[a]).y1+e-i)>0&&(r.y0-=n,r.y1-=n),i=r.y0}))}}(o,O,E),N(o);for(var s=0;s<4;s++)Y(o,S,E),H(o,0,E),j(o,_,S,E),Y(o,S,E),H(o,0,E);return function(e,r,n){var a=e.nodes,i=e.links,o=!1,s=!1;if(i.forEach((function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==o||0==s){var l=t.min(a,(function(e){return e.y0})),c=t.max(a,(function(e){return e.y1})),u=(n-r)/(c-l);a.forEach((function(e){var t=(e.y1-e.y0)*u;e.y0=(e.y0-l)*u,e.y1=e.y0+t})),i.forEach((function(e){e.y0=(e.y0-l)*u,e.y1=(e.y1-l)*u,e.width=e.width*u}))}}(o,_,S),A(o,R,S,E),o}function N(e){e.nodes.forEach((function(e){e.sourceLinks.sort(u),e.targetLinks.sort(c)})),e.nodes.forEach((function(e){var t=e.y0,r=t,n=e.y1,a=n;e.sourceLinks.forEach((function(e){e.circular?(e.y0=n-e.width/2,n-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=a-e.width/2,a-=e.width):(e.y1=r+e.width/2,r+=e.width)}))}))}return z.nodeId=function(e){return arguments.length?(E="function"==typeof e?e:s(e),z):E},z.nodeAlign=function(e){return arguments.length?(D="function"==typeof e?e:s(e),z):D},z.nodeWidth=function(e){return arguments.length?(L=+e,z):L},z.nodePadding=function(t){return arguments.length?(e=+t,z):e},z.nodes=function(e){return arguments.length?(I="function"==typeof e?e:s(e),z):I},z.links=function(e){return arguments.length?(P="function"==typeof e?e:s(e),z):P},z.size=function(e){return arguments.length?(i=_=0,T=+e[0],S=+e[1],z):[T-i,S-_]},z.extent=function(e){return arguments.length?(i=+e[0][0],T=+e[1][0],_=+e[0][1],S=+e[1][1],z):[[i,_],[T,S]]},z.iterations=function(e){return arguments.length?(O=+e,z):O},z.circularLinkGap=function(e){return arguments.length?(R=+e,z):R},z.nodePaddingRatio=function(e){return arguments.length?(n=+e,z):n},z.sortNodes=function(e){return arguments.length?(F=e,z):F},z.update=function(e){return M(e,E),N(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y1<S?"top":"bottom",e.source.circularLinkType=e.circularLinkType,e.target.circularLinkType=e.circularLinkType)})),Y(e,S,E,!1),H(e,0,E),A(e,R,S,E),e},z},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,i)-1:0},e.sankeyLeft=function(e){return e.depth},e.sankeyRight=function(e,t){return t-1-e.height},e.sankeyJustify=o,Object.defineProperty(e,"__esModule",{value:!0})}))},{"d3-array":153,"d3-collection":154,"d3-shape":162,"elementary-circuits-directed-graph":174}],56:[function(e,t,r){!function(n,a){"object"==typeof r&&void 0!==t?a(r,e("d3-array"),e("d3-collection"),e("d3-shape")):a(n.d3=n.d3||{},n.d3,n.d3,n.d3)}(this,(function(e,t,r,n){"use strict";function a(e){return e.target.depth}function i(e,t){return e.sourceLinks.length?e.depth:t-1}function o(e){return function(){return e}}function s(e,t){return c(e.source,t.source)||e.index-t.index}function l(e,t){return c(e.target,t.target)||e.index-t.index}function c(e,t){return e.y0-t.y0}function u(e){return e.value}function d(e){return(e.y0+e.y1)/2}function p(e){return d(e.source)*e.value}function h(e){return d(e.target)*e.value}function f(e){return e.index}function m(e){return e.nodes}function g(e){return e.links}function v(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function y(e){return[e.source.x1,e.y0]}function b(e){return[e.target.x0,e.y1]}e.sankey=function(){var e=0,n=0,a=1,y=1,b=24,_=8,x=f,w=i,k=m,M=g,T=32,C=2/3;function S(){var i={nodes:k.apply(null,arguments),links:M.apply(null,arguments)};return function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=r.map(e.nodes,x);e.links.forEach((function(e,r){e.index=r;var n=e.source,a=e.target;"object"!=typeof n&&(n=e.source=v(t,n)),"object"!=typeof a&&(a=e.target=v(t,a)),n.sourceLinks.push(e),a.targetLinks.push(e)}))}(i),function(e){e.nodes.forEach((function(e){e.value=Math.max(t.sum(e.sourceLinks,u),t.sum(e.targetLinks,u))}))}(i),function(t){var r,n,i;for(r=t.nodes,n=[],i=0;r.length;++i,r=n,n=[])r.forEach((function(e){e.depth=i,e.sourceLinks.forEach((function(e){n.indexOf(e.target)<0&&n.push(e.target)}))}));for(r=t.nodes,n=[],i=0;r.length;++i,r=n,n=[])r.forEach((function(e){e.height=i,e.targetLinks.forEach((function(e){n.indexOf(e.source)<0&&n.push(e.source)}))}));var o=(a-e-b)/(i-1);t.nodes.forEach((function(t){t.x1=(t.x0=e+Math.max(0,Math.min(i-1,Math.floor(w.call(null,t,i))))*o)+b}))}(i),function(e){var a=r.nest().key((function(e){return e.x0})).sortKeys(t.ascending).entries(e.nodes).map((function(e){return e.values}));(function(){var r=t.max(a,(function(e){return e.length})),i=C*(y-n)/(r-1);_>i&&(_=i);var o=t.min(a,(function(e){return(y-n-(e.length-1)*_)/t.sum(e,u)}));a.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*o}))})),e.links.forEach((function(e){e.width=e.value*o}))})(),f();for(var i=1,o=T;o>0;--o)l(i*=.99),f(),s(i),f();function s(e){a.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(t.sum(r.targetLinks,p)/t.sum(r.targetLinks,u)-d(r))*e;r.y0+=n,r.y1+=n}}))}))}function l(e){a.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(t.sum(r.sourceLinks,h)/t.sum(r.sourceLinks,u)-d(r))*e;r.y0+=n,r.y1+=n}}))}))}function f(){a.forEach((function(e){var t,r,a,i=n,o=e.length;for(e.sort(c),a=0;a<o;++a)(r=i-(t=e[a]).y0)>0&&(t.y0+=r,t.y1+=r),i=t.y1+_;if((r=i-_-y)>0)for(i=t.y0-=r,t.y1-=r,a=o-2;a>=0;--a)(r=(t=e[a]).y1+_-i)>0&&(t.y0-=r,t.y1-=r),i=t.y0}))}}(i),L(i),i}function L(e){e.nodes.forEach((function(e){e.sourceLinks.sort(l),e.targetLinks.sort(s)})),e.nodes.forEach((function(e){var t=e.y0,r=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=r+e.width/2,r+=e.width}))}))}return S.update=function(e){return L(e),e},S.nodeId=function(e){return arguments.length?(x="function"==typeof e?e:o(e),S):x},S.nodeAlign=function(e){return arguments.length?(w="function"==typeof e?e:o(e),S):w},S.nodeWidth=function(e){return arguments.length?(b=+e,S):b},S.nodePadding=function(e){return arguments.length?(_=+e,S):_},S.nodes=function(e){return arguments.length?(k="function"==typeof e?e:o(e),S):k},S.links=function(e){return arguments.length?(M="function"==typeof e?e:o(e),S):M},S.size=function(t){return arguments.length?(e=n=0,a=+t[0],y=+t[1],S):[a-e,y-n]},S.extent=function(t){return arguments.length?(e=+t[0][0],a=+t[1][0],n=+t[0][1],y=+t[1][1],S):[[e,n],[a,y]]},S.iterations=function(e){return arguments.length?(T=+e,S):T},S},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,a)-1:0},e.sankeyLeft=function(e){return e.depth},e.sankeyRight=function(e,t){return t-1-e.height},e.sankeyJustify=i,e.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(b)},Object.defineProperty(e,"__esModule",{value:!0})}))},{"d3-array":153,"d3-collection":154,"d3-shape":162}],57:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("@turf/meta"),a=6378137;function i(e){var t=0;if(e&&e.length>0){t+=Math.abs(o(e[0]));for(var r=1;r<e.length;r++)t-=Math.abs(o(e[r]))}return t}function o(e){var t,r,n,i,o,l,c=0,u=e.length;if(u>2){for(l=0;l<u;l++)l===u-2?(n=u-2,i=u-1,o=0):l===u-1?(n=u-1,i=0,o=1):(n=l,i=l+1,o=l+2),t=e[n],r=e[i],c+=(s(e[o][0])-s(t[0]))*Math.sin(s(r[1]));c=c*a*a/2}return c}function s(e){return e*Math.PI/180}r.default=function(e){return n.geomReduce(e,(function(e,t){return e+function(e){var t,r=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)r+=i(e.coordinates[t]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)}),0)}},{"@turf/meta":60}],58:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("@turf/meta"),a=e("@turf/helpers");r.default=function(e,t){void 0===t&&(t={});var r=0,i=0,o=0;return n.coordEach(e,(function(e){r+=e[0],i+=e[1],o++})),a.point([r/o,i/o],t.properties)}},{"@turf/helpers":59,"@turf/meta":60}],59:[function(e,t,r){"use strict";function n(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function a(e,t,r){return void 0===r&&(r={}),n({type:"Point",coordinates:e},t,r)}function i(e,t,r){void 0===r&&(r={});for(var a=0,i=e;a<i.length;a++){var o=i[a];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return n({type:"Polygon",coordinates:e},t,r)}function o(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return n({type:"LineString",coordinates:e},t,r)}function s(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function l(e,t,r){return void 0===r&&(r={}),n({type:"MultiLineString",coordinates:e},t,r)}function c(e,t,r){return void 0===r&&(r={}),n({type:"MultiPoint",coordinates:e},t,r)}function u(e,t,r){return void 0===r&&(r={}),n({type:"MultiPolygon",coordinates:e},t,r)}function d(e,t){void 0===t&&(t="kilometers");var n=r.factors[t];if(!n)throw new Error(t+" units is invalid");return e*n}function p(e,t){void 0===t&&(t="kilometers");var n=r.factors[t];if(!n)throw new Error(t+" units is invalid");return e/n}function h(e){return e%(2*Math.PI)*180/Math.PI}function f(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)&&!/^\s*$/.test(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=6371008.8,r.factors={centimeters:100*r.earthRadius,centimetres:100*r.earthRadius,degrees:r.earthRadius/111325,feet:3.28084*r.earthRadius,inches:39.37*r.earthRadius,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:1e3*r.earthRadius,millimetres:1e3*r.earthRadius,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius/1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r.earthRadius,yards:1/1.0936},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},r.feature=n,r.geometry=function(e,t,r){switch(void 0===r&&(r={}),e){case"Point":return a(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return i(t).geometry;case"MultiPoint":return c(t).geometry;case"MultiLineString":return l(t).geometry;case"MultiPolygon":return u(t).geometry;default:throw new Error(e+" is invalid")}},r.point=a,r.points=function(e,t,r){return void 0===r&&(r={}),s(e.map((function(e){return a(e,t)})),r)},r.polygon=i,r.polygons=function(e,t,r){return void 0===r&&(r={}),s(e.map((function(e){return i(e,t)})),r)},r.lineString=o,r.lineStrings=function(e,t,r){return void 0===r&&(r={}),s(e.map((function(e){return o(e,t)})),r)},r.featureCollection=s,r.multiLineString=l,r.multiPoint=c,r.multiPolygon=u,r.geometryCollection=function(e,t,r){return void 0===r&&(r={}),n({type:"GeometryCollection",geometries:e},t,r)},r.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,t||0);return Math.round(e*r)/r},r.radiansToLength=d,r.lengthToRadians=p,r.lengthToDegrees=function(e,t){return h(p(e,t))},r.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},r.radiansToDegrees=h,r.degreesToRadians=function(e){return e%360*Math.PI/180},r.convertLength=function(e,t,r){if(void 0===t&&(t="kilometers"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("length must be a positive number");return d(p(e,t),r)},r.convertArea=function(e,t,n){if(void 0===t&&(t="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var a=r.areaFactors[t];if(!a)throw new Error("invalid original units");var i=r.areaFactors[n];if(!i)throw new Error("invalid final units");return e/a*i},r.isNumber=f,r.isObject=function(e){return!!e&&e.constructor===Object},r.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!f(e))throw new Error("bbox must only contain numbers")}))},r.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")},r.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},r.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},r.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},r.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},r.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},r.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},r.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],60:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("@turf/helpers");function a(e,t,r){if(null!==e)for(var n,i,o,s,l,c,u,d,p=0,h=0,f=e.type,m="FeatureCollection"===f,g="Feature"===f,v=m?e.features.length:1,y=0;y<v;y++){l=(d=!!(u=m?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var b=0;b<l;b++){var _=0,x=0;if(null!==(s=d?u.geometries[b]:u)){c=s.coordinates;var w=s.type;switch(p=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(c,h,y,_,x))return!1;h++,_++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(!1===t(c[n],h,y,_,x))return!1;h++,"MultiPoint"===w&&_++}"LineString"===w&&_++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(i=0;i<c[n].length-p;i++){if(!1===t(c[n][i],h,y,_,x))return!1;h++}"MultiLineString"===w&&_++,"Polygon"===w&&x++}"Polygon"===w&&_++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(x=0,i=0;i<c[n].length;i++){for(o=0;o<c[n][i].length-p;o++){if(!1===t(c[n][i][o],h,y,_,x))return!1;h++}x++}_++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(!1===a(s.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function i(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&!1!==t(e.features[r].properties,r);r++);break;case"Feature":t(e.properties,0)}}function o(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var r=0;r<e.features.length&&!1!==t(e.features[r],r);r++);}function s(e,t){var r,n,a,i,o,s,l,c,u,d,p=0,h="FeatureCollection"===e.type,f="Feature"===e.type,m=h?e.features.length:1;for(r=0;r<m;r++){for(s=h?e.features[r].geometry:f?e.geometry:e,c=h?e.features[r].properties:f?e.properties:{},u=h?e.features[r].bbox:f?e.bbox:void 0,d=h?e.features[r].id:f?e.id:void 0,o=(l=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,a=0;a<o;a++)if(null!==(i=l?s.geometries[a]:s))switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(i,p,c,u,d))return!1;break;case"GeometryCollection":for(n=0;n<i.geometries.length;n++)if(!1===t(i.geometries[n],p,c,u,d))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,p,c,u,d))return!1;p++}}function l(e,t){s(e,(function(e,r,a,i,o){var s,l=null===e?null:e.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==t(n.feature(e,a,{bbox:i,id:o}),r,0)&&void 0}switch(l){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var c=0;c<e.coordinates.length;c++){var u={type:s,coordinates:e.coordinates[c]};if(!1===t(n.feature(u,a),r,c))return!1}}))}function c(e,t){l(e,(function(e,r,i){var o=0;if(e.geometry){var s=e.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var l,c=0,u=0,d=0;return!1!==a(e,(function(a,s,p,h,f){if(void 0===l||r>c||h>u||f>d)return l=a,c=r,u=h,d=f,void(o=0);var m=n.lineString([l,a],e.properties);if(!1===t(m,r,i,f,o))return!1;o++,l=a}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");l(e,(function(e,r,a){if(null!==e.geometry){var i=e.geometry.type,o=e.geometry.coordinates;switch(i){case"LineString":if(!1===t(e,r,a,0,0))return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(!1===t(n.lineString(o[s],e.properties),r,a,s))return!1}}}))}r.coordEach=a,r.coordReduce=function(e,t,r,n){var i=r;return a(e,(function(e,n,a,o,s){i=0===n&&void 0===r?e:t(i,e,n,a,o,s)}),n),i},r.propEach=i,r.propReduce=function(e,t,r){var n=r;return i(e,(function(e,a){n=0===a&&void 0===r?e:t(n,e,a)})),n},r.featureEach=o,r.featureReduce=function(e,t,r){var n=r;return o(e,(function(e,a){n=0===a&&void 0===r?e:t(n,e,a)})),n},r.coordAll=function(e){var t=[];return a(e,(function(e){t.push(e)})),t},r.geomEach=s,r.geomReduce=function(e,t,r){var n=r;return s(e,(function(e,a,i,o,s){n=0===a&&void 0===r?e:t(n,e,a,i,o,s)})),n},r.flattenEach=l,r.flattenReduce=function(e,t,r){var n=r;return l(e,(function(e,a,i){n=0===a&&0===i&&void 0===r?e:t(n,e,a,i)})),n},r.segmentEach=c,r.segmentReduce=function(e,t,r){var n=r,a=!1;return c(e,(function(e,i,o,s,l){n=!1===a&&void 0===r?e:t(n,e,i,o,s,l),a=!0})),n},r.lineEach=u,r.lineReduce=function(e,t,r){var n=r;return u(e,(function(e,a,i,o){n=0===a&&void 0===r?e:t(n,e,a,i,o)})),n},r.findSegment=function(e,t){if(t=t||{},!n.isObject(t))throw new Error("options is invalid");var r,a=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,s=t.segmentIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":a<0&&(a=e.features.length+a),l=l||e.features[a].properties,r=e.features[a].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var c=r.coordinates;switch(r.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=c.length+s-1),n.lineString([c[s],c[s+1]],l,t);case"Polygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s-1),n.lineString([c[o][s],c[o][s+1]],l,t);case"MultiLineString":return i<0&&(i=c.length+i),s<0&&(s=c[i].length+s-1),n.lineString([c[i][s],c[i][s+1]],l,t);case"MultiPolygon":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o),s<0&&(s=c[i][o].length-s-1),n.lineString([c[i][o][s],c[i][o][s+1]],l,t)}throw new Error("geojson is invalid")},r.findPoint=function(e,t){if(t=t||{},!n.isObject(t))throw new Error("options is invalid");var r,a=t.featureIndex||0,i=t.multiFeatureIndex||0,o=t.geometryIndex||0,s=t.coordIndex||0,l=t.properties;switch(e.type){case"FeatureCollection":a<0&&(a=e.features.length+a),l=l||e.features[a].properties,r=e.features[a].geometry;break;case"Feature":l=l||e.properties,r=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":r=e;break;default:throw new Error("geojson is invalid")}if(null===r)return null;var c=r.coordinates;switch(r.type){case"Point":return n.point(c,l,t);case"MultiPoint":return i<0&&(i=c.length+i),n.point(c[i],l,t);case"LineString":return s<0&&(s=c.length+s),n.point(c[s],l,t);case"Polygon":return o<0&&(o=c.length+o),s<0&&(s=c[o].length+s),n.point(c[o][s],l,t);case"MultiLineString":return i<0&&(i=c.length+i),s<0&&(s=c[i].length+s),n.point(c[i][s],l,t);case"MultiPolygon":return i<0&&(i=c.length+i),o<0&&(o=c[i].length+o),s<0&&(s=c[i][o].length-s),n.point(c[i][o][s],l,t)}throw new Error("geojson is invalid")}},{"@turf/helpers":59}],61:[function(e,t,r){"use strict";var n="undefined"==typeof WeakMap?e("weak-map"):WeakMap,a=e("gl-buffer"),i=e("gl-vao"),o=new n;t.exports=function(e){var t=o.get(e),r=t&&(t._triangleBuffer.handle||t._triangleBuffer.buffer);if(!r||!e.isBuffer(r)){var n=a(e,new Float32Array([-1,-1,-1,4,4,-1]));(t=i(e,[{buffer:n,type:e.FLOAT,size:2}]))._triangleBuffer=n,o.set(e,t)}t.bind(),e.drawArrays(e.TRIANGLES,0,3),t.unbind()}},{"gl-buffer":243,"gl-vao":328,"weak-map":550}],62:[function(e,t,r){t.exports=function(e){var t=0,r=0,n=0,a=0;return e.map((function(e){var i=(e=e.slice())[0],o=i.toUpperCase();if(i!=o)switch(e[0]=o,i){case"a":e[6]+=n,e[7]+=a;break;case"v":e[1]+=a;break;case"h":e[1]+=n;break;default:for(var s=1;s<e.length;)e[s++]+=n,e[s++]+=a}switch(o){case"Z":n=t,a=r;break;case"H":n=e[1];break;case"V":a=e[1];break;case"M":n=t=e[1],a=r=e[2];break;default:n=e[e.length-2],a=e[e.length-1]}return e}))}},{}],63:[function(e,t,r){var n=e("pad-left");t.exports=function(e,t,r){t="number"==typeof t?t:1,r=r||": ";var a=e.split(/\r?\n/),i=String(a.length+t-1).length;return a.map((function(e,a){var o=a+t,s=String(o).length;return n(o,i-s)+r+e})).join("\n")}},{"pad-left":458}],64:[function(e,t,r){"use strict";t.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[0];for(var r=e[0].length,n=[e[0]],i=[0],o=1;o<t;++o)if(n.push(e[o]),a(n,r)){if(i.push(o),i.length===r+1)return i}else n.pop();return i};var n=e("robust-orientation");function a(e,t){for(var r=new Array(t+1),a=0;a<e.length;++a)r[a]=e[a];for(a=0;a<=e.length;++a){for(var i=e.length;i<=t;++i){for(var o=new Array(t),s=0;s<t;++s)o[s]=Math.pow(i+1-a,s);r[i]=o}if(n.apply(void 0,r))return!0}return!1}},{"robust-orientation":508}],65:[function(e,t,r){"use strict";t.exports=function(e,t){return n(t).filter((function(r){for(var n=new Array(r.length),i=0;i<r.length;++i)n[i]=t[r[i]];return a(n)*e<1}))};var n=e("delaunay-triangulate"),a=e("circumradius")},{circumradius:115,"delaunay-triangulate":166}],66:[function(e,t,r){t.exports=function(e,t){return a(n(e,t))};var n=e("alpha-complex"),a=e("simplicial-complex-boundary")},{"alpha-complex":65,"simplicial-complex-boundary":515}],67:[function(e,t,r){"use strict";t.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),n=0;n<t;n++){for(var a=-1/0,i=1/0,o=n,s=e.length;o<s;o+=t)e[o]>a&&(a=e[o]),e[o]<i&&(i=e[o]);r[n]=i,r[t+n]=a}return r}},{}],68:[function(e,t,r){t.exports=function(e,t){var r="number"==typeof e,n="number"==typeof t;r&&!n?(t=e,e=0):r||n||(e=0,t=0);var a=(t|=0)-(e|=0);if(a<0)throw new Error("array length must be positive");for(var i=new Array(a),o=0,s=e;o<a;o++,s++)i[o]=s;return i}},{}],69:[function(e,r,n){(function(t){"use strict";var n=e("object-assign");
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */function a(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a<i;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0}function i(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=e("util/"),s=Object.prototype.hasOwnProperty,l=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function d(e){return!i(e)&&"function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var p=r.exports=y,h=/\s*function\s+([^\(\s]*)\s*/;function f(e){if(o.isFunction(e)){if(c)return e.name;var t=e.toString().match(h);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(c||!o.isFunction(e))return o.inspect(e);var t=f(e);return"[Function"+(t?": "+t:"")+"]"}function v(e,t,r,n,a){throw new p.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:a})}function y(e,t){e||v(e,!0,t,"==",p.ok)}function b(e,t,r,n){if(e===t)return!0;if(i(e)&&i(t))return 0===a(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(d(e)&&d(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===a(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var s=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var a=_(e),i=_(t);if(a&&!i||!a&&i)return!1;if(a)return e=l.call(e),t=l.call(t),b(e,t,r);var s,c,u=k(e),d=k(t);if(u.length!==d.length)return!1;for(u.sort(),d.sort(),c=u.length-1;c>=0;c--)if(u[c]!==d[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!b(e[s],t[s],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,r,n){var a;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),a=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!a&&v(a,r,"Missing expected exception"+n);var i="string"==typeof n,s=!e&&a&&!r;if((!e&&o.isError(a)&&i&&x(a,r)||s)&&v(a,r,"Got unwanted exception"+n),e&&a&&r&&!x(a,r)||!e&&a)throw a}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,a=f(t),i=n.indexOf("\n"+a);if(i>=0){var o=n.indexOf("\n",i+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(p.AssertionError,Error),p.fail=v,p.ok=y,p.equal=function(e,t,r){e!=t&&v(e,t,r,"==",p.equal)},p.notEqual=function(e,t,r){e==t&&v(e,t,r,"!=",p.notEqual)},p.deepEqual=function(e,t,r){b(e,t,!1)||v(e,t,r,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,r){b(e,t,!0)||v(e,t,r,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,r){b(e,t,!1)&&v(e,t,r,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,r,n){b(t,r,!0)&&v(t,r,n,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,r){e!==t&&v(e,t,r,"===",p.strictEqual)},p.notStrictEqual=function(e,t,r){e===t&&v(e,t,r,"!==",p.notStrictEqual)},p.throws=function(e,t,r){w(!0,e,t,r)},p.doesNotThrow=function(e,t,r){w(!1,e,t,r)},p.ifError=function(e){if(e)throw e},p.strict=n((function e(t,r){t||v(t,!0,r,"==",e)}),p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var k=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":455,"util/":72}],70:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],71:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],72:[function(e,r,n){(function(t,r){var a=/%[sdj%]/g;n.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,o=String(e).replace(a,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),l=n[r];r<i;l=n[++r])m(l)||!_(l)?o+=" "+l:o+=" "+s(l);return o},n.deprecate=function(e,a){if(y(r.process))return function(){return n.deprecate(e,a).apply(this,arguments)};if(!0===t.noDeprecation)return e;var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(a);t.traceDeprecation?console.trace(a):console.error(a),i=!0}return e.apply(this,arguments)}};var i,o={};function s(e,t){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),f(t)?r.showHidden=t:t&&n._extend(r,t),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),u(r,e,r.depth)}function l(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,t,r){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var a=t.inspect(r,e);return v(a)||(a=u(e,a,r)),a}var i=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var o=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),w(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return d(t);if(0===o.length){if(k(t)){var l=t.name?": "+t.name:"";return e.stylize("[Function"+l+"]","special")}if(b(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(x(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return d(t)}var c,_="",M=!1,T=["{","}"];return h(t)&&(M=!0,T=["[","]"]),k(t)&&(_=" [Function"+(t.name?": "+t.name:"")+"]"),b(t)&&(_=" "+RegExp.prototype.toString.call(t)),x(t)&&(_=" "+Date.prototype.toUTCString.call(t)),w(t)&&(_=" "+d(t)),0!==o.length||M&&0!=t.length?r<0?b(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=M?function(e,t,r,n,a){for(var i=[],o=0,s=t.length;o<s;++o)L(t,String(o))?i.push(p(e,t,r,n,String(o),!0)):i.push("");return a.forEach((function(a){a.match(/^\d+$/)||i.push(p(e,t,r,n,a,!0))})),i}(e,t,r,s,o):o.map((function(n){return p(e,t,r,s,n,M)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,_,T)):T[0]+_+T[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,a,i){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,a)||{value:t[a]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),L(n,a)||(o="["+a+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?u(e,l.value,null):u(e,l.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),y(o)){if(i&&a.match(/^\d+$/))return s;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function y(e){return void 0===e}function b(e){return _(e)&&"[object RegExp]"===M(e)}function _(e){return"object"==typeof e&&null!==e}function x(e){return _(e)&&"[object Date]"===M(e)}function w(e){return _(e)&&("[object Error]"===M(e)||e instanceof Error)}function k(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}n.debuglog=function(e){if(y(i)&&(i=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var r=t.pid;o[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else o[e]=function(){};return o[e]},n.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=h,n.isBoolean=f,n.isNull=m,n.isNullOrUndefined=function(e){return null==e},n.isNumber=g,n.isString=v,n.isSymbol=function(e){return"symbol"==typeof e},n.isUndefined=y,n.isRegExp=b,n.isObject=_,n.isDate=x,n.isError=w,n.isFunction=k,n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},n.isBuffer=e("./support/isBuffer");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.log=function(){console.log("%s - %s",S(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":71,_process:483,inherits:70}],73:[function(e,t,r){t.exports=function(e){return atob(e)}},{}],74:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=t.length,i=new Array(r+1),o=0;o<r;++o){for(var s=new Array(r+1),l=0;l<=r;++l)s[l]=e[l][o];i[o]=s}for(i[r]=new Array(r+1),o=0;o<=r;++o)i[r][o]=1;var c=new Array(r+1);for(o=0;o<r;++o)c[o]=t[o];c[r]=1;var u=n(i,c),d=a(u[r+1]);0===d&&(d=1);var p=new Array(r+1);for(o=0;o<=r;++o)p[o]=a(u[o])/d;return p};var n=e("robust-linear-solve");function a(e){for(var t=0,r=0;r<e.length;++r)t+=e[r];return t}},{"robust-linear-solve":507}],75:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=c(e),o=n[0],s=n[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),u=0,d=s>0?o-4:o;for(r=0;r<d;r+=4)t=a[e.charCodeAt(r)]<<18|a[e.charCodeAt(r+1)]<<12|a[e.charCodeAt(r+2)]<<6|a[e.charCodeAt(r+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,l[u++]=255&t),1===s&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},r.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],o=0,s=r-a;o<s;o+=16383)i.push(u(e,o,o+16383>s?s:o+16383));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s<l;++s)n[s]=o[s],a[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var a,i,o=[],s=t;s<r;s+=3)a=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],76:[function(e,t,r){"use strict";var n=e("./lib/rationalize");t.exports=function(e,t){return n(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},{"./lib/rationalize":86}],77:[function(e,t,r){"use strict";t.exports=function(e,t){return e[0].mul(t[1]).cmp(t[0].mul(e[1]))}},{}],78:[function(e,t,r){"use strict";var n=e("./lib/rationalize");t.exports=function(e,t){return n(e[0].mul(t[1]),e[1].mul(t[0]))}},{"./lib/rationalize":86}],79:[function(e,t,r){"use strict";var n=e("./is-rat"),a=e("./lib/is-bn"),i=e("./lib/num-to-bn"),o=e("./lib/str-to-bn"),s=e("./lib/rationalize"),l=e("./div");t.exports=function e(t,r){if(n(t))return r?l(t,e(r)):[t[0].clone(),t[1].clone()];var c,u,d=0;if(a(t))c=t.clone();else if("string"==typeof t)c=o(t);else{if(0===t)return[i(0),i(1)];if(t===Math.floor(t))c=i(t);else{for(;t!==Math.floor(t);)t*=Math.pow(2,256),d-=256;c=i(t)}}if(n(r))c.mul(r[1]),u=r[0].clone();else if(a(r))u=r.clone();else if("string"==typeof r)u=o(r);else if(r)if(r===Math.floor(r))u=i(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),d+=256;u=i(r)}else u=i(1);return d>0?c=c.ushln(d):d<0&&(u=u.ushln(-d)),s(c,u)}},{"./div":78,"./is-rat":80,"./lib/is-bn":84,"./lib/num-to-bn":85,"./lib/rationalize":86,"./lib/str-to-bn":87}],80:[function(e,t,r){"use strict";var n=e("./lib/is-bn");t.exports=function(e){return Array.isArray(e)&&2===e.length&&n(e[0])&&n(e[1])}},{"./lib/is-bn":84}],81:[function(e,t,r){"use strict";var n=e("bn.js");t.exports=function(e){return e.cmp(new n(0))}},{"bn.js":95}],82:[function(e,t,r){"use strict";var n=e("./bn-sign");t.exports=function(e){var t=e.length,r=e.words,a=0;if(1===t)a=r[0];else if(2===t)a=r[0]+67108864*r[1];else for(var i=0;i<t;i++){var o=r[i];a+=o*Math.pow(67108864,i)}return n(e)*a}},{"./bn-sign":81}],83:[function(e,t,r){"use strict";var n=e("double-bits"),a=e("bit-twiddle").countTrailingZeros;t.exports=function(e){var t=a(n.lo(e));if(t<32)return t;var r=a(n.hi(e));return r>20?52:r+32}},{"bit-twiddle":93,"double-bits":168}],84:[function(e,t,r){"use strict";e("bn.js"),t.exports=function(e){return e&&"object"==typeof e&&Boolean(e.words)}},{"bn.js":95}],85:[function(e,t,r){"use strict";var n=e("bn.js"),a=e("double-bits");t.exports=function(e){var t=a.exponent(e);return t<52?new n(e):new n(e*Math.pow(2,52-t)).ushln(t-52)}},{"bn.js":95,"double-bits":168}],86:[function(e,t,r){"use strict";var n=e("./num-to-bn"),a=e("./bn-sign");t.exports=function(e,t){var r=a(e),i=a(t);if(0===r)return[n(0),n(1)];if(0===i)return[n(0),n(0)];i<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);return o.cmpn(1)?[e.div(o),t.div(o)]:[e,t]}},{"./bn-sign":81,"./num-to-bn":85}],87:[function(e,t,r){"use strict";var n=e("bn.js");t.exports=function(e){return new n(e)}},{"bn.js":95}],88:[function(e,t,r){"use strict";var n=e("./lib/rationalize");t.exports=function(e,t){return n(e[0].mul(t[0]),e[1].mul(t[1]))}},{"./lib/rationalize":86}],89:[function(e,t,r){"use strict";var n=e("./lib/bn-sign");t.exports=function(e){return n(e[0])*n(e[1])}},{"./lib/bn-sign":81}],90:[function(e,t,r){"use strict";var n=e("./lib/rationalize");t.exports=function(e,t){return n(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},{"./lib/rationalize":86}],91:[function(e,t,r){"use strict";var n=e("./lib/bn-to-num"),a=e("./lib/ctz");t.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var i=t.abs().divmod(r.abs()),o=i.div,s=n(o),l=i.mod,c=t.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=a(s)+4,d=n(l.ushln(u).divRound(r));return c*(s+d*Math.pow(2,-u))}var p=r.bitLength()-l.bitLength()+53;return d=n(l.ushln(p).divRound(r)),p<1023?c*d*Math.pow(2,-p):(d*=Math.pow(2,-1023),c*d*Math.pow(2,1023-p))}},{"./lib/bn-to-num":82,"./lib/ctz":83}],92:[function(e,t,r){"use strict";function n(e,t,r,n,a,i){var o=["function ",e,"(a,l,h,",n.join(","),"){",i?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",a?".get(m)":"[m]"];return i?t.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",t,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),i?o.push("return -1};"):o.push("return i};"),o.join("")}function a(e,t,r,a){return new Function([n("A","x"+e+"y",t,["y"],!1,a),n("B","x"+e+"y",t,["y"],!0,a),n("P","c(x,y)"+e+"0",t,["y","c"],!1,a),n("Q","c(x,y)"+e+"0",t,["y","c"],!0,a),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}t.exports={ge:a(">=",!1,"GE"),gt:a(">",!1,"GT"),lt:a("<",!0,"LT"),le:a("<=",!0,"LE"),eq:a("-",!0,"EQ",!0)}},{}],93:[function(e,t,r){"use strict";function n(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(e){return(e>0)-(e<0)},r.abs=function(e){var t=e>>31;return(e^t)-t},r.min=function(e,t){return t^(e^t)&-(e<t)},r.max=function(e,t){return e^(e^t)&-(e<t)},r.isPow2=function(e){return!(e&e-1||!e)},r.log2=function(e){var t,r;return t=(e>65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},r.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},r.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)},r.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},r.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var a=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--a;e[t]=n<<a&255}}(a),r.reverse=function(e){return a[255&e]<<24|a[e>>>8&255]<<16|a[e>>>16&255]<<8|a[e>>>24&255]},r.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},r.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},r.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},r.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},{}],94:[function(e,t,r){"use strict";var n=e("clamp");t.exports=function(e,t){t||(t={});var r,o,s,l,c,u,d,p,h,f,m,g=null==t.cutoff?.25:t.cutoff,v=null==t.radius?8:t.radius,y=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,o=t.height,l=e,u=t.stride?t.stride:Math.floor(e.length/r/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(d=(p=e).getContext("2d"),r=p.width,o=p.height,h=d.getImageData(0,0,r,o),l=h.data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,d=e,r=p.width,o=p.height,h=d.getImageData(0,0,r,o),l=h.data,u=4):window.ImageData&&e instanceof window.ImageData&&(h=e,r=e.width,o=e.height,l=h.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),f=0,m=c.length;f<m;f++)l[f]=c[f*u+y]/255;else if(1!==u)throw Error("Raw data can have only 1 value per pixel");var b=Array(r*o),_=Array(r*o),x=Array(s),w=Array(s),k=Array(s+1),M=Array(s);for(f=0,m=r*o;f<m;f++){var T=l[f];b[f]=1===T?0:0===T?a:Math.pow(Math.max(0,.5-T),2),_[f]=1===T?a:0===T?0:Math.pow(Math.max(0,T-.5),2)}i(b,r,o,x,w,M,k),i(_,r,o,x,w,M,k);var C=window.Float32Array?new Float32Array(r*o):new Array(r*o);for(f=0,m=r*o;f<m;f++)C[f]=n(1-((b[f]-_[f])/v+g),0,1);return C};var a=1e20;function i(e,t,r,n,a,i,s){for(var l=0;l<t;l++){for(var c=0;c<r;c++)n[c]=e[c*t+l];for(o(n,a,i,s,r),c=0;c<r;c++)e[c*t+l]=a[c]}for(c=0;c<r;c++){for(l=0;l<t;l++)n[l]=e[c*t+l];for(o(n,a,i,s,t),l=0;l<t;l++)e[c*t+l]=Math.sqrt(a[l])}}function o(e,t,r,n,i){r[0]=0,n[0]=-a,n[1]=+a;for(var o=1,s=0;o<i;o++){for(var l=(e[o]+o*o-(e[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);l<=n[s];)s--,l=(e[o]+o*o-(e[r[s]]+r[s]*r[s]))/(2*o-2*r[s]);r[++s]=o,n[s]=l,n[s+1]=+a}for(o=0,s=0;o<i;o++){for(;n[s+1]<o;)s++;t[o]=(o-r[s])*(o-r[s])+e[r[s]]}}},{clamp:116}],95:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof t?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;try{o=e("buffer").Buffer}catch(e){}function s(e,t,r){for(var n=0,a=Math.min(e.length,r),i=t;i<a;i++){var o=e.charCodeAt(i)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(e,t,r,n){for(var a=0,i=Math.min(e.length,r),o=t;o<i;o++){var s=e.charCodeAt(o)-48;a*=n,a+=s>=49?s-49+10:s>=17?s-17+10:s}return a}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&a++,16===t?this._parseHex(e,a):this._parseBase(e,t,a),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var i,o,s=0;if("be"===r)for(a=e.length-1,i=0;a>=0;a-=3)o=e[a]|e[a-1]<<8|e[a-2]<<16,this.words[i]|=o<<s&67108863,this.words[i+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(a=0,i=0;a<e.length;a+=3)o=e[a]|e[a+1]<<8|e[a+2]<<16,this.words[i]|=o<<s&67108863,this.words[i+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,a,i=0;for(r=e.length-6,n=0;r>=t;r-=6)a=s(e,r,r+6),this.words[n]|=a<<i&67108863,this.words[n+1]|=a>>>26-i&4194303,(i+=24)>=26&&(i-=26,n++);r+6!==t&&(a=s(e,t,r+6),this.words[n]|=a<<i&67108863,this.words[n+1]|=a>>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,a=1;a<=67108863;a*=t)n++;n--,a=a/t|0;for(var i=e.length-r,o=i%n,s=Math.min(i,i-o)+r,c=0,u=r;u<s;u+=n)c=l(e,u,u+n,t),this.imuln(a),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var d=1;for(c=l(e,u,e.length,t),u=0;u<o;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],i=0|t.words[0],o=a*i,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var u=l>>>26,d=67108863&l,p=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=p;h++){var f=c-h|0;u+=(o=(a=0|e.words[f])*(i=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[c]=0|d,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var a=0,i=0,o=0;o<this.length;o++){var s=this.words[o],l=(16777215&(s<<a|i)).toString(16);r=0!=(i=s>>>24-a&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(a+=2)>=26&&(a-=26,o--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var p=u[e],h=d[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(h).toString(e);r=(f=f.idivn(h)).isZero()?m+r:c[p-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var a=this.byteLength(),i=r||Math.max(1,a);n(a<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===t,c=new e(i),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s<i;s++)c[s]=0}else{for(s=0;s<i-a;s++)c[s]=0;for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[i-s-1]=o}return c},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var a=0;a<t;a++)this.words[a]=67108863&~this.words[a];return r>0&&(this.words[a]=~this.words[a]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,a=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<a:this.words[r]&~(1<<a),this.strip()},i.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var a=0,i=0;i<n.length;i++)t=(0|r.words[i])+(0|n.words[i])+a,this.words[i]=67108863&t,a=t>>>26;for(;0!==a&&i<r.length;i++)t=(0|r.words[i])+a,this.words[i]=67108863&t,a=t>>>26;if(this.length=r.length,0!==a)this.words[this.length]=a,this.length++;else if(r!==this)for(;i<r.length;i++)this.words[i]=r.words[i];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,a=this.cmp(e);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)i=(t=(0|r.words[o])-(0|n.words[o])+i)>>26,this.words[o]=67108863&t;for(;0!==i&&o<r.length;o++)i=(t=(0|r.words[o])+i)>>26,this.words[o]=67108863&t;if(0===i&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,r){var n,a,i,o=e.words,s=t.words,l=r.words,c=0,u=0|o[0],d=8191&u,p=u>>>13,h=0|o[1],f=8191&h,m=h>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],_=8191&b,x=b>>>13,w=0|o[4],k=8191&w,M=w>>>13,T=0|o[5],C=8191&T,S=T>>>13,L=0|o[6],A=8191&L,E=L>>>13,D=0|o[7],I=8191&D,P=D>>>13,O=0|o[8],R=8191&O,F=O>>>13,z=0|o[9],N=8191&z,j=z>>>13,B=0|s[0],Y=8191&B,H=B>>>13,V=0|s[1],U=8191&V,W=V>>>13,G=0|s[2],q=8191&G,K=G>>>13,X=0|s[3],Z=8191&X,J=X>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ae=0|s[6],ie=8191&ae,oe=ae>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,pe=ue>>>13,he=0|s[9],fe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(d,Y))|0)+((8191&(a=(a=Math.imul(d,H))+Math.imul(p,Y)|0))<<13)|0;c=((i=Math.imul(p,H))+(a>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(f,Y),a=(a=Math.imul(f,H))+Math.imul(m,Y)|0,i=Math.imul(m,H);var ve=(c+(n=n+Math.imul(d,U)|0)|0)+((8191&(a=(a=a+Math.imul(d,W)|0)+Math.imul(p,U)|0))<<13)|0;c=((i=i+Math.imul(p,W)|0)+(a>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,Y),a=(a=Math.imul(v,H))+Math.imul(y,Y)|0,i=Math.imul(y,H),n=n+Math.imul(f,U)|0,a=(a=a+Math.imul(f,W)|0)+Math.imul(m,U)|0,i=i+Math.imul(m,W)|0;var ye=(c+(n=n+Math.imul(d,q)|0)|0)+((8191&(a=(a=a+Math.imul(d,K)|0)+Math.imul(p,q)|0))<<13)|0;c=((i=i+Math.imul(p,K)|0)+(a>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,Y),a=(a=Math.imul(_,H))+Math.imul(x,Y)|0,i=Math.imul(x,H),n=n+Math.imul(v,U)|0,a=(a=a+Math.imul(v,W)|0)+Math.imul(y,U)|0,i=i+Math.imul(y,W)|0,n=n+Math.imul(f,q)|0,a=(a=a+Math.imul(f,K)|0)+Math.imul(m,q)|0,i=i+Math.imul(m,K)|0;var be=(c+(n=n+Math.imul(d,Z)|0)|0)+((8191&(a=(a=a+Math.imul(d,J)|0)+Math.imul(p,Z)|0))<<13)|0;c=((i=i+Math.imul(p,J)|0)+(a>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(k,Y),a=(a=Math.imul(k,H))+Math.imul(M,Y)|0,i=Math.imul(M,H),n=n+Math.imul(_,U)|0,a=(a=a+Math.imul(_,W)|0)+Math.imul(x,U)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(v,q)|0,a=(a=a+Math.imul(v,K)|0)+Math.imul(y,q)|0,i=i+Math.imul(y,K)|0,n=n+Math.imul(f,Z)|0,a=(a=a+Math.imul(f,J)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,J)|0;var _e=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(a=(a=a+Math.imul(d,ee)|0)+Math.imul(p,Q)|0))<<13)|0;c=((i=i+Math.imul(p,ee)|0)+(a>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(C,Y),a=(a=Math.imul(C,H))+Math.imul(S,Y)|0,i=Math.imul(S,H),n=n+Math.imul(k,U)|0,a=(a=a+Math.imul(k,W)|0)+Math.imul(M,U)|0,i=i+Math.imul(M,W)|0,n=n+Math.imul(_,q)|0,a=(a=a+Math.imul(_,K)|0)+Math.imul(x,q)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(v,Z)|0,a=(a=a+Math.imul(v,J)|0)+Math.imul(y,Z)|0,i=i+Math.imul(y,J)|0,n=n+Math.imul(f,Q)|0,a=(a=a+Math.imul(f,ee)|0)+Math.imul(m,Q)|0,i=i+Math.imul(m,ee)|0;var xe=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(a=(a=a+Math.imul(d,ne)|0)+Math.imul(p,re)|0))<<13)|0;c=((i=i+Math.imul(p,ne)|0)+(a>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(A,Y),a=(a=Math.imul(A,H))+Math.imul(E,Y)|0,i=Math.imul(E,H),n=n+Math.imul(C,U)|0,a=(a=a+Math.imul(C,W)|0)+Math.imul(S,U)|0,i=i+Math.imul(S,W)|0,n=n+Math.imul(k,q)|0,a=(a=a+Math.imul(k,K)|0)+Math.imul(M,q)|0,i=i+Math.imul(M,K)|0,n=n+Math.imul(_,Z)|0,a=(a=a+Math.imul(_,J)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,J)|0,n=n+Math.imul(v,Q)|0,a=(a=a+Math.imul(v,ee)|0)+Math.imul(y,Q)|0,i=i+Math.imul(y,ee)|0,n=n+Math.imul(f,re)|0,a=(a=a+Math.imul(f,ne)|0)+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0;var we=(c+(n=n+Math.imul(d,ie)|0)|0)+((8191&(a=(a=a+Math.imul(d,oe)|0)+Math.imul(p,ie)|0))<<13)|0;c=((i=i+Math.imul(p,oe)|0)+(a>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(I,Y),a=(a=Math.imul(I,H))+Math.imul(P,Y)|0,i=Math.imul(P,H),n=n+Math.imul(A,U)|0,a=(a=a+Math.imul(A,W)|0)+Math.imul(E,U)|0,i=i+Math.imul(E,W)|0,n=n+Math.imul(C,q)|0,a=(a=a+Math.imul(C,K)|0)+Math.imul(S,q)|0,i=i+Math.imul(S,K)|0,n=n+Math.imul(k,Z)|0,a=(a=a+Math.imul(k,J)|0)+Math.imul(M,Z)|0,i=i+Math.imul(M,J)|0,n=n+Math.imul(_,Q)|0,a=(a=a+Math.imul(_,ee)|0)+Math.imul(x,Q)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,a=(a=a+Math.imul(v,ne)|0)+Math.imul(y,re)|0,i=i+Math.imul(y,ne)|0,n=n+Math.imul(f,ie)|0,a=(a=a+Math.imul(f,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0;var ke=(c+(n=n+Math.imul(d,le)|0)|0)+((8191&(a=(a=a+Math.imul(d,ce)|0)+Math.imul(p,le)|0))<<13)|0;c=((i=i+Math.imul(p,ce)|0)+(a>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(R,Y),a=(a=Math.imul(R,H))+Math.imul(F,Y)|0,i=Math.imul(F,H),n=n+Math.imul(I,U)|0,a=(a=a+Math.imul(I,W)|0)+Math.imul(P,U)|0,i=i+Math.imul(P,W)|0,n=n+Math.imul(A,q)|0,a=(a=a+Math.imul(A,K)|0)+Math.imul(E,q)|0,i=i+Math.imul(E,K)|0,n=n+Math.imul(C,Z)|0,a=(a=a+Math.imul(C,J)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,J)|0,n=n+Math.imul(k,Q)|0,a=(a=a+Math.imul(k,ee)|0)+Math.imul(M,Q)|0,i=i+Math.imul(M,ee)|0,n=n+Math.imul(_,re)|0,a=(a=a+Math.imul(_,ne)|0)+Math.imul(x,re)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(v,ie)|0,a=(a=a+Math.imul(v,oe)|0)+Math.imul(y,ie)|0,i=i+Math.imul(y,oe)|0,n=n+Math.imul(f,le)|0,a=(a=a+Math.imul(f,ce)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ce)|0;var Me=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(a=(a=a+Math.imul(d,pe)|0)+Math.imul(p,de)|0))<<13)|0;c=((i=i+Math.imul(p,pe)|0)+(a>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(N,Y),a=(a=Math.imul(N,H))+Math.imul(j,Y)|0,i=Math.imul(j,H),n=n+Math.imul(R,U)|0,a=(a=a+Math.imul(R,W)|0)+Math.imul(F,U)|0,i=i+Math.imul(F,W)|0,n=n+Math.imul(I,q)|0,a=(a=a+Math.imul(I,K)|0)+Math.imul(P,q)|0,i=i+Math.imul(P,K)|0,n=n+Math.imul(A,Z)|0,a=(a=a+Math.imul(A,J)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,J)|0,n=n+Math.imul(C,Q)|0,a=(a=a+Math.imul(C,ee)|0)+Math.imul(S,Q)|0,i=i+Math.imul(S,ee)|0,n=n+Math.imul(k,re)|0,a=(a=a+Math.imul(k,ne)|0)+Math.imul(M,re)|0,i=i+Math.imul(M,ne)|0,n=n+Math.imul(_,ie)|0,a=(a=a+Math.imul(_,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(v,le)|0,a=(a=a+Math.imul(v,ce)|0)+Math.imul(y,le)|0,i=i+Math.imul(y,ce)|0,n=n+Math.imul(f,de)|0,a=(a=a+Math.imul(f,pe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,pe)|0;var Te=(c+(n=n+Math.imul(d,fe)|0)|0)+((8191&(a=(a=a+Math.imul(d,me)|0)+Math.imul(p,fe)|0))<<13)|0;c=((i=i+Math.imul(p,me)|0)+(a>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(N,U),a=(a=Math.imul(N,W))+Math.imul(j,U)|0,i=Math.imul(j,W),n=n+Math.imul(R,q)|0,a=(a=a+Math.imul(R,K)|0)+Math.imul(F,q)|0,i=i+Math.imul(F,K)|0,n=n+Math.imul(I,Z)|0,a=(a=a+Math.imul(I,J)|0)+Math.imul(P,Z)|0,i=i+Math.imul(P,J)|0,n=n+Math.imul(A,Q)|0,a=(a=a+Math.imul(A,ee)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(C,re)|0,a=(a=a+Math.imul(C,ne)|0)+Math.imul(S,re)|0,i=i+Math.imul(S,ne)|0,n=n+Math.imul(k,ie)|0,a=(a=a+Math.imul(k,oe)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,oe)|0,n=n+Math.imul(_,le)|0,a=(a=a+Math.imul(_,ce)|0)+Math.imul(x,le)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(v,de)|0,a=(a=a+Math.imul(v,pe)|0)+Math.imul(y,de)|0,i=i+Math.imul(y,pe)|0;var Ce=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(a=(a=a+Math.imul(f,me)|0)+Math.imul(m,fe)|0))<<13)|0;c=((i=i+Math.imul(m,me)|0)+(a>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,q),a=(a=Math.imul(N,K))+Math.imul(j,q)|0,i=Math.imul(j,K),n=n+Math.imul(R,Z)|0,a=(a=a+Math.imul(R,J)|0)+Math.imul(F,Z)|0,i=i+Math.imul(F,J)|0,n=n+Math.imul(I,Q)|0,a=(a=a+Math.imul(I,ee)|0)+Math.imul(P,Q)|0,i=i+Math.imul(P,ee)|0,n=n+Math.imul(A,re)|0,a=(a=a+Math.imul(A,ne)|0)+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(C,ie)|0,a=(a=a+Math.imul(C,oe)|0)+Math.imul(S,ie)|0,i=i+Math.imul(S,oe)|0,n=n+Math.imul(k,le)|0,a=(a=a+Math.imul(k,ce)|0)+Math.imul(M,le)|0,i=i+Math.imul(M,ce)|0,n=n+Math.imul(_,de)|0,a=(a=a+Math.imul(_,pe)|0)+Math.imul(x,de)|0,i=i+Math.imul(x,pe)|0;var Se=(c+(n=n+Math.imul(v,fe)|0)|0)+((8191&(a=(a=a+Math.imul(v,me)|0)+Math.imul(y,fe)|0))<<13)|0;c=((i=i+Math.imul(y,me)|0)+(a>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(N,Z),a=(a=Math.imul(N,J))+Math.imul(j,Z)|0,i=Math.imul(j,J),n=n+Math.imul(R,Q)|0,a=(a=a+Math.imul(R,ee)|0)+Math.imul(F,Q)|0,i=i+Math.imul(F,ee)|0,n=n+Math.imul(I,re)|0,a=(a=a+Math.imul(I,ne)|0)+Math.imul(P,re)|0,i=i+Math.imul(P,ne)|0,n=n+Math.imul(A,ie)|0,a=(a=a+Math.imul(A,oe)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(C,le)|0,a=(a=a+Math.imul(C,ce)|0)+Math.imul(S,le)|0,i=i+Math.imul(S,ce)|0,n=n+Math.imul(k,de)|0,a=(a=a+Math.imul(k,pe)|0)+Math.imul(M,de)|0,i=i+Math.imul(M,pe)|0;var Le=(c+(n=n+Math.imul(_,fe)|0)|0)+((8191&(a=(a=a+Math.imul(_,me)|0)+Math.imul(x,fe)|0))<<13)|0;c=((i=i+Math.imul(x,me)|0)+(a>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(N,Q),a=(a=Math.imul(N,ee))+Math.imul(j,Q)|0,i=Math.imul(j,ee),n=n+Math.imul(R,re)|0,a=(a=a+Math.imul(R,ne)|0)+Math.imul(F,re)|0,i=i+Math.imul(F,ne)|0,n=n+Math.imul(I,ie)|0,a=(a=a+Math.imul(I,oe)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,oe)|0,n=n+Math.imul(A,le)|0,a=(a=a+Math.imul(A,ce)|0)+Math.imul(E,le)|0,i=i+Math.imul(E,ce)|0,n=n+Math.imul(C,de)|0,a=(a=a+Math.imul(C,pe)|0)+Math.imul(S,de)|0,i=i+Math.imul(S,pe)|0;var Ae=(c+(n=n+Math.imul(k,fe)|0)|0)+((8191&(a=(a=a+Math.imul(k,me)|0)+Math.imul(M,fe)|0))<<13)|0;c=((i=i+Math.imul(M,me)|0)+(a>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(N,re),a=(a=Math.imul(N,ne))+Math.imul(j,re)|0,i=Math.imul(j,ne),n=n+Math.imul(R,ie)|0,a=(a=a+Math.imul(R,oe)|0)+Math.imul(F,ie)|0,i=i+Math.imul(F,oe)|0,n=n+Math.imul(I,le)|0,a=(a=a+Math.imul(I,ce)|0)+Math.imul(P,le)|0,i=i+Math.imul(P,ce)|0,n=n+Math.imul(A,de)|0,a=(a=a+Math.imul(A,pe)|0)+Math.imul(E,de)|0,i=i+Math.imul(E,pe)|0;var Ee=(c+(n=n+Math.imul(C,fe)|0)|0)+((8191&(a=(a=a+Math.imul(C,me)|0)+Math.imul(S,fe)|0))<<13)|0;c=((i=i+Math.imul(S,me)|0)+(a>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,ie),a=(a=Math.imul(N,oe))+Math.imul(j,ie)|0,i=Math.imul(j,oe),n=n+Math.imul(R,le)|0,a=(a=a+Math.imul(R,ce)|0)+Math.imul(F,le)|0,i=i+Math.imul(F,ce)|0,n=n+Math.imul(I,de)|0,a=(a=a+Math.imul(I,pe)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,pe)|0;var De=(c+(n=n+Math.imul(A,fe)|0)|0)+((8191&(a=(a=a+Math.imul(A,me)|0)+Math.imul(E,fe)|0))<<13)|0;c=((i=i+Math.imul(E,me)|0)+(a>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(N,le),a=(a=Math.imul(N,ce))+Math.imul(j,le)|0,i=Math.imul(j,ce),n=n+Math.imul(R,de)|0,a=(a=a+Math.imul(R,pe)|0)+Math.imul(F,de)|0,i=i+Math.imul(F,pe)|0;var Ie=(c+(n=n+Math.imul(I,fe)|0)|0)+((8191&(a=(a=a+Math.imul(I,me)|0)+Math.imul(P,fe)|0))<<13)|0;c=((i=i+Math.imul(P,me)|0)+(a>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(N,de),a=(a=Math.imul(N,pe))+Math.imul(j,de)|0,i=Math.imul(j,pe);var Pe=(c+(n=n+Math.imul(R,fe)|0)|0)+((8191&(a=(a=a+Math.imul(R,me)|0)+Math.imul(F,fe)|0))<<13)|0;c=((i=i+Math.imul(F,me)|0)+(a>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Oe=(c+(n=Math.imul(N,fe))|0)+((8191&(a=(a=Math.imul(N,me))+Math.imul(j,fe)|0))<<13)|0;return c=((i=Math.imul(j,me))+(a>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,l[0]=ge,l[1]=ve,l[2]=ye,l[3]=be,l[4]=_e,l[5]=xe,l[6]=we,l[7]=ke,l[8]=Me,l[9]=Te,l[10]=Ce,l[11]=Se,l[12]=Le,l[13]=Ae,l[14]=Ee,l[15]=De,l[16]=Ie,l[17]=Pe,l[18]=Oe,0!==c&&(l[19]=c,r.length++),r};function f(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(h=p),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?p(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,a=0,i=0;i<r.length-1;i++){var o=a;a=0;for(var s=67108863&n,l=Math.min(i,t.length-1),c=Math.max(0,i-e.length+1);c<=l;c++){var u=i-c,d=(0|e.words[u])*(0|t.words[c]),p=67108863&d;s=67108863&(p=p+s|0),a+=(o=(o=o+(d/67108864|0)|0)+(p>>>26)|0)>>>26,o&=67108863}r.words[i]=s,n=o,o=a}return 0!==n?r.words[i]=n:r.length--,r.strip()}(this,e,t):f(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,a=0;a<t;a++)n|=(1&e)<<t-a-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,a,i){for(var o=0;o<i;o++)n[o]=t[e[o]],a[o]=r[e[o]]},m.prototype.transform=function(e,t,r,n,a,i){this.permute(i,e,t,r,n,a);for(var o=1;o<a;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<a;u+=s)for(var d=l,p=c,h=0;h<o;h++){var f=r[u+h],m=n[u+h],g=r[u+h+o],v=n[u+h+o],y=d*g-p*v;v=d*v+p*g,g=y,r[u+h]=f+g,n[u+h]=m+v,r[u+h+o]=f-g,n[u+h+o]=m-v,h!==s&&(y=l*d-c*p,p=l*p+c*d,d=y)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,a=0;for(r=r/2|0;r;r>>>=1)a++;return 1<<a+1+n},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var a=e[n];e[n]=e[r-n-1],e[r-n-1]=a,a=t[n],t[n]=-t[r-n-1],t[r-n-1]=-a}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var a=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&a,r=a<67108864?0:a/67108864|0}return e},m.prototype.convert13b=function(e,t,r,a){for(var i=0,o=0;o<t;o++)i+=0|e[o],r[2*o]=8191&i,i>>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*t;o<a;++o)r[o]=0;n(0===i),n(0==(-8192&i))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),a=this.makeRBT(n),i=this.stub(n),o=new Array(n),s=new Array(n),l=new Array(n),c=new Array(n),u=new Array(n),d=new Array(n),p=r.words;p.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,i,s,l,n,a),this.transform(c,i,u,d,n,a);for(var h=0;h<n;h++){var f=s[h]*u[h]-l[h]*d[h];l[h]=s[h]*d[h]+l[h]*u[h],s[h]=f}return this.conjugate(s,l,n),this.transform(s,l,p,i,n,a),this.conjugate(p,i,n),this.normalize13b(p,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),f(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var a=(0|this.words[r])*e,i=(67108863&a)+(67108863&t);t>>=26,t+=a/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,a=r%26;t[r]=(e.words[n]&1<<a)>>>a}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var a=r.sqr();n<t.length;n++,a=a.sqr())0!==t[n]&&(r=r.mul(a));return r},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,a=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&i,l=(0|this.words[t])-s<<r;this.words[t]=l|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==a){for(t=this.length-1;t>=0;t--)this.words[t+a]=this.words[t];for(t=0;t<a;t++)this.words[t]=0;this.length+=a}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var a;n("number"==typeof e&&e>=0),a=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<<i,l=r;if(a-=o,a=Math.max(0,a),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=a);c--){var d=0|this.words[c];this.words[c]=u<<26-i|d>>>i,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,a=1<<t;return!(this.length<=r||!(this.words[r]&a))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var a=67108863^67108863>>>t<<t;this.words[this.length-1]&=a}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var a,i,o=e.length+r;this._expand(o);var s=0;for(a=0;a<e.length;a++){i=(0|this.words[a+r])+s;var l=(0|e.words[a])*t;s=((i-=67108863&l)>>26)-(l/67108864|0),this.words[a+r]=67108863&i}for(;a<this.length-r;a++)s=(i=(0|this.words[a+r])+s)>>26,this.words[a+r]=67108863&i;if(0===s)return this.strip();for(n(-1===s),s=0,a=0;a<this.length;a++)s=(i=-(0|this.words[a])+s)>>26,this.words[a]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),a=e,o=0|a.words[a.length-1];0!=(r=26-this._countBits(o))&&(a=a.ushln(r),n.iushln(r),o=0|a.words[a.length-1]);var s,l=n.length-a.length;if("mod"!==t){(s=new i(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=n.clone()._ishlnsubmul(a,1,l);0===u.negative&&(n=u,s&&(s.words[l]=1));for(var d=l-1;d>=0;d--){var p=67108864*(0|n.words[a.length+d])+(0|n.words[a.length+d-1]);for(p=Math.min(p/o|0,67108863),n._ishlnsubmul(a,p,d);0!==n.negative;)p--,n.negative=0,n._ishlnsubmul(a,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=p)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(a=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:a,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(a=s.div.neg()),{div:a,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,o,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),a=e.andln(1),i=r.cmp(n);return i<0||1===a&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,a=this.length-1;a>=0;a--)r=(t*r+(0|this.words[a]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var a=(0|this.words[r])+67108864*t;this.words[r]=a/e|0,t=a%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a=new i(1),o=new i(0),s=new i(0),l=new i(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var p=0,h=1;0==(t.words[0]&h)&&p<26;++p,h<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(u),o.isub(d)),a.iushrn(1),o.iushrn(1);for(var f=0,m=1;0==(r.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s),o.isub(l)):(r.isub(t),s.isub(a),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var a,o=new i(1),s=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,p=1;0==(r.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(a=0===t.cmpn(1)?o:s).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var a=t.cmp(r);if(a<0){var i=t;t=r,r=i}else if(0===a||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,a=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=a,this;for(var i=a,o=r;0!==i&&o<this.length;o++){var s=0|this.words[o];i=(s+=i)>>>26,s&=67108863,this.words[o]=s}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var a=0|this.words[0];t=a===e?0:a<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],a=0|e.words[r];if(n!==a){n<a?t=-1:n>a&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new w(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){w.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},a(y,v),y.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=4194303&a,n=10;n<e.length;n++){var i=0|e.words[n];e.words[n-10]=(4194303&i)<<4|a>>>22,a=i}a>>>=22,e.words[n-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},a(b,v),a(_,v),a(x,v),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,a=67108863&n;n>>>=26,e.words[r]=a,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},w.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},w.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},w.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},w.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},w.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},w.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},w.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},w.prototype.isqr=function(e){return this.imul(e,e.clone())},w.prototype.sqr=function(e){return this.mul(e,e)},w.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);n(!a.isZero());var s=new i(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,a),p=this.pow(e,a.addn(1).iushrn(1)),h=this.pow(e,a),f=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<f);var v=this.pow(d,new i(1).iushln(f-g-1));p=p.redMul(v),d=v.redSqr(),h=h.redMul(d),f=g}return p},w.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},w.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var a=r[0],o=0,s=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var d=c>>u&1;a!==r[0]&&(a=this.sqr(a)),0!==d||0!==o?(o<<=1,o|=d,(4==++s||0===n&&0===u)&&(a=this.mul(a,r[o]),s=0,o=0)):s=0}l=26}return a},w.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},w.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},a(k,w),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),i=a;return a.cmp(this.m)>=0?i=a.isub(this.m):a.cmpn(0)<0&&(i=a.iadd(this.m)),i._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=r.isub(n).iushrn(this.shift),o=a;return a.cmp(this.m)>=0?o=a.isub(this.m):a.cmpn(0)<0&&(o=a.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:104}],96:[function(e,t,r){"use strict";t.exports=function(e){var t,r,n,a=e.length,i=0;for(t=0;t<a;++t)i+=e[t].length;var o=new Array(i),s=0;for(t=0;t<a;++t){var l=e[t],c=l.length;for(r=0;r<c;++r){var u=o[s++]=new Array(c-1),d=0;for(n=0;n<c;++n)n!==r&&(u[d++]=l[n]);if(1&r){var p=u[1];u[1]=u[0],u[0]=p}}}return o}},{}],97:[function(e,t,r){"use strict";t.exports=function(e,t,r){switch(arguments.length){case 1:return n=[],c(a=e,a,u,!0),n;case 2:return"function"==typeof t?c(e,e,t,!0):function(e,t){return n=[],c(e,t,u,!1),n}(e,t);case 3:return c(e,t,r,!1);default:throw new Error("box-intersect: Invalid arguments")}var a};var n,a=e("typedarray-pool"),i=e("./lib/sweep"),o=e("./lib/intersect");function s(e,t){for(var r=0;r<e;++r)if(!(t[r]<=t[r+e]))return!0;return!1}function l(e,t,r,n){for(var a=0,i=0,o=0,l=e.length;o<l;++o){var c=e[o];if(!s(t,c)){for(var u=0;u<2*t;++u)r[a++]=c[u];n[i++]=o}}return i}function c(e,t,r,n){var s=e.length,c=t.length;if(!(s<=0||c<=0)){var u=e[0].length>>>1;if(!(u<=0)){var d,p=a.mallocDouble(2*u*s),h=a.mallocInt32(s);if((s=l(e,u,p,h))>0){if(1===u&&n)i.init(s),d=i.sweepComplete(u,r,0,s,p,h,0,s,p,h);else{var f=a.mallocDouble(2*u*c),m=a.mallocInt32(c);(c=l(t,u,f,m))>0&&(i.init(s+c),d=1===u?i.sweepBipartite(u,r,0,s,p,h,0,c,f,m):o(u,r,n,s,p,h,c,f,m),a.free(f),a.free(m))}a.free(p),a.free(h)}return d}}}function u(e,t){n.push([e,t])}},{"./lib/intersect":99,"./lib/sweep":103,"typedarray-pool":543}],98:[function(e,t,r){"use strict";var n="d",a="ax",i="vv",o="fp",s="es",l="rs",c="re",u="rb",d="ri",p="rp",h="bs",f="be",m="bb",g="bi",v="bp",y="rv",b="Q",_=[n,a,i,l,c,u,d,h,f,m,g];function x(e){var t="bruteForce"+(e?"Full":"Partial"),r=[],x=_.slice();e||x.splice(3,0,o);var w=["function "+t+"("+x.join()+"){"];function k(t,o){var x=function(e,t,r){var o="bruteForce"+(e?"Red":"Blue")+(t?"Flip":"")+(r?"Full":""),x=["function ",o,"(",_.join(),"){","var ",s,"=2*",n,";"],w="for(var i="+l+","+p+"="+s+"*"+l+";i<"+c+";++i,"+p+"+="+s+"){var x0="+u+"["+a+"+"+p+"],x1="+u+"["+a+"+"+p+"+"+n+"],xi="+d+"[i];",k="for(var j="+h+","+v+"="+s+"*"+h+";j<"+f+";++j,"+v+"+="+s+"){var y0="+m+"["+a+"+"+v+"],"+(r?"y1="+m+"["+a+"+"+v+"+"+n+"],":"")+"yi="+g+"[j];";return e?x.push(w,b,":",k):x.push(k,b,":",w),r?x.push("if(y1<x0||x1<y0)continue;"):t?x.push("if(y0<=x0||x1<y0)continue;"):x.push("if(y0<x0||x1<y0)continue;"),x.push("for(var k="+a+"+1;k<"+n+";++k){var r0="+u+"[k+"+p+"],r1="+u+"[k+"+n+"+"+p+"],b0="+m+"[k+"+v+"],b1="+m+"[k+"+n+"+"+v+"];if(r1<b0||b1<r0)continue "+b+";}var "+y+"="+i+"("),t?x.push("yi,xi"):x.push("xi,yi"),x.push(");if("+y+"!==void 0)return "+y+";}}}"),{name:o,code:x.join("")}}(t,o,e);r.push(x.code),w.push("return "+x.name+"("+_.join()+");")}w.push("if("+c+"-"+l+">"+f+"-"+h+"){"),e?(k(!0,!1),w.push("}else{"),k(!1,!1)):(w.push("if("+o+"){"),k(!0,!0),w.push("}else{"),k(!0,!1),w.push("}}else{if("+o+"){"),k(!1,!0),w.push("}else{"),k(!1,!1),w.push("}")),w.push("}}return "+t);var M=r.join("")+w.join("");return new Function(M)()}r.partial=x(!1),r.full=x(!0)},{}],99:[function(e,t,r){"use strict";t.exports=function(e,t,r,i,u,S,L,A,E){!function(e,t){var r=8*a.log2(t+1)*(e+1)|0,i=a.nextPow2(_*r);w.length<i&&(n.free(w),w=n.mallocInt32(i));var o=a.nextPow2(x*r);k<o&&(n.free(k),k=n.mallocDouble(o))}(e,i+L);var D,I=0,P=2*e;for(M(I++,0,0,i,0,L,r?16:0,-1/0,1/0),r||M(I++,0,0,L,0,i,1,-1/0,1/0);I>0;){var O=(I-=1)*_,R=w[O],F=w[O+1],z=w[O+2],N=w[O+3],j=w[O+4],B=w[O+5],Y=I*x,H=k[Y],V=k[Y+1],U=1&B,W=!!(16&B),G=u,q=S,K=A,X=E;if(U&&(G=A,q=E,K=u,X=S),!(2&B&&(z=g(e,R,F,z,G,q,V),F>=z)||4&B&&(F=v(e,R,F,z,G,q,H))>=z)){var Z=z-F,J=j-N;if(W){if(e*Z*(Z+J)<h){if(void 0!==(D=l.scanComplete(e,R,t,F,z,G,q,N,j,K,X)))return D;continue}}else{if(e*Math.min(Z,J)<d){if(void 0!==(D=o(e,R,t,U,F,z,G,q,N,j,K,X)))return D;continue}if(e*Z*J<p){if(void 0!==(D=l.scanBipartite(e,R,t,U,F,z,G,q,N,j,K,X)))return D;continue}}var $=f(e,R,F,z,G,q,H,V);if(F<$)if(e*($-F)<d){if(void 0!==(D=s(e,R+1,t,F,$,G,q,N,j,K,X)))return D}else if(R===e-2){if(void 0!==(D=U?l.sweepBipartite(e,t,N,j,K,X,F,$,G,q):l.sweepBipartite(e,t,F,$,G,q,N,j,K,X)))return D}else M(I++,R+1,F,$,N,j,U,-1/0,1/0),M(I++,R+1,N,j,F,$,1^U,-1/0,1/0);if($<z){var Q=c(e,R,N,j,K,X),ee=K[P*Q+R],te=m(e,R,Q,j,K,X,ee);if(te<j&&M(I++,R,$,z,te,j,(4|U)+(W?16:0),ee,V),N<Q&&M(I++,R,$,z,N,Q,(2|U)+(W?16:0),H,ee),Q+1===te){if(void 0!==(D=W?C(e,R,t,$,z,G,q,Q,K,X[Q]):T(e,R,t,U,$,z,G,q,Q,K,X[Q])))return D}else if(Q<te){var re;if(W){if(re=y(e,R,$,z,G,q,ee),$<re){var ne=m(e,R,$,re,G,q,ee);if(R===e-2){if($<ne&&void 0!==(D=l.sweepComplete(e,t,$,ne,G,q,Q,te,K,X)))return D;if(ne<re&&void 0!==(D=l.sweepBipartite(e,t,ne,re,G,q,Q,te,K,X)))return D}else $<ne&&M(I++,R+1,$,ne,Q,te,16,-1/0,1/0),ne<re&&(M(I++,R+1,ne,re,Q,te,0,-1/0,1/0),M(I++,R+1,Q,te,ne,re,1,-1/0,1/0))}}else re=U?b(e,R,$,z,G,q,ee):y(e,R,$,z,G,q,ee),$<re&&(R===e-2?D=U?l.sweepBipartite(e,t,Q,te,K,X,$,re,G,q):l.sweepBipartite(e,t,$,re,G,q,Q,te,K,X):(M(I++,R+1,$,re,Q,te,U,-1/0,1/0),M(I++,R+1,Q,te,$,re,1^U,-1/0,1/0)))}}}}};var n=e("typedarray-pool"),a=e("bit-twiddle"),i=e("./brute"),o=i.partial,s=i.full,l=e("./sweep"),c=e("./median"),u=e("./partition"),d=128,p=1<<22,h=1<<22,f=u("!(lo>=p0)&&!(p1>=hi)",["p0","p1"]),m=u("lo===p0",["p0"]),g=u("lo<p0",["p0"]),v=u("hi<=p0",["p0"]),y=u("lo<=p0&&p0<=hi",["p0"]),b=u("lo<p0&&p0<=hi",["p0"]),_=6,x=2,w=n.mallocInt32(1024),k=n.mallocDouble(1024);function M(e,t,r,n,a,i,o,s,l){var c=_*e;w[c]=t,w[c+1]=r,w[c+2]=n,w[c+3]=a,w[c+4]=i,w[c+5]=o;var u=x*e;k[u]=s,k[u+1]=l}function T(e,t,r,n,a,i,o,s,l,c,u){var d=2*e,p=l*d,h=c[p+t];e:for(var f=a,m=a*d;f<i;++f,m+=d){var g=o[m+t],v=o[m+t+e];if(!(h<g||v<h||n&&h===g)){for(var y,b=s[f],_=t+1;_<e;++_){g=o[m+_],v=o[m+_+e];var x=c[p+_],w=c[p+_+e];if(v<x||w<g)continue e}if(void 0!==(y=n?r(u,b):r(b,u)))return y}}}function C(e,t,r,n,a,i,o,s,l,c){var u=2*e,d=s*u,p=l[d+t];e:for(var h=n,f=n*u;h<a;++h,f+=u){var m=o[h];if(m!==c){var g=i[f+t],v=i[f+t+e];if(!(p<g||v<p)){for(var y=t+1;y<e;++y){g=i[f+y],v=i[f+y+e];var b=l[d+y],_=l[d+y+e];if(v<b||_<g)continue e}var x=r(m,c);if(void 0!==x)return x}}}}},{"./brute":98,"./median":100,"./partition":101,"./sweep":103,"bit-twiddle":93,"typedarray-pool":543}],100:[function(e,t,r){"use strict";t.exports=function(e,t,r,o,s,l){if(o<=r+1)return r;for(var c=r,u=o,d=o+r>>>1,p=2*e,h=d,f=s[p*d+t];c<u;){if(u-c<a){i(e,t,c,u,s,l),f=s[p*d+t];break}var m=u-c,g=Math.random()*m+c|0,v=s[p*g+t],y=Math.random()*m+c|0,b=s[p*y+t],_=Math.random()*m+c|0,x=s[p*_+t];v<=b?x>=b?(h=y,f=b):v>=x?(h=g,f=v):(h=_,f=x):b>=x?(h=y,f=b):x>=v?(h=g,f=v):(h=_,f=x);for(var w=p*(u-1),k=p*h,M=0;M<p;++M,++w,++k){var T=s[w];s[w]=s[k],s[k]=T}var C=l[u-1];for(l[u-1]=l[h],l[h]=C,h=n(e,t,c,u-1,s,l,f),w=p*(u-1),k=p*h,M=0;M<p;++M,++w,++k)T=s[w],s[w]=s[k],s[k]=T;if(C=l[u-1],l[u-1]=l[h],l[h]=C,d<h){for(u=h-1;c<u&&s[p*(u-1)+t]===f;)u-=1;u+=1}else{if(!(h<d))break;for(c=h+1;c<u&&s[p*c+t]===f;)c+=1}}return n(e,t,r,d,s,l,s[p*d+t])};var n=e("./partition")("lo<p0",["p0"]),a=8;function i(e,t,r,n,a,i){for(var o=2*e,s=o*(r+1)+t,l=r+1;l<n;++l,s+=o)for(var c=a[s],u=l,d=o*(l-1);u>r&&a[d+t]>c;--u,d-=o){for(var p=d,h=d+o,f=0;f<o;++f,++p,++h){var m=a[p];a[p]=a[h],a[h]=m}var g=i[u];i[u]=i[u-1],i[u-1]=g}}},{"./partition":101}],101:[function(e,t,r){"use strict";t.exports=function(e,t){var r="abcdef".split("").concat(t),a=[];return e.indexOf("lo")>=0&&a.push("lo=e[k+n]"),e.indexOf("hi")>=0&&a.push("hi=e[k+o]"),r.push(n.replace("_",a.join()).replace("$",e)),Function.apply(void 0,r)};var n="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},{}],102:[function(e,t,r){"use strict";t.exports=function(e,t){t<=4*n?a(0,t-1,e):function e(t,r,d){var p=(r-t+1)/6|0,h=t+p,f=r-p,m=t+r>>1,g=m-p,v=m+p,y=h,b=g,_=m,x=v,w=f,k=t+1,M=r-1,T=0;c(y,b,d)&&(T=y,y=b,b=T),c(x,w,d)&&(T=x,x=w,w=T),c(y,_,d)&&(T=y,y=_,_=T),c(b,_,d)&&(T=b,b=_,_=T),c(y,x,d)&&(T=y,y=x,x=T),c(_,x,d)&&(T=_,_=x,x=T),c(b,w,d)&&(T=b,b=w,w=T),c(b,_,d)&&(T=b,b=_,_=T),c(x,w,d)&&(T=x,x=w,w=T);for(var C=d[2*b],S=d[2*b+1],L=d[2*x],A=d[2*x+1],E=2*y,D=2*_,I=2*w,P=2*h,O=2*m,R=2*f,F=0;F<2;++F){var z=d[E+F],N=d[D+F],j=d[I+F];d[P+F]=z,d[O+F]=N,d[R+F]=j}o(g,t,d),o(v,r,d);for(var B=k;B<=M;++B)if(u(B,C,S,d))B!==k&&i(B,k,d),++k;else if(!u(B,L,A,d))for(;;){if(u(M,L,A,d)){u(M,C,S,d)?(s(B,k,M,d),++k,--M):(i(B,M,d),--M);break}if(--M<B)break}l(t,k-1,C,S,d),l(r,M+1,L,A,d),k-2-t<=n?a(t,k-2,d):e(t,k-2,d),r-(M+2)<=n?a(M+2,r,d):e(M+2,r,d),M-k<=n?a(k,M,d):e(k,M,d)}(0,t-1,e)};var n=32;function a(e,t,r){for(var n=2*(e+1),a=e+1;a<=t;++a){for(var i=r[n++],o=r[n++],s=a,l=n-2;s-- >e;){var c=r[l-2],u=r[l-1];if(c<i)break;if(c===i&&u<o)break;r[l]=c,r[l+1]=u,l-=2}r[l]=i,r[l+1]=o}}function i(e,t,r){t*=2;var n=r[e*=2],a=r[e+1];r[e]=r[t],r[e+1]=r[t+1],r[t]=n,r[t+1]=a}function o(e,t,r){t*=2,r[e*=2]=r[t],r[e+1]=r[t+1]}function s(e,t,r,n){t*=2,r*=2;var a=n[e*=2],i=n[e+1];n[e]=n[t],n[e+1]=n[t+1],n[t]=n[r],n[t+1]=n[r+1],n[r]=a,n[r+1]=i}function l(e,t,r,n,a){t*=2,a[e*=2]=a[t],a[t]=r,a[e+1]=a[t+1],a[t+1]=n}function c(e,t,r){t*=2;var n=r[e*=2],a=r[t];return!(n<a)&&(n!==a||r[e+1]>r[t+1])}function u(e,t,r,n){var a=n[e*=2];return a<t||a===t&&n[e+1]<r}},{}],103:[function(e,t,r){"use strict";t.exports={init:function(e){var t=a.nextPow2(e);s.length<t&&(n.free(s),s=n.mallocInt32(t)),l.length<t&&(n.free(l),l=n.mallocInt32(t)),c.length<t&&(n.free(c),c=n.mallocInt32(t)),u.length<t&&(n.free(u),u=n.mallocInt32(t)),d.length<t&&(n.free(d),d=n.mallocInt32(t)),p.length<t&&(n.free(p),p=n.mallocInt32(t));var r=8*t;h.length<r&&(n.free(h),h=n.mallocDouble(r))},sweepBipartite:function(e,t,r,n,a,d,p,g,v,y){for(var b=0,_=2*e,x=e-1,w=_-1,k=r;k<n;++k){var M=d[k],T=_*k;h[b++]=a[T+x],h[b++]=-(M+1),h[b++]=a[T+w],h[b++]=M}for(k=p;k<g;++k){M=y[k]+o;var C=_*k;h[b++]=v[C+x],h[b++]=-M,h[b++]=v[C+w],h[b++]=M}var S=b>>>1;i(h,S);var L=0,A=0;for(k=0;k<S;++k){var E=0|h[2*k+1];if(E>=o)f(c,u,A--,E=E-o|0);else if(E>=0)f(s,l,L--,E);else if(E<=-o){E=-E-o|0;for(var D=0;D<L;++D)if(void 0!==(I=t(s[D],E)))return I;m(c,u,A++,E)}else{for(E=-E-1|0,D=0;D<A;++D){var I;if(void 0!==(I=t(E,c[D])))return I}m(s,l,L++,E)}}},sweepComplete:function(e,t,r,n,a,o,g,v,y,b){for(var _=0,x=2*e,w=e-1,k=x-1,M=r;M<n;++M){var T=o[M]+1<<1,C=x*M;h[_++]=a[C+w],h[_++]=-T,h[_++]=a[C+k],h[_++]=T}for(M=g;M<v;++M){T=b[M]+1<<1;var S=x*M;h[_++]=y[S+w],h[_++]=1|-T,h[_++]=y[S+k],h[_++]=1|T}var L=_>>>1;i(h,L);var A=0,E=0,D=0;for(M=0;M<L;++M){var I=0|h[2*M+1],P=1&I;if(M<L-1&&I>>1==h[2*M+3]>>1&&(P=2,M+=1),I<0){for(var O=-(I>>1)-1,R=0;R<D;++R)if(void 0!==(F=t(d[R],O)))return F;if(0!==P)for(R=0;R<A;++R)if(void 0!==(F=t(s[R],O)))return F;if(1!==P)for(R=0;R<E;++R){var F;if(void 0!==(F=t(c[R],O)))return F}0===P?m(s,l,A++,O):1===P?m(c,u,E++,O):2===P&&m(d,p,D++,O)}else O=(I>>1)-1,0===P?f(s,l,A--,O):1===P?f(c,u,E--,O):2===P&&f(d,p,D--,O)}},scanBipartite:function(e,t,r,n,a,c,u,d,p,g,v,y){var b=0,_=2*e,x=t,w=t+e,k=1,M=1;n?M=o:k=o;for(var T=a;T<c;++T){var C=T+k,S=_*T;h[b++]=u[S+x],h[b++]=-C,h[b++]=u[S+w],h[b++]=C}for(T=p;T<g;++T){C=T+M;var L=_*T;h[b++]=v[L+x],h[b++]=-C}var A=b>>>1;i(h,A);var E=0;for(T=0;T<A;++T){var D=0|h[2*T+1];if(D<0){var I=!1;if((C=-D)>=o?(I=!n,C-=o):(I=!!n,C-=1),I)m(s,l,E++,C);else{var P=y[C],O=_*C,R=v[O+t+1],F=v[O+t+1+e];e:for(var z=0;z<E;++z){var N=s[z],j=_*N;if(!(F<u[j+t+1]||u[j+t+1+e]<R)){for(var B=t+2;B<e;++B)if(v[O+B+e]<u[j+B]||u[j+B+e]<v[O+B])continue e;var Y,H=d[N];if(void 0!==(Y=n?r(P,H):r(H,P)))return Y}}}}else f(s,l,E--,D-k)}},scanComplete:function(e,t,r,n,a,l,c,u,d,p,f){for(var m=0,g=2*e,v=t,y=t+e,b=n;b<a;++b){var _=b+o,x=g*b;h[m++]=l[x+v],h[m++]=-_,h[m++]=l[x+y],h[m++]=_}for(b=u;b<d;++b){_=b+1;var w=g*b;h[m++]=p[w+v],h[m++]=-_}var k=m>>>1;i(h,k);var M=0;for(b=0;b<k;++b){var T=0|h[2*b+1];if(T<0)if((_=-T)>=o)s[M++]=_-o;else{var C=f[_-=1],S=g*_,L=p[S+t+1],A=p[S+t+1+e];e:for(var E=0;E<M;++E){var D=s[E],I=c[D];if(I===C)break;var P=g*D;if(!(A<l[P+t+1]||l[P+t+1+e]<L)){for(var O=t+2;O<e;++O)if(p[S+O+e]<l[P+O]||l[P+O+e]<p[S+O])continue e;var R=r(I,C);if(void 0!==R)return R}}}else{for(_=T-o,E=M-1;E>=0;--E)if(s[E]===_){for(O=E+1;O<M;++O)s[O-1]=s[O];break}--M}}}};var n=e("typedarray-pool"),a=e("bit-twiddle"),i=e("./sort"),o=1<<28,s=n.mallocInt32(1024),l=n.mallocInt32(1024),c=n.mallocInt32(1024),u=n.mallocInt32(1024),d=n.mallocInt32(1024),p=n.mallocInt32(1024),h=n.mallocDouble(8192);function f(e,t,r,n){var a=t[n],i=e[r-1];e[a]=i,t[i]=a}function m(e,t,r,n){e[r]=n,t[n]=r}},{"./sort":102,"bit-twiddle":93,"typedarray-pool":543}],104:[function(e,t,r){},{}],105:[function(e,t,r){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},i=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var s,l=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),s=0===c.x}catch(e){s=!1}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function d(e,t,r){if(t)e.call(r);else for(var n=e.length,a=x(e,n),i=0;i<n;++i)a[i].call(r)}function p(e,t,r,n){if(t)e.call(r,n);else for(var a=e.length,i=x(e,a),o=0;o<a;++o)i[o].call(r,n)}function h(e,t,r,n,a){if(t)e.call(r,n,a);else for(var i=e.length,o=x(e,i),s=0;s<i;++s)o[s].call(r,n,a)}function f(e,t,r,n,a,i){if(t)e.call(r,n,a,i);else for(var o=e.length,s=x(e,o),l=0;l<o;++l)s[l].call(r,n,a,i)}function m(e,t,r,n){if(t)e.apply(r,n);else for(var a=e.length,i=x(e,a),o=0;o<a;++o)i[o].apply(r,n)}function g(e,t,r,a){var i,o,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]):(o=e._events=n(null),e._eventsCount=0),s){if("function"==typeof s?s=o[t]=a?[r,s]:[s,r]:a?s.unshift(r):s.push(r),!s.warned&&(i=u(e))&&i>0&&s.length>i){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",l.name,l.message)}}else s=o[t]=r,++e._eventsCount;return e}function v(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function y(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=i.call(v,n);return a.listener=r,n.wrapFn=a,a}function b(e,t,r){var n=e._events;if(!n)return[];var a=n[t];return a?"function"==typeof a?r?[a.listener||a]:[a]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(a):x(a,a.length):[]}function _(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function x(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}s?Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');l=e}}):o.defaultMaxListeners=l,o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){var t,r,n,a,i,o,s="error"===e;if(o=this._events)s=s&&null==o.error;else if(!s)return!1;if(s){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(r=o[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:d(r,c,this);break;case 2:p(r,c,this,arguments[1]);break;case 3:h(r,c,this,arguments[1],arguments[2]);break;case 4:f(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(a=new Array(n-1),i=1;i<n;i++)a[i-1]=arguments[i];m(r,c,this,a)}return!0},o.prototype.addListener=function(e,t){return g(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return g(this,e,t,!0)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,y(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,y(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,a,i,o,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(a=this._events))return this;if(!(r=a[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=n(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(var r=t,n=r+1,a=e.length;n<a;r+=1,n+=1)e[r]=e[n];e.pop()}(r,i),1===r.length&&(a[e]=r[0]),a.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.removeAllListeners=function(e){var t,r,i;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=n(null):delete r[e]),this;if(0===arguments.length){var o,s=a(r);for(i=0;i<s.length;++i)"removeListener"!==(o=s[i])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return b(this,e,!0)},o.prototype.rawListeners=function(e){return b(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):_.call(e,t)},o.prototype.listenerCount=_,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],106:[function(e,t,r){(function(t){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
"use strict";var n=e("base64-js"),a=e("ieee754"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=t,r.SlowBuffer=function(e){return+e!=e&&(e=0),t.alloc(+e)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,t.prototype),r}function t(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,r,n){if("string"==typeof e)return function(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!t.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(e,r),a=s(n),i=a.write(e,r);return i!==n&&(a=a.slice(0,i)),a}(e,r);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer))return function(e,r,n){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var a;return a=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),Object.setPrototypeOf(a,t.prototype),a}(e,r,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(null!=a&&a!==e)return t.from(a,r,n);var i=function(e){if(t.isBuffer(e)){var r=0|p(e.length),n=s(r);return 0===n.length?n:(e.copy(n,0,0,r),n)}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),s(e<0?0:0|p(e))}function d(e){for(var t=e.length<0?0:0|p(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function h(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return N(e).length;default:if(i)return a?-1:z(e).length;r=(""+r).toLowerCase(),i=!0}}function f(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return L(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,r,n,a,i){if(0===e.length)return-1;if("string"==typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=t.from(r,a)),t.isBuffer(r))return 0===r.length?-1:v(e,r,n,a,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):v(e,[r],n,a,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,a){var i,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var u=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*o}else-1!==u&&(i-=i-u),u=-1}else for(r+l>s&&(r=s-l),i=r;i>=0;i--){for(var d=!0,p=0;p<l;p++)if(c(e,i+p)!==c(t,p)){d=!1;break}if(d)return i}return-1}function y(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(Y(s))return o;e[r+o]=s}return o}function b(e,t,r,n){return j(z(t,e.length-r),e,r,n)}function _(e,t,r,n){return j(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function x(e,t,r,n){return _(e,t,r,n)}function w(e,t,r,n){return j(N(t),e,r,n)}function k(e,t,r,n){return j(function(e,t){for(var r,n,a,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var i,o,s,l,c=e[a],u=null,d=c>239?4:c>223?3:c>191?2:1;if(a+d<=r)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[a+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&(l=(15&c)<<12|(63&i)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=d}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C));return r}(n)}r.kMaxLength=o,t.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),t.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array),t.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},t.allocUnsafe=function(e){return u(e)},t.allocUnsafeSlow=function(e){return u(e)},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,r){if(B(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),B(r,Uint8Array)&&(r=t.from(r,r.offset,r.byteLength)),!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var n=e.length,a=r.length,i=0,o=Math.min(n,a);i<o;++i)if(e[i]!==r[i]){n=e[i],a=r[i];break}return n<a?-1:a<n?1:0},t.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var a=t.allocUnsafe(r),i=0;for(n=0;n<e.length;++n){var o=e[n];if(B(o,Uint8Array)&&(o=t.from(o)),!t.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(a,i),i+=o.length}return a},t.byteLength=h,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},t.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},t.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},t.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):f.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},i&&(t.prototype[i]=t.prototype.inspect),t.prototype.compare=function(e,r,n,a,i){if(B(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===a&&(a=0),void 0===i&&(i=this.length),r<0||n>e.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=n)return 0;if(a>=i)return-1;if(r>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(a>>>=0),s=(n>>>=0)-(r>>>=0),l=Math.min(o,s),c=this.slice(a,i),u=e.slice(r,n),d=0;d<l;++d)if(c[d]!==u[d]){o=c[d],s=u[d];break}return o<s?-1:s<o?1:0},t.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},t.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},t.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},t.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function S(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function L(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function A(e,t,r){var n,a=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>a)&&(r=a);for(var i="",o=t;o<r;++o)i+=(n=e[o])<16?"0"+n.toString(16):n.toString(16);return i}function E(e,t,r){for(var n=e.slice(t,r),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+256*n[i+1]);return a}function D(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function I(e,r,n,a,i,o){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(n+a>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,n,i){return t=+t,r>>>=0,i||P(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return t=+t,r>>>=0,i||P(e,0,r,8),a.write(e,t,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<e&&(r=e);var a=this.subarray(e,r);return Object.setPrototypeOf(a,t.prototype),a},t.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n},t.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},t.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},t.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),a.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),a.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),a.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),a.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i<r&&(a*=256);)this[t+i]=e/a&255;return t+r},t.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);I(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);I(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,a){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),a||0===a||(a=this.length),r>=e.length&&(r=e.length),r||(r=0),a>0&&a<n&&(a=n),a===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-r<a-n&&(a=e.length-r+n);var i=a-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,n,a);else if(this===e&&n<r&&r<a)for(var o=i-1;o>=0;--o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,a),r);return i},t.prototype.fill=function(e,r,n,a){if("string"==typeof e){if("string"==typeof r?(a=r,r=0,n=this.length):"string"==typeof n&&(a=n,n=this.length),void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!t.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(1===e.length){var i=e.charCodeAt(0);("utf8"===a&&i<128||"latin1"===a)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var o;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=r;o<n;++o)this[o]=e;else{var s=t.isBuffer(e)?e:t.from(e,a),l=s.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-r;++o)this[o+r]=s[o%l]}return this};var F=/[^+/0-9A-Za-z-_]/g;function z(e,t){var r;t=t||1/0;for(var n=e.length,a=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function N(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":75,buffer:106,ieee754:413}],107:[function(e,t,r){"use strict";var n=e("./lib/monotone"),a=e("./lib/triangulation"),i=e("./lib/delaunay"),o=e("./lib/filter");function s(e){return[Math.min(e[0],e[1]),Math.max(e[0],e[1])]}function l(e,t){return e[0]-t[0]||e[1]-t[1]}function c(e,t,r){return t in e?e[t]:r}t.exports=function(e,t,r){Array.isArray(t)?(r=r||{},t=t||[]):(r=t||{},t=[]);var u=!!c(r,"delaunay",!0),d=!!c(r,"interior",!0),p=!!c(r,"exterior",!0),h=!!c(r,"infinity",!1);if(!d&&!p||0===e.length)return[];var f=n(e,t);if(u||d!==p||h){for(var m=a(e.length,function(e){return e.map(s).sort(l)}(t)),g=0;g<f.length;++g){var v=f[g];m.addTriangle(v[0],v[1],v[2])}return u&&i(e,m),p?d?h?o(m,0,h):m.cells():o(m,1,h):o(m,-1)}return f}},{"./lib/delaunay":108,"./lib/filter":109,"./lib/monotone":110,"./lib/triangulation":111}],108:[function(e,t,r){"use strict";var n=e("robust-in-sphere")[4];function a(e,t,r,a,i,o){var s=t.opposite(a,i);if(!(s<0)){if(i<a){var l=a;a=i,i=l,l=o,o=s,s=l}t.isConstraint(a,i)||n(e[a],e[i],e[o],e[s])<0&&r.push(a,i)}}e("binary-search-bounds"),t.exports=function(e,t){for(var r=[],i=e.length,o=t.stars,s=0;s<i;++s)for(var l=o[s],c=1;c<l.length;c+=2)if(!((h=l[c])<s||t.isConstraint(s,h))){for(var u=l[c-1],d=-1,p=1;p<l.length;p+=2)if(l[p-1]===h){d=l[p];break}d<0||n(e[s],e[h],e[u],e[d])<0&&r.push(s,h)}for(;r.length>0;){for(var h=r.pop(),f=(s=r.pop(),u=-1,d=-1,l=o[s],1);f<l.length;f+=2){var m=l[f-1],g=l[f];m===h?d=g:g===h&&(u=m)}u<0||d<0||n(e[s],e[h],e[u],e[d])>=0||(t.flip(s,h),a(e,t,r,u,s,d),a(e,t,r,s,d,u),a(e,t,r,d,h,u),a(e,t,r,h,u,d))}}},{"binary-search-bounds":112,"robust-in-sphere":506}],109:[function(e,t,r){"use strict";var n,a=e("binary-search-bounds");function i(e,t,r,n,a,i,o){this.cells=e,this.neighbor=t,this.flags=n,this.constraint=r,this.active=a,this.next=i,this.boundary=o}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}t.exports=function(e,t,r){var n=function(e,t){for(var r=e.cells(),n=r.length,a=0;a<n;++a){var s=(v=r[a])[0],l=v[1],c=v[2];l<c?l<s&&(v[0]=l,v[1]=c,v[2]=s):c<s&&(v[0]=c,v[1]=s,v[2]=l)}r.sort(o);var u=new Array(n);for(a=0;a<u.length;++a)u[a]=0;var d=[],p=[],h=new Array(3*n),f=new Array(3*n),m=null;t&&(m=[]);var g=new i(r,h,f,u,d,p,m);for(a=0;a<n;++a)for(var v=r[a],y=0;y<3;++y){s=v[y],l=v[(y+1)%3];var b=h[3*a+y]=g.locate(l,s,e.opposite(l,s)),_=f[3*a+y]=e.isConstraint(s,l);b<0&&(_?p.push(a):(d.push(a),u[a]=1),t&&m.push([l,s,-1]))}return g}(e,r);if(0===t)return r?n.cells.concat(n.boundary):n.cells;for(var a=1,s=n.active,l=n.next,c=n.flags,u=n.cells,d=n.constraint,p=n.neighbor;s.length>0||l.length>0;){for(;s.length>0;){var h=s.pop();if(c[h]!==-a){c[h]=a,u[h];for(var f=0;f<3;++f){var m=p[3*h+f];m>=0&&0===c[m]&&(d[3*h+f]?l.push(m):(s.push(m),c[m]=a))}}}var g=l;l=s,s=g,l.length=0,a=-a}var v=function(e,t,r){for(var n=0,a=0;a<e.length;++a)t[a]===r&&(e[n++]=e[a]);return e.length=n,e}(u,c,t);return r?v.concat(n.boundary):v},i.prototype.locate=(n=[0,0,0],function(e,t,r){var i=e,s=t,l=r;return t<r?t<e&&(i=t,s=r,l=e):r<e&&(i=r,s=e,l=t),i<0?-1:(n[0]=i,n[1]=s,n[2]=l,a.eq(this.cells,n,o))})},{"binary-search-bounds":112}],110:[function(e,t,r){"use strict";var n=e("binary-search-bounds"),a=e("robust-orientation")[3],i=0,o=1,s=2;function l(e,t,r,n,a){this.a=e,this.b=t,this.idx=r,this.lowerIds=n,this.upperIds=a}function c(e,t,r,n){this.a=e,this.b=t,this.type=r,this.idx=n}function u(e,t){var r=e.a[0]-t.a[0]||e.a[1]-t.a[1]||e.type-t.type;return r||(e.type!==i&&(r=a(e.a,e.b,t.b))?r:e.idx-t.idx)}function d(e,t){return a(e.a,e.b,t)}function p(e,t,r,i,o){for(var s=n.lt(t,i,d),l=n.gt(t,i,d),c=s;c<l;++c){for(var u=t[c],p=u.lowerIds,h=p.length;h>1&&a(r[p[h-2]],r[p[h-1]],i)>0;)e.push([p[h-1],p[h-2],o]),h-=1;p.length=h,p.push(o);var f=u.upperIds;for(h=f.length;h>1&&a(r[f[h-2]],r[f[h-1]],i)<0;)e.push([f[h-2],f[h-1],o]),h-=1;f.length=h,f.push(o)}}function h(e,t){var r;return(r=e.a[0]<t.a[0]?a(e.a,e.b,t.a):a(t.b,t.a,e.a))?r:(r=t.b[0]<e.b[0]?a(e.a,e.b,t.b):a(t.b,t.a,e.b))||e.idx-t.idx}function f(e,t,r){var a=n.le(e,r,h),i=e[a],o=i.upperIds,s=o[o.length-1];i.upperIds=[s],e.splice(a+1,0,new l(r.a,r.b,r.idx,[s],o))}function m(e,t,r){var a=r.a;r.a=r.b,r.b=a;var i=n.eq(e,r,h),o=e[i];e[i-1].upperIds=o.upperIds,e.splice(i,1)}t.exports=function(e,t){for(var r=e.length,n=t.length,a=[],d=0;d<r;++d)a.push(new c(e[d],null,i,d));for(d=0;d<n;++d){var h=t[d],g=e[h[0]],v=e[h[1]];g[0]<v[0]?a.push(new c(g,v,s,d),new c(v,g,o,d)):g[0]>v[0]&&a.push(new c(v,g,s,d),new c(g,v,o,d))}a.sort(u);for(var y=a[0].a[0]-(1+Math.abs(a[0].a[0]))*Math.pow(2,-52),b=[new l([y,1],[y,0],-1,[],[],[],[])],_=[],x=(d=0,a.length);d<x;++d){var w=a[d],k=w.type;k===i?p(_,b,e,w.a,w.idx):k===s?f(b,0,w):m(b,0,w)}return _}},{"binary-search-bounds":112,"robust-orientation":508}],111:[function(e,t,r){"use strict";var n=e("binary-search-bounds");function a(e,t){this.stars=e,this.edges=t}t.exports=function(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=[];return new a(r,t)};var i=a.prototype;function o(e,t,r){for(var n=1,a=e.length;n<a;n+=2)if(e[n-1]===t&&e[n]===r)return e[n-1]=e[a-2],e[n]=e[a-1],void(e.length=a-2)}i.isConstraint=function(){var e=[0,0];function t(e,t){return e[0]-t[0]||e[1]-t[1]}return function(r,a){return e[0]=Math.min(r,a),e[1]=Math.max(r,a),n.eq(this.edges,e,t)>=0}}(),i.removeTriangle=function(e,t,r){var n=this.stars;o(n[e],t,r),o(n[t],r,e),o(n[r],e,t)},i.addTriangle=function(e,t,r){var n=this.stars;n[e].push(t,r),n[t].push(r,e),n[r].push(e,t)},i.opposite=function(e,t){for(var r=this.stars[t],n=1,a=r.length;n<a;n+=2)if(r[n]===e)return r[n-1];return-1},i.flip=function(e,t){var r=this.opposite(e,t),n=this.opposite(t,e);this.removeTriangle(e,t,r),this.removeTriangle(t,e,n),this.addTriangle(e,n,r),this.addTriangle(t,r,n)},i.edges=function(){for(var e=this.stars,t=[],r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length;i<o;i+=2)t.push([a[i],a[i+1]]);return t},i.cells=function(){for(var e=this.stars,t=[],r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length;i<o;i+=2){var s=a[i],l=a[i+1];r<Math.min(s,l)&&t.push([r,s,l])}return t}},{"binary-search-bounds":112}],112:[function(e,t,r){"use strict";function n(e,t,r,n,a){var i=["function ",e,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a[m]"];return a?t.indexOf("c")<0?i.push(";if(x===y){return m}else if(x<=y){"):i.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):i.push(";if(",t,"){i=m;"),r?i.push("l=m+1}else{h=m-1}"):i.push("h=m-1}else{l=m+1}"),i.push("}"),a?i.push("return -1};"):i.push("return i};"),i.join("")}function a(e,t,r,a){return new Function([n("A","x"+e+"y",t,["y"],a),n("P","c(x,y)"+e+"0",t,["y","c"],a),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}t.exports={ge:a(">=",!1,"GE"),gt:a(">",!1,"GT"),lt:a("<",!0,"LT"),le:a("<=",!0,"LE"),eq:a("-",!0,"EQ",!0)}},{}],113:[function(e,t,r){"use strict";t.exports=function(e){for(var t=1,r=1;r<e.length;++r)for(var n=0;n<r;++n)if(e[r]<e[n])t=-t;else if(e[n]===e[r])return 0;return t}},{}],114:[function(e,t,r){"use strict";var n=e("dup"),a=e("robust-linear-solve");function i(e,t){for(var r=0,n=e.length,a=0;a<n;++a)r+=e[a]*t[a];return r}function o(e){var t=e.length;if(0===t)return[];e[0].length;var r=n([e.length+1,e.length+1],1),o=n([e.length+1],1);r[t][t]=0;for(var s=0;s<t;++s){for(var l=0;l<=s;++l)r[l][s]=r[s][l]=2*i(e[s],e[l]);o[s]=i(e[s],e[s])}var c=a(r,o),u=0,d=c[t+1];for(s=0;s<d.length;++s)u+=d[s];var p=new Array(t);for(s=0;s<t;++s){d=c[s];var h=0;for(l=0;l<d.length;++l)h+=d[l];p[s]=h/u}return p}function s(e){if(0===e.length)return[];for(var t=e[0].length,r=n([t]),a=o(e),i=0;i<e.length;++i)for(var s=0;s<t;++s)r[s]+=e[i][s]*a[i];return r}s.barycenetric=o,t.exports=s},{dup:171,"robust-linear-solve":507}],115:[function(e,t,r){t.exports=function(e){for(var t=n(e),r=0,a=0;a<e.length;++a)for(var i=e[a],o=0;o<t.length;++o)r+=Math.pow(i[o]-t[o],2);return Math.sqrt(r/e.length)};var n=e("circumcenter")},{circumcenter:114}],116:[function(e,t,r){t.exports=function(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}},{}],117:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n;if(r){n=t;for(var a=new Array(t.length),i=0;i<t.length;++i){var o=t[i];a[i]=[o[0],o[1],r[i]]}t=a}for(var s=function(e,t,r){var n=f(e,[],h(e));return v(t,n,r),!!n}(e,t,!!r);y(e,t,!!r);)s=!0;if(r&&s)for(n.length=0,r.length=0,i=0;i<t.length;++i)o=t[i],n.push([o[0],o[1]]),r.push(o[2]);return s};var n=e("union-find"),a=e("box-intersect"),i=e("robust-segment-intersect"),o=e("big-rat"),s=e("big-rat/cmp"),l=e("big-rat/to-float"),c=e("rat-vec"),u=e("nextafter"),d=e("./lib/rat-seg-intersect");function p(e){var t=l(e);return[u(t,-1/0),u(t,1/0)]}function h(e){for(var t=new Array(e.length),r=0;r<e.length;++r){var n=e[r];t[r]=[u(n[0],-1/0),u(n[1],-1/0),u(n[0],1/0),u(n[1],1/0)]}return t}function f(e,t,r){for(var i=t.length,o=new n(i),s=[],l=0;l<t.length;++l){var c=t[l],d=p(c[0]),h=p(c[1]);s.push([u(d[0],-1/0),u(h[0],-1/0),u(d[1],1/0),u(h[1],1/0)])}a(s,(function(e,t){o.link(e,t)}));var f=!0,m=new Array(i);for(l=0;l<i;++l)(v=o.find(l))!==l&&(f=!1,e[v]=[Math.min(e[l][0],e[v][0]),Math.min(e[l][1],e[v][1])]);if(f)return null;var g=0;for(l=0;l<i;++l){var v;(v=o.find(l))===l?(m[l]=g,e[g++]=e[l]):m[l]=-1}for(e.length=g,l=0;l<i;++l)m[l]<0&&(m[l]=m[o.find(l)]);return m}function m(e,t){return e[0]-t[0]||e[1]-t[1]}function g(e,t){var r=e[0]-t[0]||e[1]-t[1];return r||(e[2]<t[2]?-1:e[2]>t[2]?1:0)}function v(e,t,r){if(0!==e.length){if(t)for(var n=0;n<e.length;++n){var a=t[(o=e[n])[0]],i=t[o[1]];o[0]=Math.min(a,i),o[1]=Math.max(a,i)}else for(n=0;n<e.length;++n){var o;a=(o=e[n])[0],i=o[1],o[0]=Math.min(a,i),o[1]=Math.max(a,i)}r?e.sort(g):e.sort(m);var s=1;for(n=1;n<e.length;++n){var l=e[n-1],c=e[n];(c[0]!==l[0]||c[1]!==l[1]||r&&c[2]!==l[2])&&(e[s++]=c)}e.length=s}}function y(e,t,r){var n=function(e,t){for(var r=new Array(t.length),n=0;n<t.length;++n){var a=t[n],i=e[a[0]],o=e[a[1]];r[n]=[u(Math.min(i[0],o[0]),-1/0),u(Math.min(i[1],o[1]),-1/0),u(Math.max(i[0],o[0]),1/0),u(Math.max(i[1],o[1]),1/0)]}return r}(e,t),p=function(e,t,r){var n=[];return a(r,(function(r,a){var o=t[r],s=t[a];if(o[0]!==s[0]&&o[0]!==s[1]&&o[1]!==s[0]&&o[1]!==s[1]){var l=e[o[0]],c=e[o[1]],u=e[s[0]],d=e[s[1]];i(l,c,u,d)&&n.push([r,a])}})),n}(e,t,n),m=h(e),g=function(e,t,r,n){var o=[];return a(r,n,(function(r,n){var a=t[r];if(a[0]!==n&&a[1]!==n){var s=e[n],l=e[a[0]],c=e[a[1]];i(l,c,s,s)&&o.push([r,n])}})),o}(e,t,n,m),y=f(e,function(e,t,r,n,a){var i,u,p=e.map((function(e){return[o(e[0]),o(e[1])]}));for(i=0;i<r.length;++i){var h=r[i];u=h[0];var f=h[1],m=t[u],g=t[f],v=d(c(e[m[0]]),c(e[m[1]]),c(e[g[0]]),c(e[g[1]]));if(v){var y=e.length;e.push([l(v[0]),l(v[1])]),p.push(v),n.push([u,y],[f,y])}}for(n.sort((function(e,t){if(e[0]!==t[0])return e[0]-t[0];var r=p[e[1]],n=p[t[1]];return s(r[0],n[0])||s(r[1],n[1])})),i=n.length-1;i>=0;--i){var b=t[u=(S=n[i])[0]],_=b[0],x=b[1],w=e[_],k=e[x];if((w[0]-k[0]||w[1]-k[1])<0){var M=_;_=x,x=M}b[0]=_;var T,C=b[1]=S[1];for(a&&(T=b[2]);i>0&&n[i-1][0]===u;){var S,L=(S=n[--i])[1];a?t.push([C,L,T]):t.push([C,L]),C=L}a?t.push([C,x,T]):t.push([C,x])}return p}(e,t,p,g,r));return v(t,y,r),!!y||p.length>0||g.length>0}},{"./lib/rat-seg-intersect":118,"big-rat":79,"big-rat/cmp":77,"big-rat/to-float":91,"box-intersect":97,nextafter:452,"rat-vec":487,"robust-segment-intersect":511,"union-find":544}],118:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var i=s(t,e),d=s(n,r),p=u(i,d);if(0===o(p))return null;var h=s(e,r),f=u(d,h),m=a(f,p),g=c(i,m);return l(e,g)};var n=e("big-rat/mul"),a=e("big-rat/div"),i=e("big-rat/sub"),o=e("big-rat/sign"),s=e("rat-vec/sub"),l=e("rat-vec/add"),c=e("rat-vec/muls");function u(e,t){return i(n(e[0],t[1]),n(e[1],t[0]))}},{"big-rat/div":78,"big-rat/mul":88,"big-rat/sign":89,"big-rat/sub":90,"rat-vec/add":486,"rat-vec/muls":488,"rat-vec/sub":489}],119:[function(e,t,r){"use strict";var n=e("clamp");function a(e,t){null==t&&(t=!0);var r=e[0],a=e[1],i=e[2],o=e[3];return null==o&&(o=t?1:255),t&&(r*=255,a*=255,i*=255,o*=255),16777216*(r=255&n(r,0,255))+((a=255&n(a,0,255))<<16)+((i=255&n(i,0,255))<<8)+(o=255&n(o,0,255))}t.exports=a,t.exports.to=a,t.exports.from=function(e,t){var r=(e=+e)>>>24,n=(16711680&e)>>>16,a=(65280&e)>>>8,i=255&e;return!1===t?[r,n,a,i]:[r/255,n/255,a/255,i/255]}},{clamp:116}],120:[function(e,t,r){"use strict";t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],121:[function(e,t,r){"use strict";var n=e("color-rgba"),a=e("clamp"),i=e("dtype");t.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var r=new(i(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!=typeof e||((e=n(e))[0]/=255,e[1]/=255,e[2]/=255),function(e){return e instanceof Uint8Array||e instanceof Uint8ClampedArray||!!(Array.isArray(e)&&(e[0]>1||0===e[0])&&(e[1]>1||0===e[1])&&(e[2]>1||0===e[2])&&(!e[3]||e[3]>1))}(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=null!=e[3]?e[3]:1):(r[0]=a(Math.floor(255*e[0]),0,255),r[1]=a(Math.floor(255*e[1]),0,255),r[2]=a(Math.floor(255*e[2]),0,255),r[3]=null==e[3]?255:a(Math.floor(255*e[3]),0,255)),r)}},{clamp:116,"color-rgba":123,dtype:170}],122:[function(e,r,n){(function(t){"use strict";var n=e("color-name"),a=e("is-plain-obj"),i=e("defined");r.exports=function(e){var r,s,l=[],c=1;if("string"==typeof e)if(n[e])l=n[e].slice(),s="rgb";else if("transparent"===e)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var u=(h=e.slice(1)).length;c=1,u<=4?(l=[parseInt(h[0]+h[0],16),parseInt(h[1]+h[1],16),parseInt(h[2]+h[2],16)],4===u&&(c=parseInt(h[3]+h[3],16)/255)):(l=[parseInt(h[0]+h[1],16),parseInt(h[2]+h[3],16),parseInt(h[4]+h[5],16)],8===u&&(c=parseInt(h[6]+h[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(r=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var d=r[1],p="rgb"===d,h=d.replace(/a$/,"");s=h,u="cmyk"===h?4:"gray"===h?1:3,l=r[2].trim().split(/\s*,\s*/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===h?255*parseFloat(e)/100:parseFloat(e);if("h"===h[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==o[e])return o[e]}return parseFloat(e)})),d===h&&l.push(1),c=p?1:void 0===l[u]?1:l[u],l=l.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(l=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),s=e.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(e))if(a(e)){var f=i(e.r,e.red,e.R,null);null!==f?(s="rgb",l=[f,i(e.g,e.green,e.G),i(e.b,e.blue,e.B)]):(s="hsl",l=[i(e.h,e.hue,e.H),i(e.s,e.saturation,e.S),i(e.l,e.lightness,e.L,e.b,e.brightness)]),c=i(e.a,e.alpha,e.opacity,1),null!=e.opacity&&(c/=100)}else(Array.isArray(e)||t.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e))&&(l=[e[0],e[1],e[2]],s="rgb",c=4===e.length?e[3]:1);else s="rgb",l=[e>>>16,(65280&e)>>>8,255&e];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":120,defined:165,"is-plain-obj":423}],123:[function(e,t,r){"use strict";var n=e("color-parse"),a=e("color-space/hsl"),i=e("clamp");t.exports=function(e){var t,r=n(e);return r.space?((t=Array(3))[0]=i(r.values[0],0,255),t[1]=i(r.values[1],0,255),t[2]=i(r.values[2],0,255),"h"===r.space[0]&&(t=a.rgb(t)),t.push(i(r.alpha,0,1)),t):[]}},{clamp:116,"color-parse":122,"color-space/hsl":124}],124:[function(e,t,r){"use strict";var n=e("./rgb");t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,a,i,o=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[i=255*l,i,i];t=2*l-(r=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,i=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,a[c]=255*i;return a}},n.hsl=function(e){var t,r,n=e[0]/255,a=e[1]/255,i=e[2]/255,o=Math.min(n,a,i),s=Math.max(n,a,i),l=s-o;return s===o?t=0:n===s?t=(a-i)/l:a===s?t=2+(i-n)/l:i===s&&(t=4+(n-a)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(o+s)/2,[t,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},{"./rgb":125}],125:[function(e,t,r){"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],126:[function(e,t,r){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],127:[function(e,t,r){"use strict";var n=e("./colorScale"),a=e("lerp");function i(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function o(e){for(var t,r="#",n=0;n<3;++n)r+=("00"+(t=(t=e[n]).toString(16))).substr(t.length);return r}function s(e){return"rgba("+e.join(",")+")"}t.exports=function(e){var t,r,l,c,u,d,p,h,f,m;if(e||(e={}),h=(e.nshades||72)-1,p=e.format||"hex",(d=e.colormap)||(d="jet"),"string"==typeof d){if(d=d.toLowerCase(),!n[d])throw Error(d+" not a supported colorscale");u=n[d]}else{if(!Array.isArray(d))throw Error("unsupported colormap option",d);u=d.slice()}if(u.length>h+1)throw new Error(d+" map requires nshades to be at least size "+u.length);f=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map((function(e){return Math.round(e.index*h)})),f[0]=Math.min(Math.max(f[0],0),1),f[1]=Math.min(Math.max(f[1],0),1);var g=u.map((function(e,t){var r=u[t].index,n=u[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1?n:(n[3]=f[0]+(f[1]-f[0])*r,n)})),v=[];for(m=0;m<t.length-1;++m){c=t[m+1]-t[m],r=g[m],l=g[m+1];for(var y=0;y<c;y++){var b=y/c;v.push([Math.round(a(r[0],l[0],b)),Math.round(a(r[1],l[1],b)),Math.round(a(r[2],l[2],b)),a(r[3],l[3],b)])}}return v.push(u[u.length-1].rgb.concat(f[1])),"hex"===p?v=v.map(o):"rgbaString"===p?v=v.map(s):"float"===p&&(v=v.map(i)),v}},{"./colorScale":126,lerp:426}],128:[function(e,t,r){"use strict";t.exports=function(e,t,r,i){var o=n(t,r,i);if(0===o){var s=a(n(e,t,r)),c=a(n(e,t,i));if(s===c){if(0===s){var u=l(e,t,r),d=l(e,t,i);return u===d?0:u?1:-1}return 0}return 0===c?s>0?-1:l(e,t,i)?-1:1:0===s?c>0?1:l(e,t,r)?1:-1:a(c-s)}var p=n(e,t,r);return p>0?o>0&&n(e,t,i)>0?1:-1:p<0?o>0||n(e,t,i)>0?1:-1:n(e,t,i)>0?1:l(e,t,r)?1:-1};var n=e("robust-orientation"),a=e("signum"),i=e("two-sum"),o=e("robust-product"),s=e("robust-sum");function l(e,t,r){var n=i(e[0],-t[0]),a=i(e[1],-t[1]),l=i(r[0],-t[0]),c=i(r[1],-t[1]),u=s(o(n,l),o(a,c));return u[u.length-1]>=0}},{"robust-orientation":508,"robust-product":509,"robust-sum":513,signum:514,"two-sum":542}],129:[function(e,t,r){t.exports=function(e,t){var r=e.length,i=e.length-t.length;if(i)return i;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:return e[0]+e[1]-t[0]-t[1]||n(e[0],e[1])-n(t[0],t[1]);case 3:var o=e[0]+e[1],s=t[0]+t[1];if(i=o+e[2]-(s+t[2]))return i;var l=n(e[0],e[1]),c=n(t[0],t[1]);return n(l,e[2])-n(c,t[2])||n(l+e[2],o)-n(c+t[2],s);case 4:var u=e[0],d=e[1],p=e[2],h=e[3],f=t[0],m=t[1],g=t[2],v=t[3];return u+d+p+h-(f+m+g+v)||n(u,d,p,h)-n(f,m,g,v,f)||n(u+d,u+p,u+h,d+p,d+h,p+h)-n(f+m,f+g,f+v,m+g,m+v,g+v)||n(u+d+p,u+d+h,u+p+h,d+p+h)-n(f+m+g,f+m+v,f+g+v,m+g+v);default:for(var y=e.slice().sort(a),b=t.slice().sort(a),_=0;_<r;++_)if(i=y[_]-b[_])return i;return 0}};var n=Math.min;function a(e,t){return e-t}},{}],130:[function(e,t,r){"use strict";var n=e("compare-cell"),a=e("cell-orientation");t.exports=function(e,t){return n(e,t)||a(e)-a(t)}},{"cell-orientation":113,"compare-cell":129}],131:[function(e,t,r){"use strict";var n=e("./lib/ch1d"),a=e("./lib/ch2d"),i=e("./lib/chnd");t.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[[0]];var r=e[0].length;return 0===r?[]:1===r?n(e):2===r?a(e):i(e,r)}},{"./lib/ch1d":132,"./lib/ch2d":133,"./lib/chnd":134}],132:[function(e,t,r){"use strict";t.exports=function(e){for(var t=0,r=0,n=1;n<e.length;++n)e[n][0]<e[t][0]&&(t=n),e[n][0]>e[r][0]&&(r=n);return t<r?[[t],[r]]:t>r?[[r],[t]]:[[t]]}},{}],133:[function(e,t,r){"use strict";t.exports=function(e){var t=n(e),r=t.length;if(r<=2)return[];for(var a=new Array(r),i=t[r-1],o=0;o<r;++o){var s=t[o];a[o]=[i,s],i=s}return a};var n=e("monotone-convex-hull-2d")},{"monotone-convex-hull-2d":435}],134:[function(e,t,r){"use strict";t.exports=function(e,t){try{return n(e,!0)}catch(o){var r=a(e);if(r.length<=t)return[];var i=function(e,t){for(var r=e.length,n=new Array(r),a=0;a<t.length;++a)n[a]=e[t[a]];var i=t.length;for(a=0;a<r;++a)t.indexOf(a)<0&&(n[i++]=e[a]);return n}(e,r);return function(e,t){for(var r=e.length,n=t.length,a=0;a<r;++a)for(var i=e[a],o=0;o<i.length;++o){var s=i[o];if(s<n)i[o]=t[s];else{s-=n;for(var l=0;l<n;++l)s>=t[l]&&(s+=1);i[o]=s}}return e}(n(i,!0),r)}};var n=e("incremental-convex-hull"),a=e("affine-hull")},{"affine-hull":64,"incremental-convex-hull":414}],135:[function(e,t,r){t.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],136:[function(e,t,r){t.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],137:[function(e,t,r){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],138:[function(e,t,r){t.exports=["normal","italic","oblique"]},{}],139:[function(e,t,r){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],140:[function(e,t,r){"use strict";t.exports={parse:e("./parse"),stringify:e("./stringify")}},{"./parse":142,"./stringify":143}],141:[function(e,t,r){"use strict";var n=e("css-font-size-keywords");t.exports={isSize:function(e){return/^[\d\.]/.test(e)||-1!==e.indexOf("/")||-1!==n.indexOf(e)}}},{"css-font-size-keywords":136}],142:[function(e,t,r){"use strict";var n=e("unquote"),a=e("css-global-keywords"),i=e("css-system-font-keywords"),o=e("css-font-weight-keywords"),s=e("css-font-style-keywords"),l=e("css-font-stretch-keywords"),c=e("string-split-by"),u=e("./lib/util").isSize;t.exports=p;var d=p.cache={};function p(e){if("string"!=typeof e)throw new Error("Font argument must be a string.");if(d[e])return d[e];if(""===e)throw new Error("Cannot parse an empty string.");if(-1!==i.indexOf(e))return d[e]={system:e};for(var t,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},p=c(e,/\s+/);t=p.shift();){if(-1!==a.indexOf(t))return["style","variant","weight","stretch"].forEach((function(e){r[e]=t})),d[e]=r;if(-1===s.indexOf(t))if("normal"!==t&&"small-caps"!==t)if(-1===l.indexOf(t)){if(-1===o.indexOf(t)){if(u(t)){var f=c(t,"/");if(r.size=f[0],null!=f[1]?r.lineHeight=h(f[1]):"/"===p[0]&&(p.shift(),r.lineHeight=h(p.shift())),!p.length)throw new Error("Missing required font-family.");return r.family=c(p.join(" "),/\s*,\s*/).map(n),d[e]=r}throw new Error("Unknown or unsupported font token: "+t)}r.weight=t}else r.stretch=t;else r.variant=t;else r.style=t}throw new Error("Missing required font-size.")}function h(e){var t=parseFloat(e);return t.toString()===e?t:e}},{"./lib/util":141,"css-font-stretch-keywords":137,"css-font-style-keywords":138,"css-font-weight-keywords":139,"css-global-keywords":144,"css-system-font-keywords":145,"string-split-by":527,unquote:546}],143:[function(e,t,r){"use strict";var n=e("pick-by-alias"),a=e("./lib/util").isSize,i=m(e("css-global-keywords")),o=m(e("css-system-font-keywords")),s=m(e("css-font-weight-keywords")),l=m(e("css-font-style-keywords")),c=m(e("css-font-stretch-keywords")),u={normal:1,"small-caps":1},d={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},p="1rem",h="serif";function f(e,t){if(e&&!t[e]&&!i[e])throw Error("Unknown keyword `"+e+"`");return e}function m(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=1;return t}t.exports=function(e){if((e=n(e,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"})).system)return e.system&&f(e.system,o),e.system;if(f(e.style,l),f(e.variant,u),f(e.weight,s),f(e.stretch,c),null==e.size&&(e.size=p),"number"==typeof e.size&&(e.size+="px"),!a)throw Error("Bad size value `"+e.size+"`");e.family||(e.family=h),Array.isArray(e.family)&&(e.family.length||(e.family=[h]),e.family=e.family.map((function(e){return d[e]?e:'"'+e+'"'})).join(", "));var t=[];return t.push(e.style),e.variant!==e.style&&t.push(e.variant),e.weight!==e.variant&&e.weight!==e.style&&t.push(e.weight),e.stretch!==e.weight&&e.stretch!==e.variant&&e.stretch!==e.style&&t.push(e.stretch),t.push(e.size+(null==e.lineHeight||"normal"===e.lineHeight||e.lineHeight+""=="1"?"":"/"+e.lineHeight)),t.push(e.family),t.filter(Boolean).join(" ")}},{"./lib/util":141,"css-font-stretch-keywords":137,"css-font-style-keywords":138,"css-font-weight-keywords":139,"css-global-keywords":144,"css-system-font-keywords":145,"pick-by-alias":466}],144:[function(e,t,r){t.exports=["inherit","initial","unset"]},{}],145:[function(e,t,r){t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]},{}],146:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a,i){var o=a-1,s=a*a,l=o*o,c=(1+2*a)*l,u=a*l,d=s*(3-2*a),p=s*o;if(e.length){i||(i=new Array(e.length));for(var h=e.length-1;h>=0;--h)i[h]=c*e[h]+u*t[h]+d*r[h]+p*n[h];return i}return c*e+u*t+d*r+p*n},t.exports.derivative=function(e,t,r,n,a,i){var o=6*a*a-6*a,s=3*a*a-4*a+1,l=-6*a*a+6*a,c=3*a*a-2*a;if(e.length){i||(i=new Array(e.length));for(var u=e.length-1;u>=0;--u)i[u]=o*e[u]+s*t[u]+l*r[u]+c*n[u];return i}return o*e+s*t+l*r[u]+c*n}},{}],147:[function(e,t,r){"use strict";var n=e("./lib/thunk.js");function a(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}t.exports=function(e){var t=new a;t.pre=e.pre,t.body=e.body,t.post=e.post;var r=e.args.slice(0);t.argTypes=r;for(var i=0;i<r.length;++i){var o=r[i];if("array"===o||"object"==typeof o&&o.blockIndices){if(t.argTypes[i]="array",t.arrayArgs.push(i),t.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),t.shimArgs.push("array"+i),i<t.pre.args.length&&t.pre.args[i].count>0)throw new Error("cwise: pre() block may not reference array args");if(i<t.post.args.length&&t.post.args[i].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)t.scalarArgs.push(i),t.shimArgs.push("scalar"+i);else if("index"===o){if(t.indexArgs.push(i),i<t.pre.args.length&&t.pre.args[i].count>0)throw new Error("cwise: pre() block may not reference array index");if(i<t.body.args.length&&t.body.args[i].lvalue)throw new Error("cwise: body() block may not write to array index");if(i<t.post.args.length&&t.post.args[i].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(t.shapeArgs.push(i),i<t.pre.args.length&&t.pre.args[i].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(i<t.body.args.length&&t.body.args[i].lvalue)throw new Error("cwise: body() block may not write to array shape");if(i<t.post.args.length&&t.post.args[i].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof o||!o.offset)throw new Error("cwise: Unknown argument type "+r[i]);t.argTypes[i]="offset",t.offsetArgs.push({array:o.array,offset:o.offset}),t.offsetArgIndex.push(i)}}if(t.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(t.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(t.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(t.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,n(t)}},{"./lib/thunk.js":149}],148:[function(e,t,r){"use strict";var n=e("uniq");function a(e,t,r){var n,a,i=e.length,o=t.arrayArgs.length,s=t.indexArgs.length>0,l=[],c=[],u=0,d=0;for(n=0;n<i;++n)c.push(["i",n,"=0"].join(""));for(a=0;a<o;++a)for(n=0;n<i;++n)d=u,u=e[n],0===n?c.push(["d",a,"s",n,"=t",a,"p",u].join("")):c.push(["d",a,"s",n,"=(t",a,"p",u,"-s",d,"*t",a,"p",d,")"].join(""));for(c.length>0&&l.push("var "+c.join(",")),n=i-1;n>=0;--n)u=e[n],l.push(["for(i",n,"=0;i",n,"<s",u,";++i",n,"){"].join(""));for(l.push(r),n=0;n<i;++n){for(d=u,u=e[n],a=0;a<o;++a)l.push(["p",a,"+=d",a,"s",n].join(""));s&&(n>0&&l.push(["index[",d,"]-=s",d].join("")),l.push(["++index[",u,"]"].join(""))),l.push("}")}return l.join("\n")}function i(e,t,r){for(var n=e.body,a=[],i=[],o=0;o<e.args.length;++o){var s=e.args[o];if(!(s.count<=0)){var l=new RegExp(s.name,"g"),c="",u=t.arrayArgs.indexOf(o);switch(t.argTypes[o]){case"offset":var d=t.offsetArgIndex.indexOf(o);u=t.offsetArgs[d].array,c="+q"+d;case"array":c="p"+u+c;var p="l"+o,h="a"+u;if(0===t.arrayBlockIndices[u])1===s.count?"generic"===r[u]?s.lvalue?(a.push(["var ",p,"=",h,".get(",c,")"].join("")),n=n.replace(l,p),i.push([h,".set(",c,",",p,")"].join(""))):n=n.replace(l,[h,".get(",c,")"].join("")):n=n.replace(l,[h,"[",c,"]"].join("")):"generic"===r[u]?(a.push(["var ",p,"=",h,".get(",c,")"].join("")),n=n.replace(l,p),s.lvalue&&i.push([h,".set(",c,",",p,")"].join(""))):(a.push(["var ",p,"=",h,"[",c,"]"].join("")),n=n.replace(l,p),s.lvalue&&i.push([h,"[",c,"]=",p].join("")));else{for(var f=[s.name],m=[c],g=0;g<Math.abs(t.arrayBlockIndices[u]);g++)f.push("\\s*\\[([^\\]]+)\\]"),m.push("$"+(g+1)+"*t"+u+"b"+g);if(l=new RegExp(f.join(""),"g"),c=m.join("+"),"generic"===r[u])throw new Error("cwise: Generic arrays not supported in combination with blocks!");n=n.replace(l,[h,"[",c,"]"].join(""))}break;case"scalar":n=n.replace(l,"Y"+t.scalarArgs.indexOf(o));break;case"index":n=n.replace(l,"index");break;case"shape":n=n.replace(l,"shape")}}}return[a.join("\n"),n,i.join("\n")].join("\n").trim()}function o(e){for(var t=new Array(e.length),r=!0,n=0;n<e.length;++n){var a=e[n],i=a.match(/\d+/);i=i?i[0]:"",0===a.charAt(0)?t[n]="u"+a.charAt(1)+i:t[n]=a.charAt(0)+i,n>0&&(r=r&&t[n]===t[n-1])}return r?t[0]:t.join("")}t.exports=function(e,t){for(var r=t[1].length-Math.abs(e.arrayBlockIndices[0])|0,s=new Array(e.arrayArgs.length),l=new Array(e.arrayArgs.length),c=0;c<e.arrayArgs.length;++c)l[c]=t[2*c],s[c]=t[2*c+1];var u=[],d=[],p=[],h=[],f=[];for(c=0;c<e.arrayArgs.length;++c){e.arrayBlockIndices[c]<0?(p.push(0),h.push(r),u.push(r),d.push(r+e.arrayBlockIndices[c])):(p.push(e.arrayBlockIndices[c]),h.push(e.arrayBlockIndices[c]+r),u.push(0),d.push(e.arrayBlockIndices[c]));for(var m=[],g=0;g<s[c].length;g++)p[c]<=s[c][g]&&s[c][g]<h[c]&&m.push(s[c][g]-p[c]);f.push(m)}var v=["SS"],y=["'use strict'"],b=[];for(g=0;g<r;++g)b.push(["s",g,"=SS[",g,"]"].join(""));for(c=0;c<e.arrayArgs.length;++c){for(v.push("a"+c),v.push("t"+c),v.push("p"+c),g=0;g<r;++g)b.push(["t",c,"p",g,"=t",c,"[",p[c]+g,"]"].join(""));for(g=0;g<Math.abs(e.arrayBlockIndices[c]);++g)b.push(["t",c,"b",g,"=t",c,"[",u[c]+g,"]"].join(""))}for(c=0;c<e.scalarArgs.length;++c)v.push("Y"+c);if(e.shapeArgs.length>0&&b.push("shape=SS.slice(0)"),e.indexArgs.length>0){var _=new Array(r);for(c=0;c<r;++c)_[c]="0";b.push(["index=[",_.join(","),"]"].join(""))}for(c=0;c<e.offsetArgs.length;++c){var x=e.offsetArgs[c],w=[];for(g=0;g<x.offset.length;++g)0!==x.offset[g]&&(1===x.offset[g]?w.push(["t",x.array,"p",g].join("")):w.push([x.offset[g],"*t",x.array,"p",g].join("")));0===w.length?b.push("q"+c+"=0"):b.push(["q",c,"=",w.join("+")].join(""))}var k=n([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));for((b=b.concat(k)).length>0&&y.push("var "+b.join(",")),c=0;c<e.arrayArgs.length;++c)y.push("p"+c+"|=0");e.pre.body.length>3&&y.push(i(e.pre,e,l));var M=i(e.body,e,l),T=function(e){for(var t=0,r=e[0].length;t<r;){for(var n=1;n<e.length;++n)if(e[n][t]!==e[0][t])return t;++t}return t}(f);T<r?y.push(function(e,t,r,n){for(var i=t.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,c=[],u=0;u<o;++u)c.push(["var offset",u,"=p",u].join(""));for(u=e;u<i;++u)c.push(["for(var j"+u+"=SS[",t[u],"]|0;j",u,">0;){"].join("")),c.push(["if(j",u,"<",s,"){"].join("")),c.push(["s",t[u],"=j",u].join("")),c.push(["j",u,"=0"].join("")),c.push(["}else{s",t[u],"=",s].join("")),c.push(["j",u,"-=",s,"}"].join("")),l&&c.push(["index[",t[u],"]=j",u].join(""));for(u=0;u<o;++u){for(var d=["offset"+u],p=e;p<i;++p)d.push(["j",p,"*t",u,"p",t[p]].join(""));c.push(["p",u,"=(",d.join("+"),")"].join(""))}for(c.push(a(t,r,n)),u=e;u<i;++u)c.push("}");return c.join("\n")}(T,f[0],e,M)):y.push(a(f[0],e,M)),e.post.body.length>3&&y.push(i(e.post,e,l)),e.debug&&console.log("-----Generated cwise routine for ",t,":\n"+y.join("\n")+"\n----------");var C=[e.funcName||"unnamed","_cwise_loop_",s[0].join("s"),"m",T,o(l)].join("");return new Function(["function ",C,"(",v.join(","),"){",y.join("\n"),"} return ",C].join(""))()}},{uniq:545}],149:[function(e,t,r){"use strict";var n=e("./compile.js");t.exports=function(e){var t=["'use strict'","var CACHED={}"],r=[],a=e.funcName+"_cwise_thunk";t.push(["return function ",a,"(",e.shimArgs.join(","),"){"].join(""));for(var i=[],o=[],s=[["array",e.arrayArgs[0],".shape.slice(",Math.max(0,e.arrayBlockIndices[0]),e.arrayBlockIndices[0]<0?","+e.arrayBlockIndices[0]+")":")"].join("")],l=[],c=[],u=0;u<e.arrayArgs.length;++u){var d=e.arrayArgs[u];r.push(["t",d,"=array",d,".dtype,","r",d,"=array",d,".order"].join("")),i.push("t"+d),i.push("r"+d),o.push("t"+d),o.push("r"+d+".join()"),s.push("array"+d+".data"),s.push("array"+d+".stride"),s.push("array"+d+".offset|0"),u>0&&(l.push("array"+e.arrayArgs[0]+".shape.length===array"+d+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[u]))),c.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+d+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[u])+"]"))}for(e.arrayArgs.length>1&&(t.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),t.push("for(var shapeIndex=array"+e.arrayArgs[0]+".shape.length-"+Math.abs(e.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),t.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),t.push("}")),u=0;u<e.scalarArgs.length;++u)s.push("scalar"+e.scalarArgs[u]);return r.push(["type=[",o.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),t.push("var "+r.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",i.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("-----Generated thunk:\n"+t.join("\n")+"\n----------"),new Function("compile",t.join("\n"))(n.bind(void 0,e))}},{"./compile.js":148}],150:[function(e,t,r){t.exports=e("cwise-compiler")},{"cwise-compiler":147}],151:[function(e,t,r){"use strict";var n,a=e("es5-ext/object/copy"),i=e("es5-ext/object/normalize-options"),o=e("es5-ext/object/valid-callable"),s=e("es5-ext/object/map"),l=e("es5-ext/object/valid-callable"),c=e("es5-ext/object/valid-value"),u=Function.prototype.bind,d=Object.defineProperty,p=Object.prototype.hasOwnProperty;n=function(e,t,r){var n,i=c(t)&&l(t.value);return delete(n=a(t)).writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&p.call(this,e)?i:(t.value=u.call(i,r.resolveContext?r.resolveContext(this):this),d(this,e,t),this[e])},n},t.exports=function(e){var t=i(arguments[1]);return null!=t.resolveContext&&o(t.resolveContext),s(e,(function(e,r){return n(r,e,t)}))}},{"es5-ext/object/copy":191,"es5-ext/object/map":200,"es5-ext/object/normalize-options":201,"es5-ext/object/valid-callable":205,"es5-ext/object/valid-value":207}],152:[function(e,t,r){"use strict";var n=e("es5-ext/object/assign"),a=e("es5-ext/object/normalize-options"),i=e("es5-ext/object/is-callable"),o=e("es5-ext/string/#/contains");(t.exports=function(e,t){var r,i,s,l,c;return arguments.length<2||"string"!=typeof e?(l=t,t=e,e=null):l=arguments[2],null==e?(r=s=!0,i=!1):(r=o.call(e,"c"),i=o.call(e,"e"),s=o.call(e,"w")),c={value:t,configurable:r,enumerable:i,writable:s},l?n(a(l),c):c}).gs=function(e,t,r){var s,l,c,u;return"string"!=typeof e?(c=r,r=t,t=e,e=null):c=arguments[3],null==t?t=void 0:i(t)?null==r?r=void 0:i(r)||(c=r,r=void 0):(c=t,t=r=void 0),null==e?(s=!0,l=!1):(s=o.call(e,"c"),l=o.call(e,"e")),u={get:t,set:r,configurable:s,enumerable:l},c?n(a(c),u):u}},{"es5-ext/object/assign":188,"es5-ext/object/is-callable":194,"es5-ext/object/normalize-options":201,"es5-ext/string/#/contains":208}],153:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";function t(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function r(e){return 1===e.length&&(e=function(e){return function(r,n){return t(e(r),n)}}(e)),{left:function(t,r,n,a){for(null==n&&(n=0),null==a&&(a=t.length);n<a;){var i=n+a>>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(null==n&&(n=0),null==a&&(a=t.length);n<a;){var i=n+a>>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}var n=r(t),a=n.right,i=n.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,n,a=e.length,i=0,o=-1,l=0,c=0;if(null==t)for(;++o<a;)isNaN(r=s(e[o]))||(c+=(n=r-l)*(r-(l+=n/++i)));else for(;++o<a;)isNaN(r=s(t(e[o],o,e)))||(c+=(n=r-l)*(r-(l+=n/++i)));if(i>1)return c/(i-1)}function c(e,t){var r=l(e,t);return r?Math.sqrt(r):r}function u(e,t){var r,n,a,i=e.length,o=-1;if(null==t){for(;++o<i;)if(null!=(r=e[o])&&r>=r)for(n=a=r;++o<i;)null!=(r=e[o])&&(n>r&&(n=r),a<r&&(a=r))}else for(;++o<i;)if(null!=(r=t(e[o],o,e))&&r>=r)for(n=a=r;++o<i;)null!=(r=t(e[o],o,e))&&(n>r&&(n=r),a<r&&(a=r));return[n,a]}var d=Array.prototype,p=d.slice,h=d.map;function f(e){return function(){return e}}function m(e){return e}function g(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=0|Math.max(0,Math.ceil((t-e)/r)),i=new Array(a);++n<a;)i[n]=e+n*r;return i}var v=Math.sqrt(50),y=Math.sqrt(10),b=Math.sqrt(2);function _(e,t,r){var n=(t-e)/Math.max(0,r),a=Math.floor(Math.log(n)/Math.LN10),i=n/Math.pow(10,a);return a>=0?(i>=v?10:i>=y?5:i>=b?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=v?10:i>=y?5:i>=b?2:1)}function x(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),a=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/a;return i>=v?a*=10:i>=y?a*=5:i>=b&&(a*=2),t<e?-a:a}function w(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function k(e,t,r){if(null==r&&(r=s),n=e.length){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e);return o+(+r(e[i+1],i+1,e)-o)*(a-i)}}function M(e,t){var r,n,a=e.length,i=-1;if(null==t){for(;++i<a;)if(null!=(r=e[i])&&r>=r)for(n=r;++i<a;)null!=(r=e[i])&&n>r&&(n=r)}else for(;++i<a;)if(null!=(r=t(e[i],i,e))&&r>=r)for(n=r;++i<a;)null!=(r=t(e[i],i,e))&&n>r&&(n=r);return n}function T(e){if(!(a=e.length))return[];for(var t=-1,r=M(e,C),n=new Array(r);++t<r;)for(var a,i=-1,o=n[t]=new Array(a);++i<a;)o[i]=e[i][t];return n}function C(e){return e.length}e.bisect=a,e.bisectRight=a,e.bisectLeft=i,e.ascending=t,e.bisector=r,e.cross=function(e,t,r){var n,a,i,s,l=e.length,c=t.length,u=new Array(l*c);for(null==r&&(r=o),n=i=0;n<l;++n)for(s=e[n],a=0;a<c;++a,++i)u[i]=r(s,t[a]);return u},e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function n(n){var i,o,s=n.length,l=new Array(s);for(i=0;i<s;++i)l[i]=e(n[i],i,n);var c=t(l),u=c[0],d=c[1],p=r(l,u,d);Array.isArray(p)||(p=x(u,d,p),p=g(Math.ceil(u/p)*p,d,p));for(var h=p.length;p[0]<=u;)p.shift(),--h;for(;p[h-1]>d;)p.pop(),--h;var f,m=new Array(h+1);for(i=0;i<=h;++i)(f=m[i]=[]).x0=i>0?p[i-1]:u,f.x1=i<h?p[i]:d;for(i=0;i<s;++i)u<=(o=l[i])&&o<=d&&m[a(p,o,0,h)].push(n[i]);return m}return n.value=function(t){return arguments.length?(e="function"==typeof t?t:f(t),n):e},n.domain=function(e){return arguments.length?(t="function"==typeof e?e:f([e[0],e[1]]),n):t},n.thresholds=function(e){return arguments.length?(r="function"==typeof e?e:Array.isArray(e)?f(p.call(e)):f(e),n):r},n},e.thresholdFreedmanDiaconis=function(e,r,n){return e=h.call(e,s).sort(t),Math.ceil((n-r)/(2*(k(e,.75)-k(e,.25))*Math.pow(e.length,-1/3)))},e.thresholdScott=function(e,t,r){return Math.ceil((r-t)/(3.5*c(e)*Math.pow(e.length,-1/3)))},e.thresholdSturges=w,e.max=function(e,t){var r,n,a=e.length,i=-1;if(null==t){for(;++i<a;)if(null!=(r=e[i])&&r>=r)for(n=r;++i<a;)null!=(r=e[i])&&r>n&&(n=r)}else for(;++i<a;)if(null!=(r=t(e[i],i,e))&&r>=r)for(n=r;++i<a;)null!=(r=t(e[i],i,e))&&r>n&&(n=r);return n},e.mean=function(e,t){var r,n=e.length,a=n,i=-1,o=0;if(null==t)for(;++i<n;)isNaN(r=s(e[i]))?--a:o+=r;else for(;++i<n;)isNaN(r=s(t(e[i],i,e)))?--a:o+=r;if(a)return o/a},e.median=function(e,r){var n,a=e.length,i=-1,o=[];if(null==r)for(;++i<a;)isNaN(n=s(e[i]))||o.push(n);else for(;++i<a;)isNaN(n=s(r(e[i],i,e)))||o.push(n);return k(o.sort(t),.5)},e.merge=function(e){for(var t,r,n,a=e.length,i=-1,o=0;++i<a;)o+=e[i].length;for(r=new Array(o);--a>=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,n=e.length-1,a=e[0],i=new Array(n<0?0:n);r<n;)i[r]=t(a,a=e[++r]);return i},e.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},e.quantile=k,e.range=g,e.scan=function(e,r){if(n=e.length){var n,a,i=0,o=0,s=e[o];for(null==r&&(r=t);++i<n;)(r(a=e[i],s)<0||0!==r(s,s))&&(s=a,o=i);return 0===r(s,s)?o:void 0}},e.shuffle=function(e,t,r){for(var n,a,i=(null==r?e.length:r)-(t=null==t?0:+t);i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},e.sum=function(e,t){var r,n=e.length,a=-1,i=0;if(null==t)for(;++a<n;)(r=+e[a])&&(i+=r);else for(;++a<n;)(r=+t(e[a],a,e))&&(i+=r);return i},e.ticks=function(e,t,r){var n,a,i,o,s=-1;if(r=+r,(e=+e)==(t=+t)&&r>0)return[e];if((n=t<e)&&(a=e,e=t,t=a),0===(o=_(e,t,r))||!isFinite(o))return[];if(o>0)for(e=Math.ceil(e/o),t=Math.floor(t/o),i=new Array(a=Math.ceil(t-e+1));++s<a;)i[s]=(e+s)*o;else for(e=Math.floor(e*o),t=Math.ceil(t*o),i=new Array(a=Math.ceil(e-t+1));++s<a;)i[s]=(e-s)/o;return n&&i.reverse(),i},e.tickIncrement=_,e.tickStep=x,e.transpose=T,e.variance=l,e.zip=function(){return T(arguments)},Object.defineProperty(e,"__esModule",{value:!0})}))},{}],154:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";function t(){}function r(e,r){var n=new t;if(e instanceof t)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var a,i=-1,o=e.length;if(null==r)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(r(a=e[i],i,e),a)}else if(e)for(var s in e)n.set(s,e[s]);return n}function n(){return{}}function a(e,t,r){e[t]=r}function i(){return r()}function o(e,t,r){e.set(t,r)}function s(){}t.prototype=r.prototype={constructor:t,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var l=r.prototype;function c(e,t){var r=new s;if(e instanceof s)e.each((function(e){r.add(e)}));else if(e){var n=-1,a=e.length;if(null==t)for(;++n<a;)r.add(e[n]);else for(;++n<a;)r.add(t(e[n],n,e))}return r}s.prototype=c.prototype={constructor:s,has:l.has,add:function(e){return this["$"+(e+="")]=e,this},remove:l.remove,clear:l.clear,values:l.keys,size:l.size,empty:l.empty,each:l.each},e.nest=function(){var e,t,s,l=[],c=[];function u(n,a,i,o){if(a>=l.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var s,c,d,p=-1,h=n.length,f=l[a++],m=r(),g=i();++p<h;)(d=m.get(s=f(c=n[p])+""))?d.push(c):m.set(s,[c]);return m.each((function(e,t){o(g,t,u(e,a,i,o))})),g}return s={object:function(e){return u(e,0,n,a)},map:function(e){return u(e,0,i,o)},entries:function(e){return function e(r,n){if(++n>l.length)return r;var a,i=c[n-1];return null!=t&&n>=l.length?a=r.entries():(a=[],r.each((function(t,r){a.push({key:r,values:e(t,n)})}))),null!=i?a.sort((function(e,t){return i(e.key,t.key)})):a}(u(e,0,i,o),0)},key:function(e){return l.push(e),s},sortKeys:function(e){return c[l.length-1]=e,s},sortValues:function(t){return e=t,s},rollup:function(e){return t=e,s}}},e.set=c,e.map=r,e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},Object.defineProperty(e,"__esModule",{value:!0})}))},{}],155:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";function t(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function r(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function n(){}var a="\\s*([+-]?\\d+)\\s*",i="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,c=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),u=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),d=new RegExp("^rgba\\("+[a,a,a,i]+"\\)$"),p=new RegExp("^rgba\\("+[o,o,o,i]+"\\)$"),h=new RegExp("^hsl\\("+[i,o,o]+"\\)$"),f=new RegExp("^hsla\\("+[i,o,o,i]+"\\)$"),m={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function g(e){var t;return e=(e+"").trim().toLowerCase(),(t=s.exec(e))?new x((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=l.exec(e))?v(parseInt(t[1],16)):(t=c.exec(e))?new x(t[1],t[2],t[3],1):(t=u.exec(e))?new x(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=d.exec(e))?y(t[1],t[2],t[3],t[4]):(t=p.exec(e))?y(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=h.exec(e))?k(t[1],t[2]/100,t[3]/100,1):(t=f.exec(e))?k(t[1],t[2]/100,t[3]/100,t[4]):m.hasOwnProperty(e)?v(m[e]):"transparent"===e?new x(NaN,NaN,NaN,0):null}function v(e){return new x(e>>16&255,e>>8&255,255&e,1)}function y(e,t,r,n){return n<=0&&(e=t=r=NaN),new x(e,t,r,n)}function b(e){return e instanceof n||(e=g(e)),e?new x((e=e.rgb()).r,e.g,e.b,e.opacity):new x}function _(e,t,r,n){return 1===arguments.length?b(e):new x(e,t,r,null==n?1:n)}function x(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function w(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function k(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new T(e,t,r,n)}function M(e,t,r,a){return 1===arguments.length?function(e){if(e instanceof T)return new T(e.h,e.s,e.l,e.opacity);if(e instanceof n||(e=g(e)),!e)return new T;if(e instanceof T)return e;var t=(e=e.rgb()).r/255,r=e.g/255,a=e.b/255,i=Math.min(t,r,a),o=Math.max(t,r,a),s=NaN,l=o-i,c=(o+i)/2;return l?(s=t===o?(r-a)/l+6*(r<a):r===o?(a-t)/l+2:(t-r)/l+4,l/=c<.5?o+i:2-o-i,s*=60):l=c>0&&c<1?0:s,new T(s,l,c,e.opacity)}(e):new T(e,t,r,null==a?1:a)}function T(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function C(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}t(n,g,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),t(x,_,r(n,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new x(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new x(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+w(this.r)+w(this.g)+w(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),t(T,M,r(n,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new T(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new T(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new x(C(e>=240?e-240:e+120,a,n),C(e,a,n),C(e<120?e+240:e-120,a,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var S=Math.PI/180,L=180/Math.PI,A=.96422,E=1,D=.82521,I=4/29,P=6/29,O=3*P*P,R=P*P*P;function F(e){if(e instanceof N)return new N(e.l,e.a,e.b,e.opacity);if(e instanceof W){if(isNaN(e.h))return new N(e.l,0,0,e.opacity);var t=e.h*S;return new N(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof x||(e=b(e));var r,n,a=H(e.r),i=H(e.g),o=H(e.b),s=j((.2225045*a+.7168786*i+.0606169*o)/E);return a===i&&i===o?r=n=s:(r=j((.4360747*a+.3850649*i+.1430804*o)/A),n=j((.0139322*a+.0971045*i+.7141733*o)/D)),new N(116*s-16,500*(r-s),200*(s-n),e.opacity)}function z(e,t,r,n){return 1===arguments.length?F(e):new N(e,t,r,null==n?1:n)}function N(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function j(e){return e>R?Math.pow(e,1/3):e/O+I}function B(e){return e>P?e*e*e:O*(e-I)}function Y(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function H(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function V(e){if(e instanceof W)return new W(e.h,e.c,e.l,e.opacity);if(e instanceof N||(e=F(e)),0===e.a&&0===e.b)return new W(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*L;return new W(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function U(e,t,r,n){return 1===arguments.length?V(e):new W(e,t,r,null==n?1:n)}function W(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}t(N,z,r(n,{brighter:function(e){return new N(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new N(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new x(Y(3.1338561*(t=A*B(t))-1.6168667*(e=E*B(e))-.4906146*(r=D*B(r))),Y(-.9787684*t+1.9161415*e+.033454*r),Y(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),t(W,U,r(n,{brighter:function(e){return new W(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new W(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return F(this).rgb()}}));var G=-.14861,q=1.78277,K=-.29227,X=-.90649,Z=1.97294,J=Z*X,$=Z*q,Q=q*K-X*G;function ee(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof te)return new te(e.h,e.s,e.l,e.opacity);e instanceof x||(e=b(e));var t=e.r/255,r=e.g/255,n=e.b/255,a=(Q*n+J*t-$*r)/(Q+J-$),i=n-a,o=(Z*(r-a)-K*i)/X,s=Math.sqrt(o*o+i*i)/(Z*a*(1-a)),l=s?Math.atan2(o,i)*L-120:NaN;return new te(l<0?l+360:l,s,a,e.opacity)}(e):new te(e,t,r,null==n?1:n)}function te(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}t(te,ee,r(n,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new te(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new te(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*S,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),a=Math.sin(e);return new x(255*(t+r*(G*n+q*a)),255*(t+r*(K*n+X*a)),255*(t+r*(Z*n)),this.opacity)}})),e.color=g,e.rgb=_,e.hsl=M,e.lab=z,e.hcl=U,e.lch=function(e,t,r,n){return 1===arguments.length?V(e):new W(r,t,e,null==n?1:n)},e.gray=function(e,t){return new N(e,0,0,null==t?1:t)},e.cubehelix=ee,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],156:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";var t={value:function(){}};function r(){for(var e,t=0,r=arguments.length,a={};t<r;++t){if(!(e=arguments[t]+"")||e in a)throw new Error("illegal type: "+e);a[e]=[]}return new n(a)}function n(e){this._=e}function a(e,t){return e.trim().split(/^|\s+/).map((function(e){var r="",n=e.indexOf(".");if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}}))}function i(e,t){for(var r,n=0,a=e.length;n<a;++n)if((r=e[n]).name===t)return r.value}function o(e,r,n){for(var a=0,i=e.length;a<i;++a)if(e[a].name===r){e[a]=t,e=e.slice(0,a).concat(e.slice(a+1));break}return null!=n&&e.push({name:r,value:n}),e}n.prototype=r.prototype={constructor:n,on:function(e,t){var r,n=this._,s=a(e+"",n),l=-1,c=s.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++l<c;)if(r=(e=s[l]).type)n[r]=o(n[r],e.name,t);else if(null==t)for(r in n)n[r]=o(n[r],e.name,null);return this}for(;++l<c;)if((r=(e=s[l]).type)&&(r=i(n[r],e.name)))return r},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new n(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var r,n,a=new Array(r),i=0;i<r;++i)a[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,r=(n=this._[e]).length;i<r;++i)n[i].value.apply(t,a)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],a=0,i=n.length;a<i;++a)n[a].value.apply(t,r)}},e.dispatch=r,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],157:[function(e,t,r){!function(n,a){"object"==typeof r&&void 0!==t?a(r,e("d3-quadtree"),e("d3-collection"),e("d3-dispatch"),e("d3-timer")):a(n.d3=n.d3||{},n.d3,n.d3,n.d3,n.d3)}(this,(function(e,t,r,n,a){"use strict";var i=function(e){return function(){return e}},o=function(){return 1e-6*(Math.random()-.5)};function s(e){return e.x+e.vx}function l(e){return e.y+e.vy}function c(e){return e.index}function u(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function d(e){return e.x}function p(e){return e.y}var h=10,f=Math.PI*(3-Math.sqrt(5));e.forceCenter=function(e,t){var r;function n(){var n,a,i=r.length,o=0,s=0;for(n=0;n<i;++n)o+=(a=r[n]).x,s+=a.y;for(o=o/i-e,s=s/i-t,n=0;n<i;++n)(a=r[n]).x-=o,a.y-=s}return null==e&&(e=0),null==t&&(t=0),n.initialize=function(e){r=e},n.x=function(t){return arguments.length?(e=+t,n):e},n.y=function(e){return arguments.length?(t=+e,n):t},n},e.forceCollide=function(e){var r,n,a=1,c=1;function u(){for(var e,i,u,p,h,f,m,g=r.length,v=0;v<c;++v)for(i=t.quadtree(r,s,l).visitAfter(d),e=0;e<g;++e)u=r[e],f=n[u.index],m=f*f,p=u.x+u.vx,h=u.y+u.vy,i.visit(y);function y(e,t,r,n,i){var s=e.data,l=e.r,c=f+l;if(!s)return t>p+c||n<p-c||r>h+c||i<h-c;if(s.index>u.index){var d=p-s.x-s.vx,g=h-s.y-s.vy,v=d*d+g*g;v<c*c&&(0===d&&(v+=(d=o())*d),0===g&&(v+=(g=o())*g),v=(c-(v=Math.sqrt(v)))/v*a,u.vx+=(d*=v)*(c=(l*=l)/(m+l)),u.vy+=(g*=v)*c,s.vx-=d*(c=1-c),s.vy-=g*c)}}}function d(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function p(){if(r){var t,a,i=r.length;for(n=new Array(i),t=0;t<i;++t)a=r[t],n[a.index]=+e(a,t,r)}}return"function"!=typeof e&&(e=i(null==e?1:+e)),u.initialize=function(e){r=e,p()},u.iterations=function(e){return arguments.length?(c=+e,u):c},u.strength=function(e){return arguments.length?(a=+e,u):a},u.radius=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),p(),u):e},u},e.forceLink=function(e){var t,n,a,s,l,d=c,p=function(e){return 1/Math.min(s[e.source.index],s[e.target.index])},h=i(30),f=1;function m(r){for(var a=0,i=e.length;a<f;++a)for(var s,c,u,d,p,h,m,g=0;g<i;++g)c=(s=e[g]).source,d=(u=s.target).x+u.vx-c.x-c.vx||o(),p=u.y+u.vy-c.y-c.vy||o(),d*=h=((h=Math.sqrt(d*d+p*p))-n[g])/h*r*t[g],p*=h,u.vx-=d*(m=l[g]),u.vy-=p*m,c.vx+=d*(m=1-m),c.vy+=p*m}function g(){if(a){var i,o,c=a.length,p=e.length,h=r.map(a,d);for(i=0,s=new Array(c);i<p;++i)(o=e[i]).index=i,"object"!=typeof o.source&&(o.source=u(h,o.source)),"object"!=typeof o.target&&(o.target=u(h,o.target)),s[o.source.index]=(s[o.source.index]||0)+1,s[o.target.index]=(s[o.target.index]||0)+1;for(i=0,l=new Array(p);i<p;++i)o=e[i],l[i]=s[o.source.index]/(s[o.source.index]+s[o.target.index]);t=new Array(p),v(),n=new Array(p),y()}}function v(){if(a)for(var r=0,n=e.length;r<n;++r)t[r]=+p(e[r],r,e)}function y(){if(a)for(var t=0,r=e.length;t<r;++t)n[t]=+h(e[t],t,e)}return null==e&&(e=[]),m.initialize=function(e){a=e,g()},m.links=function(t){return arguments.length?(e=t,g(),m):e},m.id=function(e){return arguments.length?(d=e,m):d},m.iterations=function(e){return arguments.length?(f=+e,m):f},m.strength=function(e){return arguments.length?(p="function"==typeof e?e:i(+e),v(),m):p},m.distance=function(e){return arguments.length?(h="function"==typeof e?e:i(+e),y(),m):h},m},e.forceManyBody=function(){var e,r,n,a,s=i(-30),l=1,c=1/0,u=.81;function h(a){var i,o=e.length,s=t.quadtree(e,d,p).visitAfter(m);for(n=a,i=0;i<o;++i)r=e[i],s.visit(g)}function f(){if(e){var t,r,n=e.length;for(a=new Array(n),t=0;t<n;++t)r=e[t],a[r.index]=+s(r,t,e)}}function m(e){var t,r,n,i,o,s=0,l=0;if(e.length){for(n=i=o=0;o<4;++o)(t=e[o])&&(r=Math.abs(t.value))&&(s+=t.value,l+=r,n+=r*t.x,i+=r*t.y);e.x=n/l,e.y=i/l}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=a[t.data.index]}while(t=t.next)}e.value=s}function g(e,t,i,s){if(!e.value)return!0;var d=e.x-r.x,p=e.y-r.y,h=s-t,f=d*d+p*p;if(h*h/u<f)return f<c&&(0===d&&(f+=(d=o())*d),0===p&&(f+=(p=o())*p),f<l&&(f=Math.sqrt(l*f)),r.vx+=d*e.value*n/f,r.vy+=p*e.value*n/f),!0;if(!(e.length||f>=c)){(e.data!==r||e.next)&&(0===d&&(f+=(d=o())*d),0===p&&(f+=(p=o())*p),f<l&&(f=Math.sqrt(l*f)));do{e.data!==r&&(h=a[e.data.index]*n/f,r.vx+=d*h,r.vy+=p*h)}while(e=e.next)}}return h.initialize=function(t){e=t,f()},h.strength=function(e){return arguments.length?(s="function"==typeof e?e:i(+e),f(),h):s},h.distanceMin=function(e){return arguments.length?(l=e*e,h):Math.sqrt(l)},h.distanceMax=function(e){return arguments.length?(c=e*e,h):Math.sqrt(c)},h.theta=function(e){return arguments.length?(u=e*e,h):Math.sqrt(u)},h},e.forceRadial=function(e,t,r){var n,a,o,s=i(.1);function l(e){for(var i=0,s=n.length;i<s;++i){var l=n[i],c=l.x-t||1e-6,u=l.y-r||1e-6,d=Math.sqrt(c*c+u*u),p=(o[i]-d)*a[i]*e/d;l.vx+=c*p,l.vy+=u*p}}function c(){if(n){var t,r=n.length;for(a=new Array(r),o=new Array(r),t=0;t<r;++t)o[t]=+e(n[t],t,n),a[t]=isNaN(o[t])?0:+s(n[t],t,n)}}return"function"!=typeof e&&(e=i(+e)),null==t&&(t=0),null==r&&(r=0),l.initialize=function(e){n=e,c()},l.strength=function(e){return arguments.length?(s="function"==typeof e?e:i(+e),c(),l):s},l.radius=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),c(),l):e},l.x=function(e){return arguments.length?(t=+e,l):t},l.y=function(e){return arguments.length?(r=+e,l):r},l},e.forceSimulation=function(e){var t,i=1,o=.001,s=1-Math.pow(o,1/300),l=0,c=.6,u=r.map(),d=a.timer(m),p=n.dispatch("tick","end");function m(){g(),p.call("tick",t),i<o&&(d.stop(),p.call("end",t))}function g(){var t,r,n=e.length;for(i+=(l-i)*s,u.each((function(e){e(i)})),t=0;t<n;++t)null==(r=e[t]).fx?r.x+=r.vx*=c:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=c:(r.y=r.fy,r.vy=0)}function v(){for(var t,r=0,n=e.length;r<n;++r){if((t=e[r]).index=r,isNaN(t.x)||isNaN(t.y)){var a=h*Math.sqrt(r),i=r*f;t.x=a*Math.cos(i),t.y=a*Math.sin(i)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function y(t){return t.initialize&&t.initialize(e),t}return null==e&&(e=[]),v(),t={tick:g,restart:function(){return d.restart(m),t},stop:function(){return d.stop(),t},nodes:function(r){return arguments.length?(e=r,v(),u.each(y),t):e},alpha:function(e){return arguments.length?(i=+e,t):i},alphaMin:function(e){return arguments.length?(o=+e,t):o},alphaDecay:function(e){return arguments.length?(s=+e,t):+s},alphaTarget:function(e){return arguments.length?(l=+e,t):l},velocityDecay:function(e){return arguments.length?(c=1-e,t):1-c},force:function(e,r){return arguments.length>1?(null==r?u.remove(e):u.set(e,y(r)),t):u.get(e)},find:function(t,r,n){var a,i,o,s,l,c=0,u=e.length;for(null==n?n=1/0:n*=n,c=0;c<u;++c)(o=(a=t-(s=e[c]).x)*a+(i=r-s.y)*i)<n&&(l=s,n=o);return l},on:function(e,r){return arguments.length>1?(p.on(e,r),t):p.on(e)}}},e.forceX=function(e){var t,r,n,a=i(.1);function o(e){for(var a,i=0,o=t.length;i<o;++i)(a=t[i]).vx+=(n[i]-a.x)*r[i]*e}function s(){if(t){var i,o=t.length;for(r=new Array(o),n=new Array(o),i=0;i<o;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+a(t[i],i,t)}}return"function"!=typeof e&&(e=i(null==e?0:+e)),o.initialize=function(e){t=e,s()},o.strength=function(e){return arguments.length?(a="function"==typeof e?e:i(+e),s(),o):a},o.x=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s(),o):e},o},e.forceY=function(e){var t,r,n,a=i(.1);function o(e){for(var a,i=0,o=t.length;i<o;++i)(a=t[i]).vy+=(n[i]-a.y)*r[i]*e}function s(){if(t){var i,o=t.length;for(r=new Array(o),n=new Array(o),i=0;i<o;++i)r[i]=isNaN(n[i]=+e(t[i],i,t))?0:+a(t[i],i,t)}}return"function"!=typeof e&&(e=i(null==e?0:+e)),o.initialize=function(e){t=e,s()},o.strength=function(e){return arguments.length?(a="function"==typeof e?e:i(+e),s(),o):a},o.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s(),o):e},o},Object.defineProperty(e,"__esModule",{value:!0})}))},{"d3-collection":154,"d3-dispatch":156,"d3-quadtree":161,"d3-timer":163}],158:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";function t(e,t){return e.parent===t.parent?1:2}function r(e,t){return e+t.x}function n(e,t){return Math.max(e,t.y)}function a(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function i(e,t){var r,n,a,i,s,u=new c(e),d=+e.value&&(u.value=e.value),p=[u];for(null==t&&(t=o);r=p.pop();)if(d&&(r.value=+r.data.value),(a=t(r.data))&&(s=a.length))for(r.children=new Array(s),i=s-1;i>=0;--i)p.push(n=r.children[i]=new c(a[i])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function c(e){this.data=e,this.depth=this.height=0,this.parent=null}c.prototype=i.prototype={constructor:c,count:function(){return this.eachAfter(a)},each:function(e){var t,r,n,a,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(e(i),r=i.children)for(n=0,a=r.length;n<a;++n)o.push(r[n])}while(o.length);return this},eachAfter:function(e){for(var t,r,n,a=this,i=[a],o=[];a=i.pop();)if(o.push(a),t=a.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;a=o.pop();)e(a);return this},eachBefore:function(e){for(var t,r,n=this,a=[n];n=a.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)a.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,a=n&&n.length;--a>=0;)r+=n[a].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),a=null;for(e=r.pop(),t=n.pop();e===t;)a=e,e=r.pop(),t=n.pop();return a}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var a=n.length;e!==r;)n.splice(a,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return i(this).eachBefore(s)}};var u=Array.prototype.slice;function d(e){for(var t,r,n=0,a=(e=function(e){for(var t,r,n=e.length;n;)r=Math.random()*n--|0,t=e[n],e[n]=e[r],e[r]=t;return e}(u.call(e))).length,i=[];n<a;)t=e[n],r&&f(r,t)?++n:(r=g(i=p(i,t)),n=0);return r}function p(e,t){var r,n;if(m(t,e))return[t];for(r=0;r<e.length;++r)if(h(t,e[r])&&m(v(e[r],t),e))return[e[r],t];for(r=0;r<e.length-1;++r)for(n=r+1;n<e.length;++n)if(h(v(e[r],e[n]),t)&&h(v(e[r],t),e[n])&&h(v(e[n],t),e[r])&&m(y(e[r],e[n],t),e))return[e[r],e[n],t];throw new Error}function h(e,t){var r=e.r-t.r,n=t.x-e.x,a=t.y-e.y;return r<0||r*r<n*n+a*a}function f(e,t){var r=e.r-t.r+1e-6,n=t.x-e.x,a=t.y-e.y;return r>0&&r*r>n*n+a*a}function m(e,t){for(var r=0;r<t.length;++r)if(!f(e,t[r]))return!1;return!0}function g(e){switch(e.length){case 1:return{x:(t=e[0]).x,y:t.y,r:t.r};case 2:return v(e[0],e[1]);case 3:return y(e[0],e[1],e[2])}var t}function v(e,t){var r=e.x,n=e.y,a=e.r,i=t.x,o=t.y,s=t.r,l=i-r,c=o-n,u=s-a,d=Math.sqrt(l*l+c*c);return{x:(r+i+l/d*u)/2,y:(n+o+c/d*u)/2,r:(d+a+s)/2}}function y(e,t,r){var n=e.x,a=e.y,i=e.r,o=t.x,s=t.y,l=t.r,c=r.x,u=r.y,d=r.r,p=n-o,h=n-c,f=a-s,m=a-u,g=l-i,v=d-i,y=n*n+a*a-i*i,b=y-o*o-s*s+l*l,_=y-c*c-u*u+d*d,x=h*f-p*m,w=(f*_-m*b)/(2*x)-n,k=(m*g-f*v)/x,M=(h*b-p*_)/(2*x)-a,T=(p*v-h*g)/x,C=k*k+T*T-1,S=2*(i+w*k+M*T),L=w*w+M*M-i*i,A=-(C?(S+Math.sqrt(S*S-4*C*L))/(2*C):L/S);return{x:n+w+k*A,y:a+M+T*A,r:A}}function b(e,t,r){var n,a,i,o,s=e.x-t.x,l=e.y-t.y,c=s*s+l*l;c?(a=t.r+r.r,a*=a,o=e.r+r.r,a>(o*=o)?(n=(c+o-a)/(2*c),i=Math.sqrt(Math.max(0,o/c-n*n)),r.x=e.x-n*s-i*l,r.y=e.y-n*l+i*s):(n=(c+a-o)/(2*c),i=Math.sqrt(Math.max(0,a/c-n*n)),r.x=t.x+n*s-i*l,r.y=t.y+n*l+i*s)):(r.x=t.x+r.r,r.y=t.y)}function _(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,a=t.y-e.y;return r>0&&r*r>n*n+a*a}function x(e){var t=e._,r=e.next._,n=t.r+r.r,a=(t.x*r.r+r.x*t.r)/n,i=(t.y*r.r+r.y*t.r)/n;return a*a+i*i}function w(e){this._=e,this.next=null,this.previous=null}function k(e){if(!(a=e.length))return 0;var t,r,n,a,i,o,s,l,c,u,p;if((t=e[0]).x=0,t.y=0,!(a>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(a>2))return t.r+r.r;b(r,t,n=e[2]),t=new w(t),r=new w(r),n=new w(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(s=3;s<a;++s){b(t._,r._,n=e[s]),n=new w(n),l=r.next,c=t.previous,u=r._.r,p=t._.r;do{if(u<=p){if(_(l._,n._)){r=l,t.next=r,r.previous=t,--s;continue e}u+=l._.r,l=l.next}else{if(_(c._,n._)){(t=c).next=r,r.previous=t,--s;continue e}p+=c._.r,c=c.previous}}while(l!==c.next);for(n.previous=t,n.next=r,t.next=r.previous=r=n,i=x(t);(n=n.next)!==r;)(o=x(n))<i&&(t=n,i=o);r=t.next}for(t=[r._],n=r;(n=n.next)!==r;)t.push(n._);for(n=d(t),s=0;s<a;++s)(t=e[s]).x-=n.x,t.y-=n.y;return n.r}function M(e){return null==e?null:T(e)}function T(e){if("function"!=typeof e)throw new Error;return e}function C(){return 0}function S(e){return function(){return e}}function L(e){return Math.sqrt(e.value)}function A(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function E(e,t){return function(r){if(n=r.children){var n,a,i,o=n.length,s=e(r)*t||0;if(s)for(a=0;a<o;++a)n[a].r+=s;if(i=k(n),s)for(a=0;a<o;++a)n[a].r-=s;r.r=i+s}}}function D(e){return function(t){var r=t.parent;t.r*=e,r&&(t.x=r.x+e*t.x,t.y=r.y+e*t.y)}}function I(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function P(e,t,r,n,a){for(var i,o=e.children,s=-1,l=o.length,c=e.value&&(n-t)/e.value;++s<l;)(i=o[s]).y0=r,i.y1=a,i.x0=t,i.x1=t+=i.value*c}var O="$",R={depth:-1},F={};function z(e){return e.id}function N(e){return e.parentId}function j(e,t){return e.parent===t.parent?1:2}function B(e){var t=e.children;return t?t[0]:e.t}function Y(e){var t=e.children;return t?t[t.length-1]:e.t}function H(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function V(e,t,r){return e.a.parent===t.parent?e.a:r}function U(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function W(e,t,r,n,a){for(var i,o=e.children,s=-1,l=o.length,c=e.value&&(a-r)/e.value;++s<l;)(i=o[s]).x0=t,i.x1=n,i.y0=r,i.y1=r+=i.value*c}U.prototype=Object.create(c.prototype);var G=(1+Math.sqrt(5))/2;function q(e,t,r,n,a,i){for(var o,s,l,c,u,d,p,h,f,m,g,v=[],y=t.children,b=0,_=0,x=y.length,w=t.value;b<x;){l=a-r,c=i-n;do{u=y[_++].value}while(!u&&_<x);for(d=p=u,g=u*u*(m=Math.max(c/l,l/c)/(w*e)),f=Math.max(p/g,g/d);_<x;++_){if(u+=s=y[_].value,s<d&&(d=s),s>p&&(p=s),g=u*u*m,(h=Math.max(p/g,g/d))>f){u-=s;break}f=h}v.push(o={value:u,dice:l<c,children:y.slice(b,_)}),o.dice?P(o,r,n,a,w?n+=c*u/w:i):W(o,r,n,w?r+=l*u/w:a,i),w-=u,b=_}return v}var K=function e(t){function r(e,r,n,a,i){q(t,e,r,n,a,i)}return r.ratio=function(t){return e((t=+t)>1?t:1)},r}(G),X=function e(t){function r(e,r,n,a,i){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,c,u,d=-1,p=o.length,h=e.value;++d<p;){for(l=(s=o[d]).children,c=s.value=0,u=l.length;c<u;++c)s.value+=l[c].value;s.dice?P(s,r,n,a,n+=(i-n)*s.value/h):W(s,r,n,r+=(a-r)*s.value/h,i),h-=s.value}else e._squarify=o=q(t,e,r,n,a,i),o.ratio=t}return r.ratio=function(t){return e((t=+t)>1?t:1)},r}(G);e.cluster=function(){var e=t,a=1,i=1,o=!1;function s(t){var s,l=0;t.eachAfter((function(t){var a=t.children;a?(t.x=function(e){return e.reduce(r,0)/e.length}(a),t.y=function(e){return 1+e.reduce(n,0)}(a)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var c=function(e){for(var t;t=e.children;)e=t[0];return e}(t),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),d=c.x-e(c,u)/2,p=u.x+e(u,c)/2;return t.eachAfter(o?function(e){e.x=(e.x-t.x)*a,e.y=(t.y-e.y)*i}:function(e){e.x=(e.x-d)/(p-d)*a,e.y=(1-(t.y?e.y/t.y:1))*i})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,a=+e[0],i=+e[1],s):o?null:[a,i]},s.nodeSize=function(e){return arguments.length?(o=!0,a=+e[0],i=+e[1],s):o?[a,i]:null},s},e.hierarchy=i,e.pack=function(){var e=null,t=1,r=1,n=C;function a(a){return a.x=t/2,a.y=r/2,e?a.eachBefore(A(e)).eachAfter(E(n,.5)).eachBefore(D(1)):a.eachBefore(A(L)).eachAfter(E(C,1)).eachAfter(E(n,a.r/Math.min(t,r))).eachBefore(D(Math.min(t,r)/(2*a.r))),a}return a.radius=function(t){return arguments.length?(e=M(t),a):e},a.size=function(e){return arguments.length?(t=+e[0],r=+e[1],a):[t,r]},a.padding=function(e){return arguments.length?(n="function"==typeof e?e:S(+e),a):n},a},e.packSiblings=function(e){return k(e),e},e.packEnclose=d,e.partition=function(){var e=1,t=1,r=0,n=!1;function a(a){var i=a.height+1;return a.x0=a.y0=r,a.x1=e,a.y1=t/i,a.eachBefore(function(e,t){return function(n){n.children&&P(n,n.x0,e*(n.depth+1)/t,n.x1,e*(n.depth+2)/t);var a=n.x0,i=n.y0,o=n.x1-r,s=n.y1-r;o<a&&(a=o=(a+o)/2),s<i&&(i=s=(i+s)/2),n.x0=a,n.y0=i,n.x1=o,n.y1=s}}(t,i)),n&&a.eachBefore(I),a}return a.round=function(e){return arguments.length?(n=!!e,a):n},a.size=function(r){return arguments.length?(e=+r[0],t=+r[1],a):[e,t]},a.padding=function(e){return arguments.length?(r=+e,a):r},a},e.stratify=function(){var e=z,t=N;function r(r){var n,a,i,o,s,u,d,p=r.length,h=new Array(p),f={};for(a=0;a<p;++a)n=r[a],s=h[a]=new c(n),null!=(u=e(n,a,r))&&(u+="")&&(f[d=O+(s.id=u)]=d in f?F:s);for(a=0;a<p;++a)if(s=h[a],null!=(u=t(r[a],a,r))&&(u+="")){if(!(o=f[O+u]))throw new Error("missing: "+u);if(o===F)throw new Error("ambiguous: "+u);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(i)throw new Error("multiple roots");i=s}if(!i)throw new Error("no root");if(i.parent=R,i.eachBefore((function(e){e.depth=e.parent.depth+1,--p})).eachBefore(l),i.parent=null,p>0)throw new Error("cycle");return i}return r.id=function(t){return arguments.length?(e=T(t),r):e},r.parentId=function(e){return arguments.length?(t=T(e),r):t},r},e.tree=function(){var e=j,t=1,r=1,n=null;function a(a){var l=function(e){for(var t,r,n,a,i,o=new U(e,0),s=[o];t=s.pop();)if(n=t._.children)for(t.children=new Array(i=n.length),a=i-1;a>=0;--a)s.push(r=t.children[a]=new U(n[a],a)),r.parent=t;return(o.parent=new U(null,0)).children=[o],o}(a);if(l.eachAfter(i),l.parent.m=-l.z,l.eachBefore(o),n)a.eachBefore(s);else{var c=a,u=a,d=a;a.eachBefore((function(e){e.x<c.x&&(c=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)}));var p=c===u?1:e(c,u)/2,h=p-c.x,f=t/(u.x+p+h),m=r/(d.depth||1);a.eachBefore((function(e){e.x=(e.x+h)*f,e.y=e.depth*m}))}return a}function i(t){var r=t.children,n=t.parent.children,a=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var i=(r[0].z+r[r.length-1].z)/2;a?(t.z=a.z+e(t._,a._),t.m=t.z-i):t.z=i}else a&&(t.z=a.z+e(t._,a._));t.parent.A=function(t,r,n){if(r){for(var a,i=t,o=t,s=r,l=i.parent.children[0],c=i.m,u=o.m,d=s.m,p=l.m;s=Y(s),i=B(i),s&&i;)l=B(l),(o=Y(o)).a=t,(a=s.z+d-i.z-c+e(s._,i._))>0&&(H(V(s,t,n),t,a),c+=a,u+=a),d+=s.m,c+=i.m,p+=l.m,u+=o.m;s&&!Y(o)&&(o.t=s,o.m+=d-u),i&&!B(l)&&(l.t=i,l.m+=c-p,n=t)}return n}(t,a,t.parent.A||n[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return a.separation=function(t){return arguments.length?(e=t,a):e},a.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],a):n?null:[t,r]},a.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],a):n?[t,r]:null},a},e.treemap=function(){var e=K,t=!1,r=1,n=1,a=[0],i=C,o=C,s=C,l=C,c=C;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(d),a=[0],t&&e.eachBefore(I),e}function d(t){var r=a[t.depth],n=t.x0+r,u=t.y0+r,d=t.x1-r,p=t.y1-r;d<n&&(n=d=(n+d)/2),p<u&&(u=p=(u+p)/2),t.x0=n,t.y0=u,t.x1=d,t.y1=p,t.children&&(r=a[t.depth+1]=i(t)/2,n+=c(t)-r,u+=o(t)-r,(d-=s(t)-r)<n&&(n=d=(n+d)/2),(p-=l(t)-r)<u&&(u=p=(u+p)/2),e(t,n,u,d,p))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(r=+e[0],n=+e[1],u):[r,n]},u.tile=function(t){return arguments.length?(e=T(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(i="function"==typeof e?e:S(+e),u):i},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o="function"==typeof e?e:S(+e),u):o},u.paddingRight=function(e){return arguments.length?(s="function"==typeof e?e:S(+e),u):s},u.paddingBottom=function(e){return arguments.length?(l="function"==typeof e?e:S(+e),u):l},u.paddingLeft=function(e){return arguments.length?(c="function"==typeof e?e:S(+e),u):c},u},e.treemapBinary=function(e,t,r,n,a){var i,o,s=e.children,l=s.length,c=new Array(l+1);for(c[0]=o=i=0;i<l;++i)c[i+1]=o+=s[i].value;!function e(t,r,n,a,i,o,l){if(t>=r-1){var u=s[t];return u.x0=a,u.y0=i,u.x1=o,void(u.y1=l)}for(var d=c[t],p=n/2+d,h=t+1,f=r-1;h<f;){var m=h+f>>>1;c[m]<p?h=m+1:f=m}p-c[h-1]<c[h]-p&&t+1<h&&--h;var g=c[h]-d,v=n-g;if(o-a>l-i){var y=(a*v+o*g)/n;e(t,h,g,a,i,y,l),e(h,r,v,y,i,o,l)}else{var b=(i*v+l*g)/n;e(t,h,g,a,i,o,b),e(h,r,v,a,b,o,l)}}(0,l,e.value,t,r,n,a)},e.treemapDice=P,e.treemapSlice=W,e.treemapSliceDice=function(e,t,r,n,a){(1&e.depth?W:P)(e,t,r,n,a)},e.treemapSquarify=K,e.treemapResquarify=X,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],159:[function(e,t,r){!function(n,a){"object"==typeof r&&void 0!==t?a(r,e("d3-color")):a(n.d3=n.d3||{},n.d3)}(this,(function(e,t){"use strict";function r(e,t,r,n,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*r+(1+3*e+3*i-3*o)*n+o*a)/6}function n(e){var t=e.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[a],o=e[a+1],s=a>0?e[a-1]:2*i-o,l=a<t-1?e[a+2]:2*o-i;return r((n-a/t)*t,s,i,o,l)}}function a(e){var t=e.length;return function(n){var a=Math.floor(((n%=1)<0?++n:n)*t),i=e[(a+t-1)%t],o=e[a%t],s=e[(a+1)%t],l=e[(a+2)%t];return r((n-a/t)*t,i,o,s,l)}}function i(e){return function(){return e}}function o(e,t){return function(r){return e+r*t}}function s(e,t){var r=t-e;return r?o(e,r>180||r<-180?r-360*Math.round(r/360):r):i(isNaN(e)?t:e)}function l(e){return 1==(e=+e)?c:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):i(isNaN(t)?r:t)}}function c(e,t){var r=t-e;return r?o(e,r):i(isNaN(e)?t:e)}var u=function e(r){var n=l(r);function a(e,r){var a=n((e=t.rgb(e)).r,(r=t.rgb(r)).r),i=n(e.g,r.g),o=n(e.b,r.b),s=c(e.opacity,r.opacity);return function(t){return e.r=a(t),e.g=i(t),e.b=o(t),e.opacity=s(t),e+""}}return a.gamma=e,a}(1);function d(e){return function(r){var n,a,i=r.length,o=new Array(i),s=new Array(i),l=new Array(i);for(n=0;n<i;++n)a=t.rgb(r[n]),o[n]=a.r||0,s[n]=a.g||0,l[n]=a.b||0;return o=e(o),s=e(s),l=e(l),a.opacity=1,function(e){return a.r=o(e),a.g=s(e),a.b=l(e),a+""}}}var p=d(n),h=d(a);function f(e,t){var r,n=t?t.length:0,a=e?Math.min(n,e.length):0,i=new Array(a),o=new Array(n);for(r=0;r<a;++r)i[r]=x(e[r],t[r]);for(;r<n;++r)o[r]=t[r];return function(e){for(r=0;r<a;++r)o[r]=i[r](e);return o}}function m(e,t){var r=new Date;return t-=e=+e,function(n){return r.setTime(e+t*n),r}}function g(e,t){return t-=e=+e,function(r){return e+t*r}}function v(e,t){var r,n={},a={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=x(e[r],t[r]):a[r]=t[r];return function(e){for(r in n)a[r]=n[r](e);return a}}var y=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,b=new RegExp(y.source,"g");function _(e,t){var r,n,a,i=y.lastIndex=b.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(r=y.exec(e))&&(n=b.exec(t));)(a=n.index)>i&&(a=t.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:g(r,n)})),i=b.lastIndex;return i<t.length&&(a=t.slice(i),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}function x(e,r){var n,a=typeof r;return null==r||"boolean"===a?i(r):("number"===a?g:"string"===a?(n=t.color(r))?(r=n,u):_:r instanceof t.color?u:r instanceof Date?m:Array.isArray(r)?f:"function"!=typeof r.valueOf&&"function"!=typeof r.toString||isNaN(r)?v:g)(e,r)}var w,k,M,T,C=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function L(e,t,r,n,a,i){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*C,skewX:Math.atan(l)*C,scaleX:o,scaleY:s}}function A(e,t,r,n){function a(e){return e.length?e.pop()+" ":""}return function(i,o){var s=[],l=[];return i=e(i),o=e(o),function(e,n,a,i,o,s){if(e!==a||n!==i){var l=o.push("translate(",null,t,null,r);s.push({i:l-4,x:g(e,a)},{i:l-2,x:g(n,i)})}else(a||i)&&o.push("translate("+a+t+i+r)}(i.translateX,i.translateY,o.translateX,o.translateY,s,l),function(e,t,r,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:r.push(a(r)+"rotate(",null,n)-2,x:g(e,t)})):t&&r.push(a(r)+"rotate("+t+n)}(i.rotate,o.rotate,s,l),function(e,t,r,i){e!==t?i.push({i:r.push(a(r)+"skewX(",null,n)-2,x:g(e,t)}):t&&r.push(a(r)+"skewX("+t+n)}(i.skewX,o.skewX,s,l),function(e,t,r,n,i,o){if(e!==r||t!==n){var s=i.push(a(i)+"scale(",null,",",null,")");o.push({i:s-4,x:g(e,r)},{i:s-2,x:g(t,n)})}else 1===r&&1===n||i.push(a(i)+"scale("+r+","+n+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,s,l),i=o=null,function(e){for(var t,r=-1,n=l.length;++r<n;)s[(t=l[r]).i]=t.x(e);return s.join("")}}}var E=A((function(e){return"none"===e?S:(w||(w=document.createElement("DIV"),k=document.documentElement,M=document.defaultView),w.style.transform=e,e=M.getComputedStyle(k.appendChild(w),null).getPropertyValue("transform"),k.removeChild(w),L(+(e=e.slice(7,-1).split(","))[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}),"px, ","px)","deg)"),D=A((function(e){return null==e?S:(T||(T=document.createElementNS("http://www.w3.org/2000/svg","g")),T.setAttribute("transform",e),(e=T.transform.baseVal.consolidate())?L((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):S)}),", ",")",")"),I=Math.SQRT2,P=2,O=4,R=1e-12;function F(e){return((e=Math.exp(e))+1/e)/2}function z(e){return function(r,n){var a=e((r=t.hsl(r)).h,(n=t.hsl(n)).h),i=c(r.s,n.s),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(e){return r.h=a(e),r.s=i(e),r.l=o(e),r.opacity=s(e),r+""}}}var N=z(s),j=z(c);function B(e){return function(r,n){var a=e((r=t.hcl(r)).h,(n=t.hcl(n)).h),i=c(r.c,n.c),o=c(r.l,n.l),s=c(r.opacity,n.opacity);return function(e){return r.h=a(e),r.c=i(e),r.l=o(e),r.opacity=s(e),r+""}}}var Y=B(s),H=B(c);function V(e){return function r(n){function a(r,a){var i=e((r=t.cubehelix(r)).h,(a=t.cubehelix(a)).h),o=c(r.s,a.s),s=c(r.l,a.l),l=c(r.opacity,a.opacity);return function(e){return r.h=i(e),r.s=o(e),r.l=s(Math.pow(e,n)),r.opacity=l(e),r+""}}return n=+n,a.gamma=r,a}(1)}var U=V(s),W=V(c);e.interpolate=x,e.interpolateArray=f,e.interpolateBasis=n,e.interpolateBasisClosed=a,e.interpolateDate=m,e.interpolateDiscrete=function(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}},e.interpolateHue=function(e,t){var r=s(+e,+t);return function(e){var t=r(e);return t-360*Math.floor(t/360)}},e.interpolateNumber=g,e.interpolateObject=v,e.interpolateRound=function(e,t){return t-=e=+e,function(r){return Math.round(e+t*r)}},e.interpolateString=_,e.interpolateTransformCss=E,e.interpolateTransformSvg=D,e.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-a,d=l-i,p=u*u+d*d;if(p<R)n=Math.log(c/o)/I,r=function(e){return[a+e*u,i+e*d,o*Math.exp(I*e*n)]};else{var h=Math.sqrt(p),f=(c*c-o*o+O*p)/(2*o*P*h),m=(c*c-o*o-O*p)/(2*c*P*h),g=Math.log(Math.sqrt(f*f+1)-f),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-g)/I,r=function(e){var t,r=e*n,s=F(g),l=o/(P*h)*(s*(t=I*r+g,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[a+l*u,i+l*d,o*s/F(I*r+g)]}}return r.duration=1e3*n,r},e.interpolateRgb=u,e.interpolateRgbBasis=p,e.interpolateRgbBasisClosed=h,e.interpolateHsl=N,e.interpolateHslLong=j,e.interpolateLab=function(e,r){var n=c((e=t.lab(e)).l,(r=t.lab(r)).l),a=c(e.a,r.a),i=c(e.b,r.b),o=c(e.opacity,r.opacity);return function(t){return e.l=n(t),e.a=a(t),e.b=i(t),e.opacity=o(t),e+""}},e.interpolateHcl=Y,e.interpolateHclLong=H,e.interpolateCubehelix=U,e.interpolateCubehelixLong=W,e.piecewise=function(e,t){for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(e){var t=Math.max(0,Math.min(n-1,Math.floor(e*=n)));return i[t](e-t)}},e.quantize=function(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r},Object.defineProperty(e,"__esModule",{value:!0})}))},{"d3-color":155}],160:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";var t=Math.PI,r=2*t,n=r-1e-6;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function i(){return new a}a.prototype=i.prototype={constructor:a,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,a,i){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(e,r,n,a,i){e=+e,r=+r,n=+n,a=+a,i=+i;var o=this._x1,s=this._y1,l=n-e,c=a-r,u=o-e,d=s-r,p=u*u+d*d;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=r);else if(p>1e-6)if(Math.abs(d*l-c*u)>1e-6&&i){var h=n-o,f=a-s,m=l*l+c*c,g=h*h+f*f,v=Math.sqrt(m),y=Math.sqrt(p),b=i*Math.tan((t-Math.acos((m+p-g)/(2*v*y)))/2),_=b/y,x=b/v;Math.abs(_-1)>1e-6&&(this._+="L"+(e+_*u)+","+(r+_*d)),this._+="A"+i+","+i+",0,0,"+ +(d*h>u*f)+","+(this._x1=e+x*l)+","+(this._y1=r+x*c)}else this._+="L"+(this._x1=e)+","+(this._y1=r)},arc:function(e,a,i,o,s,l){e=+e,a=+a;var c=(i=+i)*Math.cos(o),u=i*Math.sin(o),d=e+c,p=a+u,h=1^l,f=l?o-s:s-o;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+d+","+p:(Math.abs(this._x1-d)>1e-6||Math.abs(this._y1-p)>1e-6)&&(this._+="L"+d+","+p),i&&(f<0&&(f=f%r+r),f>n?this._+="A"+i+","+i+",0,1,"+h+","+(e-c)+","+(a-u)+"A"+i+","+i+",0,1,"+h+","+(this._x1=d)+","+(this._y1=p):f>1e-6&&(this._+="A"+i+","+i+",0,"+ +(f>=t)+","+h+","+(this._x1=e+i*Math.cos(s))+","+(this._y1=a+i*Math.sin(s))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}},e.path=i,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],161:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";function t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var a,i,o,s,l,c,u,d,p,h=e._root,f={data:n},m=e._x0,g=e._y0,v=e._x1,y=e._y1;if(!h)return e._root=f,e;for(;h.length;)if((c=t>=(i=(m+v)/2))?m=i:v=i,(u=r>=(o=(g+y)/2))?g=o:y=o,a=h,!(h=h[d=u<<1|c]))return a[d]=f,e;if(s=+e._x.call(null,h.data),l=+e._y.call(null,h.data),t===s&&r===l)return f.next=h,a?a[d]=f:e._root=f,e;do{a=a?a[d]=new Array(4):e._root=new Array(4),(c=t>=(i=(m+v)/2))?m=i:v=i,(u=r>=(o=(g+y)/2))?g=o:y=o}while((d=u<<1|c)==(p=(l>=o)<<1|s>=i));return a[p]=h,a[d]=f,e}var r=function(e,t,r,n,a){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=a};function n(e){return e[0]}function a(e){return e[1]}function i(e,t,r){var i=new o(null==t?n:t,null==r?a:r,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function o(e,t,r,n,a,i){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=a,this._y1=i,this._root=void 0}function s(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var l=i.prototype=o.prototype;l.copy=function(){var e,t,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var a=0;a<4;++a)(t=n.source[a])&&(t.length?e.push({source:t,target:n.target[a]=new Array(4)}):n.target[a]=s(t));return r},l.add=function(e){var r=+this._x.call(null,e),n=+this._y.call(null,e);return t(this.cover(r,n),r,n,e)},l.addAll=function(e){var r,n,a,i,o=e.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,d=-1/0,p=-1/0;for(n=0;n<o;++n)isNaN(a=+this._x.call(null,r=e[n]))||isNaN(i=+this._y.call(null,r))||(s[n]=a,l[n]=i,a<c&&(c=a),a>d&&(d=a),i<u&&(u=i),i>p&&(p=i));for(d<c&&(c=this._x0,d=this._x1),p<u&&(u=this._y0,p=this._y1),this.cover(c,u).cover(d,p),n=0;n<o;++n)t(this,s[n],l[n],e[n]);return this},l.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,a=this._x1,i=this._y1;if(isNaN(r))a=(r=Math.floor(e))+1,i=(n=Math.floor(t))+1;else{if(!(r>e||e>a||n>t||t>i))return this;var o,s,l=a-r,c=this._root;switch(s=(t<(n+i)/2)<<1|e<(r+a)/2){case 0:do{(o=new Array(4))[s]=c,c=o}while(i=n+(l*=2),e>(a=r+l)||t>i);break;case 1:do{(o=new Array(4))[s]=c,c=o}while(i=n+(l*=2),(r=a-l)>e||t>i);break;case 2:do{(o=new Array(4))[s]=c,c=o}while(n=i-(l*=2),e>(a=r+l)||n>t);break;case 3:do{(o=new Array(4))[s]=c,c=o}while(n=i-(l*=2),(r=a-l)>e||n>t)}this._root&&this._root.length&&(this._root=c)}return this._x0=r,this._y0=n,this._x1=a,this._y1=i,this},l.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},l.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},l.find=function(e,t,n){var a,i,o,s,l,c,u,d=this._x0,p=this._y0,h=this._x1,f=this._y1,m=[],g=this._root;for(g&&m.push(new r(g,d,p,h,f)),null==n?n=1/0:(d=e-n,p=t-n,h=e+n,f=t+n,n*=n);c=m.pop();)if(!(!(g=c.node)||(i=c.x0)>h||(o=c.y0)>f||(s=c.x1)<d||(l=c.y1)<p))if(g.length){var v=(i+s)/2,y=(o+l)/2;m.push(new r(g[3],v,y,s,l),new r(g[2],i,y,v,l),new r(g[1],v,o,s,y),new r(g[0],i,o,v,y)),(u=(t>=y)<<1|e>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var b=e-+this._x.call(null,g.data),_=t-+this._y.call(null,g.data),x=b*b+_*_;if(x<n){var w=Math.sqrt(n=x);d=e-w,p=t-w,h=e+w,f=t+w,a=g.data}}return a},l.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(o=+this._y.call(null,e)))return this;var t,r,n,a,i,o,s,l,c,u,d,p,h=this._root,f=this._x0,m=this._y0,g=this._x1,v=this._y1;if(!h)return this;if(h.length)for(;;){if((c=i>=(s=(f+g)/2))?f=s:g=s,(u=o>=(l=(m+v)/2))?m=l:v=l,t=h,!(h=h[d=u<<1|c]))return this;if(!h.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(r=t,p=d)}for(;h.data!==e;)if(n=h,!(h=h.next))return this;return(a=h.next)&&delete h.next,n?(a?n.next=a:delete n.next,this):t?(a?t[d]=a:delete t[d],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(r?r[p]=h:this._root=h),this):(this._root=a,this)},l.removeAll=function(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this},l.root=function(){return this._root},l.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},l.visit=function(e){var t,n,a,i,o,s,l=[],c=this._root;for(c&&l.push(new r(c,this._x0,this._y0,this._x1,this._y1));t=l.pop();)if(!e(c=t.node,a=t.x0,i=t.y0,o=t.x1,s=t.y1)&&c.length){var u=(a+o)/2,d=(i+s)/2;(n=c[3])&&l.push(new r(n,u,d,o,s)),(n=c[2])&&l.push(new r(n,a,d,u,s)),(n=c[1])&&l.push(new r(n,u,i,o,d)),(n=c[0])&&l.push(new r(n,a,i,u,d))}return this},l.visitAfter=function(e){var t,n=[],a=[];for(this._root&&n.push(new r(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var i=t.node;if(i.length){var o,s=t.x0,l=t.y0,c=t.x1,u=t.y1,d=(s+c)/2,p=(l+u)/2;(o=i[0])&&n.push(new r(o,s,l,d,p)),(o=i[1])&&n.push(new r(o,d,l,c,p)),(o=i[2])&&n.push(new r(o,s,p,d,u)),(o=i[3])&&n.push(new r(o,d,p,c,u))}a.push(t)}for(;t=a.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},l.x=function(e){return arguments.length?(this._x=e,this):this._x},l.y=function(e){return arguments.length?(this._y=e,this):this._y},e.quadtree=i,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],162:[function(e,t,r){!function(n,a){"object"==typeof r&&void 0!==t?a(r,e("d3-path")):a(n.d3=n.d3||{},n.d3)}(this,(function(e,t){"use strict";function r(e){return function(){return e}}var n=Math.abs,a=Math.atan2,i=Math.cos,o=Math.max,s=Math.min,l=Math.sin,c=Math.sqrt,u=1e-12,d=Math.PI,p=d/2,h=2*d;function f(e){return e>=1?p:e<=-1?-p:Math.asin(e)}function m(e){return e.innerRadius}function g(e){return e.outerRadius}function v(e){return e.startAngle}function y(e){return e.endAngle}function b(e){return e&&e.padAngle}function _(e,t,r,n,a,i,s){var l=e-r,u=t-n,d=(s?i:-i)/c(l*l+u*u),p=d*u,h=-d*l,f=e+p,m=t+h,g=r+p,v=n+h,y=(f+g)/2,b=(m+v)/2,_=g-f,x=v-m,w=_*_+x*x,k=a-i,M=f*v-g*m,T=(x<0?-1:1)*c(o(0,k*k*w-M*M)),C=(M*x-_*T)/w,S=(-M*_-x*T)/w,L=(M*x+_*T)/w,A=(-M*_+x*T)/w,E=C-y,D=S-b,I=L-y,P=A-b;return E*E+D*D>I*I+P*P&&(C=L,S=A),{cx:C,cy:S,x01:-p,y01:-h,x11:C*(a/k-1),y11:S*(a/k-1)}}function x(e){this._context=e}function w(e){return new x(e)}function k(e){return e[0]}function M(e){return e[1]}function T(){var e=k,n=M,a=r(!0),i=null,o=w,s=null;function l(r){var l,c,u,d=r.length,p=!1;for(null==i&&(s=o(u=t.path())),l=0;l<=d;++l)!(l<d&&a(c=r[l],l,r))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+e(c,l,r),+n(c,l,r));if(u)return s=null,u+""||null}return l.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),l):e},l.y=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),l):n},l.defined=function(e){return arguments.length?(a="function"==typeof e?e:r(!!e),l):a},l.curve=function(e){return arguments.length?(o=e,null!=i&&(s=o(i)),l):o},l.context=function(e){return arguments.length?(null==e?i=s=null:s=o(i=e),l):i},l}function C(){var e=k,n=null,a=r(0),i=M,o=r(!0),s=null,l=w,c=null;function u(r){var u,d,p,h,f,m=r.length,g=!1,v=new Array(m),y=new Array(m);for(null==s&&(c=l(f=t.path())),u=0;u<=m;++u){if(!(u<m&&o(h=r[u],u,r))===g)if(g=!g)d=u,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),p=u-1;p>=d;--p)c.point(v[p],y[p]);c.lineEnd(),c.areaEnd()}g&&(v[u]=+e(h,u,r),y[u]=+a(h,u,r),c.point(n?+n(h,u,r):v[u],i?+i(h,u,r):y[u]))}if(f)return c=null,f+""||null}function d(){return T().defined(o).curve(l).context(s)}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),n=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),u):e},u.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:r(+e),u):n},u.y=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),i=null,u):a},u.y0=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),u):a},u.y1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:r(+e),u):i},u.lineX0=u.lineY0=function(){return d().x(e).y(a)},u.lineY1=function(){return d().x(e).y(i)},u.lineX1=function(){return d().x(n).y(a)},u.defined=function(e){return arguments.length?(o="function"==typeof e?e:r(!!e),u):o},u.curve=function(e){return arguments.length?(l=e,null!=s&&(c=l(s)),u):l},u.context=function(e){return arguments.length?(null==e?s=c=null:c=l(s=e),u):s},u}function S(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function L(e){return e}x.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var A=D(w);function E(e){this._curve=e}function D(e){function t(t){return new E(e(t))}return t._curve=e,t}function I(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(D(e)):t()._curve},e}function P(){return I(T().curve(A))}function O(){var e=C().curve(A),t=e.curve,r=e.lineX0,n=e.lineX1,a=e.lineY0,i=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return I(r())},delete e.lineX0,e.lineEndAngle=function(){return I(n())},delete e.lineX1,e.lineInnerRadius=function(){return I(a())},delete e.lineY0,e.lineOuterRadius=function(){return I(i())},delete e.lineY1,e.curve=function(e){return arguments.length?t(D(e)):t()._curve},e}function R(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}E.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var F=Array.prototype.slice;function z(e){return e.source}function N(e){return e.target}function j(e){var n=z,a=N,i=k,o=M,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=a.apply(this,l);if(s||(s=r=t.path()),e(s,+i.apply(this,(l[0]=c,l)),+o.apply(this,l),+i.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+""||null}return l.source=function(e){return arguments.length?(n=e,l):n},l.target=function(e){return arguments.length?(a=e,l):a},l.x=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),l):i},l.y=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),l):o},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function B(e,t,r,n,a){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,a,n,a)}function Y(e,t,r,n,a){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+a)/2,n,r,n,a)}function H(e,t,r,n,a){var i=R(t,r),o=R(t,r=(r+a)/2),s=R(n,r),l=R(n,a);e.moveTo(i[0],i[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var V={draw:function(e,t){var r=Math.sqrt(t/d);e.moveTo(r,0),e.arc(0,0,r,0,h)}},U={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},W=Math.sqrt(1/3),G=2*W,q={draw:function(e,t){var r=Math.sqrt(t/G),n=r*W;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},K=Math.sin(d/10)/Math.sin(7*d/10),X=Math.sin(h/10)*K,Z=-Math.cos(h/10)*K,J={draw:function(e,t){var r=Math.sqrt(.8908130915292852*t),n=X*r,a=Z*r;e.moveTo(0,-r),e.lineTo(n,a);for(var i=1;i<5;++i){var o=h*i/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},$={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}},Q=Math.sqrt(3),ee={draw:function(e,t){var r=-Math.sqrt(t/(3*Q));e.moveTo(0,2*r),e.lineTo(-Q*r,-r),e.lineTo(Q*r,-r),e.closePath()}},te=-.5,re=Math.sqrt(3)/2,ne=1/Math.sqrt(12),ae=3*(ne/2+1),ie={draw:function(e,t){var r=Math.sqrt(t/ae),n=r/2,a=r*ne,i=n,o=r*ne+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(te*n-re*a,re*n+te*a),e.lineTo(te*i-re*o,re*i+te*o),e.lineTo(te*s-re*l,re*s+te*l),e.lineTo(te*n+re*a,te*a-re*n),e.lineTo(te*i+re*o,te*o-re*i),e.lineTo(te*s+re*l,te*l-re*s),e.closePath()}},oe=[V,U,q,$,J,ee,ie];function se(){}function le(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function ce(e){this._context=e}function ue(e){this._context=e}function de(e){this._context=e}function pe(e,t){this._basis=new ce(e),this._beta=t}ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:le(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ue.prototype={areaStart:se,areaEnd:se,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},pe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,a=e[0],i=t[0],o=e[r]-a,s=t[r]-i,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(a+n*o),this._beta*t[l]+(1-this._beta)*(i+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var he=function e(t){function r(e){return 1===t?new ce(e):new pe(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function fe(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function me(e,t){this._context=e,this._k=(1-t)/6}me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:fe(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:fe(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=function e(t){function r(e){return new me(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ve(e,t){this._context=e,this._k=(1-t)/6}ve.prototype={areaStart:se,areaEnd:se,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:fe(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ye=function e(t){function r(e){return new ve(e,t)}return r.tension=function(t){return e(+t)},r}(0);function be(e,t){this._context=e,this._k=(1-t)/6}be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:fe(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var _e=function e(t){function r(e){return new be(e,t)}return r.tension=function(t){return e(+t)},r}(0);function xe(e,t,r){var n=e._x1,a=e._y1,i=e._x2,o=e._y2;if(e._l01_a>u){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>u){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/d,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(n,a,i,o,e._x2,e._y2)}function we(e,t){this._context=e,this._alpha=t}we.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:xe(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ke=function e(t){function r(e){return t?new we(e,t):new me(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Me(e,t){this._context=e,this._alpha=t}Me.prototype={areaStart:se,areaEnd:se,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:xe(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Te=function e(t){function r(e){return t?new Me(e,t):new ve(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Ce(e,t){this._context=e,this._alpha=t}Ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xe(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Se=function e(t){function r(e){return t?new Ce(e,t):new be(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Le(e){this._context=e}function Ae(e){return e<0?-1:1}function Ee(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(Ae(i)+Ae(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function De(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Ie(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function Pe(e){this._context=e}function Oe(e){this._context=new Re(e)}function Re(e){this._context=e}function Fe(e){this._context=e}function ze(e){var t,r,n=e.length-1,a=new Array(n),i=new Array(n),o=new Array(n);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,o[t]-=r*o[t-1];for(a[n-1]=o[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Ne(e,t){this._context=e,this._t=t}function je(e,t){if((a=e.length)>1)for(var r,n,a,i=1,o=e[t[0]],s=o.length;i<a;++i)for(n=o,o=e[t[i]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(n[r][1])?n[r][0]:n[r][1]}function Be(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Ye(e,t){return e[t]}function He(e){var t=e.map(Ve);return Be(e).sort((function(e,r){return t[e]-t[r]}))}function Ve(e){for(var t,r=-1,n=0,a=e.length,i=-1/0;++r<a;)(t=+e[r][1])>i&&(i=t,n=r);return n}function Ue(e){var t=e.map(We);return Be(e).sort((function(e,r){return t[e]-t[r]}))}function We(e){for(var t,r=0,n=-1,a=e.length;++n<a;)(t=+e[n][1])&&(r+=t);return r}Le.prototype={areaStart:se,areaEnd:se,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ie(this,this._t0,De(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ie(this,De(this,r=Ee(this,e,t)),r);break;default:Ie(this,this._t0,r=Ee(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}},(Oe.prototype=Object.create(Pe.prototype)).point=function(e,t){Pe.prototype.point.call(this,t,e)},Re.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}},Fe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var n=ze(e),a=ze(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||0!==this._line&&1===r)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Ne.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},e.arc=function(){var e=m,o=g,x=r(0),w=null,k=v,M=y,T=b,C=null;function S(){var r,m,g=+e.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-p,b=M.apply(this,arguments)-p,S=n(b-y),L=b>y;if(C||(C=r=t.path()),v<g&&(m=v,v=g,g=m),v>u)if(S>h-u)C.moveTo(v*i(y),v*l(y)),C.arc(0,0,v,y,b,!L),g>u&&(C.moveTo(g*i(b),g*l(b)),C.arc(0,0,g,b,y,L));else{var A,E,D=y,I=b,P=y,O=b,R=S,F=S,z=T.apply(this,arguments)/2,N=z>u&&(w?+w.apply(this,arguments):c(g*g+v*v)),j=s(n(v-g)/2,+x.apply(this,arguments)),B=j,Y=j;if(N>u){var H=f(N/g*l(z)),V=f(N/v*l(z));(R-=2*H)>u?(P+=H*=L?1:-1,O-=H):(R=0,P=O=(y+b)/2),(F-=2*V)>u?(D+=V*=L?1:-1,I-=V):(F=0,D=I=(y+b)/2)}var U=v*i(D),W=v*l(D),G=g*i(O),q=g*l(O);if(j>u){var K,X=v*i(I),Z=v*l(I),J=g*i(P),$=g*l(P);if(S<d&&(K=function(e,t,r,n,a,i,o,s){var l=r-e,c=n-t,d=o-a,p=s-i,h=p*l-d*c;if(!(h*h<u))return[e+(h=(d*(t-i)-p*(e-a))/h)*l,t+h*c]}(U,W,J,$,X,Z,G,q))){var Q=U-K[0],ee=W-K[1],te=X-K[0],re=Z-K[1],ne=1/l(function(e){return e>1?0:e<-1?d:Math.acos(e)}((Q*te+ee*re)/(c(Q*Q+ee*ee)*c(te*te+re*re)))/2),ae=c(K[0]*K[0]+K[1]*K[1]);B=s(j,(g-ae)/(ne-1)),Y=s(j,(v-ae)/(ne+1))}}F>u?Y>u?(A=_(J,$,U,W,v,Y,L),E=_(X,Z,G,q,v,Y,L),C.moveTo(A.cx+A.x01,A.cy+A.y01),Y<j?C.arc(A.cx,A.cy,Y,a(A.y01,A.x01),a(E.y01,E.x01),!L):(C.arc(A.cx,A.cy,Y,a(A.y01,A.x01),a(A.y11,A.x11),!L),C.arc(0,0,v,a(A.cy+A.y11,A.cx+A.x11),a(E.cy+E.y11,E.cx+E.x11),!L),C.arc(E.cx,E.cy,Y,a(E.y11,E.x11),a(E.y01,E.x01),!L))):(C.moveTo(U,W),C.arc(0,0,v,D,I,!L)):C.moveTo(U,W),g>u&&R>u?B>u?(A=_(G,q,X,Z,g,-B,L),E=_(U,W,J,$,g,-B,L),C.lineTo(A.cx+A.x01,A.cy+A.y01),B<j?C.arc(A.cx,A.cy,B,a(A.y01,A.x01),a(E.y01,E.x01),!L):(C.arc(A.cx,A.cy,B,a(A.y01,A.x01),a(A.y11,A.x11),!L),C.arc(0,0,g,a(A.cy+A.y11,A.cx+A.x11),a(E.cy+E.y11,E.cx+E.x11),L),C.arc(E.cx,E.cy,B,a(E.y11,E.x11),a(E.y01,E.x01),!L))):C.arc(0,0,g,O,P,L):C.lineTo(G,q)}else C.moveTo(0,0);if(C.closePath(),r)return C=null,r+""||null}return S.centroid=function(){var t=(+e.apply(this,arguments)+ +o.apply(this,arguments))/2,r=(+k.apply(this,arguments)+ +M.apply(this,arguments))/2-d/2;return[i(r)*t,l(r)*t]},S.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),S):e},S.outerRadius=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),S):o},S.cornerRadius=function(e){return arguments.length?(x="function"==typeof e?e:r(+e),S):x},S.padRadius=function(e){return arguments.length?(w=null==e?null:"function"==typeof e?e:r(+e),S):w},S.startAngle=function(e){return arguments.length?(k="function"==typeof e?e:r(+e),S):k},S.endAngle=function(e){return arguments.length?(M="function"==typeof e?e:r(+e),S):M},S.padAngle=function(e){return arguments.length?(T="function"==typeof e?e:r(+e),S):T},S.context=function(e){return arguments.length?(C=null==e?null:e,S):C},S},e.area=C,e.line=T,e.pie=function(){var e=L,t=S,n=null,a=r(0),i=r(h),o=r(0);function s(r){var s,l,c,u,d,p=r.length,f=0,m=new Array(p),g=new Array(p),v=+a.apply(this,arguments),y=Math.min(h,Math.max(-h,i.apply(this,arguments)-v)),b=Math.min(Math.abs(y)/p,o.apply(this,arguments)),_=b*(y<0?-1:1);for(s=0;s<p;++s)(d=g[m[s]=s]=+e(r[s],s,r))>0&&(f+=d);for(null!=t?m.sort((function(e,r){return t(g[e],g[r])})):null!=n&&m.sort((function(e,t){return n(r[e],r[t])})),s=0,c=f?(y-p*_)/f:0;s<p;++s,v=u)l=m[s],u=v+((d=g[l])>0?d*c:0)+_,g[l]={data:r[l],index:s,value:d,startAngle:v,endAngle:u,padAngle:b};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),s):a},s.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),s):i},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),s):o},s},e.areaRadial=O,e.radialArea=O,e.lineRadial=P,e.radialLine=P,e.pointRadial=R,e.linkHorizontal=function(){return j(B)},e.linkVertical=function(){return j(Y)},e.linkRadial=function(){var e=j(H);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e},e.symbol=function(){var e=r(V),n=r(64),a=null;function i(){var r;if(a||(a=r=t.path()),e.apply(this,arguments).draw(a,+n.apply(this,arguments)),r)return a=null,r+""||null}return i.type=function(t){return arguments.length?(e="function"==typeof t?t:r(t),i):e},i.size=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),i):n},i.context=function(e){return arguments.length?(a=null==e?null:e,i):a},i},e.symbols=oe,e.symbolCircle=V,e.symbolCross=U,e.symbolDiamond=q,e.symbolSquare=$,e.symbolStar=J,e.symbolTriangle=ee,e.symbolWye=ie,e.curveBasisClosed=function(e){return new ue(e)},e.curveBasisOpen=function(e){return new de(e)},e.curveBasis=function(e){return new ce(e)},e.curveBundle=he,e.curveCardinalClosed=ye,e.curveCardinalOpen=_e,e.curveCardinal=ge,e.curveCatmullRomClosed=Te,e.curveCatmullRomOpen=Se,e.curveCatmullRom=ke,e.curveLinearClosed=function(e){return new Le(e)},e.curveLinear=w,e.curveMonotoneX=function(e){return new Pe(e)},e.curveMonotoneY=function(e){return new Oe(e)},e.curveNatural=function(e){return new Fe(e)},e.curveStep=function(e){return new Ne(e,.5)},e.curveStepAfter=function(e){return new Ne(e,1)},e.curveStepBefore=function(e){return new Ne(e,0)},e.stack=function(){var e=r([]),t=Be,n=je,a=Ye;function i(r){var i,o,s=e.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(i=0;i<c;++i){for(var d,p=s[i],h=u[i]=new Array(l),f=0;f<l;++f)h[f]=d=[0,+a(r[f],p,f,r)],d.data=r[f];h.key=p}for(i=0,o=t(u);i<c;++i)u[o[i]].index=i;return n(u,o),u}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:r(F.call(t)),i):e},i.value=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),i):a},i.order=function(e){return arguments.length?(t=null==e?Be:"function"==typeof e?e:r(F.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?je:e,i):n},i},e.stackOffsetExpand=function(e,t){if((n=e.length)>0){for(var r,n,a,i=0,o=e[0].length;i<o;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}je(e,t)}},e.stackOffsetDiverging=function(e,t){if((s=e.length)>1)for(var r,n,a,i,o,s,l=0,c=e[t[0]].length;l<c;++l)for(i=o=0,r=0;r<s;++r)(a=(n=e[t[r]][l])[1]-n[0])>=0?(n[0]=i,n[1]=i+=a):a<0?(n[1]=o,n[0]=o+=a):n[0]=i},e.stackOffsetNone=je,e.stackOffsetSilhouette=function(e,t){if((r=e.length)>0){for(var r,n=0,a=e[t[0]],i=a.length;n<i;++n){for(var o=0,s=0;o<r;++o)s+=e[o][n][1]||0;a[n][1]+=a[n][0]=-s/2}je(e,t)}},e.stackOffsetWiggle=function(e,t){if((a=e.length)>0&&(n=(r=e[t[0]]).length)>0){for(var r,n,a,i=0,o=1;o<n;++o){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],d=u[o][1]||0,p=(d-(u[o-1][1]||0))/2,h=0;h<s;++h){var f=e[t[h]];p+=(f[o][1]||0)-(f[o-1][1]||0)}l+=d,c+=p*d}r[o-1][1]+=r[o-1][0]=i,l&&(i-=c/l)}r[o-1][1]+=r[o-1][0]=i,je(e,t)}},e.stackOrderAppearance=He,e.stackOrderAscending=Ue,e.stackOrderDescending=function(e){return Ue(e).reverse()},e.stackOrderInsideOut=function(e){var t,r,n=e.length,a=e.map(We),i=He(e),o=0,s=0,l=[],c=[];for(t=0;t<n;++t)r=i[t],o<s?(o+=a[r],l.push(r)):(s+=a[r],c.push(r));return c.reverse().concat(l)},e.stackOrderNone=Be,e.stackOrderReverse=function(e){return Be(e).reverse()},Object.defineProperty(e,"__esModule",{value:!0})}))},{"d3-path":160}],163:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.d3=e.d3||{})}(this,(function(e){"use strict";var t,r,n=0,a=0,i=0,o=1e3,s=0,l=0,c=0,u="object"==typeof performance&&performance.now?performance:Date,d="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function p(){return l||(d(h),l=u.now()+c)}function h(){l=0}function f(){this._call=this._time=this._next=null}function m(e,t,r){var n=new f;return n.restart(e,t,r),n}function g(){p(),++n;for(var e,r=t;r;)(e=l-r._time)>=0&&r._call.call(null,e),r=r._next;--n}function v(){l=(s=u.now())+c,n=a=0;try{g()}finally{n=0,function(){for(var e,n,a=t,i=1/0;a;)a._call?(i>a._time&&(i=a._time),e=a,a=a._next):(n=a._next,a._next=null,a=e?e._next=n:t=n);r=e,b(i)}(),l=0}}function y(){var e=u.now(),t=e-s;t>o&&(c-=t,s=e)}function b(e){n||(a&&(a=clearTimeout(a)),e-l>24?(e<1/0&&(a=setTimeout(v,e-u.now()-c)),i&&(i=clearInterval(i))):(i||(s=u.now(),i=setInterval(y,o)),n=1,d(v)))}f.prototype=m.prototype={constructor:f,restart:function(e,n,a){if("function"!=typeof e)throw new TypeError("callback is not a function");a=(null==a?p():+a)+(null==n?0:+n),this._next||r===this||(r?r._next=this:t=this,r=this),this._call=e,this._time=a,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}},e.now=p,e.timer=m,e.timerFlush=g,e.timeout=function(e,t,r){var n=new f;return t=null==t?0:+t,n.restart((function(r){n.stop(),e(r+t)}),t,r),n},e.interval=function(e,t,r){var n=new f,a=t;return null==t?(n.restart(e,t,r),n):(t=+t,r=null==r?p():+r,n.restart((function i(o){o+=a,n.restart(i,a+=t,r),e(o)}),t,r),n)},Object.defineProperty(e,"__esModule",{value:!0})}))},{}],164:[function(e,t,r){!function(){var e={version:"3.5.17"},r=[].slice,n=function(e){return r.call(e)},a=this.document;function i(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(a)try{n(a.documentElement.childNodes)[0].nodeType}catch(e){n=function(e){for(var t=e.length,r=new Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,d=u.setProperty;s.setAttribute=function(e,t){l.call(this,e,t+"")},s.setAttributeNS=function(e,t,r){c.call(this,e,t,r+"")},u.setProperty=function(e,t,r){d.call(this,e,t+"",r)}}function p(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function h(e){return null===e?NaN:+e}function f(e){return!isNaN(e)}function m(e){return{left:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n<a;){var i=n+a>>>1;e(t[i],r)<0?n=i+1:a=i}return n},right:function(t,r,n,a){for(arguments.length<3&&(n=0),arguments.length<4&&(a=t.length);n<a;){var i=n+a>>>1;e(t[i],r)>0?a=i:n=i+1}return n}}}e.ascending=p,e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},e.min=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a<i;)if(null!=(n=e[a])&&n>=n){r=n;break}for(;++a<i;)null!=(n=e[a])&&r>n&&(r=n)}else{for(;++a<i;)if(null!=(n=t.call(e,e[a],a))&&n>=n){r=n;break}for(;++a<i;)null!=(n=t.call(e,e[a],a))&&r>n&&(r=n)}return r},e.max=function(e,t){var r,n,a=-1,i=e.length;if(1===arguments.length){for(;++a<i;)if(null!=(n=e[a])&&n>=n){r=n;break}for(;++a<i;)null!=(n=e[a])&&n>r&&(r=n)}else{for(;++a<i;)if(null!=(n=t.call(e,e[a],a))&&n>=n){r=n;break}for(;++a<i;)null!=(n=t.call(e,e[a],a))&&n>r&&(r=n)}return r},e.extent=function(e,t){var r,n,a,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(n=e[i])&&n>=n){r=a=n;break}for(;++i<o;)null!=(n=e[i])&&(r>n&&(r=n),a<n&&(a=n))}else{for(;++i<o;)if(null!=(n=t.call(e,e[i],i))&&n>=n){r=a=n;break}for(;++i<o;)null!=(n=t.call(e,e[i],i))&&(r>n&&(r=n),a<n&&(a=n))}return[r,a]},e.sum=function(e,t){var r,n=0,a=e.length,i=-1;if(1===arguments.length)for(;++i<a;)f(r=+e[i])&&(n+=r);else for(;++i<a;)f(r=+t.call(e,e[i],i))&&(n+=r);return n},e.mean=function(e,t){var r,n=0,a=e.length,i=-1,o=a;if(1===arguments.length)for(;++i<a;)f(r=h(e[i]))?n+=r:--o;else for(;++i<a;)f(r=h(t.call(e,e[i],i)))?n+=r:--o;if(o)return n/o},e.quantile=function(e,t){var r=(e.length-1)*t+1,n=Math.floor(r),a=+e[n-1],i=r-n;return i?a+i*(e[n]-a):a},e.median=function(t,r){var n,a=[],i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)f(n=h(t[o]))&&a.push(n);else for(;++o<i;)f(n=h(r.call(t,t[o],o)))&&a.push(n);if(a.length)return e.quantile(a.sort(p),.5)},e.variance=function(e,t){var r,n,a=e.length,i=0,o=0,s=-1,l=0;if(1===arguments.length)for(;++s<a;)f(r=h(e[s]))&&(o+=(n=r-i)*(r-(i+=n/++l)));else for(;++s<a;)f(r=h(t.call(e,e[s],s)))&&(o+=(n=r-i)*(r-(i+=n/++l)));if(l>1)return o/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t?Math.sqrt(t):t};var g=m(p);function v(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return p(e(t),r)}:e)},e.shuffle=function(e,t,r){(i=arguments.length)<3&&(r=e.length,i<2&&(t=0));for(var n,a,i=r-t;i;)a=Math.random()*i--|0,n=e[i+t],e[i+t]=e[a+t],e[a+t]=n;return e},e.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},e.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],a=new Array(r<0?0:r);t<r;)a[t]=[n,n=e[++t]];return a},e.transpose=function(t){if(!(i=t.length))return[];for(var r=-1,n=e.min(t,v),a=new Array(n);++r<n;)for(var i,o=-1,s=a[r]=new Array(i);++o<i;)s[o]=t[o][r];return a},e.zip=function(){return e.transpose(arguments)},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},e.merge=function(e){for(var t,r,n,a=e.length,i=-1,o=0;++i<a;)o+=e[i].length;for(r=new Array(o);--a>=0;)for(t=(n=e[a]).length;--t>=0;)r[--o]=n[t];return r};var y=Math.abs;function b(e){for(var t=1;e*t%1;)t*=10;return t}function _(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function x(){this._=Object.create(null)}e.range=function(e,t,r){if(arguments.length<3&&(r=1,arguments.length<2&&(t=e,e=0)),(t-e)/r==1/0)throw new Error("infinite range");var n,a=[],i=b(y(r)),o=-1;if(e*=i,t*=i,(r*=i)<0)for(;(n=e+r*++o)>t;)a.push(n/i);else for(;(n=e+r*++o)<t;)a.push(n/i);return a},e.map=function(e,t){var r=new x;if(e instanceof x)e.forEach((function(e,t){r.set(e,t)}));else if(Array.isArray(e)){var n,a=-1,i=e.length;if(1===arguments.length)for(;++a<i;)r.set(a,e[a]);else for(;++a<i;)r.set(t.call(e,n=e[a],a),n)}else for(var o in e)r.set(o,e[o]);return r};var w="__proto__",k="\0";function M(e){return(e+="")===w||e[0]===k?k+e:e}function T(e){return(e+="")[0]===k?e.slice(1):e}function C(e){return M(e)in this._}function S(e){return(e=M(e))in this._&&delete this._[e]}function L(){var e=[];for(var t in this._)e.push(T(t));return e}function A(){var e=0;for(var t in this._)++e;return e}function E(){for(var e in this._)return!1;return!0}function D(){this._=Object.create(null)}function I(e){return e}function P(e,t,r){return function(){var n=r.apply(t,arguments);return n===t?e:n}}function O(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,n=R.length;r<n;++r){var a=R[r]+t;if(a in e)return a}}_(x,{has:C,get:function(e){return this._[M(e)]},set:function(e,t){return this._[M(e)]=t},remove:S,keys:L,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:T(t),value:this._[t]});return e},size:A,empty:E,forEach:function(e){for(var t in this._)e.call(this,T(t),this._[t])}}),e.nest=function(){var t,r,n={},a=[],i=[];function o(e,i,s){if(s>=a.length)return r?r.call(n,i):t?i.sort(t):i;for(var l,c,u,d,p=-1,h=i.length,f=a[s++],m=new x;++p<h;)(d=m.get(l=f(c=i[p])))?d.push(c):m.set(l,[c]);return e?(c=e(),u=function(t,r){c.set(t,o(e,r,s))}):(c={},u=function(t,r){c[t]=o(e,r,s)}),m.forEach(u),c}return n.map=function(e,t){return o(t,e,0)},n.entries=function(t){return function e(t,r){if(r>=a.length)return t;var n=[],o=i[r++];return t.forEach((function(t,a){n.push({key:t,values:e(a,r)})})),o?n.sort((function(e,t){return o(e.key,t.key)})):n}(o(e.map,t,0),0)},n.key=function(e){return a.push(e),n},n.sortKeys=function(e){return i[a.length-1]=e,n},n.sortValues=function(e){return t=e,n},n.rollup=function(e){return r=e,n},n},e.set=function(e){var t=new D;if(e)for(var r=0,n=e.length;r<n;++r)t.add(e[r]);return t},_(D,{has:C,add:function(e){return this._[M(e+="")]=!0,e},remove:S,values:L,size:A,empty:E,forEach:function(e){for(var t in this._)e.call(this,T(t))}}),e.behavior={},e.rebind=function(e,t){for(var r,n=1,a=arguments.length;++n<a;)e[r=arguments[n]]=P(e,t,t[r]);return e};var R=["webkit","ms","moz","Moz","o","O"];function F(){}function z(){}function N(e){var t=[],r=new x;function n(){for(var r,n=t,a=-1,i=n.length;++a<i;)(r=n[a].on)&&r.apply(this,arguments);return e}return n.on=function(n,a){var i,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,t=t.slice(0,i=t.indexOf(o)).concat(t.slice(i+1)),r.remove(n)),a&&t.push(r.set(n,{on:a})),e)},n}function j(){e.event.preventDefault()}function B(){for(var t,r=e.event;t=r.sourceEvent;)r=t;return r}function Y(t){for(var r=new z,n=0,a=arguments.length;++n<a;)r[arguments[n]]=N(r);return r.of=function(n,a){return function(i){try{var o=i.sourceEvent=e.event;i.target=t,e.event=i,r[i.type].apply(n,a)}finally{e.event=o}}},r}e.dispatch=function(){for(var e=new z,t=-1,r=arguments.length;++t<r;)e[arguments[t]]=N(e);return e},z.prototype.on=function(e,t){var r=e.indexOf("."),n="";if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},e.event=null,e.requote=function(e){return e.replace(H,"\\$&")};var H=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function U(e){return V(e,K),e}var W=function(e,t){return t.querySelector(e)},G=function(e,t){return t.querySelectorAll(e)},q=function(e,t){var r=e.matches||e[O(e,"matchesSelector")];return(q=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(W=function(e,t){return Sizzle(e,t)[0]||null},G=Sizzle,q=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var K=e.selection.prototype=[];function X(e){return"function"==typeof e?e:function(){return W(e,this)}}function Z(e){return"function"==typeof e?e:function(){return G(e,this)}}K.select=function(e){var t,r,n,a,i=[];e=X(e);for(var o=-1,s=this.length;++o<s;){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var l=-1,c=n.length;++l<c;)(a=n[l])?(t.push(r=e.call(a,a.__data__,l,o)),r&&"__data__"in a&&(r.__data__=a.__data__)):t.push(null)}return U(i)},K.selectAll=function(e){var t,r,a=[];e=Z(e);for(var i=-1,o=this.length;++i<o;)for(var s=this[i],l=-1,c=s.length;++l<c;)(r=s[l])&&(a.push(t=n(e.call(r,r.__data__,l,i))),t.parentNode=r);return U(a)};var J="http://www.w3.org/1999/xhtml",$={svg:"http://www.w3.org/2000/svg",xhtml:J,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Q(t,r){return t=e.ns.qualify(t),null==r?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof r?t.local?function(){var e=r.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}:function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}:t.local?function(){this.setAttributeNS(t.space,t.local,r)}:function(){this.setAttribute(t,r)}}function ee(e){return e.trim().replace(/\s+/g," ")}function te(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function re(e){return(e+"").trim().split(/^|\s+/)}function ne(e,t){var r=(e=re(e).map(ae)).length;return"function"==typeof t?function(){for(var n=-1,a=t.apply(this,arguments);++n<r;)e[n](this,a)}:function(){for(var n=-1;++n<r;)e[n](this,t)}}function ae(e){var t=te(e);return function(r,n){if(a=r.classList)return n?a.add(e):a.remove(e);var a=r.getAttribute("class")||"";n?(t.lastIndex=0,t.test(a)||r.setAttribute("class",ee(a+" "+e))):r.setAttribute("class",ee(a.replace(t," ")))}}function ie(e,t,r){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?this.style.removeProperty(e):this.style.setProperty(e,n,r)}:function(){this.style.setProperty(e,t,r)}}function oe(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?delete this[e]:this[e]=r}:function(){this[e]=t}}function se(t){return"function"==typeof t?t:(t=e.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,r=this.namespaceURI;return r===J&&e.documentElement.namespaceURI===J?e.createElement(t):e.createElementNS(r,t)}}function le(){var e=this.parentNode;e&&e.removeChild(this)}function ce(e){return{__data__:e}}function ue(e){return function(){return q(this,e)}}function de(e){return arguments.length||(e=p),function(t,r){return t&&r?e(t.__data__,r.__data__):!t-!r}}function pe(e,t){for(var r=0,n=e.length;r<n;r++)for(var a,i=e[r],o=0,s=i.length;o<s;o++)(a=i[o])&&t(a,o,r);return e}function he(e){return V(e,fe),e}e.ns={prefix:$,qualify:function(e){var t=e.indexOf(":"),r=e;return t>=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),$.hasOwnProperty(r)?{space:$[r],local:e}:e}},K.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=e.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(r in t)this.each(Q(r,t[r]));return this}return this.each(Q(t,r))},K.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=re(e)).length,a=-1;if(t=r.classList){for(;++a<n;)if(!t.contains(e[a]))return!1}else for(t=r.getAttribute("class");++a<n;)if(!te(e[a]).test(t))return!1;return!0}for(t in e)this.each(ne(t,e[t]));return this}return this.each(ne(e,t))},K.style=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=""),e)this.each(ie(r,e[r],t));return this}if(n<2){var a=this.node();return o(a).getComputedStyle(a,null).getPropertyValue(e)}r=""}return this.each(ie(e,t,r))},K.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(oe(t,e[t]));return this}return this.each(oe(e,t))},K.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},K.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},K.append=function(e){return e=se(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},K.insert=function(e,t){return e=se(e),t=X(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},K.remove=function(){return this.each(le)},K.data=function(e,t){var r,n,a=-1,i=this.length;if(!arguments.length){for(e=new Array(i=(r=this[0]).length);++a<i;)(n=r[a])&&(e[a]=n.__data__);return e}function o(e,r){var n,a,i,o=e.length,u=r.length,d=Math.min(o,u),p=new Array(u),h=new Array(u),f=new Array(o);if(t){var m,g=new x,v=new Array(o);for(n=-1;++n<o;)(a=e[n])&&(g.has(m=t.call(a,a.__data__,n))?f[n]=a:g.set(m,a),v[n]=m);for(n=-1;++n<u;)(a=g.get(m=t.call(r,i=r[n],n)))?!0!==a&&(p[n]=a,a.__data__=i):h[n]=ce(i),g.set(m,!0);for(n=-1;++n<o;)n in v&&!0!==g.get(v[n])&&(f[n]=e[n])}else{for(n=-1;++n<d;)a=e[n],i=r[n],a?(a.__data__=i,p[n]=a):h[n]=ce(i);for(;n<u;++n)h[n]=ce(r[n]);for(;n<o;++n)f[n]=e[n]}h.update=p,h.parentNode=p.parentNode=f.parentNode=e.parentNode,s.push(h),l.push(p),c.push(f)}var s=he([]),l=U([]),c=U([]);if("function"==typeof e)for(;++a<i;)o(r=this[a],e.call(r,r.parentNode.__data__,a));else for(;++a<i;)o(r=this[a],e);return l.enter=function(){return s},l.exit=function(){return c},l},K.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},K.filter=function(e){var t,r,n,a=[];"function"!=typeof e&&(e=ue(e));for(var i=0,o=this.length;i<o;i++){a.push(t=[]),t.parentNode=(r=this[i]).parentNode;for(var s=0,l=r.length;s<l;s++)(n=r[s])&&e.call(n,n.__data__,s,i)&&t.push(n)}return U(a)},K.order=function(){for(var e=-1,t=this.length;++e<t;)for(var r,n=this[e],a=n.length-1,i=n[a];--a>=0;)(r=n[a])&&(i&&i!==r.nextSibling&&i.parentNode.insertBefore(r,i),i=r);return this},K.sort=function(e){e=de.apply(this,arguments);for(var t=-1,r=this.length;++t<r;)this[t].sort(e);return this.order()},K.each=function(e){return pe(this,(function(t,r,n){e.call(t,t.__data__,r,n)}))},K.call=function(e){var t=n(arguments);return e.apply(t[0]=this,t),this},K.empty=function(){return!this.node()},K.node=function(){for(var e=0,t=this.length;e<t;e++)for(var r=this[e],n=0,a=r.length;n<a;n++){var i=r[n];if(i)return i}return null},K.size=function(){var e=0;return pe(this,(function(){++e})),e};var fe=[];function me(e){var t,r;return function(n,a,i){var o,s=e[i].update,l=s.length;for(i!=r&&(r=i,t=0),a>=t&&(t=a+1);!(o=s[t])&&++t<l;);return o}}function ge(t,r,a){var i="__on"+t,o=t.indexOf("."),s=ye;o>0&&(t=t.slice(0,o));var l=ve.get(t);function c(){var e=this[i];e&&(this.removeEventListener(t,e,e.$),delete this[i])}return l&&(t=l,s=be),o?r?function(){var e=s(r,n(arguments));c.call(this),this.addEventListener(t,this[i]=e,e.$=a),e._=r}:c:r?F:function(){var r,n=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var a in this)if(r=a.match(n)){var i=this[a];this.removeEventListener(r[1],i,i.$),delete this[a]}}}e.selection.enter=he,e.selection.enter.prototype=fe,fe.append=K.append,fe.empty=K.empty,fe.node=K.node,fe.call=K.call,fe.size=K.size,fe.select=function(e){for(var t,r,n,a,i,o=[],s=-1,l=this.length;++s<l;){n=(a=this[s]).update,o.push(t=[]),t.parentNode=a.parentNode;for(var c=-1,u=a.length;++c<u;)(i=a[c])?(t.push(n[c]=r=e.call(a.parentNode,i.__data__,c,s)),r.__data__=i.__data__):t.push(null)}return U(o)},fe.insert=function(e,t){return arguments.length<2&&(t=me(this)),K.insert.call(this,e,t)},e.select=function(e){var t;return"string"==typeof e?(t=[W(e,a)]).parentNode=a.documentElement:(t=[e]).parentNode=i(e),U([t])},e.selectAll=function(e){var t;return"string"==typeof e?(t=n(G(e,a))).parentNode=a.documentElement:(t=n(e)).parentNode=null,U([t])},K.on=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=!1),e)this.each(ge(r,e[r],t));return this}if(n<2)return(n=this.node()["__on"+e])&&n._;r=!1}return this.each(ge(e,t,r))};var ve=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});function ye(t,r){return function(n){var a=e.event;e.event=n,r[0]=this.__data__;try{t.apply(this,r)}finally{e.event=a}}}function be(e,t){var r=ye(e,t);return function(e){var t=e.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||r.call(this,e)}}a&&ve.forEach((function(e){"on"+e in a&&ve.remove(e)}));var _e,xe=0;function we(t){var r=".dragsuppress-"+ ++xe,n="click"+r,a=e.select(o(t)).on("touchmove"+r,j).on("dragstart"+r,j).on("selectstart"+r,j);if(null==_e&&(_e=!("onselectstart"in t)&&O(t.style,"userSelect")),_e){var s=i(t).style,l=s[_e];s[_e]="none"}return function(e){if(a.on(r,null),_e&&(s[_e]=l),e){var t=function(){a.on(n,null)};a.on(n,(function(){j(),t()}),!0),setTimeout(t,0)}}}e.mouse=function(e){return Me(e,B())};var ke=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Me(t,r){r.changedTouches&&(r=r.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var a=n.createSVGPoint();if(ke<0){var i=o(t);if(i.scrollX||i.scrollY){var s=(n=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();ke=!(s.f||s.e),n.remove()}}return ke?(a.x=r.pageX,a.y=r.pageY):(a.x=r.clientX,a.y=r.clientY),[(a=a.matrixTransform(t.getScreenCTM().inverse())).x,a.y]}var l=t.getBoundingClientRect();return[r.clientX-l.left-t.clientLeft,r.clientY-l.top-t.clientTop]}function Te(){return e.event.changedTouches[0].identifier}e.touch=function(e,t,r){if(arguments.length<3&&(r=t,t=B().changedTouches),t)for(var n,a=0,i=t.length;a<i;++a)if((n=t[a]).identifier===r)return Me(e,n)},e.behavior.drag=function(){var t=Y(i,"drag","dragstart","dragend"),r=null,n=s(F,e.mouse,o,"mousemove","mouseup"),a=s(Te,e.touch,I,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",a)}function s(n,a,i,o,s){return function(){var l,c=this,u=e.event.target.correspondingElement||e.event.target,d=c.parentNode,p=t.of(c,arguments),h=0,f=n(),m=".drag"+(null==f?"":"-"+f),g=e.select(i(u)).on(o+m,b).on(s+m,_),v=we(u),y=a(d,f);function b(){var e,t,r=a(d,f);r&&(e=r[0]-y[0],t=r[1]-y[1],h|=e|t,y=r,p({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:e,dy:t}))}function _(){a(d,f)&&(g.on(o+m,null).on(s+m,null),v(h),p({type:"dragend"}))}l=r?[(l=r.apply(c,arguments)).x-y[0],l.y-y[1]]:[0,0],p({type:"dragstart"})}}return i.origin=function(e){return arguments.length?(r=e,i):r},e.rebind(i,t,"on")},e.touches=function(e,t){return arguments.length<2&&(t=B().touches),t?n(t).map((function(t){var r=Me(e,t);return r.identifier=t.identifier,r})):[]};var Ce=1e-6,Se=Ce*Ce,Le=Math.PI,Ae=2*Le,Ee=Ae-Ce,De=Le/2,Ie=Le/180,Pe=180/Le;function Oe(e){return e>0?1:e<0?-1:0}function Re(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}function Fe(e){return e>1?0:e<-1?Le:Math.acos(e)}function ze(e){return e>1?De:e<-1?-De:Math.asin(e)}function Ne(e){return((e=Math.exp(e))+1/e)/2}function je(e){return(e=Math.sin(e/2))*e}var Be=Math.SQRT2;e.interpolateZoom=function(e,t){var r,n,a=e[0],i=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-a,d=l-i,p=u*u+d*d;if(p<Se)n=Math.log(c/o)/Be,r=function(e){return[a+e*u,i+e*d,o*Math.exp(Be*e*n)]};else{var h=Math.sqrt(p),f=(c*c-o*o+4*p)/(2*o*2*h),m=(c*c-o*o-4*p)/(2*c*2*h),g=Math.log(Math.sqrt(f*f+1)-f),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-g)/Be,r=function(e){var t,r=e*n,s=Ne(g),l=o/(2*h)*(s*(t=Be*r+g,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[a+l*u,i+l*d,o*s/Ne(Be*r+g)]}}return r.duration=1e3*n,r},e.behavior.zoom=function(){var t,r,n,i,s,l,c,u,d,p={x:0,y:0,k:1},h=[960,500],f=Ve,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",b="mouseup.zoom",_="touchstart.zoom",x=Y(w,"zoomstart","zoom","zoomend");function w(e){e.on(v,D).on(He+".zoom",P).on("dblclick.zoom",O).on(_,I)}function k(e){return[(e[0]-p.x)/p.k,(e[1]-p.y)/p.k]}function M(e){p.k=Math.max(f[0],Math.min(f[1],e))}function T(e,t){t=function(e){return[e[0]*p.k+p.x,e[1]*p.k+p.y]}(t),p.x+=e[0]-t[0],p.y+=e[1]-t[1]}function C(t,n,a,i){t.__chart__={x:p.x,y:p.y,k:p.k},M(Math.pow(2,i)),T(r=n,a),t=e.select(t),m>0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){c&&c.domain(l.range().map((function(e){return(e-p.x)/p.k})).map(l.invert)),d&&d.domain(u.range().map((function(e){return(e-p.y)/p.k})).map(u.invert))}function L(e){g++||e({type:"zoomstart"})}function A(e){S(),e({type:"zoom",scale:p.k,translate:[p.x,p.y]})}function E(e){--g||(e({type:"zoomend"}),r=null)}function D(){var t=this,r=x.of(t,arguments),n=0,a=e.select(o(t)).on(y,(function(){n=1,T(e.mouse(t),i),A(r)})).on(b,(function(){a.on(y,null).on(b,null),s(n),E(r)})),i=k(e.mouse(t)),s=we(t);ws.call(t),L(r)}function I(){var t,r=this,n=x.of(r,arguments),a={},i=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],d=e.select(r),h=we(r);function f(){var n=e.touches(r);return t=p.k,n.forEach((function(e){e.identifier in a&&(a[e.identifier]=k(e))})),n}function m(){var t=e.event.target;e.select(t).on(l,g).on(c,y),u.push(t);for(var n=e.event.changedTouches,o=0,d=n.length;o<d;++o)a[n[o].identifier]=null;var h=f(),m=Date.now();if(1===h.length){if(m-s<500){var v=h[0];C(r,v,a[v.identifier],Math.floor(Math.log(p.k)/Math.LN2)+1),j()}s=m}else if(h.length>1){v=h[0];var b=h[1],_=v[0]-b[0],x=v[1]-b[1];i=_*_+x*x}}function g(){var o,l,c,u,d=e.touches(r);ws.call(r);for(var p=0,h=d.length;p<h;++p,u=null)if(c=d[p],u=a[c.identifier]){if(l)break;o=c,l=u}if(u){var f=(f=c[0]-o[0])*f+(f=c[1]-o[1])*f,m=i&&Math.sqrt(f/i);o=[(o[0]+c[0])/2,(o[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],M(m*t)}s=null,T(o,l),A(n)}function y(){if(e.event.touches.length){for(var t=e.event.changedTouches,r=0,i=t.length;r<i;++r)delete a[t[r].identifier];for(var s in a)return void f()}e.selectAll(u).on(o,null),d.on(v,D).on(_,I),h(),E(n)}m(),L(n),d.on(v,null).on(_,m)}function P(){var a=x.of(this,arguments);i?clearTimeout(i):(ws.call(this),t=k(r=n||e.mouse(this)),L(a)),i=setTimeout((function(){i=null,E(a)}),50),j(),M(Math.pow(2,.002*Ye())*p.k),T(r,t),A(a)}function O(){var t=e.mouse(this),r=Math.log(p.k)/Math.LN2;C(this,t,k(t),e.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1)}return He||(He="onwheel"in a?(Ye=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in a?(Ye=function(){return e.event.wheelDelta},"mousewheel"):(Ye=function(){return-e.event.detail},"MozMousePixelScroll")),w.event=function(t){t.each((function(){var t=x.of(this,arguments),n=p;Ts?e.select(this).transition().each("start.zoom",(function(){p=this.__chart__||{x:0,y:0,k:1},L(t)})).tween("zoom:zoom",(function(){var a=h[0],i=h[1],o=r?r[0]:a/2,s=r?r[1]:i/2,l=e.interpolateZoom([(o-p.x)/p.k,(s-p.y)/p.k,a/p.k],[(o-n.x)/n.k,(s-n.y)/n.k,a/n.k]);return function(e){var r=l(e),n=a/r[2];this.__chart__=p={x:o-r[0]*n,y:s-r[1]*n,k:n},A(t)}})).each("interrupt.zoom",(function(){E(t)})).each("end.zoom",(function(){E(t)})):(this.__chart__=p,L(t),A(t),E(t))}))},w.translate=function(e){return arguments.length?(p={x:+e[0],y:+e[1],k:p.k},S(),w):[p.x,p.y]},w.scale=function(e){return arguments.length?(p={x:p.x,y:p.y,k:null},M(+e),S(),w):p.k},w.scaleExtent=function(e){return arguments.length?(f=null==e?Ve:[+e[0],+e[1]],w):f},w.center=function(e){return arguments.length?(n=e&&[+e[0],+e[1]],w):n},w.size=function(e){return arguments.length?(h=e&&[+e[0],+e[1]],w):h},w.duration=function(e){return arguments.length?(m=+e,w):m},w.x=function(e){return arguments.length?(c=e,l=e.copy(),p={x:0,y:0,k:1},w):c},w.y=function(e){return arguments.length?(d=e,u=e.copy(),p={x:0,y:0,k:1},w):d},e.rebind(w,x,"on")};var Ye,He,Ve=[0,1/0];function Ue(){}function We(e,t,r){return this instanceof We?(this.h=+e,this.s=+t,void(this.l=+r)):arguments.length<2?e instanceof We?new We(e.h,e.s,e.l):ht(""+e,ft,We):new We(e,t,r)}e.color=Ue,Ue.prototype.toString=function(){return this.rgb()+""},e.hsl=We;var Ge=We.prototype=new Ue;function qe(e,t,r){var n,a;function i(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?n+(a-n)*e/60:e<180?a:e<240?n+(a-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(a=r<=.5?r*(1+t):r+t-r*t),new lt(i(e+120),i(e),i(e-120))}function Ke(t,r,n){return this instanceof Ke?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof Ke?new Ke(t.h,t.c,t.l):at(t instanceof Je?t.l:(t=mt((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ke(t,r,n)}Ge.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new We(this.h,this.s,this.l/e)},Ge.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new We(this.h,this.s,e*this.l)},Ge.rgb=function(){return qe(this.h,this.s,this.l)},e.hcl=Ke;var Xe=Ke.prototype=new Ue;function Ze(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new Je(r,Math.cos(e*=Ie)*t,Math.sin(e)*t)}function Je(e,t,r){return this instanceof Je?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof Je?new Je(e.l,e.a,e.b):e instanceof Ke?Ze(e.h,e.c,e.l):mt((e=lt(e)).r,e.g,e.b):new Je(e,t,r)}Xe.brighter=function(e){return new Ke(this.h,this.c,Math.min(100,this.l+$e*(arguments.length?e:1)))},Xe.darker=function(e){return new Ke(this.h,this.c,Math.max(0,this.l-$e*(arguments.length?e:1)))},Xe.rgb=function(){return Ze(this.h,this.c,this.l).rgb()},e.lab=Je;var $e=18,Qe=.95047,et=1,tt=1.08883,rt=Je.prototype=new Ue;function nt(e,t,r){var n=(e+16)/116,a=n+t/500,i=n-r/200;return new lt(st(3.2404542*(a=it(a)*Qe)-1.5371385*(n=it(n)*et)-.4985314*(i=it(i)*tt)),st(-.969266*a+1.8760108*n+.041556*i),st(.0556434*a-.2040259*n+1.0572252*i))}function at(e,t,r){return e>0?new Ke(Math.atan2(r,t)*Pe,Math.sqrt(t*t+r*r),e):new Ke(NaN,NaN,e)}function it(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ot(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function st(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function lt(e,t,r){return this instanceof lt?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof lt?new lt(e.r,e.g,e.b):ht(""+e,lt,qe):new lt(e,t,r)}function ct(e){return new lt(e>>16,e>>8&255,255&e)}function ut(e){return ct(e)+""}rt.brighter=function(e){return new Je(Math.min(100,this.l+$e*(arguments.length?e:1)),this.a,this.b)},rt.darker=function(e){return new Je(Math.max(0,this.l-$e*(arguments.length?e:1)),this.a,this.b)},rt.rgb=function(){return nt(this.l,this.a,this.b)},e.rgb=lt;var dt=lt.prototype=new Ue;function pt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ht(e,t,r){var n,a,i,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(a=n[2].split(","),n[1]){case"hsl":return r(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return t(vt(a[0]),vt(a[1]),vt(a[2]))}return(i=yt.get(e))?t(i.r,i.g,i.b):(null==e||"#"!==e.charAt(0)||isNaN(i=parseInt(e.slice(1),16))||(4===e.length?(o=(3840&i)>>4,o|=o>>4,s=240&i,s|=s>>4,l=15&i,l|=l<<4):7===e.length&&(o=(16711680&i)>>16,s=(65280&i)>>8,l=255&i)),t(o,s,l))}function ft(e,t,r){var n,a,i=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-i,l=(o+i)/2;return s?(a=l<.5?s/(o+i):s/(2-o-i),n=e==o?(t-r)/s+(t<r?6:0):t==o?(r-e)/s+2:(e-t)/s+4,n*=60):(n=NaN,a=l>0&&l<1?0:n),new We(n,a,l)}function mt(e,t,r){var n=ot((.4124564*(e=gt(e))+.3575761*(t=gt(t))+.1804375*(r=gt(r)))/Qe),a=ot((.2126729*e+.7151522*t+.072175*r)/et);return Je(116*a-16,500*(n-a),200*(a-ot((.0193339*e+.119192*t+.9503041*r)/tt)))}function gt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}dt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,a=30;return t||r||n?(t&&t<a&&(t=a),r&&r<a&&(r=a),n&&n<a&&(n=a),new lt(Math.min(255,t/e),Math.min(255,r/e),Math.min(255,n/e))):new lt(a,a,a)},dt.darker=function(e){return new lt((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},dt.hsl=function(){return ft(this.r,this.g,this.b)},dt.toString=function(){return"#"+pt(this.r)+pt(this.g)+pt(this.b)};var yt=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function bt(e){return"function"==typeof e?e:function(){return e}}function _t(e){return function(t,r,n){return 2===arguments.length&&"function"==typeof r&&(n=r,r=null),xt(t,r,e,n)}}function xt(t,r,a,i){var o={},s=e.dispatch("beforesend","progress","load","error"),l={},c=new XMLHttpRequest,u=null;function d(){var e,t=c.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(c)||t>=200&&t<300||304===t){try{e=a.call(o,c)}catch(e){return void s.error.call(o,e)}s.load.call(o,e)}else s.error.call(o,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=d:c.onreadystatechange=function(){c.readyState>3&&d()},c.onprogress=function(t){var r=e.event;e.event=t;try{s.progress.call(o,c)}finally{e.event=r}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",o):r},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return a=e,o},["get","post"].forEach((function(e){o[e]=function(){return o.send.apply(o,[e].concat(n(arguments)))}})),o.send=function(e,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),c.open(e,t,!0),null==r||"accept"in l||(l.accept=r+",*/*"),c.setRequestHeader)for(var i in l)c.setRequestHeader(i,l[i]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=a&&o.on("error",a).on("load",(function(e){a(null,e)})),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},e.rebind(o,s,"on"),null==i?o:o.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(i))}yt.forEach((function(e,t){yt.set(e,ct(t))})),e.functor=bt,e.xhr=_t(I),e.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function a(e,r,n){arguments.length<3&&(n=r,r=null);var a=xt(e,t,null==r?i:o(r),n);return a.row=function(e){return arguments.length?a.response(null==(r=e)?i:o(e)):r},a}function i(e){return a.parse(e.responseText)}function o(e){return function(t){return a.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return a.parse=function(e,t){var r;return a.parseRows(e,(function(e,n){if(r)return r(e,n-1);var a=new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}");r=t?function(e,r){return t(a(e),r)}:a}))},a.parseRows=function(e,t){var r,a,i={},o={},s=[],l=e.length,c=0,u=0;function d(){if(c>=l)return o;if(a)return a=!1,i;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++<l;)if(34===e.charCodeAt(r)){if(34!==e.charCodeAt(r+1))break;++r}return c=r+2,13===(s=e.charCodeAt(r+1))?(a=!0,10===e.charCodeAt(r+2)&&++c):10===s&&(a=!0),e.slice(t+1,r).replace(/""/g,'"')}for(;c<l;){var s,u=1;if(10===(s=e.charCodeAt(c++)))a=!0;else if(13===s)a=!0,10===e.charCodeAt(c)&&(++c,++u);else if(s!==n)continue;return e.slice(t,c-u)}return e.slice(t)}for(;(r=d())!==o;){for(var p=[];r!==i&&r!==o;)p.push(r),r=d();t&&null==(p=t(p,u++))||s.push(p)}return s},a.format=function(t){if(Array.isArray(t[0]))return a.formatRows(t);var r=new D,n=[];return t.forEach((function(e){for(var t in e)r.has(t)||n.push(r.add(t))})),[n.map(l).join(e)].concat(t.map((function(t){return n.map((function(e){return l(t[e])})).join(e)}))).join("\n")},a.formatRows=function(e){return e.map(s).join("\n")},a},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv("\t","text/tab-separated-values");var wt,kt,Mt,Tt,Ct=this[O(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function St(e,t,r){var n=arguments.length;n<2&&(t=0),n<3&&(r=Date.now());var a={c:e,t:r+t,n:null};return kt?kt.n=a:wt=a,kt=a,Mt||(Tt=clearTimeout(Tt),Mt=1,Ct(Lt)),a}function Lt(){var e=At(),t=Et()-e;t>24?(isFinite(t)&&(clearTimeout(Tt),Tt=setTimeout(Lt,t)),Mt=0):(Mt=1,Ct(Lt))}function At(){for(var e=Date.now(),t=wt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Et(){for(var e,t=wt,r=1/0;t;)t.c?(t.t<r&&(r=t.t),t=(e=t).n):t=e?e.n=t.n:wt=t.n;return kt=e,r}function Dt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}e.timer=function(){St.apply(this,arguments)},e.timer.flush=function(){At(),Et()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var It=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(e,t){var r=Math.pow(10,3*y(8-t));return{scale:t>8?function(e){return e/r}:function(e){return e*r},symbol:e}}));function Pt(t){var r=t.decimal,n=t.thousands,a=t.grouping,i=t.currency,o=a&&n?function(e,t){for(var r=e.length,i=[],o=0,s=a[0],l=0;r>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),i.push(e.substring(r-=s,r+s)),!((l+=s+1)>t));)s=a[o=(o+1)%a.length];return i.reverse().join(n)}:I;return function(t){var n=Ot.exec(t),a=n[1]||" ",s=n[2]||">",l=n[3]||"-",c=n[4]||"",u=n[5],d=+n[6],p=n[7],h=n[8],f=n[9],m=1,g="",v="",y=!1,b=!0;switch(h&&(h=+h.substring(1)),(u||"0"===a&&"="===s)&&(u=a="0",s="="),f){case"n":p=!0,f="g";break;case"%":m=100,v="%",f="f";break;case"p":m=100,v="%",f="r";break;case"b":case"o":case"x":case"X":"#"===c&&(g="0"+f.toLowerCase());case"c":b=!1;case"d":y=!0,h=0;break;case"s":m=-1,f="r"}"$"===c&&(g=i[0],v=i[1]),"r"!=f||h||(f="g"),null!=h&&("g"==f?h=Math.max(1,Math.min(21,h)):"e"!=f&&"f"!=f||(h=Math.max(0,Math.min(20,h)))),f=Rt.get(f)||Ft;var _=u&&p;return function(t){var n=v;if(y&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(m<0){var c=e.formatPrefix(t,h);t=c.scale(t),n=c.symbol+v}else t*=m;var x,w,k=(t=f(t,h)).lastIndexOf(".");if(k<0){var M=b?t.lastIndexOf("e"):-1;M<0?(x=t,w=""):(x=t.substring(0,M),w=t.substring(M))}else x=t.substring(0,k),w=r+t.substring(k+1);!u&&p&&(x=o(x,1/0));var T=g.length+x.length+w.length+(_?0:i.length),C=T<d?new Array(T=d-T+1).join(a):"";return _&&(x=o(C+x,C.length?d-w.length:1/0)),i+=g,t=x+w,("<"===s?i+t+C:">"===s?C+i+t:"^"===s?C.substring(0,T>>=1)+i+t+C.substring(T):i+(_?t:C+t))+n}}}e.formatPrefix=function(t,r){var n=0;return(t=+t)&&(t<0&&(t*=-1),r&&(t=e.round(t,Dt(t,r))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),It[8+n/3]};var Ot=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Rt=e.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(t,r){return(t=e.round(t,Dt(t,r))).toFixed(Math.max(0,Math.min(20,Dt(t*(1+1e-15),r))))}});function Ft(e){return e+""}var zt=e.time={},Nt=Date;function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Bt.setUTCDate.apply(this._,arguments)},setDay:function(){Bt.setUTCDay.apply(this._,arguments)},setFullYear:function(){Bt.setUTCFullYear.apply(this._,arguments)},setHours:function(){Bt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Bt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Bt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Bt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Bt.setUTCSeconds.apply(this._,arguments)},setTime:function(){Bt.setTime.apply(this._,arguments)}};var Bt=Date.prototype;function Yt(e,t,r){function n(t){var r=e(t),n=i(r,1);return t-r<n-t?r:n}function a(r){return t(r=e(new Nt(r-1)),1),r}function i(e,r){return t(e=new Nt(+e),r),e}function o(e,n,i){var o=a(e),s=[];if(i>1)for(;o<n;)r(o)%i||s.push(new Date(+o)),t(o,1);else for(;o<n;)s.push(new Date(+o)),t(o,1);return s}e.floor=e,e.round=n,e.ceil=a,e.offset=i,e.range=o;var s=e.utc=Ht(e);return s.floor=s,s.round=Ht(n),s.ceil=Ht(a),s.offset=Ht(i),s.range=function(e,t,r){try{Nt=jt;var n=new jt;return n._=e,o(n,t,r)}finally{Nt=Date}},e}function Ht(e){return function(t,r){try{Nt=jt;var n=new jt;return n._=t,e(n,r)._}finally{Nt=Date}}}function Vt(t){var r=t.dateTime,n=t.date,a=t.time,i=t.periods,o=t.days,s=t.shortDays,l=t.months,c=t.shortMonths;function u(e){var t=e.length;function r(r){for(var n,a,i,o=[],s=-1,l=0;++s<t;)37===e.charCodeAt(s)&&(o.push(e.slice(l,s)),null!=(a=Ut[n=e.charAt(++s)])&&(n=e.charAt(++s)),(i=x[n])&&(n=i(r,null==a?"e"===n?" ":"0":a)),o.push(n),l=s+1);return o.push(e.slice(l,s)),o.join("")}return r.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(d(r,e,t,0)!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var n=null!=r.Z&&Nt!==jt,a=new(n?jt:Nt);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),n?a._:a},r.toString=function(){return e},r}function d(e,t,r,n){for(var a,i,o,s=0,l=t.length,c=r.length;s<l;){if(n>=c)return-1;if(37===(a=t.charCodeAt(s++))){if(o=t.charAt(s++),!(i=w[o in Ut?t.charAt(s++):o])||(n=i(e,r,n))<0)return-1}else if(a!=r.charCodeAt(n++))return-1}return n}u.utc=function(e){var t=u(e);function r(e){try{var r=new(Nt=jt);return r._=e,t(r)}finally{Nt=Date}}return r.parse=function(e){try{Nt=jt;var r=t.parse(e);return r&&r._}finally{Nt=Date}},r.toString=t.toString,r},u.multi=u.utc.multi=dr;var p=e.map(),h=Kt(o),f=Xt(o),m=Kt(s),g=Xt(s),v=Kt(l),y=Xt(l),b=Kt(c),_=Xt(c);i.forEach((function(e,t){p.set(e.toLowerCase(),t)}));var x={a:function(e){return s[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:u(r),d:function(e,t){return qt(e.getDate(),t,2)},e:function(e,t){return qt(e.getDate(),t,2)},H:function(e,t){return qt(e.getHours(),t,2)},I:function(e,t){return qt(e.getHours()%12||12,t,2)},j:function(e,t){return qt(1+zt.dayOfYear(e),t,3)},L:function(e,t){return qt(e.getMilliseconds(),t,3)},m:function(e,t){return qt(e.getMonth()+1,t,2)},M:function(e,t){return qt(e.getMinutes(),t,2)},p:function(e){return i[+(e.getHours()>=12)]},S:function(e,t){return qt(e.getSeconds(),t,2)},U:function(e,t){return qt(zt.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return qt(zt.mondayOfYear(e),t,2)},x:u(n),X:u(a),y:function(e,t){return qt(e.getFullYear()%100,t,2)},Y:function(e,t){return qt(e.getFullYear()%1e4,t,4)},Z:cr,"%":function(){return"%"}},w={a:function(e,t,r){m.lastIndex=0;var n=m.exec(t.slice(r));return n?(e.w=g.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(e,t,r){h.lastIndex=0;var n=h.exec(t.slice(r));return n?(e.w=f.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(e,t,r){b.lastIndex=0;var n=b.exec(t.slice(r));return n?(e.m=_.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(e,t,r){v.lastIndex=0;var n=v.exec(t.slice(r));return n?(e.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(e,t,r){return d(e,x.c.toString(),t,r)},d:nr,e:nr,H:ir,I:ir,j:ar,L:lr,m:rr,M:or,p:function(e,t,r){var n=p.get(t.slice(r,r+=2).toLowerCase());return null==n?-1:(e.p=n,r)},S:sr,U:Jt,w:Zt,W:$t,x:function(e,t,r){return d(e,x.x.toString(),t,r)},X:function(e,t,r){return d(e,x.X.toString(),t,r)},y:er,Y:Qt,Z:tr,"%":ur};return u}zt.year=Yt((function(e){return(e=zt.day(e)).setMonth(0,1),e}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e){return e.getFullYear()})),zt.years=zt.year.range,zt.years.utc=zt.year.utc.range,zt.day=Yt((function(e){var t=new Nt(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e){return e.getDate()-1})),zt.days=zt.day.range,zt.days.utc=zt.day.utc.range,zt.dayOfYear=function(e){var t=zt.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(e,t){t=7-t;var r=zt[e]=Yt((function(e){return(e=zt.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e}),(function(e,t){e.setDate(e.getDate()+7*Math.floor(t))}),(function(e){var r=zt.year(e).getDay();return Math.floor((zt.dayOfYear(e)+(r+t)%7)/7)-(r!==t)}));zt[e+"s"]=r.range,zt[e+"s"].utc=r.utc.range,zt[e+"OfYear"]=function(e){var r=zt.year(e).getDay();return Math.floor((zt.dayOfYear(e)+(r+t)%7)/7)}})),zt.week=zt.sunday,zt.weeks=zt.sunday.range,zt.weeks.utc=zt.sunday.utc.range,zt.weekOfYear=zt.sundayOfYear;var Ut={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,Gt=/^%/;function qt(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function Kt(t){return new RegExp("^(?:"+t.map(e.requote).join("|")+")","i")}function Xt(e){for(var t=new x,r=-1,n=e.length;++r<n;)t.set(e[r].toLowerCase(),r);return t}function Zt(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Jt(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r));return n?(e.U=+n[0],r+n[0].length):-1}function $t(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r));return n?(e.W=+n[0],r+n[0].length):-1}function Qt(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function er(e,t,r){Wt.lastIndex=0;var n,a=Wt.exec(t.slice(r,r+2));return a?(e.y=(n=+a[0])+(n>68?1900:2e3),r+a[0].length):-1}function tr(e,t,r){return/^[+-]\d{4}$/.test(t=t.slice(r,r+5))?(e.Z=-t,r+5):-1}function rr(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function nr(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function ar(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+3));return n?(e.j=+n[0],r+n[0].length):-1}function ir(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function or(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function sr(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function lr(e,t,r){Wt.lastIndex=0;var n=Wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function cr(e){var t=e.getTimezoneOffset(),r=t>0?"-":"+",n=y(t)/60|0,a=y(t)%60;return r+qt(n,"0",2)+qt(a,"0",2)}function ur(e,t,r){Gt.lastIndex=0;var n=Gt.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function dr(e){for(var t=e.length,r=-1;++r<t;)e[r][0]=this(e[r][0]);return function(t){for(var r=0,n=e[r];!n[1](t);)n=e[++r];return n[0](t)}}e.locale=function(e){return{numberFormat:Pt(e),timeFormat:Vt(e)}};var pr=e.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function hr(){}e.format=pr.numberFormat,e.geo={},hr.prototype={s:0,t:0,add:function(e){mr(e,this.t,fr),mr(fr.s,this.s,this),this.s?this.t+=fr.t:this.s=fr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var fr=new hr;function mr(e,t,r){var n=r.s=e+t,a=n-e,i=n-a;r.t=e-i+(t-a)}function gr(e,t){e&&yr.hasOwnProperty(e.type)&&yr[e.type](e,t)}e.geo.stream=function(e,t){e&&vr.hasOwnProperty(e.type)?vr[e.type](e,t):gr(e,t)};var vr={Feature:function(e,t){gr(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,a=r.length;++n<a;)gr(r[n].geometry,t)}},yr={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,a=r.length;++n<a;)e=r[n],t.point(e[0],e[1],e[2])},LineString:function(e,t){br(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,a=r.length;++n<a;)br(r[n],t,0)},Polygon:function(e,t){_r(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,a=r.length;++n<a;)_r(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,a=r.length;++n<a;)gr(r[n],t)}};function br(e,t,r){var n,a=-1,i=e.length-r;for(t.lineStart();++a<i;)n=e[a],t.point(n[0],n[1],n[2]);t.lineEnd()}function _r(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)br(e[r],t,1);t.polygonEnd()}e.geo.area=function(t){return xr=0,e.geo.stream(t,Or),xr};var xr,wr,kr,Mr,Tr,Cr,Sr,Lr,Ar,Er,Dr,Ir,Pr=new hr,Or={sphere:function(){xr+=4*Le},point:F,lineStart:F,lineEnd:F,polygonStart:function(){Pr.reset(),Or.lineStart=Rr},polygonEnd:function(){var e=2*Pr;xr+=e<0?4*Le+e:e,Or.lineStart=Or.lineEnd=Or.point=F}};function Rr(){var e,t,r,n,a;function i(e,t){t=t*Ie/2+Le/4;var i=(e*=Ie)-r,o=i>=0?1:-1,s=o*i,l=Math.cos(t),c=Math.sin(t),u=a*c,d=n*l+u*Math.cos(s),p=u*o*Math.sin(s);Pr.add(Math.atan2(p,d)),r=e,n=l,a=c}Or.point=function(o,s){Or.point=i,r=(e=o)*Ie,n=Math.cos(s=(t=s)*Ie/2+Le/4),a=Math.sin(s)},Or.lineEnd=function(){i(e,t)}}function Fr(e){var t=e[0],r=e[1],n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function zr(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Nr(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function jr(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Br(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Yr(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Hr(e){return[Math.atan2(e[1],e[0]),ze(e[2])]}function Vr(e,t){return y(e[0]-t[0])<Ce&&y(e[1]-t[1])<Ce}e.geo.bounds=function(){var t,r,n,a,i,o,s,l,c,u,d,p={point:h,lineStart:m,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=b,p.lineEnd=_,c=0,Or.polygonStart()},polygonEnd:function(){Or.polygonEnd(),p.point=h,p.lineStart=m,p.lineEnd=g,Pr<0?(t=-(n=180),r=-(a=90)):c>Ce?a=90:c<-Ce&&(r=-90),d[0]=t,d[1]=n}};function h(e,i){u.push(d=[t=e,n=e]),i<r&&(r=i),i>a&&(a=i)}function f(e,o){var s=Fr([e*Ie,o*Ie]);if(l){var c=Nr(l,s),u=Nr([c[1],-c[0],0],c);Yr(u),u=Hr(u);var d=e-i,p=d>0?1:-1,f=u[0]*Pe*p,m=y(d)>180;if(m^(p*i<f&&f<p*e))(g=u[1]*Pe)>a&&(a=g);else if(m^(p*i<(f=(f+360)%360-180)&&f<p*e)){var g;(g=-u[1]*Pe)<r&&(r=g)}else o<r&&(r=o),o>a&&(a=o);m?e<i?x(t,e)>x(t,n)&&(n=e):x(e,n)>x(t,n)&&(t=e):n>=t?(e<t&&(t=e),e>n&&(n=e)):e>i?x(t,e)>x(t,n)&&(n=e):x(e,n)>x(t,n)&&(t=e)}else h(e,o);l=s,i=e}function m(){p.point=f}function g(){d[0]=t,d[1]=n,p.point=h,l=null}function v(e,t){if(l){var r=e-i;c+=y(r)>180?r+(r>0?360:-360):r}else o=e,s=t;Or.point(e,t),f(e,t)}function b(){Or.lineStart()}function _(){v(o,s),Or.lineEnd(),y(c)>Ce&&(t=-(n=180)),d[0]=t,d[1]=n,l=null}function x(e,t){return(t-=e)<0?t+360:t}function w(e,t){return e[0]-t[0]}function k(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}return function(i){if(a=n=-(t=r=1/0),u=[],e.geo.stream(i,p),c=u.length){u.sort(w);for(var o=1,s=[m=u[0]];o<c;++o)k((h=u[o])[0],m)||k(h[1],m)?(x(m[0],h[1])>x(m[0],m[1])&&(m[1]=h[1]),x(h[0],m[1])>x(m[0],m[1])&&(m[0]=h[0])):s.push(m=h);for(var l,c,h,f=-1/0,m=(o=0,s[c=s.length-1]);o<=c;m=h,++o)h=s[o],(l=x(m[1],h[0]))>f&&(f=l,t=h[0],n=m[1])}return u=d=null,t===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,r],[n,a]]}}(),e.geo.centroid=function(t){wr=kr=Mr=Tr=Cr=Sr=Lr=Ar=Er=Dr=Ir=0,e.geo.stream(t,Ur);var r=Er,n=Dr,a=Ir,i=r*r+n*n+a*a;return i<Se&&(r=Sr,n=Lr,a=Ar,kr<Ce&&(r=Mr,n=Tr,a=Cr),(i=r*r+n*n+a*a)<Se)?[NaN,NaN]:[Math.atan2(n,r)*Pe,ze(a/Math.sqrt(i))*Pe]};var Ur={sphere:F,point:Wr,lineStart:qr,lineEnd:Kr,polygonStart:function(){Ur.lineStart=Xr},polygonEnd:function(){Ur.lineStart=qr}};function Wr(e,t){e*=Ie;var r=Math.cos(t*=Ie);Gr(r*Math.cos(e),r*Math.sin(e),Math.sin(t))}function Gr(e,t,r){++wr,Mr+=(e-Mr)/wr,Tr+=(t-Tr)/wr,Cr+=(r-Cr)/wr}function qr(){var e,t,r;function n(n,a){n*=Ie;var i=Math.cos(a*=Ie),o=i*Math.cos(n),s=i*Math.sin(n),l=Math.sin(a),c=Math.atan2(Math.sqrt((c=t*l-r*s)*c+(c=r*o-e*l)*c+(c=e*s-t*o)*c),e*o+t*s+r*l);kr+=c,Sr+=c*(e+(e=o)),Lr+=c*(t+(t=s)),Ar+=c*(r+(r=l)),Gr(e,t,r)}Ur.point=function(a,i){a*=Ie;var o=Math.cos(i*=Ie);e=o*Math.cos(a),t=o*Math.sin(a),r=Math.sin(i),Ur.point=n,Gr(e,t,r)}}function Kr(){Ur.point=Wr}function Xr(){var e,t,r,n,a;function i(e,t){e*=Ie;var i=Math.cos(t*=Ie),o=i*Math.cos(e),s=i*Math.sin(e),l=Math.sin(t),c=n*l-a*s,u=a*o-r*l,d=r*s-n*o,p=Math.sqrt(c*c+u*u+d*d),h=r*o+n*s+a*l,f=p&&-Fe(h)/p,m=Math.atan2(p,h);Er+=f*c,Dr+=f*u,Ir+=f*d,kr+=m,Sr+=m*(r+(r=o)),Lr+=m*(n+(n=s)),Ar+=m*(a+(a=l)),Gr(r,n,a)}Ur.point=function(o,s){e=o,t=s,Ur.point=i,o*=Ie;var l=Math.cos(s*=Ie);r=l*Math.cos(o),n=l*Math.sin(o),a=Math.sin(s),Gr(r,n,a)},Ur.lineEnd=function(){i(e,t),Ur.lineEnd=Kr,Ur.point=Wr}}function Zr(e,t){function r(r,n){return r=e(r,n),t(r[0],r[1])}return e.invert&&t.invert&&(r.invert=function(r,n){return(r=t.invert(r,n))&&e.invert(r[0],r[1])}),r}function Jr(){return!0}function $r(e,t,r,n,a){var i=[],o=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,r=e[0],n=e[t];if(Vr(r,n)){a.lineStart();for(var s=0;s<t;++s)a.point((r=e[s])[0],r[1]);a.lineEnd()}else{var l=new en(r,e,null,!0),c=new en(r,null,l,!1);l.o=c,i.push(l),o.push(c),l=new en(n,e,null,!1),c=new en(n,null,l,!0),l.o=c,i.push(l),o.push(c)}}})),o.sort(t),Qr(i),Qr(o),i.length){for(var s=0,l=r,c=o.length;s<c;++s)o[s].e=l=!l;for(var u,d,p=i[0];;){for(var h=p,f=!0;h.v;)if((h=h.n)===p)return;u=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(s=0,c=u.length;s<c;++s)a.point((d=u[s])[0],d[1]);else n(h.x,h.n.x,1,a);h=h.n}else{if(f)for(s=(u=h.p.z).length-1;s>=0;--s)a.point((d=u[s])[0],d[1]);else n(h.x,h.p.x,-1,a);h=h.p}u=(h=h.o).z,f=!f}while(!h.v);a.lineEnd()}}}function Qr(e){if(t=e.length){for(var t,r,n=0,a=e[0];++n<t;)a.n=r=e[n],r.p=a,a=r;a.n=r=e[0],r.p=a}}function en(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function tn(t,r,n,a){return function(i,o){var s,l=r(o),c=i.invert(a[0],a[1]),u={point:d,lineStart:h,lineEnd:f,polygonStart:function(){u.point=_,u.lineStart=x,u.lineEnd=w,s=[],m=[]},polygonEnd:function(){u.point=d,u.lineStart=h,u.lineEnd=f,s=e.merge(s);var t=function(e,t){var r=e[0],n=e[1],a=[Math.sin(r),-Math.cos(r),0],i=0,o=0;Pr.reset();for(var s=0,l=t.length;s<l;++s){var c=t[s],u=c.length;if(u)for(var d=c[0],p=d[0],h=d[1]/2+Le/4,f=Math.sin(h),m=Math.cos(h),g=1;;){g===u&&(g=0);var v=(e=c[g])[0],y=e[1]/2+Le/4,b=Math.sin(y),_=Math.cos(y),x=v-p,w=x>=0?1:-1,k=w*x,M=k>Le,T=f*b;if(Pr.add(Math.atan2(T*w*Math.sin(k),m*_+T*Math.cos(k))),i+=M?x+w*Ae:x,M^p>=r^v>=r){var C=Nr(Fr(d),Fr(e));Yr(C);var S=Nr(a,C);Yr(S);var L=(M^x>=0?-1:1)*ze(S[2]);(n>L||n===L&&(C[0]||C[1]))&&(o+=M^x>=0?1:-1)}if(!g++)break;p=v,f=b,m=_,d=e}}return(i<-Ce||i<Ce&&Pr<-Ce)^1&o}(c,m);s.length?(b||(o.polygonStart(),b=!0),$r(s,an,t,n,o)):t&&(b||(o.polygonStart(),b=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),b&&(o.polygonEnd(),b=!1),s=m=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function d(e,r){var n=i(e,r);t(e=n[0],r=n[1])&&o.point(e,r)}function p(e,t){var r=i(e,t);l.point(r[0],r[1])}function h(){u.point=p,l.lineStart()}function f(){u.point=d,l.lineEnd()}var m,g,v=nn(),y=r(v),b=!1;function _(e,t){g.push([e,t]);var r=i(e,t);y.point(r[0],r[1])}function x(){y.lineStart(),g=[]}function w(){_(g[0][0],g[0][1]),y.lineEnd();var e,t=y.clean(),r=v.buffer(),n=r.length;if(g.pop(),m.push(g),g=null,n)if(1&t){var a,i=-1;if((n=(e=r[0]).length-1)>0){for(b||(o.polygonStart(),b=!0),o.lineStart();++i<n;)o.point((a=e[i])[0],a[1]);o.lineEnd()}}else n>1&&2&t&&r.push(r.pop().concat(r.shift())),s.push(r.filter(rn))}return u}}function rn(e){return e.length>1}function nn(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,r){e.push([t,r])},lineEnd:F,buffer:function(){var r=t;return t=[],e=null,r},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function an(e,t){return((e=e.x)[0]<0?e[1]-De-Ce:De-e[1])-((t=t.x)[0]<0?t[1]-De-Ce:De-t[1])}var on=tn(Jr,(function(e){var t,r=NaN,n=NaN,a=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(i,o){var s=i>0?Le:-Le,l=y(i-r);y(l-Le)<Ce?(e.point(r,n=(n+o)/2>0?De:-De),e.point(a,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(i,n),t=0):a!==s&&l>=Le&&(y(r-a)<Ce&&(r-=a*Ce),y(i-s)<Ce&&(i-=s*Ce),n=function(e,t,r,n){var a,i,o=Math.sin(e-r);return y(o)>Ce?Math.atan((Math.sin(t)*(i=Math.cos(n))*Math.sin(r)-Math.sin(n)*(a=Math.cos(t))*Math.sin(e))/(a*i*o)):(t+n)/2}(r,n,i,o),e.point(a,n),e.lineEnd(),e.lineStart(),e.point(s,n),t=0),e.point(r=i,n=o),a=s},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}}),(function(e,t,r,n){var a;if(null==e)a=r*De,n.point(-Le,a),n.point(0,a),n.point(Le,a),n.point(Le,0),n.point(Le,-a),n.point(0,-a),n.point(-Le,-a),n.point(-Le,0),n.point(-Le,a);else if(y(e[0]-t[0])>Ce){var i=e[0]<t[0]?Le:-Le;a=r*i/2,n.point(-i,a),n.point(0,a),n.point(i,a)}else n.point(t[0],t[1])}),[-Le,-Le/2]);function sn(e){var t=Math.cos(e),r=t>0,n=y(t)>Ce;return tn(a,(function(e){var t,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(d,p){var h,f=[d,p],m=a(d,p),g=r?m?0:o(d,p):m?o(d+(d<0?Le:-Le),p):0;if(!t&&(c=l=m)&&e.lineStart(),m!==l&&(h=i(t,f),(Vr(t,h)||Vr(f,h))&&(f[0]+=Ce,f[1]+=Ce,m=a(f[0],f[1]))),m!==l)u=0,m?(e.lineStart(),h=i(f,t),e.point(h[0],h[1])):(h=i(t,f),e.point(h[0],h[1]),e.lineEnd()),t=h;else if(n&&t&&r^m){var v;g&s||!(v=i(f,t,!0))||(u=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!m||t&&Vr(t,f)||e.point(f[0],f[1]),t=f,l=m,s=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),Un(e,6*Ie),r?[0,-e]:[-Le,e-Le]);function a(e,r){return Math.cos(e)*Math.cos(r)>t}function i(e,r,n){var a=[1,0,0],i=Nr(Fr(e),Fr(r)),o=zr(i,i),s=i[0],l=o-s*s;if(!l)return!n&&e;var c=t*o/l,u=-t*s/l,d=Nr(a,i),p=Br(a,c);jr(p,Br(i,u));var h=d,f=zr(p,h),m=zr(h,h),g=f*f-m*(zr(p,p)-1);if(!(g<0)){var v=Math.sqrt(g),b=Br(h,(-f-v)/m);if(jr(b,p),b=Hr(b),!n)return b;var _,x=e[0],w=r[0],k=e[1],M=r[1];w<x&&(_=x,x=w,w=_);var T=w-x,C=y(T-Le)<Ce;if(!C&&M<k&&(_=k,k=M,M=_),C||T<Ce?C?k+M>0^b[1]<(y(b[0]-x)<Ce?k:M):k<=b[1]&&b[1]<=M:T>Le^(x<=b[0]&&b[0]<=w)){var S=Br(h,(-f+v)/m);return jr(S,p),[b,Hr(S)]}}}function o(t,n){var a=r?e:Le-e,i=0;return t<-a?i|=1:t>a&&(i|=2),n<-a?i|=4:n>a&&(i|=8),i}}function ln(e,t,r,n){return function(a){var i,o=a.a,s=a.b,l=o.x,c=o.y,u=0,d=1,p=s.x-l,h=s.y-c;if(i=e-l,p||!(i>0)){if(i/=p,p<0){if(i<u)return;i<d&&(d=i)}else if(p>0){if(i>d)return;i>u&&(u=i)}if(i=r-l,p||!(i<0)){if(i/=p,p<0){if(i>d)return;i>u&&(u=i)}else if(p>0){if(i<u)return;i<d&&(d=i)}if(i=t-c,h||!(i>0)){if(i/=h,h<0){if(i<u)return;i<d&&(d=i)}else if(h>0){if(i>d)return;i>u&&(u=i)}if(i=n-c,h||!(i<0)){if(i/=h,h<0){if(i>d)return;i>u&&(u=i)}else if(h>0){if(i<u)return;i<d&&(d=i)}return u>0&&(a.a={x:l+u*p,y:c+u*h}),d<1&&(a.b={x:l+d*p,y:c+d*h}),a}}}}}}var cn=1e9;function un(t,r,n,a){return function(l){var c,u,d,p,h,f,m,g,v,y,b,_=l,x=nn(),w=ln(t,r,n,a),k={point:C,lineStart:function(){k.point=S,u&&u.push(d=[]),y=!0,v=!1,m=g=NaN},lineEnd:function(){c&&(S(p,h),f&&v&&x.rejoin(),c.push(x.buffer())),k.point=C,v&&l.lineEnd()},polygonStart:function(){l=x,c=[],u=[],b=!0},polygonEnd:function(){l=_,c=e.merge(c);var r=function(e){for(var t=0,r=u.length,n=e[1],a=0;a<r;++a)for(var i,o=1,s=u[a],l=s.length,c=s[0];o<l;++o)i=s[o],c[1]<=n?i[1]>n&&Re(c,i,e)>0&&++t:i[1]<=n&&Re(c,i,e)<0&&--t,c=i;return 0!==t}([t,a]),n=b&&r,i=c.length;(n||i)&&(l.polygonStart(),n&&(l.lineStart(),M(null,null,1,l),l.lineEnd()),i&&$r(c,o,r,M,l),l.polygonEnd()),c=u=d=null}};function M(e,o,l,c){var u=0,d=0;if(null==e||(u=i(e,l))!==(d=i(o,l))||s(e,o)<0^l>0)do{c.point(0===u||3===u?t:n,u>1?a:r)}while((u=(u+l+4)%4)!==d);else c.point(o[0],o[1])}function T(e,i){return t<=e&&e<=n&&r<=i&&i<=a}function C(e,t){T(e,t)&&l.point(e,t)}function S(e,t){var r=T(e=Math.max(-cn,Math.min(cn,e)),t=Math.max(-cn,Math.min(cn,t)));if(u&&d.push([e,t]),y)p=e,h=t,f=r,y=!1,r&&(l.lineStart(),l.point(e,t));else if(r&&v)l.point(e,t);else{var n={a:{x:m,y:g},b:{x:e,y:t}};w(n)?(v||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),b=!1):r&&(l.lineStart(),l.point(e,t),b=!1)}m=e,g=t,v=r}return k};function i(e,a){return y(e[0]-t)<Ce?a>0?0:3:y(e[0]-n)<Ce?a>0?2:1:y(e[1]-r)<Ce?a>0?1:0:a>0?3:2}function o(e,t){return s(e.x,t.x)}function s(e,t){var r=i(e,1),n=i(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}}function dn(e){var t=0,r=Le/3,n=Fn(e),a=n(t,r);return a.parallels=function(e){return arguments.length?n(t=e[0]*Le/180,r=e[1]*Le/180):[t/Le*180,r/Le*180]},a}function pn(e,t){var r=Math.sin(e),n=(r+Math.sin(t))/2,a=1+r*(2*n-r),i=Math.sqrt(a)/n;function o(e,t){var r=Math.sqrt(a-2*n*Math.sin(t))/n;return[r*Math.sin(e*=n),i-r*Math.cos(e)]}return o.invert=function(e,t){var r=i-t;return[Math.atan2(e,r)/n,ze((a-(e*e+r*r)*n*n)/(2*n))]},o}e.geo.clipExtent=function(){var e,t,r,n,a,i,o={stream:function(e){return a&&(a.valid=!1),(a=i(e)).valid=!0,a},extent:function(s){return arguments.length?(i=un(e=+s[0][0],t=+s[0][1],r=+s[1][0],n=+s[1][1]),a&&(a.valid=!1,a=null),o):[[e,t],[r,n]]}};return o.extent([[0,0],[960,500]])},(e.geo.conicEqualArea=function(){return dn(pn)}).raw=pn,e.geo.albers=function(){return e.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},e.geo.albersUsa=function(){var t,r,n,a,i=e.geo.albers(),o=e.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=e.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,r){t=[e,r]}};function c(e){var i=e[0],o=e[1];return t=null,r(i,o),t||(n(i,o),t)||a(i,o),t}return c.invert=function(e){var t=i.scale(),r=i.translate(),n=(e[0]-r[0])/t,a=(e[1]-r[1])/t;return(a>=.12&&a<.234&&n>=-.425&&n<-.214?o:a>=.166&&a<.234&&n>=-.214&&n<-.115?s:i).invert(e)},c.stream=function(e){var t=i.stream(e),r=o.stream(e),n=s.stream(e);return{point:function(e,a){t.point(e,a),r.point(e,a),n.point(e,a)},sphere:function(){t.sphere(),r.sphere(),n.sphere()},lineStart:function(){t.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){t.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){t.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){t.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(e){return arguments.length?(i.precision(e),o.precision(e),s.precision(e),c):i.precision()},c.scale=function(e){return arguments.length?(i.scale(e),o.scale(.35*e),s.scale(e),c.translate(i.translate())):i.scale()},c.translate=function(e){if(!arguments.length)return i.translate();var t=i.scale(),u=+e[0],d=+e[1];return r=i.translate(e).clipExtent([[u-.455*t,d-.238*t],[u+.455*t,d+.238*t]]).stream(l).point,n=o.translate([u-.307*t,d+.201*t]).clipExtent([[u-.425*t+Ce,d+.12*t+Ce],[u-.214*t-Ce,d+.234*t-Ce]]).stream(l).point,a=s.translate([u-.205*t,d+.212*t]).clipExtent([[u-.214*t+Ce,d+.166*t+Ce],[u-.115*t-Ce,d+.234*t-Ce]]).stream(l).point,c},c.scale(1070)};var hn,fn,mn,gn,vn,yn,bn={point:F,lineStart:F,lineEnd:F,polygonStart:function(){fn=0,bn.lineStart=_n},polygonEnd:function(){bn.lineStart=bn.lineEnd=bn.point=F,hn+=y(fn/2)}};function _n(){var e,t,r,n;function a(e,t){fn+=n*e-r*t,r=e,n=t}bn.point=function(i,o){bn.point=a,e=r=i,t=n=o},bn.lineEnd=function(){a(e,t)}}var xn={point:function(e,t){e<mn&&(mn=e),e>vn&&(vn=e),t<gn&&(gn=t),t>yn&&(yn=t)},lineStart:F,lineEnd:F,polygonStart:F,polygonEnd:F};function wn(){var e=kn(4.5),t=[],r={point:n,lineStart:function(){r.point=a},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=kn(t),r},result:function(){if(t.length){var e=t.join("");return t=[],e}}};function n(r,n){t.push("M",r,",",n,e)}function a(e,n){t.push("M",e,",",n),r.point=i}function i(e,r){t.push("L",e,",",r)}function o(){r.point=n}function s(){t.push("Z")}return r}function kn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var Mn,Tn={point:Cn,lineStart:Sn,lineEnd:Ln,polygonStart:function(){Tn.lineStart=An},polygonEnd:function(){Tn.point=Cn,Tn.lineStart=Sn,Tn.lineEnd=Ln}};function Cn(e,t){Mr+=e,Tr+=t,++Cr}function Sn(){var e,t;function r(r,n){var a=r-e,i=n-t,o=Math.sqrt(a*a+i*i);Sr+=o*(e+r)/2,Lr+=o*(t+n)/2,Ar+=o,Cn(e=r,t=n)}Tn.point=function(n,a){Tn.point=r,Cn(e=n,t=a)}}function Ln(){Tn.point=Cn}function An(){var e,t,r,n;function a(e,t){var a=e-r,i=t-n,o=Math.sqrt(a*a+i*i);Sr+=o*(r+e)/2,Lr+=o*(n+t)/2,Ar+=o,Er+=(o=n*e-r*t)*(r+e),Dr+=o*(n+t),Ir+=3*o,Cn(r=e,n=t)}Tn.point=function(i,o){Tn.point=a,Cn(e=r=i,t=n=o)},Tn.lineEnd=function(){a(e,t)}}function En(e){var t=4.5,r={point:n,lineStart:function(){r.point=a},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=e,r},result:F};function n(r,n){e.moveTo(r+t,n),e.arc(r,n,t,0,Ae)}function a(t,n){e.moveTo(t,n),r.point=i}function i(t,r){e.lineTo(t,r)}function o(){r.point=n}function s(){e.closePath()}return r}function Dn(e){var t=.5,r=Math.cos(30*Ie),n=16;function a(e){return(n?o:i)(e)}function i(t){return On(t,(function(r,n){r=e(r,n),t.point(r[0],r[1])}))}function o(t){var r,a,i,o,l,c,u,d,p,h,f,m,g={point:v,lineStart:y,lineEnd:_,polygonStart:function(){t.polygonStart(),g.lineStart=x},polygonEnd:function(){t.polygonEnd(),g.lineStart=y}};function v(r,n){r=e(r,n),t.point(r[0],r[1])}function y(){d=NaN,g.point=b,t.lineStart()}function b(r,a){var i=Fr([r,a]),o=e(r,a);s(d,p,u,h,f,m,d=o[0],p=o[1],u=r,h=i[0],f=i[1],m=i[2],n,t),t.point(d,p)}function _(){g.point=v,t.lineEnd()}function x(){y(),g.point=w,g.lineEnd=k}function w(e,t){b(r=e,t),a=d,i=p,o=h,l=f,c=m,g.point=b}function k(){s(d,p,u,h,f,m,a,i,r,o,l,c,n,t),g.lineEnd=_,_()}return g}function s(n,a,i,o,l,c,u,d,p,h,f,m,g,v){var b=u-n,_=d-a,x=b*b+_*_;if(x>4*t&&g--){var w=o+h,k=l+f,M=c+m,T=Math.sqrt(w*w+k*k+M*M),C=Math.asin(M/=T),S=y(y(M)-1)<Ce||y(i-p)<Ce?(i+p)/2:Math.atan2(k,w),L=e(S,C),A=L[0],E=L[1],D=A-n,I=E-a,P=_*D-b*I;(P*P/x>t||y((b*D+_*I)/x-.5)>.3||o*h+l*f+c*m<r)&&(s(n,a,i,o,l,c,A,E,S,w/=T,k/=T,M,g,v),v.point(A,E),s(A,E,S,w,k,M,u,d,p,h,f,m,g,v))}}return a.precision=function(e){return arguments.length?(n=(t=e*e)>0&&16,a):Math.sqrt(t)},a}function In(e){var t=Dn((function(t,r){return e([t*Pe,r*Pe])}));return function(e){return zn(t(e))}}function Pn(e){this.stream=e}function On(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function Rn(e){return Fn((function(){return e}))()}function Fn(t){var r,n,a,i,o,s,l=Dn((function(e,t){return[(e=r(e,t))[0]*c+i,o-e[1]*c]})),c=150,u=480,d=250,p=0,h=0,f=0,m=0,g=0,v=on,y=I,b=null,_=null;function x(e){return[(e=a(e[0]*Ie,e[1]*Ie))[0]*c+i,o-e[1]*c]}function w(e){return(e=a.invert((e[0]-i)/c,(o-e[1])/c))&&[e[0]*Pe,e[1]*Pe]}function k(){a=Zr(n=Bn(f,m,g),r);var e=r(p,h);return i=u-e[0]*c,o=d+e[1]*c,M()}function M(){return s&&(s.valid=!1,s=null),x}return x.stream=function(e){return s&&(s.valid=!1),(s=zn(v(n,l(y(e))))).valid=!0,s},x.clipAngle=function(e){return arguments.length?(v=null==e?(b=e,on):sn((b=+e)*Ie),M()):b},x.clipExtent=function(e){return arguments.length?(_=e,y=e?un(e[0][0],e[0][1],e[1][0],e[1][1]):I,M()):_},x.scale=function(e){return arguments.length?(c=+e,k()):c},x.translate=function(e){return arguments.length?(u=+e[0],d=+e[1],k()):[u,d]},x.center=function(e){return arguments.length?(p=e[0]%360*Ie,h=e[1]%360*Ie,k()):[p*Pe,h*Pe]},x.rotate=function(e){return arguments.length?(f=e[0]%360*Ie,m=e[1]%360*Ie,g=e.length>2?e[2]%360*Ie:0,k()):[f*Pe,m*Pe,g*Pe]},e.rebind(x,l,"precision"),function(){return r=t.apply(this,arguments),x.invert=r.invert&&w,k()}}function zn(e){return On(e,(function(t,r){e.point(t*Ie,r*Ie)}))}function Nn(e,t){return[e,t]}function jn(e,t){return[e>Le?e-Ae:e<-Le?e+Ae:e,t]}function Bn(e,t,r){return e?t||r?Zr(Hn(e),Vn(t,r)):Hn(e):t||r?Vn(t,r):jn}function Yn(e){return function(t,r){return[(t+=e)>Le?t-Ae:t<-Le?t+Ae:t,r]}}function Hn(e){var t=Yn(e);return t.invert=Yn(-e),t}function Vn(e,t){var r=Math.cos(e),n=Math.sin(e),a=Math.cos(t),i=Math.sin(t);function o(e,t){var o=Math.cos(t),s=Math.cos(e)*o,l=Math.sin(e)*o,c=Math.sin(t),u=c*r+s*n;return[Math.atan2(l*a-u*i,s*r-c*n),ze(u*a+l*i)]}return o.invert=function(e,t){var o=Math.cos(t),s=Math.cos(e)*o,l=Math.sin(e)*o,c=Math.sin(t),u=c*a-l*i;return[Math.atan2(l*a+c*i,s*r+u*n),ze(u*r-s*n)]},o}function Un(e,t){var r=Math.cos(e),n=Math.sin(e);return function(a,i,o,s){var l=o*t;null!=a?(a=Wn(r,a),i=Wn(r,i),(o>0?a<i:a>i)&&(a+=o*Ae)):(a=e+o*Ae,i=e-.5*l);for(var c,u=a;o>0?u>i:u<i;u-=l)s.point((c=Hr([r,-n*Math.cos(u),-n*Math.sin(u)]))[0],c[1])}}function Wn(e,t){var r=Fr(t);r[0]-=e,Yr(r);var n=Fe(-r[1]);return((-r[2]<0?-n:n)+2*Math.PI-Ce)%(2*Math.PI)}function Gn(t,r,n){var a=e.range(t,r-Ce,n).concat(r);return function(e){return a.map((function(t){return[e,t]}))}}function qn(t,r,n){var a=e.range(t,r-Ce,n).concat(r);return function(e){return a.map((function(t){return[t,e]}))}}function Kn(e){return e.source}function Xn(e){return e.target}e.geo.path=function(){var t,r,n,a,i,o=4.5;function s(t){return t&&("function"==typeof o&&a.pointRadius(+o.apply(this,arguments)),i&&i.valid||(i=n(a)),e.geo.stream(t,i)),a.result()}function l(){return i=null,s}return s.area=function(t){return hn=0,e.geo.stream(t,n(bn)),hn},s.centroid=function(t){return Mr=Tr=Cr=Sr=Lr=Ar=Er=Dr=Ir=0,e.geo.stream(t,n(Tn)),Ir?[Er/Ir,Dr/Ir]:Ar?[Sr/Ar,Lr/Ar]:Cr?[Mr/Cr,Tr/Cr]:[NaN,NaN]},s.bounds=function(t){return vn=yn=-(mn=gn=1/0),e.geo.stream(t,n(xn)),[[mn,gn],[vn,yn]]},s.projection=function(e){return arguments.length?(n=(t=e)?e.stream||In(e):I,l()):t},s.context=function(e){return arguments.length?(a=null==(r=e)?new wn:new En(e),"function"!=typeof o&&a.pointRadius(o),l()):r},s.pointRadius=function(e){return arguments.length?(o="function"==typeof e?e:(a.pointRadius(+e),+e),s):o},s.projection(e.geo.albersUsa()).context(null)},e.geo.transform=function(e){return{stream:function(t){var r=new Pn(t);for(var n in e)r[n]=e[n];return r}}},Pn.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},e.geo.projection=Rn,e.geo.projectionMutator=Fn,(e.geo.equirectangular=function(){return Rn(Nn)}).raw=Nn.invert=Nn,e.geo.rotation=function(e){function t(t){return(t=e(t[0]*Ie,t[1]*Ie))[0]*=Pe,t[1]*=Pe,t}return e=Bn(e[0]%360*Ie,e[1]*Ie,e.length>2?e[2]*Ie:0),t.invert=function(t){return(t=e.invert(t[0]*Ie,t[1]*Ie))[0]*=Pe,t[1]*=Pe,t},t},jn.invert=Nn,e.geo.circle=function(){var e,t,r=[0,0],n=6;function a(){var e="function"==typeof r?r.apply(this,arguments):r,n=Bn(-e[0]*Ie,-e[1]*Ie,0).invert,a=[];return t(null,null,1,{point:function(e,t){a.push(e=n(e,t)),e[0]*=Pe,e[1]*=Pe}}),{type:"Polygon",coordinates:[a]}}return a.origin=function(e){return arguments.length?(r=e,a):r},a.angle=function(r){return arguments.length?(t=Un((e=+r)*Ie,n*Ie),a):e},a.precision=function(r){return arguments.length?(t=Un(e*Ie,(n=+r)*Ie),a):n},a.angle(90)},e.geo.distance=function(e,t){var r,n=(t[0]-e[0])*Ie,a=e[1]*Ie,i=t[1]*Ie,o=Math.sin(n),s=Math.cos(n),l=Math.sin(a),c=Math.cos(a),u=Math.sin(i),d=Math.cos(i);return Math.atan2(Math.sqrt((r=d*o)*r+(r=c*u-l*d*s)*r),l*u+c*d*s)},e.geo.graticule=function(){var t,r,n,a,i,o,s,l,c,u,d,p,h=10,f=h,m=90,g=360,v=2.5;function b(){return{type:"MultiLineString",coordinates:_()}}function _(){return e.range(Math.ceil(a/m)*m,n,m).map(d).concat(e.range(Math.ceil(l/g)*g,s,g).map(p)).concat(e.range(Math.ceil(r/h)*h,t,h).filter((function(e){return y(e%m)>Ce})).map(c)).concat(e.range(Math.ceil(o/f)*f,i,f).filter((function(e){return y(e%g)>Ce})).map(u))}return b.lines=function(){return _().map((function(e){return{type:"LineString",coordinates:e}}))},b.outline=function(){return{type:"Polygon",coordinates:[d(a).concat(p(s).slice(1),d(n).reverse().slice(1),p(l).reverse().slice(1))]}},b.extent=function(e){return arguments.length?b.majorExtent(e).minorExtent(e):b.minorExtent()},b.majorExtent=function(e){return arguments.length?(a=+e[0][0],n=+e[1][0],l=+e[0][1],s=+e[1][1],a>n&&(e=a,a=n,n=e),l>s&&(e=l,l=s,s=e),b.precision(v)):[[a,l],[n,s]]},b.minorExtent=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],r>t&&(e=r,r=t,t=e),o>i&&(e=o,o=i,i=e),b.precision(v)):[[r,o],[t,i]]},b.step=function(e){return arguments.length?b.majorStep(e).minorStep(e):b.minorStep()},b.majorStep=function(e){return arguments.length?(m=+e[0],g=+e[1],b):[m,g]},b.minorStep=function(e){return arguments.length?(h=+e[0],f=+e[1],b):[h,f]},b.precision=function(e){return arguments.length?(v=+e,c=Gn(o,i,90),u=qn(r,t,v),d=Gn(l,s,90),p=qn(a,n,v),b):v},b.majorExtent([[-180,-90+Ce],[180,90-Ce]]).minorExtent([[-180,-80-Ce],[180,80+Ce]])},e.geo.greatArc=function(){var t,r,n=Kn,a=Xn;function i(){return{type:"LineString",coordinates:[t||n.apply(this,arguments),r||a.apply(this,arguments)]}}return i.distance=function(){return e.geo.distance(t||n.apply(this,arguments),r||a.apply(this,arguments))},i.source=function(e){return arguments.length?(n=e,t="function"==typeof e?null:e,i):n},i.target=function(e){return arguments.length?(a=e,r="function"==typeof e?null:e,i):a},i.precision=function(){return arguments.length?i:0},i},e.geo.interpolate=function(e,t){return r=e[0]*Ie,n=e[1]*Ie,a=t[0]*Ie,i=t[1]*Ie,o=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=o*Math.cos(r),d=o*Math.sin(r),p=l*Math.cos(a),h=l*Math.sin(a),f=2*Math.asin(Math.sqrt(je(i-n)+o*l*je(a-r))),m=1/Math.sin(f),(g=f?function(e){var t=Math.sin(e*=f)*m,r=Math.sin(f-e)*m,n=r*u+t*p,a=r*d+t*h,i=r*s+t*c;return[Math.atan2(a,n)*Pe,Math.atan2(i,Math.sqrt(n*n+a*a))*Pe]}:function(){return[r*Pe,n*Pe]}).distance=f,g;var r,n,a,i,o,s,l,c,u,d,p,h,f,m,g},e.geo.length=function(t){return Mn=0,e.geo.stream(t,Zn),Mn};var Zn={sphere:F,point:F,lineStart:function(){var e,t,r;function n(n,a){var i=Math.sin(a*=Ie),o=Math.cos(a),s=y((n*=Ie)-e),l=Math.cos(s);Mn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*i-t*o*l)*s),t*i+r*o*l),e=n,t=i,r=o}Zn.point=function(a,i){e=a*Ie,t=Math.sin(i*=Ie),r=Math.cos(i),Zn.point=n},Zn.lineEnd=function(){Zn.point=Zn.lineEnd=F}},lineEnd:F,polygonStart:F,polygonEnd:F};function Jn(e,t){function r(t,r){var n=Math.cos(t),a=Math.cos(r),i=e(n*a);return[i*a*Math.sin(t),i*Math.sin(r)]}return r.invert=function(e,r){var n=Math.sqrt(e*e+r*r),a=t(n),i=Math.sin(a),o=Math.cos(a);return[Math.atan2(e*i,n*o),Math.asin(n&&r*i/n)]},r}var $n=Jn((function(e){return Math.sqrt(2/(1+e))}),(function(e){return 2*Math.asin(e/2)}));(e.geo.azimuthalEqualArea=function(){return Rn($n)}).raw=$n;var Qn=Jn((function(e){var t=Math.acos(e);return t&&t/Math.sin(t)}),I);function ea(e,t){var r=Math.cos(e),n=function(e){return Math.tan(Le/4+e/2)},a=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(n(t)/n(e)),i=r*Math.pow(n(e),a)/a;if(!a)return na;function o(e,t){i>0?t<-De+Ce&&(t=-De+Ce):t>De-Ce&&(t=De-Ce);var r=i/Math.pow(n(t),a);return[r*Math.sin(a*e),i-r*Math.cos(a*e)]}return o.invert=function(e,t){var r=i-t,n=Oe(a)*Math.sqrt(e*e+r*r);return[Math.atan2(e,r)/a,2*Math.atan(Math.pow(i/n,1/a))-De]},o}function ta(e,t){var r=Math.cos(e),n=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),a=r/n+e;if(y(n)<Ce)return Nn;function i(e,t){var r=a-t;return[r*Math.sin(n*e),a-r*Math.cos(n*e)]}return i.invert=function(e,t){var r=a-t;return[Math.atan2(e,r)/n,a-Oe(n)*Math.sqrt(e*e+r*r)]},i}(e.geo.azimuthalEquidistant=function(){return Rn(Qn)}).raw=Qn,(e.geo.conicConformal=function(){return dn(ea)}).raw=ea,(e.geo.conicEquidistant=function(){return dn(ta)}).raw=ta;var ra=Jn((function(e){return 1/e}),Math.atan);function na(e,t){return[e,Math.log(Math.tan(Le/4+t/2))]}function aa(e){var t,r=Rn(e),n=r.scale,a=r.translate,i=r.clipExtent;return r.scale=function(){var e=n.apply(r,arguments);return e===r?t?r.clipExtent(null):r:e},r.translate=function(){var e=a.apply(r,arguments);return e===r?t?r.clipExtent(null):r:e},r.clipExtent=function(e){var o=i.apply(r,arguments);if(o===r){if(t=null==e){var s=Le*n(),l=a();i([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(o=null);return o},r.clipExtent(null)}(e.geo.gnomonic=function(){return Rn(ra)}).raw=ra,na.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-De]},(e.geo.mercator=function(){return aa(na)}).raw=na;var ia=Jn((function(){return 1}),Math.asin);(e.geo.orthographic=function(){return Rn(ia)}).raw=ia;var oa=Jn((function(e){return 1/(1+e)}),(function(e){return 2*Math.atan(e)}));function sa(e,t){return[Math.log(Math.tan(Le/4+t/2)),-e]}function la(e){return e[0]}function ca(e){return e[1]}function ua(e){for(var t=e.length,r=[0,1],n=2,a=2;a<t;a++){for(;n>1&&Re(e[r[n-2]],e[r[n-1]],e[a])<=0;)--n;r[n++]=a}return r.slice(0,n)}function da(e,t){return e[0]-t[0]||e[1]-t[1]}(e.geo.stereographic=function(){return Rn(oa)}).raw=oa,sa.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-De]},(e.geo.transverseMercator=function(){var e=aa(sa),t=e.center,r=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return e?r([e[0],e[1],e.length>2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90])}).raw=sa,e.geom={},e.geom.hull=function(e){var t=la,r=ca;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,a=bt(t),i=bt(r),o=e.length,s=[],l=[];for(n=0;n<o;n++)s.push([+a.call(this,e[n],n),+i.call(this,e[n],n),n]);for(s.sort(da),n=0;n<o;n++)l.push([s[n][0],-s[n][1]]);var c=ua(s),u=ua(l),d=u[0]===c[0],p=u[u.length-1]===c[c.length-1],h=[];for(n=c.length-1;n>=0;--n)h.push(e[s[c[n]][2]]);for(n=+d;n<u.length-p;++n)h.push(e[s[u[n]][2]]);return h}return n.x=function(e){return arguments.length?(t=e,n):t},n.y=function(e){return arguments.length?(r=e,n):r},n},e.geom.polygon=function(e){return V(e,pa),e};var pa=e.geom.polygon.prototype=[];function ha(e,t,r){return(r[0]-t[0])*(e[1]-t[1])<(r[1]-t[1])*(e[0]-t[0])}function fa(e,t,r,n){var a=e[0],i=r[0],o=t[0]-a,s=n[0]-i,l=e[1],c=r[1],u=t[1]-l,d=n[1]-c,p=(s*(l-c)-d*(a-i))/(d*o-s*u);return[a+p*o,l+p*u]}function ma(e){var t=e[0],r=e[e.length-1];return!(t[0]-r[0]||t[1]-r[1])}pa.area=function(){for(var e,t=-1,r=this.length,n=this[r-1],a=0;++t<r;)e=n,n=this[t],a+=e[1]*n[0]-e[0]*n[1];return.5*a},pa.centroid=function(e){var t,r,n=-1,a=this.length,i=0,o=0,s=this[a-1];for(arguments.length||(e=-1/(6*this.area()));++n<a;)t=s,s=this[n],r=t[0]*s[1]-s[0]*t[1],i+=(t[0]+s[0])*r,o+=(t[1]+s[1])*r;return[i*e,o*e]},pa.clip=function(e){for(var t,r,n,a,i,o,s=ma(e),l=-1,c=this.length-ma(this),u=this[c-1];++l<c;){for(t=e.slice(),e.length=0,a=this[l],i=t[(n=t.length-s)-1],r=-1;++r<n;)ha(o=t[r],u,a)?(ha(i,u,a)||e.push(fa(i,o,u,a)),e.push(o)):ha(i,u,a)&&e.push(fa(i,o,u,a)),i=o;s&&e.push(e[0]),u=a}return e};var ga,va,ya,ba,_a,xa=[],wa=[];function ka(){Ya(this),this.edge=this.site=this.circle=null}function Ma(e){var t=xa.pop()||new ka;return t.site=e,t}function Ta(e){Oa(e),ya.remove(e),xa.push(e),Ya(e)}function Ca(e){var t=e.circle,r=t.x,n=t.cy,a={x:r,y:n},i=e.P,o=e.N,s=[e];Ta(e);for(var l=i;l.circle&&y(r-l.circle.x)<Ce&&y(n-l.circle.cy)<Ce;)i=l.P,s.unshift(l),Ta(l),l=i;s.unshift(l),Oa(l);for(var c=o;c.circle&&y(r-c.circle.x)<Ce&&y(n-c.circle.cy)<Ce;)o=c.N,s.push(c),Ta(c),c=o;s.push(c),Oa(c);var u,d=s.length;for(u=1;u<d;++u)c=s[u],l=s[u-1],Na(c.edge,l.site,c.site,a);l=s[0],(c=s[d-1]).edge=za(l.site,c.site,null,a),Pa(l),Pa(c)}function Sa(e){for(var t,r,n,a,i=e.x,o=e.y,s=ya._;s;)if((n=La(s,o)-i)>Ce)s=s.L;else{if(!((a=i-Aa(s,o))>Ce)){n>-Ce?(t=s.P,r=s):a>-Ce?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}var l=Ma(e);if(ya.insert(t,l),t||r){if(t===r)return Oa(t),r=Ma(t.site),ya.insert(l,r),l.edge=r.edge=za(t.site,l.site),Pa(t),void Pa(r);if(r){Oa(t),Oa(r);var c=t.site,u=c.x,d=c.y,p=e.x-u,h=e.y-d,f=r.site,m=f.x-u,g=f.y-d,v=2*(p*g-h*m),y=p*p+h*h,b=m*m+g*g,_={x:(g*y-h*b)/v+u,y:(p*b-m*y)/v+d};Na(r.edge,c,f,_),l.edge=za(c,e,null,_),r.edge=za(e,f,null,_),Pa(t),Pa(r)}else l.edge=za(t.site,l.site)}}function La(e,t){var r=e.site,n=r.x,a=r.y,i=a-t;if(!i)return n;var o=e.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-t;if(!c)return s;var u=s-n,d=1/i-1/c,p=u/c;return d?(-p+Math.sqrt(p*p-2*d*(u*u/(-2*c)-l+c/2+a-i/2)))/d+n:(n+s)/2}function Aa(e,t){var r=e.N;if(r)return La(r,t);var n=e.site;return n.y===t?n.x:1/0}function Ea(e){this.site=e,this.edges=[]}function Da(e,t){return t.angle-e.angle}function Ia(){Ya(this),this.x=this.y=this.arc=this.site=this.cy=null}function Pa(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,a=e.site,i=r.site;if(n!==i){var o=a.x,s=a.y,l=n.x-o,c=n.y-s,u=i.x-o,d=2*(l*(g=i.y-s)-c*u);if(!(d>=-Se)){var p=l*l+c*c,h=u*u+g*g,f=(g*p-c*h)/d,m=(l*h-u*p)/d,g=m+s,v=wa.pop()||new Ia;v.arc=e,v.site=a,v.x=f+o,v.y=g+Math.sqrt(f*f+m*m),v.cy=g,e.circle=v;for(var y=null,b=_a._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}_a.insert(y,v),y||(ba=v)}}}}function Oa(e){var t=e.circle;t&&(t.P||(ba=t.N),_a.remove(t),wa.push(t),Ya(t),e.circle=null)}function Ra(e,t){var r=e.b;if(r)return!0;var n,a,i=e.a,o=t[0][0],s=t[1][0],l=t[0][1],c=t[1][1],u=e.l,d=e.r,p=u.x,h=u.y,f=d.x,m=d.y,g=(p+f)/2,v=(h+m)/2;if(m===h){if(g<o||g>=s)return;if(p>f){if(i){if(i.y>=c)return}else i={x:g,y:l};r={x:g,y:c}}else{if(i){if(i.y<l)return}else i={x:g,y:c};r={x:g,y:l}}}else if(a=v-(n=(p-f)/(m-h))*g,n<-1||n>1)if(p>f){if(i){if(i.y>=c)return}else i={x:(l-a)/n,y:l};r={x:(c-a)/n,y:c}}else{if(i){if(i.y<l)return}else i={x:(c-a)/n,y:c};r={x:(l-a)/n,y:l}}else if(h<m){if(i){if(i.x>=s)return}else i={x:o,y:n*o+a};r={x:s,y:n*s+a}}else{if(i){if(i.x<o)return}else i={x:s,y:n*s+a};r={x:o,y:n*o+a}}return e.a=i,e.b=r,!0}function Fa(e,t){this.l=e,this.r=t,this.a=this.b=null}function za(e,t,r,n){var a=new Fa(e,t);return ga.push(a),r&&Na(a,e,t,r),n&&Na(a,t,e,n),va[e.i].edges.push(new ja(a,e,t)),va[t.i].edges.push(new ja(a,t,e)),a}function Na(e,t,r,n){e.a||e.b?e.l===r?e.b=n:e.a=n:(e.a=n,e.l=t,e.r=r)}function ja(e,t,r){var n=e.a,a=e.b;this.edge=e,this.site=t,this.angle=r?Math.atan2(r.y-t.y,r.x-t.x):e.l===t?Math.atan2(a.x-n.x,n.y-a.y):Math.atan2(n.x-a.x,a.y-n.y)}function Ba(){this._=null}function Ya(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Ha(e,t){var r=t,n=t.R,a=r.U;a?a.L===r?a.L=n:a.R=n:e._=n,n.U=a,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function Va(e,t){var r=t,n=t.L,a=r.U;a?a.L===r?a.L=n:a.R=n:e._=n,n.U=a,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function Ua(e){for(;e.L;)e=e.L;return e}function Wa(e,t){var r,n,a,i=e.sort(Ga).pop();for(ga=[],va=new Array(e.length),ya=new Ba,_a=new Ba;;)if(a=ba,i&&(!a||i.y<a.y||i.y===a.y&&i.x<a.x))i.x===r&&i.y===n||(va[i.i]=new Ea(i),Sa(i),r=i.x,n=i.y),i=e.pop();else{if(!a)break;Ca(a.arc)}t&&(function(e){for(var t,r=ga,n=ln(e[0][0],e[0][1],e[1][0],e[1][1]),a=r.length;a--;)(!Ra(t=r[a],e)||!n(t)||y(t.a.x-t.b.x)<Ce&&y(t.a.y-t.b.y)<Ce)&&(t.a=t.b=null,r.splice(a,1))}(t),function(e){for(var t,r,n,a,i,o,s,l,c,u,d=e[0][0],p=e[1][0],h=e[0][1],f=e[1][1],m=va,g=m.length;g--;)if((i=m[g])&&i.prepare())for(l=(s=i.edges).length,o=0;o<l;)n=(u=s[o].end()).x,a=u.y,t=(c=s[++o%l].start()).x,r=c.y,(y(n-t)>Ce||y(a-r)>Ce)&&(s.splice(o,0,new ja((v=i.site,b=u,_=y(n-d)<Ce&&f-a>Ce?{x:d,y:y(t-d)<Ce?r:f}:y(a-f)<Ce&&p-n>Ce?{x:y(r-f)<Ce?t:p,y:f}:y(n-p)<Ce&&a-h>Ce?{x:p,y:y(t-p)<Ce?r:h}:y(a-h)<Ce&&n-d>Ce?{x:y(r-h)<Ce?t:d,y:h}:null,x=void 0,(x=new Fa(v,null)).a=b,x.b=_,ga.push(x),x),i.site,null)),++l);var v,b,_,x}(t));var o={cells:va,edges:ga};return ya=_a=ga=va=null,o}function Ga(e,t){return t.y-e.y||t.x-e.x}Ea.prototype.prepare=function(){for(var e,t=this.edges,r=t.length;r--;)(e=t[r].edge).b&&e.a||t.splice(r,1);return t.sort(Da),t.length},ja.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Ba.prototype={insert:function(e,t){var r,n,a;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=Ua(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)r===(n=r.U).L?(a=n.R)&&a.C?(r.C=a.C=!1,n.C=!0,e=n):(e===r.R&&(Ha(this,r),r=(e=r).U),r.C=!1,n.C=!0,Va(this,n)):(a=n.L)&&a.C?(r.C=a.C=!1,n.C=!0,e=n):(e===r.L&&(Va(this,r),r=(e=r).U),r.C=!1,n.C=!0,Ha(this,n)),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,r,n,a=e.U,i=e.L,o=e.R;if(r=i?o?Ua(o):i:o,a?a.L===e?a.L=r:a.R=r:this._=r,i&&o?(n=r.C,r.C=e.C,r.L=i,i.U=r,r!==o?(a=r.U,r.U=e.U,e=r.R,a.L=e,r.R=o,o.U=r):(r.U=a,a=r,e=r.R)):(n=e.C,e=r),e&&(e.U=a),!n)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===a.L){if((t=a.R).C&&(t.C=!1,a.C=!0,Ha(this,a),t=a.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Va(this,t),t=a.R),t.C=a.C,a.C=t.R.C=!1,Ha(this,a),e=this._;break}}else if((t=a.L).C&&(t.C=!1,a.C=!0,Va(this,a),t=a.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Ha(this,t),t=a.L),t.C=a.C,a.C=t.L.C=!1,Va(this,a),e=this._;break}t.C=!0,e=a,a=a.U}while(!e.C);e&&(e.C=!1)}}},e.geom.voronoi=function(e){var t=la,r=ca,n=t,a=r,i=qa;if(e)return o(e);function o(e){var t=new Array(e.length),r=i[0][0],n=i[0][1],a=i[1][0],o=i[1][1];return Wa(s(e),i).cells.forEach((function(i,s){var l=i.edges,c=i.site;(t[s]=l.length?l.map((function(e){var t=e.start();return[t.x,t.y]})):c.x>=r&&c.x<=a&&c.y>=n&&c.y<=o?[[r,o],[a,o],[a,n],[r,n]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/Ce)*Ce,y:Math.round(a(e,t)/Ce)*Ce,i:t}}))}return o.links=function(e){return Wa(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return Wa(s(e)).cells.forEach((function(r,n){for(var a,i,o,s,l=r.site,c=r.edges.sort(Da),u=-1,d=c.length,p=c[d-1].edge,h=p.l===l?p.r:p.l;++u<d;)a=h,h=(p=c[u].edge).l===l?p.r:p.l,n<a.i&&n<h.i&&(o=a,s=h,((i=l).x-s.x)*(o.y-i.y)-(i.x-o.x)*(s.y-i.y)<0)&&t.push([e[n],e[a.i],e[h.i]])})),t},o.x=function(e){return arguments.length?(n=bt(t=e),o):t},o.y=function(e){return arguments.length?(a=bt(r=e),o):r},o.clipExtent=function(e){return arguments.length?(i=null==e?qa:e,o):i===qa?null:i},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):i===qa?null:i&&i[1]},o};var qa=[[-1e6,-1e6],[1e6,1e6]];function Ka(e){return e.x}function Xa(e){return e.y}function Za(e,t,r,n,a,i){if(!e(t,r,n,a,i)){var o=.5*(r+a),s=.5*(n+i),l=t.nodes;l[0]&&Za(e,l[0],r,n,o,s),l[1]&&Za(e,l[1],o,n,a,s),l[2]&&Za(e,l[2],r,s,o,i),l[3]&&Za(e,l[3],o,s,a,i)}}function Ja(e,t,r,n,a,i,o){var s,l=1/0;return function e(c,u,d,p,h){if(!(u>i||d>o||p<n||h<a)){if(f=c.point){var f,m=t-c.x,g=r-c.y,v=m*m+g*g;if(v<l){var y=Math.sqrt(l=v);n=t-y,a=r-y,i=t+y,o=r+y,s=f}}for(var b=c.nodes,_=.5*(u+p),x=.5*(d+h),w=(r>=x)<<1|t>=_,k=w+4;w<k;++w)if(c=b[3&w])switch(3&w){case 0:e(c,u,d,_,x);break;case 1:e(c,_,d,p,x);break;case 2:e(c,u,x,_,h);break;case 3:e(c,_,x,p,h)}}}(e,n,a,i,o),s}function $a(t,r){t=e.rgb(t),r=e.rgb(r);var n=t.r,a=t.g,i=t.b,o=r.r-n,s=r.g-a,l=r.b-i;return function(e){return"#"+pt(Math.round(n+o*e))+pt(Math.round(a+s*e))+pt(Math.round(i+l*e))}}function Qa(e,t){var r,n={},a={};for(r in e)r in t?n[r]=ai(e[r],t[r]):a[r]=e[r];for(r in t)r in e||(a[r]=t[r]);return function(e){for(r in n)a[r]=n[r](e);return a}}function ei(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ti(e,t){var r,n,a,i=ri.lastIndex=ni.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(r=ri.exec(e))&&(n=ni.exec(t));)(a=n.index)>i&&(a=t.slice(i,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:ei(r,n)})),i=ni.lastIndex;return i<t.length&&(a=t.slice(i),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}e.geom.delaunay=function(t){return e.geom.voronoi().triangles(t)},e.geom.quadtree=function(e,t,r,n,a){var i,o=la,s=ca;if(i=arguments.length)return o=Ka,s=Xa,3===i&&(a=r,n=t,r=t=0),l(e);function l(e){var l,c,u,d,p,h,f,m,g,v=bt(o),b=bt(s);if(null!=t)h=t,f=r,m=n,g=a;else if(m=g=-(h=f=1/0),c=[],u=[],p=e.length,i)for(d=0;d<p;++d)(l=e[d]).x<h&&(h=l.x),l.y<f&&(f=l.y),l.x>m&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(d=0;d<p;++d){var _=+v(l=e[d],d),x=+b(l,d);_<h&&(h=_),x<f&&(f=x),_>m&&(m=_),x>g&&(g=x),c.push(_),u.push(x)}var w=m-h,k=g-f;function M(e,t,r,n,a,i,o,s){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(y(l-r)+y(c-n)<.01)T(e,t,r,n,a,i,o,s);else{var u=e.point;e.x=e.y=e.point=null,T(e,u,l,c,a,i,o,s),T(e,t,r,n,a,i,o,s)}else e.x=r,e.y=n,e.point=t}else T(e,t,r,n,a,i,o,s)}function T(e,t,r,n,a,i,o,s){var l=.5*(a+o),c=.5*(i+s),u=r>=l,d=n>=c,p=d<<1|u;e.leaf=!1,u?a=l:o=l,d?i=c:s=c,M(e=e.nodes[p]||(e.nodes[p]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,a,i,o,s)}w>k?g=f+w:m=h+k;var C={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){M(C,e,+v(e,++d),+b(e,d),h,f,m,g)},visit:function(e){Za(e,C,h,f,m,g)},find:function(e){return Ja(C,e[0],e[1],h,f,m,g)}};if(d=-1,null==t){for(;++d<p;)M(C,e[d],c[d],u[d],h,f,m,g);--d}else e.forEach(C.add);return c=u=e=l=null,C}return l.x=function(e){return arguments.length?(o=e,l):o},l.y=function(e){return arguments.length?(s=e,l):s},l.extent=function(e){return arguments.length?(null==e?t=r=n=a=null:(t=+e[0][0],r=+e[0][1],n=+e[1][0],a=+e[1][1]),l):null==t?null:[[t,r],[n,a]]},l.size=function(e){return arguments.length?(null==e?t=r=n=a=null:(t=r=0,n=+e[0],a=+e[1]),l):null==t?null:[n-t,a-r]},l},e.interpolateRgb=$a,e.interpolateObject=Qa,e.interpolateNumber=ei,e.interpolateString=ti;var ri=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ni=new RegExp(ri.source,"g");function ai(t,r){for(var n,a=e.interpolators.length;--a>=0&&!(n=e.interpolators[a](t,r)););return n}function ii(e,t){var r,n=[],a=[],i=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r<s;++r)n.push(ai(e[r],t[r]));for(;r<i;++r)a[r]=e[r];for(;r<o;++r)a[r]=t[r];return function(e){for(r=0;r<s;++r)a[r]=n[r](e);return a}}e.interpolate=ai,e.interpolators=[function(e,t){var r=typeof t;return("string"===r?yt.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?$a:ti:t instanceof Ue?$a:Array.isArray(t)?ii:"object"===r&&isNaN(t)?Qa:ei)(e,t)}],e.interpolateArray=ii;var oi=function(){return I},si=e.map({linear:oi,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return pi},cubic:function(){return hi},sin:function(){return mi},exp:function(){return gi},circle:function(){return vi},elastic:function(e,t){var r;return arguments.length<2&&(t=.45),arguments.length?r=t/Ae*Math.asin(1/e):(e=1,r=t/4),function(n){return 1+e*Math.pow(2,-10*n)*Math.sin((n-r)*Ae/t)}},back:function(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}},bounce:function(){return yi}}),li=e.map({in:I,out:ui,"in-out":di,"out-in":function(e){return di(ui(e))}});function ci(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function ui(e){return function(t){return 1-e(1-t)}}function di(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function pi(e){return e*e}function hi(e){return e*e*e}function fi(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function mi(e){return 1-Math.cos(e*De)}function gi(e){return Math.pow(2,10*(e-1))}function vi(e){return 1-Math.sqrt(1-e*e)}function yi(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function bi(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function _i(e){var t,r,n,a=[e.a,e.b],i=[e.c,e.d],o=wi(a),s=xi(a,i),l=wi(((t=i)[0]+=(n=-s)*(r=a)[0],t[1]+=n*r[1],t))||0;a[0]*i[1]<i[0]*a[1]&&(a[0]*=-1,a[1]*=-1,o*=-1,s*=-1),this.rotate=(o?Math.atan2(a[1],a[0]):Math.atan2(-i[0],i[1]))*Pe,this.translate=[e.e,e.f],this.scale=[o,l],this.skew=l?Math.atan2(s,l)*Pe:0}function xi(e,t){return e[0]*t[0]+e[1]*t[1]}function wi(e){var t=Math.sqrt(xi(e,e));return t&&(e[0]/=t,e[1]/=t),t}e.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,a=t>=0?e.slice(t+1):"in";return n=si.get(n)||oi,ci((a=li.get(a)||I)(n.apply(null,r.call(arguments,1))))},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var n=t.h,a=t.c,i=t.l,o=r.h-n,s=r.c-a,l=r.l-i;return isNaN(s)&&(s=0,a=isNaN(a)?r.c:a),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return Ze(n+o*e,a+s*e,i+l*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var n=t.h,a=t.s,i=t.l,o=r.h-n,s=r.s-a,l=r.l-i;return isNaN(s)&&(s=0,a=isNaN(a)?r.s:a),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return qe(n+o*e,a+s*e,i+l*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var n=t.l,a=t.a,i=t.b,o=r.l-n,s=r.a-a,l=r.b-i;return function(e){return nt(n+o*e,a+s*e,i+l*e)+""}},e.interpolateRound=bi,e.transform=function(t){var r=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new _i(t?t.matrix:ki)})(t)},_i.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ki={a:1,b:0,c:0,d:1,e:0,f:0};function Mi(e){return e.length?e.pop()+",":""}function Ti(t,r){var n=[],a=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push("translate(",null,",",null,")");n.push({i:a-4,x:ei(e[0],t[0])},{i:a-2,x:ei(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,n,a),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Mi(r)+"rotate(",null,")")-2,x:ei(e,t)})):t&&r.push(Mi(r)+"rotate("+t+")")}(t.rotate,r.rotate,n,a),function(e,t,r,n){e!==t?n.push({i:r.push(Mi(r)+"skewX(",null,")")-2,x:ei(e,t)}):t&&r.push(Mi(r)+"skewX("+t+")")}(t.skew,r.skew,n,a),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var a=r.push(Mi(r)+"scale(",null,",",null,")");n.push({i:a-4,x:ei(e[0],t[0])},{i:a-2,x:ei(e[1],t[1])})}else 1===t[0]&&1===t[1]||r.push(Mi(r)+"scale("+t+")")}(t.scale,r.scale,n,a),t=r=null,function(e){for(var t,r=-1,i=a.length;++r<i;)n[(t=a[r]).i]=t.x(e);return n.join("")}}function Ci(e,t){return t=(t-=e=+e)||1/t,function(r){return(r-e)/t}}function Si(e,t){return t=(t-=e=+e)||1/t,function(r){return Math.max(0,Math.min(1,(r-e)/t))}}function Li(e){for(var t=e.source,r=e.target,n=function(e,t){if(e===t)return e;for(var r=Ai(e),n=Ai(t),a=r.pop(),i=n.pop(),o=null;a===i;)o=a,a=r.pop(),i=n.pop();return o}(t,r),a=[t];t!==n;)t=t.parent,a.push(t);for(var i=a.length;r!==n;)a.splice(i,0,r),r=r.parent;return a}function Ai(e){for(var t=[],r=e.parent;null!=r;)t.push(e),e=r,r=r.parent;return t.push(e),t}function Ei(e){e.fixed|=2}function Di(e){e.fixed&=-7}function Ii(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Pi(e){e.fixed&=-5}e.interpolateTransform=Ti,e.layout={},e.layout.bundle=function(){return function(e){for(var t=[],r=-1,n=e.length;++r<n;)t.push(Li(e[r]));return t}},e.layout.chord=function(){var t,r,n,a,i,o,s,l={},c=0;function u(){var l,u,p,h,f,m={},g=[],v=e.range(a),y=[];for(t=[],r=[],l=0,h=-1;++h<a;){for(u=0,f=-1;++f<a;)u+=n[h][f];g.push(u),y.push(e.range(a)),l+=u}for(i&&v.sort((function(e,t){return i(g[e],g[t])})),o&&y.forEach((function(e,t){e.sort((function(e,r){return o(n[t][e],n[t][r])}))})),l=(Ae-c*a)/l,u=0,h=-1;++h<a;){for(p=u,f=-1;++f<a;){var b=v[h],_=y[b][f],x=n[b][_],w=u,k=u+=x*l;m[b+"-"+_]={index:b,subindex:_,startAngle:w,endAngle:k,value:x}}r[b]={index:b,startAngle:p,endAngle:u,value:g[b]},u+=c}for(h=-1;++h<a;)for(f=h-1;++f<a;){var M=m[h+"-"+f],T=m[f+"-"+h];(M.value||T.value)&&t.push(M.value<T.value?{source:T,target:M}:{source:M,target:T})}s&&d()}function d(){t.sort((function(e,t){return s((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}return l.matrix=function(e){return arguments.length?(a=(n=e)&&n.length,t=r=null,l):n},l.padding=function(e){return arguments.length?(c=e,t=r=null,l):c},l.sortGroups=function(e){return arguments.length?(i=e,t=r=null,l):i},l.sortSubgroups=function(e){return arguments.length?(o=e,t=null,l):o},l.sortChords=function(e){return arguments.length?(s=e,t&&d(),l):s},l.chords=function(){return t||u(),t},l.groups=function(){return r||u(),r},l},e.layout.force=function(){var t,r,n,a,i,o,s={},l=e.dispatch("start","tick","end"),c=[1,1],u=.9,d=Oi,p=Ri,h=-30,f=Fi,m=.1,g=.64,v=[],y=[];function b(e){return function(t,r,n,a){if(t.point!==e){var i=t.cx-e.x,o=t.cy-e.y,s=a-r,l=i*i+o*o;if(s*s/g<l){if(l<f){var c=t.charge/l;e.px-=i*c,e.py-=o*c}return!0}t.point&&l&&l<f&&(c=t.pointCharge/l,e.px-=i*c,e.py-=o*c)}return!t.charge}}function _(t){t.px=e.event.x,t.py=e.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return t=null,l.end({type:"end",alpha:n=0}),!0;var r,s,d,p,f,g,_,x,w,k=v.length,M=y.length;for(s=0;s<M;++s)p=(d=y[s]).source,(g=(x=(f=d.target).x-p.x)*x+(w=f.y-p.y)*w)&&(x*=g=n*i[s]*((g=Math.sqrt(g))-a[s])/g,w*=g,f.x-=x*(_=p.weight+f.weight?p.weight/(p.weight+f.weight):.5),f.y-=w*_,p.x+=x*(_=1-_),p.y+=w*_);if((_=n*m)&&(x=c[0]/2,w=c[1]/2,s=-1,_))for(;++s<k;)(d=v[s]).x+=(x-d.x)*_,d.y+=(w-d.y)*_;if(h)for(function e(t,r,n){var a=0,i=0;if(t.charge=0,!t.leaf)for(var o,s=t.nodes,l=s.length,c=-1;++c<l;)null!=(o=s[c])&&(e(o,r,n),t.charge+=o.charge,a+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=r*n[t.point.index];t.charge+=t.pointCharge=u,a+=u*t.point.x,i+=u*t.point.y}t.cx=a/t.charge,t.cy=i/t.charge}(r=e.geom.quadtree(v),n,o),s=-1;++s<k;)(d=v[s]).fixed||r.visit(b(d));for(s=-1;++s<k;)(d=v[s]).fixed?(d.x=d.px,d.y=d.py):(d.x-=(d.px-(d.px=d.x))*u,d.y-=(d.py-(d.py=d.y))*u);l.tick({type:"tick",alpha:n})},s.nodes=function(e){return arguments.length?(v=e,s):v},s.links=function(e){return arguments.length?(y=e,s):y},s.size=function(e){return arguments.length?(c=e,s):c},s.linkDistance=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(p="function"==typeof e?e:+e,s):p},s.friction=function(e){return arguments.length?(u=+e,s):u},s.charge=function(e){return arguments.length?(h="function"==typeof e?e:+e,s):h},s.chargeDistance=function(e){return arguments.length?(f=e*e,s):Math.sqrt(f)},s.gravity=function(e){return arguments.length?(m=+e,s):m},s.theta=function(e){return arguments.length?(g=e*e,s):Math.sqrt(g)},s.alpha=function(e){return arguments.length?(e=+e,n?e>0?n=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:n=0})):e>0&&(l.start({type:"start",alpha:n=e}),t=St(s.tick)),s):n},s.start=function(){var e,t,r,n=v.length,l=y.length,u=c[0],f=c[1];for(e=0;e<n;++e)(r=v[e]).index=e,r.weight=0;for(e=0;e<l;++e)"number"==typeof(r=y[e]).source&&(r.source=v[r.source]),"number"==typeof r.target&&(r.target=v[r.target]),++r.source.weight,++r.target.weight;for(e=0;e<n;++e)r=v[e],isNaN(r.x)&&(r.x=m("x",u)),isNaN(r.y)&&(r.y=m("y",f)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(a=[],"function"==typeof d)for(e=0;e<l;++e)a[e]=+d.call(this,y[e],e);else for(e=0;e<l;++e)a[e]=d;if(i=[],"function"==typeof p)for(e=0;e<l;++e)i[e]=+p.call(this,y[e],e);else for(e=0;e<l;++e)i[e]=p;if(o=[],"function"==typeof h)for(e=0;e<n;++e)o[e]=+h.call(this,v[e],e);else for(e=0;e<n;++e)o[e]=h;function m(r,a){if(!t){for(t=new Array(n),c=0;c<n;++c)t[c]=[];for(c=0;c<l;++c){var i=y[c];t[i.source.index].push(i.target),t[i.target.index].push(i.source)}}for(var o,s=t[e],c=-1,u=s.length;++c<u;)if(!isNaN(o=s[c][r]))return o;return Math.random()*a}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(r||(r=e.behavior.drag().origin(I).on("dragstart.force",Ei).on("drag.force",_).on("dragend.force",Di)),!arguments.length)return r;this.on("mouseover.force",Ii).on("mouseout.force",Pi).call(r)},e.rebind(s,l,"on")};var Oi=20,Ri=1,Fi=1/0;function zi(t,r){return e.rebind(t,r,"sort","children","value"),t.nodes=t,t.links=Vi,t}function Ni(e,t){for(var r=[e];null!=(e=r.pop());)if(t(e),(a=e.children)&&(n=a.length))for(var n,a;--n>=0;)r.push(a[n])}function ji(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(i=e.children)&&(a=i.length))for(var a,i,o=-1;++o<a;)r.push(i[o]);for(;null!=(e=n.pop());)t(e)}function Bi(e){return e.children}function Yi(e){return e.value}function Hi(e,t){return t.value-e.value}function Vi(t){return e.merge(t.map((function(e){return(e.children||[]).map((function(t){return{source:e,target:t}}))})))}e.layout.hierarchy=function(){var e=Hi,t=Bi,r=Yi;function n(a){var i,o=[a],s=[];for(a.depth=0;null!=(i=o.pop());)if(s.push(i),(c=t.call(n,i,i.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)o.push(u=c[l]),u.parent=i,u.depth=i.depth+1;r&&(i.value=0),i.children=c}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return ji(a,(function(t){var n,a;e&&(n=t.children)&&n.sort(e),r&&(a=t.parent)&&(a.value+=t.value)})),s}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(Ni(e,(function(e){e.children&&(e.value=0)})),ji(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function n(e,n){var a=t.call(this,e,n);return function e(t,r,n,a){var i=t.children;if(t.x=r,t.y=t.depth*a,t.dx=n,t.dy=a,i&&(o=i.length)){var o,s,l,c=-1;for(n=t.value?n/t.value:0;++c<o;)e(s=i[c],r,l=s.value*n,a),r+=l}}(a[0],0,r[0],r[1]/function e(t){var r=t.children,n=0;if(r&&(a=r.length))for(var a,i=-1;++i<a;)n=Math.max(n,e(r[i]));return 1+n}(a[0])),a}return n.size=function(e){return arguments.length?(r=e,n):r},zi(n,t)},e.layout.pie=function(){var t=Number,r=Ui,n=0,a=Ae,i=0;function o(s){var l,c=s.length,u=s.map((function(e,r){return+t.call(o,e,r)})),d=+("function"==typeof n?n.apply(this,arguments):n),p=("function"==typeof a?a.apply(this,arguments):a)-d,h=Math.min(Math.abs(p)/c,+("function"==typeof i?i.apply(this,arguments):i)),f=h*(p<0?-1:1),m=e.sum(u),g=m?(p-c*f)/m:0,v=e.range(c),y=[];return null!=r&&v.sort(r===Ui?function(e,t){return u[t]-u[e]}:function(e,t){return r(s[e],s[t])}),v.forEach((function(e){y[e]={data:s[e],value:l=u[e],startAngle:d,endAngle:d+=l*g+f,padAngle:h}})),y}return o.value=function(e){return arguments.length?(t=e,o):t},o.sort=function(e){return arguments.length?(r=e,o):r},o.startAngle=function(e){return arguments.length?(n=e,o):n},o.endAngle=function(e){return arguments.length?(a=e,o):a},o.padAngle=function(e){return arguments.length?(i=e,o):i},o};var Ui={};function Wi(e){return e.x}function Gi(e){return e.y}function qi(e,t,r){e.y0=t,e.y=r}e.layout.stack=function(){var t=I,r=Zi,n=Ji,a=qi,i=Wi,o=Gi;function s(l,c){if(!(h=l.length))return l;var u=l.map((function(e,r){return t.call(s,e,r)})),d=u.map((function(e){return e.map((function(e,t){return[i.call(s,e,t),o.call(s,e,t)]}))})),p=r.call(s,d,c);u=e.permute(u,p),d=e.permute(d,p);var h,f,m,g,v=n.call(s,d,c),y=u[0].length;for(m=0;m<y;++m)for(a.call(s,u[0][m],g=v[m],d[0][m][1]),f=1;f<h;++f)a.call(s,u[f][m],g+=d[f-1][m][1],d[f][m][1]);return l}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(e){return arguments.length?(r="function"==typeof e?e:Ki.get(e)||Zi,s):r},s.offset=function(e){return arguments.length?(n="function"==typeof e?e:Xi.get(e)||Ji,s):n},s.x=function(e){return arguments.length?(i=e,s):i},s.y=function(e){return arguments.length?(o=e,s):o},s.out=function(e){return arguments.length?(a=e,s):a},s};var Ki=e.map({"inside-out":function(t){var r,n,a=t.length,i=t.map($i),o=t.map(Qi),s=e.range(a).sort((function(e,t){return i[e]-i[t]})),l=0,c=0,u=[],d=[];for(r=0;r<a;++r)n=s[r],l<c?(l+=o[n],u.push(n)):(c+=o[n],d.push(n));return d.reverse().concat(u)},reverse:function(t){return e.range(t.length).reverse()},default:Zi}),Xi=e.map({silhouette:function(e){var t,r,n,a=e.length,i=e[0].length,o=[],s=0,l=[];for(r=0;r<i;++r){for(t=0,n=0;t<a;t++)n+=e[t][r][1];n>s&&(s=n),o.push(n)}for(r=0;r<i;++r)l[r]=(s-o[r])/2;return l},wiggle:function(e){var t,r,n,a,i,o,s,l,c,u=e.length,d=e[0],p=d.length,h=[];for(h[0]=l=c=0,r=1;r<p;++r){for(t=0,a=0;t<u;++t)a+=e[t][r][1];for(t=0,i=0,s=d[r][0]-d[r-1][0];t<u;++t){for(n=0,o=(e[t][r][1]-e[t][r-1][1])/(2*s);n<t;++n)o+=(e[n][r][1]-e[n][r-1][1])/s;i+=o*e[t][r][1]}h[r]=l-=a?i/a*s:0,l<c&&(c=l)}for(r=0;r<p;++r)h[r]-=c;return h},expand:function(e){var t,r,n,a=e.length,i=e[0].length,o=1/a,s=[];for(r=0;r<i;++r){for(t=0,n=0;t<a;t++)n+=e[t][r][1];if(n)for(t=0;t<a;t++)e[t][r][1]/=n;else for(t=0;t<a;t++)e[t][r][1]=o}for(r=0;r<i;++r)s[r]=0;return s},zero:Ji});function Zi(t){return e.range(t.length)}function Ji(e){for(var t=-1,r=e[0].length,n=[];++t<r;)n[t]=0;return n}function $i(e){for(var t,r=1,n=0,a=e[0][1],i=e.length;r<i;++r)(t=e[r][1])>a&&(n=r,a=t);return n}function Qi(e){return e.reduce(eo,0)}function eo(e,t){return e+t[1]}function to(e,t){return ro(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ro(e,t){for(var r=-1,n=+e[0],a=(e[1]-n)/t,i=[];++r<=t;)i[r]=a*r+n;return i}function no(t){return[e.min(t),e.max(t)]}function ao(e,t){return e.value-t.value}function io(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function oo(e,t){e._pack_next=t,t._pack_prev=e}function so(e,t){var r=t.x-e.x,n=t.y-e.y,a=e.r+t.r;return.999*a*a>r*r+n*n}function lo(e){if((t=e.children)&&(l=t.length)){var t,r,n,a,i,o,s,l,c=1/0,u=-1/0,d=1/0,p=-1/0;if(t.forEach(co),(r=t[0]).x=-r.r,r.y=0,b(r),l>1&&((n=t[1]).x=n.r,n.y=0,b(n),l>2))for(po(r,n,a=t[2]),b(a),io(r,a),r._pack_prev=a,io(a,n),n=r._pack_next,i=3;i<l;i++){po(r,n,a=t[i]);var h=0,f=1,m=1;for(o=n._pack_next;o!==n;o=o._pack_next,f++)if(so(o,a)){h=1;break}if(1==h)for(s=r._pack_prev;s!==o._pack_prev&&!so(s,a);s=s._pack_prev,m++);h?(f<m||f==m&&n.r<r.r?oo(r,n=o):oo(r=s,n),i--):(io(r,a),n=a,b(a))}var g=(c+u)/2,v=(d+p)/2,y=0;for(i=0;i<l;i++)(a=t[i]).x-=g,a.y-=v,y=Math.max(y,a.r+Math.sqrt(a.x*a.x+a.y*a.y));e.r=y,t.forEach(uo)}function b(e){c=Math.min(e.x-e.r,c),u=Math.max(e.x+e.r,u),d=Math.min(e.y-e.r,d),p=Math.max(e.y+e.r,p)}}function co(e){e._pack_next=e._pack_prev=e}function uo(e){delete e._pack_next,delete e._pack_prev}function po(e,t,r){var n=e.r+r.r,a=t.x-e.x,i=t.y-e.y;if(n&&(a||i)){var o=t.r+r.r,s=a*a+i*i,l=.5+((n*=n)-(o*=o))/(2*s),c=Math.sqrt(Math.max(0,2*o*(n+s)-(n-=s)*n-o*o))/(2*s);r.x=e.x+l*a+c*i,r.y=e.y+l*i-c*a}else r.x=e.x+n,r.y=e.y}function ho(e,t){return e.parent==t.parent?1:2}function fo(e){var t=e.children;return t.length?t[0]:e.t}function mo(e){var t,r=e.children;return(t=r.length)?r[t-1]:e.t}function go(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function vo(e,t,r){return e.a.parent===t.parent?e.a:r}function yo(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function bo(e,t){var r=e.x+t[3],n=e.y+t[0],a=e.dx-t[1]-t[3],i=e.dy-t[0]-t[2];return a<0&&(r+=a/2,a=0),i<0&&(n+=i/2,i=0),{x:r,y:n,dx:a,dy:i}}function _o(e){var t=e[0],r=e[e.length-1];return t<r?[t,r]:[r,t]}function xo(e){return e.rangeExtent?e.rangeExtent():_o(e.range())}function wo(e,t,r,n){var a=r(e[0],e[1]),i=n(t[0],t[1]);return function(e){return i(a(e))}}function ko(e,t){var r,n=0,a=e.length-1,i=e[n],o=e[a];return o<i&&(r=n,n=a,a=r,r=i,i=o,o=r),e[n]=t.floor(i),e[a]=t.ceil(o),e}function Mo(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:To}e.layout.histogram=function(){var t=!0,r=Number,n=no,a=to;function i(i,o){for(var s,l,c=[],u=i.map(r,this),d=n.call(this,u,o),p=a.call(this,d,u,o),h=(o=-1,u.length),f=p.length-1,m=t?1:1/h;++o<f;)(s=c[o]=[]).dx=p[o+1]-(s.x=p[o]),s.y=0;if(f>0)for(o=-1;++o<h;)(l=u[o])>=d[0]&&l<=d[1]&&((s=c[e.bisect(p,l,1,f)-1]).y+=m,s.push(i[o]));return c}return i.value=function(e){return arguments.length?(r=e,i):r},i.range=function(e){return arguments.length?(n=bt(e),i):n},i.bins=function(e){return arguments.length?(a="number"==typeof e?function(t){return ro(t,e)}:bt(e),i):a},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(ao),n=0,a=[1,1];function i(e,i){var o=r.call(this,e,i),s=o[0],l=a[0],c=a[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,ji(s,(function(e){e.r=+u(e.value)})),ji(s,lo),n){var d=n*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;ji(s,(function(e){e.r+=d})),ji(s,lo),ji(s,(function(e){e.r-=d}))}return function e(t,r,n,a){var i=t.children;if(t.x=r+=a*t.x,t.y=n+=a*t.y,t.r*=a,i)for(var o=-1,s=i.length;++o<s;)e(i[o],r,n,a)}(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return i.size=function(e){return arguments.length?(a=e,i):a},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(e){return arguments.length?(n=+e,i):n},zi(i,r)},e.layout.tree=function(){var t=e.layout.hierarchy().sort(null).value(null),r=ho,n=[1,1],a=null;function i(e,i){var c=t.call(this,e,i),u=c[0],d=function(e){for(var t,r={A:null,children:[e]},n=[r];null!=(t=n.pop());)for(var a,i=t.children,o=0,s=i.length;o<s;++o)n.push((i[o]=a={_:i[o],parent:t,children:(a=i[o].children)&&a.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=a);return r.children[0]}(u);if(ji(d,o),d.parent.m=-d.z,Ni(d,s),a)Ni(u,l);else{var p=u,h=u,f=u;Ni(u,(function(e){e.x<p.x&&(p=e),e.x>h.x&&(h=e),e.depth>f.depth&&(f=e)}));var m=r(p,h)/2-p.x,g=n[0]/(h.x+r(h,p)/2+m),v=n[1]/(f.depth||1);Ni(u,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return c}function o(e){var t=e.children,n=e.parent.children,a=e.i?n[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,n=0,a=e.children,i=a.length;--i>=0;)(t=a[i]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var i=(t[0].z+t[t.length-1].z)/2;a?(e.z=a.z+r(e._,a._),e.m=e.z-i):e.z=i}else a&&(e.z=a.z+r(e._,a._));e.parent.A=function(e,t,n){if(t){for(var a,i=e,o=e,s=t,l=i.parent.children[0],c=i.m,u=o.m,d=s.m,p=l.m;s=mo(s),i=fo(i),s&&i;)l=fo(l),(o=mo(o)).a=e,(a=s.z+d-i.z-c+r(s._,i._))>0&&(go(vo(s,e,n),e,a),c+=a,u+=a),d+=s.m,c+=i.m,p+=l.m,u+=o.m;s&&!mo(o)&&(o.t=s,o.m+=d-u),i&&!fo(l)&&(l.t=i,l.m+=c-p,n=e)}return n}(e,a,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e)?l:null,i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null==(n=e)?null:l,i):a?n:null},zi(i,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=ho,n=[1,1],a=!1;function i(i,o){var s,l=t.call(this,i,o),c=l[0],u=0;ji(c,(function(t){var n=t.children;n&&n.length?(t.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),t.y=function(t){return 1+e.max(t,(function(e){return e.y}))}(n)):(t.x=s?u+=r(t,s):0,t.y=0,s=t)}));var d=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(c),p=function e(t){var r,n=t.children;return n&&(r=n.length)?e(n[r-1]):t}(c),h=d.x-r(d,p)/2,f=p.x+r(p,d)/2;return ji(c,a?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-h)/(f-h)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),l}return i.separation=function(e){return arguments.length?(r=e,i):r},i.size=function(e){return arguments.length?(a=null==(n=e),i):a?null:n},i.nodeSize=function(e){return arguments.length?(a=null!=(n=e),i):a?n:null},zi(i,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,a=[1,1],i=null,o=yo,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,a=-1,i=e.length;++a<i;)n=(r=e[a]).value*(t<0?0:t),r.area=isNaN(n)||n<=0?0:n}function d(e){var t=e.children;if(t&&t.length){var r,n,a,i=o(e),s=[],c=t.slice(),p=1/0,m="slice"===l?i.dx:"dice"===l?i.dy:"slice-dice"===l?1&e.depth?i.dy:i.dx:Math.min(i.dx,i.dy);for(u(c,i.dx*i.dy/e.value),s.area=0;(a=c.length)>0;)s.push(r=c[a-1]),s.area+=r.area,"squarify"!==l||(n=h(s,m))<=p?(c.pop(),p=n):(s.area-=s.pop().area,f(s,m,i,!1),m=Math.min(i.dx,i.dy),s.length=s.area=0,p=1/0);s.length&&(f(s,m,i,!0),s.length=s.area=0),t.forEach(d)}}function p(e){var t=e.children;if(t&&t.length){var r,n=o(e),a=t.slice(),i=[];for(u(a,n.dx*n.dy/e.value),i.area=0;r=a.pop();)i.push(r),i.area+=r.area,null!=r.z&&(f(i,r.z?n.dx:n.dy,n,!a.length),i.length=i.area=0);t.forEach(p)}}function h(e,t){for(var r,n=e.area,a=0,i=1/0,o=-1,s=e.length;++o<s;)(r=e[o].area)&&(r<i&&(i=r),r>a&&(a=r));return t*=t,(n*=n)?Math.max(t*a*c/n,n/(t*i*c)):1/0}function f(e,t,r,a){var i,o=-1,s=e.length,l=r.x,c=r.y,u=t?n(e.area/t):0;if(t==r.dx){for((a||u>r.dy)&&(u=r.dy);++o<s;)(i=e[o]).x=l,i.y=c,i.dy=u,l+=i.dx=Math.min(r.x+r.dx-l,u?n(i.area/u):0);i.z=!0,i.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((a||u>r.dx)&&(u=r.dx);++o<s;)(i=e[o]).x=l,i.y=c,i.dx=u,c+=i.dy=Math.min(r.y+r.dy-c,u?n(i.area/u):0);i.z=!1,i.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function m(e){var n=t||r(e),i=n[0];return i.x=i.y=0,i.value?(i.dx=a[0],i.dy=a[1]):i.dx=i.dy=0,t&&r.revalue(i),u([i],i.dx*i.dy/i.value),(t?p:d)(i),s&&(t=n),n}return m.size=function(e){return arguments.length?(a=e,m):a},m.padding=function(e){if(!arguments.length)return i;function t(t){var r=e.call(m,t,t.depth);return null==r?yo(t):bo(t,"number"==typeof r?[r,r,r,r]:r)}function r(t){return bo(t,e)}var n;return o=null==(i=e)?yo:"function"==(n=typeof e)?t:"number"===n?(e=[e,e,e,e],r):r,m},m.round=function(e){return arguments.length?(n=e?Math.round:Number,m):n!=Number},m.sticky=function(e){return arguments.length?(s=e,t=null,m):s},m.ratio=function(e){return arguments.length?(c=e,m):c},m.mode=function(e){return arguments.length?(l=e+"",m):l},zi(m,r)},e.random={normal:function(e,t){var r=arguments.length;return r<2&&(t=1),r<1&&(e=0),function(){var r,n,a;do{a=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n}while(!a||a>1);return e+t*r*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r<e;r++)t+=Math.random();return t}}},e.scale={};var To={floor:I,ceil:I};function Co(t,r,n,a){var i=[],o=[],s=0,l=Math.min(t.length,r.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),r=r.slice().reverse());++s<=l;)i.push(n(t[s-1],t[s])),o.push(a(r[s-1],r[s]));return function(r){var n=e.bisect(t,r,1,l)-1;return o[n](i[n](r))}}function So(t,r){return e.rebind(t,r,"range","rangeRound","interpolate","clamp")}function Lo(e,t){return ko(e,Mo(Ao(e,t)[2])),ko(e,Mo(Ao(e,t)[2])),e}function Ao(e,t){null==t&&(t=10);var r=_o(e),n=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),i=t/n*a;return i<=.15?a*=10:i<=.35?a*=5:i<=.75&&(a*=2),r[0]=Math.ceil(r[0]/a)*a,r[1]=Math.floor(r[1]/a)*a+.5*a,r[2]=a,r}function Eo(t,r){return e.range.apply(e,Ao(t,r))}function Do(t,r,n){var a=Ao(t,r);if(n){var i=Ot.exec(n);if(i.shift(),"s"===i[8]){var o=e.formatPrefix(Math.max(y(a[0]),y(a[1])));return i[7]||(i[7]="."+Po(o.scale(a[2]))),i[8]="f",n=e.format(i.join("")),function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+function(e,t){var r=Po(t[2]);return e in Io?Math.abs(r-Po(Math.max(y(t[0]),y(t[1]))))+ +("e"!==e):r-2*("%"===e)}(i[8],a)),n=i.join("")}else n=",."+Po(a[2])+"f";return e.format(n)}e.scale.linear=function(){return function e(t,r,n,a){var i,o;function s(){var e=Math.min(t.length,r.length)>2?Co:wo,s=a?Si:Ci;return i=e(t,r,s,n),o=e(r,t,s,ai),l}function l(e){return i(e)}return l.invert=function(e){return o(e)},l.domain=function(e){return arguments.length?(t=e.map(Number),s()):t},l.range=function(e){return arguments.length?(r=e,s()):r},l.rangeRound=function(e){return l.range(e).interpolate(bi)},l.clamp=function(e){return arguments.length?(a=e,s()):a},l.interpolate=function(e){return arguments.length?(n=e,s()):n},l.ticks=function(e){return Eo(t,e)},l.tickFormat=function(e,r){return Do(t,e,r)},l.nice=function(e){return Lo(t,e),s()},l.copy=function(){return e(t,r,n,a)},s()}([0,1],[0,1],ai,!1)};var Io={s:1,g:1,p:1,r:1,e:1};function Po(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}e.scale.log=function(){return function t(r,n,a,i){function o(e){return(a?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(n)}function s(e){return a?Math.pow(n,e):-Math.pow(n,-e)}function l(e){return r(o(e))}return l.invert=function(e){return s(r.invert(e))},l.domain=function(e){return arguments.length?(a=e[0]>=0,r.domain((i=e.map(Number)).map(o)),l):i},l.base=function(e){return arguments.length?(n=+e,r.domain(i.map(o)),l):n},l.nice=function(){var e=ko(i.map(o),a?Math:Ro);return r.domain(e),i=e.map(s),l},l.ticks=function(){var e=_o(i),t=[],r=e[0],l=e[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),d=n%1?2:n;if(isFinite(u-c)){if(a){for(;c<u;c++)for(var p=1;p<d;p++)t.push(s(c)*p);t.push(s(c))}else for(t.push(s(c));c++<u;)for(p=d-1;p>0;p--)t.push(s(c)*p);for(c=0;t[c]<r;c++);for(u=t.length;t[u-1]>l;u--);t=t.slice(c,u)}return t},l.tickFormat=function(t,r){if(!arguments.length)return Oo;arguments.length<2?r=Oo:"function"!=typeof r&&(r=e.format(r));var a=Math.max(1,n*t/l.ticks().length);return function(e){var t=e/s(Math.round(o(e)));return t*n<n-.5&&(t*=n),t<=a?r(e):""}},l.copy=function(){return t(r.copy(),n,a,i)},So(l,r)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var Oo=e.format(".0e"),Ro={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Fo(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}e.scale.pow=function(){return function e(t,r,n){var a=Fo(r),i=Fo(1/r);function o(e){return t(a(e))}return o.invert=function(e){return i(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(a)),o):n},o.ticks=function(e){return Eo(n,e)},o.tickFormat=function(e,t){return Do(n,e,t)},o.nice=function(e){return o.domain(Lo(n,e))},o.exponent=function(e){return arguments.length?(a=Fo(r=e),i=Fo(1/r),t.domain(n.map(a)),o):r},o.copy=function(){return e(t.copy(),r,n)},So(o,t)}(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return function t(r,n){var a,i,o;function s(e){return i[((a.get(e)||("range"===n.t?a.set(e,r.push(e)):NaN))-1)%i.length]}function l(t,n){return e.range(r.length).map((function(e){return t+n*e}))}return s.domain=function(e){if(!arguments.length)return r;r=[],a=new x;for(var t,i=-1,o=e.length;++i<o;)a.has(t=e[i])||a.set(t,r.push(t));return s[n.t].apply(s,n.a)},s.range=function(e){return arguments.length?(i=e,o=0,n={t:"range",a:arguments},s):i},s.rangePoints=function(e,t){arguments.length<2&&(t=0);var a=e[0],c=e[1],u=r.length<2?(a=(a+c)/2,0):(c-a)/(r.length-1+t);return i=l(a+u*t/2,u),o=0,n={t:"rangePoints",a:arguments},s},s.rangeRoundPoints=function(e,t){arguments.length<2&&(t=0);var a=e[0],c=e[1],u=r.length<2?(a=c=Math.round((a+c)/2),0):(c-a)/(r.length-1+t)|0;return i=l(a+Math.round(u*t/2+(c-a-(r.length-1+t)*u)/2),u),o=0,n={t:"rangeRoundPoints",a:arguments},s},s.rangeBands=function(e,t,a){arguments.length<2&&(t=0),arguments.length<3&&(a=t);var c=e[1]<e[0],u=e[c-0],d=e[1-c],p=(d-u)/(r.length-t+2*a);return i=l(u+p*a,p),c&&i.reverse(),o=p*(1-t),n={t:"rangeBands",a:arguments},s},s.rangeRoundBands=function(e,t,a){arguments.length<2&&(t=0),arguments.length<3&&(a=t);var c=e[1]<e[0],u=e[c-0],d=e[1-c],p=Math.floor((d-u)/(r.length-t+2*a));return i=l(u+Math.round((d-u-(r.length-t)*p)/2),p),c&&i.reverse(),o=Math.round(p*(1-t)),n={t:"rangeRoundBands",a:arguments},s},s.rangeBand=function(){return o},s.rangeExtent=function(){return _o(n.a[0])},s.copy=function(){return t(r,n)},s.domain(r)}([],{t:"range",a:[[]]})},e.scale.category10=function(){return e.scale.ordinal().range(zo)},e.scale.category20=function(){return e.scale.ordinal().range(No)},e.scale.category20b=function(){return e.scale.ordinal().range(jo)},e.scale.category20c=function(){return e.scale.ordinal().range(Bo)};var zo=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(ut),No=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(ut),jo=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(ut),Bo=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(ut);function Yo(){return 0}e.scale.quantile=function(){return function t(r,n){var a;function i(){var t=0,i=n.length;for(a=[];++t<i;)a[t-1]=e.quantile(r,t/i);return o}function o(t){if(!isNaN(t=+t))return n[e.bisect(a,t)]}return o.domain=function(e){return arguments.length?(r=e.map(h).filter(f).sort(p),i()):r},o.range=function(e){return arguments.length?(n=e,i()):n},o.quantiles=function(){return a},o.invertExtent=function(e){return(e=n.indexOf(e))<0?[NaN,NaN]:[e>0?a[e-1]:r[0],e<a.length?a[e]:r[r.length-1]]},o.copy=function(){return t(r,n)},i()}([],[])},e.scale.quantize=function(){return function e(t,r,n){var a,i;function o(e){return n[Math.max(0,Math.min(i,Math.floor(a*(e-t))))]}function s(){return a=n.length/(r-t),i=n.length-1,o}return o.domain=function(e){return arguments.length?(t=+e[0],r=+e[e.length-1],s()):[t,r]},o.range=function(e){return arguments.length?(n=e,s()):n},o.invertExtent=function(e){return[e=(e=n.indexOf(e))<0?NaN:e/a+t,e+1/a]},o.copy=function(){return e(t,r,n)},s()}(0,1,[0,1])},e.scale.threshold=function(){return function t(r,n){function a(t){if(t<=t)return n[e.bisect(r,t)]}return a.domain=function(e){return arguments.length?(r=e,a):r},a.range=function(e){return arguments.length?(n=e,a):n},a.invertExtent=function(e){return e=n.indexOf(e),[r[e-1],r[e]]},a.copy=function(){return t(r,n)},a}([.5],[0,1])},e.scale.identity=function(){return function e(t){function r(e){return+e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=e.map(r),r):t},r.ticks=function(e){return Eo(t,e)},r.tickFormat=function(e,r){return Do(t,e,r)},r.copy=function(){return e(t)},r}([0,1])},e.svg={},e.svg.arc=function(){var e=Vo,t=Uo,r=Yo,n=Ho,a=Wo,i=Go,o=qo;function s(){var s=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+t.apply(this,arguments)),u=a.apply(this,arguments)-De,d=i.apply(this,arguments)-De,p=Math.abs(d-u),h=u>d?0:1;if(c<s&&(f=c,c=s,s=f),p>=Ee)return l(c,h)+(s?l(s,1-h):"")+"Z";var f,m,g,v,y,b,_,x,w,k,M,T,C=0,S=0,L=[];if((v=(+o.apply(this,arguments)||0)/2)&&(g=n===Ho?Math.sqrt(s*s+c*c):+n.apply(this,arguments),h||(S*=-1),c&&(S=ze(g/c*Math.sin(v))),s&&(C=ze(g/s*Math.sin(v)))),c){y=c*Math.cos(u+S),b=c*Math.sin(u+S),_=c*Math.cos(d-S),x=c*Math.sin(d-S);var A=Math.abs(d-u-2*S)<=Le?0:1;if(S&&Ko(y,b,_,x)===h^A){var E=(u+d)/2;y=c*Math.cos(E),b=c*Math.sin(E),_=x=null}}else y=b=0;if(s){w=s*Math.cos(d-C),k=s*Math.sin(d-C),M=s*Math.cos(u+C),T=s*Math.sin(u+C);var D=Math.abs(u-d+2*C)<=Le?0:1;if(C&&Ko(w,k,M,T)===1-h^D){var I=(u+d)/2;w=s*Math.cos(I),k=s*Math.sin(I),M=T=null}}else w=k=0;if(p>Ce&&(f=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s<c^h?0:1;var P=f,O=f;if(p<Le){var R=null==M?[w,k]:null==_?[y,b]:fa([y,b],[M,T],[_,x],[w,k]),F=y-R[0],z=b-R[1],N=_-R[0],j=x-R[1],B=1/Math.sin(Math.acos((F*N+z*j)/(Math.sqrt(F*F+z*z)*Math.sqrt(N*N+j*j)))/2),Y=Math.sqrt(R[0]*R[0]+R[1]*R[1]);O=Math.min(f,(s-Y)/(B-1)),P=Math.min(f,(c-Y)/(B+1))}if(null!=_){var H=Xo(null==M?[w,k]:[M,T],[y,b],c,P,h),V=Xo([_,x],[w,k],c,P,h);f===P?L.push("M",H[0],"A",P,",",P," 0 0,",m," ",H[1],"A",c,",",c," 0 ",1-h^Ko(H[1][0],H[1][1],V[1][0],V[1][1]),",",h," ",V[1],"A",P,",",P," 0 0,",m," ",V[0]):L.push("M",H[0],"A",P,",",P," 0 1,",m," ",V[0])}else L.push("M",y,",",b);if(null!=M){var U=Xo([y,b],[M,T],s,-O,h),W=Xo([w,k],null==_?[y,b]:[_,x],s,-O,h);f===O?L.push("L",W[0],"A",O,",",O," 0 0,",m," ",W[1],"A",s,",",s," 0 ",h^Ko(W[1][0],W[1][1],U[1][0],U[1][1]),",",1-h," ",U[1],"A",O,",",O," 0 0,",m," ",U[0]):L.push("L",W[0],"A",O,",",O," 0 0,",m," ",U[0])}else L.push("L",w,",",k)}else L.push("M",y,",",b),null!=_&&L.push("A",c,",",c," 0 ",A,",",h," ",_,",",x),L.push("L",w,",",k),null!=M&&L.push("A",s,",",s," 0 ",D,",",1-h," ",M,",",T);return L.push("Z"),L.join("")}function l(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return s.innerRadius=function(t){return arguments.length?(e=bt(t),s):e},s.outerRadius=function(e){return arguments.length?(t=bt(e),s):t},s.cornerRadius=function(e){return arguments.length?(r=bt(e),s):r},s.padRadius=function(e){return arguments.length?(n=e==Ho?Ho:bt(e),s):n},s.startAngle=function(e){return arguments.length?(a=bt(e),s):a},s.endAngle=function(e){return arguments.length?(i=bt(e),s):i},s.padAngle=function(e){return arguments.length?(o=bt(e),s):o},s.centroid=function(){var r=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,n=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-De;return[Math.cos(n)*r,Math.sin(n)*r]},s};var Ho="auto";function Vo(e){return e.innerRadius}function Uo(e){return e.outerRadius}function Wo(e){return e.startAngle}function Go(e){return e.endAngle}function qo(e){return e&&e.padAngle}function Ko(e,t,r,n){return(e-r)*t-(t-n)*e>0?0:1}function Xo(e,t,r,n,a){var i=e[0]-t[0],o=e[1]-t[1],s=(a?n:-n)/Math.sqrt(i*i+o*o),l=s*o,c=-s*i,u=e[0]+l,d=e[1]+c,p=t[0]+l,h=t[1]+c,f=(u+p)/2,m=(d+h)/2,g=p-u,v=h-d,y=g*g+v*v,b=r-n,_=u*h-p*d,x=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-_*_)),w=(_*v-g*x)/y,k=(-_*g-v*x)/y,M=(_*v+g*x)/y,T=(-_*g+v*x)/y,C=w-f,S=k-m,L=M-f,A=T-m;return C*C+S*S>L*L+A*A&&(w=M,k=T),[[w-l,k-c],[w*r/b,k*r/b]]}function Zo(e){var t=la,r=ca,n=Jr,a=$o,i=a.key,o=.7;function s(i){var s,l=[],c=[],u=-1,d=i.length,p=bt(t),h=bt(r);function f(){l.push("M",a(e(c),o))}for(;++u<d;)n.call(this,s=i[u],u)?c.push([+p.call(this,s,u),+h.call(this,s,u)]):c.length&&(f(),c=[]);return c.length&&f(),l.length?l.join(""):null}return s.x=function(e){return arguments.length?(t=e,s):t},s.y=function(e){return arguments.length?(r=e,s):r},s.defined=function(e){return arguments.length?(n=e,s):n},s.interpolate=function(e){return arguments.length?(i="function"==typeof e?a=e:(a=Jo.get(e)||$o).key,s):i},s.tension=function(e){return arguments.length?(o=e,s):o},s}e.svg.line=function(){return Zo(I)};var Jo=e.map({linear:$o,"linear-closed":Qo,step:function(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t<r;)a.push("H",(n[0]+(n=e[t])[0])/2,"V",n[1]);return r>1&&a.push("H",n[0]),a.join("")},"step-before":es,"step-after":ts,basis:as,"basis-open":function(e){if(e.length<4)return $o(e);for(var t,r=[],n=-1,a=e.length,i=[0],o=[0];++n<3;)t=e[n],i.push(t[0]),o.push(t[1]);for(r.push(is(ls,i)+","+is(ls,o)),--n;++n<a;)t=e[n],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),cs(r,i,o);return r.join("")},"basis-closed":function(e){for(var t,r,n=-1,a=e.length,i=a+4,o=[],s=[];++n<4;)r=e[n%a],o.push(r[0]),s.push(r[1]);for(t=[is(ls,o),",",is(ls,s)],--n;++n<i;)r=e[n%a],o.shift(),o.push(r[0]),s.shift(),s.push(r[1]),cs(t,o,s);return t.join("")},bundle:function(e,t){var r=e.length-1;if(r)for(var n,a,i=e[0][0],o=e[0][1],s=e[r][0]-i,l=e[r][1]-o,c=-1;++c<=r;)n=e[c],a=c/r,n[0]=t*n[0]+(1-t)*(i+a*s),n[1]=t*n[1]+(1-t)*(o+a*l);return as(e)},cardinal:function(e,t){return e.length<3?$o(e):e[0]+rs(e,ns(e,t))},"cardinal-open":function(e,t){return e.length<4?$o(e):e[1]+rs(e.slice(1,-1),ns(e,t))},"cardinal-closed":function(e,t){return e.length<3?Qo(e):e[0]+rs((e.push(e[0]),e),ns([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?$o(e):e[0]+rs(e,function(e){for(var t,r,n,a,i=[],o=function(e){for(var t=0,r=e.length-1,n=[],a=e[0],i=e[1],o=n[0]=us(a,i);++t<r;)n[t]=(o+(o=us(a=i,i=e[t+1])))/2;return n[t]=o,n}(e),s=-1,l=e.length-1;++s<l;)t=us(e[s],e[s+1]),y(t)<Ce?o[s]=o[s+1]=0:(r=o[s]/t,n=o[s+1]/t,(a=r*r+n*n)>9&&(a=3*t/Math.sqrt(a),o[s]=a*r,o[s+1]=a*n));for(s=-1;++s<=l;)a=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),i.push([a||0,o[s]*a||0]);return i}(e))}});function $o(e){return e.length>1?e.join("L"):e+"Z"}function Qo(e){return e.join("L")+"Z"}function es(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t<r;)a.push("V",(n=e[t])[1],"H",n[0]);return a.join("")}function ts(e){for(var t=0,r=e.length,n=e[0],a=[n[0],",",n[1]];++t<r;)a.push("H",(n=e[t])[0],"V",n[1]);return a.join("")}function rs(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return $o(e);var r=e.length!=t.length,n="",a=e[0],i=e[1],o=t[0],s=o,l=1;if(r&&(n+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],a=e[1],l=2),t.length>1){s=t[1],i=e[l],l++,n+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(i[0]-s[0])+","+(i[1]-s[1])+","+i[0]+","+i[1];for(var c=2;c<t.length;c++,l++)i=e[l],s=t[c],n+="S"+(i[0]-s[0])+","+(i[1]-s[1])+","+i[0]+","+i[1]}if(r){var u=e[l];n+="Q"+(i[0]+2*s[0]/3)+","+(i[1]+2*s[1]/3)+","+u[0]+","+u[1]}return n}function ns(e,t){for(var r,n=[],a=(1-t)/2,i=e[0],o=e[1],s=1,l=e.length;++s<l;)r=i,i=o,o=e[s],n.push([a*(o[0]-r[0]),a*(o[1]-r[1])]);return n}function as(e){if(e.length<3)return $o(e);var t=1,r=e.length,n=e[0],a=n[0],i=n[1],o=[a,a,a,(n=e[1])[0]],s=[i,i,i,n[1]],l=[a,",",i,"L",is(ls,o),",",is(ls,s)];for(e.push(e[r-1]);++t<=r;)n=e[t],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),cs(l,o,s);return e.pop(),l.push("L",n),l.join("")}function is(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}Jo.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var os=[0,2/3,1/3,0],ss=[0,1/3,2/3,0],ls=[0,1/6,2/3,1/6];function cs(e,t,r){e.push("C",is(os,t),",",is(os,r),",",is(ss,t),",",is(ss,r),",",is(ls,t),",",is(ls,r))}function us(e,t){return(t[1]-e[1])/(t[0]-e[0])}function ds(e){for(var t,r,n,a=-1,i=e.length;++a<i;)r=(t=e[a])[0],n=t[1]-De,t[0]=r*Math.cos(n),t[1]=r*Math.sin(n);return e}function ps(e){var t=la,r=la,n=0,a=ca,i=Jr,o=$o,s=o.key,l=o,c="L",u=.7;function d(s){var d,p,h,f=[],m=[],g=[],v=-1,y=s.length,b=bt(t),_=bt(n),x=t===r?function(){return p}:bt(r),w=n===a?function(){return h}:bt(a);function k(){f.push("M",o(e(g),u),c,l(e(m.reverse()),u),"Z")}for(;++v<y;)i.call(this,d=s[v],v)?(m.push([p=+b.call(this,d,v),h=+_.call(this,d,v)]),g.push([+x.call(this,d,v),+w.call(this,d,v)])):m.length&&(k(),m=[],g=[]);return m.length&&k(),f.length?f.join(""):null}return d.x=function(e){return arguments.length?(t=r=e,d):r},d.x0=function(e){return arguments.length?(t=e,d):t},d.x1=function(e){return arguments.length?(r=e,d):r},d.y=function(e){return arguments.length?(n=a=e,d):a},d.y0=function(e){return arguments.length?(n=e,d):n},d.y1=function(e){return arguments.length?(a=e,d):a},d.defined=function(e){return arguments.length?(i=e,d):i},d.interpolate=function(e){return arguments.length?(s="function"==typeof e?o=e:(o=Jo.get(e)||$o).key,l=o.reverse||o,c=o.closed?"M":"L",d):s},d.tension=function(e){return arguments.length?(u=e,d):u},d}function hs(e){return e.radius}function fs(e){return[e.x,e.y]}function ms(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-De;return[r*Math.cos(n),r*Math.sin(n)]}}function gs(){return 64}function vs(){return"circle"}function ys(e){var t=Math.sqrt(e/Le);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}e.svg.line.radial=function(){var e=Zo(ds);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},es.reverse=ts,ts.reverse=es,e.svg.area=function(){return ps(I)},e.svg.area.radial=function(){var e=ps(ds);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},e.svg.chord=function(){var e=Kn,t=Xn,r=hs,n=Wo,a=Go;function i(r,n){var a,i,c=o(this,e,r,n),u=o(this,t,r,n);return"M"+c.p0+s(c.r,c.p1,c.a1-c.a0)+(i=u,(a=c).a0==i.a0&&a.a1==i.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+s(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+"Z"}function o(e,t,i,o){var s=t.call(e,i,o),l=r.call(e,s,o),c=n.call(e,s,o)-De,u=a.call(e,s,o)-De;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function s(e,t,r){return"A"+e+","+e+" 0 "+ +(r>Le)+",1 "+t}function l(e,t,r,n){return"Q 0,0 "+n}return i.radius=function(e){return arguments.length?(r=bt(e),i):r},i.source=function(t){return arguments.length?(e=bt(t),i):e},i.target=function(e){return arguments.length?(t=bt(e),i):t},i.startAngle=function(e){return arguments.length?(n=bt(e),i):n},i.endAngle=function(e){return arguments.length?(a=bt(e),i):a},i},e.svg.diagonal=function(){var e=Kn,t=Xn,r=fs;function n(n,a){var i=e.call(this,n,a),o=t.call(this,n,a),s=(i.y+o.y)/2,l=[i,{x:i.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(t){return arguments.length?(e=bt(t),n):e},n.target=function(e){return arguments.length?(t=bt(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=fs,n=t.projection;return t.projection=function(e){return arguments.length?n(ms(r=e)):r},t},e.svg.symbol=function(){var e=vs,t=gs;function r(r,n){return(bs.get(e.call(this,r,n))||ys)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=bt(t),r):e},r.size=function(e){return arguments.length?(t=bt(e),r):t},r};var bs=e.map({circle:ys,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*xs)),r=t*xs;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/_s),r=t*_s/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/_s),r=t*_s/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=bs.keys();var _s=Math.sqrt(3),xs=Math.tan(30*Ie);K.transition=function(e){for(var t,r,n=Ts||++Ls,a=Ds(e),i=[],o=Cs||{time:Date.now(),ease:fi,delay:0,duration:250},s=-1,l=this.length;++s<l;){i.push(t=[]);for(var c=this[s],u=-1,d=c.length;++u<d;)(r=c[u])&&Is(r,u,a,n,o),t.push(r)}return Ms(i,a,n)},K.interrupt=function(e){return this.each(null==e?ws:ks(Ds(e)))};var ws=ks(Ds());function ks(e){return function(){var t,r,n;(t=this[e])&&(n=t[r=t.active])&&(n.timer.c=null,n.timer.t=NaN,--t.count?delete t[r]:delete this[e],t.active+=.5,n.event&&n.event.interrupt.call(this,this.__data__,n.index))}}function Ms(e,t,r){return V(e,Ss),e.namespace=t,e.id=r,e}var Ts,Cs,Ss=[],Ls=0;function As(e,t,r,n){var a=e.id,i=e.namespace;return pe(e,"function"==typeof r?function(e,o,s){e[i][a].tween.set(t,n(r.call(e,e.__data__,o,s)))}:(r=n(r),function(e){e[i][a].tween.set(t,r)}))}function Es(e){return null==e&&(e=""),function(){this.textContent=e}}function Ds(e){return null==e?"__transition__":"__transition_"+e+"__"}function Is(e,t,r,n,a){var i,o,s,l,c,u=e[r]||(e[r]={active:0,count:0}),d=u[n];function p(r){var a=u.active,p=u[a];for(var f in p&&(p.timer.c=null,p.timer.t=NaN,--u.count,delete u[a],p.event&&p.event.interrupt.call(e,e.__data__,p.index)),u)if(+f<n){var m=u[f];m.timer.c=null,m.timer.t=NaN,--u.count,delete u[f]}o.c=h,St((function(){return o.c&&h(r||1)&&(o.c=null,o.t=NaN),1}),0,i),u.active=n,d.event&&d.event.start.call(e,e.__data__,t),c=[],d.tween.forEach((function(r,n){(n=n.call(e,e.__data__,t))&&c.push(n)})),l=d.ease,s=d.duration}function h(a){for(var i=a/s,o=l(i),p=c.length;p>0;)c[--p].call(e,o);if(i>=1)return d.event&&d.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}d||(i=a.time,o=St((function(e){var t=d.delay;if(o.t=t+i,t<=e)return p(e-t);o.c=p}),0,i),d=u[n]={tween:new x,time:i,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:t},a=null,++u.count)}Ss.call=K.call,Ss.empty=K.empty,Ss.node=K.node,Ss.size=K.size,e.transition=function(t,r){return t&&t.transition?Ts?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=Ss,Ss.select=function(e){var t,r,n,a=this.id,i=this.namespace,o=[];e=X(e);for(var s=-1,l=this.length;++s<l;){o.push(t=[]);for(var c=this[s],u=-1,d=c.length;++u<d;)(n=c[u])&&(r=e.call(n,n.__data__,u,s))?("__data__"in n&&(r.__data__=n.__data__),Is(r,u,i,a,n[i][a]),t.push(r)):t.push(null)}return Ms(o,i,a)},Ss.selectAll=function(e){var t,r,n,a,i,o=this.id,s=this.namespace,l=[];e=Z(e);for(var c=-1,u=this.length;++c<u;)for(var d=this[c],p=-1,h=d.length;++p<h;)if(n=d[p]){i=n[s][o],r=e.call(n,n.__data__,p,c),l.push(t=[]);for(var f=-1,m=r.length;++f<m;)(a=r[f])&&Is(a,f,s,o,i),t.push(a)}return Ms(l,s,o)},Ss.filter=function(e){var t,r,n=[];"function"!=typeof e&&(e=ue(e));for(var a=0,i=this.length;a<i;a++){n.push(t=[]);for(var o,s=0,l=(o=this[a]).length;s<l;s++)(r=o[s])&&e.call(r,r.__data__,s,a)&&t.push(r)}return Ms(n,this.namespace,this.id)},Ss.tween=function(e,t){var r=this.id,n=this.namespace;return arguments.length<2?this.node()[n][r].tween.get(e):pe(this,null==t?function(t){t[n][r].tween.remove(e)}:function(a){a[n][r].tween.set(e,t)})},Ss.attr=function(t,r){if(arguments.length<2){for(r in t)this.attr(r,t[r]);return this}var n="transform"==t?Ti:ai,a=e.ns.qualify(t);function i(){this.removeAttribute(a)}function o(){this.removeAttributeNS(a.space,a.local)}function s(e){return null==e?i:(e+="",function(){var t,r=this.getAttribute(a);return r!==e&&(t=n(r,e),function(e){this.setAttribute(a,t(e))})})}function l(e){return null==e?o:(e+="",function(){var t,r=this.getAttributeNS(a.space,a.local);return r!==e&&(t=n(r,e),function(e){this.setAttributeNS(a.space,a.local,t(e))})})}return As(this,"attr."+t,r,a.local?l:s)},Ss.attrTween=function(t,r){var n=e.ns.qualify(t);return this.tween("attr."+t,n.local?function(e,t){var a=r.call(this,e,t,this.getAttributeNS(n.space,n.local));return a&&function(e){this.setAttributeNS(n.space,n.local,a(e))}}:function(e,t){var a=r.call(this,e,t,this.getAttribute(n));return a&&function(e){this.setAttribute(n,a(e))}})},Ss.style=function(e,t,r){var n=arguments.length;if(n<3){if("string"!=typeof e){for(r in n<2&&(t=""),e)this.style(r,e[r],t);return this}r=""}function a(){this.style.removeProperty(e)}function i(t){return null==t?a:(t+="",function(){var n,a=o(this).getComputedStyle(this,null).getPropertyValue(e);return a!==t&&(n=ai(a,t),function(t){this.style.setProperty(e,n(t),r)})})}return As(this,"style."+e,t,i)},Ss.styleTween=function(e,t,r){function n(n,a){var i=t.call(this,n,a,o(this).getComputedStyle(this,null).getPropertyValue(e));return i&&function(t){this.style.setProperty(e,i(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+e,n)},Ss.text=function(e){return As(this,"text",e,Es)},Ss.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},Ss.ease=function(t){var r=this.id,n=this.namespace;return arguments.length<1?this.node()[n][r].ease:("function"!=typeof t&&(t=e.ease.apply(e,arguments)),pe(this,(function(e){e[n][r].ease=t})))},Ss.delay=function(e){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].delay:pe(this,"function"==typeof e?function(n,a,i){n[r][t].delay=+e.call(n,n.__data__,a,i)}:(e=+e,function(n){n[r][t].delay=e}))},Ss.duration=function(e){var t=this.id,r=this.namespace;return arguments.length<1?this.node()[r][t].duration:pe(this,"function"==typeof e?function(n,a,i){n[r][t].duration=Math.max(1,e.call(n,n.__data__,a,i))}:(e=Math.max(1,e),function(n){n[r][t].duration=e}))},Ss.each=function(t,r){var n=this.id,a=this.namespace;if(arguments.length<2){var i=Cs,o=Ts;try{Ts=n,pe(this,(function(e,r,i){Cs=e[a][n],t.call(e,e.__data__,r,i)}))}finally{Cs=i,Ts=o}}else pe(this,(function(i){var o=i[a][n];(o.event||(o.event=e.dispatch("start","end","interrupt"))).on(t,r)}));return this},Ss.transition=function(){for(var e,t,r,n=this.id,a=++Ls,i=this.namespace,o=[],s=0,l=this.length;s<l;s++){o.push(e=[]);for(var c,u=0,d=(c=this[s]).length;u<d;u++)(t=c[u])&&Is(t,u,i,a,{time:(r=t[i][n]).time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration}),e.push(t)}return Ms(o,i,a)},e.svg.axis=function(){var t,r=e.scale.linear(),a=Ps,i=6,o=6,s=3,l=[10],c=null;function u(n){n.each((function(){var n,u=e.select(this),d=this.__chart__||r,p=this.__chart__=r.copy(),h=null==c?p.ticks?p.ticks.apply(p,l):p.domain():c,f=null==t?p.tickFormat?p.tickFormat.apply(p,l):I:t,m=u.selectAll(".tick").data(h,p),g=m.enter().insert("g",".domain").attr("class","tick").style("opacity",Ce),v=e.transition(m.exit()).style("opacity",Ce).remove(),y=e.transition(m.order()).style("opacity",1),b=Math.max(i,0)+s,_=xo(p),x=u.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),e.transition(x));g.append("line"),g.append("text");var k,M,T,C,S=g.select("line"),L=y.select("line"),A=m.select("text").text(f),E=g.select("text"),D=y.select("text"),P="top"===a||"left"===a?-1:1;if("bottom"===a||"top"===a?(n=Rs,k="x",T="y",M="x2",C="y2",A.attr("dy",P<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+_[0]+","+P*o+"V0H"+_[1]+"V"+P*o)):(n=Fs,k="y",T="x",M="y2",C="x2",A.attr("dy",".32em").style("text-anchor",P<0?"end":"start"),w.attr("d","M"+P*o+","+_[0]+"H0V"+_[1]+"H"+P*o)),S.attr(C,P*i),E.attr(T,P*b),L.attr(M,0).attr(C,P*i),D.attr(k,0).attr(T,P*b),p.rangeBand){var O=p,R=O.rangeBand()/2;d=p=function(e){return O(e)+R}}else d.rangeBand?d=p:v.call(n,p,d);g.call(n,d,p),y.call(n,p,p)}))}return u.scale=function(e){return arguments.length?(r=e,u):r},u.orient=function(e){return arguments.length?(a=e in Os?e+"":Ps,u):a},u.ticks=function(){return arguments.length?(l=n(arguments),u):l},u.tickValues=function(e){return arguments.length?(c=e,u):c},u.tickFormat=function(e){return arguments.length?(t=e,u):t},u.tickSize=function(e){var t=arguments.length;return t?(i=+e,o=+arguments[t-1],u):i},u.innerTickSize=function(e){return arguments.length?(i=+e,u):i},u.outerTickSize=function(e){return arguments.length?(o=+e,u):o},u.tickPadding=function(e){return arguments.length?(s=+e,u):s},u.tickSubdivide=function(){return arguments.length&&u},u};var Ps="bottom",Os={top:1,right:1,bottom:1,left:1};function Rs(e,t,r){e.attr("transform",(function(e){var n=t(e);return"translate("+(isFinite(n)?n:r(e))+",0)"}))}function Fs(e,t,r){e.attr("transform",(function(e){var n=t(e);return"translate(0,"+(isFinite(n)?n:r(e))+")"}))}e.svg.brush=function(){var t,r,n=Y(p,"brushstart","brush","brushend"),a=null,i=null,s=[0,0],l=[0,0],c=!0,u=!0,d=Ns[0];function p(t){t.each((function(){var t=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",g).on("touchstart.brush",g),r=t.selectAll(".background").data([0]);r.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=t.selectAll(".resize").data(d,I);n.exit().remove(),n.enter().append("g").attr("class",(function(e){return"resize "+e})).style("cursor",(function(e){return zs[e]})).append("rect").attr("x",(function(e){return/[ew]$/.test(e)?-3:null})).attr("y",(function(e){return/^[ns]/.test(e)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",p.empty()?"none":null);var o,s=e.transition(t),l=e.transition(r);a&&(o=xo(a),l.attr("x",o[0]).attr("width",o[1]-o[0]),f(s)),i&&(o=xo(i),l.attr("y",o[0]).attr("height",o[1]-o[0]),m(s)),h(s)}))}function h(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+s[+/e$/.test(e)]+","+l[+/^s/.test(e)]+")"}))}function f(e){e.select(".extent").attr("x",s[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var d,g,v=this,y=e.select(e.event.target),b=n.of(v,arguments),_=e.select(v),x=y.datum(),w=!/^(n|s)$/.test(x)&&a,k=!/^(e|w)$/.test(x)&&i,M=y.classed("extent"),T=we(v),C=e.mouse(v),S=e.select(o(v)).on("keydown.brush",(function(){32==e.event.keyCode&&(M||(d=null,C[0]-=s[1],C[1]-=l[1],M=2),j())})).on("keyup.brush",(function(){32==e.event.keyCode&&2==M&&(C[0]+=s[1],C[1]+=l[1],M=0,j())}));if(e.event.changedTouches?S.on("touchmove.brush",E).on("touchend.brush",I):S.on("mousemove.brush",E).on("mouseup.brush",I),_.interrupt().selectAll("*").interrupt(),M)C[0]=s[0]-C[0],C[1]=l[0]-C[1];else if(x){var L=+/w$/.test(x),A=+/^n/.test(x);g=[s[1-L]-C[0],l[1-A]-C[1]],C[0]=s[L],C[1]=l[A]}else e.event.altKey&&(d=C.slice());function E(){var t=e.mouse(v),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),M||(e.event.altKey?(d||(d=[(s[0]+s[1])/2,(l[0]+l[1])/2]),C[0]=s[+(t[0]<d[0])],C[1]=l[+(t[1]<d[1])]):d=null),w&&D(t,a,0)&&(f(_),r=!0),k&&D(t,i,1)&&(m(_),r=!0),r&&(h(_),b({type:"brush",mode:M?"move":"resize"}))}function D(e,n,a){var i,o,p=xo(n),h=p[0],f=p[1],m=C[a],g=a?l:s,v=g[1]-g[0];if(M&&(h-=m,f-=v+m),i=(a?u:c)?Math.max(h,Math.min(f,e[a])):e[a],M?o=(i+=m)+v:(d&&(m=Math.max(h,Math.min(f,2*d[a]-i))),m<i?(o=i,i=m):o=m),g[0]!=i||g[1]!=o)return a?r=null:t=null,g[0]=i,g[1]=o,!0}function I(){E(),_.style("pointer-events","all").selectAll(".resize").style("display",p.empty()?"none":null),e.select("body").style("cursor",null),S.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),T(),b({type:"brushend"})}_.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",y.style("cursor")),b({type:"brushstart"}),E()}return p.event=function(a){a.each((function(){var a=n.of(this,arguments),i={x:s,y:l,i:t,j:r},o=this.__chart__||i;this.__chart__=i,Ts?e.select(this).transition().each("start.brush",(function(){t=o.i,r=o.j,s=o.x,l=o.y,a({type:"brushstart"})})).tween("brush:brush",(function(){var e=ii(s,i.x),n=ii(l,i.y);return t=r=null,function(t){s=i.x=e(t),l=i.y=n(t),a({type:"brush",mode:"resize"})}})).each("end.brush",(function(){t=i.i,r=i.j,a({type:"brush",mode:"resize"}),a({type:"brushend"})})):(a({type:"brushstart"}),a({type:"brush",mode:"resize"}),a({type:"brushend"}))}))},p.x=function(e){return arguments.length?(d=Ns[!(a=e)<<1|!i],p):a},p.y=function(e){return arguments.length?(d=Ns[!a<<1|!(i=e)],p):i},p.clamp=function(e){return arguments.length?(a&&i?(c=!!e[0],u=!!e[1]):a?c=!!e:i&&(u=!!e),p):a&&i?[c,u]:a?c:i?u:null},p.extent=function(e){var n,o,c,u,d;return arguments.length?(a&&(n=e[0],o=e[1],i&&(n=n[0],o=o[0]),t=[n,o],a.invert&&(n=a(n),o=a(o)),o<n&&(d=n,n=o,o=d),n==s[0]&&o==s[1]||(s=[n,o])),i&&(c=e[0],u=e[1],a&&(c=c[1],u=u[1]),r=[c,u],i.invert&&(c=i(c),u=i(u)),u<c&&(d=c,c=u,u=d),c==l[0]&&u==l[1]||(l=[c,u])),p):(a&&(t?(n=t[0],o=t[1]):(n=s[0],o=s[1],a.invert&&(n=a.invert(n),o=a.invert(o)),o<n&&(d=n,n=o,o=d))),i&&(r?(c=r[0],u=r[1]):(c=l[0],u=l[1],i.invert&&(c=i.invert(c),u=i.invert(u)),u<c&&(d=c,c=u,u=d))),a&&i?[[n,c],[o,u]]:a?[n,o]:i&&[c,u])},p.clear=function(){return p.empty()||(s=[0,0],l=[0,0],t=r=null),p},p.empty=function(){return!!a&&s[0]==s[1]||!!i&&l[0]==l[1]},e.rebind(p,n,"on")};var zs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ns=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],js=zt.format=pr.timeFormat,Bs=js.utc,Ys=Bs("%Y-%m-%dT%H:%M:%S.%LZ");function Hs(e){return e.toISOString()}function Vs(t,r,n){function a(e){return t(e)}function i(t,n){var a=(t[1]-t[0])/n,i=e.bisect(Ws,a);return i==Ws.length?[r.year,Ao(t.map((function(e){return e/31536e6})),n)[2]]:i?r[a/Ws[i-1]<Ws[i]/a?i-1:i]:[Ks,Ao(t,n)[2]]}return a.invert=function(e){return Us(t.invert(e))},a.domain=function(e){return arguments.length?(t.domain(e),a):t.domain().map(Us)},a.nice=function(e,t){var r=a.domain(),n=_o(r),o=null==e?i(n,10):"number"==typeof e&&i(n,e);function s(r){return!isNaN(r)&&!e.range(r,Us(+r+1),t).length}return o&&(e=o[0],t=o[1]),a.domain(ko(r,t>1?{floor:function(t){for(;s(t=e.floor(t));)t=Us(t-1);return t},ceil:function(t){for(;s(t=e.ceil(t));)t=Us(+t+1);return t}}:e))},a.ticks=function(e,t){var r=_o(a.domain()),n=null==e?i(r,10):"number"==typeof e?i(r,e):!e.range&&[{range:e},t];return n&&(e=n[0],t=n[1]),e.range(r[0],Us(+r[1]+1),t<1?1:t)},a.tickFormat=function(){return n},a.copy=function(){return Vs(t.copy(),r,n)},So(a,t)}function Us(e){return new Date(e)}js.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Hs:Ys,Hs.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Hs.toString=Ys.toString,zt.second=Yt((function(e){return new Nt(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))}),(function(e){return e.getSeconds()})),zt.seconds=zt.second.range,zt.seconds.utc=zt.second.utc.range,zt.minute=Yt((function(e){return new Nt(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))}),(function(e){return e.getMinutes()})),zt.minutes=zt.minute.range,zt.minutes.utc=zt.minute.utc.range,zt.hour=Yt((function(e){var t=e.getTimezoneOffset()/60;return new Nt(36e5*(Math.floor(e/36e5-t)+t))}),(function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))}),(function(e){return e.getHours()})),zt.hours=zt.hour.range,zt.hours.utc=zt.hour.utc.range,zt.month=Yt((function(e){return(e=zt.day(e)).setDate(1),e}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e){return e.getMonth()})),zt.months=zt.month.range,zt.months.utc=zt.month.utc.range;var Ws=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Gs=[[zt.second,1],[zt.second,5],[zt.second,15],[zt.second,30],[zt.minute,1],[zt.minute,5],[zt.minute,15],[zt.minute,30],[zt.hour,1],[zt.hour,3],[zt.hour,6],[zt.hour,12],[zt.day,1],[zt.day,2],[zt.week,1],[zt.month,1],[zt.month,3],[zt.year,1]],qs=js.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",Jr]]),Ks={range:function(t,r,n){return e.range(Math.ceil(t/n)*n,+r,n).map(Us)},floor:I,ceil:I};Gs.year=zt.year,zt.scale=function(){return Vs(e.scale.linear(),Gs,qs)};var Xs=Gs.map((function(e){return[e[0].utc,e[1]]})),Zs=Bs.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",Jr]]);function Js(e){return JSON.parse(e.responseText)}function $s(e){var t=a.createRange();return t.selectNode(a.body),t.createContextualFragment(e.responseText)}Xs.year=zt.year.utc,zt.scale.utc=function(){return Vs(e.scale.linear(),Xs,Zs)},e.text=_t((function(e){return e.responseText})),e.json=function(e,t){return xt(e,"application/json",Js,t)},e.html=function(e,t){return xt(e,"text/html",$s,t)},e.xml=_t((function(e){return e.responseXML})),"object"==typeof t&&t.exports?t.exports=e:this.d3=e}()},{}],165:[function(e,t,r){t.exports=function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]}},{}],166:[function(e,t,r){"use strict";var n=e("incremental-convex-hull"),a=e("uniq");function i(e,t){this.point=e,this.index=t}function o(e,t){for(var r=e.point,n=t.point,a=r.length,i=0;i<a;++i){var o=n[i]-r[i];if(o)return o}return 0}t.exports=function(e,t){var r=e.length;if(0===r)return[];var s=e[0].length;if(s<1)return[];if(1===s)return function(e,t,r){if(1===e)return r?[[-1,0]]:[];var n=t.map((function(e,t){return[e[0],t]}));n.sort((function(e,t){return e[0]-t[0]}));for(var a=new Array(e-1),i=1;i<e;++i){var o=n[i-1],s=n[i];a[i-1]=[o[1],s[1]]}return r&&a.push([-1,a[0][1]],[a[e-1][1],-1]),a}(r,e,t);for(var l=new Array(r),c=1,u=0;u<r;++u){for(var d=e[u],p=new Array(s+1),h=0,f=0;f<s;++f){var m=d[f];p[f]=m,h+=m*m}p[s]=h,l[u]=new i(p,u),c=Math.max(h,c)}a(l,o),r=l.length;var g=new Array(r+s+1),v=new Array(r+s+1),y=(s+1)*(s+1)*c,b=new Array(s+1);for(u=0;u<=s;++u)b[u]=0;for(b[s]=y,g[0]=b.slice(),v[0]=-1,u=0;u<=s;++u)(p=b.slice())[u]=1,g[u+1]=p,v[u+1]=-1;for(u=0;u<r;++u){var _=l[u];g[u+s+1]=_.point,v[u+s+1]=_.index}var x=n(g,!1);if(x=t?x.filter((function(e){for(var t=0,r=0;r<=s;++r){var n=v[e[r]];if(n<0&&++t>=2)return!1;e[r]=n}return!0})):x.filter((function(e){for(var t=0;t<=s;++t){var r=v[e[t]];if(r<0)return!1;e[t]=r}return!0})),1&s)for(u=0;u<x.length;++u)p=(_=x[u])[0],_[0]=_[1],_[1]=p;return x}},{"incremental-convex-hull":414,uniq:545}],167:[function(e,t,r){"use strict";t.exports=i;var n=(i.canvas=document.createElement("canvas")).getContext("2d"),a=o([32,126]);function i(e,t){Array.isArray(e)&&(e=e.join(", "));var r,i={},s=16,l=.05;t&&(2===t.length&&"number"==typeof t[0]?r=o(t):Array.isArray(t)?r=t:(t.o?r=o(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(s=t.fontSize),null!=t.threshold&&(l=t.threshold))),r||(r=a),n.font=s+"px "+e;for(var c=0;c<r.length;c++){var u=r[c],d=n.measureText(u[0]).width+n.measureText(u[1]).width,p=n.measureText(u).width;if(Math.abs(d-p)>s*l){var h=(p-d)/s;i[u]=1e3*h}}return i}function o(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),a=e[0];a<e[1];a++){var i=n+String.fromCharCode(a);t.push(i)}return t}i.createPairs=o,i.ascii=a},{}],168:[function(e,t,r){(function(e){var r=!1;if("undefined"!=typeof Float64Array){var n=new Float64Array(1),a=new Uint32Array(n.buffer);n[0]=1,r=!0,1072693248===a[1]?(t.exports=function(e){return n[0]=e,[a[0],a[1]]},t.exports.pack=function(e,t){return a[0]=e,a[1]=t,n[0]},t.exports.lo=function(e){return n[0]=e,a[0]},t.exports.hi=function(e){return n[0]=e,a[1]}):1072693248===a[0]?(t.exports=function(e){return n[0]=e,[a[1],a[0]]},t.exports.pack=function(e,t){return a[1]=e,a[0]=t,n[0]},t.exports.lo=function(e){return n[0]=e,a[1]},t.exports.hi=function(e){return n[0]=e,a[0]}):r=!1}if(!r){var i=new e(8);t.exports=function(e){return i.writeDoubleLE(e,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},t.exports.pack=function(e,t){return i.writeUInt32LE(e,0,!0),i.writeUInt32LE(t,4,!0),i.readDoubleLE(0,!0)},t.exports.lo=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(0,!0)},t.exports.hi=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),a=1048575&n;return 2146435072&n&&(a+=1<<20),[r,a]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}}).call(this,e("buffer").Buffer)},{buffer:106}],169:[function(e,t,r){var n=e("abs-svg-path"),a=e("normalize-svg-path"),i={M:"moveTo",C:"bezierCurveTo"};t.exports=function(e,t){e.beginPath(),a(n(t)).forEach((function(t){var r=t[0],n=t.slice(1);e[i[r]].apply(e,n)})),e.closePath()}},{"abs-svg-path":62,"normalize-svg-path":453}],170:[function(e,t,r){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],171:[function(e,t,r){"use strict";t.exports=function(e,t){switch(void 0===t&&(t=0),typeof e){case"number":if(e>0)return function(e,t){var r,n;for(r=new Array(e),n=0;n<e;++n)r[n]=t;return r}(0|e,t);break;case"object":if("number"==typeof e.length)return function e(t,r,n){var a=0|t[n];if(a<=0)return[];var i,o=new Array(a);if(n===t.length-1)for(i=0;i<a;++i)o[i]=r;else for(i=0;i<a;++i)o[i]=e(t,r,n+1);return o}(e,t,0)}return[]}},{}],172:[function(e,t,r){"use strict";function n(e,t,r){r=r||2;var n,s,l,c,u,h,f,g=t&&t.length,v=g?t[0]*r:e.length,y=a(e,0,v,r,!0),b=[];if(!y||y.next===y.prev)return b;if(g&&(y=function(e,t,r,n){var o,s,l,c,u,h=[];for(o=0,s=t.length;o<s;o++)l=t[o]*n,c=o<s-1?t[o+1]*n:e.length,(u=a(e,l,c,n,!1))===u.next&&(u.steiner=!0),h.push(m(u));for(h.sort(d),o=0;o<h.length;o++)p(h[o],r),r=i(r,r.next);return r}(e,t,y,r)),e.length>80*r){n=l=e[0],s=c=e[1];for(var _=r;_<v;_+=r)(u=e[_])<n&&(n=u),(h=e[_+1])<s&&(s=h),u>l&&(l=u),h>c&&(c=h);f=0!==(f=Math.max(l-n,c-s))?1/f:0}return o(y,b,r,n,s,f),b}function a(e,t,r,n,a){var i,o;if(a===L(e,t,r,n)>0)for(i=t;i<r;i+=n)o=T(i,e[i],e[i+1],o);else for(i=r-n;i>=t;i-=n)o=T(i,e[i],e[i+1],o);return o&&b(o,o.next)&&(C(o),o=o.next),o}function i(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!b(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(C(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function o(e,t,r,n,a,d,p){if(e){!p&&d&&function(e,t,r,n){var a=e;do{null===a.z&&(a.z=f(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){var t,r,n,a,i,o,s,l,c=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ);t++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,c*=2}while(o>1)}(a)}(e,n,a,d);for(var h,m,g=e;e.prev!==e.next;)if(h=e.prev,m=e.next,d?l(e,n,a,d):s(e))t.push(h.i/r),t.push(e.i/r),t.push(m.i/r),C(e),e=m.next,g=m.next;else if((e=m)===g){p?1===p?o(e=c(i(e),t,r),t,r,n,a,d,2):2===p&&u(e,t,r,n,a,d):o(i(e),t,r,n,a,d,1);break}}}function s(e){var t=e.prev,r=e,n=e.next;if(y(t,r,n)>=0)return!1;for(var a=e.next.next;a!==e.prev;){if(g(t.x,t.y,r.x,r.y,n.x,n.y,a.x,a.y)&&y(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function l(e,t,r,n){var a=e.prev,i=e,o=e.next;if(y(a,i,o)>=0)return!1;for(var s=a.x<i.x?a.x<o.x?a.x:o.x:i.x<o.x?i.x:o.x,l=a.y<i.y?a.y<o.y?a.y:o.y:i.y<o.y?i.y:o.y,c=a.x>i.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,u=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,d=f(s,l,t,r,n),p=f(c,u,t,r,n),h=e.prevZ,m=e.nextZ;h&&h.z>=d&&m&&m.z<=p;){if(h!==e.prev&&h!==e.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&y(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,m!==e.prev&&m!==e.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;h&&h.z>=d;){if(h!==e.prev&&h!==e.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&y(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=p;){if(m!==e.prev&&m!==e.next&&g(a.x,a.y,i.x,i.y,o.x,o.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function c(e,t,r){var n=e;do{var a=n.prev,o=n.next.next;!b(a,o)&&_(a,n,n.next,o)&&k(a,o)&&k(o,a)&&(t.push(a.i/r),t.push(n.i/r),t.push(o.i/r),C(n),C(n.next),n=e=o),n=n.next}while(n!==e);return i(n)}function u(e,t,r,n,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=M(l,c);return l=i(l,l.next),u=i(u,u.next),o(l,t,r,n,a,s),void o(u,t,r,n,a,s)}c=c.next}l=l.next}while(l!==e)}function d(e,t){return e.x-t.x}function p(e,t){if(t=function(e,t){var r,n=t,a=e.x,i=e.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(a===o)return r;var l,c=r,u=r.x,d=r.y,p=1/0;n=r;do{a>=n.x&&n.x>=u&&a!==n.x&&g(i<d?a:o,i,u,d,i<d?o:a,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(a-n.x),k(n,e)&&(l<p||l===p&&(n.x>r.x||n.x===r.x&&h(r,n)))&&(r=n,p=l)),n=n.next}while(n!==c);return r}(e,t)){var r=M(t,e);i(r,r.next)}}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function f(e,t,r,n,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*a)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*a)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function g(e,t,r,n,a,i,o,s){return(a-o)*(t-s)-(e-o)*(i-s)>=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(i-s)-(a-o)*(n-s)>=0}function v(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&_(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(k(e,t)&&k(t,e)&&function(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||b(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function b(e,t){return e.x===t.x&&e.y===t.y}function _(e,t,r,n){var a=w(y(e,t,r)),i=w(y(e,t,n)),o=w(y(r,n,e)),s=w(y(r,n,t));return a!==i&&o!==s||!(0!==a||!x(e,r,t))||!(0!==i||!x(e,n,t))||!(0!==o||!x(r,e,n))||!(0!==s||!x(r,t,n))}function x(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function w(e){return e>0?1:e<0?-1:0}function k(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function M(e,t){var r=new S(e.i,e.x,e.y),n=new S(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function T(e,t,r,n){var a=new S(e,t,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function C(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function S(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(e,t,r,n){for(var a=0,i=t,o=r-n;i<r;i+=n)a+=(e[o]-e[i])*(e[i+1]+e[o+1]),o=i;return a}t.exports=n,t.exports.default=n,n.deviation=function(e,t,r,n){var a=t&&t.length,i=a?t[0]*r:e.length,o=Math.abs(L(e,0,i,r));if(a)for(var s=0,l=t.length;s<l;s++){var c=t[s]*r,u=s<l-1?t[s+1]*r:e.length;o-=Math.abs(L(e,c,u,r))}var d=0;for(s=0;s<n.length;s+=3){var p=n[s]*r,h=n[s+1]*r,f=n[s+2]*r;d+=Math.abs((e[p]-e[f])*(e[h+1]-e[p+1])-(e[p]-e[h])*(e[f+1]-e[p+1]))}return 0===o&&0===d?0:Math.abs((d-o)/o)},n.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,a=0;a<e.length;a++){for(var i=0;i<e[a].length;i++)for(var o=0;o<t;o++)r.vertices.push(e[a][i][o]);a>0&&(n+=e[a-1].length,r.holes.push(n))}return r}},{}],173:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.length;if("number"!=typeof t){t=0;for(var a=0;a<r;++a){var i=e[a];t=Math.max(t,i[0],i[1])}t=1+(0|t)}t|=0;var o=new Array(t);for(a=0;a<t;++a)o[a]=[];for(a=0;a<r;++a)i=e[a],o[i[0]].push(i[1]),o[i[1]].push(i[0]);for(var s=0;s<t;++s)n(o[s],(function(e,t){return e-t}));return o};var n=e("uniq")},{uniq:545}],174:[function(e,t,r){var n=e("strongly-connected-components");t.exports=function(e){var t,r=[],a=[],i=[],o={},s=[];function l(e){var r,n,u=!1;for(a.push(e),i[e]=!0,r=0;r<s[e].length;r++)(n=s[e][r])===t?(c(t,a),u=!0):i[n]||(u=l(n));if(u)!function e(t){i[t]=!1,o.hasOwnProperty(t)&&Object.keys(o[t]).forEach((function(r){delete o[t][r],i[r]&&e(r)}))}(e);else for(r=0;r<s[e].length;r++){n=s[e][r];var d=o[n];d||(d={},o[n]=d),d[n]=!0}return a.pop(),u}function c(e,t){var n=[].concat(t).concat(e);r.push(n)}function u(t){!function(t){for(var r=0;r<e.length;r++)r<t&&(e[r]=[]),e[r]=e[r].filter((function(e){return e>=t}))}(t);for(var r,a=n(e).components.filter((function(e){return e.length>1})),i=1/0,o=0;o<a.length;o++)for(var s=0;s<a[o].length;s++)a[o][s]<i&&(i=a[o][s],r=o);var l=a[r];return!!l&&{leastVertex:i,adjList:e.map((function(e,t){return-1===l.indexOf(t)?[]:e.filter((function(e){return-1!==l.indexOf(e)}))}))}}t=0;for(var d=e.length;t<d;){var p=u(t);if(t=p.leastVertex,s=p.adjList){for(var h=0;h<s.length;h++)for(var f=0;f<s[h].length;f++){var m=s[h][f];i[+m]=!1,o[m]={}}l(t),t+=1}else t=d}return r}},{"strongly-connected-components":528}],175:[function(e,t,r){"use strict";var n=e("../../object/valid-value");t.exports=function(){return n(this).length=0,this}},{"../../object/valid-value":207}],176:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Array.from:e("./shim")},{"./is-implemented":177,"./shim":178}],177:[function(e,t,r){"use strict";t.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},{}],178:[function(e,t,r){"use strict";var n=e("es6-symbol").iterator,a=e("../../function/is-arguments"),i=e("../../function/is-function"),o=e("../../number/to-pos-integer"),s=e("../../object/valid-callable"),l=e("../../object/valid-value"),c=e("../../object/is-value"),u=e("../../string/is-string"),d=Array.isArray,p=Function.prototype.call,h={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;t.exports=function(e){var t,r,m,g,v,y,b,_,x,w,k=arguments[1],M=arguments[2];if(e=Object(l(e)),c(k)&&s(k),this&&this!==Array&&i(this))t=this;else{if(!k){if(a(e))return 1!==(v=e.length)?Array.apply(null,e):((g=new Array(1))[0]=e[0],g);if(d(e)){for(g=new Array(v=e.length),r=0;r<v;++r)g[r]=e[r];return g}}g=[]}if(!d(e))if(void 0!==(x=e[n])){for(b=s(x).call(e),t&&(g=new t),_=b.next(),r=0;!_.done;)w=k?p.call(k,M,_.value,r):_.value,t?(h.value=w,f(g,r,h)):g[r]=w,_=b.next(),++r;v=r}else if(u(e)){for(v=e.length,t&&(g=new t),r=0,m=0;r<v;++r)w=e[r],r+1<v&&(y=w.charCodeAt(0))>=55296&&y<=56319&&(w+=e[++r]),w=k?p.call(k,M,w,m):w,t?(h.value=w,f(g,m,h)):g[m]=w,++m;v=m}if(void 0===v)for(v=o(e.length),t&&(g=new t(v)),r=0;r<v;++r)w=k?p.call(k,M,e[r],r):e[r],t?(h.value=w,f(g,r,h)):g[r]=w;return t&&(h.value=null,g.length=v),g}},{"../../function/is-arguments":179,"../../function/is-function":180,"../../number/to-pos-integer":186,"../../object/is-value":196,"../../object/valid-callable":205,"../../object/valid-value":207,"../../string/is-string":211,"es6-symbol":221}],179:[function(e,t,r){"use strict";var n=Object.prototype.toString,a=n.call(function(){return arguments}());t.exports=function(e){return n.call(e)===a}},{}],180:[function(e,t,r){"use strict";var n=Object.prototype.toString,a=n.call(e("./noop"));t.exports=function(e){return"function"==typeof e&&n.call(e)===a}},{"./noop":181}],181:[function(e,t,r){"use strict";t.exports=function(){}},{}],182:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Math.sign:e("./shim")},{"./is-implemented":183,"./shim":184}],183:[function(e,t,r){"use strict";t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}},{}],184:[function(e,t,r){"use strict";t.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},{}],185:[function(e,t,r){"use strict";var n=e("../math/sign"),a=Math.abs,i=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*i(a(e)):e}},{"../math/sign":182}],186:[function(e,t,r){"use strict";var n=e("./to-integer"),a=Math.max;t.exports=function(e){return a(0,n(e))}},{"./to-integer":185}],187:[function(e,t,r){"use strict";var n=e("./valid-callable"),a=e("./valid-value"),i=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(e,t){return function(r,c){var u,d=arguments[2],p=arguments[3];return r=Object(a(r)),n(c),u=s(r),p&&u.sort("function"==typeof p?i.call(p,r):void 0),"function"!=typeof e&&(e=u[e]),o.call(e,u,(function(e,n){return l.call(r,e)?o.call(c,d,r[e],e,r,n):t}))}}},{"./valid-callable":205,"./valid-value":207}],188:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Object.assign:e("./shim")},{"./is-implemented":189,"./shim":190}],189:[function(e,t,r){"use strict";t.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},{}],190:[function(e,t,r){"use strict";var n=e("../keys"),a=e("../valid-value"),i=Math.max;t.exports=function(e,t){var r,o,s,l=i(arguments.length,2);for(e=Object(a(e)),s=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},o=1;o<l;++o)t=arguments[o],n(t).forEach(s);if(void 0!==r)throw r;return e}},{"../keys":197,"../valid-value":207}],191:[function(e,t,r){"use strict";var n=e("../array/from"),a=e("./assign"),i=e("./valid-value");t.exports=function(e){var t=Object(i(e)),r=arguments[1],o=Object(arguments[2]);if(t!==e&&!r)return t;var s={};return r?n(r,(function(t){(o.ensure||t in e)&&(s[t]=e[t])})):a(s,e),s}},{"../array/from":176,"./assign":188,"./valid-value":207}],192:[function(e,t,r){"use strict";var n,a,i,o,s=Object.create;e("./set-prototype-of/is-implemented")()||(n=e("./set-prototype-of/shim")),t.exports=n?1!==n.level?s:(a={},i={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(e){i[e]="__proto__"!==e?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(a,i),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:a}),function(e,t){return s(null===e?a:e,t)}):s},{"./set-prototype-of/is-implemented":203,"./set-prototype-of/shim":204}],193:[function(e,t,r){"use strict";t.exports=e("./_iterate")("forEach")},{"./_iterate":187}],194:[function(e,t,r){"use strict";t.exports=function(e){return"function"==typeof e}},{}],195:[function(e,t,r){"use strict";var n=e("./is-value"),a={function:!0,object:!0};t.exports=function(e){return n(e)&&a[typeof e]||!1}},{"./is-value":196}],196:[function(e,t,r){"use strict";var n=e("../function/noop")();t.exports=function(e){return e!==n&&null!==e}},{"../function/noop":181}],197:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Object.keys:e("./shim")},{"./is-implemented":198,"./shim":199}],198:[function(e,t,r){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},{}],199:[function(e,t,r){"use strict";var n=e("../is-value"),a=Object.keys;t.exports=function(e){return a(n(e)?Object(e):e)}},{"../is-value":196}],200:[function(e,t,r){"use strict";var n=e("./valid-callable"),a=e("./for-each"),i=Function.prototype.call;t.exports=function(e,t){var r={},o=arguments[2];return n(t),a(e,(function(e,n,a,s){r[n]=i.call(t,o,e,n,a,s)})),r}},{"./for-each":193,"./valid-callable":205}],201:[function(e,t,r){"use strict";var n=e("./is-value"),a=Array.prototype.forEach,i=Object.create,o=function(e,t){var r;for(r in e)t[r]=e[r]};t.exports=function(e){var t=i(null);return a.call(arguments,(function(e){n(e)&&o(Object(e),t)})),t}},{"./is-value":196}],202:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Object.setPrototypeOf:e("./shim")},{"./is-implemented":203,"./shim":204}],203:[function(e,t,r){"use strict";var n=Object.create,a=Object.getPrototypeOf,i={};t.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||n;return"function"==typeof e&&a(e(t(null),i))===i}},{}],204:[function(e,t,r){"use strict";var n,a=e("../is-object"),i=e("../valid-value"),o=Object.prototype.isPrototypeOf,s=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(e,t){if(i(e),null===t||a(t))return e;throw new TypeError("Prototype must be null or an object")},t.exports=function(e){var t,r;return e?(2===e.level?e.set?(r=e.set,t=function(e,t){return r.call(n(e,t),t),e}):t=function(e,t){return n(e,t).__proto__=t,e}:t=function e(t,r){var a;return n(t,r),(a=o.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===r&&(r=e.nullPolyfill),t.__proto__=r,a&&s(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),r={},n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{(e=n.set).call(t,r)}catch(e){}if(Object.getPrototypeOf(t)===r)return{set:e,level:2}}return t.__proto__=r,Object.getPrototypeOf(t)===r?{level:2}:((t={}).__proto__=r,Object.getPrototypeOf(t)===r&&{level:1})}()),e("../create")},{"../create":192,"../is-object":195,"../valid-value":207}],205:[function(e,t,r){"use strict";t.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},{}],206:[function(e,t,r){"use strict";var n=e("./is-object");t.exports=function(e){if(!n(e))throw new TypeError(e+" is not an Object");return e}},{"./is-object":195}],207:[function(e,t,r){"use strict";var n=e("./is-value");t.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}},{"./is-value":196}],208:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?String.prototype.contains:e("./shim")},{"./is-implemented":209,"./shim":210}],209:[function(e,t,r){"use strict";var n="razdwatrzy";t.exports=function(){return"function"==typeof n.contains&&!0===n.contains("dwa")&&!1===n.contains("foo")}},{}],210:[function(e,t,r){"use strict";var n=String.prototype.indexOf;t.exports=function(e){return n.call(this,e,arguments[1])>-1}},{}],211:[function(e,t,r){"use strict";var n=Object.prototype.toString,a=n.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||n.call(e)===a)||!1}},{}],212:[function(e,t,r){"use strict";var n=Object.create(null),a=Math.random;t.exports=function(){var e;do{e=a().toString(36).slice(2)}while(n[e]);return e}},{}],213:[function(e,t,r){"use strict";var n,a=e("es5-ext/object/set-prototype-of"),i=e("es5-ext/string/#/contains"),o=e("d"),s=e("es6-symbol"),l=e("./"),c=Object.defineProperty;n=t.exports=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,e),t=t?i.call(t,"key+value")?"key+value":i.call(t,"key")?"key":"value":"value",c(this,"__kind__",o("",t))},a&&a(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),c(n.prototype,s.toStringTag,o("c","Array Iterator"))},{"./":216,d:152,"es5-ext/object/set-prototype-of":202,"es5-ext/string/#/contains":208,"es6-symbol":221}],214:[function(e,t,r){"use strict";var n=e("es5-ext/function/is-arguments"),a=e("es5-ext/object/valid-callable"),i=e("es5-ext/string/is-string"),o=e("./get"),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;t.exports=function(e,t){var r,u,d,p,h,f,m,g,v=arguments[2];if(s(e)||n(e)?r="array":i(e)?r="string":e=o(e),a(t),d=function(){p=!0},"array"!==r)if("string"!==r)for(u=e.next();!u.done;){if(l.call(t,v,u.value,d),p)return;u=e.next()}else for(f=e.length,h=0;h<f&&(m=e[h],h+1<f&&(g=m.charCodeAt(0))>=55296&&g<=56319&&(m+=e[++h]),l.call(t,v,m,d),!p);++h);else c.call(e,(function(e){return l.call(t,v,e,d),p}))}},{"./get":215,"es5-ext/function/is-arguments":179,"es5-ext/object/valid-callable":205,"es5-ext/string/is-string":211}],215:[function(e,t,r){"use strict";var n=e("es5-ext/function/is-arguments"),a=e("es5-ext/string/is-string"),i=e("./array"),o=e("./string"),s=e("./valid-iterable"),l=e("es6-symbol").iterator;t.exports=function(e){return"function"==typeof s(e)[l]?e[l]():n(e)?new i(e):a(e)?new o(e):new i(e)}},{"./array":213,"./string":218,"./valid-iterable":219,"es5-ext/function/is-arguments":179,"es5-ext/string/is-string":211,"es6-symbol":221}],216:[function(e,t,r){"use strict";var n,a=e("es5-ext/array/#/clear"),i=e("es5-ext/object/assign"),o=e("es5-ext/object/valid-callable"),s=e("es5-ext/object/valid-value"),l=e("d"),c=e("d/auto-bind"),u=e("es6-symbol"),d=Object.defineProperty,p=Object.defineProperties;t.exports=n=function(e,t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");p(this,{__list__:l("w",s(e)),__context__:l("w",t),__nextIndex__:l("w",0)}),t&&(o(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete n.prototype.constructor,p(n.prototype,i({_next:l((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()})),next:l((function(){return this._createResult(this._next())})),_createResult:l((function(e){return void 0===e?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}})),_resolve:l((function(e){return this.__list__[e]})),_unBind:l((function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)})),toString:l((function(){return"[object "+(this[u.toStringTag]||"Object")+"]"}))},c({_onAdd:l((function(e){e>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)):d(this,"__redo__",l("c",[e])))})),_onDelete:l((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:l((function(){this.__redo__&&a.call(this.__redo__),this.__nextIndex__=0}))}))),d(n.prototype,u.iterator,l((function(){return this})))},{d:152,"d/auto-bind":151,"es5-ext/array/#/clear":175,"es5-ext/object/assign":188,"es5-ext/object/valid-callable":205,"es5-ext/object/valid-value":207,"es6-symbol":221}],217:[function(e,t,r){"use strict";var n=e("es5-ext/function/is-arguments"),a=e("es5-ext/object/is-value"),i=e("es5-ext/string/is-string"),o=e("es6-symbol").iterator,s=Array.isArray;t.exports=function(e){return!(!a(e)||!s(e)&&!i(e)&&!n(e)&&"function"!=typeof e[o])}},{"es5-ext/function/is-arguments":179,"es5-ext/object/is-value":196,"es5-ext/string/is-string":211,"es6-symbol":221}],218:[function(e,t,r){"use strict";var n,a=e("es5-ext/object/set-prototype-of"),i=e("d"),o=e("es6-symbol"),s=e("./"),l=Object.defineProperty;n=t.exports=function(e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");e=String(e),s.call(this,e),l(this,"__length__",i("",e.length))},a&&a(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:i((function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()})),_resolve:i((function(e){var t,r=this.__list__[e];return this.__nextIndex__===this.__length__?r:(t=r.charCodeAt(0))>=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,i("c","String Iterator"))},{"./":216,d:152,"es5-ext/object/set-prototype-of":202,"es6-symbol":221}],219:[function(e,t,r){"use strict";var n=e("./is-iterable");t.exports=function(e){if(!n(e))throw new TypeError(e+" is not iterable");return e}},{"./is-iterable":217}],220:[function(e,r,n){(function(t,a){
/*!
 * @overview es6-promise - a tiny implementation of Promises/A+.
 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
 * @license   Licensed under MIT license
 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
 * @version   3.3.1
 */
!function(e,t){"object"==typeof n&&void 0!==r?r.exports=t():e.ES6Promise=t()}(this,(function(){"use strict";function r(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,o=void 0,s=void 0,l=function(e,t){m[i]=e,m[i+1]=t,2===(i+=2)&&(s?s(g):x())},c="undefined"!=typeof window?window:void 0,u=c||{},d=u.MutationObserver||u.WebKitMutationObserver,p="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(g,1)}}var m=new Array(1e3);function g(){for(var e=0;e<i;e+=2)(0,m[e])(m[e+1]),m[e]=void 0,m[e+1]=void 0;i=0}var v,y,b,_,x=void 0;function w(e,t){var r=arguments,n=this,a=new this.constructor(T);void 0===a[M]&&H(a);var i,o=n._state;return o?(i=r[o-1],l((function(){return B(o,a,i,n._result)}))):F(n,a,e,t),a}function k(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(T);return I(t,e),t}p?x=function(){return t.nextTick(g)}:d?(y=0,b=new d(g),_=document.createTextNode(""),b.observe(_,{characterData:!0}),x=function(){_.data=y=++y%2}):h?((v=new MessageChannel).port1.onmessage=g,x=function(){return v.port2.postMessage(0)}):x=void 0===c&&"function"==typeof e?function(){try{var t=e("vertx");return o=t.runOnLoop||t.runOnContext,function(){o(g)}}catch(e){return f()}}():f();var M=Math.random().toString(36).substring(16);function T(){}var C=void 0,S=1,L=2,A=new N;function E(e){try{return e.then}catch(e){return A.error=e,A}}function D(e,t,n){t.constructor===e.constructor&&n===w&&t.constructor.resolve===k?function(e,t){t._state===S?O(e,t._result):t._state===L?R(e,t._result):F(t,void 0,(function(t){return I(e,t)}),(function(t){return R(e,t)}))}(e,t):n===A?R(e,A.error):void 0===n?O(e,t):r(n)?function(e,t,r){l((function(e){var n=!1,a=function(e,t,r,n){try{e.call(t,r,n)}catch(e){return e}}(r,t,(function(r){n||(n=!0,t!==r?I(e,r):O(e,r))}),(function(t){n||(n=!0,R(e,t))}),e._label);!n&&a&&(n=!0,R(e,a))}),e)}(e,t,n):O(e,t)}function I(e,t){var r;e===t?R(e,new TypeError("You cannot resolve a promise with itself")):"function"==typeof(r=t)||"object"==typeof r&&null!==r?D(e,t,E(t)):O(e,t)}function P(e){e._onerror&&e._onerror(e._result),z(e)}function O(e,t){e._state===C&&(e._result=t,e._state=S,0!==e._subscribers.length&&l(z,e))}function R(e,t){e._state===C&&(e._state=L,e._result=t,l(P,e))}function F(e,t,r,n){var a=e._subscribers,i=a.length;e._onerror=null,a[i]=t,a[i+S]=r,a[i+L]=n,0===i&&e._state&&l(z,e)}function z(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,a=void 0,i=e._result,o=0;o<t.length;o+=3)n=t[o],a=t[o+r],n?B(r,n,a,i):a(i);e._subscribers.length=0}}function N(){this.error=null}var j=new N;function B(e,t,n,a){var i=r(n),o=void 0,s=void 0,l=void 0,c=void 0;if(i){if((o=function(e,t){try{return e(t)}catch(e){return j.error=e,j}}(n,a))===j?(c=!0,s=o.error,o=null):l=!0,t===o)return void R(t,new TypeError("A promises callback cannot return that same promise."))}else o=a,l=!0;t._state!==C||(i&&l?I(t,o):c?R(t,s):e===S?O(t,o):e===L&&R(t,o))}var Y=0;function H(e){e[M]=Y++,e._state=void 0,e._result=void 0,e._subscribers=[]}function V(e,t){this._instanceConstructor=e,this.promise=new e(T),this.promise[M]||H(this.promise),n(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?O(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&O(this.promise,this._result))):R(this.promise,new Error("Array Methods must be provided an Array"))}function U(e){this[M]=Y++,this._result=this._state=void 0,this._subscribers=[],T!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof U?function(e,t){try{t((function(t){I(e,t)}),(function(t){R(e,t)}))}catch(t){R(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}function W(){var e=void 0;if(void 0!==a)e=a;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=U}return V.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;this._state===C&&r<e;r++)this._eachEntry(t[r],r)},V.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===k){var a=E(e);if(a===w&&e._state!==C)this._settledAt(e._state,t,e._result);else if("function"!=typeof a)this._remaining--,this._result[t]=e;else if(r===U){var i=new r(T);D(i,e,a),this._willSettleAt(i,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},V.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===C&&(this._remaining--,e===L?R(n,r):this._result[t]=r),0===this._remaining&&O(n,this._result)},V.prototype._willSettleAt=function(e,t){var r=this;F(e,void 0,(function(e){return r._settledAt(S,t,e)}),(function(e){return r._settledAt(L,t,e)}))},U.all=function(e){return new V(this,e).promise},U.race=function(e){var t=this;return n(e)?new t((function(r,n){for(var a=e.length,i=0;i<a;i++)t.resolve(e[i]).then(r,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},U.resolve=k,U.reject=function(e){var t=new this(T);return R(t,e),t},U._setScheduler=function(e){s=e},U._setAsap=function(e){l=e},U._asap=l,U.prototype={constructor:U,then:w,catch:function(e){return this.then(null,e)}},W(),U.polyfill=W,U.Promise=U,U}))}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:483}],221:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?Symbol:e("./polyfill")},{"./is-implemented":222,"./polyfill":224}],222:[function(e,t,r){"use strict";var n={object:!0,symbol:!0};t.exports=function(){var e;if("function"!=typeof Symbol)return!1;e=Symbol("test symbol");try{String(e)}catch(e){return!1}return!!n[typeof Symbol.iterator]&&!!n[typeof Symbol.toPrimitive]&&!!n[typeof Symbol.toStringTag]}},{}],223:[function(e,t,r){"use strict";t.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}},{}],224:[function(e,t,r){"use strict";var n,a,i,o,s=e("d"),l=e("./validate-symbol"),c=Object.create,u=Object.defineProperties,d=Object.defineProperty,p=Object.prototype,h=c(null);if("function"==typeof Symbol){n=Symbol;try{String(n()),o=!0}catch(e){}}var f,m=(f=c(null),function(e){for(var t,r,n=0;f[e+(n||"")];)++n;return f[e+=n||""]=!0,d(p,t="@@"+e,s.gs(null,(function(e){r||(r=!0,d(this,t,s(e)),r=!1)}))),t});i=function(e){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return a(e)},t.exports=a=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return o?n(t):(r=c(i.prototype),t=void 0===t?"":String(t),u(r,{__description__:s("",t),__name__:s("",m(t))}))},u(a,{for:s((function(e){return h[e]?h[e]:h[e]=a(String(e))})),keyFor:s((function(e){var t;for(t in l(e),h)if(h[t]===e)return t})),hasInstance:s("",n&&n.hasInstance||a("hasInstance")),isConcatSpreadable:s("",n&&n.isConcatSpreadable||a("isConcatSpreadable")),iterator:s("",n&&n.iterator||a("iterator")),match:s("",n&&n.match||a("match")),replace:s("",n&&n.replace||a("replace")),search:s("",n&&n.search||a("search")),species:s("",n&&n.species||a("species")),split:s("",n&&n.split||a("split")),toPrimitive:s("",n&&n.toPrimitive||a("toPrimitive")),toStringTag:s("",n&&n.toStringTag||a("toStringTag")),unscopables:s("",n&&n.unscopables||a("unscopables"))}),u(i.prototype,{constructor:s(a),toString:s("",(function(){return this.__name__}))}),u(a.prototype,{toString:s((function(){return"Symbol ("+l(this).__description__+")"})),valueOf:s((function(){return l(this)}))}),d(a.prototype,a.toPrimitive,s("",(function(){var e=l(this);return"symbol"==typeof e?e:e.toString()}))),d(a.prototype,a.toStringTag,s("c","Symbol")),d(i.prototype,a.toStringTag,s("c",a.prototype[a.toStringTag])),d(i.prototype,a.toPrimitive,s("c",a.prototype[a.toPrimitive]))},{"./validate-symbol":225,d:152}],225:[function(e,t,r){"use strict";var n=e("./is-symbol");t.exports=function(e){if(!n(e))throw new TypeError(e+" is not a symbol");return e}},{"./is-symbol":223}],226:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=t||0,a=r||1;return[[e[12]+e[0],e[13]+e[1],e[14]+e[2],e[15]+e[3]],[e[12]-e[0],e[13]-e[1],e[14]-e[2],e[15]-e[3]],[e[12]+e[4],e[13]+e[5],e[14]+e[6],e[15]+e[7]],[e[12]-e[4],e[13]-e[5],e[14]-e[6],e[15]-e[7]],[n*e[12]+e[8],n*e[13]+e[9],n*e[14]+e[10],n*e[15]+e[11]],[a*e[12]-e[8],a*e[13]-e[9],a*e[14]-e[10],a*e[15]-e[11]]]}},{}],227:[function(e,t,r){"use strict";var n=e("is-string-blank");t.exports=function(e){var t=typeof e;if("string"===t){var r=e;if(0==(e=+e)&&n(r))return!1}else if("number"!==t)return!1;return e-e<1}},{"is-string-blank":424}],228:[function(e,t,r){"use strict";t.exports=function(e,t,r){switch(arguments.length){case 0:return new o([0],[0],0);case 1:return"number"==typeof e?new o(n=l(e),n,0):new o(e,l(e.length),0);case 2:if("number"==typeof t){var n=l(e.length);return new o(e,n,+t)}r=0;case 3:if(e.length!==t.length)throw new Error("state and velocity lengths must match");return new o(e,t,r)}};var n=e("cubic-hermite"),a=e("binary-search-bounds");function i(e,t,r){return Math.min(t,Math.max(e,r))}function o(e,t,r){this.dimension=e.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n<this.dimension;++n)this.bounds[0][n]=-1/0,this.bounds[1][n]=1/0;this._state=e.slice().reverse(),this._velocity=t.slice().reverse(),this._time=[r],this._scratch=[e.slice(),e.slice(),e.slice(),e.slice(),e.slice()]}var s=o.prototype;function l(e){for(var t=new Array(e),r=0;r<e;++r)t[r]=0;return t}s.flush=function(e){var t=a.gt(this._time,e)-1;t<=0||(this._time.splice(0,t),this._state.splice(0,t*this.dimension),this._velocity.splice(0,t*this.dimension))},s.curve=function(e){var t=this._time,r=t.length,o=a.le(t,e),s=this._scratch[0],l=this._state,c=this._velocity,u=this.dimension,d=this.bounds;if(o<0)for(var p=u-1,h=0;h<u;++h,--p)s[h]=l[p];else if(o>=r-1){p=l.length-1;var f=e-t[r-1];for(h=0;h<u;++h,--p)s[h]=l[p]+f*c[p]}else{p=u*(o+1)-1;var m=t[o],g=t[o+1]-m||1,v=this._scratch[1],y=this._scratch[2],b=this._scratch[3],_=this._scratch[4],x=!0;for(h=0;h<u;++h,--p)v[h]=l[p],b[h]=c[p]*g,y[h]=l[p+u],_[h]=c[p+u]*g,x=x&&v[h]===y[h]&&b[h]===_[h]&&0===b[h];if(x)for(h=0;h<u;++h)s[h]=v[h];else n(v,b,y,_,(e-m)/g,s)}var w=d[0],k=d[1];for(h=0;h<u;++h)s[h]=i(w[h],k[h],s[h]);return s},s.dcurve=function(e){var t=this._time,r=t.length,i=a.le(t,e),o=this._scratch[0],s=this._state,l=this._velocity,c=this.dimension;if(i>=r-1)for(var u=s.length-1,d=(t[r-1],0);d<c;++d,--u)o[d]=l[u];else{u=c*(i+1)-1;var p=t[i],h=t[i+1]-p||1,f=this._scratch[1],m=this._scratch[2],g=this._scratch[3],v=this._scratch[4],y=!0;for(d=0;d<c;++d,--u)f[d]=s[u],g[d]=l[u]*h,m[d]=s[u+c],v[d]=l[u+c]*h,y=y&&f[d]===m[d]&&g[d]===v[d]&&0===g[d];if(y)for(d=0;d<c;++d)o[d]=0;else for(n.derivative(f,g,m,v,(e-p)/h,o),d=0;d<c;++d)o[d]/=h}return o},s.lastT=function(){var e=this._time;return e[e.length-1]},s.stable=function(){for(var e=this._velocity,t=e.length,r=this.dimension-1;r>=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e<t||arguments.length!==r+1)){var n=this._state,a=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1];this._time.push(t,e);for(var u=0;u<2;++u)for(var d=0;d<r;++d)n.push(n[o++]),a.push(0);for(this._time.push(e),d=r;d>0;--d)n.push(i(l[d-1],c[d-1],arguments[d])),a.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e<t||arguments.length!==r+1)){var n=this._state,a=this._velocity,o=n.length-this.dimension,s=e-t,l=this.bounds,c=l[0],u=l[1],d=s>1e-6?1/s:0;this._time.push(e);for(var p=r;p>0;--p){var h=i(c[p-1],u[p-1],arguments[p]);n.push(h),a.push((h-n[o++])*d)}}},s.set=function(e){var t=this.dimension;if(!(e<this.lastT()||arguments.length!==t+1)){var r=this._state,n=this._velocity,a=this.bounds,o=a[0],s=a[1];this._time.push(e);for(var l=t;l>0;--l)r.push(i(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var n=this._state,a=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,d=u>1e-6?1/u:0;this._time.push(e);for(var p=r;p>0;--p){var h=arguments[p];n.push(i(l[p-1],c[p-1],n[o++]+h)),a.push(h*d)}}},s.idle=function(e){var t=this.lastT();if(!(e<t)){var r=this.dimension,n=this._state,a=this._velocity,o=n.length-r,s=this.bounds,l=s[0],c=s[1],u=e-t;this._time.push(e);for(var d=r-1;d>=0;--d)n.push(i(l[d],c[d],n[o]+u*a[o])),a.push(0),o+=1}}},{"binary-search-bounds":92,"cubic-hermite":146}],229:[function(e,t,r){var n=e("dtype");t.exports=function(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(e)&&e[0]&&"number"==typeof e[0][0]){var a,i,o,s,l=e[0].length,c=e.length*l;t&&"string"!=typeof t||(t=new(n(t||"float32"))(c+r));var u=t.length-r;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(a=0,o=r;a<e.length;a++)for(i=0;i<l;i++)t[o++]=null===e[a][i]?NaN:e[a][i]}else if(t&&"string"!=typeof t)t.set(e,r);else{var d=n(t||"float32");if(Array.isArray(e)||"array"===t)for(t=new d(e.length+r),a=0,o=r,s=t.length;o<s;o++,a++)t[o]=null===e[a]?NaN:e[a];else 0===r?t=new d(e):(t=new d(e.length+r)).set(e,r)}return t}},{dtype:170}],230:[function(e,t,r){"use strict";var n=e("css-font/stringify"),a=[32,126];t.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),i=e.font,o="number"==typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||a;if(i&&"string"!=typeof i&&(i=n(i)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");t=t.slice(),r.width=t[0],r.height=t[1];var d=r.getContext("2d");d.fillStyle="#000",d.fillRect(0,0,r.width,r.height),d.font=i,d.textAlign="center",d.textBaseline="middle",d.fillStyle="#fff";var p=o[0]/2,h=o[1]/2;for(c=0;c<s.length;c++)d.fillText(s[c],p,h),(p+=o[0])>t[0]-o[0]/2&&(p=o[0]/2,h+=o[1]);return r}},{"css-font/stringify":143}],231:[function(e,t,r){"use strict";function n(e,t){t||(t={}),("string"==typeof e||Array.isArray(e))&&(t.family=e);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var s=t.size||t.fontSize||t.em||48,l=t.weight||t.fontWeight||"",c=(e=[t.style||t.fontStyle||"",l,s].join(" ")+"px "+r,t.origin||"top");if(n.cache[r]&&s<=n.cache[r].em)return a(n.cache[r],c);var u=t.canvas||n.canvas,d=u.getContext("2d"),p={upper:void 0!==t.upper?t.upper:"H",lower:void 0!==t.lower?t.lower:"x",descent:void 0!==t.descent?t.descent:"p",ascent:void 0!==t.ascent?t.ascent:"h",tittle:void 0!==t.tittle?t.tittle:"i",overshoot:void 0!==t.overshoot?t.overshoot:"O"},h=Math.ceil(1.5*s);u.height=h,u.width=.5*h,d.font=e;var f={top:0};d.clearRect(0,0,h,h),d.textBaseline="top",d.fillStyle="black",d.fillText("H",0,0);var m=i(d.getImageData(0,0,h,h));d.clearRect(0,0,h,h),d.textBaseline="bottom",d.fillText("H",0,h);var g=i(d.getImageData(0,0,h,h));f.lineHeight=f.bottom=h-g+m,d.clearRect(0,0,h,h),d.textBaseline="alphabetic",d.fillText("H",0,h);var v=h-i(d.getImageData(0,0,h,h))-1+m;f.baseline=f.alphabetic=v,d.clearRect(0,0,h,h),d.textBaseline="middle",d.fillText("H",0,.5*h);var y=i(d.getImageData(0,0,h,h));f.median=f.middle=h-y-1+m-.5*h,d.clearRect(0,0,h,h),d.textBaseline="hanging",d.fillText("H",0,.5*h);var b=i(d.getImageData(0,0,h,h));f.hanging=h-b-1+m-.5*h,d.clearRect(0,0,h,h),d.textBaseline="ideographic",d.fillText("H",0,h);var _=i(d.getImageData(0,0,h,h));if(f.ideographic=h-_-1+m,p.upper&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.upper,0,0),f.upper=i(d.getImageData(0,0,h,h)),f.capHeight=f.baseline-f.upper),p.lower&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.lower,0,0),f.lower=i(d.getImageData(0,0,h,h)),f.xHeight=f.baseline-f.lower),p.tittle&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.tittle,0,0),f.tittle=i(d.getImageData(0,0,h,h))),p.ascent&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.ascent,0,0),f.ascent=i(d.getImageData(0,0,h,h))),p.descent&&(d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.descent,0,0),f.descent=o(d.getImageData(0,0,h,h))),p.overshoot){d.clearRect(0,0,h,h),d.textBaseline="top",d.fillText(p.overshoot,0,0);var x=o(d.getImageData(0,0,h,h));f.overshoot=x-v}for(var w in f)f[w]/=s;return f.em=s,n.cache[r]=f,a(f,c)}function a(e,t){var r={};for(var n in"string"==typeof t&&(t=e[t]),e)"em"!==n&&(r[n]=e[n]-t);return r}function i(e){for(var t=e.height,r=e.data,n=3;n<r.length;n+=4)if(0!==r[n])return Math.floor(.25*(n-3)/t)}function o(e){for(var t=e.height,r=e.data,n=r.length-1;n>0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/t)}t.exports=n,n.canvas=document.createElement("canvas"),n.cache={}},{}],232:[function(e,t,r){"use strict";t.exports=function(e){return new c(e||v,null)};var n=0,a=1;function i(e,t,r,n,a,i){this._color=e,this.key=t,this.value=r,this.left=n,this.right=a,this._count=i}function o(e){return new i(e._color,e.key,e.value,e.left,e.right,e._count)}function s(e,t){return new i(e,t.key,t.value,t.left,t.right,t._count)}function l(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function c(e,t){this._compare=e,this.root=t}var u=c.prototype;function d(e,t){var r;return t.left&&(r=d(e,t.left))?r:(r=e(t.key,t.value))||(t.right?d(e,t.right):void 0)}function p(e,t,r,n){if(t(e,n.key)<=0){var a;if(n.left&&(a=p(e,t,r,n.left)))return a;if(a=r(n.key,n.value))return a}if(n.right)return p(e,t,r,n.right)}function h(e,t,r,n,a){var i,o=r(e,a.key),s=r(t,a.key);if(o<=0){if(a.left&&(i=h(e,t,r,n,a.left)))return i;if(s>0&&(i=n(a.key,a.value)))return i}if(s>0&&a.right)return h(e,t,r,n,a.right)}function f(e,t){this.tree=e,this._stack=t}Object.defineProperty(u,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(u,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(u,"length",{get:function(){return this.root?this.root._count:0}}),u.insert=function(e,t){for(var r=this._compare,o=this.root,u=[],d=[];o;){var p=r(e,o.key);u.push(o),d.push(p),o=p<=0?o.left:o.right}u.push(new i(n,e,t,null,null,1));for(var h=u.length-2;h>=0;--h)o=u[h],d[h]<=0?u[h]=new i(o._color,o.key,o.value,u[h+1],o.right,o._count+1):u[h]=new i(o._color,o.key,o.value,o.left,u[h+1],o._count+1);for(h=u.length-1;h>1;--h){var f=u[h-1];if(o=u[h],f._color===a||o._color===a)break;var m=u[h-2];if(m.left===f)if(f.left===o){if(!(g=m.right)||g._color!==n){m._color=n,m.left=f.right,f._color=a,f.right=m,u[h-2]=f,u[h-1]=o,l(m),l(f),h>=3&&((v=u[h-3]).left===m?v.left=f:v.right=f);break}f._color=a,m.right=s(a,g),m._color=n,h-=1}else{if(!(g=m.right)||g._color!==n){f.right=o.left,m._color=n,m.left=o.right,o._color=a,o.left=f,o.right=m,u[h-2]=o,u[h-1]=f,l(m),l(f),l(o),h>=3&&((v=u[h-3]).left===m?v.left=o:v.right=o);break}f._color=a,m.right=s(a,g),m._color=n,h-=1}else if(f.right===o){if(!(g=m.left)||g._color!==n){m._color=n,m.right=f.left,f._color=a,f.left=m,u[h-2]=f,u[h-1]=o,l(m),l(f),h>=3&&((v=u[h-3]).right===m?v.right=f:v.left=f);break}f._color=a,m.left=s(a,g),m._color=n,h-=1}else{var g;if(!(g=m.left)||g._color!==n){var v;f.left=o.right,m._color=n,m.right=o.left,o._color=a,o.right=f,o.left=m,u[h-2]=o,u[h-1]=f,l(m),l(f),l(o),h>=3&&((v=u[h-3]).right===m?v.right=o:v.left=o);break}f._color=a,m.left=s(a,g),m._color=n,h-=1}}return u[0]._color=a,new c(r,u[0])},u.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return d(e,this.root);case 2:return p(t,this._compare,e,this.root);case 3:if(this._compare(t,r)>=0)return;return h(t,r,this._compare,e,this.root)}},Object.defineProperty(u,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new f(this,e)}}),Object.defineProperty(u,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new f(this,e)}}),u.at=function(e){if(e<0)return new f(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e<t.left._count){t=t.left;continue}e-=t.left._count}if(!e)return new f(this,r);if(e-=1,!t.right)break;if(e>=t.right._count)break;t=t.right}return new f(this,[])},u.ge=function(e){for(var t=this._compare,r=this.root,n=[],a=0;r;){var i=t(e,r.key);n.push(r),i<=0&&(a=n.length),r=i<=0?r.left:r.right}return n.length=a,new f(this,n)},u.gt=function(e){for(var t=this._compare,r=this.root,n=[],a=0;r;){var i=t(e,r.key);n.push(r),i<0&&(a=n.length),r=i<0?r.left:r.right}return n.length=a,new f(this,n)},u.lt=function(e){for(var t=this._compare,r=this.root,n=[],a=0;r;){var i=t(e,r.key);n.push(r),i>0&&(a=n.length),r=i<=0?r.left:r.right}return n.length=a,new f(this,n)},u.le=function(e){for(var t=this._compare,r=this.root,n=[],a=0;r;){var i=t(e,r.key);n.push(r),i>=0&&(a=n.length),r=i<0?r.left:r.right}return n.length=a,new f(this,n)},u.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var a=t(e,r.key);if(n.push(r),0===a)return new f(this,n);r=a<=0?r.left:r.right}return new f(this,[])},u.remove=function(e){var t=this.find(e);return t?t.remove():this},u.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var m=f.prototype;function g(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function v(e,t){return e<t?-1:e>t?1:0}Object.defineProperty(m,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(m,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),m.clone=function(){return new f(this.tree,this._stack.slice())},m.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var t=new Array(e.length),r=e[e.length-1];t[t.length-1]=new i(r._color,r.key,r.value,r.left,r.right,r._count);for(var u=e.length-2;u>=0;--u)(r=e[u]).left===e[u+1]?t[u]=new i(r._color,r.key,r.value,t[u+1],r.right,r._count):t[u]=new i(r._color,r.key,r.value,r.left,t[u+1],r._count);if((r=t[t.length-1]).left&&r.right){var d=t.length;for(r=r.left;r.right;)t.push(r),r=r.right;var p=t[d-1];for(t.push(new i(r._color,p.key,p.value,r.left,r.right,r._count)),t[d-1].key=r.key,t[d-1].value=r.value,u=t.length-2;u>=d;--u)r=t[u],t[u]=new i(r._color,r.key,r.value,r.left,t[u+1],r._count);t[d-1].left=t[d]}if((r=t[t.length-1])._color===n){var h=t[t.length-2];for(h.left===r?h.left=null:h.right===r&&(h.right=null),t.pop(),u=0;u<t.length;++u)t[u]._count--;return new c(this.tree._compare,t[0])}if(r.left||r.right){for(r.left?g(r,r.left):r.right&&g(r,r.right),r._color=a,u=0;u<t.length-1;++u)t[u]._count--;return new c(this.tree._compare,t[0])}if(1===t.length)return new c(this.tree._compare,null);for(u=0;u<t.length;++u)t[u]._count--;var f=t[t.length-2];return function(e){for(var t,r,i,c,u=e.length-1;u>=0;--u){if(t=e[u],0===u)return void(t._color=a);if((r=e[u-1]).left===t){if((i=r.right).right&&i.right._color===n)return c=(i=r.right=o(i)).right=o(i.right),r.right=i.left,i.left=r,i.right=c,i._color=r._color,t._color=a,r._color=a,c._color=a,l(r),l(i),u>1&&((d=e[u-2]).left===r?d.left=i:d.right=i),void(e[u-1]=i);if(i.left&&i.left._color===n)return c=(i=r.right=o(i)).left=o(i.left),r.right=c.left,i.left=c.right,c.left=r,c.right=i,c._color=r._color,r._color=a,i._color=a,t._color=a,l(r),l(i),l(c),u>1&&((d=e[u-2]).left===r?d.left=c:d.right=c),void(e[u-1]=c);if(i._color===a){if(r._color===n)return r._color=a,void(r.right=s(n,i));r.right=s(n,i);continue}i=o(i),r.right=i.left,i.left=r,i._color=r._color,r._color=n,l(r),l(i),u>1&&((d=e[u-2]).left===r?d.left=i:d.right=i),e[u-1]=i,e[u]=r,u+1<e.length?e[u+1]=t:e.push(t),u+=2}else{if((i=r.left).left&&i.left._color===n)return c=(i=r.left=o(i)).left=o(i.left),r.left=i.right,i.right=r,i.left=c,i._color=r._color,t._color=a,r._color=a,c._color=a,l(r),l(i),u>1&&((d=e[u-2]).right===r?d.right=i:d.left=i),void(e[u-1]=i);if(i.right&&i.right._color===n)return c=(i=r.left=o(i)).right=o(i.right),r.left=c.right,i.right=c.left,c.right=r,c.left=i,c._color=r._color,r._color=a,i._color=a,t._color=a,l(r),l(i),l(c),u>1&&((d=e[u-2]).right===r?d.right=c:d.left=c),void(e[u-1]=c);if(i._color===a){if(r._color===n)return r._color=a,void(r.left=s(n,i));r.left=s(n,i);continue}var d;i=o(i),r.left=i.right,i.right=r,i._color=r._color,r._color=n,l(r),l(i),u>1&&((d=e[u-2]).right===r?d.right=i:d.left=i),e[u-1]=i,e[u]=r,u+1<e.length?e[u+1]=t:e.push(t),u+=2}}}(t),f.left===r?f.left=null:f.right=null,new c(this.tree._compare,t[0])},Object.defineProperty(m,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(m,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(m,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),m.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(m,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),m.update=function(e){var t=this._stack;if(0===t.length)throw new Error("Can't update empty node!");var r=new Array(t.length),n=t[t.length-1];r[r.length-1]=new i(n._color,n.key,e,n.left,n.right,n._count);for(var a=t.length-2;a>=0;--a)(n=t[a]).left===t[a+1]?r[a]=new i(n._color,n.key,n.value,r[a+1],n.right,n._count):r[a]=new i(n._color,n.key,n.value,n.left,r[a+1],n._count);return new c(this.tree._compare,r[0])},m.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(m,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},{}],233:[function(e,t,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],a=607/128,i=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(e){if(e<0)return Number("0/0");for(var t=i[0],r=i.length-1;r>0;--r)t+=i[r]/(e+r);var n=e+a+.5;return.5*Math.log(2*Math.PI)+(e+.5)*Math.log(n)-n+Math.log(t)-Math.log(e)}t.exports=function e(t){if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*e(1-t));if(t>100)return Math.exp(o(t));t-=1;for(var r=n[0],a=1;a<9;a++)r+=n[a]/(t+a);var i=t+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(i,t+.5)*Math.exp(-i)*r},t.exports.log=o},{}],234:[function(e,t,r){t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("must specify type string");if(t=t||{},"undefined"==typeof document&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(r.width=t.width),"number"==typeof t.height&&(r.height=t.height);var n,a=t;try{var i=[e];0===e.indexOf("webgl")&&i.push("experimental-"+e);for(var o=0;o<i.length;o++)if(n=r.getContext(i[o],a))return n}catch(e){n=null}return n||null}},{}],235:[function(e,t,r){"use strict";t.exports=function(e,t){var r=new u(e);return r.update(t),r};var n=e("./lib/text.js"),a=e("./lib/lines.js"),i=e("./lib/background.js"),o=e("./lib/cube.js"),s=e("./lib/ticks.js"),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function u(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=i(e)}var d=u.prototype;function p(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}d.update=function(e){function t(t,r,n){if(n in e){var a,i=e[n],o=this[n];(t?Array.isArray(i)&&Array.isArray(i[0]):Array.isArray(i))?this[n]=a=[r(i[0]),r(i[1]),r(i[2])]:this[n]=a=[r(i),r(i),r(i)];for(var s=0;s<3;++s)if(a[s]!==o[s])return!0}return!1}e=e||{};var r,i=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,(function(e){if(Array.isArray(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]})),u=!1,d=!1;if("bounds"in e)for(var p=e.bounds,h=0;h<2;++h)for(var f=0;f<3;++f)p[h][f]!==this.bounds[h][f]&&(d=!0),this.bounds[h][f]=p[h][f];if("ticks"in e)for(r=e.ticks,u=!0,this.autoTicks=!1,h=0;h<3;++h)this.tickSpacing[h]=0;else i("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),d=!0,u=!0,this._firstInit=!1),d&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(h=0;h<3;++h)r[h].sort((function(e,t){return e.x-t.x}));s.equal(r,this.ticks)?u=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(u=!0),i("tickSize"),i("tickAngle"),i("tickPad"),c("tickColor");var m=l("labels");l("labelFont")&&(m=!0),o("labelEnable"),i("labelSize"),i("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),i("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),i("lineTickLength"),i("lineTickWidth"),c("lineTickColor"),o("gridEnable"),i("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),i("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor"),this._text?this._text&&(m||u)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};var h=[new p,new p,new p];function f(e,t,r,n,a){for(var i=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=n[t],u=0;u<3;++u)if(t!==u){var d=i,p=s,h=o,f=l;c&1<<u&&(d=s,p=i,h=l,f=o),d[u]=r[0][u],p[u]=r[1][u],a[u]>0?(h[u]=-1,f[u]=0):(h[u]=0,f[u]=1)}}var m=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(e){};var v=[0,0,0],y=[0,0,0],b=[0,0,0];d.draw=function(e){e=e||g;for(var t=this.gl,r=e.model||l,n=e.view||l,a=e.projection||l,i=this.bounds,s=e._ortho||!1,u=o(r,n,a,i,s),d=u.cubeEdges,p=u.axis,_=n[12],x=n[13],w=n[14],k=n[15],M=(s?2:1)*this.pixelRatio*(a[3]*_+a[7]*x+a[11]*w+a[15]*k)/t.drawingBufferHeight,T=0;T<3;++T)this.lastCubeProps.cubeEdges[T]=d[T],this.lastCubeProps.axis[T]=p[T];var C=h;for(T=0;T<3;++T)f(h[T],T,this.bounds,d,p);t=this.gl;var S,L,A,E=m;for(T=0;T<3;++T)this.backgroundEnable[T]?E[T]=p[T]:E[T]=0;for(this._background.draw(r,n,a,i,E,this.backgroundColor),this._lines.bind(r,n,a,this),T=0;T<3;++T){var D=[0,0,0];p[T]>0?D[T]=i[1][T]:D[T]=i[0][T];for(var I=0;I<2;++I){var P=(T+1+I)%3,O=(T+1+(1^I))%3;this.gridEnable[P]&&this._lines.drawGrid(P,O,this.bounds,D,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(I=0;I<2;++I)P=(T+1+I)%3,O=(T+1+(1^I))%3,this.zeroEnable[O]&&Math.min(i[0][O],i[1][O])<=0&&Math.max(i[0][O],i[1][O])>=0&&this._lines.drawZero(P,O,this.bounds,D,this.zeroLineColor[O],this.zeroLineWidth[O]*this.pixelRatio)}for(T=0;T<3;++T){this.lineEnable[T]&&this._lines.drawAxisLine(T,this.bounds,C[T].primalOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio),this.lineMirror[T]&&this._lines.drawAxisLine(T,this.bounds,C[T].mirrorOffset,this.lineColor[T],this.lineWidth[T]*this.pixelRatio);var R=c(v,C[T].primalMinor),F=c(y,C[T].mirrorMinor),z=this.lineTickLength;for(I=0;I<3;++I){var N=M/r[5*I];R[I]*=z[I]*N,F[I]*=z[I]*N}this.lineTickEnable[T]&&this._lines.drawAxisTicks(T,C[T].primalOffset,R,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio),this.lineTickMirror[T]&&this._lines.drawAxisTicks(T,C[T].mirrorOffset,F,this.lineTickColor[T],this.lineTickWidth[T]*this.pixelRatio)}function j(e){(A=[0,0,0])[e]=1}function B(e,t,r){var n=(e+1)%3,a=(e+2)%3,i=t[n],o=t[a],s=r[n],l=r[a];i>0&&l>0?j(n):i>0&&l<0?j(n):i<0&&l>0?j(n):i<0&&l<0?j(n):o>0&&s>0?j(a):o>0&&s<0?j(a):o<0&&s>0?j(a):o<0&&s<0&&j(a)}for(this._lines.unbind(),this._text.bind(r,n,a,this.pixelRatio),T=0;T<3;++T){var Y=C[T].primalMinor,H=C[T].mirrorMinor,V=c(b,C[T].primalOffset);for(I=0;I<3;++I)this.lineTickEnable[T]&&(V[I]+=M*Y[I]*Math.max(this.lineTickLength[I],0)/r[5*I]);var U=[0,0,0];if(U[T]=1,this.tickEnable[T]){for(-3600===this.tickAngle[T]?(this.tickAngle[T]=0,this.tickAlign[T]="auto"):this.tickAlign[T]=-1,L=1,"auto"===(S=[this.tickAlign[T],.5,L])[0]?S[0]=0:S[0]=parseInt(""+S[0]),A=[0,0,0],B(T,Y,H),I=0;I<3;++I)V[I]+=M*Y[I]*this.tickPad[I]/r[5*I];this._text.drawTicks(T,this.tickSize[T],this.tickAngle[T],V,this.tickColor[T],U,A,S)}if(this.labelEnable[T]){for(L=0,A=[0,0,0],this.labels[T].length>4&&(j(T),L=1),"auto"===(S=[this.labelAlign[T],.5,L])[0]?S[0]=0:S[0]=parseInt(""+S[0]),I=0;I<3;++I)V[I]+=M*Y[I]*this.labelPad[I]/r[5*I];V[T]+=.5*(i[0][T]+i[1][T]),this._text.drawLabel(T,this.labelSize[T],this.labelAngle[T],V,this.labelColor[T],[0,0,0],A,S)}}this._text.unbind()},d.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":236,"./lib/cube.js":237,"./lib/lines.js":238,"./lib/text.js":240,"./lib/ticks.js":241}],236:[function(e,t,r){"use strict";t.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,d=[0,0,0],p=[0,0,0],h=-1;h<=1;h+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),d[l]=h,p[l]=h;for(var f=-1;f<=1;f+=2){d[c]=f;for(var m=-1;m<=1;m+=2)d[u]=m,t.push(d[0],d[1],d[2],p[0],p[1],p[2]),s+=1}var g=c;c=u,u=g}var v=n(e,new Float32Array(t)),y=n(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),b=a(e,[{buffer:v,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:e.FLOAT,size:3,offset:12,stride:24}],y),_=i(e);return _.attributes.position.location=0,_.attributes.normal.location=1,new o(e,v,b,_)};var n=e("gl-buffer"),a=e("gl-vao"),i=e("./shaders").bg;function o(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(e,t,r,n,a,i){for(var o=!1,s=0;s<3;++s)o=o||a[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:n,enable:a,colors:i},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":239,"gl-buffer":243,"gl-vao":328}],237:[function(e,t,r){"use strict";t.exports=function(e,t,r,i,h){a(s,t,e),a(s,r,s);for(var y=0,b=0;b<2;++b){u[2]=i[b][2];for(var _=0;_<2;++_){u[1]=i[_][1];for(var x=0;x<2;++x)u[0]=i[x][0],p(l[y],u,s),y+=1}}var w=-1;for(b=0;b<8;++b){for(var k=l[b][3],M=0;M<3;++M)c[b][M]=l[b][M]/k;h&&(c[b][2]*=-1),k<0&&(w<0?w=b:c[b][2]<c[w][2]&&(w=b))}if(w<0){w=0;for(var T=0;T<3;++T){for(var C=(T+2)%3,S=(T+1)%3,L=-1,A=-1,E=0;E<2;++E){var D=(P=E<<T)+(E<<C)+(1-E<<S),I=P+(1-E<<C)+(E<<S);o(c[P],c[D],c[I],d)<0||(E?L=1:A=1)}if(L<0||A<0)A>L&&(w|=1<<T);else{for(E=0;E<2;++E){D=(P=E<<T)+(E<<C)+(1-E<<S),I=P+(1-E<<C)+(E<<S);var P,O=f([l[P],l[D],l[I],l[P+(1<<C)+(1<<S)]]);E?L=O:A=O}A>L&&(w|=1<<T)}}}var R=7^w,F=-1;for(b=0;b<8;++b)b!==w&&b!==R&&(F<0?F=b:c[F][1]>c[b][1]&&(F=b));var z=-1;for(b=0;b<3;++b)(j=F^1<<b)!==w&&j!==R&&(z<0&&(z=j),(S=c[j])[0]<c[z][0]&&(z=j));var N=-1;for(b=0;b<3;++b){var j;(j=F^1<<b)!==w&&j!==R&&j!==z&&(N<0&&(N=j),(S=c[j])[0]>c[N][0]&&(N=j))}var B=m;B[0]=B[1]=B[2]=0,B[n.log2(z^F)]=F&z,B[n.log2(F^N)]=F&N;var Y=7^N;Y===w||Y===R?(Y=7^z,B[n.log2(N^Y)]=Y&N):B[n.log2(z^Y)]=Y&z;var H=g,V=w;for(T=0;T<3;++T)H[T]=V&1<<T?-1:1;return v};var n=e("bit-twiddle"),a=e("gl-mat4/multiply"),i=e("split-polygon"),o=e("robust-orientation"),s=new Array(16),l=new Array(8),c=new Array(8),u=new Array(3),d=[0,0,0];function p(e,t,r){for(var n=0;n<4;++n){e[n]=r[12+n];for(var a=0;a<3;++a)e[n]+=t[a]*r[4*a+n]}}!function(){for(var e=0;e<8;++e)l[e]=[1,1,1,1],c[e]=[1,1,1]}();var h=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function f(e){for(var t=0;t<h.length;++t)if((e=i.positive(e,h[t])).length<3)return 0;var r=e[0],n=r[0]/r[3],a=r[1]/r[3],o=0;for(t=1;t+1<e.length;++t){var s=e[t],l=e[t+1],c=s[0]/s[3]-n,u=s[1]/s[3]-a,d=l[0]/l[3]-n,p=l[1]/l[3]-a;o+=Math.abs(c*p-u*d)}return o}var m=[1,1,1],g=[0,0,0],v={cubeEdges:m,axis:g}},{"bit-twiddle":93,"gl-mat4/multiply":269,"robust-orientation":508,"split-polygon":525}],238:[function(e,t,r){"use strict";t.exports=function(e,t,r){var o=[],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[0,0,0];o.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var d=0;d<3;++d){for(var p=o.length/3|0,f=0;f<r[d].length;++f){var m=+r[d][f].x;o.push(m,0,1,m,1,1,m,0,-1,m,0,-1,m,1,1,m,1,-1)}var g=o.length/3|0;s[d]=p,l[d]=g-p,p=o.length/3|0;for(var v=0;v<r[d].length;++v)m=+r[d][v].x,o.push(m,0,1,m,1,1,m,0,-1,m,0,-1,m,1,1,m,1,-1);g=o.length/3|0,c[d]=p,u[d]=g-p}var y=n(e,new Float32Array(o)),b=a(e,[{buffer:y,type:e.FLOAT,size:3,stride:0,offset:0}]),_=i(e);return _.attributes.position.location=0,new h(e,y,b,_,l,s,u,c)};var n=e("gl-buffer"),a=e("gl-vao"),i=e("./shaders").line,o=[0,0,0],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[1,1];function d(e){return e[0]=e[1]=e[2]=0,e}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function h(e,t,r,n,a,i,o,s){this.gl=e,this.vertBuffer=t,this.vao=r,this.shader=n,this.tickCount=a,this.tickOffset=i,this.gridCount=o,this.gridOffset=s}var f=h.prototype;f.bind=function(e,t,r){this.shader.bind(),this.shader.uniforms.model=e,this.shader.uniforms.view=t,this.shader.uniforms.projection=r,u[0]=this.gl.drawingBufferWidth,u[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=u,this.vao.bind()},f.unbind=function(){this.vao.unbind()},f.drawAxisLine=function(e,t,r,n,a){var i=d(s);this.shader.uniforms.majorAxis=s,i[e]=t[1][e]-t[0][e],this.shader.uniforms.minorAxis=i;var o,u=p(c,r);u[e]+=t[0][e],this.shader.uniforms.offset=u,this.shader.uniforms.lineWidth=a,this.shader.uniforms.color=n,(o=d(l))[(e+2)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6),(o=d(l))[(e+1)%3]=1,this.shader.uniforms.screenAxis=o,this.vao.draw(this.gl.TRIANGLES,6)},f.drawAxisTicks=function(e,t,r,n,a){if(this.tickCount[e]){var i=d(o);i[e]=1,this.shader.uniforms.majorAxis=i,this.shader.uniforms.offset=t,this.shader.uniforms.minorAxis=r,this.shader.uniforms.color=n,this.shader.uniforms.lineWidth=a;var s=d(l);s[e]=1,this.shader.uniforms.screenAxis=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[e],this.tickOffset[e])}},f.drawGrid=function(e,t,r,n,a,i){if(this.gridCount[e]){var u=d(s);u[t]=r[1][t]-r[0][t],this.shader.uniforms.minorAxis=u;var h=p(c,n);h[t]+=r[0][t],this.shader.uniforms.offset=h;var f=d(o);f[e]=1,this.shader.uniforms.majorAxis=f;var m=d(l);m[e]=1,this.shader.uniforms.screenAxis=m,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=a,this.vao.draw(this.gl.TRIANGLES,this.gridCount[e],this.gridOffset[e])}},f.drawZero=function(e,t,r,n,a,i){var o=d(s);this.shader.uniforms.majorAxis=o,o[e]=r[1][e]-r[0][e],this.shader.uniforms.minorAxis=o;var u=p(c,n);u[e]+=r[0][e],this.shader.uniforms.offset=u;var h=d(l);h[t]=1,this.shader.uniforms.screenAxis=h,this.shader.uniforms.lineWidth=i,this.shader.uniforms.color=a,this.vao.draw(this.gl.TRIANGLES,6)},f.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},{"./shaders":239,"gl-buffer":243,"gl-vao":328}],239:[function(e,t,r){"use strict";var n=e("glslify"),a=e("gl-shader"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, majorAxis, minorAxis, screenAxis;\nuniform float lineWidth;\nuniform vec2 screenShape;\n\nvec3 project(vec3 p) {\n  vec4 pp = projection * view * model * vec4(p, 1.0);\n  return pp.xyz / max(pp.w, 0.0001);\n}\n\nvoid main() {\n  vec3 major = position.x * majorAxis;\n  vec3 minor = position.y * minorAxis;\n\n  vec3 vPosition = major + minor + offset;\n  vec3 pPosition = project(vPosition);\n  vec3 offset = project(vPosition + screenAxis * position.z);\n\n  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;\n\n  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = color;\n}"]);r.line=function(e){return a(e,i,o,null,[{name:"position",type:"vec3"}])};var s=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\nuniform vec3 offset, axis, alignDir, alignOpt;\nuniform float scale, angle, pixelScale;\nuniform vec2 resolution;\n\nvec3 project(vec3 p) {\n  vec4 pp = projection * view * model * vec4(p, 1.0);\n  return pp.xyz / max(pp.w, 0.0001);\n}\n\nfloat computeViewAngle(vec3 a, vec3 b) {\n  vec3 A = project(a);\n  vec3 B = project(b);\n\n  return atan(\n    (B.y - A.y) * resolution.y,\n    (B.x - A.x) * resolution.x\n  );\n}\n\nconst float PI = 3.141592;\nconst float TWO_PI = 2.0 * PI;\nconst float HALF_PI = 0.5 * PI;\nconst float ONE_AND_HALF_PI = 1.5 * PI;\n\nint option = int(floor(alignOpt.x + 0.001));\nfloat hv_ratio =       alignOpt.y;\nbool enableAlign =    (alignOpt.z != 0.0);\n\nfloat mod_angle(float a) {\n  return mod(a, PI);\n}\n\nfloat positive_angle(float a) {\n  return mod_angle((a < 0.0) ?\n    a + TWO_PI :\n    a\n  );\n}\n\nfloat look_upwards(float a) {\n  float b = positive_angle(a);\n  return ((b > HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n    b - PI :\n    b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n  // ratio controls the ratio between being horizontal to (vertical + horizontal)\n  // if ratio is set to 0.5 then it is 50%, 50%.\n  // when using a higher ratio e.g. 0.75 the result would\n  // likely be more horizontal than vertical.\n\n  float b = positive_angle(a);\n\n  return\n    (b < (      ratio) * HALF_PI) ? 0.0 :\n    (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n    (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n    (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n                                    0.0;\n}\n\nfloat roundTo(float a, float b) {\n  return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n  float b = positive_angle(a);\n  float div = TWO_PI / float(n);\n  float c = roundTo(b, div);\n  return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n  return\n    (option >  2) ? look_round_n_directions(rawAngle + delta, option) :       // option 3-n: round to n directions\n    (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n    (option == 1) ? rawAngle + delta :       // use free angle, and flip to align with one direction of the axis\n    (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n    (option ==-1) ? 0.0 :                    // useful for backward compatibility, all texts remains horizontal\n                    rawAngle;                // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n                   (axis.y == 0.0) &&\n                   (axis.z == 0.0);\n\nvoid main() {\n  //Compute world offset\n  float axisDistance = position.z;\n  vec3 dataPosition = axisDistance * axis + offset;\n\n  float beta = angle; // i.e. user defined attributes for each tick\n\n  float axisAngle;\n  float clipAngle;\n  float flip;\n\n  if (enableAlign) {\n    axisAngle = (isAxisTitle) ? HALF_PI :\n                      computeViewAngle(dataPosition, dataPosition + axis);\n    clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n    axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n    clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n    flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n                vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n    beta += applyAlignOption(clipAngle, flip * PI);\n  }\n\n  //Compute plane offset\n  vec2 planeCoord = position.xy * pixelScale;\n\n  mat2 planeXform = scale * mat2(\n     cos(beta), sin(beta),\n    -sin(beta), cos(beta)\n  );\n\n  vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n  //Compute clip position\n  vec3 clipPosition = project(dataPosition);\n\n  //Apply text offset in clip coordinates\n  clipPosition += vec3(viewOffset, 0.0);\n\n  //Done\n  gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = color;\n}"]);r.text=function(e){return a(e,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n  vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n  vec3 realNormal = signAxis * normal;\n\n  if(dot(realNormal, enable) > 0.0) {\n    vec3 minRange = min(bounds[0], bounds[1]);\n    vec3 maxRange = max(bounds[0], bounds[1]);\n    vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n    gl_Position = projection * view * model * vec4(nPosition, 1.0);\n  } else {\n    gl_Position = vec4(0,0,0,0);\n  }\n\n  colorChannel = abs(realNormal);\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n  gl_FragColor = colorChannel.x * colors[0] +\n                 colorChannel.y * colors[1] +\n                 colorChannel.z * colors[2];\n}"]);r.bg=function(e){return a(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":303,glslify:410}],240:[function(e,t,r){(function(r){"use strict";t.exports=function(e,t,r,i,s,l){var u=n(e),d=a(e,[{buffer:u,size:3}]),p=o(e);p.attributes.position.location=0;var h=new c(e,p,u,d);return h.update(t,r,i,s,l),h};var n=e("gl-buffer"),a=e("gl-vao"),i=e("vectorize-text"),o=e("./shaders").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};function c(e,t,r,n){this.gl=e,this.shader=t,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var u=c.prototype,d=[0,0];u.bind=function(e,t,r,n){this.vao.bind(),this.shader.bind();var a=this.shader.uniforms;a.model=e,a.view=t,a.projection=r,a.pixelScale=n,d[0]=this.gl.drawingBufferWidth,d[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=d},u.unbind=function(){this.vao.unbind()},u.update=function(e,t,r,n,a){var o=[];function s(e,t,r,n,a,s){var c=l[r];c||(c=l[r]={});var u=c[t];u||(u=c[t]=function(e,t){try{return i(e,t)}catch(t){return console.warn('error vectorizing text:"'+e+'" error:',t),{cells:[],positions:[]}}}(t,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:a,styletags:s}));for(var d=(n||12)/12,p=u.positions,h=u.cells,f=0,m=h.length;f<m;++f)for(var g=h[f],v=2;v>=0;--v){var y=p[g[v]];o.push(d*y[0],-d*y[1],e)}}for(var c=[0,0,0],u=[0,0,0],d=[0,0,0],p=[0,0,0],h={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},f=0;f<3;++f){d[f]=o.length/3|0,s(.5*(e[0][f]+e[1][f]),t[f],r[f],12,1.25,h),p[f]=(o.length/3|0)-d[f],c[f]=o.length/3|0;for(var m=0;m<n[f].length;++m)n[f][m].text&&s(n[f][m].x,n[f][m].text,n[f][m].font||a,n[f][m].fontSize||12,1.25,h);u[f]=(o.length/3|0)-c[f]}this.buffer.update(o),this.tickOffset=c,this.tickCount=u,this.labelOffset=d,this.labelCount=p},u.drawTicks=function(e,t,r,n,a,i,o,s){this.tickCount[e]&&(this.shader.uniforms.axis=i,this.shader.uniforms.color=a,this.shader.uniforms.angle=r,this.shader.uniforms.scale=t,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.tickCount[e],this.tickOffset[e]))},u.drawLabel=function(e,t,r,n,a,i,o,s){this.labelCount[e]&&(this.shader.uniforms.axis=i,this.shader.uniforms.color=a,this.shader.uniforms.angle=r,this.shader.uniforms.scale=t,this.shader.uniforms.offset=n,this.shader.uniforms.alignDir=o,this.shader.uniforms.alignOpt=s,this.vao.draw(this.gl.TRIANGLES,this.labelCount[e],this.labelOffset[e]))},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}}).call(this,e("_process"))},{"./shaders":239,_process:483,"gl-buffer":243,"gl-vao":328,"vectorize-text":548}],241:[function(e,t,r){"use strict";function n(e,t){var r=e+"",n=r.indexOf("."),a=0;n>=0&&(a=r.length-n-1);var i=Math.pow(10,a),o=Math.round(e*t*i),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/i,c=o%i;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),a){for(var d=""+c;d.length<a;)d="0"+d;return u+"."+d}return u}r.create=function(e,t){for(var r=[],a=0;a<3;++a){for(var i=[],o=(e[0][a],e[1][a],0);o*t[a]<=e[1][a];++o)i.push({x:o*t[a],text:n(t[a],o)});for(o=-1;o*t[a]>=e[0][a];--o)i.push({x:o*t[a],text:n(t[a],o)});r.push(i)}return r},r.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;n<e[r].length;++n){var a=e[r][n],i=t[r][n];if(a.x!==i.x||a.text!==i.text||a.font!==i.font||a.fontColor!==i.fontColor||a.fontSize!==i.fontSize||a.dx!==i.dx||a.dy!==i.dy)return!1}}return!0}},{}],242:[function(e,t,r){"use strict";t.exports=function(e,t,r,l,d){var p=t.model||c,h=t.view||c,v=t.projection||c,y=t._ortho||!1,b=e.bounds,_=(d=d||i(p,h,v,b,y)).axis;o(u,h,p),o(u,v,u);for(var x=m,w=0;w<3;++w)x[w].lo=1/0,x[w].hi=-1/0,x[w].pixelsPerDataUnit=1/0;var k=n(s(u,u));s(u,u);for(var M=0;M<3;++M){var T=(M+1)%3,C=(M+2)%3,S=g;e:for(w=0;w<2;++w){var L=[];if(_[M]<0!=!!w){S[M]=b[w][M];for(var A=0;A<2;++A){S[T]=b[A^w][T];for(var E=0;E<2;++E)S[C]=b[E^A^w][C],L.push(S.slice())}var D=y?5:4;for(A=D;A===D;++A){if(0===L.length)continue e;L=a.positive(L,k[A])}for(A=0;A<L.length;++A){C=L[A];var I=f(g,u,C,r,l);for(E=0;E<3;++E)x[E].lo=Math.min(x[E].lo,C[E]),x[E].hi=Math.max(x[E].hi,C[E]),E!==M&&(x[E].pixelsPerDataUnit=Math.min(x[E].pixelsPerDataUnit,Math.abs(I[E])))}}}}return x};var n=e("extract-frustum-planes"),a=e("split-polygon"),i=e("./lib/cube.js"),o=e("gl-mat4/multiply"),s=e("gl-mat4/transpose"),l=e("gl-vec4/transformMat4"),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),u=new Float32Array(16);function d(e,t,r){this.lo=e,this.hi=t,this.pixelsPerDataUnit=r}var p=[0,0,0,1],h=[0,0,0,1];function f(e,t,r,n,a){for(var i=0;i<3;++i){for(var o=p,s=h,c=0;c<3;++c)s[c]=o[c]=r[c];s[3]=o[3]=1,s[i]+=1,l(s,s,t),s[3]<0&&(e[i]=1/0),o[i]-=1,l(o,o,t),o[3]<0&&(e[i]=1/0);var u=(o[0]/o[3]-s[0]/s[3])*n,d=(o[1]/o[3]-s[1]/s[3])*a;e[i]=.25*Math.sqrt(u*u+d*d)}return e}var m=[new d(1/0,-1/0,1/0),new d(1/0,-1/0,1/0),new d(1/0,-1/0,1/0)],g=[0,0,0]},{"./lib/cube.js":237,"extract-frustum-planes":226,"gl-mat4/multiply":269,"gl-mat4/transpose":278,"gl-vec4/transformMat4":399,"split-polygon":525}],243:[function(e,t,r){"use strict";var n=e("typedarray-pool"),a=e("ndarray-ops"),i=e("ndarray"),o=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(e,t,r,n,a){this.gl=e,this.type=t,this.handle=r,this.length=n,this.usage=a}var l=s.prototype;function c(e,t,r,n,a,i){var o=a.length*a.BYTES_PER_ELEMENT;if(i<0)return e.bufferData(t,a,n),o;if(o+i>r)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,i,a),r}function u(e,t){for(var r=n.malloc(e.length,t),a=e.length,i=0;i<a;++i)r[i]=e[i];return r}l.bind=function(){this.gl.bindBuffer(this.type,this.handle)},l.unbind=function(){this.gl.bindBuffer(this.type,null)},l.dispose=function(){this.gl.deleteBuffer(this.handle)},l.update=function(e,t){if("number"!=typeof t&&(t=-1),this.bind(),"object"==typeof e&&void 0!==e.shape){var r=e.dtype;if(o.indexOf(r)<0&&(r="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(r=gl.getExtension("OES_element_index_uint")&&"uint16"!==r?"uint32":"uint16"),r===e.dtype&&function(e,t){for(var r=1,n=t.length-1;n>=0;--n){if(t[n]!==r)return!1;r*=e[n]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=n.malloc(e.size,r),l=i(s,e.shape);a.assign(l,e),this.length=c(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),n.free(s)}}else if(Array.isArray(e)){var d;d=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,t<0?d:d.subarray(0,e.length),t),n.free(d)}else if("object"==typeof e&&"number"==typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!=typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},t.exports=function(e,t,r,n){if(r=r||e.ARRAY_BUFFER,n=n||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==e.DYNAMIC_DRAW&&n!==e.STATIC_DRAW&&n!==e.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var a=e.createBuffer(),i=new s(e,r,a,0,n);return i.update(t),i}},{ndarray:451,"ndarray-ops":445,"typedarray-pool":543}],244:[function(e,t,r){"use strict";var n=e("gl-vec3");t.exports=function(e,t){var r=e.positions,a=e.vectors,i={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),i;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,d=1/0,p=-1/0,h=null,f=null,m=[],g=1/0,v=!1,y=0;y<r.length;y++){var b=r[y];s=Math.min(b[0],s),l=Math.max(b[0],l),c=Math.min(b[1],c),u=Math.max(b[1],u),d=Math.min(b[2],d),p=Math.max(b[2],p);var _=a[y];if(n.length(_)>o&&(o=n.length(_)),y){var x=2*n.distance(h,b)/(n.length(f)+n.length(_));x?(g=Math.min(g,x),v=!1):v=!0}v||(h=b,f=_),m.push(_)}var w=[s,c,d],k=[l,u,p];t&&(t[0]=w,t[1]=k),0===o&&(o=1);var M=1/o;isFinite(g)||(g=1),i.vectorScale=g;var T=e.coneSize||.5;e.absoluteConeSize&&(T=e.absoluteConeSize*M),i.coneScale=T,y=0;for(var C=0;y<r.length;y++)for(var S=(b=r[y])[0],L=b[1],A=b[2],E=m[y],D=n.length(E)*M,I=0;I<8;I++){i.positions.push([S,L,A,C++]),i.positions.push([S,L,A,C++]),i.positions.push([S,L,A,C++]),i.positions.push([S,L,A,C++]),i.positions.push([S,L,A,C++]),i.positions.push([S,L,A,C++]),i.vectors.push(E),i.vectors.push(E),i.vectors.push(E),i.vectors.push(E),i.vectors.push(E),i.vectors.push(E),i.vertexIntensity.push(D,D,D),i.vertexIntensity.push(D,D,D);var P=i.positions.length;i.cells.push([P-6,P-5,P-4],[P-3,P-2,P-1])}return i};var a=e("./lib/shaders");t.exports.createMesh=e("./create_mesh"),t.exports.createConeMesh=function(e,r){return t.exports.createMesh(e,r,{shaders:a,traceType:"cone"})}},{"./create_mesh":245,"./lib/shaders":246,"gl-vec3":347}],245:[function(e,t,r){"use strict";var n=e("gl-shader"),a=e("gl-buffer"),i=e("gl-vao"),o=e("gl-texture2d"),s=e("gl-mat4/multiply"),l=e("gl-mat4/invert"),c=e("ndarray"),u=e("colormap"),d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e,t,r,n,a,i,o,s,l,c,u){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.pickShader=n,this.trianglePositions=a,this.triangleVectors=i,this.triangleColors=s,this.triangleUVs=l,this.triangleIds=o,this.triangleVAO=c,this.triangleCount=0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.traceType=u,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=d,this._view=d,this._projection=d,this._resolution=[1,1]}var h=p.prototype;h.isOpaque=function(){return this.opacity>=1},h.isTransparent=function(){return this.opacity<1},h.pickSlots=1,h.setPickBase=function(e){this.pickId=e},h.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var a=t[n],i=0;i<3;++i)r[4*n+i]=a[i];r[4*n+3]=255*a[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,n=e.positions,a=e.vectors;if(n&&r&&a){var i=[],o=[],s=[],l=[],d=[];this.cells=r,this.positions=n,this.vectors=a;var p=e.meshColor||[1,1,1,1],h=e.vertexIntensity,f=1/0,m=-1/0;if(h)if(e.vertexIntensityBounds)f=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g<h.length;++g){var v=h[g];f=Math.min(f,v),m=Math.max(m,v)}else for(g=0;g<n.length;++g)v=n[g][2],f=Math.min(f,v),m=Math.max(m,v);for(this.intensity=h||function(e){for(var t=e.length,r=new Array(t),n=0;n<t;++n)r[n]=e[n][2];return r}(n),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],g=0;g<n.length;++g)for(var y=n[g],b=0;b<3;++b)!isNaN(y[b])&&isFinite(y[b])&&(this.bounds[0][b]=Math.min(this.bounds[0][b],y[b]),this.bounds[1][b]=Math.max(this.bounds[1][b],y[b]));var _=0;e:for(g=0;g<r.length;++g){var x=r[g];switch(x.length){case 3:for(b=0;b<3;++b){y=n[k=x[b]];for(var w=0;w<3;++w)if(isNaN(y[w])||!isFinite(y[w]))continue e}for(b=0;b<3;++b){var k;y=n[k=x[2-b]],i.push(y[0],y[1],y[2],y[3]);var M=a[k];o.push(M[0],M[1],M[2],M[3]||0);var T,C=p;3===C.length?s.push(C[0],C[1],C[2],1):s.push(C[0],C[1],C[2],C[3]),T=h?[(h[k]-f)/(m-f),0]:[(y[2]-f)/(m-f),0],l.push(T[0],T[1]),d.push(g)}_+=1}}this.triangleCount=_,this.trianglePositions.update(i),this.triangleVectors.update(o),this.triangleColors.update(s),this.triangleUVs.update(l),this.triangleIds.update(new Uint32Array(d))}},h.drawTransparent=h.draw=function(e){e=e||{};for(var t=this.gl,r=e.model||d,n=e.view||d,a=e.projection||d,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);var c={model:r,view:n,projection:a,inverseModel:d.slice(),clipBounds:i,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};c.inverseModel=l(c.inverseModel,c.model),t.disable(t.CULL_FACE),this.texture.bind(0);var u=new Array(16);for(s(u,c.view,c.model),s(u,c.projection,u),l(u,u),o=0;o<3;++o)c.eyePosition[o]=u[12+o]/u[15];var p=u[15];for(o=0;o<3;++o)p+=this.lightPosition[o]*u[4*o+3];for(o=0;o<3;++o){for(var h=u[12+o],f=0;f<3;++f)h+=u[4*f+o]*this.lightPosition[f];c.lightPosition[o]=h/p}if(this.triangleCount>0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},h.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||d,n=e.view||d,a=e.projection||d,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:a,clipBounds:i,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},h.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions[r[1]].slice(0,3),a={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?a.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(a.intensity=this.intensity[r[1]],a.velocity=this.vectors[r[1]].slice(0,3),a.divergence=this.vectors[r[1]][3],a.index=t),a},h.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},t.exports=function(e,t,r){var s=r.shaders;1===arguments.length&&(e=(t=e).gl);var l=function(e,t){var r=n(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(e,s),u=function(e,t){var r=n(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(e,s),d=o(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));d.generateMipmap(),d.minFilter=e.LINEAR_MIPMAP_LINEAR,d.magFilter=e.LINEAR;var h=a(e),f=a(e),m=a(e),g=a(e),v=a(e),y=new p(e,d,l,u,h,f,v,m,g,i(e,[{buffer:h,type:e.FLOAT,size:4},{buffer:v,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:g,type:e.FLOAT,size:2},{buffer:f,type:e.FLOAT,size:4}]),r.traceType||"cone");return y.update(t),y}},{colormap:127,"gl-buffer":243,"gl-mat4/invert":267,"gl-mat4/multiply":269,"gl-shader":303,"gl-texture2d":323,"gl-vao":328,ndarray:451}],246:[function(e,t,r){var n=e("glslify"),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n//   segment + 0 top vertex\n//   segment + 1 perimeter vertex a+1\n//   segment + 2 perimeter vertex a\n//   segment + 3 center base vertex\n//   segment + 4 perimeter vertex a\n//   segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n  const float segmentCount = 8.0;\n\n  float index = rawIndex - floor(rawIndex /\n    (segmentCount * 6.0)) *\n    (segmentCount * 6.0);\n\n  float segment = floor(0.001 + index/6.0);\n  float segmentIndex = index - (segment*6.0);\n\n  normal = -normalize(d);\n\n  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n    return mix(vec3(0.0), -d, coneOffset);\n  }\n\n  float nextAngle = (\n    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\n    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\n  ) ? 1.0 : 0.0;\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\n  vec3 v2 = v1 - d;\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d)*0.25;\n  vec3 y = v * sin(angle) * length(d)*0.25;\n  vec3 v3 = v2 + x + y;\n  if (segmentIndex < 3.0) {\n    vec3 tx = u * sin(angle);\n    vec3 ty = v * -cos(angle);\n    vec3 tangent = tx + ty;\n    normal = normalize(cross(v3 - v1, tangent));\n  }\n\n  if (segmentIndex == 0.0) {\n    return mix(d, vec3(0.0), coneOffset);\n  }\n  return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  // Scale the vector magnitude to stay constant with\n  // model & view changes.\n  vec3 normal;\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n  //Lighting geometry parameters\n  vec4 cameraCoordinate = view * conePosition;\n  cameraCoordinate.xyz /= cameraCoordinate.w;\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n  // vec4 m_position  = model * vec4(conePosition, 1.0);\n  vec4 t_position  = view * conePosition;\n  gl_Position      = projection * t_position;\n\n  f_color          = color;\n  f_data           = conePosition.xyz;\n  f_position       = position.xyz;\n  f_uv             = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n\n  if(gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n//   segment + 0 top vertex\n//   segment + 1 perimeter vertex a+1\n//   segment + 2 perimeter vertex a\n//   segment + 3 center base vertex\n//   segment + 4 perimeter vertex a\n//   segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n  const float segmentCount = 8.0;\n\n  float index = rawIndex - floor(rawIndex /\n    (segmentCount * 6.0)) *\n    (segmentCount * 6.0);\n\n  float segment = floor(0.001 + index/6.0);\n  float segmentIndex = index - (segment*6.0);\n\n  normal = -normalize(d);\n\n  if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n    return mix(vec3(0.0), -d, coneOffset);\n  }\n\n  float nextAngle = (\n    (segmentIndex > 0.99 &&  segmentIndex < 1.01) ||\n    (segmentIndex > 4.99 &&  segmentIndex < 5.01)\n  ) ? 1.0 : 0.0;\n  float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n  vec3 v1 = mix(d, vec3(0.0), coneOffset);\n  vec3 v2 = v1 - d;\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d)*0.25;\n  vec3 y = v * sin(angle) * length(d)*0.25;\n  vec3 v3 = v2 + x + y;\n  if (segmentIndex < 3.0) {\n    vec3 tx = u * sin(angle);\n    vec3 ty = v * -cos(angle);\n    vec3 tangent = tx + ty;\n    normal = normalize(cross(v3 - v1, tangent));\n  }\n\n  if (segmentIndex == 0.0) {\n    return mix(d, vec3(0.0), coneOffset);\n  }\n  return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  vec3 normal;\n  vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n  vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n  gl_Position = projection * view * conePosition;\n  f_id        = id;\n  f_position  = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:410}],247:[function(e,t,r){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],248:[function(e,t,r){var n=e("./1.0/numbers");t.exports=function(e){return n[e]}},{"./1.0/numbers":247}],249:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=n(t),o=a(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=i(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,o,l);return c.update(e),c};var n=e("gl-buffer"),a=e("gl-vao"),i=e("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.shader=n,this.buffer=t,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=e.view||o,a=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var i=n[12],s=n[13],l=n[14],c=n[15],u=(e._ortho?2:1)*this.pixelRatio*(a[3]*i+a[7]*s+a[11]*l+a[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var d=0;d<3;++d)t.lineWidth(this.lineWidth[d]*this.pixelRatio),r.capSize=this.capSize[d]*u,this.lineCount[d]&&t.drawArrays(t.LINES,this.lineOffset[d],this.lineCount[d]);this.vao.unbind()};var u=function(){for(var e=new Array(3),t=0;t<3;++t){for(var r=[],n=1;n<=2;++n)for(var a=-1;a<=1;a+=2){var i=[0,0,0];i[(n+t)%3]=a,r.push(i)}e[t]=r}return e}();function d(e,t,r,n){for(var a=u[n],i=0;i<a.length;++i){var o=a[i];e.push(t[0],t[1],t[2],r[0],r[1],r[2],r[3],o[0],o[1],o[2])}return a.length}l.update=function(e){"lineWidth"in(e=e||{})&&(this.lineWidth=e.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in e&&(this.capSize=e.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var t=e.color||[[0,0,0],[0,0,0],[0,0,0]],r=e.position,n=e.error;if(Array.isArray(t[0])||(t=[t,t,t]),r&&n){var a=[],i=r.length,o=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var s=0;s<3;++s){this.lineOffset[s]=o;e:for(var l=0;l<i;++l){for(var u=r[l],p=0;p<3;++p)if(isNaN(u[p])||!isFinite(u[p]))continue e;var h,f=n[l],m=t[s];Array.isArray(m[0])&&(m=t[l]),3===m.length?m=[m[0],m[1],m[2],1]:4===m.length&&(m=[m[0],m[1],m[2],m[3]],!this.hasAlpha&&m[3]<1&&(this.hasAlpha=!0)),isNaN(f[0][s])||isNaN(f[1][s])||(f[0][s]<0&&((h=u.slice())[s]+=f[0][s],a.push(u[0],u[1],u[2],m[0],m[1],m[2],m[3],0,0,0,h[0],h[1],h[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,h),o+=2+d(a,h,m,s)),f[1][s]>0&&((h=u.slice())[s]+=f[1][s],a.push(u[0],u[1],u[2],m[0],m[1],m[2],m[3],0,0,0,h[0],h[1],h[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,h),o+=2+d(a,h,m,s)))}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(a)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":250,"gl-buffer":243,"gl-vao":328}],250:[function(e,t,r){"use strict";var n=e("glslify"),a=e("gl-shader"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n  vec4 worldPosition  = model * vec4(position, 1.0);\n  worldPosition       = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n  gl_Position         = projection * view * worldPosition;\n  fragColor           = color;\n  fragPosition        = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n  if (\n    outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n    fragColor.a * opacity == 0.\n  ) discard;\n\n  gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(e){return a(e,i,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":303,glslify:410}],251:[function(e,t,r){"use strict";var n=e("gl-texture2d");t.exports=function(e,t,r,n){a||(a=e.FRAMEBUFFER_UNSUPPORTED,i=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var a=new Array(r),i=0;i<n;++i)a[i]=e.COLOR_ATTACHMENT0+i;for(i=n;i<r;++i)a[i]=e.NONE;l[n]=a}}(e,c),Array.isArray(t)&&(n=r,r=0|t[1],t=0|t[0]),"number"!=typeof t)throw new Error("gl-fbo: Missing shape parameter");var u=e.getParameter(e.MAX_RENDERBUFFER_SIZE);if(t<0||t>u||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var d=1;if("color"in(n=n||{})){if((d=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(d>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(d>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+d+" draw buffers")}}var p=e.UNSIGNED_BYTE,h=e.getExtension("OES_texture_float");if(n.float&&d>0){if(!h)throw new Error("gl-fbo: Context does not support floating point textures");p=e.FLOAT}else n.preferFloat&&d>0&&h&&(p=e.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new f(e,t,r,p,d,m,g,c)};var a,i,o,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function d(e){switch(e){case a:throw new Error("gl-fbo: Framebuffer unsupported");case i:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function p(e,t,r,a,i,o){if(!a)return null;var s=n(e,t,r,i,a);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function h(e,t,r,n,a){var i=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,i),e.renderbufferStorage(e.RENDERBUFFER,n,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,a,e.RENDERBUFFER,i),i}function f(e,t,r,n,a,i,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(a);for(var f=0;f<a;++f)this.color[f]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=n,this._useDepth=i,this._useStencil=o;var m=this,g=[0|t,0|r];Object.defineProperties(g,{0:{get:function(){return m._shape[0]},set:function(e){return m.width=e}},1:{get:function(){return m._shape[1]},set:function(e){return m.height=e}}}),this._shapeVector=g,function(e){var t=c(e.gl),r=e.gl,n=e.handle=r.createFramebuffer(),a=e._shape[0],i=e._shape[1],o=e.color.length,s=e._ext,f=e._useStencil,m=e._useDepth,g=e._colorType;r.bindFramebuffer(r.FRAMEBUFFER,n);for(var v=0;v<o;++v)e.color[v]=p(r,a,i,g,r.RGBA,r.COLOR_ATTACHMENT0+v);0===o?(e._color_rb=h(r,a,i,r.RGBA4,r.COLOR_ATTACHMENT0),s&&s.drawBuffersWEBGL(l[0])):o>1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?f?e.depth=p(r,a,i,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=p(r,a,i,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&f?e._depth_rb=h(r,a,i,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=h(r,a,i,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):f&&(e._depth_rb=h(r,a,i,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var b=r.checkFramebufferStatus(r.FRAMEBUFFER);if(b!==r.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),v=0;v<e.color.length;++v)e.color[v].dispose(),e.color[v]=null;e._color_rb&&(r.deleteRenderbuffer(e._color_rb),e._color_rb=null),u(r,t),d(b)}u(r,t)}(this)}var m=f.prototype;function g(e,t,r){if(e._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(e._shape[0]!==t||e._shape[1]!==r){var n=e.gl,a=n.getParameter(n.MAX_RENDERBUFFER_SIZE);if(t<0||t>a||r<0||r>a)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var i=c(n),o=0;o<e.color.length;++o)e.color[o].shape=e._shape;e._color_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,e._color_rb),n.renderbufferStorage(n.RENDERBUFFER,n.RGBA4,e._shape[0],e._shape[1])),e.depth&&(e.depth.shape=e._shape),e._depth_rb&&(n.bindRenderbuffer(n.RENDERBUFFER,e._depth_rb),e._useDepth&&e._useStencil?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,e._shape[0],e._shape[1]):e._useDepth?n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,e._shape[0],e._shape[1]):e._useStencil&&n.renderbufferStorage(n.RENDERBUFFER,n.STENCIL_INDEX,e._shape[0],e._shape[1])),n.bindFramebuffer(n.FRAMEBUFFER,e.handle);var s=n.checkFramebufferStatus(n.FRAMEBUFFER);s!==n.FRAMEBUFFER_COMPLETE&&(e.dispose(),u(n,i),d(s)),u(n,i)}}Object.defineProperties(m,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(e){if(Array.isArray(e)||(e=[0|e,0|e]),2!==e.length)throw new Error("gl-fbo: Shape vector must be length 2");var t=0|e[0],r=0|e[1];return g(this,t,r),[t,r]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(e){return g(this,e|=0,this._shape[1]),e},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(e){return e|=0,g(this,this._shape[0],e),e},enumerable:!1}}),m.bind=function(){if(!this._destroyed){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.handle),e.viewport(0,0,this._shape[0],this._shape[1])}},m.dispose=function(){if(!this._destroyed){this._destroyed=!0;var e=this.gl;e.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(e.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var t=0;t<this.color.length;++t)this.color[t].dispose(),this.color[t]=null;this._color_rb&&(e.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},{"gl-texture2d":323}],252:[function(e,t,r){var n=e("sprintf-js").sprintf,a=e("gl-constants/lookup"),i=e("glsl-shader-name"),o=e("add-line-numbers");t.exports=function(e,t,r){"use strict";var s=i(t)||"of unknown name (see npm glsl-shader-name)",l="unknown type";void 0!==r&&(l=r===a.FRAGMENT_SHADER?"fragment":"vertex");for(var c=n("Error compiling %s shader %s:\n",l,s),u=n("%s%s",c,e),d=e.split("\n"),p={},h=0;h<d.length;h++){var f=d[h];if(""!==f&&"\0"!==f){var m=parseInt(f.split(":")[2]);if(isNaN(m))throw new Error(n("Could not parse error: %s",f));p[m]=f}}var g=o(t).split("\n");for(h=0;h<g.length;h++)if(p[h+3]||p[h+2]||p[h+1]){var v=g[h];if(c+=v+"\n",p[h+1]){var y=p[h+1];y=y.substr(y.split(":",3).join(":").length+1).trim(),c+=n("^^^ %s\n\n",y)}}return{long:c.trim(),short:u.trim()}}},{"add-line-numbers":63,"gl-constants/lookup":248,"glsl-shader-name":402,"sprintf-js":526}],253:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.gl,n=o(r,l.vertex,l.fragment),a=o(r,l.pickVertex,l.pickFragment),i=s(r),u=s(r),d=s(r),p=s(r),h=new c(e,n,a,i,u,d,p);return h.update(t),e.addObject(h),h};var n=e("binary-search-bounds"),a=e("iota-array"),i=e("typedarray-pool"),o=e("gl-shader"),s=e("gl-buffer"),l=e("./lib/shaders");function c(e,t,r,n,a,i,o){this.plot=e,this.shader=t,this.pickShader=r,this.positionBuffer=n,this.weightBuffer=a,this.colorBuffer=i,this.idBuffer=o,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var u,d=c.prototype,p=[0,0,1,0,0,1,1,0,1,1,0,1];d.draw=(u=[1,0,0,0,1,0,0,0,1],function(){var e=this.plot,t=this.shader,r=this.bounds,n=this.numVertices;if(!(n<=0)){var a=e.gl,i=e.dataBox,o=r[2]-r[0],s=r[3]-r[1],l=i[2]-i[0],c=i[3]-i[1];u[0]=2*o/l,u[4]=2*s/c,u[6]=2*(r[0]-i[0])/l-1,u[7]=2*(r[1]-i[1])/c-1,t.bind();var d=t.uniforms;d.viewTransform=u,d.shape=this.shape;var p=t.attributes;this.positionBuffer.bind(),p.position.pointer(),this.weightBuffer.bind(),p.weight.pointer(a.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),p.color.pointer(a.UNSIGNED_BYTE,!0),a.drawArrays(a.TRIANGLES,0,n)}}),d.drawPick=function(){var e=[1,0,0,0,1,0,0,0,1],t=[0,0,0,0];return function(r){var n=this.plot,a=this.pickShader,i=this.bounds,o=this.numVertices;if(!(o<=0)){var s=n.gl,l=n.dataBox,c=i[2]-i[0],u=i[3]-i[1],d=l[2]-l[0],p=l[3]-l[1];e[0]=2*c/d,e[4]=2*u/p,e[6]=2*(i[0]-l[0])/d-1,e[7]=2*(i[1]-l[1])/p-1;for(var h=0;h<4;++h)t[h]=r>>8*h&255;this.pickOffset=r,a.bind();var f=a.uniforms;f.viewTransform=e,f.pickOffset=t,f.shape=this.shape;var m=a.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),d.pick=function(e,t,r){var n=this.pickOffset,a=this.shape[0]*this.shape[1];if(r<n||r>=n+a)return null;var i=r-n,o=this.xData,s=this.yData;return{object:this,pointId:i,dataCoord:[o[i%this.shape[0]],s[i/this.shape[0]|0]]}},d.update=function(e){var t=(e=e||{}).shape||[0,0],r=e.x||a(t[0]),o=e.y||a(t[1]),s=e.z||new Float32Array(t[0]*t[1]);this.xData=r,this.yData=o;var l=e.colorLevels||[0],c=e.colorValues||[0,0,0,1],u=l.length,d=this.bounds,h=d[0]=r[0],f=d[1]=o[0],m=1/((d[2]=r[r.length-1])-h),g=1/((d[3]=o[o.length-1])-f),v=t[0],y=t[1];this.shape=[v,y];var b=(v-1)*(y-1)*(p.length>>>1);this.numVertices=b;for(var _=i.mallocUint8(4*b),x=i.mallocFloat32(2*b),w=i.mallocUint8(2*b),k=i.mallocUint32(b),M=0,T=0;T<y-1;++T)for(var C=g*(o[T]-f),S=g*(o[T+1]-f),L=0;L<v-1;++L)for(var A=m*(r[L]-h),E=m*(r[L+1]-h),D=0;D<p.length;D+=2){var I,P,O,R,F=p[D],z=p[D+1],N=s[(T+z)*v+(L+F)],j=n.le(l,N);if(j<0)I=c[0],P=c[1],O=c[2],R=c[3];else if(j===u-1)I=c[4*u-4],P=c[4*u-3],O=c[4*u-2],R=c[4*u-1];else{var B=(N-l[j])/(l[j+1]-l[j]),Y=1-B,H=4*j,V=4*(j+1);I=Y*c[H]+B*c[V],P=Y*c[H+1]+B*c[V+1],O=Y*c[H+2]+B*c[V+2],R=Y*c[H+3]+B*c[V+3]}_[4*M]=255*I,_[4*M+1]=255*P,_[4*M+2]=255*O,_[4*M+3]=255*R,x[2*M]=.5*A+.5*E,x[2*M+1]=.5*C+.5*S,w[2*M]=F,w[2*M+1]=z,k[M]=T*v+L,M+=1}this.positionBuffer.update(x),this.weightBuffer.update(w),this.colorBuffer.update(_),this.idBuffer.update(k),i.free(x),i.free(_),i.free(w),i.free(k)},d.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},{"./lib/shaders":254,"binary-search-bounds":255,"gl-buffer":243,"gl-shader":303,"iota-array":417,"typedarray-pool":543}],254:[function(e,t,r){"use strict";var n=e("glslify");t.exports={fragment:n(["precision lowp float;\n#define GLSLIFY 1\nvarying vec4 fragColor;\nvoid main() {\n  gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\n}\n"]),vertex:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 color;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragColor;\n\nvoid main() {\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n  fragColor = color;\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n"]),pickFragment:n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nuniform vec2 shape;\nuniform vec4 pickOffset;\n\nvoid main() {\n  vec2 d = step(.5, vWeight);\n  vec4 id = fragId + pickOffset;\n  id.x += d.x + d.y*shape.x;\n\n  id.y += floor(id.x / 256.0);\n  id.x -= floor(id.x / 256.0) * 256.0;\n\n  id.z += floor(id.y / 256.0);\n  id.y -= floor(id.y / 256.0) * 256.0;\n\n  id.w += floor(id.z / 256.0);\n  id.z -= floor(id.z / 256.0) * 256.0;\n\n  gl_FragColor = id/255.;\n}\n"]),pickVertex:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\nattribute vec2 weight;\n\nuniform vec2 shape;\nuniform mat3 viewTransform;\n\nvarying vec4 fragId;\nvarying vec2 vWeight;\n\nvoid main() {\n  vWeight = weight;\n\n  fragId = pickId;\n\n  vec3 vPosition = viewTransform * vec3( position + (weight-.5)/(shape-1.) , 1.0);\n  gl_Position = vec4(vPosition.xy, 0, vPosition.z);\n}\n"])}},{glslify:410}],255:[function(e,t,r){arguments[4][112][0].apply(r,arguments)},{dup:112}],256:[function(e,t,r){var n=e("glslify"),a=e("gl-shader"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, nextPosition;\nattribute float arcLength, lineWidth;\nattribute vec4 color;\n\nuniform vec2 screenShape;\nuniform float pixelRatio;\nuniform mat4 model, view, projection;\n\nvarying vec4 fragColor;\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\n\nvec4 project(vec3 p) {\n  return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n  vec4 startPoint = project(position);\n  vec4 endPoint   = project(nextPosition);\n\n  vec2 A = startPoint.xy / startPoint.w;\n  vec2 B =   endPoint.xy /   endPoint.w;\n\n  float clipAngle = atan(\n    (B.y - A.y) * screenShape.y,\n    (B.x - A.x) * screenShape.x\n  );\n\n  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(\n    sin(clipAngle),\n    -cos(clipAngle)\n  ) / screenShape;\n\n  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);\n\n  worldPosition = position;\n  pixelArcLength = arcLength;\n  fragColor = color;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3      clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float     dashScale;\nuniform float     opacity;\n\nvarying vec3    worldPosition;\nvarying float   pixelArcLength;\nvarying vec4    fragColor;\n\nvoid main() {\n  if (\n    outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n    fragColor.a * opacity == 0.\n  ) discard;\n\n  float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n  if(dashWeight < 0.5) {\n    discard;\n  }\n  gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX  1.70141184e38\n#define FLOAT_MIN  1.17549435e-38\n\nlowp vec4 encode_float_1540259130(highp float v) {\n  highp float av = abs(v);\n\n  //Handle special cases\n  if(av < FLOAT_MIN) {\n    return vec4(0.0, 0.0, 0.0, 0.0);\n  } else if(v > FLOAT_MAX) {\n    return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n  } else if(v < -FLOAT_MAX) {\n    return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n  }\n\n  highp vec4 c = vec4(0,0,0,0);\n\n  //Compute exponent and mantissa\n  highp float e = floor(log2(av));\n  highp float m = av * pow(2.0, -e) - 1.0;\n  \n  //Unpack mantissa\n  c[1] = floor(128.0 * m);\n  m -= c[1] / 128.0;\n  c[2] = floor(32768.0 * m);\n  m -= c[2] / 32768.0;\n  c[3] = floor(8388608.0 * m);\n  \n  //Unpack exponent\n  highp float ebias = e + 127.0;\n  c[0] = floor(ebias / 2.0);\n  ebias -= c[0] * 2.0;\n  c[1] += floor(ebias) * 128.0; \n\n  //Unpack sign bit\n  c[0] += 128.0 * step(0.0, -v);\n\n  //Scale back to range\n  return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n  gl_FragColor = vec4(pickId/255.0, encode_float_1540259130(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(e){return a(e,i,o,null,l)},r.createPickShader=function(e){return a(e,i,s,null,l)}},{"gl-shader":303,glslify:410}],257:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,r=u(t);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=d(t);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(t),c=a(t,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),p=l(new Array(1024),[256,1,4]),h=0;h<1024;++h)p.data[h]=255;var f=i(t,p);f.wrap=t.REPEAT;var m=new g(t,r,o,s,c,f);return m.update(e),m};var n=e("gl-buffer"),a=e("gl-vao"),i=e("gl-texture2d"),o=e("glsl-read-float"),s=e("binary-search-bounds"),l=e("ndarray"),c=e("./lib/shaders"),u=c.createShader,d=c.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(e,t){for(var r=0,n=0;n<3;++n){var a=e[n]-t[n];r+=a*a}return Math.sqrt(r)}function f(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)t[0][r]=Math.max(e[0][r],t[0][r]),t[1][r]=Math.min(e[1][r],t[1][r]);return t}function m(e,t,r,n){this.arcLength=e,this.position=t,this.index=r,this.dataCoordinate=n}function g(e,t,r,n,a,i){this.gl=e,this.shader=t,this.pickShader=r,this.buffer=n,this.vao=a,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=i,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var v=g.prototype;v.isTransparent=function(){return this.hasAlpha},v.isOpaque=function(){return!this.hasAlpha},v.pickSlots=1,v.setPickBase=function(e){this.pickId=e},v.drawTransparent=v.draw=function(e){if(this.vertexCount){var t=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:e.model||p,view:e.view||p,projection:e.projection||p,clipBounds:f(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},v.drawPick=function(e){if(this.vertexCount){var t=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:e.model||p,view:e.view||p,projection:e.projection||p,pickId:this.pickId,clipBounds:f(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},v.update=function(e){var t,r;this.dirty=!0;var n=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var a=[],i=[],o=[],c=0,u=0,d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],p=e.position||e.positions;if(p){var f=e.color||e.colors||[0,0,0,1],m=e.lineWidth||1,g=!1;e:for(t=1;t<p.length;++t){var v,y,b,_=p[t-1],x=p[t];for(i.push(c),o.push(_.slice()),r=0;r<3;++r){if(isNaN(_[r])||isNaN(x[r])||!isFinite(_[r])||!isFinite(x[r])){if(!n&&a.length>0){for(var w=0;w<24;++w)a.push(a[a.length-12]);u+=2,g=!0}continue e}d[0][r]=Math.min(d[0][r],_[r],x[r]),d[1][r]=Math.max(d[1][r],_[r],x[r])}Array.isArray(f[0])?(v=f.length>t-1?f[t-1]:f.length>0?f[f.length-1]:[0,0,0,1],y=f.length>t?f[t]:f.length>0?f[f.length-1]:[0,0,0,1]):v=y=f,3===v.length&&(v=[v[0],v[1],v[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),b=Array.isArray(m)?m.length>t-1?m[t-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var k=c;if(c+=h(_,x),g){for(r=0;r<2;++r)a.push(_[0],_[1],_[2],x[0],x[1],x[2],k,b,v[0],v[1],v[2],v[3]);u+=2,g=!1}a.push(_[0],_[1],_[2],x[0],x[1],x[2],k,b,v[0],v[1],v[2],v[3],_[0],_[1],_[2],x[0],x[1],x[2],k,-b,v[0],v[1],v[2],v[3],x[0],x[1],x[2],_[0],_[1],_[2],c,-b,y[0],y[1],y[2],y[3],x[0],x[1],x[2],_[0],_[1],_[2],c,b,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(a),i.push(c),o.push(p[p.length-1].slice()),this.bounds=d,this.vertexCount=u,this.points=o,this.arcLength=i,"dashes"in e){var M=e.dashes.slice();for(M.unshift(0),t=1;t<M.length;++t)M[t]=M[t-1]+M[t];var T=l(new Array(1024),[256,1,4]);for(t=0;t<256;++t){for(r=0;r<4;++r)T.set(t,0,r,0);1&s.le(M,M[M.length-1]*t/255)?T.set(t,0,0,0):T.set(t,0,0,255)}this.texture.setPixels(T)}},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},v.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=o(e.value[0],e.value[1],e.value[2],0),r=s.le(this.arcLength,t);if(r<0)return null;if(r===this.arcLength.length-1)return new m(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),r);for(var n=this.points[r],a=this.points[Math.min(r+1,this.points.length-1)],i=(t-this.arcLength[r])/(this.arcLength[r+1]-this.arcLength[r]),l=1-i,c=[0,0,0],u=0;u<3;++u)c[u]=l*n[u]+i*a[u];var d=Math.min(i<.5?r:r+1,this.points.length-1);return new m(t,c,d,this.points[d])}},{"./lib/shaders":256,"binary-search-bounds":258,"gl-buffer":243,"gl-texture2d":323,"gl-vao":328,"glsl-read-float":401,ndarray:451}],258:[function(e,t,r){arguments[4][112][0].apply(r,arguments)},{dup:112}],259:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*i-a*n;return o?(o=1/o,e[0]=i*o,e[1]=-n*o,e[2]=-a*o,e[3]=r*o,e):null}},{}],260:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=u*o-s*c,p=-u*i+s*l,h=c*i-o*l,f=r*d+n*p+a*h;return f?(f=1/f,e[0]=d*f,e[1]=(-u*n+a*c)*f,e[2]=(s*n-a*o)*f,e[3]=p*f,e[4]=(u*r-a*l)*f,e[5]=(-s*r+a*i)*f,e[6]=h*f,e[7]=(-c*r+n*l)*f,e[8]=(o*r-n*i)*f,e):null}},{}],261:[function(e,t,r){t.exports=function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},{}],262:[function(e,t,r){t.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],263:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],d=e[10],p=e[11],h=e[12],f=e[13],m=e[14],g=e[15];return(t*o-r*i)*(d*g-p*m)-(t*s-n*i)*(u*g-p*f)+(t*l-a*i)*(u*m-d*f)+(r*s-n*o)*(c*g-p*h)-(r*l-a*o)*(c*m-d*h)+(n*l-a*s)*(c*f-u*h)}},{}],264:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,s=n+n,l=a+a,c=r*o,u=n*o,d=n*s,p=a*o,h=a*s,f=a*l,m=i*o,g=i*s,v=i*l;return e[0]=1-d-f,e[1]=u+v,e[2]=p-g,e[3]=0,e[4]=u-v,e[5]=1-c-f,e[6]=h+m,e[7]=0,e[8]=p+g,e[9]=h-m,e[10]=1-c-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],265:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=n+n,l=a+a,c=i+i,u=n*s,d=n*l,p=n*c,h=a*l,f=a*c,m=i*c,g=o*s,v=o*l,y=o*c;return e[0]=1-(h+m),e[1]=d+y,e[2]=p-v,e[3]=0,e[4]=d-y,e[5]=1-(u+m),e[6]=f+g,e[7]=0,e[8]=p+v,e[9]=f-g,e[10]=1-(u+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},{}],266:[function(e,t,r){t.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{}],267:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],p=t[10],h=t[11],f=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*o,b=r*l-a*o,_=r*c-i*o,x=n*l-a*s,w=n*c-i*s,k=a*c-i*l,M=u*m-d*f,T=u*g-p*f,C=u*v-h*f,S=d*g-p*m,L=d*v-h*m,A=p*v-h*g,E=y*A-b*L+_*S+x*C-w*T+k*M;return E?(E=1/E,e[0]=(s*A-l*L+c*S)*E,e[1]=(a*L-n*A-i*S)*E,e[2]=(m*k-g*w+v*x)*E,e[3]=(p*w-d*k-h*x)*E,e[4]=(l*C-o*A-c*T)*E,e[5]=(r*A-a*C+i*T)*E,e[6]=(g*_-f*k-v*b)*E,e[7]=(u*k-p*_+h*b)*E,e[8]=(o*L-s*C+c*M)*E,e[9]=(n*C-r*L-i*M)*E,e[10]=(f*w-m*_+v*y)*E,e[11]=(d*_-u*w-h*y)*E,e[12]=(s*T-o*S-l*M)*E,e[13]=(r*S-n*T+a*M)*E,e[14]=(m*b-f*x-g*y)*E,e[15]=(u*x-d*b+p*y)*E,e):null}},{}],268:[function(e,t,r){var n=e("./identity");t.exports=function(e,t,r,a){var i,o,s,l,c,u,d,p,h,f,m=t[0],g=t[1],v=t[2],y=a[0],b=a[1],_=a[2],x=r[0],w=r[1],k=r[2];return Math.abs(m-x)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-k)<1e-6?n(e):(d=m-x,p=g-w,h=v-k,f=1/Math.sqrt(d*d+p*p+h*h),i=b*(h*=f)-_*(p*=f),o=_*(d*=f)-y*h,s=y*p-b*d,(f=Math.sqrt(i*i+o*o+s*s))?(i*=f=1/f,o*=f,s*=f):(i=0,o=0,s=0),l=p*s-h*o,c=h*i-d*s,u=d*o-p*i,(f=Math.sqrt(l*l+c*c+u*u))?(l*=f=1/f,c*=f,u*=f):(l=0,c=0,u=0),e[0]=i,e[1]=l,e[2]=d,e[3]=0,e[4]=o,e[5]=c,e[6]=p,e[7]=0,e[8]=s,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*m+o*g+s*v),e[13]=-(l*m+c*g+u*v),e[14]=-(d*m+p*g+h*v),e[15]=1,e)}},{"./identity":266}],269:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],p=t[9],h=t[10],f=t[11],m=t[12],g=t[13],v=t[14],y=t[15],b=r[0],_=r[1],x=r[2],w=r[3];return e[0]=b*n+_*s+x*d+w*m,e[1]=b*a+_*l+x*p+w*g,e[2]=b*i+_*c+x*h+w*v,e[3]=b*o+_*u+x*f+w*y,b=r[4],_=r[5],x=r[6],w=r[7],e[4]=b*n+_*s+x*d+w*m,e[5]=b*a+_*l+x*p+w*g,e[6]=b*i+_*c+x*h+w*v,e[7]=b*o+_*u+x*f+w*y,b=r[8],_=r[9],x=r[10],w=r[11],e[8]=b*n+_*s+x*d+w*m,e[9]=b*a+_*l+x*p+w*g,e[10]=b*i+_*c+x*h+w*v,e[11]=b*o+_*u+x*f+w*y,b=r[12],_=r[13],x=r[14],w=r[15],e[12]=b*n+_*s+x*d+w*m,e[13]=b*a+_*l+x*p+w*g,e[14]=b*i+_*c+x*h+w*v,e[15]=b*o+_*u+x*f+w*y,e}},{}],270:[function(e,t,r){t.exports=function(e,t,r,n,a,i,o){var s=1/(t-r),l=1/(n-a),c=1/(i-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(a+n)*l,e[14]=(o+i)*c,e[15]=1,e}},{}],271:[function(e,t,r){t.exports=function(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}},{}],272:[function(e,t,r){t.exports=function(e,t,r,n){var a,i,o,s,l,c,u,d,p,h,f,m,g,v,y,b,_,x,w,k,M,T,C,S,L=n[0],A=n[1],E=n[2],D=Math.sqrt(L*L+A*A+E*E);return Math.abs(D)<1e-6?null:(L*=D=1/D,A*=D,E*=D,a=Math.sin(r),i=Math.cos(r),o=1-i,s=t[0],l=t[1],c=t[2],u=t[3],d=t[4],p=t[5],h=t[6],f=t[7],m=t[8],g=t[9],v=t[10],y=t[11],b=L*L*o+i,_=A*L*o+E*a,x=E*L*o-A*a,w=L*A*o-E*a,k=A*A*o+i,M=E*A*o+L*a,T=L*E*o+A*a,C=A*E*o-L*a,S=E*E*o+i,e[0]=s*b+d*_+m*x,e[1]=l*b+p*_+g*x,e[2]=c*b+h*_+v*x,e[3]=u*b+f*_+y*x,e[4]=s*w+d*k+m*M,e[5]=l*w+p*k+g*M,e[6]=c*w+h*k+v*M,e[7]=u*w+f*k+y*M,e[8]=s*T+d*C+m*S,e[9]=l*T+p*C+g*S,e[10]=c*T+h*C+v*S,e[11]=u*T+f*C+y*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},{}],273:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],p=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+c*n,e[5]=o*a+u*n,e[6]=s*a+d*n,e[7]=l*a+p*n,e[8]=c*a-i*n,e[9]=u*a-o*n,e[10]=d*a-s*n,e[11]=p*a-l*n,e}},{}],274:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],d=t[10],p=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-c*n,e[1]=o*a-u*n,e[2]=s*a-d*n,e[3]=l*a-p*n,e[8]=i*n+c*a,e[9]=o*n+u*a,e[10]=s*n+d*a,e[11]=l*n+p*a,e}},{}],275:[function(e,t,r){t.exports=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],p=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+c*n,e[1]=o*a+u*n,e[2]=s*a+d*n,e[3]=l*a+p*n,e[4]=c*a-i*n,e[5]=u*a-o*n,e[6]=d*a-s*n,e[7]=p*a-l*n,e}},{}],276:[function(e,t,r){t.exports=function(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},{}],277:[function(e,t,r){t.exports=function(e,t,r){var n,a,i,o,s,l,c,u,d,p,h,f,m=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],p=t[9],h=t[10],f=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=p,e[10]=h,e[11]=f,e[12]=n*m+s*g+d*v+t[12],e[13]=a*m+l*g+p*v+t[13],e[14]=i*m+c*g+h*v+t[14],e[15]=o*m+u*g+f*v+t[15]),e}},{}],278:[function(e,t,r){t.exports=function(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},{}],279:[function(e,t,r){"use strict";t.exports=function(e,t){switch(t.length){case 0:break;case 1:e[0]=1/t[0];break;case 4:n(e,t);break;case 9:a(e,t);break;case 16:i(e,t);break;default:throw new Error("currently supports matrices up to 4x4")}return e};var n=e("gl-mat2/invert"),a=e("gl-mat3/invert"),i=e("gl-mat4/invert")},{"gl-mat2/invert":259,"gl-mat3/invert":260,"gl-mat4/invert":267}],280:[function(e,t,r){"use strict";var n=e("barycentric"),a=e("polytope-closest-point/lib/closest_point_2d.js");function i(e,t){for(var r=[0,0,0,0],n=0;n<4;++n)for(var a=0;a<4;++a)r[a]+=e[4*n+a]*t[n];return r}function o(e,t,r,n,a){for(var o=i(n,i(r,i(t,[e[0],e[1],e[2],1]))),s=0;s<3;++s)o[s]/=o[3];return[.5*a[0]*(1+o[0]),.5*a[1]*(1-o[1])]}function s(e,t){for(var r=[0,0,0],n=0;n<e.length;++n)for(var a=e[n],i=t[n],o=0;o<3;++o)r[o]+=i*a[o];return r}t.exports=function(e,t,r,i,l,c){if(1===e.length)return[0,e[0].slice()];for(var u=new Array(e.length),d=0;d<e.length;++d)u[d]=o(e[d],r,i,l,c);var p=0,h=1/0;for(d=0;d<u.length;++d){for(var f=0,m=0;m<2;++m)f+=Math.pow(u[d][m]-t[m],2);f<h&&(h=f,p=d)}var g=function(e,t){if(2===e.length){for(var r=0,i=0,o=0;o<2;++o)r+=Math.pow(t[o]-e[0][o],2),i+=Math.pow(t[o]-e[1][o],2);return r=Math.sqrt(r),i=Math.sqrt(i),r+i<1e-6?[1,0]:[i/(r+i),r/(i+r)]}if(3===e.length){var s=[0,0];return a(e[0],e[1],e[2],t,s),n(e,s)}return[]}(u,t),v=0;for(d=0;d<3;++d){if(g[d]<-.001||g[d]>1.0001)return null;v+=g[d]}return Math.abs(v-1)>.001?null:[p,s(e,g),g]}},{barycentric:74,"polytope-closest-point/lib/closest_point_2d.js":482}],281:[function(e,t,r){var n=e("glslify"),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n           , view\n           , projection\n           , inverseModel;\nuniform vec3 eyePosition\n           , lightPosition;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n  return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n  gl_Position      = project(position);\n\n  //Lighting geometry parameters\n  vec4 cameraCoordinate = view * vec4(position , 1.0);\n  cameraCoordinate.xyz /= cameraCoordinate.w;\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n  f_normal  = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n  f_color          = color;\n  f_data           = position;\n  f_uv             = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n            , fresnel\n            , kambient\n            , kdiffuse\n            , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n           , f_lightDirection\n           , f_eyeDirection\n           , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  if (f_color.a == 0.0 ||\n    outOfRange(clipBounds[0], clipBounds[1], f_data)\n  ) discard;\n\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n\n  if(gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n  //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n  f_color = color;\n  f_data  = position;\n  f_uv    = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n    gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n  } else {\n    gl_Position = projection * view * model * vec4(position, 1.0);\n  }\n  gl_PointSize = pointSize;\n  f_color = color;\n  f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n  if(dot(pointR, pointR) > 0.25) {\n    discard;\n  }\n  gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n  f_id        = id;\n  f_position  = position;\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3  position;\nattribute float pointSize;\nattribute vec4  id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n    gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n  } else {\n    gl_Position  = projection * view * model * vec4(position, 1.0);\n    gl_PointSize = pointSize;\n  }\n  f_id         = id;\n  f_position   = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n  gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n  gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:u,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"}]}},{glslify:410}],282:[function(e,t,r){"use strict";var n=e("gl-shader"),a=e("gl-buffer"),i=e("gl-vao"),o=e("gl-texture2d"),s=e("normals"),l=e("gl-mat4/multiply"),c=e("gl-mat4/invert"),u=e("ndarray"),d=e("colormap"),p=e("simplicial-complex-contour"),h=e("typedarray-pool"),f=e("./lib/shaders"),m=e("./lib/closest-point"),g=f.meshShader,v=f.wireShader,y=f.pointShader,b=f.pickShader,_=f.pointPickShader,x=f.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(e,t,r,n,a,i,o,s,l,c,u,d,p,h,f,m,g,v,y,b,_,x,k,M,T,C,S){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=a,this.pickShader=i,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=p,this.triangleUVs=d,this.triangleIds=c,this.triangleVAO=h,this.triangleCount=0,this.lineWidth=1,this.edgePositions=f,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=b,this.pointColors=x,this.pointUVs=k,this.pointSizes=M,this.pointIds=_,this.pointVAO=T,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=C,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var M=k.prototype;function T(e,t){if(!t)return 1;if(!t.length)return 1;for(var r=0;r<t.length;++r){if(t.length<2)return 1;if(t[r][0]===e)return t[r][1];if(t[r][0]>e&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}function C(e){var t=n(e,y.vertex,y.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.pointSize.location=4,t}function S(e){var t=n(e,b.vertex,b.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t}function L(e){var t=n(e,_.vertex,_.fragment);return t.attributes.position.location=0,t.attributes.id.location=1,t.attributes.pointSize.location=4,t}function A(e){var t=n(e,x.vertex,x.fragment);return t.attributes.position.location=0,t}M.isOpaque=function(){return!this.hasAlpha},M.isTransparent=function(){return this.hasAlpha},M.pickSlots=1,M.setPickBase=function(e){this.pickId=e},M.highlight=function(e){if(e&&this.contourEnable){for(var t=p(this.cells,this.intensity,e.intensity),r=t.cells,n=t.vertexIds,a=t.vertexWeights,i=r.length,o=h.mallocFloat32(6*i),s=0,l=0;l<i;++l)for(var c=r[l],u=0;u<2;++u){var d=c[0];2===c.length&&(d=c[u]);for(var f=n[d][0],m=n[d][1],g=a[d],v=1-g,y=this.positions[f],b=this.positions[m],_=0;_<3;++_)o[s++]=g*y[_]+v*b[_]}this.contourCount=s/3|0,this.contourPositions.update(o.subarray(0,s)),h.free(o)}else this.contourCount=0},M.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"contourEnable"in e&&(this.contourEnable=e.contourEnable),"contourColor"in e&&(this.contourColor=e.contourColor),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"lightPosition"in e&&(this.lightPosition=e.lightPosition),this.hasAlpha=!1,"opacity"in e&&(this.opacity=e.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in e&&(this.opacityscale=e.opacityscale,this.hasAlpha=!0),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),e.texture?(this.texture.dispose(),this.texture=o(t,e.texture)):e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e,t){for(var r=d({colormap:e,nshades:256,format:"rgba"}),n=new Uint8Array(1024),a=0;a<256;++a){for(var i=r[a],o=0;o<3;++o)n[4*a+o]=i[o];n[4*a+3]=t?255*T(a/255,t):255*i[3]}return u(n,[256,256,4],[4,0,1])}(e.colormap,this.opacityscale)),this.texture.generateMipmap());var r=e.cells,n=e.positions;if(n&&r){var a=[],i=[],l=[],c=[],p=[],h=[],f=[],m=[],g=[],v=[],y=[],b=[],_=[],x=[];this.cells=r,this.positions=n;var w=e.vertexNormals,k=e.cellNormals,M=void 0===e.vertexNormalsEpsilon?1e-6:e.vertexNormalsEpsilon,C=void 0===e.faceNormalsEpsilon?1e-6:e.faceNormalsEpsilon;e.useFacetNormals&&!k&&(k=s.faceNormals(r,n,C)),k||w||(w=s.vertexNormals(r,n,M));var S=e.vertexColors,L=e.cellColors,A=e.meshColor||[1,1,1,1],E=e.vertexUVs,D=e.vertexIntensity,I=e.cellUVs,P=e.cellIntensity,O=1/0,R=-1/0;if(!E&&!I)if(D)if(e.vertexIntensityBounds)O=+e.vertexIntensityBounds[0],R=+e.vertexIntensityBounds[1];else for(var F=0;F<D.length;++F){var z=D[F];O=Math.min(O,z),R=Math.max(R,z)}else if(P)for(F=0;F<P.length;++F)z=P[F],O=Math.min(O,z),R=Math.max(R,z);else for(F=0;F<n.length;++F)z=n[F][2],O=Math.min(O,z),R=Math.max(R,z);this.intensity=D||(P?function(e,t,r){for(var n=new Array(t),a=0;a<t;++a)n[a]=0;var i=e.length;for(a=0;a<i;++a)for(var o=e[a],s=0;s<o.length;++s)n[o[s]]=r[a];return n}(r,n.length,P):function(e){for(var t=e.length,r=new Array(t),n=0;n<t;++n)r[n]=e[n][2];return r}(n));var N=e.pointSizes,j=e.pointSize||1;for(this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],F=0;F<n.length;++F)for(var B=n[F],Y=0;Y<3;++Y)!isNaN(B[Y])&&isFinite(B[Y])&&(this.bounds[0][Y]=Math.min(this.bounds[0][Y],B[Y]),this.bounds[1][Y]=Math.max(this.bounds[1][Y],B[Y]));var H=0,V=0,U=0;e:for(F=0;F<r.length;++F){var W=r[F];switch(W.length){case 1:for(B=n[q=W[0]],Y=0;Y<3;++Y)if(isNaN(B[Y])||!isFinite(B[Y]))continue e;v.push(B[0],B[1],B[2]),K=S?S[q]:L?L[F]:A,this.opacityscale&&D?i.push(K[0],K[1],K[2],this.opacity*T((D[q]-O)/(R-O),this.opacityscale)):3===K.length?y.push(K[0],K[1],K[2],this.opacity):(y.push(K[0],K[1],K[2],K[3]*this.opacity),K[3]<1&&(this.hasAlpha=!0)),X=E?E[q]:D?[(D[q]-O)/(R-O),0]:I?I[F]:P?[(P[F]-O)/(R-O),0]:[(B[2]-O)/(R-O),0],b.push(X[0],X[1]),N?_.push(N[q]):_.push(j),x.push(F),U+=1;break;case 2:for(Y=0;Y<2;++Y){B=n[q=W[Y]];for(var G=0;G<3;++G)if(isNaN(B[G])||!isFinite(B[G]))continue e}for(Y=0;Y<2;++Y)B=n[q=W[Y]],h.push(B[0],B[1],B[2]),K=S?S[q]:L?L[F]:A,this.opacityscale&&D?i.push(K[0],K[1],K[2],this.opacity*T((D[q]-O)/(R-O),this.opacityscale)):3===K.length?f.push(K[0],K[1],K[2],this.opacity):(f.push(K[0],K[1],K[2],K[3]*this.opacity),K[3]<1&&(this.hasAlpha=!0)),X=E?E[q]:D?[(D[q]-O)/(R-O),0]:I?I[F]:P?[(P[F]-O)/(R-O),0]:[(B[2]-O)/(R-O),0],m.push(X[0],X[1]),g.push(F);V+=1;break;case 3:for(Y=0;Y<3;++Y)for(B=n[q=W[Y]],G=0;G<3;++G)if(isNaN(B[G])||!isFinite(B[G]))continue e;for(Y=0;Y<3;++Y){var q,K,X,Z;B=n[q=W[2-Y]],a.push(B[0],B[1],B[2]),(K=S?S[q]:L?L[F]:A)?this.opacityscale&&D?i.push(K[0],K[1],K[2],this.opacity*T((D[q]-O)/(R-O),this.opacityscale)):3===K.length?i.push(K[0],K[1],K[2],this.opacity):(i.push(K[0],K[1],K[2],K[3]*this.opacity),K[3]<1&&(this.hasAlpha=!0)):i.push(.5,.5,.5,1),X=E?E[q]:D?[(D[q]-O)/(R-O),0]:I?I[F]:P?[(P[F]-O)/(R-O),0]:[(B[2]-O)/(R-O),0],c.push(X[0],X[1]),Z=w?w[q]:k[F],l.push(Z[0],Z[1],Z[2]),p.push(F)}H+=1}}this.pointCount=U,this.edgeCount=V,this.triangleCount=H,this.pointPositions.update(v),this.pointColors.update(y),this.pointUVs.update(b),this.pointSizes.update(_),this.pointIds.update(new Uint32Array(x)),this.edgePositions.update(h),this.edgeColors.update(f),this.edgeUVs.update(m),this.edgeIds.update(new Uint32Array(g)),this.trianglePositions.update(a),this.triangleColors.update(i),this.triangleUVs.update(c),this.triangleNormals.update(l),this.triangleIds.update(new Uint32Array(p))}},M.drawTransparent=M.draw=function(e){e=e||{};for(var t=this.gl,r=e.model||w,n=e.view||w,a=e.projection||w,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);var s={model:r,view:n,projection:a,inverseModel:w.slice(),clipBounds:i,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};s.inverseModel=c(s.inverseModel,s.model),t.disable(t.CULL_FACE),this.texture.bind(0);var u=new Array(16);for(l(u,s.view,s.model),l(u,s.projection,u),c(u,u),o=0;o<3;++o)s.eyePosition[o]=u[12+o]/u[15];var d,p=u[15];for(o=0;o<3;++o)p+=this.lightPosition[o]*u[4*o+3];for(o=0;o<3;++o){for(var h=u[12+o],f=0;f<3;++f)h+=u[4*f+o]*this.lightPosition[f];s.lightPosition[o]=h/p}this.triangleCount>0&&((d=this.triShader).bind(),d.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((d=this.lineShader).bind(),d.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((d=this.pointShader).bind(),d.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((d=this.contourShader).bind(),d.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},M.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,n=e.view||w,a=e.projection||w,i=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)i[0][o]=Math.max(i[0][o],this.clipBounds[0][o]),i[1][o]=Math.min(i[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(a),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:r,view:n,projection:a,clipBounds:i,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},M.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions,a=new Array(r.length),i=0;i<r.length;++i)a[i]=n[r[i]];var o=m(a,[e.coord[0],this._resolution[1]-e.coord[1]],this._model,this._view,this._projection,this._resolution);if(!o)return null;var s=o[2],l=0;for(i=0;i<r.length;++i)l+=s[i]*this.intensity[r[i]];return{position:o[1],index:r[o[0]],cell:r,cellId:t,intensity:l,dataCoordinate:this.positions[r[o[0]]]}},M.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()},t.exports=function(e,t){if(1===arguments.length&&(e=(t=e).gl),!(e.getExtension("OES_standard_derivatives")||e.getExtension("MOZ_OES_standard_derivatives")||e.getExtension("WEBKIT_OES_standard_derivatives")))throw new Error("derivatives not supported");var r=function(e){var t=n(e,g.vertex,g.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t.attributes.normal.location=4,t}(e),s=function(e){var t=n(e,v.vertex,v.fragment);return t.attributes.position.location=0,t.attributes.color.location=2,t.attributes.uv.location=3,t}(e),l=C(e),c=S(e),d=L(e),p=A(e),h=o(e,u(new Uint8Array([255,255,255,255]),[1,1,4]));h.generateMipmap(),h.minFilter=e.LINEAR_MIPMAP_LINEAR,h.magFilter=e.LINEAR;var f=a(e),m=a(e),y=a(e),b=a(e),_=a(e),x=i(e,[{buffer:f,type:e.FLOAT,size:3},{buffer:_,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:y,type:e.FLOAT,size:2},{buffer:b,type:e.FLOAT,size:3}]),w=a(e),M=a(e),T=a(e),E=a(e),D=i(e,[{buffer:w,type:e.FLOAT,size:3},{buffer:E,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:M,type:e.FLOAT,size:4},{buffer:T,type:e.FLOAT,size:2}]),I=a(e),P=a(e),O=a(e),R=a(e),F=a(e),z=i(e,[{buffer:I,type:e.FLOAT,size:3},{buffer:F,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:P,type:e.FLOAT,size:4},{buffer:O,type:e.FLOAT,size:2},{buffer:R,type:e.FLOAT,size:1}]),N=a(e),j=new k(e,h,r,s,l,c,d,p,f,_,m,y,b,x,w,E,M,T,D,I,F,P,O,R,z,N,i(e,[{buffer:N,type:e.FLOAT,size:3}]));return j.update(t),j}},{"./lib/closest-point":280,"./lib/shaders":281,colormap:127,"gl-buffer":243,"gl-mat4/invert":267,"gl-mat4/multiply":269,"gl-shader":303,"gl-texture2d":323,"gl-vao":328,ndarray:451,normals:454,"simplicial-complex-contour":516,"typedarray-pool":543}],283:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=n(t,[0,0,0,1,1,0,1,1]),s=a(t,i.boxVert,i.lineFrag);return new o(e,r,s)};var n=e("gl-buffer"),a=e("gl-shader"),i=e("./shaders");function o(e,t,r){this.plot=e,this.vbo=t,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var e=this.shader;this.vbo.bind(),this.shader.bind(),e.attributes.coord.pointer(),e.uniforms.screenBox=this.plot.screenBox},c.drawBox=(s=[0,0],l=[0,0],function(e,t,r,n,a){var i=this.plot,o=this.shader,c=i.gl;s[0]=e,s[1]=t,l[0]=r,l[1]=n,o.uniforms.lo=s,o.uniforms.hi=l,o.uniforms.color=a,c.drawArrays(c.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":286,"gl-buffer":243,"gl-shader":303}],284:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=n(t),i=a(t,o.gridVert,o.gridFrag),l=a(t,o.tickVert,o.gridFrag);return new s(e,r,i,l)};var n=e("gl-buffer"),a=e("gl-shader"),i=e("binary-search-bounds"),o=e("./shaders");function s(e,t,r,n){this.plot=e,this.vbo=t,this.shader=r,this.tickShader=n,this.ticks=[[],[]]}function l(e,t){return e-t}var c,u,d,p,h,f=s.prototype;f.draw=(c=[0,0],u=[0,0],d=[0,0],function(){for(var e=this.plot,t=this.vbo,r=this.shader,n=this.ticks,a=e.gl,i=e._tickBounds,o=e.dataBox,s=e.viewBox,l=e.gridLineWidth,p=e.gridLineColor,h=e.gridLineEnable,f=e.pixelRatio,m=0;m<2;++m){var g=i[m],v=i[m+2]-g,y=.5*(o[m+2]+o[m]),b=o[m+2]-o[m];u[m]=2*v/b,c[m]=2*(g-y)/b}r.bind(),t.bind(),r.attributes.dataCoord.pointer(),r.uniforms.dataShift=c,r.uniforms.dataScale=u;var _=0;for(m=0;m<2;++m){d[0]=d[1]=0,d[m]=1,r.uniforms.dataAxis=d,r.uniforms.lineWidth=l[m]/(s[m+2]-s[m])*f,r.uniforms.color=p[m];var x=6*n[m].length;h[m]&&x&&a.drawArrays(a.TRIANGLES,_,x),_+=x}}),f.drawTickMarks=function(){var e=[0,0],t=[0,0],r=[1,0],n=[0,1],a=[0,0],o=[0,0];return function(){for(var s=this.plot,c=this.vbo,u=this.tickShader,d=this.ticks,p=s.gl,h=s._tickBounds,f=s.dataBox,m=s.viewBox,g=s.pixelRatio,v=s.screenBox,y=v[2]-v[0],b=v[3]-v[1],_=m[2]-m[0],x=m[3]-m[1],w=0;w<2;++w){var k=h[w],M=h[w+2]-k,T=.5*(f[w+2]+f[w]),C=f[w+2]-f[w];t[w]=2*M/C,e[w]=2*(k-T)/C}t[0]*=_/y,e[0]*=_/y,t[1]*=x/b,e[1]*=x/b,u.bind(),c.bind(),u.attributes.dataCoord.pointer();var S=u.uniforms;S.dataShift=e,S.dataScale=t;var L=s.tickMarkLength,A=s.tickMarkWidth,E=s.tickMarkColor,D=6*d[0].length,I=Math.min(i.ge(d[0],(f[0]-h[0])/(h[2]-h[0]),l),d[0].length),P=Math.min(i.gt(d[0],(f[2]-h[0])/(h[2]-h[0]),l),d[0].length),O=0+6*I,R=6*Math.max(0,P-I),F=Math.min(i.ge(d[1],(f[1]-h[1])/(h[3]-h[1]),l),d[1].length),z=Math.min(i.gt(d[1],(f[3]-h[1])/(h[3]-h[1]),l),d[1].length),N=D+6*F,j=6*Math.max(0,z-F);a[0]=2*(m[0]-L[1])/y-1,a[1]=(m[3]+m[1])/b-1,o[0]=L[1]*g/y,o[1]=A[1]*g/b,j&&(S.color=E[1],S.tickScale=o,S.dataAxis=n,S.screenOffset=a,p.drawArrays(p.TRIANGLES,N,j)),a[0]=(m[2]+m[0])/y-1,a[1]=2*(m[1]-L[0])/b-1,o[0]=A[0]*g/y,o[1]=L[0]*g/b,R&&(S.color=E[0],S.tickScale=o,S.dataAxis=r,S.screenOffset=a,p.drawArrays(p.TRIANGLES,O,R)),a[0]=2*(m[2]+L[3])/y-1,a[1]=(m[3]+m[1])/b-1,o[0]=L[3]*g/y,o[1]=A[3]*g/b,j&&(S.color=E[3],S.tickScale=o,S.dataAxis=n,S.screenOffset=a,p.drawArrays(p.TRIANGLES,N,j)),a[0]=(m[2]+m[0])/y-1,a[1]=2*(m[3]+L[2])/b-1,o[0]=A[2]*g/y,o[1]=L[2]*g/b,R&&(S.color=E[2],S.tickScale=o,S.dataAxis=r,S.screenOffset=a,p.drawArrays(p.TRIANGLES,O,R))}}(),f.update=(p=[1,1,-1,-1,1,-1],h=[1,-1,1,1,-1,-1],function(e){for(var t=e.ticks,r=e.bounds,n=new Float32Array(18*(t[0].length+t[1].length)),a=(this.plot.zeroLineEnable,0),i=[[],[]],o=0;o<2;++o)for(var s=i[o],l=t[o],c=r[o],u=r[o+2],d=0;d<l.length;++d){var f=(l[d].x-c)/(u-c);s.push(f);for(var m=0;m<6;++m)n[a++]=f,n[a++]=p[m],n[a++]=h[m]}this.ticks=i,this.vbo.update(n)}),f.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},{"./shaders":286,"binary-search-bounds":288,"gl-buffer":243,"gl-shader":303}],285:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=n(t,[-1,-1,-1,1,1,-1,1,1]),s=a(t,i.lineVert,i.lineFrag);return new o(e,r,s)};var n=e("gl-buffer"),a=e("gl-shader"),i=e("./shaders");function o(e,t,r){this.plot=e,this.vbo=t,this.shader=r}var s,l,c=o.prototype;c.bind=function(){var e=this.shader;this.vbo.bind(),this.shader.bind(),e.attributes.coord.pointer(),e.uniforms.screenBox=this.plot.screenBox},c.drawLine=(s=[0,0],l=[0,0],function(e,t,r,n,a,i){var o=this.plot,c=this.shader,u=o.gl;s[0]=e,s[1]=t,l[0]=r,l[1]=n,c.uniforms.start=s,c.uniforms.end=l,c.uniforms.width=a*o.pixelRatio,c.uniforms.color=i,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),c.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":286,"gl-buffer":243,"gl-shader":303}],286:[function(e,t,r){"use strict";var n=e("glslify"),a=n(["precision lowp float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = vec4(color.xyz * color.w, color.w);\n}\n"]);t.exports={lineVert:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 start, end;\nuniform float width;\n\nvec2 perp(vec2 v) {\n  return vec2(v.y, -v.x);\n}\n\nvec2 screen(vec2 v) {\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n  vec2 delta = normalize(perp(start - end));\n  vec2 offset = mix(start, end, 0.5 * (coord.y+1.0));\n  gl_Position = vec4(screen(offset + 0.5 * width * delta * coord.x), 0, 1);\n}\n"]),lineFrag:a,textVert:n(["#define GLSLIFY 1\nattribute vec3 textCoordinate;\n\nuniform vec2 dataScale, dataShift, dataAxis, screenOffset, textScale;\nuniform float angle;\n\nvoid main() {\n  float dataOffset  = textCoordinate.z;\n  vec2 glyphOffset  = textCoordinate.xy;\n  mat2 glyphMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n  vec2 screenCoordinate = dataAxis * (dataScale * dataOffset + dataShift) +\n    glyphMatrix * glyphOffset * textScale + screenOffset;\n  gl_Position = vec4(screenCoordinate, 0, 1);\n}\n"]),textFrag:a,gridVert:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale;\nuniform float lineWidth;\n\nvoid main() {\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n  pos += 10.0 * dataCoord.y * vec2(dataAxis.y, -dataAxis.x) + dataCoord.z * lineWidth;\n  gl_Position = vec4(pos, 0, 1);\n}\n"]),gridFrag:a,boxVert:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 coord;\n\nuniform vec4 screenBox;\nuniform vec2 lo, hi;\n\nvec2 screen(vec2 v) {\n  return 2.0 * (v - screenBox.xy) / (screenBox.zw - screenBox.xy) - 1.0;\n}\n\nvoid main() {\n  gl_Position = vec4(screen(mix(lo, hi, coord)), 0, 1);\n}\n"]),tickVert:n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 dataCoord;\n\nuniform vec2 dataAxis, dataShift, dataScale, screenOffset, tickScale;\n\nvoid main() {\n  vec2 pos = dataAxis * (dataScale * dataCoord.x + dataShift);\n  gl_Position = vec4(pos + tickScale*dataCoord.yz + screenOffset, 0, 1);\n}\n"])}},{glslify:410}],287:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=n(t),i=a(t,s.textVert,s.textFrag);return new l(e,r,i)};var n=e("gl-buffer"),a=e("gl-shader"),i=e("text-cache"),o=e("binary-search-bounds"),s=e("./shaders");function l(e,t,r){this.plot=e,this.vbo=t,this.shader=r,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var c,u,d,p,h,f,m=l.prototype;m.drawTicks=(c=[0,0],u=[0,0],d=[0,0],function(e){var t=this.plot,r=this.shader,n=this.tickX[e],a=this.tickOffset[e],i=t.gl,s=t.viewBox,l=t.dataBox,p=t.screenBox,h=t.pixelRatio,f=t.tickEnable,m=t.tickPad,g=t.tickColor,v=t.tickAngle,y=t.labelEnable,b=t.labelPad,_=t.labelColor,x=t.labelAngle,w=this.labelOffset[e],k=this.labelCount[e],M=o.lt(n,l[e]),T=o.le(n,l[e+2]);c[0]=c[1]=0,c[e]=1,u[e]=(s[2+e]+s[e])/(p[2+e]-p[e])-1;var C=2/p[2+(1^e)]-p[1^e];u[1^e]=C*s[1^e]-1,f[e]&&(u[1^e]-=C*h*m[e],M<T&&a[T]>a[M]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=g[e],r.uniforms.angle=v[e],i.drawArrays(i.TRIANGLES,a[M],a[T]-a[M]))),y[e]&&k&&(u[1^e]-=C*h*b[e],r.uniforms.dataAxis=d,r.uniforms.screenOffset=u,r.uniforms.color=_[e],r.uniforms.angle=x[e],i.drawArrays(i.TRIANGLES,w,k)),u[1^e]=C*s[2+(1^e)]-1,f[e+2]&&(u[1^e]+=C*h*m[e+2],M<T&&a[T]>a[M]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=g[e+2],r.uniforms.angle=v[e+2],i.drawArrays(i.TRIANGLES,a[M],a[T]-a[M]))),y[e+2]&&k&&(u[1^e]+=C*h*b[e+2],r.uniforms.dataAxis=d,r.uniforms.screenOffset=u,r.uniforms.color=_[e+2],r.uniforms.angle=x[e+2],i.drawArrays(i.TRIANGLES,w,k))}),m.drawTitle=function(){var e=[0,0],t=[0,0];return function(){var r=this.plot,n=this.shader,a=r.gl,i=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)t[u]=2*(o[u]*c-i[u])/(i[2+u]-i[u])-1;n.bind(),n.uniforms.dataAxis=e,n.uniforms.screenOffset=t,n.uniforms.angle=s,n.uniforms.color=l,a.drawArrays(a.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=(p=[0,0],h=[0,0],f=[0,0],function(){var e=this.plot,t=this.shader,r=e._tickBounds,n=e.dataBox,a=e.screenBox,i=e.viewBox;t.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],d=i[o],m=i[o+2]-d,g=a[o],v=a[o+2]-g;h[o]=2*l/u*m/v,p[o]=2*(s-c)/u*m/v}f[1]=2*e.pixelRatio/(a[3]-a[1]),f[0]=f[1]*(a[3]-a[1])/(a[2]-a[0]),t.uniforms.dataScale=h,t.uniforms.dataShift=p,t.uniforms.textScale=f,this.vbo.bind(),t.attributes.textCoordinate.pointer()}),m.update=function(e){var t,r,n,a,o,s=[],l=e.ticks,c=e.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],d=[-1/0],p=l[o];for(t=0;t<p.length;++t){var h=p[t],f=h.x,m=h.text,g=h.font||"sans-serif";a=h.fontSize||12;for(var v=1/(c[o+2]-c[o]),y=c[o],b=m.split("\n"),_=0;_<b.length;_++)for(n=i(g,b[_]).data,r=0;r<n.length;r+=2)s.push(n[r]*a,-n[r+1]*a-_*a*1.2,(f-y)*v);u.push(Math.floor(s.length/3)),d.push(f)}this.tickOffset[o]=u,this.tickX[o]=d}for(o=0;o<2;++o){for(this.labelOffset[o]=Math.floor(s.length/3),n=i(e.labelFont[o],e.labels[o],{textAlign:"center"}).data,a=e.labelSize[o],t=0;t<n.length;t+=2)s.push(n[t]*a,-n[t+1]*a,0);this.labelCount[o]=Math.floor(s.length/3)-this.labelOffset[o]}for(this.titleOffset=Math.floor(s.length/3),n=i(e.titleFont,e.title).data,a=e.titleSize,t=0;t<n.length;t+=2)s.push(n[t]*a,-n[t+1]*a,0);this.titleCount=Math.floor(s.length/3)-this.titleOffset,this.vbo.update(s)},m.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},{"./shaders":286,"binary-search-bounds":288,"gl-buffer":243,"gl-shader":303,"text-cache":534}],288:[function(e,t,r){arguments[4][112][0].apply(r,arguments)},{dup:112}],289:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=n(t,[t.drawingBufferWidth,t.drawingBufferHeight]),c=new l(t,r);return c.grid=a(c),c.text=i(c),c.line=o(c),c.box=s(c),c.update(e),c};var n=e("gl-select-static"),a=e("./lib/grid"),i=e("./lib/text"),o=e("./lib/line"),s=e("./lib/box");function l(e,t){this.gl=e,this.pickBuffer=t,this.screenBox=[0,0,e.drawingBufferWidth,e.drawingBufferHeight],this.viewBox=[0,0,0,0],this.dataBox=[-10,-10,10,10],this.gridLineEnable=[!0,!0],this.gridLineWidth=[1,1],this.gridLineColor=[[0,0,0,1],[0,0,0,1]],this.pixelRatio=1,this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickEnable=[!0,!0,!0,!0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[15,15,15,15],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelEnable=[!0,!0,!0,!0],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.titleCenter=[0,0],this.titleEnable=!0,this.titleAngle=0,this.titleColor=[0,0,0,1],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[4,4],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderLineEnable=[!0,!0,!0,!0],this.borderLineWidth=[2,2,2,2],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.grid=null,this.text=null,this.line=null,this.box=null,this.objects=[],this.overlays=[],this._tickBounds=[1/0,1/0,-1/0,-1/0],this.static=!1,this.dirty=!1,this.pickDirty=!1,this.pickDelay=120,this.pickRadius=10,this._pickTimeout=null,this._drawPick=this.drawPick.bind(this),this._depthCounter=0}var c=l.prototype;function u(e){for(var t=e.slice(),r=0;r<t.length;++r)t[r]=t[r].slice();return t}function d(e,t){return e.x-t.x}c.setDirty=function(){this.dirty=this.pickDirty=!0},c.setOverlayDirty=function(){this.dirty=!0},c.nextDepthValue=function(){return this._depthCounter++/65536},c.draw=function(){var e=this.gl,t=this.screenBox,r=this.viewBox,n=this.dataBox,a=this.pixelRatio,i=this.grid,o=this.line,s=this.text,l=this.objects;if(this._depthCounter=0,this.pickDirty&&(this._pickTimeout&&clearTimeout(this._pickTimeout),this.pickDirty=!1,this._pickTimeout=setTimeout(this._drawPick,this.pickDelay)),this.dirty){if(this.dirty=!1,e.bindFramebuffer(e.FRAMEBUFFER,null),e.enable(e.SCISSOR_TEST),e.disable(e.DEPTH_TEST),e.depthFunc(e.LESS),e.depthMask(!1),e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD,e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this.borderColor){e.scissor(t[0],t[1],t[2]-t[0],t[3]-t[1]);var c=this.borderColor;e.clearColor(c[0]*c[3],c[1]*c[3],c[2]*c[3],c[3]),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}e.scissor(r[0],r[1],r[2]-r[0],r[3]-r[1]),e.viewport(r[0],r[1],r[2]-r[0],r[3]-r[1]);var u=this.backgroundColor;e.clearColor(u[0]*u[3],u[1]*u[3],u[2]*u[3],u[3]),e.clear(e.COLOR_BUFFER_BIT),i.draw();var d=this.zeroLineEnable,p=this.zeroLineColor,h=this.zeroLineWidth;if(d[0]||d[1]){o.bind();for(var f=0;f<2;++f)if(d[f]&&n[f]<=0&&n[f+2]>=0){var m=t[f]-n[f]*(t[f+2]-t[f])/(n[f+2]-n[f]);0===f?o.drawLine(m,t[1],m,t[3],h[f],p[f]):o.drawLine(t[0],m,t[2],m,h[f],p[f])}}for(f=0;f<l.length;++f)l[f].draw();e.viewport(t[0],t[1],t[2]-t[0],t[3]-t[1]),e.scissor(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.grid.drawTickMarks(),o.bind();var g=this.borderLineEnable,v=this.borderLineWidth,y=this.borderLineColor;for(g[1]&&o.drawLine(r[0],r[1]-.5*v[1]*a,r[0],r[3]+.5*v[3]*a,v[1],y[1]),g[0]&&o.drawLine(r[0]-.5*v[0]*a,r[1],r[2]+.5*v[2]*a,r[1],v[0],y[0]),g[3]&&o.drawLine(r[2],r[1]-.5*v[1]*a,r[2],r[3]+.5*v[3]*a,v[3],y[3]),g[2]&&o.drawLine(r[0]-.5*v[0]*a,r[3],r[2]+.5*v[2]*a,r[3],v[2],y[2]),s.bind(),f=0;f<2;++f)s.drawTicks(f);this.titleEnable&&s.drawTitle();var b=this.overlays;for(f=0;f<b.length;++f)b[f].draw();e.disable(e.SCISSOR_TEST),e.disable(e.BLEND),e.depthMask(!0)}},c.drawPick=function(){if(!this.static){var e=this.pickBuffer;this.gl,this._pickTimeout=null,e.begin();for(var t=1,r=this.objects,n=0;n<r.length;++n)t=r[n].drawPick(t);e.end()}},c.pick=function(e,t){if(!this.static){var r=this.pixelRatio,n=this.pickPixelRatio,a=this.viewBox,i=0|Math.round((e-a[0]/r)*n),o=0|Math.round((t-a[1]/r)*n),s=this.pickBuffer.query(i,o,this.pickRadius);if(!s)return null;for(var l=s.id+(s.value[0]<<8)+(s.value[1]<<16)+(s.value[2]<<24),c=this.objects,u=0;u<c.length;++u){var d=c[u].pick(i,o,l);if(d)return d}return null}},c.setScreenBox=function(e){var t=this.screenBox,r=this.pixelRatio;t[0]=0|Math.round(e[0]*r),t[1]=0|Math.round(e[1]*r),t[2]=0|Math.round(e[2]*r),t[3]=0|Math.round(e[3]*r),this.setDirty()},c.setDataBox=function(e){var t=this.dataBox;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3])&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],this.setDirty())},c.setViewBox=function(e){var t=this.pixelRatio,r=this.viewBox;r[0]=0|Math.round(e[0]*t),r[1]=0|Math.round(e[1]*t),r[2]=0|Math.round(e[2]*t),r[3]=0|Math.round(e[3]*t);var n=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((e[2]-e[0])*n),0|Math.round((e[3]-e[1])*n)],this.setDirty()},c.update=function(e){e=e||{};var t=this.gl;this.pixelRatio=e.pixelRatio||1;var r=this.pixelRatio;this.pickPixelRatio=Math.max(r,1),this.setScreenBox(e.screenBox||[0,0,t.drawingBufferWidth/r,t.drawingBufferHeight/r]),this.screenBox,this.setViewBox(e.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/r,.125*(this.screenBox[3]-this.screenBox[1])/r,.875*(this.screenBox[2]-this.screenBox[0])/r,.875*(this.screenBox[3]-this.screenBox[1])/r]);var n=this.viewBox,a=(n[2]-n[0])/(n[3]-n[1]);this.setDataBox(e.dataBox||[-10,-10/a,10,10/a]),this.borderColor=!1!==e.borderColor&&(e.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(e.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(e.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(e.gridLineWidth||[1,1]).slice(),this.gridLineColor=u(e.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(e.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(e.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=u(e.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(e.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(e.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=u(e.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(e.titleCenter||[.5*(n[0]+n[2])/r,(n[3]+120)/r]).slice(),this.titleEnable=!("titleEnable"in e&&!e.titleEnable),this.titleAngle=e.titleAngle||0,this.titleColor=(e.titleColor||[0,0,0,1]).slice(),this.labelPad=(e.labelPad||[15,15,15,15]).slice(),this.labelAngle=(e.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(e.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=u(e.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(e.tickPad||[15,15,15,15]).slice(),this.tickAngle=(e.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(e.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=u(e.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(e.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(e.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=u(e.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var i=e.ticks||[[],[]],o=this._tickBounds;o[0]=o[1]=1/0,o[2]=o[3]=-1/0;for(var s=0;s<2;++s){var l=i[s].slice(0);0!==l.length&&(l.sort(d),o[s]=Math.min(o[s],l[0].x),o[s+2]=Math.max(o[s+2],l[l.length-1].x))}this.grid.update({bounds:o,ticks:i}),this.text.update({bounds:o,ticks:i,labels:e.labels||["x","y"],labelSize:e.labelSize||[12,12],labelFont:e.labelFont||["sans-serif","sans-serif"],title:e.title||"",titleSize:e.titleSize||18,titleFont:e.titleFont||"sans-serif"}),this.static=!!e.static,this.setDirty()},c.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var e=this.objects.length-1;e>=0;--e)this.objects[e].dispose();for(this.objects.length=0,e=this.overlays.length-1;e>=0;--e)this.overlays[e].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(e){this.objects.indexOf(e)<0&&(this.objects.push(e),this.setDirty())},c.removeObject=function(e){for(var t=this.objects,r=0;r<t.length;++r)if(t[r]===e){t.splice(r,1),this.setDirty();break}},c.addOverlay=function(e){this.overlays.indexOf(e)<0&&(this.overlays.push(e),this.setOverlayDirty())},c.removeOverlay=function(e){for(var t=this.overlays,r=0;r<t.length;++r)if(t[r]===e){t.splice(r,1),this.setOverlayDirty();break}}},{"./lib/box":283,"./lib/grid":284,"./lib/line":285,"./lib/text":287,"gl-select-static":302}],290:[function(e,t,r){"use strict";t.exports=function(e,t){e=e||document.body;var r=[.01,1/0];"distanceLimits"in(t=t||{})&&(r[0]=t.distanceLimits[0],r[1]=t.distanceLimits[1]),"zoomMin"in t&&(r[0]=t.zoomMin),"zoomMax"in t&&(r[1]=t.zoomMax);var c=a({center:t.center||[0,0,0],up:t.up||[0,1,0],eye:t.eye||[0,0,10],mode:t.mode||"orbit",distanceLimits:r}),u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],d=0,p=e.clientWidth,h=e.clientHeight,f={keyBindingMode:"rotate",enableWheel:!0,view:c,element:e,delay:t.delay||16,rotateSpeed:t.rotateSpeed||1,zoomSpeed:t.zoomSpeed||1,translateSpeed:t.translateSpeed||1,flipX:!!t.flipX,flipY:!!t.flipY,modes:c.modes,_ortho:t._ortho||t.projection&&"orthographic"===t.projection.type||!1,tick:function(){var t=n(),r=this.delay,a=t-2*r;c.idle(t-r),c.recalcMatrix(a),c.flush(t-(100+2*r));for(var i=!0,o=c.computedMatrix,s=0;s<16;++s)i=i&&u[s]===o[s],u[s]=o[s];var l=e.clientWidth===p&&e.clientHeight===h;return p=e.clientWidth,h=e.clientHeight,i?!l:(d=Math.exp(c.computedRadius[0]),!0)},lookAt:function(e,t,r){c.lookAt(c.lastT(),e,t,r)},rotate:function(e,t,r){c.rotate(c.lastT(),e,t,r)},pan:function(e,t,r){c.pan(c.lastT(),e,t,r)},translate:function(e,t,r){c.translate(c.lastT(),e,t,r)}};return Object.defineProperties(f,{matrix:{get:function(){return c.computedMatrix},set:function(e){return c.setMatrix(c.lastT(),e),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(e){var t=c.computedUp.slice(),r=c.computedEye.slice(),a=c.computedCenter.slice();if(c.setMode(e),"turntable"===e){var i=n();c._active.lookAt(i,r,a,t),c._active.lookAt(i+500,r,a,[0,0,1]),c._active.flush(i)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(e){return c.lookAt(c.lastT(),null,e),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(e){return c.lookAt(c.lastT(),e),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(e){return c.lookAt(c.lastT(),null,null,e),c.computedUp},enumerable:!0},distance:{get:function(){return d},set:function(e){return c.setDistance(c.lastT(),e),e},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(r)},set:function(e){return c.setDistanceLimits(e),e},enumerable:!0}}),e.addEventListener("contextmenu",(function(e){return e.preventDefault(),!1})),f._lastX=-1,f._lastY=-1,f._lastMods={shift:!1,control:!1,alt:!1,meta:!1},f.enableMouseListeners=function(){function t(t,r,a,i){var o=f.keyBindingMode;if(!1!==o){var s="rotate"===o,l="pan"===o,u="zoom"===o,p=!!i.control,h=!!i.alt,m=!!i.shift,g=!!(1&t),v=!!(2&t),y=!!(4&t),b=1/e.clientHeight,_=b*(r-f._lastX),x=b*(a-f._lastY),w=f.flipX?1:-1,k=f.flipY?1:-1,M=Math.PI*f.rotateSpeed,T=n();if(-1!==f._lastX&&-1!==f._lastY&&((s&&g&&!p&&!h&&!m||g&&!p&&!h&&m)&&c.rotate(T,w*M*_,-k*M*x,0),(l&&g&&!p&&!h&&!m||v||g&&p&&!h&&!m)&&c.pan(T,-f.translateSpeed*_*d,f.translateSpeed*x*d,0),u&&g&&!p&&!h&&!m||y||g&&!p&&h&&!m)){var C=-f.zoomSpeed*x/window.innerHeight*(T-c.lastT())*100;c.pan(T,0,0,d*(Math.exp(C)-1))}return f._lastX=r,f._lastY=a,f._lastMods=i,!0}}f.mouseListener=i(e,t),e.addEventListener("touchstart",(function(r){var n=s(r.changedTouches[0],e);t(0,n[0],n[1],f._lastMods),t(1,n[0],n[1],f._lastMods),r.preventDefault()}),!!l&&{passive:!1}),e.addEventListener("touchmove",(function(r){var n=s(r.changedTouches[0],e);t(1,n[0],n[1],f._lastMods),r.preventDefault()}),!!l&&{passive:!1}),e.addEventListener("touchend",(function(e){t(0,f._lastX,f._lastY,f._lastMods),e.preventDefault()}),!!l&&{passive:!1}),f.wheelListener=o(e,(function(e,t){if(!1!==f.keyBindingMode&&f.enableWheel){var r=f.flipX?1:-1,a=f.flipY?1:-1,i=n();if(Math.abs(e)>Math.abs(t))c.rotate(i,0,0,-e*r*Math.PI*f.rotateSpeed/window.innerWidth);else if(!f._ortho){var o=-f.zoomSpeed*a*t/window.innerHeight*(i-c.lastT())/20;c.pan(i,0,0,d*(Math.exp(o)-1))}}}),!0)},f.enableMouseListeners(),f};var n=e("right-now"),a=e("3d-view"),i=e("mouse-change"),o=e("mouse-wheel"),s=e("mouse-event-offset"),l=e("has-passive-events")},{"3d-view":54,"has-passive-events":412,"mouse-change":436,"mouse-event-offset":437,"mouse-wheel":439,"right-now":502}],291:[function(e,t,r){var n=e("glslify"),a=e("gl-shader"),i=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n  uv = position;\n  gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n  vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n  gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(e){return a(e,i,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":303,glslify:410}],292:[function(e,t,r){"use strict";var n=e("./camera.js"),a=e("gl-axes3d"),i=e("gl-axes3d/properties"),o=e("gl-spikes3d"),s=e("gl-select-static"),l=e("gl-fbo"),c=e("a-big-triangle"),u=e("mouse-change"),d=e("gl-mat4/perspective"),p=e("gl-mat4/ortho"),h=e("./lib/shader"),f=e("is-mobile")({tablet:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var r=Math.round(Math.pow(10,-t));return Math.ceil(e*r)/r}return t>0?(r=Math.round(Math.pow(10,t)),Math.ceil(e/r)*r):Math.ceil(e)}function v(e){return"boolean"!=typeof e||e}t.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||(t=document.createElement("canvas"),e.container?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch(e){return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:f})),!r)throw new Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],b=new m,_=l(r,[r.drawingBufferWidth,r.drawingBufferHeight],{preferFloat:!f}),x=h(r),w=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,k={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:w},M=e.axes||{},T=a(r,M);T.enable=!M.disable;var C=e.spikes||{},S=o(r,C),L=[],A=[],E=[],D=[],I=!0,P=!0,O=new Array(16),R=new Array(16),F={view:null,projection:O,model:R,_ortho:!1},z=(P=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),N=e.cameraObject||n(t,k),j={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:b,camera:N,axes:T,axesPixels:null,spikes:S,bounds:y,objects:L,shape:z,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:v(e.autoResize),autoBounds:v(e.autoBounds),autoScale:!!e.autoScale,autoCenter:v(e.autoCenter),clipToBounds:v(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:F,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z}},B=[r.drawingBufferWidth/j.pixelRatio|0,r.drawingBufferHeight/j.pixelRatio|0];function Y(){if(!j._stopped&&j.autoResize){var e=t.parentNode,r=1,n=1;e&&e!==document.body?(r=e.clientWidth,n=e.clientHeight):(r=window.innerWidth,n=window.innerHeight);var a=0|Math.ceil(r*j.pixelRatio),i=0|Math.ceil(n*j.pixelRatio);if(a!==t.width||i!==t.height){t.width=a,t.height=i;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",I=!0}}}function H(){for(var e=L.length,t=D.length,n=0;n<t;++n)E[n]=0;e:for(n=0;n<e;++n){var a=L[n],i=a.pickSlots;if(i){for(var o=0;o<t;++o)if(E[o]+i<255){A[n]=o,a.setPickBase(E[o]+1),E[o]+=i;continue e}var l=s(r,z);A[n]=t,D.push(l),E.push(i),a.setPickBase(1),t+=1}else A[n]=-1}for(;t>0&&0===E[t-1];)E.pop(),D.pop().dispose()}function V(){if(j.contextLost)return!0;r.isContextLost()&&(j.contextLost=!0,j.mouseListener.enabled=!1,j.selection.object=null,j.oncontextloss&&j.oncontextloss())}j.autoResize&&Y(),window.addEventListener("resize",Y),j.update=function(e){j._stopped||(e=e||{},I=!0,P=!0)},j.add=function(e){j._stopped||(e.axes=T,L.push(e),A.push(-1),I=!0,P=!0,H())},j.remove=function(e){if(!j._stopped){var t=L.indexOf(e);t<0||(L.splice(t,1),A.pop(),I=!0,P=!0,H())}},j.dispose=function(){if(!j._stopped&&(j._stopped=!0,window.removeEventListener("resize",Y),t.removeEventListener("webglcontextlost",V),j.mouseListener.enabled=!1,!j.contextLost)){T.dispose(),S.dispose();for(var e=0;e<L.length;++e)L[e].dispose();for(_.dispose(),e=0;e<D.length;++e)D[e].dispose();x.dispose(),r=null,T=null,S=null,L=[]}},j._mouseRotating=!1,j._prevButtons=0,j.enableMouseListeners=function(){j.mouseListener=u(t,(function(e,t,r){if(!j._stopped){var n=D.length,a=L.length,i=b.object;b.distance=1/0,b.mouse[0]=t,b.mouse[1]=r,b.object=null,b.screen=null,b.dataCoordinate=b.dataPosition=null;var o=!1;if(e&&j._prevButtons)j._mouseRotating=!0;else{j._mouseRotating&&(P=!0),j._mouseRotating=!1;for(var s=0;s<n;++s){var l=D[s].query(t,B[1]-r-1,j.pickRadius);if(l){if(l.distance>b.distance)continue;for(var c=0;c<a;++c){var u=L[c];if(A[c]===s){var d=u.pick(l);d&&(b.buttons=e,b.screen=l.coord,b.distance=l.distance,b.object=u,b.index=d.distance,b.dataPosition=d.position,b.dataCoordinate=d.dataCoordinate,b.data=d,o=!0)}}}}}i&&i!==b.object&&(i.highlight&&i.highlight(null),I=!0),b.object&&(b.object.highlight&&b.object.highlight(b.data),I=!0),(o=o||b.object!==i)&&j.onselect&&j.onselect(b),1&e&&!(1&j._prevButtons)&&j.onclick&&j.onclick(b),j._prevButtons=e}}))},t.addEventListener("webglcontextlost",V);var U=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],W=[U[0].slice(),U[1].slice()];function G(){if(!V()){Y();var e=j.camera.tick();F.view=j.camera.matrix,I=I||e,P=P||e,T.pixelRatio=j.pixelRatio,S.pixelRatio=j.pixelRatio;var t=L.length,n=U[0],a=U[1];n[0]=n[1]=n[2]=1/0,a[0]=a[1]=a[2]=-1/0;for(var o=0;o<t;++o){(H=L[o]).pixelRatio=j.pixelRatio,H.axes=j.axes,I=I||!!H.dirty,P=P||!!H.dirty;var s=H.bounds;if(s)for(var l=s[0],u=s[1],h=0;h<3;++h)n[h]=Math.min(n[h],l[h]),a[h]=Math.max(a[h],u[h])}var f=j.bounds;if(j.autoBounds)for(h=0;h<3;++h){if(a[h]<n[h])n[h]=-1,a[h]=1;else{n[h]===a[h]&&(n[h]-=1,a[h]+=1);var m=.05*(a[h]-n[h]);n[h]=n[h]-m,a[h]=a[h]+m}f[0][h]=n[h],f[1][h]=a[h]}var v=!1;for(h=0;h<3;++h)v=v||W[0][h]!==f[0][h]||W[1][h]!==f[1][h],W[0][h]=f[0][h],W[1][h]=f[1][h];if(P=P||v,I=I||v){if(v){var y=[0,0,0];for(o=0;o<3;++o)y[o]=g((f[1][o]-f[0][o])/10);T.autoTicks?T.update({bounds:f,tickSpacing:y}):T.update({bounds:f})}var k=r.drawingBufferWidth,M=r.drawingBufferHeight;for(z[0]=k,z[1]=M,B[0]=0|Math.max(k/j.pixelRatio,1),B[1]=0|Math.max(M/j.pixelRatio,1),w?(p(O,-k/M,k/M,-1,1,j.zNear,j.zFar),F._ortho=!0):(d(O,j.fovy,k/M,j.zNear,j.zFar),F._ortho=!1),o=0;o<16;++o)R[o]=0;R[15]=1;var C=0;for(o=0;o<3;++o)C=Math.max(C,f[1][o]-f[0][o]);for(o=0;o<3;++o)j.autoScale?R[5*o]=j.aspect[o]/(f[1][o]-f[0][o]):R[5*o]=1/C,j.autoCenter&&(R[12+o]=.5*-R[5*o]*(f[0][o]+f[1][o]));for(o=0;o<t;++o)(H=L[o]).axesBounds=f,j.clipToBounds&&(H.clipBounds=f);b.object&&(j.snapToData?S.position=b.dataCoordinate:S.position=b.dataPosition,S.bounds=f),P&&(P=!1,function(){if(!V()){r.colorMask(!0,!0,!0,!0),r.depthMask(!0),r.disable(r.BLEND),r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL);for(var e=L.length,t=D.length,n=0;n<t;++n){var a=D[n];a.shape=B,a.begin();for(var i=0;i<e;++i)if(A[i]===n){var o=L[i];o.drawPick&&(o.pixelRatio=1,o.drawPick(F))}a.end()}}}()),j.axesPixels=i(j.axes,F,k,M),j.onrender&&j.onrender(),r.bindFramebuffer(r.FRAMEBUFFER,null),r.viewport(0,0,k,M);var E=j.clearColor;r.clearColor(E[0],E[1],E[2],E[3]),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT),r.depthMask(!0),r.colorMask(!0,!0,!0,!0),r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL),r.disable(r.BLEND),r.disable(r.CULL_FACE);var N=!1;for(T.enable&&(N=N||T.isTransparent(),T.draw(F)),S.axes=T,b.object&&S.draw(F),r.disable(r.CULL_FACE),o=0;o<t;++o)(H=L[o]).axes=T,H.pixelRatio=j.pixelRatio,H.isOpaque&&H.isOpaque()&&H.draw(F),H.isTransparent&&H.isTransparent()&&(N=!0);if(N){for(_.shape=z,_.bind(),r.clear(r.DEPTH_BUFFER_BIT),r.colorMask(!1,!1,!1,!1),r.depthMask(!0),r.depthFunc(r.LESS),T.enable&&T.isTransparent()&&T.drawTransparent(F),o=0;o<t;++o)(H=L[o]).isOpaque&&H.isOpaque()&&H.draw(F);for(r.enable(r.BLEND),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.colorMask(!0,!0,!0,!0),r.depthMask(!1),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),T.isTransparent()&&T.drawTransparent(F),o=0;o<t;++o){var H;(H=L[o]).isTransparent&&H.isTransparent()&&H.drawTransparent(F)}r.bindFramebuffer(r.FRAMEBUFFER,null),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.disable(r.DEPTH_TEST),x.bind(),_.color[0].bind(0),x.uniforms.accumBuffer=0,c(r),r.disable(r.BLEND)}for(I=!1,o=0;o<t;++o)L[o].dirty=!1}}}return j.enableMouseListeners(),function e(){j._stopped||j.contextLost||(G(),requestAnimationFrame(e))}(),j.redraw=function(){j._stopped||(I=!0,G())},j},createCamera:n}},{"./camera.js":290,"./lib/shader":291,"a-big-triangle":61,"gl-axes3d":235,"gl-axes3d/properties":242,"gl-fbo":251,"gl-mat4/ortho":270,"gl-mat4/perspective":271,"gl-select-static":302,"gl-spikes3d":312,"is-mobile":421,"mouse-change":436}],293:[function(e,t,r){var n=e("glslify");r.pointVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform float pointCloud;\n\nhighp float rand(vec2 co) {\n  highp float a = 12.9898;\n  highp float b = 78.233;\n  highp float c = 43758.5453;\n  highp float d = dot(co.xy, vec2(a, b));\n  highp float e = mod(d, 3.14);\n  return fract(sin(e) * c);\n}\n\nvoid main() {\n  vec3 hgPosition = matrix * vec3(position, 1);\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\n    // if we don't jitter the point size a bit, overall point cloud\n    // saturation 'jumps' on zooming, which is disturbing and confusing\n  gl_PointSize = pointSize * ((19.5 + rand(position)) / 20.0);\n  if(pointCloud != 0.0) { // pointCloud is truthy\n    // get the same square surface as circle would be\n    gl_PointSize *= 0.886;\n  }\n}"]),r.pointFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color, borderColor;\nuniform float centerFraction;\nuniform float pointCloud;\n\nvoid main() {\n  float radius;\n  vec4 baseColor;\n  if(pointCloud != 0.0) { // pointCloud is truthy\n    if(centerFraction == 1.0) {\n      gl_FragColor = color;\n    } else {\n      gl_FragColor = mix(borderColor, color, centerFraction);\n    }\n  } else {\n    radius = length(2.0 * gl_PointCoord.xy - 1.0);\n    if(radius > 1.0) {\n      discard;\n    }\n    baseColor = mix(borderColor, color, step(radius, centerFraction));\n    gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n  }\n}\n"]),r.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n  vec3 hgPosition = matrix * vec3(position, 1);\n  gl_Position  = vec4(hgPosition.xy, 0, hgPosition.z);\n  gl_PointSize = pointSize;\n\n  vec4 id = pickId + pickOffset;\n  id.y += floor(id.x / 256.0);\n  id.x -= floor(id.x / 256.0) * 256.0;\n\n  id.z += floor(id.y / 256.0);\n  id.y -= floor(id.y / 256.0) * 256.0;\n\n  id.w += floor(id.z / 256.0);\n  id.z -= floor(id.z / 256.0) * 256.0;\n\n  fragId = id;\n}\n"]),r.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n  float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n  if(radius > 1.0) {\n    discard;\n  }\n  gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:410}],294:[function(e,t,r){"use strict";var n=e("gl-shader"),a=e("gl-buffer"),i=e("typedarray-pool"),o=e("./lib/shader");function s(e,t,r,n,a){this.plot=e,this.offsetBuffer=t,this.pickBuffer=r,this.shader=n,this.pickShader=a,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(e,t){var r=e.gl,i=a(r),l=a(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),d=new s(e,i,l,c,u);return d.update(t),e.addObject(d),d};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(e){var t;function r(t,r){return t in e?e[t]:r}e=e||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=e.positions.length>>>1,a=e.positions instanceof Float32Array,o=e.idToIndex instanceof Int32Array&&e.idToIndex.length>=n,s=e.positions,l=a?s:i.mallocFloat32(s.length),c=o?e.idToIndex:i.mallocInt32(n);if(a||l.set(s),!o)for(l.set(s),t=0;t<n;t++)c[t]=t;this.points=s,this.offsetBuffer.update(l),this.pickBuffer.update(c),a||i.free(l),o||i.free(c),this.pointCount=n,this.pickOffset=0},u.unifiedDraw=(l=[1,0,0,0,1,0,0,0,1],c=[0,0,0,0],function(e){var t=void 0!==e,r=t?this.pickShader:this.shader,n=this.plot.gl,a=this.plot.dataBox;if(0===this.pointCount)return e;var i=a[2]-a[0],o=a[3]-a[1],s=function(e,t){var r,n=0,a=e.length>>>1;for(r=0;r<a;r++){var i=e[2*r],o=e[2*r+1];i>=t[0]&&i<=t[2]&&o>=t[1]&&o<=t[3]&&n++}return n}(this.points,a),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/i,l[4]=2/o,l[6]=-2*a[0]/i-1,l[7]=-2*a[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),t&&(c[0]=255&e,c[1]=e>>8&255,c[2]=e>>16&255,c[3]=e>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=e);var d=n.getParameter(n.BLEND),p=n.getParameter(n.DITHER);return d&&!this.blend&&n.disable(n.BLEND),p&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),d&&!this.blend&&n.enable(n.BLEND),p&&n.enable(n.DITHER),e+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(e,t,r){var n=this.pickOffset,a=this.pointCount;if(r<n||r>=n+a)return null;var i=r-n,o=this.points;return{object:this,pointId:i,dataCoord:[o[2*i],o[2*i+1]]}}},{"./lib/shader":293,"gl-buffer":243,"gl-shader":303,"typedarray-pool":543}],295:[function(e,t,r){t.exports=function(e,t,r,n){var a,i,o,s,l,c=t[0],u=t[1],d=t[2],p=t[3],h=r[0],f=r[1],m=r[2],g=r[3];return(i=c*h+u*f+d*m+p*g)<0&&(i=-i,h=-h,f=-f,m=-m,g=-g),1-i>1e-6?(a=Math.acos(i),o=Math.sin(a),s=Math.sin((1-n)*a)/o,l=Math.sin(n*a)/o):(s=1-n,l=n),e[0]=s*c+l*h,e[1]=s*u+l*f,e[2]=s*d+l*m,e[3]=s*p+l*g,e}},{}],296:[function(e,t,r){"use strict";t.exports=function(e){return e||0===e?e.toString():""}},{}],297:[function(e,t,r){"use strict";var n=e("vectorize-text");t.exports=function(e,t,r){var i=a[t];if(i||(i=a[t]={}),e in i)return i[e];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(e,o);o.triangles=!1;var l,c,u=n(e,o);if(r&&1!==r){for(l=0;l<s.positions.length;++l)for(c=0;c<s.positions[l].length;++c)s.positions[l][c]/=r;for(l=0;l<u.positions.length;++l)for(c=0;c<u.positions[l].length;++c)u.positions[l][c]/=r}var d=[[1/0,1/0],[-1/0,-1/0]],p=u.positions.length;for(l=0;l<p;++l){var h=u.positions[l];for(c=0;c<2;++c)d[0][c]=Math.min(d[0][c],h[c]),d[1][c]=Math.max(d[1][c],h[c])}return i[e]=[s,u,d]};var a={}},{"vectorize-text":548}],298:[function(e,t,r){var n=e("gl-shader"),a=e("glslify"),i=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float scale = 1.0;\n    if(distance(highlightId, id) < 0.0001) {\n      scale = highlightScale;\n    }\n\n    vec4 worldPosition = model * vec4(position, 1);\n    vec4 viewPosition = view * worldPosition;\n    viewPosition = viewPosition / viewPosition.w;\n    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n    gl_Position = clipPosition;\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = position;\n  }\n}"]),o=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float scale = pixelRatio;\n    if(distance(highlightId.bgr, id.bgr) < 0.001) {\n      scale *= highlightScale;\n    }\n\n    vec4 worldPosition = model * vec4(position, 1.0);\n    vec4 viewPosition = view * worldPosition;\n    vec4 clipPosition = projection * viewPosition;\n    clipPosition /= clipPosition.w;\n\n    gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = position;\n  }\n}"]),s=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n    gl_Position = vec4(0,0,0,0);\n  } else {\n    float lscale = pixelRatio * scale;\n    if(distance(highlightId, id) < 0.0001) {\n      lscale *= highlightScale;\n    }\n\n    vec4 clipCenter   = projection * view * model * vec4(position, 1);\n    vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n    vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n    gl_Position = clipPosition;\n    interpColor = color;\n    pickId = id;\n    dataCoordinate = dataPosition;\n  }\n}\n"]),l=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if (\n    outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n    interpColor.a * opacity == 0.\n  ) discard;\n  gl_FragColor = interpColor * opacity;\n}\n"]),c=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n  if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n  gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],d={vertex:i,fragment:l,attributes:u},p={vertex:o,fragment:l,attributes:u},h={vertex:s,fragment:l,attributes:u},f={vertex:i,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function v(e,t){var r=n(e,t),a=r.attributes;return a.position.location=0,a.color.location=1,a.glyph.location=2,a.id.location=3,r}r.createPerspective=function(e){return v(e,d)},r.createOrtho=function(e){return v(e,p)},r.createProject=function(e){return v(e,h)},r.createPickPerspective=function(e){return v(e,f)},r.createPickOrtho=function(e){return v(e,m)},r.createPickProject=function(e){return v(e,g)}},{"gl-shader":303,glslify:410}],299:[function(e,t,r){"use strict";var n=e("is-string-blank"),a=e("gl-buffer"),i=e("gl-vao"),o=e("typedarray-pool"),s=e("gl-mat4/multiply"),l=e("./lib/shaders"),c=e("./lib/glyphs"),u=e("./lib/get-simple-string"),d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e,t){var r=e[0],n=e[1],a=e[2],i=e[3];return e[0]=t[0]*r+t[4]*n+t[8]*a+t[12]*i,e[1]=t[1]*r+t[5]*n+t[9]*a+t[13]*i,e[2]=t[2]*r+t[6]*n+t[10]*a+t[14]*i,e[3]=t[3]*r+t[7]*n+t[11]*a+t[15]*i,e}function h(e,t,r,n){return p(n,n),p(n,n),p(n,n)}function f(e,t){this.index=e,this.dataCoordinate=this.position=t}function m(e){return!0===e?1:e>1?1:e}function g(e,t,r,n,a,i,o,s,l,c,u,d){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=n,this.pointBuffer=a,this.colorBuffer=i,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=d,this.points=[],this._selectResult=new f(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(e){var t=e.gl,r=l.createPerspective(t),n=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),d=a(t),p=a(t),h=a(t),f=a(t),m=i(t,[{buffer:d,size:3,type:t.FLOAT},{buffer:p,size:4,type:t.FLOAT},{buffer:h,size:2,type:t.FLOAT},{buffer:f,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),v=new g(t,r,n,o,d,p,h,f,m,s,c,u);return v.update(e),v};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(e){this.pickId=e},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],b=[0,0,0],_=[0,0,0],x=[0,0,0,1],w=[0,0,0,1],k=d.slice(),M=[0,0,0],T=[[0,0,0],[0,0,0]];function C(e){return e[0]=e[1]=e[2]=0,e}function S(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function L(e,t,r,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=n,e}function A(e,t,r,n){var a,i=t.axesProject,o=t.gl,l=e.uniforms,c=r.model||d,u=r.view||d,p=r.projection||d,f=t.axesBounds,m=function(e){for(var t=T,r=0;r<2;++r)for(var n=0;n<3;++n)t[r][n]=Math.max(Math.min(e[r][n],1e8),-1e8);return t}(t.clipBounds);a=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,e.bind(),l.view=u,l.projection=p,l.screenSize=y,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=m,l.pickGroup=t.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(i[g]){l.scale=t.projectScale[g],l.opacity=t.projectOpacity[g];for(var v=k,A=0;A<16;++A)v[A]=0;for(A=0;A<4;++A)v[5*A]=1;v[5*g]=0,a[g]<0?v[12+g]=f[0][g]:v[12+g]=f[1][g],s(v,c,v),l.model=v;var E=(g+1)%3,D=(g+2)%3,I=C(b),P=C(_);I[E]=1,P[D]=1;var O=h(0,0,0,S(x,I)),R=h(0,0,0,S(w,P));if(Math.abs(O[1])>Math.abs(R[1])){var F=O;O=R,R=F,F=I,I=P,P=F;var z=E;E=D,D=z}O[0]<0&&(I[E]=-1),R[1]>0&&(P[D]=-1);var N=0,j=0;for(A=0;A<4;++A)N+=Math.pow(c[4*E+A],2),j+=Math.pow(c[4*D+A],2);I[E]/=Math.sqrt(N),P[D]/=Math.sqrt(j),l.axes[0]=I,l.axes[1]=P,l.fragClipBounds[0]=L(M,m[0],g,-1e8),l.fragClipBounds[1]=L(M,m[1],g,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*n),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}var E=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function D(e,t,r,n,a,i,o){var s=r.gl;if((i===r.projectHasAlpha||o)&&A(t,r,n,a),i===r.hasAlpha||o){e.bind();var l=e.uniforms;l.model=n.model||d,l.view=n.view||d,l.projection=n.projection||d,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=E,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=a,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*a),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function I(e,t,r,a){var i;i=Array.isArray(e)?t<e.length?e[t]:void 0:e,i=u(i);var o=!0;n(i)&&(i="▼",o=!1);var s=c(i,r,a);return{mesh:s[0],lines:s[1],bounds:s[2],visible:o}}v.draw=function(e){D(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,e,this.pixelRatio,!1,!1)},v.drawTransparent=function(e){D(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,e,this.pixelRatio,!0,!1)},v.drawPick=function(e){D(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,e,1,!0,!0)},v.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=e.value[2]+(e.value[1]<<8)+(e.value[0]<<16);if(t>=this.pointCount||t<0)return null;var r=this.points[t],n=this._selectResult;n.index=t;for(var a=0;a<3;++a)n.position[a]=n.dataCoordinate[a]=r[a];return n},v.highlight=function(e){if(e){var t=e.index,r=255&t,n=t>>8&255,a=t>>16&255;this.highlightId=[r/255,n/255,a/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(Array.isArray(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(Array.isArray(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){Array.isArray(e.projectOpacity)?this.projectOpacity=e.projectOpacity.slice():(r=+e.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=m(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=m(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var a,i,s=e.position,l=e.font||"normal",c=e.alignment||[0,0];if(2===c.length)a=c[0],i=c[1];else for(a=[],i=[],n=0;n<c.length;++n)a[n]=c[n][0],i[n]=c[n][1];var u=[1/0,1/0,1/0],d=[-1/0,-1/0,-1/0],p=e.glyph,h=e.color,f=e.size,g=e.angle,v=e.lineColor,y=-1,b=0,_=0,x=0;if(s.length){x=s.length;e:for(n=0;n<x;++n){for(var w=s[n],k=0;k<3;++k)if(isNaN(w[k])||!isFinite(w[k]))continue e;var M=(j=I(p,n,l,this.pixelRatio)).mesh,T=j.lines,C=j.bounds;b+=3*M.cells.length,_+=2*T.edges.length}}var S=b+_,L=o.mallocFloat(3*S),A=o.mallocFloat(4*S),E=o.mallocFloat(2*S),D=o.mallocUint32(S);if(S>0){var P=0,O=b,R=[0,0,0,1],F=[0,0,0,1],z=Array.isArray(h)&&Array.isArray(h[0]),N=Array.isArray(v)&&Array.isArray(v[0]);e:for(n=0;n<x;++n){for(y+=1,w=s[n],k=0;k<3;++k){if(isNaN(w[k])||!isFinite(w[k]))continue e;d[k]=Math.max(d[k],w[k]),u[k]=Math.min(u[k],w[k])}M=(j=I(p,n,l,this.pixelRatio)).mesh,T=j.lines,C=j.bounds;var j,B=j.visible;if(B)if(Array.isArray(h)){if(3===(Y=z?n<h.length?h[n]:[0,0,0,0]:h).length){for(k=0;k<3;++k)R[k]=Y[k];R[3]=1}else if(4===Y.length){for(k=0;k<4;++k)R[k]=Y[k];!this.hasAlpha&&Y[3]<1&&(this.hasAlpha=!0)}}else R[0]=R[1]=R[2]=0,R[3]=1;else R=[1,1,1,0];if(B)if(Array.isArray(v)){var Y;if(3===(Y=N?n<v.length?v[n]:[0,0,0,0]:v).length){for(k=0;k<3;++k)F[k]=Y[k];F[k]=1}else if(4===Y.length){for(k=0;k<4;++k)F[k]=Y[k];!this.hasAlpha&&Y[3]<1&&(this.hasAlpha=!0)}}else F[0]=F[1]=F[2]=0,F[3]=1;else F=[1,1,1,0];var H=.5;B?Array.isArray(f)?H=n<f.length?+f[n]:12:f?H=+f:this.useOrtho&&(H=12):H=0;var V=0;Array.isArray(g)?V=n<g.length?+g[n]:0:g&&(V=+g);var U=Math.cos(V),W=Math.sin(V);for(w=s[n],k=0;k<3;++k)d[k]=Math.max(d[k],w[k]),u[k]=Math.min(u[k],w[k]);var G=a,q=i;G=0,Array.isArray(a)?G=n<a.length?a[n]:0:a&&(G=a),q=0,Array.isArray(i)?q=n<i.length?i[n]:0:i&&(q=i);var K=[G*=G>0?1-C[0][0]:G<0?1+C[1][0]:1,q*=q>0?1-C[0][1]:q<0?1+C[1][1]:1],X=M.cells||[],Z=M.positions||[];for(k=0;k<X.length;++k)for(var J=X[k],$=0;$<3;++$){for(var Q=0;Q<3;++Q)L[3*P+Q]=w[Q];for(Q=0;Q<4;++Q)A[4*P+Q]=R[Q];D[P]=y;var ee=Z[J[$]];E[2*P]=H*(U*ee[0]-W*ee[1]+K[0]),E[2*P+1]=H*(W*ee[0]+U*ee[1]+K[1]),P+=1}for(X=T.edges,Z=T.positions,k=0;k<X.length;++k)for(J=X[k],$=0;$<2;++$){for(Q=0;Q<3;++Q)L[3*O+Q]=w[Q];for(Q=0;Q<4;++Q)A[4*O+Q]=F[Q];D[O]=y,ee=Z[J[$]],E[2*O]=H*(U*ee[0]-W*ee[1]+K[0]),E[2*O+1]=H*(W*ee[0]+U*ee[1]+K[1]),O+=1}}}this.bounds=[u,d],this.points=s,this.pointCount=s.length,this.vertexCount=b,this.lineVertexCount=_,this.pointBuffer.update(L),this.colorBuffer.update(A),this.glyphBuffer.update(E),this.idBuffer.update(D),o.free(L),o.free(A),o.free(E),o.free(D)},v.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},{"./lib/get-simple-string":296,"./lib/glyphs":297,"./lib/shaders":298,"gl-buffer":243,"gl-mat4/multiply":269,"gl-vao":328,"is-string-blank":424,"typedarray-pool":543}],300:[function(e,t,r){"use strict";var n=e("glslify");r.boxVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 vertex;\n\nuniform vec2 cornerA, cornerB;\n\nvoid main() {\n  gl_Position = vec4(mix(cornerA, cornerB, vertex), 0, 1);\n}\n"]),r.boxFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n  gl_FragColor = color;\n}\n"])},{glslify:410}],301:[function(e,t,r){"use strict";var n=e("gl-shader"),a=e("gl-buffer"),i=e("./lib/shaders");function o(e,t,r){this.plot=e,this.boxBuffer=t,this.boxShader=r,this.enabled=!0,this.selectBox=[1/0,1/0,-1/0,-1/0],this.borderColor=[0,0,0,1],this.innerFill=!1,this.innerColor=[0,0,0,.25],this.outerFill=!0,this.outerColor=[0,0,0,.5],this.borderWidth=10}t.exports=function(e,t){var r=e.gl,s=a(r,[0,0,0,1,1,0,1,1]),l=n(r,i.boxVertex,i.boxFragment),c=new o(e,s,l);return c.update(t),e.addOverlay(c),c};var s=o.prototype;s.draw=function(){if(this.enabled){var e=this.plot,t=this.selectBox,r=this.borderWidth,n=(this.innerFill,this.innerColor),a=(this.outerFill,this.outerColor),i=this.borderColor,o=e.box,s=e.screenBox,l=e.dataBox,c=e.viewBox,u=e.pixelRatio,d=(t[0]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],p=(t[1]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1],h=(t[2]-l[0])*(c[2]-c[0])/(l[2]-l[0])+c[0],f=(t[3]-l[1])*(c[3]-c[1])/(l[3]-l[1])+c[1];if(d=Math.max(d,c[0]),p=Math.max(p,c[1]),h=Math.min(h,c[2]),f=Math.min(f,c[3]),!(h<d||f<p)){o.bind();var m=s[2]-s[0],g=s[3]-s[1];if(this.outerFill&&(o.drawBox(0,0,m,p,a),o.drawBox(0,p,d,f,a),o.drawBox(0,f,m,g,a),o.drawBox(h,p,m,f,a)),this.innerFill&&o.drawBox(d,p,h,f,n),r>0){var v=r*u;o.drawBox(d-v,p-v,h+v,p+v,i),o.drawBox(d-v,f-v,h+v,f+v,i),o.drawBox(d-v,p-v,d+v,f+v,i),o.drawBox(h-v,p-v,h+v,f+v,i)}}}},s.update=function(e){e=e||{},this.innerFill=!!e.innerFill,this.outerFill=!!e.outerFill,this.innerColor=(e.innerColor||[0,0,0,.5]).slice(),this.outerColor=(e.outerColor||[0,0,0,.5]).slice(),this.borderColor=(e.borderColor||[0,0,0,1]).slice(),this.borderWidth=e.borderWidth||0,this.selectBox=(e.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":300,"gl-buffer":243,"gl-shader":303}],302:[function(e,t,r){"use strict";t.exports=function(e,t){var r=n(e,t),i=a.mallocUint8(t[0]*t[1]*4);return new c(e,r,i)};var n=e("gl-fbo"),a=e("typedarray-pool"),i=e("ndarray"),o=e("bit-twiddle").nextPow2,s=e("cwise/lib/wrapper")({args:["array",{offset:[0,0,1],array:0},{offset:[0,0,2],array:0},{offset:[0,0,3],array:0},"scalar","scalar","index"],pre:{body:"{this_closestD2=1e8,this_closestX=-1,this_closestY=-1}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},body:{body:"{if(_inline_16_arg0_<255||_inline_16_arg1_<255||_inline_16_arg2_<255||_inline_16_arg3_<255){var _inline_16_l=_inline_16_arg4_-_inline_16_arg6_[0],_inline_16_a=_inline_16_arg5_-_inline_16_arg6_[1],_inline_16_f=_inline_16_l*_inline_16_l+_inline_16_a*_inline_16_a;_inline_16_f<this_closestD2&&(this_closestD2=_inline_16_f,this_closestX=_inline_16_arg6_[0],this_closestY=_inline_16_arg6_[1])}}",args:[{name:"_inline_16_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg4_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg5_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_16_arg6_",lvalue:!1,rvalue:!0,count:4}],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:["_inline_16_a","_inline_16_f","_inline_16_l"]},post:{body:"{return[this_closestX,this_closestY,this_closestD2]}",args:[],thisVars:["this_closestD2","this_closestX","this_closestY"],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});function l(e,t,r,n,a){this.coord=[e,t],this.id=r,this.value=n,this.distance=a}function c(e,t,r){this.gl=e,this.fbo=t,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(t.bind(),e.readPixels(0,0,t.shape[0],t.shape[1],e.RGBA,e.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=c.prototype;Object.defineProperty(u,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(e){if(this.gl){this.fbo.shape=e;var t=this.fbo.shape[0],r=this.fbo.shape[1];if(r*t*4>this.buffer.length){a.free(this.buffer);for(var n=this.buffer=a.mallocUint8(o(r*t*4)),i=0;i<r*t*4;++i)n[i]=255}return e}}}),u.begin=function(){var e=this.gl;this.shape,e&&(this.fbo.bind(),e.clearColor(1,1,1,1),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT))},u.end=function(){var e=this.gl;e&&(e.bindFramebuffer(e.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},u.query=function(e,t,r){if(!this.gl)return null;var n=this.fbo.shape.slice();e|=0,t|=0,"number"!=typeof r&&(r=1);var a=0|Math.min(Math.max(e-r,0),n[0]),o=0|Math.min(Math.max(e+r,0),n[0]),c=0|Math.min(Math.max(t-r,0),n[1]),u=0|Math.min(Math.max(t+r,0),n[1]);if(o<=a||u<=c)return null;var d=[o-a,u-c],p=i(this.buffer,[d[0],d[1],4],[4,4*n[0],1],4*(a+n[0]*c)),h=s(p.hi(d[0],d[1],1),r,r),f=h[0],m=h[1];return f<0||Math.pow(this.radius,2)<h[2]?null:new l(f+a|0,m+c|0,p.get(f,m,0),[p.get(f,m,1),p.get(f,m,2),p.get(f,m,3)],Math.sqrt(h[2]))},u.dispose=function(){this.gl&&(this.fbo.dispose(),a.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},{"bit-twiddle":93,"cwise/lib/wrapper":150,"gl-fbo":251,ndarray:451,"typedarray-pool":543}],303:[function(e,t,r){"use strict";var n=e("./lib/create-uniforms"),a=e("./lib/create-attributes"),i=e("./lib/reflect"),o=e("./lib/shader-cache"),s=e("./lib/runtime-reflect"),l=e("./lib/GLError");function c(e){this.gl=e,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var u=c.prototype;function d(e,t){return e.name<t.name?-1:1}u.bind=function(){var e;this.program||this._relink();var t=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(t>r)for(e=r;e<t;e++)this.gl.enableVertexAttribArray(e);else if(r>t)for(e=t;e<r;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=t,this.gl.useProgram(this.program)},u.dispose=function(){for(var e=this.gl.lastAttribCount,t=0;t<e;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null},u.update=function(e,t,r,c){if(!t||1===arguments.length){var u=e;e=u.vertex,t=u.fragment,r=u.uniforms,c=u.attributes}var p=this,h=p.gl,f=p._vref;p._vref=o.shader(h,h.VERTEX_SHADER,e),f&&f.dispose(),p.vertShader=p._vref.shader;var m=this._fref;if(p._fref=o.shader(h,h.FRAGMENT_SHADER,t),m&&m.dispose(),p.fragShader=p._fref.shader,!r||!c){var g=h.createProgram();if(h.attachShader(g,p.fragShader),h.attachShader(g,p.vertShader),h.linkProgram(g),!h.getProgramParameter(g,h.LINK_STATUS)){var v=h.getProgramInfoLog(g);throw new l(v,"Error linking program:"+v)}r=r||s.uniforms(h,g),c=c||s.attributes(h,g),h.deleteProgram(g)}(c=c.slice()).sort(d);var y,b=[],_=[],x=[];for(y=0;y<c.length;++y){var w=c[y];if(w.type.indexOf("mat")>=0){for(var k=0|w.type.charAt(w.type.length-1),M=new Array(k),T=0;T<k;++T)M[T]=x.length,_.push(w.name+"["+T+"]"),"number"==typeof w.location?x.push(w.location+T):Array.isArray(w.location)&&w.location.length===k&&"number"==typeof w.location[T]?x.push(0|w.location[T]):x.push(-1);b.push({name:w.name,type:w.type,locations:M})}else b.push({name:w.name,type:w.type,locations:[x.length]}),_.push(w.name),"number"==typeof w.location?x.push(0|w.location):x.push(-1)}var C=0;for(y=0;y<x.length;++y)if(x[y]<0){for(;x.indexOf(C)>=0;)C+=1;x[y]=C}var S=new Array(r.length);function L(){p.program=o.program(h,p._vref,p._fref,_,x);for(var e=0;e<r.length;++e)S[e]=h.getUniformLocation(p.program,r[e].name)}L(),p._relink=L,p.types={uniforms:i(r),attributes:i(c)},p.attributes=a(h,p,b,x),Object.defineProperty(p,"uniforms",n(h,p,r,S))},t.exports=function(e,t,r,n,a){var i=new c(e);return i.update(t,r,n,a),i}},{"./lib/GLError":304,"./lib/create-attributes":305,"./lib/create-uniforms":306,"./lib/reflect":307,"./lib/runtime-reflect":308,"./lib/shader-cache":309}],304:[function(e,t,r){function n(e,t,r){this.shortMessage=t||"",this.longMessage=r||"",this.rawError=e||"",this.message="gl-shader: "+(t||e||"")+(r?"\n"+r:""),this.stack=(new Error).stack}n.prototype=new Error,n.prototype.name="GLError",n.prototype.constructor=n,t.exports=n},{}],305:[function(e,t,r){"use strict";t.exports=function(e,t,r,a){for(var i={},l=0,c=r.length;l<c;++l){var u=r[l],d=u.name,p=u.type,h=u.locations;switch(p){case"bool":case"int":case"float":o(e,t,h[0],a,1,i,d);break;default:if(p.indexOf("vec")>=0){if((f=p.charCodeAt(p.length-1)-48)<2||f>4)throw new n("","Invalid data type for attribute "+d+": "+p);o(e,t,h[0],a,f,i,d)}else{if(!(p.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+d+": "+p);var f;if((f=p.charCodeAt(p.length-1)-48)<2||f>4)throw new n("","Invalid data type for attribute "+d+": "+p);s(e,t,h,a,f,i,d)}}}return i};var n=e("./GLError");function a(e,t,r,n,a,i){this._gl=e,this._wrapper=t,this._index=r,this._locations=n,this._dimension=a,this._constFunc=i}var i=a.prototype;function o(e,t,r,n,i,o,s){for(var l=["gl","v"],c=[],u=0;u<i;++u)l.push("x"+u),c.push("x"+u);l.push("if(x0.length===void 0){return gl.vertexAttrib"+i+"f(v,"+c.join()+")}else{return gl.vertexAttrib"+i+"fv(v,x0)}");var d=Function.apply(null,l),p=new a(e,t,r,n,i,d);Object.defineProperty(o,s,{set:function(t){return e.disableVertexAttribArray(n[r]),d(e,n[r],t),t},get:function(){return p},enumerable:!0})}function s(e,t,r,n,a,i,s){for(var l=new Array(a),c=new Array(a),u=0;u<a;++u)o(e,t,r[u],n,a,l,u),c[u]=l[u];Object.defineProperty(l,"location",{set:function(e){if(Array.isArray(e))for(var t=0;t<a;++t)c[t].location=e[t];else for(t=0;t<a;++t)c[t].location=e+t;return e},get:function(){for(var e=new Array(a),t=0;t<a;++t)e[t]=n[r[t]];return e},enumerable:!0}),l.pointer=function(t,i,o,s){t=t||e.FLOAT,i=!!i,o=o||a*a,s=s||0;for(var l=0;l<a;++l){var c=n[r[l]];e.vertexAttribPointer(c,a,t,i,o,s+l*a),e.enableVertexAttribArray(c)}};var d=new Array(a),p=e["vertexAttrib"+a+"fv"];Object.defineProperty(i,s,{set:function(t){for(var i=0;i<a;++i){var o=n[r[i]];if(e.disableVertexAttribArray(o),Array.isArray(t[0]))p.call(e,o,t[i]);else{for(var s=0;s<a;++s)d[s]=t[a*i+s];p.call(e,o,d)}}return t},get:function(){return l},enumerable:!0})}i.pointer=function(e,t,r,n){var a=this._gl,i=this._locations[this._index];a.vertexAttribPointer(i,this._dimension,e||a.FLOAT,!!t,r||0,n||0),a.enableVertexAttribArray(i)},i.set=function(e,t,r,n){return this._constFunc(this._locations[this._index],e,t,r,n)},Object.defineProperty(i,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}})},{"./GLError":304}],306:[function(e,t,r){"use strict";var n=e("./reflect"),a=e("./GLError");function i(e){return new Function("y","return function(){return y}")(e)}function o(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=t;return r}t.exports=function(e,t,r,s){function l(e,t,r){switch(r){case"bool":case"int":case"sampler2D":case"samplerCube":return"gl.uniform1i(locations["+t+"],obj"+e+")";case"float":return"gl.uniform1f(locations["+t+"],obj"+e+")";default:var n=r.indexOf("vec");if(!(0<=n&&n<=1&&r.length===4+n)){if(0===r.indexOf("mat")&&4===r.length){var i;if((i=r.charCodeAt(r.length-1)-48)<2||i>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+i+"fv(locations["+t+"],false,obj"+e+")"}throw new a("","Unknown uniform data type for "+name+": "+r)}if((i=r.charCodeAt(r.length-1)-48)<2||i>4)throw new a("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+i+"iv(locations["+t+"],obj"+e+")";case"v":return"gl.uniform"+i+"fv(locations["+t+"],obj"+e+")";default:throw new a("","Unrecognized data type for vector "+name+": "+r)}}}function c(t){for(var n=["return function updateProperty(obj){"],a=function e(t,r){if("object"!=typeof r)return[[t,r]];var n=[];for(var a in r){var i=r[a],o=t;parseInt(a)+""===a?o+="["+a+"]":o+="."+a,"object"==typeof i?n.push.apply(n,e(o,i)):n.push([o,i])}return n}("",t),i=0;i<a.length;++i){var o=a[i],c=o[0],u=o[1];s[u]&&n.push(l(c,u,r[u].type))}return n.push("return obj}"),new Function("gl","locations",n.join("\n"))(e,s)}function u(n,l,u){if("object"==typeof u){var p=d(u);Object.defineProperty(n,l,{get:i(p),set:c(u),enumerable:!0,configurable:!1})}else s[u]?Object.defineProperty(n,l,{get:(h=u,new Function("gl","wrapper","locations","return function(){return gl.getUniform(wrapper.program,locations["+h+"])}")(e,t,s)),set:c(u),enumerable:!0,configurable:!1}):n[l]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new a("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r;if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new a("","Unknown uniform data type for "+name+": "+e)}}(r[u].type);var h}function d(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var r=0;r<e.length;++r)u(t,r,e[r])}else for(var n in t={},e)u(t,n,e[n]);return t}var p=n(r,!0);return{get:i(d(p)),set:c(p),enumerable:!0,configurable:!0}}},{"./GLError":304,"./reflect":307}],307:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r={},n=0;n<e.length;++n)for(var a=e[n].name.split("."),i=r,o=0;o<a.length;++o){var s=a[o].split("[");if(s.length>1){s[0]in i||(i[s[0]]=[]),i=i[s[0]];for(var l=1;l<s.length;++l){var c=parseInt(s[l]);l<s.length-1||o<a.length-1?(c in i||(l<s.length-1?i[c]=[]:i[c]={}),i=i[c]):i[c]=t?n:e[n].type}}else o<a.length-1?(s[0]in i||(i[s[0]]={}),i=i[s[0]]):i[s[0]]=t?n:e[n].type}return r}},{}],308:[function(e,t,r){"use strict";r.uniforms=function(e,t){for(var r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=[],a=0;a<r;++a){var o=e.getActiveUniform(t,a);if(o){var s=i(e,o.type);if(o.size>1)for(var l=0;l<o.size;++l)n.push({name:o.name.replace("[0]","["+l+"]"),type:s});else n.push({name:o.name,type:s})}}return n},r.attributes=function(e,t){for(var r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),n=[],a=0;a<r;++a){var o=e.getActiveAttrib(t,a);o&&n.push({name:o.name,type:i(e,o.type)})}return n};var n={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},a=null;function i(e,t){if(!a){var r=Object.keys(n);a={};for(var i=0;i<r.length;++i){var o=r[i];a[e[o]]=n[o]}}return a[t]}},{}],309:[function(e,t,r){"use strict";r.shader=function(e,t,r){return u(e).getShaderReference(t,r)},r.program=function(e,t,r,n,a){return u(e).getProgram(t,r,n,a)};var n=e("./GLError"),a=e("gl-format-compiler-error"),i=new("undefined"==typeof WeakMap?e("weakmap-shim"):WeakMap),o=0;function s(e,t,r,n,a,i,o){this.id=e,this.src=t,this.type=r,this.shader=n,this.count=i,this.programs=[],this.cache=o}function l(e){this.gl=e,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var e=this.cache,t=e.gl,r=this.programs,n=0,a=r.length;n<a;++n){var i=e.programs[r[n]];i&&(delete e.programs[n],t.deleteProgram(i))}t.deleteShader(this.shader),delete e.shaders[this.type===t.FRAGMENT_SHADER|0][this.src]}};var c=l.prototype;function u(e){var t=i.get(e);return t||(t=new l(e),i.set(e,t)),t}c.getShaderReference=function(e,t){var r=this.gl,i=this.shaders[e===r.FRAGMENT_SHADER|0],l=i[t];if(l&&r.isShader(l.shader))l.count+=1;else{var c=function(e,t,r){var i=e.createShader(t);if(e.shaderSource(i,r),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS)){var o=e.getShaderInfoLog(i);try{var s=a(o,r,t)}catch(e){throw console.warn("Failed to format compiler error: "+e),new n(o,"Error compiling shader:\n"+o)}throw new n(o,s.short,s.long)}return i}(r,e,t);l=i[t]=new s(o++,t,e,c,[],1,this)}return l},c.getProgram=function(e,t,r,a){var i=[e.id,t.id,r.join(":"),a.join(":")].join("@"),o=this.programs[i];return o&&this.gl.isProgram(o)||(this.programs[i]=o=function(e,t,r,a,i){var o=e.createProgram();e.attachShader(o,t),e.attachShader(o,r);for(var s=0;s<a.length;++s)e.bindAttribLocation(o,i[s],a[s]);if(e.linkProgram(o),!e.getProgramParameter(o,e.LINK_STATUS)){var l=e.getProgramInfoLog(o);throw new n(l,"Error linking program: "+l)}return o}(this.gl,e.shader,t.shader,r,a),e.programs.push(i),t.programs.push(i)),o}},{"./GLError":304,"gl-format-compiler-error":252,"weakmap-shim":553}],310:[function(e,t,r){"use strict";function n(e){this.plot=e,this.enable=[!0,!0,!1,!1],this.width=[1,1,1,1],this.color=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.center=[1/0,1/0]}t.exports=function(e,t){var r=new n(e);return r.update(t),e.addOverlay(r),r};var a=n.prototype;a.update=function(e){e=e||{},this.enable=(e.enable||[!0,!0,!1,!1]).slice(),this.width=(e.width||[1,1,1,1]).slice(),this.color=(e.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map((function(e){return e.slice()})),this.center=(e.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},a.draw=function(){var e=this.enable,t=this.width,r=this.color,n=this.center,a=this.plot,i=a.line,o=a.dataBox,s=a.viewBox;if(i.bind(),o[0]<=n[0]&&n[0]<=o[2]&&o[1]<=n[1]&&n[1]<=o[3]){var l=s[0]+(n[0]-o[0])/(o[2]-o[0])*(s[2]-s[0]),c=s[1]+(n[1]-o[1])/(o[3]-o[1])*(s[3]-s[1]);e[0]&&i.drawLine(l,c,s[0],c,t[0],r[0]),e[1]&&i.drawLine(l,c,l,s[1],t[1],r[1]),e[2]&&i.drawLine(l,c,s[2],c,t[2],r[2]),e[3]&&i.drawLine(l,c,l,s[3],t[3],r[3])}},a.dispose=function(){this.plot.removeOverlay(this)}},{}],311:[function(e,t,r){"use strict";var n=e("glslify"),a=e("gl-shader"),i=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec3 position, color;\nattribute float weight;\n\nuniform mat4 model, view, projection;\nuniform vec3 coordinates[3];\nuniform vec4 colors[3];\nuniform vec2 screenShape;\nuniform float lineWidth;\n\nvarying vec4 fragColor;\n\nvoid main() {\n  vec3 vertexPosition = mix(coordinates[0],\n    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));\n\n  vec4 clipPos = projection * view * model * vec4(vertexPosition, 1.0);\n  vec2 clipOffset = (projection * view * model * vec4(color, 0.0)).xy;\n  vec2 delta = weight * clipOffset * screenShape;\n  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;\n\n  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);\n  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];\n}\n"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n  gl_FragColor = fragColor;\n}"]);t.exports=function(e){return a(e,i,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},{"gl-shader":303,glslify:410}],312:[function(e,t,r){"use strict";var n=e("gl-buffer"),a=e("gl-vao"),i=e("./shaders/index");t.exports=function(e,t){var r=[];function o(e,t,n,a,i,o){var s=[e,t,n,0,0,0,1];s[a+3]=1,s[a]=i,r.push.apply(r,s),s[6]=-1,r.push.apply(r,s),s[a]=o,r.push.apply(r,s),r.push.apply(r,s),s[6]=1,r.push.apply(r,s),s[a]=i,r.push.apply(r,s)}o(0,0,0,0,0,1),o(0,0,0,1,0,1),o(0,0,0,2,0,1),o(1,0,0,1,-1,1),o(1,0,0,2,-1,1),o(0,1,0,0,-1,1),o(0,1,0,2,-1,1),o(0,0,1,0,-1,1),o(0,0,1,1,-1,1);var l=n(e,r),c=a(e,[{type:e.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:e.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:e.FLOAT,buffer:l,size:1,offset:24,stride:28}]),u=i(e);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var d=new s(e,l,c,u);return d.update(t),d};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,c=[0,0,0],u=[0,0,0],d=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(e){},l.draw=function(e){var t=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var a,i=e.model||o,s=e.view||o,l=e.projection||o;this.axes&&(a=this.axes.lastCubeProps.axis);for(var p=c,h=u,f=0;f<3;++f)a&&a[f]<0?(p[f]=this.bounds[0][f],h[f]=this.bounds[1][f]):(p[f]=this.bounds[1][f],h[f]=this.bounds[0][f]);for(d[0]=t.drawingBufferWidth,d[1]=t.drawingBufferHeight,n.uniforms.model=i,n.uniforms.view=s,n.uniforms.projection=l,n.uniforms.coordinates=[this.position,p,h],n.uniforms.colors=this.colors,n.uniforms.screenShape=d,f=0;f<3;++f)n.uniforms.lineWidth=this.lineWidth[f]*this.pixelRatio,this.enabled[f]&&(r.draw(t.TRIANGLES,6,6*f),this.drawSides[f]&&r.draw(t.TRIANGLES,12,18+12*f));r.unbind()},l.update=function(e){e&&("bounds"in e&&(this.bounds=e.bounds),"position"in e&&(this.position=e.position),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"colors"in e&&(this.colors=e.colors),"enabled"in e&&(this.enabled=e.enabled),"drawSides"in e&&(this.drawSides=e.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders/index":311,"gl-buffer":243,"gl-vao":328}],313:[function(e,t,r){var n=e("glslify"),a=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n  float segmentCount = 8.0;\n\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d);\n  vec3 y = v * sin(angle) * length(d);\n  vec3 v3 = x + y;\n\n  normal = normalize(v3);\n\n  return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  // Scale the vector magnitude to stay constant with\n  // model & view changes.\n  vec3 normal;\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n  //Lighting geometry parameters\n  vec4 cameraCoordinate = view * tubePosition;\n  cameraCoordinate.xyz /= cameraCoordinate.w;\n  f_lightDirection = lightPosition - cameraCoordinate.xyz;\n  f_eyeDirection   = eyePosition - cameraCoordinate.xyz;\n  f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n  // vec4 m_position  = model * vec4(tubePosition, 1.0);\n  vec4 t_position  = view * tubePosition;\n  gl_Position      = projection * t_position;\n\n  f_color          = color;\n  f_data           = tubePosition.xyz;\n  f_position       = position.xyz;\n  f_uv             = uv;\n}\n"]),i=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness,\n  float fresnel) {\n\n  float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n  float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n  //Half angle vector\n  vec3 H = normalize(lightDirection + viewDirection);\n\n  //Geometric term\n  float NdotH = max(dot(surfaceNormal, H), 0.0);\n  float VdotH = max(dot(viewDirection, H), 0.000001);\n  float LdotH = max(dot(lightDirection, H), 0.000001);\n  float G1 = (2.0 * NdotH * VdotN) / VdotH;\n  float G2 = (2.0 * NdotH * LdotN) / LdotH;\n  float G = min(1.0, min(G1, G2));\n  \n  //Distribution term\n  float D = beckmannDistribution(NdotH, roughness);\n\n  //Fresnel term\n  float F = pow(1.0 - VdotN, fresnel);\n\n  //Multiply terms and done\n  return  G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n  vec3 N = normalize(f_normal);\n  vec3 L = normalize(f_lightDirection);\n  vec3 V = normalize(f_eyeDirection);\n\n  if(gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n  // Return up-vector for only-z vector.\n  // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n  // From the above if-statement we have ||a|| > 0  U  ||b|| > 0.\n  // Assign z = 0, x = -b, y = a:\n  // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n  if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n    return normalize(vec3(-v.y, v.x, 0.0));\n  } else {\n    return normalize(vec3(0.0, v.z, -v.y));\n  }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n  float segmentCount = 8.0;\n\n  float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n  vec3 u = getOrthogonalVector(d);\n  vec3 v = normalize(cross(u, d));\n\n  vec3 x = u * cos(angle) * length(d);\n  vec3 y = v * sin(angle) * length(d);\n  vec3 v3 = x + y;\n\n  normal = normalize(v3);\n\n  return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  vec3 normal;\n  vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n  vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n  gl_Position = projection * view * tubePosition;\n  f_id        = id;\n  f_position  = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3  clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n  if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n  gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:a,fragment:i,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:410}],314:[function(e,t,r){"use strict";var n=e("gl-vec3"),a=e("gl-vec4"),i=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t,r,i){for(var o=0,s=0;s<e.length;s++)for(var l=e[s].velocities,c=0;c<l.length;c++)o=Math.max(o,n.length(l[c]));var u=e.map((function(e){return function(e,t,r,i){for(var o=e.points,s=e.velocities,l=e.divergences,c=[],u=[],d=[],p=[],h=[],f=[],m=0,g=0,v=a.create(),y=a.create(),b=0;b<o.length;b++){var _=o[b],x=s[b],w=l[b];0===t&&(w=.05*r),g=n.length(x)/i,v=a.create(),n.copy(v,x),v[3]=w;for(var k=0;k<8;k++)h[k]=[_[0],_[1],_[2],k];if(p.length>0)for(k=0;k<8;k++){var M=(k+1)%8;c.push(p[k],h[k],h[M],h[M],p[M],p[k]),d.push(y,v,v,v,y,y),f.push(m,g,g,g,m,m);var T=c.length;u.push([T-6,T-5,T-4],[T-3,T-2,T-1])}var C=p;p=h,h=C;var S=y;y=v,v=S;var L=m;m=g,g=L}return{positions:c,cells:u,vectors:d,vertexIntensity:f}}(e,r,i,o)})),d=[],p=[],h=[],f=[];for(s=0;s<u.length;s++){var m=u[s],g=d.length;for(d=d.concat(m.positions),h=h.concat(m.vectors),f=f.concat(m.vertexIntensity),c=0;c<m.cells.length;c++){var v=m.cells[c],y=[];p.push(y);for(var b=0;b<v.length;b++)y.push(v[b]+g)}}return{positions:d,cells:p,vectors:h,vertexIntensity:f,colormap:t}},s=function(e,t){var r,n=e.length;for(r=0;r<n;r++){var a=e[r];if(a===t)return r;if(a>t)return r-1}return r},l=function(e,t,r){return e<t?t:e>r?r:e},c=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var r=e.length,n=1;n<r;n++){var a=Math.abs(e[n]-e[n-1]);a<t&&(t=a)}return t};t.exports=function(e,t){var r=e.startingPositions,a=e.maxLength||1e3,u=e.tubeSize||1,d=e.absoluteTubeSize,p=e.gridFill||"+x+y+z",h={};-1!==p.indexOf("-x")&&(h.reversedX=!0),-1!==p.indexOf("-y")&&(h.reversedY=!0),-1!==p.indexOf("-z")&&(h.reversedZ=!0),h.filled=i.indexOf(p.replace(/-/g,"").replace(/\+/g,""));var f=e.getVelocity||function(t){return function(e,t,r){var a=t.vectors,i=t.meshgrid,o=e[0],c=e[1],u=e[2],d=i[0].length,p=i[1].length,h=i[2].length,f=s(i[0],o),m=s(i[1],c),g=s(i[2],u),v=f+1,y=m+1,b=g+1;if(f=l(f,0,d-1),v=l(v,0,d-1),m=l(m,0,p-1),y=l(y,0,p-1),g=l(g,0,h-1),b=l(b,0,h-1),f<0||m<0||g<0||v>d-1||y>p-1||b>h-1)return n.create();var _,x,w,k,M,T,C=i[0][f],S=i[0][v],L=i[1][m],A=i[1][y],E=i[2][g],D=(o-C)/(S-C),I=(c-L)/(A-L),P=(u-E)/(i[2][b]-E);switch(isFinite(D)||(D=.5),isFinite(I)||(I=.5),isFinite(P)||(P=.5),r.reversedX&&(f=d-1-f,v=d-1-v),r.reversedY&&(m=p-1-m,y=p-1-y),r.reversedZ&&(g=h-1-g,b=h-1-b),r.filled){case 5:M=g,T=b,w=m*h,k=y*h,_=f*h*p,x=v*h*p;break;case 4:M=g,T=b,_=f*h,x=v*h,w=m*h*d,k=y*h*d;break;case 3:w=m,k=y,M=g*p,T=b*p,_=f*p*h,x=v*p*h;break;case 2:w=m,k=y,_=f*p,x=v*p,M=g*p*d,T=b*p*d;break;case 1:_=f,x=v,M=g*d,T=b*d,w=m*d*h,k=y*d*h;break;default:_=f,x=v,w=m*d,k=y*d,M=g*d*p,T=b*d*p}var O=a[_+w+M],R=a[_+w+T],F=a[_+k+M],z=a[_+k+T],N=a[x+w+M],j=a[x+w+T],B=a[x+k+M],Y=a[x+k+T],H=n.create(),V=n.create(),U=n.create(),W=n.create();n.lerp(H,O,N,D),n.lerp(V,R,j,D),n.lerp(U,F,B,D),n.lerp(W,z,Y,D);var G=n.create(),q=n.create();n.lerp(G,H,U,I),n.lerp(q,V,W,I);var K=n.create();return n.lerp(K,G,q,P),K}(t,e,h)},m=e.getDivergence||function(e,t){var r=n.create(),a=1e-4;n.add(r,e,[a,0,0]);var i=f(r);n.subtract(i,i,t),n.scale(i,i,1e4),n.add(r,e,[0,a,0]);var o=f(r);n.subtract(o,o,t),n.scale(o,o,1e4),n.add(r,e,[0,0,a]);var s=f(r);return n.subtract(s,s,t),n.scale(s,s,1e4),n.add(r,i,o),n.add(r,r,s),r},g=[],v=t[0][0],y=t[0][1],b=t[0][2],_=t[1][0],x=t[1][1],w=t[1][2],k=function(e){var t=e[0],r=e[1],n=e[2];return!(t<v||t>_||r<y||r>x||n<b||n>w)},M=10*n.distance(t[0],t[1])/a,T=M*M,C=1,S=0,L=r.length;L>1&&(C=function(e){for(var t=[],r=[],n=[],a={},i={},o={},s=e.length,l=0;l<s;l++){var u=e[l],d=u[0],p=u[1],h=u[2];a[d]||(t.push(d),a[d]=!0),i[p]||(r.push(p),i[p]=!0),o[h]||(n.push(h),o[h]=!0)}var f=c(t),m=c(r),g=c(n),v=Math.min(f,m,g);return isFinite(v)?v:1}(r));for(var A=0;A<L;A++){var E=n.create();n.copy(E,r[A]);var D=[E],I=[],P=f(E),O=E;I.push(P);var R=[],F=m(E,P),z=n.length(F);isFinite(z)&&z>S&&(S=z),R.push(z),g.push({points:D,velocities:I,divergences:R});for(var N=0;N<100*a&&D.length<a&&k(E);){N++;var j=n.clone(P),B=n.squaredLength(j);if(0===B)break;B>T&&n.scale(j,j,M/Math.sqrt(B)),n.add(j,j,E),P=f(j),n.squaredDistance(O,j)-T>-1e-4*T&&(D.push(j),O=j,I.push(P),F=m(j,P),z=n.length(F),isFinite(z)&&z>S&&(S=z),R.push(z)),E=j}}var Y=o(g,e.colormap,S,C);return d?Y.tubeScale=d:(0===S&&(S=1),Y.tubeScale=.5*u*C/S),Y};var u=e("./lib/shaders"),d=e("gl-cone3d").createMesh;t.exports.createTubeMesh=function(e,t){return d(e,t,{shaders:u,traceType:"streamtube"})}},{"./lib/shaders":313,"gl-cone3d":244,"gl-vec3":347,"gl-vec4":383}],315:[function(e,t,r){var n=e("gl-shader"),a=e("glslify"),i=a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  vec3 localCoordinate = vec3(uv.zw, f.x);\n  worldCoordinate = objectOffset + localCoordinate;\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n  vec4 clipPosition = projection * view * worldPosition;\n  gl_Position = clipPosition;\n  kill = f.y;\n  value = f.z;\n  planeCoordinate = uv.xy;\n\n  vColor = texture2D(colormap, vec2(value, value));\n\n  //Lighting geometry parameters\n  vec4 cameraCoordinate = view * worldPosition;\n  cameraCoordinate.xyz /= cameraCoordinate.w;\n  lightDirection = lightPosition - cameraCoordinate.xyz;\n  eyeDirection   = eyePosition - cameraCoordinate.xyz;\n  surfaceNormal  = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),o=a(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n  float NdotH = max(x, 0.0001);\n  float cos2Alpha = NdotH * NdotH;\n  float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n  float roughness2 = roughness * roughness;\n  float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n  return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float roughness) {\n  return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  if ((kill > 0.0) ||\n      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n  vec3 N = normalize(surfaceNormal);\n  vec3 V = normalize(eyeDirection);\n  vec3 L = normalize(lightDirection);\n\n  if(gl_FrontFacing) {\n    N = -N;\n  }\n\n  float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n  float diffuse  = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n  //decide how to interpolate color — in vertex or in fragment\n  vec4 surfaceColor =\n    step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n    step(.5, vertexColor) * vColor;\n\n  vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular,  1.0);\n\n  gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=a(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n  vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n  worldCoordinate = objectOffset + dataCoordinate;\n  vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n  vec4 clipPosition = projection * view * worldPosition;\n  clipPosition.z += zOffset;\n\n  gl_Position = clipPosition;\n  value = f + objectOffset.z;\n  kill = -1.0;\n  planeCoordinate = uv.zw;\n\n  vColor = texture2D(colormap, vec2(value, value));\n\n  //Don't do lighting for contours\n  surfaceNormal   = vec3(1,0,0);\n  eyeDirection    = vec3(0,1,0);\n  lightDirection  = vec3(0,0,1);\n}\n"]),l=a(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n  return ((p > max(a, b)) || \n          (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n  return (outOfRange(a.x, b.x, p.x) ||\n          outOfRange(a.y, b.y, p.y) ||\n          outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n  return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n  float vh = 255.0 * v;\n  float upper = floor(vh);\n  float lower = fract(vh);\n  return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n  if ((kill > 0.0) ||\n      (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n  vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n  vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n  gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);r.createShader=function(e){var t=n(e,i,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},r.createPickShader=function(e){var t=n(e,i,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},r.createContourShader=function(e){var t=n(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},r.createPickContourShader=function(e){var t=n(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},{"gl-shader":303,glslify:410}],316:[function(e,t,r){arguments[4][112][0].apply(r,arguments)},{dup:112}],317:[function(e,t,r){"use strict";t.exports=function(e){var t=e.gl,r=y(t),n=_(t),s=b(t),l=x(t),c=a(t),u=i(t,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),d=a(t),p=i(t,[{buffer:d,size:4,stride:20,offset:0},{buffer:d,size:1,stride:20,offset:16}]),h=a(t),f=i(t,[{buffer:h,size:2,type:t.FLOAT}]),m=o(t,1,S,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new L(t,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,m,s,l,d,p,h,f,[0,0,0]),v={levels:[[],[],[]]};for(var k in e)v[k]=e[k];return v.colormap=v.colormap||"jet",g.update(v),g};var n=e("bit-twiddle"),a=e("gl-buffer"),i=e("gl-vao"),o=e("gl-texture2d"),s=e("typedarray-pool"),l=e("colormap"),c=e("ndarray-ops"),u=e("ndarray-pack"),d=e("ndarray"),p=e("surface-nets"),h=e("gl-mat4/multiply"),f=e("gl-mat4/invert"),m=e("binary-search-bounds"),g=e("ndarray-gradient"),v=e("./lib/shaders"),y=v.createShader,b=v.createContourShader,_=v.createPickShader,x=v.createPickContourShader,w=40,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],M=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],T=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function C(e,t,r,n,a){this.position=e,this.index=t,this.uv=r,this.level=n,this.dataCoordinate=a}!function(){for(var e=0;e<3;++e){var t=T[e],r=(e+2)%3;t[(e+1)%3+0]=1,t[r+3]=1,t[e+6]=1}}();var S=256;function L(e,t,r,n,a,i,o,l,c,u,p,h,f,m,g){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=a,this._coordinateBuffer=i,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=p,this._contourVAO=h,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new C([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=f,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var A=L.prototype;A.isTransparent=function(){return this.opacity<1},A.isOpaque=function(){if(this.opacity>=1)return!0;for(var e=0;e<3;++e)if(this._contourCounts[e].length>0||this._dynamicCounts[e]>0)return!0;return!1},A.pickSlots=1,A.setPickBase=function(e){this.pickId=e};var E=[0,0,0],D={showSurface:!1,showContour:!1,projections:[k.slice(),k.slice(),k.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function I(e,t){var r,n,a,i=t.axes&&t.axes.lastCubeProps.axis||E,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],n=0;n<3;++n)s=s||t.contourProject[r][n];for(r=0;r<3;++r){var l=D.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(i[r]>0)][r],h(l,e.model,l);var c=D.clipBounds[r];for(a=0;a<2;++a)for(n=0;n<3;++n)c[a][n]=e.clipBounds[a][n];c[0][r]=-1e8,c[1][r]=1e8}return D.showSurface=o,D.showContour=s,D}var P={model:k,view:k,projection:k,inverseModel:k.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},O=k.slice(),R=[1,0,0,0,1,0,0,0,1];function F(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=P;n.model=e.model||k,n.view=e.view||k,n.projection=e.projection||k,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=f(n.inverseModel,n.model);for(var a=0;a<2;++a)for(var i=n.clipBounds[a],o=0;o<3;++o)i[o]=Math.min(Math.max(this.clipBounds[a][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=R,n.vertexColor=this.vertexColor;var s=O;for(h(s,n.view,n.model),h(s,n.projection,s),f(s,s),a=0;a<3;++a)n.eyePosition[a]=s[12+a]/s[15];var l=s[15];for(a=0;a<3;++a)l+=this.lightPosition[a]*s[4*a+3];for(a=0;a<3;++a){var c=s[12+a];for(o=0;o<3;++o)c+=s[4*o+a]*this.lightPosition[o];n.lightPosition[a]=c/l}var u=I(n,this);if(u.showSurface&&t===this.opacity<1){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),a=0;a<3;++a)this.surfaceProject[a]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[a],this._shader.uniforms.clipBounds=u.clipBounds[a],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour&&!t){var d=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,d.bind(),d.uniforms=n;var p=this._contourVAO;for(p.bind(),a=0;a<3;++a)for(d.uniforms.permutation=T[a],r.lineWidth(this.contourWidth[a]*this.pixelRatio),o=0;o<this.contourLevels[a].length;++o)o===this.highlightLevel[a]?(d.uniforms.contourColor=this.highlightColor[a],d.uniforms.contourTint=this.highlightTint[a]):0!==o&&o-1!==this.highlightLevel[a]||(d.uniforms.contourColor=this.contourColor[a],d.uniforms.contourTint=this.contourTint[a]),this._contourCounts[a][o]&&(d.uniforms.height=this.contourLevels[a][o],p.draw(r.LINES,this._contourCounts[a][o],this._contourOffsets[a][o]));for(a=0;a<3;++a)for(d.uniforms.model=u.projections[a],d.uniforms.clipBounds=u.clipBounds[a],o=0;o<3;++o)if(this.contourProject[a][o]){d.uniforms.permutation=T[o],r.lineWidth(this.contourWidth[o]*this.pixelRatio);for(var m=0;m<this.contourLevels[o].length;++m)m===this.highlightLevel[o]?(d.uniforms.contourColor=this.highlightColor[o],d.uniforms.contourTint=this.highlightTint[o]):0!==m&&m-1!==this.highlightLevel[o]||(d.uniforms.contourColor=this.contourColor[o],d.uniforms.contourTint=this.contourTint[o]),this._contourCounts[o][m]&&(d.uniforms.height=this.contourLevels[o][m],p.draw(r.LINES,this._contourCounts[o][m],this._contourOffsets[o][m]))}for(p.unbind(),(p=this._dynamicVAO).bind(),a=0;a<3;++a)if(0!==this._dynamicCounts[a])for(d.uniforms.model=n.model,d.uniforms.clipBounds=n.clipBounds,d.uniforms.permutation=T[a],r.lineWidth(this.dynamicWidth[a]*this.pixelRatio),d.uniforms.contourColor=this.dynamicColor[a],d.uniforms.contourTint=this.dynamicTint[a],d.uniforms.height=this.dynamicLevel[a],p.draw(r.LINES,this._dynamicCounts[a],this._dynamicOffsets[a]),o=0;o<3;++o)this.contourProject[o][a]&&(d.uniforms.model=u.projections[o],d.uniforms.clipBounds=u.clipBounds[o],p.draw(r.LINES,this._dynamicCounts[a],this._dynamicOffsets[a]));p.unbind()}}A.draw=function(e){return F.call(this,e,!1)},A.drawTransparent=function(e){return F.call(this,e,!0)};var z={model:k,view:k,projection:k,inverseModel:k,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};function N(e,t){return Array.isArray(e)?[t(e[0]),t(e[1]),t(e[2])]:[t(e),t(e),t(e)]}function j(e){return Array.isArray(e)?3===e.length?[e[0],e[1],e[2],1]:[e[0],e[1],e[2],e[3]]:[0,0,0,1]}function B(e){if(Array.isArray(e)){if(Array.isArray(e))return[j(e[0]),j(e[1]),j(e[2])];var t=j(e);return[t.slice(),t.slice(),t.slice()]}}A.drawPick=function(e){e=e||{};var t=this.gl;t.disable(t.CULL_FACE);var r=z;r.model=e.model||k,r.view=e.view||k,r.projection=e.projection||k,r.shape=this._field[2].shape,r.pickId=this.pickId/255,r.lowerBound=this.bounds[0],r.upperBound=this.bounds[1],r.objectOffset=this.objectOffset,r.permutation=R;for(var n=0;n<2;++n)for(var a=r.clipBounds[n],i=0;i<3;++i)a[i]=Math.min(Math.max(this.clipBounds[n][i],-1e8),1e8);var o=I(r,this);if(o.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=r,this._vao.bind(),this._vao.draw(t.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&(this._pickShader.uniforms.model=o.projections[n],this._pickShader.uniforms.clipBounds=o.clipBounds[n],this._vao.draw(t.TRIANGLES,this._vertexCount));this._vao.unbind()}if(o.showContour){var s=this._contourPickShader;s.bind(),s.uniforms=r;var l=this._contourVAO;for(l.bind(),i=0;i<3;++i)for(t.lineWidth(this.contourWidth[i]*this.pixelRatio),s.uniforms.permutation=T[i],n=0;n<this.contourLevels[i].length;++n)this._contourCounts[i][n]&&(s.uniforms.height=this.contourLevels[i][n],l.draw(t.LINES,this._contourCounts[i][n],this._contourOffsets[i][n]));for(n=0;n<3;++n)for(s.uniforms.model=o.projections[n],s.uniforms.clipBounds=o.clipBounds[n],i=0;i<3;++i)if(this.contourProject[n][i]){s.uniforms.permutation=T[i],t.lineWidth(this.contourWidth[i]*this.pixelRatio);for(var c=0;c<this.contourLevels[i].length;++c)this._contourCounts[i][c]&&(s.uniforms.height=this.contourLevels[i][c],l.draw(t.LINES,this._contourCounts[i][c],this._contourOffsets[i][c]))}l.unbind()}},A.pick=function(e){if(!e)return null;if(e.id!==this.pickId)return null;var t=this._field[2].shape,r=this._pickResult,n=t[0]*(e.value[0]+(e.value[2]>>4)/16)/255,a=Math.floor(n),i=n-a,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;a+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var d=u?i:1-i,p=0;p<2;++p)for(var h=a+u,f=s+p,g=d*(p?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(h,f)*g;for(var y=this._pickResult.level,b=0;b<3;++b)if(y[b]=m.le(this.contourLevels[b],c[b]),y[b]<0)this.contourLevels[b].length>0&&(y[b]=0);else if(y[b]<this.contourLevels[b].length-1){var _=this.contourLevels[b][y[b]],x=this.contourLevels[b][y[b]+1];Math.abs(_-c[b])>Math.abs(x-c[b])&&(y[b]+=1)}for(r.index[0]=i<.5?a:a+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/t[0],r.uv[1]=o/t[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},A.padField=function(e,t){var r=t.shape.slice(),n=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,n[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(n[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,n[1]-1,t.get(0,r[1]-1)),e.set(n[0]-1,0,t.get(r[0]-1,0)),e.set(n[0]-1,n[1]-1,t.get(r[0]-1,r[1]-1))},A.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=B(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,(function(e){return N(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=B(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0);var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var a=(t.shape[0]+2)*(t.shape[1]+2);a>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(a))),this._field[2]=d(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var i=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=d(this._field[o].data,[i[0]+2,i[1]+2]);if(e.coords){var h=e.coords;if(!Array.isArray(h)||3!==h.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var f=h[o];for(_=0;_<2;++_)if(f.shape[_]!==i[_])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],f)}}else if(e.ticks){var m=e.ticks;if(!Array.isArray(m)||2!==m.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var v=m[o];if((Array.isArray(v)||v.length)&&(v=d(v)),v.shape[0]!==i[o])throw new Error("gl-surface: invalid tick length");var y=d(v.data,i);y.stride[o]=v.stride[0],y.stride[1^o]=0,this.padField(this._field[o],y)}}else{for(o=0;o<2;++o){var b=[0,0];b[o]=1,this._field[o]=d(this._field[o].data,[i[0]+2,i[1]+2],b,0)}this._field[0].set(0,0,0);for(var _=0;_<i[0];++_)this._field[0].set(_+1,0,_);for(this._field[0].set(i[0]+1,0,i[0]-1),this._field[1].set(0,0,0),_=0;_<i[1];++_)this._field[1].set(0,_+1,_);this._field[1].set(0,i[1]+1,i[1]-1)}var x=this._field,w=d(s.mallocFloat(3*x[2].size*2),[3,i[0]+2,i[1]+2,2]);for(o=0;o<3;++o)g(w.pick(o),x[o],"mirror");var k=d(s.mallocFloat(3*x[2].size),[i[0]+2,i[1]+2,3]);for(o=0;o<i[0]+2;++o)for(_=0;_<i[1]+2;++_){var T=w.get(0,o,_,0),C=w.get(0,o,_,1),L=w.get(1,o,_,0),A=w.get(1,o,_,1),E=w.get(2,o,_,0),D=w.get(2,o,_,1),I=L*D-A*E,P=E*C-D*T,O=T*A-C*L,R=Math.sqrt(I*I+P*P+O*O);R<1e-8?(R=Math.max(Math.abs(I),Math.abs(P),Math.abs(O)))<1e-8?(O=1,P=I=0,R=1):R=1/R:R=1/Math.sqrt(R),k.set(o,_,0,I*R),k.set(o,_,1,P*R),k.set(o,_,2,O*R)}s.free(w.data);var F=[1/0,1/0,1/0],z=[-1/0,-1/0,-1/0],j=1/0,Y=-1/0,H=(i[0]-1)*(i[1]-1)*6,V=s.mallocFloat(n.nextPow2(10*H)),U=0,W=0;for(o=0;o<i[0]-1;++o)e:for(_=0;_<i[1]-1;++_){for(var G=0;G<2;++G)for(var q=0;q<2;++q)for(var K=0;K<3;++K){var X=this._field[K].get(1+o+G,1+_+q);if(isNaN(X)||!isFinite(X))continue e}for(K=0;K<6;++K){var Z=o+M[K][0],J=_+M[K][1],$=this._field[0].get(Z+1,J+1),Q=this._field[1].get(Z+1,J+1);X=this._field[2].get(Z+1,J+1),I=k.get(Z+1,J+1,0),P=k.get(Z+1,J+1,1),O=k.get(Z+1,J+1,2),e.intensity&&(ee=e.intensity.get(Z,J));var ee=e.intensity?e.intensity.get(Z,J):X+this.objectOffset[2];V[U++]=Z,V[U++]=J,V[U++]=$,V[U++]=Q,V[U++]=X,V[U++]=0,V[U++]=ee,V[U++]=I,V[U++]=P,V[U++]=O,F[0]=Math.min(F[0],$+this.objectOffset[0]),F[1]=Math.min(F[1],Q+this.objectOffset[1]),F[2]=Math.min(F[2],X+this.objectOffset[2]),j=Math.min(j,ee),z[0]=Math.max(z[0],$+this.objectOffset[0]),z[1]=Math.max(z[1],Q+this.objectOffset[1]),z[2]=Math.max(z[2],X+this.objectOffset[2]),Y=Math.max(Y,ee),W+=1}}for(e.intensityBounds&&(j=+e.intensityBounds[0],Y=+e.intensityBounds[1]),o=6;o<U;o+=10)V[o]=(V[o]-j)/(Y-j);this._vertexCount=W,this._coordinateBuffer.update(V.subarray(0,U)),s.freeFloat(V),s.free(k.data),this.bounds=[F,z],this.intensity=e.intensity||this._field[2],this.intensityBounds[0]===j&&this.intensityBounds[1]===Y||(r=!0),this.intensityBounds=[j,Y]}if("levels"in e){var te=e.levels;for(te=Array.isArray(te[0])?te.slice():[[],[],te],o=0;o<3;++o)te[o]=te[o].slice(),te[o].sort((function(e,t){return e-t}));for(o=0;o<3;++o)for(_=0;_<te[o].length;++_)te[o][_]-=this.objectOffset[o];e:for(o=0;o<3;++o){if(te[o].length!==this.contourLevels[o].length){r=!0;break}for(_=0;_<te[o].length;++_)if(te[o][_]!==this.contourLevels[o][_]){r=!0;break e}}this.contourLevels=te}if(r){x=this._field,i=this.shape;for(var re=[],ne=0;ne<3;++ne){var ae=this.contourLevels[ne],ie=[],oe=[],se=[0,0,0];for(o=0;o<ae.length;++o){var le=p(this._field[ne],ae[o]);ie.push(re.length/5|0),W=0;e:for(_=0;_<le.cells.length;++_){var ce=le.cells[_];for(K=0;K<2;++K){var ue=le.positions[ce[K]],de=ue[0],pe=0|Math.floor(de),he=de-pe,fe=ue[1],me=0|Math.floor(fe),ge=fe-me,ve=!1;t:for(var ye=0;ye<3;++ye){se[ye]=0;var be=(ne+ye+1)%3;for(G=0;G<2;++G){var _e=G?he:1-he;for(Z=0|Math.min(Math.max(pe+G,0),i[0]),q=0;q<2;++q){var xe=q?ge:1-ge;if(J=0|Math.min(Math.max(me+q,0),i[1]),X=ye<2?this._field[be].get(Z,J):(this.intensity.get(Z,J)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(X)||isNaN(X)){ve=!0;break t}var we=_e*xe;se[ye]+=we*X}}}if(ve){if(K>0){for(var ke=0;ke<5;++ke)re.pop();W-=1}continue e}re.push(se[0],se[1],ue[0],ue[1],se[2]),W+=1}}oe.push(W)}this._contourOffsets[ne]=ie,this._contourCounts[ne]=oe}var Me=s.mallocFloat(re.length);for(o=0;o<re.length;++o)Me[o]=re[o];this._contourBuffer.update(Me),s.freeFloat(Me)}e.colormap&&this._colorMap.setPixels(function(e){var t=u([l({colormap:e,nshades:S,format:"rgba"}).map((function(e){return[e[0],e[1],e[2],255*e[3]]}))]);return c.divseq(t,255),t}(e.colormap))},A.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var e=0;e<3;++e)s.freeFloat(this._field[e].data)},A.highlight=function(e){var t,r;if(!e)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(t=0;t<3;++t)this.enableHighlight[t]?this.highlightLevel[t]=e.level[t]:this.highlightLevel[t]=-1;for(r=this.snapToData?e.dataCoordinate:e.position,t=0;t<3;++t)r[t]-=this.objectOffset[t];if(this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,a=this.shape,i=s.mallocFloat(12*a[0]*a[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,c=(o+2)%3,u=this._field[o],d=this._field[l],h=this._field[c],f=p(u,r[o]),m=f.cells,g=f.positions;for(this._dynamicOffsets[o]=n,t=0;t<m.length;++t)for(var v=m[t],y=0;y<2;++y){var b=g[v[y]],_=+b[0],x=0|_,w=0|Math.min(x+1,a[0]),k=_-x,M=1-k,T=+b[1],C=0|T,S=0|Math.min(C+1,a[1]),L=T-C,A=1-L,E=M*A,D=M*L,I=k*A,P=k*L,O=E*d.get(x,C)+D*d.get(x,S)+I*d.get(w,C)+P*d.get(w,S),R=E*h.get(x,C)+D*h.get(x,S)+I*h.get(w,C)+P*h.get(w,S);if(isNaN(O)||isNaN(R)){y&&(n-=1);break}i[2*n+0]=O,i[2*n+1]=R,n+=1}this._dynamicCounts[o]=n-this._dynamicOffsets[o]}else this.dynamicLevel[o]=NaN,this._dynamicCounts[o]=0;this._dynamicBuffer.update(i.subarray(0,2*n)),s.freeFloat(i)}}},{"./lib/shaders":315,"binary-search-bounds":316,"bit-twiddle":93,colormap:127,"gl-buffer":243,"gl-mat4/invert":267,"gl-mat4/multiply":269,"gl-texture2d":323,"gl-vao":328,ndarray:451,"ndarray-gradient":442,"ndarray-ops":445,"ndarray-pack":446,"surface-nets":529,"typedarray-pool":543}],318:[function(e,t,r){"use strict";var n=e("css-font"),a=e("pick-by-alias"),i=e("regl"),o=e("gl-util/context"),s=e("es6-weak-map"),l=e("color-normalize"),c=e("font-atlas"),u=e("typedarray-pool"),d=e("parse-rect"),p=e("is-plain-obj"),h=e("parse-unit"),f=e("to-px"),m=e("detect-kerning"),g=e("object-assign"),v=e("font-measure"),y=e("flatten-vertex-data"),b=e("bit-twiddle").nextPow2,_=new s,x=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(x=!0),document.body.removeChild(w)}var k=function(e){!function(e){return"function"==typeof e&&e._gl&&e.prop&&e.texture&&e.buffer}(e)?this.gl=o(e):(e={regl:e},this.gl=e.regl._gl),this.shader=_.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),_.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(p(e)?e:{})};k.prototype.createShader=function(){var e=this.regl,t=e({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\t"+(k.normalViewport?"":"vec2 positionOffset = vec2(positionOffset.x,- positionOffset.y);")+"\n\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ positionOffset))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\t"+(k.normalViewport?"position.y = 1. - position.y;":"")+"\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform sampler2D atlas;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:e,draw:t,atlas:{}}},k.prototype.update=function(e){var t=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=a(e,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=d(e.viewport),k.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=k.baseFontSize+"px sans-serif");var r,i=!1,o=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,r){if("string"==typeof e)try{e=n.parse(e)}catch(t){e=n.parse(k.baseFontSize+"px "+e)}else e=n.parse(n.stringify(e));var a=n.stringify({size:k.baseFontSize,family:e.family,stretch:x?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),s=h(e.size),l=Math.round(s[0]*f(s[1]));if(l!==t.fontSize[r]&&(o=!0,t.fontSize[r]=l),!(t.font[r]&&a==t.font[r].baseString||(i=!0,t.font[r]=k.fonts[a],t.font[r]))){var c=e.family.join(", "),u=[e.style];e.style!=e.variant&&u.push(e.variant),e.variant!=e.weight&&u.push(e.weight),x&&e.weight!=e.stretch&&u.push(e.stretch),t.font[r]={baseString:a,family:c,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:v(c,{origin:"top",fontSize:k.baseFontSize,fontStyle:u.join(" ")})},k.fonts[a]=t.font[r]}})),(i||o)&&this.font.forEach((function(r,a){var i=n.stringify({size:t.fontSize[a],family:r.family,stretch:x?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(t.fontAtlas[a]=t.shader.atlas[i],!t.fontAtlas[a]){var o=r.metrics;t.shader.atlas[i]=t.fontAtlas[a]={fontString:i,step:2*Math.ceil(t.fontSize[a]*o.bottom*.5),em:t.fontSize[a],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"==typeof e.text&&e.position&&e.position.length>2){for(var s=Array(.5*e.position.length),p=0;p<s.length;p++)s[p]=e.text;e.text=s}if(null!=e.text||i){if(this.textOffsets=[0],Array.isArray(e.text)){this.count=e.text[0].length,this.counts=[this.count];for(var _=1;_<e.text.length;_++)this.textOffsets[_]=this.textOffsets[_-1]+e.text[_-1].length,this.count+=e.text[_].length,this.counts.push(e.text[_].length);this.text=e.text.join("")}else this.text=e.text,this.count=this.text.length,this.counts=[this.count];r=[],this.font.forEach((function(e,n){k.atlasContext.font=e.baseString;for(var a=t.fontAtlas[n],i=0;i<t.text.length;i++){var o=t.text.charAt(i);if(null==a.ids[o]&&(a.ids[o]=a.chars.length,a.chars.push(o),r.push(o)),null==e.width[o]&&(e.width[o]=k.atlasContext.measureText(o).width/k.baseFontSize,t.kerning)){var s=[];for(var l in e.width)s.push(l+o,o+l);g(e.kerning,m(e.family,{pairs:s}))}}}))}if(e.position)if(e.position.length>2){for(var w=!e.position[0].length,M=u.mallocFloat(2*this.count),T=0,C=0;T<this.counts.length;T++){var S=this.counts[T];if(w)for(var L=0;L<S;L++)M[C++]=e.position[2*T],M[C++]=e.position[2*T+1];else for(var A=0;A<S;A++)M[C++]=e.position[T][0],M[C++]=e.position[T][1]}this.position.call?this.position({type:"float",data:M}):this.position=this.regl.buffer({type:"float",data:M}),u.freeFloat(M)}else this.position.destroy&&this.position.destroy(),this.position={constant:e.position};if(e.text||i){var E=u.mallocUint8(this.count),D=u.mallocFloat(2*this.count);this.textWidth=[];for(var I=0,P=0;I<this.counts.length;I++){for(var O=this.counts[I],R=this.font[I]||this.font[0],F=this.fontAtlas[I]||this.fontAtlas[0],z=0;z<O;z++){var N=this.text.charAt(P),j=this.text.charAt(P-1);if(E[P]=F.ids[N],D[2*P]=R.width[N],z){var B=D[2*P-2],Y=D[2*P],H=D[2*P-1]+.5*B+.5*Y;if(this.kerning){var V=R.kerning[j+N];V&&(H+=.001*V)}D[2*P+1]=H}else D[2*P+1]=.5*D[2*P];P++}this.textWidth.push(D.length?.5*D[2*P-2]+D[2*P-1]:0)}e.align||(e.align=this.align),this.charBuffer({data:E,type:"uint8",usage:"stream"}),this.sizeBuffer({data:D,type:"float",usage:"stream"}),u.freeUint8(E),u.freeFloat(D),r.length&&this.font.forEach((function(e,r){var n=t.fontAtlas[r],a=n.step,i=Math.floor(k.maxAtlasSize/a),o=Math.min(i,n.chars.length),s=Math.ceil(n.chars.length/o),l=b(o*a),u=b(s*a);n.width=l,n.height=u,n.rows=s,n.cols=o,n.em&&n.texture({data:c({canvas:k.atlasCanvas,font:n.fontString,chars:n.chars,shape:[l,u],step:[a,a]})})}))}if(e.align&&(this.align=e.align,this.alignOffset=this.textWidth.map((function(e,r){var n=Array.isArray(t.align)?t.align.length>1?t.align[r]:t.align[0]:t.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,r){var n=(t.font[r]||t.font[0]).metrics,a=0;return a+=.5*n.bottom,a+="number"==typeof e?e-n.baseline:-n[e],k.normalViewport||(a*=-1),a}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){var U;if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var W=e.color.length;U=u.mallocUint8(W);for(var G=(e.color.subarray||e.color.slice).bind(e.color),q=0;q<W;q+=4)U.set(l(G(q,q+4),"uint8"),q)}else{var K=e.color.length;U=u.mallocUint8(4*K);for(var X=0;X<K;X++)U.set(l(e.color[X]||0,"uint8"),4*X)}this.color=U}else this.color=l(e.color,"uint8");if(e.position||e.text||e.color||e.baseline||e.align||e.font||e.offset||e.opacity)if(this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Z=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(Z);for(var J=0;J<this.batch.length;J++)this.batch[J]={count:this.counts.length>1?this.counts[J]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[J]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*J,4*J+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[J]:this.opacity,baseline:null!=this.baselineOffset[J]?this.baselineOffset[J]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[J]?this.alignOffset[J]:this.alignOffset[0]:0,atlas:this.fontAtlas[J]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*J,2*J+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.normalViewport=!1,k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={},t.exports=k},{"bit-twiddle":93,"color-normalize":121,"css-font":140,"detect-kerning":167,"es6-weak-map":319,"flatten-vertex-data":229,"font-atlas":230,"font-measure":231,"gl-util/context":324,"is-plain-obj":423,"object-assign":455,"parse-rect":460,"parse-unit":462,"pick-by-alias":466,regl:500,"to-px":537,"typedarray-pool":543}],319:[function(e,t,r){"use strict";t.exports=e("./is-implemented")()?WeakMap:e("./polyfill")},{"./is-implemented":320,"./polyfill":322}],320:[function(e,t,r){"use strict";t.exports=function(){var e,t;if("function"!=typeof WeakMap)return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(e){return!1}return"[object WeakMap]"===String(e)&&"function"==typeof e.set&&e.set({},1)===e&&"function"==typeof e.delete&&"function"==typeof e.has&&"one"===e.get(t)}},{}],321:[function(e,t,r){"use strict";t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},{}],322:[function(e,t,r){"use strict";var n,a=e("es5-ext/object/is-value"),i=e("es5-ext/object/set-prototype-of"),o=e("es5-ext/object/valid-object"),s=e("es5-ext/object/valid-value"),l=e("es5-ext/string/random-uniq"),c=e("d"),u=e("es6-iterator/get"),d=e("es6-iterator/for-of"),p=e("es6-symbol").toStringTag,h=e("./is-native-implemented"),f=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;t.exports=n=function(){var e,t=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return e=h&&i&&WeakMap!==n?i(new WeakMap,v(this)):this,a(t)&&(f(t)||(t=u(t))),m(e,"__weakMapData__",c("c","$weakMap$"+l())),t?(d(t,(function(t){s(t),e.set(t[0],t[1])})),e):e},h&&(i&&i(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(e){return!!g.call(o(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)})),get:c((function(e){if(g.call(o(e),this.__weakMapData__))return e[this.__weakMapData__]})),has:c((function(e){return g.call(o(e),this.__weakMapData__)})),set:c((function(e,t){return m(o(e),this.__weakMapData__,c("c",t)),this})),toString:c((function(){return"[object WeakMap]"}))}),m(n.prototype,p,c("c","WeakMap"))},{"./is-native-implemented":321,d:152,"es5-ext/object/is-value":196,"es5-ext/object/set-prototype-of":202,"es5-ext/object/valid-object":206,"es5-ext/object/valid-value":207,"es5-ext/string/random-uniq":212,"es6-iterator/for-of":214,"es6-iterator/get":215,"es6-symbol":221}],323:[function(e,t,r){"use strict";var n=e("ndarray"),a=e("ndarray-ops"),i=e("typedarray-pool");t.exports=function(e){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||function(e){o=[e.LINEAR,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_NEAREST],s=[e.NEAREST,e.LINEAR,e.NEAREST_MIPMAP_NEAREST,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_LINEAR],l=[e.REPEAT,e.CLAMP_TO_EDGE,e.MIRRORED_REPEAT]}(e),"number"==typeof arguments[1])return g(e,arguments[1],arguments[2],arguments[3]||e.RGBA,arguments[4]||e.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return g(e,0|arguments[1][0],0|arguments[1][1],arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var t=arguments[1],r=c(t)?t:t.raw;if(r)return function(e,t,r,n,a,i){var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,a,a,i,t),new p(e,o,r,n,a,i)}(e,r,0|t.width,0|t.height,arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if(t.shape&&t.data&&t.stride)return function(e,t){var r=t.dtype,o=t.shape.slice(),s=e.getParameter(e.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=f(o,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var d,h,g=0;if(2===o.length)g=e.LUMINANCE,o=[o[0],o[1],1],t=n(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])g=e.ALPHA;else if(2===o[2])g=e.LUMINANCE_ALPHA;else if(3===o[2])g=e.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}}c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var v=t.size;if(l)d=0===t.offset&&t.data.length===v?t.data:t.data.subarray(t.offset,t.offset+v);else{var y=[o[2],o[2]*o[0],1];h=i.malloc(v,r);var b=n(h,o,y,0);"float32"!==r&&"float64"!==r||c!==e.UNSIGNED_BYTE?a.assign(b,t):u(b,t),d=h.subarray(0,v)}var _=m(e);return e.texImage2D(e.TEXTURE_2D,0,g,o[0],o[1],0,g,c,d),l||i.free(h),new p(e,_,o[0],o[1],g,c)}(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&e instanceof ImageData}var u=function(e,t){a.muls(e,t,255)};function d(e,t,r){var n=e.gl,a=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function p(e,t,r,n,a,i){this.gl=e,this.handle=t,this.format=a,this.type=i,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var h=p.prototype;function f(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,n,a){var i=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture shape");if(a===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,a,null),new p(e,o,t,r,n,a)}Object.defineProperties(h,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return d(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return d(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,d(this,this._shape[0],e),e}}}),h.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},h.dispose=function(){this.gl.deleteTexture(this.handle)},h.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},h.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=c(e)?e:e.raw;if(l)this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,c,d){var p=d.dtype,h=d.shape.slice();if(h.length<2||h.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,v=f(h,d.stride.slice());if("float32"===p?m=e.FLOAT:"float64"===p?(m=e.FLOAT,v=!1,p="float32"):"uint8"===p?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,v=!1,p="uint8"),2===h.length)g=e.LUMINANCE,h=[h[0],h[1],1],d=n(d.data,h,[d.stride[0],d.stride[1],1],d.offset);else{if(3!==h.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===h[2])g=e.ALPHA;else if(2===h[2])g=e.LUMINANCE_ALPHA;else if(3===h[2])g=e.RGB;else{if(4!==h[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}h[2]}if(g!==e.LUMINANCE&&g!==e.ALPHA||s!==e.LUMINANCE&&s!==e.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=d.size,b=c.indexOf(o)<0;if(b&&c.push(o),m===l&&v)0===d.offset&&d.data.length===y?b?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,d.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,d.data):b?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,d.data.subarray(d.offset,d.offset+y)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,d.data.subarray(d.offset,d.offset+y));else{var _;_=l===e.FLOAT?i.mallocFloat32(y):i.mallocUint8(y);var x=n(_,h,[h[2],h[2]*h[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(x,d):a.assign(x,d),b?e.texImage2D(e.TEXTURE_2D,o,s,h[0],h[1],0,s,l,_.subarray(0,y)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,h[0],h[1],s,l,_.subarray(0,y)),l===e.FLOAT?i.freeFloat32(_):i.freeUint8(_)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}}},{ndarray:451,"ndarray-ops":445,"typedarray-pool":543}],324:[function(e,r,n){(function(t){"use strict";var n=e("pick-by-alias");function a(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*t.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*t.innerHeight);else{var r=e.container.getBoundingClientRect();e.canvas.width=e.width||r.right-r.left,e.canvas.height=e.height||r.bottom-r.top}}function i(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function o(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}r.exports=function(e){var r;if(e?"string"==typeof e&&(e={container:e}):e={},(e=i(e)?{container:e}:"string"==typeof(r=e).nodeName&&"function"==typeof r.appendChild&&"function"==typeof r.getBoundingClientRect?{container:e}:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(e)?{gl:e}:n(e,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(e.pixelRatio=t.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}i(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=o(),e.container.appendChild(e.canvas),a(e))}else if(!e.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=o(),e.container.appendChild(e.canvas),a(e)}if(!e.gl)try{e.gl=e.canvas.getContext("webgl",e.attrs)}catch(r){try{e.gl=e.canvas.getContext("experimental-webgl",e.attrs)}catch(r){e.gl=e.canvas.getContext("webgl-experimental",e.attrs)}}return e.gl}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":466}],325:[function(e,t,r){"use strict";t.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var n=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var a=0;a<r.length;++a){var i=r[a];if(i.buffer){var o=i.buffer,s=i.size||4,l=i.type||e.FLOAT,c=!!i.normalized,u=i.stride||0,d=i.offset||0;o.bind(),e.enableVertexAttribArray(a),e.vertexAttribPointer(a,s,l,c,u,d)}else{if("number"==typeof i)e.vertexAttrib1f(a,i);else if(1===i.length)e.vertexAttrib1f(a,i[0]);else if(2===i.length)e.vertexAttrib2f(a,i[0],i[1]);else if(3===i.length)e.vertexAttrib3f(a,i[0],i[1],i[2]);else{if(4!==i.length)throw new Error("gl-vao: Invalid vertex attribute");e.vertexAttrib4f(a,i[0],i[1],i[2],i[3])}e.disableVertexAttribArray(a)}}for(;a<n;++a)e.disableVertexAttribArray(a)}else for(e.bindBuffer(e.ARRAY_BUFFER,null),a=0;a<n;++a)e.disableVertexAttribArray(a)}},{}],326:[function(e,t,r){"use strict";var n=e("./do-bind.js");function a(e){this.gl=e,this._elements=null,this._attributes=null,this._elementsType=e.UNSIGNED_SHORT}a.prototype.bind=function(){n(this.gl,this._elements,this._attributes)},a.prototype.update=function(e,t,r){this._elements=t,this._attributes=e,this._elementsType=r||this.gl.UNSIGNED_SHORT},a.prototype.dispose=function(){},a.prototype.unbind=function(){},a.prototype.draw=function(e,t,r){r=r||0;var n=this.gl;this._elements?n.drawElements(e,t,this._elementsType,r):n.drawArrays(e,r,t)},t.exports=function(e){return new a(e)}},{"./do-bind.js":325}],327:[function(e,t,r){"use strict";var n=e("./do-bind.js");function a(e,t,r,n,a,i){this.location=e,this.dimension=t,this.a=r,this.b=n,this.c=a,this.d=i}function i(e,t,r){this.gl=e,this._ext=t,this.handle=r,this._attribs=[],this._useElements=!1,this._elementsType=e.UNSIGNED_SHORT}a.prototype.bind=function(e){switch(this.dimension){case 1:e.vertexAttrib1f(this.location,this.a);break;case 2:e.vertexAttrib2f(this.location,this.a,this.b);break;case 3:e.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:e.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},i.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var e=0;e<this._attribs.length;++e)this._attribs[e].bind(this.gl)},i.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},i.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},i.prototype.update=function(e,t,r){if(this.bind(),n(this.gl,t,e),this.unbind(),this._attribs.length=0,e)for(var i=0;i<e.length;++i){var o=e[i];"number"==typeof o?this._attribs.push(new a(i,1,o)):Array.isArray(o)&&this._attribs.push(new a(i,o.length,o[0],o[1],o[2],o[3]))}this._useElements=!!t,this._elementsType=r||this.gl.UNSIGNED_SHORT},i.prototype.draw=function(e,t,r){r=r||0;var n=this.gl;this._useElements?n.drawElements(e,t,this._elementsType,r):n.drawArrays(e,r,t)},t.exports=function(e,t){return new i(e,t,t.createVertexArrayOES())}},{"./do-bind.js":325}],328:[function(e,t,r){"use strict";var n=e("./lib/vao-native.js"),a=e("./lib/vao-emulated.js");function i(e){this.bindVertexArrayOES=e.bindVertexArray.bind(e),this.createVertexArrayOES=e.createVertexArray.bind(e),this.deleteVertexArrayOES=e.deleteVertexArray.bind(e)}t.exports=function(e,t,r,o){var s,l=e.createVertexArray?new i(e):e.getExtension("OES_vertex_array_object");return(s=l?n(e,l):a(e)).update(t,r,o),s}},{"./lib/vao-emulated.js":326,"./lib/vao-native.js":327}],329:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}},{}],330:[function(e,t,r){t.exports=function(e,t){var r=n(e[0],e[1],e[2]),o=n(t[0],t[1],t[2]);a(r,r),a(o,o);var s=i(r,o);return s>1?0:Math.acos(s)};var n=e("./fromValues"),a=e("./normalize"),i=e("./dot")},{"./dot":340,"./fromValues":346,"./normalize":357}],331:[function(e,t,r){t.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},{}],332:[function(e,t,r){t.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],333:[function(e,t,r){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],334:[function(e,t,r){t.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},{}],335:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],s=r[1],l=r[2];return e[0]=a*l-i*s,e[1]=i*o-n*l,e[2]=n*s-a*o,e}},{}],336:[function(e,t,r){t.exports=e("./distance")},{"./distance":337}],337:[function(e,t,r){t.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return Math.sqrt(r*r+n*n+a*a)}},{}],338:[function(e,t,r){t.exports=e("./divide")},{"./divide":339}],339:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},{}],340:[function(e,t,r){t.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},{}],341:[function(e,t,r){t.exports=1e-6},{}],342:[function(e,t,r){t.exports=function(e,t){var r=e[0],a=e[1],i=e[2],o=t[0],s=t[1],l=t[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(a-s)<=n*Math.max(1,Math.abs(a),Math.abs(s))&&Math.abs(i-l)<=n*Math.max(1,Math.abs(i),Math.abs(l))};var n=e("./epsilon")},{"./epsilon":341}],343:[function(e,t,r){t.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},{}],344:[function(e,t,r){t.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},{}],345:[function(e,t,r){t.exports=function(e,t,r,a,i,o){var s,l;for(t||(t=3),r||(r=0),l=a?Math.min(a*t+r,e.length):e.length,s=r;s<l;s+=t)n[0]=e[s],n[1]=e[s+1],n[2]=e[s+2],i(n,n,o),e[s]=n[0],e[s+1]=n[1],e[s+2]=n[2];return e};var n=e("./create")()},{"./create":334}],346:[function(e,t,r){t.exports=function(e,t,r){var n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}},{}],347:[function(e,t,r){t.exports={EPSILON:e("./epsilon"),create:e("./create"),clone:e("./clone"),angle:e("./angle"),fromValues:e("./fromValues"),copy:e("./copy"),set:e("./set"),equals:e("./equals"),exactEquals:e("./exactEquals"),add:e("./add"),subtract:e("./subtract"),sub:e("./sub"),multiply:e("./multiply"),mul:e("./mul"),divide:e("./divide"),div:e("./div"),min:e("./min"),max:e("./max"),floor:e("./floor"),ceil:e("./ceil"),round:e("./round"),scale:e("./scale"),scaleAndAdd:e("./scaleAndAdd"),distance:e("./distance"),dist:e("./dist"),squaredDistance:e("./squaredDistance"),sqrDist:e("./sqrDist"),length:e("./length"),len:e("./len"),squaredLength:e("./squaredLength"),sqrLen:e("./sqrLen"),negate:e("./negate"),inverse:e("./inverse"),normalize:e("./normalize"),dot:e("./dot"),cross:e("./cross"),lerp:e("./lerp"),random:e("./random"),transformMat4:e("./transformMat4"),transformMat3:e("./transformMat3"),transformQuat:e("./transformQuat"),rotateX:e("./rotateX"),rotateY:e("./rotateY"),rotateZ:e("./rotateZ"),forEach:e("./forEach")}},{"./add":329,"./angle":330,"./ceil":331,"./clone":332,"./copy":333,"./create":334,"./cross":335,"./dist":336,"./distance":337,"./div":338,"./divide":339,"./dot":340,"./epsilon":341,"./equals":342,"./exactEquals":343,"./floor":344,"./forEach":345,"./fromValues":346,"./inverse":348,"./len":349,"./length":350,"./lerp":351,"./max":352,"./min":353,"./mul":354,"./multiply":355,"./negate":356,"./normalize":357,"./random":358,"./rotateX":359,"./rotateY":360,"./rotateZ":361,"./round":362,"./scale":363,"./scaleAndAdd":364,"./set":365,"./sqrDist":366,"./sqrLen":367,"./squaredDistance":368,"./squaredLength":369,"./sub":370,"./subtract":371,"./transformMat3":372,"./transformMat4":373,"./transformQuat":374}],348:[function(e,t,r){t.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}},{}],349:[function(e,t,r){t.exports=e("./length")},{"./length":350}],350:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}},{}],351:[function(e,t,r){t.exports=function(e,t,r,n){var a=t[0],i=t[1],o=t[2];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e[2]=o+n*(r[2]-o),e}},{}],352:[function(e,t,r){t.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}},{}],353:[function(e,t,r){t.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}},{}],354:[function(e,t,r){t.exports=e("./multiply")},{"./multiply":355}],355:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}},{}],356:[function(e,t,r){t.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}},{}],357:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=r*r+n*n+a*a;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}},{}],358:[function(e,t,r){t.exports=function(e,t){t=t||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,a=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=n*t,e}},{}],359:[function(e,t,r){t.exports=function(e,t,r,n){var a=r[1],i=r[2],o=t[1]-a,s=t[2]-i,l=Math.sin(n),c=Math.cos(n);return e[0]=t[0],e[1]=a+o*c-s*l,e[2]=i+o*l+s*c,e}},{}],360:[function(e,t,r){t.exports=function(e,t,r,n){var a=r[0],i=r[2],o=t[0]-a,s=t[2]-i,l=Math.sin(n),c=Math.cos(n);return e[0]=a+s*l+o*c,e[1]=t[1],e[2]=i+s*c-o*l,e}},{}],361:[function(e,t,r){t.exports=function(e,t,r,n){var a=r[0],i=r[1],o=t[0]-a,s=t[1]-i,l=Math.sin(n),c=Math.cos(n);return e[0]=a+o*c-s*l,e[1]=i+o*l+s*c,e[2]=t[2],e}},{}],362:[function(e,t,r){t.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},{}],363:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},{}],364:[function(e,t,r){t.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}},{}],365:[function(e,t,r){t.exports=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}},{}],366:[function(e,t,r){t.exports=e("./squaredDistance")},{"./squaredDistance":368}],367:[function(e,t,r){t.exports=e("./squaredLength")},{"./squaredLength":369}],368:[function(e,t,r){t.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2];return r*r+n*n+a*a}},{}],369:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}},{}],370:[function(e,t,r){t.exports=e("./subtract")},{"./subtract":371}],371:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},{}],372:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2];return e[0]=n*r[0]+a*r[3]+i*r[6],e[1]=n*r[1]+a*r[4]+i*r[7],e[2]=n*r[2]+a*r[5]+i*r[8],e}},{}],373:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[3]*n+r[7]*a+r[11]*i+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*a+r[8]*i+r[12])/o,e[1]=(r[1]*n+r[5]*a+r[9]*i+r[13])/o,e[2]=(r[2]*n+r[6]*a+r[10]*i+r[14])/o,e}},{}],374:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*i-l*a,d=c*a+l*n-o*i,p=c*i+o*a-s*n,h=-o*n-s*a-l*i;return e[0]=u*c+h*-o+d*-l-p*-s,e[1]=d*c+h*-s+p*-o-u*-l,e[2]=p*c+h*-l+u*-s-d*-o,e}},{}],375:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},{}],376:[function(e,t,r){t.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],377:[function(e,t,r){t.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],378:[function(e,t,r){t.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},{}],379:[function(e,t,r){t.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(r*r+n*n+a*a+i*i)}},{}],380:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},{}],381:[function(e,t,r){t.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},{}],382:[function(e,t,r){t.exports=function(e,t,r,n){var a=new Float32Array(4);return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a}},{}],383:[function(e,t,r){t.exports={create:e("./create"),clone:e("./clone"),fromValues:e("./fromValues"),copy:e("./copy"),set:e("./set"),add:e("./add"),subtract:e("./subtract"),multiply:e("./multiply"),divide:e("./divide"),min:e("./min"),max:e("./max"),scale:e("./scale"),scaleAndAdd:e("./scaleAndAdd"),distance:e("./distance"),squaredDistance:e("./squaredDistance"),length:e("./length"),squaredLength:e("./squaredLength"),negate:e("./negate"),inverse:e("./inverse"),normalize:e("./normalize"),dot:e("./dot"),lerp:e("./lerp"),random:e("./random"),transformMat4:e("./transformMat4"),transformQuat:e("./transformQuat")}},{"./add":375,"./clone":376,"./copy":377,"./create":378,"./distance":379,"./divide":380,"./dot":381,"./fromValues":382,"./inverse":384,"./length":385,"./lerp":386,"./max":387,"./min":388,"./multiply":389,"./negate":390,"./normalize":391,"./random":392,"./scale":393,"./scaleAndAdd":394,"./set":395,"./squaredDistance":396,"./squaredLength":397,"./subtract":398,"./transformMat4":399,"./transformQuat":400}],384:[function(e,t,r){t.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},{}],385:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3];return Math.sqrt(t*t+r*r+n*n+a*a)}},{}],386:[function(e,t,r){t.exports=function(e,t,r,n){var a=t[0],i=t[1],o=t[2],s=t[3];return e[0]=a+n*(r[0]-a),e[1]=i+n*(r[1]-i),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e}},{}],387:[function(e,t,r){t.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},{}],388:[function(e,t,r){t.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},{}],389:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},{}],390:[function(e,t,r){t.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},{}],391:[function(e,t,r){t.exports=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r*r+n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=a*o,e[3]=i*o),e}},{}],392:[function(e,t,r){var n=e("./normalize"),a=e("./scale");t.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),n(e,e),a(e,e,t),e}},{"./normalize":391,"./scale":393}],393:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},{}],394:[function(e,t,r){t.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}},{}],395:[function(e,t,r){t.exports=function(e,t,r,n,a){return e[0]=t,e[1]=r,e[2]=n,e[3]=a,e}},{}],396:[function(e,t,r){t.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],a=t[2]-e[2],i=t[3]-e[3];return r*r+n*n+a*a+i*i}},{}],397:[function(e,t,r){t.exports=function(e){var t=e[0],r=e[1],n=e[2],a=e[3];return t*t+r*r+n*n+a*a}},{}],398:[function(e,t,r){t.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},{}],399:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3];return e[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,e[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,e[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,e[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,e}},{}],400:[function(e,t,r){t.exports=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*i-l*a,d=c*a+l*n-o*i,p=c*i+o*a-s*n,h=-o*n-s*a-l*i;return e[0]=u*c+h*-o+d*-l-p*-s,e[1]=d*c+h*-s+p*-o-u*-l,e[2]=p*c+h*-l+u*-s-d*-o,e[3]=t[3],e}},{}],401:[function(e,t,r){t.exports=function(e,t,r,i){return n[0]=i,n[1]=r,n[2]=t,n[3]=e,a[0]};var n=new Uint8Array(4),a=new Float32Array(n.buffer)},{}],402:[function(e,t,r){var n=e("glsl-tokenizer"),a=e("atob-lite");t.exports=function(e){for(var t=Array.isArray(e)?e:n(e),r=0;r<t.length;r++){var i=t[r];if("preprocessor"===i.type){var o=i.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(o&&o[2]){var s=o[1],l=o[2];return(s?a(l):l).trim()}}}}},{"atob-lite":73,"glsl-tokenizer":409}],403:[function(e,t,r){t.exports=function(e){var t,r,k,M=0,T=0,C=l,S=[],L=[],A=1,E=0,D=0,I=!1,P=!1,O="",R=i,F=n;return"300 es"===(e=e||{}).version&&(R=s,F=o),function(e){return L=[],null!==e?function(e){var r;for(M=0,k=(O+=e).length;t=O[M],M<k;){switch(r=M,C){case u:M=Y();break;case d:case p:M=B();break;case h:M=H();break;case f:M=W();break;case x:M=U();break;case m:M=G();break;case c:M=q();break;case b:M=j();break;case l:M=N()}if(r!==M)switch(O[r]){case"\n":E=0,++A;break;default:++E}}return T+=M,O=O.slice(M),L}(e.replace?e.replace(/\r\n/g,"\n"):e):(S.length&&z(S.join("")),C=_,z("(eof)"),L)};function z(e){e.length&&L.push({type:w[C],data:e,position:D,line:A,column:E})}function N(){return S=S.length?[]:S,"/"===r&&"*"===t?(D=T+M-1,C=u,r=t,M+1):"/"===r&&"/"===t?(D=T+M-1,C=d,r=t,M+1):"#"===t?(C=p,D=T+M,M):/\s/.test(t)?(C=b,D=T+M,M):(I=/\d/.test(t),P=/[^\w_]/.test(t),D=T+M,C=I?f:P?h:c,M)}function j(){return/[^\s]/g.test(t)?(z(S.join("")),C=l,M):(S.push(t),r=t,M+1)}function B(){return"\r"!==t&&"\n"!==t||"\\"===r?(S.push(t),r=t,M+1):(z(S.join("")),C=l,M)}function Y(){return"/"===t&&"*"===r?(S.push(t),z(S.join("")),C=l,M+1):(S.push(t),r=t,M+1)}function H(){if("."===r&&/\d/.test(t))return C=m,M;if("/"===r&&"*"===t)return C=u,M;if("/"===r&&"/"===t)return C=d,M;if("."===t&&S.length){for(;V(S););return C=m,M}if(";"===t||")"===t||"("===t){if(S.length)for(;V(S););return z(t),C=l,M+1}var e=2===S.length&&"="!==t;if(/[\w_\d\s]/.test(t)||e){for(;V(S););return C=l,M}return S.push(t),r=t,M+1}function V(e){for(var t,r,n=0;;){if(t=a.indexOf(e.slice(0,e.length+n).join("")),r=a[t],-1===t){if(n--+e.length>0)continue;r=e.slice(0,1).join("")}return z(r),D+=r.length,(S=S.slice(r.length)).length}}function U(){return/[^a-fA-F0-9]/.test(t)?(z(S.join("")),C=l,M):(S.push(t),r=t,M+1)}function W(){return"."===t?(S.push(t),C=m,r=t,M+1):/[eE]/.test(t)?(S.push(t),C=m,r=t,M+1):"x"===t&&1===S.length&&"0"===S[0]?(C=x,S.push(t),r=t,M+1):/[^\d]/.test(t)?(z(S.join("")),C=l,M):(S.push(t),r=t,M+1)}function G(){return"f"===t&&(S.push(t),r=t,M+=1),/[eE]/.test(t)?(S.push(t),r=t,M+1):"-"===t&&/[eE]/.test(r)?(S.push(t),r=t,M+1):/[^\d]/.test(t)?(z(S.join("")),C=l,M):(S.push(t),r=t,M+1)}function q(){if(/[^\d\w_]/.test(t)){var e=S.join("");return C=F.indexOf(e)>-1?y:R.indexOf(e)>-1?v:g,z(S.join("")),C=l,M}return S.push(t),r=t,M+1}};var n=e("./lib/literals"),a=e("./lib/operators"),i=e("./lib/builtins"),o=e("./lib/literals-300es"),s=e("./lib/builtins-300es"),l=999,c=9999,u=0,d=1,p=2,h=3,f=4,m=5,g=6,v=7,y=8,b=9,_=10,x=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":405,"./lib/builtins-300es":404,"./lib/literals":407,"./lib/literals-300es":406,"./lib/operators":408}],404:[function(e,t,r){var n=e("./builtins");n=n.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":405}],405:[function(e,t,r){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],406:[function(e,t,r){var n=e("./literals");t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":407}],407:[function(e,t,r){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],408:[function(e,t,r){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],409:[function(e,t,r){var n=e("./index");t.exports=function(e,t){var r=n(t),a=[];return a=(a=a.concat(r(e))).concat(r(null))}},{"./index":403}],410:[function(e,t,r){t.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n<e.length-1;n++)r.push(e[n],t[n]||"");return r.push(e[n]),r.join("")}},{}],411:[function(e,r,n){(function(t){"use strict";var n,a=e("is-browser");n="function"==typeof t.matchMedia?!t.matchMedia("(hover: none)").matches:a,r.exports=n}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"is-browser":418}],412:[function(e,t,r){"use strict";var n=e("is-browser");t.exports=n&&function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e}()},{"is-browser":418}],413:[function(e,t,r){r.read=function(e,t,r,n,a){var i,o,s=8*a-n-1,l=(1<<s)-1,c=l>>1,u=-7,d=r?a-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=p,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+e[t+d],d+=p,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=c}return(h?-1:1)*o*Math.pow(2,i-n)},r.write=function(e,t,r,n,a,i){var o,s,l,c=8*i-a-1,u=(1<<c)-1,d=u>>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+h]=255&s,h+=f,s/=256,a-=8);for(o=o<<a|s,c+=a;c>0;e[r+h]=255&o,h+=f,o/=256,c-=8);e[r+h-f]|=128*m}},{}],414:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.length;if(0===r)throw new Error("Must have at least d+1 points");var a=e[0].length;if(r<=a)throw new Error("Must input at least d+1 points");var o=e.slice(0,a+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(a+1),u=0;u<=a;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);var d=new i(l,new Array(a+1),!1),p=d.adjacent,h=new Array(a+2);for(u=0;u<=a;++u){for(var f=l.slice(),m=0;m<=a;++m)m===u&&(f[m]=-1);var g=f[0];f[0]=f[1],f[1]=g;var v=new i(f,new Array(a+1),!0);p[u]=v,h[u]=v}for(h[a+1]=d,u=0;u<=a;++u){f=p[u].vertices;var y=p[u].adjacent;for(m=0;m<=a;++m){var b=f[m];if(b<0)y[m]=d;else for(var _=0;_<=a;++_)p[_].vertices.indexOf(b)<0&&(y[m]=p[_])}}var x=new c(a,o,h),w=!!t;for(u=a+1;u<r;++u)x.insert(e[u],w);return x.boundary()};var n=e("robust-orientation"),a=e("simplicial-complex").compareCells;function i(e,t,r){this.vertices=e,this.adjacent=t,this.boundary=r,this.lastVisited=-1}function o(e,t,r){this.vertices=e,this.cell=t,this.index=r}function s(e,t){return a(e.vertices,t.vertices)}i.prototype.flip=function(){var e=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=e;var t=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=t};var l=[];function c(e,t,r){this.dimension=e,this.vertices=t,this.simplices=r,this.interior=r.filter((function(e){return!e.boundary})),this.tuple=new Array(e+1);for(var a=0;a<=e;++a)this.tuple[a]=this.vertices[a];var i=l[e];i||(i=l[e]=function(e){for(var t=["function orient(){var tuple=this.tuple;return test("],r=0;r<=e;++r)r>0&&t.push(","),t.push("tuple[",r,"]");t.push(")}return orient");var a=new Function("test",t.join("")),i=n[e+1];return i||(i=n),a(i)}(e)),this.orient=i}var u=c.prototype;u.handleBoundaryDegeneracy=function(e,t){var r=this.dimension,n=this.vertices.length-1,a=this.tuple,i=this.vertices,o=[e];for(e.lastVisited=-n;o.length>0;){(e=o.pop()).vertices;for(var s=e.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,d=0;d<=r;++d){var p=u[d];a[d]=p<0?t:i[p]}var h=this.orient();if(h>0)return c;c.lastVisited=-n,0===h&&o.push(c)}}}return null},u.walk=function(e,t){var r=this.vertices.length-1,n=this.dimension,a=this.vertices,i=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)i[u]=a[l[u]];for(s.lastVisited=r,u=0;u<=n;++u){var d=c[u];if(!(d.lastVisited>=r)){var p=i[u];i[u]=e;var h=this.orient();if(i[u]=p,h<0){s=d;continue e}d.boundary?d.lastVisited=-r:d.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,n=this.dimension,a=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,d=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var p=[];d.length>0;){var h=(t=d.pop()).vertices,f=t.adjacent,m=h.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var v=f[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var b=0,_=0;_<=n;++_)y[_]<0?(b=_,l[_]=e):l[_]=a[y[_]];if(this.orient()>0){y[b]=r,v.boundary=!1,c.push(v),d.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var x=v.adjacent,w=h.slice(),k=f.slice(),M=new i(w,k,!0);u.push(M);var T=x.indexOf(t);if(!(T<0))for(x[T]=M,k[m]=v,w[g]=-1,k[g]=t,f[g]=M,M.flip(),_=0;_<=n;++_){var C=w[_];if(!(C<0||C===r)){for(var S=new Array(n-1),L=0,A=0;A<=n;++A){var E=w[A];E<0||A===_||(S[L++]=E)}p.push(new o(S,M,_))}}}}}for(p.sort(s),g=0;g+1<p.length;g+=2){var D=p[g],I=p[g+1],P=D.index,O=I.index;P<0||O<0||(D.cell.adjacent[D.index]=I.cell,I.cell.adjacent[I.index]=D.cell)}},u.insert=function(e,t){var r=this.vertices;r.push(e);var n=this.walk(e,t);if(n){for(var a=this.dimension,i=this.tuple,o=0;o<=a;++o){var s=n.vertices[o];i[o]=s<0?e:r[s]}var l=this.orient(i);l<0||(0!==l||(n=this.handleBoundaryDegeneracy(n,e)))&&this.addPeaks(e,n)}},u.boundary=function(){for(var e=this.dimension,t=[],r=this.simplices,n=r.length,a=0;a<n;++a){var i=r[a];if(i.boundary){for(var o=new Array(e),s=i.vertices,l=0,c=0,u=0;u<=e;++u)s[u]>=0?o[l++]=s[u]:c=1&u;if(c===(1&e)){var d=o[0];o[0]=o[1],o[1]=d}t.push(o)}}return t}},{"robust-orientation":508,"simplicial-complex":518}],415:[function(e,t,r){"use strict";var n=e("binary-search-bounds"),a=0,i=1;function o(e,t,r,n,a){this.mid=e,this.left=t,this.right=r,this.leftPoints=n,this.rightPoints=a,this.count=(t?t.count:0)+(r?r.count:0)+n.length}t.exports=function(e){return e&&0!==e.length?new b(y(e)):new b(null)};var s=o.prototype;function l(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function c(e,t){var r=y(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function u(e,t){var r=e.intervals([]);r.push(t),c(e,r)}function d(e,t){var r=e.intervals([]),n=r.indexOf(t);return n<0?a:(r.splice(n,1),c(e,r),i)}function p(e,t,r){for(var n=0;n<e.length&&e[n][0]<=t;++n){var a=r(e[n]);if(a)return a}}function h(e,t,r){for(var n=e.length-1;n>=0&&e[n][1]>=t;--n){var a=r(e[n]);if(a)return a}}function f(e,t){for(var r=0;r<e.length;++r){var n=t(e[r]);if(n)return n}}function m(e,t){return e-t}function g(e,t){var r=e[0]-t[0];return r||e[1]-t[1]}function v(e,t){var r=e[1]-t[1];return r||e[0]-t[0]}function y(e){if(0===e.length)return null;for(var t=[],r=0;r<e.length;++r)t.push(e[r][0],e[r][1]);t.sort(m);var n=t[t.length>>1],a=[],i=[],s=[];for(r=0;r<e.length;++r){var l=e[r];l[1]<n?a.push(l):n<l[0]?i.push(l):s.push(l)}var c=s,u=s.slice();return c.sort(g),u.sort(v),new o(n,y(a),y(i),c,u)}function b(e){this.root=e}s.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},s.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?u(this,e):this.left.insert(e):this.left=y([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?u(this,e):this.right.insert(e):this.right=y([e]);else{var r=n.ge(this.leftPoints,e,g),a=n.ge(this.rightPoints,e,v);this.leftPoints.splice(r,0,e),this.rightPoints.splice(a,0,e)}},s.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(t-1)?d(this,e):2===(c=this.left.remove(e))?(this.left=null,this.count-=1,i):(c===i&&(this.count-=1),c):a;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?d(this,e):2===(c=this.right.remove(e))?(this.right=null,this.count-=1,i):(c===i&&(this.count-=1),c):a;if(1===this.count)return this.leftPoints[0]===e?2:a;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var r=this,o=this.left;o.right;)r=o,o=o.right;if(r===this)o.right=this.right;else{var s=this.left,c=this.right;r.count-=o.count,r.right=o.left,o.left=s,o.right=c}l(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?l(this,this.left):l(this,this.right);return i}for(s=n.ge(this.leftPoints,e,g);s<this.leftPoints.length&&this.leftPoints[s][0]===e[0];++s)if(this.leftPoints[s]===e)for(this.count-=1,this.leftPoints.splice(s,1),c=n.ge(this.rightPoints,e,v);c<this.rightPoints.length&&this.rightPoints[c][1]===e[1];++c)if(this.rightPoints[c]===e)return this.rightPoints.splice(c,1),i;return a},s.queryPoint=function(e,t){return e<this.mid?this.left&&(r=this.left.queryPoint(e,t))?r:p(this.leftPoints,e,t):e>this.mid?this.right&&(r=this.right.queryPoint(e,t))?r:h(this.rightPoints,e,t):f(this.leftPoints,t);var r},s.queryInterval=function(e,t,r){var n;return e<this.mid&&this.left&&(n=this.left.queryInterval(e,t,r))?n:t>this.mid&&this.right&&(n=this.right.queryInterval(e,t,r))?n:t<this.mid?p(this.leftPoints,t,r):e>this.mid?h(this.rightPoints,e,r):f(this.leftPoints,r)};var _=b.prototype;_.insert=function(e){this.root?this.root.insert(e):this.root=new o(e[0],null,null,[e],[e])},_.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),t!==a}return!1},_.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},_.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":92}],416:[function(e,t,r){"use strict";t.exports=function(e,t){t=t||new Array(e.length);for(var r=0;r<e.length;++r)t[e[r]]=r;return t}},{}],417:[function(e,t,r){"use strict";t.exports=function(e){for(var t=new Array(e),r=0;r<e;++r)t[r]=r;return t}},{}],418:[function(e,t,r){t.exports=!0},{}],419:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],420:[function(e,t,r){"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],421:[function(e,t,r){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var n=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function i(e){e||(e={});var t=e.ua;return t||"undefined"==typeof navigator||(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"==typeof t&&(e.tablet?a.test(t):n.test(t))}},{}],422:[function(e,t,r){"use strict";t.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},{}],423:[function(e,t,r){"use strict";var n=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===n.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}},{}],424:[function(e,t,r){"use strict";t.exports=function(e){for(var t,r=e.length,n=0;n<r;n++)if(((t=e.charCodeAt(n))<9||t>13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},{}],425:[function(e,t,r){"use strict";t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},{}],426:[function(e,t,r){t.exports=function(e,t,r){return e*(1-r)+t*r}},{}],427:[function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?t.exports=n():(e=e||self).mapboxgl=n()}(this,(function(){"use strict";var e,t,r;function n(n,a){if(e)if(t){var i="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",o={};e(o),(r=a(o)).workerUrl=window.URL.createObjectURL(new Blob([i],{type:"text/javascript"}))}else t=a;else e=a}return n(0,(function(e){function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=n;function n(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=r,this.p2y=n}n.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},n.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},n.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},n.prototype.solveCurveX=function(e,t){var r,n,a,i,o;for(void 0===t&&(t=1e-6),a=e,o=0;o<8;o++){if(i=this.sampleCurveX(a)-e,Math.abs(i)<t)return a;var s=this.sampleCurveDerivativeX(a);if(Math.abs(s)<1e-6)break;a-=i/s}if((a=e)<(r=0))return r;if(a>(n=1))return n;for(;r<n;){if(i=this.sampleCurveX(a),Math.abs(i-e)<t)return a;e>i?r=a:n=a,a=.5*(n-r)+r}return a},n.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var a=i;function i(e,t){this.x=e,this.y=t}function o(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!o(e[r],t[r]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==t){if("object"!=typeof t)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!o(e[n],t[n]))return!1;return!0}return e===t}function s(e,t,n,a){var i=new r(e,t,n,a);return function(e){return i.solve(e)}}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,a=r*this.x+t*this.y;return this.x=n,this.y=a,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),a=t.x+r*(this.x-t.x)-n*(this.y-t.y),i=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=a,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(e){return e instanceof i?e:Array.isArray(e)?new i(e[0],e[1]):e};var l=s(.25,.1,.25,1);function c(e,t,r){return Math.min(r,Math.max(t,e))}function u(e,t,r){var n=r-t,a=((e-t)%n+n)%n+t;return a===t?r:a}function d(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,a=t;n<a.length;n+=1){var i=a[n];for(var o in i)e[o]=i[o]}return e}var p=1;function h(){return p++}function f(){return function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function m(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function g(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function v(e,t){return-1!==e.indexOf(t,e.length-t.length)}function y(e,t,r){var n={};for(var a in e)n[a]=t.call(r||this,e[a],a,e);return n}function b(e,t,r){var n={};for(var a in e)t.call(r||this,e[a],a,e)&&(n[a]=e[a]);return n}function _(e){return Array.isArray(e)?e.map(_):"object"==typeof e&&e?y(e,_):e}var x={};function w(e){x[e]||("undefined"!=typeof console&&console.warn(e),x[e]=!0)}function k(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function M(e){for(var t=0,r=0,n=e.length,a=n-1,i=void 0,o=void 0;r<n;a=r++)i=e[r],t+=((o=e[a]).x-i.x)*(i.y+o.y);return t}function T(e){var t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(e,r,n,a){var i=n||a;return t[r]=!i||i.toLowerCase(),""})),t["max-age"]){var r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t}function C(e){try{var t=self[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch(e){return!1}}var S,L,A,E,D=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),I=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,P=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,O={now:D,frame:function(e){var t=I(e);return{cancel:function(){return P(t)}}},getImageData:function(e){var t=self.document.createElement("canvas"),r=t.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r.getImageData(0,0,e.width,e.height)},resolveURL:function(e){return S||(S=self.document.createElement("a")),S.href=e,S.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==L&&(L=self.matchMedia("(prefers-reduced-motion: reduce)")),L.matches)}},R={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},F={supported:!1,testSupport:function(e){!z&&E&&(N?j(e):A=e)}},z=!1,N=!1;function j(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,E),e.isContextLost())return;F.supported=!0}catch(e){}e.deleteTexture(t),z=!0}self.document&&((E=self.document.createElement("img")).onload=function(){A&&j(A),A=null,N=!0},E.onerror=function(){z=!0,A=null},E.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var B="01",Y=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function H(e){return 0===e.indexOf("mapbox:")}Y.prototype._createSkuToken=function(){var e=function(){for(var e="",t=0;t<10;t++)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",B,e].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},Y.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Y.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},Y.prototype.normalizeStyleURL=function(e,t){if(!H(e))return e;var r=G(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Y.prototype.normalizeGlyphsURL=function(e,t){if(!H(e))return e;var r=G(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},Y.prototype.normalizeSourceURL=function(e,t){if(!H(e))return e;var r=G(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},Y.prototype.normalizeSpriteURL=function(e,t,r,n){var a=G(e);return H(e)?(a.path="/styles/v1"+a.path+"/sprite"+t+r,this._makeAPIURL(a,this._customAccessToken||n)):(a.path+=""+t+r,q(a))},Y.prototype.normalizeTileURL=function(e,t,r){if(this._isSkuTokenExpired()&&this._createSkuToken(),!t||!H(t))return e;var n=G(e),a=O.devicePixelRatio>=2||512===r?"@2x":"",i=F.supported?".webp":"$1";return n.path=n.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+a+i),n.path=n.path.replace(/^.+\/v4\//,"/"),n.path="/v4"+n.path,R.REQUIRE_ACCESS_TOKEN&&(R.ACCESS_TOKEN||this._customAccessToken)&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,this._customAccessToken)},Y.prototype.canonicalizeTileURL=function(e){var t=G(e);if(!t.path.match(/(^\/v4\/)/)||!t.path.match(/\.[\w]+$/))return e;var r="mapbox://tiles/";r+=t.path.replace("/v4/","");var n=t.params.filter((function(e){return!e.match(/^access_token=/)}));return n.length&&(r+="?"+n.join("&")),r},Y.prototype.canonicalizeTileset=function(e,t){if(!H(t))return e.tiles||[];for(var r=[],n=0,a=e.tiles;n<a.length;n+=1){var i=a[n],o=this.canonicalizeTileURL(i);r.push(o)}return r},Y.prototype._makeAPIURL=function(e,t){var r="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",n=G(R.API_URL);if(e.protocol=n.protocol,e.authority=n.authority,"/"!==n.path&&(e.path=""+n.path+e.path),!R.REQUIRE_ACCESS_TOKEN)return q(e);if(!(t=t||R.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return e.params=e.params.filter((function(e){return-1===e.indexOf("access_token")})),e.params.push("access_token="+t),q(e)};var V=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function U(e){return V.test(e)}var W=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/;function G(e){var t=e.match(W);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function q(e){var t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}function K(e){if(!e)return null;var t,r=e.split(".");if(!r||3!==r.length)return null;try{return JSON.parse((t=r[1],decodeURIComponent(self.atob(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(e){return null}}var X=function(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};X.prototype.getStorageKey=function(e){var t,r=K(R.ACCESS_TOKEN),n="";return r&&r.u?(t=r.u,n=self.btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(Number("0x"+t))})))):n=R.ACCESS_TOKEN||"",e?"mapbox.eventData."+e+":"+n:"mapbox.eventData:"+n},X.prototype.fetchEventData=function(){var e=C("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{var n=self.localStorage.getItem(t);n&&(this.eventData=JSON.parse(n));var a=self.localStorage.getItem(r);a&&(this.anonId=a)}catch(e){w("Unable to read from LocalStorage")}},X.prototype.saveEventData=function(){var e=C("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{self.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(t,JSON.stringify(this.eventData))}catch(e){w("Unable to write to LocalStorage")}},X.prototype.processRequests=function(e){},X.prototype.postEvent=function(e,t,r,n){var a=this;if(R.EVENTS_URL){var i=G(R.EVENTS_URL);i.params.push("access_token="+(n||R.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.3.2",skuId:B,userId:this.anonId},s=t?d(o,t):o,l={url:q(i),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=ve(l,(function(e){a.pendingRequest=null,r(e),a.saveEventData(),a.processRequests(n)}))}},X.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var Z,J=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,r,n){this.skuToken=r,(R.EVENTS_URL&&n||R.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return H(e)||U(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},n)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,a=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=f()),this.postEvent(a,{skuToken:this.skuToken},(function(e){e||n&&(t.success[n]=!0)}),e))}},t}(X),$=new(function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){R.EVENTS_URL&&R.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return H(e)||U(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=K(R.ACCESS_TOKEN),n=r?r.u:R.ACCESS_TOKEN,a=n!==this.eventData.tokenU;m(this.anonId)||(this.anonId=f(),a=!0);var i=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(i),l=(i-this.eventData.lastSuccess)/864e5;a=a||l>=1||l<-1||o.getDate()!==s.getDate()}else a=!0;if(!a)return this.processRequests();this.postEvent(i,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=i,t.eventData.tokenU=n)}),e)}},t}(X)),Q=$.postTurnstileEvent.bind($),ee=new J,te=ee.postMapLoadEvent.bind(ee),re="mapbox-tiles",ne=500,ae=50,ie=42e4;function oe(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var se=1/0,le={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(le);var ce=function(e){function t(t,r,n){401===r&&U(n)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,t),this.status=r,this.url=n,this.name=this.constructor.name,this.message=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error);function ue(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var de=ue()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};function pe(e,t){var r,n=new self.AbortController,a=new self.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:de(),signal:n.signal}),i=!1,o=!1,s=(r=a.url).indexOf("sku=")>0&&U(r);"json"===e.type&&a.headers.set("Accept","application/json");var l=function(r,n,i){if(!o){if(r&&"SecurityError"!==r.message&&w(r),n&&i)return c(n);var l=Date.now();self.fetch(a).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return t(new ce(r.statusText,r.status,e.url))})).catch((function(e){20!==e.code&&t(new Error(e.message))}))}},c=function(r,n,s){("arrayBuffer"===e.type?r.arrayBuffer():"json"===e.type?r.json():r.text()).then((function(e){o||(n&&s&&function(e,t,r){if(self.caches){var n={status:t.status,statusText:t.statusText,headers:new self.Headers};t.headers.forEach((function(e,t){return n.headers.set(t,e)}));var a=T(t.headers.get("Cache-Control")||"");a["no-store"]||(a["max-age"]&&n.headers.set("Expires",new Date(r+1e3*a["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<ie||function(e,t){if(void 0===Z)try{new Response(new ReadableStream),Z=!0}catch(e){Z=!1}Z?t(e.body):e.blob().then(t)}(t,(function(t){var r=new self.Response(t,n);self.caches.open(re).then((function(t){return t.put(oe(e.url),r)})).catch((function(e){return w(e.message)}))})))}}(a,n,s),i=!0,t(null,e,r.headers.get("Cache-Control"),r.headers.get("Expires")))})).catch((function(e){return t(new Error(e.message))}))};return s?function(e,t){if(!self.caches)return t(null);var r=oe(e.url);self.caches.open(re).then((function(e){e.match(r).then((function(n){var a=function(e){if(!e)return!1;var t=new Date(e.headers.get("Expires")),r=T(e.headers.get("Cache-Control")||"");return t>Date.now()&&!r["no-cache"]}(n);e.delete(r),a&&e.put(r,n.clone()),t(null,n,a)})).catch(t)})).catch(t)}(a,l):l(null,null),{cancel:function(){o=!0,i||n.abort()}}}var he,fe,me=function(e,t){if(r=e.url,!(/^file:/.test(r)||/^file:/.test(de())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return pe(e,t);if(ue()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t)}var r;return function(e,t){var r=new self.XMLHttpRequest;for(var n in r.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(r.responseType="arraybuffer"),e.headers)r.setRequestHeader(n,e.headers[n]);return"json"===e.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===e.credentials,r.onerror=function(){t(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===e.type)try{n=JSON.parse(r.response)}catch(e){return t(e)}t(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else t(new ce(r.statusText,r.status,e.url))},r.send(e.body),{cancel:function(){return r.abort()}}}(e,t)},ge=function(e,t){return me(d(e,{type:"arrayBuffer"}),t)},ve=function(e,t){return me(d(e,{method:"POST"}),t)};he=[],fe=0;var ye=function(e,t){if(fe>=R.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return he.push(r),r}fe++;var n=!1,a=function(){if(!n)for(n=!0,fe--;he.length&&fe<R.MAX_PARALLEL_IMAGE_REQUESTS;){var e=he.shift(),t=e.requestParameters,r=e.callback;e.cancelled||(e.cancel=ye(t,r).cancel)}},i=ge(e,(function(e,r,n,i){if(a(),e)t(e);else if(r){var o=new self.Image,s=self.URL||self.webkitURL;o.onload=function(){t(null,o),s.revokeObjectURL(o.src)},o.onerror=function(){return t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var l=new self.Blob([new Uint8Array(r)],{type:"image/png"});o.cacheControl=n,o.expires=i,o.src=r.byteLength?s.createObjectURL(l):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}}));return{cancel:function(){i.cancel(),a()}}};function be(e,t,r){r[e]&&-1!==r[e].indexOf(t)||(r[e]=r[e]||[],r[e].push(t))}function _e(e,t,r){if(r&&r[e]){var n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}var xe=function(e,t){void 0===t&&(t={}),d(this,t),this.type=e},we=function(e){function t(t,r){void 0===r&&(r={}),e.call(this,"error",d({error:t},r))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xe),ke=function(){};ke.prototype.on=function(e,t){return this._listeners=this._listeners||{},be(e,t,this._listeners),this},ke.prototype.off=function(e,t){return _e(e,t,this._listeners),_e(e,t,this._oneTimeListeners),this},ke.prototype.once=function(e,t){return this._oneTimeListeners=this._oneTimeListeners||{},be(e,t,this._oneTimeListeners),this},ke.prototype.fire=function(e,t){"string"==typeof e&&(e=new xe(e,t||{}));var r=e.type;if(this.listens(r)){e.target=this;for(var n=0,a=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];n<a.length;n+=1)a[n].call(this,e);for(var i=0,o=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];i<o.length;i+=1){var s=o[i];_e(r,s,this._oneTimeListeners),s.call(this,e)}var l=this._eventedParent;l&&(d(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(e))}else e instanceof we&&console.error(e.error);return this},ke.prototype.listens=function(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},ke.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var Me={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"},{"!":"text-variable-anchor"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},Te=function(e,t,r,n){this.message=(e?e+": ":"")+r,n&&(this.identifier=n),null!=t&&t.__line__&&(this.line=t.__line__)};function Ce(e){var t=e.key,r=e.value;return r?[new Te(t,r,"constants have been deprecated as of v8")]:[]}function Se(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,a=t;n<a.length;n+=1){var i=a[n];for(var o in i)e[o]=i[o]}return e}function Le(e){return e instanceof Number||e instanceof String||e instanceof Boolean}function Ae(e){return Le(e)?e.valueOf():e}function Ee(e){if(Array.isArray(e))return e.map(Ee);if(e instanceof Object&&!Le(e)){var t={};for(var r in e)t[r]=Ee(e[r]);return t}return Ae(e)}var De=function(e){function t(t,r){e.call(this,r),this.message=r,this.key=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),Ie=function(e,t){void 0===t&&(t=[]),this.parent=e,this.bindings={};for(var r=0,n=t;r<n.length;r+=1){var a=n[r],i=a[0],o=a[1];this.bindings[i]=o}};Ie.prototype.concat=function(e){return new Ie(this,e)},Ie.prototype.get=function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(e+" not found in scope.")},Ie.prototype.has=function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)};var Pe={kind:"null"},Oe={kind:"number"},Re={kind:"string"},Fe={kind:"boolean"},ze={kind:"color"},Ne={kind:"object"},je={kind:"value"},Be={kind:"collator"},Ye={kind:"formatted"};function He(e,t){return{kind:"array",itemType:e,N:t}}function Ve(e){if("array"===e.kind){var t=Ve(e.itemType);return"number"==typeof e.N?"array<"+t+", "+e.N+">":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var Ue=[Pe,Oe,Re,Fe,ze,Ye,Ne,He(je)];function We(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!We(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=Ue;r<n.length;r+=1)if(!We(n[r],t))return null}return"Expected "+Ve(e)+" but found "+Ve(t)+" instead."}var Ge=t((function(e,t){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function n(e){return(e=Math.round(e))<0?0:e>255?255:e}function a(e){return e<0?0:e>1?1:e}function i(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function o(e){return"%"===e[e.length-1]?a(parseFloat(e)/100):a(parseFloat(e))}function s(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}try{t.parseCSSColor=function(e){var t,a=e.replace(/ /g,"").toLowerCase();if(a in r)return r[a].slice();if("#"===a[0])return 4===a.length?(t=parseInt(a.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===a.length&&(t=parseInt(a.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=a.indexOf("("),c=a.indexOf(")");if(-1!==l&&c+1===a.length){var u=a.substr(0,l),d=a.substr(l+1,c-(l+1)).split(","),p=1;switch(u){case"rgba":if(4!==d.length)return null;p=o(d.pop());case"rgb":return 3!==d.length?null:[i(d[0]),i(d[1]),i(d[2]),p];case"hsla":if(4!==d.length)return null;p=o(d.pop());case"hsl":if(3!==d.length)return null;var h=(parseFloat(d[0])%360+360)%360/360,f=o(d[1]),m=o(d[2]),g=m<=.5?m*(f+1):m+f-m*f,v=2*m-g;return[n(255*s(v,g,h+1/3)),n(255*s(v,g,h)),n(255*s(v,g,h-1/3)),p];default:return null}}return null}}catch(e){}})).parseCSSColor,qe=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};qe.parse=function(e){if(e){if(e instanceof qe)return e;if("string"==typeof e){var t=Ge(e);if(t)return new qe(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},qe.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],a=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+a+")"},qe.prototype.toArray=function(){var e=this.r,t=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*r/n,n]},qe.black=new qe(0,0,0,1),qe.white=new qe(1,1,1,1),qe.transparent=new qe(0,0,0,0),qe.red=new qe(1,0,0,1);var Ke=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ke.prototype.compare=function(e,t){return this.collator.compare(e,t)},Ke.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Xe=function(e,t,r,n){this.text=e,this.scale=t,this.fontStack=r,this.textColor=n},Ze=function(e){this.sections=e};function Je(e,t,r,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function $e(e){if(null===e)return Pe;if("string"==typeof e)return Re;if("boolean"==typeof e)return Fe;if("number"==typeof e)return Oe;if(e instanceof qe)return ze;if(e instanceof Ke)return Be;if(e instanceof Ze)return Ye;if(Array.isArray(e)){for(var t,r=e.length,n=0,a=e;n<a.length;n+=1){var i=$e(a[n]);if(t){if(t===i)continue;t=je;break}t=i}return He(t||je,r)}return Ne}function Qe(e){var t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof qe||e instanceof Ze?e.toString():JSON.stringify(e)}Ze.fromString=function(e){return new Ze([new Xe(e,null,null,null)])},Ze.prototype.toString=function(){return this.sections.map((function(e){return e.text})).join("")},Ze.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var n=r[t];e.push(n.text);var a={};n.fontStack&&(a["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(a["font-scale"]=n.scale),n.textColor&&(a["text-color"]=["rgba"].concat(n.textColor.toArray())),e.push(a)}return e};var et=function(e,t){this.type=e,this.value=t};et.parse=function(e,t){if(2!==e.length)return t.error("'literal' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(!function e(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof qe)return!0;if(t instanceof Ke)return!0;if(t instanceof Ze)return!0;if(Array.isArray(t)){for(var r=0,n=t;r<n.length;r+=1)if(!e(n[r]))return!1;return!0}if("object"==typeof t){for(var a in t)if(!e(t[a]))return!1;return!0}return!1}(e[1]))return t.error("invalid value");var r=e[1],n=$e(r),a=t.expectedType;return"array"!==n.kind||0!==n.N||!a||"array"!==a.kind||"number"==typeof a.N&&0!==a.N||(n=a),new et(n,r)},et.prototype.evaluate=function(){return this.value},et.prototype.eachChild=function(){},et.prototype.possibleOutputs=function(){return[this.value]},et.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof qe?["rgba"].concat(this.value.toArray()):this.value instanceof Ze?this.value.serialize():this.value};var tt=function(e){this.name="ExpressionEvaluationError",this.message=e};tt.prototype.toJSON=function(){return this.message};var rt={string:Re,number:Oe,boolean:Fe,object:Ne},nt=function(e,t){this.type=e,this.args=t};nt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r,n=1,a=e[0];if("array"===a){var i,o;if(e.length>2){var s=e[1];if("string"!=typeof s||!(s in rt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=rt[s],n++}else i=je;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],n++}r=He(i,o)}else r=rt[a];for(var l=[];n<e.length;n++){var c=t.parse(e[n],n,je);if(!c)return null;l.push(c)}return new nt(r,l)},nt.prototype.evaluate=function(e){for(var t=0;t<this.args.length;t++){var r=this.args[t].evaluate(e);if(!We(this.type,$e(r)))return r;if(t===this.args.length-1)throw new tt("Expected value to be of type "+Ve(this.type)+", but found "+Ve($e(r))+" instead.")}return null},nt.prototype.eachChild=function(e){this.args.forEach(e)},nt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},nt.prototype.serialize=function(){var e=this.type,t=[e.kind];if("array"===e.kind){var r=e.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){t.push(r.kind);var n=e.N;("number"==typeof n||this.args.length>1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var at=function(e){this.type=Ye,this.sections=e};at.parse=function(e,t){if(e.length<3)return t.error("Expected at least two arguments.");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");for(var r=[],n=1;n<e.length-1;n+=2){var a=t.parse(e[n],1,je);if(!a)return null;var i=a.type.kind;if("string"!==i&&"value"!==i&&"null"!==i)return t.error("Formatted text type must be 'string', 'value', or 'null'.");var o=e[n+1];if("object"!=typeof o||Array.isArray(o))return t.error("Format options argument must be an object.");var s=null;if(o["font-scale"]&&!(s=t.parse(o["font-scale"],1,Oe)))return null;var l=null;if(o["text-font"]&&!(l=t.parse(o["text-font"],1,He(Re))))return null;var c=null;if(o["text-color"]&&!(c=t.parse(o["text-color"],1,ze)))return null;r.push({text:a,scale:s,font:l,textColor:c})}return new at(r)},at.prototype.evaluate=function(e){return new Ze(this.sections.map((function(t){return new Xe(Qe(t.text.evaluate(e)),t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},at.prototype.eachChild=function(e){for(var t=0,r=this.sections;t<r.length;t+=1){var n=r[t];e(n.text),n.scale&&e(n.scale),n.font&&e(n.font),n.textColor&&e(n.textColor)}},at.prototype.possibleOutputs=function(){return[void 0]},at.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t<r.length;t+=1){var n=r[t];e.push(n.text.serialize());var a={};n.scale&&(a["font-scale"]=n.scale.serialize()),n.font&&(a["text-font"]=n.font.serialize()),n.textColor&&(a["text-color"]=n.textColor.serialize()),e.push(a)}return e};var it={"to-boolean":Fe,"to-color":ze,"to-number":Oe,"to-string":Re},ot=function(e,t){this.type=e,this.args=t};ot.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");for(var n=it[r],a=[],i=1;i<e.length;i++){var o=t.parse(e[i],i,je);if(!o)return null;a.push(o)}return new ot(n,a)},ot.prototype.evaluate=function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){for(var t,r,n=0,a=this.args;n<a.length;n+=1){if(r=null,(t=a[n].evaluate(e))instanceof qe)return t;if("string"==typeof t){var i=e.parseColor(t);if(i)return i}else if(Array.isArray(t)&&!(r=t.length<3||t.length>4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":Je(t[0],t[1],t[2],t[3])))return new qe(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new tt(r||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s<l.length;s+=1){if(null===(o=l[s].evaluate(e)))return 0;var c=Number(o);if(!isNaN(c))return c}throw new tt("Could not convert "+JSON.stringify(o)+" to number.")}return"formatted"===this.type.kind?Ze.fromString(Qe(this.args[0].evaluate(e))):Qe(this.args[0].evaluate(e))},ot.prototype.eachChild=function(e){this.args.forEach(e)},ot.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},ot.prototype.serialize=function(){if("formatted"===this.type.kind)return new at([{text:this.args[0],scale:null,font:null,textColor:null}]).serialize();var e=["to-"+this.type.kind];return this.eachChild((function(t){e.push(t.serialize())})),e};var st=["Unknown","Point","LineString","Polygon"],lt=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={}};lt.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},lt.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?st[this.feature.type]:this.feature.type:null},lt.prototype.properties=function(){return this.feature&&this.feature.properties||{}},lt.prototype.parseColor=function(e){var t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=qe.parse(e)),t};var ct=function(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n};ct.prototype.evaluate=function(e){return this._evaluate(e,this.args)},ct.prototype.eachChild=function(e){this.args.forEach(e)},ct.prototype.possibleOutputs=function(){return[void 0]},ct.prototype.serialize=function(){return[this.name].concat(this.args.map((function(e){return e.serialize()})))},ct.parse=function(e,t){var r,n=e[0],a=ct.definitions[n];if(!a)return t.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var i=Array.isArray(a)?a[0]:a.type,o=Array.isArray(a)?[[a[1],a[2]]]:a.overloads,s=o.filter((function(t){var r=t[0];return!Array.isArray(r)||r.length===e.length-1})),l=null,c=0,u=s;c<u.length;c+=1){var d=u[c],p=d[0],h=d[1];l=new mt(t.registry,t.path,null,t.scope);for(var f=[],m=!1,g=1;g<e.length;g++){var v=e[g],y=Array.isArray(p)?p[g-1]:p.type,b=l.parse(v,1+f.length,y);if(!b){m=!0;break}f.push(b)}if(!m)if(Array.isArray(p)&&p.length!==f.length)l.error("Expected "+p.length+" arguments, but found "+f.length+" instead.");else{for(var _=0;_<f.length;_++){var x=Array.isArray(p)?p[_]:p.type,w=f[_];l.concat(_+1).checkSubtype(x,w.type)}if(0===l.errors.length)return new ct(n,i,h,f)}}if(1===s.length)(r=t.errors).push.apply(r,l.errors);else{for(var k=(s.length?s:o).map((function(e){var t;return t=e[0],Array.isArray(t)?"("+t.map(Ve).join(", ")+")":"("+Ve(t.type)+"...)"})).join(" | "),M=[],T=1;T<e.length;T++){var C=t.parse(e[T],1+M.length);if(!C)return null;M.push(Ve(C.type))}t.error("Expected arguments of type "+k+", but found ("+M.join(", ")+") instead.")}return null},ct.register=function(e,t){for(var r in ct.definitions=t,t)e[r]=ct};var ut=function(e,t,r){this.type=Be,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t};function dt(e){if(e instanceof ct){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}var t=!0;return e.eachChild((function(e){t&&!dt(e)&&(t=!1)})),t}function pt(e){if(e instanceof ct&&"feature-state"===e.name)return!1;var t=!0;return e.eachChild((function(e){t&&!pt(e)&&(t=!1)})),t}function ht(e,t){if(e instanceof ct&&t.indexOf(e.name)>=0)return!1;var r=!0;return e.eachChild((function(e){r&&!ht(e,t)&&(r=!1)})),r}ut.parse=function(e,t){if(2!==e.length)return t.error("Expected one argument.");var r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");var n=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Fe);if(!n)return null;var a=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Fe);if(!a)return null;var i=null;return r.locale&&!(i=t.parse(r.locale,1,Re))?null:new ut(n,a,i)},ut.prototype.evaluate=function(e){return new Ke(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)},ut.prototype.eachChild=function(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)},ut.prototype.possibleOutputs=function(){return[void 0]},ut.prototype.serialize=function(){var e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]};var ft=function(e,t){this.type=t.type,this.name=e,this.boundExpression=t};ft.parse=function(e,t){if(2!==e.length||"string"!=typeof e[1])return t.error("'var' expression requires exactly one string literal argument.");var r=e[1];return t.scope.has(r)?new ft(r,t.scope.get(r)):t.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},ft.prototype.evaluate=function(e){return this.boundExpression.evaluate(e)},ft.prototype.eachChild=function(){},ft.prototype.possibleOutputs=function(){return[void 0]},ft.prototype.serialize=function(){return["var",this.name]};var mt=function(e,t,r,n,a){void 0===t&&(t=[]),void 0===n&&(n=new Ie),void 0===a&&(a=[]),this.registry=e,this.path=t,this.key=t.map((function(e){return"["+e+"]"})).join(""),this.scope=n,this.errors=a,this.expectedType=r};function gt(e,t){for(var r,n,a=e.length-1,i=0,o=a,s=0;i<=o;)if(r=e[s=Math.floor((i+o)/2)],n=e[s+1],r<=t){if(s===a||t<n)return s;i=s+1}else{if(!(r>t))throw new tt("Input is not a number.");o=s-1}return 0}mt.prototype.parse=function(e,t,r,n,a){return void 0===a&&(a={}),t?this.concat(t,r,n)._parse(e,a):this._parse(e,a)},mt.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new nt(t,[e]):"coerce"===r?new ot(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var a=this.registry[n];if(a){var i=a.parse(e,this);if(!i)return null;if(this.expectedType){var o=this.expectedType,s=i.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else i=r(i,o,t.typeAnnotation||"coerce");else i=r(i,o,t.typeAnnotation||"assert")}if(!(i instanceof et)&&function e(t){if(t instanceof ft)return e(t.boundExpression);if(t instanceof ct&&"error"===t.name)return!1;if(t instanceof ut)return!1;var r=t instanceof ot||t instanceof nt,n=!0;return t.eachChild((function(t){n=r?n&&e(t):n&&t instanceof et})),!!n&&dt(t)&&ht(t,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(i)){var l=new lt;try{i=new et(i.type,i.evaluate(l))}catch(e){return this.error(e.message),null}}return i}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},mt.prototype.concat=function(e,t,r){var n="number"==typeof e?this.path.concat(e):this.path,a=r?this.scope.concat(r):this.scope;return new mt(this.registry,n,t||null,a,this.errors)},mt.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new De(n,e))},mt.prototype.checkSubtype=function(e,t){var r=We(e,t);return r&&this.error(r),r};var vt=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,a=r;n<a.length;n+=1){var i=a[n],o=i[0],s=i[1];this.labels.push(o),this.outputs.push(s)}};function yt(e,t,r){return e*(1-r)+t*r}vt.parse=function(e,t){if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");var r=t.parse(e[1],1,Oe);if(!r)return null;var n=[],a=null;t.expectedType&&"value"!==t.expectedType.kind&&(a=t.expectedType);for(var i=1;i<e.length;i+=2){var o=1===i?-1/0:e[i],s=e[i+1],l=i,c=i+1;if("number"!=typeof o)return t.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=t.parse(s,c,a);if(!u)return null;a=a||u.type,n.push([o,u])}return new vt(a,r,n)},vt.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var a=t.length;return n>=t[a-1]?r[a-1].evaluate(e):r[gt(t,n)].evaluate(e)},vt.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1)e(r[t])},vt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},vt.prototype.serialize=function(){for(var e=["step",this.input.serialize()],t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var bt=Object.freeze({number:yt,color:function(e,t,r){return new qe(yt(e.r,t.r,r),yt(e.g,t.g,r),yt(e.b,t.b,r),yt(e.a,t.a,r))},array:function(e,t,r){return e.map((function(e,n){return yt(e,t[n],r)}))}}),_t=.95047,xt=1,wt=1.08883,kt=4/29,Mt=6/29,Tt=3*Mt*Mt,Ct=Mt*Mt*Mt,St=Math.PI/180,Lt=180/Math.PI;function At(e){return e>Ct?Math.pow(e,1/3):e/Tt+kt}function Et(e){return e>Mt?e*e*e:Tt*(e-kt)}function Dt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function It(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Pt(e){var t=It(e.r),r=It(e.g),n=It(e.b),a=At((.4124564*t+.3575761*r+.1804375*n)/_t),i=At((.2126729*t+.7151522*r+.072175*n)/xt);return{l:116*i-16,a:500*(a-i),b:200*(i-At((.0193339*t+.119192*r+.9503041*n)/wt)),alpha:e.a}}function Ot(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=xt*Et(t),r=_t*Et(r),n=wt*Et(n),new qe(Dt(3.2404542*r-1.5371385*t-.4985314*n),Dt(-.969266*r+1.8760108*t+.041556*n),Dt(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function Rt(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var Ft={forward:Pt,reverse:Ot,interpolate:function(e,t,r){return{l:yt(e.l,t.l,r),a:yt(e.a,t.a,r),b:yt(e.b,t.b,r),alpha:yt(e.alpha,t.alpha,r)}}},zt={forward:function(e){var t=Pt(e),r=t.l,n=t.a,a=t.b,i=Math.atan2(a,n)*Lt;return{h:i<0?i+360:i,c:Math.sqrt(n*n+a*a),l:r,alpha:e.a}},reverse:function(e){var t=e.h*St,r=e.c;return Ot({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:Rt(e.h,t.h,r),c:yt(e.c,t.c,r),l:yt(e.l,t.l,r),alpha:yt(e.alpha,t.alpha,r)}}},Nt=Object.freeze({lab:Ft,hcl:zt}),jt=function(e,t,r,n,a){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var i=0,o=a;i<o.length;i+=1){var s=o[i],l=s[0],c=s[1];this.labels.push(l),this.outputs.push(c)}};function Bt(e,t,r,n){var a=n-r,i=e-r;return 0===a?0:1===t?i/a:(Math.pow(t,i)-1)/(Math.pow(t,a)-1)}jt.interpolationFactor=function(e,t,n,a){var i=0;if("exponential"===e.name)i=Bt(t,e.base,n,a);else if("linear"===e.name)i=Bt(t,1,n,a);else if("cubic-bezier"===e.name){var o=e.controlPoints;i=new r(o[0],o[1],o[2],o[3]).solve(Bt(t,1,n,a))}return i},jt.parse=function(e,t){var r=e[0],n=e[1],a=e[2],i=e.slice(3);if(!Array.isArray(n)||0===n.length)return t.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var o=n[1];if("number"!=typeof o)return t.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:o}}else{if("cubic-bezier"!==n[0])return t.error("Unknown interpolation type "+String(n[0]),1,0);var s=n.slice(1);if(4!==s.length||s.some((function(e){return"number"!=typeof e||e<0||e>1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(a=t.parse(a,2,Oe)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=ze:t.expectedType&&"value"!==t.expectedType.kind&&(c=t.expectedType);for(var u=0;u<i.length;u+=2){var d=i[u],p=i[u+1],h=u+3,f=u+4;if("number"!=typeof d)return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(l.length&&l[l.length-1][0]>=d)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);var m=t.parse(p,f,c);if(!m)return null;c=c||m.type,l.push([d,m])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new jt(c,r,n,a,l):t.error("Type "+Ve(c)+" is not interpolatable.")},jt.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var a=t.length;if(n>=t[a-1])return r[a-1].evaluate(e);var i=gt(t,n),o=t[i],s=t[i+1],l=jt.interpolationFactor(this.interpolation,n,o,s),c=r[i].evaluate(e),u=r[i+1].evaluate(e);return"interpolate"===this.operator?bt[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?zt.reverse(zt.interpolate(zt.forward(c),zt.forward(u),l)):Ft.reverse(Ft.interpolate(Ft.forward(c),Ft.forward(u),l))},jt.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t<r.length;t+=1)e(r[t])},jt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()})))},jt.prototype.serialize=function(){var e;e="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var t=[this.operator,e,this.input.serialize()],r=0;r<this.labels.length;r++)t.push(this.labels[r],this.outputs[r].serialize());return t};var Yt=function(e,t){this.type=e,this.args=t};Yt.parse=function(e,t){if(e.length<2)return t.error("Expectected at least one argument.");var r=null,n=t.expectedType;n&&"value"!==n.kind&&(r=n);for(var a=[],i=0,o=e.slice(1);i<o.length;i+=1){var s=o[i],l=t.parse(s,1+a.length,r,void 0,{typeAnnotation:"omit"});if(!l)return null;r=r||l.type,a.push(l)}var c=n&&a.some((function(e){return We(n,e.type)}));return new Yt(c?je:r,a)},Yt.prototype.evaluate=function(e){for(var t=null,r=0,n=this.args;r<n.length&&null===(t=n[r].evaluate(e));r+=1);return t},Yt.prototype.eachChild=function(e){this.args.forEach(e)},Yt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.args.map((function(e){return e.possibleOutputs()})))},Yt.prototype.serialize=function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ht=function(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t};Ht.prototype.evaluate=function(e){return this.result.evaluate(e)},Ht.prototype.eachChild=function(e){for(var t=0,r=this.bindings;t<r.length;t+=1)e(r[t][1]);e(this.result)},Ht.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found "+(e.length-1)+" instead.");for(var r=[],n=1;n<e.length-1;n+=2){var a=e[n];if("string"!=typeof a)return t.error("Expected string, but found "+typeof a+" instead.",n);if(/[^a-zA-Z0-9_]/.test(a))return t.error("Variable names must contain only alphanumeric characters or '_'.",n);var i=t.parse(e[n+1],n+1);if(!i)return null;r.push([a,i])}var o=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return o?new Ht(r,o):null},Ht.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},Ht.prototype.serialize=function(){for(var e=["let"],t=0,r=this.bindings;t<r.length;t+=1){var n=r[t],a=n[0],i=n[1];e.push(a,i.serialize())}return e.push(this.result.serialize()),e};var Vt=function(e,t,r){this.type=e,this.index=t,this.input=r};Vt.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Oe),n=t.parse(e[2],2,He(t.expectedType||je));if(!r||!n)return null;var a=n.type;return new Vt(a.itemType,r,n)},Vt.prototype.evaluate=function(e){var t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new tt("Array index out of bounds: "+t+" < 0.");if(t>=r.length)throw new tt("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new tt("Array index must be an integer, but found "+t+" instead.");return r[t]},Vt.prototype.eachChild=function(e){e(this.index),e(this.input)},Vt.prototype.possibleOutputs=function(){return[void 0]},Vt.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ut=function(e,t,r,n,a,i){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=a,this.otherwise=i};Ut.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var a={},i=[],o=2;o<e.length-1;o+=2){var s=e[o],l=e[o+1];Array.isArray(s)||(s=[s]);var c=t.concat(o);if(0===s.length)return c.error("Expected at least one branch label.");for(var u=0,d=s;u<d.length;u+=1){var p=d[u];if("number"!=typeof p&&"string"!=typeof p)return c.error("Branch labels must be numbers or strings.");if("number"==typeof p&&Math.abs(p)>Number.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,$e(p)))return null}else r=$e(p);if(void 0!==a[String(p)])return c.error("Branch labels must be unique.");a[String(p)]=i.length}var h=t.parse(l,o,n);if(!h)return null;n=n||h.type,i.push(h)}var f=t.parse(e[1],1,je);if(!f)return null;var m=t.parse(e[e.length-1],e.length-1,n);return m?"value"!==f.type.kind&&t.concat(1).checkSubtype(r,f.type)?null:new Ut(r,n,f,a,i,m):null},Ut.prototype.evaluate=function(e){var t=this.input.evaluate(e);return($e(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Ut.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Ut.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.outputs.map((function(e){return e.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Ut.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},a=0,i=Object.keys(this.cases).sort();a<i.length;a+=1){var o=i[a];void 0===(d=n[this.cases[o]])?(n[this.cases[o]]=r.length,r.push([this.cases[o],[o]])):r[d][1].push(o)}for(var s=function(t){return"number"===e.inputType.kind?Number(t):t},l=0,c=r;l<c.length;l+=1){var u=c[l],d=u[0],p=u[1];1===p.length?t.push(s(p[0])):t.push(p.map(s)),t.push(this.outputs[outputIndex$1].serialize())}return t.push(this.otherwise.serialize()),t};var Wt=function(e,t,r){this.type=e,this.branches=t,this.otherwise=r};function Gt(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function qt(e,t,r,n){return 0===n.compare(t,r)}function Kt(e,t,r){var n="=="!==e&&"!="!==e;return function(){function a(e,t,r){this.type=Fe,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return a.parse=function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var r=e[0],i=t.parse(e[1],1,je);if(!i)return null;if(!Gt(r,i.type))return t.concat(1).error('"'+r+"\" comparisons are not supported for type '"+Ve(i.type)+"'.");var o=t.parse(e[2],2,je);if(!o)return null;if(!Gt(r,o.type))return t.concat(2).error('"'+r+"\" comparisons are not supported for type '"+Ve(o.type)+"'.");if(i.type.kind!==o.type.kind&&"value"!==i.type.kind&&"value"!==o.type.kind)return t.error("Cannot compare types '"+Ve(i.type)+"' and '"+Ve(o.type)+"'.");n&&("value"===i.type.kind&&"value"!==o.type.kind?i=new nt(o.type,[i]):"value"!==i.type.kind&&"value"===o.type.kind&&(o=new nt(i.type,[o])));var s=null;if(4===e.length){if("string"!==i.type.kind&&"string"!==o.type.kind&&"value"!==i.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,Be)))return null}return new a(i,o,s)},a.prototype.evaluate=function(a){var i=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(n&&this.hasUntypedArgument){var s=$e(i),l=$e(o);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new tt('Expected arguments for "'+e+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var c=$e(i),u=$e(o);if("string"!==c.kind||"string"!==u.kind)return t(a,i,o)}return this.collator?r(a,i,o,this.collator.evaluate(a)):t(a,i,o)},a.prototype.eachChild=function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)},a.prototype.possibleOutputs=function(){return[!0,!1]},a.prototype.serialize=function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t},a}()}Wt.parse=function(e,t){if(e.length<4)return t.error("Expected at least 3 arguments, but found only "+(e.length-1)+".");if(e.length%2!=0)return t.error("Expected an odd number of arguments.");var r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);for(var n=[],a=1;a<e.length-1;a+=2){var i=t.parse(e[a],a,Fe);if(!i)return null;var o=t.parse(e[a+1],a+1,r);if(!o)return null;n.push([i,o]),r=r||o.type}var s=t.parse(e[e.length-1],e.length-1,r);return s?new Wt(r,n,s):null},Wt.prototype.evaluate=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var n=r[t],a=n[0],i=n[1];if(a.evaluate(e))return i.evaluate(e)}return this.otherwise.evaluate(e)},Wt.prototype.eachChild=function(e){for(var t=0,r=this.branches;t<r.length;t+=1){var n=r[t],a=n[0],i=n[1];e(a),e(i)}e(this.otherwise)},Wt.prototype.possibleOutputs=function(){var e;return(e=[]).concat.apply(e,this.branches.map((function(e){return e[0],e[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Wt.prototype.serialize=function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Xt=Kt("==",(function(e,t,r){return t===r}),qt),Zt=Kt("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!qt(0,t,r,n)})),Jt=Kt("<",(function(e,t,r){return t<r}),(function(e,t,r,n){return n.compare(t,r)<0})),$t=Kt(">",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),Qt=Kt("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),er=Kt(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0})),tr=function(e,t,r,n,a){this.type=Re,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=a};tr.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,Oe);if(!r)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var a=null;if(n.locale&&!(a=t.parse(n.locale,1,Re)))return null;var i=null;if(n.currency&&!(i=t.parse(n.currency,1,Re)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=t.parse(n["min-fraction-digits"],1,Oe)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,Oe))?null:new tr(r,a,i,o,s)},tr.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},tr.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},tr.prototype.possibleOutputs=function(){return[void 0]},tr.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var rr=function(e){this.type=Oe,this.input=e};rr.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+Ve(r.type)+" instead."):new rr(r):null},rr.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new tt("Expected value to be of type string or array, but found "+Ve($e(t))+" instead.")},rr.prototype.eachChild=function(e){e(this.input)},rr.prototype.possibleOutputs=function(){return[void 0]},rr.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var nr={"==":Xt,"!=":Zt,">":$t,"<":Jt,">=":er,"<=":Qt,array:nt,at:Vt,boolean:nt,case:Wt,coalesce:Yt,collator:ut,format:at,interpolate:jt,"interpolate-hcl":jt,"interpolate-lab":jt,length:rr,let:Ht,literal:et,match:Ut,number:nt,"number-format":tr,object:nt,step:vt,string:nt,"to-boolean":ot,"to-color":ot,"to-number":ot,"to-string":ot,var:ft};function ar(e,t){var r=t[0],n=t[1],a=t[2],i=t[3];r=r.evaluate(e),n=n.evaluate(e),a=a.evaluate(e);var o=i?i.evaluate(e):1,s=Je(r,n,a,o);if(s)throw new tt(s);return new qe(r/255*o,n/255*o,a/255*o,o)}function ir(e,t){return e in t}function or(e,t){var r=t[e];return void 0===r?null:r}function sr(e){return{type:e}}function lr(e){return{result:"success",value:e}}function cr(e){return{result:"error",value:e}}function ur(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function dr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function pr(e){return!!e.expression&&e.expression.interpolated}function hr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function fr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function mr(e){return e}function gr(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function vr(e,t,r,n,a){return gr(typeof r===a?n[r]:void 0,e.default,t.default)}function yr(e,t,r){if("number"!==hr(r))return gr(e.default,t.default);var n=e.stops.length;if(1===n)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];var a=gt(e.stops.map((function(e){return e[0]})),r);return e.stops[a][1]}function br(e,t,r){var n=void 0!==e.base?e.base:1;if("number"!==hr(r))return gr(e.default,t.default);var a=e.stops.length;if(1===a)return e.stops[0][1];if(r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[a-1][0])return e.stops[a-1][1];var i=gt(e.stops.map((function(e){return e[0]})),r),o=function(e,t,r,n){var a=n-r,i=e-r;return 0===a?0:1===t?i/a:(Math.pow(t,i)-1)/(Math.pow(t,a)-1)}(r,n,e.stops[i][0],e.stops[i+1][0]),s=e.stops[i][1],l=e.stops[i+1][1],c=bt[t.type]||mr;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=Nt[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=s.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==n)return c(r,n,o)}}:c(s,l,o)}function _r(e,t,r){return"color"===t.type?r=qe.parse(r):"formatted"===t.type?r=Ze.fromString(r.toString()):hr(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0),gr(r,e.default,t.default)}ct.register(nr,{error:[{kind:"error"},[Re],function(e,t){var r=t[0];throw new tt(r.evaluate(e))}],typeof:[Re,[je],function(e,t){return Ve($e(t[0].evaluate(e)))}],"to-rgba":[He(Oe,4),[ze],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[ze,[Oe,Oe,Oe],ar],rgba:[ze,[Oe,Oe,Oe,Oe],ar],has:{type:Fe,overloads:[[[Re],function(e,t){return ir(t[0].evaluate(e),e.properties())}],[[Re,Ne],function(e,t){var r=t[0],n=t[1];return ir(r.evaluate(e),n.evaluate(e))}]]},get:{type:je,overloads:[[[Re],function(e,t){return or(t[0].evaluate(e),e.properties())}],[[Re,Ne],function(e,t){var r=t[0],n=t[1];return or(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[je,[Re],function(e,t){return or(t[0].evaluate(e),e.featureState||{})}],properties:[Ne,[],function(e){return e.properties()}],"geometry-type":[Re,[],function(e){return e.geometryType()}],id:[je,[],function(e){return e.id()}],zoom:[Oe,[],function(e){return e.globals.zoom}],"heatmap-density":[Oe,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[Oe,[],function(e){return e.globals.lineProgress||0}],accumulated:[je,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[Oe,sr(Oe),function(e,t){for(var r=0,n=0,a=t;n<a.length;n+=1)r+=a[n].evaluate(e);return r}],"*":[Oe,sr(Oe),function(e,t){for(var r=1,n=0,a=t;n<a.length;n+=1)r*=a[n].evaluate(e);return r}],"-":{type:Oe,overloads:[[[Oe,Oe],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)-n.evaluate(e)}],[[Oe],function(e,t){return-t[0].evaluate(e)}]]},"/":[Oe,[Oe,Oe],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)/n.evaluate(e)}],"%":[Oe,[Oe,Oe],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)%n.evaluate(e)}],ln2:[Oe,[],function(){return Math.LN2}],pi:[Oe,[],function(){return Math.PI}],e:[Oe,[],function(){return Math.E}],"^":[Oe,[Oe,Oe],function(e,t){var r=t[0],n=t[1];return Math.pow(r.evaluate(e),n.evaluate(e))}],sqrt:[Oe,[Oe],function(e,t){var r=t[0];return Math.sqrt(r.evaluate(e))}],log10:[Oe,[Oe],function(e,t){var r=t[0];return Math.log(r.evaluate(e))/Math.LN10}],ln:[Oe,[Oe],function(e,t){var r=t[0];return Math.log(r.evaluate(e))}],log2:[Oe,[Oe],function(e,t){var r=t[0];return Math.log(r.evaluate(e))/Math.LN2}],sin:[Oe,[Oe],function(e,t){var r=t[0];return Math.sin(r.evaluate(e))}],cos:[Oe,[Oe],function(e,t){var r=t[0];return Math.cos(r.evaluate(e))}],tan:[Oe,[Oe],function(e,t){var r=t[0];return Math.tan(r.evaluate(e))}],asin:[Oe,[Oe],function(e,t){var r=t[0];return Math.asin(r.evaluate(e))}],acos:[Oe,[Oe],function(e,t){var r=t[0];return Math.acos(r.evaluate(e))}],atan:[Oe,[Oe],function(e,t){var r=t[0];return Math.atan(r.evaluate(e))}],min:[Oe,sr(Oe),function(e,t){return Math.min.apply(Math,t.map((function(t){return t.evaluate(e)})))}],max:[Oe,sr(Oe),function(e,t){return Math.max.apply(Math,t.map((function(t){return t.evaluate(e)})))}],abs:[Oe,[Oe],function(e,t){var r=t[0];return Math.abs(r.evaluate(e))}],round:[Oe,[Oe],function(e,t){var r=t[0].evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[Oe,[Oe],function(e,t){var r=t[0];return Math.floor(r.evaluate(e))}],ceil:[Oe,[Oe],function(e,t){var r=t[0];return Math.ceil(r.evaluate(e))}],"filter-==":[Fe,[Re,je],function(e,t){var r=t[0],n=t[1];return e.properties()[r.value]===n.value}],"filter-id-==":[Fe,[je],function(e,t){var r=t[0];return e.id()===r.value}],"filter-type-==":[Fe,[Re],function(e,t){var r=t[0];return e.geometryType()===r.value}],"filter-<":[Fe,[Re,je],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a<i}],"filter-id-<":[Fe,[je],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n<a}],"filter->":[Fe,[Re,je],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a>i}],"filter-id->":[Fe,[je],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n>a}],"filter-<=":[Fe,[Re,je],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a<=i}],"filter-id-<=":[Fe,[je],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n<=a}],"filter->=":[Fe,[Re,je],function(e,t){var r=t[0],n=t[1],a=e.properties()[r.value],i=n.value;return typeof a==typeof i&&a>=i}],"filter-id->=":[Fe,[je],function(e,t){var r=t[0],n=e.id(),a=r.value;return typeof n==typeof a&&n>=a}],"filter-has":[Fe,[je],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[Fe,[],function(e){return null!==e.id()}],"filter-type-in":[Fe,[He(Re)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[Fe,[He(je)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[Fe,[Re,He(je)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[Fe,[Re,He(je)],function(e,t){var r=t[0],n=t[1];return function(e,t,r,n){for(;r<=n;){var a=r+n>>1;if(t[a]===e)return!0;t[a]>e?n=a-1:r=a+1}return!1}(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Fe,overloads:[[[Fe,Fe],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[sr(Fe),function(e,t){for(var r=0,n=t;r<n.length;r+=1)if(!n[r].evaluate(e))return!1;return!0}]]},any:{type:Fe,overloads:[[[Fe,Fe],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)||n.evaluate(e)}],[sr(Fe),function(e,t){for(var r=0,n=t;r<n.length;r+=1)if(n[r].evaluate(e))return!0;return!1}]]},"!":[Fe,[Fe],function(e,t){return!t[0].evaluate(e)}],"is-supported-script":[Fe,[Re],function(e,t){var r=t[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(r.evaluate(e))}],upcase:[Re,[Re],function(e,t){return t[0].evaluate(e).toUpperCase()}],downcase:[Re,[Re],function(e,t){return t[0].evaluate(e).toLowerCase()}],concat:[Re,sr(je),function(e,t){return t.map((function(t){return Qe(t.evaluate(e))})).join("")}],"resolved-locale":[Re,[Be],function(e,t){return t[0].evaluate(e).resolvedLocale()}]});var xr=function(e,t){this.expression=e,this._warningHistory={},this._evaluator=new lt,this._defaultValue=t?function(e){return"color"===e.type&&fr(e.default)?new qe(0,0,0,0):"color"===e.type?qe.parse(e.default)||null:void 0===e.default?null:e.default}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null};function wr(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in nr}function kr(e,t){var r=new mt(nr,[],t?function(e){var t={color:ze,string:Re,number:Oe,enum:Re,boolean:Fe,formatted:Ye};return"array"===e.type?He(t[e.value]||je,e.length):t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?lr(new xr(n,t)):cr(r.errors)}xr.prototype.evaluateWithoutErrorHandling=function(e,t,r,n){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.formattedSection=n,this.expression.evaluate(this._evaluator)},xr.prototype.evaluate=function(e,t,r,n){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.formattedSection=n||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new tt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}};var Mr=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!pt(t.expression)};Mr.prototype.evaluateWithoutErrorHandling=function(e,t,r,n){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n)},Mr.prototype.evaluate=function(e,t,r,n){return this._styleExpression.evaluate(e,t,r,n)};var Tr=function(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!pt(t.expression),this.interpolationType=n};function Cr(e,t){if("error"===(e=kr(e,t)).result)return e;var r=e.value.expression,n=dt(r);if(!n&&!ur(t))return cr([new De("","data expressions not supported")]);var a=ht(r,["zoom"]);if(!a&&!dr(t))return cr([new De("","zoom expressions not supported")]);var i=function e(t){var r=null;if(t instanceof Ht)r=e(t.result);else if(t instanceof Yt)for(var n=0,a=t.args;n<a.length;n+=1){var i=a[n];if(r=e(i))break}else(t instanceof vt||t instanceof jt)&&t.input instanceof ct&&"zoom"===t.input.name&&(r=t);return r instanceof De?r:(t.eachChild((function(t){var n=e(t);n instanceof De?r=n:!r&&n?r=new De("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&n&&r!==n&&(r=new De("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),r)}(r);if(!i&&!a)return cr([new De("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(i instanceof De)return cr([i]);if(i instanceof jt&&!pr(t))return cr([new De("",'"interpolate" expressions cannot be used with this property')]);if(!i)return lr(new Mr(n?"constant":"source",e.value));var o=i instanceof jt?i.interpolation:void 0;return lr(new Tr(n?"camera":"composite",e.value,i.labels,o))}Tr.prototype.evaluateWithoutErrorHandling=function(e,t,r,n){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n)},Tr.prototype.evaluate=function(e,t,r,n){return this._styleExpression.evaluate(e,t,r,n)},Tr.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?jt.interpolationFactor(this.interpolationType,e,t,r):0};var Sr=function(e,t){this._parameters=e,this._specification=t,Se(this,function e(t,r){var n,a,i,o="color"===r.type,s=t.stops&&"object"==typeof t.stops[0][0],l=s||void 0!==t.property,c=s||!l,u=t.type||(pr(r)?"exponential":"interval");if(o&&((t=Se({},t)).stops&&(t.stops=t.stops.map((function(e){return[e[0],qe.parse(e[1])]}))),t.default?t.default=qe.parse(t.default):t.default=qe.parse(r.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!Nt[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===u)n=br;else if("interval"===u)n=yr;else if("categorical"===u){n=vr,a=Object.create(null);for(var d=0,p=t.stops;d<p.length;d+=1){var h=p[d];a[h[0]]=h[1]}i=typeof t.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');n=_r}if(s){for(var f={},m=[],g=0;g<t.stops.length;g++){var v=t.stops[g],y=v[0].zoom;void 0===f[y]&&(f[y]={zoom:y,type:t.type,property:t.property,default:t.default,stops:[]},m.push(y)),f[y].stops.push([v[0].value,v[1]])}for(var b=[],_=0,x=m;_<x.length;_+=1){var w=x[_];b.push([f[w].zoom,e(f[w],r)])}var k={name:"linear"};return{kind:"composite",interpolationType:k,interpolationFactor:jt.interpolationFactor.bind(void 0,k),zoomStops:b.map((function(e){return e[0]})),evaluate:function(e,n){var a=e.zoom;return br({stops:b,base:t.base},r,a).evaluate(a,n)}}}if(c){var M="exponential"===u?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:M,interpolationFactor:jt.interpolationFactor.bind(void 0,M),zoomStops:t.stops.map((function(e){return e[0]})),evaluate:function(e){var o=e.zoom;return n(t,r,o,a,i)}}}return{kind:"source",evaluate:function(e,o){var s=o&&o.properties?o.properties[t.property]:void 0;return void 0===s?gr(t.default,r.default):n(t,r,s,a,i)}}}(this._parameters,this._specification))};function Lr(e){var t=e.key,r=e.value,n=e.valueSpec||{},a=e.objectElementValidators||{},i=e.style,o=e.styleSpec,s=[],l=hr(r);if("object"!==l)return[new Te(t,r,"object expected, "+l+" found")];for(var c in r){var u=c.split(".")[0],d=n[u]||n["*"],p=void 0;if(a[u])p=a[u];else if(n[u])p=$r;else if(a["*"])p=a["*"];else{if(!n["*"]){s.push(new Te(t,r[c],'unknown property "'+c+'"'));continue}p=$r}s=s.concat(p({key:(t?t+".":t)+c,value:r[c],valueSpec:d,style:i,styleSpec:o,object:r,objectKey:c},r))}for(var h in n)a[h]||n[h].required&&void 0===n[h].default&&void 0===r[h]&&s.push(new Te(t,r,'missing required property "'+h+'"'));return s}function Ar(e){var t=e.value,r=e.valueSpec,n=e.style,a=e.styleSpec,i=e.key,o=e.arrayElementValidator||$r;if("array"!==hr(t))return[new Te(i,t,"array expected, "+hr(t)+" found")];if(r.length&&t.length!==r.length)return[new Te(i,t,"array length "+r.length+" expected, length "+t.length+" found")];if(r["min-length"]&&t.length<r["min-length"])return[new Te(i,t,"array length at least "+r["min-length"]+" expected, length "+t.length+" found")];var s={type:r.value,values:r.values};a.$version<7&&(s.function=r.function),"object"===hr(r.value)&&(s=r.value);for(var l=[],c=0;c<t.length;c++)l=l.concat(o({array:t,arrayIndex:c,value:t[c],valueSpec:s,style:n,styleSpec:a,key:i+"["+c+"]"}));return l}function Er(e){var t=e.key,r=e.value,n=e.valueSpec,a=hr(r);return"number"!==a?[new Te(t,r,"number expected, "+a+" found")]:"minimum"in n&&r<n.minimum?[new Te(t,r,r+" is less than the minimum value "+n.minimum)]:"maximum"in n&&r>n.maximum?[new Te(t,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Dr(e){var t,r,n,a=e.valueSpec,i=Ae(e.value.type),o={},s="categorical"!==i&&void 0===e.value.property,l=!s,c="array"===hr(e.value.stops)&&"array"===hr(e.value.stops[0])&&"object"===hr(e.value.stops[0][0]),u=Lr({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===i)return[new Te(e.key,e.value,'identity function may not have a "stops" property')];var t=[],r=e.value;return t=t.concat(Ar({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===hr(r)&&0===r.length&&t.push(new Te(e.key,r,"array must have at least one stop")),t},default:function(e){return $r({key:e.key,value:e.value,valueSpec:a,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===i&&s&&u.push(new Te(e.key,e.value,'missing required property "property"')),"identity"===i||e.value.stops||u.push(new Te(e.key,e.value,'missing required property "stops"')),"exponential"===i&&e.valueSpec.expression&&!pr(e.valueSpec)&&u.push(new Te(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!ur(e.valueSpec)?u.push(new Te(e.key,e.value,"property functions not supported")):s&&!dr(e.valueSpec)&&u.push(new Te(e.key,e.value,"zoom functions not supported"))),"categorical"!==i&&!c||void 0!==e.value.property||u.push(new Te(e.key,e.value,'"property" property is required')),u;function d(e){var t=[],i=e.value,s=e.key;if("array"!==hr(i))return[new Te(s,i,"array expected, "+hr(i)+" found")];if(2!==i.length)return[new Te(s,i,"array length 2 expected, length "+i.length+" found")];if(c){if("object"!==hr(i[0]))return[new Te(s,i,"object expected, "+hr(i[0])+" found")];if(void 0===i[0].zoom)return[new Te(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new Te(s,i,"object stop key must have value")];if(n&&n>Ae(i[0].zoom))return[new Te(s,i[0].zoom,"stop zoom values must appear in ascending order")];Ae(i[0].zoom)!==n&&(n=Ae(i[0].zoom),r=void 0,o={}),t=t.concat(Lr({key:s+"[0]",value:i[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Er,value:p}}))}else t=t.concat(p({key:s+"[0]",value:i[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},i));return wr(Ee(i[1]))?t.concat([new Te(s+"[1]",i[1],"expressions are not allowed in function stops.")]):t.concat($r({key:s+"[1]",value:i[1],valueSpec:a,style:e.style,styleSpec:e.styleSpec}))}function p(e,n){var s=hr(e.value),l=Ae(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new Te(e.key,c,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Te(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==i){var u="number expected, "+s+" found";return ur(a)&&void 0===i&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Te(e.key,c,u)]}return"categorical"!==i||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==i&&"number"===s&&void 0!==r&&l<r?[new Te(e.key,c,"stop domain values must appear in ascending order")]:(r=l,"categorical"===i&&l in o?[new Te(e.key,c,"stop domain values must be unique")]:(o[l]=!0,[])):[new Te(e.key,c,"integer expected, found "+l)]}}function Ir(e){var t=("property"===e.expressionContext?Cr:kr)(Ee(e.value),e.valueSpec);if("error"===t.result)return t.value.map((function(t){return new Te(""+e.key+t.key,e.value,t.message)}));var r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&-1!==r.possibleOutputs().indexOf(void 0))return[new Te(e.key,e.value,'Invalid data expression for "'+e.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===e.expressionContext&&"layout"===e.propertyType&&!pt(r))return[new Te(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!pt(r))return[new Te(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!ht(r,["zoom","feature-state"]))return[new Te(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!dt(r))return[new Te(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Pr(e){var t=e.key,r=e.value,n=e.valueSpec,a=[];return Array.isArray(n.values)?-1===n.values.indexOf(Ae(r))&&a.push(new Te(t,r,"expected one of ["+n.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(n.values).indexOf(Ae(r))&&a.push(new Te(t,r,"expected one of ["+Object.keys(n.values).join(", ")+"], "+JSON.stringify(r)+" found")),a}function Or(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);t<r.length;t+=1){var n=r[t];if(!Or(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}Sr.deserialize=function(e){return new Sr(e._parameters,e._specification)},Sr.serialize=function(e){return{_parameters:e._parameters,_specification:e._specification}};var Rr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fr(e){if(null==e)return function(){return!0};Or(e)||(e=Nr(e));var t=kr(e,Rr);if("error"===t.result)throw new Error(t.value.map((function(e){return e.key+": "+e.message})).join(", "));return function(e,r){return t.value.evaluate(e,r)}}function zr(e,t){return e<t?-1:e>t?1:0}function Nr(e){if(!e)return!0;var t,r=e[0];return e.length<=1?"any"!==r:"=="===r?jr(e[1],e[2],"=="):"!="===r?Hr(jr(e[1],e[2],"==")):"<"===r||">"===r||"<="===r||">="===r?jr(e[1],e[2],r):"any"===r?(t=e.slice(1),["any"].concat(t.map(Nr))):"all"===r?["all"].concat(e.slice(1).map(Nr)):"none"===r?["all"].concat(e.slice(1).map(Nr).map(Hr)):"in"===r?Br(e[1],e.slice(2)):"!in"===r?Hr(Br(e[1],e.slice(2))):"has"===r?Yr(e[1]):"!has"!==r||Hr(Yr(e[1]))}function jr(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function Br(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(zr)]]:["filter-in-small",e,["literal",t]]}}function Yr(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Hr(e){return["!",e]}function Vr(e){return Or(Ee(e.value))?Ir(Se({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){var r=t.value,n=t.key;if("array"!==hr(r))return[new Te(n,r,"array expected, "+hr(r)+" found")];var a,i=t.styleSpec,o=[];if(r.length<1)return[new Te(n,r,"filter array must have at least 1 element")];switch(o=o.concat(Pr({key:n+"[0]",value:r[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Ae(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Ae(r[1])&&o.push(new Te(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&o.push(new Te(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(a=hr(r[1]))&&o.push(new Te(n+"[1]",r[1],"string expected, "+a+" found"));for(var s=2;s<r.length;s++)a=hr(r[s]),"$type"===Ae(r[1])?o=o.concat(Pr({key:n+"["+s+"]",value:r[s],valueSpec:i.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==a&&"number"!==a&&"boolean"!==a&&o.push(new Te(n+"["+s+"]",r[s],"string, number, or boolean expected, "+a+" found"));break;case"any":case"all":case"none":for(var l=1;l<r.length;l++)o=o.concat(e({key:n+"["+l+"]",value:r[l],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":a=hr(r[1]),2!==r.length?o.push(new Te(n,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==a&&o.push(new Te(n+"[1]",r[1],"string expected, "+a+" found"))}return o}(e)}function Ur(e,t){var r=e.key,n=e.style,a=e.styleSpec,i=e.value,o=e.objectKey,s=a[t+"_"+e.layerType];if(!s)return[];var l=o.match(/^(.*)-transition$/);if("paint"===t&&l&&s[l[1]]&&s[l[1]].transition)return $r({key:r,value:i,valueSpec:a.transition,style:n,styleSpec:a});var c,u=e.valueSpec||s[o];if(!u)return[new Te(r,i,'unknown property "'+o+'"')];if("string"===hr(i)&&ur(u)&&!u.tokens&&(c=/^{([^}]+)}$/.exec(i)))return[new Te(r,i,'"'+o+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(c[1])+" }`.")];var d=[];return"symbol"===e.layerType&&("text-field"===o&&n&&!n.glyphs&&d.push(new Te(r,i,'use of "text-field" requires a style "glyphs" property')),"text-font"===o&&fr(Ee(i))&&"identity"===Ae(i.type)&&d.push(new Te(r,i,'"text-font" does not support identity functions'))),d.concat($r({key:e.key,value:i,valueSpec:u,style:n,styleSpec:a,expressionContext:"property",propertyType:t,propertyKey:o}))}function Wr(e){return Ur(e,"paint")}function Gr(e){return Ur(e,"layout")}function qr(e){var t=[],r=e.value,n=e.key,a=e.style,i=e.styleSpec;r.type||r.ref||t.push(new Te(n,r,'either "type" or "ref" is required'));var o,s=Ae(r.type),l=Ae(r.ref);if(r.id)for(var c=Ae(r.id),u=0;u<e.arrayIndex;u++){var d=a.layers[u];Ae(d.id)===c&&t.push(new Te(n,r.id,'duplicate layer id "'+r.id+'", previously used at line '+d.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(e){e in r&&t.push(new Te(n,r[e],'"'+e+'" is prohibited for ref layers'))})),a.layers.forEach((function(e){Ae(e.id)===l&&(o=e)})),o?o.ref?t.push(new Te(n,r.ref,"ref cannot reference another ref layer")):s=Ae(o.type):t.push(new Te(n,r.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(r.source){var p=a.sources&&a.sources[r.source],h=p&&Ae(p.type);p?"vector"===h&&"raster"===s?t.push(new Te(n,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===h&&"raster"!==s?t.push(new Te(n,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==h||r["source-layer"]?"raster-dem"===h&&"hillshade"!==s?t.push(new Te(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===h&&p.lineMetrics||t.push(new Te(n,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):t.push(new Te(n,r,'layer "'+r.id+'" must specify a "source-layer"')):t.push(new Te(n,r.source,'source "'+r.source+'" not found'))}else t.push(new Te(n,r,'missing required property "source"'));return t=t.concat(Lr({key:n,value:r,valueSpec:i.layer,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return $r({key:n+".type",value:r.type,valueSpec:i.layer.type,style:e.style,styleSpec:e.styleSpec,object:r,objectKey:"type"})},filter:Vr,layout:function(e){return Lr({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(e){return Gr(Se({layerType:s},e))}}})},paint:function(e){return Lr({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{"*":function(e){return Wr(Se({layerType:s},e))}}})}}}))}function Kr(e){var t=e.value,r=e.key,n=e.styleSpec,a=e.style;if(!t.type)return[new Te(r,t,'"type" is required')];var i,o=Ae(t.type);switch(o){case"vector":case"raster":case"raster-dem":return Lr({key:r,value:t,valueSpec:n["source_"+o.replace("-","_")],style:e.style,styleSpec:n});case"geojson":if(i=Lr({key:r,value:t,valueSpec:n.source_geojson,style:a,styleSpec:n}),t.cluster)for(var s in t.clusterProperties){var l=t.clusterProperties[s],c=l[0],u=l[1],d="string"==typeof c?[c,["accumulated"],["get",s]]:c;i.push.apply(i,Ir({key:r+"."+s+".map",value:u,expressionContext:"cluster-map"})),i.push.apply(i,Ir({key:r+"."+s+".reduce",value:d,expressionContext:"cluster-reduce"}))}return i;case"video":return Lr({key:r,value:t,valueSpec:n.source_video,style:a,styleSpec:n});case"image":return Lr({key:r,value:t,valueSpec:n.source_image,style:a,styleSpec:n});case"canvas":return[new Te(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Pr({key:r+".type",value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:a,styleSpec:n})}}function Xr(e){var t=e.value,r=e.styleSpec,n=r.light,a=e.style,i=[],o=hr(t);if(void 0===t)return i;if("object"!==o)return i.concat([new Te("light",t,"object expected, "+o+" found")]);for(var s in t){var l=s.match(/^(.*)-transition$/);i=l&&n[l[1]]&&n[l[1]].transition?i.concat($r({key:s,value:t[s],valueSpec:r.transition,style:a,styleSpec:r})):n[s]?i.concat($r({key:s,value:t[s],valueSpec:n[s],style:a,styleSpec:r})):i.concat([new Te(s,t[s],'unknown property "'+s+'"')])}return i}function Zr(e){var t=e.value,r=e.key,n=hr(t);return"string"!==n?[new Te(r,t,"string expected, "+n+" found")]:[]}var Jr={"*":function(){return[]},array:Ar,boolean:function(e){var t=e.value,r=e.key,n=hr(t);return"boolean"!==n?[new Te(r,t,"boolean expected, "+n+" found")]:[]},number:Er,color:function(e){var t=e.key,r=e.value,n=hr(r);return"string"!==n?[new Te(t,r,"color expected, "+n+" found")]:null===Ge(r)?[new Te(t,r,'color expected, "'+r+'" found')]:[]},constants:Ce,enum:Pr,filter:Vr,function:Dr,layer:qr,object:Lr,source:Kr,light:Xr,string:Zr,formatted:function(e){return 0===Zr(e).length?[]:Ir(e)}};function $r(e){var t=e.value,r=e.valueSpec,n=e.styleSpec;return r.expression&&fr(Ae(t))?Dr(e):r.expression&&wr(Ee(t))?Ir(e):r.type&&Jr[r.type]?Jr[r.type](e):Lr(Se({},e,{valueSpec:r.type?n[r.type]:r}))}function Qr(e){var t=e.value,r=e.key,n=Zr(e);return n.length?n:(-1===t.indexOf("{fontstack}")&&n.push(new Te(r,t,'"glyphs" url must include a "{fontstack}" token')),-1===t.indexOf("{range}")&&n.push(new Te(r,t,'"glyphs" url must include a "{range}" token')),n)}function en(e,t){t=t||Me;var r=[];return r=r.concat($r({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:Qr,"*":function(){return[]}}})),e.constants&&(r=r.concat(Ce({key:"constants",value:e.constants,style:e,styleSpec:t}))),tn(r)}function tn(e){return[].concat(e).sort((function(e,t){return e.line-t.line}))}function rn(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return tn(e.apply(this,t))}}en.source=rn(Kr),en.light=rn(Xr),en.layer=rn(qr),en.filter=rn(Vr),en.paintProperty=rn(Wr),en.layoutProperty=rn(Gr);var nn=en,an=nn.light,on=nn.paintProperty,sn=nn.layoutProperty;function ln(e,t){var r=!1;if(t&&t.length)for(var n=0,a=t;n<a.length;n+=1){var i=a[n];e.fire(new we(new Error(i.message))),r=!0}return r}var cn=dn,un=3;function dn(e,t,r){var n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;var a=new Int32Array(this.arrayBuffer);e=a[0],t=a[1],r=a[2],this.d=t+2*r;for(var i=0;i<this.d*this.d;i++){var o=a[un+i],s=a[un+i+1];n.push(o===s?null:a.subarray(o,s))}var l=a[un+n.length],c=a[un+n.length+1];this.keys=a.subarray(l,c),this.bboxes=a.subarray(c),this.insert=this._insertReadonly}else{this.d=t+2*r;for(var u=0;u<this.d*this.d;u++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=r,this.scale=t/e,this.uid=0;var d=r/t*e;this.min=-d,this.max=e+d}dn.prototype.insert=function(e,t,r,n,a){this._forEachCell(t,r,n,a,this._insertCell,this.uid++),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(a)},dn.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},dn.prototype._insertCell=function(e,t,r,n,a,i){this.cells[a].push(i)},dn.prototype.query=function(e,t,r,n,a){var i=this.min,o=this.max;if(e<=i&&t<=i&&o<=r&&o<=n&&!a)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(e,t,r,n,this._queryCell,s,{},a),s},dn.prototype._queryCell=function(e,t,r,n,a,i,o,s){var l=this.cells[a];if(null!==l)for(var c=this.keys,u=this.bboxes,d=0;d<l.length;d++){var p=l[d];if(void 0===o[p]){var h=4*p;(s?s(u[h+0],u[h+1],u[h+2],u[h+3]):e<=u[h+2]&&t<=u[h+3]&&r>=u[h+0]&&n>=u[h+1])?(o[p]=!0,i.push(c[p])):o[p]=!1}}},dn.prototype._forEachCell=function(e,t,r,n,a,i,o,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),d=this._convertToCellCoord(n),p=l;p<=u;p++)for(var h=c;h<=d;h++){var f=this.d*h+p;if((!s||s(this._convertFromCellCoord(p),this._convertFromCellCoord(h),this._convertFromCellCoord(p+1),this._convertFromCellCoord(h+1)))&&a.call(this,e,t,r,n,f,i,o,s))return}},dn.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},dn.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=un+this.cells.length+1+1,r=0,n=0;n<this.cells.length;n++)r+=this.cells[n].length;var a=new Int32Array(t+r+this.keys.length+this.bboxes.length);a[0]=this.extent,a[1]=this.n,a[2]=this.padding;for(var i=t,o=0;o<e.length;o++){var s=e[o];a[un+o]=i,a.set(s,i),i+=s.length}return a[un+e.length]=i,a.set(this.keys,i),i+=this.keys.length,a[un+e.length+1]=i,a.set(this.bboxes,i),i+=this.bboxes.length,a.buffer};var pn=self.ImageData,hn={};function fn(e,t,r){void 0===r&&(r={}),Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),hn[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}for(var mn in fn("Object",Object),cn.serialize=function(e,t){var r=e.toArrayBuffer();return t&&t.push(r),{buffer:r}},cn.deserialize=function(e){return new cn(e.buffer)},fn("Grid",cn),fn("Color",qe),fn("Error",Error),fn("StylePropertyFunction",Sr),fn("StyleExpression",xr,{omit:["_evaluator"]}),fn("ZoomDependentExpression",Tr),fn("ZoomConstantExpression",Mr),fn("CompoundExpression",ct,{omit:["_evaluate"]}),nr)nr[mn]._classRegistryKey||fn("Expression_"+mn,nr[mn]);function gn(e,t){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp)return e;if(e instanceof ArrayBuffer)return t&&t.push(e),e;if(ArrayBuffer.isView(e)){var r=e;return t&&t.push(r.buffer),r}if(e instanceof pn)return t&&t.push(e.data.buffer),e;if(Array.isArray(e)){for(var n=[],a=0,i=e;a<i.length;a+=1){var o=i[a];n.push(gn(o,t))}return n}if("object"==typeof e){var s=e.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var c=s.serialize?s.serialize(e,t):{};if(!s.serialize){for(var u in e)if(e.hasOwnProperty(u)&&!(hn[l].omit.indexOf(u)>=0)){var d=e[u];c[u]=hn[l].shallow.indexOf(u)>=0?d:gn(d,t)}e instanceof Error&&(c.message=e.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof e)}function vn(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof pn)return e;if(Array.isArray(e))return e.map(vn);if("object"==typeof e){var t=e.$name||"Object",r=hn[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var n=Object.create(r.prototype),a=0,i=Object.keys(e);a<i.length;a+=1){var o=i[a];if("$name"!==o){var s=e[o];n[o]=hn[t].shallow.indexOf(o)>=0?s:vn(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)}var yn=function(){this.first=!0};yn.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=r,!0))};var bn={"Latin-1 Supplement":function(e){return e>=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function _n(e){for(var t=0,r=e;t<r.length;t+=1)if(wn(r[t].charCodeAt(0)))return!0;return!1}function xn(e){return!(bn.Arabic(e)||bn["Arabic Supplement"](e)||bn["Arabic Extended-A"](e)||bn["Arabic Presentation Forms-A"](e)||bn["Arabic Presentation Forms-B"](e))}function wn(e){return!(746!==e&&747!==e&&(e<4352||!(bn["Bopomofo Extended"](e)||bn.Bopomofo(e)||bn["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||bn["CJK Compatibility Ideographs"](e)||bn["CJK Compatibility"](e)||bn["CJK Radicals Supplement"](e)||bn["CJK Strokes"](e)||!(!bn["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||bn["CJK Unified Ideographs Extension A"](e)||bn["CJK Unified Ideographs"](e)||bn["Enclosed CJK Letters and Months"](e)||bn["Hangul Compatibility Jamo"](e)||bn["Hangul Jamo Extended-A"](e)||bn["Hangul Jamo Extended-B"](e)||bn["Hangul Jamo"](e)||bn["Hangul Syllables"](e)||bn.Hiragana(e)||bn["Ideographic Description Characters"](e)||bn.Kanbun(e)||bn["Kangxi Radicals"](e)||bn["Katakana Phonetic Extensions"](e)||bn.Katakana(e)&&12540!==e||!(!bn["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!bn["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||bn["Unified Canadian Aboriginal Syllabics"](e)||bn["Unified Canadian Aboriginal Syllabics Extended"](e)||bn["Vertical Forms"](e)||bn["Yijing Hexagram Symbols"](e)||bn["Yi Syllables"](e)||bn["Yi Radicals"](e))))}function kn(e){return!(wn(e)||function(e){return!!(bn["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||bn["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||bn["Letterlike Symbols"](e)||bn["Number Forms"](e)||bn["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||bn["Control Pictures"](e)&&9251!==e||bn["Optical Character Recognition"](e)||bn["Enclosed Alphanumerics"](e)||bn["Geometric Shapes"](e)||bn["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||bn["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||bn["CJK Symbols and Punctuation"](e)||bn.Katakana(e)||bn["Private Use Area"](e)||bn["CJK Compatibility Forms"](e)||bn["Small Form Variants"](e)||bn["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function Mn(e,t){return!(!t&&(e>=1424&&e<=2303||bn["Arabic Presentation Forms-A"](e)||bn["Arabic Presentation Forms-B"](e))||e>=2304&&e<=3583||e>=3840&&e<=4255||bn.Khmer(e))}var Tn,Cn=!1,Sn=null,Ln=!1,An=new ke,En={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ln||null!=En.applyArabicShaping}},Dn=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new yn,this.transition={})};Dn.prototype.isSupportedScript=function(e){return function(e,t){for(var r=0,n=e;r<n.length;r+=1)if(!Mn(n[r].charCodeAt(0),t))return!1;return!0}(e,En.isLoaded())},Dn.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Dn.prototype.getCrossfadeParameters=function(){var e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var In=function(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(fr(e))return new Sr(e,t);if(wr(e)){var r=Cr(e,t);if("error"===r.result)throw new Error(r.value.map((function(e){return e.key+": "+e.message})).join(", "));return r.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=qe.parse(e)),{kind:"constant",evaluate:function(){return n}}}(void 0===t?e.specification.default:t,e.specification)};In.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},In.prototype.possiblyEvaluate=function(e){return this.property.possiblyEvaluate(this,e)};var Pn=function(e){this.property=e,this.value=new In(e,void 0)};Pn.prototype.transitioned=function(e,t){return new Rn(this.property,this.value,t,d({},e.transition,this.transition),e.now)},Pn.prototype.untransitioned=function(){return new Rn(this.property,this.value,null,{},0)};var On=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};On.prototype.getValue=function(e){return _(this._values[e].value.value)},On.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Pn(this._values[e].property)),this._values[e].value=new In(this._values[e].property,null===t?void 0:_(t))},On.prototype.getTransition=function(e){return _(this._values[e].transition)},On.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Pn(this._values[e].property)),this._values[e].transition=_(t)||void 0},On.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);t<r.length;t+=1){var n=r[t],a=this.getValue(n);void 0!==a&&(e[n]=a);var i=this.getTransition(n);void 0!==i&&(e[n+"-transition"]=i)}return e},On.prototype.transitioned=function(e,t){for(var r=new Fn(this._properties),n=0,a=Object.keys(this._values);n<a.length;n+=1){var i=a[n];r._values[i]=this._values[i].transitioned(e,t._values[i])}return r},On.prototype.untransitioned=function(){for(var e=new Fn(this._properties),t=0,r=Object.keys(this._values);t<r.length;t+=1){var n=r[t];e._values[n]=this._values[n].untransitioned()}return e};var Rn=function(e,t,r,n,a){this.property=e,this.value=t,this.begin=a+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=r)};Rn.prototype.possiblyEvaluate=function(e){var t=e.now||0,r=this.value.possiblyEvaluate(e),n=this.prior;if(n){if(t>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(t<this.begin)return n.possiblyEvaluate(e);var a=(t-this.begin)/(this.end-this.begin);return this.property.interpolate(n.possiblyEvaluate(e),r,function(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}(a))}return r};var Fn=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};Fn.prototype.possiblyEvaluate=function(e){for(var t=new jn(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var a=n[r];t._values[a]=this._values[a].possiblyEvaluate(e)}return t},Fn.prototype.hasTransition=function(){for(var e=0,t=Object.keys(this._values);e<t.length;e+=1){var r=t[e];if(this._values[r].prior)return!0}return!1};var zn=function(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)};zn.prototype.getValue=function(e){return _(this._values[e].value)},zn.prototype.setValue=function(e,t){this._values[e]=new In(this._values[e].property,null===t?void 0:_(t))},zn.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);t<r.length;t+=1){var n=r[t],a=this.getValue(n);void 0!==a&&(e[n]=a)}return e},zn.prototype.possiblyEvaluate=function(e){for(var t=new jn(this._properties),r=0,n=Object.keys(this._values);r<n.length;r+=1){var a=n[r];t._values[a]=this._values[a].possiblyEvaluate(e)}return t};var Nn=function(e,t,r){this.property=e,this.value=t,this.parameters=r};Nn.prototype.isConstant=function(){return"constant"===this.value.kind},Nn.prototype.constantOr=function(e){return"constant"===this.value.kind?this.value.value:e},Nn.prototype.evaluate=function(e,t){return this.property.evaluate(this.value,this.parameters,e,t)};var jn=function(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)};jn.prototype.get=function(e){return this._values[e]};var Bn=function(e){this.specification=e};Bn.prototype.possiblyEvaluate=function(e,t){return e.expression.evaluate(t)},Bn.prototype.interpolate=function(e,t,r){var n=bt[this.specification.type];return n?n(e,t,r):e};var Yn=function(e,t){this.specification=e,this.overrides=t};Yn.prototype.possiblyEvaluate=function(e,t){return"constant"===e.expression.kind||"camera"===e.expression.kind?new Nn(this,{kind:"constant",value:e.expression.evaluate(t)},t):new Nn(this,e.expression,t)},Yn.prototype.interpolate=function(e,t,r){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new Nn(this,{kind:"constant",value:void 0},e.parameters);var n=bt[this.specification.type];return n?new Nn(this,{kind:"constant",value:n(e.value.value,t.value.value,r)},e.parameters):e},Yn.prototype.evaluate=function(e,t,r,n){return"constant"===e.kind?e.value:e.evaluate(t,r,n)};var Hn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(e,t){if(void 0===e.value)return new Nn(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){var r=e.expression.evaluate(t),n=this._calculate(r,r,r,t);return new Nn(this,{kind:"constant",value:n},t)}if("camera"===e.expression.kind){var a=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new Nn(this,{kind:"constant",value:a},t)}return new Nn(this,e.expression,t)},t.prototype.evaluate=function(e,t,r,n){if("source"===e.kind){var a=e.evaluate(t,r,n);return this._calculate(a,a,a,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},r,n),e.evaluate({zoom:Math.floor(t.zoom)},r,n),e.evaluate({zoom:Math.floor(t.zoom)+1},r,n),t):e.value},t.prototype._calculate=function(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},t.prototype.interpolate=function(e){return e},t}(Yn),Vn=function(e){this.specification=e};Vn.prototype.possiblyEvaluate=function(e,t){if(void 0!==e.value){if("constant"===e.expression.kind){var r=e.expression.evaluate(t);return this._calculate(r,r,r,t)}return this._calculate(e.expression.evaluate(new Dn(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Dn(Math.floor(t.zoom),t)),e.expression.evaluate(new Dn(Math.floor(t.zoom+1),t)),t)}},Vn.prototype._calculate=function(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},Vn.prototype.interpolate=function(e){return e};var Un=function(e){this.specification=e};Un.prototype.possiblyEvaluate=function(e,t){return!!e.expression.evaluate(t)},Un.prototype.interpolate=function(){return!1};var Wn=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new In(r,void 0),a=this.defaultTransitionablePropertyValues[t]=new Pn(r);this.defaultTransitioningPropertyValues[t]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}};fn("DataDrivenProperty",Yn),fn("DataConstantProperty",Bn),fn("CrossFadedDataDrivenProperty",Hn),fn("CrossFadedProperty",Vn),fn("ColorRampProperty",Un);var Gn=function(e){function t(t,r){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter=function(){return!0},"custom"!==t.type&&(t=t,this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),r.layout&&(this._unevaluatedLayout=new zn(r.layout)),r.paint)){for(var n in this._transitionablePaint=new On(r.paint),t.paint)this.setPaintProperty(n,t.paint[n],{validate:!1});for(var a in t.layout)this.setLayoutProperty(a,t.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,r){if(void 0===r&&(r={}),null!=t){var n="layers."+this.id+".layout."+e;if(this._validate(sn,n,e,t,r))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return v(e,"-transition")?this._transitionablePaint.getTransition(e.slice(0,-"-transition".length)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,r){if(void 0===r&&(r={}),null!=t){var n="layers."+this.id+".paint."+e;if(this._validate(on,n,e,t,r))return!1}if(v(e,"-transition"))return this._transitionablePaint.setTransition(e.slice(0,-"-transition".length),t||void 0),!1;var a=this._transitionablePaint._values[e],i="cross-faded-data-driven"===a.property.specification["property-type"],o=a.value.isDataDriven(),s=a.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||i||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,r){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e<this.minzoom)||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e)),this.paint=this._transitioningPaint.possiblyEvaluate(e)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),b(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,r,n,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&&ln(this,e.call(nn,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:Me,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof Nn&&ur(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(ke),qn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Kn=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Xn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Zn(e,t){void 0===t&&(t=1);var r=0,n=0;return{members:e.map((function(e){var a,i=(a=e.type,qn[a].BYTES_PER_ELEMENT),o=r=Jn(r,Math.max(t,i)),s=e.components||1;return n=Math.max(n,i),r+=i*s,{name:e.name,type:e.type,components:s,offset:o}})),size:Jn(r,Math.max(n,t)),alignment:t}}function Jn(e,t){return Math.ceil(e/t)*t}Xn.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Xn.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Xn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Xn.prototype.clear=function(){this.length=0},Xn.prototype.resize=function(e){this.reserve(e),this.length=e},Xn.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},Xn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var $n=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e},t}(Xn);$n.prototype.bytesPerElement=4,fn("StructArrayLayout2i4",$n);var Qn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,a){var i=4*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,this.int16[i+3]=a,e},t}(Xn);Qn.prototype.bytesPerElement=8,fn("StructArrayLayout4i8",Qn);var ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,a,i)},t.prototype.emplace=function(e,t,r,n,a,i,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=a,this.int16[s+4]=i,this.int16[s+5]=o,e},t}(Xn);ea.prototype.bytesPerElement=12,fn("StructArrayLayout2i4i12",ea);var ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,a,i)},t.prototype.emplace=function(e,t,r,n,a,i,o){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=a,this.uint8[l+6]=i,this.uint8[l+7]=o,e},t}(Xn);ta.prototype.bytesPerElement=8,fn("StructArrayLayout2i4ub8",ta);var ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,n,a,i,o,s)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l){var c=8*e;return this.uint16[c+0]=t,this.uint16[c+1]=r,this.uint16[c+2]=n,this.uint16[c+3]=a,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,e},t}(Xn);ra.prototype.bytesPerElement=16,fn("StructArrayLayout8ui16",ra);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s){var l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,n,a,i,o,s)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l){var c=8*e;return this.int16[c+0]=t,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=a,this.uint16[c+4]=i,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,e},t}(Xn);na.prototype.bytesPerElement=16,fn("StructArrayLayout4i4ui16",na);var aa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var a=3*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,e},t}(Xn);aa.prototype.bytesPerElement=12,fn("StructArrayLayout3f12",aa);var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint32[r+0]=t,e},t}(Xn);ia.prototype.bytesPerElement=4,fn("StructArrayLayout1ul4",ia);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s,l,c,u){var d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,n,a,i,o,s,l,c,u)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l,c,u,d){var p=12*e,h=6*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=a,this.int16[p+4]=i,this.int16[p+5]=o,this.uint32[h+3]=s,this.uint16[p+8]=l,this.uint16[p+9]=c,this.int16[p+10]=u,this.int16[p+11]=d,e},t}(Xn);oa.prototype.bytesPerElement=24,fn("StructArrayLayout6i1ul2ui2i24",oa);var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,a,i)},t.prototype.emplace=function(e,t,r,n,a,i,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=a,this.int16[s+4]=i,this.int16[s+5]=o,e},t}(Xn);sa.prototype.bytesPerElement=12,fn("StructArrayLayout2i2i2i12",sa);var la=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,a){var i=12*e,o=3*e;return this.uint8[i+0]=t,this.uint8[i+1]=r,this.float32[o+1]=n,this.float32[o+2]=a,e},t}(Xn);la.prototype.bytesPerElement=12,fn("StructArrayLayout2ub2f12",la);var ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s,l,c,u,d,p,h,f,m){var g=this.length;return this.resize(g+1),this.emplace(g,e,t,r,n,a,i,o,s,l,c,u,d,p,h,f,m)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l,c,u,d,p,h,f,m,g){var v=22*e,y=11*e,b=44*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=a,this.uint32[y+2]=i,this.uint32[y+3]=o,this.uint32[y+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[y+7]=d,this.float32[y+8]=p,this.uint8[b+36]=h,this.uint8[b+37]=f,this.uint8[b+38]=m,this.uint32[y+10]=g,e},t}(Xn);ca.prototype.bytesPerElement=44,fn("StructArrayLayout2i2ui3ul3ui2f3ub1ul44",ca);var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,a,i,o,s,l,c,u,d,p,h,f,m,g,v,y,b){var _=this.length;return this.resize(_+1),this.emplace(_,e,t,r,n,a,i,o,s,l,c,u,d,p,h,f,m,g,v,y,b)},t.prototype.emplace=function(e,t,r,n,a,i,o,s,l,c,u,d,p,h,f,m,g,v,y,b,_){var x=24*e,w=12*e;return this.int16[x+0]=t,this.int16[x+1]=r,this.int16[x+2]=n,this.int16[x+3]=a,this.int16[x+4]=i,this.int16[x+5]=o,this.uint16[x+6]=s,this.uint16[x+7]=l,this.uint16[x+8]=c,this.uint16[x+9]=u,this.uint16[x+10]=d,this.uint16[x+11]=p,this.uint16[x+12]=h,this.uint16[x+13]=f,this.uint16[x+14]=m,this.uint16[x+15]=g,this.uint16[x+16]=v,this.uint32[w+9]=y,this.float32[w+10]=b,this.float32[w+11]=_,e},t}(Xn);ua.prototype.bytesPerElement=48,fn("StructArrayLayout6i11ui1ul2f48",ua);var da=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.float32[r+0]=t,e},t}(Xn);da.prototype.bytesPerElement=4,fn("StructArrayLayout1f4",da);var pa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var a=3*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,e},t}(Xn);pa.prototype.bytesPerElement=6,fn("StructArrayLayout3i6",pa);var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var a=2*e,i=4*e;return this.uint32[a+0]=t,this.uint16[i+2]=r,this.uint16[i+3]=n,e},t}(Xn);ha.prototype.bytesPerElement=8,fn("StructArrayLayout1ul2ui8",ha);var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var a=3*e;return this.uint16[a+0]=t,this.uint16[a+1]=r,this.uint16[a+2]=n,e},t}(Xn);fa.prototype.bytesPerElement=6,fn("StructArrayLayout3ui6",fa);var ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e},t}(Xn);ma.prototype.bytesPerElement=4,fn("StructArrayLayout2ui4",ma);var ga=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint16[r+0]=t,e},t}(Xn);ga.prototype.bytesPerElement=2,fn("StructArrayLayout1ui2",ga);var va=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e},t}(Xn);va.prototype.bytesPerElement=8,fn("StructArrayLayout2f8",va);var ya=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,a){var i=4*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,this.float32[i+3]=a,e},t}(Xn);ya.prototype.bytesPerElement=16,fn("StructArrayLayout4f16",ya);var ba=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(e){this._structArray.int16[this._pos2+0]=e},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(e){this._structArray.int16[this._pos2+1]=e},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(e){this._structArray.int16[this._pos2+2]=e},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(e){this._structArray.int16[this._pos2+3]=e},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(e){this._structArray.int16[this._pos2+4]=e},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(e){this._structArray.int16[this._pos2+5]=e},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(e){this._structArray.int16[this._pos2+10]=e},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+11]=e},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t}(Kn);ba.prototype.size=24;var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ba(this,e)},t}(oa);fn("CollisionBoxArray",_a);var xa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(e){this._structArray.uint16[this._pos2+3]=e},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(e){this._structArray.uint32[this._pos4+2]=e},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(e){this._structArray.uint32[this._pos4+3]=e},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(e){this._structArray.uint32[this._pos4+4]=e},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(e){this._structArray.uint16[this._pos2+10]=e},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(e){this._structArray.uint16[this._pos2+11]=e},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(e){this._structArray.uint16[this._pos2+12]=e},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(e){this._structArray.float32[this._pos4+7]=e},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(e){this._structArray.float32[this._pos4+8]=e},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(e){this._structArray.uint8[this._pos1+36]=e},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},Object.defineProperties(t.prototype,r),t}(Kn);xa.prototype.size=44;var wa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new xa(this,e)},t}(ca);fn("PlacedSymbolArray",wa);var ka=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},radialTextOffset:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(e){this._structArray.int16[this._pos2+0]=e},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(e){this._structArray.int16[this._pos2+1]=e},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.rightJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+2]=e},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.centerJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+3]=e},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.leftJustifiedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+4]=e},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.verticalPlacedTextSymbolIndex.set=function(e){this._structArray.int16[this._pos2+5]=e},r.key.get=function(){return this._structArray.uint16[this._pos2+6]},r.key.set=function(e){this._structArray.uint16[this._pos2+6]=e},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.textBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+7]=e},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+8]=e},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.verticalTextBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+9]=e},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+10]=e},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.iconBoxStartIndex.set=function(e){this._structArray.uint16[this._pos2+11]=e},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxEndIndex.set=function(e){this._structArray.uint16[this._pos2+12]=e},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.featureIndex.set=function(e){this._structArray.uint16[this._pos2+13]=e},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+14]},r.numHorizontalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+14]=e},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+15]},r.numVerticalGlyphVertices.set=function(e){this._structArray.uint16[this._pos2+15]=e},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+16]},r.numIconVertices.set=function(e){this._structArray.uint16[this._pos2+16]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+9]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+9]=e},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+10]},r.textBoxScale.set=function(e){this._structArray.float32[this._pos4+10]=e},r.radialTextOffset.get=function(){return this._structArray.float32[this._pos4+11]},r.radialTextOffset.set=function(e){this._structArray.float32[this._pos4+11]=e},Object.defineProperties(t.prototype,r),t}(Kn);ka.prototype.size=48;var Ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new ka(this,e)},t}(ua);fn("SymbolInstanceArray",Ma);var Ta=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(e){this._structArray.float32[this._pos4+0]=e},Object.defineProperties(t.prototype,r),t}(Kn);Ta.prototype.size=4;var Ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t.prototype.get=function(e){return new Ta(this,e)},t}(da);fn("GlyphOffsetArray",Ca);var Sa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(e){this._structArray.int16[this._pos2+0]=e},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(e){this._structArray.int16[this._pos2+1]=e},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(e){this._structArray.int16[this._pos2+2]=e},Object.defineProperties(t.prototype,r),t}(Kn);Sa.prototype.size=6;var La=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t.prototype.get=function(e){return new Sa(this,e)},t}(pa);fn("SymbolLineVertexArray",La);var Aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(e){this._structArray.uint32[this._pos4+0]=e},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(e){this._structArray.uint16[this._pos2+2]=e},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(e){this._structArray.uint16[this._pos2+3]=e},Object.defineProperties(t.prototype,r),t}(Kn);Aa.prototype.size=8;var Ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Aa(this,e)},t}(ha);fn("FeatureIndexArray",Ea);var Da=Zn([{name:"a_pos",components:2,type:"Int16"}],4).members,Ia=function(e){void 0===e&&(e=[]),this.segments=e};function Pa(e,t){return 256*(e=c(Math.floor(e),0,255))+c(Math.floor(t),0,255)}Ia.prototype.prepareSegment=function(e,t,r,n){var a=this.segments[this.segments.length-1];return e>Ia.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Ia.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!a||a.vertexLength+e>Ia.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n)&&(a={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(a.sortKey=n),this.segments.push(a)),a},Ia.prototype.get=function(){return this.segments},Ia.prototype.destroy=function(){for(var e=0,t=this.segments;e<t.length;e+=1){var r=t[e];for(var n in r.vaos)r.vaos[n].destroy()}},Ia.simpleSegment=function(e,t,r,n){return new Ia([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])},Ia.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fn("SegmentVector",Ia);var Oa=function(){this.ids=[],this.positions=[],this.indexed=!1};function Ra(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}Oa.prototype.add=function(e,t,r,n){this.ids.push(e),this.positions.push(t,r,n)},Oa.prototype.getPositions=function(e){for(var t=0,r=this.ids.length-1;t<r;){var n=t+r>>1;this.ids[n]>=e?r=n:t=n+1}for(var a=[];this.ids[t]===e;){var i=this.positions[3*t],o=this.positions[3*t+1],s=this.positions[3*t+2];a.push({index:i,start:o,end:s}),t++}return a},Oa.serialize=function(e,t){var r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return function e(t,r,n,a){if(!(n>=a)){for(var i=t[n+a>>1],o=n-1,s=a+1;;){do{o++}while(t[o]<i);do{s--}while(t[s]>i);if(o>=s)break;Ra(t,o,s),Ra(r,3*o,3*s),Ra(r,3*o+1,3*s+1),Ra(r,3*o+2,3*s+2)}e(t,r,n,s),e(t,r,s+1,a)}}(r,n,0,r.length-1),t.push(r.buffer,n.buffer),{ids:r,positions:n}},Oa.deserialize=function(e){var t=new Oa;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t},fn("FeaturePositionMap",Oa);var Fa=function(e,t){this.gl=e.gl,this.location=t},za=function(e){function t(t,r){e.call(this,t,r),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))},t}(Fa),Na=function(e){function t(t,r){e.call(this,t,r),this.current=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))},t}(Fa),ja=function(e){function t(t,r){e.call(this,t,r),this.current=[0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))},t}(Fa),Ba=function(e){function t(t,r){e.call(this,t,r),this.current=[0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))},t}(Fa),Ya=function(e){function t(t,r){e.call(this,t,r),this.current=[0,0,0,0]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]&&e[3]===this.current[3]||(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))},t}(Fa),Ha=function(e){function t(t,r){e.call(this,t,r),this.current=qe.transparent}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){e.r===this.current.r&&e.g===this.current.g&&e.b===this.current.b&&e.a===this.current.a||(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))},t}(Fa),Va=new Float32Array(16),Ua=function(e){function t(t,r){e.call(this,t,r),this.current=Va}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(var t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}},t}(Fa);function Wa(e){return[Pa(255*e.r,255*e.g),Pa(255*e.b,255*e.a)]}var Ga=function(e,t,r){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=r,this.maxValue=-1/0};Ga.prototype.defines=function(){return this.names.map((function(e){return"#define HAS_UNIFORM_u_"+e}))},Ga.prototype.setConstantPatternPositions=function(){},Ga.prototype.populatePaintArray=function(){},Ga.prototype.updatePaintArray=function(){},Ga.prototype.upload=function(){},Ga.prototype.destroy=function(){},Ga.prototype.setUniforms=function(e,t,r,n){t.set(n.constantOr(this.value))},Ga.prototype.getBinding=function(e,t){return"color"===this.type?new Ha(e,t):new Na(e,t)},Ga.serialize=function(e){var t=e.value,r=e.names,n=e.type;return{value:gn(t),names:r,type:n}},Ga.deserialize=function(e){var t=e.value,r=e.names,n=e.type;return new Ga(vn(t),r,n)};var qa=function(e,t,r){this.value=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e})),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};qa.prototype.defines=function(){return this.names.map((function(e){return"#define HAS_UNIFORM_u_"+e}))},qa.prototype.populatePaintArray=function(){},qa.prototype.updatePaintArray=function(){},qa.prototype.upload=function(){},qa.prototype.destroy=function(){},qa.prototype.setConstantPatternPositions=function(e,t){this.patternPositions.patternTo=e.tlbr,this.patternPositions.patternFrom=t.tlbr},qa.prototype.setUniforms=function(e,t,r,n,a){var i=this.patternPositions;"u_pattern_to"===a&&i.patternTo&&t.set(i.patternTo),"u_pattern_from"===a&&i.patternFrom&&t.set(i.patternFrom)},qa.prototype.getBinding=function(e,t){return new Ya(e,t)};var Ka=function(e,t,r,n){this.expression=e,this.names=t,this.type=r,this.uniformNames=this.names.map((function(e){return"a_"+e})),this.maxValue=-1/0,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===r?2:1,offset:0}})),this.paintVertexArray=new n};Ka.prototype.defines=function(){return[]},Ka.prototype.setConstantPatternPositions=function(){},Ka.prototype.populatePaintArray=function(e,t,r,n){var a=this.paintVertexArray,i=a.length;a.reserve(e);var o=this.expression.evaluate(new Dn(0),t,{},n);if("color"===this.type)for(var s=Wa(o),l=i;l<e;l++)a.emplaceBack(s[0],s[1]);else{for(var c=i;c<e;c++)a.emplaceBack(o);this.maxValue=Math.max(this.maxValue,o)}},Ka.prototype.updatePaintArray=function(e,t,r,n){var a=this.paintVertexArray,i=this.expression.evaluate({zoom:0},r,n);if("color"===this.type)for(var o=Wa(i),s=e;s<t;s++)a.emplace(s,o[0],o[1]);else{for(var l=e;l<t;l++)a.emplace(l,i);this.maxValue=Math.max(this.maxValue,i)}},Ka.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Ka.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Ka.prototype.setUniforms=function(e,t){t.set(0)},Ka.prototype.getBinding=function(e,t){return new Na(e,t)};var Xa=function(e,t,r,n,a,i){this.expression=e,this.names=t,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.type=r,this.useIntegerZoom=n,this.zoom=a,this.maxValue=-1/0;var o=i;this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Float32",components:"color"===r?4:2,offset:0}})),this.paintVertexArray=new o};Xa.prototype.defines=function(){return[]},Xa.prototype.setConstantPatternPositions=function(){},Xa.prototype.populatePaintArray=function(e,t,r,n){var a=this.paintVertexArray,i=a.length;a.reserve(e);var o=this.expression.evaluate(new Dn(this.zoom),t,{},n),s=this.expression.evaluate(new Dn(this.zoom+1),t,{},n);if("color"===this.type)for(var l=Wa(o),c=Wa(s),u=i;u<e;u++)a.emplaceBack(l[0],l[1],c[0],c[1]);else{for(var d=i;d<e;d++)a.emplaceBack(o,s);this.maxValue=Math.max(this.maxValue,o,s)}},Xa.prototype.updatePaintArray=function(e,t,r,n){var a=this.paintVertexArray,i=this.expression.evaluate({zoom:this.zoom},r,n),o=this.expression.evaluate({zoom:this.zoom+1},r,n);if("color"===this.type)for(var s=Wa(i),l=Wa(o),c=e;c<t;c++)a.emplace(c,s[0],s[1],l[0],l[1]);else{for(var u=e;u<t;u++)a.emplace(u,i,o);this.maxValue=Math.max(this.maxValue,i,o)}},Xa.prototype.upload=function(e){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Xa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Xa.prototype.interpolationFactor=function(e){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(e),this.zoom,this.zoom+1):this.expression.interpolationFactor(e,this.zoom,this.zoom+1)},Xa.prototype.setUniforms=function(e,t,r){t.set(this.interpolationFactor(r.zoom))},Xa.prototype.getBinding=function(e,t){return new Na(e,t)};var Za=function(e,t,r,n,a,i,o){this.expression=e,this.names=t,this.type=r,this.uniformNames=this.names.map((function(e){return"u_"+e+"_t"})),this.useIntegerZoom=n,this.zoom=a,this.maxValue=-1/0,this.layerId=o,this.paintVertexAttributes=t.map((function(e){return{name:"a_"+e,type:"Uint16",components:4,offset:0}})),this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i};Za.prototype.defines=function(){return[]},Za.prototype.setConstantPatternPositions=function(){},Za.prototype.populatePaintArray=function(e,t,r){var n=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,i=this.layerId,o=n.length;if(n.reserve(e),a.reserve(e),r&&t.patterns&&t.patterns[i]){var s=t.patterns[i],l=s.min,c=s.mid,u=s.max,d=r[l],p=r[c],h=r[u];if(!d||!p||!h)return;for(var f=o;f<e;f++)n.emplaceBack(p.tl[0],p.tl[1],p.br[0],p.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1]),a.emplaceBack(p.tl[0],p.tl[1],p.br[0],p.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1])}},Za.prototype.updatePaintArray=function(e,t,r,n,a){var i=this.zoomInPaintVertexArray,o=this.zoomOutPaintVertexArray,s=this.layerId;if(a&&r.patterns&&r.patterns[s]){var l=r.patterns[s],c=l.min,u=l.mid,d=l.max,p=a[c],h=a[u],f=a[d];if(!p||!h||!f)return;for(var m=e;m<t;m++)i.emplace(m,h.tl[0],h.tl[1],h.br[0],h.br[1],p.tl[0],p.tl[1],p.br[0],p.br[1]),o.emplace(m,h.tl[0],h.tl[1],h.br[0],h.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},Za.prototype.upload=function(e){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Za.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},Za.prototype.setUniforms=function(e,t){t.set(0)},Za.prototype.getBinding=function(e,t){return new Na(e,t)};var Ja=function(){this.binders={},this.cacheKey="",this._buffers=[],this._featureMap=new Oa,this._bufferOffset=0};Ja.createDynamic=function(e,t,r){var n=new Ja,a=[];for(var i in e.paint._values)if(r(i)){var o=e.paint.get(i);if(o instanceof Nn&&ur(o.property.specification)){var s=Qa(i,e.type),l=o.property.specification.type,c=o.property.useIntegerZoom;if("cross-faded"===o.property.specification["property-type"]||"cross-faded-data-driven"===o.property.specification["property-type"])if("constant"===o.value.kind)n.binders[i]=new qa(o.value.value,s,l),a.push("/u_"+i);else{var u=ei(i,l,"source");n.binders[i]=new Za(o.value,s,l,c,t,u,e.id),a.push("/a_"+i)}else if("constant"===o.value.kind)n.binders[i]=new Ga(o.value.value,s,l),a.push("/u_"+i);else if("source"===o.value.kind){var d=ei(i,l,"source");n.binders[i]=new Ka(o.value,s,l,d),a.push("/a_"+i)}else{var p=ei(i,l,"composite");n.binders[i]=new Xa(o.value,s,l,c,t,p),a.push("/z_"+i)}}}return n.cacheKey=a.sort().join(""),n},Ja.prototype.populatePaintArrays=function(e,t,r,n,a){for(var i in this.binders)this.binders[i].populatePaintArray(e,t,n,a);void 0!==t.id&&this._featureMap.add(+t.id,r,this._bufferOffset,e),this._bufferOffset=e},Ja.prototype.setConstantPatternPositions=function(e,t){for(var r in this.binders)this.binders[r].setConstantPatternPositions(e,t)},Ja.prototype.updatePaintArrays=function(e,t,r,n){var a=!1;for(var i in e)for(var o=0,s=this._featureMap.getPositions(+i);o<s.length;o+=1){var l=s[o],c=t.feature(l.index);for(var u in this.binders){var d=this.binders[u];if(!(d instanceof Ga||d instanceof qa)&&!0===d.expression.isStateDependent){var p=r.paint.get(u);d.expression=p.value,d.updatePaintArray(l.start,l.end,c,e[i],n),a=!0}}}return a},Ja.prototype.defines=function(){var e=[];for(var t in this.binders)e.push.apply(e,this.binders[t].defines());return e},Ja.prototype.getPaintVertexBuffers=function(){return this._buffers},Ja.prototype.getUniforms=function(e,t){var r=[];for(var n in this.binders)for(var a=this.binders[n],i=0,o=a.uniformNames;i<o.length;i+=1){var s=o[i];if(t[s]){var l=a.getBinding(e,t[s]);r.push({name:s,property:n,binding:l})}}return r},Ja.prototype.setUniforms=function(e,t,r,n){for(var a=0,i=t;a<i.length;a+=1){var o=i[a],s=o.name,l=o.property,c=o.binding;this.binders[l].setUniforms(e,c,n,r.get(l),s)}},Ja.prototype.updatePatternPaintBuffers=function(e){var t=[];for(var r in this.binders){var n=this.binders[r];if(n instanceof Za){var a=2===e.fromScale?n.zoomInPaintVertexBuffer:n.zoomOutPaintVertexBuffer;a&&t.push(a)}else(n instanceof Ka||n instanceof Xa)&&n.paintVertexBuffer&&t.push(n.paintVertexBuffer)}this._buffers=t},Ja.prototype.upload=function(e){for(var t in this.binders)this.binders[t].upload(e);var r=[];for(var n in this.binders){var a=this.binders[n];(a instanceof Ka||a instanceof Xa)&&a.paintVertexBuffer&&r.push(a.paintVertexBuffer)}this._buffers=r},Ja.prototype.destroy=function(){for(var e in this.binders)this.binders[e].destroy()};var $a=function(e,t,r,n){void 0===n&&(n=function(){return!0}),this.programConfigurations={};for(var a=0,i=t;a<i.length;a+=1){var o=i[a];this.programConfigurations[o.id]=Ja.createDynamic(o,r,n),this.programConfigurations[o.id].layoutAttributes=e}this.needsUpload=!1};function Qa(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function ei(e,t,r){var n={color:{source:va,composite:ya},number:{source:da,composite:va}},a=function(e){return{"line-pattern":{source:ra,composite:ra},"fill-pattern":{source:ra,composite:ra},"fill-extrusion-pattern":{source:ra,composite:ra}}[e]}(e);return a&&a[r]||n[t][r]}$a.prototype.populatePaintArrays=function(e,t,r,n,a){for(var i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(e,t,r,n,a);this.needsUpload=!0},$a.prototype.updatePaintArrays=function(e,t,r,n){for(var a=0,i=r;a<i.length;a+=1){var o=i[a];this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(e,t,o,n)||this.needsUpload}},$a.prototype.get=function(e){return this.programConfigurations[e]},$a.prototype.upload=function(e){if(this.needsUpload){for(var t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}},$a.prototype.destroy=function(){for(var e in this.programConfigurations)this.programConfigurations[e].destroy()},fn("ConstantBinder",Ga),fn("CrossFadedConstantBinder",qa),fn("SourceExpressionBinder",Ka),fn("CrossFadedCompositeBinder",Za),fn("CompositeExpressionBinder",Xa),fn("ProgramConfiguration",Ja,{omit:["_buffers"]}),fn("ProgramConfigurationSet",$a);var ti=8192,ri={min:-1*Math.pow(2,14),max:Math.pow(2,14)-1};function ni(e){for(var t=ti/e.extent,r=e.loadGeometry(),n=0;n<r.length;n++)for(var a=r[n],i=0;i<a.length;i++){var o=a[i];o.x=Math.round(o.x*t),o.y=Math.round(o.y*t),(o.x<ri.min||o.x>ri.max||o.y<ri.min||o.y>ri.max)&&(w("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=c(o.x,ri.min,ri.max),o.y=c(o.y,ri.min,ri.max))}return r}function ai(e,t,r,n,a){e.emplaceBack(2*t+(n+1)/2,2*r+(a+1)/2)}var ii=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new $n,this.indexArray=new fa,this.segments=new Ia,this.programConfigurations=new $a(Da,e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function oi(e,t){for(var r=0;r<e.length;r++)if(mi(t,e[r]))return!0;for(var n=0;n<t.length;n++)if(mi(e,t[n]))return!0;return!!ui(e,t)}function si(e,t,r){return!!mi(e,t)||!!pi(t,e,r)}function li(e,t){if(1===e.length)return fi(t,e[0]);for(var r=0;r<t.length;r++)for(var n=t[r],a=0;a<n.length;a++)if(mi(e,n[a]))return!0;for(var i=0;i<e.length;i++)if(fi(t,e[i]))return!0;for(var o=0;o<t.length;o++)if(ui(e,t[o]))return!0;return!1}function ci(e,t,r){if(e.length>1){if(ui(e,t))return!0;for(var n=0;n<t.length;n++)if(pi(t[n],e,r))return!0}for(var a=0;a<e.length;a++)if(pi(e[a],t,r))return!0;return!1}function ui(e,t){if(0===e.length||0===t.length)return!1;for(var r=0;r<e.length-1;r++)for(var n=e[r],a=e[r+1],i=0;i<t.length-1;i++)if(di(n,a,t[i],t[i+1]))return!0;return!1}function di(e,t,r,n){return k(e,r,n)!==k(t,r,n)&&k(e,t,r)!==k(e,t,n)}function pi(e,t,r){var n=r*r;if(1===t.length)return e.distSqr(t[0])<n;for(var a=1;a<t.length;a++)if(hi(e,t[a-1],t[a])<n)return!0;return!1}function hi(e,t,r){var n=t.distSqr(r);if(0===n)return e.distSqr(t);var a=((e.x-t.x)*(r.x-t.x)+(e.y-t.y)*(r.y-t.y))/n;return a<0?e.distSqr(t):a>1?e.distSqr(r):e.distSqr(r.sub(t)._mult(a)._add(t))}function fi(e,t){for(var r,n,a,i=!1,o=0;o<e.length;o++)for(var s=0,l=(r=e[o]).length-1;s<r.length;l=s++)n=r[s],a=r[l],n.y>t.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(i=!i);return i}function mi(e,t){for(var r=!1,n=0,a=e.length-1;n<e.length;a=n++){var i=e[n],o=e[a];i.y>t.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(r=!r)}return r}function gi(e,t,r){var n=r[0],a=r[2];if(e.x<n.x&&t.x<n.x||e.x>a.x&&t.x>a.x||e.y<n.y&&t.y<n.y||e.y>a.y&&t.y>a.y)return!1;var i=k(e,t,r[0]);return i!==k(e,t,r[1])||i!==k(e,t,r[2])||i!==k(e,t,r[3])}function vi(e,t,r){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).binders[e].maxValue}function yi(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function bi(e,t,r,n,i){if(!t[0]&&!t[1])return e;var o=a.convert(t)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l<e.length;l++){var c=e[l];s.push(c.sub(o))}return s}ii.prototype.populate=function(e,t){var r=this.layers[0],n=[],a=null;"circle"===r.type&&(a=r.layout.get("circle-sort-key"));for(var i=0,o=e;i<o.length;i+=1){var s=o[i],l=s.feature,c=s.index,u=s.sourceLayerIndex;if(this.layers[0]._featureFilter(new Dn(this.zoom),l)){var d=ni(l),p=a?a.evaluate(l,{}):void 0,h={id:l.id,properties:l.properties,type:l.type,sourceLayerIndex:u,index:c,geometry:d,patterns:{},sortKey:p};n.push(h)}}a&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var f=0,m=n;f<m.length;f+=1){var g=m[f],v=g,y=v.geometry,b=v.index,_=v.sourceLayerIndex,x=e[b].feature;this.addFeature(g,y,b),t.featureIndex.insert(x,y,b,_,this.index)}},ii.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},ii.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ii.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ii.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Da),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},ii.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ii.prototype.addFeature=function(e,t,r){for(var n=0,a=t;n<a.length;n+=1)for(var i=0,o=a[n];i<o.length;i+=1){var s=o[i],l=s.x,c=s.y;if(!(l<0||l>=ti||c<0||c>=ti)){var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),d=u.vertexLength;ai(this.layoutVertexArray,l,c,-1,-1),ai(this.layoutVertexArray,l,c,1,-1),ai(this.layoutVertexArray,l,c,1,1),ai(this.layoutVertexArray,l,c,-1,1),this.indexArray.emplaceBack(d,d+1,d+2),this.indexArray.emplaceBack(d,d+3,d+2),u.vertexLength+=4,u.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{})},fn("CircleBucket",ii,{omit:["layers"]});var _i,xi=new Wn({"circle-sort-key":new Yn(Me.layout_circle["circle-sort-key"])}),wi={paint:new Wn({"circle-radius":new Yn(Me.paint_circle["circle-radius"]),"circle-color":new Yn(Me.paint_circle["circle-color"]),"circle-blur":new Yn(Me.paint_circle["circle-blur"]),"circle-opacity":new Yn(Me.paint_circle["circle-opacity"]),"circle-translate":new Bn(Me.paint_circle["circle-translate"]),"circle-translate-anchor":new Bn(Me.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Bn(Me.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Bn(Me.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Yn(Me.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Yn(Me.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Yn(Me.paint_circle["circle-stroke-opacity"])}),layout:xi},ki="undefined"!=typeof Float32Array?Float32Array:Array;function Mi(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3];return e[0]=r[0]*n+r[4]*a+r[8]*i+r[12]*o,e[1]=r[1]*n+r[5]*a+r[9]*i+r[13]*o,e[2]=r[2]*n+r[6]*a+r[10]*i+r[14]*o,e[3]=r[3]*n+r[7]*a+r[11]*i+r[15]*o,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)}),_i=new ki(3),ki!=Float32Array&&(_i[0]=0,_i[1]=0,_i[2]=0),function(){var e=new ki(4);ki!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var Ti=function(e){function t(t){e.call(this,t,wi)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new ii(e)},t.prototype.queryRadius=function(e){var t=e;return vi("circle-radius",this,t)+vi("circle-stroke-width",this,t)+yi(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,a,i,o,s){for(var l=bi(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),i.angle,o),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),u="map"===this.paint.get("circle-pitch-alignment"),d=u?l:function(e,t){return e.map((function(e){return Ci(e,t)}))}(l,s),p=u?c*o:c,h=0,f=n;h<f.length;h+=1)for(var m=0,g=f[h];m<g.length;m+=1){var v=g[m],y=u?v:Ci(v,s),b=p,_=Mi([],[v.x,v.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?b*=_[3]/i.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(b*=i.cameraToCenterDistance/_[3]),si(d,y,b))return!0}return!1},t}(Gn);function Ci(e,t){var r=Mi([],[e.x,e.y,0,1],t);return new a(r[0]/r[3],r[1]/r[3])}var Si=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(ii);function Li(e,t,r,n){var a=t.width,i=t.height;if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==a*i*r)throw new RangeError("mismatched image size")}else n=new Uint8Array(a*i*r);return e.width=a,e.height=i,e.data=n,e}function Ai(e,t,r){var n=t.width,a=t.height;if(n!==e.width||a!==e.height){var i=Li({},{width:n,height:a},r);Ei(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,n),height:Math.min(e.height,a)},r),e.width=n,e.height=a,e.data=i.data}}function Ei(e,t,r,n,a,i){if(0===a.width||0===a.height)return t;if(a.width>e.width||a.height>e.height||r.x>e.width-a.width||r.y>e.height-a.height)throw new RangeError("out of range source coordinates for image copy");if(a.width>t.width||a.height>t.height||n.x>t.width-a.width||n.y>t.height-a.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=e.data,s=t.data,l=0;l<a.height;l++)for(var c=((r.y+l)*e.width+r.x)*i,u=((n.y+l)*t.width+n.x)*i,d=0;d<a.width*i;d++)s[u+d]=o[c+d];return t}fn("HeatmapBucket",Si,{omit:["layers"]});var Di=function(e,t){Li(this,e,1,t)};Di.prototype.resize=function(e){Ai(this,e,1)},Di.prototype.clone=function(){return new Di({width:this.width,height:this.height},new Uint8Array(this.data))},Di.copy=function(e,t,r,n,a){Ei(e,t,r,n,a,1)};var Ii=function(e,t){Li(this,e,4,t)};Ii.prototype.resize=function(e){Ai(this,e,4)},Ii.prototype.replace=function(e,t){t?this.data.set(e):e instanceof Uint8ClampedArray?this.data=new Uint8Array(e.buffer):this.data=e},Ii.prototype.clone=function(){return new Ii({width:this.width,height:this.height},new Uint8Array(this.data))},Ii.copy=function(e,t,r,n,a){Ei(e,t,r,n,a,4)},fn("AlphaImage",Di),fn("RGBAImage",Ii);var Pi={paint:new Wn({"heatmap-radius":new Yn(Me.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Yn(Me.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Bn(Me.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Un(Me.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Bn(Me.paint_heatmap["heatmap-opacity"])})};function Oi(e,t){for(var r=new Uint8Array(1024),n={},a=0,i=0;a<256;a++,i+=4){n[t]=a/255;var o=e.evaluate(n);r[i+0]=Math.floor(255*o.r/o.a),r[i+1]=Math.floor(255*o.g/o.a),r[i+2]=Math.floor(255*o.b/o.a),r[i+3]=Math.floor(255*o.a)}return new Ii({width:256,height:1},r)}var Ri=function(e){function t(t){e.call(this,t,Pi),this._updateColorRamp()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new Si(e)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){"heatmap-color"===e&&this._updateColorRamp()},t.prototype._updateColorRamp=function(){var e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Oi(e,"heatmapDensity"),this.colorRampTexture=null},t.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},t}(Gn),Fi={paint:new Wn({"hillshade-illumination-direction":new Bn(Me.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Bn(Me.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Bn(Me.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Bn(Me.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Bn(Me.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Bn(Me.paint_hillshade["hillshade-accent-color"])})},zi=function(e){function t(t){e.call(this,t,Fi)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},t}(Gn),Ni=Zn([{name:"a_pos",components:2,type:"Int16"}],4).members,ji=Yi,Bi=Yi;function Yi(e,t,r){r=r||2;var n,a,i,o,s,l,c,u=t&&t.length,d=u?t[0]*r:e.length,p=Hi(e,0,d,r,!0),h=[];if(!p||p.next===p.prev)return h;if(u&&(p=function(e,t,r,n){var a,i,o,s=[];for(a=0,i=t.length;a<i;a++)(o=Hi(e,t[a]*n,a<i-1?t[a+1]*n:e.length,n,!1))===o.next&&(o.steiner=!0),s.push(Qi(o));for(s.sort(Xi),a=0;a<s.length;a++)Zi(s[a],r),r=Vi(r,r.next);return r}(e,t,p,r)),e.length>80*r){n=i=e[0],a=o=e[1];for(var f=r;f<d;f+=r)(s=e[f])<n&&(n=s),(l=e[f+1])<a&&(a=l),s>i&&(i=s),l>o&&(o=l);c=0!==(c=Math.max(i-n,o-a))?1/c:0}return Ui(p,h,r,n,a,c),h}function Hi(e,t,r,n,a){var i,o;if(a===ho(e,t,r,n)>0)for(i=t;i<r;i+=n)o=co(i,e[i],e[i+1],o);else for(i=r-n;i>=t;i-=n)o=co(i,e[i],e[i+1],o);return o&&no(o,o.next)&&(uo(o),o=o.next),o}function Vi(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!no(n,n.next)&&0!==ro(n.prev,n,n.next))n=n.next;else{if(uo(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function Ui(e,t,r,n,a,i,o){if(e){!o&&i&&function(e,t,r,n){var a=e;do{null===a.z&&(a.z=$i(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){var t,r,n,a,i,o,s,l,c=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ);t++);for(l=c;s>0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,c*=2}while(o>1)}(a)}(e,n,a,i);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,i?Gi(e,n,a,i):Wi(e))t.push(s.i/r),t.push(e.i/r),t.push(l.i/r),uo(e),e=l.next,c=l.next;else if((e=l)===c){o?1===o?Ui(e=qi(Vi(e),t,r),t,r,n,a,i,2):2===o&&Ki(e,t,r,n,a,i):Ui(Vi(e),t,r,n,a,i,1);break}}}function Wi(e){var t=e.prev,r=e,n=e.next;if(ro(t,r,n)>=0)return!1;for(var a=e.next.next;a!==e.prev;){if(eo(t.x,t.y,r.x,r.y,n.x,n.y,a.x,a.y)&&ro(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function Gi(e,t,r,n){var a=e.prev,i=e,o=e.next;if(ro(a,i,o)>=0)return!1;for(var s=a.x<i.x?a.x<o.x?a.x:o.x:i.x<o.x?i.x:o.x,l=a.y<i.y?a.y<o.y?a.y:o.y:i.y<o.y?i.y:o.y,c=a.x>i.x?a.x>o.x?a.x:o.x:i.x>o.x?i.x:o.x,u=a.y>i.y?a.y>o.y?a.y:o.y:i.y>o.y?i.y:o.y,d=$i(s,l,t,r,n),p=$i(c,u,t,r,n),h=e.prevZ,f=e.nextZ;h&&h.z>=d&&f&&f.z<=p;){if(h!==e.prev&&h!==e.next&&eo(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&ro(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,f!==e.prev&&f!==e.next&&eo(a.x,a.y,i.x,i.y,o.x,o.y,f.x,f.y)&&ro(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;h&&h.z>=d;){if(h!==e.prev&&h!==e.next&&eo(a.x,a.y,i.x,i.y,o.x,o.y,h.x,h.y)&&ro(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;f&&f.z<=p;){if(f!==e.prev&&f!==e.next&&eo(a.x,a.y,i.x,i.y,o.x,o.y,f.x,f.y)&&ro(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function qi(e,t,r){var n=e;do{var a=n.prev,i=n.next.next;!no(a,i)&&ao(a,n,n.next,i)&&so(a,i)&&so(i,a)&&(t.push(a.i/r),t.push(n.i/r),t.push(i.i/r),uo(n),uo(n.next),n=e=i),n=n.next}while(n!==e);return Vi(n)}function Ki(e,t,r,n,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&to(o,s)){var l=lo(o,s);return o=Vi(o,o.next),l=Vi(l,l.next),Ui(o,t,r,n,a,i),void Ui(l,t,r,n,a,i)}s=s.next}o=o.next}while(o!==e)}function Xi(e,t){return e.x-t.x}function Zi(e,t){if(t=function(e,t){var r,n=t,a=e.x,i=e.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(a===o)return r;var l,c=r,u=r.x,d=r.y,p=1/0;n=r;do{a>=n.x&&n.x>=u&&a!==n.x&&eo(i<d?a:o,i,u,d,i<d?o:a,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(a-n.x),so(n,e)&&(l<p||l===p&&(n.x>r.x||n.x===r.x&&Ji(r,n)))&&(r=n,p=l)),n=n.next}while(n!==c);return r}(e,t)){var r=lo(t,e);Vi(r,r.next)}}function Ji(e,t){return ro(e.prev,e,t.prev)<0&&ro(t.next,e,e.next)<0}function $i(e,t,r,n,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*a)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*a)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Qi(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function eo(e,t,r,n,a,i,o,s){return(a-o)*(t-s)-(e-o)*(i-s)>=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(i-s)-(a-o)*(n-s)>=0}function to(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&ao(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(so(e,t)&&so(t,e)&&function(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(ro(e.prev,e,t.prev)||ro(e,t.prev,t))||no(e,t)&&ro(e.prev,e,e.next)>0&&ro(t.prev,t,t.next)>0)}function ro(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function no(e,t){return e.x===t.x&&e.y===t.y}function ao(e,t,r,n){var a=oo(ro(e,t,r)),i=oo(ro(e,t,n)),o=oo(ro(r,n,e)),s=oo(ro(r,n,t));return a!==i&&o!==s||!(0!==a||!io(e,r,t))||!(0!==i||!io(e,n,t))||!(0!==o||!io(r,e,n))||!(0!==s||!io(r,t,n))}function io(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function oo(e){return e>0?1:e<0?-1:0}function so(e,t){return ro(e.prev,e,e.next)<0?ro(e,t,e.next)>=0&&ro(e,e.prev,t)>=0:ro(e,t,e.prev)<0||ro(e,e.next,t)<0}function lo(e,t){var r=new po(e.i,e.x,e.y),n=new po(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function co(e,t,r,n){var a=new po(e,t,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function uo(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function po(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ho(e,t,r,n){for(var a=0,i=t,o=r-n;i<r;i+=n)a+=(e[o]-e[i])*(e[i+1]+e[o+1]),o=i;return a}function fo(e,t,r,n,a){!function e(t,r,n,a,i){for(;a>n;){if(a-n>600){var o=a-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);e(t,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(a,Math.floor(r+(o-s)*c/o+u)),i)}var d=t[r],p=n,h=a;for(mo(t,n,r),i(t[a],d)>0&&mo(t,n,a);p<h;){for(mo(t,p,h),p++,h--;i(t[p],d)<0;)p++;for(;i(t[h],d)>0;)h--}0===i(t[n],d)?mo(t,n,h):mo(t,++h,a),h<=r&&(n=h+1),r<=h&&(a=h-1)}}(e,t,r||0,n||e.length-1,a||go)}function mo(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function go(e,t){return e<t?-1:e>t?1:0}function vo(e,t){var r=e.length;if(r<=1)return[e];for(var n,a,i=[],o=0;o<r;o++){var s=M(e[o]);0!==s&&(e[o].area=Math.abs(s),void 0===a&&(a=s<0),a===s<0?(n&&i.push(n),n=[e[o]]):n.push(e[o]))}if(n&&i.push(n),t>1)for(var l=0;l<i.length;l++)i[l].length<=t||(fo(i[l],t,1,i[l].length-1,yo),i[l]=i[l].slice(0,t));return i}function yo(e,t){return t.area-e.area}function bo(e,t,r){for(var n=r.patternDependencies,a=!1,i=0,o=t;i<o.length;i+=1){var s=o[i].paint.get(e+"-pattern");s.isConstant()||(a=!0);var l=s.constantOr(null);l&&(a=!0,n[l.to]=!0,n[l.from]=!0)}return a}function _o(e,t,r,n,a){for(var i=a.patternDependencies,o=0,s=t;o<s.length;o+=1){var l=s[o],c=l.paint.get(e+"-pattern").value;if("constant"!==c.kind){var u=c.evaluate({zoom:n-1},r,{}),d=c.evaluate({zoom:n},r,{}),p=c.evaluate({zoom:n+1},r,{});i[u]=!0,i[d]=!0,i[p]=!0,r.patterns[l.id]={min:u,mid:d,max:p}}}return r}Yi.deviation=function(e,t,r,n){var a=t&&t.length,i=a?t[0]*r:e.length,o=Math.abs(ho(e,0,i,r));if(a)for(var s=0,l=t.length;s<l;s++){var c=t[s]*r,u=s<l-1?t[s+1]*r:e.length;o-=Math.abs(ho(e,c,u,r))}var d=0;for(s=0;s<n.length;s+=3){var p=n[s]*r,h=n[s+1]*r,f=n[s+2]*r;d+=Math.abs((e[p]-e[f])*(e[h+1]-e[p+1])-(e[p]-e[h])*(e[f+1]-e[p+1]))}return 0===o&&0===d?0:Math.abs((d-o)/o)},Yi.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,a=0;a<e.length;a++){for(var i=0;i<e[a].length;i++)for(var o=0;o<t;o++)r.vertices.push(e[a][i][o]);a>0&&(n+=e[a-1].length,r.holes.push(n))}return r},ji.default=Bi;var xo=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new $n,this.indexArray=new fa,this.indexArray2=new ma,this.programConfigurations=new $a(Ni,e.layers,e.zoom),this.segments=new Ia,this.segments2=new Ia,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};xo.prototype.populate=function(e,t){this.hasPattern=bo("fill",this.layers,t);for(var r=this.layers[0].layout.get("fill-sort-key"),n=[],a=0,i=e;a<i.length;a+=1){var o=i[a],s=o.feature,l=o.index,c=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new Dn(this.zoom),s)){var u=ni(s),d=r?r.evaluate(s,{}):void 0,p={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:c,index:l,geometry:u,patterns:{},sortKey:d};n.push(p)}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var h=0,f=n;h<f.length;h+=1){var m=f[h],g=m,v=g.geometry,y=g.index,b=g.sourceLayerIndex;if(this.hasPattern){var _=_o("fill",this.layers,m,this.zoom,t);this.patternFeatures.push(_)}else this.addFeature(m,v,y,{});var x=e[y].feature;t.featureIndex.insert(x,v,y,b,this.index)}},xo.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},xo.prototype.addFeatures=function(e,t){for(var r=0,n=this.patternFeatures;r<n.length;r+=1){var a=n[r];this.addFeature(a,a.geometry,a.index,t)}},xo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},xo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},xo.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Ni),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0},xo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},xo.prototype.addFeature=function(e,t,r,n){for(var a=0,i=vo(t,500);a<i.length;a+=1){for(var o=i[a],s=0,l=0,c=o;l<c.length;l+=1)s+=c[l].length;for(var u=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray),d=u.vertexLength,p=[],h=[],f=0,m=o;f<m.length;f+=1){var g=m[f];if(0!==g.length){g!==o[0]&&h.push(p.length/2);var v=this.segments2.prepareSegment(g.length,this.layoutVertexArray,this.indexArray2),y=v.vertexLength;this.layoutVertexArray.emplaceBack(g[0].x,g[0].y),this.indexArray2.emplaceBack(y+g.length-1,y),p.push(g[0].x),p.push(g[0].y);for(var b=1;b<g.length;b++)this.layoutVertexArray.emplaceBack(g[b].x,g[b].y),this.indexArray2.emplaceBack(y+b-1,y+b),p.push(g[b].x),p.push(g[b].y);v.vertexLength+=g.length,v.primitiveLength+=g.length}}for(var _=ji(p,h),x=0;x<_.length;x+=3)this.indexArray.emplaceBack(d+_[x],d+_[x+1],d+_[x+2]);u.vertexLength+=s,u.primitiveLength+=_.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,n)},fn("FillBucket",xo,{omit:["layers","patternFeatures"]});var wo=new Wn({"fill-sort-key":new Yn(Me.layout_fill["fill-sort-key"])}),ko={paint:new Wn({"fill-antialias":new Bn(Me.paint_fill["fill-antialias"]),"fill-opacity":new Yn(Me.paint_fill["fill-opacity"]),"fill-color":new Yn(Me.paint_fill["fill-color"]),"fill-outline-color":new Yn(Me.paint_fill["fill-outline-color"]),"fill-translate":new Bn(Me.paint_fill["fill-translate"]),"fill-translate-anchor":new Bn(Me.paint_fill["fill-translate-anchor"]),"fill-pattern":new Hn(Me.paint_fill["fill-pattern"])}),layout:wo},Mo=function(e){function t(t){e.call(this,t,ko)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t){e.prototype.recalculate.call(this,t);var r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},t.prototype.createBucket=function(e){return new xo(e)},t.prototype.queryRadius=function(){return yi(this.paint.get("fill-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,a,i,o){return li(bi(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),i.angle,o),n)},t.prototype.isTileClipped=function(){return!0},t}(Gn),To=Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Co=So;function So(e,t,r,n,a){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=a,e.readFields(Lo,this,t)}function Lo(e,t,r){1==e?t.id=r.readVarint():2==e?function(e,t){for(var r=e.readVarint()+e.pos;e.pos<r;){var n=t._keys[e.readVarint()],a=t._values[e.readVarint()];t.properties[n]=a}}(r,t):3==e?t.type=r.readVarint():4==e&&(t._geometry=r.pos)}function Ao(e){for(var t,r,n=0,a=0,i=e.length,o=i-1;a<i;o=a++)t=e[a],n+=((r=e[o]).x-t.x)*(t.y+r.y);return n}So.types=["Unknown","Point","LineString","Polygon"],So.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,r=e.readVarint()+e.pos,n=1,i=0,o=0,s=0,l=[];e.pos<r;){if(i<=0){var c=e.readVarint();n=7&c,i=c>>3}if(i--,1===n||2===n)o+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&l.push(t),t=[]),t.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&l.push(t),l},So.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,a=0,i=0,o=1/0,s=-1/0,l=1/0,c=-1/0;e.pos<t;){if(n<=0){var u=e.readVarint();r=7&u,n=u>>3}if(n--,1===r||2===r)(a+=e.readSVarint())<o&&(o=a),a>s&&(s=a),(i+=e.readSVarint())<l&&(l=i),i>c&&(c=i);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},So.prototype.toGeoJSON=function(e,t,r){var n,a,i=this.extent*Math.pow(2,r),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=So.types[this.type];function u(e){for(var t=0;t<e.length;t++){var r=e[t],n=180-360*(r.y+s)/i;e[t]=[360*(r.x+o)/i-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var d=[];for(n=0;n<l.length;n++)d[n]=l[n][0];u(l=d);break;case 2:for(n=0;n<l.length;n++)u(l[n]);break;case 3:for(l=function(e){var t=e.length;if(t<=1)return[e];for(var r,n,a=[],i=0;i<t;i++){var o=Ao(e[i]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(r&&a.push(r),r=[e[i]]):r.push(e[i]))}return r&&a.push(r),a}(l),n=0;n<l.length;n++)for(a=0;a<l[n].length;a++)u(l[n][a])}1===l.length?l=l[0]:c="Multi"+c;var p={type:"Feature",geometry:{type:c,coordinates:l},properties:this.properties};return"id"in this&&(p.id=this.id),p};var Eo=Do;function Do(e,t){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(Io,this,t),this.length=this._features.length}function Io(e,t,r){15===e?t.version=r.readVarint():1===e?t.name=r.readString():5===e?t.extent=r.readVarint():2===e?t._features.push(r.pos):3===e?t._keys.push(r.readString()):4===e&&t._values.push(function(e){for(var t=null,r=e.readVarint()+e.pos;e.pos<r;){var n=e.readVarint()>>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}function Po(e,t,r){if(3===e){var n=new Eo(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}Do.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Co(this._pbf,t,this.extent,this._keys,this._values)};var Oo={VectorTile:function(e,t){this.layers=e.readFields(Po,{},t)},VectorTileFeature:Co,VectorTileLayer:Eo},Ro=Oo.VectorTileFeature.types,Fo=Math.pow(2,13);function zo(e,t,r,n,a,i,o,s){e.emplaceBack(t,r,2*Math.floor(n*Fo)+o,a*Fo*2,i*Fo*2,Math.round(s))}var No=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ea,this.indexArray=new fa,this.programConfigurations=new $a(To,e.layers,e.zoom),this.segments=new Ia,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function jo(e,t){return e.x===t.x&&(e.x<0||e.x>ti)||e.y===t.y&&(e.y<0||e.y>ti)}function Bo(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>ti}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>ti}))}No.prototype.populate=function(e,t){this.features=[],this.hasPattern=bo("fill-extrusion",this.layers,t);for(var r=0,n=e;r<n.length;r+=1){var a=n[r],i=a.feature,o=a.index,s=a.sourceLayerIndex;if(this.layers[0]._featureFilter(new Dn(this.zoom),i)){var l=ni(i),c={sourceLayerIndex:s,index:o,geometry:l,properties:i.properties,type:i.type,patterns:{}};void 0!==i.id&&(c.id=i.id),this.hasPattern?this.features.push(_o("fill-extrusion",this.layers,c,this.zoom,t)):this.addFeature(c,l,o,{}),t.featureIndex.insert(i,l,o,s,this.index,!0)}}},No.prototype.addFeatures=function(e,t){for(var r=0,n=this.features;r<n.length;r+=1){var a=n[r],i=a.geometry;this.addFeature(a,i,a.index,t)}},No.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},No.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},No.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},No.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,To),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},No.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},No.prototype.addFeature=function(e,t,r,n){for(var a=0,i=vo(t,500);a<i.length;a+=1){for(var o=i[a],s=0,l=0,c=o;l<c.length;l+=1)s+=c[l].length;for(var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),d=0,p=o;d<p.length;d+=1){var h=p[d];if(0!==h.length&&!Bo(h))for(var f=0,m=0;m<h.length;m++){var g=h[m];if(m>=1){var v=h[m-1];if(!jo(g,v)){u.vertexLength+4>Ia.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var y=g.sub(v)._perp()._unit(),b=v.dist(g);f+b>32768&&(f=0),zo(this.layoutVertexArray,g.x,g.y,y.x,y.y,0,0,f),zo(this.layoutVertexArray,g.x,g.y,y.x,y.y,0,1,f),f+=b,zo(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,0,f),zo(this.layoutVertexArray,v.x,v.y,y.x,y.y,0,1,f);var _=u.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),u.vertexLength+=4,u.primitiveLength+=2}}}}if(u.vertexLength+s>Ia.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray)),"Polygon"===Ro[e.type]){for(var x=[],w=[],k=u.vertexLength,M=0,T=o;M<T.length;M+=1){var C=T[M];if(0!==C.length){C!==o[0]&&w.push(x.length/2);for(var S=0;S<C.length;S++){var L=C[S];zo(this.layoutVertexArray,L.x,L.y,0,0,1,1,0),x.push(L.x),x.push(L.y)}}}for(var A=ji(x,w),E=0;E<A.length;E+=3)this.indexArray.emplaceBack(k+A[E],k+A[E+2],k+A[E+1]);u.primitiveLength+=A.length/3,u.vertexLength+=s}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,n)},fn("FillExtrusionBucket",No,{omit:["layers","features"]});var Yo={paint:new Wn({"fill-extrusion-opacity":new Bn(Me["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Yn(Me["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Bn(Me["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Bn(Me["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Hn(Me["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Yn(Me["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Yn(Me["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Bn(Me["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Ho=function(e){function t(t){e.call(this,t,Yo)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new No(e)},t.prototype.queryRadius=function(){return yi(this.paint.get("fill-extrusion-translate"))},t.prototype.is3D=function(){return!0},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,s,l){var c=bi(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,s),u=this.paint.get("fill-extrusion-height").evaluate(t,r),d=this.paint.get("fill-extrusion-base").evaluate(t,r),p=function(e,t,r,n){for(var i=[],o=0,s=e;o<s.length;o+=1){var l=s[o],c=[l.x,l.y,0,1];Mi(c,c,t),i.push(new a(c[0]/c[3],c[1]/c[3]))}return i}(c,l),h=function(e,t,r,n){for(var i=[],o=[],s=n[8]*t,l=n[9]*t,c=n[10]*t,u=n[11]*t,d=n[8]*r,p=n[9]*r,h=n[10]*r,f=n[11]*r,m=0,g=e;m<g.length;m+=1){for(var v=[],y=[],b=0,_=g[m];b<_.length;b+=1){var x=_[b],w=x.x,k=x.y,M=n[0]*w+n[4]*k+n[12],T=n[1]*w+n[5]*k+n[13],C=n[2]*w+n[6]*k+n[14],S=n[3]*w+n[7]*k+n[15],L=C+c,A=S+u,E=M+d,D=T+p,I=C+h,P=S+f,O=new a((M+s)/A,(T+l)/A);O.z=L/A,v.push(O);var R=new a(E/P,D/P);R.z=I/P,y.push(R)}i.push(v),o.push(y)}return[i,o]}(n,d,u,l);return function(e,t,r){var n=1/0;li(r,t)&&(n=Uo(r,t[0]));for(var a=0;a<t.length;a++)for(var i=t[a],o=e[a],s=0;s<i.length-1;s++){var l=i[s],c=i[s+1],u=o[s],d=[l,c,o[s+1],u,l];oi(r,d)&&(n=Math.min(n,Uo(r,d)))}return n!==1/0&&n}(h[0],h[1],p)},t}(Gn);function Vo(e,t){return e.x*t.x+e.y*t.y}function Uo(e,t){if(1===e.length){var r=t[0],n=t[1],a=t[3],i=e[0],o=n.sub(r),s=a.sub(r),l=i.sub(r),c=Vo(o,o),u=Vo(o,s),d=Vo(s,s),p=Vo(l,o),h=Vo(l,s),f=c*d-u*u,m=(d*p-u*h)/f,g=(c*h-u*p)/f,v=1-m-g;return r.z*v+n.z*m+a.z*g}for(var y=1/0,b=0,_=t;b<_.length;b+=1){var x=_[b];y=Math.min(y,x.z)}return y}var Wo=Zn([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Go=Oo.VectorTileFeature.types,qo=Math.cos(Math.PI/180*37.5),Ko=Math.pow(2,14)/.5,Xo=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ta,this.indexArray=new fa,this.programConfigurations=new $a(Wo,e.layers,e.zoom),this.segments=new Ia,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Xo.prototype.populate=function(e,t){this.hasPattern=bo("line",this.layers,t);for(var r=this.layers[0].layout.get("line-sort-key"),n=[],a=0,i=e;a<i.length;a+=1){var o=i[a],s=o.feature,l=o.index,c=o.sourceLayerIndex;if(this.layers[0]._featureFilter(new Dn(this.zoom),s)){var u=ni(s),d=r?r.evaluate(s,{}):void 0,p={id:s.id,properties:s.properties,type:s.type,sourceLayerIndex:c,index:l,geometry:u,patterns:{},sortKey:d};n.push(p)}}r&&n.sort((function(e,t){return e.sortKey-t.sortKey}));for(var h=0,f=n;h<f.length;h+=1){var m=f[h],g=m,v=g.geometry,y=g.index,b=g.sourceLayerIndex;if(this.hasPattern){var _=_o("line",this.layers,m,this.zoom,t);this.patternFeatures.push(_)}else this.addFeature(m,v,y,{});var x=e[y].feature;t.featureIndex.insert(x,v,y,b,this.index)}},Xo.prototype.update=function(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)},Xo.prototype.addFeatures=function(e,t){for(var r=0,n=this.patternFeatures;r<n.length;r+=1){var a=n[r];this.addFeature(a,a.geometry,a.index,t)}},Xo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Xo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Xo.prototype.upload=function(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Wo),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0},Xo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Xo.prototype.addFeature=function(e,t,r,n){for(var a=this.layers[0].layout,i=a.get("line-join").evaluate(e,{}),o=a.get("line-cap"),s=a.get("line-miter-limit"),l=a.get("line-round-limit"),c=0,u=t;c<u.length;c+=1){var d=u[c];this.addLine(d,e,i,o,s,l,r,n)}},Xo.prototype.addLine=function(e,t,r,n,a,i,o,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t.properties&&t.properties.hasOwnProperty("mapbox_clip_start")&&t.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+t.properties.mapbox_clip_start,this.clipEnd=+t.properties.mapbox_clip_end;for(var l=0;l<e.length-1;l++)this.totalDistance+=e[l].dist(e[l+1])}for(var c="Polygon"===Go[t.type],u=e.length;u>=2&&e[u-1].equals(e[u-2]);)u--;for(var d=0;d<u-1&&e[d].equals(e[d+1]);)d++;if(!(u<(c?3:2))){"bevel"===r&&(a=1.05);var p,h=ti/(512*this.overscaling)*15,f=this.segments.prepareSegment(10*u,this.layoutVertexArray,this.indexArray),m=void 0,g=void 0,v=void 0,y=void 0;this.e1=this.e2=-1,c&&(p=e[u-2],y=e[d].sub(p)._unit()._perp());for(var b=d;b<u;b++)if(!(g=c&&b===u-1?e[d+1]:e[b+1])||!e[b].equals(g)){y&&(v=y),p&&(m=p),p=e[b],y=g?g.sub(p)._unit()._perp():v;var _=(v=v||y).add(y);0===_.x&&0===_.y||_._unit();var x=v.x*y.x+v.y*y.y,w=_.x*y.x+_.y*y.y,k=0!==w?1/w:1/0,M=2*Math.sqrt(2-2*w),T=w<qo&&m&&g,C=v.x*y.y-v.y*y.x>0;if(T&&b>d){var S=p.dist(m);if(S>2*h){var L=p.sub(p.sub(m)._mult(h/S)._round());this.updateDistance(m,L),this.addCurrentVertex(L,v,0,0,f),m=L}}var A=m&&g,E=A?r:c?"butt":n;if(A&&"round"===E&&(k<i?E="miter":k<=2&&(E="fakeround")),"miter"===E&&k>a&&(E="bevel"),"bevel"===E&&(k>2&&(E="flipbevel"),k<a&&(E="miter")),m&&this.updateDistance(m,p),"miter"===E)_._mult(k),this.addCurrentVertex(p,_,0,0,f);else if("flipbevel"===E){if(k>100)_=y.mult(-1);else{var D=k*v.add(y).mag()/v.sub(y).mag();_._perp()._mult(D*(C?-1:1))}this.addCurrentVertex(p,_,0,0,f),this.addCurrentVertex(p,_.mult(-1),0,0,f)}else if("bevel"===E||"fakeround"===E){var I=-Math.sqrt(k*k-1),P=C?I:0,O=C?0:I;if(m&&this.addCurrentVertex(p,v,P,O,f),"fakeround"===E)for(var R=Math.round(180*M/Math.PI/20),F=1;F<R;F++){var z=F/R;if(.5!==z){var N=z-.5;z+=z*N*(z-1)*((1.0904+x*(x*(3.55645-1.43519*x)-3.2452))*N*N+(.848013+x*(.215638*x-1.06021)))}var j=y.sub(v)._mult(z)._add(v)._unit()._mult(C?-1:1);this.addHalfVertex(p,j.x,j.y,!1,C,0,f)}g&&this.addCurrentVertex(p,y,-P,-O,f)}else if("butt"===E)this.addCurrentVertex(p,_,0,0,f);else if("square"===E){var B=m?1:-1;this.addCurrentVertex(p,_,B,B,f)}else"round"===E&&(m&&(this.addCurrentVertex(p,v,0,0,f),this.addCurrentVertex(p,v,1,1,f,!0)),g&&(this.addCurrentVertex(p,y,-1,-1,f,!0),this.addCurrentVertex(p,y,0,0,f)));if(T&&b<u-1){var Y=p.dist(g);if(Y>2*h){var H=p.add(g.sub(p)._mult(h/Y)._round());this.updateDistance(p,H),this.addCurrentVertex(H,y,0,0,f),p=H}}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,o,s)}},Xo.prototype.addCurrentVertex=function(e,t,r,n,a,i){void 0===i&&(i=!1);var o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*n,c=-t.y-t.x*n;this.addHalfVertex(e,o,s,i,!1,r,a),this.addHalfVertex(e,l,c,i,!0,-n,a),this.distance>Ko/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,r,n,a,i))},Xo.prototype.addHalfVertex=function(e,t,r,n,a,i,o){var s=e.x,l=e.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(a?1:0),Math.round(63*t)+128,Math.round(63*r)+128,1+(0===i?0:i<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),a?this.e2=u:this.e1=u},Xo.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Ko-1):this.distance},fn("LineBucket",Xo,{omit:["layers","patternFeatures"]});var Zo=new Wn({"line-cap":new Bn(Me.layout_line["line-cap"]),"line-join":new Yn(Me.layout_line["line-join"]),"line-miter-limit":new Bn(Me.layout_line["line-miter-limit"]),"line-round-limit":new Bn(Me.layout_line["line-round-limit"]),"line-sort-key":new Yn(Me.layout_line["line-sort-key"])}),Jo={paint:new Wn({"line-opacity":new Yn(Me.paint_line["line-opacity"]),"line-color":new Yn(Me.paint_line["line-color"]),"line-translate":new Bn(Me.paint_line["line-translate"]),"line-translate-anchor":new Bn(Me.paint_line["line-translate-anchor"]),"line-width":new Yn(Me.paint_line["line-width"]),"line-gap-width":new Yn(Me.paint_line["line-gap-width"]),"line-offset":new Yn(Me.paint_line["line-offset"]),"line-blur":new Yn(Me.paint_line["line-blur"]),"line-dasharray":new Vn(Me.paint_line["line-dasharray"]),"line-pattern":new Hn(Me.paint_line["line-pattern"]),"line-gradient":new Un(Me.paint_line["line-gradient"])}),layout:Zo},$o=new(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,r){return r=new Dn(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),e.prototype.possiblyEvaluate.call(this,t,r)},t.prototype.evaluate=function(t,r,n,a){return r=d({},r,{zoom:Math.floor(r.zoom)}),e.prototype.evaluate.call(this,t,r,n,a)},t}(Yn))(Jo.paint.properties["line-width"].specification);$o.useIntegerZoom=!0;var Qo=function(e){function t(t){e.call(this,t,Jo)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){"line-gradient"===e&&this._updateGradient()},t.prototype._updateGradient=function(){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Oi(e,"lineProgress"),this.gradientTexture=null},t.prototype.recalculate=function(t){e.prototype.recalculate.call(this,t),this.paint._values["line-floorwidth"]=$o.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new Xo(e)},t.prototype.queryRadius=function(e){var t=e,r=es(vi("line-width",this,t),vi("line-gap-width",this,t)),n=vi("line-offset",this,t);return r/2+Math.abs(n)+yi(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,s){var l=bi(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*es(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),u=this.paint.get("line-offset").evaluate(t,r);return u&&(n=function(e,t){for(var r=[],n=new a(0,0),i=0;i<e.length;i++){for(var o=e[i],s=[],l=0;l<o.length;l++){var c=o[l-1],u=o[l],d=o[l+1],p=0===l?n:u.sub(c)._unit()._perp(),h=l===o.length-1?n:d.sub(u)._unit()._perp(),f=p._add(h)._unit(),m=f.x*h.x+f.y*h.y;f._mult(1/m),s.push(f._mult(t)._add(u))}r.push(s)}return r}(n,u*s)),function(e,t,r){for(var n=0;n<t.length;n++){var a=t[n];if(e.length>=3)for(var i=0;i<a.length;i++)if(mi(e,a[i]))return!0;if(ci(e,a,r))return!0}return!1}(l,n,c)},t.prototype.isTileClipped=function(){return!0},t}(Gn);function es(e,t){return t>0?t+2*e:e}var ts=Zn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),rs=Zn([{name:"a_projected_pos",components:3,type:"Float32"}],4),ns=(Zn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Zn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),as=(Zn([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),is=Zn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function os(e,t,r){return e.sections.forEach((function(e){e.text=function(e,t,r){var n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),En.applyArabicShaping&&(e=En.applyArabicShaping(e)),e}(e.text,t,r)})),e}Zn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"}]),Zn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"radialTextOffset"}]),Zn([{type:"Float32",name:"offsetX"}]),Zn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var ss={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"},ls=24,cs={horizontal:1,vertical:2,horizontalOnly:3},us=function(){this.text="",this.sectionIndex=[],this.sections=[]};function ds(e,t,r,n,a,i,o,s,l,c,u){var d,p=us.fromFeature(e,r);c===cs.vertical&&p.verticalizePunctuation();var h=En.processBidirectionalText,f=En.processStyledBidirectionalText;if(h&&1===p.sections.length){d=[];for(var m=0,g=h(p.toString(),vs(p,s,n,t));m<g.length;m+=1){var v=g[m],y=new us;y.text=v,y.sections=p.sections;for(var b=0;b<v.length;b++)y.sectionIndex.push(0);d.push(y)}}else if(f){d=[];for(var _=0,x=f(p.text,p.sectionIndex,vs(p,s,n,t));_<x.length;_+=1){var w=x[_],k=new us;k.text=w[0],k.sectionIndex=w[1],k.sections=p.sections,d.push(k)}}else d=function(e,t){for(var r=[],n=e.text,a=0,i=0,o=t;i<o.length;i+=1){var s=o[i];r.push(e.substring(a,s)),a=s}return a<n.length&&r.push(e.substring(a,n.length)),r}(p,vs(p,s,n,t));var M=[],T={positionedGlyphs:M,text:p.toString(),top:l[1],bottom:l[1],left:l[0],right:l[0],writingMode:c,lineCount:d.length,yOffset:-17};return function(e,t,r,n,a,i,o,s,l){for(var c=0,u=e.yOffset,d=0,p=e.positionedGlyphs,h="right"===i?1:"left"===i?0:.5,f=0,m=r;f<m.length;f+=1){var g=m[f];g.trim();var v=g.getMaxScale();if(g.length()){for(var y=p.length,b=0;b<g.length();b++){var _=g.getSection(b),x=g.getSectionIndex(b),w=g.getCharCode(b),k=24*(v-_.scale),M=t[_.fontStack],T=M&&M[w];T&&(o===cs.horizontal||!l&&!wn(w)||l&&(ps[w]||(S=w,bn.Arabic(S)||bn["Arabic Supplement"](S)||bn["Arabic Extended-A"](S)||bn["Arabic Presentation Forms-A"](S)||bn["Arabic Presentation Forms-B"](S)))?(p.push({glyph:w,x:c,y:u+k,vertical:!1,scale:_.scale,fontStack:_.fontStack,sectionIndex:x}),c+=T.metrics.advance*_.scale+s):(p.push({glyph:w,x:c,y:u+k,vertical:!0,scale:_.scale,fontStack:_.fontStack,sectionIndex:x}),c+=ls*_.scale+s))}if(p.length!==y){var C=c-s;d=Math.max(C,d),bs(p,t,y,p.length-1,h)}c=0,u+=n*v}else u+=n}var S,L=ys(a),A=L.horizontalAlign,E=L.verticalAlign;!function(e,t,r,n,a,i,o){for(var s=(t-r)*a,l=(-n*o+.5)*i,c=0;c<e.length;c++)e[c].x+=s,e[c].y+=l}(p,h,A,E,d,n,r.length);var D=u-e.yOffset;e.top+=-E*D,e.bottom=e.top+D,e.left+=-A*d,e.right=e.left+d}(T,t,d,a,i,o,c,s,u),!!M.length&&T}us.fromFeature=function(e,t){for(var r=new us,n=0;n<e.sections.length;n++){var a=e.sections[n];r.sections.push({scale:a.scale||1,fontStack:a.fontStack||t}),r.text+=a.text;for(var i=0;i<a.text.length;i++)r.sectionIndex.push(n)}return r},us.prototype.length=function(){return this.text.length},us.prototype.getSection=function(e){return this.sections[this.sectionIndex[e]]},us.prototype.getSectionIndex=function(e){return this.sectionIndex[e]},us.prototype.getCharCode=function(e){return this.text.charCodeAt(e)},us.prototype.verticalizePunctuation=function(){this.text=function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r+1)||null,a=e.charCodeAt(r-1)||null;n&&kn(n)&&!ss[e[r+1]]||a&&kn(a)&&!ss[e[r-1]]||!ss[e[r]]?t+=e[r]:t+=ss[e[r]]}return t}(this.text)},us.prototype.trim=function(){for(var e=0,t=0;t<this.text.length&&ps[this.text.charCodeAt(t)];t++)e++;for(var r=this.text.length,n=this.text.length-1;n>=0&&n>=e&&ps[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},us.prototype.substring=function(e,t){var r=new us;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},us.prototype.toString=function(){return this.text},us.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)};var ps={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},hs={};function fs(e,t,r,n){var a=Math.pow(e-t,2);return n?e<t?a/2:2*a:a+Math.abs(r)*r}function ms(e,t,r){var n=0;return 10===e&&(n-=1e4),r&&(n+=150),40!==e&&65288!==e||(n+=50),41!==t&&65289!==t||(n+=50),n}function gs(e,t,r,n,a,i){for(var o=null,s=fs(t,r,a,i),l=0,c=n;l<c.length;l+=1){var u=c[l],d=fs(t-u.x,r,a,i)+u.badness;d<=s&&(o=u,s=d)}return{index:e,x:t,priorBreak:o,badness:s}}function vs(e,t,r,n){if(!r)return[];if(!e)return[];for(var a,i=[],o=function(e,t,r,n){for(var a=0,i=0;i<e.length();i++){var o=e.getSection(i),s=n[o.fontStack],l=s&&s[e.getCharCode(i)];l&&(a+=l.metrics.advance*o.scale+t)}return a/Math.max(1,Math.ceil(a/r))}(e,t,r,n),s=e.text.indexOf("​")>=0,l=0,c=0;c<e.length();c++){var u=e.getSection(c),d=e.getCharCode(c),p=n[u.fontStack],h=p&&p[d];if(h&&!ps[d]&&(l+=h.metrics.advance*u.scale+t),c<e.length()-1){var f=!((a=d)<11904||!(bn["Bopomofo Extended"](a)||bn.Bopomofo(a)||bn["CJK Compatibility Forms"](a)||bn["CJK Compatibility Ideographs"](a)||bn["CJK Compatibility"](a)||bn["CJK Radicals Supplement"](a)||bn["CJK Strokes"](a)||bn["CJK Symbols and Punctuation"](a)||bn["CJK Unified Ideographs Extension A"](a)||bn["CJK Unified Ideographs"](a)||bn["Enclosed CJK Letters and Months"](a)||bn["Halfwidth and Fullwidth Forms"](a)||bn.Hiragana(a)||bn["Ideographic Description Characters"](a)||bn["Kangxi Radicals"](a)||bn["Katakana Phonetic Extensions"](a)||bn.Katakana(a)||bn["Vertical Forms"](a)||bn["Yi Radicals"](a)||bn["Yi Syllables"](a)));(hs[d]||f)&&i.push(gs(c+1,l,o,i,ms(d,e.getCharCode(c+1),f&&s),!1))}}return function e(t){return t?e(t.priorBreak).concat(t.index):[]}(gs(e.length(),l,o,i,0,!0))}function ys(e){var t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function bs(e,t,r,n,a){if(a){var i=e[n],o=t[i.fontStack],s=o&&o[i.glyph];if(s)for(var l=s.metrics.advance*i.scale,c=(e[n].x+l)*a,u=r;u<=n;u++)e[u].x-=c}}hs[10]=!0,hs[32]=!0,hs[38]=!0,hs[40]=!0,hs[41]=!0,hs[43]=!0,hs[45]=!0,hs[47]=!0,hs[173]=!0,hs[183]=!0,hs[8203]=!0,hs[8208]=!0,hs[8211]=!0,hs[8231]=!0;var _s=function(e){function t(t,r,n,a){e.call(this,t,r),this.angle=n,void 0!==a&&(this.segment=a)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.clone=function(){return new t(this.x,this.y,this.angle,this.segment)},t}(a);fn("Anchor",_s);var xs=256;function ws(e,t){var r=t.expression;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new Dn(e+1))};if("source"===r.kind)return{kind:"source"};for(var n=r.zoomStops,a=r.interpolationType,i=0;i<n.length&&n[i]<=e;)i++;for(var o=i=Math.max(0,i-1);o<n.length&&n[o]<e+1;)o++;o=Math.min(n.length-1,o);var s=n[i],l=n[o];return"composite"===r.kind?{kind:"composite",minZoom:s,maxZoom:l,interpolationType:a}:{kind:"camera",minZoom:s,maxZoom:l,minSize:r.evaluate(new Dn(s)),maxSize:r.evaluate(new Dn(l)),interpolationType:a}}function ks(e,t,r){var n=t.uSize,a=t.uSizeT,i=r.lowerSize,o=r.upperSize;return"source"===e.kind?i/xs:"composite"===e.kind?yt(i/xs,o/xs,a):n}function Ms(e,t){var r=0,n=0;if("constant"===e.kind)n=e.layoutSize;else if("source"!==e.kind){var a=e.interpolationType,i=e.minZoom,o=e.maxZoom,s=a?c(jt.interpolationFactor(a,t,i,o),0,1):0;"camera"===e.kind?n=yt(e.minSize,e.maxSize,s):r=s}return{uSizeT:r,uSize:n}}var Ts=Object.freeze({getSizeData:ws,evaluateSizeForFeature:ks,evaluateSizeForZoom:Ms,SIZE_PACK_FACTOR:xs}),Cs=Oo.VectorTileFeature.types,Ss=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Ls(e,t,r,n,a,i,o,s){e.emplaceBack(t,r,Math.round(32*n),Math.round(32*a),i,o,s?s[0]:0,s?s[1]:0)}function As(e,t,r){e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r)}var Es=function(e){this.layoutVertexArray=new na,this.indexArray=new fa,this.programConfigurations=e,this.segments=new Ia,this.dynamicLayoutVertexArray=new aa,this.opacityVertexArray=new ia,this.placedSymbolArray=new wa};Es.prototype.upload=function(e,t,r,n){r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,ts.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,rs.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,Ss,!0),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(e)},Es.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},fn("SymbolBuffers",Es);var Ds=function(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new Ia,this.collisionVertexArray=new la};Ds.prototype.upload=function(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,ns.members,!0)},Ds.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},fn("CollisionBuffers",Ds);var Is=function(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasPaintOverrides=!1;var t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ws(this.zoom,t["text-size"]),this.iconSizeData=ws(this.zoom,t["icon-size"]);var r=this.layers[0].layout,n=r.get("symbol-sort-key"),a=r.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==a&&void 0!==n.constantOr(1);var i="viewport-y"===a||"auto"===a&&!this.sortFeaturesByKey;this.sortFeaturesByY=i&&(r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement")),"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map((function(e){return cs[e]}))),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id})),this.sourceID=e.sourceID};Is.prototype.createArrays=function(){var e=this.layers[0].layout;this.hasPaintOverrides=Fs.hasPaintOverrides(e),this.text=new Es(new $a(ts.members,this.layers,this.zoom,(function(e){return/^text/.test(e)}))),this.icon=new Es(new $a(ts.members,this.layers,this.zoom,(function(e){return/^icon/.test(e)}))),this.collisionBox=new Ds(sa,as.members,ma),this.collisionCircle=new Ds(sa,is.members,fa),this.glyphOffsetArray=new Ca,this.lineVertexArray=new La,this.symbolInstances=new Ma},Is.prototype.calculateGlyphDependencies=function(e,t,r,n,a){for(var i=0;i<e.length;i++)if(t[e.charCodeAt(i)]=!0,(r||n)&&a){var o=ss[e.charAt(i)];o&&(t[o.charCodeAt(0)]=!0)}},Is.prototype.populate=function(e,t){var r=this.layers[0],n=r.layout,a=n.get("text-font"),i=n.get("text-field"),o=n.get("icon-image"),s=("constant"!==i.value.kind||i.value.value.toString().length>0)&&("constant"!==a.value.kind||a.value.value.length>0),l="constant"!==o.value.kind||o.value.value&&o.value.value.length>0,c=n.get("symbol-sort-key");if(this.features=[],s||l){for(var u=t.iconDependencies,d=t.glyphDependencies,p=new Dn(this.zoom),h=0,f=e;h<f.length;h+=1){var m=f[h],g=m.feature,v=m.index,y=m.sourceLayerIndex;if(r._featureFilter(p,g)){var b=void 0;if(s){var _=r.getValueAndResolveTokens("text-field",g);b=os(_ instanceof Ze?_:Ze.fromString(_),r,g)}var x=void 0;if(l&&(x=r.getValueAndResolveTokens("icon-image",g)),b||x){var w=this.sortFeaturesByKey?c.evaluate(g,{}):void 0,k={text:b,icon:x,index:v,sourceLayerIndex:y,geometry:ni(g),properties:g.properties,type:Cs[g.type],sortKey:w};if(void 0!==g.id&&(k.id=g.id),this.features.push(k),x&&(u[x]=!0),b){var M=a.evaluate(g,{}).join(","),T="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(cs.vertical)>=0;for(var C=0,S=b.sections;C<S.length;C+=1){var L=S[C],A=_n(b.toString()),E=L.fontStack||M,D=d[E]=d[E]||{};this.calculateGlyphDependencies(L.text,D,T,this.allowVerticalPlacement,A)}}}}}"line"===n.get("symbol-placement")&&(this.features=function(e){var t={},r={},n=[],a=0;function i(t){n.push(e[t]),a++}function o(e,t,a){var i=r[e];return delete r[e],r[t]=i,n[i].geometry[0].pop(),n[i].geometry[0]=n[i].geometry[0].concat(a[0]),i}function s(e,r,a){var i=t[r];return delete t[r],t[e]=i,n[i].geometry[0].shift(),n[i].geometry[0]=a[0].concat(n[i].geometry[0]),i}function l(e,t,r){var n=r?t[0][t[0].length-1]:t[0][0];return e+":"+n.x+":"+n.y}for(var c=0;c<e.length;c++){var u=e[c],d=u.geometry,p=u.text?u.text.toString():null;if(p){var h=l(p,d),f=l(p,d,!0);if(h in r&&f in t&&r[h]!==t[f]){var m=s(h,f,d),g=o(h,f,n[m].geometry);delete t[h],delete r[f],r[l(p,n[g].geometry,!0)]=g,n[m].geometry=null}else h in r?o(h,f,d):f in t?s(h,f,d):(i(c),t[h]=a-1,r[f]=a-1)}else i(c)}return n.filter((function(e){return e.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(e,t){return e.sortKey-t.sortKey}))}},Is.prototype.update=function(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,r),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,r))},Is.prototype.isEmpty=function(){return 0===this.symbolInstances.length},Is.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Is.prototype.upload=function(e){this.uploaded||(this.collisionBox.upload(e),this.collisionCircle.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Is.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},Is.prototype.addToLineVertexArray=function(e,t){var r=this.lineVertexArray.length;if(void 0!==e.segment){for(var n=e.dist(t[e.segment+1]),a=e.dist(t[e.segment]),i={},o=e.segment+1;o<t.length;o++)i[o]={x:t[o].x,y:t[o].y,tileUnitDistanceFromAnchor:n},o<t.length-1&&(n+=t[o+1].dist(t[o]));for(var s=e.segment||0;s>=0;s--)i[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:a},s>0&&(a+=t[s-1].dist(t[s]));for(var l=0;l<t.length;l++){var c=i[l];this.lineVertexArray.emplaceBack(c.x,c.y,c.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},Is.prototype.addSymbols=function(e,t,r,n,a,i,o,s,l,c){var u=this,d=e.indexArray,p=e.layoutVertexArray,h=e.dynamicLayoutVertexArray,f=e.segments.prepareSegment(4*t.length,e.layoutVertexArray,e.indexArray,i.sortKey),m=this.glyphOffsetArray.length,g=f.vertexLength,v=this.allowVerticalPlacement&&o===cs.vertical?Math.PI/2:0,y=function(e){var t=e.tl,n=e.tr,a=e.bl,i=e.br,o=e.tex,l=f.vertexLength,c=e.glyphOffset[1];Ls(p,s.x,s.y,t.x,c+t.y,o.x,o.y,r),Ls(p,s.x,s.y,n.x,c+n.y,o.x+o.w,o.y,r),Ls(p,s.x,s.y,a.x,c+a.y,o.x,o.y+o.h,r),Ls(p,s.x,s.y,i.x,c+i.y,o.x+o.w,o.y+o.h,r),As(h,s,v),d.emplaceBack(l,l+1,l+2),d.emplaceBack(l+1,l+2,l+3),f.vertexLength+=4,f.primitiveLength+=2,u.glyphOffsetArray.emplaceBack(e.glyphOffset[0])};if(i.text&&i.text.sections){var b=i.text.sections;if(this.hasPaintOverrides){for(var _,x=function(t,r){void 0===_||_===t&&!r||e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,i,i.index,{},b[_]),_=t},w=0,k=t;w<k.length;w+=1){var M=k[w];x(M.sectionIndex,!1),y(M)}x(_,!0)}else{for(var T=0,C=t;T<C.length;T+=1)y(C[T]);e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,i,i.index,{},b[0])}}else{for(var S=0,L=t;S<L.length;S+=1)y(L[S]);e.programConfigurations.populatePaintArrays(e.layoutVertexArray.length,i,i.index,{})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,c,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],o,0,!1,0)},Is.prototype._addCollisionDebugVertex=function(e,t,r,n,a,i){return t.emplaceBack(0,0),e.emplaceBack(r.x,r.y,n,a,Math.round(i.x),Math.round(i.y))},Is.prototype.addCollisionDebugVertices=function(e,t,r,n,i,o,s,l){var c=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),u=c.vertexLength,d=i.layoutVertexArray,p=i.collisionVertexArray,h=s.anchorX,f=s.anchorY;if(this._addCollisionDebugVertex(d,p,o,h,f,new a(e,t)),this._addCollisionDebugVertex(d,p,o,h,f,new a(r,t)),this._addCollisionDebugVertex(d,p,o,h,f,new a(r,n)),this._addCollisionDebugVertex(d,p,o,h,f,new a(e,n)),c.vertexLength+=4,l){var m=i.indexArray;m.emplaceBack(u,u+1,u+2),m.emplaceBack(u,u+2,u+3),c.primitiveLength+=2}else{var g=i.indexArray;g.emplaceBack(u,u+1),g.emplaceBack(u+1,u+2),g.emplaceBack(u+2,u+3),g.emplaceBack(u+3,u),c.primitiveLength+=4}},Is.prototype.addDebugCollisionBoxes=function(e,t,r){for(var n=e;n<t;n++){var a=this.collisionBoxArray.get(n),i=a.x1,o=a.y1,s=a.x2,l=a.y2,c=a.radius>0;this.addCollisionDebugVertices(i,o,s,l,c?this.collisionCircle:this.collisionBox,a.anchorPoint,r,c)}},Is.prototype.generateCollisionDebugBuffers=function(){for(var e=0;e<this.symbolInstances.length;e++){var t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t)}},Is.prototype._deserializeCollisionBoxesForSymbol=function(e,t,r,n,a,i,o){for(var s={},l=t;l<r;l++){var c=e.get(l);if(0===c.radius){s.textBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},s.textFeatureIndex=c.featureIndex;break}s.textCircles||(s.textCircles=[],s.textFeatureIndex=c.featureIndex),s.textCircles.push(c.anchorPointX,c.anchorPointY,c.radius,c.signedDistanceFromAnchor,1)}for(var u=n;u<a;u++){var d=e.get(u);if(0===d.radius){s.verticalTextBox={x1:d.x1,y1:d.y1,x2:d.x2,y2:d.y2,anchorPointX:d.anchorPointX,anchorPointY:d.anchorPointY},s.verticalTextFeatureIndex=d.featureIndex;break}}for(var p=i;p<o;p++){var h=e.get(p);if(0===h.radius){s.iconBox={x1:h.x1,y1:h.y1,x2:h.x2,y2:h.y2,anchorPointX:h.anchorPointX,anchorPointY:h.anchorPointY},s.iconFeatureIndex=h.featureIndex;break}}return s},Is.prototype.deserializeCollisionBoxes=function(e){this.collisionArrays=[];for(var t=0;t<this.symbolInstances.length;t++){var r=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex))}},Is.prototype.hasTextData=function(){return this.text.segments.get().length>0},Is.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Is.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},Is.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},Is.prototype.addIndicesForPlacedTextSymbol=function(e){for(var t=this.text.placedSymbolArray.get(e),r=t.vertexStartIndex+4*t.numGlyphs,n=t.vertexStartIndex;n<r;n+=4)this.text.indexArray.emplaceBack(n,n+1,n+2),this.text.indexArray.emplaceBack(n+1,n+2,n+3)},Is.prototype.getSortedSymbolIndexes=function(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var t=Math.sin(e),r=Math.cos(e),n=[],a=[],i=[],o=0;o<this.symbolInstances.length;++o){i.push(o);var s=this.symbolInstances.get(o);n.push(0|Math.round(t*s.anchorX+r*s.anchorY)),a.push(s.featureIndex)}return i.sort((function(e,t){return n[e]-n[t]||a[t]-a[e]})),i},Is.prototype.sortFeatures=function(e){var t=this;if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r<n.length;r+=1){var a=n[r],i=this.symbolInstances.get(a);this.featureSortOrder.push(i.featureIndex),[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach((function(e,r,n){e>=0&&n.indexOf(e)===r&&t.addIndicesForPlacedTextSymbol(e)})),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(i.verticalPlacedTextSymbolIndex);var o=this.icon.placedSymbolArray.get(a);if(o.numGlyphs){var s=o.vertexStartIndex;this.icon.indexArray.emplaceBack(s,s+1,s+2),this.icon.indexArray.emplaceBack(s+1,s+2,s+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},fn("SymbolBucket",Is,{omit:["layers","collisionBoxArray","features","compareText"]}),Is.MAX_GLYPHS=65535,Is.addDynamicAttributes=As;var Ps=new Wn({"symbol-placement":new Bn(Me.layout_symbol["symbol-placement"]),"symbol-spacing":new Bn(Me.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Bn(Me.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Yn(Me.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Bn(Me.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Bn(Me.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Bn(Me.layout_symbol["icon-ignore-placement"]),"icon-optional":new Bn(Me.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Bn(Me.layout_symbol["icon-rotation-alignment"]),"icon-size":new Yn(Me.layout_symbol["icon-size"]),"icon-text-fit":new Bn(Me.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Bn(Me.layout_symbol["icon-text-fit-padding"]),"icon-image":new Yn(Me.layout_symbol["icon-image"]),"icon-rotate":new Yn(Me.layout_symbol["icon-rotate"]),"icon-padding":new Bn(Me.layout_symbol["icon-padding"]),"icon-keep-upright":new Bn(Me.layout_symbol["icon-keep-upright"]),"icon-offset":new Yn(Me.layout_symbol["icon-offset"]),"icon-anchor":new Yn(Me.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Bn(Me.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Bn(Me.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Bn(Me.layout_symbol["text-rotation-alignment"]),"text-field":new Yn(Me.layout_symbol["text-field"]),"text-font":new Yn(Me.layout_symbol["text-font"]),"text-size":new Yn(Me.layout_symbol["text-size"]),"text-max-width":new Yn(Me.layout_symbol["text-max-width"]),"text-line-height":new Bn(Me.layout_symbol["text-line-height"]),"text-letter-spacing":new Yn(Me.layout_symbol["text-letter-spacing"]),"text-justify":new Yn(Me.layout_symbol["text-justify"]),"text-radial-offset":new Yn(Me.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Bn(Me.layout_symbol["text-variable-anchor"]),"text-anchor":new Yn(Me.layout_symbol["text-anchor"]),"text-max-angle":new Bn(Me.layout_symbol["text-max-angle"]),"text-writing-mode":new Bn(Me.layout_symbol["text-writing-mode"]),"text-rotate":new Yn(Me.layout_symbol["text-rotate"]),"text-padding":new Bn(Me.layout_symbol["text-padding"]),"text-keep-upright":new Bn(Me.layout_symbol["text-keep-upright"]),"text-transform":new Yn(Me.layout_symbol["text-transform"]),"text-offset":new Yn(Me.layout_symbol["text-offset"]),"text-allow-overlap":new Bn(Me.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Bn(Me.layout_symbol["text-ignore-placement"]),"text-optional":new Bn(Me.layout_symbol["text-optional"])}),Os={paint:new Wn({"icon-opacity":new Yn(Me.paint_symbol["icon-opacity"]),"icon-color":new Yn(Me.paint_symbol["icon-color"]),"icon-halo-color":new Yn(Me.paint_symbol["icon-halo-color"]),"icon-halo-width":new Yn(Me.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Yn(Me.paint_symbol["icon-halo-blur"]),"icon-translate":new Bn(Me.paint_symbol["icon-translate"]),"icon-translate-anchor":new Bn(Me.paint_symbol["icon-translate-anchor"]),"text-opacity":new Yn(Me.paint_symbol["text-opacity"]),"text-color":new Yn(Me.paint_symbol["text-color"],{runtimeType:ze,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new Yn(Me.paint_symbol["text-halo-color"]),"text-halo-width":new Yn(Me.paint_symbol["text-halo-width"]),"text-halo-blur":new Yn(Me.paint_symbol["text-halo-blur"]),"text-translate":new Bn(Me.paint_symbol["text-translate"]),"text-translate-anchor":new Bn(Me.paint_symbol["text-translate-anchor"])}),layout:Ps},Rs=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:Pe,this.defaultValue=e};Rs.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},Rs.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},Rs.prototype.possibleOutputs=function(){return[void 0]},Rs.prototype.serialize=function(){return null},fn("FormatSectionOverride",Rs,{omit:["defaultValue"]});var Fs=function(e){function t(t){e.call(this,t,Os)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t){if(e.prototype.recalculate.call(this,t),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var r=this.layout.get("text-writing-mode");if(r){for(var n=[],a=0,i=r;a<i.length;a+=1){var o=i[a];n.indexOf(o)<0&&n.push(o)}this.layout._values["text-writing-mode"]=n}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},t.prototype.getValueAndResolveTokens=function(e,t){var r=this.layout.get(e).evaluate(t,{}),n=this._unevaluatedLayout._values[e];return n.isDataDriven()||wr(n.value)?r:function(e,t){return t.replace(/{([^{}]+)}/g,(function(t,r){return r in e?String(e[r]):""}))}(t.properties,r)},t.prototype.createBucket=function(e){return new Is(e)},t.prototype.queryRadius=function(){return 0},t.prototype.queryIntersectsFeature=function(){return!1},t.prototype._setPaintOverrides=function(){for(var e=0,r=Os.paint.overridableProperties;e<r.length;e+=1){var n=r[e];if(t.hasPaintOverride(this.layout,n)){var a,i=this.paint.get(n),o=new Rs(i),s=new xr(o,i.property.specification);a="constant"===i.value.kind||"source"===i.value.kind?new Mr("source",s):new Tr("composite",s,i.value.zoomStops,i.value._interpolationType),this.paint._values[n]=new Nn(i.property,a,i.parameters)}}},t.prototype._handleOverridablePaintPropertyUpdate=function(e,r,n){return!(!this.layout||r.isDataDriven()||n.isDataDriven())&&t.hasPaintOverride(this.layout,e)},t.hasPaintOverride=function(e,t){var r=e.get("text-field"),n=Os.paint.properties[t],a=!1,i=function(e){for(var t=0,r=e;t<r.length;t+=1){var i=r[t];if(n.overrides&&n.overrides.hasOverride(i))return void(a=!0)}};if("constant"===r.value.kind&&r.value.value instanceof Ze)i(r.value.value.sections);else if("source"===r.value.kind){var o=function(e){if(!a)if(e instanceof et&&$e(e.value)===Ye){var t=e.value;i(t.sections)}else e instanceof at?i(e.sections):e.eachChild(o)},s=r.value;s._styleExpression&&o(s._styleExpression.expression)}return a},t.hasPaintOverrides=function(e){for(var r=0,n=Os.paint.overridableProperties;r<n.length;r+=1){var a=n[r];if(t.hasPaintOverride(e,a))return!0}return!1},t}(Gn),zs={paint:new Wn({"background-color":new Bn(Me.paint_background["background-color"]),"background-pattern":new Vn(Me.paint_background["background-pattern"]),"background-opacity":new Bn(Me.paint_background["background-opacity"])})},Ns=function(e){function t(t){e.call(this,t,zs)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Gn),js={paint:new Wn({"raster-opacity":new Bn(Me.paint_raster["raster-opacity"]),"raster-hue-rotate":new Bn(Me.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Bn(Me.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Bn(Me.paint_raster["raster-brightness-max"]),"raster-saturation":new Bn(Me.paint_raster["raster-saturation"]),"raster-contrast":new Bn(Me.paint_raster["raster-contrast"]),"raster-resampling":new Bn(Me.paint_raster["raster-resampling"]),"raster-fade-duration":new Bn(Me.paint_raster["raster-fade-duration"])})},Bs=function(e){function t(t){e.call(this,t,js)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Gn),Ys=function(e){function t(t){e.call(this,t,{}),this.implementation=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},t.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},t.prototype.recalculate=function(){},t.prototype.updateTransitions=function(){},t.prototype.hasTransition=function(){},t.prototype.serialize=function(){},t.prototype.onAdd=function(e){this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},t.prototype.onRemove=function(e){this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},t}(Gn),Hs={circle:Ti,heatmap:Ri,hillshade:zi,fill:Mo,"fill-extrusion":Ho,line:Qo,symbol:Fs,background:Ns,raster:Bs};function Vs(e){for(var t=0,r=0,n=0,a=e;n<a.length;n+=1){var i=a[n];t+=i.w*i.h,r=Math.max(r,i.w)}e.sort((function(e,t){return t.h-e.h}));for(var o=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],s=0,l=0,c=0,u=e;c<u.length;c+=1)for(var d=u[c],p=o.length-1;p>=0;p--){var h=o[p];if(!(d.w>h.w||d.h>h.h)){if(d.x=h.x,d.y=h.y,l=Math.max(l,d.y+d.h),s=Math.max(s,d.x+d.w),d.w===h.w&&d.h===h.h){var f=o.pop();p<o.length&&(o[p]=f)}else d.h===h.h?(h.x+=d.w,h.w-=d.w):d.w===h.w?(h.y+=d.h,h.h-=d.h):(o.push({x:h.x+d.w,y:h.y,w:h.w-d.w,h:d.h}),h.y+=d.h,h.h-=d.h);break}}return{w:s,h:l,fill:t/(s*l)||0}}var Us=function(e,t){var r=t.pixelRatio,n=t.version;this.paddedRect=e,this.pixelRatio=r,this.version=n},Ws={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Ws.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Ws.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Ws.tlbr.get=function(){return this.tl.concat(this.br)},Ws.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Us.prototype,Ws);var Gs=function(e,t){var r={},n={};this.haveRenderCallbacks=[];var a=[];this.addImages(e,r,a),this.addImages(t,n,a);var i=Vs(a),o=i.w,s=i.h,l=new Ii({width:o||1,height:s||1});for(var c in e){var u=e[c],d=r[c].paddedRect;Ii.copy(u.data,l,{x:0,y:0},{x:d.x+1,y:d.y+1},u.data)}for(var p in t){var h=t[p],f=n[p].paddedRect,m=f.x+1,g=f.y+1,v=h.data.width,y=h.data.height;Ii.copy(h.data,l,{x:0,y:0},{x:m,y:g},h.data),Ii.copy(h.data,l,{x:0,y:y-1},{x:m,y:g-1},{width:v,height:1}),Ii.copy(h.data,l,{x:0,y:0},{x:m,y:g+y},{width:v,height:1}),Ii.copy(h.data,l,{x:v-1,y:0},{x:m-1,y:g},{width:1,height:y}),Ii.copy(h.data,l,{x:0,y:0},{x:m+v,y:g},{width:1,height:y})}this.image=l,this.iconPositions=r,this.patternPositions=n};Gs.prototype.addImages=function(e,t,r){for(var n in e){var a=e[n],i={x:0,y:0,w:a.data.width+2,h:a.data.height+2};r.push(i),t[n]=new Us(i,a),a.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},Gs.prototype.patchUpdatedImages=function(e,t){for(var r in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t),this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)},Gs.prototype.patchUpdatedImage=function(e,t,r){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,a=n[0],i=n[1];r.update(t.data,void 0,{x:a,y:i})}},fn("ImagePosition",Us),fn("ImageAtlas",Gs);var qs=self.HTMLImageElement,Ks=self.HTMLCanvasElement,Xs=self.HTMLVideoElement,Zs=self.ImageData,Js=function(e,t,r,n){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this.update(t,n)};Js.prototype.update=function(e,t,r){var n=e.width,a=e.height,i=!(this.size&&this.size[0]===n&&this.size[1]===a||r),o=this.context,s=o.gl;if(this.useMipmap=Boolean(t&&t.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1),o.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!t||!1!==t.premultiply)),i)this.size=[n,a],e instanceof qs||e instanceof Ks||e instanceof Xs||e instanceof Zs?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,e):s.texImage2D(s.TEXTURE_2D,0,this.format,n,a,0,this.format,s.UNSIGNED_BYTE,e.data);else{var l=r||{x:0,y:0},c=l.x,u=l.y;e instanceof qs||e instanceof Ks||e instanceof Xs||e instanceof Zs?s.texSubImage2D(s.TEXTURE_2D,0,c,u,s.RGBA,s.UNSIGNED_BYTE,e):s.texSubImage2D(s.TEXTURE_2D,0,c,u,n,a,s.RGBA,s.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},Js.prototype.bind=function(e,t,r){var n=this.context.gl;n.bindTexture(n.TEXTURE_2D,this.texture),r!==n.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=n.LINEAR),e!==this.filter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,r||e),this.filter=e),t!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,t),this.wrap=t)},Js.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Js.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var $s=function(e,t,r,n,a){var i,o,s=8*a-n-1,l=(1<<s)-1,c=l>>1,u=-7,d=r?a-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=p,u-=8);for(o=i&(1<<-u)-1,i>>=-u,u+=n;u>0;o=256*o+e[t+d],d+=p,u-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=c}return(h?-1:1)*o*Math.pow(2,i-n)},Qs=function(e,t,r,n,a,i){var o,s,l,c=8*i-a-1,u=(1<<c)-1,d=u>>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+h]=255&s,h+=f,s/=256,a-=8);for(o=o<<a|s,c+=a;c>0;e[r+h]=255&o,h+=f,o/=256,c-=8);e[r+h-f]|=128*m},el=tl;function tl(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}function rl(e){return e.type===tl.Bytes?e.readVarint()+e.pos:e.pos+1}function nl(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function al(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var a=r.pos-1;a>=e;a--)r.buf[a+n]=r.buf[a]}function il(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function ol(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function sl(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function ll(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function cl(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function ul(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function dl(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function pl(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function hl(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function fl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function ml(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function gl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}tl.Varint=0,tl.Fixed64=1,tl.Bytes=2,tl.Fixed32=5,tl.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),a=n>>3,i=this.pos;this.type=7&n,e(a,t,this),this.pos===i&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=fl(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=gl(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=fl(this.buf,this.pos)+4294967296*fl(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=fl(this.buf,this.pos)+4294967296*gl(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=$s(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=$s(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,a,i=r.buf;if(n=(112&(a=i[r.pos++]))>>4,a<128)return nl(e,n,t);if(n|=(127&(a=i[r.pos++]))<<3,a<128)return nl(e,n,t);if(n|=(127&(a=i[r.pos++]))<<10,a<128)return nl(e,n,t);if(n|=(127&(a=i[r.pos++]))<<17,a<128)return nl(e,n,t);if(n|=(127&(a=i[r.pos++]))<<24,a<128)return nl(e,n,t);if(n|=(1&(a=i[r.pos++]))<<31,a<128)return nl(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=function(e,t,r){for(var n="",a=t;a<r;){var i,o,s,l=e[a],c=null,u=l>239?4:l>223?3:l>191?2:1;if(a+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(i=e[a+1]))&&(c=(31&l)<<6|63&i)<=127&&(c=null):3===u?(i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&((c=(15&l)<<12|(63&i)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(i=e[a+1],o=e[a+2],s=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&i)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),a+=u}return n}(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==tl.Bytes)return e.push(this.readVarint(t));var r=rl(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==tl.Bytes)return e.push(this.readSVarint());var t=rl(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==tl.Bytes)return e.push(this.readBoolean());var t=rl(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==tl.Bytes)return e.push(this.readFloat());var t=rl(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==tl.Bytes)return e.push(this.readDouble());var t=rl(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==tl.Bytes)return e.push(this.readFixed32());var t=rl(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==tl.Bytes)return e.push(this.readSFixed32());var t=rl(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==tl.Bytes)return e.push(this.readFixed64());var t=rl(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==tl.Bytes)return e.push(this.readSFixed64());var t=rl(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===tl.Varint)for(;this.buf[this.pos++]>127;);else if(t===tl.Bytes)this.pos=this.readVarint()+this.pos;else if(t===tl.Fixed32)this.pos+=4;else{if(t!==tl.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),ml(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),ml(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),ml(this.buf,-1&e,this.pos),ml(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),ml(this.buf,-1&e,this.pos),ml(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}(r,0,t),function(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,a,i=0;i<t.length;i++){if((n=t.charCodeAt(i))>55295&&n<57344){if(!a){n>56319||i+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):a=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else a&&(e[r++]=239,e[r++]=191,e[r++]=189,a=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&al(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Qs(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Qs(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var r=this.pos;e(t,this);var n=this.pos-r;n>=128&&al(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,tl.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,il,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,ol,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,cl,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,sl,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,ll,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,ul,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,dl,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,pl,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,hl,t)},writeBytesField:function(e,t){this.writeTag(e,tl.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,tl.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,tl.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,tl.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,tl.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,tl.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,tl.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,tl.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,tl.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,tl.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var vl=3;function yl(e,t,r){1===e&&r.readMessage(bl,t)}function bl(e,t,r){if(3===e){var n=r.readMessage(_l,{}),a=n.id,i=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;t.push({id:a,bitmap:new Di({width:o+2*vl,height:s+2*vl},i),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function _l(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}var xl=vl,wl=function(e){var t=this;this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){t._triggered=!1,t._callback()})};wl.prototype.trigger=function(){var e=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((function(){e._triggered=!1,e._callback()}),0))};var kl=function(e,t,r){this.target=e,this.parent=t,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},g(["receive","process"],this),this.invoker=new wl(this.process),this.target.addEventListener("message",this.receive,!1)};function Ml(e,t,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[e*n-2*Math.PI*6378137/2,t*n-2*Math.PI*6378137/2]}kl.prototype.send=function(e,t,r,n){var a=this,i=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[i]=r);var o=[];return this.target.postMessage({id:i,type:e,hasCallback:!!r,targetMapId:n,sourceMapId:this.mapId,data:gn(t,o)},o),{cancel:function(){r&&delete a.callbacks[i],a.target.postMessage({id:i,type:"<cancel>",targetMapId:n,sourceMapId:a.mapId})}}},kl.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if("<cancel>"===t.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()},kl.prototype.process=function(){var e=this;if(this.taskQueue.length){var t=this.taskQueue.shift(),r=this.tasks[t];if(delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),r)if("<response>"===r.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(r.error?n(vn(r.error)):n(null,vn(r.data)))}else{var a=!1,i=r.hasCallback?function(r,n){a=!0,delete e.cancelCallbacks[t];var i=[];e.target.postMessage({id:t,type:"<response>",sourceMapId:e.mapId,error:r?gn(r):null,data:gn(n,i)},i)}:function(e){a=!0},o=null,s=vn(r.data);if(this.parent[r.type])o=this.parent[r.type](r.sourceMapId,s,i);else if(this.parent.getWorkerSource){var l=r.type.split(".");o=this.parent.getWorkerSource(r.sourceMapId,l[0],s.source)[l[1]](s,i)}else i(new Error("Could not find function "+r.type));!a&&o&&o.cancel&&(this.cancelCallbacks[t]=o.cancel)}}},kl.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var Tl=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};Tl.prototype.setNorthEast=function(e){return this._ne=e instanceof Cl?new Cl(e.lng,e.lat):Cl.convert(e),this},Tl.prototype.setSouthWest=function(e){return this._sw=e instanceof Cl?new Cl(e.lng,e.lat):Cl.convert(e),this},Tl.prototype.extend=function(e){var t,r,n=this._sw,a=this._ne;if(e instanceof Cl)t=e,r=e;else{if(!(e instanceof Tl))return Array.isArray(e)?e.every(Array.isArray)?this.extend(Tl.convert(e)):this.extend(Cl.convert(e)):this;if(t=e._sw,r=e._ne,!t||!r)return this}return n||a?(n.lng=Math.min(t.lng,n.lng),n.lat=Math.min(t.lat,n.lat),a.lng=Math.max(r.lng,a.lng),a.lat=Math.max(r.lat,a.lat)):(this._sw=new Cl(t.lng,t.lat),this._ne=new Cl(r.lng,r.lat)),this},Tl.prototype.getCenter=function(){return new Cl((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Tl.prototype.getSouthWest=function(){return this._sw},Tl.prototype.getNorthEast=function(){return this._ne},Tl.prototype.getNorthWest=function(){return new Cl(this.getWest(),this.getNorth())},Tl.prototype.getSouthEast=function(){return new Cl(this.getEast(),this.getSouth())},Tl.prototype.getWest=function(){return this._sw.lng},Tl.prototype.getSouth=function(){return this._sw.lat},Tl.prototype.getEast=function(){return this._ne.lng},Tl.prototype.getNorth=function(){return this._ne.lat},Tl.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Tl.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Tl.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Tl.convert=function(e){return!e||e instanceof Tl?e:new Tl(e)};var Cl=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Cl.prototype.wrap=function(){return new Cl(u(this.lng,-180,180),this.lat)},Cl.prototype.toArray=function(){return[this.lng,this.lat]},Cl.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Cl.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new Tl(new Cl(this.lng-r,this.lat-t),new Cl(this.lng+r,this.lat+t))},Cl.convert=function(e){if(e instanceof Cl)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Cl(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Cl(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Sl=2*Math.PI*6378137;function Ll(e){return Sl*Math.cos(e*Math.PI/180)}function Al(e){return(180+e)/360}function El(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Dl(e,t){return e/Ll(t)}function Il(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}var Pl=function(e,t,r){void 0===r&&(r=0),this.x=+e,this.y=+t,this.z=+r};Pl.fromLngLat=function(e,t){void 0===t&&(t=0);var r=Cl.convert(e);return new Pl(Al(r.lng),El(r.lat),Dl(t,r.lat))},Pl.prototype.toLngLat=function(){return new Cl(360*this.x-180,Il(this.y))},Pl.prototype.toAltitude=function(){return this.z*Ll(Il(this.y))},Pl.prototype.meterInMercatorCoordinateUnits=function(){return 1/Sl*(e=Il(this.y),1/Math.cos(e*Math.PI/180));var e};var Ol=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=zl(0,e,t,r)};Ol.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Ol.prototype.url=function(e,t){var r,n,a,i,o,s=(r=this.x,n=this.y,a=this.z,i=Ml(256*r,256*(n=Math.pow(2,a)-n-1),a),o=Ml(256*(r+1),256*(n+1),a),i[0]+","+i[1]+","+o[0]+","+o[1]),l=function(e,t,r){for(var n,a="",i=e;i>0;i--)a+=(t&(n=1<<i-1)?1:0)+(r&n?2:0);return a}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===t?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",l).replace("{bbox-epsg-3857}",s)},Ol.prototype.getTilePoint=function(e){var t=Math.pow(2,this.z);return new a((e.x*t-this.x)*ti,(e.y*t-this.y)*ti)};var Rl=function(e,t){this.wrap=e,this.canonical=t,this.key=zl(e,t.z,t.x,t.y)},Fl=function(e,t,r,n,a){this.overscaledZ=e,this.wrap=t,this.canonical=new Ol(r,+n,+a),this.key=zl(t,e,n,a)};function zl(e,t,r,n){(e*=2)<0&&(e=-1*e-1);var a=1<<t;return 32*(a*a*e+a*n+r)+t}Fl.prototype.equals=function(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)},Fl.prototype.scaledTo=function(e){var t=this.canonical.z-e;return e>this.canonical.z?new Fl(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Fl(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Fl.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ<this.overscaledZ&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t},Fl.prototype.children=function(e){if(this.overscaledZ>=e)return[new Fl(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Fl(t,this.wrap,t,r,n),new Fl(t,this.wrap,t,r+1,n),new Fl(t,this.wrap,t,r,n+1),new Fl(t,this.wrap,t,r+1,n+1)]},Fl.prototype.isLessThan=function(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))},Fl.prototype.wrapped=function(){return new Fl(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Fl.prototype.unwrapTo=function(e){return new Fl(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)},Fl.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Fl.prototype.toUnwrapped=function(){return new Rl(this.wrap,this.canonical)},Fl.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Fl.prototype.getTilePoint=function(e){return this.canonical.getTilePoint(new Pl(e.x-this.wrap,e.y))},fn("CanonicalTileID",Ol),fn("OverscaledTileID",Fl,{omit:["posMatrix"]});var Nl=function(e,t,r){if(this.uid=e,t.height!==t.width)throw new RangeError("DEM tiles must be square");if(r&&"mapbox"!==r&&"terrarium"!==r)return w('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');var n=this.dim=t.height;this.stride=this.dim+2,this.data=new Int32Array(this.stride*this.stride);for(var a=t.data,i="terrarium"===r?this._unpackTerrarium:this._unpackMapbox,o=0;o<n;o++)for(var s=0;s<n;s++){var l=4*(o*n+s);this.set(s,o,i(a[l],a[l+1],a[l+2]))}for(var c=0;c<n;c++)this.set(-1,c,this.get(0,c)),this.set(n,c,this.get(n-1,c)),this.set(c,-1,this.get(c,0)),this.set(c,n,this.get(c,n-1));this.set(-1,-1,this.get(0,0)),this.set(n,-1,this.get(n-1,0)),this.set(-1,n,this.get(0,n-1)),this.set(n,n,this.get(n-1,n-1))};Nl.prototype.set=function(e,t,r){this.data[this._idx(e,t)]=r+65536},Nl.prototype.get=function(e,t){return this.data[this._idx(e,t)]-65536},Nl.prototype._idx=function(e,t){if(e<-1||e>=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},Nl.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},Nl.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},Nl.prototype.getPixels=function(){return new Ii({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Nl.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var n=t*this.dim,a=t*this.dim+this.dim,i=r*this.dim,o=r*this.dim+this.dim;switch(t){case-1:n=a-1;break;case 1:a=n+1}switch(r){case-1:i=o-1;break;case 1:o=i+1}for(var s=-t*this.dim,l=-r*this.dim,c=i;c<o;c++)for(var u=n;u<a;u++)this.set(u,c,e.get(u+s,c+l))},fn("DEMData",Nl);var jl=Zn([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Bl=function(e){this._stringToNumber={},this._numberToString=[];for(var t=0;t<e.length;t++){var r=e[t];this._stringToNumber[r]=t,this._numberToString[t]=r}};Bl.prototype.encode=function(e){return this._stringToNumber[e]},Bl.prototype.decode=function(e){return this._numberToString[e]};var Yl=function(e,t,r,n){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=n,this.properties=e.properties,null!=e.id&&(this.id=e.id)},Hl={geometry:{configurable:!0}};Hl.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Hl.geometry.set=function(e){this._geometry=e},Yl.prototype.toJSON=function(){var e={geometry:this.geometry};for(var t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e},Object.defineProperties(Yl.prototype,Hl);var Vl=function(){this.state={},this.stateChanges={},this.deletedStates={}};Vl.prototype.updateState=function(e,t,r){var n=String(t);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][n]=this.stateChanges[e][n]||{},d(this.stateChanges[e][n],r),null===this.deletedStates[e])for(var a in this.deletedStates[e]={},this.state[e])a!==n&&(this.deletedStates[e][a]=null);else if(this.deletedStates[e]&&null===this.deletedStates[e][n])for(var i in this.deletedStates[e][n]={},this.state[e][n])r[i]||(this.deletedStates[e][n][i]=null);else for(var o in r)this.deletedStates[e]&&this.deletedStates[e][n]&&null===this.deletedStates[e][n][o]&&delete this.deletedStates[e][n][o]},Vl.prototype.removeFeatureState=function(e,t,r){if(null!==this.deletedStates[e]){var n=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},r&&void 0!==t&&t>=0)null!==this.deletedStates[e][n]&&(this.deletedStates[e][n]=this.deletedStates[e][n]||{},this.deletedStates[e][n][r]=null);else if(void 0!==t&&t>=0)if(this.stateChanges[e]&&this.stateChanges[e][n])for(r in this.deletedStates[e][n]={},this.stateChanges[e][n])this.deletedStates[e][n][r]=null;else this.deletedStates[e][n]=null;else this.deletedStates[e]=null}},Vl.prototype.getState=function(e,t){var r=String(t),n=this.state[e]||{},a=this.stateChanges[e]||{},i=d({},n[r],a[r]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){var o=this.deletedStates[e][t];if(null===o)return{};for(var s in o)delete i[s]}return i},Vl.prototype.initializeTileState=function(e,t){e.setFeatureState(this.state,t)},Vl.prototype.coalesceChanges=function(e,t){var r={};for(var n in this.stateChanges){this.state[n]=this.state[n]||{};var a={};for(var i in this.stateChanges[n])this.state[n][i]||(this.state[n][i]={}),d(this.state[n][i],this.stateChanges[n][i]),a[i]=this.state[n][i];r[n]=a}for(var o in this.deletedStates){this.state[o]=this.state[o]||{};var s={};if(null===this.deletedStates[o])for(var l in this.state[o])s[l]={},this.state[o][l]={};else for(var c in this.deletedStates[o]){if(null===this.deletedStates[o][c])this.state[o][c]={};else for(var u=0,p=Object.keys(this.deletedStates[o][c]);u<p.length;u+=1){var h=p[u];delete this.state[o][c][h]}s[c]=this.state[o][c]}r[o]=r[o]||{},d(r[o],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(var f in e)e[f].setFeatureState(r,t)};var Ul=function(e,t,r){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=t||new cn(ti,16,0),this.grid3D=new cn(ti,16,0),this.featureIndexArray=r||new Ea};function Wl(e){for(var t=1/0,r=1/0,n=-1/0,a=-1/0,i=0,o=e;i<o.length;i+=1){var s=o[i];t=Math.min(t,s.x),r=Math.min(r,s.y),n=Math.max(n,s.x),a=Math.max(a,s.y)}return{minX:t,minY:r,maxX:n,maxY:a}}function Gl(e,t){return t-e}Ul.prototype.insert=function(e,t,r,n,a,i){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,a);for(var s=i?this.grid3D:this.grid,l=0;l<t.length;l++){for(var c=t[l],u=[1/0,1/0,-1/0,-1/0],d=0;d<c.length;d++){var p=c[d];u[0]=Math.min(u[0],p.x),u[1]=Math.min(u[1],p.y),u[2]=Math.max(u[2],p.x),u[3]=Math.max(u[3],p.y)}u[0]<ti&&u[1]<ti&&u[2]>=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},Ul.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Oo.VectorTile(new el(this.rawTileData)).layers,this.sourceLayerCoder=new Bl(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Ul.prototype.query=function(e,t,r){var n=this;this.loadVTLayers();for(var i=e.params||{},o=ti/e.tileSize/e.scale,s=Fr(i.filter),l=e.queryGeometry,c=e.queryPadding*o,u=Wl(l),d=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),p=Wl(e.cameraQueryGeometry),h=0,f=this.grid3D.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c,(function(t,r,n,i){return function(e,t,r,n,i){for(var o=0,s=e;o<s.length;o+=1){var l=s[o];if(t<=l.x&&r<=l.y&&n>=l.x&&i>=l.y)return!0}var c=[new a(t,r),new a(t,i),new a(n,i),new a(n,r)];if(e.length>2)for(var u=0,d=c;u<d.length;u+=1)if(mi(e,d[u]))return!0;for(var p=0;p<e.length-1;p++)if(gi(e[p],e[p+1],c))return!0;return!1}(e.cameraQueryGeometry,t-c,r-c,n+c,i+c)}));h<f.length;h+=1){var m=f[h];d.push(m)}d.sort(Gl);for(var g,v={},y=function(a){var c=d[a];if(c!==g){g=c;var u=n.featureIndexArray.get(c),p=null;n.loadMatchingFeature(v,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,s,i.layers,t,(function(t,a){p||(p=ni(t));var i={};return t.id&&(i=r.getState(a.sourceLayer||"_geojsonTileLayer",t.id)),a.queryIntersectsFeature(l,t,i,p,n.z,e.transform,o,e.pixelPosMatrix)}))}},b=0;b<d.length;b++)y(b);return v},Ul.prototype.loadMatchingFeature=function(e,t,r,n,a,i,o,s){var l=this.bucketLayerIDs[t];if(!i||function(e,t){for(var r=0;r<e.length;r++)if(t.indexOf(e[r])>=0)return!0;return!1}(i,l)){var c=this.sourceLayerCoder.decode(r),u=this.vtLayers[c].feature(n);if(a(new Dn(this.tileID.overscaledZ),u))for(var d=0;d<l.length;d++){var p=l[d];if(!(i&&i.indexOf(p)<0)){var h=o[p];if(h){var f=!s||s(u,h);if(f){var m=new Yl(u,this.z,this.x,this.y);m.layer=h.serialize();var g=e[p];void 0===g&&(g=e[p]=[]),g.push({featureIndex:n,feature:m,intersectionZ:f})}}}}}},Ul.prototype.lookupSymbolFeatures=function(e,t,r,n,a,i){var o={};this.loadVTLayers();for(var s=Fr(n),l=0,c=e;l<c.length;l+=1){var u=c[l];this.loadMatchingFeature(o,t,r,u,s,a,i)}return o},Ul.prototype.hasLayer=function(e){for(var t=0,r=this.bucketLayerIDs;t<r.length;t+=1)for(var n=0,a=r[t];n<a.length;n+=1)if(e===a[n])return!0;return!1},fn("FeatureIndex",Ul,{omit:["rawTileData","sourceLayerCoder"]});var ql=function(e,t){this.tileID=e,this.uid=h(),this.uses=0,this.tileSize=t,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.expiredRequestCount=0,this.state="loading"};function Kl(e,t,r,n,a){if(void 0===t.segment)return!0;for(var i=t,o=t.segment+1,s=0;s>-r/2;){if(--o<0)return!1;s-=e[o].dist(i),i=e[o]}s+=e[o].dist(e[o+1]),o++;for(var l=[],c=0;s<r/2;){var u=e[o-1],d=e[o],p=e[o+1];if(!p)return!1;var h=u.angleTo(d)-d.angleTo(p);for(h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:h}),c+=h;s-l[0].distance>n;)c-=l.shift().angleDelta;if(c>a)return!1;o++,s+=d.dist(p)}return!0}function Xl(e){for(var t=0,r=0;r<e.length-1;r++)t+=e[r].dist(e[r+1]);return t}function Zl(e,t,r){return e?.6*t*r:0}function Jl(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function $l(e,t,r,n,a,i){for(var o=Zl(r,a,i),s=Jl(r,n)*i,l=0,c=Xl(e)/2,u=0;u<e.length-1;u++){var d=e[u],p=e[u+1],h=d.dist(p);if(l+h>c){var f=(c-l)/h,m=yt(d.x,p.x,f),g=yt(d.y,p.y,f),v=new _s(m,g,p.angleTo(d),u);return v._round(),!o||Kl(e,v,s,o,t)?v:void 0}l+=h}}function Ql(e,t,r,n,a,i,o,s,l){var c=Zl(n,i,o),u=Jl(n,a),d=u*o,p=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d<t/4&&(t=d+t/4),function e(t,r,n,a,i,o,s,l,c){for(var u=o/2,d=Xl(t),p=0,h=r-n,f=[],m=0;m<t.length-1;m++){for(var g=t[m],v=t[m+1],y=g.dist(v),b=v.angleTo(g);h+n<p+y;){var _=((h+=n)-p)/y,x=yt(g.x,v.x,_),w=yt(g.y,v.y,_);if(x>=0&&x<c&&w>=0&&w<c&&h-u>=0&&h+u<=d){var k=new _s(x,w,b,m);k._round(),a&&!Kl(t,k,o,a,i)||f.push(k)}}p+=y}return l||f.length||s||(f=e(t,p/2,n,a,i,o,s,!0,c)),f}(e,p?t/2*s%t:(u/2+2*i)*o*s%t,t,c,r,d,p,!1,l)}ql.prototype.registerFadeDuration=function(e){var t=e+this.timeAdded;t<O.now()||this.fadeEndTime&&t<this.fadeEndTime||(this.fadeEndTime=t)},ql.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},ql.prototype.loadVectorData=function(e,t,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(var n in e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){var r={};if(!t)return r;for(var n=function(){var e=i[a],n=e.layerIds.map((function(e){return t.getLayer(e)})).filter(Boolean);if(0!==n.length){e.layers=n,e.stateDependentLayerIds&&(e.stateDependentLayers=e.stateDependentLayerIds.map((function(e){return n.filter((function(t){return t.id===e}))[0]})));for(var o=0,s=n;o<s.length;o+=1){var l=s[o];r[l.id]=e}}},a=0,i=e;a<i.length;a+=1)n();return r}(e.buckets,t.style),this.hasSymbolBuckets=!1,this.buckets){var a=this.buckets[n];if(a instanceof Is){if(this.hasSymbolBuckets=!0,!r)break;a.justReloaded=!0}}for(var i in this.queryPadding=0,this.buckets){var o=this.buckets[i];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(i).queryRadius(o))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new _a},ql.prototype.unloadVectorData=function(){for(var e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},ql.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"},ql.prototype.getBucket=function(e){return this.buckets[e.id]},ql.prototype.upload=function(e){for(var t in this.buckets){var r=this.buckets[t];r.uploadPending()&&r.upload(e)}var n=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Js(e,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Js(e,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)},ql.prototype.prepare=function(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)},ql.prototype.queryRenderedFeatures=function(e,t,r,n,a,i,o,s,l){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:n,scale:a,tileSize:this.tileSize,pixelPosMatrix:l,transform:o,params:i,queryPadding:this.queryPadding*s},e,t):{}},ql.prototype.querySourceFeatures=function(e,t){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var r=this.latestFeatureIndex.loadVTLayers(),n=t?t.sourceLayer:"",a=r._geojsonTileLayer||r[n];if(a)for(var i=Fr(t&&t.filter),o=this.tileID.canonical,s=o.z,l=o.x,c=o.y,u={z:s,x:l,y:c},d=0;d<a.length;d++){var p=a.feature(d);if(i(new Dn(this.tileID.overscaledZ),p)){var h=new Yl(p,s,l,c);h.tile=u,e.push(h)}}}},ql.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},ql.prototype.setMask=function(e,t){if(!o(this.mask,e)&&(this.mask=e,this.clearMask(),!o(e,{0:!0}))){var r=new Qn,n=new fa;this.segments=new Ia,this.segments.prepareSegment(0,r,n);for(var i=Object.keys(e),s=0;s<i.length;s++){var l=e[+i[s]],c=ti>>l.z,u=new a(l.x*c,l.y*c),d=new a(u.x+c,u.y+c),p=this.segments.prepareSegment(4,r,n);r.emplaceBack(u.x,u.y,u.x,u.y),r.emplaceBack(d.x,u.y,d.x,u.y),r.emplaceBack(u.x,d.y,u.x,d.y),r.emplaceBack(d.x,d.y,d.x,d.y);var h=p.vertexLength;n.emplaceBack(h,h+1,h+2),n.emplaceBack(h+1,h+2,h+3),p.vertexLength+=4,p.primitiveLength+=2}this.maskedBoundsBuffer=t.createVertexBuffer(r,jl.members),this.maskedIndexBuffer=t.createIndexBuffer(n)}},ql.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},ql.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},ql.prototype.setExpiryData=function(e){var t=this.expirationTime;if(e.cacheControl){var r=T(e.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){var n=Date.now(),a=!1;if(this.expirationTime>n)a=!1;else if(t)if(this.expirationTime<t)a=!0;else{var i=this.expirationTime-t;i?this.expirationTime=n+Math.max(i,3e4):a=!0}else a=!0;a?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},ql.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},ql.prototype.setFeatureState=function(e,t){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(e).length){var r=this.latestFeatureIndex.loadVTLayers();for(var n in this.buckets){var a=this.buckets[n],i=a.layers[0].sourceLayer||"_geojsonTileLayer",o=r[i],s=e[i];o&&s&&0!==Object.keys(s).length&&(a.update(s,o,this.imageAtlas&&this.imageAtlas.patternPositions||{}),t&&t.style&&(this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(n).queryRadius(a))))}}},ql.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},ql.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<O.now()},ql.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},ql.prototype.setHoldDuration=function(e){this.symbolFadeHoldUntil=O.now()+e};var ec=function(e,t,r,n,i,o,s,l,c,u,d,p){var h=s.top*l-c,f=s.bottom*l+c,m=s.left*l-c,g=s.right*l+c;if(this.boxStartIndex=e.length,u){var v=f-h,y=g-m;v>0&&(v=Math.max(10*l,v),this._addLineCollisionCircles(e,t,r,r.segment,y,v,n,i,o,d))}else{if(p){var b=new a(m,h),_=new a(g,h),x=new a(m,f),w=new a(g,f),k=p*Math.PI/180;b._rotate(k),_._rotate(k),x._rotate(k),w._rotate(k),m=Math.min(b.x,_.x,x.x,w.x),g=Math.max(b.x,_.x,x.x,w.x),h=Math.min(b.y,_.y,x.y,w.y),f=Math.max(b.y,_.y,x.y,w.y)}e.emplaceBack(r.x,r.y,m,h,g,f,n,i,o,0,0)}this.boxEndIndex=e.length};ec.prototype._addLineCollisionCircles=function(e,t,r,n,a,i,o,s,l,c){var u=i/2,d=Math.floor(a/u)||1,p=1+.4*Math.log(c)/Math.LN2,h=Math.floor(d*p/2),f=-i/2,m=r,g=n+1,v=f,y=-a/2,b=y-a/4;do{if(--g<0){if(v>y)return;g=0;break}v-=t[g].dist(m),m=t[g]}while(v>b);for(var _=t[g].dist(t[g+1]),x=-h;x<d+h;x++){var w=x*u,k=y+w;if(w<0&&(k+=w),w>a&&(k+=w-a),!(k<v)){for(;v+_<k;){if(v+=_,++g+1>=t.length)return;_=t[g].dist(t[g+1])}var M=k-v,T=t[g],C=t[g+1].sub(T)._unit()._mult(M)._add(T)._round(),S=Math.abs(k-f)<u?0:.8*(k-f);e.emplaceBack(C.x,C.y,-i/2,-i/2,i/2,i/2,o,s,l,i/2,S)}}};var tc=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=rc),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function rc(e,t){return e<t?-1:e>t?1:0}function nc(e,t,r){void 0===t&&(t=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,o=-1/0,s=-1/0,l=e[0],c=0;c<l.length;c++){var u=l[c];(!c||u.x<n)&&(n=u.x),(!c||u.y<i)&&(i=u.y),(!c||u.x>o)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var d=o-n,p=s-i,h=Math.min(d,p),f=h/2,m=new tc([],ac);if(0===h)return new a(n,i);for(var g=n;g<o;g+=h)for(var v=i;v<s;v+=h)m.push(new ic(g+f,v+f,f,e));for(var y=function(e){for(var t=0,r=0,n=0,a=e[0],i=0,o=a.length,s=o-1;i<o;s=i++){var l=a[i],c=a[s],u=l.x*c.y-c.x*l.y;r+=(l.x+c.x)*u,n+=(l.y+c.y)*u,t+=3*u}return new ic(r/t,n/t,0,e)}(e),b=m.length;m.length;){var _=m.pop();(_.d>y.d||!y.d)&&(y=_,r&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,b)),_.max-y.d<=t||(f=_.h/2,m.push(new ic(_.p.x-f,_.p.y-f,f,e)),m.push(new ic(_.p.x+f,_.p.y-f,f,e)),m.push(new ic(_.p.x-f,_.p.y+f,f,e)),m.push(new ic(_.p.x+f,_.p.y+f,f,e)),b+=4)}return r&&(console.log("num probes: "+b),console.log("best distance: "+y.d)),y.p}function ac(e,t){return t.max-e.max}function ic(e,t,r,n){this.p=new a(e,t),this.h=r,this.d=function(e,t){for(var r=!1,n=1/0,a=0;a<t.length;a++)for(var i=t[a],o=0,s=i.length,l=s-1;o<s;l=o++){var c=i[o],u=i[l];c.y>e.y!=u.y>e.y&&e.x<(u.x-c.x)*(e.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,hi(e,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}tc.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},tc.prototype.pop=function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},tc.prototype.peek=function(){return this.data[0]},tc.prototype._up=function(e){for(var t=this.data,r=this.compare,n=t[e];e>0;){var a=e-1>>1,i=t[a];if(r(n,i)>=0)break;t[e]=i,e=a}t[e]=n},tc.prototype._down=function(e){for(var t=this.data,r=this.compare,n=this.length>>1,a=t[e];e<n;){var i=1+(e<<1),o=t[i],s=i+1;if(s<this.length&&r(t[s],o)<0&&(i=s,o=t[s]),r(o,a)>=0)break;t[e]=o,e=i}t[e]=a};var oc=t((function(e){e.exports=function(e,t){var r,n,a,i,o,s,l,c;for(r=3&e.length,n=e.length-r,a=t,o=3432918353,s=461845907,c=0;c<n;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,a=27492+(65535&(i=5*(65535&(a=(a^=l=(65535&(l=(l=(65535&l)*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(i>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:a^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return a^=e.length,a=2246822507*(65535&(a^=a>>>16))+((2246822507*(a>>>16)&65535)<<16)&4294967295,a=3266489909*(65535&(a^=a>>>13))+((3266489909*(a>>>16)&65535)<<16)&4294967295,(a^=a>>>16)>>>0}})),sc=t((function(e){e.exports=function(e,t){for(var r,n=e.length,a=t^n,i=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(r>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:a^=(255&e.charCodeAt(i+2))<<16;case 2:a^=(255&e.charCodeAt(i+1))<<8;case 1:a=1540483477*(65535&(a^=255&e.charCodeAt(i)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}})),lc=oc,cc=oc,uc=sc;lc.murmur3=cc,lc.murmur2=uc;var dc=7;function pc(e,t){var r=0,n=0,a=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=a-dc;break;case"bottom-right":case"bottom-left":n=-a+dc;break;case"bottom":n=-t+dc;break;case"top":n=t-dc}switch(e){case"top-right":case"bottom-right":r=-a;break;case"top-left":case"bottom-left":r=a;break;case"left":r=t;break;case"right":r=-t}return[r,n]}function hc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var fc=65535;function mc(e,t,r,n,i,o,s,l,c,u,d,p,h){var f=function(e,t,r,n,i,o,s,l){for(var c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=t.positionedGlyphs,d=[],p=0;p<u.length;p++){var h=u[p],f=s[h.fontStack],m=f&&f[h.glyph];if(m){var g=m.rect;if(g){var v=xl+1,y=m.metrics.advance*h.scale/2,b=i?[h.x+y,h.y]:[0,0],_=i?[0,0]:[h.x+y+r[0],h.y+r[1]],x=(i||l)&&h.vertical,w=[0,0];x&&(w=_,_=[0,0]);var k=(m.metrics.left-v)*h.scale-y+_[0],M=(-m.metrics.top-v)*h.scale+_[1],T=k+g.w*h.scale,C=M+g.h*h.scale,S=new a(k,M),L=new a(T,M),A=new a(k,C),E=new a(T,C);if(x){var D=new a(-y,y-t.yOffset),I=-Math.PI/2,P=ls/2-y,O=new a(5-t.yOffset-P,0),R=new(Function.prototype.bind.apply(a,[null].concat(w)));S._rotateAround(I,D)._add(O)._add(R),L._rotateAround(I,D)._add(O)._add(R),A._rotateAround(I,D)._add(O)._add(R),E._rotateAround(I,D)._add(O)._add(R)}if(c){var F=Math.sin(c),z=Math.cos(c),N=[z,-F,F,z];S._matMult(N),L._matMult(N),A._matMult(N),E._matMult(N)}d.push({tl:S,tr:L,bl:A,br:E,tex:g,writingMode:t.writingMode,glyphOffset:b,sectionIndex:h.sectionIndex})}}}return d}(0,r,s,n,i,o,p,e.allowVerticalPlacement),m=e.textSizeData,g=null;"source"===m.kind?(g=[xs*n.layout.get("text-size").evaluate(o,{})])[0]>fc&&w(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===m.kind&&((g=[xs*h.compositeTextSizes[0].evaluate(o,{}),xs*h.compositeTextSizes[1].evaluate(o,{})])[0]>fc||g[1]>fc)&&w(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),e.addSymbols(e.text,f,g,s,i,o,c,t,l.lineStartIndex,l.lineLength);for(var v=0,y=u;v<y.length;v+=1)d[y[v]]=e.text.placedSymbolArray.length-1;return 4*f.length}function gc(e){for(var t in e)return e[t];return null}function vc(e,t,r,n){var a=e.compareText;if(t in a){for(var i=a[t],o=i.length-1;o>=0;o--)if(n.dist(i[o])<r)return!0}else a[t]=[];return a[t].push(n),!1}e.Actor=kl,e.AlphaImage=Di,e.CanonicalTileID=Ol,e.CollisionBoxArray=_a,e.Color=qe,e.DEMData=Nl,e.DataConstantProperty=Bn,e.DictionaryCoder=Bl,e.EXTENT=ti,e.ErrorEvent=we,e.EvaluationParameters=Dn,e.Event=xe,e.Evented=ke,e.FeatureIndex=Ul,e.FillBucket=xo,e.FillExtrusionBucket=No,e.ImageAtlas=Gs,e.ImagePosition=Us,e.LineBucket=Xo,e.LngLat=Cl,e.LngLatBounds=Tl,e.MercatorCoordinate=Pl,e.ONE_EM=ls,e.OverscaledTileID=Fl,e.Point=a,e.Point$1=a,e.ProgramConfiguration=Ja,e.Properties=Wn,e.Protobuf=el,e.RGBAImage=Ii,e.RequestManager=Y,e.ResourceType=le,e.SegmentVector=Ia,e.SourceFeatureState=Vl,e.StructArrayLayout1ui2=ga,e.StructArrayLayout2i4=$n,e.StructArrayLayout2ui4=ma,e.StructArrayLayout3ui6=fa,e.StructArrayLayout4i8=Qn,e.SymbolBucket=Is,e.Texture=Js,e.Tile=ql,e.Transitionable=On,e.Uniform1f=Na,e.Uniform1i=za,e.Uniform2f=ja,e.Uniform3f=Ba,e.Uniform4f=Ya,e.UniformColor=Ha,e.UniformMatrix4f=Ua,e.UnwrappedTileID=Rl,e.ValidationError=Te,e.WritingMode=cs,e.ZoomHistory=yn,e.addDynamicAttributes=As,e.asyncAll=function(e,t,r){if(!e.length)return r(null,[]);var n=e.length,a=new Array(e.length),i=null;e.forEach((function(e,o){t(e,(function(e,t){e&&(i=e),a[o]=t,0==--n&&r(i,a)}))}))},e.bezier=s,e.bindAll=g,e.browser=O,e.cacheEntryPossiblyAdded=function(e){++se>ae&&(e.getActor().send("enforceCacheSizeLimit",ne),se=0)},e.clamp=c,e.clearTileCache=function(e){var t=self.caches.delete(re);e&&t.catch(e).then((function(){return e()}))},e.clone=function(e){var t=new ki(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.clone$1=_,e.config=R,e.create=function(){var e=new ki(16);return ki!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=function(){var e=new ki(9);return ki!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e},e.create$2=function(){var e=new ki(4);return ki!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},e.createCommonjsModule=t,e.createExpression=kr,e.createLayout=Zn,e.createStyleLayer=function(e){return"custom"===e.type?new Ys(e):new Hs[e.type](e)},e.deepEqual=o,e.ease=l,e.emitValidationErrors=ln,e.endsWith=v,e.enforceCacheSizeLimit=function(e){self.caches&&self.caches.open(re).then((function(t){t.keys().then((function(r){for(var n=0;n<r.length-e;n++)t.delete(r[n])}))}))},e.evaluateRadialOffset=pc,e.evaluateSizeForFeature=ks,e.evaluateSizeForZoom=Ms,e.evented=An,e.extend=d,e.featureFilter=Fr,e.filterObject=b,e.fromRotation=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.getAnchorAlignment=ys,e.getAnchorJustification=hc,e.getArrayBuffer=ge,e.getImage=ye,e.getJSON=function(e,t){return me(d(e,{type:"json"}),t)},e.getReferrer=de,e.getVideo=function(e,t){var r,n,a=self.document.createElement("video");a.muted=!0,a.onloadstart=function(){t(null,a)};for(var i=0;i<e.length;i++){var o=self.document.createElement("source");r=e[i],n=void 0,(n=self.document.createElement("a")).href=r,(n.protocol!==self.document.location.protocol||n.host!==self.document.location.host)&&(a.crossOrigin="Anonymous"),o.src=e[i],a.appendChild(o)}return{cancel:function(){}}},e.identity=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.invert=function(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],p=t[10],h=t[11],f=t[12],m=t[13],g=t[14],v=t[15],y=r*s-n*o,b=r*l-a*o,_=r*c-i*o,x=n*l-a*s,w=n*c-i*s,k=a*c-i*l,M=u*m-d*f,T=u*g-p*f,C=u*v-h*f,S=d*g-p*m,L=d*v-h*m,A=p*v-h*g,E=y*A-b*L+_*S+x*C-w*T+k*M;return E?(E=1/E,e[0]=(s*A-l*L+c*S)*E,e[1]=(a*L-n*A-i*S)*E,e[2]=(m*k-g*w+v*x)*E,e[3]=(p*w-d*k-h*x)*E,e[4]=(l*C-o*A-c*T)*E,e[5]=(r*A-a*C+i*T)*E,e[6]=(g*_-f*k-v*b)*E,e[7]=(u*k-p*_+h*b)*E,e[8]=(o*L-s*C+c*M)*E,e[9]=(n*C-r*L-i*M)*E,e[10]=(f*w-m*_+v*y)*E,e[11]=(d*_-u*w-h*y)*E,e[12]=(s*T-o*S-l*M)*E,e[13]=(r*S-n*T+a*M)*E,e[14]=(m*b-f*x-g*y)*E,e[15]=(u*x-d*b+p*y)*E,e):null},e.isChar=bn,e.isMapboxURL=H,e.keysDifference=function(e,t){var r=[];for(var n in e)n in t||r.push(n);return r},e.makeRequest=me,e.mapObject=y,e.mercatorXfromLng=Al,e.mercatorYfromLat=El,e.mercatorZfromAltitude=Dl,e.multiply=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],p=t[9],h=t[10],f=t[11],m=t[12],g=t[13],v=t[14],y=t[15],b=r[0],_=r[1],x=r[2],w=r[3];return e[0]=b*n+_*s+x*d+w*m,e[1]=b*a+_*l+x*p+w*g,e[2]=b*i+_*c+x*h+w*v,e[3]=b*o+_*u+x*f+w*y,b=r[4],_=r[5],x=r[6],w=r[7],e[4]=b*n+_*s+x*d+w*m,e[5]=b*a+_*l+x*p+w*g,e[6]=b*i+_*c+x*h+w*v,e[7]=b*o+_*u+x*f+w*y,b=r[8],_=r[9],x=r[10],w=r[11],e[8]=b*n+_*s+x*d+w*m,e[9]=b*a+_*l+x*p+w*g,e[10]=b*i+_*c+x*h+w*v,e[11]=b*o+_*u+x*f+w*y,b=r[12],_=r[13],x=r[14],w=r[15],e[12]=b*n+_*s+x*d+w*m,e[13]=b*a+_*l+x*p+w*g,e[14]=b*i+_*c+x*h+w*v,e[15]=b*o+_*u+x*f+w*y,e},e.mvt=Oo,e.number=yt,e.ortho=function(e,t,r,n,a,i,o){var s=1/(t-r),l=1/(n-a),c=1/(i-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(a+n)*l,e[14]=(o+i)*c,e[15]=1,e},e.parseGlyphPBF=function(e){return new el(e).readFields(yl,[])},e.pbf=el,e.performSymbolLayout=function(e,t,r,n,i,o){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=ti/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){var d=e.textSizeData,p=d.minZoom,h=d.maxZoom;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new Dn(p)),c["text-size"].possiblyEvaluate(new Dn(h))]}if("composite"===e.iconSizeData.kind){var f=e.iconSizeData,m=f.minZoom,g=f.maxZoom;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new Dn(m)),c["icon-size"].possiblyEvaluate(new Dn(g))]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new Dn(e.zoom+1)),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new Dn(e.zoom+1)),u.textMaxSize=c["text-size"].possiblyEvaluate(new Dn(18));for(var v=l.get("text-line-height")*ls,y="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),b=l.get("text-keep-upright"),_=function(){var o=k[x],s=l.get("text-font").evaluate(o,{}).join(","),c=r,d={horizontal:{},vertical:void 0},p=o.text,h=[0,0];if(p){var f=p.toString(),m=l.get("text-letter-spacing").evaluate(o,{})*ls,g=function(e){for(var t=0,r=e;t<r.length;t+=1)if(!xn(r[t].charCodeAt(0)))return!1;return!0}(f)?m:0,_=l.get("text-anchor").evaluate(o,{}),M=l.get("text-variable-anchor"),T=l.get("text-radial-offset").evaluate(o,{});M||(h=T?pc(_,T*ls):l.get("text-offset").evaluate(o,{}).map((function(e){return e*ls})));var C=y?"center":l.get("text-justify").evaluate(o,{}),S="point"===l.get("symbol-placement")?l.get("text-max-width").evaluate(o,{})*ls:0,L=function(){e.allowVerticalPlacement&&_n(f)&&(d.vertical=ds(p,t,s,S,v,_,"left",g,h,cs.vertical,!0))};if(!y&&M){for(var A="auto"===C?M.map((function(e){return hc(e)})):[C],E=!1,D=0;D<A.length;D++){var I=A[D];if(!d.horizontal[I])if(E)d.horizontal[I]=d.horizontal[0];else{var P=ds(p,t,s,S,v,"center",I,g,h,cs.horizontal,!1);P&&(d.horizontal[I]=P,E=1===P.lineCount)}}L()}else{"auto"===C&&(C=hc(_));var O=ds(p,t,s,S,v,_,C,g,h,cs.horizontal,!1);O&&(d.horizontal[C]=O),L(),_n(f)&&y&&b&&(d.vertical=ds(p,t,s,S,v,_,C,g,h,cs.vertical,!1))}}var R=void 0;if(o.icon){var F=n[o.icon];F&&(R=function(e,t,r){var n=ys(r),a=n.horizontalAlign,i=n.verticalAlign,o=t[0],s=t[1],l=o-e.displaySize[0]*a,c=l+e.displaySize[0],u=s-e.displaySize[1]*i;return{image:e,top:u,bottom:u+e.displaySize[1],left:l,right:c}}(i[o.icon],l.get("icon-offset").evaluate(o,{}),l.get("icon-anchor").evaluate(o,{})),void 0===e.sdfIcons?e.sdfIcons=F.sdf:e.sdfIcons!==F.sdf&&w("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),F.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get("icon-rotate").constantOr(1)&&(e.iconsNeedLinear=!0))}(Object.keys(d.horizontal).length||R)&&function(e,t,r,n,i,o,s){var l=o.layoutTextSize.evaluate(t,{}),c=o.layoutIconSize.evaluate(t,{}),u=o.textMaxSize.evaluate(t,{});void 0===u&&(u=l);var d=e.layers[0].layout,p=d.get("icon-offset").evaluate(t,{}),h=gc(r.horizontal),f=l/24,m=e.tilePixelRatio*f,g=e.tilePixelRatio*u/24,v=e.tilePixelRatio*c,y=e.tilePixelRatio*d.get("symbol-spacing"),b=d.get("text-padding")*e.tilePixelRatio,_=d.get("icon-padding")*e.tilePixelRatio,x=d.get("text-max-angle")/180*Math.PI,k="map"===d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),M="map"===d.get("icon-rotation-alignment")&&"point"!==d.get("symbol-placement"),T=d.get("symbol-placement"),C=y/2,S=function(l,c){c.x<0||c.x>=ti||c.y<0||c.y>=ti||function(e,t,r,n,i,o,s,l,c,u,d,p,h,f,m,g,v,y,b,_,x){var k,M,T,C=e.addToLineVertexArray(t,r),S=0,L=0,A=0,E={},D=lc(""),I=(o.layout.get("text-radial-offset").evaluate(b,{})||0)*ls;if(e.allowVerticalPlacement&&n.vertical){var P=o.layout.get("text-rotate").evaluate(b,{})+90,O=n.vertical;T=new ec(s,r,t,l,c,u,O,d,p,h,e.overscaling,P)}for(var R in n.horizontal){var F=n.horizontal[R];if(!k){D=lc(F.text);var z=o.layout.get("text-rotate").evaluate(b,{});k=new ec(s,r,t,l,c,u,F,d,p,h,e.overscaling,z)}var N=1===F.lineCount;if(L+=mc(e,t,F,o,h,b,f,C,n.vertical?cs.horizontal:cs.horizontalOnly,N?Object.keys(n.horizontal):[R],E,_,x),N)break}n.vertical&&(A+=mc(e,t,n.vertical,o,h,b,f,C,cs.vertical,["vertical"],E,_,x));var j=k?k.boxStartIndex:e.collisionBoxArray.length,B=k?k.boxEndIndex:e.collisionBoxArray.length,Y=T?T.boxStartIndex:e.collisionBoxArray.length,H=T?T.boxEndIndex:e.collisionBoxArray.length;if(i){var V=function(e,t,r,n,i,o){var s,l,c,u,d=t.image,p=r.layout,h=t.top-1/d.pixelRatio,f=t.left-1/d.pixelRatio,m=t.bottom+1/d.pixelRatio,g=t.right+1/d.pixelRatio;if("none"!==p.get("icon-text-fit")&&i){var v=g-f,y=m-h,b=p.get("text-size").evaluate(o,{})/24,_=i.left*b,x=i.right*b,w=i.top*b,k=x-_,M=i.bottom*b-w,T=p.get("icon-text-fit-padding")[0],C=p.get("icon-text-fit-padding")[1],S=p.get("icon-text-fit-padding")[2],L=p.get("icon-text-fit-padding")[3],A="width"===p.get("icon-text-fit")?.5*(M-y):0,E="height"===p.get("icon-text-fit")?.5*(k-v):0,D="width"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?k:v,I="height"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?M:y;s=new a(_+E-L,w+A-T),l=new a(_+E+C+D,w+A-T),c=new a(_+E+C+D,w+A+S+I),u=new a(_+E-L,w+A+S+I)}else s=new a(f,h),l=new a(g,h),c=new a(g,m),u=new a(f,m);var P=r.layout.get("icon-rotate").evaluate(o,{})*Math.PI/180;if(P){var O=Math.sin(P),R=Math.cos(P),F=[R,-O,O,R];s._matMult(F),l._matMult(F),u._matMult(F),c._matMult(F)}return[{tl:s,tr:l,bl:u,br:c,tex:d.paddedRect,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0}]}(0,i,o,0,gc(n.horizontal),b),U=o.layout.get("icon-rotate").evaluate(b,{});M=new ec(s,r,t,l,c,u,i,m,g,!1,e.overscaling,U),S=4*V.length;var W=e.iconSizeData,G=null;"source"===W.kind?(G=[xs*o.layout.get("icon-size").evaluate(b,{})])[0]>fc&&w(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===W.kind&&((G=[xs*x.compositeIconSizes[0].evaluate(b,{}),xs*x.compositeIconSizes[1].evaluate(b,{})])[0]>fc||G[1]>fc)&&w(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),e.addSymbols(e.icon,V,G,y,v,b,!1,t,C.lineStartIndex,C.lineLength)}var q=M?M.boxStartIndex:e.collisionBoxArray.length,K=M?M.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=Is.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),e.symbolInstances.emplaceBack(t.x,t.y,E.right>=0?E.right:-1,E.center>=0?E.center:-1,E.left>=0?E.left:-1,E.vertical||-1,D,j,B,Y,H,q,K,l,L,A,S,0,d,I)}(e,c,l,r,n,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,m,b,k,s,v,_,M,p,t,i,o)};if("line"===T)for(var L=0,A=function(e,t,r,n,i){for(var o=[],s=0;s<e.length;s++)for(var l=e[s],c=void 0,u=0;u<l.length-1;u++){var d=l[u],p=l[u+1];d.x<0&&p.x<0||(d.x<0?d=new a(0,d.y+(p.y-d.y)*((0-d.x)/(p.x-d.x)))._round():p.x<0&&(p=new a(0,d.y+(p.y-d.y)*((0-d.x)/(p.x-d.x)))._round()),d.y<0&&p.y<0||(d.y<0?d=new a(d.x+(p.x-d.x)*((0-d.y)/(p.y-d.y)),0)._round():p.y<0&&(p=new a(d.x+(p.x-d.x)*((0-d.y)/(p.y-d.y)),0)._round()),d.x>=n&&p.x>=n||(d.x>=n?d=new a(n,d.y+(p.y-d.y)*((n-d.x)/(p.x-d.x)))._round():p.x>=n&&(p=new a(n,d.y+(p.y-d.y)*((n-d.x)/(p.x-d.x)))._round()),d.y>=i&&p.y>=i||(d.y>=i?d=new a(d.x+(p.x-d.x)*((i-d.y)/(p.y-d.y)),i)._round():p.y>=i&&(p=new a(d.x+(p.x-d.x)*((i-d.y)/(p.y-d.y)),i)._round()),c&&d.equals(c[c.length-1])||(c=[d],o.push(c)),c.push(p)))))}return o}(t.geometry,0,0,ti,ti);L<A.length;L+=1)for(var E=A[L],D=0,I=Ql(E,y,x,r.vertical||h,n,24,g,e.overscaling,ti);D<I.length;D+=1){var P=I[D];h&&vc(e,h.text,C,P)||S(E,P)}else if("line-center"===T)for(var O=0,R=t.geometry;O<R.length;O+=1){var F=R[O];if(F.length>1){var z=$l(F,x,r.vertical||h,n,24,g);z&&S(F,z)}}else if("Polygon"===t.type)for(var N=0,j=vo(t.geometry,0);N<j.length;N+=1){var B=j[N],Y=nc(B,16);S(B[0],new _s(Y.x,Y.y,0))}else if("LineString"===t.type)for(var H=0,V=t.geometry;H<V.length;H+=1){var U=V[H];S(U,new _s(U[0].x,U[0].y,0))}else if("Point"===t.type)for(var W=0,G=t.geometry;W<G.length;W+=1)for(var q=0,K=G[W];q<K.length;q+=1){var X=K[q];S([X],new _s(X.x,X.y,0))}}(e,o,d,R,c,u,h)},x=0,k=e.features;x<k.length;x+=1)_();o&&e.generateCollisionDebugBuffers()},e.perspective=function(e,t,r,n,a){var i,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(i=1/(n-a),e[10]=(a+n)*i,e[14]=2*a*n*i):(e[10]=-1,e[14]=-2*n),e},e.pick=function(e,t){for(var r={},n=0;n<t.length;n++){var a=t[n];a in e&&(r[a]=e[a])}return r},e.plugin=En,e.polygonIntersectsPolygon=oi,e.postMapLoadEvent=te,e.postTurnstileEvent=Q,e.potpack=Vs,e.rasterBoundsAttributes=jl,e.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],e.register=fn,e.registerForPluginAvailability=function(e){return Sn?e({pluginURL:Sn,completionCallback:Tn}):An.once("pluginAvailable",e),e},e.rotate=function(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=n*l+i*s,e[1]=a*l+o*s,e[2]=n*-s+i*l,e[3]=a*-s+o*l,e},e.rotateX=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],d=t[10],p=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+c*n,e[5]=o*a+u*n,e[6]=s*a+d*n,e[7]=l*a+p*n,e[8]=c*a-i*n,e[9]=u*a-o*n,e[10]=d*a-s*n,e[11]=p*a-l*n,e},e.rotateZ=function(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],d=t[6],p=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+c*n,e[1]=o*a+u*n,e[2]=s*a+d*n,e[3]=l*a+p*n,e[4]=c*a-i*n,e[5]=u*a-o*n,e[6]=d*a-s*n,e[7]=p*a-l*n,e},e.scale=function(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.setCacheLimits=function(e,t){ne=e,ae=t},e.setRTLTextPlugin=function(e,t){if(Cn)throw new Error("setRTLTextPlugin cannot be called multiple times.");Cn=!0,Sn=O.resolveURL(e),Tn=function(e){e?(Cn=!1,Sn=null,t&&t(e)):Ln=!0},An.fire(new xe("pluginAvailable",{pluginURL:Sn,completionCallback:Tn}))},e.sphericalToCartesian=function(e){var t=e[0],r=e[1],n=e[2];return r+=90,r*=Math.PI/180,n*=Math.PI/180,{x:t*Math.cos(r)*Math.sin(n),y:t*Math.sin(r)*Math.sin(n),z:t*Math.cos(n)}},e.styleSpec=Me,e.symbolSize=Ts,e.transformMat3=function(e,t,r){var n=t[0],a=t[1],i=t[2];return e[0]=n*r[0]+a*r[3]+i*r[6],e[1]=n*r[1]+a*r[4]+i*r[7],e[2]=n*r[2]+a*r[5]+i*r[8],e},e.transformMat4=Mi,e.translate=function(e,t,r){var n,a,i,o,s,l,c,u,d,p,h,f,m=r[0],g=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],p=t[9],h=t[10],f=t[11],e[0]=n,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=d,e[9]=p,e[10]=h,e[11]=f,e[12]=n*m+s*g+d*v+t[12],e[13]=a*m+l*g+p*v+t[13],e[14]=i*m+c*g+h*v+t[14],e[15]=o*m+u*g+f*v+t[15]),e},e.uniqueId=h,e.validateCustomStyleLayer=function(e){var t=[],r=e.id;return void 0===r&&t.push({message:"layers."+r+': missing required property "id"'}),void 0===e.render&&t.push({message:"layers."+r+': missing required method "render"'}),e.renderingMode&&"2d"!==e.renderingMode&&"3d"!==e.renderingMode&&t.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),t},e.validateLight=an,e.validateStyle=nn,e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.vectorTile=Oo,e.version="1.3.2",e.warnOnce=w,e.webpSupported=F,e.window=self,e.wrap=u})),n(0,(function(e){function t(e){var r=typeof e;if("number"===r||"boolean"===r||"string"===r||null==e)return JSON.stringify(e);if(Array.isArray(e)){for(var n="[",a=0,i=e;a<i.length;a+=1)n+=t(i[a])+",";return n+"]"}for(var o=Object.keys(e).sort(),s="{",l=0;l<o.length;l++)s+=JSON.stringify(o[l])+":"+t(e[o[l]])+",";return s+"}"}function r(r){for(var n="",a=0,i=e.refProperties;a<i.length;a+=1)n+="/"+t(r[i[a]]);return n}var n=function(e){this.keyCache={},e&&this.replace(e)};n.prototype.replace=function(e){this._layerConfigs={},this._layers={},this.update(e,[])},n.prototype.update=function(t,n){for(var a=this,i=0,o=t;i<o.length;i+=1){var s=o[i];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=e.createStyleLayer(s);l._featureFilter=e.featureFilter(l.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var c=0,u=n;c<u.length;c+=1){var d=u[c];delete this.keyCache[d],delete this._layerConfigs[d],delete this._layers[d]}this.familiesBySource={};for(var p=0,h=function(e,t){for(var n={},a=0;a<e.length;a++){var i=t&&t[e[a].id]||r(e[a]);t&&(t[e[a].id]=i);var o=n[i];o||(o=n[i]=[]),o.push(e[a])}var s=[];for(var l in n)s.push(n[l]);return s}(e.values(this._layerConfigs),this.keyCache);p<h.length;p+=1){var f=h[p].map((function(e){return a._layers[e.id]})),m=f[0];if("none"!==m.visibility){var g=m.source||"",v=this.familiesBySource[g];v||(v=this.familiesBySource[g]={});var y=m.sourceLayer||"_geojsonTileLayer",b=v[y];b||(b=v[y]=[]),b.push(f)}}};var a=function(t){var r={},n=[];for(var a in t){var i=t[a],o=r[a]={};for(var s in i){var l=i[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var c={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};n.push(c),o[s]={rect:c,metrics:l.metrics}}}}var u=e.potpack(n),d=u.w,p=u.h,h=new e.AlphaImage({width:d||1,height:p||1});for(var f in t){var m=t[f];for(var g in m){var v=m[+g];if(v&&0!==v.bitmap.width&&0!==v.bitmap.height){var y=r[f][g].rect;e.AlphaImage.copy(v.bitmap,h,{x:0,y:0},{x:y.x+1,y:y.y+1},v.bitmap)}}}this.image=h,this.positions=r};e.register("GlyphAtlas",a);var i=function(t){this.tileID=new e.OverscaledTileID(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies};function o(t,r){for(var n=new e.EvaluationParameters(r),a=0,i=t;a<i.length;a+=1)i[a].recalculate(n)}i.prototype.parse=function(t,r,n,i){var s=this;this.status="parsing",this.data=t,this.collisionBoxArray=new e.CollisionBoxArray;var l=new e.DictionaryCoder(Object.keys(t.layers).sort()),c=new e.FeatureIndex(this.tileID);c.bucketLayerIDs=[];var u,d,p,h,f={},m={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{}},g=r.familiesBySource[this.source];for(var v in g){var y=t.layers[v];if(y){1===y.version&&e.warnOnce('Vector tile source "'+this.source+'" layer "'+v+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var b=l.encode(v),_=[],x=0;x<y.length;x++){var w=y.feature(x);_.push({feature:w,index:x,sourceLayerIndex:b})}for(var k=0,M=g[v];k<M.length;k+=1){var T=M[k],C=T[0];C.minzoom&&this.zoom<Math.floor(C.minzoom)||C.maxzoom&&this.zoom>=C.maxzoom||"none"!==C.visibility&&(o(T,this.zoom),(f[C.id]=C.createBucket({index:c.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m),c.bucketLayerIDs.push(T.map((function(e){return e.id}))))}}}var S=e.mapObject(m.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(S).length?n.send("getGlyphs",{uid:this.uid,stacks:S},(function(e,t){u||(u=e,d=t,E.call(s))})):d={};var L=Object.keys(m.iconDependencies);L.length?n.send("getImages",{icons:L},(function(e,t){u||(u=e,p=t,E.call(s))})):p={};var A=Object.keys(m.patternDependencies);function E(){if(u)return i(u);if(d&&p&&h){var t=new a(d),r=new e.ImageAtlas(p,h);for(var n in f){var s=f[n];s instanceof e.SymbolBucket?(o(s.layers,this.zoom),e.performSymbolLayout(s,d,t.positions,p,r.iconPositions,this.showCollisionBoxes)):s.hasPattern&&(s instanceof e.LineBucket||s instanceof e.FillBucket||s instanceof e.FillExtrusionBucket)&&(o(s.layers,this.zoom),s.addFeatures(m,r.patternPositions))}this.status="done",i(null,{buckets:e.values(f).filter((function(e){return!e.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:r,glyphMap:this.returnDependencies?d:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?t.positions:null})}}A.length?n.send("getImages",{icons:A},(function(e,t){u||(u=e,h=t,E.call(s))})):h={},E.call(this)};var s="undefined"!=typeof performance,l={getEntriesByName:function(e){return!!(s&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(e)},mark:function(e){return!!(s&&performance&&performance.mark)&&performance.mark(e)},measure:function(e,t,r){return!!(s&&performance&&performance.measure)&&performance.measure(e,t,r)},clearMarks:function(e){return!!(s&&performance&&performance.clearMarks)&&performance.clearMarks(e)},clearMeasures:function(e){return!!(s&&performance&&performance.clearMeasures)&&performance.clearMeasures(e)}},c=function(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},l.mark(this._marks.start)};function u(t,r){var n=e.getArrayBuffer(t.request,(function(t,n,a,i){t?r(t):n&&r(null,{vectorTile:new e.vectorTile.VectorTile(new e.pbf(n)),rawData:n,cacheControl:a,expires:i})}));return function(){n.cancel(),r()}}c.prototype.finish=function(){l.mark(this._marks.end);var e=l.getEntriesByName(this._marks.measure);return 0===e.length&&(l.measure(this._marks.measure,this._marks.start,this._marks.end),e=l.getEntriesByName(this._marks.measure),l.clearMarks(this._marks.start),l.clearMarks(this._marks.end),l.clearMeasures(this._marks.measure)),e},l.Performance=c;var d=function(e,t,r){this.actor=e,this.layerIndex=t,this.loadVectorData=r||u,this.loading={},this.loaded={}};d.prototype.loadTile=function(t,r){var n=this,a=t.uid;this.loading||(this.loading={});var o=!!(t&&t.request&&t.request.collectResourceTiming)&&new l.Performance(t.request),s=this.loading[a]=new i(t);s.abort=this.loadVectorData(t,(function(t,i){if(delete n.loading[a],t||!i)return s.status="done",n.loaded[a]=s,r(t);var l=i.rawData,c={};i.expires&&(c.expires=i.expires),i.cacheControl&&(c.cacheControl=i.cacheControl);var u={};if(o){var d=o.finish();d&&(u.resourceTiming=JSON.parse(JSON.stringify(d)))}s.vectorTile=i.vectorTile,s.parse(i.vectorTile,n.layerIndex,n.actor,(function(t,n){if(t||!n)return r(t);r(null,e.extend({rawTileData:l.slice(0)},n,c,u))})),n.loaded=n.loaded||{},n.loaded[a]=s}))},d.prototype.reloadTile=function(e,t){var r=this.loaded,n=e.uid,a=this;if(r&&r[n]){var i=r[n];i.showCollisionBoxes=e.showCollisionBoxes;var o=function(e,r){var n=i.reloadCallback;n&&(delete i.reloadCallback,i.parse(i.vectorTile,a.layerIndex,a.actor,n)),t(e,r)};"parsing"===i.status?i.reloadCallback=o:"done"===i.status&&(i.vectorTile?i.parse(i.vectorTile,this.layerIndex,this.actor,o):o())}},d.prototype.abortTile=function(e,t){var r=this.loading,n=e.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),t()},d.prototype.removeTile=function(e,t){var r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()};var p=function(){this.loaded={}};p.prototype.loadTile=function(t,r){var n=t.uid,a=t.encoding,i=t.rawImageData,o=new e.DEMData(n,i,a);this.loaded=this.loaded||{},this.loaded[n]=o,r(null,o)},p.prototype.removeTile=function(e){var t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]};var h={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function f(e){var t=0;if(e&&e.length>0){t+=Math.abs(m(e[0]));for(var r=1;r<e.length;r++)t-=Math.abs(m(e[r]))}return t}function m(e){var t,r,n,a,i,o,s=0,l=e.length;if(l>2){for(o=0;o<l;o++)o===l-2?(n=l-2,a=l-1,i=0):o===l-1?(n=l-1,a=0,i=1):(n=o,a=o+1,i=o+2),t=e[n],r=e[a],s+=(g(e[i][0])-g(t[0]))*Math.sin(g(r[1]));s=s*h.RADIUS*h.RADIUS/2}return s}function g(e){return e*Math.PI/180}var v={geometry:function e(t){var r,n=0;switch(t.type){case"Polygon":return f(t.coordinates);case"MultiPolygon":for(r=0;r<t.coordinates.length;r++)n+=f(t.coordinates[r]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(r=0;r<t.geometries.length;r++)n+=e(t.geometries[r]);return n}},ring:m};function y(e,t){return function(r){return e(r,t)}}function b(e,t){t=!!t,e[0]=_(e[0],t);for(var r=1;r<e.length;r++)e[r]=_(e[r],!t);return e}function _(e,t){return function(e){return v.ring(e)>=0}(e)===t?e:e.reverse()}var x=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};w.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],r=0,n=this._feature.geometry;r<n.length;r+=1){var a=n[r];t.push([new e.Point$1(a[0],a[1])])}return t}for(var i=[],o=0,s=this._feature.geometry;o<s.length;o+=1){for(var l=[],c=0,u=s[o];c<u.length;c+=1){var d=u[c];l.push(new e.Point$1(d[0],d[1]))}i.push(l)}return i},w.prototype.toGeoJSON=function(e,t,r){return x.call(this,e,t,r)};var k=function(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.EXTENT,this.length=t.length,this._features=t};k.prototype.feature=function(e){return new w(this._features[e])};var M=e.vectorTile.VectorTileFeature,T=C;function C(e,t){this.options=t||{},this.features=e,this.length=e.length}function S(e,t){this.id="number"==typeof e.id?e.id:void 0,this.type=e.type,this.rawGeometry=1===e.type?[e.geometry]:e.geometry,this.properties=e.tags,this.extent=t||4096}C.prototype.feature=function(e){return new S(this.features[e],this.options.extent)},S.prototype.loadGeometry=function(){var t=this.rawGeometry;this.geometry=[];for(var r=0;r<t.length;r++){for(var n=t[r],a=[],i=0;i<n.length;i++)a.push(new e.Point$1(n[i][0],n[i][1]));this.geometry.push(a)}return this.geometry},S.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var e=this.geometry,t=1/0,r=-1/0,n=1/0,a=-1/0,i=0;i<e.length;i++)for(var o=e[i],s=0;s<o.length;s++){var l=o[s];t=Math.min(t,l.x),r=Math.max(r,l.x),n=Math.min(n,l.y),a=Math.max(a,l.y)}return[t,n,r,a]},S.prototype.toGeoJSON=M.prototype.toGeoJSON;var L=D,A=D,E=T;function D(t){var r=new e.pbf;return function(e,t){for(var r in e.layers)t.writeMessage(3,I,e.layers[r])}(t,r),r.finish()}function I(e,t){var r;t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);var n={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<e.length;r++)n.feature=e.feature(r),t.writeMessage(2,P,n);var a=n.keys;for(r=0;r<a.length;r++)t.writeStringField(3,a[r]);var i=n.values;for(r=0;r<i.length;r++)t.writeMessage(4,N,i[r])}function P(e,t){var r=e.feature;void 0!==r.id&&t.writeVarintField(1,r.id),t.writeMessage(2,O,e),t.writeVarintField(3,r.type),t.writeMessage(4,z,r)}function O(e,t){var r=e.feature,n=e.keys,a=e.values,i=e.keycache,o=e.valuecache;for(var s in r.properties){var l=i[s];void 0===l&&(n.push(s),l=n.length-1,i[s]=l),t.writeVarint(l);var c=r.properties[s],u=typeof c;"string"!==u&&"boolean"!==u&&"number"!==u&&(c=JSON.stringify(c));var d=u+":"+c,p=o[d];void 0===p&&(a.push(c),p=a.length-1,o[d]=p),t.writeVarint(p)}}function R(e,t){return(t<<3)+(7&e)}function F(e){return e<<1^e>>31}function z(e,t){for(var r=e.loadGeometry(),n=e.type,a=0,i=0,o=r.length,s=0;s<o;s++){var l=r[s],c=1;1===n&&(c=l.length),t.writeVarint(R(1,c));for(var u=3===n?l.length-1:l.length,d=0;d<u;d++){1===d&&1!==n&&t.writeVarint(R(2,u-1));var p=l[d].x-a,h=l[d].y-i;t.writeVarint(F(p)),t.writeVarint(F(h)),a+=p,i+=h}3===n&&t.writeVarint(R(7,1))}}function N(e,t){var r=typeof e;"string"===r?t.writeStringField(1,e):"boolean"===r?t.writeBooleanField(7,e):"number"===r&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}function j(e,t,r,n){B(e,r,n),B(t,2*r,2*n),B(t,2*r+1,2*n+1)}function B(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Y(e,t,r,n){var a=e-r,i=t-n;return a*a+i*i}L.fromVectorTileJs=A,L.fromGeojsonVt=function(e,t){t=t||{};var r={};for(var n in e)r[n]=new T(e[n].features,t),r[n].name=n,r[n].version=t.version,r[n].extent=t.extent;return D({layers:r})},L.GeoJSONWrapper=E;var H=function(e){return e[0]},V=function(e){return e[1]},U=function(e,t,r,n,a){void 0===t&&(t=H),void 0===r&&(r=V),void 0===n&&(n=64),void 0===a&&(a=Float64Array),this.nodeSize=n,this.points=e;for(var i=e.length<65536?Uint16Array:Uint32Array,o=this.ids=new i(e.length),s=this.coords=new a(2*e.length),l=0;l<e.length;l++)o[l]=l,s[2*l]=t(e[l]),s[2*l+1]=r(e[l]);!function e(t,r,n,a,i,o){if(!(i-a<=n)){var s=a+i>>1;!function e(t,r,n,a,i,o){for(;i>a;){if(i-a>600){var s=i-a+1,l=n-a+1,c=Math.log(s),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);e(t,r,n,Math.max(a,Math.floor(n-l*u/s+d)),Math.min(i,Math.floor(n+(s-l)*u/s+d)),o)}var p=r[2*n+o],h=a,f=i;for(j(t,r,a,n),r[2*i+o]>p&&j(t,r,a,i);h<f;){for(j(t,r,h,f),h++,f--;r[2*h+o]<p;)h++;for(;r[2*f+o]>p;)f--}r[2*a+o]===p?j(t,r,a,f):j(t,r,++f,i),f<=n&&(a=f+1),n<=f&&(i=f-1)}}(t,r,s,a,i,o%2),e(t,r,n,a,s-1,o+1),e(t,r,n,s+1,i,o+1)}}(o,s,n,0,o.length-1,0)};U.prototype.range=function(e,t,r,n){return function(e,t,r,n,a,i,o){for(var s,l,c=[0,e.length-1,0],u=[];c.length;){var d=c.pop(),p=c.pop(),h=c.pop();if(p-h<=o)for(var f=h;f<=p;f++)s=t[2*f],l=t[2*f+1],s>=r&&s<=a&&l>=n&&l<=i&&u.push(e[f]);else{var m=Math.floor((h+p)/2);s=t[2*m],l=t[2*m+1],s>=r&&s<=a&&l>=n&&l<=i&&u.push(e[m]);var g=(d+1)%2;(0===d?r<=s:n<=l)&&(c.push(h),c.push(m-1),c.push(g)),(0===d?a>=s:i>=l)&&(c.push(m+1),c.push(p),c.push(g))}}return u}(this.ids,this.coords,e,t,r,n,this.nodeSize)},U.prototype.within=function(e,t,r){return function(e,t,r,n,a,i){for(var o=[0,e.length-1,0],s=[],l=a*a;o.length;){var c=o.pop(),u=o.pop(),d=o.pop();if(u-d<=i)for(var p=d;p<=u;p++)Y(t[2*p],t[2*p+1],r,n)<=l&&s.push(e[p]);else{var h=Math.floor((d+u)/2),f=t[2*h],m=t[2*h+1];Y(f,m,r,n)<=l&&s.push(e[h]);var g=(c+1)%2;(0===c?r-a<=f:n-a<=m)&&(o.push(d),o.push(h-1),o.push(g)),(0===c?r+a>=f:n+a>=m)&&(o.push(h+1),o.push(u),o.push(g))}}return s}(this.ids,this.coords,e,t,r,this.nodeSize)};var W={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(e){return e}},G=function(e){this.options=Q(Object.create(W),e),this.trees=new Array(this.options.maxZoom+1)};function q(e,t,r,n,a){return{x:e,y:t,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:a}}function K(e,t){var r=e.geometry.coordinates,n=r[0],a=r[1];return{x:J(n),y:$(a),zoom:1/0,index:t,parentId:-1}}function X(e){return{type:"Feature",id:e.id,properties:Z(e),geometry:{type:"Point",coordinates:[(n=e.x,360*(n-.5)),(t=e.y,r=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var t,r,n}function Z(e){var t=e.numPoints,r=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return Q(Q({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function J(e){return e/360+.5}function $(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function Q(e,t){for(var r in t)e[r]=t[r];return e}function ee(e){return e.x}function te(e){return e.y}function re(e,t,r,n,a,i){var o=a-r,s=i-n;if(0!==o||0!==s){var l=((e-r)*o+(t-n)*s)/(o*o+s*s);l>1?(r=a,n=i):l>0&&(r+=o*l,n+=s*l)}return(o=e-r)*o+(s=t-n)*s}function ne(e,t,r,n){var a={id:void 0===e?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)ae(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n<t.length;n++)ae(e,t[n]);else if("MultiPolygon"===r)for(n=0;n<t.length;n++)for(var a=0;a<t[n].length;a++)ae(e,t[n][a])}(a),a}function ae(e,t){for(var r=0;r<t.length;r+=3)e.minX=Math.min(e.minX,t[r]),e.minY=Math.min(e.minY,t[r+1]),e.maxX=Math.max(e.maxX,t[r]),e.maxY=Math.max(e.maxY,t[r+1])}function ie(e,t,r,n){if(t.geometry){var a=t.geometry.coordinates,i=t.geometry.type,o=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],l=t.id;if(r.promoteId?l=t.properties[r.promoteId]:r.generateId&&(l=n||0),"Point"===i)oe(a,s);else if("MultiPoint"===i)for(var c=0;c<a.length;c++)oe(a[c],s);else if("LineString"===i)se(a,s,o,!1);else if("MultiLineString"===i){if(r.lineMetrics){for(c=0;c<a.length;c++)s=[],se(a[c],s,o,!1),e.push(ne(l,"LineString",s,t.properties));return}le(a,s,o,!1)}else if("Polygon"===i)le(a,s,o,!0);else{if("MultiPolygon"!==i){if("GeometryCollection"===i){for(c=0;c<t.geometry.geometries.length;c++)ie(e,{id:l,geometry:t.geometry.geometries[c],properties:t.properties},r,n);return}throw new Error("Input data is not a valid GeoJSON object.")}for(c=0;c<a.length;c++){var u=[];le(a[c],u,o,!0),s.push(u)}}e.push(ne(l,i,s,t.properties))}}function oe(e,t){t.push(ce(e[0])),t.push(ue(e[1])),t.push(0)}function se(e,t,r,n){for(var a,i,o=0,s=0;s<e.length;s++){var l=ce(e[s][0]),c=ue(e[s][1]);t.push(l),t.push(c),t.push(0),s>0&&(o+=n?(a*c-l*i)/2:Math.sqrt(Math.pow(l-a,2)+Math.pow(c-i,2))),a=l,i=c}var u=t.length-3;t[2]=1,function e(t,r,n,a){for(var i,o=a,s=n-r>>1,l=n-r,c=t[r],u=t[r+1],d=t[n],p=t[n+1],h=r+3;h<n;h+=3){var f=re(t[h],t[h+1],c,u,d,p);if(f>o)i=h,o=f;else if(f===o){var m=Math.abs(h-s);m<l&&(i=h,l=m)}}o>a&&(i-r>3&&e(t,r,i,a),t[i+2]=o,n-i>3&&e(t,i,n,a))}(t,0,u,r),t[u+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function le(e,t,r,n){for(var a=0;a<e.length;a++){var i=[];se(e[a],i,r,n),t.push(i)}}function ce(e){return e/360+.5}function ue(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function de(e,t,r,n,a,i,o,s){if(n/=t,i>=(r/=t)&&o<n)return e;if(o<r||i>=n)return null;for(var l=[],c=0;c<e.length;c++){var u=e[c],d=u.geometry,p=u.type,h=0===a?u.minX:u.minY,f=0===a?u.maxX:u.maxY;if(h>=r&&f<n)l.push(u);else if(!(f<r||h>=n)){var m=[];if("Point"===p||"MultiPoint"===p)pe(d,m,r,n,a);else if("LineString"===p)he(d,m,r,n,a,!1,s.lineMetrics);else if("MultiLineString"===p)me(d,m,r,n,a,!1);else if("Polygon"===p)me(d,m,r,n,a,!0);else if("MultiPolygon"===p)for(var g=0;g<d.length;g++){var v=[];me(d[g],v,r,n,a,!0),v.length&&m.push(v)}if(m.length){if(s.lineMetrics&&"LineString"===p){for(g=0;g<m.length;g++)l.push(ne(u.id,p,m[g],u.tags));continue}"LineString"!==p&&"MultiLineString"!==p||(1===m.length?(p="LineString",m=m[0]):p="MultiLineString"),"Point"!==p&&"MultiPoint"!==p||(p=3===m.length?"Point":"MultiPoint"),l.push(ne(u.id,p,m,u.tags))}}}return l.length?l:null}function pe(e,t,r,n,a){for(var i=0;i<e.length;i+=3){var o=e[i+a];o>=r&&o<=n&&(t.push(e[i]),t.push(e[i+1]),t.push(e[i+2]))}}function he(e,t,r,n,a,i,o){for(var s,l,c=fe(e),u=0===a?ve:ye,d=e.start,p=0;p<e.length-3;p+=3){var h=e[p],f=e[p+1],m=e[p+2],g=e[p+3],v=e[p+4],y=0===a?h:f,b=0===a?g:v,_=!1;o&&(s=Math.sqrt(Math.pow(h-g,2)+Math.pow(f-v,2))),y<r?b>r&&(l=u(c,h,f,g,v,r),o&&(c.start=d+s*l)):y>n?b<n&&(l=u(c,h,f,g,v,n),o&&(c.start=d+s*l)):ge(c,h,f,m),b<r&&y>=r&&(l=u(c,h,f,g,v,r),_=!0),b>n&&y<=n&&(l=u(c,h,f,g,v,n),_=!0),!i&&_&&(o&&(c.end=d+s*l),t.push(c),c=fe(e)),o&&(d+=s)}var x=e.length-3;h=e[x],f=e[x+1],m=e[x+2],(y=0===a?h:f)>=r&&y<=n&&ge(c,h,f,m),x=c.length-3,i&&x>=3&&(c[x]!==c[0]||c[x+1]!==c[1])&&ge(c,c[0],c[1],c[2]),c.length&&t.push(c)}function fe(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function me(e,t,r,n,a,i){for(var o=0;o<e.length;o++)he(e[o],t,r,n,a,i,!1)}function ge(e,t,r,n){e.push(t),e.push(r),e.push(n)}function ve(e,t,r,n,a,i){var o=(i-t)/(n-t);return e.push(i),e.push(r+(a-r)*o),e.push(1),o}function ye(e,t,r,n,a,i){var o=(i-r)/(a-r);return e.push(t+(n-t)*o),e.push(i),e.push(1),o}function be(e,t){for(var r=[],n=0;n<e.length;n++){var a,i=e[n],o=i.type;if("Point"===o||"MultiPoint"===o||"LineString"===o)a=_e(i.geometry,t);else if("MultiLineString"===o||"Polygon"===o){a=[];for(var s=0;s<i.geometry.length;s++)a.push(_e(i.geometry[s],t))}else if("MultiPolygon"===o)for(a=[],s=0;s<i.geometry.length;s++){for(var l=[],c=0;c<i.geometry[s].length;c++)l.push(_e(i.geometry[s][c],t));a.push(l)}r.push(ne(i.id,o,a,i.tags))}return r}function _e(e,t){var r=[];r.size=e.size,void 0!==e.start&&(r.start=e.start,r.end=e.end);for(var n=0;n<e.length;n+=3)r.push(e[n]+t,e[n+1],e[n+2]);return r}function xe(e,t){if(e.transformed)return e;var r,n,a,i=1<<e.z,o=e.x,s=e.y;for(r=0;r<e.features.length;r++){var l=e.features[r],c=l.geometry,u=l.type;if(l.geometry=[],1===u)for(n=0;n<c.length;n+=2)l.geometry.push(we(c[n],c[n+1],t,i,o,s));else for(n=0;n<c.length;n++){var d=[];for(a=0;a<c[n].length;a+=2)d.push(we(c[n][a],c[n][a+1],t,i,o,s));l.geometry.push(d)}}return e.transformed=!0,e}function we(e,t,r,n,a,i){return[Math.round(r*(e*n-a)),Math.round(r*(t*n-i))]}function ke(e,t,r,n,a){for(var i=t===a.maxZoom?0:a.tolerance/((1<<t)*a.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<e.length;s++){o.numFeatures++,Me(o,e[s],i,a);var l=e[s].minX,c=e[s].minY,u=e[s].maxX,d=e[s].maxY;l<o.minX&&(o.minX=l),c<o.minY&&(o.minY=c),u>o.maxX&&(o.maxX=u),d>o.maxY&&(o.maxY=d)}return o}function Me(e,t,r,n){var a=t.geometry,i=t.type,o=[];if("Point"===i||"MultiPoint"===i)for(var s=0;s<a.length;s+=3)o.push(a[s]),o.push(a[s+1]),e.numPoints++,e.numSimplified++;else if("LineString"===i)Te(o,a,e,r,!1,!1);else if("MultiLineString"===i||"Polygon"===i)for(s=0;s<a.length;s++)Te(o,a[s],e,r,"Polygon"===i,0===s);else if("MultiPolygon"===i)for(var l=0;l<a.length;l++){var c=a[l];for(s=0;s<c.length;s++)Te(o,c[s],e,r,!0,0===s)}if(o.length){var u=t.tags||null;if("LineString"===i&&n.lineMetrics){for(var d in u={},t.tags)u[d]=t.tags[d];u.mapbox_clip_start=a.start/a.size,u.mapbox_clip_end=a.end/a.size}var p={geometry:o,type:"Polygon"===i||"MultiPolygon"===i?3:"LineString"===i||"MultiLineString"===i?2:1,tags:u};null!==t.id&&(p.id=t.id),e.features.push(p)}}function Te(e,t,r,n,a,i){var o=n*n;if(n>0&&t.size<(a?o:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;l<t.length;l+=3)(0===n||t[l+2]>o)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;a&&function(e,t){for(var r=0,n=0,a=e.length,i=a-2;n<a;i=n,n+=2)r+=(e[n]-e[i])*(e[n+1]+e[i+1]);if(r>0===t)for(n=0,a=e.length;n<a/2;n+=2){var o=e[n],s=e[n+1];e[n]=e[a-2-n],e[n+1]=e[a-1-n],e[a-2-n]=o,e[a-1-n]=s}}(s,i),e.push(s)}}function Ce(e,t){var r=(t=this.options=function(e,t){for(var r in t)e[r]=t[r];return e}(Object.create(this.options),t)).debug;if(r&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;n<e.features.length;n++)ie(r,e.features[n],t,n);else"Feature"===e.type?ie(r,e,t):ie(r,{geometry:e},t);return r}(e,t);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(n=function(e,t){var r=t.buffer/t.extent,n=e,a=de(e,1,-1-r,r,0,-1,2,t),i=de(e,1,1-r,2+r,0,-1,2,t);return(a||i)&&(n=de(e,1,-r,1+r,0,-1,2,t)||[],a&&(n=be(a,1).concat(n)),i&&(n=n.concat(be(i,-1)))),n}(n,t)).length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Se(e,t,r){return 32*((1<<e)*r+t)+e}function Le(e,t){var r=e.tileID.canonical;if(!this._geoJSONIndex)return t(null,null);var n=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!n)return t(null,null);var a=new k(n.features),i=L(a);0===i.byteOffset&&i.byteLength===i.buffer.byteLength||(i=new Uint8Array(i)),t(null,{vectorTile:a,rawData:i.buffer})}G.prototype.load=function(e){var t=this.options,r=t.log,n=t.minZoom,a=t.maxZoom,i=t.nodeSize;r&&console.time("total time");var o="prepare "+e.length+" points";r&&console.time(o),this.points=e;for(var s=[],l=0;l<e.length;l++)e[l].geometry&&s.push(K(e[l],l));this.trees[a+1]=new U(s,ee,te,i,Float32Array),r&&console.timeEnd(o);for(var c=a;c>=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new U(s,ee,te,i,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},G.prototype.getClusters=function(e,t){var r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),a=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,a=180;else if(r>a){var o=this.getClusters([r,n,180,i],t),s=this.getClusters([-180,n,a,i],t);return o.concat(s)}for(var l=this.trees[this._limitZoom(t)],c=[],u=0,d=l.range(J(r),$(i),J(a),$(n));u<d.length;u+=1){var p=d[u],h=l.points[p];c.push(h.numPoints?X(h):this.points[h.index])}return c},G.prototype.getChildren=function(e){var t=e>>5,r=e%32,n="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(n);var i=a.points[t];if(!i)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,c=a.within(i.x,i.y,o);l<c.length;l+=1){var u=c[l],d=a.points[u];d.parentId===e&&s.push(d.numPoints?X(d):this.points[d.index])}if(0===s.length)throw new Error(n);return s},G.prototype.getLeaves=function(e,t,r){t=t||10,r=r||0;var n=[];return this._appendLeaves(n,e,t,r,0),n},G.prototype.getTile=function(e,t,r){var n=this.trees[this._limitZoom(e)],a=Math.pow(2,e),i=this.options,o=i.extent,s=i.radius/o,l=(r-s)/a,c=(r+1+s)/a,u={features:[]};return this._addTileFeatures(n.range((t-s)/a,l,(t+1+s)/a,c),n.points,t,r,a,u),0===t&&this._addTileFeatures(n.range(1-s/a,l,1,c),n.points,a,r,a,u),t===a-1&&this._addTileFeatures(n.range(0,l,s/a,c),n.points,-1,r,a,u),u.features.length?u:null},G.prototype.getClusterExpansionZoom=function(e){for(var t=e%32-1;t<=this.options.maxZoom;){var r=this.getChildren(e);if(t++,1!==r.length)break;e=r[0].properties.cluster_id}return t},G.prototype._appendLeaves=function(e,t,r,n,a){for(var i=0,o=this.getChildren(t);i<o.length;i+=1){var s=o[i],l=s.properties;if(l&&l.cluster?a+l.point_count<=n?a+=l.point_count:a=this._appendLeaves(e,l.cluster_id,r,n,a):a<n?a++:e.push(s),e.length===r)break}return a},G.prototype._addTileFeatures=function(e,t,r,n,a,i){for(var o=0,s=e;o<s.length;o+=1){var l=t[s[o]],c={type:1,geometry:[[Math.round(this.options.extent*(l.x*a-r)),Math.round(this.options.extent*(l.y*a-n))]],tags:l.numPoints?Z(l):this.points[l.index].properties},u=l.numPoints?l.id:this.points[l.index].id;void 0!==u&&(c.id=u),i.features.push(c)}},G.prototype._limitZoom=function(e){return Math.max(this.options.minZoom,Math.min(e,this.options.maxZoom+1))},G.prototype._cluster=function(e,t){for(var r=[],n=this.options,a=n.radius,i=n.extent,o=n.reduce,s=a/(i*Math.pow(2,t)),l=0;l<e.length;l++){var c=e[l];if(!(c.zoom<=t)){c.zoom=t;for(var u=this.trees[t+1],d=u.within(c.x,c.y,s),p=c.numPoints||1,h=c.x*p,f=c.y*p,m=o&&p>1?this._map(c,!0):null,g=(l<<5)+(t+1),v=0,y=d;v<y.length;v+=1){var b=y[v],_=u.points[b];if(!(_.zoom<=t)){_.zoom=t;var x=_.numPoints||1;h+=_.x*x,f+=_.y*x,p+=x,_.parentId=g,o&&(m||(m=this._map(c,!0)),o(m,this._map(_)))}}1===p?r.push(c):(c.parentId=g,r.push(q(h/p,f/p,g,p,m)))}}return r},G.prototype._map=function(e,t){if(e.numPoints)return t?Q({},e.properties):e.properties;var r=this.points[e.index].properties,n=this.options.map(r);return t&&n===r?Q({},n):n},Ce.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Ce.prototype.splitTile=function(e,t,r,n,a,i,o){for(var s=[e,t,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();var u=1<<t,d=Se(t,r,n),p=this.tiles[d];if(!p&&(c>1&&console.time("creation"),p=this.tiles[d]=ke(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var h="z"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(p.source=e,a){if(t===l.maxZoom||t===a)continue;var f=1<<a-t;if(r!==Math.floor(i/f)||n!==Math.floor(o/f))continue}else if(t===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue;if(p.source=null,0!==e.length){c>1&&console.time("clipping");var m,g,v,y,b,_,x=.5*l.buffer/l.extent,w=.5-x,k=.5+x,M=1+x;m=g=v=y=null,b=de(e,u,r-x,r+k,0,p.minX,p.maxX,l),_=de(e,u,r+w,r+M,0,p.minX,p.maxX,l),e=null,b&&(m=de(b,u,n-x,n+k,1,p.minY,p.maxY,l),g=de(b,u,n+w,n+M,1,p.minY,p.maxY,l),b=null),_&&(v=de(_,u,n-x,n+k,1,p.minY,p.maxY,l),y=de(_,u,n+w,n+M,1,p.minY,p.maxY,l),_=null),c>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(v||[],t+1,2*r+1,2*n),s.push(y||[],t+1,2*r+1,2*n+1)}}},Ce.prototype.getTile=function(e,t,r){var n=this.options,a=n.extent,i=n.debug;if(e<0||e>24)return null;var o=1<<e,s=Se(e,t=(t%o+o)%o,r);if(this.tiles[s])return xe(this.tiles[s],a);i>1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,c=e,u=t,d=r;!l&&c>0;)c--,u=Math.floor(u/2),d=Math.floor(d/2),l=this.tiles[Se(c,u,d)];return l&&l.source?(i>1&&console.log("found parent tile z%d-%d-%d",c,u,d),i>1&&console.time("drilling down"),this.splitTile(l.source,c,u,d,e,t,r),i>1&&console.timeEnd("drilling down"),this.tiles[s]?xe(this.tiles[s],a):null):null};var Ae=function(t){function r(e,r,n){t.call(this,e,r,Le),n&&(this.loadGeoJSON=n)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var a=!!(n&&n.request&&n.request.collectResourceTiming)&&new l.Performance(n.request);this.loadGeoJSON(n,(function(i,o){if(i||!o)return r(i);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));!function e(t,r){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.map(y(e,r)),t;case"GeometryCollection":return t.geometries=t.geometries.map(y(e,r)),t;case"Feature":return t.geometry=e(t.geometry,r),t;case"Polygon":case"MultiPolygon":return function(e,t){return"Polygon"===e.type?e.coordinates=b(e.coordinates,t):"MultiPolygon"===e.type&&(e.coordinates=e.coordinates.map(y(b,t))),e}(t,r);default:return t}}(o,!0);try{t._geoJSONIndex=n.cluster?new G(function(t){var r=t.superclusterOptions,n=t.clusterProperties;if(!n||!r)return r;for(var a={},i={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c<u.length;c+=1){var d=u[c],p=n[d],h=p[0],f=p[1],m=e.createExpression(f),g=e.createExpression("string"==typeof h?[h,["accumulated"],["get",d]]:h);a[d]=m.value,i[d]=g.value}return r.map=function(e){s.properties=e;for(var t={},r=0,n=l;r<n.length;r+=1){var i=n[r];t[i]=a[i].evaluate(o,s)}return t},r.reduce=function(e,t){s.properties=t;for(var r=0,n=l;r<n.length;r+=1){var a=n[r];o.accumulated=e[a],e[a]=i[a].evaluate(o,s)}},r}(n)).load(o.features):function(e,t){return new Ce(e,t)}(o,n.geojsonVtOptions)}catch(i){return r(i)}t.loaded={};var s={};if(a){var l=a.finish();l&&(s.resourceTiming={},s.resourceTiming[n.source]=JSON.parse(JSON.stringify(l)))}r(null,s)}))}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(e,r){var n=this.loaded,a=e.uid;return n&&n[a]?t.prototype.reloadTile.call(this,e,r):this.loadTile(e,r)},r.prototype.loadGeoJSON=function(t,r){if(t.request)e.getJSON(t.request,r);else{if("string"!=typeof t.data)return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."));try{return r(null,JSON.parse(t.data))}catch(e){return r(new Error("Input data given to '"+t.source+"' is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t()},r.prototype.getClusterExpansionZoom=function(e,t){t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))},r.prototype.getClusterChildren=function(e,t){t(null,this._geoJSONIndex.getChildren(e.clusterId))},r.prototype.getClusterLeaves=function(e,t){t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))},r}(d),Ee=function(t){var r=this;this.self=t,this.actor=new e.Actor(t,this),this.layerIndexes={},this.workerSourceTypes={vector:d,geojson:Ae},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(e,t){if(r.workerSourceTypes[e])throw new Error('Worker source with name "'+e+'" already registered.');r.workerSourceTypes[e]=t},this.self.registerRTLTextPlugin=function(t){if(e.plugin.isLoaded())throw new Error("RTL text plugin already registered.");e.plugin.applyArabicShaping=t.applyArabicShaping,e.plugin.processBidirectionalText=t.processBidirectionalText,e.plugin.processStyledBidirectionalText=t.processStyledBidirectionalText}};return Ee.prototype.setReferrer=function(e,t){this.referrer=t},Ee.prototype.setLayers=function(e,t,r){this.getLayerIndex(e).replace(t),r()},Ee.prototype.updateLayers=function(e,t,r){this.getLayerIndex(e).update(t.layers,t.removedIds),r()},Ee.prototype.loadTile=function(e,t,r){this.getWorkerSource(e,t.type,t.source).loadTile(t,r)},Ee.prototype.loadDEMTile=function(e,t,r){this.getDEMWorkerSource(e,t.source).loadTile(t,r)},Ee.prototype.reloadTile=function(e,t,r){this.getWorkerSource(e,t.type,t.source).reloadTile(t,r)},Ee.prototype.abortTile=function(e,t,r){this.getWorkerSource(e,t.type,t.source).abortTile(t,r)},Ee.prototype.removeTile=function(e,t,r){this.getWorkerSource(e,t.type,t.source).removeTile(t,r)},Ee.prototype.removeDEMTile=function(e,t){this.getDEMWorkerSource(e,t.source).removeTile(t)},Ee.prototype.removeSource=function(e,t,r){if(this.workerSources[e]&&this.workerSources[e][t.type]&&this.workerSources[e][t.type][t.source]){var n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==n.removeSource?n.removeSource(t,r):r()}},Ee.prototype.loadWorkerSource=function(e,t,r){try{this.self.importScripts(t.url),r()}catch(e){r(e.toString())}},Ee.prototype.loadRTLTextPlugin=function(t,r,n){try{e.plugin.isLoaded()||(this.self.importScripts(r),n(e.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+r)))}catch(e){n(e.toString())}},Ee.prototype.getLayerIndex=function(e){var t=this.layerIndexes[e];return t||(t=this.layerIndexes[e]=new n),t},Ee.prototype.getWorkerSource=function(e,t,r){var n=this;if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][r]){var a={send:function(t,r,a){n.actor.send(t,r,a,e)}};this.workerSources[e][t][r]=new this.workerSourceTypes[t](a,this.getLayerIndex(e))}return this.workerSources[e][t][r]},Ee.prototype.getDEMWorkerSource=function(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new p),this.demWorkerSources[e][t]},Ee.prototype.enforceCacheSizeLimit=function(t,r){e.enforceCacheSizeLimit(r)},"undefined"!=typeof WorkerGlobalScope&&void 0!==e.window&&e.window instanceof WorkerGlobalScope&&(e.window.worker=new Ee(e.window)),Ee})),n(0,(function(e){var t=e.createCommonjsModule((function(e){function t(e){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var e,t,r=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(r);try{t=new Worker(n),e=!0}catch(t){e=!1}return t&&t.terminate(),URL.revokeObjectURL(n),e}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(e){return void 0===r[e]&&(r[e]=function(e){var r=document.createElement("canvas"),n=Object.create(t.webGLContextAttributes);return n.failIfMajorPerformanceCaveat=e,r.probablySupportsContext?r.probablySupportsContext("webgl",n)||r.probablySupportsContext("experimental-webgl",n):r.supportsContext?r.supportsContext("webgl",n)||r.supportsContext("experimental-webgl",n):r.getContext("webgl",n)||r.getContext("experimental-webgl",n)}(e)),r[e]}(e&&e.failIfMajorPerformanceCaveat))}e.exports?e.exports=t:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=t);var r={};t.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),r={create:function(t,r,n){var a=e.window.document.createElement(t);return void 0!==r&&(a.className=r),n&&n.appendChild(a),a},createNS:function(t,r){return e.window.document.createElementNS(t,r)}},n=e.window.document.documentElement.style;function a(e){if(!n)return e[0];for(var t=0;t<e.length;t++)if(e[t]in n)return e[t];return e[0]}var i,o=a(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){n&&o&&(i=n[o],n[o]="none")},r.enableDrag=function(){n&&o&&(n[o]=i)};var s=a(["transform","WebkitTransform"]);r.setTransform=function(e,t){e.style[s]=t};var l=!1;try{var c=Object.defineProperty({},"passive",{get:function(){l=!0}});e.window.addEventListener("test",c,c),e.window.removeEventListener("test",c,c)}catch(e){l=!1}r.addEventListener=function(e,t,r,n){void 0===n&&(n={}),"passive"in n&&l?e.addEventListener(t,r,n):e.addEventListener(t,r,n.capture)},r.removeEventListener=function(e,t,r,n){void 0===n&&(n={}),"passive"in n&&l?e.removeEventListener(t,r,n):e.removeEventListener(t,r,n.capture)};var u=function(t){t.preventDefault(),t.stopPropagation(),e.window.removeEventListener("click",u,!0)};function d(e){var t=e.userImage;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}r.suppressClick=function(){e.window.addEventListener("click",u,!0),e.window.setTimeout((function(){e.window.removeEventListener("click",u,!0)}),0)},r.mousePos=function(t,r){var n=t.getBoundingClientRect(),a=e.window.TouchEvent&&r instanceof e.window.TouchEvent?r.touches[0]:r;return new e.Point(a.clientX-n.left-t.clientLeft,a.clientY-n.top-t.clientTop)},r.touchPos=function(t,r){for(var n=t.getBoundingClientRect(),a=[],i="touchend"===r.type?r.changedTouches:r.touches,o=0;o<i.length;o++)a.push(new e.Point(i[o].clientX-n.left-t.clientLeft,i[o].clientY-n.top-t.clientTop));return a},r.mouseButton=function(t){return void 0!==e.window.InstallTrigger&&2===t.button&&t.ctrlKey&&e.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button},r.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var p=function(t){function r(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,r=this.requestors;t<r.length;t+=1){var n=r[t],a=n.ids,i=n.callback;this._notify(a,i)}this.requestors=[]}},r.prototype.getImage=function(e){return this.images[e]},r.prototype.addImage=function(e,t){this.images[e]=t},r.prototype.updateImage=function(e,t){var r=this.images[e];t.version=r.version+1,this.images[e]=t,this.updatedImages[e]=!0},r.prototype.removeImage=function(e){var t=this.images[e];delete this.images[e],delete this.patterns[e],t.userImage&&t.userImage.onRemove&&t.userImage.onRemove()},r.prototype.listImages=function(){return Object.keys(this.images)},r.prototype.getImages=function(e,t){var r=!0;if(!this.isLoaded())for(var n=0,a=e;n<a.length;n+=1){var i=a[n];this.images[i]||(r=!1)}this.isLoaded()||r?this._notify(e,t):this.requestors.push({ids:e,callback:t})},r.prototype._notify=function(t,r){for(var n={},a=0,i=t;a<i.length;a+=1){var o=i[a];this.images[o]||this.fire(new e.Event("styleimagemissing",{id:o}));var s=this.images[o];s?n[o]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:e.warnOnce('Image "'+o+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}r(null,n)},r.prototype.getPixelSize=function(){var e=this.atlasImage;return{width:e.width,height:e.height}},r.prototype.getPattern=function(t){var r=this.patterns[t],n=this.getImage(t);if(!n)return null;if(r&&r.position.version===n.version)return r.position;if(r)r.position.version=n.version;else{var a={w:n.data.width+2,h:n.data.height+2,x:0,y:0},i=new e.ImagePosition(a,n);this.patterns[t]={bin:a,position:i}}return this._updatePatternAtlas(),this.patterns[t].position},r.prototype.bind=function(t){var r=t.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.Texture(t,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)},r.prototype._updatePatternAtlas=function(){var t=[];for(var r in this.patterns)t.push(this.patterns[r].bin);var n=e.potpack(t),a=n.w,i=n.h,o=this.atlasImage;for(var s in o.resize({width:a||1,height:i||1}),this.patterns){var l=this.patterns[s].bin,c=l.x+1,u=l.y+1,d=this.images[s].data,p=d.width,h=d.height;e.RGBAImage.copy(d,o,{x:0,y:0},{x:c,y:u},{width:p,height:h}),e.RGBAImage.copy(d,o,{x:0,y:h-1},{x:c,y:u-1},{width:p,height:1}),e.RGBAImage.copy(d,o,{x:0,y:0},{x:c,y:u+h},{width:p,height:1}),e.RGBAImage.copy(d,o,{x:p-1,y:0},{x:c-1,y:u},{width:1,height:h}),e.RGBAImage.copy(d,o,{x:0,y:0},{x:c+p,y:u},{width:1,height:h})}this.dirty=!0},r.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},r.prototype.dispatchRenderCallbacks=function(e){for(var t=0,r=e;t<r.length;t+=1){var n=r[t];if(!this.callbackDispatchedThisFrame[n]){this.callbackDispatchedThisFrame[n]=!0;var a=this.images[n];d(a)&&this.updateImage(n,a)}}},r}(e.Evented),h=g,f=g,m=1e20;function g(e,t,r,n,a,i){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=n||.25,this.fontFamily=a||"sans-serif",this.fontWeight=i||"normal",this.radius=r||8;var o=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=o,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(o*o),this.gridInner=new Float64Array(o*o),this.f=new Float64Array(o),this.d=new Float64Array(o),this.z=new Float64Array(o+1),this.v=new Int16Array(o),this.middle=Math.round(o/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function v(e,t,r,n,a,i,o){for(var s=0;s<t;s++){for(var l=0;l<r;l++)n[l]=e[l*t+s];for(y(n,a,i,o,r),l=0;l<r;l++)e[l*t+s]=a[l]}for(l=0;l<r;l++){for(s=0;s<t;s++)n[s]=e[l*t+s];for(y(n,a,i,o,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(a[s])}}function y(e,t,r,n,a){r[0]=0,n[0]=-m,n[1]=+m;for(var i=1,o=0;i<a;i++){for(var s=(e[i]+i*i-(e[r[o]]+r[o]*r[o]))/(2*i-2*r[o]);s<=n[o];)o--,s=(e[i]+i*i-(e[r[o]]+r[o]*r[o]))/(2*i-2*r[o]);r[++o]=i,n[o]=s,n[o+1]=+m}for(i=0,o=0;i<a;i++){for(;n[o+1]<i;)o++;t[i]=(i-r[o])*(i-r[o])+e[r[o]]}}g.prototype.draw=function(e){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(e,this.buffer,this.middle);for(var t=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),n=0;n<this.size*this.size;n++){var a=t.data[4*n+3]/255;this.gridOuter[n]=1===a?0:0===a?m:Math.pow(Math.max(0,.5-a),2),this.gridInner[n]=1===a?m:0===a?0:Math.pow(Math.max(0,a-.5),2)}for(v(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),v(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),n=0;n<this.size*this.size;n++){var i=this.gridOuter[n]-this.gridInner[n];r[n]=Math.max(0,Math.min(255,Math.round(255-255*(i/this.radius+this.cutoff))))}return r},h.default=f;var b=function(e,t){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={}};b.prototype.setURL=function(e){this.url=e},b.prototype.getGlyphs=function(t,r){var n=this,a=[];for(var i in t)for(var o=0,s=t[i];o<s.length;o+=1){var l=s[o];a.push({stack:i,id:l})}e.asyncAll(a,(function(e,t){var r=e.stack,a=e.id,i=n.entries[r];i||(i=n.entries[r]={glyphs:{},requests:{}});var o=i.glyphs[a];if(void 0===o){if(o=n._tinySDF(i,r,a))return i.glyphs[a]=o,void t(null,{stack:r,id:a,glyph:o});var s=Math.floor(a/256);if(256*s>65535)t(new Error("glyphs > 65535 not supported"));else{var l=i.requests[s];l||(l=i.requests[s]=[],b.loadGlyphRange(r,s,n.url,n.requestManager,(function(e,t){if(t)for(var r in t)n._doesCharSupportLocalGlyph(+r)||(i.glyphs[+r]=t[+r]);for(var a=0,o=l;a<o.length;a+=1)(0,o[a])(e,t);delete i.requests[s]}))),l.push((function(e,n){e?t(e):n&&t(null,{stack:r,id:a,glyph:n[a]||null})}))}}else t(null,{stack:r,id:a,glyph:o})}),(function(e,t){if(e)r(e);else if(t){for(var n={},a=0,i=t;a<i.length;a+=1){var o=i[a],s=o.stack,l=o.id,c=o.glyph;(n[s]||(n[s]={}))[l]=c&&{id:c.id,bitmap:c.bitmap.clone(),metrics:c.metrics}}r(null,n)}}))},b.prototype._doesCharSupportLocalGlyph=function(t){return!!this.localIdeographFontFamily&&(e.isChar["CJK Unified Ideographs"](t)||e.isChar["Hangul Syllables"](t)||e.isChar.Hiragana(t)||e.isChar.Katakana(t))},b.prototype._tinySDF=function(t,r,n){var a=this.localIdeographFontFamily;if(a&&this._doesCharSupportLocalGlyph(n)){var i=t.tinySDF;if(!i){var o="400";/bold/i.test(r)?o="900":/medium/i.test(r)?o="500":/light/i.test(r)&&(o="200"),i=t.tinySDF=new b.TinySDF(24,3,8,.25,a,o)}return{id:n,bitmap:new e.AlphaImage({width:30,height:30},i.draw(String.fromCharCode(n))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},b.loadGlyphRange=function(t,r,n,a,i){var o=256*r,s=o+255,l=a.transformRequest(a.normalizeGlyphsURL(n).replace("{fontstack}",t).replace("{range}",o+"-"+s),e.ResourceType.Glyphs);e.getArrayBuffer(l,(function(t,r){if(t)i(t);else if(r){for(var n={},a=0,o=e.parseGlyphPBF(r);a<o.length;a+=1){var s=o[a];n[s.id]=s}i(null,n)}}))},b.TinySDF=h;var _=function(){this.specification=e.styleSpec.light.position};_.prototype.possiblyEvaluate=function(t,r){return e.sphericalToCartesian(t.expression.evaluate(r))},_.prototype.interpolate=function(t,r,n){return{x:e.number(t.x,r.x,n),y:e.number(t.y,r.y,n),z:e.number(t.z,r.z,n)}};var x=new e.Properties({anchor:new e.DataConstantProperty(e.styleSpec.light.anchor),position:new _,color:new e.DataConstantProperty(e.styleSpec.light.color),intensity:new e.DataConstantProperty(e.styleSpec.light.intensity)}),w=function(t){function r(r){t.call(this),this._transitionable=new e.Transitionable(x),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(t,r){if(void 0===r&&(r={}),!this._validate(e.validateLight,t,r))for(var n in t){var a=t[n];e.endsWith(n,"-transition")?this._transitionable.setTransition(n.slice(0,-"-transition".length),a):this._transitionable.setValue(n,a)}},r.prototype.updateTransitions=function(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(e){this.properties=this._transitioning.possiblyEvaluate(e)},r.prototype._validate=function(t,r,n){return(!n||!1!==n.validate)&&e.emitValidationErrors(this,t.call(e.validateStyle,e.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:e.styleSpec})))},r}(e.Evented),k=function(e,t){this.width=e,this.height=t,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};k.prototype.getDash=function(e,t){var r=e.join(",")+String(t);return this.positions[r]||(this.positions[r]=this.addDash(e,t)),this.positions[r]},k.prototype.addDash=function(t,r){var n=r?7:0,a=2*n+1;if(this.nextRow+a>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var i=0,o=0;o<t.length;o++)i+=t[o];for(var s=this.width/i,l=s/2,c=t.length%2==1,u=-n;u<=n;u++)for(var d=this.nextRow+n+u,p=this.width*d,h=c?-t[t.length-1]:0,f=t[0],m=1,g=0;g<this.width;g++){for(;f<g/s;)h=f,f+=t[m],c&&m===t.length-1&&(f+=t[0]),m++;var v=Math.abs(g-h*s),y=Math.abs(g-f*s),b=Math.min(v,y),_=m%2==1,x=void 0;if(r){var w=n?u/n*(l+1):0;if(_){var k=l-Math.abs(w);x=Math.sqrt(b*b+k*k)}else x=l-Math.sqrt(b*b+w*w)}else x=(_?1:-1)*b;this.data[3+4*(p+g)]=Math.max(0,Math.min(255,x+128))}var M={y:(this.nextRow+n+.5)/this.height,height:2*n/this.height,width:i};return this.nextRow+=a,this.dirty=!0,M},k.prototype.bind=function(e){var t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.RGBA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,this.data))};var M=function t(r,n){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=e.uniqueId();for(var a=this.workerPool.acquire(this.id),i=0;i<a.length;i++){var o=a[i],s=new t.Actor(o,n,this.id);s.name="Worker "+i,this.actors.push(s)}};function T(t,r,n){var a=function(a,i){if(a)return n(a);if(i){var o=e.pick(e.extend(i,t),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);i.vector_layers&&(o.vectorLayers=i.vector_layers,o.vectorLayerIds=o.vectorLayers.map((function(e){return e.id}))),t.url&&(o.tiles=r.canonicalizeTileset(o,t.url)),n(null,o)}};return t.url?e.getJSON(r.transformRequest(r.normalizeSourceURL(t.url),e.ResourceType.Source),a):e.browser.frame((function(){return a(null,t)}))}M.prototype.broadcast=function(t,r,n){n=n||function(){},e.asyncAll(this.actors,(function(e,n){e.send(t,r,n)}),n)},M.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},M.prototype.remove=function(){this.actors.forEach((function(e){e.remove()})),this.actors=[],this.workerPool.release(this.id)},M.Actor=e.Actor;var C=function(t,r,n){this.bounds=e.LngLatBounds.convert(this.validateBounds(t)),this.minzoom=r||0,this.maxzoom=n||24};C.prototype.validateBounds=function(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]},C.prototype.contains=function(t){var r=Math.pow(2,t.z),n=Math.floor(e.mercatorXfromLng(this.bounds.getWest())*r),a=Math.floor(e.mercatorYfromLat(this.bounds.getNorth())*r),i=Math.ceil(e.mercatorXfromLng(this.bounds.getEast())*r),o=Math.ceil(e.mercatorYfromLat(this.bounds.getSouth())*r);return t.x>=n&&t.x<i&&t.y>=a&&t.y<o};var S=function(t){function r(r,n,a,i){if(t.call(this),this.id=r,this.dispatcher=a,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.extend(this,e.pick(n,["url","scheme","tileSize"])),this._options=e.extend({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(i)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){var t=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=T(this._options,this.map._requestManager,(function(r,n){t._tileJSONRequest=null,t._loaded=!0,r?t.fire(new e.ErrorEvent(r)):n&&(e.extend(t,n),n.bounds&&(t.tileBounds=new C(n.bounds,t.minzoom,t.maxzoom)),e.postTurnstileEvent(n.tiles,t.map._requestManager._customAccessToken),e.postMapLoadEvent(n.tiles,t.map._getMapId(),t.map._requestManager._skuToken,t.map._requestManager._customAccessToken),t.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),t.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.hasTile=function(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return e.extend({},this._options)},r.prototype.loadTile=function(t,r){var n=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),this.url,null),a={request:this.map._requestManager.transformRequest(n,e.ResourceType.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function i(n,a){return delete t.request,t.aborted?r(null):n&&404!==n.status?r(n):(a&&a.resourceTiming&&(t.resourceTiming=a.resourceTiming),this.map._refreshExpiredTiles&&a&&t.setExpiryData(a),t.loadVectorData(a,this.map.painter),e.cacheEntryPossiblyAdded(this.dispatcher),r(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}a.request.collectResourceTiming=this._collectResourceTiming,t.actor&&"expired"!==t.state?"loading"===t.state?t.reloadCallback=r:t.request=t.actor.send("reloadTile",a,i.bind(this)):(t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",a,i.bind(this)))},r.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.actor&&e.actor.send("abortTile",{uid:e.uid,type:this.type,source:this.id},void 0)},r.prototype.unloadTile=function(e){e.unloadVectorData(),e.actor&&e.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id},void 0)},r.prototype.hasTransition=function(){return!1},r}(e.Evented),L=function(t){function r(r,n,a,i){t.call(this),this.id=r,this.dispatcher=a,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.extend({type:"raster"},n),e.extend(this,e.pick(n,["url","scheme","tileSize"]))}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){var t=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=T(this._options,this.map._requestManager,(function(r,n){t._tileJSONRequest=null,t._loaded=!0,r?t.fire(new e.ErrorEvent(r)):n&&(e.extend(t,n),n.bounds&&(t.tileBounds=new C(n.bounds,t.minzoom,t.maxzoom)),e.postTurnstileEvent(n.tiles),e.postMapLoadEvent(n.tiles,t.map._getMapId(),t.map._requestManager._skuToken),t.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})),t.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return e.extend({},this._options)},r.prototype.hasTile=function(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)},r.prototype.loadTile=function(t,r){var n=this,a=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);t.request=e.getImage(this.map._requestManager.transformRequest(a,e.ResourceType.Tile),(function(a,i){if(delete t.request,t.aborted)t.state="unloaded",r(null);else if(a)t.state="errored",r(a);else if(i){n.map._refreshExpiredTiles&&t.setExpiryData(i),delete i.cacheControl,delete i.expires;var o=n.map.painter.context,s=o.gl;t.texture=n.map.painter.getTileTexture(i.width),t.texture?t.texture.update(i,{useMipmap:!0}):(t.texture=new e.Texture(o,i,s.RGBA,{useMipmap:!0}),t.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),o.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,o.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,o.extTextureFilterAnisotropicMax)),t.state="loaded",e.cacheEntryPossiblyAdded(n.dispatcher),r(null)}}))},r.prototype.abortTile=function(e,t){e.request&&(e.request.cancel(),delete e.request),t()},r.prototype.unloadTile=function(e,t){e.texture&&this.map.painter.saveTileTexture(e.texture),t()},r.prototype.hasTransition=function(){return!1},r}(e.Evented),A=function(t){function r(r,n,a,i){t.call(this,r,n,a,i),this.type="raster-dem",this.maxzoom=22,this._options=e.extend({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox"}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(t,r){var n=this.map._requestManager.normalizeTileURL(t.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);function a(e,n){e&&(t.state="errored",r(e)),n&&(t.dem=n,t.needsHillshadePrepare=!0,t.state="loaded",r(null))}t.request=e.getImage(this.map._requestManager.transformRequest(n,e.ResourceType.Tile),function(n,i){if(delete t.request,t.aborted)t.state="unloaded",r(null);else if(n)t.state="errored",r(n);else if(i){this.map._refreshExpiredTiles&&t.setExpiryData(i),delete i.cacheControl,delete i.expires;var o=e.browser.getImageData(i),s={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:o,encoding:this.encoding};t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",s,a.bind(this)))}}.bind(this)),t.neighboringTiles=this._getNeighboringTiles(t.tileID)},r.prototype._getNeighboringTiles=function(t){var r=t.canonical,n=Math.pow(2,r.z),a=(r.x-1+n)%n,i=0===r.x?t.wrap-1:t.wrap,o=(r.x+1+n)%n,s=r.x+1===n?t.wrap+1:t.wrap,l={};return l[new e.OverscaledTileID(t.overscaledZ,i,r.z,a,r.y).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new e.OverscaledTileID(t.overscaledZ,i,r.z,a,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1<n&&(l[new e.OverscaledTileID(t.overscaledZ,i,r.z,a,r.y+1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,o,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(e){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&e.actor.send("removeDEMTile",{uid:e.uid,source:this.id})},r}(L),E=function(t){function r(r,n,a,i){t.call(this),this.id=r,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=a.getActor(),this.setEventedParent(i),this._data=n.data,this._options=e.extend({},n),this._collectResourceTiming=n.collectResourceTiming,this._resourceTiming=[],void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution);var o=e.EXTENT/this.tileSize;this.workerOptions=e.extend({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:e.EXTENT,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?Math.min(n.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:e.EXTENT,radius:(n.clusterRadius||50)*o,log:!1},clusterProperties:n.clusterProperties},n.workerOptions)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){var t=this;this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(r){if(r)t.fire(new e.ErrorEvent(r));else{var n={dataType:"source",sourceDataType:"metadata"};t._collectResourceTiming&&t._resourceTiming&&t._resourceTiming.length>0&&(n.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",n))}}))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setData=function(t){var r=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)r.fire(new e.ErrorEvent(t));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new e.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},r.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},r.prototype.getClusterLeaves=function(e,t,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:r},n),this},r.prototype._updateWorkerData=function(t){var r=this;this._loaded=!1;var n=e.extend({},this.workerOptions),a=this._data;"string"==typeof a?(n.request=this.map._requestManager.transformRequest(e.browser.resolveURL(a),e.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(a),this.actor.send(this.type+".loadData",n,(function(e,a){r._removed||a&&a.abandoned||(r._loaded=!0,a&&a.resourceTiming&&a.resourceTiming[r.id]&&(r._resourceTiming=a.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),t(e))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(t,r){var n=this,a=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var i={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};t.request=this.actor.send(a,i,(function(e,i){return delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(i,n.map.painter,"reloadTile"===a),r(null))}))},r.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},r.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(e.Evented),D=function(t){function r(e,r,n,a){t.call(this),this.id=e,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=r}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(t,r){var n=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(a,i){n._loaded=!0,a?n.fire(new e.ErrorEvent(a)):i&&(n.image=i,t&&(n.coordinates=t),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setCoordinates=function(t){var r=this;this.coordinates=t;var n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){for(var r=1/0,n=1/0,a=-1/0,i=-1/0,o=0,s=t;o<s.length;o+=1){var l=s[o];r=Math.min(r,l.x),n=Math.min(n,l.y),a=Math.max(a,l.x),i=Math.max(i,l.y)}var c=a-r,u=i-n,d=Math.max(c,u),p=Math.max(0,Math.floor(-Math.log(d)/Math.LN2)),h=Math.pow(2,p);return new e.CanonicalTileID(p,Math.floor((r+a)/2*h),Math.floor((n+i)/2*h))}(n),this.minzoom=this.maxzoom=this.tileID.z;var a=n.map((function(e){return r.tileID.getTilePoint(e)._round()}));return this._boundsArray=new e.StructArrayLayout4i8,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,e.EXTENT,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,e.EXTENT),this._boundsArray.emplaceBack(a[2].x,a[2].y,e.EXTENT,e.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,e.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new e.Texture(t,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var a=this.tiles[n];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.loadTile=function(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(e.Evented),I=function(t){function r(e,r,n,a){t.call(this,e,r,n,a),this.roundZoom=!0,this.type="video",this.options=r}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){var t=this;this._loaded=!1;var r=this.options;this.urls=[];for(var n=0,a=r.urls;n<a.length;n+=1){var i=a[n];this.urls.push(this.map._requestManager.transformRequest(i,e.ResourceType.Source).url)}e.getVideo(this.urls,(function(r,n){t._loaded=!0,r?t.fire(new e.ErrorEvent(r)):n&&(t.video=n,t.video.loop=!0,t.video.addEventListener("playing",(function(){t.map.triggerRepaint()})),t.map&&t.video.play(),t._finishLoading())}))},r.prototype.pause=function(){this.video&&this.video.pause()},r.prototype.play=function(){this.video&&this.video.play()},r.prototype.seek=function(t){if(this.video){var r=this.video.seekable;t<r.start(0)||t>r.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=t}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,e.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var a=this.tiles[n];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(D),P=function(t){function r(r,n,a,i){t.call(this,r,n,a,i),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!=typeof e}))}))||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof e.window.HTMLCanvasElement||this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var a in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,e.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var i=this.tiles[a];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];e<t.length;e+=1){var r=t[e];if(isNaN(r)||r<=0)return!0}return!1},r}(D),O={vector:S,raster:L,"raster-dem":A,geojson:E,video:I,image:D,canvas:P},R=function(t,r,n,a){var i=new O[r.type](t,r,n,a);if(i.id!==t)throw new Error("Expected Source id to be "+t+" instead of "+i.id);return e.bindAll(["load","abort","unload","serialize","prepare"],i),i};function F(t,r){var n=e.identity([]);return e.translate(n,n,[1,1,0]),e.scale(n,n,[.5*t.width,.5*t.height,1]),e.multiply(n,n,t.calculatePosMatrix(r.toUnwrapped()))}function z(e,t,r,n,a){var i=function(e,t,r){if(e)for(var n=0,a=e;n<a.length;n+=1){var i=t[a[n]];if(i&&i.source===r&&"fill-extrusion"===i.type)return!0}else for(var o in t){var s=t[o];if(s.source===r&&"fill-extrusion"===s.type)return!0}return!1}(n&&n.layers,t,e.id),o=a.maxPitchScaleFactor(),s=e.tilesIn(r,o,i);s.sort(N);for(var l=[],c=0,u=s;c<u.length;c+=1){var d=u[c];l.push({wrappedTileID:d.tileID.wrapped().key,queryResults:d.tile.queryRenderedFeatures(t,e._state,d.queryGeometry,d.cameraQueryGeometry,d.scale,n,a,o,F(e.transform,d.tileID))})}var p=function(e){for(var t={},r={},n=0,a=e;n<a.length;n+=1){var i=a[n],o=i.queryResults,s=i.wrappedTileID,l=r[s]=r[s]||{};for(var c in o)for(var u=o[c],d=l[c]=l[c]||{},p=t[c]=t[c]||[],h=0,f=u;h<f.length;h+=1){var m=f[h];d[m.featureIndex]||(d[m.featureIndex]=!0,p.push(m))}}return t}(l);for(var h in p)p[h].forEach((function(t){var r=t.feature,n=e.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=n}));return p}function N(e,t){var r=e.tileID,n=t.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}var j=function(e,t){this.max=e,this.onRemove=t,this.reset()};j.prototype.reset=function(){for(var e in this.data)for(var t=0,r=this.data[e];t<r.length;t+=1){var n=r[t];n.timeout&&clearTimeout(n.timeout),this.onRemove(n.value)}return this.data={},this.order=[],this},j.prototype.add=function(e,t,r){var n=this,a=e.wrapped().key;void 0===this.data[a]&&(this.data[a]=[]);var i={value:t,timeout:void 0};if(void 0!==r&&(i.timeout=setTimeout((function(){n.remove(e,i)}),r)),this.data[a].push(i),this.order.push(a),this.order.length>this.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},j.prototype.has=function(e){return e.wrapped().key in this.data},j.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},j.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},j.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},j.prototype.remove=function(e,t){if(!this.has(e))return this;var r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),a=this.data[r][n];return this.data[r].splice(n,1),a.timeout&&clearTimeout(a.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(a.value),this.order.splice(this.order.indexOf(r),1),this},j.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this};var B=function(e,t,r){this.context=e;var n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer};B.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},B.prototype.updateData=function(e){var t=this.context.gl;this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)},B.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var Y={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},H=function(e,t,r,n){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;var a=e.gl;this.buffer=a.createBuffer(),e.bindVertexBuffer.set(this.buffer),a.bufferData(a.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer};H.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},H.prototype.updateData=function(e){var t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)},H.prototype.enableAttributes=function(e,t){for(var r=0;r<this.attributes.length;r++){var n=this.attributes[r],a=t.attributes[n.name];void 0!==a&&e.enableVertexAttribArray(a)}},H.prototype.setVertexAttribPointers=function(e,t,r){for(var n=0;n<this.attributes.length;n++){var a=this.attributes[n],i=t.attributes[a.name];void 0!==i&&e.vertexAttribPointer(i,a.components,e[Y[a.type]],!1,this.itemSize,a.offset+this.itemSize*(r||0))}},H.prototype.destroy=function(){var e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)};var V=function(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};V.prototype.get=function(){return this.current},V.prototype.set=function(e){},V.prototype.getDefault=function(){return this.default},V.prototype.setDefault=function(){this.set(this.default)};var U=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return e.Color.transparent},r.prototype.set=function(e){var t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)},r}(V),W=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 1},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)},t}(V),G=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)},t}(V),q=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[!0,!0,!0,!0]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)},t}(V),K=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)},t}(V),X=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 255},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)},t}(V),Z=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},t.prototype.set=function(e){var t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)},t}(V),J=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)},t}(V),$=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}},t}(V),Q=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return[0,1]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)},t}(V),ee=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}},t}(V),te=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.LESS},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)},t}(V),re=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}},t}(V),ne=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var e=this.gl;return[e.ONE,e.ZERO]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)},t}(V),ae=function(t){function r(){t.apply(this,arguments)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return e.Color.transparent},r.prototype.set=function(e){var t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)},r}(V),ie=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.FUNC_ADD},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)},t}(V),oe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}},t}(V),se=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.BACK},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)},t}(V),le=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.CCW},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)},t}(V),ce=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)},t}(V),ue=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return this.gl.TEXTURE0},t.prototype.set=function(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)},t}(V),de=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){var e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]},t.prototype.set=function(e){var t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)},t}(V),pe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},t}(V),he=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(V),fe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},t}(V),me=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},t}(V),ge=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){var t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1},t}(V),ve=function(e){function t(t){e.call(this,t),this.vao=t.extVertexArrayObject}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t.prototype.set=function(e){this.vao&&(e!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(e),this.current=e,this.dirty=!1)},t}(V),ye=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return 4},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},t}(V),be=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},t}(V),_e=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return!1},t.prototype.set=function(e){if(e!==this.current||this.dirty){var t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},t}(V),xe=function(e){function t(t,r){e.call(this,t),this.context=t,this.parent=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDefault=function(){return null},t}(V),we=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setDirty=function(){this.dirty=!0},t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},t}(xe),ke=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.set=function(e){if(e!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t}(xe),Me=function(e,t,r){this.context=e,this.width=t,this.height=r;var n=e.gl,a=this.framebuffer=n.createFramebuffer();this.colorAttachment=new we(e,a),this.depthAttachment=new ke(e,a)};Me.prototype.destroy=function(){var e=this.context.gl,t=this.colorAttachment.get();t&&e.deleteTexture(t);var r=this.depthAttachment.get();r&&e.deleteRenderbuffer(r),e.deleteFramebuffer(this.framebuffer)};var Te=function(e,t,r){this.func=e,this.mask=t,this.range=r};Te.ReadOnly=!1,Te.ReadWrite=!0,Te.disabled=new Te(519,Te.ReadOnly,[0,1]);var Ce=function(e,t,r,n,a,i){this.test=e,this.ref=t,this.mask=r,this.fail=n,this.depthFail=a,this.pass=i};Ce.disabled=new Ce({func:519,mask:0},0,0,7680,7680,7680);var Se=function(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r};Se.disabled=new Se(Se.Replace=[1,0],e.Color.transparent,[!1,!1,!1,!1]),Se.unblended=new Se(Se.Replace,e.Color.transparent,[!0,!0,!0,!0]),Se.alphaBlended=new Se([1,771],e.Color.transparent,[!0,!0,!0,!0]);var Le=function(e,t,r){this.enable=e,this.mode=t,this.frontFace=r};Le.disabled=new Le(!1,1029,2305),Le.backCCW=new Le(!0,1029,2305);var Ae=function(e){this.gl=e,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new U(this),this.clearDepth=new W(this),this.clearStencil=new G(this),this.colorMask=new q(this),this.depthMask=new K(this),this.stencilMask=new X(this),this.stencilFunc=new Z(this),this.stencilOp=new J(this),this.stencilTest=new $(this),this.depthRange=new Q(this),this.depthTest=new ee(this),this.depthFunc=new te(this),this.blend=new re(this),this.blendFunc=new ne(this),this.blendColor=new ae(this),this.blendEquation=new ie(this),this.cullFace=new oe(this),this.cullFaceSide=new se(this),this.frontFace=new le(this),this.program=new ce(this),this.activeTexture=new ue(this),this.viewport=new de(this),this.bindFramebuffer=new pe(this),this.bindRenderbuffer=new he(this),this.bindTexture=new fe(this),this.bindVertexBuffer=new me(this),this.bindElementBuffer=new ge(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ve(this),this.pixelStoreUnpack=new ye(this),this.pixelStoreUnpackPremultiplyAlpha=new be(this),this.pixelStoreUnpackFlipY=new _e(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=e.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&e.getExtension("OES_texture_half_float_linear")};Ae.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Ae.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Ae.prototype.createIndexBuffer=function(e,t){return new B(this,e,t)},Ae.prototype.createVertexBuffer=function(e,t,r){return new H(this,e,t,r)},Ae.prototype.createRenderbuffer=function(e,t,r){var n=this.gl,a=n.createRenderbuffer();return this.bindRenderbuffer.set(a),n.renderbufferStorage(n.RENDERBUFFER,e,t,r),this.bindRenderbuffer.set(null),a},Ae.prototype.createFramebuffer=function(e,t){return new Me(this,e,t)},Ae.prototype.clear=function(e){var t=e.color,r=e.depth,n=this.gl,a=0;t&&(a|=n.COLOR_BUFFER_BIT,this.clearColor.set(t),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(a|=n.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),n.clear(a)},Ae.prototype.setCullFace=function(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))},Ae.prototype.setDepthMode=function(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)},Ae.prototype.setStencilMode=function(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)},Ae.prototype.setColorMode=function(t){e.deepEqual(t.blendFunction,Se.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(t.blendFunction),this.blendColor.set(t.blendColor)),this.colorMask.set(t.mask)},Ae.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ee=function(t){function r(r,n,a){var i=this;t.call(this),this.id=r,this.dispatcher=a,this.on("data",(function(e){"source"===e.dataType&&"metadata"===e.sourceDataType&&(i._sourceLoaded=!0),i._sourceLoaded&&!i._paused&&"source"===e.dataType&&"content"===e.sourceDataType&&(i.reload(),i.transform&&i.update(i.transform))})),this.on("error",(function(){i._sourceErrored=!0})),this._source=R(r,n,a,this),this._tiles={},this._cache=new j(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._coveredTiles={},this._state=new e.SourceFeatureState}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(e)},r.prototype.onRemove=function(e){this._source&&this._source.onRemove&&this._source.onRemove(e)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var e in this._tiles){var t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(e,t){return this._source.loadTile(e,t)},r.prototype._unloadTile=function(e){if(this._source.unloadTile)return this._source.unloadTile(e,(function(){}))},r.prototype._abortTile=function(e){if(this._source.abortTile)return this._source.abortTile(e,(function(){}))},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(e){for(var t in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var r=this._tiles[t];r.upload(e),r.prepare(this.map.style.imageManager)}},r.prototype.getIds=function(){return Object.keys(this._tiles).map(Number).sort(De)},r.prototype.getRenderableIds=function(t){var r=this,n=[];for(var a in this._tiles)this._isIdRenderable(+a,t)&&n.push(+a);return t?n.sort((function(t,n){var a=r._tiles[t].tileID,i=r._tiles[n].tileID,o=new e.Point(a.canonical.x,a.canonical.y)._rotate(r.transform.angle),s=new e.Point(i.canonical.x,i.canonical.y)._rotate(r.transform.angle);return a.overscaledZ-i.overscaledZ||s.y-o.y||s.x-o.x})):n.sort(De)},r.prototype.hasRenderableParent=function(e){var t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)},r.prototype._isIdRenderable=function(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var e in this._cache.reset(),this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(e,"reloading")},r.prototype._reloadTile=function(e,t){var r=this._tiles[e];r&&("loading"!==r.state&&(r.state=t),this._loadTile(r,this._tileLoaded.bind(this,r,e,t)))},r.prototype._tileLoaded=function(t,r,n,a){if(a)return t.state="errored",void(404!==a.status?this._source.fire(new e.ErrorEvent(a,{tile:t})):this.update(this.transform));t.timeAdded=e.browser.now(),"expired"===n&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(r,t),"raster-dem"===this.getSource().type&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),this._source.fire(new e.Event("data",{dataType:"source",tile:t,coord:t.tileID}))},r.prototype._backfillDEM=function(e){for(var t=this.getRenderableIds(),r=0;r<t.length;r++){var n=t[r];if(e.neighboringTiles&&e.neighboringTiles[n]){var a=this.getTileByID(n);i(e,a),i(a,e)}}function i(e,t){e.needsHillshadePrepare=!0;var r=t.tileID.canonical.x-e.tileID.canonical.x,n=t.tileID.canonical.y-e.tileID.canonical.y,a=Math.pow(2,e.tileID.canonical.z),i=t.tileID.key;0===r&&0===n||Math.abs(n)>1||(Math.abs(r)>1&&(1===Math.abs(r+a)?r+=a:1===Math.abs(r-a)&&(r-=a)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[i]&&(e.neighboringTiles[i].backfilled=!0)))}},r.prototype.getTile=function(e){return this.getTileByID(e.key)},r.prototype.getTileByID=function(e){return this._tiles[e]},r.prototype.getZoom=function(e){return e.zoom+e.scaleZoom(e.tileSize/this._source.tileSize)},r.prototype._retainLoadedChildren=function(e,t,r,n){for(var a in this._tiles){var i=this._tiles[a];if(!(n[a]||!i.hasData()||i.tileID.overscaledZ<=t||i.tileID.overscaledZ>r)){for(var o=i.tileID;i&&i.tileID.overscaledZ>t+1;){var s=i.tileID.scaledTo(i.tileID.overscaledZ-1);(i=this._tiles[s.key])&&i.hasData()&&(o=s)}for(var l=o;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(e,t){for(var r=e.overscaledZ-1;r>=t;r--){var n=e.scaledTo(r);if(!n)return;var a=String(n.key),i=this._tiles[a];if(i&&i.hasData())return i;if(this._cache.has(n))return this._cache.get(n)}},r.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),r=Math.floor(5*t),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,r=Math.round(t);if(this._prevLng=e,r){var n={};for(var a in this._tiles){var i=this._tiles[a];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+r),n[i.tileID.key]=i}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(t){var n=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var a;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?a=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(a=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(a=a.filter((function(e){return n._source.hasTile(e)})))):a=[];var i=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(t)),o=Math.max(i-r.maxOverzooming,this._source.minzoom),s=Math.max(i+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(a,i);if(Ie(this._source.type)){for(var c={},u={},d=0,p=Object.keys(l);d<p.length;d+=1){var h=p[d],f=l[h],m=this._tiles[h];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=e.browser.now())){var g=this.findLoadedParent(f,o);g&&(this._addTile(g.tileID),c[g.tileID.key]=g.tileID),u[h]=f}}for(var v in this._retainLoadedChildren(u,i,s,l),c)l[v]||(this._coveredTiles[v]=!0,l[v]=c[v])}for(var y in l)this._tiles[y].clearFadeHold();for(var b=0,_=e.keysDifference(this._tiles,l);b<_.length;b+=1){var x=_[b],w=this._tiles[x];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(x)}}},r.prototype.releaseSymbolFadeTiles=function(){for(var e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)},r.prototype._updateRetainedTiles=function(e,t){for(var n={},a={},i=Math.max(t-r.maxOverzooming,this._source.minzoom),o=Math.max(t+r.maxUnderzooming,this._source.minzoom),s={},l=0,c=e;l<c.length;l+=1){var u=c[l],d=this._addTile(u);n[u.key]=u,d.hasData()||t<this._source.maxzoom&&(s[u.key]=u)}this._retainLoadedChildren(s,t,o,n);for(var p=0,h=e;p<h.length;p+=1){var f=h[p],m=this._tiles[f.key];if(!m.hasData()){if(t+1>this._source.maxzoom){var g=f.children(this._source.maxzoom)[0],v=this.getTile(g);if(v&&v.hasData()){n[g.key]=g;continue}}else{var y=f.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var b=m.wasRequested(),_=f.overscaledZ-1;_>=i;--_){var x=f.scaledTo(_);if(a[x.key])break;if(a[x.key]=!0,!(m=this.getTile(x))&&b&&(m=this._addTile(x)),m&&(n[x.key]=x,b=m.wasRequested(),m.hasData()))break}}}return n},r.prototype._addTile=function(t){var r=this._tiles[t.key];if(r)return r;(r=this._cache.getAndRemove(t))&&(this._setTileReloadTimer(t.key,r),r.tileID=t,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,r)));var n=Boolean(r);return n||(r=new e.Tile(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,t.key,r.state))),r?(r.uses++,this._tiles[t.key]=r,n||this._source.fire(new e.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(e,t){var r=this;e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);var n=t.getExpiryTimeout();n&&(this._timers[e]=setTimeout((function(){r._reloadTile(e,"expired"),delete r._timers[e]}),n))},r.prototype._removeTile=function(e){var t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},r.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},r.prototype.tilesIn=function(t,r,n){var a=this,i=[],o=this.transform;if(!o)return i;for(var s=n?o.getCameraQueryGeometry(t):t,l=t.map((function(e){return o.pointCoordinate(e)})),c=s.map((function(e){return o.pointCoordinate(e)})),u=this.getIds(),d=1/0,p=1/0,h=-1/0,f=-1/0,m=0,g=c;m<g.length;m+=1){var v=g[m];d=Math.min(d,v.x),p=Math.min(p,v.y),h=Math.max(h,v.x),f=Math.max(f,v.y)}for(var y=function(t){var n=a._tiles[u[t]];if(!n.holdingForFade()){var s=n.tileID,m=Math.pow(2,o.zoom-n.tileID.overscaledZ),g=r*n.queryPadding*e.EXTENT/n.tileSize/m,v=[s.getTilePoint(new e.MercatorCoordinate(d,p)),s.getTilePoint(new e.MercatorCoordinate(h,f))];if(v[0].x-g<e.EXTENT&&v[0].y-g<e.EXTENT&&v[1].x+g>=0&&v[1].y+g>=0){var y=l.map((function(e){return s.getTilePoint(e)})),b=c.map((function(e){return s.getTilePoint(e)}));i.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:b,scale:m})}}},b=0;b<u.length;b++)y(b);return i},r.prototype.getVisibleCoordinates=function(e){for(var t=this,r=this.getRenderableIds(e).map((function(e){return t._tiles[e].tileID})),n=0,a=r;n<a.length;n+=1){var i=a[n];i.posMatrix=this.transform.calculatePosMatrix(i.toUnwrapped())}return r},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Ie(this._source.type))for(var t in this._tiles){var r=this._tiles[t];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=e.browser.now())return!0}return!1},r.prototype.setFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.updateState(e,t,r)},r.prototype.removeFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,r)},r.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},r}(e.Evented);function De(e,t){return e%32-t%32||t-e}function Ie(e){return"raster"===e||"image"===e||"video"===e}function Pe(){return new e.window.Worker(Qn.workerUrl)}Ee.maxOverzooming=10,Ee.maxUnderzooming=3;var Oe=function(){this.active={}};Oe.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length<Oe.workerCount;)this.workers.push(new Pe);return this.active[e]=!0,this.workers.slice()},Oe.prototype.release=function(e){delete this.active[e],0===Object.keys(this.active).length&&(this.workers.forEach((function(e){e.terminate()})),this.workers=null)};var Re,Fe=Math.floor(e.browser.hardwareConcurrency/2);function ze(t,r){var n={};for(var a in t)"ref"!==a&&(n[a]=t[a]);return e.refProperties.forEach((function(e){e in r&&(n[e]=r[e])})),n}function Ne(e){e=e.slice();for(var t=Object.create(null),r=0;r<e.length;r++)t[e[r].id]=e[r];for(var n=0;n<e.length;n++)"ref"in e[n]&&(e[n]=ze(e[n],t[e[n].ref]));return e}Oe.workerCount=Math.max(Math.min(Fe,6),1);var je={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Be(e,t,r){r.push({command:je.addSource,args:[e,t[e]]})}function Ye(e,t,r){t.push({command:je.removeSource,args:[e]}),r[e]=!0}function He(e,t,r,n){Ye(e,r,n),Be(e,t,r)}function Ve(t,r,n){var a;for(a in t[n])if(t[n].hasOwnProperty(a)&&"data"!==a&&!e.deepEqual(t[n][a],r[n][a]))return!1;for(a in r[n])if(r[n].hasOwnProperty(a)&&"data"!==a&&!e.deepEqual(t[n][a],r[n][a]))return!1;return!0}function Ue(t,r,n,a,i,o){var s;for(s in r=r||{},t=t||{})t.hasOwnProperty(s)&&(e.deepEqual(t[s],r[s])||n.push({command:o,args:[a,s,r[s],i]}));for(s in r)r.hasOwnProperty(s)&&!t.hasOwnProperty(s)&&(e.deepEqual(t[s],r[s])||n.push({command:o,args:[a,s,r[s],i]}))}function We(e){return e.id}function Ge(e,t){return e[t.id]=t,e}var qe=function(e,t,r){var n=this.boxCells=[],a=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(var i=0;i<this.xCellCount*this.yCellCount;i++)n.push([]),a.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0};function Ke(t,r,n,a,i){var o=e.create();return r?(e.scale(o,o,[1/i,1/i,1]),n||e.rotateZ(o,o,a.angle)):e.multiply(o,a.labelPlaneMatrix,t),o}function Xe(t,r,n,a,i){if(r){var o=e.clone(t);return e.scale(o,o,[i,i,1]),n||e.rotateZ(o,o,-a.angle),o}return a.glCoordMatrix}function Ze(t,r){var n=[t.x,t.y,0,1];ot(n,n,r);var a=n[3];return{point:new e.Point(n[0]/a,n[1]/a),signedDistanceFromCamera:a}}function Je(e,t){var r=e[0]/e[3],n=e[1]/e[3];return r>=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function $e(t,r,n,a,i,o,s,l){var c=a?t.textSizeData:t.iconSizeData,u=e.evaluateSizeForZoom(c,n.transform.zoom),d=[256/n.width*2+1,256/n.height*2+1],p=a?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;p.clear();for(var h=t.lineVertexArray,f=a?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=n.transform.width/n.transform.height,g=!1,v=0;v<f.length;v++){var y=f.get(v);if(y.hidden||y.writingMode===e.WritingMode.vertical&&!g)it(y.numGlyphs,p);else{g=!1;var b=[y.anchorX,y.anchorY,0,1];if(e.transformMat4(b,b,r),Je(b,d)){var _=.5+b[3]/n.transform.cameraToCenterDistance*.5,x=e.evaluateSizeForFeature(c,u,y),w=s?x*_:x/_,k=new e.Point(y.anchorX,y.anchorY),M=Ze(k,i).point,T={},C=tt(y,w,!1,l,r,i,o,t.glyphOffsetArray,h,p,M,k,T,m);g=C.useVertical,(C.notEnoughRoom||g||C.needsFlipping&&tt(y,w,!0,l,r,i,o,t.glyphOffsetArray,h,p,M,k,T,m).notEnoughRoom)&&it(y.numGlyphs,p)}else it(y.numGlyphs,p)}}a?t.text.dynamicLayoutVertexBuffer.updateData(p):t.icon.dynamicLayoutVertexBuffer.updateData(p)}function Qe(e,t,r,n,a,i,o,s,l,c,u,d){var p=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,m=t.getoffsetX(s.glyphStartIndex),g=t.getoffsetX(p-1),v=nt(e*m,r,n,a,i,o,s.segment,h,f,l,c,u,d);if(!v)return null;var y=nt(e*g,r,n,a,i,o,s.segment,h,f,l,c,u,d);return y?{first:v,last:y}:null}function et(t,r,n,a){return t===e.WritingMode.horizontal&&Math.abs(n.y-r.y)>Math.abs(n.x-r.x)*a?{useVertical:!0}:(t===e.WritingMode.vertical?r.y<n.y:r.x>n.x)?{needsFlipping:!0}:null}function tt(t,r,n,a,i,o,s,l,c,u,d,p,h,f){var m,g=r/24,v=t.lineOffsetX*g,y=t.lineOffsetY*g;if(t.numGlyphs>1){var b=t.glyphStartIndex+t.numGlyphs,_=t.lineStartIndex,x=t.lineStartIndex+t.lineLength,w=Qe(g,l,v,y,n,d,p,t,c,o,h,!1);if(!w)return{notEnoughRoom:!0};var k=Ze(w.first.point,s).point,M=Ze(w.last.point,s).point;if(a&&!n){var T=et(t.writingMode,k,M,f);if(T)return T}m=[w.first];for(var C=t.glyphStartIndex+1;C<b-1;C++)m.push(nt(g*l.getoffsetX(C),v,y,n,d,p,t.segment,_,x,c,o,h,!1));m.push(w.last)}else{if(a&&!n){var S=Ze(p,i).point,L=t.lineStartIndex+t.segment+1,A=new e.Point(c.getx(L),c.gety(L)),E=Ze(A,i),D=E.signedDistanceFromCamera>0?E.point:rt(p,A,S,1,i),I=et(t.writingMode,S,D,f);if(I)return I}var P=nt(g*l.getoffsetX(t.glyphStartIndex),v,y,n,d,p,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,o,h,!1);if(!P)return{notEnoughRoom:!0};m=[P]}for(var O=0,R=m;O<R.length;O+=1){var F=R[O];e.addDynamicAttributes(u,F.point,F.angle)}return{}}function rt(e,t,r,n,a){var i=Ze(e.add(e.sub(t)._unit()),a).point,o=r.sub(i);return r.add(o._mult(n/o.mag()))}function nt(t,r,n,a,i,o,s,l,c,u,d,p,h){var f=a?t-r:t+r,m=f>0?1:-1,g=0;a&&(m*=-1,g=Math.PI),m<0&&(g+=Math.PI);for(var v=m>0?l+s:l+s+1,y=v,b=i,_=i,x=0,w=0,k=Math.abs(f);x+w<=k;){if((v+=m)<l||v>=c)return null;if(_=b,void 0===(b=p[v])){var M=new e.Point(u.getx(v),u.gety(v)),T=Ze(M,d);if(T.signedDistanceFromCamera>0)b=p[v]=T.point;else{var C=v-m;b=rt(0===x?o:new e.Point(u.getx(C),u.gety(C)),M,_,k-x+1,d)}}x+=w,w=_.dist(b)}var S=(k-x)/w,L=b.sub(_),A=L.mult(S)._add(_);return A._add(L._unit()._perp()._mult(n*m)),{point:A,angle:g+Math.atan2(b.y-_.y,b.x-_.x),tileDistance:h?{prevTileDistance:v-m===y?0:u.gettileUnitDistanceFromAnchor(v-m),lastSegmentViewportDistance:k-x}:null}}qe.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},qe.prototype.insert=function(e,t,r,n,a){this._forEachCell(t,r,n,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(a)},qe.prototype.insertCircle=function(e,t,r,n){this._forEachCell(t-n,r-n,t+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(n)},qe.prototype._insertBoxCell=function(e,t,r,n,a,i){this.boxCells[a].push(i)},qe.prototype._insertCircleCell=function(e,t,r,n,a,i){this.circleCells[a].push(i)},qe.prototype._query=function(e,t,r,n,a,i){if(r<0||e>this.width||n<0||t>this.height)return!a&&[];var o=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(a)return!0;for(var s=0;s<this.boxKeys.length;s++)o.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var c=this.circles[3*l],u=this.circles[3*l+1],d=this.circles[3*l+2];o.push({key:this.circleKeys[l],x1:c-d,y1:u-d,x2:c+d,y2:u+d})}return i?o.filter(i):o}var p={hitTest:a,seenUids:{box:{},circle:{}}};return this._forEachCell(e,t,r,n,this._queryCell,o,p,i),a?o.length>0:o},qe.prototype._queryCircle=function(e,t,r,n,a){var i=e-r,o=e+r,s=t-r,l=t+r;if(o<0||i>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(i,s,o,l,this._queryCellCircle,c,u,a),n?c.length>0:c},qe.prototype.query=function(e,t,r,n,a){return this._query(e,t,r,n,!1,a)},qe.prototype.hitTest=function(e,t,r,n,a){return this._query(e,t,r,n,!0,a)},qe.prototype.hitTestCircle=function(e,t,r,n){return this._queryCircle(e,t,r,!0,n)},qe.prototype._queryCell=function(e,t,r,n,a,i,o,s){var l=o.seenUids,c=this.boxCells[a];if(null!==c)for(var u=this.bboxes,d=0,p=c;d<p.length;d+=1){var h=p[d];if(!l.box[h]){l.box[h]=!0;var f=4*h;if(e<=u[f+2]&&t<=u[f+3]&&r>=u[f+0]&&n>=u[f+1]&&(!s||s(this.boxKeys[h]))){if(o.hitTest)return i.push(!0),!0;i.push({key:this.boxKeys[h],x1:u[f],y1:u[f+1],x2:u[f+2],y2:u[f+3]})}}}var m=this.circleCells[a];if(null!==m)for(var g=this.circles,v=0,y=m;v<y.length;v+=1){var b=y[v];if(!l.circle[b]){l.circle[b]=!0;var _=3*b;if(this._circleAndRectCollide(g[_],g[_+1],g[_+2],e,t,r,n)&&(!s||s(this.circleKeys[b]))){if(o.hitTest)return i.push(!0),!0;var x=g[_],w=g[_+1],k=g[_+2];i.push({key:this.circleKeys[b],x1:x-k,y1:w-k,x2:x+k,y2:w+k})}}}},qe.prototype._queryCellCircle=function(e,t,r,n,a,i,o,s){var l=o.circle,c=o.seenUids,u=this.boxCells[a];if(null!==u)for(var d=this.bboxes,p=0,h=u;p<h.length;p+=1){var f=h[p];if(!c.box[f]){c.box[f]=!0;var m=4*f;if(this._circleAndRectCollide(l.x,l.y,l.radius,d[m+0],d[m+1],d[m+2],d[m+3])&&(!s||s(this.boxKeys[f])))return i.push(!0),!0}}var g=this.circleCells[a];if(null!==g)for(var v=this.circles,y=0,b=g;y<b.length;y+=1){var _=b[y];if(!c.circle[_]){c.circle[_]=!0;var x=3*_;if(this._circlesCollide(v[x],v[x+1],v[x+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[_])))return i.push(!0),!0}}},qe.prototype._forEachCell=function(e,t,r,n,a,i,o,s){for(var l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),d=this._convertToYCellCoord(n),p=l;p<=u;p++)for(var h=c;h<=d;h++){var f=this.xCellCount*h+p;if(a.call(this,e,t,r,n,f,i,o,s))return}},qe.prototype._convertToXCellCoord=function(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))},qe.prototype._convertToYCellCoord=function(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))},qe.prototype._circlesCollide=function(e,t,r,n,a,i){var o=n-e,s=a-t,l=r+i;return l*l>o*o+s*s},qe.prototype._circleAndRectCollide=function(e,t,r,n,a,i,o){var s=(i-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;var c=(o-a)/2,u=Math.abs(t-(a+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var d=l-s,p=u-c;return d*d+p*p<=r*r};var at=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function it(e,t){for(var r=0;r<e;r++){var n=t.length;t.resize(n+4),t.float32.set(at,3*n)}}function ot(e,t,r){var n=t[0],a=t[1];return e[0]=r[0]*n+r[4]*a+r[12],e[1]=r[1]*n+r[5]*a+r[13],e[3]=r[3]*n+r[7]*a+r[15],e}var st=function(e,t,r){void 0===t&&(t=new qe(e.width+200,e.height+200,25)),void 0===r&&(r=new qe(e.width+200,e.height+200,25)),this.transform=e,this.grid=t,this.ignoredGrid=r,this.pitchfactor=Math.cos(e._pitch)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200};function lt(e,t,r){e[t+4]=r?1:0}function ct(t,r,n){return r*(e.EXTENT/(t.tileSize*Math.pow(2,n-t.tileID.overscaledZ)))}st.prototype.placeCollisionBox=function(e,t,r,n,a){var i=this.projectAndGetPerspectiveRatio(n,e.anchorPointX,e.anchorPointY),o=r*i.perspectiveRatio,s=e.x1*o+i.point.x,l=e.y1*o+i.point.y,c=e.x2*o+i.point.x,u=e.y2*o+i.point.y;return!this.isInsideGrid(s,l,c,u)||!t&&this.grid.hitTest(s,l,c,u,a)?{box:[],offscreen:!1}:{box:[s,l,c,u],offscreen:this.isOffscreen(s,l,c,u)}},st.prototype.approximateTileDistance=function(e,t,r,n,a){var i=a?1:n/this.pitchfactor,o=e.lastSegmentViewportDistance*r;return e.prevTileDistance+o+(i-1)*o*Math.abs(Math.sin(t))},st.prototype.placeCollisionCircles=function(t,r,n,a,i,o,s,l,c,u,d,p,h){var f=[],m=this.projectAnchor(c,i.anchorX,i.anchorY),g=l/24,v=i.lineOffsetX*l,y=i.lineOffsetY*l,b=new e.Point(i.anchorX,i.anchorY),_=Qe(g,s,v,y,!1,Ze(b,u).point,b,i,o,u,{},!0),x=!1,w=!1,k=!0,M=m.perspectiveRatio*a,T=1/(a*n),C=0,S=0;_&&(C=this.approximateTileDistance(_.first.tileDistance,_.first.angle,T,m.cameraDistance,p),S=this.approximateTileDistance(_.last.tileDistance,_.last.angle,T,m.cameraDistance,p));for(var L=0;L<t.length;L+=5){var A=t[L],E=t[L+1],D=t[L+2],I=t[L+3];if(!_||I<-C||I>S)lt(t,L,!1);else{var P=this.projectPoint(c,A,E),O=D*M;if(f.length>0){var R=P.x-f[f.length-4],F=P.y-f[f.length-3];if(O*O*2>R*R+F*F&&L+8<t.length){var z=t[L+8];if(z>-C&&z<S){lt(t,L,!1);continue}}}var N=L/5;f.push(P.x,P.y,O,N),lt(t,L,!0);var j=P.x-O,B=P.y-O,Y=P.x+O,H=P.y+O;if(k=k&&this.isOffscreen(j,B,Y,H),w=w||this.isInsideGrid(j,B,Y,H),!r&&this.grid.hitTestCircle(P.x,P.y,O,h)){if(!d)return{circles:[],offscreen:!1};x=!0}}}return{circles:x||!w?[]:f,offscreen:k}},st.prototype.queryRenderedSymbols=function(t){if(0===t.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],n=1/0,a=1/0,i=-1/0,o=-1/0,s=0,l=t;s<l.length;s+=1){var c=l[s],u=new e.Point(c.x+100,c.y+100);n=Math.min(n,u.x),a=Math.min(a,u.y),i=Math.max(i,u.x),o=Math.max(o,u.y),r.push(u)}for(var d={},p={},h=0,f=this.grid.query(n,a,i,o).concat(this.ignoredGrid.query(n,a,i,o));h<f.length;h+=1){var m=f[h],g=m.key;if(void 0===d[g.bucketInstanceId]&&(d[g.bucketInstanceId]={}),!d[g.bucketInstanceId][g.featureIndex]){var v=[new e.Point(m.x1,m.y1),new e.Point(m.x2,m.y1),new e.Point(m.x2,m.y2),new e.Point(m.x1,m.y2)];e.polygonIntersectsPolygon(r,v)&&(d[g.bucketInstanceId][g.featureIndex]=!0,void 0===p[g.bucketInstanceId]&&(p[g.bucketInstanceId]=[]),p[g.bucketInstanceId].push(g.featureIndex))}}return p},st.prototype.insertCollisionBox=function(e,t,r,n,a){var i={bucketInstanceId:r,featureIndex:n,collisionGroupID:a};(t?this.ignoredGrid:this.grid).insert(i,e[0],e[1],e[2],e[3])},st.prototype.insertCollisionCircles=function(e,t,r,n,a){for(var i=t?this.ignoredGrid:this.grid,o={bucketInstanceId:r,featureIndex:n,collisionGroupID:a},s=0;s<e.length;s+=4)i.insertCircle(o,e[s],e[s+1],e[s+2])},st.prototype.projectAnchor=function(e,t,r){var n=[t,r,0,1];return ot(n,n,e),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5,cameraDistance:n[3]}},st.prototype.projectPoint=function(t,r,n){var a=[r,n,0,1];return ot(a,a,t),new e.Point((a[0]/a[3]+1)/2*this.transform.width+100,(-a[1]/a[3]+1)/2*this.transform.height+100)},st.prototype.projectAndGetPerspectiveRatio=function(t,r,n){var a=[r,n,0,1];return ot(a,a,t),{point:new e.Point((a[0]/a[3]+1)/2*this.transform.width+100,(-a[1]/a[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/a[3]*.5}},st.prototype.isOffscreen=function(e,t,r,n){return r<100||e>=this.screenRightBoundary||n<100||t>this.screenBottomBoundary},st.prototype.isInsideGrid=function(e,t,r,n){return r>=0&&e<this.gridRightBoundary&&n>=0&&t<this.gridBottomBoundary};var ut=function(e,t,r,n){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):n&&r?1:0,this.placed=r};ut.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var dt=function(e,t,r,n,a){this.text=new ut(e?e.text:null,t,r,a),this.icon=new ut(e?e.icon:null,t,n,a)};dt.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var pt=function(e,t,r){this.text=e,this.icon=t,this.skipFade=r},ht=function(e,t,r,n,a){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=a},ft=function(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}};function mt(t,r,n,a,i){var o=e.getAnchorAlignment(t),s=-(o.horizontalAlign-.5)*r,l=-(o.verticalAlign-.5)*n,c=e.evaluateRadialOffset(t,a);return new e.Point(s+c[0]*i,l+c[1]*i)}ft.prototype.get=function(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){var t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:function(e){return e.collisionGroupID===t}}}return this.collisionGroups[e]};var gt=function(e,t,r,n){this.transform=e.clone(),this.collisionIndex=new st(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=t,this.retainedQueryData={},this.collisionGroups=new ft(r),this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}};function vt(e,t,r,n,a){e.emplaceBack(t?1:0,r?1:0,n||0,a||0),e.emplaceBack(t?1:0,r?1:0,n||0,a||0),e.emplaceBack(t?1:0,r?1:0,n||0,a||0),e.emplaceBack(t?1:0,r?1:0,n||0,a||0)}gt.prototype.placeLayerTile=function(t,r,n,a){var i=r.getBucket(t),o=r.latestFeatureIndex;if(i&&o&&t.id===i.layerIds[0]){var s=r.collisionBoxArray,l=i.layers[0].layout,c=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),u=r.tileSize/e.EXTENT,d=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),p=Ke(d,"map"===l.get("text-pitch-alignment"),"map"===l.get("text-rotation-alignment"),this.transform,ct(r,1,this.transform.zoom)),h=Ke(d,"map"===l.get("icon-pitch-alignment"),"map"===l.get("icon-rotation-alignment"),this.transform,ct(r,1,this.transform.zoom));this.retainedQueryData[i.bucketInstanceId]=new ht(i.bucketInstanceId,o,i.sourceLayerIndex,i.index,r.tileID),this.placeLayerBucket(i,d,p,h,c,u,n,r.holdingForFade(),a,s)}},gt.prototype.attemptAnchorPlacement=function(t,r,n,a,i,o,s,l,c,u,d,p,h,f,m){var g,v=mt(t,n,a,i,o),y=this.collisionIndex.placeCollisionBox(function(t,r,n,a,i,o){var s=t.x1,l=t.x2,c=t.y1,u=t.y2,d=t.anchorPointX,p=t.anchorPointY,h=new e.Point(r,n);return a&&h._rotate(i?o:-o),{x1:s+h.x,y1:c+h.y,x2:l+h.x,y2:u+h.y,anchorPointX:d,anchorPointY:p}}(r,v.x,v.y,s,l,this.transform.angle),p,c,u,d.predicate);if(y.box.length>0)return this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(g=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={radialOffset:i,width:n,height:a,anchor:t,textBoxScale:o,prevAnchor:g},this.markUsedJustification(f,t,h,m),f.allowVerticalPlacement&&(this.markUsedOrientation(f,m,h),this.placedOrientations[h.crossTileID]=m),y},gt.prototype.placeLayerBucket=function(t,r,n,a,i,o,s,l,c,u){var d=this,p=t.layers[0].layout,h=e.evaluateSizeForZoom(t.textSizeData,this.transform.zoom),f=p.get("text-optional"),m=p.get("icon-optional"),g=p.get("text-allow-overlap"),v=p.get("icon-allow-overlap"),y=g&&(v||!t.hasIconData()||m),b=v&&(g||!t.hasTextData()||f),_=this.collisionGroups.get(t.sourceID),x="map"===p.get("text-rotation-alignment"),w="map"===p.get("text-pitch-alignment"),k="viewport-y"===p.get("symbol-z-order");!t.collisionArrays&&u&&t.deserializeCollisionBoxes(u);var M=function(a,u){if(!c[a.crossTileID])if(l)d.placements[a.crossTileID]=new pt(!1,!1,!1);else{var v,k=!1,M=!1,T=!0,C={box:null,offscreen:null},S={box:null,offscreen:null},L=null,A=null,E=0,D=0,I=0;u.textFeatureIndex&&(E=u.textFeatureIndex),u.verticalTextFeatureIndex&&(D=u.verticalTextFeatureIndex);var P=u.textBox;if(P){var O=function(r){var n=e.WritingMode.horizontal;if(t.allowVerticalPlacement&&!r&&d.prevPlacement){var i=d.prevPlacement.placedOrientations[a.crossTileID];i&&(d.placedOrientations[a.crossTileID]=i,n=i,d.markUsedOrientation(t,n,a))}return n},R=function(r,n){if(t.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&u.verticalTextBox)for(var i=0,o=t.writingModes;i<o.length&&(o[i]===e.WritingMode.vertical?(C=n(),S=C):C=r(),!(C&&C.box&&C.box.length));i+=1);else C=r()};if(p.get("text-variable-anchor")){var F=p.get("text-variable-anchor");if(d.prevPlacement&&d.prevPlacement.variableOffsets[a.crossTileID]){var z=d.prevPlacement.variableOffsets[a.crossTileID];F.indexOf(z.anchor)>0&&(F=F.filter((function(e){return e!==z.anchor}))).unshift(z.anchor)}var N=function(e,n){for(var i=e.x2-e.x1,s=e.y2-e.y1,l=a.textBoxScale,c={box:[],offscreen:!1},u=g?2*F.length:F.length,p=0;p<u;++p){var h=F[p%F.length],f=p>=F.length;if((c=d.attemptAnchorPlacement(h,e,i,s,a.radialTextOffset,l,x,w,o,r,_,f,a,t,n))&&c.box&&c.box.length){k=!0;break}}return c};R((function(){return N(P,e.WritingMode.horizontal)}),(function(){var r=u.verticalTextBox,n=C&&C.box&&C.box.length;return t.allowVerticalPlacement&&!n&&a.numVerticalGlyphVertices>0&&r?N(r,e.WritingMode.vertical):{box:null,offscreen:null}})),C&&(k=C.box,T=C.offscreen);var j=O(C&&C.box);if(!k&&d.prevPlacement){var B=d.prevPlacement.variableOffsets[a.crossTileID];B&&(d.variableOffsets[a.crossTileID]=B,d.markUsedJustification(t,B.anchor,a,j))}}else{var Y=function(e,n){var i=d.collisionIndex.placeCollisionBox(e,p.get("text-allow-overlap"),o,r,_.predicate);return i&&i.box&&i.box.length&&(d.markUsedOrientation(t,n,a),d.placedOrientations[a.crossTileID]=n),i};R((function(){return Y(P,e.WritingMode.horizontal)}),(function(){var r=u.verticalTextBox;return t.allowVerticalPlacement&&a.numVerticalGlyphVertices>0&&r?Y(r,e.WritingMode.vertical):{box:null,offscreen:null}})),O(C&&C.box&&C.box.length)}}k=(v=C)&&v.box&&v.box.length>0,T=v&&v.offscreen;var H=u.textCircles;if(H){var V=t.text.placedSymbolArray.get(a.centerJustifiedTextSymbolIndex),U=e.evaluateSizeForFeature(t.textSizeData,h,V);L=d.collisionIndex.placeCollisionCircles(H,p.get("text-allow-overlap"),i,o,V,t.lineVertexArray,t.glyphOffsetArray,U,r,n,s,w,_.predicate),k=p.get("text-allow-overlap")||L.circles.length>0,T=T&&L.offscreen}u.iconFeatureIndex&&(I=u.iconFeatureIndex),u.iconBox&&(M=(A=d.collisionIndex.placeCollisionBox(u.iconBox,p.get("icon-allow-overlap"),o,r,_.predicate)).box.length>0,T=T&&A.offscreen);var W=f||0===a.numHorizontalGlyphVertices&&0===a.numVerticalGlyphVertices,G=m||0===a.numIconVertices;W||G?G?W||(M=M&&k):k=M&&k:M=k=M&&k,k&&v&&v.box&&(S&&S.box&&D?d.collisionIndex.insertCollisionBox(v.box,p.get("text-ignore-placement"),t.bucketInstanceId,D,_.ID):d.collisionIndex.insertCollisionBox(v.box,p.get("text-ignore-placement"),t.bucketInstanceId,E,_.ID)),M&&A&&d.collisionIndex.insertCollisionBox(A.box,p.get("icon-ignore-placement"),t.bucketInstanceId,I,_.ID),k&&L&&d.collisionIndex.insertCollisionCircles(L.circles,p.get("text-ignore-placement"),t.bucketInstanceId,E,_.ID),d.placements[a.crossTileID]=new pt(k||y,M||b,T||t.justReloaded),c[a.crossTileID]=!0}};if(k)for(var T=t.getSortedSymbolIndexes(this.transform.angle),C=T.length-1;C>=0;--C){var S=T[C];M(t.symbolInstances.get(S),t.collisionArrays[S])}else for(var L=0;L<t.symbolInstances.length;++L)M(t.symbolInstances.get(L),t.collisionArrays[L]);t.justReloaded=!1},gt.prototype.markUsedJustification=function(t,r,n,a){var i,o={left:n.leftJustifiedTextSymbolIndex,center:n.centerJustifiedTextSymbolIndex,right:n.rightJustifiedTextSymbolIndex};i=a===e.WritingMode.vertical?n.verticalPlacedTextSymbolIndex:o[e.getAnchorJustification(r)];for(var s=0,l=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex,n.verticalPlacedTextSymbolIndex];s<l.length;s+=1){var c=l[s];c>=0&&(t.text.placedSymbolArray.get(c).crossTileID=i>=0&&c!==i?0:n.crossTileID)}},gt.prototype.markUsedOrientation=function(t,r,n){for(var a=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,i=r===e.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o<s.length;o+=1){var l=s[o];t.text.placedSymbolArray.get(l).placedOrientation=a}n.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).placedOrientation=i)},gt.prototype.commit=function(e){this.commitTime=e;var t=this.prevPlacement,r=!1,n=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,a=t?t.opacities:{},i=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(var s in this.placements){var l=this.placements[s],c=a[s];c?(this.opacities[s]=new dt(c,n,l.text,l.icon),r=r||l.text!==c.text.placed||l.icon!==c.icon.placed):(this.opacities[s]=new dt(null,n,l.text,l.icon,l.skipFade),r=r||l.text||l.icon)}for(var u in a){var d=a[u];if(!this.opacities[u]){var p=new dt(d,n,!1,!1);p.isHidden()||(this.opacities[u]=p,r=r||d.text.placed||d.icon.placed)}}for(var h in i)this.variableOffsets[h]||!this.opacities[h]||this.opacities[h].isHidden()||(this.variableOffsets[h]=i[h]);for(var f in o)this.placedOrientations[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.placedOrientations[f]=o[f]);r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},gt.prototype.updateLayerOpacities=function(e,t){for(var r={},n=0,a=t;n<a.length;n+=1){var i=a[n],o=i.getBucket(e);o&&i.latestFeatureIndex&&e.id===o.layerIds[0]&&this.updateBucketOpacities(o,r,i.collisionBoxArray)}},gt.prototype.updateBucketOpacities=function(t,r,n){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();var a=t.layers[0].layout,i=new dt(null,0,!1,!1,!0),o=a.get("text-allow-overlap"),s=a.get("icon-allow-overlap"),l=a.get("text-variable-anchor"),c="map"===a.get("text-rotation-alignment"),u="map"===a.get("text-pitch-alignment"),d=new dt(null,0,o&&(s||!t.hasIconData()||a.get("icon-optional")),s&&(o||!t.hasTextData()||a.get("text-optional")),!0);!t.collisionArrays&&n&&(t.hasCollisionBoxData()||t.hasCollisionCircleData())&&t.deserializeCollisionBoxes(n);for(var p=0;p<t.symbolInstances.length;p++){var h=t.symbolInstances.get(p),f=h.numHorizontalGlyphVertices,m=h.numVerticalGlyphVertices,g=h.crossTileID,v=r[g],y=this.opacities[g];v?y=i:y||(y=d,this.opacities[g]=y),r[g]=!0;var b=f>0||m>0,_=h.numIconVertices>0;if(b){for(var x=Tt(y.text),w=(f+m)/4,k=0;k<w;k++)t.text.opacityVertexArray.emplaceBack(x);var M=y.text.isHidden()?1:0,T=this.placedOrientations[h.crossTileID],C=T===e.WritingMode.horizontal||T===e.WritingMode.horizontalOnly?1:0,S=T===e.WritingMode.vertical?1:0;[h.rightJustifiedTextSymbolIndex,h.centerJustifiedTextSymbolIndex,h.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=M||S)})),h.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(h.verticalPlacedTextSymbolIndex).hidden=M||C);var L=this.variableOffsets[h.crossTileID];L&&this.markUsedJustification(t,L.anchor,h,T);var A=this.placedOrientations[h.crossTileID];A&&(this.markUsedJustification(t,"left",h,A),this.markUsedOrientation(t,A,h))}if(_){for(var E=Tt(y.icon),D=0;D<h.numIconVertices/4;D++)t.icon.opacityVertexArray.emplaceBack(E);t.icon.placedSymbolArray.get(p).hidden=y.icon.isHidden()}if(t.hasCollisionBoxData()||t.hasCollisionCircleData()){var I=t.collisionArrays[p];if(I){if(I.textBox){var P=new e.Point(0,0),O=!0;if(l){var R=this.variableOffsets[g];R?(P=mt(R.anchor,R.width,R.height,R.radialOffset,R.textBoxScale),c&&P._rotate(u?this.transform.angle:-this.transform.angle)):O=!1}vt(t.collisionBox.collisionVertexArray,y.text.placed,!O,P.x,P.y)}I.iconBox&&vt(t.collisionBox.collisionVertexArray,y.icon.placed,!1);var F=I.textCircles;if(F&&t.hasCollisionCircleData())for(var z=0;z<F.length;z+=5){var N=v||0===F[z+4];vt(t.collisionCircle.collisionVertexArray,y.text.placed,N)}}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},gt.prototype.symbolFadeChange=function(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration},gt.prototype.hasTransitions=function(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration},gt.prototype.stillRecent=function(e){return this.commitTime+this.fadeDuration>e},gt.prototype.setStale=function(){this.stale=!0};var yt=Math.pow(2,25),bt=Math.pow(2,24),_t=Math.pow(2,17),xt=Math.pow(2,16),wt=Math.pow(2,9),kt=Math.pow(2,8),Mt=Math.pow(2,1);function Tt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*yt+t*bt+r*_t+t*xt+r*wt+t*kt+r*Mt+t}var Ct=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ct.prototype.continuePlacement=function(e,t,r,n,a){for(;this._currentTileIndex<e.length;){var i=e[this._currentTileIndex];if(t.placeLayerTile(n,i,r,this._seenCrossTileIDs),this._currentTileIndex++,a())return!0}};var St=function(e,t,r,n,a,i,o){this.placement=new gt(e,a,i,o),this._currentPlacementIndex=t.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=n,this._done=!1};St.prototype.isDone=function(){return this._done},St.prototype.continuePlacement=function(t,r,n){for(var a=this,i=e.browser.now(),o=function(){var t=e.browser.now()-i;return!a._forceFullPlacement&&t>2};this._currentPlacementIndex>=0;){var s=r[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Ct),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},St.prototype.commit=function(e){return this.placement.commit(e),this.placement};var Lt=512/e.EXTENT/2,At=function(e,t,r){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;n<t.length;n++){var a=t.get(n),i=a.key;this.indexedSymbolInstances[i]||(this.indexedSymbolInstances[i]=[]),this.indexedSymbolInstances[i].push({crossTileID:a.crossTileID,coord:this.getScaledCoordinates(a,e)})}};At.prototype.getScaledCoordinates=function(t,r){var n=r.canonical.z-this.tileID.canonical.z,a=Lt/Math.pow(2,n);return{x:Math.floor((r.canonical.x*e.EXTENT+t.anchorX)*a),y:Math.floor((r.canonical.y*e.EXTENT+t.anchorY)*a)}},At.prototype.findMatches=function(e,t,r){for(var n=this.tileID.canonical.z<t.canonical.z?1:Math.pow(2,this.tileID.canonical.z-t.canonical.z),a=0;a<e.length;a++){var i=e.get(a);if(!i.crossTileID){var o=this.indexedSymbolInstances[i.key];if(o)for(var s=this.getScaledCoordinates(i,t),l=0,c=o;l<c.length;l+=1){var u=c[l];if(Math.abs(u.coord.x-s.x)<=n&&Math.abs(u.coord.y-s.y)<=n&&!r[u.crossTileID]){r[u.crossTileID]=!0,i.crossTileID=u.crossTileID;break}}}}};var Et=function(){this.maxCrossTileID=0};Et.prototype.generate=function(){return++this.maxCrossTileID};var Dt=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Dt.prototype.handleWrapJump=function(e){var t=Math.round((e-this.lng)/360);if(0!==t)for(var r in this.indexes){var n=this.indexes[r],a={};for(var i in n){var o=n[i];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+t),a[o.tileID.key]=o}this.indexes[r]=a}this.lng=e},Dt.prototype.addBucket=function(e,t,r){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(var n=0;n<t.symbolInstances.length;n++)t.symbolInstances.get(n).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});var a=this.usedCrossTileIDs[e.overscaledZ];for(var i in this.indexes){var o=this.indexes[i];if(Number(i)>e.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,a)}else{var c=o[e.scaledTo(Number(i)).key];c&&c.findMatches(t.symbolInstances,e,a)}}for(var u=0;u<t.symbolInstances.length;u++){var d=t.symbolInstances.get(u);d.crossTileID||(d.crossTileID=r.generate(),a[d.crossTileID]=!0)}return void 0===this.indexes[e.overscaledZ]&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new At(e,t.symbolInstances,t.bucketInstanceId),!0},Dt.prototype.removeBucketCrossTileIDs=function(e,t){for(var r in t.indexedSymbolInstances)for(var n=0,a=t.indexedSymbolInstances[r];n<a.length;n+=1){var i=a[n];delete this.usedCrossTileIDs[e][i.crossTileID]}},Dt.prototype.removeStaleBuckets=function(e){var t=!1;for(var r in this.indexes){var n=this.indexes[r];for(var a in n)e[n[a].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,n[a]),delete n[a],t=!0)}return t};var It=function(){this.layerIndexes={},this.crossTileIDs=new Et,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};It.prototype.addLayer=function(e,t,r){var n=this.layerIndexes[e.id];void 0===n&&(n=this.layerIndexes[e.id]=new Dt);var a=!1,i={};n.handleWrapJump(r);for(var o=0,s=t;o<s.length;o+=1){var l=s[o],c=l.getBucket(e);c&&e.id===c.layerIds[0]&&(c.bucketInstanceId||(c.bucketInstanceId=++this.maxBucketInstanceId),n.addBucket(l.tileID,c,this.crossTileIDs)&&(a=!0),i[c.bucketInstanceId]=!0)}return n.removeStaleBuckets(i)&&(a=!0),a},It.prototype.pruneUnusedLayers=function(e){var t={};for(var r in e.forEach((function(e){t[e]=!0})),this.layerIndexes)t[r]||delete this.layerIndexes[r]};var Pt=function(t,r){return e.emitValidationErrors(t,r&&r.filter((function(e){return"source.canvas"!==e.identifier})))},Ot=e.pick(je,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Rt=e.pick(je,["setCenter","setZoom","setBearing","setPitch"]),Ft=function(t){function r(n,a){var i=this;void 0===a&&(a={}),t.call(this),this.map=n,this.dispatcher=new M((Re||(Re=new Oe),Re),this),this.imageManager=new p,this.imageManager.setEventedParent(this),this.glyphManager=new b(n._requestManager,a.localIdeographFontFamily),this.lineAtlas=new k(256,512),this.crossTileSymbolIndex=new It,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ZoomHistory,this._loaded=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.getReferrer());var o=this;this._rtlTextPluginCallback=r.registerForPluginAvailability((function(e){for(var t in o.dispatcher.broadcast("loadRTLTextPlugin",e.pluginURL,e.completionCallback),o.sourceCaches)o.sourceCaches[t].reload()})),this.on("data",(function(e){if("source"===e.dataType&&"metadata"===e.sourceDataType){var t=i.sourceCaches[e.sourceId];if(t){var r=t.getSource();if(r&&r.vectorLayerIds)for(var n in i._layers){var a=i._layers[n];a.source===r.id&&i._validateLayer(a)}}}}))}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(t,r){var n=this;void 0===r&&(r={}),this.fire(new e.Event("dataloading",{dataType:"style"}));var a="boolean"==typeof r.validate?r.validate:!e.isMapboxURL(t);t=this.map._requestManager.normalizeStyleURL(t,r.accessToken);var i=this.map._requestManager.transformRequest(t,e.ResourceType.Style);this._request=e.getJSON(i,(function(t,r){n._request=null,t?n.fire(new e.ErrorEvent(t)):r&&n._load(r,a)}))},r.prototype.loadJSON=function(t,r){var n=this;void 0===r&&(r={}),this.fire(new e.Event("dataloading",{dataType:"style"})),this._request=e.browser.frame((function(){n._request=null,n._load(t,!1!==r.validate)}))},r.prototype._load=function(t,r){var n=this;if(!r||!Pt(this,e.validateStyle(t))){for(var a in this._loaded=!0,this.stylesheet=t,t.sources)this.addSource(a,t.sources[a],{validate:!1});t.sprite?this._spriteRequest=function(t,r,n){var a,i,o,s=e.browser.devicePixelRatio>1?"@2x":"",l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,o||(o=e,a=t,u())})),c=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){c=null,o||(o=e,i=t,u())}));function u(){if(o)n(o);else if(a&&i){var t=e.browser.getImageData(i),r={};for(var s in a){var l=a[s],c=l.width,u=l.height,d=l.x,p=l.y,h=l.sdf,f=l.pixelRatio,m=new e.RGBAImage({width:c,height:u});e.RGBAImage.copy(t,m,{x:d,y:p},{x:0,y:0},{width:c,height:u}),r[s]={data:m,pixelRatio:f,sdf:h}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(t.sprite,this.map._requestManager,(function(t,r){if(n._spriteRequest=null,t)n.fire(new e.ErrorEvent(t));else if(r)for(var a in r)n.imageManager.addImage(a,r[a]);n.imageManager.setLoaded(!0),n.fire(new e.Event("data",{dataType:"style"}))})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(t.glyphs);var i=Ne(this.stylesheet.layers);this._order=i.map((function(e){return e.id})),this._layers={};for(var o=0,s=i;o<s.length;o+=1){var l=s[o];(l=e.createStyleLayer(l)).setEventedParent(this,{layer:{id:l.id}}),this._layers[l.id]=l}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new w(this.stylesheet.light),this.fire(new e.Event("data",{dataType:"style"})),this.fire(new e.Event("style.load"))}},r.prototype._validateLayer=function(t){var r=this.sourceCaches[t.source];if(r){var n=t.sourceLayer;if(n){var a=r.getSource();("geojson"===a.type||a.vectorLayerIds&&-1===a.vectorLayerIds.indexOf(n))&&this.fire(new e.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+a.id+'" as specified by style layer "'+t.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(e){for(var t=[],r=0,n=e;r<n.length;r+=1){var a=n[r],i=this._layers[a];"custom"!==i.type&&t.push(i.serialize())}return t},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(var t in this._layers)if(this._layers[t].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},r.prototype.update=function(t){if(this._loaded){var r=this._changed;if(this._changed){var n=Object.keys(this._updatedLayers),a=Object.keys(this._removedLayers);for(var i in(n.length||a.length)&&this._updateWorkerLayers(n,a),this._updatedSources){var o=this._updatedSources[i];"reload"===o?this._reloadSource(i):"clear"===o&&this._clearSource(i)}for(var s in this._updatedPaintProps)this._layers[s].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var c=0,u=this._order;c<u.length;c+=1){var d=u[c],p=this._layers[d];p.recalculate(t),!p.isHidden(t.zoom)&&p.source&&(this.sourceCaches[p.source].used=!0)}this.light.recalculate(t),this.z=t.zoom,r&&this.fire(new e.Event("data",{dataType:"style"}))}},r.prototype._updateWorkerLayers=function(e,t){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(e),removedIds:t})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(t){var r=this;if(this._checkLoaded(),Pt(this,e.validateStyle(t)))return!1;(t=e.clone$1(t)).layers=Ne(t.layers);var n=function(t,r){if(!t)return[{command:je.setStyle,args:[r]}];var n=[];try{if(!e.deepEqual(t.version,r.version))return[{command:je.setStyle,args:[r]}];e.deepEqual(t.center,r.center)||n.push({command:je.setCenter,args:[r.center]}),e.deepEqual(t.zoom,r.zoom)||n.push({command:je.setZoom,args:[r.zoom]}),e.deepEqual(t.bearing,r.bearing)||n.push({command:je.setBearing,args:[r.bearing]}),e.deepEqual(t.pitch,r.pitch)||n.push({command:je.setPitch,args:[r.pitch]}),e.deepEqual(t.sprite,r.sprite)||n.push({command:je.setSprite,args:[r.sprite]}),e.deepEqual(t.glyphs,r.glyphs)||n.push({command:je.setGlyphs,args:[r.glyphs]}),e.deepEqual(t.transition,r.transition)||n.push({command:je.setTransition,args:[r.transition]}),e.deepEqual(t.light,r.light)||n.push({command:je.setLight,args:[r.light]});var a={},i=[];!function(t,r,n,a){var i;for(i in r=r||{},t=t||{})t.hasOwnProperty(i)&&(r.hasOwnProperty(i)||Ye(i,n,a));for(i in r)r.hasOwnProperty(i)&&(t.hasOwnProperty(i)?e.deepEqual(t[i],r[i])||("geojson"===t[i].type&&"geojson"===r[i].type&&Ve(t,r,i)?n.push({command:je.setGeoJSONSourceData,args:[i,r[i].data]}):He(i,r,n,a)):Be(i,r,n))}(t.sources,r.sources,i,a);var o=[];t.layers&&t.layers.forEach((function(e){a[e.source]?n.push({command:je.removeLayer,args:[e.id]}):o.push(e)})),n=n.concat(i),function(t,r,n){r=r||[];var a,i,o,s,l,c,u,d=(t=t||[]).map(We),p=r.map(We),h=t.reduce(Ge,{}),f=r.reduce(Ge,{}),m=d.slice(),g=Object.create(null);for(a=0,i=0;a<d.length;a++)o=d[a],f.hasOwnProperty(o)?i++:(n.push({command:je.removeLayer,args:[o]}),m.splice(m.indexOf(o,i),1));for(a=0,i=0;a<p.length;a++)o=p[p.length-1-a],m[m.length-1-a]!==o&&(h.hasOwnProperty(o)?(n.push({command:je.removeLayer,args:[o]}),m.splice(m.lastIndexOf(o,m.length-i),1)):i++,c=m[m.length-a],n.push({command:je.addLayer,args:[f[o],c]}),m.splice(m.length-a,0,o),g[o]=!0);for(a=0;a<p.length;a++)if(s=h[o=p[a]],l=f[o],!g[o]&&!e.deepEqual(s,l))if(e.deepEqual(s.source,l.source)&&e.deepEqual(s["source-layer"],l["source-layer"])&&e.deepEqual(s.type,l.type)){for(u in Ue(s.layout,l.layout,n,o,null,je.setLayoutProperty),Ue(s.paint,l.paint,n,o,null,je.setPaintProperty),e.deepEqual(s.filter,l.filter)||n.push({command:je.setFilter,args:[o,l.filter]}),e.deepEqual(s.minzoom,l.minzoom)&&e.deepEqual(s.maxzoom,l.maxzoom)||n.push({command:je.setLayerZoomRange,args:[o,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(u)&&"layout"!==u&&"paint"!==u&&"filter"!==u&&"metadata"!==u&&"minzoom"!==u&&"maxzoom"!==u&&(0===u.indexOf("paint.")?Ue(s[u],l[u],n,o,u.slice(6),je.setPaintProperty):e.deepEqual(s[u],l[u])||n.push({command:je.setLayerProperty,args:[o,u,l[u]]}));for(u in l)l.hasOwnProperty(u)&&!s.hasOwnProperty(u)&&"layout"!==u&&"paint"!==u&&"filter"!==u&&"metadata"!==u&&"minzoom"!==u&&"maxzoom"!==u&&(0===u.indexOf("paint.")?Ue(s[u],l[u],n,o,u.slice(6),je.setPaintProperty):e.deepEqual(s[u],l[u])||n.push({command:je.setLayerProperty,args:[o,u,l[u]]}))}else n.push({command:je.removeLayer,args:[o]}),c=m[m.lastIndexOf(o)+1],n.push({command:je.addLayer,args:[l,c]})}(o,r.layers,n)}catch(e){console.warn("Unable to compute style diff:",e),n=[{command:je.setStyle,args:[r]}]}return n}(this.serialize(),t).filter((function(e){return!(e.command in Rt)}));if(0===n.length)return!1;var a=n.filter((function(e){return!(e.command in Ot)}));if(a.length>0)throw new Error("Unimplemented: "+a.map((function(e){return e.command})).join(", ")+".");return n.forEach((function(e){"setTransition"!==e.command&&r[e.command].apply(r,e.args)})),this.stylesheet=t,!0},r.prototype.addImage=function(t,r){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,r),this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},r.prototype.getImage=function(e){return this.imageManager.getImage(e)},r.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(t,r,n){var a=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(e.validateStyle.source,"sources."+t,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var i=this.sourceCaches[t]=new Ee(t,r,this.dispatcher);i.style=this,i.setEventedParent(this,(function(){return{isSourceLoaded:a.loaded(),source:i.serialize(),sourceId:t}})),i.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},r.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},r.prototype.addLayer=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var a=t.id;if(this.getLayer(a))this.fire(new e.ErrorEvent(new Error('Layer with id "'+a+'" already exists on this map')));else{var i;if("custom"===t.type){if(Pt(this,e.validateCustomStyleLayer(t)))return;i=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(a,t.source),t=e.clone$1(t),t=e.extend(t,{source:a})),this._validate(e.validateStyle.layer,"layers."+a,t,{arrayIndex:-1},n))return;i=e.createStyleLayer(t),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){var s=this._removedLayers[a];delete this._removedLayers[a],s.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map)}}},r.prototype.moveLayer=function(t,r){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==r){var n=this._order.indexOf(t);this._order.splice(n,1);var a=r?this._order.indexOf(r):this._order.length;r&&-1===a?this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(a,0,t),this._layerOrderChanged=!0)}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(t){this._checkLoaded();var r=this._layers[t];if(r){r.setEventedParent(null);var n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(e){return this._layers[e]},r.prototype.setLayerZoomRange=function(t,r,n){this._checkLoaded();var a=this.getLayer(t);a?a.minzoom===r&&a.maxzoom===n||(null!=r&&(a.minzoom=r),null!=n&&(a.maxzoom=n),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var a=this.getLayer(t);if(a){if(!e.deepEqual(a.filter,r))return null==r?(a.filter=void 0,void this._updateLayer(a)):void(this._validate(e.validateStyle.filter,"layers."+a.id+".filter",r,null,n)||(a.filter=e.clone$1(r),this._updateLayer(a)))}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},r.prototype.setLayoutProperty=function(t,r,n,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(t);i?e.deepEqual(i.getLayoutProperty(r),n)||(i.setLayoutProperty(r,n,a),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(t,r){var n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(t,r,n,a){void 0===a&&(a={}),this._checkLoaded();var i=this.getLayer(t);i?e.deepEqual(i.getPaintProperty(r),n)||(i.setPaintProperty(r,n,a)&&this._updateLayer(i),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},r.prototype.setFeatureState=function(t,r){this._checkLoaded();var n=t.source,a=t.sourceLayer,i=this.sourceCaches[n],o=parseInt(t.id,10);if(void 0!==i){var s=i.getSource().type;"geojson"===s&&a?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||a?isNaN(o)||o<0?this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):i.setFeatureState(a,o,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(t,r){this._checkLoaded();var n=t.source,a=this.sourceCaches[n];if(void 0!==a){var i=a.getSource().type,o="vector"===i?t.sourceLayer:void 0,s=parseInt(t.id,10);"vector"!==i||o?void 0!==t.id&&isNaN(s)||s<0?this.fire(new e.ErrorEvent(new Error("The feature id parameter must be non-negative."))):r&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):a.removeFeatureState(o,s,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(t){this._checkLoaded();var r=t.source,n=t.sourceLayer,a=this.sourceCaches[r],i=parseInt(t.id,10);if(void 0!==a)if("vector"!==a.getSource().type||n){if(!(isNaN(i)||i<0))return a.getFeatureState(n,i);this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},r.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,r=function(e){return"fill-extrusion"===t._layers[e].type},n={},a=[],i=this._order.length-1;i>=0;i--){var o=this._order[i];if(r(o)){n[o]=i;for(var s=0,l=e;s<l.length;s+=1){var c=l[s][o];if(c)for(var u=0,d=c;u<d.length;u+=1){var p=d[u];a.push(p)}}}}a.sort((function(e,t){return t.intersectionZ-e.intersectionZ}));for(var h=[],f=this._order.length-1;f>=0;f--){var m=this._order[f];if(r(m))for(var g=a.length-1;g>=0;g--){var v=a[g].feature;if(n[v.layer.id]<f)break;h.push(v),a.pop()}else for(var y=0,b=e;y<b.length;y+=1){var _=b[y][m];if(_)for(var x=0,w=_;x<w.length;x+=1){var k=w[x];h.push(k.feature)}}}return h},r.prototype.queryRenderedFeatures=function(t,r,n){r&&r.filter&&this._validate(e.validateStyle.filter,"queryRenderedFeatures.filter",r.filter,null,r);var a={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new e.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var i=0,o=r.layers;i<o.length;i+=1){var s=o[i],l=this._layers[s];if(!l)return this.fire(new e.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];a[l.source]=!0}}var c=[];for(var u in this.sourceCaches)r.layers&&!a[u]||c.push(z(this.sourceCaches[u],this._layers,t,r,n));return this.placement&&c.push(function(e,t,r,n,a,i){for(var o={},s=a.queryRenderedSymbols(r),l=[],c=0,u=Object.keys(s).map(Number);c<u.length;c+=1){var d=u[c];l.push(i[d])}l.sort(N);for(var p=function(){var t=f[h],r=t.featureIndex.lookupSymbolFeatures(s[t.bucketInstanceId],t.bucketIndex,t.sourceLayerIndex,n.filter,n.layers,e);for(var a in r){var i=o[a]=o[a]||[],l=r[a];l.sort((function(e,r){var n=t.featureSortOrder;if(n){var a=n.indexOf(e.featureIndex);return n.indexOf(r.featureIndex)-a}return r.featureIndex-e.featureIndex}));for(var c=0,u=l;c<u.length;c+=1){var d=u[c];i.push(d)}}},h=0,f=l;h<f.length;h+=1)p();var m=function(r){o[r].forEach((function(n){var a=n.feature,i=e[r],o=t[i.source].getFeatureState(a.layer["source-layer"],a.id);a.source=a.layer.source,a.layer["source-layer"]&&(a.sourceLayer=a.layer["source-layer"]),a.state=o}))};for(var g in o)m(g);return o}(this._layers,this.sourceCaches,t,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(c)},r.prototype.querySourceFeatures=function(t,r){r&&r.filter&&this._validate(e.validateStyle.filter,"querySourceFeatures.filter",r.filter,null,r);var n=this.sourceCaches[t];return n?function(e,t){for(var r=e.getRenderableIds().map((function(t){return e.getTileByID(t)})),n=[],a={},i=0;i<r.length;i++){var o=r[i],s=o.tileID.canonical.key;a[s]||(a[s]=!0,o.querySourceFeatures(n,t))}return n}(n,r):[]},r.prototype.addSourceType=function(e,t,n){return r.getSourceType(e)?n(new Error('A source type called "'+e+'" already exists.')):(r.setSourceType(e,t),t.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:e,url:t.workerSourceURL},n):n(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(t,r){void 0===r&&(r={}),this._checkLoaded();var n=this.light.getLight(),a=!1;for(var i in t)if(!e.deepEqual(t[i],n[i])){a=!0;break}if(a){var o={now:e.browser.now(),transition:e.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,r),this.light.updateTransitions(o)}},r.prototype._validate=function(t,r,n,a,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Pt(this,t.call(e.validateStyle,e.extend({key:r,style:this.serialize(),value:n,styleSpec:e.styleSpec},a)))},r.prototype._remove=function(){for(var t in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.evented.off("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[t].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(e){this.sourceCaches[e].clearTiles()},r.prototype._reloadSource=function(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()},r.prototype._updateSources=function(e){for(var t in this.sourceCaches)this.sourceCaches[t].update(e)},r.prototype._generateCollisionBoxes=function(){for(var e in this.sourceCaches)this._reloadSource(e)},r.prototype._updatePlacement=function(t,r,n,a){for(var i=!1,o=!1,s={},l=0,c=this._order;l<c.length;l+=1){var u=c[l],d=this._layers[u];if("symbol"===d.type){if(!s[d.source]){var p=this.sourceCaches[d.source];s[d.source]=p.getRenderableIds(!0).map((function(e){return p.getTileByID(e)})).sort((function(e,t){return t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1)}))}var h=this.crossTileSymbolIndex.addLayer(d,s[d.source],t.center.lng);i=i||h}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var f=this._layerOrderChanged||0===n;if((f||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.browser.now()))&&(this.pauseablePlacement=new St(t,this._order,f,r,n,a,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.browser.now()),o=!0),i&&this.pauseablePlacement.placement.setStale()),o||i)for(var m=0,g=this._order;m<g.length;m+=1){var v=g[m],y=this._layers[v];"symbol"===y.type&&this.placement.updateLayerOpacities(y,s[y.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()},r.prototype.getImages=function(e,t,r){this.imageManager.getImages(t.icons,r)},r.prototype.getGlyphs=function(e,t,r){this.glyphManager.getGlyphs(t.stacks,r)},r.prototype.getResource=function(t,r,n){return e.makeRequest(r,n)},r}(e.Evented);Ft.getSourceType=function(e){return O[e]},Ft.setSourceType=function(e,t){O[e]=t},Ft.registerForPluginAvailability=e.registerForPluginAvailability;var zt=e.createLayout([{name:"a_pos",type:"Int16",components:2}]),Nt=cr("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),jt=cr("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Bt=cr("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Yt=cr("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),Ht=cr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Vt=cr("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Ut=cr("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Wt=cr("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Gt=cr("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),qt=cr("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Kt=cr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),Xt=cr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Zt=cr("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Jt=cr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),$t=cr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),Qt=cr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec4 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),er=cr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),tr=cr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),rr=cr("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),nr=cr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),ar=cr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);}"),ir=cr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),or=cr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),sr=cr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),lr=cr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function cr(e,t){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:e=e.replace(r,(function(e,t,r,a,i){return n[i]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+a+" "+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n    "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:t=t.replace(r,(function(e,t,r,a,i){var o="float"===a?"vec2":"vec4",s=i.match(/color/)?"color":o;return n[i]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\nvarying "+r+" "+a+" "+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n    "+i+" = a_"+i+";\n#else\n    "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n    "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n    "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+o+" a_"+i+";\n#else\nuniform "+r+" "+a+" u_"+i+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+i+"\n    "+r+" "+a+" "+i+" = a_"+i+";\n#else\n    "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n    "+r+" "+a+" "+i+" = unpack_mix_"+s+"(a_"+i+", u_"+i+"_t);\n#else\n    "+r+" "+a+" "+i+" = u_"+i+";\n#endif\n"}))}}var ur=Object.freeze({prelude:Nt,background:jt,backgroundPattern:Bt,circle:Yt,clippingMask:Ht,heatmap:Vt,heatmapTexture:Ut,collisionBox:Wt,collisionCircle:Gt,debug:qt,fill:Kt,fillOutline:Xt,fillOutlinePattern:Zt,fillPattern:Jt,fillExtrusion:$t,fillExtrusionPattern:Qt,hillshadePrepare:er,hillshade:tr,line:rr,lineGradient:nr,linePattern:ar,lineSDF:ir,raster:or,symbolIcon:sr,symbolSDF:lr}),dr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};dr.prototype.bind=function(e,t,r,n,a,i,o,s){this.context=e;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c<n.length;c++)this.boundPaintVertexBuffers[c]!==n[c]&&(l=!0);var u=!this.vao||this.boundProgram!==t||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==a||this.boundVertexOffset!==i||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==s;!e.extVertexArrayObject||u?this.freshBind(t,r,n,a,i,o,s):(e.bindVertexArrayOES.set(this.vao),o&&o.bind(),a&&a.dynamicDraw&&a.bind(),s&&s.bind())},dr.prototype.freshBind=function(e,t,r,n,a,i,o){var s,l=e.numAttributes,c=this.context,u=c.gl;if(c.extVertexArrayObject)this.vao&&this.destroy(),this.vao=c.extVertexArrayObject.createVertexArrayOES(),c.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=e,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=n,this.boundVertexOffset=a,this.boundDynamicVertexBuffer=i,this.boundDynamicVertexBuffer2=o;else{s=c.currentNumAttributes||0;for(var d=l;d<s;d++)u.disableVertexAttribArray(d)}t.enableAttributes(u,e);for(var p=0,h=r;p<h.length;p+=1)h[p].enableAttributes(u,e);i&&i.enableAttributes(u,e),o&&o.enableAttributes(u,e),t.bind(),t.setVertexAttribPointers(u,e,a);for(var f=0,m=r;f<m.length;f+=1){var g=m[f];g.bind(),g.setVertexAttribPointers(u,e,a)}i&&(i.bind(),i.setVertexAttribPointers(u,e,a)),n&&n.bind(),o&&(o.bind(),o.setVertexAttribPointers(u,e,a)),c.currentNumAttributes=l},dr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var pr=function(e,t,r,n,a){var i=e.gl;this.program=i.createProgram();var o=r.defines();a&&o.push("#define OVERDRAW_INSPECTOR;");var s=o.concat(Nt.fragmentSource,t.fragmentSource).join("\n"),l=o.concat(Nt.vertexSource,t.vertexSource).join("\n"),c=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(c,s),i.compileShader(c),i.attachShader(this.program,c);var u=i.createShader(i.VERTEX_SHADER);i.shaderSource(u,l),i.compileShader(u),i.attachShader(this.program,u);for(var d=r.layoutAttributes||[],p=0;p<d.length;p++)i.bindAttribLocation(this.program,p,d[p].name);i.linkProgram(this.program),this.numAttributes=i.getProgramParameter(this.program,i.ACTIVE_ATTRIBUTES),this.attributes={};for(var h={},f=0;f<this.numAttributes;f++){var m=i.getActiveAttrib(this.program,f);m&&(this.attributes[m.name]=i.getAttribLocation(this.program,m.name))}for(var g=i.getProgramParameter(this.program,i.ACTIVE_UNIFORMS),v=0;v<g;v++){var y=i.getActiveUniform(this.program,v);y&&(h[y.name]=i.getUniformLocation(this.program,y.name))}this.fixedUniforms=n(e,h),this.binderUniforms=r.getUniforms(e,h)};function hr(t,r,n){var a=1/ct(n,1,r.transform.tileZoom),i=Math.pow(2,n.tileID.overscaledZ),o=n.tileSize*Math.pow(2,r.transform.tileZoom)/i,s=o*(n.tileID.canonical.x+n.tileID.wrap*i),l=o*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[e.browser.devicePixelRatio,a,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[s>>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}pr.prototype.draw=function(e,t,r,n,a,i,o,s,l,c,u,d,p,h,f,m){var g,v=e.gl;for(var y in e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(a),e.setCullFace(i),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);h&&h.setUniforms(e,this.binderUniforms,d,{zoom:p});for(var b=(g={},g[v.LINES]=2,g[v.TRIANGLES]=3,g[v.LINE_STRIP]=1,g)[t],_=0,x=u.get();_<x.length;_+=1){var w=x[_],k=w.vaos||(w.vaos={});(k[s]||(k[s]=new dr)).bind(e,this,l,h?h.getPaintVertexBuffers():[],c,w.vertexOffset,f,m),v.drawElements(t,w.primitiveLength*b,v.UNSIGNED_SHORT,w.primitiveOffset*b*2)}};var fr=function(t,r,n,a){var i=r.style.light,o=i.properties.get("position"),s=[o.x,o.y,o.z],l=e.create$1();"viewport"===i.properties.get("anchor")&&e.fromRotation(l,-r.transform.angle),e.transformMat3(s,s,l);var c=i.properties.get("color");return{u_matrix:t,u_lightpos:s,u_lightintensity:i.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:a}},mr=function(t,r,n,a,i,o,s){return e.extend(fr(t,r,n,a),hr(o,r,s),{u_height_factor:-Math.pow(2,i.overscaledZ)/s.tileSize/8})},gr=function(e){return{u_matrix:e}},vr=function(t,r,n,a){return e.extend(gr(t),hr(n,r,a))},yr=function(e,t){return{u_matrix:e,u_world:t}},br=function(t,r,n,a,i){return e.extend(vr(t,r,n,a),{u_world:i})},_r=function(t,r,n,a){var i,o,s=t.transform;if("map"===a.paint.get("circle-pitch-alignment")){var l=ct(n,1,s.zoom);i=!0,o=[l,l]}else i=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===a.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(r.posMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_pitch_with_map:+i,u_device_pixel_ratio:e.browser.devicePixelRatio,u_extrude_scale:o}},xr=function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,r.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,r.u_overscale_factor)}},wr=function(e,t,r){var n=ct(r,1,t.zoom),a=Math.pow(2,t.zoom-r.tileID.overscaledZ),i=r.tileID.overscaleFactor();return{u_matrix:e,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[t.pixelsToGLUnits[0]/(n*a),t.pixelsToGLUnits[1]/(n*a)],u_overscale_factor:i}},kr=function(e,t){return{u_matrix:e,u_color:t}},Mr=function(e){return{u_matrix:e}},Tr=function(e,t,r,n){return{u_matrix:e,u_extrude_scale:ct(t,1,r),u_intensity:n}},Cr=function(e,t,r){var n=r.paint.get("hillshade-shadow-color"),a=r.paint.get("hillshade-highlight-color"),i=r.paint.get("hillshade-accent-color"),o=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(o-=e.transform.angle);var s=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped(),s),u_image:0,u_latrange:Lr(0,t.tileID),u_light:[r.paint.get("hillshade-exaggeration"),o],u_shadow:n,u_highlight:a,u_accent:i}},Sr=function(t,r){var n=t.dem.stride,a=e.create();return e.ortho(a,0,e.EXTENT,-e.EXTENT,0,0,1),e.translate(a,a,[0,-e.EXTENT,0]),{u_matrix:a,u_image:1,u_dimension:[n,n],u_zoom:t.tileID.overscaledZ,u_maxzoom:r}};function Lr(t,r){var n=Math.pow(2,r.canonical.z),a=r.canonical.y;return[new e.MercatorCoordinate(0,a/n).toLngLat().lat,new e.MercatorCoordinate(0,(a+1)/n).toLngLat().lat]}var Ar=function(t,r,n){var a=t.transform;return{u_matrix:Or(t,r,n),u_ratio:1/ct(r,1,a.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Er=function(t,r,n){return e.extend(Ar(t,r,n),{u_image:0})},Dr=function(t,r,n,a){var i=t.transform,o=Pr(r,i);return{u_matrix:Or(t,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/ct(r,1,i.zoom),u_device_pixel_ratio:e.browser.devicePixelRatio,u_image:0,u_scale:[e.browser.devicePixelRatio,o,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Ir=function(t,r,n,a,i){var o=t.transform,s=t.lineAtlas,l=Pr(r,o),c="round"===n.layout.get("line-cap"),u=s.getDash(a.from,c),d=s.getDash(a.to,c),p=u.width*i.fromScale,h=d.width*i.toScale;return e.extend(Ar(t,r,n),{u_patternscale_a:[l/p,-u.height/2],u_patternscale_b:[l/h,-d.height/2],u_sdfgamma:s.width/(256*Math.min(p,h)*e.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:d.y,u_mix:i.t})};function Pr(e,t){return 1/ct(e,1,t.tileZoom)}function Or(e,t,r){return e.translatePosMatrix(t.tileID.posMatrix,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Rr=function(e,t,r,n,a){return{u_matrix:e,u_tl_parent:t,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:(o=a.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(i=a.paint.get("raster-contrast"),i>0?1/(1-i):1+i),u_spin_weights:Fr(a.paint.get("raster-hue-rotate"))};var i,o};function Fr(e){e*=Math.PI/180;var t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}var zr=function(e,t,r,n,a,i,o,s,l,c){var u=a.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:a.options.fadeDuration?a.symbolFadeChange:1,u_matrix:i,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Nr=function(t,r,n,a,i,o,s,l,c,u,d){var p=i.transform;return e.extend(zr(t,r,n,a,i,o,s,l,c,u),{u_gamma_scale:a?Math.cos(p._pitch)*p.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+d})},jr=function(e,t,r){return{u_matrix:e,u_opacity:t,u_color:r}},Br=function(t,r,n,a,i,o){return e.extend(function(e,t,r,n){var a=r.imageManager.getPattern(e.from),i=r.imageManager.getPattern(e.to),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,d=u*(n.tileID.canonical.x+n.tileID.wrap*c),p=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:i.tl,u_pattern_br_b:i.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:i.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/ct(n,1,r.transform.tileZoom),u_pixel_coord_upper:[d>>16,p>>16],u_pixel_coord_lower:[65535&d,65535&p]}}(a,o,n,i),{u_matrix:t,u_opacity:r})},Yr={fillExtrusion:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fillExtrusionPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,r.u_height_factor),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fill:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},fillPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},fillOutline:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world)}},fillOutlinePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform4f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},circle:function(t,r){return{u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,r.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},collisionBox:xr,collisionCircle:xr,debug:function(t,r){return{u_color:new e.UniformColor(t,r.u_color),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},clippingMask:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmap:function(t,r){return{u_extrude_scale:new e.Uniform1f(t,r.u_extrude_scale),u_intensity:new e.Uniform1f(t,r.u_intensity),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmapTexture:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_color_ramp:new e.Uniform1i(t,r.u_color_ramp),u_opacity:new e.Uniform1f(t,r.u_opacity)}},hillshade:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_latrange:new e.Uniform2f(t,r.u_latrange),u_light:new e.Uniform2f(t,r.u_light),u_shadow:new e.UniformColor(t,r.u_shadow),u_highlight:new e.UniformColor(t,r.u_highlight),u_accent:new e.UniformColor(t,r.u_accent)}},hillshadePrepare:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_dimension:new e.Uniform2f(t,r.u_dimension),u_zoom:new e.Uniform1f(t,r.u_zoom),u_maxzoom:new e.Uniform1f(t,r.u_maxzoom)}},line:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels)}},lineGradient:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_image:new e.Uniform1i(t,r.u_image)}},linePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_texsize:new e.Uniform2f(t,r.u_texsize),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_image:new e.Uniform1i(t,r.u_image),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_scale:new e.Uniform4f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},lineSDF:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,r.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,r.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,r.u_sdfgamma),u_image:new e.Uniform1i(t,r.u_image),u_tex_y_a:new e.Uniform1f(t,r.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,r.u_tex_y_b),u_mix:new e.Uniform1f(t,r.u_mix)}},raster:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_tl_parent:new e.Uniform2f(t,r.u_tl_parent),u_scale_parent:new e.Uniform1f(t,r.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,r.u_buffer_scale),u_fade_t:new e.Uniform1f(t,r.u_fade_t),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image0:new e.Uniform1i(t,r.u_image0),u_image1:new e.Uniform1i(t,r.u_image1),u_brightness_low:new e.Uniform1f(t,r.u_brightness_low),u_brightness_high:new e.Uniform1f(t,r.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,r.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,r.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,r.u_spin_weights)}},symbolIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1f(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture)}},symbolSDF:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1f(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1f(t,r.u_is_halo)}},background:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_color:new e.UniformColor(t,r.u_color)}},backgroundPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image:new e.Uniform1i(t,r.u_image),u_pattern_tl_a:new e.Uniform2f(t,r.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,r.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,r.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,r.u_pattern_br_b),u_texsize:new e.Uniform2f(t,r.u_texsize),u_mix:new e.Uniform1f(t,r.u_mix),u_pattern_size_a:new e.Uniform2f(t,r.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,r.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,r.u_scale_a),u_scale_b:new e.Uniform1f(t,r.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,r.u_tile_units_to_pixels)}}};function Hr(t,r){for(var n=t.sort((function(e,t){return e.tileID.isLessThan(t.tileID)?-1:t.tileID.isLessThan(e.tileID)?1:0})),a=0;a<n.length;a++){var i={},o=n[a],s=n.slice(a+1);Vr(o.tileID.wrapped(),o.tileID,s,new e.OverscaledTileID(0,o.tileID.wrap+1,0,0,0),i),o.setMask(i,r)}}function Vr(t,r,n,a,i){for(var o=0;o<n.length;o++){var s=n[o];if(a.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var l=r.children(1/0),c=0;c<l.length;c++)Vr(t,l[c],n.slice(o),a,i);return}}var u=r.overscaledZ-t.overscaledZ,d=new e.CanonicalTileID(u,r.canonical.x-(t.canonical.x<<u),r.canonical.y-(t.canonical.y<<u));i[d.key]=i[d.key]||d}function Ur(e,t,r,n,a){for(var i=e.context,o=i.gl,s=a?e.useProgram("collisionCircle"):e.useProgram("collisionBox"),l=0;l<n.length;l++){var c=n[l],u=t.getTile(c),d=u.getBucket(r);if(d){var p=a?d.collisionCircle:d.collisionBox;p&&s.draw(i,a?o.TRIANGLES:o.LINES,Te.disabled,Ce.disabled,e.colorModeForRenderPass(),Le.disabled,wr(c.posMatrix,e.transform,u),r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,null,e.transform.zoom,null,null,p.collisionVertexBuffer)}}}var Wr=e.identity(new Float32Array(16));function Gr(t,r,n,a,i,o){var s=e.getAnchorAlignment(t),l=-(s.horizontalAlign-.5)*r,c=-(s.verticalAlign-.5)*n,u=e.evaluateRadialOffset(t,a);return new e.Point((l/i+u[0])*o,(c/i+u[1])*o)}function qr(t,r,n,a,i,o,s,l,c,u){var d=t.text.placedSymbolArray,p=t.text.dynamicLayoutVertexArray;p.clear();for(var h=0;h<d.length;h++){var f=d.get(h),m=t.allowVerticalPlacement&&!f.placedOrientation,g=f.hidden||!f.crossTileID||m?null:a[f.crossTileID];if(g){var v=new e.Point(f.anchorX,f.anchorY),y=Ze(v,n?l:s),b=.5+o.cameraToCenterDistance/y.signedDistanceFromCamera*.5,_=i.evaluateSizeForFeature(t.textSizeData,u,f)*b/e.ONE_EM;n&&(_*=t.tilePixelRatio/c);for(var x=g.width,w=g.height,k=g.radialOffset,M=g.textBoxScale,T=Gr(g.anchor,x,w,k,M,_),C=n?Ze(v.add(T),s).point:y.point.add(r?T.rotate(-o.angle):T),S=t.allowVerticalPlacement&&f.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,L=0;L<f.numGlyphs;L++)e.addDynamicAttributes(p,C,S)}else it(f.numGlyphs,p)}t.text.dynamicLayoutVertexBuffer.updateData(p)}function Kr(t){var r=t.text.placedSymbolArray,n=t.text.dynamicLayoutVertexArray;n.clear();for(var a=0;a<r.length;a++){var i=r.get(a);if(i.hidden||!i.placedOrientation)it(i.numGlyphs,n);else for(var o=new e.Point(i.anchorX,i.anchorY),s=t.allowVerticalPlacement&&i.placedOrientation===e.WritingMode.vertical?Math.PI/2:0,l=0;l<i.numGlyphs;l++)e.addDynamicAttributes(n,o,s)}t.text.dynamicLayoutVertexBuffer.updateData(n)}function Xr(t,r,n,a,i,o,s,l,c,u,d,p,h){for(var f,m,g=t.context,v=g.gl,y=t.transform,b="map"===l,_="map"===c,x=b&&"point"!==n.layout.get("symbol-placement"),w=b&&!_&&!x,k=void 0!==n.layout.get("symbol-sort-key").constantOr(1),M=t.depthModeForSublayer(0,Te.ReadOnly),T=n.layout.get("text-variable-anchor"),C=[],S=0,L=a;S<L.length;S+=1){var A=L[S],E=r.getTile(A),D=E.getBucket(n);if(D){var I=i?D.text:D.icon;if(I&&I.segments.get().length){var P=I.programConfigurations.get(n.id),O=i||D.sdfIcons,R=i?D.textSizeData:D.iconSizeData;f||(f=t.useProgram(O?"symbolSDF":"symbolIcon",P),m=e.evaluateSizeForZoom(R,y.zoom)),g.activeTexture.set(v.TEXTURE0);var F=void 0,z=void 0,N=void 0;if(i)z=E.glyphAtlasTexture,N=v.LINEAR,F=E.glyphAtlasTexture.size;else{var j=1!==n.layout.get("icon-size").constantOr(0)||D.iconsNeedLinear,B=_||0!==y.pitch;z=E.imageAtlasTexture,N=O||t.options.rotating||t.options.zooming||j||B?v.LINEAR:v.NEAREST,F=E.imageAtlasTexture.size}var Y=ct(E,1,t.transform.zoom),H=Ke(A.posMatrix,_,b,t.transform,Y),V=Xe(A.posMatrix,_,b,t.transform,Y);if(x)$e(D,A.posMatrix,t,i,H,V,_,u);else if(i&&m&&T){var U=Math.pow(2,y.zoom-E.tileID.overscaledZ);qr(D,b,_,h,e.symbolSize,y,H,A.posMatrix,U,m)}else i&&m&&D.allowVerticalPlacement&&Kr(D);var W=t.translatePosMatrix(A.posMatrix,E,o,s),G=x||i&&T?Wr:H,q=t.translatePosMatrix(V,E,o,s,!0),K=O&&0!==n.paint.get(i?"text-halo-width":"icon-halo-width").constantOr(1),X={program:f,buffers:I,uniformValues:O?Nr(R.kind,m,w,_,t,W,G,q,i,F,!0):zr(R.kind,m,w,_,t,W,G,q,i,F),atlasTexture:z,atlasInterpolation:N,isSDF:O,hasHalo:K};if(k)for(var Z=0,J=I.segments.get();Z<J.length;Z+=1){var $=J[Z];C.push({segments:new e.SegmentVector([$]),sortKey:$.sortKey,state:X})}else C.push({segments:I.segments,sortKey:0,state:X})}}}k&&C.sort((function(e,t){return e.sortKey-t.sortKey}));for(var Q=0,ee=C;Q<ee.length;Q+=1){var te=ee[Q],re=te.state;if(re.atlasTexture.bind(re.atlasInterpolation,v.CLAMP_TO_EDGE),re.isSDF){var ne=re.uniformValues;re.hasHalo&&(ne.u_is_halo=1,Zr(re.buffers,te.segments,n,t,re.program,M,d,p,ne)),ne.u_is_halo=0}Zr(re.buffers,te.segments,n,t,re.program,M,d,p,re.uniformValues)}}function Zr(e,t,r,n,a,i,o,s,l){var c=n.context,u=c.gl;a.draw(c,u.TRIANGLES,i,o,s,Le.disabled,l,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,n.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function Jr(e,t,r,n,a,i,o){var s,l,c,u,d,p=e.context.gl,h=r.paint.get("fill-pattern"),f=h&&h.constantOr(1),m=r.getCrossfadeParameters();o?(l=f&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=p.LINES):(l=f?"fillPattern":"fill",s=p.TRIANGLES);for(var g=0,v=n;g<v.length;g+=1){var y=v[g],b=t.getTile(y);if(!f||b.patternsLoaded()){var _=b.getBucket(r);if(_){var x=_.programConfigurations.get(r.id),w=e.useProgram(l,x);f&&(e.context.activeTexture.set(p.TEXTURE0),b.imageAtlasTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),x.updatePatternPaintBuffers(m));var k=h.constantOr(null);if(k&&b.imageAtlas){var M=b.imageAtlas.patternPositions[k.to],T=b.imageAtlas.patternPositions[k.from];M&&T&&x.setConstantPatternPositions(M,T)}var C=e.translatePosMatrix(y.posMatrix,b,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(o){u=_.indexBuffer2,d=_.segments2;var S=[p.drawingBufferWidth,p.drawingBufferHeight];c="fillOutlinePattern"===l&&f?br(C,e,m,b,S):yr(C,S)}else u=_.indexBuffer,d=_.segments,c=f?vr(C,e,m,b):gr(C);w.draw(e.context,s,a,e.stencilModeForClipping(y),i,Le.disabled,c,r.id,_.layoutVertexBuffer,u,d,r.paint,e.transform.zoom,x)}}}}function $r(e,t,r,n,a,i,o){for(var s=e.context,l=s.gl,c=r.paint.get("fill-extrusion-pattern"),u=c.constantOr(1),d=r.getCrossfadeParameters(),p=r.paint.get("fill-extrusion-opacity"),h=0,f=n;h<f.length;h+=1){var m=f[h],g=t.getTile(m),v=g.getBucket(r);if(v){var y=v.programConfigurations.get(r.id),b=e.useProgram(u?"fillExtrusionPattern":"fillExtrusion",y);u&&(e.context.activeTexture.set(l.TEXTURE0),g.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),y.updatePatternPaintBuffers(d));var _=c.constantOr(null);if(_&&g.imageAtlas){var x=g.imageAtlas.patternPositions[_.to],w=g.imageAtlas.patternPositions[_.from];x&&w&&y.setConstantPatternPositions(x,w)}var k=e.translatePosMatrix(m.posMatrix,g,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),M=r.paint.get("fill-extrusion-vertical-gradient"),T=u?mr(k,e,M,p,m,d,g):fr(k,e,M,p);b.draw(s,s.gl.TRIANGLES,a,i,o,Le.backCCW,T,r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,r.paint,e.transform.zoom,y)}}}function Qr(e,t,r,n,a,i){var o=e.context,s=o.gl,l=t.fbo;if(l){var c=e.useProgram("hillshade");o.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,l.colorAttachment.get());var u=Cr(e,t,r);t.maskedBoundsBuffer&&t.maskedIndexBuffer&&t.segments?c.draw(o,s.TRIANGLES,n,a,i,Le.disabled,u,r.id,t.maskedBoundsBuffer,t.maskedIndexBuffer,t.segments):c.draw(o,s.TRIANGLES,n,a,i,Le.disabled,u,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}function en(t,r,n,a,i,o,s){var l=t.context,c=l.gl;if(r.dem&&r.dem.data){var u=r.dem.dim,d=r.dem.stride,p=r.dem.getPixels();if(l.activeTexture.set(c.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||t.getTileTexture(d),r.demTexture){var h=r.demTexture;h.update(p,{premultiply:!1}),h.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else r.demTexture=new e.Texture(l,p,c.RGBA,{premultiply:!1}),r.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);l.activeTexture.set(c.TEXTURE0);var f=r.fbo;if(!f){var m=new e.Texture(l,{width:u,height:u,data:null},c.RGBA);m.bind(c.LINEAR,c.CLAMP_TO_EDGE),(f=r.fbo=l.createFramebuffer(u,u)).colorAttachment.set(m.texture)}l.bindFramebuffer.set(f.framebuffer),l.viewport.set([0,0,u,u]),t.useProgram("hillshadePrepare").draw(l,c.TRIANGLES,i,o,s,Le.disabled,Sr(r,a),n.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function tn(t,r,n,a,i){var o=a.paint.get("raster-fade-duration");if(o>0){var s=e.browser.now(),l=(s-t.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),d=i.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),p=!r||Math.abs(r.tileID.overscaledZ-d)>Math.abs(t.tileID.overscaledZ-d),h=p&&t.refreshedUponExpiration?1:e.clamp(p?l:1-c,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-h}:{opacity:h,mix:0}}return{opacity:1,mix:0}}function rn(t,r,n){var a=t.context,i=a.gl,o=n.posMatrix,s=t.useProgram("debug"),l=Te.disabled,c=Ce.disabled,u=t.colorModeForRenderPass(),d="$debug";s.draw(a,i.LINE_STRIP,l,c,u,Le.disabled,kr(o,e.Color.red),d,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);for(var p=r.getTileByID(n.key).latestRawTileData,h=p&&p.byteLength||0,f=Math.floor(h/1024),m=r.getTile(n).tileSize,g=512/Math.min(m,512),v=function(e,t,r,n){n=n||1;var a,i,o,s,l,c,u,d,p=[];for(a=0,i=e.length;a<i;a++)if(l=nn[e[a]]){for(d=null,o=0,s=l[1].length;o<s;o+=2)-1===l[1][o]&&-1===l[1][o+1]?d=null:(c=t+l[1][o]*n,u=r-l[1][o+1]*n,d&&p.push(d.x,d.y,c,u),d={x:c,y:u});t+=l[0]*n}return p}(n.toString()+" "+f+"kb",50,200*g,5*g),y=new e.StructArrayLayout2i4,b=new e.StructArrayLayout2ui4,_=0;_<v.length;_+=2)y.emplaceBack(v[_],v[_+1]),b.emplaceBack(_,_+1);for(var x=a.createVertexBuffer(y,zt.members),w=a.createIndexBuffer(b),k=e.SegmentVector.simpleSegment(0,0,y.length/2,y.length/2),M=e.EXTENT/(Math.pow(2,t.transform.zoom-n.overscaledZ)*m*g),T=[],C=-1;C<=1;C++)for(var S=-1;S<=1&&(0!==C||0!==S);S++)T.push([C,S]);for(var L=0;L<T.length;L++){var A=T[L];s.draw(a,i.LINES,l,c,u,Le.disabled,kr(e.translate([],o,[M*A[0],M*A[1],0]),e.Color.white),d,x,w,k)}s.draw(a,i.LINES,l,c,u,Le.disabled,kr(o,e.Color.black),d,x,w,k)}var nn={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},an={symbol:function(e,t,r,n,a){if("translucent"===e.renderPass){var i=Ce.disabled,o=e.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&Xr(e,t,r,n,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),i,o,a),0!==r.paint.get("text-opacity").constantOr(1)&&Xr(e,t,r,n,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),i,o,a),t.map.showCollisionBoxes&&function(e,t,r,n){Ur(e,t,r,n,!1),Ur(e,t,r,n,!0)}(e,t,r,n)}},circle:function(t,r,n,a){if("translucent"===t.renderPass){var i=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=void 0!==n.layout.get("circle-sort-key").constantOr(1);if(0!==i.constantOr(1)||0!==o.constantOr(1)&&0!==s.constantOr(1)){for(var c=t.context,u=c.gl,d=t.depthModeForSublayer(0,Te.ReadOnly),p=Ce.disabled,h=t.colorModeForRenderPass(),f=[],m=0;m<a.length;m++){var g=a[m],v=r.getTile(g),y=v.getBucket(n);if(y){var b=y.programConfigurations.get(n.id),_={programConfiguration:b,program:t.useProgram("circle",b),layoutVertexBuffer:y.layoutVertexBuffer,indexBuffer:y.indexBuffer,uniformValues:_r(t,g,v,n)};if(l)for(var x=0,w=y.segments.get();x<w.length;x+=1){var k=w[x];f.push({segments:new e.SegmentVector([k]),sortKey:k.sortKey,state:_})}else f.push({segments:y.segments,sortKey:0,state:_})}}l&&f.sort((function(e,t){return e.sortKey-t.sortKey}));for(var M=0,T=f;M<T.length;M+=1){var C=T[M],S=C.state,L=S.programConfiguration,A=S.program,E=S.layoutVertexBuffer,D=S.indexBuffer,I=S.uniformValues,P=C.segments;A.draw(c,u.TRIANGLES,d,p,h,Le.disabled,I,n.id,E,D,P,n.paint,t.transform.zoom,L)}}}},heatmap:function(t,r,n,a){if(0!==n.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){var i=t.context,o=i.gl,s=t.depthModeForSublayer(0,Te.ReadOnly),l=Ce.disabled,c=new Se([o.ONE,o.ONE],e.Color.transparent,[!0,!0,!0,!0]);!function(e,t,r){var n=e.gl;e.activeTexture.set(n.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);var a=r.heatmapFbo;if(a)n.bindTexture(n.TEXTURE_2D,a.colorAttachment.get()),e.bindFramebuffer.set(a.framebuffer);else{var i=n.createTexture();n.bindTexture(n.TEXTURE_2D,i),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),a=r.heatmapFbo=e.createFramebuffer(t.width/4,t.height/4),function e(t,r,n,a){var i=t.gl;i.texImage2D(i.TEXTURE_2D,0,i.RGBA,r.width/4,r.height/4,0,i.RGBA,t.extTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:i.UNSIGNED_BYTE,null),a.colorAttachment.set(n),t.extTextureHalfFloat&&i.checkFramebufferStatus(i.FRAMEBUFFER)!==i.FRAMEBUFFER_COMPLETE&&(t.extTextureHalfFloat=null,a.colorAttachment.setDirty(),e(t,r,n,a))}(e,t,i,a)}}(i,t,n),i.clear({color:e.Color.transparent});for(var u=0;u<a.length;u++){var d=a[u];if(!r.hasRenderableParent(d)){var p=r.getTile(d),h=p.getBucket(n);if(h){var f=h.programConfigurations.get(n.id),m=t.useProgram("heatmap",f),g=t.transform.zoom;m.draw(i,o.TRIANGLES,s,l,c,Le.disabled,Tr(d.posMatrix,p,g,n.paint.get("heatmap-intensity")),n.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,n.paint,t.transform.zoom,f)}}}i.viewport.set([0,0,t.width,t.height])}else"translucent"===t.renderPass&&(t.context.setColorMode(t.colorModeForRenderPass()),function(t,r){var n=t.context,a=n.gl,i=r.heatmapFbo;if(i){n.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,i.colorAttachment.get()),n.activeTexture.set(a.TEXTURE1);var o=r.colorRampTexture;o||(o=r.colorRampTexture=new e.Texture(n,r.colorRamp,a.RGBA)),o.bind(a.LINEAR,a.CLAMP_TO_EDGE),t.useProgram("heatmapTexture").draw(n,a.TRIANGLES,Te.disabled,Ce.disabled,t.colorModeForRenderPass(),Le.disabled,function(t,r,n,a){var i=e.create();e.ortho(i,0,t.width,t.height,0,0,1);var o=t.context.gl;return{u_matrix:i,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_color_ramp:a,u_opacity:r.paint.get("heatmap-opacity")}}(t,r,0,1),r.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,r.paint,t.transform.zoom)}}(t,n))},line:function(t,r,n,a){if("translucent"===t.renderPass){var i=n.paint.get("line-opacity"),o=n.paint.get("line-width");if(0!==i.constantOr(1)&&0!==o.constantOr(1)){var s=t.depthModeForSublayer(0,Te.ReadOnly),l=t.colorModeForRenderPass(),c=n.paint.get("line-dasharray"),u=n.paint.get("line-pattern"),d=u.constantOr(1),p=n.paint.get("line-gradient"),h=n.getCrossfadeParameters(),f=c?"lineSDF":d?"linePattern":p?"lineGradient":"line",m=t.context,g=m.gl,v=!0;if(p){m.activeTexture.set(g.TEXTURE0);var y=n.gradientTexture;if(!n.gradient)return;y||(y=n.gradientTexture=new e.Texture(m,n.gradient,g.RGBA)),y.bind(g.LINEAR,g.CLAMP_TO_EDGE)}for(var b=0,_=a;b<_.length;b+=1){var x=_[b],w=r.getTile(x);if(!d||w.patternsLoaded()){var k=w.getBucket(n);if(k){var M=k.programConfigurations.get(n.id),T=t.context.program.get(),C=t.useProgram(f,M),S=v||C.program!==T,L=u.constantOr(null);if(L&&w.imageAtlas){var A=w.imageAtlas.patternPositions[L.to],E=w.imageAtlas.patternPositions[L.from];A&&E&&M.setConstantPatternPositions(A,E)}var D=c?Ir(t,w,n,c,h):d?Dr(t,w,n,h):p?Er(t,w,n):Ar(t,w,n);c&&(S||t.lineAtlas.dirty)?(m.activeTexture.set(g.TEXTURE0),t.lineAtlas.bind(m)):d&&(m.activeTexture.set(g.TEXTURE0),w.imageAtlasTexture.bind(g.LINEAR,g.CLAMP_TO_EDGE),M.updatePatternPaintBuffers(h)),C.draw(m,g.TRIANGLES,s,t.stencilModeForClipping(x),l,Le.disabled,D,n.id,k.layoutVertexBuffer,k.indexBuffer,k.segments,n.paint,t.transform.zoom,M),v=!1}}}}}},fill:function(t,r,n,a){var i=n.paint.get("fill-color"),o=n.paint.get("fill-opacity");if(0!==o.constantOr(1)){var s=t.colorModeForRenderPass(),l=n.paint.get("fill-pattern"),c=t.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===i.constantOr(e.Color.transparent).a&&1===o.constantOr(0)?"opaque":"translucent";if(t.renderPass===c){var u=t.depthModeForSublayer(1,"opaque"===t.renderPass?Te.ReadWrite:Te.ReadOnly);Jr(t,r,n,a,u,s,!1)}if("translucent"===t.renderPass&&n.paint.get("fill-antialias")){var d=t.depthModeForSublayer(n.getPaintProperty("fill-outline-color")?2:0,Te.ReadOnly);Jr(t,r,n,a,d,s,!0)}}},"fill-extrusion":function(e,t,r,n){var a=r.paint.get("fill-extrusion-opacity");if(0!==a&&"translucent"===e.renderPass){var i=new Te(e.context.gl.LEQUAL,Te.ReadWrite,e.depthRangeFor3D);if(1!==a||r.paint.get("fill-extrusion-pattern").constantOr(1))$r(e,t,r,n,i,Ce.disabled,Se.disabled),$r(e,t,r,n,i,e.stencilModeFor3D(),e.colorModeForRenderPass());else{var o=e.colorModeForRenderPass();$r(e,t,r,n,i,Ce.disabled,o)}}},hillshade:function(e,t,r,n){if("offscreen"===e.renderPass||"translucent"===e.renderPass){for(var a=e.context,i=t.getSource().maxzoom,o=e.depthModeForSublayer(0,Te.ReadOnly),s=Ce.disabled,l=e.colorModeForRenderPass(),c=0,u=n;c<u.length;c+=1){var d=u[c],p=t.getTile(d);p.needsHillshadePrepare&&"offscreen"===e.renderPass?en(e,p,r,i,o,s,l):"translucent"===e.renderPass&&Qr(e,p,r,o,s,l)}a.viewport.set([0,0,e.width,e.height])}},raster:function(e,t,r,n){if("translucent"===e.renderPass&&0!==r.paint.get("raster-opacity"))for(var a=e.context,i=a.gl,o=t.getSource(),s=e.useProgram("raster"),l=Ce.disabled,c=e.colorModeForRenderPass(),u=n.length&&n[0].overscaledZ,d=!e.options.moving,p=0,h=n;p<h.length;p+=1){var f=h[p],m=e.depthModeForSublayer(f.overscaledZ-u,1===r.paint.get("raster-opacity")?Te.ReadWrite:Te.ReadOnly,i.LESS),g=t.getTile(f),v=e.transform.calculatePosMatrix(f.toUnwrapped(),d);g.registerFadeDuration(r.paint.get("raster-fade-duration"));var y=t.findLoadedParent(f,0),b=tn(g,y,t,r,e.transform),_=void 0,x=void 0,w="nearest"===r.paint.get("raster-resampling")?i.NEAREST:i.LINEAR;a.activeTexture.set(i.TEXTURE0),g.texture.bind(w,i.CLAMP_TO_EDGE,i.LINEAR_MIPMAP_NEAREST),a.activeTexture.set(i.TEXTURE1),y?(y.texture.bind(w,i.CLAMP_TO_EDGE,i.LINEAR_MIPMAP_NEAREST),_=Math.pow(2,y.tileID.overscaledZ-g.tileID.overscaledZ),x=[g.tileID.canonical.x*_%1,g.tileID.canonical.y*_%1]):g.texture.bind(w,i.CLAMP_TO_EDGE,i.LINEAR_MIPMAP_NEAREST);var k=Rr(v,x||[0,0],_||1,b,r);o instanceof D?s.draw(a,i.TRIANGLES,m,l,c,Le.disabled,k,r.id,o.boundsBuffer,e.quadTriangleIndexBuffer,o.boundsSegments):g.maskedBoundsBuffer&&g.maskedIndexBuffer&&g.segments?s.draw(a,i.TRIANGLES,m,l,c,Le.disabled,k,r.id,g.maskedBoundsBuffer,g.maskedIndexBuffer,g.segments,r.paint,e.transform.zoom):s.draw(a,i.TRIANGLES,m,l,c,Le.disabled,k,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}},background:function(e,t,r){var n=r.paint.get("background-color"),a=r.paint.get("background-opacity");if(0!==a){var i=e.context,o=i.gl,s=e.transform,l=s.tileSize,c=r.paint.get("background-pattern");if(!e.isPatternMissing(c)){var u=!c&&1===n.a&&1===a&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass===u){var d=Ce.disabled,p=e.depthModeForSublayer(0,"opaque"===u?Te.ReadWrite:Te.ReadOnly),h=e.colorModeForRenderPass(),f=e.useProgram(c?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});c&&(i.activeTexture.set(o.TEXTURE0),e.imageManager.bind(e.context));for(var g=r.getCrossfadeParameters(),v=0,y=m;v<y.length;v+=1){var b=y[v],_=e.transform.calculatePosMatrix(b.toUnwrapped()),x=c?Br(_,a,e,c,{tileID:b,tileSize:l},g):jr(_,a,n);f.draw(i,o.TRIANGLES,p,d,h,Le.disabled,x,r.id,e.tileExtentBuffer,e.quadTriangleIndexBuffer,e.tileExtentSegments)}}}}},debug:function(e,t,r){for(var n=0;n<r.length;n++)rn(e,t,r[n])},custom:function(e,t,r){var n=e.context,a=r.implementation;if("offscreen"===e.renderPass){var i=a.prerender;i&&(e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),i.call(a,n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),n.setStencilMode(Ce.disabled);var o="3d"===a.renderingMode?new Te(e.context.gl.LEQUAL,Te.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,Te.ReadOnly);n.setDepthMode(o),a.render(n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState(),n.bindFramebuffer.set(null)}}},on=function(t,r){this.context=new Ae(t),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=Ee.maxUnderzooming+Ee.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new e.ProgramConfiguration,this.crossTileSymbolIndex=new It};function sn(e,t){if(e.y>t.y){var r=e;e=t,t=r}return{x0:e.x,y0:e.y,x1:t.x,y1:t.y,dx:t.x-e.x,dy:t.y-e.y}}function ln(e,t,r,n,a){var i=Math.max(r,Math.floor(t.y0)),o=Math.min(n,Math.ceil(t.y1));if(e.x0===t.x0&&e.y0===t.y0?e.x0+t.dy/e.dy*e.dx<t.x1:e.x1-t.dy/e.dy*e.dx<t.x0){var s=e;e=t,t=s}for(var l=e.dx/e.dy,c=t.dx/t.dy,u=e.dx>0,d=t.dx<0,p=i;p<o;p++){var h=l*Math.max(0,Math.min(e.dy,p+u-e.y0))+e.x0,f=c*Math.max(0,Math.min(t.dy,p+d-t.y0))+t.x0;a(Math.floor(f),Math.ceil(h),p)}}function cn(e,t,r,n,a,i){var o,s=sn(e,t),l=sn(t,r),c=sn(r,e);s.dy>l.dy&&(o=s,s=l,l=o),s.dy>c.dy&&(o=s,s=c,c=o),l.dy>c.dy&&(o=l,l=c,c=o),s.dy&&ln(c,s,n,a,i),l.dy&&ln(c,l,n,a,i)}on.prototype.resize=function(t,r){var n=this.context.gl;if(this.width=t*e.browser.devicePixelRatio,this.height=r*e.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var a=0,i=this.style._order;a<i.length;a+=1){var o=i[a];this.style._layers[o].resize()}this.depthRbo&&(n.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},on.prototype.setup=function(){var t=this.context,r=new e.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(e.EXTENT,0),r.emplaceBack(0,e.EXTENT),r.emplaceBack(e.EXTENT,e.EXTENT),this.tileExtentBuffer=t.createVertexBuffer(r,zt.members),this.tileExtentSegments=e.SegmentVector.simpleSegment(0,0,4,2);var n=new e.StructArrayLayout2i4;n.emplaceBack(0,0),n.emplaceBack(e.EXTENT,0),n.emplaceBack(0,e.EXTENT),n.emplaceBack(e.EXTENT,e.EXTENT),this.debugBuffer=t.createVertexBuffer(n,zt.members),this.debugSegments=e.SegmentVector.simpleSegment(0,0,4,5);var a=new e.StructArrayLayout4i8;a.emplaceBack(0,0,0,0),a.emplaceBack(e.EXTENT,0,e.EXTENT,0),a.emplaceBack(0,e.EXTENT,0,e.EXTENT),a.emplaceBack(e.EXTENT,e.EXTENT,e.EXTENT,e.EXTENT),this.rasterBoundsBuffer=t.createVertexBuffer(a,e.rasterBoundsAttributes.members),this.rasterBoundsSegments=e.SegmentVector.simpleSegment(0,0,4,2);var i=new e.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(1,0),i.emplaceBack(0,1),i.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(i,zt.members),this.viewportSegments=e.SegmentVector.simpleSegment(0,0,4,2);var o=new e.StructArrayLayout1ui2;o.emplaceBack(0),o.emplaceBack(1),o.emplaceBack(3),o.emplaceBack(2),o.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(o);var s=new e.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(s);var l=this.context.gl;this.stencilClearMode=new Ce({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},on.prototype.clearStencil=function(){var t=this.context,r=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var n=e.create();e.ortho(n,0,this.width,this.height,0,0,1),e.scale(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,r.TRIANGLES,Te.disabled,this.stencilClearMode,Se.disabled,Le.disabled,Mr(n),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},on.prototype._renderTileClippingMasks=function(e,t){if(this.currentStencilSource!==e.source&&e.isTileClipped()&&t&&t.length){this.currentStencilSource=e.source;var r=this.context,n=r.gl;this.nextStencilID+t.length>256&&this.clearStencil(),r.setColorMode(Se.disabled),r.setDepthMode(Te.disabled);var a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var i=0,o=t;i<o.length;i+=1){var s=o[i],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;a.draw(r,n.TRIANGLES,Te.disabled,new Ce({func:n.ALWAYS,mask:0},l,255,n.KEEP,n.KEEP,n.REPLACE),Se.disabled,Le.disabled,Mr(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},on.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Ce({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},on.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Ce({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},on.prototype.colorModeForRenderPass=function(){var t=this.context.gl;return this._showOverdrawInspector?new Se([t.CONSTANT_COLOR,t.ONE],new e.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Se.unblended:Se.alphaBlended},on.prototype.depthModeForSublayer=function(e,t,r){if(!this.opaquePassEnabledForLayer())return Te.disabled;var n=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new Te(r||this.context.gl.LEQUAL,t,[n,n])},on.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},on.prototype.render=function(t,r){this.style=t,this.options=r,this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.glyphManager=t.glyphManager,this.symbolFadeChange=t.placement.symbolFadeChange(e.browser.now()),this.imageManager.beginFrame();var n=this.style._order,a=this.style.sourceCaches;for(var i in a){var o=a[i];o.used&&o.prepare(this.context)}var s={},l={},c={};for(var u in a){var d=a[u];s[u]=d.getVisibleCoordinates(),l[u]=s[u].slice().reverse(),c[u]=d.getVisibleCoordinates(!0).reverse()}for(var p in a){var h=a[p],f=h.getSource();if("raster"===f.type||"raster-dem"===f.type){for(var m=[],g=0,v=s[p];g<v.length;g+=1){var y=v[g];m.push(h.getTile(y))}Hr(m,this.context)}}this.opaquePassCutoff=1/0;for(var b=0;b<n.length;b++){var _=n[b];if(this.style._layers[_].is3D()){this.opaquePassCutoff=b;break}}this.renderPass="offscreen",this.depthRboNeedsClear=!0;for(var x=0,w=n;x<w.length;x+=1){var k=w[x],M=this.style._layers[k];if(M.hasOffscreenPass()&&!M.isHidden(this.transform.zoom)){var T=l[M.source];("custom"===M.type||T.length)&&this.renderLayer(this,a[M.source],M,T)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?e.Color.black:e.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){var C=this.style._layers[n[this.currentLayer]],S=a[C.source],L=s[C.source];this._renderTileClippingMasks(C,L),this.renderLayer(this,S,C,L)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var A=this.style._layers[n[this.currentLayer]],E=a[A.source],D=("symbol"===A.type?c:l)[A.source];this._renderTileClippingMasks(A,s[A.source]),this.renderLayer(this,E,A,D)}if(this.options.showTileBoundaries)for(var I in a){an.debug(this,a[I],s[I]);break}this.context.setDefault()},on.prototype.setupOffscreenDepthRenderbuffer=function(){var e=this.context;this.depthRbo||(this.depthRbo=e.createRenderbuffer(e.gl.DEPTH_COMPONENT16,this.width,this.height))},on.prototype.renderLayer=function(e,t,r,n){r.isHidden(this.transform.zoom)||("background"===r.type||"custom"===r.type||n.length)&&(this.id=r.id,an[r.type](e,t,r,n,this.style.placement.variableOffsets))},on.prototype.translatePosMatrix=function(t,r,n,a,i){if(!n[0]&&!n[1])return t;var o=i?"map"===a?this.transform.angle:0:"viewport"===a?-this.transform.angle:0;if(o){var s=Math.sin(o),l=Math.cos(o);n=[n[0]*l-n[1]*s,n[0]*s+n[1]*l]}var c=[i?n[0]:ct(r,n[0],this.transform.zoom),i?n[1]:ct(r,n[1],this.transform.zoom),0],u=new Float32Array(16);return e.translate(u,t,c),u},on.prototype.saveTileTexture=function(e){var t=this._tileTextures[e.size[0]];t?t.push(e):this._tileTextures[e.size[0]]=[e]},on.prototype.getTileTexture=function(e){var t=this._tileTextures[e];return t&&t.length>0?t.pop():null},on.prototype.isPatternMissing=function(e){if(!e)return!1;var t=this.imageManager.getPattern(e.from),r=this.imageManager.getPattern(e.to);return!t||!r},on.prototype.useProgram=function(e,t){void 0===t&&(t=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+e+(t.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new pr(this.context,ur[e],t,Yr[e],this._showOverdrawInspector)),this.cache[r]},on.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},on.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)};var un=function(t,r,n){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===n||n,this._minZoom=t||0,this._maxZoom=r||22,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},dn={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};un.prototype.clone=function(){var e=new un(this._minZoom,this._maxZoom,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._calcMatrices(),e},dn.minZoom.get=function(){return this._minZoom},dn.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},dn.maxZoom.get=function(){return this._maxZoom},dn.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},dn.renderWorldCopies.get=function(){return this._renderWorldCopies},dn.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},dn.worldSize.get=function(){return this.tileSize*this.scale},dn.centerPoint.get=function(){return this.size._div(2)},dn.size.get=function(){return new e.Point(this.width,this.height)},dn.bearing.get=function(){return-this.angle/Math.PI*180},dn.bearing.set=function(t){var r=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},dn.pitch.get=function(){return this._pitch/Math.PI*180},dn.pitch.set=function(t){var r=e.clamp(t,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},dn.fov.get=function(){return this._fov/Math.PI*180},dn.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},dn.zoom.get=function(){return this._zoom},dn.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},dn.center.get=function(){return this._center},dn.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},un.prototype.coveringZoomLevel=function(e){return(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize))},un.prototype.getVisibleUnwrappedCoordinates=function(t){var r=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new e.Point(0,0)),a=this.pointCoordinate(new e.Point(this.width,0)),i=this.pointCoordinate(new e.Point(this.width,this.height)),o=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(n.x,a.x,i.x,o.x)),l=Math.floor(Math.max(n.x,a.x,i.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new e.UnwrappedTileID(c,t));return r},un.prototype.coveringTiles=function(t){var r=this.coveringZoomLevel(t),n=r;if(void 0!==t.minzoom&&r<t.minzoom)return[];void 0!==t.maxzoom&&r>t.maxzoom&&(r=t.maxzoom);var a=e.MercatorCoordinate.fromLngLat(this.center),i=Math.pow(2,r),o=new e.Point(i*a.x-.5,i*a.y-.5);return function(t,r,n,a){void 0===a&&(a=!0);var i=1<<t,o={};function s(r,s,l){var c,u,d,p;if(l>=0&&l<=i)for(c=r;c<s;c++)u=Math.floor(c/i),d=(c%i+i)%i,0!==u&&!0!==a||(p=new e.OverscaledTileID(n,u,t,d,l),o[p.key]=p)}var l=r.map((function(t){return new e.Point(t.x,t.y)._mult(i)}));return cn(l[0],l[1],l[2],0,i,s),cn(l[2],l[3],l[0],0,i,s),Object.keys(o).map((function(e){return o[e]}))}(r,[this.pointCoordinate(new e.Point(0,0)),this.pointCoordinate(new e.Point(this.width,0)),this.pointCoordinate(new e.Point(this.width,this.height)),this.pointCoordinate(new e.Point(0,this.height))],t.reparseOverscaled?n:r,this._renderWorldCopies).sort((function(e,t){return o.dist(e.canonical)-o.dist(t.canonical)}))},un.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},dn.unmodified.get=function(){return this._unmodified},un.prototype.zoomScale=function(e){return Math.pow(2,e)},un.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},un.prototype.project=function(t){var r=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(r)*this.worldSize)},un.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},dn.point.get=function(){return this.project(this.center)},un.prototype.setLocationAtPoint=function(t,r){var n=this.pointCoordinate(r),a=this.pointCoordinate(this.centerPoint),i=this.locationCoordinate(t),o=new e.MercatorCoordinate(i.x-(n.x-a.x),i.y-(n.y-a.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},un.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},un.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},un.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},un.prototype.coordinateLocation=function(e){return e.toLngLat()},un.prototype.pointCoordinate=function(t){var r=[t.x,t.y,0,1],n=[t.x,t.y,1,1];e.transformMat4(r,r,this.pixelMatrixInverse),e.transformMat4(n,n,this.pixelMatrixInverse);var a=r[3],i=n[3],o=r[0]/a,s=n[0]/i,l=r[1]/a,c=n[1]/i,u=r[2]/a,d=n[2]/i,p=u===d?0:(0-u)/(d-u);return new e.MercatorCoordinate(e.number(o,s,p)/this.worldSize,e.number(l,c,p)/this.worldSize)},un.prototype.coordinatePoint=function(t){var r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix),new e.Point(r[0]/r[3],r[1]/r[3])},un.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},un.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},un.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},un.prototype.calculatePosMatrix=function(t,r){void 0===r&&(r=!1);var n=t.key,a=r?this._alignedPosMatrixCache:this._posMatrixCache;if(a[n])return a[n];var i=t.canonical,o=this.worldSize/this.zoomScale(i.z),s=i.x+Math.pow(2,i.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*o,i.y*o,0]),e.scale(l,l,[o/e.EXTENT,o/e.EXTENT,1]),e.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),a[n]=new Float32Array(l),a[n]},un.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},un.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,r,n,a,i=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var d=this.latRange;i=e.mercatorYfromLat(d[1])*this.worldSize,t=(o=e.mercatorYfromLat(d[0])*this.worldSize)-i<c.y?c.y/(o-i):0}if(this.lngRange){var p=this.lngRange;s=e.mercatorXfromLng(p[0])*this.worldSize,r=(l=e.mercatorXfromLng(p[1])*this.worldSize)-s<c.x?c.x/(l-s):0}var h=this.point,f=Math.max(r||0,t||0);if(f)return this.center=this.unproject(new e.Point(r?(l+s)/2:h.x,t?(o+i)/2:h.y)),this.zoom+=this.scaleZoom(f),this._unmodified=u,void(this._constraining=!1);if(this.latRange){var m=h.y,g=c.y/2;m-g<i&&(a=i+g),m+g>o&&(a=o-g)}if(this.lngRange){var v=h.x,y=c.x/2;v-y<s&&(n=s+y),v+y>l&&(n=l-y)}void 0===n&&void 0===a||(this.center=this.unproject(new e.Point(void 0!==n?n:h.x,void 0!==a?a:h.y))),this._unmodified=u,this._constraining=!1}},un.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var t=this._fov/2,r=Math.PI/2+this._pitch,n=Math.sin(t)*this.cameraToCenterDistance/Math.sin(Math.PI-r-t),a=this.point,i=a.x,o=a.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),l=this.height/50,c=new Float64Array(16);e.perspective(c,this._fov,this.width/this.height,l,s),e.scale(c,c,[1,-1,1]),e.translate(c,c,[0,0,-this.cameraToCenterDistance]),e.rotateX(c,c,this._pitch),e.rotateZ(c,c,this.angle),e.translate(c,c,[-i,-o,0]),this.mercatorMatrix=e.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),e.scale(c,c,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c;var u=this.width%2/2,d=this.height%2/2,p=Math.cos(this.angle),h=Math.sin(this.angle),f=i-Math.round(i)+p*u+h*d,m=o-Math.round(o)+p*d+h*u,g=new Float64Array(c);if(e.translate(g,g,[f>.5?f-1:f,m>.5?m-1:m,0]),this.alignedProjMatrix=g,c=e.create(),e.scale(c,c,[this.width/2,-this.height/2,1]),e.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=e.create(),e.scale(c,c,[1,-1,1]),e.translate(c,c,[-1,-1,0]),e.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},un.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},un.prototype.getCameraPoint=function(){var t=this._pitch,r=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,r))},un.prototype.getCameraQueryGeometry=function(t){var r=this.getCameraPoint();if(1===t.length)return[t[0],r];for(var n=r.x,a=r.y,i=r.x,o=r.y,s=0,l=t;s<l.length;s+=1){var c=l[s];n=Math.min(n,c.x),a=Math.min(a,c.y),i=Math.max(i,c.x),o=Math.max(o,c.y)}return[new e.Point(n,a),new e.Point(i,a),new e.Point(i,o),new e.Point(n,o),new e.Point(n,a)]},Object.defineProperties(un.prototype,dn);var pn=function(){var t,r,n,a;e.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=(t=this._updateHashUnthrottled.bind(this),r=!1,n=null,a=function(){n=null,r&&(t(),n=setTimeout(a,300),r=!1)},function(){return r=!0,n||a(),n})};pn.prototype.addTo=function(t){return this._map=t,e.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},pn.prototype.remove=function(){return e.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},pn.prototype.getHashString=function(e){var t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),a=Math.pow(10,n),i=Math.round(t.lng*a)/a,o=Math.round(t.lat*a)/a,s=this._map.getBearing(),l=this._map.getPitch(),c="";return c+=e?"#/"+i+"/"+o+"/"+r:"#"+r+"/"+o+"/"+i,(s||l)&&(c+="/"+Math.round(10*s)/10),l&&(c+="/"+Math.round(l)),c},pn.prototype._onHashChange=function(){var t=e.window.location.hash.replace("#","").split("/");return t.length>=3&&(this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:+(t[3]||0),pitch:+(t[4]||0)}),!0)},pn.prototype._updateHashUnthrottled=function(){var t=this.getHashString();try{e.window.history.replaceState(e.window.history.state,"",t)}catch(e){}};var hn=function(t){function n(n,a,i,o){void 0===o&&(o={});var s=r.mousePos(a.getCanvasContainer(),i),l=a.unproject(s);t.call(this,n,e.extend({point:s,lngLat:l,originalEvent:i},o)),this._defaultPrevented=!1,this.target=a}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var a={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,a),n}(e.Event),fn=function(t){function n(n,a,i){var o=r.touchPos(a.getCanvasContainer(),i),s=o.map((function(e){return a.unproject(e)})),l=o.reduce((function(e,t,r,n){return e.add(t.div(n.length))}),new e.Point(0,0)),c=a.unproject(l);t.call(this,n,{points:o,point:l,lngLats:s,lngLat:c,originalEvent:i}),this._defaultPrevented=!1}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var a={defaultPrevented:{configurable:!0}};return n.prototype.preventDefault=function(){this._defaultPrevented=!0},a.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(n.prototype,a),n}(e.Event),mn=function(e){function t(t,r,n){e.call(this,t,{originalEvent:n}),this._defaultPrevented=!1}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={defaultPrevented:{configurable:!0}};return t.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(t.prototype,r),t}(e.Event),gn=function(t){this._map=t,this._el=t.getCanvasContainer(),this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,e.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};gn.prototype.setZoomRate=function(e){this._defaultZoomRate=e},gn.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},gn.prototype.isEnabled=function(){return!!this._enabled},gn.prototype.isActive=function(){return!!this._active},gn.prototype.isZooming=function(){return!!this._zooming},gn.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},gn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},gn.prototype.onWheel=function(t){if(this.isEnabled()){var r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,n=e.browser.now(),a=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(a*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this.isActive()||this._start(t)),t.preventDefault()}},gn.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(e)},gn.prototype._start=function(t){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0,this._map.fire(new e.Event("movestart",{originalEvent:t})),this._map.fire(new e.Event("zoomstart",{originalEvent:t}))),this._finishTimeout&&clearTimeout(this._finishTimeout);var n=r.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},gn.prototype._onScrollFrame=function(){var t=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,a=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==a&&(a=1/a);var i="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(i*a))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,l=this._easing,c=!1;if("wheel"===this._type&&s&&l){var u=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),d=l(u);r.zoom=e.number(s,o,d),u<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):c=!0}else r.zoom=o,c=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new e.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new e.Event("zoom",{originalEvent:this._lastWheelEvent})),c&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._map.fire(new e.Event("zoomend",{originalEvent:t._lastWheelEvent})),t._map.fire(new e.Event("moveend",{originalEvent:t._lastWheelEvent})),delete t._targetZoom}),200))}},gn.prototype._smoothOutEasing=function(t){var r=e.ease;if(this._prevEase){var n=this._prevEase,a=(e.browser.now()-n.start)/n.duration,i=n.easing(a+.01)-n.easing(a),o=.27/Math.sqrt(i*i+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=e.bezier(o,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:r},r};var vn=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=r.clickTolerance||1,e.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};vn.prototype.isEnabled=function(){return!!this._enabled},vn.prototype.isActive=function(){return!!this._active},vn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},vn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},vn.prototype.onMouseDown=function(t){this.isEnabled()&&t.shiftKey&&0===t.button&&(e.window.document.addEventListener("mousemove",this._onMouseMove,!1),e.window.document.addEventListener("keydown",this._onKeyDown,!1),e.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,t),this._active=!0)},vn.prototype._onMouseMove=function(e){var t=r.mousePos(this._el,e);if(!(this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)<this._clickTolerance)){var n=this._startPos;this._lastPos=t,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",e));var a=Math.min(n.x,t.x),i=Math.max(n.x,t.x),o=Math.min(n.y,t.y),s=Math.max(n.y,t.y);r.setTransform(this._box,"translate("+a+"px,"+o+"px)"),this._box.style.width=i-a+"px",this._box.style.height=s-o+"px"}},vn.prototype._onMouseUp=function(t){if(0===t.button){var n=this._startPos,a=r.mousePos(this._el,t);this._finish(),r.suppressClick(),n.x===a.x&&n.y===a.y?this._fireEvent("boxzoomcancel",t):this._map.fitScreenCoordinates(n,a,this._map.getBearing(),{linear:!0}).fire(new e.Event("boxzoomend",{originalEvent:t}))}},vn.prototype._onKeyDown=function(e){27===e.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",e))},vn.prototype._finish=function(){this._active=!1,e.window.document.removeEventListener("mousemove",this._onMouseMove,!1),e.window.document.removeEventListener("keydown",this._onKeyDown,!1),e.window.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},vn.prototype._fireEvent=function(t,r){return this._map.fire(new e.Event(t,{originalEvent:r}))};var yn=e.bezier(0,0,.25,1),bn=function(t,r){this._map=t,this._el=r.element||t.getCanvasContainer(),this._state="disabled",this._button=r.button||"right",this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,e.bindAll(["onMouseDown","_onMouseMove","_onMouseUp","_onBlur","_onDragFrame"],this)};bn.prototype.isEnabled=function(){return"disabled"!==this._state},bn.prototype.isActive=function(){return"active"===this._state},bn.prototype.enable=function(){this.isEnabled()||(this._state="enabled")},bn.prototype.disable=function(){if(this.isEnabled())switch(this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend"),this._pitchWithRotate&&this._fireEvent("pitchend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},bn.prototype.onMouseDown=function(t){if("enabled"===this._state){var n="touchstart"===t.type;if(n)this._startTime=Date.now();else if("right"===this._button){if(this._eventButton=r.mouseButton(t),this._eventButton!==(t.ctrlKey?0:2))return}else{if(t.ctrlKey||0!==r.mouseButton(t))return;this._eventButton=0}r.disableDrag(),n?(e.window.document.addEventListener("touchmove",this._onMouseMove,{capture:!0}),e.window.document.addEventListener("touchend",this._onMouseUp)):(e.window.document.addEventListener("mousemove",this._onMouseMove,{capture:!0}),e.window.document.addEventListener("mouseup",this._onMouseUp)),e.window.addEventListener("blur",this._onBlur),this._state="pending",this._inertia=[[e.browser.now(),this._map.getBearing()]],this._startPos=this._prevPos=this._lastPos=r.mousePos(this._el,t),this._center=this._map.transform.centerPoint,t.preventDefault()}},bn.prototype._onMouseMove=function(e){var t=r.mousePos(this._el,e);this._lastPos.equals(t)||(this._lastMoveEvent=e,this._lastPos=t,"pending"===this._state&&(this._state="active",this._fireEvent("rotatestart",e),this._fireEvent("movestart",e),this._pitchWithRotate&&this._fireEvent("pitchstart",e)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},bn.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var r=this._map.transform,n=this._prevPos,a=this._lastPos,i=.8*(n.x-a.x),o=-.5*(n.y-a.y),s=r.bearing-i,l=r.pitch-o,c=this._inertia,u=c[c.length-1];this._drainInertiaBuffer(),c.push([e.browser.now(),this._map._normalizeBearing(s,u[1])]),r.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",t),r.pitch=l),this._fireEvent("rotate",t),this._fireEvent("move",t),delete this._lastMoveEvent,this._prevPos=this._lastPos}},bn.prototype._onMouseUp=function(e){if("touchend"===e.type&&this._startPos===this._lastPos&&Date.now()-this._startTime<300&&this._el.click(),r.mouseButton(e)===this._eventButton)switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(e);break;case"pending":this._state="enabled",this._unbind()}},bn.prototype._onBlur=function(e){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend",e),this._pitchWithRotate&&this._fireEvent("pitchend",e),this._fireEvent("moveend",e);break;case"pending":this._state="enabled",this._unbind()}},bn.prototype._unbind=function(){e.window.document.removeEventListener("mousemove",this._onMouseMove,{capture:!0}),e.window.document.removeEventListener("mouseup",this._onMouseUp),e.window.document.removeEventListener("touchmove",this._onMouseMove,{capture:!0}),e.window.document.removeEventListener("touchend",this._onMouseUp),e.window.removeEventListener("blur",this._onBlur),r.enableDrag()},bn.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._prevPos,delete this._lastPos},bn.prototype._inertialRotate=function(e){var t=this;this._fireEvent("rotateend",e),this._drainInertiaBuffer();var r=this._map,n=r.getBearing(),a=this._inertia,i=function(){Math.abs(n)<t._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:e}):t._fireEvent("moveend",e),t._pitchWithRotate&&t._fireEvent("pitchend",e)};if(a.length<2)i();else{var o=a[0],s=a[a.length-1],l=a[a.length-2],c=r._normalizeBearing(n,l[1]),u=s[1]-o[1],d=u<0?-1:1,p=(s[0]-o[0])/1e3;if(0!==u&&0!==p){var h=Math.abs(u*(.25/p));h>180&&(h=180);var f=h/180;c+=d*h*(f/2),Math.abs(r._normalizeBearing(c,0))<this._bearingSnap&&(c=r._normalizeBearing(0,c)),r.rotateTo(c,{duration:1e3*f,easing:yn,noMoveStart:!0},{originalEvent:e})}else i()}},bn.prototype._fireEvent=function(t,r){return this._map.fire(new e.Event(t,r?{originalEvent:r}:{}))},bn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,r=e.browser.now();t.length>0&&r-t[0][0]>160;)t.shift()};var _n=e.bezier(0,0,.3,1),xn=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,e.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};xn.prototype.isEnabled=function(){return"disabled"!==this._state},xn.prototype.isActive=function(){return"active"===this._state},xn.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},xn.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},xn.prototype.onMouseDown=function(t){"enabled"===this._state&&(t.ctrlKey||0!==r.mouseButton(t)||(r.addEventListener(e.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(e.window.document,"mouseup",this._onMouseUp),this._start(t)))},xn.prototype.onTouchStart=function(t){"enabled"===this._state&&(t.touches.length>1||(r.addEventListener(e.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(e.window.document,"touchend",this._onTouchEnd),this._start(t)))},xn.prototype._start=function(t){e.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._prevPos=this._lastPos=r.mousePos(this._el,t),this._inertia=[[e.browser.now(),this._startPos]]},xn.prototype._onMove=function(t){t.preventDefault();var n=r.mousePos(this._el,t);this._lastPos.equals(n)||"pending"===this._state&&n.dist(this._mouseDownPos)<this._clickTolerance||(this._lastMoveEvent=t,this._lastPos=n,this._drainInertiaBuffer(),this._inertia.push([e.browser.now(),this._lastPos]),"pending"===this._state&&(this._state="active",this._fireEvent("dragstart",t),this._fireEvent("movestart",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},xn.prototype._onDragFrame=function(){this._frameId=null;var e=this._lastMoveEvent;if(e){var t=this._map.transform;t.setLocationAtPoint(t.pointLocation(this._prevPos),this._lastPos),this._fireEvent("drag",e),this._fireEvent("move",e),this._prevPos=this._lastPos,delete this._lastMoveEvent}},xn.prototype._onMouseUp=function(e){if(0===r.mouseButton(e))switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(e);break;case"pending":this._state="enabled",this._unbind()}},xn.prototype._onTouchEnd=function(e){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._inertialPan(e);break;case"pending":this._state="enabled",this._unbind()}},xn.prototype._onBlur=function(e){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("dragend",e),this._fireEvent("moveend",e);break;case"pending":this._state="enabled",this._unbind()}},xn.prototype._unbind=function(){r.removeEventListener(e.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.removeEventListener(e.window.document,"touchend",this._onTouchEnd),r.removeEventListener(e.window.document,"mousemove",this._onMove,{capture:!0}),r.removeEventListener(e.window.document,"mouseup",this._onMouseUp),r.removeEventListener(e.window,"blur",this._onBlur)},xn.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._prevPos,delete this._mouseDownPos,delete this._lastPos},xn.prototype._inertialPan=function(e){this._fireEvent("dragend",e),this._drainInertiaBuffer();var t=this._inertia;if(t.length<2)this._fireEvent("moveend",e);else{var r=t[t.length-1],n=t[0],a=r[1].sub(n[1]),i=(r[0]-n[0])/1e3;if(0===i||r[1].equals(n[1]))this._fireEvent("moveend",e);else{var o=a.mult(.3/i),s=o.mag();s>1400&&(s=1400,o._unit()._mult(s));var l=s/750,c=o.mult(-l/2);this._map.panBy(c,{duration:1e3*l,easing:_n,noMoveStart:!0},{originalEvent:e})}}},xn.prototype._fireEvent=function(t,r){return this._map.fire(new e.Event(t,r?{originalEvent:r}:{}))},xn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,r=e.browser.now();t.length>0&&r-t[0][0]>160;)t.shift()};var wn=function(t){this._map=t,this._el=t.getCanvasContainer(),e.bindAll(["_onKeyDown"],this)};function kn(e){return e*(2-e)}wn.prototype.isEnabled=function(){return!!this._enabled},wn.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},wn.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},wn.prototype._onKeyDown=function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t=0,r=0,n=0,a=0,i=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),i=-1);break;case 40:e.shiftKey?n=-1:(i=1,e.preventDefault());break;default:return}var o=this._map,s=o.getZoom(),l={duration:300,delayEndEvents:500,easing:kn,zoom:t?Math.round(s)+t*(e.shiftKey?2:1):s,bearing:o.getBearing()+15*r,pitch:o.getPitch()+10*n,offset:[100*-a,100*-i],center:o.getCenter()};o.easeTo(l,{originalEvent:e})}};var Mn=function(t){this._map=t,e.bindAll(["_onDblClick","_onZoomEnd"],this)};Mn.prototype.isEnabled=function(){return!!this._enabled},Mn.prototype.isActive=function(){return!!this._active},Mn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Mn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Mn.prototype.onTouchStart=function(e){var t=this;if(this.isEnabled()&&!(e.points.length>1))if(this._tapped){var r=e.points[0],n=this._tappedPoint;if(n&&n.dist(r)<=30){e.originalEvent.preventDefault();var a=function(){t._tapped&&t._zoom(e),t._map.off("touchcancel",i),t._resetTapped()},i=function(){t._map.off("touchend",a),t._resetTapped()};this._map.once("touchend",a),this._map.once("touchcancel",i)}else this._resetTapped()}else this._tappedPoint=e.points[0],this._tapped=setTimeout((function(){t._tapped=null,t._tappedPoint=null}),300)},Mn.prototype._resetTapped=function(){clearTimeout(this._tapped),this._tapped=null,this._tappedPoint=null},Mn.prototype.onDblClick=function(e){this.isEnabled()&&(e.originalEvent.preventDefault(),this._zoom(e))},Mn.prototype._zoom=function(e){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(e.originalEvent.shiftKey?-1:1),{around:e.lngLat},e)},Mn.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var Tn=e.bezier(0,0,.15,1),Cn=function(t){this._map=t,this._el=t.getCanvasContainer(),e.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};Cn.prototype.isEnabled=function(){return!!this._enabled},Cn.prototype.enable=function(e){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)},Cn.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},Cn.prototype.disableRotation=function(){this._rotationDisabled=!0},Cn.prototype.enableRotation=function(){this._rotationDisabled=!1},Cn.prototype.onStart=function(t){if(this.isEnabled()&&2===t.touches.length){var n=r.mousePos(this._el,t.touches[0]),a=r.mousePos(this._el,t.touches[1]),i=n.add(a).div(2);this._startVec=n.sub(a),this._startAround=this._map.transform.pointLocation(i),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(e.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(e.window.document,"touchend",this._onEnd)}},Cn.prototype._getTouchEventData=function(e){var t=r.mousePos(this._el,e.touches[0]),n=r.mousePos(this._el,e.touches[1]),a=t.sub(n);return{vec:a,center:t.add(n).div(2),scale:a.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*a.angleWith(this._startVec)/Math.PI}},Cn.prototype._onMove=function(t){if(2===t.touches.length){var r=this._getTouchEventData(t),n=r.vec,a=r.scale,i=r.bearing;if(!this._gestureIntent){var o=this._rotationDisabled&&1!==a||Math.abs(1-a)>.15;Math.abs(i)>10?this._gestureIntent="rotate":o&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new e.Event(this._gestureIntent+"start",{originalEvent:t})),this._map.fire(new e.Event("movestart",{originalEvent:t})),this._startVec=n)}this._lastTouchEvent=t,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),t.preventDefault()}},Cn.prototype._onTouchFrame=function(){this._frameId=null;var t=this._gestureIntent;if(t){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var n=this._getTouchEventData(this._lastTouchEvent),a=n.center,i=n.bearing,o=n.scale,s=r.pointLocation(a),l=r.locationPoint(s);"rotate"===t&&(r.bearing=this._startBearing+i),r.zoom=r.scaleZoom(this._startScale*o),r.setLocationAtPoint(this._startAround,l),this._map.fire(new e.Event(t,{originalEvent:this._lastTouchEvent})),this._map.fire(new e.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([e.browser.now(),o,a])}},Cn.prototype._onEnd=function(t){r.removeEventListener(e.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(e.window.document,"touchend",this._onEnd);var n=this._gestureIntent,a=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,n){this._map.fire(new e.Event(n+"end",{originalEvent:t})),this._drainInertiaBuffer();var i=this._inertia,o=this._map;if(i.length<2)o.snapToNorth({},{originalEvent:t});else{var s=i[i.length-1],l=i[0],c=o.transform.scaleZoom(a*s[1]),u=o.transform.scaleZoom(a*l[1]),d=c-u,p=(s[0]-l[0])/1e3,h=s[2];if(0!==p&&c!==u){var f=.15*d/p;Math.abs(f)>2.5&&(f=f>0?2.5:-2.5);var m=1e3*Math.abs(f/(12*.15)),g=c+f*m/2e3;g<0&&(g=0),o.easeTo({zoom:g,duration:m,easing:Tn,around:this._aroundCenter?o.getCenter():o.unproject(h),noMoveStart:!0},{originalEvent:t})}else o.snapToNorth({},{originalEvent:t})}}},Cn.prototype._drainInertiaBuffer=function(){for(var t=this._inertia,r=e.browser.now();t.length>2&&r-t[0][0]>160;)t.shift()};var Sn={scrollZoom:gn,boxZoom:vn,dragRotate:bn,dragPan:xn,keyboard:wn,doubleClickZoom:Mn,touchZoomRotate:Cn},Ln=function(t){function r(r,n){t.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=n.bearingSnap,e.bindAll(["_renderFrameCallback"],this)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new e.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(e,t){return this.jumpTo({center:e},t)},r.prototype.panBy=function(t,r,n){return t=e.Point.convert(t).mult(-1),this.panTo(this.transform.center,e.extend({offset:t},r),n)},r.prototype.panTo=function(t,r,n){return this.easeTo(e.extend({center:t},r),n)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(e,t){return this.jumpTo({zoom:e},t),this},r.prototype.zoomTo=function(t,r,n){return this.easeTo(e.extend({zoom:t},r),n)},r.prototype.zoomIn=function(e,t){return this.zoomTo(this.getZoom()+1,e,t),this},r.prototype.zoomOut=function(e,t){return this.zoomTo(this.getZoom()-1,e,t),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(e,t){return this.jumpTo({bearing:e},t),this},r.prototype.rotateTo=function(t,r,n){return this.easeTo(e.extend({bearing:t},r),n)},r.prototype.resetNorth=function(t,r){return this.rotateTo(0,e.extend({duration:1e3},t),r),this},r.prototype.resetNorthPitch=function(t,r){return this.easeTo(e.extend({bearing:0,pitch:0,duration:1e3},t),r),this},r.prototype.snapToNorth=function(e,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,t):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(e,t){return this.jumpTo({pitch:e},t),this},r.prototype.cameraForBounds=function(t,r){return t=e.LngLatBounds.convert(t),this._cameraForBoxAndBearing(t.getNorthWest(),t.getSouthEast(),0,r)},r.prototype._cameraForBoxAndBearing=function(t,r,n,a){if("number"==typeof(a=e.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},a)).padding){var i=a.padding;a.padding={top:i,bottom:i,right:i,left:i}}if(e.deepEqual(Object.keys(a.padding).sort((function(e,t){return e<t?-1:e>t?1:0})),["bottom","left","right","top"])){var o=this.transform,s=o.project(e.LngLat.convert(t)),l=o.project(e.LngLat.convert(r)),c=s.rotate(-n*Math.PI/180),u=l.rotate(-n*Math.PI/180),d=new e.Point(Math.max(c.x,u.x),Math.max(c.y,u.y)),p=new e.Point(Math.min(c.x,u.x),Math.min(c.y,u.y)),h=d.sub(p),f=(o.width-a.padding.left-a.padding.right)/h.x,m=(o.height-a.padding.top-a.padding.bottom)/h.y;if(!(m<0||f<0)){var g=Math.min(o.scaleZoom(o.scale*Math.min(f,m)),a.maxZoom),v=e.Point.convert(a.offset),y=(a.padding.left-a.padding.right)/2,b=(a.padding.top-a.padding.bottom)/2,_=new e.Point(v.x+y,v.y+b).mult(o.scale/o.zoomScale(g));return{center:o.unproject(s.add(l).div(2).sub(_)),zoom:g,bearing:n}}e.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else e.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(e,t,r){return this._fitInternal(this.cameraForBounds(e,t),t,r)},r.prototype.fitScreenCoordinates=function(t,r,n,a,i){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(e.Point.convert(t)),this.transform.pointLocation(e.Point.convert(r)),n,a),a,i)},r.prototype._fitInternal=function(t,r,n){return t?(r=e.extend(t,r)).linear?this.easeTo(r,n):this.flyTo(r,n):this},r.prototype.jumpTo=function(t,r){this.stop();var n=this.transform,a=!1,i=!1,o=!1;return"zoom"in t&&n.zoom!==+t.zoom&&(a=!0,n.zoom=+t.zoom),void 0!==t.center&&(n.center=e.LngLat.convert(t.center)),"bearing"in t&&n.bearing!==+t.bearing&&(i=!0,n.bearing=+t.bearing),"pitch"in t&&n.pitch!==+t.pitch&&(o=!0,n.pitch=+t.pitch),this.fire(new e.Event("movestart",r)).fire(new e.Event("move",r)),a&&this.fire(new e.Event("zoomstart",r)).fire(new e.Event("zoom",r)).fire(new e.Event("zoomend",r)),i&&this.fire(new e.Event("rotatestart",r)).fire(new e.Event("rotate",r)).fire(new e.Event("rotateend",r)),o&&this.fire(new e.Event("pitchstart",r)).fire(new e.Event("pitch",r)).fire(new e.Event("pitchend",r)),this.fire(new e.Event("moveend",r))},r.prototype.easeTo=function(t,r){var n=this;this.stop(),(!1===(t=e.extend({offset:[0,0],duration:500,easing:e.ease},t)).animate||e.browser.prefersReducedMotion)&&(t.duration=0);var a=this.transform,i=this.getZoom(),o=this.getBearing(),s=this.getPitch(),l="zoom"in t?+t.zoom:i,c="bearing"in t?this._normalizeBearing(t.bearing,o):o,u="pitch"in t?+t.pitch:s,d=a.centerPoint.add(e.Point.convert(t.offset)),p=a.pointLocation(d),h=e.LngLat.convert(t.center||p);this._normalizeCenter(h);var f,m,g=a.project(p),v=a.project(h).sub(g),y=a.zoomScale(l-i);return t.around&&(f=e.LngLat.convert(t.around),m=a.locationPoint(f)),this._zooming=l!==i,this._rotating=o!==c,this._pitching=u!==s,this._prepareEase(r,t.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease((function(t){if(n._zooming&&(a.zoom=e.number(i,l,t)),n._rotating&&(a.bearing=e.number(o,c,t)),n._pitching&&(a.pitch=e.number(s,u,t)),f)a.setLocationAtPoint(f,m);else{var p=a.zoomScale(a.zoom-i),h=l>i?Math.min(2,y):Math.max(.5,y),b=Math.pow(h,1-t),_=a.unproject(g.add(v.mult(t*b)).mult(p));a.setLocationAtPoint(a.renderWorldCopies?_.wrap():_,d)}n._fireMoveEvents(r)}),(function(){t.delayEndEvents?n._easeEndTimeoutID=setTimeout((function(){return n._afterEase(r)}),t.delayEndEvents):n._afterEase(r)}),t),this},r.prototype._prepareEase=function(t,r){this._moving=!0,r||this.fire(new e.Event("movestart",t)),this._zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&this.fire(new e.Event("pitchstart",t))},r.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},r.prototype._afterEase=function(t){var r=this._zooming,n=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new e.Event("zoomend",t)),n&&this.fire(new e.Event("rotateend",t)),a&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))},r.prototype.flyTo=function(t,r){var n=this;if(e.browser.prefersReducedMotion){var a=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(a,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var i=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c="zoom"in t?e.clamp(+t.zoom,i.minZoom,i.maxZoom):o,u="bearing"in t?this._normalizeBearing(t.bearing,s):s,d="pitch"in t?+t.pitch:l,p=i.zoomScale(c-o),h=i.centerPoint.add(e.Point.convert(t.offset)),f=i.pointLocation(h),m=e.LngLat.convert(t.center||f);this._normalizeCenter(m);var g=i.project(f),v=i.project(m).sub(g),y=t.curve,b=Math.max(i.width,i.height),_=b/p,x=v.mag();if("minZoom"in t){var w=e.clamp(Math.min(t.minZoom,o,c),i.minZoom,i.maxZoom),k=b/i.zoomScale(w-o);y=Math.sqrt(k/x*2)}var M=y*y;function T(e){var t=(_*_-b*b+(e?-1:1)*M*M*x*x)/(2*(e?_:b)*M*x);return Math.log(Math.sqrt(t*t+1)-t)}function C(e){return(Math.exp(e)-Math.exp(-e))/2}function S(e){return(Math.exp(e)+Math.exp(-e))/2}var L=T(0),A=function(e){return S(L)/S(L+y*e)},E=function(e){return b*((S(L)*(C(t=L+y*e)/S(t))-C(L))/M)/x;var t},D=(T(1)-L)/y;if(Math.abs(x)<1e-6||!isFinite(D)){if(Math.abs(b-_)<1e-6)return this.easeTo(t,r);var I=_<b?-1:1;D=Math.abs(Math.log(_/b))/y,E=function(){return 0},A=function(e){return Math.exp(I*y*e)}}if("duration"in t)t.duration=+t.duration;else{var P="screenSpeed"in t?+t.screenSpeed/y:+t.speed;t.duration=1e3*D/P}return t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==u,this._pitching=d!==l,this._prepareEase(r,!1),this._ease((function(t){var a=t*D,p=1/A(a);i.zoom=1===t?c:o+i.scaleZoom(p),n._rotating&&(i.bearing=e.number(s,u,t)),n._pitching&&(i.pitch=e.number(l,d,t));var f=1===t?m:i.unproject(g.add(v.mult(E(a))).mult(p));i.setLocationAtPoint(i.renderWorldCopies?f.wrap():f,h),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),t),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var e=this._onEaseEnd;delete this._onEaseEnd,e.call(this)}return this},r.prototype._ease=function(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.browser.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(t,r){t=e.wrap(t,-180,180);var n=Math.abs(t-r);return Math.abs(t-360-r)<n&&(t-=360),Math.abs(t+360-r)<n&&(t+=360),t},r.prototype._normalizeCenter=function(e){var t=this.transform;if(t.renderWorldCopies&&!t.lngRange){var r=e.lng-t.center.lng;e.lng+=r>180?-360:r<-180?360:0}},r}(e.Evented),An=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};An.prototype.getDefaultPosition=function(){return"bottom-right"},An.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},An.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},An.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var n=r.reduce((function(e,t,n){return t.value&&(e+=t.key+"="+t.value+(n<r.length-1?"&":"")),e}),"?");t.href=e.config.FEEDBACK_URL+"/"+n+(this._map._hash?this._map._hash.getHashString(!0):""),t.rel="noopener nofollow"}},An.prototype._updateData=function(e){!e||"metadata"!==e.sourceDataType&&"style"!==e.dataType||(this._updateAttributions(),this._updateEditLink())},An.prototype._updateAttributions=function(){if(this._map.style){var e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((function(e){return"string"!=typeof e?"":e}))):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){var t=this._map.style.stylesheet;this.styleOwner=t.owner,this.styleId=t.id}var r=this._map.style.sourceCaches;for(var n in r){var a=r[n];if(a.used){var i=a.getSource();i.attribution&&e.indexOf(i.attribution)<0&&e.push(i.attribution)}}e.sort((function(e,t){return e.length-t.length}));var o=(e=e.filter((function(t,r){for(var n=r+1;n<e.length;n++)if(e[n].indexOf(t)>=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,e.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},An.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var En=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};En.prototype.onAdd=function(e){this._map=e,this._container=r.create("div","mapboxgl-ctrl");var t=r.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label","Mapbox logo"),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},En.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},En.prototype.getDefaultPosition=function(){return"bottom-left"},En.prototype._updateLogo=function(e){e&&"metadata"!==e.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},En.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},En.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Dn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Dn.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Dn.prototype.remove=function(e){for(var t=this._currentlyRunning,r=0,n=t?this._queue.concat(t):this._queue;r<n.length;r+=1){var a=n[r];if(a.id===e)return void(a.cancelled=!0)}},Dn.prototype.run=function(){var e=this._currentlyRunning=this._queue;this._queue=[];for(var t=0,r=e;t<r.length;t+=1){var n=r[t];if(!n.cancelled&&(n.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Dn.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var In=e.window.HTMLImageElement,Pn=e.window.HTMLElement,On={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,clickTolerance:3,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Rn=function(n){function a(t){var a=this;if(null!=(t=e.extend({},On,t)).minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than minZoom");var i=new un(t.minZoom,t.maxZoom,t.renderWorldCopies);if(n.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Dn,this._controls=[],this._mapId=e.uniqueId(),this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Pn))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return a._update(!1)})),this.on("moveend",(function(){return a._update(!1)})),this.on("zoom",(function(){return a._update(!0)})),void 0!==e.window&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1)),function(e,t){var n=e.getCanvasContainer(),a=null,i=!1,o=null;for(var s in Sn)e[s]=new Sn[s](e,t),t.interactive&&t[s]&&e[s].enable(t[s]);r.addEventListener(n,"mouseout",(function(t){e.fire(new hn("mouseout",e,t))})),r.addEventListener(n,"mousedown",(function(a){i=!0,o=r.mousePos(n,a);var s=new hn("mousedown",e,a);e.fire(s),s.defaultPrevented||(t.interactive&&!e.doubleClickZoom.isActive()&&e.stop(),e.boxZoom.onMouseDown(a),e.boxZoom.isActive()||e.dragPan.isActive()||e.dragRotate.onMouseDown(a),e.boxZoom.isActive()||e.dragRotate.isActive()||e.dragPan.onMouseDown(a))})),r.addEventListener(n,"mouseup",(function(t){var r=e.dragRotate.isActive();a&&!r&&e.fire(new hn("contextmenu",e,a)),a=null,i=!1,e.fire(new hn("mouseup",e,t))})),r.addEventListener(n,"mousemove",(function(t){if(!e.dragPan.isActive()&&!e.dragRotate.isActive()){for(var r=t.target;r&&r!==n;)r=r.parentNode;r===n&&e.fire(new hn("mousemove",e,t))}})),r.addEventListener(n,"mouseover",(function(t){for(var r=t.target;r&&r!==n;)r=r.parentNode;r===n&&e.fire(new hn("mouseover",e,t))})),r.addEventListener(n,"touchstart",(function(r){var n=new fn("touchstart",e,r);e.fire(n),n.defaultPrevented||(t.interactive&&e.stop(),e.boxZoom.isActive()||e.dragRotate.isActive()||e.dragPan.onTouchStart(r),e.touchZoomRotate.onStart(r),e.doubleClickZoom.onTouchStart(n))}),{passive:!1}),r.addEventListener(n,"touchmove",(function(t){e.fire(new fn("touchmove",e,t))}),{passive:!1}),r.addEventListener(n,"touchend",(function(t){e.fire(new fn("touchend",e,t))})),r.addEventListener(n,"touchcancel",(function(t){e.fire(new fn("touchcancel",e,t))})),r.addEventListener(n,"click",(function(a){var i=r.mousePos(n,a);(!o||i.equals(o)||i.dist(o)<t.clickTolerance)&&e.fire(new hn("click",e,a))})),r.addEventListener(n,"dblclick",(function(t){var r=new hn("dblclick",e,t);e.fire(r),r.defaultPrevented||e.doubleClickZoom.onDblClick(r)})),r.addEventListener(n,"contextmenu",(function(t){var r=e.dragRotate.isActive();i||r?i&&(a=t):e.fire(new hn("contextmenu",e,t)),(e.dragRotate.isEnabled()||e.listens("contextmenu"))&&t.preventDefault()})),r.addEventListener(n,"wheel",(function(r){t.interactive&&e.stop();var n=new mn("wheel",e,r);e.fire(n),n.defaultPrevented||e.scrollZoom.onWheel(r)}),{passive:!1})}(this,t),this._hash=t.hash&&(new pn).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new An({customAttribution:t.customAttribution})),this.addControl(new En,t.logoPosition),this.on("style.load",(function(){a.transform.unmodified&&a.jumpTo(a.style.stylesheet)})),this.on("data",(function(t){a._update("style"===t.dataType),a.fire(new e.Event(t.dataType+"data",t))})),this.on("dataloading",(function(t){a.fire(new e.Event(t.dataType+"dataloading",t))}))}n&&(a.__proto__=n),a.prototype=Object.create(n&&n.prototype),a.prototype.constructor=a;var i={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return a.prototype._getMapId=function(){return this._mapId},a.prototype.addControl=function(t,r){if(void 0===r&&t.getDefaultPosition&&(r=t.getDefaultPosition()),void 0===r&&(r="top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=t.onAdd(this);this._controls.push(t);var a=this._controlPositions[r];return-1!==r.indexOf("bottom")?a.insertBefore(n,a.firstChild):a.appendChild(n),this},a.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(t);return r>-1&&this._controls.splice(r,1),t.onRemove(this),this},a.prototype.resize=function(t){var r=this._containerDimensions(),n=r[0],a=r[1];return this._resizeCanvas(n,a),this.transform.resize(n,a),this.painter.resize(n,a),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t)).fire(new e.Event("resize",t)).fire(new e.Event("moveend",t)),this},a.prototype.getBounds=function(){return this.transform.getBounds()},a.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},a.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},a.prototype.setMinZoom=function(e){if((e=null==e?0:e)>=0&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()<e&&this.setZoom(e),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},a.prototype.getMinZoom=function(){return this.transform.minZoom},a.prototype.setMaxZoom=function(e){if((e=null==e?22:e)>=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},a.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},a.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},a.prototype.getMaxZoom=function(){return this.transform.maxZoom},a.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},a.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},a.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},a.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},a.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},a.prototype.on=function(e,t,r){var a=this;if(void 0===r)return n.prototype.on.call(this,e,t);var i=function(){var n;if("mouseenter"===e||"mouseover"===e){var i=!1;return{layer:t,listener:r,delegates:{mousemove:function(n){var o=a.getLayer(t)?a.queryRenderedFeatures(n.point,{layers:[t]}):[];o.length?i||(i=!0,r.call(a,new hn(e,a,n.originalEvent,{features:o}))):i=!1},mouseout:function(){i=!1}}}}if("mouseleave"===e||"mouseout"===e){var o=!1;return{layer:t,listener:r,delegates:{mousemove:function(n){(a.getLayer(t)?a.queryRenderedFeatures(n.point,{layers:[t]}):[]).length?o=!0:o&&(o=!1,r.call(a,new hn(e,a,n.originalEvent)))},mouseout:function(t){o&&(o=!1,r.call(a,new hn(e,a,t.originalEvent)))}}}}return{layer:t,listener:r,delegates:(n={},n[e]=function(e){var n=a.getLayer(t)?a.queryRenderedFeatures(e.point,{layers:[t]}):[];n.length&&(e.features=n,r.call(a,e),delete e.features)},n)}}();for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(o,i.delegates[o]);return this},a.prototype.off=function(e,t,r){if(void 0===r)return n.prototype.off.call(this,e,t);if(this._delegatedListeners&&this._delegatedListeners[e])for(var a=this._delegatedListeners[e],i=0;i<a.length;i++){var o=a[i];if(o.layer===t&&o.listener===r){for(var s in o.delegates)this.off(s,o.delegates[s]);return a.splice(i,1),this}}return this},a.prototype.queryRenderedFeatures=function(t,r){if(!this.style)return[];var n;if(void 0!==r||void 0===t||t instanceof e.Point||Array.isArray(t)||(r=t,t=void 0),r=r||{},(t=t||[[0,0],[this.transform.width,this.transform.height]])instanceof e.Point||"number"==typeof t[0])n=[e.Point.convert(t)];else{var a=e.Point.convert(t[0]),i=e.Point.convert(t[1]);n=[a,new e.Point(i.x,a.y),i,new e.Point(a.x,i.y),a]}return this.style.queryRenderedFeatures(n,r,this.transform)},a.prototype.querySourceFeatures=function(e,t){return this.style.querySourceFeatures(e,t)},a.prototype.setStyle=function(t,r){return!1!==(r=e.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&t?(this._diffStyle(t,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(t,r))},a.prototype._updateStyle=function(e,t){return this.style&&(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new Ft(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},a.prototype._diffStyle=function(t,r){var n=this;if("string"==typeof t){var a=this._requestManager.normalizeStyleURL(t),i=this._requestManager.transformRequest(a,e.ResourceType.Style);e.getJSON(i,(function(t,a){t?n.fire(new e.ErrorEvent(t)):a&&n._updateDiff(a,r)}))}else"object"==typeof t&&this._updateDiff(t,r)},a.prototype._updateDiff=function(t,r){try{this.style.setState(t)&&this._update(!0)}catch(n){e.warnOnce("Unable to perform style diff: "+(n.message||n.error||n)+".  Rebuilding the style from scratch."),this._updateStyle(t,r)}},a.prototype.getStyle=function(){if(this.style)return this.style.serialize()},a.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():e.warnOnce("There is no style added to the map.")},a.prototype.addSource=function(e,t){return this.style.addSource(e,t),this._update(!0)},a.prototype.isSourceLoaded=function(t){var r=this.style&&this.style.sourceCaches[t];if(void 0!==r)return r.loaded();this.fire(new e.ErrorEvent(new Error("There is no source with ID '"+t+"'")))},a.prototype.areTilesLoaded=function(){var e=this.style&&this.style.sourceCaches;for(var t in e){var r=e[t]._tiles;for(var n in r){var a=r[n];if("loaded"!==a.state&&"errored"!==a.state)return!1}}return!0},a.prototype.addSourceType=function(e,t,r){return this.style.addSourceType(e,t,r)},a.prototype.removeSource=function(e){return this.style.removeSource(e),this._update(!0)},a.prototype.getSource=function(e){return this.style.getSource(e)},a.prototype.addImage=function(t,r,n){void 0===n&&(n={});var a=n.pixelRatio;void 0===a&&(a=1);var i=n.sdf;if(void 0===i&&(i=!1),r instanceof In){var o=e.browser.getImageData(r),s=o.width,l=o.height,c=o.data;this.style.addImage(t,{data:new e.RGBAImage({width:s,height:l},c),pixelRatio:a,sdf:i,version:0})}else{if(void 0===r.width||void 0===r.height)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var u=r.width,d=r.height,p=r.data,h=r;this.style.addImage(t,{data:new e.RGBAImage({width:u,height:d},new Uint8Array(p)),pixelRatio:a,sdf:i,version:0,userImage:h}),h.onAdd&&h.onAdd(this,t)}},a.prototype.updateImage=function(t,r){var n=this.style.getImage(t);if(!n)return this.fire(new e.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var a=r instanceof In?e.browser.getImageData(r):r,i=a.width,o=a.height,s=a.data;if(void 0===i||void 0===o)return this.fire(new e.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(i!==n.data.width||o!==n.data.height)return this.fire(new e.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var l=!(r instanceof In);n.data.replace(s,l),this.style.updateImage(t,n)},a.prototype.hasImage=function(t){return t?!!this.style.getImage(t):(this.fire(new e.ErrorEvent(new Error("Missing required image id"))),!1)},a.prototype.removeImage=function(e){this.style.removeImage(e)},a.prototype.loadImage=function(t,r){e.getImage(this._requestManager.transformRequest(t,e.ResourceType.Image),r)},a.prototype.listImages=function(){return this.style.listImages()},a.prototype.addLayer=function(e,t){return this.style.addLayer(e,t),this._update(!0)},a.prototype.moveLayer=function(e,t){return this.style.moveLayer(e,t),this._update(!0)},a.prototype.removeLayer=function(e){return this.style.removeLayer(e),this._update(!0)},a.prototype.getLayer=function(e){return this.style.getLayer(e)},a.prototype.setFilter=function(e,t,r){return void 0===r&&(r={}),this.style.setFilter(e,t,r),this._update(!0)},a.prototype.setLayerZoomRange=function(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)},a.prototype.getFilter=function(e){return this.style.getFilter(e)},a.prototype.setPaintProperty=function(e,t,r,n){return void 0===n&&(n={}),this.style.setPaintProperty(e,t,r,n),this._update(!0)},a.prototype.getPaintProperty=function(e,t){return this.style.getPaintProperty(e,t)},a.prototype.setLayoutProperty=function(e,t,r,n){return void 0===n&&(n={}),this.style.setLayoutProperty(e,t,r,n),this._update(!0)},a.prototype.getLayoutProperty=function(e,t){return this.style.getLayoutProperty(e,t)},a.prototype.setLight=function(e,t){return void 0===t&&(t={}),this.style.setLight(e,t),this._update(!0)},a.prototype.getLight=function(){return this.style.getLight()},a.prototype.setFeatureState=function(e,t){return this.style.setFeatureState(e,t),this._update()},a.prototype.removeFeatureState=function(e,t){return this.style.removeFeatureState(e,t),this._update()},a.prototype.getFeatureState=function(e){return this.style.getFeatureState(e)},a.prototype.getContainer=function(){return this._container},a.prototype.getCanvasContainer=function(){return this._canvasContainer},a.prototype.getCanvas=function(){return this._canvas},a.prototype._containerDimensions=function(){var e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]},a.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==e.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&e.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},a.prototype._setupContainer=function(){var e=this._container;e.classList.add("mapboxgl-map"),(this._missingCSSCanary=r.create("div","mapboxgl-canary",e)).style.visibility="hidden",this._detectMissingCSS();var t=this._canvasContainer=r.create("div","mapboxgl-canvas-container",e);this._interactive&&t.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",t),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var n=this._containerDimensions();this._resizeCanvas(n[0],n[1]);var a=this._controlContainer=r.create("div","mapboxgl-control-container",e),i=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(e){i[e]=r.create("div","mapboxgl-ctrl-"+e,a)}))},a.prototype._resizeCanvas=function(t,r){var n=e.window.devicePixelRatio||1;this._canvas.width=n*t,this._canvas.height=n*r,this._canvas.style.width=t+"px",this._canvas.style.height=r+"px"},a.prototype._setupPainter=function(){var r=e.extend({},t.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),n=this._canvas.getContext("webgl",r)||this._canvas.getContext("experimental-webgl",r);n?(this.painter=new on(n,this.transform),e.webpSupported.testSupport(n)):this.fire(new e.ErrorEvent(new Error("Failed to initialize WebGL")))},a.prototype._contextLost=function(t){t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.Event("webglcontextlost",{originalEvent:t}))},a.prototype._contextRestored=function(t){this._setupPainter(),this.resize(),this._update(),this.fire(new e.Event("webglcontextrestored",{originalEvent:t}))},a.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},a.prototype._update=function(e){return this.style?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this},a.prototype._requestRenderFrame=function(e){return this._update(),this._renderTaskQueue.add(e)},a.prototype._cancelRenderFrame=function(e){this._renderTaskQueue.remove(e)},a.prototype._render=function(){this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run();var t=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,n=e.browser.now();this.style.zoomHistory.update(r,n);var a=new e.EvaluationParameters(r,{now:n,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),i=a.crossFadingFactor();1===i&&i===this._crossFadingFactor||(t=!0,this._crossFadingFactor=i),this.style.update(a)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration}),this.fire(new e.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.Event("load"))),this.style&&(this.style.hasTransitions()||t)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.Event("idle")),this},a.prototype.remove=function(){this._hash&&this._hash.remove();for(var t=0,r=this._controls;t<r.length;t+=1)r[t].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.setStyle(null),void 0!==e.window&&(e.window.removeEventListener("resize",this._onWindowResize,!1),e.window.removeEventListener("online",this._onWindowOnline,!1));var n=this.painter.context.gl.getExtension("WEBGL_lose_context");n&&n.loseContext(),Fn(this._canvasContainer),Fn(this._controlContainer),Fn(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this.fire(new e.Event("remove"))},a.prototype.triggerRepaint=function(){var t=this;this.style&&!this._frame&&(this._frame=e.browser.frame((function(){t._frame=null,t._render()})))},a.prototype._onWindowOnline=function(){this._update()},a.prototype._onWindowResize=function(){this._trackResize&&this.resize()._update()},i.showTileBoundaries.get=function(){return!!this._showTileBoundaries},i.showTileBoundaries.set=function(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())},i.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},i.showCollisionBoxes.set=function(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())},i.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},i.showOverdrawInspector.set=function(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())},i.repaint.get=function(){return!!this._repaint},i.repaint.set=function(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())},i.vertices.get=function(){return!!this._vertices},i.vertices.set=function(e){this._vertices=e,this._update()},a.prototype._setCacheLimits=function(t,r){e.setCacheLimits(t,r)},i.version.get=function(){return e.version},Object.defineProperties(a.prototype,i),a}(Ln);function Fn(e){e.parentNode&&e.parentNode.removeChild(e)}var zn={showCompass:!0,showZoom:!0,visualizePitch:!1},Nn=function(t){var n=this;this.options=e.extend({},zn,t),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this.options.showZoom&&(e.bindAll(["_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom in",(function(){return n._map.zoomIn()})),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom out",(function(){return n._map.zoomOut()}))),this.options.showCompass&&(e.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset bearing to north",(function(){n.options.visualizePitch?n._map.resetNorthPitch():n._map.resetNorth()})),this._compassArrow=r.create("span","mapboxgl-ctrl-compass-arrow",this._compass))};function jn(t,r,n){if(t=new e.LngLat(t.lng,t.lat),r){var a=new e.LngLat(t.lng-360,t.lat),i=new e.LngLat(t.lng+360,t.lat),o=n.locationPoint(t).distSqr(r);n.locationPoint(a).distSqr(r)<o?t=a:n.locationPoint(i).distSqr(r)<o&&(t=i)}for(;Math.abs(t.lng-n.center.lng)>180;){var s=n.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}Nn.prototype._updateZoomButtons=function(){var e=this._map.getZoom();e===this._map.getMaxZoom()?this._zoomInButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomInButton.classList.remove("mapboxgl-ctrl-icon-disabled"),e===this._map.getMinZoom()?this._zoomOutButton.classList.add("mapboxgl-ctrl-icon-disabled"):this._zoomOutButton.classList.remove("mapboxgl-ctrl-icon-disabled")},Nn.prototype._rotateCompassArrow=function(){var e=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=e},Nn.prototype.onAdd=function(e){return this._map=e,this.options.showZoom&&(this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new bn(e,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),r.addEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.enable()),this._container},Nn.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),r.removeEventListener(this._compass,"touchstart",this._handler.onMouseDown,{passive:!1}),this._handler.disable(),delete this._handler),delete this._map},Nn.prototype._createButton=function(e,t,n){var a=r.create("button",e,this._container);return a.type="button",a.title=t,a.setAttribute("aria-label",t),a.addEventListener("click",n),a};var Bn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Yn(e,t,r){var n=e.classList;for(var a in Bn)n.remove("mapboxgl-"+r+"-anchor-"+a);n.add("mapboxgl-"+r+"-anchor-"+t)}var Hn,Vn=function(t){function n(n,a){if(t.call(this),(n instanceof e.window.HTMLElement||a)&&(n=e.extend({element:n},a)),e.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._draggable=n&&n.draggable||!1,this._state="inactive",n&&n.element)this._element=n.element,this._offset=e.Point.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var i=r.createNS("http://www.w3.org/2000/svg","svg");i.setAttributeNS(null,"display","block"),i.setAttributeNS(null,"height","41px"),i.setAttributeNS(null,"width","27px"),i.setAttributeNS(null,"viewBox","0 0 27 41");var o=r.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");for(var c=0,u=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];c<u.length;c+=1){var d=u[c],p=r.createNS("http://www.w3.org/2000/svg","ellipse");p.setAttributeNS(null,"opacity","0.04"),p.setAttributeNS(null,"cx","10.5"),p.setAttributeNS(null,"cy","5.80029008"),p.setAttributeNS(null,"rx",d.rx),p.setAttributeNS(null,"ry",d.ry),l.appendChild(p)}var h=r.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"fill",this._color);var f=r.createNS("http://www.w3.org/2000/svg","path");f.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),h.appendChild(f);var m=r.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var g=r.createNS("http://www.w3.org/2000/svg","path");g.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),m.appendChild(g);var v=r.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(6.0, 7.0)"),v.setAttributeNS(null,"fill","#FFFFFF");var y=r.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"transform","translate(8.0, 8.0)");var b=r.createNS("http://www.w3.org/2000/svg","circle");b.setAttributeNS(null,"fill","#000000"),b.setAttributeNS(null,"opacity","0.25"),b.setAttributeNS(null,"cx","5.5"),b.setAttributeNS(null,"cy","5.5"),b.setAttributeNS(null,"r","5.4999962");var _=r.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#FFFFFF"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962"),y.appendChild(b),y.appendChild(_),s.appendChild(l),s.appendChild(h),s.appendChild(m),s.appendChild(v),s.appendChild(y),i.appendChild(s),this._element.appendChild(i),this._offset=e.Point.convert(n&&n.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(function(e){e.preventDefault()})),Yn(this._element,this._anchor,"marker"),this._popup=null}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this.remove(),this._map=e,e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},n.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},n.prototype.getElement=function(){return this._element},n.prototype.setPopup=function(e){if(this._popup&&(this._popup.remove(),this._popup=null),e){if(!("offset"in e.options)){var t=Math.sqrt(Math.pow(13.5,2)/2);e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},n.prototype._onMapClick=function(e){var t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()},n.prototype.getPopup=function(){return this._popup},n.prototype.togglePopup=function(){var e=this._popup;return e?(e.isOpen()?e.remove():e.addTo(this._map),this):this},n.prototype._update=function(e){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=jn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),e&&"moveend"!==e.type||(this._pos=this._pos.round()),r.setTransform(this._element,Bn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px)"))},n.prototype.getOffset=function(){return this._offset},n.prototype.setOffset=function(t){return this._offset=e.Point.convert(t),this._update(),this},n.prototype._onMove=function(t){this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new e.Event("dragstart"))),this.fire(new e.Event("drag"))},n.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new e.Event("dragend")),this._state="inactive"},n.prototype._addDragHandler=function(e){this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},n.prototype.setDraggable=function(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},n.prototype.isDraggable=function(){return this._draggable},n}(e.Evented),Un={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},Wn=function(t){function n(r){t.call(this),this.options=e.extend({},Un,r),e.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(t){var n;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),n=this._setupUI,void 0!==Hn?n(Hn):void 0!==e.window.navigator.permissions?e.window.navigator.permissions.query({name:"geolocation"}).then((function(e){Hn="denied"!==e.state,n(Hn)})):(Hn=!!e.window.navigator.geolocation,n(Hn)),this._container},n.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),r.remove(this._container),this._map=void 0},n.prototype._onSuccess=function(t){if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()},n.prototype._updateCamera=function(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,a=this._map.getBearing(),i=e.extend({bearing:a},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),i,{geolocateSource:!0})},n.prototype._updateMarker=function(e){e?this._userLocationDotMarker.setLngLat([e.coords.longitude,e.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},n.prototype._onError=function(t){if(this.options.trackUserLocation)if(1===t.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(t){var n=this;!1!==t?(this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Vn(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(t){t.geolocateSource||"ACTIVE_LOCK"!==n._watchState||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new e.Event("trackuserlocationend")))}))):e.warnOnce("Geolocation support is not available, the GeolocateControl will not be visible.")},n.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},n}(e.Evented),Gn={maxWidth:100,unit:"metric"},qn=function(t){this.options=e.extend({},Gn,t),e.bindAll(["_onMove","setUnit"],this)};function Kn(e,t,r){var n,a,i,o,s,l,c=r&&r.maxWidth||100,u=e._container.clientHeight/2,d=(n=e.unproject([0,u]),a=e.unproject([c,u]),i=Math.PI/180,o=n.lat*i,s=a.lat*i,l=Math.sin(o)*Math.sin(s)+Math.cos(o)*Math.cos(s)*Math.cos((a.lng-n.lng)*i),6371e3*Math.acos(Math.min(l,1)));if(r&&"imperial"===r.unit){var p=3.2808*d;p>5280?Xn(t,c,p/5280,"mi"):Xn(t,c,p,"ft")}else r&&"nautical"===r.unit?Xn(t,c,d/1852,"nm"):Xn(t,c,d,"m")}function Xn(e,t,r,n){var a,i,o,s=(a=r,(i=Math.pow(10,(""+Math.floor(a)).length-1))*(o=(o=a/i)>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(o))),l=s/r;"m"===n&&s>=1e3&&(s/=1e3,n="km"),e.style.width=t*l+"px",e.innerHTML=s+n}qn.prototype.getDefaultPosition=function(){return"bottom-left"},qn.prototype._onMove=function(){Kn(this._map,this._container,this.options)},qn.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},qn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},qn.prototype.setUnit=function(e){this.options.unit=e,Kn(this._map,this._container,this.options)};var Zn=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};Zn.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Zn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Zn.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Zn.prototype._setupUI=function(){(this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer)).type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Zn.prototype._updateTitle=function(){var e=this._isFullscreen()?"Exit fullscreen":"Enter fullscreen";this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},Zn.prototype._isFullscreen=function(){return this._fullscreen},Zn.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"),this._updateTitle())},Zn.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Jn={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},$n=function(t){function n(r){t.call(this),this.options=e.extend(Object.create(Jn),r),e.bindAll(["_update","_onClickClose","remove"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){var r=this;return this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",(function(e){r._update(e.point)})),this._map.on("mouseup",(function(e){r._update(e.point)})),this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),this._map.off("remove",this.remove),this._map.off("mousemove"),delete this._map),this.fire(new e.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove"),this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){var e=this;return this._trackPointer=!0,this._pos=null,this._map&&(this._map.off("move",this._update),this._map.on("mousemove",(function(t){e._update(t.point)})),this._map.on("drag",(function(t){e._update(t.point)})),this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},n.prototype.setHTML=function(t){var r,n=e.window.document.createDocumentFragment(),a=e.window.document.createElement("body");for(a.innerHTML=t;r=a.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container.style.maxWidth},n.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},n.prototype.setDOMContent=function(e){return this._createContent(),this._content.appendChild(e),this._update(),this},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClickClose))},n.prototype._update=function(t){var n=this,a=this._lngLat||this._trackPointer;if(this._map&&a&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(e){return n._container.classList.add(e)}))),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=jn(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||t)){var i=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat),o=this.options.anchor,s=function t(r){if(r){if("number"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new e.Point(0,0),top:new e.Point(0,r),"top-left":new e.Point(n,n),"top-right":new e.Point(-n,n),bottom:new e.Point(0,-r),"bottom-left":new e.Point(n,-n),"bottom-right":new e.Point(-n,-n),left:new e.Point(r,0),right:new e.Point(-r,0)}}if(r instanceof e.Point||Array.isArray(r)){var a=e.Point.convert(r);return{center:a,top:a,"top-left":a,"top-right":a,bottom:a,"bottom-left":a,"bottom-right":a,left:a,right:a}}return{center:e.Point.convert(r.center||[0,0]),top:e.Point.convert(r.top||[0,0]),"top-left":e.Point.convert(r["top-left"]||[0,0]),"top-right":e.Point.convert(r["top-right"]||[0,0]),bottom:e.Point.convert(r.bottom||[0,0]),"bottom-left":e.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(r["bottom-right"]||[0,0]),left:e.Point.convert(r.left||[0,0]),right:e.Point.convert(r.right||[0,0])}}return t(new e.Point(0,0))}(this.options.offset);if(!o){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=i.y+s.bottom.y<u?["top"]:i.y>this._map.transform.height-u?["bottom"]:[],i.x<c/2?l.push("left"):i.x>this._map.transform.width-c/2&&l.push("right"),o=0===l.length?"bottom":l.join("-")}var d=i.add(s[o]).round();r.setTransform(this._container,Bn[o]+" translate("+d.x+"px,"+d.y+"px)"),Yn(this._container,o,"popup")}},n.prototype._onClickClose=function(){this.remove()},n}(e.Evented),Qn={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,Map:Rn,NavigationControl:Nn,GeolocateControl:Wn,AttributionControl:An,ScaleControl:qn,FullscreenControl:Zn,Popup:$n,Marker:Vn,Style:Ft,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Oe.workerCount},set workerCount(e){Oe.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return Qn})),r}))},{}],428:[function(e,t,r){"use strict";t.exports=function(e){for(var t=1<<e+1,r=new Array(t),n=0;n<t;++n)r[n]=i(e,n);return r};var n=e("convex-hull");function a(e,t,r){for(var n=new Array(e),a=0;a<e;++a)n[a]=0,a===t&&(n[a]+=.5),a===r&&(n[a]+=.5);return n}function i(e,t){if(0===t||t===(1<<e+1)-1)return[];for(var r=[],i=[],o=0;o<=e;++o)if(t&1<<o){r.push(a(e,o-1,o-1)),i.push(null);for(var s=0;s<=e;++s)~t&1<<s&&(r.push(a(e,o-1,s-1)),i.push([o,s]))}var l=n(r),c=[];e:for(o=0;o<l.length;++o){var u=l[o],d=[];for(s=0;s<u.length;++s){if(!i[u[s]])continue e;d.push(i[u[s]].slice())}c.push(d)}return c}},{"convex-hull":131}],429:[function(e,t,r){var n=e("./normalize"),a=e("gl-mat4/create"),i=e("gl-mat4/clone"),o=e("gl-mat4/determinant"),s=e("gl-mat4/invert"),l=e("gl-mat4/transpose"),c={length:e("gl-vec3/length"),normalize:e("gl-vec3/normalize"),dot:e("gl-vec3/dot"),cross:e("gl-vec3/cross")},u=a(),d=a(),p=[0,0,0,0],h=[[0,0,0],[0,0,0],[0,0,0]],f=[0,0,0];function m(e,t,r,n,a){e[0]=t[0]*n+r[0]*a,e[1]=t[1]*n+r[1]*a,e[2]=t[2]*n+r[2]*a}t.exports=function(e,t,r,a,g,v){if(t||(t=[0,0,0]),r||(r=[0,0,0]),a||(a=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!n(u,e))return!1;if(i(d,u),d[3]=0,d[7]=0,d[11]=0,d[15]=1,Math.abs(o(d)<1e-8))return!1;var y,b,_,x,w,k,M,T=u[3],C=u[7],S=u[11],L=u[12],A=u[13],E=u[14],D=u[15];if(0!==T||0!==C||0!==S){if(p[0]=T,p[1]=C,p[2]=S,p[3]=D,!s(d,d))return!1;l(d,d),y=g,_=d,x=(b=p)[0],w=b[1],k=b[2],M=b[3],y[0]=_[0]*x+_[4]*w+_[8]*k+_[12]*M,y[1]=_[1]*x+_[5]*w+_[9]*k+_[13]*M,y[2]=_[2]*x+_[6]*w+_[10]*k+_[14]*M,y[3]=_[3]*x+_[7]*w+_[11]*k+_[15]*M}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=L,t[1]=A,t[2]=E,function(e,t){e[0][0]=t[0],e[0][1]=t[1],e[0][2]=t[2],e[1][0]=t[4],e[1][1]=t[5],e[1][2]=t[6],e[2][0]=t[8],e[2][1]=t[9],e[2][2]=t[10]}(h,u),r[0]=c.length(h[0]),c.normalize(h[0],h[0]),a[0]=c.dot(h[0],h[1]),m(h[1],h[1],h[0],1,-a[0]),r[1]=c.length(h[1]),c.normalize(h[1],h[1]),a[0]/=r[1],a[1]=c.dot(h[0],h[2]),m(h[2],h[2],h[0],1,-a[1]),a[2]=c.dot(h[1],h[2]),m(h[2],h[2],h[1],1,-a[2]),r[2]=c.length(h[2]),c.normalize(h[2],h[2]),a[1]/=r[2],a[2]/=r[2],c.cross(f,h[1],h[2]),c.dot(h[0],f)<0)for(var I=0;I<3;I++)r[I]*=-1,h[I][0]*=-1,h[I][1]*=-1,h[I][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+h[0][0]-h[1][1]-h[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-h[0][0]+h[1][1]-h[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-h[0][0]-h[1][1]+h[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+h[0][0]+h[1][1]+h[2][2],0)),h[2][1]>h[1][2]&&(v[0]=-v[0]),h[0][2]>h[2][0]&&(v[1]=-v[1]),h[1][0]>h[0][1]&&(v[2]=-v[2]),!0}},{"./normalize":430,"gl-mat4/clone":261,"gl-mat4/create":262,"gl-mat4/determinant":263,"gl-mat4/invert":267,"gl-mat4/transpose":278,"gl-vec3/cross":335,"gl-vec3/dot":340,"gl-vec3/length":350,"gl-vec3/normalize":357}],430:[function(e,t,r){t.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var n=1/r,a=0;a<16;a++)e[a]=t[a]*n;return!0}},{}],431:[function(e,t,r){var n=e("gl-vec3/lerp"),a=e("mat4-recompose"),i=e("mat4-decompose"),o=e("gl-mat4/determinant"),s=e("quat-slerp"),l=d(),c=d(),u=d();function d(){return{translate:p(),scale:p(1),skew:p(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function p(e){return[e||0,e||0,e||0]}t.exports=function(e,t,r,d){if(0===o(t)||0===o(r))return!1;var p=i(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),h=i(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!p||!h||(n(u.translate,l.translate,c.translate,d),n(u.skew,l.skew,c.skew,d),n(u.scale,l.scale,c.scale,d),n(u.perspective,l.perspective,c.perspective,d),s(u.quaternion,l.quaternion,c.quaternion,d),a(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},{"gl-mat4/determinant":263,"gl-vec3/lerp":351,"mat4-decompose":429,"mat4-recompose":432,"quat-slerp":484}],432:[function(e,t,r){var n={identity:e("gl-mat4/identity"),translate:e("gl-mat4/translate"),multiply:e("gl-mat4/multiply"),create:e("gl-mat4/create"),scale:e("gl-mat4/scale"),fromRotationTranslation:e("gl-mat4/fromRotationTranslation")},a=(n.create(),n.create());t.exports=function(e,t,r,i,o,s){return n.identity(e),n.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],n.identity(a),0!==i[2]&&(a[9]=i[2],n.multiply(e,e,a)),0!==i[1]&&(a[9]=0,a[8]=i[1],n.multiply(e,e,a)),0!==i[0]&&(a[8]=0,a[4]=i[0],n.multiply(e,e,a)),n.scale(e,e,r),e}},{"gl-mat4/create":262,"gl-mat4/fromRotationTranslation":265,"gl-mat4/identity":266,"gl-mat4/multiply":269,"gl-mat4/scale":276,"gl-mat4/translate":277}],433:[function(e,t,r){"use strict";t.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}},{}],434:[function(e,t,r){"use strict";var n=e("binary-search-bounds"),a=e("mat4-interpolate"),i=e("gl-mat4/invert"),o=e("gl-mat4/rotateX"),s=e("gl-mat4/rotateY"),l=e("gl-mat4/rotateZ"),c=e("gl-mat4/lookAt"),u=e("gl-mat4/translate"),d=(e("gl-mat4/scale"),e("gl-vec3/normalize")),p=[0,0,0];function h(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}t.exports=function(e){return new h((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var f=h.prototype;f.recalcMatrix=function(e){var t=this._time,r=n.le(t,e),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=t[r+1]-t[r],p=(l=16*r,this.prevMatrix),h=!0;for(c=0;c<16;++c)p[c]=s[l++];var f=this.nextMatrix;for(c=0;c<16;++c)f[c]=s[l++],h=h&&p[c]===f[c];if(u<1e-6||h)for(c=0;c<16;++c)o[c]=p[c];else a(o,p,f,(e-t[r])/u)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],d(m,m);var g=this.computedInverse;i(g,o);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;var b=this.computedCenter,_=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)b[c]=v[c]-o[2+4*c]*_}},f.idle=function(e){if(!(e<this.lastT())){for(var t=this._components,r=t.length-16,n=0;n<16;++n)t.push(t[r++]);this._time.push(e)}},f.flush=function(e){var t=n.gt(this._time,e)-2;t<0||(this._time.splice(0,t),this._components.splice(0,16*t))},f.lastT=function(){return this._time[this._time.length-1]},f.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||this.computedEye,r=r||p,n=n||this.computedUp,this.setMatrix(e,c(this.computedMatrix,t,r,n));for(var a=0,i=0;i<3;++i)a+=Math.pow(r[i]-t[i],2);a=Math.log(Math.sqrt(a)),this.computedRadius[0]=a},f.rotate=function(e,t,r,n){this.recalcMatrix(e);var a=this.computedInverse;t&&s(a,a,t),r&&o(a,a,r),n&&l(a,a,n),this.setMatrix(e,i(this.computedMatrix,a))};var m=[0,0,0];f.pan=function(e,t,r,n){m[0]=-(t||0),m[1]=-(r||0),m[2]=-(n||0),this.recalcMatrix(e);var a=this.computedInverse;u(a,a,m),this.setMatrix(e,i(a,a))},f.translate=function(e,t,r,n){m[0]=t||0,m[1]=r||0,m[2]=n||0,this.recalcMatrix(e);var a=this.computedMatrix;u(a,a,m),this.setMatrix(e,a)},f.setMatrix=function(e,t){if(!(e<this.lastT())){this._time.push(e);for(var r=0;r<16;++r)this._components.push(t[r])}},f.setDistance=function(e,t){this.computedRadius[0]=t},f.setDistanceLimits=function(e,t){var r=this._limits;r[0]=e,r[1]=t},f.getDistanceLimits=function(e){var t=this._limits;return e?(e[0]=t[0],e[1]=t[1],e):t}},{"binary-search-bounds":92,"gl-mat4/invert":267,"gl-mat4/lookAt":268,"gl-mat4/rotateX":273,"gl-mat4/rotateY":274,"gl-mat4/rotateZ":275,"gl-mat4/scale":276,"gl-mat4/translate":277,"gl-vec3/normalize":357,"mat4-interpolate":431}],435:[function(e,t,r){"use strict";t.exports=function(e){var t=e.length;if(t<3){for(var r=new Array(t),a=0;a<t;++a)r[a]=a;return 2===t&&e[0][0]===e[1][0]&&e[0][1]===e[1][1]?[0]:r}var i=new Array(t);for(a=0;a<t;++a)i[a]=a;i.sort((function(t,r){var n=e[t][0]-e[r][0];return n||e[t][1]-e[r][1]}));var o=[i[0],i[1]],s=[i[0],i[1]];for(a=2;a<t;++a){for(var l=i[a],c=e[l],u=o.length;u>1&&n(e[o[u-2]],e[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var d=0,p=(a=0,o.length);a<p;++a)r[d++]=o[a];for(var h=s.length-2;h>0;--h)r[d++]=s[h];return r};var n=e("robust-orientation")[3]},{"robust-orientation":508}],436:[function(e,t,r){"use strict";t.exports=function(e,t){t||(t=e,e=window);var r=0,a=0,i=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==a||u!==i||l(s))&&(r=0|e,a=c||0,i=u||0,t&&t(r,a,i,o))}function u(e){c(0,e)}function d(){(r||a||i||o.shift||o.alt||o.meta||o.control)&&(a=i=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function p(e){l(e)&&t&&t(r,a,i,o)}function h(e){0===n.buttons(e)?c(0,e):c(r,e)}function f(e){c(r|n.buttons(e),e)}function m(e){c(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",h),e.addEventListener("mousedown",f),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",d),e.addEventListener("keyup",p),e.addEventListener("keydown",p),e.addEventListener("keypress",p),e!==window&&(window.addEventListener("blur",d),window.addEventListener("keyup",p),window.addEventListener("keydown",p),window.addEventListener("keypress",p)))}g();var v={element:e};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",h),e.removeEventListener("mousedown",f),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",d),e.removeEventListener("keyup",p),e.removeEventListener("keydown",p),e.removeEventListener("keypress",p),e!==window&&(window.removeEventListener("blur",d),window.removeEventListener("keyup",p),window.removeEventListener("keydown",p),window.removeEventListener("keypress",p)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return i},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),v};var n=e("mouse-event")},{"mouse-event":438}],437:[function(e,t,r){var n={left:0,top:0};t.exports=function(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var a,i=e.clientX||0,o=e.clientY||0,s=(a=t)===window||a===document||a===document.body?n:a.getBoundingClientRect();return r[0]=i-s.left,r[1]=o-s.top,r}},{}],438:[function(e,t,r){"use strict";function n(e){return e.target||e.srcElement||window}r.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<<t-1}else if("button"in e){var t;if(1===(t=e.button))return 4;if(2===t)return 2;if(t>=0)return 1<<t}}return 0},r.element=n,r.x=function(e){if("object"==typeof e){if("offsetX"in e)return e.offsetX;var t=n(e).getBoundingClientRect();return e.clientX-t.left}return 0},r.y=function(e){if("object"==typeof e){if("offsetY"in e)return e.offsetY;var t=n(e).getBoundingClientRect();return e.clientY-t.top}return 0}},{}],439:[function(e,t,r){"use strict";var n=e("to-px");t.exports=function(e,t,r){"function"==typeof e&&(r=!!t,t=e,e=window);var a=n("ex",e),i=function(e){r&&e.preventDefault();var n=e.deltaX||0,i=e.deltaY||0,o=e.deltaZ||0,s=1;switch(e.deltaMode){case 1:s=a;break;case 2:s=window.innerHeight}if(i*=s,o*=s,(n*=s)||i||o)return t(n,i,o,e)};return e.addEventListener("wheel",i),i}},{"to-px":537}],440:[function(e,t,r){"use strict";var n=e("typedarray-pool");function a(e){return"a"+e}function i(e){return"d"+e}function o(e,t){return"c"+e+"_"+t}function s(e){return"s"+e}function l(e,t){return"t"+e+"_"+t}function c(e){return"o"+e}function u(e){return"x"+e}function d(e){return"p"+e}function p(e,t){return"d"+e+"_"+t}function h(e){return"i"+e}function f(e,t){return"u"+e+"_"+t}function m(e){return"b"+e}function g(e){return"y"+e}function v(e){return"e"+e}function y(e){return"v"+e}t.exports=function(e){function t(e){throw new Error("ndarray-extract-contour: "+e)}"object"!=typeof e&&t("Must specify arguments");var r=e.order;Array.isArray(r)||t("Must specify order");var C=e.arrayArguments||1;C<1&&t("Must have at least one array argument");var S=e.scalarArguments||0;S<0&&t("Scalar arg count must be > 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var L=e.getters||[],A=new Array(C),E=0;E<C;++E)L.indexOf(E)>=0?A[E]=!0:A[E]=!1;return function(e,t,r,C,S,L){var A=L.length,E=S.length;if(E<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var D="extractContour"+S.join("_"),I=[],P=[],O=[],R=0;R<A;++R)O.push(a(R));for(R=0;R<C;++R)O.push(u(R));for(R=0;R<E;++R)P.push(s(R)+"="+a(0)+".shape["+R+"]|0");for(R=0;R<A;++R){P.push(i(R)+"="+a(R)+".data",c(R)+"="+a(R)+".offset|0");for(var F=0;F<E;++F)P.push(l(R,F)+"="+a(R)+".stride["+F+"]|0")}for(R=0;R<A;++R)for(P.push(d(R)+"="+c(R)),P.push(o(R,0)),F=1;F<1<<E;++F){for(var z=[],N=0;N<E;++N)F&1<<N&&z.push("-"+l(R,N));P.push(p(R,F)+"=("+z.join("")+")|0"),P.push(o(R,F)+"=0")}for(R=0;R<A;++R)for(F=0;F<E;++F){var j=[l(R,S[F])];F>0&&j.push(l(R,S[F-1])+"*"+s(S[F-1])),P.push(f(R,S[F])+"=("+j.join("-")+")|0")}for(R=0;R<E;++R)P.push(h(R)+"=0");P.push(x+"=0");var B=["2"];for(R=E-2;R>=0;--R)B.push(s(S[R]));for(P.push(w+"=("+B.join("*")+")|0",_+"=mallocUint32("+w+")",b+"=mallocUint32("+w+")",k+"=0"),P.push(m(0)+"=0"),F=1;F<1<<E;++F){var Y=[],H=[];for(N=0;N<E;++N)F&1<<N&&(0===H.length?Y.push("1"):Y.unshift(H.join("*"))),H.push(s(S[N]));var V="";Y[0].indexOf(s(S[E-2]))<0&&(V="-");var U=T(E,F,S);P.push(v(U)+"=(-"+Y.join("-")+")|0",g(U)+"=("+V+Y.join("-")+")|0",m(U)+"=0")}function W(e,t){I.push("for(",h(S[e]),"=",t,";",h(S[e]),"<",s(S[e]),";","++",h(S[e]),"){")}function G(e){for(var t=0;t<A;++t)I.push(d(t),"+=",f(t,S[e]),";");I.push("}")}function q(){for(var e=1;e<1<<E;++e)I.push(M,"=",v(e),";",v(e),"=",g(e),";",g(e),"=",M,";")}P.push(y(0)+"=0",M+"=0"),function e(t,r){if(t<0)!function(e){for(var t=0;t<A;++t)L[t]?I.push(o(t,0),"=",i(t),".get(",d(t),");"):I.push(o(t,0),"=",i(t),"[",d(t),"];");var r=[];for(t=0;t<A;++t)r.push(o(t,0));for(t=0;t<C;++t)r.push(u(t));I.push(m(0),"=",_,"[",k,"]=phase(",r.join(),");");for(var n=1;n<1<<E;++n)I.push(m(n),"=",_,"[",k,"+",v(n),"];");var a=[];for(n=1;n<1<<E;++n)a.push("("+m(0)+"!=="+m(n)+")");I.push("if(",a.join("||"),"){");var s=[];for(t=0;t<E;++t)s.push(h(t));for(t=0;t<A;++t)for(s.push(o(t,0)),n=1;n<1<<E;++n)L[t]?I.push(o(t,n),"=",i(t),".get(",d(t),"+",p(t,n),");"):I.push(o(t,n),"=",i(t),"[",d(t),"+",p(t,n),"];"),s.push(o(t,n));for(t=0;t<1<<E;++t)s.push(m(t));for(t=0;t<C;++t)s.push(u(t));I.push("vertex(",s.join(),");",y(0),"=",b,"[",k,"]=",x,"++;");var l=(1<<E)-1,c=m(l);for(n=0;n<E;++n)if(0==(e&~(1<<n))){for(var f=l^1<<n,g=m(f),w=[],M=f;M>0;M=M-1&f)w.push(b+"["+k+"+"+v(M)+"]");for(w.push(y(0)),M=0;M<A;++M)1&n?w.push(o(M,l),o(M,f)):w.push(o(M,f),o(M,l));for(1&n?w.push(c,g):w.push(g,c),M=0;M<C;++M)w.push(u(M));I.push("if(",c,"!==",g,"){","face(",w.join(),")}")}I.push("}",k,"+=1;")}(r);else{!function(e){for(var t=e-1;t>=0;--t)W(t,0);var r=[];for(t=0;t<A;++t)L[t]?r.push(i(t)+".get("+d(t)+")"):r.push(i(t)+"["+d(t)+"]");for(t=0;t<C;++t)r.push(u(t));for(I.push(_,"[",k,"++]=phase(",r.join(),");"),t=0;t<e;++t)G(t);for(var n=0;n<A;++n)I.push(d(n),"+=",f(n,S[e]),";")}(t),I.push("if(",s(S[t]),">0){",h(S[t]),"=1;"),e(t-1,r|1<<S[t]);for(var n=0;n<A;++n)I.push(d(n),"+=",f(n,S[t]),";");t===E-1&&(I.push(k,"=0;"),q()),W(t,2),e(t-1,r),t===E-1&&(I.push("if(",h(S[E-1]),"&1){",k,"=0;}"),q()),G(t),I.push("}")}}(E-1,0),I.push("freeUint32(",b,");freeUint32(",_,");");var K=["'use strict';","function ",D,"(",O.join(),"){","var ",P.join(),";",I.join(""),"}","return ",D].join("");return new Function("vertex","face","phase","mallocUint32","freeUint32",K)(e,t,r,n.mallocUint32,n.freeUint32)}(e.vertex,e.cell,e.phase,S,r,A)};var b="V",_="P",x="N",w="Q",k="X",M="T";function T(e,t,r){for(var n=0,a=0;a<e;++a)t&1<<a&&(n|=1<<r[a]);return n}},{"typedarray-pool":543}],441:[function(e,t,r){"use strict";var n=e("cwise/lib/wrapper")({args:["index","array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_1_arg1_=_inline_1_arg2_.apply(void 0,_inline_1_arg0_)}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"cwise",blockSize:64});t.exports=function(e,t){return n(e,t),e}},{"cwise/lib/wrapper":150}],442:[function(e,t,r){"use strict";t.exports=function(e,t,r){if(Array.isArray(r)){if(r.length!==t.dimension)throw new Error("ndarray-gradient: invalid boundary conditions")}else r=n(t.dimension,"string"==typeof r?r:"clamp");if(e.dimension!==t.dimension+1)throw new Error("ndarray-gradient: output dimension must be +1 input dimension");if(e.shape[t.dimension]!==t.dimension)throw new Error("ndarray-gradient: output shape must match input shape");for(var a=0;a<t.dimension;++a)if(e.shape[a]!==t.shape[a])throw new Error("ndarray-gradient: shape mismatch");return 0===t.size?e:t.dimension<=0?(e.set(0),e):function(e){var t=e.join();if(v=o[t])return v;var r=e.length,n=["function gradient(dst,src){var s=src.shape.slice();"];function a(t){for(var a=r-t.length,i=[],o=[],s=[],l=0;l<r;++l)t.indexOf(l+1)>=0?s.push("0"):t.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),i.push("1"),o.push("s["+l+"]-2"));var c=".lo("+i.join()+").hi("+o.join()+")";if(0===i.length&&(c=""),a>0){for(n.push("if(1"),l=0;l<r;++l)t.indexOf(l+1)>=0||t.indexOf(-(l+1))>=0||n.push("&&s[",l,"]>2");for(n.push("){grad",a,"(src.pick(",s.join(),")",c),l=0;l<r;++l)t.indexOf(l+1)>=0||t.indexOf(-(l+1))>=0||n.push(",dst.pick(",s.join(),",",l,")",c);n.push(");")}for(l=0;l<t.length;++l){var u=Math.abs(t[l])-1,d="dst.pick("+s.join()+","+u+")"+c;switch(e[u]){case"clamp":var p=s.slice(),h=s.slice();t[l]<0?p[u]="s["+u+"]-2":h[u]="1",0===a?n.push("if(s[",u,"]>1){dst.set(",s.join(),",",u,",0.5*(src.get(",p.join(),")-src.get(",h.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>1){diff(",d,",src.pick(",p.join(),")",c,",src.pick(",h.join(),")",c,");}else{zero(",d,");};");break;case"mirror":0===a?n.push("dst.set(",s.join(),",",u,",0);"):n.push("zero(",d,");");break;case"wrap":var f=s.slice(),m=s.slice();t[l]<0?(f[u]="s["+u+"]-2",m[u]="0"):(f[u]="s["+u+"]-1",m[u]="1"),0===a?n.push("if(s[",u,"]>2){dst.set(",s.join(),",",u,",0.5*(src.get(",f.join(),")-src.get(",m.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>2){diff(",d,",src.pick(",f.join(),")",c,",src.pick(",m.join(),")",c,");}else{zero(",d,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}a>0&&n.push("};")}for(var s=0;s<1<<r;++s){for(var d=[],p=0;p<r;++p)s&1<<p&&d.push(p+1);for(var h=0;h<1<<d.length;++h){var f=d.slice();for(p=0;p<d.length;++p)h&1<<p&&(f[p]=-f[p]);a(f)}}n.push("return dst;};return gradient");var m=["diff","zero"],g=[l,c];for(s=1;s<=r;++s)m.push("grad"+s),g.push(u(s));m.push(n.join(""));var v=Function.apply(void 0,m).apply(void 0,g);return i[t]=v,v}(r)(e,t)};var n=e("dup"),a=e("cwise-compiler"),i={},o={},s={body:"",args:[],thisVars:[],localVars:[]},l=a({args:["array","array","array"],pre:s,post:s,body:{args:[{name:"out",lvalue:!0,rvalue:!1,count:1},{name:"left",lvalue:!1,rvalue:!0,count:1},{name:"right",lvalue:!1,rvalue:!0,count:1}],body:"out=0.5*(left-right)",thisVars:[],localVars:[]},funcName:"cdiff"}),c=a({args:["array"],pre:s,post:s,body:{args:[{name:"out",lvalue:!0,rvalue:!1,count:1}],body:"out=0",thisVars:[],localVars:[]},funcName:"zero"});function u(e){if(e in i)return i[e];for(var t=[],r=0;r<e;++r)t.push("out",r,"s=0.5*(inp",r,"l-inp",r,"r);");var o=["array"],l=["junk"];for(r=0;r<e;++r){o.push("array"),l.push("out"+r+"s");var c=n(e);c[r]=-1,o.push({array:0,offset:c.slice()}),c[r]=1,o.push({array:0,offset:c.slice()}),l.push("inp"+r+"l","inp"+r+"r")}return i[e]=a({args:o,pre:s,post:s,body:{body:t.join(""),args:l.map((function(e){return{name:e,lvalue:0===e.indexOf("out"),rvalue:0===e.indexOf("inp"),count:"junk"!==e|0}})),thisVars:[],localVars:[]},funcName:"fdTemplate"+e})}},{"cwise-compiler":147,dup:171}],443:[function(e,t,r){"use strict";var n=e("ndarray-warp"),a=e("gl-matrix-invert");t.exports=function(e,t,r){var i=t.dimension,o=a([],r);return n(e,t,(function(e,t){for(var r=0;r<i;++r){e[r]=o[(i+1)*i+r];for(var n=0;n<i;++n)e[r]+=o[(i+1)*n+r]*t[n]}var a=o[(i+1)*(i+1)-1];for(n=0;n<i;++n)a+=o[(i+1)*n+i]*t[n];var s=1/a;for(r=0;r<i;++r)e[r]*=s;return e})),e}},{"gl-matrix-invert":279,"ndarray-warp":450}],444:[function(e,t,r){"use strict";function n(e,t){var r=Math.floor(t),n=t-r,a=0<=r&&r<e.shape[0],i=0<=r+1&&r+1<e.shape[0];return(1-n)*(a?+e.get(r):0)+n*(i?+e.get(r+1):0)}function a(e,t,r){var n=Math.floor(t),a=t-n,i=0<=n&&n<e.shape[0],o=0<=n+1&&n+1<e.shape[0],s=Math.floor(r),l=r-s,c=0<=s&&s<e.shape[1],u=0<=s+1&&s+1<e.shape[1],d=i&&c?e.get(n,s):0,p=i&&u?e.get(n,s+1):0;return(1-l)*((1-a)*d+a*(o&&c?e.get(n+1,s):0))+l*((1-a)*p+a*(o&&u?e.get(n+1,s+1):0))}function i(e,t,r,n){var a=Math.floor(t),i=t-a,o=0<=a&&a<e.shape[0],s=0<=a+1&&a+1<e.shape[0],l=Math.floor(r),c=r-l,u=0<=l&&l<e.shape[1],d=0<=l+1&&l+1<e.shape[1],p=Math.floor(n),h=n-p,f=0<=p&&p<e.shape[2],m=0<=p+1&&p+1<e.shape[2],g=o&&u&&f?e.get(a,l,p):0,v=o&&d&&f?e.get(a,l+1,p):0,y=s&&u&&f?e.get(a+1,l,p):0,b=s&&d&&f?e.get(a+1,l+1,p):0,_=o&&u&&m?e.get(a,l,p+1):0,x=o&&d&&m?e.get(a,l+1,p+1):0;return(1-h)*((1-c)*((1-i)*g+i*y)+c*((1-i)*v+i*b))+h*((1-c)*((1-i)*_+i*(s&&u&&m?e.get(a+1,l,p+1):0))+c*((1-i)*x+i*(s&&d&&m?e.get(a+1,l+1,p+1):0)))}function o(e){var t,r,n=0|e.shape.length,a=new Array(n),i=new Array(n),o=new Array(n),s=new Array(n);for(t=0;t<n;++t)r=+arguments[t+1],a[t]=Math.floor(r),i[t]=r-a[t],o[t]=0<=a[t]&&a[t]<e.shape[t],s[t]=0<=a[t]+1&&a[t]+1<e.shape[t];var l,c,u,d=0;e:for(t=0;t<1<<n;++t){for(c=1,u=e.offset,l=0;l<n;++l)if(t&1<<l){if(!s[l])continue e;c*=i[l],u+=e.stride[l]*(a[l]+1)}else{if(!o[l])continue e;c*=1-i[l],u+=e.stride[l]*a[l]}d+=c*e.data[u]}return d}t.exports=function(e,t,r,s){switch(e.shape.length){case 0:return 0;case 1:return n(e,t);case 2:return a(e,t,r);case 3:return i(e,t,r,s);default:return o.apply(void 0,arguments)}},t.exports.d1=n,t.exports.d2=a,t.exports.d3=i},{}],445:[function(e,t,r){"use strict";var n=e("cwise-compiler"),a={body:"",args:[],thisVars:[],localVars:[]};function i(e){if(!e)return a;for(var t=0;t<e.args.length;++t){var r=e.args[t];e.args[t]=0===t?{name:r,lvalue:!0,rvalue:!!e.rvalue,count:e.count||1}:{name:r,lvalue:!1,rvalue:!0,count:1}}return e.thisVars||(e.thisVars=[]),e.localVars||(e.localVars=[]),e}function o(e){for(var t=[],r=0;r<e.args.length;++r)t.push("a"+r);return new Function("P",["return function ",e.funcName,"_ndarrayops(",t.join(","),") {P(",t.join(","),");return a0}"].join(""))(function(e){return n({args:e.args,pre:i(e.pre),body:i(e.body),post:i(e.proc),funcName:e.funcName})}(e))}var s={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};!function(){for(var e in s){var t=s[e];r[e]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),r[e+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+t+"=b"},rvalue:!0,funcName:e+"eq"}),r[e+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),r[e+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+t+"=s"},rvalue:!0,funcName:e+"seq"})}}();var l={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var e in l){var t=l[e];r[e]=o({args:["array","array"],body:{args:["a","b"],body:"a="+t+"b"},funcName:e}),r[e+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+t+"a"},rvalue:!0,count:2,funcName:e+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var e in c){var t=c[e];r[e]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),r[e+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),r[e+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+t+"b"},rvalue:!0,count:2,funcName:e+"eq"}),r[e+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+t+"s"},rvalue:!0,count:2,funcName:e+"seq"})}}();var u=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var e=0;e<u.length;++e){var t=u[e];r[t]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:t}),r[t+"eq"]=o({args:["array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"})}}();var d=["max","min","atan2","pow"];!function(){for(var e=0;e<d.length;++e){var t=d[e];r[t]=o({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t}),r[t+"s"]=o({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t+"s"}),r[t+"eq"]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=o({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"seq"})}}();var p=["atan2","pow"];!function(){for(var e=0;e<p.length;++e){var t=p[e];r[t+"op"]=o({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"op"}),r[t+"ops"]=o({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"ops"}),r[t+"opeq"]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opeq"}),r[t+"opseq"]=o({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opseq"})}}(),r.any=n({args:["array"],pre:a,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),r.all=n({args:["array"],pre:a,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),r.sum=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),r.prod=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),r.norm2squared=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),r.norm2=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),r.norminf=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=n({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=n({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.argmin=n({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.argmax=n({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=n({args:["array","array"],pre:a,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":147}],446:[function(e,t,r){"use strict";var n=e("ndarray"),a=e("./doConvert.js");t.exports=function(e,t){for(var r=[],i=e,o=1;Array.isArray(i);)r.push(i.length),o*=i.length,i=i[0];return 0===r.length?n():(t||(t=n(new Float64Array(o),r)),a(t,e),t)}},{"./doConvert.js":447,ndarray:451}],447:[function(e,t,r){t.exports=e("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":147}],448:[function(e,t,r){"use strict";var n=e("typedarray-pool"),a=32;function i(e){switch(e){case"uint8":return[n.mallocUint8,n.freeUint8];case"uint16":return[n.mallocUint16,n.freeUint16];case"uint32":return[n.mallocUint32,n.freeUint32];case"int8":return[n.mallocInt8,n.freeInt8];case"int16":return[n.mallocInt16,n.freeInt16];case"int32":return[n.mallocInt32,n.freeInt32];case"float32":return[n.mallocFloat,n.freeFloat];case"float64":return[n.mallocDouble,n.freeDouble];default:return null}}function o(e){for(var t=[],r=0;r<e;++r)t.push("s"+r);for(r=0;r<e;++r)t.push("n"+r);for(r=1;r<e;++r)t.push("d"+r);for(r=1;r<e;++r)t.push("e"+r);for(r=1;r<e;++r)t.push("f"+r);return t}t.exports=function(e,t){var r=["'use strict'"],n=["ndarraySortWrapper",e.join("d"),t].join("");r.push(["function ",n,"(",["array"].join(","),"){"].join(""));for(var s=["data=array.data,offset=array.offset|0,shape=array.shape,stride=array.stride"],l=0;l<e.length;++l)s.push(["s",l,"=stride[",l,"]|0,n",l,"=shape[",l,"]|0"].join(""));var c=new Array(e.length),u=[];for(l=0;l<e.length;++l)0!==(h=e[l])&&(0===u.length?c[h]="1":c[h]=u.join("*"),u.push("n"+h));var d=-1,p=-1;for(l=0;l<e.length;++l){var h,f=e[l];0!==f&&(d>0?s.push(["d",f,"=s",f,"-d",d,"*n",d].join("")):s.push(["d",f,"=s",f].join("")),d=f),0!=(h=e.length-1-l)&&(p>0?s.push(["e",h,"=s",h,"-e",p,"*n",p,",f",h,"=",c[h],"-f",p,"*n",p].join("")):s.push(["e",h,"=s",h,",f",h,"=",c[h]].join("")),p=h)}r.push("var "+s.join(","));var m=["0","n0-1","data","offset"].concat(o(e.length));r.push(["if(n0<=",a,"){","insertionSort(",m.join(","),")}else{","quickSort(",m.join(","),")}"].join("")),r.push("}return "+n);var g=new Function("insertionSort","quickSort",r.join("\n")),v=function(e,t){var r=["'use strict'"],n=["ndarrayInsertionSort",e.join("d"),t].join(""),a=["left","right","data","offset"].concat(o(e.length)),s=i(t),l=["i,j,cptr,ptr=left*s0+offset"];if(e.length>1){for(var c=[],u=1;u<e.length;++u)l.push("i"+u),c.push("n"+u);s?l.push("scratch=malloc("+c.join("*")+")"):l.push("scratch=new Array("+c.join("*")+")"),l.push("dptr","sptr","a","b")}else l.push("scratch");function d(e){return"generic"===t?["data.get(",e,")"].join(""):["data[",e,"]"].join("")}function p(e,r){return"generic"===t?["data.set(",e,",",r,")"].join(""):["data[",e,"]=",r].join("")}if(r.push(["function ",n,"(",a.join(","),"){var ",l.join(",")].join(""),"for(i=left+1;i<=right;++i){","j=i;ptr+=s0","cptr=ptr"),e.length>1){for(r.push("dptr=0;sptr=ptr"),u=e.length-1;u>=0;--u)0!==(h=e[u])&&r.push(["for(i",h,"=0;i",h,"<n",h,";++i",h,"){"].join(""));for(r.push("scratch[dptr++]=",d("sptr")),u=0;u<e.length;++u)0!==(h=e[u])&&r.push("sptr+=d"+h,"}");for(r.push("__g:while(j--\x3eleft){","dptr=0","sptr=cptr-s0"),u=1;u<e.length;++u)1===u&&r.push("__l:"),r.push(["for(i",u,"=0;i",u,"<n",u,";++i",u,"){"].join(""));for(r.push(["a=",d("sptr"),"\nb=scratch[dptr]\nif(a<b){break __g}\nif(a>b){break __l}"].join("")),u=e.length-1;u>=1;--u)r.push("sptr+=e"+u,"dptr+=f"+u,"}");for(r.push("dptr=cptr;sptr=cptr-s0"),u=e.length-1;u>=0;--u)0!==(h=e[u])&&r.push(["for(i",h,"=0;i",h,"<n",h,";++i",h,"){"].join(""));for(r.push(p("dptr",d("sptr"))),u=0;u<e.length;++u)0!==(h=e[u])&&r.push(["dptr+=d",h,";sptr+=d",h].join(""),"}");for(r.push("cptr-=s0\n}"),r.push("dptr=cptr;sptr=0"),u=e.length-1;u>=0;--u)0!==(h=e[u])&&r.push(["for(i",h,"=0;i",h,"<n",h,";++i",h,"){"].join(""));for(r.push(p("dptr","scratch[sptr++]")),u=0;u<e.length;++u){var h;0!==(h=e[u])&&r.push("dptr+=d"+h,"}")}}else r.push("scratch="+d("ptr"),"while((j--\x3eleft)&&("+d("cptr-s0")+">scratch)){",p("cptr",d("cptr-s0")),"cptr-=s0","}",p("cptr","scratch"));return r.push("}"),e.length>1&&s&&r.push("free(scratch)"),r.push("} return "+n),s?new Function("malloc","free",r.join("\n"))(s[0],s[1]):new Function(r.join("\n"))()}(e,t),y=function(e,t,r){var n=["'use strict'"],s=["ndarrayQuickSort",e.join("d"),t].join(""),l=["left","right","data","offset"].concat(o(e.length)),c=i(t),u=0;n.push(["function ",s,"(",l.join(","),"){"].join(""));var d=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(e.length>1){for(var p=[],h=1;h<e.length;++h)p.push("n"+h),d.push("i"+h);for(h=0;h<8;++h)d.push("b_ptr"+h);d.push("ptr3","ptr4","ptr5","ptr6","ptr7","pivot_ptr","ptr_shift","elementSize="+p.join("*")),c?d.push("pivot1=malloc(elementSize)","pivot2=malloc(elementSize)"):d.push("pivot1=new Array(elementSize),pivot2=new Array(elementSize)")}else d.push("pivot1","pivot2");function f(e){return["(offset+",e,"*s0)"].join("")}function m(e){return"generic"===t?["data.get(",e,")"].join(""):["data[",e,"]"].join("")}function g(e,r){return"generic"===t?["data.set(",e,",",r,")"].join(""):["data[",e,"]=",r].join("")}function v(t,r,a){if(1===t.length)n.push("ptr0="+f(t[0]));else for(var i=0;i<t.length;++i)n.push(["b_ptr",i,"=s0*",t[i]].join(""));for(r&&n.push("pivot_ptr=0"),n.push("ptr_shift=offset"),i=e.length-1;i>=0;--i)0!==(o=e[i])&&n.push(["for(i",o,"=0;i",o,"<n",o,";++i",o,"){"].join(""));if(t.length>1)for(i=0;i<t.length;++i)n.push(["ptr",i,"=b_ptr",i,"+ptr_shift"].join(""));for(n.push(a),r&&n.push("++pivot_ptr"),i=0;i<e.length;++i){var o;0!==(o=e[i])&&(t.length>1?n.push("ptr_shift+=d"+o):n.push("ptr0+=d"+o),n.push("}"))}}function y(t,r,a,i){if(1===r.length)n.push("ptr0="+f(r[0]));else{for(var o=0;o<r.length;++o)n.push(["b_ptr",o,"=s0*",r[o]].join(""));n.push("ptr_shift=offset")}for(a&&n.push("pivot_ptr=0"),t&&n.push(t+":"),o=1;o<e.length;++o)n.push(["for(i",o,"=0;i",o,"<n",o,";++i",o,"){"].join(""));if(r.length>1)for(o=0;o<r.length;++o)n.push(["ptr",o,"=b_ptr",o,"+ptr_shift"].join(""));for(n.push(i),o=e.length-1;o>=1;--o)a&&n.push("pivot_ptr+=f"+o),r.length>1?n.push("ptr_shift+=e"+o):n.push("ptr0+=e"+o),n.push("}")}function b(){e.length>1&&c&&n.push("free(pivot1)","free(pivot2)")}function _(t,r){var a="el"+t,i="el"+r;if(e.length>1){var o="__l"+ ++u;y(o,[a,i],!1,["comp=",m("ptr0"),"-",m("ptr1"),"\n","if(comp>0){tmp0=",a,";",a,"=",i,";",i,"=tmp0;break ",o,"}\n","if(comp<0){break ",o,"}"].join(""))}else n.push(["if(",m(f(a)),">",m(f(i)),"){tmp0=",a,";",a,"=",i,";",i,"=tmp0}"].join(""))}function x(t,r){e.length>1?v([t,r],!1,g("ptr0",m("ptr1"))):n.push(g(f(t),m(f(r))))}function w(t,r,a){if(e.length>1){var i="__l"+ ++u;y(i,[r],!0,[t,"=",m("ptr0"),"-pivot",a,"[pivot_ptr]\n","if(",t,"!==0){break ",i,"}"].join(""))}else n.push([t,"=",m(f(r)),"-pivot",a].join(""))}function k(t,r){e.length>1?v([t,r],!1,["tmp=",m("ptr0"),"\n",g("ptr0",m("ptr1")),"\n",g("ptr1","tmp")].join("")):n.push(["ptr0=",f(t),"\n","ptr1=",f(r),"\n","tmp=",m("ptr0"),"\n",g("ptr0",m("ptr1")),"\n",g("ptr1","tmp")].join(""))}function M(t,r,a){e.length>1?(v([t,r,a],!1,["tmp=",m("ptr0"),"\n",g("ptr0",m("ptr1")),"\n",g("ptr1",m("ptr2")),"\n",g("ptr2","tmp")].join("")),n.push("++"+r,"--"+a)):n.push(["ptr0=",f(t),"\n","ptr1=",f(r),"\n","ptr2=",f(a),"\n","++",r,"\n","--",a,"\n","tmp=",m("ptr0"),"\n",g("ptr0",m("ptr1")),"\n",g("ptr1",m("ptr2")),"\n",g("ptr2","tmp")].join(""))}function T(e,t){k(e,t),n.push("--"+t)}function C(t,r,a){e.length>1?v([t,r],!0,[g("ptr0",m("ptr1")),"\n",g("ptr1",["pivot",a,"[pivot_ptr]"].join(""))].join("")):n.push(g(f(t),m(f(r))),g(f(r),"pivot"+a))}function S(t,r){n.push(["if((",r,"-",t,")<=",a,"){\n","insertionSort(",t,",",r,",data,offset,",o(e.length).join(","),")\n","}else{\n",s,"(",t,",",r,",data,offset,",o(e.length).join(","),")\n","}"].join(""))}function L(t,r,a){e.length>1?(n.push(["__l",++u,":while(true){"].join("")),v([t],!0,["if(",m("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",u,"}"].join("")),n.push(a,"}")):n.push(["while(",m(f(t)),"===pivot",r,"){",a,"}"].join(""))}return n.push("var "+d.join(",")),_(1,2),_(4,5),_(1,3),_(2,3),_(1,4),_(3,4),_(2,5),_(2,3),_(4,5),e.length>1?v(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",m("ptr1"),"\n","pivot2[pivot_ptr]=",m("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",m("ptr0"),"\n","y=",m("ptr2"),"\n","z=",m("ptr4"),"\n",g("ptr5","x"),"\n",g("ptr6","y"),"\n",g("ptr7","z")].join("")):n.push(["pivot1=",m(f("el2")),"\n","pivot2=",m(f("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",m(f("el1")),"\n","y=",m(f("el3")),"\n","z=",m(f("el5")),"\n",g(f("index1"),"x"),"\n",g(f("index3"),"y"),"\n",g(f("index5"),"z")].join("")),x("index2","left"),x("index4","right"),n.push("if(pivots_are_equal){"),n.push("for(k=less;k<=great;++k){"),w("comp","k",1),n.push("if(comp===0){continue}"),n.push("if(comp<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),n.push("while(true){"),w("comp","great",1),n.push("if(comp>0){"),n.push("great--"),n.push("}else if(comp<0){"),M("k","less","great"),n.push("break"),n.push("}else{"),T("k","great"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}else{"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1<0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2>0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp>0){"),n.push("if(--great<k){break}"),n.push("continue"),n.push("}else{"),w("comp","great",1),n.push("if(comp<0){"),M("k","less","great"),n.push("}else{"),T("k","great"),n.push("}"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),C("left","(less-1)",1),C("right","(great+1)",2),S("left","(less-2)"),S("(great+2)","right"),n.push("if(pivots_are_equal){"),b(),n.push("return"),n.push("}"),n.push("if(less<index1&&great>index5){"),L("less",1,"++less"),L("great",2,"--great"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1===0){"),n.push("if(k!==less){"),k("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2===0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp===0){"),n.push("if(--great<k){break}"),n.push("continue"),n.push("}else{"),w("comp","great",1),n.push("if(comp<0){"),M("k","less","great"),n.push("}else{"),T("k","great"),n.push("}"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),b(),S("less","great"),n.push("}return "+s),e.length>1&&c?new Function("insertionSort","malloc","free",n.join("\n"))(r,c[0],c[1]):new Function("insertionSort",n.join("\n"))(r)}(e,t,v);return g(v,y)}},{"typedarray-pool":543}],449:[function(e,t,r){"use strict";var n=e("./lib/compile_sort.js"),a={};t.exports=function(e){var t=e.order,r=e.dtype,i=[t,r].join(":"),o=a[i];return o||(a[i]=o=n(t,r)),o(e),e}},{"./lib/compile_sort.js":448}],450:[function(e,t,r){"use strict";var n=e("ndarray-linear-interpolate"),a=e("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=new Array(_inline_3_arg4_)}",args:[{name:"_inline_3_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg2_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_3_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_4_arg2_(this_warped,_inline_4_arg0_),_inline_4_arg1_=_inline_4_arg3_.apply(void 0,this_warped)}",args:[{name:"_inline_4_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_4_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_4_arg4_",lvalue:!1,rvalue:!1,count:0}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warpND",blockSize:64}),i=e("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_7_arg2_(this_warped,_inline_7_arg0_),_inline_7_arg1_=_inline_7_arg3_(_inline_7_arg4_,this_warped[0])}",args:[{name:"_inline_7_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_7_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_7_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp1D",blockSize:64}),o=e("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_10_arg2_(this_warped,_inline_10_arg0_),_inline_10_arg1_=_inline_10_arg3_(_inline_10_arg4_,this_warped[0],this_warped[1])}",args:[{name:"_inline_10_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_10_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_10_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp2D",blockSize:64}),s=e("cwise/lib/wrapper")({args:["index","array","scalar","scalar","scalar"],pre:{body:"{this_warped=[0,0,0]}",args:[],thisVars:["this_warped"],localVars:[]},body:{body:"{_inline_13_arg2_(this_warped,_inline_13_arg0_),_inline_13_arg1_=_inline_13_arg3_(_inline_13_arg4_,this_warped[0],this_warped[1],this_warped[2])}",args:[{name:"_inline_13_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg1_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_13_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_13_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_warped"],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"warp3D",blockSize:64});t.exports=function(e,t,r){switch(t.shape.length){case 1:i(e,r,n.d1,t);break;case 2:o(e,r,n.d2,t);break;case 3:s(e,r,n.d3,t);break;default:a(e,r,n.bind(void 0,t),t.shape.length)}return e}},{"cwise/lib/wrapper":150,"ndarray-linear-interpolate":444}],451:[function(e,t,r){var n=e("iota-array"),a=e("is-buffer"),i="undefined"!=typeof Float64Array;function o(e,t){return e[0]-t[0]}function s(){var e,t=this.stride,r=new Array(t.length);for(e=0;e<r.length;++e)r[e]=[Math.abs(t[e]),e];r.sort(o);var n=new Array(r.length);for(e=0;e<n.length;++e)n[e]=r[e][1];return n}function l(e,t){var r=["View",t,"d",e].join("");t<0&&(r="View_Nil"+e);var a="generic"===e;if(-1===t){var i="function "+r+"(a){this.data=a;};var proto="+r+".prototype;proto.dtype='"+e+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+r+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+r+"(a){return new "+r+"(a);}";return new Function(i)()}if(0===t)return i="function "+r+"(a,d) {this.data = a;this.offset = d};var proto="+r+".prototype;proto.dtype='"+e+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+r+"_copy() {return new "+r+"(this.data,this.offset)};proto.pick=function "+r+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+r+"_get(){return "+(a?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+r+"_set(v){return "+(a?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+r+"(a,b,c,d){return new "+r+"(a,d)}",new Function("TrivialArray",i)(c[e][0]);i=["'use strict'"];var o=n(t),l=o.map((function(e){return"i"+e})),u="this.offset+"+o.map((function(e){return"this.stride["+e+"]*i"+e})).join("+"),d=o.map((function(e){return"b"+e})).join(","),p=o.map((function(e){return"c"+e})).join(",");i.push("function "+r+"(a,"+d+","+p+",d){this.data=a","this.shape=["+d+"]","this.stride=["+p+"]","this.offset=d|0}","var proto="+r+".prototype","proto.dtype='"+e+"'","proto.dimension="+t),i.push("Object.defineProperty(proto,'size',{get:function "+r+"_size(){return "+o.map((function(e){return"this.shape["+e+"]"})).join("*"),"}})"),1===t?i.push("proto.order=[0]"):(i.push("Object.defineProperty(proto,'order',{get:"),t<4?(i.push("function "+r+"_order(){"),2===t?i.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===t&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+r+"_set("+l.join(",")+",v){"),a?i.push("return this.data.set("+u+",v)}"):i.push("return this.data["+u+"]=v}"),i.push("proto.get=function "+r+"_get("+l.join(",")+"){"),a?i.push("return this.data.get("+u+")}"):i.push("return this.data["+u+"]}"),i.push("proto.index=function "+r+"_index(",l.join(),"){return "+u+"}"),i.push("proto.hi=function "+r+"_hi("+l.join(",")+"){return new "+r+"(this.data,"+o.map((function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this.shape[",e,"]:i",e,"|0"].join("")})).join(",")+","+o.map((function(e){return"this.stride["+e+"]"})).join(",")+",this.offset)}");var h=o.map((function(e){return"a"+e+"=this.shape["+e+"]"})),f=o.map((function(e){return"c"+e+"=this.stride["+e+"]"}));i.push("proto.lo=function "+r+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+h.join(",")+","+f.join(","));for(var m=0;m<t;++m)i.push("if(typeof i"+m+"==='number'&&i"+m+">=0){d=i"+m+"|0;b+=c"+m+"*d;a"+m+"-=d}");for(i.push("return new "+r+"(this.data,"+o.map((function(e){return"a"+e})).join(",")+","+o.map((function(e){return"c"+e})).join(",")+",b)}"),i.push("proto.step=function "+r+"_step("+l.join(",")+"){var "+o.map((function(e){return"a"+e+"=this.shape["+e+"]"})).join(",")+","+o.map((function(e){return"b"+e+"=this.stride["+e+"]"})).join(",")+",c=this.offset,d=0,ceil=Math.ceil"),m=0;m<t;++m)i.push("if(typeof i"+m+"==='number'){d=i"+m+"|0;if(d<0){c+=b"+m+"*(a"+m+"-1);a"+m+"=ceil(-a"+m+"/d)}else{a"+m+"=ceil(a"+m+"/d)}b"+m+"*=d}");i.push("return new "+r+"(this.data,"+o.map((function(e){return"a"+e})).join(",")+","+o.map((function(e){return"b"+e})).join(",")+",c)}");var g=new Array(t),v=new Array(t);for(m=0;m<t;++m)g[m]="a[i"+m+"]",v[m]="b[i"+m+"]";for(i.push("proto.transpose=function "+r+"_transpose("+l+"){"+l.map((function(e,t){return e+"=("+e+"===undefined?"+t+":"+e+"|0)"})).join(";"),"var a=this.shape,b=this.stride;return new "+r+"(this.data,"+g.join(",")+","+v.join(",")+",this.offset)}"),i.push("proto.pick=function "+r+"_pick("+l+"){var a=[],b=[],c=this.offset"),m=0;m<t;++m)i.push("if(typeof i"+m+"==='number'&&i"+m+">=0){c=(c+this.stride["+m+"]*i"+m+")|0}else{a.push(this.shape["+m+"]);b.push(this.stride["+m+"])}");return i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+o.map((function(e){return"shape["+e+"]"})).join(",")+","+o.map((function(e){return"stride["+e+"]"})).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",i.join("\n"))(c[e],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=function(e,t,r,n){if(void 0===e)return(0,c.array[0])([]);"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var o=t.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===n)for(n=0,s=0;s<o;++s)r[s]<0&&(n-=(t[s]-1)*r[s]);for(var d=function(e){if(a(e))return"buffer";if(i)switch(Object.prototype.toString.call(e)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(e)?"array":"generic"}(e),p=c[d];p.length<=o+1;)p.push(l(d,p.length-1));return(0,p[o+1])(e,t,r,n)}},{"iota-array":417,"is-buffer":419}],452:[function(e,t,r){"use strict";var n=e("double-bits"),a=Math.pow(2,-1074),i=-1>>>0;t.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-a:a;var r=n.hi(e),o=n.lo(e);return t>e==e>0?o===i?(r+=1,o=0):o+=1:0===o?(o=i,r-=1):o-=1,n.pack(o,r)}},{"double-bits":168}],453:[function(e,t,r){var n=Math.PI,a=c(120);function i(e,t,r,n){return["C",e,t,r,n,r,n]}function o(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}function s(e,t,r,i,o,c,u,d,p,h){if(h)k=h[0],M=h[1],x=h[2],w=h[3];else{var f=l(e,t,-o);e=f.x,t=f.y;var m=(e-(d=(f=l(d,p,-o)).x))/2,g=(t-(p=f.y))/2,v=m*m/(r*r)+g*g/(i*i);v>1&&(r*=v=Math.sqrt(v),i*=v);var y=r*r,b=i*i,_=(c==u?-1:1)*Math.sqrt(Math.abs((y*b-y*g*g-b*m*m)/(y*g*g+b*m*m)));_==1/0&&(_=1);var x=_*r*g/i+(e+d)/2,w=_*-i*m/r+(t+p)/2,k=Math.asin(((t-w)/i).toFixed(9)),M=Math.asin(((p-w)/i).toFixed(9));(k=e<x?n-k:k)<0&&(k=2*n+k),(M=d<x?n-M:M)<0&&(M=2*n+M),u&&k>M&&(k-=2*n),!u&&M>k&&(M-=2*n)}if(Math.abs(M-k)>a){var T=M,C=d,S=p;M=k+a*(u&&M>k?1:-1);var L=s(d=x+r*Math.cos(M),p=w+i*Math.sin(M),r,i,o,0,u,C,S,[M,T,x,w])}var A=Math.tan((M-k)/4),E=4/3*r*A,D=4/3*i*A,I=[2*e-(e+E*Math.sin(k)),2*t-(t-D*Math.cos(k)),d+E*Math.sin(M),p-D*Math.cos(M),d,p];if(h)return I;L&&(I=I.concat(L));for(var P=0;P<I.length;){var O=l(I[P],I[P+1],o);I[P++]=O.x,I[P++]=O.y}return I}function l(e,t,r){return{x:e*Math.cos(r)-t*Math.sin(r),y:e*Math.sin(r)+t*Math.cos(r)}}function c(e){return e*(n/180)}t.exports=function(e){for(var t,r=[],n=0,a=0,l=0,u=0,d=null,p=null,h=0,f=0,m=0,g=e.length;m<g;m++){var v=e[m],y=v[0];switch(y){case"M":l=v[1],u=v[2];break;case"A":(v=s(h,f,v[1],v[2],c(v[3]),v[4],v[5],v[6],v[7])).unshift("C"),v.length>7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var b=h,_=f;"C"!=t&&"S"!=t||(b+=b-n,_+=_-a),v=["C",b,_,v[1],v[2],v[3],v[4]];break;case"T":"Q"==t||"T"==t?(d=2*h-d,p=2*f-p):(d=h,p=f),v=o(h,f,d,p,v[1],v[2]);break;case"Q":d=v[1],p=v[2],v=o(h,f,v[1],v[2],v[3],v[4]);break;case"L":v=i(h,f,v[1],v[2]);break;case"H":v=i(h,f,v[1],f);break;case"V":v=i(h,f,h,v[1]);break;case"Z":v=i(h,f,l,u)}t=y,h=v[v.length-2],f=v[v.length-1],v.length>4?(n=v[v.length-4],a=v[v.length-3]):(n=h,a=f),r.push(v)}return r}},{}],454:[function(e,t,r){r.vertexNormals=function(e,t,r){for(var n=t.length,a=new Array(n),i=void 0===r?1e-6:r,o=0;o<n;++o)a[o]=[0,0,0];for(o=0;o<e.length;++o)for(var s=e[o],l=0,c=s[s.length-1],u=s[0],d=0;d<s.length;++d){l=c,c=u,u=s[(d+1)%s.length];for(var p=t[l],h=t[c],f=t[u],m=new Array(3),g=0,v=new Array(3),y=0,b=0;b<3;++b)m[b]=p[b]-h[b],g+=m[b]*m[b],v[b]=f[b]-h[b],y+=v[b]*v[b];if(g*y>i){var _=a[c],x=1/Math.sqrt(g*y);for(b=0;b<3;++b){var w=(b+1)%3,k=(b+2)%3;_[b]+=x*(v[w]*m[k]-v[k]*m[w])}}}for(o=0;o<n;++o){_=a[o];var M=0;for(b=0;b<3;++b)M+=_[b]*_[b];if(M>i)for(x=1/Math.sqrt(M),b=0;b<3;++b)_[b]*=x;else for(b=0;b<3;++b)_[b]=0}return a},r.faceNormals=function(e,t,r){for(var n=e.length,a=new Array(n),i=void 0===r?1e-6:r,o=0;o<n;++o){for(var s=e[o],l=new Array(3),c=0;c<3;++c)l[c]=t[s[c]];var u=new Array(3),d=new Array(3);for(c=0;c<3;++c)u[c]=l[1][c]-l[0][c],d[c]=l[2][c]-l[0][c];var p=new Array(3),h=0;for(c=0;c<3;++c){var f=(c+1)%3,m=(c+2)%3;p[c]=u[f]*d[m]-u[m]*d[f],h+=p[c]*p[c]}for(h=h>i?1/Math.sqrt(h):0,c=0;c<3;++c)p[c]*=h;a[o]=p}return a}},{}],455:[function(e,t,r){
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
"use strict";var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,s,l=o(e),c=1;c<arguments.length;c++){for(var u in r=Object(arguments[c]))a.call(r,u)&&(l[u]=r[u]);if(n){s=n(r);for(var d=0;d<s.length;d++)i.call(r,s[d])&&(l[s[d]]=r[s[d]])}}return l}},{}],456:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a,i,o,s,l,c){var u=t+i+c;if(d>0){var d=Math.sqrt(u+1);e[0]=.5*(o-l)/d,e[1]=.5*(s-n)/d,e[2]=.5*(r-i)/d,e[3]=.5*d}else{var p=Math.max(t,i,c);d=Math.sqrt(2*p-u+1),t>=p?(e[0]=.5*d,e[1]=.5*(a+r)/d,e[2]=.5*(s+n)/d,e[3]=.5*(o-l)/d):i>=p?(e[0]=.5*(r+a)/d,e[1]=.5*d,e[2]=.5*(l+o)/d,e[3]=.5*(s-n)/d):(e[0]=.5*(n+s)/d,e[1]=.5*(o+l)/d,e[2]=.5*d,e[3]=.5*(r-a)/d)}return e}},{}],457:[function(e,t,r){"use strict";t.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],n=e.radius||1;t=[].slice.call(t,0,3),u(r=[].slice.call(r,0,4),r);var a=new d(r,t,Math.log(n));return a.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&a.lookAt(0,e.eye,e.center,e.up),a};var n=e("filtered-vector"),a=e("gl-mat4/lookAt"),i=e("gl-mat4/fromQuat"),o=e("gl-mat4/invert"),s=e("./lib/quatFromFrame");function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function c(e,t,r,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(n,2))}function u(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=c(r,n,a,i);o>1e-6?(e[0]=r/o,e[1]=n/o,e[2]=a/o,e[3]=i/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function d(e,t,r){this.radius=n([r]),this.center=n(t),this.rotation=n(e),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var p=d.prototype;p.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},p.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;i(r,t);var n=this.computedCenter,a=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);a[0]=n[0]+s*r[2],a[1]=n[1]+s*r[6],a[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,d=0;d<3;++d)c+=r[l+4*d]*a[d];r[12+l]=-c}},p.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r},p.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},p.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},p.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var a=this.computedMatrix,i=a[1],o=a[5],s=a[9],c=l(i,o,s);i/=c,o/=c,s/=c;var u=a[0],d=a[4],p=a[8],h=u*i+d*o+p*s,f=l(u-=i*h,d-=o*h,p-=s*h);u/=f,d/=f,p/=f;var m=a[2],g=a[6],v=a[10],y=m*i+g*o+v*s,b=m*u+g*d+v*p,_=l(m-=y*i+b*u,g-=y*o+b*d,v-=y*s+b*p);m/=_,g/=_,v/=_;var x=u*t+i*r,w=d*t+o*r,k=p*t+s*r;this.center.move(e,x,w,k);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+n),this.radius.set(e,Math.log(M))},p.rotate=function(e,t,r,n){this.recalcMatrix(e),t=t||0,r=r||0;var a=this.computedMatrix,i=a[0],o=a[4],s=a[8],u=a[1],d=a[5],p=a[9],h=a[2],f=a[6],m=a[10],g=t*i+r*u,v=t*o+r*d,y=t*s+r*p,b=-(f*y-m*v),_=-(m*g-h*y),x=-(h*v-f*g),w=Math.sqrt(Math.max(0,1-Math.pow(b,2)-Math.pow(_,2)-Math.pow(x,2))),k=c(b,_,x,w);k>1e-6?(b/=k,_/=k,x/=k,w/=k):(b=_=x=0,w=1);var M=this.computedRotation,T=M[0],C=M[1],S=M[2],L=M[3],A=T*w+L*b+C*x-S*_,E=C*w+L*_+S*b-T*x,D=S*w+L*x+T*_-C*b,I=L*w-T*b-C*_-S*x;if(n){b=h,_=f,x=m;var P=Math.sin(n)/l(b,_,x);b*=P,_*=P,x*=P,I=I*(w=Math.cos(t))-(A=A*w+I*b+E*x-D*_)*b-(E=E*w+I*_+D*b-A*x)*_-(D=D*w+I*x+A*_-E*b)*x}var O=c(A,E,D,I);O>1e-6?(A/=O,E/=O,D/=O,I/=O):(A=E=D=0,I=1),this.rotation.set(e,A,E,D,I)},p.lookAt=function(e,t,r,n){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,n=n||this.computedUp;var i=this.computedMatrix;a(i,t,r,n);var o=this.computedRotation;s(o,i[0],i[1],i[2],i[4],i[5],i[6],i[8],i[9],i[10]),u(o,o),this.rotation.set(e,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},p.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},p.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,t);var a=n[15];if(Math.abs(a)>1e-6){var i=n[12]/a,l=n[13]/a,c=n[14]/a;this.recalcMatrix(e);var d=Math.exp(this.computedRadius[0]);this.center.set(e,i-n[2]*d,l-n[6]*d,c-n[10]*d),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},p.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},p.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},p.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},p.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},p.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var n=e.rotation;n&&this.rotation.set(t,n[0],n[1],n[2],n[3]);var a=e.distance;a&&a>0&&this.radius.set(t,Math.log(a)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},{"./lib/quatFromFrame":456,"filtered-vector":228,"gl-mat4/fromQuat":264,"gl-mat4/invert":267,"gl-mat4/lookAt":268}],458:[function(e,t,r){
/*!
 * pad-left <https://github.com/jonschlinkert/pad-left>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT license.
 */
"use strict";var n=e("repeat-string");t.exports=function(e,t,r){return n(r=void 0!==r?r+"":" ",t)+e}},{"repeat-string":501}],459:[function(e,t,r){"use strict";function n(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",i=!!t.flat;n.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function i(t,i,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(s),a+s+a}r.forEach((function(e,n){for(var a,o=0;e!=a;)if(a=e,e=e.replace(t,i),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e})),n=n.reverse(),r=r.map((function(t){return n.forEach((function(r){t=t.replace(new RegExp("(\\"+a+r+"\\"+a+")","g"),e[0]+"$1"+e[1])})),t}))}));var o=new RegExp("\\"+a+"([0-9]+)\\"+a);return i?r:function e(t,r,n){for(var a,i=[],s=0;a=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");i.push(t.slice(0,a.index)),i.push(e(r[a[1]],r)),t=t.slice(a.index+a[0].length)}return i.push(t),i}(r[0],r)}function a(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",a=e[0];if(!a)return"";for(var i=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;a!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=a,a=a.replace(i,s)}return a}return e.reduce((function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r}),"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function i(e,t){return Array.isArray(e)?a(e,t):n(e,t)}i.parse=n,i.stringify=a,t.exports=i},{}],460:[function(e,t,r){"use strict";var n=e("pick-by-alias");t.exports=function(e){var t;return arguments.length>1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=n(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),t={x:e.left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}},{"pick-by-alias":466}],461:[function(e,t,r){t.exports=function(e){var t=[];return e.replace(a,(function(e,r,a){var o=r.toLowerCase();for(a=function(e){var t=e.match(i);return t?t.map(Number):[]}(a),"m"==o&&a.length>2&&(t.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==n[o])return a.unshift(r),t.push(a);if(a.length<n[o])throw new Error("malformed path data");t.push([r].concat(a.splice(0,n[o])))}})),t};var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},a=/([astvzqmhlc])([^astvzqmhlc]*)/gi,i=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},{}],462:[function(e,t,r){t.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},{}],463:[function(e,t,r){(function(e){(function(){var r,n,a,i,o,s;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:null!=e&&e.hrtime?(t.exports=function(){return(r()-o)/1e6},n=e.hrtime,i=(r=function(){var e;return 1e9*(e=n())[0]+e[1]})(),s=1e9*e.uptime(),o=i-s):Date.now?(t.exports=function(){return Date.now()-a},a=Date.now()):(t.exports=function(){return(new Date).getTime()-a},a=(new Date).getTime())}).call(this)}).call(this,e("_process"))},{_process:483}],464:[function(e,t,r){"use strict";t.exports=function(e){var t=e.length;if(t<n){for(var r=1,i=0;i<t;++i)for(var o=0;o<i;++o)if(e[i]<e[o])r=-r;else if(e[i]===e[o])return 0;return r}var s=a.mallocUint8(t);for(i=0;i<t;++i)s[i]=0;for(r=1,i=0;i<t;++i)if(!s[i]){var l=1;for(s[i]=1,o=e[i];o!==i;o=e[o]){if(s[o])return a.freeUint8(s),0;l+=1,s[o]=1}1&l||(r=-r)}return a.freeUint8(s),r};var n=32,a=e("typedarray-pool")},{"typedarray-pool":543}],465:[function(e,t,r){"use strict";var n=e("typedarray-pool"),a=e("invert-permutation");r.rank=function(e){var t=e.length;switch(t){case 0:case 1:return 0;case 2:return e[1]}var r,i,o,s=n.mallocUint32(t),l=n.mallocUint32(t),c=0;for(a(e,l),o=0;o<t;++o)s[o]=e[o];for(o=t-1;o>0;--o)i=l[o],r=s[o],s[o]=s[i],s[i]=r,l[o]=l[r],l[r]=i,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(e,t,r){switch(e){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(t?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):t?[0,1]:[1,0]}var n,a,i,o=1;for((r=r||new Array(e))[0]=0,i=1;i<e;++i)r[i]=i,o=o*i|0;for(i=e-1;i>0;--i)t=t-(n=t/o|0)*o|0,o=o/i|0,a=0|r[i],r[i]=0|r[n],r[n]=0|a;return r}},{"invert-permutation":416,"typedarray-pool":543}],466:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n,i,o={};if("string"==typeof t&&(t=a(t)),Array.isArray(t)){var s={};for(i=0;i<t.length;i++)s[t[i]]=!0;t=s}for(n in t)t[n]=a(t[n]);var l={};for(n in t){var c=t[n];if(Array.isArray(c))for(i=0;i<c.length;i++){var u=c[i];if(r&&(l[u]=!0),u in e){if(o[n]=e[u],r)for(var d=i;d<c.length;d++)l[c[d]]=!0;break}}else n in e&&(t[n]&&(o[n]=e[n]),r&&(l[n]=!0))}if(r)for(n in e)l[n]||(o[n]=e[n]);return o};var n={};function a(e){return n[e]?n[e]:("string"==typeof e&&(e=n[e]=e.split(/\s*,\s*|\s+/)),e)}},{}],467:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=0|t.length,a=e.length,i=[new Array(r),new Array(r)],o=0;o<r;++o)i[0][o]=[],i[1][o]=[];for(o=0;o<a;++o){var s=e[o];i[0][s[0]].push(s),i[1][s[1]].push(s)}var l=[];for(o=0;o<r;++o)i[0][o].length+i[1][o].length===0&&l.push([o]);function c(e,t){var r=i[t][e[t]];r.splice(r.indexOf(e),1)}function u(e,r,a){for(var o,s,l,u=0;u<2;++u)if(i[u][r].length>0){o=i[u][r][0],l=u;break}s=o[1^l];for(var d=0;d<2;++d)for(var p=i[d][r],h=0;h<p.length;++h){var f=p[h],m=f[1^d];n(t[e],t[r],t[s],t[m])>0&&(o=f,s=m,l=d)}return a?s:(o&&c(o,l),s)}function d(e,r){var a=i[r][e][0],o=[e];c(a,r);for(var s=a[1^r];;){for(;s!==e;)o.push(s),s=u(o[o.length-2],s,!1);if(i[0][e].length+i[1][e].length===0)break;var l=o[o.length-1],d=e,p=o[1],h=u(l,d,!0);if(n(t[l],t[d],t[p],t[h])<0)break;o.push(e),s=u(l,d)}return o}function p(e,t){return t[1]===t[t.length-1]}for(o=0;o<r;++o)for(var h=0;h<2;++h){for(var f=[];i[h][o].length>0;){i[0][o].length;var m=d(o,h);p(0,m)?f.push.apply(f,m):(f.length>0&&l.push(f),f=m)}f.length>0&&l.push(f)}return l};var n=e("compare-angle")},{"compare-angle":128}],468:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=n(e,t.length),a=new Array(t.length),i=new Array(t.length),o=[],s=0;s<t.length;++s){var l=r[s].length;i[s]=l,a[s]=!0,l<=1&&o.push(s)}for(;o.length>0;){var c=o.pop();a[c]=!1;var u=r[c];for(s=0;s<u.length;++s){var d=u[s];0==--i[d]&&o.push(d)}}var p=new Array(t.length),h=[];for(s=0;s<t.length;++s)a[s]?(c=h.length,p[s]=c,h.push(t[s])):p[s]=-1;var f=[];for(s=0;s<e.length;++s){var m=e[s];a[m[0]]&&a[m[1]]&&f.push([p[m[0]],p[m[1]]])}return[f,h]};var n=e("edges-to-adjacency-list")},{"edges-to-adjacency-list":173}],469:[function(e,t,r){"use strict";t.exports=function(e,t){var r=c(e,t);e=r[0];for(var d=(t=r[1]).length,p=(e.length,n(e,t.length)),h=0;h<d;++h)if(p[h].length%2==1)throw new Error("planar-graph-to-polyline: graph must be manifold");var f=a(e,t),m=(f=f.filter((function(e){for(var r=e.length,n=[0],a=0;a<r;++a){var i=t[e[a]],l=t[e[(a+1)%r]],c=o(-i[0],i[1]),u=o(-i[0],l[1]),d=o(l[0],i[1]),p=o(l[0],l[1]);n=s(n,s(s(c,u),s(d,p)))}return n[n.length-1]>0}))).length,g=new Array(m),v=new Array(m);for(h=0;h<m;++h){g[h]=h;var y=new Array(m),b=f[h].map((function(e){return t[e]})),_=i([b]),x=0;e:for(var w=0;w<m;++w)if(y[w]=0,h!==w){for(var k=(V=f[w]).length,M=0;M<k;++M){var T=_(t[V[M]]);if(0!==T){T<0&&(y[w]=1,x+=1);continue e}}y[w]=1,x+=1}v[h]=[x,h,y]}for(v.sort((function(e,t){return t[0]-e[0]})),h=0;h<m;++h){var C=(y=v[h])[1],S=y[2];for(w=0;w<m;++w)S[w]&&(g[w]=C)}var L=function(e){for(var t=new Array(e),r=0;r<e;++r)t[r]=[];return t}(m);for(h=0;h<m;++h)L[h].push(g[h]),L[g[h]].push(h);var A={},E=u(d,!1);for(h=0;h<m;++h)for(k=(V=f[h]).length,w=0;w<k;++w){var D=V[w],I=V[(w+1)%k],P=Math.min(D,I)+":"+Math.max(D,I);if(P in A){var O=A[P];L[O].push(h),L[h].push(O),E[D]=E[I]=!0}else A[P]=h}function R(e){for(var t=e.length,r=0;r<t;++r)if(!E[e[r]])return!1;return!0}var F=[],z=u(m,-1);for(h=0;h<m;++h)g[h]!==h||R(f[h])?z[h]=-1:(F.push(h),z[h]=0);for(r=[];F.length>0;){var N=F.pop(),j=L[N];l(j,(function(e,t){return e-t}));var B,Y=j.length,H=z[N];if(0===H){var V=f[N];B=[V]}for(h=0;h<Y;++h){var U=j[h];z[U]>=0||(z[U]=1^H,F.push(U),0===H&&(R(V=f[U])||(V.reverse(),B.push(V))))}0===H&&r.push(B)}return r};var n=e("edges-to-adjacency-list"),a=e("planar-dual"),i=e("point-in-big-polygon"),o=e("two-product"),s=e("robust-sum"),l=e("uniq"),c=e("./lib/trim-leaves");function u(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=t;return r}},{"./lib/trim-leaves":468,"edges-to-adjacency-list":173,"planar-dual":467,"point-in-big-polygon":473,"robust-sum":513,"two-product":541,uniq:545}],470:[function(e,t,r){"use strict";t.exports=e("./quad")},{"./quad":472}],471:[function(e,t,r){arguments[4][112][0].apply(r,arguments)},{dup:112}],472:[function(e,t,r){"use strict";var n=e("binary-search-bounds"),a=e("clamp"),i=e("parse-rect"),o=e("array-bounds"),s=e("pick-by-alias"),l=e("defined"),c=e("flatten-vertex-data"),u=e("is-obj"),d=e("dtype"),p=e("math-log2"),h=1073741824;function f(e,t){for(var r=t[0],n=t[1],i=1/(t[2]-r),o=1/(t[3]-n),s=new Array(e.length),l=0,c=e.length/2;l<c;l++)s[2*l]=a((e[2*l]-r)*i,0,1),s[2*l+1]=a((e[2*l+1]-n)*o,0,1);return s}t.exports=function(e,t){t||(t={}),e=c(e,"float64"),t=s(t,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var r=l(t.maxDepth,255),a=l(t.bounds,o(e,2));a[0]===a[2]&&a[2]++,a[1]===a[3]&&a[3]++;var m,g=f(e,a),v=e.length>>>1;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?m=new(d(t.dtype))(v):t.dtype&&(m=t.dtype,Array.isArray(m)&&(m.length=v));for(var y=0;y<v;++y)m[y]=y;var b=[],_=[],x=[],w=[];!function e(t,n,a,i,o,s){if(!i.length)return null;var l=b[o]||(b[o]=[]),c=x[o]||(x[o]=[]),u=_[o]||(_[o]=[]),d=l.length;if(++o>r||s>h){for(var p=0;p<i.length;p++)l.push(i[p]),c.push(s),u.push(null,null,null,null);return d}if(l.push(i[0]),c.push(s),i.length<=1)return u.push(null,null,null,null),d;for(var f=.5*a,m=t+f,v=n+f,y=[],w=[],k=[],M=[],T=1,C=i.length;T<C;T++){var S=i[T],L=g[2*S],A=g[2*S+1];L<m?A<v?y.push(S):w.push(S):A<v?k.push(S):M.push(S)}return s<<=2,u.push(e(t,n,f,y,o,s),e(t,v,f,w,o,s+1),e(m,n,f,k,o,s+2),e(m,v,f,M,o,s+3)),d}(0,0,1,m,0,1);for(var k=0,M=0;M<b.length;M++){var T=b[M];if(m.set)m.set(T,k);else for(var C=0,S=T.length;C<S;C++)m[C+k]=T[C];var L=k+b[M].length;w[M]=[k,L],k=L}return m.range=function(){for(var t,r=[],o=arguments.length;o--;)r[o]=arguments[o];if(u(r[r.length-1])){var c=r.pop();r.length||null==c.x&&null==c.l&&null==c.left||(r=[c],t={}),t=s(c,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else t={};r.length||(r=a);var d,h=i.apply(void 0,r),m=[Math.min(h.x,h.x+h.width),Math.min(h.y,h.y+h.height),Math.max(h.x,h.x+h.width),Math.max(h.y,h.y+h.height)],g=m[0],v=m[1],y=m[2],k=m[3],M=f([g,v,y,k],a),T=M[0],C=M[1],S=M[2],L=M[3],E=l(t.level,b.length);if(null!=t.d&&("number"==typeof t.d?d=[t.d,t.d]:t.d.length&&(d=t.d),E=Math.min(Math.max(Math.ceil(-p(Math.abs(d[0])/(a[2]-a[0]))),Math.ceil(-p(Math.abs(d[1])/(a[3]-a[1])))),E)),E=Math.min(E,b.length),t.lod)return function(e,t,r,a,i){for(var o=[],s=0;s<i;s++){var l=x[s],c=w[s][0],u=A(e,t,s),d=A(r,a,s),p=n.ge(l,u),h=n.gt(l,d,p,l.length-1);o[s]=[p+c,h+c]}return o}(T,C,S,L,E);var D=[];return function t(r,n,a,i,o,s){if(null!==o&&null!==s){var l=n+a;if(!(T>r+a||C>l||S<r||L<n||i>=E||o===s)){var c=b[i];void 0===s&&(s=c.length);for(var u=o;u<s;u++){var d=c[u],p=e[2*d],h=e[2*d+1];p>=g&&p<=y&&h>=v&&h<=k&&D.push(d)}var f=_[i],m=f[4*o+0],x=f[4*o+1],w=f[4*o+2],M=f[4*o+3],A=function(e,t){for(var r=null,n=0;null===r;)if(r=e[4*t+n],++n>e.length)return null;return r}(f,o+1),I=.5*a,P=i+1;t(r,n,I,P,m,x||w||M||A),t(r,n+I,I,P,x,w||M||A),t(r+I,n,I,P,w,M||A),t(r+I,n+I,I,P,M,A)}}}(0,0,1,0,0,1),D},m;function A(e,t,r){for(var n=1,a=.5,i=.5,o=.5,s=0;s<r;s++)n<<=2,n+=e<a?t<i?0:1:t<i?2:3,o*=.5,a+=e<a?-o:o,i+=t<i?-o:o;return n}}},{"array-bounds":67,"binary-search-bounds":471,clamp:116,defined:165,dtype:170,"flatten-vertex-data":229,"is-obj":422,"math-log2":433,"parse-rect":460,"pick-by-alias":466}],473:[function(e,t,r){t.exports=function(e){for(var t=e.length,r=[],i=[],s=0;s<t;++s)for(var u=e[s],d=u.length,p=d-1,h=0;h<d;p=h++){var f=u[p],m=u[h];f[0]===m[0]?i.push([f,m]):r.push([f,m])}if(0===r.length)return 0===i.length?c:(g=l(i),function(e){return g(e[0],e[1])?0:1});var g,v=a(r),y=function(e,t){return function(r){var a=o.le(t,r[0]);if(a<0)return 1;var i=e[a];if(!i){if(!(a>0&&t[a]===r[0]))return 1;i=e[a-1]}for(var s=1;i;){var l=i.key,c=n(r,l[0],l[1]);if(l[0][0]<l[1][0])if(c<0)i=i.left;else{if(!(c>0))return 0;s=-1,i=i.right}else if(c>0)i=i.left;else{if(!(c<0))return 0;s=1,i=i.right}}return s}}(v.slabs,v.coordinates);return 0===i.length?y:function(e,t){return function(r){return e(r[0],r[1])?0:t(r)}}(l(i),y)};var n=e("robust-orientation")[3],a=e("slab-decomposition"),i=e("interval-tree-1d"),o=e("binary-search-bounds");function s(){return!0}function l(e){for(var t={},r=0;r<e.length;++r){var n=e[r],a=n[0][0],o=n[0][1],l=n[1][1],c=[Math.min(o,l),Math.max(o,l)];a in t?t[a].push(c):t[a]=[c]}var u={},d=Object.keys(t);for(r=0;r<d.length;++r){var p=t[d[r]];u[d[r]]=i(p)}return function(e){return function(t,r){var n=e[t];return!!n&&!!n.queryPoint(r,s)}}(u)}function c(e){return 1}},{"binary-search-bounds":92,"interval-tree-1d":415,"robust-orientation":508,"slab-decomposition":524}],474:[function(e,t,r){
/*
 * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
 * @license MIT
 * @preserve Project Home: https://github.com/voidqk/polybooljs
 */
var n,a=e("./lib/build-log"),i=e("./lib/epsilon"),o=e("./lib/intersecter"),s=e("./lib/segment-chainer"),l=e("./lib/segment-selector"),c=e("./lib/geojson"),u=!1,d=i();function p(e,t,r){var a=n.segments(e),i=n.segments(t),o=r(n.combine(a,i));return n.polygon(o)}n={buildLog:function(e){return!0===e?u=a():!1===e&&(u=!1),!1!==u&&u.list},epsilon:function(e){return d.epsilon(e)},segments:function(e){var t=o(!0,d,u);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){return{combined:o(!1,d,u).calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:l.union(e.combined,u),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:l.intersect(e.combined,u),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:l.difference(e.combined,u),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:l.differenceRev(e.combined,u),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:l.xor(e.combined,u),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:s(e.segments,d,u),inverted:e.inverted}},polygonFromGeoJSON:function(e){return c.toPolygon(n,e)},polygonToGeoJSON:function(e){return c.fromPolygon(n,d,e)},union:function(e,t){return p(e,t,n.selectUnion)},intersect:function(e,t){return p(e,t,n.selectIntersect)},difference:function(e,t){return p(e,t,n.selectDifference)},differenceRev:function(e,t){return p(e,t,n.selectDifferenceRev)},xor:function(e,t){return p(e,t,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},{"./lib/build-log":475,"./lib/epsilon":476,"./lib/geojson":477,"./lib/intersecter":478,"./lib/segment-chainer":480,"./lib/segment-selector":481}],475:[function(e,t,r){t.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1,"  ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}},{}],476:[function(e,t,r){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var a=r[0],i=r[1],o=n[0],s=n[1],l=t[0];return(o-a)*(t[1]-i)-(s-i)*(l-a)>=-e},pointBetween:function(t,r,n){var a=t[1]-r[1],i=n[0]-r[0],o=t[0]-r[0],s=n[1]-r[1],l=o*i+a*s;return!(l<e||l-(i*i+s*s)>-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])<e},pointsSameY:function(t,r){return Math.abs(t[1]-r[1])<e},pointsSame:function(e,r){return t.pointsSameX(e,r)&&t.pointsSameY(e,r)},pointsCompare:function(e,r){return t.pointsSameX(e,r)?t.pointsSameY(e,r)?0:e[1]<r[1]?-1:1:e[0]<r[0]?-1:1},pointsCollinear:function(t,r,n){var a=t[0]-r[0],i=t[1]-r[1],o=r[0]-n[0],s=r[1]-n[1];return Math.abs(a*s-o*i)<e},linesIntersect:function(t,r,n,a){var i=r[0]-t[0],o=r[1]-t[1],s=a[0]-n[0],l=a[1]-n[1],c=i*l-o*s;if(Math.abs(c)<e)return!1;var u=t[0]-n[0],d=t[1]-n[1],p=(s*d-l*u)/c,h=(i*d-o*u)/c,f={alongA:0,alongB:0,pt:[t[0]+p*i,t[1]+p*o]};return f.alongA=p<=-e?-2:p<e?-1:p-1<=-e?0:p-1<e?1:2,f.alongB=h<=-e?-2:h<e?-1:h-1<=-e?0:h-1<e?1:2,f},pointInsideRegion:function(t,r){for(var n=t[0],a=t[1],i=r[r.length-1][0],o=r[r.length-1][1],s=!1,l=0;l<r.length;l++){var c=r[l][0],u=r[l][1];u-a>e!=o-a>e&&(i-c)*(a-u)/(o-u)+c-n>e&&(s=!s),i=c,o=u}return s}};return t}},{}],477:[function(e,t,r){var n={toPolygon:function(e,t){function r(t){if(t.length<=0)return e.segments({inverted:!1,regions:[]});function r(t){var r=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[r]})}for(var n=r(t[0]),a=1;a<t.length;a++)n=e.selectDifference(e.combine(n,r(t[a])));return n}if("Polygon"===t.type)return e.polygon(r(t.coordinates));if("MultiPolygon"===t.type){for(var n=e.segments({inverted:!1,regions:[]}),a=0;a<t.coordinates.length;a++)n=e.selectUnion(e.combine(n,r(t.coordinates[a])));return e.polygon(n)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,t,r){function n(e,r){return t.pointInsideRegion([.5*(e[0][0]+e[1][0]),.5*(e[0][1]+e[1][1])],r)}function a(e){return{region:e,children:[]}}r=e.polygon(e.segments(r));var i=a(null);function o(e,t){for(var r=0;r<e.children.length;r++)if(n(t,(s=e.children[r]).region))return void o(s,t);var i=a(t);for(r=0;r<e.children.length;r++){var s;n((s=e.children[r]).region,t)&&(i.children.push(s),e.children.splice(r,1),r--)}e.children.push(i)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(i,l)}function c(e,t){for(var r=0,n=e[e.length-1][0],a=e[e.length-1][1],i=[],o=0;o<e.length;o++){var s=e[o][0],l=e[o][1];i.push([s,l]),r+=l*n-s*a,n=s,a=l}return r<0!==t&&i.reverse(),i.push([i[0][0],i[0][1]]),i}var u=[];function d(e){var t=[c(e.region,!1)];u.push(t);for(var r=0;r<e.children.length;r++)t.push(p(e.children[r]))}function p(e){for(var t=0;t<e.children.length;t++)d(e.children[t]);return c(e.region,!0)}for(s=0;s<i.children.length;s++)d(i.children[s]);return u.length<=0?{type:"Polygon",coordinates:[]}:1==u.length?{type:"Polygon",coordinates:u[0]}:{type:"MultiPolygon",coordinates:u}}};t.exports=n},{}],478:[function(e,t,r){var n=e("./linked-list");t.exports=function(e,t,r){function a(e,t,n){return{id:r?r.segmentId():-1,start:e,end:t,myFill:{above:n.myFill.above,below:n.myFill.below},otherFill:null}}var i=n.create();function o(e,r){i.insertBefore(e,(function(n){return function(e,r,n,a,i,o){var s=t.pointsCompare(r,i);return 0!==s?s:t.pointsSame(n,o)?0:e!==a?e?1:-1:t.pointAboveOrOnLine(n,a?i:o,a?o:i)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt)<0}))}function s(e,t){var r=function(e,t){var r=n.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return o(r,e.end),r}(e,t);return function(e,t,r){var a=n.node({isStart:!1,pt:t.end,seg:t,primary:r,other:e,status:null});e.other=a,o(a,e.pt)}(r,e,t),r}function l(e,t){var n=a(t,e.seg.end,e.seg);return function(e,t){r&&r.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt)}(e,t),s(n,e.primary)}function c(a,o){var s=n.create();function c(e){return s.findTransition((function(r){var n,a,i,o,s,l;return n=e,a=r.ev,i=n.seg.start,o=n.seg.end,s=a.seg.start,l=a.seg.end,(t.pointsCollinear(i,s,l)?t.pointsCollinear(o,s,l)?1:t.pointAboveOrOnLine(o,s,l)?1:-1:t.pointAboveOrOnLine(i,s,l)?1:-1)>0}))}function u(e,n){var a=e.seg,i=n.seg,o=a.start,s=a.end,c=i.start,u=i.end;r&&r.checkIntersection(a,i);var d=t.linesIntersect(o,s,c,u);if(!1===d){if(!t.pointsCollinear(o,s,c))return!1;if(t.pointsSame(o,u)||t.pointsSame(s,c))return!1;var p=t.pointsSame(o,c),h=t.pointsSame(s,u);if(p&&h)return n;var f=!p&&t.pointBetween(o,c,u),m=!h&&t.pointBetween(s,c,u);if(p)return m?l(n,s):l(e,u),n;f&&(h||(m?l(n,s):l(e,u)),l(n,o))}else 0===d.alongA&&(-1===d.alongB?l(e,c):0===d.alongB?l(e,d.pt):1===d.alongB&&l(e,u)),0===d.alongB&&(-1===d.alongA?l(n,o):0===d.alongA?l(n,d.pt):1===d.alongA&&l(n,s));return!1}for(var d=[];!i.isEmpty();){var p=i.getHead();if(r&&r.vert(p.pt[0]),p.isStart){r&&r.segmentNew(p.seg,p.primary);var h=c(p),f=h.before?h.before.ev:null,m=h.after?h.after.ev:null;function g(){if(f){var e=u(p,f);if(e)return e}return!!m&&u(p,m)}r&&r.tempStatus(p.seg,!!f&&f.seg,!!m&&m.seg);var v,y,b=g();if(b&&(e?(y=null===p.seg.myFill.below||p.seg.myFill.above!==p.seg.myFill.below)&&(b.seg.myFill.above=!b.seg.myFill.above):b.seg.otherFill=p.seg.myFill,r&&r.segmentUpdate(b.seg),p.other.remove(),p.remove()),i.getHead()!==p){r&&r.rewind(p.seg);continue}e?(y=null===p.seg.myFill.below||p.seg.myFill.above!==p.seg.myFill.below,p.seg.myFill.below=m?m.seg.myFill.above:a,p.seg.myFill.above=y?!p.seg.myFill.below:p.seg.myFill.below):null===p.seg.otherFill&&(v=m?p.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:p.primary?o:a,p.seg.otherFill={above:v,below:v}),r&&r.status(p.seg,!!f&&f.seg,!!m&&m.seg),p.other.status=h.insert(n.node({ev:p}))}else{var _=p.status;if(null===_)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(_.prev)&&s.exists(_.next)&&u(_.prev.ev,_.next.ev),r&&r.statusRemove(_.ev.seg),_.remove(),!p.primary){var x=p.seg.myFill;p.seg.myFill=p.seg.otherFill,p.seg.otherFill=x}d.push(p.seg)}i.getHead().remove()}return r&&r.done(),d}return e?{addRegion:function(e){for(var n,a,i,o=e[e.length-1],l=0;l<e.length;l++){n=o,o=e[l];var c=t.pointsCompare(n,o);0!==c&&s((a=c<0?n:o,i=c<0?o:n,{id:r?r.segmentId():-1,start:a,end:i,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(e){return c(e,!1)}}:{calculate:function(e,t,r,n){return e.forEach((function(e){s(a(e.start,e.end,e),!0)})),r.forEach((function(e){s(a(e.start,e.end,e),!1)})),c(t,n)}}}},{"./linked-list":479}],479:[function(e,t,r){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,a=e.root.next;null!==a;){if(r(a))return t.prev=a.prev,t.next=a,a.prev.next=t,void(a.prev=t);n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}},{}],480:[function(e,t,r){t.exports=function(e,t,r){var n=[],a=[];return e.forEach((function(e){var i=e.start,o=e.end;if(t.pointsSame(i,o))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{r&&r.chainStart(e);for(var s={index:0,matches_head:!1,matches_pt1:!1},l={index:0,matches_head:!1,matches_pt1:!1},c=s,u=0;u<n.length;u++){var d=(g=n[u])[0],p=(g[1],g[g.length-1]);if(g[g.length-2],t.pointsSame(d,i)){if(M(u,!0,!0))break}else if(t.pointsSame(d,o)){if(M(u,!0,!1))break}else if(t.pointsSame(p,i)){if(M(u,!1,!0))break}else if(t.pointsSame(p,o)&&M(u,!1,!1))break}if(c===s)return n.push([i,o]),void(r&&r.chainNew(i,o));if(c===l){r&&r.chainMatch(s.index);var h=s.index,f=s.matches_pt1?o:i,m=s.matches_head,g=n[h],v=m?g[0]:g[g.length-1],y=m?g[1]:g[g.length-2],b=m?g[g.length-1]:g[0],_=m?g[g.length-2]:g[1];return t.pointsCollinear(y,v,f)&&(m?(r&&r.chainRemoveHead(s.index,f),g.shift()):(r&&r.chainRemoveTail(s.index,f),g.pop()),v=y),t.pointsSame(b,f)?(n.splice(h,1),t.pointsCollinear(_,b,v)&&(m?(r&&r.chainRemoveTail(s.index,v),g.pop()):(r&&r.chainRemoveHead(s.index,v),g.shift())),r&&r.chainClose(s.index),void a.push(g)):void(m?(r&&r.chainAddHead(s.index,f),g.unshift(f)):(r&&r.chainAddTail(s.index,f),g.push(f)))}var x=s.index,w=l.index;r&&r.chainConnect(x,w);var k=n[x].length<n[w].length;s.matches_head?l.matches_head?k?(T(x),C(x,w)):(T(w),C(w,x)):C(w,x):l.matches_head?C(x,w):k?(T(x),C(w,x)):(T(w),C(x,w))}function M(e,t,r){return c.index=e,c.matches_head=t,c.matches_pt1=r,c===s?(c=l,!1):(c=null,!0)}function T(e){r&&r.chainReverse(e),n[e].reverse()}function C(e,a){var i=n[e],o=n[a],s=i[i.length-1],l=i[i.length-2],c=o[0],u=o[1];t.pointsCollinear(l,s,c)&&(r&&r.chainRemoveTail(e,s),i.pop(),s=l),t.pointsCollinear(s,c,u)&&(r&&r.chainRemoveHead(a,c),o.shift()),r&&r.chainJoin(e,a),n[e]=i.concat(o),n.splice(a,1)}})),a}},{}],481:[function(e,t,r){function n(e,t,r){var n=[];return e.forEach((function(e){var a=(e.myFill.above?8:0)+(e.myFill.below?4:0)+(e.otherFill&&e.otherFill.above?2:0)+(e.otherFill&&e.otherFill.below?1:0);0!==t[a]&&n.push({id:r?r.segmentId():-1,start:e.start,end:e.end,myFill:{above:1===t[a],below:2===t[a]},otherFill:null})})),r&&r.selected(n),n}var a={union:function(e,t){return n(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return n(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return n(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return n(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return n(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};t.exports=a},{}],482:[function(e,t,r){"use strict";var n=new Float64Array(4),a=new Float64Array(4),i=new Float64Array(4);t.exports=function(e,t,r,o,s){n.length<o.length&&(n=new Float64Array(o.length),a=new Float64Array(o.length),i=new Float64Array(o.length));for(var l=0;l<o.length;++l)n[l]=e[l]-o[l],a[l]=t[l]-e[l],i[l]=r[l]-e[l];var c=0,u=0,d=0,p=0,h=0,f=0;for(l=0;l<o.length;++l){var m=a[l],g=i[l],v=n[l];c+=m*m,u+=m*g,d+=g*g,p+=v*m,h+=v*g,f+=v*v}var y,b,_,x,w,k=Math.abs(c*d-u*u),M=u*h-d*p,T=u*p-c*h;if(M+T<=k)if(M<0)T<0&&p<0?(T=0,-p>=c?(M=1,y=c+2*p+f):y=p*(M=-p/c)+f):(M=0,h>=0?(T=0,y=f):-h>=d?(T=1,y=d+2*h+f):y=h*(T=-h/d)+f);else if(T<0)T=0,p>=0?(M=0,y=f):-p>=c?(M=1,y=c+2*p+f):y=p*(M=-p/c)+f;else{var C=1/k;y=(M*=C)*(c*M+u*(T*=C)+2*p)+T*(u*M+d*T+2*h)+f}else M<0?(_=d+h)>(b=u+p)?(x=_-b)>=(w=c-2*u+d)?(M=1,T=0,y=c+2*p+f):y=(M=x/w)*(c*M+u*(T=1-M)+2*p)+T*(u*M+d*T+2*h)+f:(M=0,_<=0?(T=1,y=d+2*h+f):h>=0?(T=0,y=f):y=h*(T=-h/d)+f):T<0?(_=c+p)>(b=u+h)?(x=_-b)>=(w=c-2*u+d)?(T=1,M=0,y=d+2*h+f):y=(M=1-(T=x/w))*(c*M+u*T+2*p)+T*(u*M+d*T+2*h)+f:(T=0,_<=0?(M=1,y=c+2*p+f):p>=0?(M=0,y=f):y=p*(M=-p/c)+f):(x=d+h-u-p)<=0?(M=0,T=1,y=d+2*h+f):x>=(w=c-2*u+d)?(M=1,T=0,y=c+2*p+f):y=(M=x/w)*(c*M+u*(T=1-M)+2*p)+T*(u*M+d*T+2*h)+f;var S=1-M-T;for(l=0;l<o.length;++l)s[l]=S*e[l]+M*t[l]+T*r[l];return y<0?0:y}},{}],483:[function(e,t,r){var n,a,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var c,u=[],d=!1,p=-1;function h(){d&&c&&(d=!1,c.length?u=c.concat(u):p=-1,u.length&&f())}function f(){if(!d){var e=l(h);d=!0;for(var t=u.length;t;){for(c=u,u=[];++p<t;)c&&c[p].run();p=-1,t=u.length}c=null,d=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new m(e,t)),1!==u.length||d||l(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],484:[function(e,t,r){t.exports=e("gl-quat/slerp")},{"gl-quat/slerp":295}],485:[function(e,r,n){(function(t){for(var n=e("performance-now"),a="undefined"==typeof window?t:window,i=["moz","webkit"],o="AnimationFrame",s=a["request"+o],l=a["cancel"+o]||a["cancelRequest"+o],c=0;!s&&c<i.length;c++)s=a[i[c]+"Request"+o],l=a[i[c]+"Cancel"+o]||a[i[c]+"CancelRequest"+o];if(!s||!l){var u=0,d=0,p=[];s=function(e){if(0===p.length){var t=n(),r=Math.max(0,1e3/60-(t-u));u=r+t,setTimeout((function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(u)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(r))}return p.push({handle:++d,callback:e,cancelled:!1}),d},l=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}r.exports=function(e){return s.call(a,e)},r.exports.cancel=function(){l.apply(a,arguments)},r.exports.polyfill=function(e){e||(e=a),e.requestAnimationFrame=s,e.cancelAnimationFrame=l}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":463}],486:[function(e,t,r){"use strict";var n=e("big-rat/add");t.exports=function(e,t){for(var r=e.length,a=new Array(r),i=0;i<r;++i)a[i]=n(e[i],t[i]);return a}},{"big-rat/add":76}],487:[function(e,t,r){"use strict";t.exports=function(e){for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=n(e[r]);return t};var n=e("big-rat")},{"big-rat":79}],488:[function(e,t,r){"use strict";var n=e("big-rat"),a=e("big-rat/mul");t.exports=function(e,t){for(var r=n(t),i=e.length,o=new Array(i),s=0;s<i;++s)o[s]=a(e[s],r);return o}},{"big-rat":79,"big-rat/mul":88}],489:[function(e,t,r){"use strict";var n=e("big-rat/sub");t.exports=function(e,t){for(var r=e.length,a=new Array(r),i=0;i<r;++i)a[i]=n(e[i],t[i]);return a}},{"big-rat/sub":90}],490:[function(e,t,r){"use strict";var n=e("compare-cell"),a=e("compare-oriented-cell"),i=e("cell-orientation");t.exports=function(e){e.sort(a);for(var t=e.length,r=0,o=0;o<t;++o){var s=e[o],l=i(s);if(0!==l){if(r>0){var c=e[r-1];if(0===n(s,c)&&i(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},{"cell-orientation":113,"compare-cell":129,"compare-oriented-cell":130}],491:[function(e,t,r){"use strict";var n=e("array-bounds"),a=e("color-normalize"),i=e("update-diff"),o=e("pick-by-alias"),s=e("object-assign"),l=e("flatten-vertex-data"),c=e("to-float32"),u=c.float32,d=c.fract32;t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,h,f,m,g,v=e._gl,y={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},b=[];return f=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),h=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"static",type:"float",data:p}),k(t),r=e({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]}},attributes:{color:{buffer:f,offset:function(e,t){return 4*t.offset},divisor:1},position:{buffer:c,offset:function(e,t){return 8*t.offset},divisor:1},positionFract:{buffer:h,offset:function(e,t){return 8*t.offset},divisor:1},error:{buffer:m,offset:function(e,t){return 16*t.offset},divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:p.length}),s(_,{update:k,draw:x,destroy:M,regl:e,gl:v,canvas:v.canvas,groups:b}),_;function _(e){e?k(e):null===e&&M(),x()}function x(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),b.forEach((function(e,r){e&&(t&&(t[r]?e.draw=!0:e.draw=!1),e.draw?w(r):e.draw=!0)}))}function w(e){"number"==typeof e&&(e=b[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],r(e),e.after&&e.after(e))}function k(e){if(e){null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var t=0,r=0;if(_.groups=b=e.map((function(e,c){var u=b[c];return e?("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=o(e,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(b[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=s({},y,e)),i(u,e,[{lineWidth:function(e){return.5*+e},capSize:function(e){return.5*+e},opacity:parseFloat,errors:function(e){return e=l(e),r+=e.length,e},positions:function(e,r){return e=l(e,"float64"),r.count=Math.floor(e.length/2),r.bounds=n(e,2),r.offset=t,t+=r.count,e}},{color:function(e,t){var r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){var n=e;e=Array(r);for(var i=0;i<r;i++)e[i]=n}if(e.length<r)throw Error("Not enough colors");for(var o=new Uint8Array(4*r),s=0;s<r;s++){var l=a(e[s],"uint8");o.set(l,4*s)}return o},range:function(e,t,r){var n=t.bounds;return e||(e=n),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=d(t.scale),t.translateFract=d(t.translate),e},viewport:function(e){var t;return Array.isArray(e)?t={x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}:e?(t={x:e.x||e.left||0,y:e.y||e.top||0},e.right?t.width=e.right-t.x:t.width=e.w||e.width||0,e.bottom?t.height=e.bottom-t.y:t.height=e.h||e.height||0):t={x:0,y:0,width:v.drawingBufferWidth,height:v.drawingBufferHeight},t}}]),u):u})),t||r){var p=b.reduce((function(e,t,r){return e+(t?t.count:0)}),0),g=new Float64Array(2*p),x=new Uint8Array(4*p),w=new Float32Array(4*p);b.forEach((function(e,t){if(e){var r=e.positions,n=e.count,a=e.offset,i=e.color,o=e.errors;n&&(x.set(i,4*a),w.set(o,4*a),g.set(r,2*a))}})),c(u(g)),h(d(g)),f(x),m(w)}}}function M(){c.destroy(),h.destroy(),f.destroy(),m.destroy(),g.destroy()}};var p=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]},{"array-bounds":67,"color-normalize":121,"flatten-vertex-data":229,"object-assign":455,"pick-by-alias":466,"to-float32":536,"update-diff":547}],492:[function(e,t,r){"use strict";var n=e("color-normalize"),a=e("array-bounds"),i=e("object-assign"),o=e("glslify"),s=e("pick-by-alias"),l=e("flatten-vertex-data"),c=e("earcut"),u=e("array-normalize"),d=e("to-float32"),p=d.float32,h=d.fract32,f=e("es6-weak-map"),m=e("parse-rect");function g(e,t){if(!(this instanceof g))return new g(e,t);if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=g.shaders.has(e)?g.shaders.get(e):g.shaders.set(e,g.createShaders(e)).get(e),this.update(t)}t.exports=g,g.dashMult=2,g.maxPatternLength=256,g.precisionThreshold=3e6,g.maxPoints=1e4,g.maxLines=2048,g.shaders=new f,g.createShaders=function(e){var t,r=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),n={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:function(e,t){return"round"===t.join?2:1},miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashPattern:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashSize:e.prop("dashLength"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:function(e,t){return!t.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},a=e(i({vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n       + positionFract * scale + translateFract\n       + position * scaleFract\n       + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\n\nuniform float dashSize, pixelRatio, thickness, opacity, id;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},n));try{t=e(i({cull:{enable:!0,face:"back"},vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n  return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n  vec2 adjustedScale;\n  adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n  adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n  vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) <  length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) <  length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position  * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x)  / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(e){t=a}return{fill:e({primitive:"triangle",elements:function(e,t){return t.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n       + positionFract * scale + translateFract\n       + position * scaleFract\n       + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:function(e,t){return[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]}},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:a,miter:t}},g.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},g.prototype.render=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];t.length&&(e=this).update.apply(e,t),this.draw()},g.prototype.draw=function(){for(var e=this,t=[],r=arguments.length;r--;)t[r]=arguments[r];return(t.length?t:this.passes).forEach((function(t,r){var n;if(t&&Array.isArray(t))return(n=e).draw.apply(n,t);"number"==typeof t&&(t=e.passes[t]),t&&t.count>1&&t.opacity&&(e.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&e.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>g.precisionThreshold||t.scale[1]*t.viewport.height>g.precisionThreshold?e.shaders.rect(t):"rect"===t.join||!t.join&&(t.thickness<=2||t.count>=g.maxPoints)?e.shaders.rect(t):e.shaders.miter(t)))})),this},g.prototype.update=function(e){var t=this;if(e){null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);var r=this.regl,o=this.gl;if(e.forEach((function(e,d){var f=t.passes[d];if(void 0!==e)if(null!==e){if("number"==typeof e[0]&&(e={positions:e}),e=s(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow"}),f||(t.passes[d]=f={id:d,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=i({},g.defaults,e)),null!=e.thickness&&(f.thickness=parseFloat(e.thickness)),null!=e.opacity&&(f.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(f.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(f.overlay=!!e.overlay,d<g.maxLines&&(f.depth=2*(g.maxLines-1-d%g.maxLines)/g.maxLines-1)),null!=e.join&&(f.join=e.join),null!=e.hole&&(f.hole=e.hole),null!=e.fill&&(f.fill=e.fill?n(e.fill,"uint8"):null),null!=e.viewport&&(f.viewport=m(e.viewport)),f.viewport||(f.viewport=m([o.drawingBufferWidth,o.drawingBufferHeight])),null!=e.close&&(f.close=e.close),null===e.positions&&(e.positions=[]),e.positions){var v,y;if(e.positions.x&&e.positions.y){var b=e.positions.x,_=e.positions.y;y=f.count=Math.max(b.length,_.length),v=new Float64Array(2*y);for(var x=0;x<y;x++)v[2*x]=b[x],v[2*x+1]=_[x]}else v=l(e.positions,"float64"),y=f.count=Math.floor(v.length/2);var w=f.bounds=a(v,2);if(f.fill){for(var k=[],M={},T=0,C=0,S=0,L=f.count;C<L;C++){var A=v[2*C],E=v[2*C+1];isNaN(A)||isNaN(E)||null==A||null==E?(A=v[2*T],E=v[2*T+1],M[C]=T):T=C,k[S++]=A,k[S++]=E}for(var D=c(k,f.hole||[]),I=0,P=D.length;I<P;I++)null!=M[D[I]]&&(D[I]=M[D[I]]);f.triangles=D}var O=new Float64Array(v);u(O,2,w);var R=new Float64Array(2*y+6);f.close?v[0]===v[2*y-2]&&v[1]===v[2*y-1]?(R[0]=O[2*y-4],R[1]=O[2*y-3]):(R[0]=O[2*y-2],R[1]=O[2*y-1]):(R[0]=O[0],R[1]=O[1]),R.set(O,2),f.close?v[0]===v[2*y-2]&&v[1]===v[2*y-1]?(R[2*y+2]=O[2],R[2*y+3]=O[3],f.count-=1):(R[2*y+2]=O[0],R[2*y+3]=O[1],R[2*y+4]=O[2],R[2*y+5]=O[3]):(R[2*y+2]=O[2*y-2],R[2*y+3]=O[2*y-1],R[2*y+4]=O[2*y-2],R[2*y+5]=O[2*y-1]),f.positionBuffer(p(R)),f.positionFractBuffer(h(R))}if(e.range?f.range=e.range:f.range||(f.range=f.bounds),(e.range||e.positions)&&f.count){var F=f.bounds,z=F[2]-F[0],N=F[3]-F[1],j=f.range[2]-f.range[0],B=f.range[3]-f.range[1];f.scale=[z/j,N/B],f.translate=[-f.range[0]/j+F[0]/j||0,-f.range[1]/B+F[1]/B||0],f.scaleFract=h(f.scale),f.translateFract=h(f.translate)}if(e.dashes){var Y,H=0;if(!e.dashes||e.dashes.length<2)H=1,Y=new Uint8Array([255,255,255,255,255,255,255,255]);else{H=0;for(var V=0;V<e.dashes.length;++V)H+=e.dashes[V];Y=new Uint8Array(H*g.dashMult);for(var U=0,W=255,G=0;G<2;G++)for(var q=0;q<e.dashes.length;++q){for(var K=0,X=e.dashes[q]*g.dashMult*.5;K<X;++K)Y[U++]=W;W^=255}}f.dashLength=H,f.dashTexture({channels:1,data:Y,width:Y.length,height:1,mag:"linear",min:"linear"},0,0)}if(e.color){var Z=f.count,J=e.color;J||(J="transparent");var $=new Uint8Array(4*Z+4);if(Array.isArray(J)&&"number"!=typeof J[0]){for(var Q=0;Q<Z;Q++){var ee=n(J[Q],"uint8");$.set(ee,4*Q)}$.set(n(J[0],"uint8"),4*Z)}else for(var te=n(J,"uint8"),re=0;re<Z+1;re++)$.set(te,4*re);f.colorBuffer({usage:"dynamic",type:"uint8",data:$})}}else t.passes[d]=null})),e.length<this.passes.length){for(var d=e.length;d<this.passes.length;d++){var f=t.passes[d];f&&(f.colorBuffer.destroy(),f.positionBuffer.destroy(),f.dashTexture.destroy())}this.passes.length=e.length}for(var v=[],y=0;y<this.passes.length;y++)null!==t.passes[y]&&v.push(t.passes[y]);return this.passes=v,this}},g.prototype.destroy=function(){return this.passes.forEach((function(e){e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()})),this.passes.length=0,this}},{"array-bounds":67,"array-normalize":493,"color-normalize":121,earcut:172,"es6-weak-map":494,"flatten-vertex-data":229,glslify:410,"object-assign":455,"parse-rect":460,"pick-by-alias":466,"to-float32":536}],493:[function(e,t,r){"use strict";var n=e("array-bounds");t.exports=function(e,t,r){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1),null==r&&(r=n(e,t));for(var a=0;a<t;a++){var i=r[t+a],o=r[a],s=a,l=e.length;if(i===1/0&&o===-1/0)for(s=a;s<l;s+=t)e[s]=e[s]===i?1:e[s]===o?0:.5;else if(i===1/0)for(s=a;s<l;s+=t)e[s]=e[s]===i?1:0;else if(o===-1/0)for(s=a;s<l;s+=t)e[s]=e[s]===o?0:1;else{var c=i-o;for(s=a;s<l;s+=t)isNaN(e[s])||(e[s]=0===c?.5:(e[s]-o)/c)}}return e}},{"array-bounds":67}],494:[function(e,t,r){arguments[4][319][0].apply(r,arguments)},{"./is-implemented":495,"./polyfill":497,dup:319}],495:[function(e,t,r){arguments[4][320][0].apply(r,arguments)},{dup:320}],496:[function(e,t,r){arguments[4][321][0].apply(r,arguments)},{dup:321}],497:[function(e,t,r){arguments[4][322][0].apply(r,arguments)},{"./is-native-implemented":496,d:152,dup:322,"es5-ext/object/is-value":196,"es5-ext/object/set-prototype-of":202,"es5-ext/object/valid-object":206,"es5-ext/object/valid-value":207,"es5-ext/string/random-uniq":212,"es6-iterator/for-of":214,"es6-iterator/get":215,"es6-symbol":221}],498:[function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var i=e("color-normalize"),o=e("array-bounds"),s=e("color-id"),l=e("point-cluster"),c=e("object-assign"),u=e("glslify"),d=e("pick-by-alias"),p=e("update-diff"),h=e("flatten-vertex-data"),f=e("is-iexplorer"),m=e("to-float32"),g=e("parse-rect"),v=y;function y(e,t){var r=this;if(!(this instanceof y))return new y(e,t);"function"==typeof e?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t);var n,a=(e=t.regl)._gl,i=[];this.tooManyColors=f,n=e.texture({data:new Uint8Array(1020),width:255,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),c(this,{regl:e,gl:a,groups:[],markerCache:[null],markerTextures:[null],palette:i,paletteIds:{},paletteTexture:n,maxColors:255,maxSize:100,canvas:a.canvas}),this.update(t);var o={uniforms:{pixelRatio:e.context("pixelRatio"),palette:n,paletteSize:function(e,t){return[r.tooManyColors?0:255,n.height]},scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),opacity:e.prop("opacity"),marker:e.prop("markerTexture")},attributes:{x:function(e,t){return t.xAttr||{buffer:t.positionBuffer,stride:8,offset:0}},y:function(e,t){return t.yAttr||{buffer:t.positionBuffer,stride:8,offset:4}},xFract:function(e,t){return t.xAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:0}},yFract:function(e,t){return t.yAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:4}},size:function(e,t){return t.size.length?{buffer:t.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*t.size/r.maxSize)]}},borderSize:function(e,t){return t.borderSize.length?{buffer:t.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*t.borderSize/r.maxSize)]}},colorId:function(e,t){return t.color.length?{buffer:t.colorBuffer,stride:r.tooManyColors?8:4,offset:0}:{constant:r.tooManyColors?i.slice(4*t.color,4*t.color+4):[t.color]}},borderColorId:function(e,t){return t.borderColor.length?{buffer:t.colorBuffer,stride:r.tooManyColors?8:4,offset:r.tooManyColors?4:2}:{constant:r.tooManyColors?i.slice(4*t.borderColor,4*t.borderColor+4):[t.borderColor]}},isActive:function(e,t){return!0===t.activation?{constant:[1]}:t.activation?t.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},s=c({},o);s.frag=u(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragWidth, fragBorderColorLevel, fragColorLevel;\n\nuniform sampler2D marker;\nuniform float pixelRatio, opacity;\n\nfloat smoothStep(float x, float y) {\n  return 1.0 / (1.0 + exp(50.0*(x - y)));\n}\n\nvoid main() {\n  float dist = texture2D(marker, gl_PointCoord).r, delta = fragWidth;\n\n  // max-distance alpha\n  if (dist < 0.003) discard;\n\n  // null-border case\n  if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) {\n    float colorAmt = smoothstep(.5 - delta, .5 + delta, dist);\n    gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity);\n  }\n  else {\n    float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist);\n    float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist);\n\n    vec4 color = fragBorderColor;\n    color.a *= borderColorAmt;\n    color = mix(color, fragColor, colorAmt);\n    color.a *= opacity;\n\n    gl_FragColor = color;\n  }\n\n}\n"]),s.vert=u(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract, paletteSize;\nuniform float pixelRatio;\nuniform sampler2D palette;\n\nconst float maxSize = 100.;\nconst float borderLevel = .5;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n  return isDirect ? id / 255. : texture2D(palette,\n    vec2(\n      (id.x + .5) / paletteSize.x,\n      (id.y + .5) / paletteSize.y\n    )\n  );\n}\n\nvoid main() {\n  if (isActive == 0.) return;\n\n  vec2 position = vec2(x, y);\n  vec2 positionFract = vec2(xFract, yFract);\n\n  vec4 color = getColor(colorId);\n  vec4 borderColor = getColor(borderColorId);\n\n  float size = size * maxSize / 255.;\n  float borderSize = borderSize * maxSize / 255.;\n\n  gl_PointSize = 2. * size * pixelRatio;\n  fragPointSize = size * pixelRatio;\n\n  vec2 pos = (position + translate) * scale\n      + (positionFract + translateFract) * scale\n      + (position + translate) * scaleFract\n      + (positionFract + translateFract) * scaleFract;\n\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n  fragColor = color;\n  fragBorderColor = borderColor;\n  fragWidth = 1. / gl_PointSize;\n\n  fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);\n  fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);\n}"]),this.drawMarker=e(s);var l=c({},o);l.frag=u(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor, fragBorderColor;\n\nuniform float opacity;\nvarying float fragBorderRadius, fragWidth;\n\nfloat smoothStep(float edge0, float edge1, float x) {\n\tfloat t;\n\tt = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n\treturn t * t * (3.0 - 2.0 * t);\n}\n\nvoid main() {\n\tfloat radius, alpha = 1.0, delta = fragWidth;\n\n\tradius = length(2.0 * gl_PointCoord.xy - 1.0);\n\n\tif (radius > 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=u(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n  return isDirect ? id / 255. : texture2D(palette,\n    vec2(\n      (id.x + .5) / paletteSize.x,\n      (id.y + .5) / paletteSize.y\n    )\n  );\n}\n\nvoid main() {\n  // ignore inactive points\n  if (isActive == 0.) return;\n\n  vec2 position = vec2(x, y);\n  vec2 positionFract = vec2(xFract, yFract);\n\n  vec4 color = getColor(colorId);\n  vec4 borderColor = getColor(borderColorId);\n\n  float size = size * maxSize / 255.;\n  float borderSize = borderSize * maxSize / 255.;\n\n  gl_PointSize = (size + borderSize) * pixelRatio;\n\n  vec2 pos = (position + translate) * scale\n      + (positionFract + translateFract) * scale\n      + (position + translate) * scaleFract\n      + (positionFract + translateFract) * scaleFract;\n\n  gl_Position = vec4(pos * 2. - 1., 0, 1);\n\n  fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n  fragColor = color;\n  fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n  fragWidth = 1. / gl_PointSize;\n}\n"]),f&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(l)}y.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},y.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},y.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=this.groups;if(1===r.length&&Array.isArray(r[0])&&(null===r[0][0]||Array.isArray(r[0][0]))&&(r=r[0]),this.regl._refresh(),r.length)for(var i=0;i<r.length;i++)this.drawItem(i,r[i]);else a.forEach((function(t,r){e.drawItem(r)}));return this},y.prototype.drawItem=function(e,t){var r=this.groups,n=r[e];if("number"==typeof t&&(e=t,n=r[t],t=null),n&&n.count&&n.opacity){n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,t));for(var i=[],o=1;o<n.activation.length;o++)n.activation[o]&&(!0===n.activation[o]||n.activation[o].data.length)&&i.push.apply(i,a(this.getMarkerDrawOptions(o,n,t)));i.length&&this.drawMarker(i)}},y.prototype.getMarkerDrawOptions=function(e,t,r){var a=t.range,i=t.tree,o=t.viewport,s=t.activation,l=t.selectionBuffer,u=t.count;if(this.regl,!i)return r?[c({},t,{markerTexture:this.markerTextures[e],activation:s[e],count:r.length,elements:r,offset:0})]:[c({},t,{markerTexture:this.markerTextures[e],activation:s[e],offset:0})];var d=[],p=i.range(a,{lod:!0,px:[(a[2]-a[0])/o.width,(a[3]-a[1])/o.height]});if(r){for(var h=s[e].data,f=new Uint8Array(u),m=0;m<r.length;m++){var g=r[m];f[g]=h?h[g]:1}l.subdata(f)}for(var v=p.length;v--;){var y=n(p[v],2),b=y[0],_=y[1];d.push(c({},t,{markerTexture:this.markerTextures[e],activation:r?l:s[e],offset:b,count:_-b}))}return d},y.prototype.update=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length){1===r.length&&Array.isArray(r[0])&&(r=r[0]);var a=this.groups,i=this.gl,s=this.regl,u=this.maxSize,f=this.maxColors,v=this.palette;this.groups=a=r.map((function(t,r){var n=a[r];if(void 0===t)return n;null===t?t={positions:null}:"function"==typeof t?t={ondraw:t}:"number"==typeof t[0]&&(t={positions:t}),null===(t=d(t,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"})).positions&&(t.positions=[]),null!=t.tooManyColors&&(e.tooManyColors=t.tooManyColors),n||(a[r]=n={id:r,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:s.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:s.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:s.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:s.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:s.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},t=c({},y.defaults,t)),!t.positions||"marker"in t||(t.marker=n.marker,delete n.marker),!t.marker||"positions"in t||(t.positions=n.positions,delete n.positions);var b=0,_=0;if(p(n,t,[{snap:!0,size:function(e,t){return null==e&&(e=y.defaults.size),b+=e&&e.length?1:0,e},borderSize:function(e,t){return null==e&&(e=y.defaults.borderSize),b+=e&&e.length?1:0,e},opacity:parseFloat,color:function(t,r){return null==t&&(t=y.defaults.color),t=e.updateColor(t),_++,t},borderColor:function(t,r){return null==t&&(t=y.defaults.borderColor),t=e.updateColor(t),_++,t},bounds:function(e,t,r){return"range"in r||(r.range=null),e},positions:function(e,t,r){var n=t.snap,a=t.positionBuffer,i=t.positionFractBuffer,c=t.selectionBuffer;if(e.x||e.y)return e.x.length?t.xAttr={buffer:s.buffer(e.x),offset:0,stride:4,count:e.x.length}:t.xAttr={buffer:e.x.buffer,offset:4*e.x.offset||0,stride:4*(e.x.stride||1),count:e.x.count},e.y.length?t.yAttr={buffer:s.buffer(e.y),offset:0,stride:4,count:e.y.length}:t.yAttr={buffer:e.y.buffer,offset:4*e.y.offset||0,stride:4*(e.y.stride||1),count:e.y.count},t.count=Math.max(t.xAttr.count,t.yAttr.count),e;e=h(e,"float64");var u=t.count=Math.floor(e.length/2),d=t.bounds=u?o(e,2):null;if(r.range||t.range||(delete t.range,r.range=d),r.marker||t.marker||(delete t.marker,r.marker=null),n&&(!0===n||u>n)?t.tree=l(e,{bounds:d}):n&&n.length&&(t.tree=n),t.tree){var p={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(p):t.elements=s.elements(p)}return a({data:m.float(e),usage:"dynamic"}),i({data:m.fract(e),usage:"dynamic"}),c({data:new Uint8Array(u),type:"uint8",usage:"stream"}),e}},{marker:function(t,r,n){var a=r.activation;if(a.forEach((function(e){return e&&e.destroy&&e.destroy()})),a.length=0,t&&"number"!=typeof t[0]){for(var i=[],o=0,l=Math.min(t.length,r.count);o<l;o++){var c=e.addMarker(t[o]);i[c]||(i[c]=new Uint8Array(r.count)),i[c][o]=1}for(var u=0;u<i.length;u++)if(i[u]){var d={data:i[u],type:"uint8",usage:"static"};a[u]?a[u](d):a[u]=s.buffer(d),a[u].data=i[u]}}else a[e.addMarker(t)]=!0;return t},range:function(e,t,r){var n=t.bounds;if(n)return e||(e=n),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=m.fract(t.scale),t.translateFract=m.fract(t.translate),e},viewport:function(e){return g(e||[i.drawingBufferWidth,i.drawingBufferHeight])}}]),b){var x=n,w=x.count,k=x.size,M=x.borderSize,T=x.sizeBuffer,C=new Uint8Array(2*w);if(k.length||M.length)for(var S=0;S<w;S++)C[2*S]=Math.round(255*(null==k[S]?k:k[S])/u),C[2*S+1]=Math.round(255*(null==M[S]?M:M[S])/u);T({data:C,usage:"dynamic"})}if(_){var L,A=n,E=A.count,D=A.color,I=A.borderColor,P=A.colorBuffer;if(e.tooManyColors){if(D.length||I.length){L=new Uint8Array(8*E);for(var O=0;O<E;O++){var R=D[O];L[8*O]=v[4*R],L[8*O+1]=v[4*R+1],L[8*O+2]=v[4*R+2],L[8*O+3]=v[4*R+3];var F=I[O];L[8*O+4]=v[4*F],L[8*O+5]=v[4*F+1],L[8*O+6]=v[4*F+2],L[8*O+7]=v[4*F+3]}}}else if(D.length||I.length){L=new Uint8Array(4*E+2);for(var z=0;z<E;z++)null!=D[z]&&(L[4*z]=D[z]%f,L[4*z+1]=Math.floor(D[z]/f)),null!=I[z]&&(L[4*z+2]=I[z]%f,L[4*z+3]=Math.floor(I[z]/f))}P({data:L||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return n}))}},y.prototype.addMarker=function(e){var t,r=this.markerTextures,n=this.regl,a=this.markerCache,i=null==e?0:a.indexOf(e);if(i>=0)return i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(var o=0,s=e.length;o<s;o++)t[o]=255*e[o]}var l=Math.floor(Math.sqrt(t.length));return i=r.length,a.push(e),r.push(n.texture({channels:1,data:t,radius:l,mag:"linear",min:"linear"})),i},y.prototype.updateColor=function(e){var t=this.paletteIds,r=this.palette,n=this.maxColors;Array.isArray(e)||(e=[e]);var a=[];if("number"==typeof e[0]){var o=[];if(Array.isArray(e))for(var l=0;l<e.length;l+=4)o.push(e.slice(l,l+4));else for(var c=0;c<e.length;c+=4)o.push(e.subarray(c,c+4));e=o}for(var u=0;u<e.length;u++){var d=e[u];d=i(d,"uint8");var p=s(d,!1);if(null==t[p]){var h=r.length;t[p]=Math.floor(h/4),r[h]=d[0],r[h+1]=d[1],r[h+2]=d[2],r[h+3]=d[3]}a[u]=t[p]}return!this.tooManyColors&&r.length>4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===a.length?a[0]:a},y.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*e.length/t);if(n>1)for(var a=.25*(e=e.slice()).length%t;a<n*t;a++)e.push(0,0,0,0);r.height<n&&r.resize(t,n),r.subimage({width:Math.min(.25*e.length,t),height:n,data:e},0,0)}},y.prototype.destroy=function(){return this.groups.forEach((function(e){e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach((function(e){return e&&e.destroy&&e.destroy()})),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()})),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach((function(e){return e&&e.destroy&&e.destroy()})),this};var b=e("object-assign");t.exports=function(e,t){var r=new v(e,t),n=r.render.bind(r);return b(n,{render:n,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),n}},{"array-bounds":67,"color-id":119,"color-normalize":121,"flatten-vertex-data":229,glslify:410,"is-iexplorer":420,"object-assign":455,"parse-rect":460,"pick-by-alias":466,"point-cluster":470,"to-float32":536,"update-diff":547}],499:[function(e,t,r){"use strict";var n=e("regl-scatter2d"),a=e("pick-by-alias"),i=e("array-bounds"),o=e("raf"),s=e("array-range"),l=e("parse-rect"),c=e("flatten-vertex-data");function u(e,t){if(!(this instanceof u))return new u(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=n(e),this.canvas=this.scatter.canvas}function d(e,t,r){return(null!=e.id?e.id:e)<<16|(255&t)<<8|255&r}function p(e,t,r){var n,a,i,o,s=e[t],l=e[r];return s.length>2?(s[0],s[2],n=s[1],a=s[3]):s.length?(n=s[0],a=s[1]):(s.x,n=s.y,s.x,s.width,a=s.y+s.height),l.length>2?(i=l[0],o=l[2],l[1],l[3]):l.length?(i=l[0],o=l[1]):(i=l.x,l.y,o=l.x+l.width,l.y,l.height),[i,n,o,a]}function h(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];var t=l(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}t.exports=u,u.prototype.render=function(){for(var e,t=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(e=this).update.apply(e,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){t.draw(),t.dirty=!0,t.planned=null}))):(this.draw(),this.dirty=!0,o((function(){t.dirty=!1}))),this)},u.prototype.update=function(){for(var e,t=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];if(r.length){for(var a=0;a<r.length;a++)t.updateItem(a,r[a]);this.traces=this.traces.filter(Boolean);for(var i=[],o=0,s=0;s<this.traces.length;s++){for(var l=t.traces[s],c=t.traces[s].passes,u=0;u<c.length;u++)i.push(t.passes[c[u]]);l.passOffset=o,o+=l.passes.length}return(e=this.scatter).update.apply(e,i),this}},u.prototype.updateItem=function(e,t){var r=this.regl;if(null===t)return this.traces[e]=null,this;if(!t)return this;var n,o=a(t,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),s=this.traces[e]||(this.traces[e]={id:e,buffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:l([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=o.color&&(s.color=o.color),null!=o.size&&(s.size=o.size),null!=o.marker&&(s.marker=o.marker),null!=o.borderColor&&(s.borderColor=o.borderColor),null!=o.borderSize&&(s.borderSize=o.borderSize),null!=o.opacity&&(s.opacity=o.opacity),o.viewport&&(s.viewport=l(o.viewport)),null!=o.diagonal&&(s.diagonal=o.diagonal),null!=o.upper&&(s.upper=o.upper),null!=o.lower&&(s.lower=o.lower),o.data){s.buffer(c(o.data)),s.columns=o.data.length,s.count=o.data[0].length,s.bounds=[];for(var u=0;u<s.columns;u++)s.bounds[u]=i(o.data[u],1)}o.range&&(s.range=o.range,n=s.range&&"number"!=typeof s.range[0]),o.domain&&(s.domain=o.domain);var f=!1;null!=o.padding&&(Array.isArray(o.padding)&&o.padding.length===s.columns&&"number"==typeof o.padding[o.padding.length-1]?(s.padding=o.padding.map(h),f=!0):s.padding=h(o.padding));var m=s.columns,g=s.count,v=s.viewport.width,y=s.viewport.height,b=s.viewport.x,_=s.viewport.y,x=v/m,w=y/m;s.passes=[];for(var k=0;k<m;k++)for(var M=0;M<m;M++)if((s.diagonal||M!==k)&&(s.upper||!(k>M))&&(s.lower||!(k<M))){var T=d(s.id,k,M),C=this.passes[T]||(this.passes[T]={});if(o.data&&(o.transpose?C.positions={x:{buffer:s.buffer,offset:M,count:g,stride:m},y:{buffer:s.buffer,offset:k,count:g,stride:m}}:C.positions={x:{buffer:s.buffer,offset:M*g,count:g},y:{buffer:s.buffer,offset:k*g,count:g}},C.bounds=p(s.bounds,k,M)),o.domain||o.viewport||o.data){var S=f?p(s.padding,k,M):s.padding;if(s.domain){var L=p(s.domain,k,M),A=L[0],E=L[1],D=L[2],I=L[3];C.viewport=[b+A*v+S[0],_+E*y+S[1],b+D*v-S[2],_+I*y-S[3]]}else C.viewport=[b+M*x+x*S[0],_+k*w+w*S[1],b+(M+1)*x-x*S[2],_+(k+1)*w-w*S[3]]}o.color&&(C.color=s.color),o.size&&(C.size=s.size),o.marker&&(C.marker=s.marker),o.borderSize&&(C.borderSize=s.borderSize),o.borderColor&&(C.borderColor=s.borderColor),o.opacity&&(C.opacity=s.opacity),o.range&&(C.range=n?p(s.range,k,M):s.range||C.bounds),s.passes.push(T)}return this},u.prototype.draw=function(){for(var e,t=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];if(r.length){for(var a=[],i=0;i<r.length;i++)if("number"==typeof r[i]){var o=t.traces[r[i]],l=o.passes,c=o.passOffset;a.push.apply(a,s(c,c+l.length))}else if(r[i].length){var u=r[i],d=t.traces[i],p=d.passes,h=d.passOffset;p=p.map((function(e,t){a[h+t]=u}))}(e=this.scatter).draw.apply(e,a)}else this.scatter.draw();return this},u.prototype.destroy=function(){return this.traces.forEach((function(e){e.buffer&&e.buffer.destroy&&e.buffer.destroy()})),this.traces=null,this.passes=null,this.scatter.destroy(),this}},{"array-bounds":67,"array-range":68,"flatten-vertex-data":229,"parse-rect":460,"pick-by-alias":466,raf:485,"regl-scatter2d":498}],500:[function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?t.exports=n():e.createREGL=n()}(this,(function(){function e(e,t){this.id=Y++,this.type=e,this.data=t}function t(e){return"["+function e(t){if(0===t.length)return[];var r=t.charAt(0),n=t.charAt(t.length-1);if(1<t.length&&r===n&&('"'===r||"'"===r))return['"'+t.substr(1,t.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(r=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t))return e(t.substr(0,r.index)).concat(e(r[1])).concat(e(t.substr(r.index+r[0].length)));if(1===(r=t.split(".")).length)return['"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(t=[],n=0;n<r.length;++n)t=t.concat(e(r[n]));return t}(e).join("][")+"]"}function r(e){return"string"==typeof e?e.split():e}function n(e){return"string"==typeof e?document.querySelector(e):e}function a(e){var t,a,i,o,s=e||{};e={};var l=[],c=[],u="undefined"==typeof window?1:window.devicePixelRatio,d=!1,p=function(e){},h=function(){};if("string"==typeof s?t=document.querySelector(s):"object"==typeof s&&("string"==typeof s.nodeName&&"function"==typeof s.appendChild&&"function"==typeof s.getBoundingClientRect?t=s:"function"==typeof s.drawArrays||"function"==typeof s.drawElements?i=(o=s).canvas:("gl"in s?o=s.gl:"canvas"in s?i=n(s.canvas):"container"in s&&(a=n(s.container)),"attributes"in s&&(e=s.attributes),"extensions"in s&&(l=r(s.extensions)),"optionalExtensions"in s&&(c=r(s.optionalExtensions)),"onDone"in s&&(p=s.onDone),"profile"in s&&(d=!!s.profile),"pixelRatio"in s&&(u=+s.pixelRatio))),t&&("canvas"===t.nodeName.toLowerCase()?i=t:a=t),!o){if(!i){if(!(t=function(e,t,r){function n(){var t=window.innerWidth,n=window.innerHeight;e!==document.body&&(t=(n=e.getBoundingClientRect()).right-n.left,n=n.bottom-n.top),a.width=r*t,a.height=r*n,B(a.style,{width:t+"px",height:n+"px"})}var a=document.createElement("canvas");return B(a.style,{border:0,margin:0,padding:0,top:0,left:0}),e.appendChild(a),e===document.body&&(a.style.position="absolute",B(e.style,{margin:0,padding:0})),window.addEventListener("resize",n,!1),n(),{canvas:a,onDestroy:function(){window.removeEventListener("resize",n),e.removeChild(a)}}}(a||document.body,0,u)))return null;i=t.canvas,h=t.onDestroy}o=function(e,t){function r(r){try{return e.getContext(r,t)}catch(e){return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(i,e)}return o?{gl:o,canvas:i,container:a,extensions:l,optionalExtensions:c,pixelRatio:u,profile:d,onDone:p,onDestroy:h}:(h(),p("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function i(e,t){for(var r=Array(e),n=0;n<e;++n)r[n]=t(n);return r}function o(e){var t,r;return t=(65535<e)<<4,t|=r=(255<(e>>>=t))<<3,(t|=r=(15<(e>>>=r))<<2)|(r=(3<(e>>>=r))<<1)|e>>>r>>1}function s(){function e(e){e:{for(var t=16;268435456>=t;t*=16)if(e<=t){e=t;break e}e=0}return 0<(t=r[o(e)>>2]).length?t.pop():new ArrayBuffer(e)}function t(e){r[o(e.byteLength)>>2].push(e)}var r=i(8,(function(){return[]}));return{alloc:e,free:t,allocType:function(t,r){var n=null;switch(t){case 5120:n=new Int8Array(e(r),0,r);break;case 5121:n=new Uint8Array(e(r),0,r);break;case 5122:n=new Int16Array(e(2*r),0,r);break;case 5123:n=new Uint16Array(e(2*r),0,r);break;case 5124:n=new Int32Array(e(4*r),0,r);break;case 5125:n=new Uint32Array(e(4*r),0,r);break;case 5126:n=new Float32Array(e(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(e){t(e.buffer)}}}function l(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||q(e.data))}function c(e,t,r,n,a,i){for(var o=0;o<t;++o)for(var s=e[o],l=0;l<r;++l)for(var c=s[l],u=0;u<n;++u)a[i++]=c[u]}function u(e){return 0|Z[Object.prototype.toString.call(e)]}function d(e,t){for(var r=0;r<t.length;++r)e[r]=t[r]}function p(e,t,r,n,a,i,o){for(var s=0,l=0;l<r;++l)for(var c=0;c<n;++c)e[s++]=t[a*l+i*c+o]}function h(e,t,r,n){function a(t){this.id=c++,this.buffer=e.createBuffer(),this.type=t,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&&(this.stats={size:0})}function i(t,r,n){t.byteLength=r.byteLength,e.bufferData(t.type,r,n)}function o(e,t,r,n,a,o){if(e.usage=r,Array.isArray(t)){if(e.dtype=n||5126,0<t.length)if(Array.isArray(t[0])){a=ee(t);for(var s=n=1;s<a.length;++s)n*=a[s];e.dimension=n,i(e,t=Q(t,a,e.dtype),r),o?e.persistentData=t:W.freeType(t)}else"number"==typeof t[0]?(e.dimension=a,d(a=W.allocType(e.dtype,t.length),t),i(e,a,r),o?e.persistentData=a:W.freeType(a)):q(t[0])&&(e.dimension=t[0].length,e.dtype=n||u(t[0])||5126,i(e,t=Q(t,[t.length,t[0].length],e.dtype),r),o?e.persistentData=t:W.freeType(t))}else if(q(t))e.dtype=n||u(t),e.dimension=a,i(e,t,r),o&&(e.persistentData=new Uint8Array(new Uint8Array(t.buffer)));else if(l(t)){a=t.shape;var c=t.stride,h=(s=t.offset,0),f=0,m=0,g=0;1===a.length?(h=a[0],f=1,m=c[0],g=0):2===a.length&&(h=a[0],f=a[1],m=c[0],g=c[1]),e.dtype=n||u(t.data)||5126,e.dimension=f,p(a=W.allocType(e.dtype,h*f),t.data,h,f,m,g,s),i(e,a,r),o?e.persistentData=a:W.freeType(a)}}function s(r){t.bufferCount--;for(var a=0;a<n.state.length;++a){var i=n.state[a];i.buffer===r&&(e.disableVertexAttribArray(a),i.buffer=null)}e.deleteBuffer(r.buffer),r.buffer=null,delete h[r.id]}var c=0,h={};a.prototype.bind=function(){e.bindBuffer(this.type,this.buffer)},a.prototype.destroy=function(){s(this)};var f=[];return r.profile&&(t.getTotalBufferSize=function(){var e=0;return Object.keys(h).forEach((function(t){e+=h[t].stats.size})),e}),{create:function(n,i,c,f){function m(t){var n=35044,a=null,i=0,s=0,c=1;return Array.isArray(t)||q(t)||l(t)?a=t:"number"==typeof t?i=0|t:t&&("data"in t&&(a=t.data),"usage"in t&&(n=$[t.usage]),"type"in t&&(s=J[t.type]),"dimension"in t&&(c=0|t.dimension),"length"in t&&(i=0|t.length)),g.bind(),a?o(g,a,n,s,c,f):(i&&e.bufferData(g.type,i,n),g.dtype=s||5121,g.usage=n,g.dimension=c,g.byteLength=i),r.profile&&(g.stats.size=g.byteLength*te[g.dtype]),m}t.bufferCount++;var g=new a(i);return h[g.id]=g,c||m(n),m._reglType="buffer",m._buffer=g,m.subdata=function(t,r){var n,a=0|(r||0);if(g.bind(),q(t))e.bufferSubData(g.type,a,t);else if(Array.isArray(t)){if(0<t.length)if("number"==typeof t[0]){var i=W.allocType(g.dtype,t.length);d(i,t),e.bufferSubData(g.type,a,i),W.freeType(i)}else(Array.isArray(t[0])||q(t[0]))&&(n=ee(t),i=Q(t,n,g.dtype),e.bufferSubData(g.type,a,i),W.freeType(i))}else if(l(t)){n=t.shape;var o=t.stride,s=i=0,c=0,h=0;1===n.length?(i=n[0],s=1,c=o[0],h=0):2===n.length&&(i=n[0],s=n[1],c=o[0],h=o[1]),n=Array.isArray(t.data)?g.dtype:u(t.data),p(n=W.allocType(n,i*s),t.data,i,s,c,h,t.offset),e.bufferSubData(g.type,a,n),W.freeType(n)}return m},r.profile&&(m.stats=g.stats),m.destroy=function(){s(g)},m},createStream:function(e,t){var r=f.pop();return r||(r=new a(e)),r.bind(),o(r,t,35040,0,1,!1),r},destroyStream:function(e){f.push(e)},clear:function(){K(h).forEach(s),f.forEach(s)},getBuffer:function(e){return e&&e._buffer instanceof a?e._buffer:null},restore:function(){K(h).forEach((function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)}))},_initBuffer:o}}function f(e,t,r,n){function a(e){this.id=c++,s[this.id]=this,this.buffer=e,this.primType=4,this.type=this.vertCount=0}function i(n,a,i,o,s,c,u){if(n.buffer.bind(),a){var d=u;u||q(a)&&(!l(a)||q(a.data))||(d=t.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,a,i,d,3)}else e.bufferData(34963,c,i),n.buffer.dtype=d||5121,n.buffer.usage=i,n.buffer.dimension=3,n.buffer.byteLength=c;if(d=u,!u){switch(n.buffer.dtype){case 5121:case 5120:d=5121;break;case 5123:case 5122:d=5123;break;case 5125:case 5124:d=5125}n.buffer.dtype=d}n.type=d,0>(a=s)&&(a=n.buffer.byteLength,5123===d?a>>=1:5125===d&&(a>>=2)),n.vertCount=a,a=o,0>o&&(a=4,1===(o=n.buffer.dimension)&&(a=0),2===o&&(a=1),3===o&&(a=4)),n.primType=a}function o(e){n.elementsCount--,delete s[e.id],e.buffer.destroy(),e.buffer=null}var s={},c=0,u={uint8:5121,uint16:5123};t.oes_element_index_uint&&(u.uint32=5125),a.prototype.bind=function(){this.buffer.bind()};var d=[];return{create:function(e,t){function s(e){if(e)if("number"==typeof e)c(e),d.primType=4,d.vertCount=0|e,d.type=5121;else{var t=null,r=35044,n=-1,a=-1,o=0,p=0;Array.isArray(e)||q(e)||l(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=$[e.usage]),"primitive"in e&&(n=re[e.primitive]),"count"in e&&(a=0|e.count),"type"in e&&(p=u[e.type]),"length"in e?o=0|e.length:(o=a,5123===p||5122===p?o*=2:5125!==p&&5124!==p||(o*=4))),i(d,t,r,n,a,o,p)}else c(),d.primType=4,d.vertCount=0,d.type=5121;return s}var c=r.create(null,34963,!0),d=new a(c._buffer);return n.elementsCount++,s(e),s._reglType="elements",s._elements=d,s.subdata=function(e,t){return c.subdata(e,t),s},s.destroy=function(){o(d)},s},createStream:function(e){var t=d.pop();return t||(t=new a(r.create(null,34963,!0,!1)._buffer)),i(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){d.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof a?e._elements:null},clear:function(){K(s).forEach(o)}}}function m(e){for(var t=W.allocType(5123,e.length),r=0;r<e.length;++r)if(isNaN(e[r]))t[r]=65535;else if(1/0===e[r])t[r]=31744;else if(-1/0===e[r])t[r]=64512;else{ne[0]=e[r];var n=(i=ae[0])>>>31<<15,a=(i<<1>>>24)-127,i=i>>13&1023;t[r]=-24>a?n:-14>a?n+(i+1024>>-14-a):15<a?n+31744:n+(a+15<<10)+i}return t}function g(e){return Array.isArray(e)||q(e)}function v(e){return"[object "+e+"]"}function y(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function b(e){return!(!Array.isArray(e)||0===e.length||!g(e[0]))}function _(e){return Object.prototype.toString.call(e)}function x(e){if(!e)return!1;var t=_(e);return 0<=he.indexOf(t)||y(e)||b(e)||l(e)}function w(e,t){36193===e.type?(e.data=m(t),W.freeType(t)):e.data=t}function k(e,t,r,n,a,i){if(e=void 0!==me[e]?me[e]:se[e]*fe[t],i&&(e*=6),a){for(n=0;1<=r;)n+=e*r*r,r/=2;return n}return e*r*n}function M(e,t,r,n,a,i,o){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function c(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function u(e,t){if("object"==typeof t&&t){"premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=V[t.colorSpace]),"type"in t&&(e.type=U[t.type]);var r=e.width,n=e.height,a=e.channels,i=!1;"shape"in t?(r=t.shape[0],n=t.shape[1],3===t.shape.length&&(a=t.shape[2],i=!0)):("radius"in t&&(r=n=t.radius),"width"in t&&(r=t.width),"height"in t&&(n=t.height),"channels"in t&&(a=t.channels,i=!0)),e.width=0|r,e.height=0|n,e.channels=0|a,r=!1,"format"in t&&(r=t.format,n=e.internalformat=G[r],e.format=he[n],r in U&&!("type"in t)&&(e.type=U[r]),r in J&&(e.compressed=!0),r=!0),!i&&r?e.channels=se[e.format]:i&&!r&&e.channels!==oe[e.format]&&(e.format=e.internalformat=oe[e.channels])}}function d(t){e.pixelStorei(37440,t.flipY),e.pixelStorei(37441,t.premultiplyAlpha),e.pixelStorei(37443,t.colorSpace),e.pixelStorei(3317,t.unpackAlignment)}function p(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function h(e,t){var r=null;if(x(t)?r=t:t&&(u(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),x(t.data)&&(r=t.data)),t.copy){var n=a.viewportWidth,i=a.viewportHeight;e.width=e.width||n-e.xOffset,e.height=e.height||i-e.yOffset,e.needsCopy=!0}else if(r){if(q(r))e.channels=e.channels||4,e.data=r,"type"in t||5121!==e.type||(e.type=0|Z[Object.prototype.toString.call(r)]);else if(y(r)){switch(e.channels=e.channels||4,i=(n=r).length,e.type){case 5121:case 5123:case 5125:case 5126:(i=W.allocType(e.type,i)).set(n),e.data=i;break;case 36193:e.data=m(n)}e.alignment=1,e.needsFree=!0}else if(l(r)){n=r.data,Array.isArray(n)||5121!==e.type||(e.type=0|Z[Object.prototype.toString.call(n)]),i=r.shape;var o,s,c,d,p=r.stride;3===i.length?(c=i[2],d=p[2]):d=c=1,o=i[0],s=i[1],i=p[0],p=p[1],e.alignment=1,e.width=o,e.height=s,e.channels=c,e.format=e.internalformat=oe[c],e.needsFree=!0,o=d,r=r.offset,c=e.width,d=e.height,s=e.channels;for(var h=W.allocType(36193===e.type?5126:e.type,c*d*s),f=0,v=0;v<d;++v)for(var k=0;k<c;++k)for(var M=0;M<s;++M)h[f++]=n[i*k+p*v+o*M+r];w(e,h)}else if(_(r)===le||_(r)===ce)_(r)===le?e.element=r:e.element=r.canvas,e.width=e.element.width,e.height=e.element.height,e.channels=4;else if(_(r)===ue)e.element=r,e.width=r.width,e.height=r.height,e.channels=4;else if(_(r)===de)e.element=r,e.width=r.naturalWidth,e.height=r.naturalHeight,e.channels=4;else if(_(r)===pe)e.element=r,e.width=r.videoWidth,e.height=r.videoHeight,e.channels=4;else if(b(r)){for(n=e.width||r[0].length,i=e.height||r.length,p=e.channels,p=g(r[0][0])?p||r[0][0].length:p||1,o=X.shape(r),c=1,d=0;d<o.length;++d)c*=o[d];c=W.allocType(36193===e.type?5126:e.type,c),X.flatten(r,o,"",c),w(e,c),e.alignment=1,e.width=n,e.height=i,e.channels=p,e.format=e.internalformat=oe[p],e.needsFree=!0}}else e.width=e.width||1,e.height=e.height||1,e.channels=e.channels||4}function f(t,r,a,i,o){var s=t.element,l=t.data,c=t.internalformat,u=t.format,p=t.type,h=t.width,f=t.height;d(t),s?e.texSubImage2D(r,o,a,i,u,p,s):t.compressed?e.compressedTexSubImage2D(r,o,a,i,c,h,f,l):t.needsCopy?(n(),e.copyTexSubImage2D(r,o,a,i,t.xOffset,t.yOffset,h,f)):e.texSubImage2D(r,o,a,i,h,f,u,p,l)}function v(){return fe.pop()||new p}function M(e){e.needsFree&&W.freeType(e.data),p.call(e),fe.push(e)}function T(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function C(e,t,r){var n=e.images[0]=v();e.mipmask=1,n.width=e.width=t,n.height=e.height=r,n.channels=e.channels=4}function S(e,t){var r=null;if(x(t))c(r=e.images[0]=v(),e),h(r,t),e.mipmask=1;else if(u(e,t),Array.isArray(t.mipmap))for(var n=t.mipmap,a=0;a<n.length;++a)c(r=e.images[a]=v(),e),r.width>>=a,r.height>>=a,h(r,n[a]),e.mipmask|=1<<a;else c(r=e.images[0]=v(),e),h(r,t),e.mipmask=1;c(e,e.images[0])}function L(t,r){for(var a=t.images,i=0;i<a.length&&a[i];++i){var o=a[i],s=r,l=i,c=o.element,u=o.data,p=o.internalformat,h=o.format,f=o.type,m=o.width,g=o.height,v=o.channels;d(o),c?e.texImage2D(s,l,h,h,f,c):o.compressed?e.compressedTexImage2D(s,l,p,m,g,0,u):o.needsCopy?(n(),e.copyTexImage2D(s,l,h,o.xOffset,o.yOffset,m,g,0)):((o=!u)&&(u=W.zero.allocType(f,m*g*v)),e.texImage2D(s,l,h,m,g,0,h,f,u),o&&u&&W.zero.freeType(u))}}function A(){var e=me.pop()||new T;s.call(e);for(var t=e.mipmask=0;16>t;++t)e.images[t]=null;return e}function E(e){for(var t=e.images,r=0;r<t.length;++r)t[r]&&M(t[r]),t[r]=null;me.push(e)}function D(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function I(e,t){"min"in t&&(e.minFilter=H[t.min],0<=ie.indexOf(e.minFilter)&&!("faces"in t)&&(e.genMipmaps=!0)),"mag"in t&&(e.magFilter=Y[t.mag]);var r=e.wrapS,n=e.wrapT;if("wrap"in t){var a=t.wrap;"string"==typeof a?r=n=j[a]:Array.isArray(a)&&(r=j[a[0]],n=j[a[1]])}else"wrapS"in t&&(r=j[t.wrapS]),"wrapT"in t&&(n=j[t.wrapT]);if(e.wrapS=r,e.wrapT=n,"anisotropic"in t&&(e.anisotropic=t.anisotropic),"mipmap"in t){switch(r=!1,typeof t.mipmap){case"string":e.mipmapHint=N[t.mipmap],r=e.genMipmaps=!0;break;case"boolean":r=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,r=!0}!r||"min"in t||(e.minFilter=9984)}}function P(r,n){e.texParameteri(n,10241,r.minFilter),e.texParameteri(n,10240,r.magFilter),e.texParameteri(n,10242,r.wrapS),e.texParameteri(n,10243,r.wrapT),t.ext_texture_filter_anisotropic&&e.texParameteri(n,34046,r.anisotropic),r.genMipmaps&&(e.hint(33170,r.mipmapHint),e.generateMipmap(n))}function O(t){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=ge++,this.refCount=1,this.target=t,this.texture=e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new D,o.profile&&(this.stats={size:0})}function R(t){e.activeTexture(33984),e.bindTexture(t.target,t.texture)}function F(){var t=be[0];t?e.bindTexture(t.target,t.texture):e.bindTexture(3553,null)}function z(t){var r=t.texture,n=t.unit,a=t.target;0<=n&&(e.activeTexture(33984+n),e.bindTexture(a,null),be[n]=null),e.deleteTexture(r),t.texture=null,t.params=null,t.pixels=null,t.refCount=0,delete ve[t.id],i.textureCount--}var N={"don't care":4352,"dont care":4352,nice:4354,fast:4353},j={repeat:10497,clamp:33071,mirror:33648},Y={nearest:9728,linear:9729},H=B({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},Y),V={none:0,browser:37444},U={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},G={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},J={};t.ext_srgb&&(G.srgb=35904,G.srgba=35906),t.oes_texture_float&&(U.float32=U.float=5126),t.oes_texture_half_float&&(U.float16=U["half float"]=36193),t.webgl_depth_texture&&(B(G,{depth:6402,"depth stencil":34041}),B(U,{uint16:5123,uint32:5125,"depth stencil":34042})),t.webgl_compressed_texture_s3tc&&B(J,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),t.webgl_compressed_texture_atc&&B(J,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),t.webgl_compressed_texture_pvrtc&&B(J,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),t.webgl_compressed_texture_etc1&&(J["rgb etc1"]=36196);var $=Array.prototype.slice.call(e.getParameter(34467));Object.keys(J).forEach((function(e){var t=J[e];0<=$.indexOf(t)&&(G[e]=t)}));var Q=Object.keys(G);r.textureFormats=Q;var ee=[];Object.keys(G).forEach((function(e){ee[G[e]]=e}));var te=[];Object.keys(U).forEach((function(e){te[U[e]]=e}));var re=[];Object.keys(Y).forEach((function(e){re[Y[e]]=e}));var ne=[];Object.keys(H).forEach((function(e){ne[H[e]]=e}));var ae=[];Object.keys(j).forEach((function(e){ae[j[e]]=e}));var he=Q.reduce((function(e,t){var r=G[t];return 6409===r||6406===r||6409===r||6410===r||6402===r||34041===r?e[r]=r:32855===r||0<=t.indexOf("rgba")?e[r]=6408:e[r]=6407,e}),{}),fe=[],me=[],ge=0,ve={},ye=r.maxTextureUnits,be=Array(ye).map((function(){return null}));return B(O.prototype,{bind:function(){this.bindCount+=1;var t=this.unit;if(0>t){for(var r=0;r<ye;++r){var n=be[r];if(n){if(0<n.bindCount)continue;n.unit=-1}be[r]=this,t=r;break}o.profile&&i.maxTextureUnits<t+1&&(i.maxTextureUnits=t+1),this.unit=t,e.activeTexture(33984+t),e.bindTexture(this.target,this.texture)}return t},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&z(this)}}),o.profile&&(i.getTotalTextureSize=function(){var e=0;return Object.keys(ve).forEach((function(t){e+=ve[t].stats.size})),e}),{create2D:function(t,r){function n(e,t){var r=a.texInfo;D.call(r);var i=A();return"number"==typeof e?C(i,0|e,"number"==typeof t?0|t:0|e):e?(I(r,e),S(i,e)):C(i,1,1),r.genMipmaps&&(i.mipmask=(i.width<<1)-1),a.mipmask=i.mipmask,c(a,i),a.internalformat=i.internalformat,n.width=i.width,n.height=i.height,R(a),L(i,3553),P(r,3553),F(),E(i),o.profile&&(a.stats.size=k(a.internalformat,a.type,i.width,i.height,r.genMipmaps,!1)),n.format=ee[a.internalformat],n.type=te[a.type],n.mag=re[r.magFilter],n.min=ne[r.minFilter],n.wrapS=ae[r.wrapS],n.wrapT=ae[r.wrapT],n}var a=new O(3553);return ve[a.id]=a,i.textureCount++,n(t,r),n.subimage=function(e,t,r,i){t|=0,r|=0,i|=0;var o=v();return c(o,a),o.width=0,o.height=0,h(o,e),o.width=o.width||(a.width>>i)-t,o.height=o.height||(a.height>>i)-r,R(a),f(o,3553,t,r,i),F(),M(o),n},n.resize=function(t,r){var i=0|t,s=0|r||i;if(i===a.width&&s===a.height)return n;n.width=a.width=i,n.height=a.height=s,R(a);for(var l,c=a.channels,u=a.type,d=0;a.mipmask>>d;++d){var p=i>>d,h=s>>d;if(!p||!h)break;l=W.zero.allocType(u,p*h*c),e.texImage2D(3553,d,a.format,p,h,0,a.format,a.type,l),l&&W.zero.freeType(l)}return F(),o.profile&&(a.stats.size=k(a.internalformat,a.type,i,s,!1,!1)),n},n._reglType="texture2d",n._texture=a,o.profile&&(n.stats=a.stats),n.destroy=function(){a.decRef()},n},createCube:function(t,r,n,a,s,l){function d(e,t,r,n,a,i){var s,l=p.texInfo;for(D.call(l),s=0;6>s;++s)m[s]=A();if("number"!=typeof e&&e){if("object"==typeof e)if(t)S(m[0],e),S(m[1],t),S(m[2],r),S(m[3],n),S(m[4],a),S(m[5],i);else if(I(l,e),u(p,e),"faces"in e)for(e=e.faces,s=0;6>s;++s)c(m[s],p),S(m[s],e[s]);else for(s=0;6>s;++s)S(m[s],e)}else for(e=0|e||1,s=0;6>s;++s)C(m[s],e,e);for(c(p,m[0]),p.mipmask=l.genMipmaps?(m[0].width<<1)-1:m[0].mipmask,p.internalformat=m[0].internalformat,d.width=m[0].width,d.height=m[0].height,R(p),s=0;6>s;++s)L(m[s],34069+s);for(P(l,34067),F(),o.profile&&(p.stats.size=k(p.internalformat,p.type,d.width,d.height,l.genMipmaps,!0)),d.format=ee[p.internalformat],d.type=te[p.type],d.mag=re[l.magFilter],d.min=ne[l.minFilter],d.wrapS=ae[l.wrapS],d.wrapT=ae[l.wrapT],s=0;6>s;++s)E(m[s]);return d}var p=new O(34067);ve[p.id]=p,i.cubeCount++;var m=Array(6);return d(t,r,n,a,s,l),d.subimage=function(e,t,r,n,a){r|=0,n|=0,a|=0;var i=v();return c(i,p),i.width=0,i.height=0,h(i,t),i.width=i.width||(p.width>>a)-r,i.height=i.height||(p.height>>a)-n,R(p),f(i,34069+e,r,n,a),F(),M(i),d},d.resize=function(t){if((t|=0)!==p.width){d.width=p.width=t,d.height=p.height=t,R(p);for(var r=0;6>r;++r)for(var n=0;p.mipmask>>n;++n)e.texImage2D(34069+r,n,p.format,t>>n,t>>n,0,p.format,p.type,null);return F(),o.profile&&(p.stats.size=k(p.internalformat,p.type,d.width,d.height,!1,!0)),d}},d._reglType="textureCube",d._texture=p,o.profile&&(d.stats=p.stats),d.destroy=function(){p.decRef()},d},clear:function(){for(var t=0;t<ye;++t)e.activeTexture(33984+t),e.bindTexture(3553,null),be[t]=null;K(ve).forEach(z),i.cubeCount=0,i.textureCount=0},getTexture:function(e){return null},restore:function(){for(var t=0;t<ye;++t){var r=be[t];r&&(r.bindCount=0,r.unit=-1,be[t]=null)}K(ve).forEach((function(t){t.texture=e.createTexture(),e.bindTexture(t.target,t.texture);for(var r=0;32>r;++r)if(0!=(t.mipmask&1<<r))if(3553===t.target)e.texImage2D(3553,r,t.internalformat,t.width>>r,t.height>>r,0,t.internalformat,t.type,null);else for(var n=0;6>n;++n)e.texImage2D(34069+n,r,t.internalformat,t.width>>r,t.height>>r,0,t.internalformat,t.type,null);P(t.texInfo,t.target)}))}}}function T(e,t,r,n,a,i){function o(e,t,r){this.target=e,this.texture=t,this.renderbuffer=r;var n=e=0;t?(e=t.width,n=t.height):r&&(e=r.width,n=r.height),this.width=e,this.height=n}function s(e){e&&(e.texture&&e.texture._texture.decRef(),e.renderbuffer&&e.renderbuffer._renderbuffer.decRef())}function l(e,t,r){e&&(e.texture?e.texture._texture.refCount+=1:e.renderbuffer._renderbuffer.refCount+=1)}function c(t,r){r&&(r.texture?e.framebufferTexture2D(36160,t,r.target,r.texture._texture.texture,0):e.framebufferRenderbuffer(36160,t,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(e){var t=3553,r=null,n=null,a=e;return"object"==typeof e&&(a=e.data,"target"in e&&(t=0|e.target)),"texture2d"===(e=a._reglType)?r=a:"textureCube"===e?r=a:"renderbuffer"===e&&(n=a,t=36161),new o(t,r,n)}function d(e,t,r,i,s){return r?((e=n.create2D({width:e,height:t,format:i,type:s}))._texture.refCount=0,new o(3553,e,null)):((e=a.create({width:e,height:t,format:i}))._renderbuffer.refCount=0,new o(36161,null,e))}function p(e){return e&&(e.texture||e.renderbuffer)}function h(e,t,r){e&&(e.texture?e.texture.resize(t,r):e.renderbuffer&&e.renderbuffer.resize(t,r),e.width=t,e.height=r)}function f(){this.id=k++,M[this.id]=this,this.framebuffer=e.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function m(e){e.colorAttachments.forEach(s),s(e.depthAttachment),s(e.stencilAttachment),s(e.depthStencilAttachment)}function g(t){e.deleteFramebuffer(t.framebuffer),t.framebuffer=null,i.framebufferCount--,delete M[t.id]}function v(t){var n;e.bindFramebuffer(36160,t.framebuffer);var a=t.colorAttachments;for(n=0;n<a.length;++n)c(36064+n,a[n]);for(n=a.length;n<r.maxColorAttachments;++n)e.framebufferTexture2D(36160,36064+n,3553,null,0);e.framebufferTexture2D(36160,33306,3553,null,0),e.framebufferTexture2D(36160,36096,3553,null,0),e.framebufferTexture2D(36160,36128,3553,null,0),c(36096,t.depthAttachment),c(36128,t.stencilAttachment),c(33306,t.depthStencilAttachment),e.checkFramebufferStatus(36160),e.isContextLost(),e.bindFramebuffer(36160,b.next?b.next.framebuffer:null),b.cur=b.next,e.getError()}function y(e,t){function r(e,t){var a,i=0,o=0,s=!0,c=!0;a=null;var h=!0,f="rgba",g="uint8",y=1,b=null,w=null,k=null,M=!1;"number"==typeof e?(i=0|e,o=0|t||i):e?("shape"in e?(i=(o=e.shape)[0],o=o[1]):("radius"in e&&(i=o=e.radius),"width"in e&&(i=e.width),"height"in e&&(o=e.height)),("color"in e||"colors"in e)&&(a=e.color||e.colors,Array.isArray(a)),a||("colorCount"in e&&(y=0|e.colorCount),"colorTexture"in e&&(h=!!e.colorTexture,f="rgba4"),"colorType"in e&&(g=e.colorType,!h)&&("half float"===g||"float16"===g?f="rgba16f":"float"!==g&&"float32"!==g||(f="rgba32f")),"colorFormat"in e&&(f=e.colorFormat,0<=_.indexOf(f)?h=!0:0<=x.indexOf(f)&&(h=!1))),("depthTexture"in e||"depthStencilTexture"in e)&&(M=!(!e.depthTexture&&!e.depthStencilTexture)),"depth"in e&&("boolean"==typeof e.depth?s=e.depth:(b=e.depth,c=!1)),"stencil"in e&&("boolean"==typeof e.stencil?c=e.stencil:(w=e.stencil,s=!1)),"depthStencil"in e&&("boolean"==typeof e.depthStencil?s=c=e.depthStencil:(k=e.depthStencil,c=s=!1))):i=o=1;var T=null,C=null,S=null,L=null;if(Array.isArray(a))T=a.map(u);else if(a)T=[u(a)];else for(T=Array(y),a=0;a<y;++a)T[a]=d(i,o,h,f,g);for(i=i||T[0].width,o=o||T[0].height,b?C=u(b):s&&!c&&(C=d(i,o,M,"depth","uint32")),w?S=u(w):c&&!s&&(S=d(i,o,!1,"stencil","uint8")),k?L=u(k):!b&&!w&&c&&s&&(L=d(i,o,M,"depth stencil","depth stencil")),s=null,a=0;a<T.length;++a)l(T[a]),T[a]&&T[a].texture&&(c=ye[T[a].texture._texture.format]*be[T[a].texture._texture.type],null===s&&(s=c));return l(C),l(S),l(L),m(n),n.width=i,n.height=o,n.colorAttachments=T,n.depthAttachment=C,n.stencilAttachment=S,n.depthStencilAttachment=L,r.color=T.map(p),r.depth=p(C),r.stencil=p(S),r.depthStencil=p(L),r.width=n.width,r.height=n.height,v(n),r}var n=new f;return i.framebufferCount++,r(e,t),B(r,{resize:function(e,t){var a=Math.max(0|e,1),i=Math.max(0|t||a,1);if(a===n.width&&i===n.height)return r;for(var o=n.colorAttachments,s=0;s<o.length;++s)h(o[s],a,i);return h(n.depthAttachment,a,i),h(n.stencilAttachment,a,i),h(n.depthStencilAttachment,a,i),n.width=r.width=a,n.height=r.height=i,v(n),r},_reglType:"framebuffer",_framebuffer:n,destroy:function(){g(n),m(n)},use:function(e){b.setFBO({framebuffer:r},e)}})}var b={cur:null,next:null,dirty:!1,setFBO:null},_=["rgba"],x=["rgba4","rgb565","rgb5 a1"];t.ext_srgb&&x.push("srgba"),t.ext_color_buffer_half_float&&x.push("rgba16f","rgb16f"),t.webgl_color_buffer_float&&x.push("rgba32f");var w=["uint8"];t.oes_texture_half_float&&w.push("half float","float16"),t.oes_texture_float&&w.push("float","float32");var k=0,M={};return B(b,{getFramebuffer:function(e){return"function"==typeof e&&"framebuffer"===e._reglType&&(e=e._framebuffer)instanceof f?e:null},create:y,createCube:function(e){function t(e){var a,i={color:null},o=0,s=null;a="rgba";var l="uint8",c=1;if("number"==typeof e?o=0|e:e?("shape"in e?o=e.shape[0]:("radius"in e&&(o=0|e.radius),"width"in e?o=0|e.width:"height"in e&&(o=0|e.height)),("color"in e||"colors"in e)&&(s=e.color||e.colors,Array.isArray(s)),s||("colorCount"in e&&(c=0|e.colorCount),"colorType"in e&&(l=e.colorType),"colorFormat"in e&&(a=e.colorFormat)),"depth"in e&&(i.depth=e.depth),"stencil"in e&&(i.stencil=e.stencil),"depthStencil"in e&&(i.depthStencil=e.depthStencil)):o=1,s)if(Array.isArray(s))for(e=[],a=0;a<s.length;++a)e[a]=s[a];else e=[s];else for(e=Array(c),s={radius:o,format:a,type:l},a=0;a<c;++a)e[a]=n.createCube(s);for(i.color=Array(e.length),a=0;a<e.length;++a)c=e[a],o=o||c.width,i.color[a]={target:34069,data:e[a]};for(a=0;6>a;++a){for(c=0;c<e.length;++c)i.color[c].target=34069+a;0<a&&(i.depth=r[0].depth,i.stencil=r[0].stencil,i.depthStencil=r[0].depthStencil),r[a]?r[a](i):r[a]=y(i)}return B(t,{width:o,height:o,color:e})}var r=Array(6);return t(e),B(t,{faces:r,resize:function(e){var n=0|e;if(n===t.width)return t;var a=t.color;for(e=0;e<a.length;++e)a[e].resize(n);for(e=0;6>e;++e)r[e].resize(n);return t.width=t.height=n,t},_reglType:"framebufferCube",destroy:function(){r.forEach((function(e){e.destroy()}))}})},clear:function(){K(M).forEach(g)},restore:function(){b.cur=null,b.next=null,b.dirty=!0,K(M).forEach((function(t){t.framebuffer=e.createFramebuffer(),v(t)}))}})}function C(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function S(e,t,r,n){function a(e,t,r,n){this.name=e,this.id=t,this.location=r,this.info=n}function i(e,t){for(var r=0;r<e.length;++r)if(e[r].id===t.id)return void(e[r].location=t.location);e.push(t)}function o(r,n,a){if(!(o=(a=35632===r?c:u)[n])){var i=t.str(n),o=e.createShader(r);e.shaderSource(o,i),e.compileShader(o),a[n]=o}return o}function s(e,t){this.id=h++,this.fragId=e,this.vertId=t,this.program=null,this.uniforms=[],this.attributes=[],n.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function l(r,s){var l,c;l=o(35632,r.fragId),c=o(35633,r.vertId);var u=r.program=e.createProgram();e.attachShader(u,l),e.attachShader(u,c),e.linkProgram(u);var d=e.getProgramParameter(u,35718);n.profile&&(r.stats.uniformsCount=d);var p=r.uniforms;for(l=0;l<d;++l)if(c=e.getActiveUniform(u,l))if(1<c.size)for(var h=0;h<c.size;++h){var f=c.name.replace("[0]","["+h+"]");i(p,new a(f,t.id(f),e.getUniformLocation(u,f),c))}else i(p,new a(c.name,t.id(c.name),e.getUniformLocation(u,c.name),c));for(d=e.getProgramParameter(u,35721),n.profile&&(r.stats.attributesCount=d),p=r.attributes,l=0;l<d;++l)(c=e.getActiveAttrib(u,l))&&i(p,new a(c.name,t.id(c.name),e.getAttribLocation(u,c.name),c))}var c={},u={},d={},p=[],h=0;return n.profile&&(r.getMaxUniformsCount=function(){var e=0;return p.forEach((function(t){t.stats.uniformsCount>e&&(e=t.stats.uniformsCount)})),e},r.getMaxAttributesCount=function(){var e=0;return p.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);K(c).forEach(t),c={},K(u).forEach(t),u={},p.forEach((function(t){e.deleteProgram(t.program)})),p.length=0,d={},r.shaderCount=0},program:function(e,t,n){var a=d[t];a||(a=d[t]={});var i=a[e];return i||(i=new s(t,e),r.shaderCount++,l(i),a[e]=i,p.push(i)),i},restore:function(){c={},u={};for(var e=0;e<p.length;++e)l(p[e])},shader:o,frag:-1,vert:-1}}function L(e,t,r,n,a,i,o){function s(a){var i;i=null===t.next?5121:t.next.colorAttachments[0].texture._texture.type;var o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;return q(a)?u=a:a&&(o=0|a.x,s=0|a.y,l=0|(a.width||n.framebufferWidth-o),c=0|(a.height||n.framebufferHeight-s),u=a.data||null),r(),a=l*c*4,u||(5121===i?u=new Uint8Array(a):5126===i&&(u=u||new Float32Array(a))),e.pixelStorei(3333,4),e.readPixels(o,s,l,c,6408,i,u),u}return function(e){return e&&"framebuffer"in e?function(e){var r;return t.setFBO({framebuffer:e.framebuffer},(function(){r=s(e)})),r}(e):s(e)}}function A(e){return Array.prototype.slice.call(e)}function E(e){return A(e).join("")}function D(){function e(){var e=[],t=[];return B((function(){e.push.apply(e,A(arguments))}),{def:function(){var n="v"+r++;return t.push(n),0<arguments.length&&(e.push(n,"="),e.push.apply(e,A(arguments)),e.push(";")),n},toString:function(){return E([0<t.length?"var "+t+";":"",E(e)])}})}function t(){function t(e,t){n(e,t,"=",r.def(e,t),";")}var r=e(),n=e(),a=r.toString,i=n.toString;return B((function(){r.apply(r,A(arguments))}),{def:r.def,entry:r,exit:n,save:t,set:function(e,n,a){t(e,n),r(e,n,"=",a,";")},toString:function(){return a()+i()}})}var r=0,n=[],a=[],i=e(),o={};return{global:i,link:function(e){for(var t=0;t<a.length;++t)if(a[t]===e)return n[t];return t="g"+r++,n.push(t),a.push(e),t},block:e,proc:function(e,r){function n(){var e="a"+a.length;return a.push(e),e}var a=[];r=r||0;for(var i=0;i<r;++i)n();var s=(i=t()).toString;return o[e]=B(i,{arg:n,toString:function(){return E(["function(",a.join(),"){",s(),"}"])}})},scope:t,cond:function(){var e=E(arguments),r=t(),n=t(),a=r.toString,i=n.toString;return B(r,{then:function(){return r.apply(r,A(arguments)),this},else:function(){return n.apply(n,A(arguments)),this},toString:function(){var t=i();return t&&(t="else{"+t+"}"),E(["if(",e,"){",a(),"}",t])}})},compile:function(){var e=['"use strict";',i,"return {"];Object.keys(o).forEach((function(t){e.push('"',t,'":',o[t].toString(),",")})),e.push("}");var t=E(e).replace(/;/g,";\n").replace(/}/g,"}\n").replace(/{/g,"{\n");return Function.apply(null,n.concat(t)).apply(null,a)}}}function I(e){return Array.isArray(e)||q(e)||l(e)}function P(e){return e.sort((function(e,t){return"viewport"===e?-1:"viewport"===t?1:e<t?-1:1}))}function O(e,t,r,n){this.thisDep=e,this.contextDep=t,this.propDep=r,this.append=n}function R(e){return e&&!(e.thisDep||e.contextDep||e.propDep)}function F(e){return new O(!1,!1,!1,e)}function z(e,t){var r=e.type;return 0===r?new O(!0,1<=(r=e.data.length),2<=r,t):4===r?new O((r=e.data).thisDep,r.contextDep,r.propDep,t):new O(3===r,2===r,1===r,t)}function N(e,t,r,n,a,o,s,l,c,u,d,p,h,f,m){function v(e){return e.replace(".","_")}function y(e,t,r){var n=v(e);ne.push(e),te[n]=ee[n]=!!r,ae[n]=t}function b(e,t,r){var n=v(e);ne.push(e),Array.isArray(r)?(ee[n]=r.slice(),te[n]=r.slice()):ee[n]=te[n]=r,ie[n]=t}function _(){var e=D(),r=e.link,n=e.global;e.id=le++,e.batchId="0";var a=r(oe),i=e.shared={props:"a0"};Object.keys(oe).forEach((function(e){i[e]=n.def(a,".",e)}));var o=e.next={},s=e.current={};Object.keys(ie).forEach((function(e){Array.isArray(ee[e])&&(o[e]=n.def(i.next,".",e),s[e]=n.def(i.current,".",e))}));var l=e.constants={};Object.keys(se).forEach((function(e){l[e]=n.def(JSON.stringify(se[e]))})),e.invoke=function(t,n){switch(n.type){case 0:var a=["this",i.context,i.props,e.batchId];return t.def(r(n.data),".call(",a.slice(0,Math.max(n.data.length+1,4)),")");case 1:return t.def(i.props,n.data);case 2:return t.def(i.context,n.data);case 3:return t.def("this",n.data);case 4:return n.data.append(e,t),n.data.ref}},e.attribCache={};var c={};return e.scopeAttrib=function(e){if((e=t.id(e))in c)return c[e];var n=u.scope[e];return n||(n=u.scope[e]=new X),c[e]=r(n)},e}function x(e,t){var r=e.static,n=e.dynamic;if("framebuffer"in r){var a=r.framebuffer;return a?(a=l.getFramebuffer(a),F((function(e,t){var r=e.link(a),n=e.shared;return t.set(n.framebuffer,".next",r),n=n.context,t.set(n,".framebufferWidth",r+".width"),t.set(n,".framebufferHeight",r+".height"),r}))):F((function(e,t){var r=e.shared;return t.set(r.framebuffer,".next","null"),r=r.context,t.set(r,".framebufferWidth",r+".drawingBufferWidth"),t.set(r,".framebufferHeight",r+".drawingBufferHeight"),"null"}))}if("framebuffer"in n){var i=n.framebuffer;return z(i,(function(e,t){var r=e.invoke(t,i),n=e.shared,a=n.framebuffer;return r=t.def(a,".getFramebuffer(",r,")"),t.set(a,".next",r),n=n.context,t.set(n,".framebufferWidth",r+"?"+r+".width:"+n+".drawingBufferWidth"),t.set(n,".framebufferHeight",r+"?"+r+".height:"+n+".drawingBufferHeight"),r}))}return null}function w(e){function r(e){if(e in n){var r=t.id(n[e]);return(e=F((function(){return r}))).id=r,e}if(e in a){var i=a[e];return z(i,(function(e,t){var r=e.invoke(t,i);return t.def(e.shared.strings,".id(",r,")")}))}return null}var n=e.static,a=e.dynamic,i=r("frag"),o=r("vert"),s=null;return R(i)&&R(o)?(s=d.program(o.id,i.id),e=F((function(e,t){return e.link(s)}))):e=new O(i&&i.thisDep||o&&o.thisDep,i&&i.contextDep||o&&o.contextDep,i&&i.propDep||o&&o.propDep,(function(e,t){var r,n,a=e.shared.shader;return r=i?i.append(e,t):t.def(a,".","frag"),n=o?o.append(e,t):t.def(a,".","vert"),t.def(a+".program("+n+","+r+")")})),{frag:i,vert:o,progVar:e,program:s}}function k(e,t){function r(e,t){if(e in n){var r=0|n[e];return F((function(e,n){return t&&(e.OFFSET=r),r}))}if(e in a){var o=a[e];return z(o,(function(e,r){var n=e.invoke(r,o);return t&&(e.OFFSET=n),n}))}return t&&i?F((function(e,t){return e.OFFSET="0",0})):null}var n=e.static,a=e.dynamic,i=function(){if("elements"in n){var e=n.elements;I(e)?e=o.getElements(o.create(e,!0)):e&&(e=o.getElements(e));var t=F((function(t,r){if(e){var n=t.link(e);return t.ELEMENTS=n}return t.ELEMENTS=null}));return t.value=e,t}if("elements"in a){var r=a.elements;return z(r,(function(e,t){var n=(a=e.shared).isBufferArgs,a=a.elements,i=e.invoke(t,r),o=t.def("null");return n=t.def(n,"(",i,")"),i=e.cond(n).then(o,"=",a,".createStream(",i,");").else(o,"=",a,".getElements(",i,");"),t.entry(i),t.exit(e.cond(n).then(a,".destroyStream(",o,");")),e.ELEMENTS=o}))}return null}(),s=r("offset",!0);return{elements:i,primitive:function(){if("primitive"in n){var e=n.primitive;return F((function(t,r){return re[e]}))}if("primitive"in a){var t=a.primitive;return z(t,(function(e,r){var n=e.constants.primTypes,a=e.invoke(r,t);return r.def(n,"[",a,"]")}))}return i?R(i)?i.value?F((function(e,t){return t.def(e.ELEMENTS,".primType")})):F((function(){return 4})):new O(i.thisDep,i.contextDep,i.propDep,(function(e,t){var r=e.ELEMENTS;return t.def(r,"?",r,".primType:",4)})):null}(),count:function(){if("count"in n){var e=0|n.count;return F((function(){return e}))}if("count"in a){var t=a.count;return z(t,(function(e,r){return e.invoke(r,t)}))}return i?R(i)?i?s?new O(s.thisDep,s.contextDep,s.propDep,(function(e,t){return t.def(e.ELEMENTS,".vertCount-",e.OFFSET)})):F((function(e,t){return t.def(e.ELEMENTS,".vertCount")})):F((function(){return-1})):new O(i.thisDep||s.thisDep,i.contextDep||s.contextDep,i.propDep||s.propDep,(function(e,t){var r=e.ELEMENTS;return e.OFFSET?t.def(r,"?",r,".vertCount-",e.OFFSET,":-1"):t.def(r,"?",r,".vertCount:-1")})):null}(),instances:r("instances",!1),offset:s}}function M(e,r){var n=e.static,i=e.dynamic,o={};return Object.keys(n).forEach((function(e){var r=n[e],i=t.id(e),s=new X;if(I(r))s.state=1,s.buffer=a.getBuffer(a.create(r,34962,!1,!0)),s.type=0;else if(c=a.getBuffer(r))s.state=1,s.buffer=c,s.type=0;else if("constant"in r){var l=r.constant;s.buffer="null",s.state=2,"number"==typeof l?s.x=l:_e.forEach((function(e,t){t<l.length&&(s[e]=l[t])}))}else{var c=I(r.buffer)?a.getBuffer(a.create(r.buffer,34962,!1,!0)):a.getBuffer(r.buffer),u=0|r.offset,d=0|r.stride,p=0|r.size,h=!!r.normalized,f=0;"type"in r&&(f=J[r.type]),r=0|r.divisor,s.buffer=c,s.state=1,s.size=p,s.normalized=h,s.type=f||c.dtype,s.offset=u,s.stride=d,s.divisor=r}o[e]=F((function(e,t){var r=e.attribCache;if(i in r)return r[i];var n={isStream:!1};return Object.keys(s).forEach((function(e){n[e]=s[e]})),s.buffer&&(n.buffer=e.link(s.buffer),n.type=n.type||n.buffer+".dtype"),r[i]=n}))})),Object.keys(i).forEach((function(e){var t=i[e];o[e]=z(t,(function(e,r){function n(e){r(l[e],"=",a,".",e,"|0;")}var a=e.invoke(r,t),i=e.shared,o=i.isBufferArgs,s=i.buffer,l={isStream:r.def(!1)},c=new X;c.state=1,Object.keys(c).forEach((function(e){l[e]=r.def(""+c[e])}));var u=l.buffer,d=l.type;return r("if(",o,"(",a,")){",l.isStream,"=true;",u,"=",s,".createStream(",34962,",",a,");",d,"=",u,".dtype;","}else{",u,"=",s,".getBuffer(",a,");","if(",u,"){",d,"=",u,".dtype;",'}else if("constant" in ',a,"){",l.state,"=",2,";","if(typeof "+a+'.constant === "number"){',l[_e[0]],"=",a,".constant;",_e.slice(1).map((function(e){return l[e]})).join("="),"=0;","}else{",_e.map((function(e,t){return l[e]+"="+a+".constant.length>"+t+"?"+a+".constant["+t+"]:0;"})).join(""),"}}else{","if(",o,"(",a,".buffer)){",u,"=",s,".createStream(",34962,",",a,".buffer);","}else{",u,"=",s,".getBuffer(",a,".buffer);","}",d,'="type" in ',a,"?",i.glTypes,"[",a,".type]:",u,".dtype;",l.normalized,"=!!",a,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l}))})),o}function T(e,t,r,n,a){var o=x(e),s=function(e,t,r){function n(e){if(e in a){var r=a[e];e=!0;var n,o,s=0|r.x,l=0|r.y;return"width"in r?n=0|r.width:e=!1,"height"in r?o=0|r.height:e=!1,new O(!e&&t&&t.thisDep,!e&&t&&t.contextDep,!e&&t&&t.propDep,(function(e,t){var a=e.shared.context,i=n;"width"in r||(i=t.def(a,".","framebufferWidth","-",s));var c=o;return"height"in r||(c=t.def(a,".","framebufferHeight","-",l)),[s,l,i,c]}))}if(e in i){var c=i[e];return e=z(c,(function(e,t){var r=e.invoke(t,c),n=e.shared.context,a=t.def(r,".x|0"),i=t.def(r,".y|0");return[a,i,t.def('"width" in ',r,"?",r,".width|0:","(",n,".","framebufferWidth","-",a,")"),r=t.def('"height" in ',r,"?",r,".height|0:","(",n,".","framebufferHeight","-",i,")")]})),t&&(e.thisDep=e.thisDep||t.thisDep,e.contextDep=e.contextDep||t.contextDep,e.propDep=e.propDep||t.propDep),e}return t?new O(t.thisDep,t.contextDep,t.propDep,(function(e,t){var r=e.shared.context;return[0,0,t.def(r,".","framebufferWidth"),t.def(r,".","framebufferHeight")]})):null}var a=e.static,i=e.dynamic;if(e=n("viewport")){var o=e;e=new O(e.thisDep,e.contextDep,e.propDep,(function(e,t){var r=o.append(e,t),n=e.shared.context;return t.set(n,".viewportWidth",r[2]),t.set(n,".viewportHeight",r[3]),r}))}return{viewport:e,scissor_box:n("scissor.box")}}(e,o),l=k(e),c=function(e,t){var r=e.static,n=e.dynamic,a={};return ne.forEach((function(e){function t(t,i){if(e in r){var s=t(r[e]);a[o]=F((function(){return s}))}else if(e in n){var l=n[e];a[o]=z(l,(function(e,t){return i(e,t,e.invoke(t,l))}))}}var o=v(e);switch(e){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return t((function(e){return e}),(function(e,t,r){return r}));case"depth.func":return t((function(e){return ke[e]}),(function(e,t,r){return t.def(e.constants.compareFuncs,"[",r,"]")}));case"depth.range":return t((function(e){return e}),(function(e,t,r){return[t.def("+",r,"[0]"),t=t.def("+",r,"[1]")]}));case"blend.func":return t((function(e){return[we["srcRGB"in e?e.srcRGB:e.src],we["dstRGB"in e?e.dstRGB:e.dst],we["srcAlpha"in e?e.srcAlpha:e.src],we["dstAlpha"in e?e.dstAlpha:e.dst]]}),(function(e,t,r){function n(e,n){return t.def('"',e,n,'" in ',r,"?",r,".",e,n,":",r,".",e)}e=e.constants.blendFuncs;var a=n("src","RGB"),i=n("dst","RGB"),o=(a=t.def(e,"[",a,"]"),t.def(e,"[",n("src","Alpha"),"]"));return[a,i=t.def(e,"[",i,"]"),o,e=t.def(e,"[",n("dst","Alpha"),"]")]}));case"blend.equation":return t((function(e){return"string"==typeof e?[Z[e],Z[e]]:"object"==typeof e?[Z[e.rgb],Z[e.alpha]]:void 0}),(function(e,t,r){var n=e.constants.blendEquations,a=t.def(),i=t.def();return(e=e.cond("typeof ",r,'==="string"')).then(a,"=",i,"=",n,"[",r,"];"),e.else(a,"=",n,"[",r,".rgb];",i,"=",n,"[",r,".alpha];"),t(e),[a,i]}));case"blend.color":return t((function(e){return i(4,(function(t){return+e[t]}))}),(function(e,t,r){return i(4,(function(e){return t.def("+",r,"[",e,"]")}))}));case"stencil.mask":return t((function(e){return 0|e}),(function(e,t,r){return t.def(r,"|0")}));case"stencil.func":return t((function(e){return[ke[e.cmp||"keep"],e.ref||0,"mask"in e?e.mask:-1]}),(function(e,t,r){return[e=t.def('"cmp" in ',r,"?",e.constants.compareFuncs,"[",r,".cmp]",":",7680),t.def(r,".ref|0"),t=t.def('"mask" in ',r,"?",r,".mask|0:-1")]}));case"stencil.opFront":case"stencil.opBack":return t((function(t){return["stencil.opBack"===e?1029:1028,Me[t.fail||"keep"],Me[t.zfail||"keep"],Me[t.zpass||"keep"]]}),(function(t,r,n){function a(e){return r.def('"',e,'" in ',n,"?",i,"[",n,".",e,"]:",7680)}var i=t.constants.stencilOps;return["stencil.opBack"===e?1029:1028,a("fail"),a("zfail"),a("zpass")]}));case"polygonOffset.offset":return t((function(e){return[0|e.factor,0|e.units]}),(function(e,t,r){return[t.def(r,".factor|0"),t=t.def(r,".units|0")]}));case"cull.face":return t((function(e){var t=0;return"front"===e?t=1028:"back"===e&&(t=1029),t}),(function(e,t,r){return t.def(r,'==="front"?',1028,":",1029)}));case"lineWidth":return t((function(e){return e}),(function(e,t,r){return r}));case"frontFace":return t((function(e){return Te[e]}),(function(e,t,r){return t.def(r+'==="cw"?2304:2305')}));case"colorMask":return t((function(e){return e.map((function(e){return!!e}))}),(function(e,t,r){return i(4,(function(e){return"!!"+r+"["+e+"]"}))}));case"sample.coverage":return t((function(e){return["value"in e?e.value:1,!!e.invert]}),(function(e,t,r){return[t.def('"value" in ',r,"?+",r,".value:1"),t=t.def("!!",r,".invert")]}))}})),a}(e),u=w(e),d=s.viewport;return d&&(c.viewport=d),(s=s[d=v("scissor.box")])&&(c[d]=s),(o={framebuffer:o,draw:l,shader:u,state:c,dirty:s=0<Object.keys(c).length}).profile=function(e){var t,r=e.static;if(e=e.dynamic,"profile"in r){var n=!!r.profile;(t=F((function(e,t){return n}))).enable=n}else if("profile"in e){var a=e.profile;t=z(a,(function(e,t){return e.invoke(t,a)}))}return t}(e),o.uniforms=function(e,t){var r=e.static,n=e.dynamic,a={};return Object.keys(r).forEach((function(e){var t,n=r[e];if("number"==typeof n||"boolean"==typeof n)t=F((function(){return n}));else if("function"==typeof n){var o=n._reglType;"texture2d"===o||"textureCube"===o?t=F((function(e){return e.link(n)})):"framebuffer"!==o&&"framebufferCube"!==o||(t=F((function(e){return e.link(n.color[0])})))}else g(n)&&(t=F((function(e){return e.global.def("[",i(n.length,(function(e){return n[e]})),"]")})));t.value=n,a[e]=t})),Object.keys(n).forEach((function(e){var t=n[e];a[e]=z(t,(function(e,r){return e.invoke(r,t)}))})),a}(r),o.attributes=M(t),o.context=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=F((function(e,t){return"number"==typeof r||"boolean"==typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=z(t,(function(e,r){return e.invoke(r,t)}))})),n}(n),o}function C(e,t,r){var n=e.shared.context,a=e.scope();Object.keys(r).forEach((function(i){t.save(n,"."+i),a(n,".",i,"=",r[i].append(e,t),";")})),t(a)}function S(e,t,r,n){var a,i=(s=e.shared).gl,o=s.framebuffer;Q&&(a=t.def(s.extensions,".webgl_draw_buffers"));var s=(l=e.constants).drawBuffer,l=l.backBuffer;e=r?r.append(e,t):t.def(o,".next"),n||t("if(",e,"!==",o,".cur){"),t("if(",e,"){",i,".bindFramebuffer(",36160,",",e,".framebuffer);"),Q&&t(a,".drawBuffersWEBGL(",s,"[",e,".colorAttachments.length]);"),t("}else{",i,".bindFramebuffer(",36160,",null);"),Q&&t(a,".drawBuffersWEBGL(",l,");"),t("}",o,".cur=",e,";"),n||t("}")}function L(e,t,r){var n=e.shared,a=n.gl,o=e.current,s=e.next,l=n.current,c=n.next,u=e.cond(l,".dirty");ne.forEach((function(t){var n,d;if(!((t=v(t))in r.state))if(t in s){n=s[t],d=o[t];var p=i(ee[t].length,(function(e){return u.def(n,"[",e,"]")}));u(e.cond(p.map((function(e,t){return e+"!=="+d+"["+t+"]"})).join("||")).then(a,".",ie[t],"(",p,");",p.map((function(e,t){return d+"["+t+"]="+e})).join(";"),";"))}else n=u.def(c,".",t),p=e.cond(n,"!==",l,".",t),u(p),t in ae?p(e.cond(n).then(a,".enable(",ae[t],");").else(a,".disable(",ae[t],");"),l,".",t,"=",n,";"):p(a,".",ie[t],"(",n,");",l,".",t,"=",n,";")})),0===Object.keys(r.state).length&&u(l,".dirty=false;"),t(u)}function A(e,t,r,n){var a=e.shared,i=e.current,o=a.current,s=a.gl;P(Object.keys(r)).forEach((function(a){var l=r[a];if(!n||n(l)){var c=l.append(e,t);if(ae[a]){var u=ae[a];R(l)?t(s,c?".enable(":".disable(",u,");"):t(e.cond(c).then(s,".enable(",u,");").else(s,".disable(",u,");")),t(o,".",a,"=",c,";")}else if(g(c)){var d=i[a];t(s,".",ie[a],"(",c,");",c.map((function(e,t){return d+"["+t+"]="+e})).join(";"),";")}else t(s,".",ie[a],"(",c,");",o,".",a,"=",c,";")}}))}function E(e,t){$&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function N(e,t,r,n,a){function i(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function o(e){e(c=t.def(),"=",i(),";"),"string"==typeof a?e(p,".count+=",a,";"):e(p,".count++;"),f&&(n?e(u=t.def(),"=",m,".getNumPendingQueries();"):e(m,".beginQuery(",p,");"))}function s(e){e(p,".cpuTime+=",i(),"-",c,";"),f&&(n?e(m,".pushScopeStats(",u,",",m,".getNumPendingQueries(),",p,");"):e(m,".endQuery();"))}function l(e){var r=t.def(h,".profile");t(h,".profile=",e,";"),t.exit(h,".profile=",r,";")}var c,u,d=e.shared,p=e.stats,h=d.current,m=d.timer;if(r=r.profile){if(R(r))return void(r.enable?(o(t),s(t.exit),l("true")):l("false"));l(r=r.append(e,t))}else r=t.def(h,".profile");o(d=e.block()),t("if(",r,"){",d,"}"),s(e=e.block()),t.exit("if(",r,"){",e,"}")}function j(e,t,r,n,a){function i(r,n,a){function i(){t("if(!",u,".buffer){",l,".enableVertexAttribArray(",c,");}");var r,i=a.type;r=a.size?t.def(a.size,"||",n):n,t("if(",u,".type!==",i,"||",u,".size!==",r,"||",h.map((function(e){return u+"."+e+"!=="+a[e]})).join("||"),"){",l,".bindBuffer(",34962,",",d,".buffer);",l,".vertexAttribPointer(",[c,r,i,a.normalized,a.stride,a.offset],");",u,".type=",i,";",u,".size=",r,";",h.map((function(e){return u+"."+e+"="+a[e]+";"})).join(""),"}"),$&&(i=a.divisor,t("if(",u,".divisor!==",i,"){",e.instancing,".vertexAttribDivisorANGLE(",[c,i],");",u,".divisor=",i,";}"))}function s(){t("if(",u,".buffer){",l,".disableVertexAttribArray(",c,");","}if(",_e.map((function(e,t){return u+"."+e+"!=="+p[t]})).join("||"),"){",l,".vertexAttrib4f(",c,",",p,");",_e.map((function(e,t){return u+"."+e+"="+p[t]+";"})).join(""),"}")}var l=o.gl,c=t.def(r,".location"),u=t.def(o.attributes,"[",c,"]");r=a.state;var d=a.buffer,p=[a.x,a.y,a.z,a.w],h=["buffer","normalized","offset","stride"];1===r?i():2===r?s():(t("if(",r,"===",1,"){"),i(),t("}else{"),s(),t("}"))}var o=e.shared;n.forEach((function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!a(l))return;o=l.append(e,t)}else{if(!a(Ce))return;var c=e.scopeAttrib(s);o={},Object.keys(new X).forEach((function(e){o[e]=t.def(c,".",e)}))}i(e.link(n),function(e){switch(e){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)}))}function B(e,r,n,a,o){for(var s,l=e.shared,c=l.gl,u=0;u<a.length;++u){var d,p=(m=a[u]).name,h=m.info.type,f=n.uniforms[p],m=e.link(m)+".location";if(f){if(!o(f))continue;if(R(f)){if(p=f.value,35678===h||35680===h)r(c,".uniform1i(",m,",",(h=e.link(p._texture||p.color[0]._texture))+".bind());"),r.exit(h,".unbind();");else if(35674===h||35675===h||35676===h)f=2,35675===h?f=3:35676===h&&(f=4),r(c,".uniformMatrix",f,"fv(",m,",false,",p=e.global.def("new Float32Array(["+Array.prototype.slice.call(p)+"])"),");");else{switch(h){case 5126:s="1f";break;case 35664:s="2f";break;case 35665:s="3f";break;case 35666:s="4f";break;case 35670:case 5124:s="1i";break;case 35671:case 35667:s="2i";break;case 35672:case 35668:s="3i";break;case 35673:s="4i";break;case 35669:s="4i"}r(c,".uniform",s,"(",m,",",g(p)?Array.prototype.slice.call(p):p,");")}continue}d=f.append(e,r)}else{if(!o(Ce))continue;d=r.def(l.uniforms,"[",t.id(p),"]")}switch(35678===h?r("if(",d,"&&",d,'._reglType==="framebuffer"){',d,"=",d,".color[0];","}"):35680===h&&r("if(",d,"&&",d,'._reglType==="framebufferCube"){',d,"=",d,".color[0];","}"),p=1,h){case 35678:case 35680:h=r.def(d,"._texture"),r(c,".uniform1i(",m,",",h,".bind());"),r.exit(h,".unbind();");continue;case 5124:case 35670:s="1i";break;case 35667:case 35671:s="2i",p=2;break;case 35668:case 35672:s="3i",p=3;break;case 35669:case 35673:s="4i",p=4;break;case 5126:s="1f";break;case 35664:s="2f",p=2;break;case 35665:s="3f",p=3;break;case 35666:s="4f",p=4;break;case 35674:s="Matrix2fv";break;case 35675:s="Matrix3fv";break;case 35676:s="Matrix4fv"}if(r(c,".uniform",s,"(",m,","),"M"===s.charAt(0)){m=Math.pow(h-35674+2,2);var v=e.global.def("new Float32Array(",m,")");r("false,(Array.isArray(",d,")||",d," instanceof Float32Array)?",d,":(",i(m,(function(e){return v+"["+e+"]="+d+"["+e+"]"})),",",v,")")}else r(1<p?i(p,(function(e){return d+"["+e+"]"})):d);r(");")}}function Y(e,t,r,n){function a(a){var i=p[a];return i?i.contextDep&&n.contextDynamic||i.propDep?i.append(e,r):i.append(e,t):t.def(d,".",a)}function i(){function e(){r(l,".drawElementsInstancedANGLE(",[f,g,v,m+"<<(("+v+"-5121)>>1)",s],");")}function t(){r(l,".drawArraysInstancedANGLE(",[f,m,g,s],");")}h?y?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}function o(){function e(){r(u+".drawElements("+[f,g,v,m+"<<(("+v+"-5121)>>1)"]+");")}function t(){r(u+".drawArrays("+[f,m,g]+");")}h?y?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}var s,l,c=e.shared,u=c.gl,d=c.draw,p=n.draw,h=function(){var a=p.elements,i=t;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(i=r),a=a.append(e,i)):a=i.def(d,".","elements"),a&&i("if("+a+")"+u+".bindBuffer(34963,"+a+".buffer.buffer);"),a}(),f=a("primitive"),m=a("offset"),g=function(){var a=p.count,i=t;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(i=r),a=a.append(e,i)):a=i.def(d,".","count"),a}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");$&&(s=a("instances"),l=e.instancing);var v=h+".type",y=p.elements&&R(p.elements);$&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),i(),r("}else if(",s,"<0){"),o(),r("}")):i():o()}function V(e,t,r,n,a){return a=(t=_()).proc("body",a),$&&(t.instancing=a.def(t.shared.extensions,".angle_instanced_arrays")),e(t,a,r,n),t.compile().body}function U(e,t,r,n){E(e,t),j(e,t,r,n.attributes,(function(){return!0})),B(e,t,r,n.uniforms,(function(){return!0})),Y(e,t,t,r)}function W(e,t,r,n){function a(){return!0}e.batchId="a1",E(e,t),j(e,t,r,n.attributes,a),B(e,t,r,n.uniforms,a),Y(e,t,t,r)}function G(e,t,r,n){function a(e){return e.contextDep&&o||e.propDep}function i(e){return!a(e)}E(e,t);var o=r.contextDep,s=t.def(),l=t.def();e.shared.props=l,e.batchId=s;var c=e.scope(),u=e.scope();t(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&C(e,u,r.context),r.needsFramebuffer&&S(e,u,r.framebuffer),A(e,u,r.state,a),r.profile&&a(r.profile)&&N(e,u,r,!1,!0),n?(j(e,c,r,n.attributes,i),j(e,u,r,n.attributes,a),B(e,c,r,n.uniforms,i),B(e,u,r,n.uniforms,a),Y(e,c,u,r)):(t=e.global.def("{}"),n=r.shader.progVar.append(e,u),l=u.def(n,".id"),c=u.def(t,"[",l,"]"),u(e.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",t,"[",l,"]=",e.link((function(t){return V(W,e,r,t,2)})),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function q(e,r){function n(t){var n=r.shader[t];n&&a.set(i.shader,"."+t,n.append(e,a))}var a=e.proc("scope",3);e.batchId="a2";var i=e.shared,o=i.current;C(e,a,r.context),r.framebuffer&&r.framebuffer.append(e,a),P(Object.keys(r.state)).forEach((function(t){var n=r.state[t].append(e,a);g(n)?n.forEach((function(r,n){a.set(e.next[t],"["+n+"]",r)})):a.set(i.next,"."+t,n)})),N(e,a,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(t){var n=r.draw[t];n&&a.set(i.draw,"."+t,""+n.append(e,a))})),Object.keys(r.uniforms).forEach((function(n){a.set(i.uniforms,"["+t.id(n)+"]",r.uniforms[n].append(e,a))})),Object.keys(r.attributes).forEach((function(t){var n=r.attributes[t].append(e,a),i=e.scopeAttrib(t);Object.keys(new X).forEach((function(e){a.set(i,"."+e,n[e])}))})),n("vert"),n("frag"),0<Object.keys(r.state).length&&(a(o,".dirty=true;"),a.exit(o,".dirty=true;")),a("a1(",e.shared.context,",a0,",e.batchId,");")}function K(e,t,r){var n=t.static[r];if(n&&function(e){if("object"==typeof e&&!g(e)){for(var t=Object.keys(e),r=0;r<t.length;++r)if(H.isDynamic(e[t[r]]))return!0;return!1}}(n)){var a=e.global,i=Object.keys(n),o=!1,s=!1,l=!1,c=e.global.def("{}");i.forEach((function(t){var r=n[t];if(H.isDynamic(r))"function"==typeof r&&(r=n[t]=H.unbox(r)),t=z(r,null),o=o||t.thisDep,l=l||t.propDep,s=s||t.contextDep;else{switch(a(c,".",t,"="),typeof r){case"number":a(r);break;case"string":a('"',r,'"');break;case"object":Array.isArray(r)&&a("[",r.join(),"]");break;default:a(e.link(r))}a(";")}})),t.dynamic[r]=new H.DynamicVariable(4,{thisDep:o,contextDep:s,propDep:l,ref:c,append:function(e,t){i.forEach((function(r){var a=n[r];H.isDynamic(a)&&(a=e.invoke(t,a),t(c,".",r,"=",a,";"))}))}}),delete t.static[r]}}var X=u.Record,Z={add:32774,subtract:32778,"reverse subtract":32779};r.ext_blend_minmax&&(Z.min=32775,Z.max=32776);var $=r.angle_instanced_arrays,Q=r.webgl_draw_buffers,ee={dirty:!0,profile:m.profile},te={},ne=[],ae={},ie={};y("dither",3024),y("blend.enable",3042),b("blend.color","blendColor",[0,0,0,0]),b("blend.equation","blendEquationSeparate",[32774,32774]),b("blend.func","blendFuncSeparate",[1,0,1,0]),y("depth.enable",2929,!0),b("depth.func","depthFunc",513),b("depth.range","depthRange",[0,1]),b("depth.mask","depthMask",!0),b("colorMask","colorMask",[!0,!0,!0,!0]),y("cull.enable",2884),b("cull.face","cullFace",1029),b("frontFace","frontFace",2305),b("lineWidth","lineWidth",1),y("polygonOffset.enable",32823),b("polygonOffset.offset","polygonOffset",[0,0]),y("sample.alpha",32926),y("sample.enable",32928),b("sample.coverage","sampleCoverage",[1,!1]),y("stencil.enable",2960),b("stencil.mask","stencilMask",-1),b("stencil.func","stencilFunc",[519,0,-1]),b("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),b("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),y("scissor.enable",3089),b("scissor.box","scissor",[0,0,e.drawingBufferWidth,e.drawingBufferHeight]),b("viewport","viewport",[0,0,e.drawingBufferWidth,e.drawingBufferHeight]);var oe={gl:e,context:h,strings:t,next:te,current:ee,draw:p,elements:o,buffer:a,shader:d,attributes:u.state,uniforms:c,framebuffer:l,extensions:r,timer:f,isBufferArgs:I},se={primTypes:re,compareFuncs:ke,blendFuncs:we,blendEquations:Z,stencilOps:Me,glTypes:J,orientationType:Te};Q&&(se.backBuffer=[1029],se.drawBuffer=i(n.maxDrawbuffers,(function(e){return 0===e?[0]:i(e,(function(e){return 36064+e}))})));var le=0;return{next:te,current:ee,procs:function(){var e=_(),t=e.proc("poll"),r=e.proc("refresh"),a=e.block();t(a),r(a);var o,s=e.shared,l=s.gl,c=s.next,u=s.current;a(u,".dirty=false;"),S(e,t),S(e,r,null,!0),$&&(o=e.link($));for(var d=0;d<n.maxAttributes;++d){var p=r.def(s.attributes,"[",d,"]"),h=e.cond(p,".buffer");h.then(l,".enableVertexAttribArray(",d,");",l,".bindBuffer(",34962,",",p,".buffer.buffer);",l,".vertexAttribPointer(",d,",",p,".size,",p,".type,",p,".normalized,",p,".stride,",p,".offset);").else(l,".disableVertexAttribArray(",d,");",l,".vertexAttrib4f(",d,",",p,".x,",p,".y,",p,".z,",p,".w);",p,".buffer=null;"),r(h),$&&r(o,".vertexAttribDivisorANGLE(",d,",",p,".divisor);")}return Object.keys(ae).forEach((function(n){var i=ae[n],o=a.def(c,".",n),s=e.block();s("if(",o,"){",l,".enable(",i,")}else{",l,".disable(",i,")}",u,".",n,"=",o,";"),r(s),t("if(",o,"!==",u,".",n,"){",s,"}")})),Object.keys(ie).forEach((function(n){var o,s,d=ie[n],p=ee[n],h=e.block();h(l,".",d,"("),g(p)?(d=p.length,o=e.global.def(c,".",n),s=e.global.def(u,".",n),h(i(d,(function(e){return o+"["+e+"]"})),");",i(d,(function(e){return s+"["+e+"]="+o+"["+e+"];"})).join("")),t("if(",i(d,(function(e){return o+"["+e+"]!=="+s+"["+e+"]"})).join("||"),"){",h,"}")):(o=a.def(c,".",n),s=a.def(u,".",n),h(o,");",u,".",n,"=",o,";"),t("if(",o,"!==",s,"){",h,"}")),r(h)})),e.compile()}(),compile:function(e,t,r,n,a){var i=_();return i.stats=i.link(a),Object.keys(t.static).forEach((function(e){K(i,t,e)})),xe.forEach((function(t){K(i,e,t)})),r=T(e,t,r,n),function(e,t){var r=e.proc("draw",1);E(e,r),C(e,r,t.context),S(e,r,t.framebuffer),L(e,r,t),A(e,r,t.state),N(e,r,t,!1,!0);var n=t.shader.progVar.append(e,r);if(r(e.shared.gl,".useProgram(",n,".program);"),t.shader.program)U(e,r,t,t.shader.program);else{var a=e.global.def("{}"),i=r.def(n,".id"),o=r.def(a,"[",i,"]");r(e.cond(o).then(o,".call(this,a0);").else(o,"=",a,"[",i,"]=",e.link((function(r){return V(U,e,t,r,1)})),"(",n,");",o,".call(this,a0);"))}0<Object.keys(t.state).length&&r(e.shared.current,".dirty=true;")}(i,r),q(i,r),function(e,t){function r(e){return e.contextDep&&a||e.propDep}var n=e.proc("batch",2);e.batchId="0",E(e,n);var a=!1,i=!0;Object.keys(t.context).forEach((function(e){a=a||t.context[e].propDep})),a||(C(e,n,t.context),i=!1);var o=!1;if((s=t.framebuffer)?(s.propDep?a=o=!0:s.contextDep&&a&&(o=!0),o||S(e,n,s)):S(e,n,null),t.state.viewport&&t.state.viewport.propDep&&(a=!0),L(e,n,t),A(e,n,t.state,(function(e){return!r(e)})),t.profile&&r(t.profile)||N(e,n,t,!1,"a1"),t.contextDep=a,t.needsContext=i,t.needsFramebuffer=o,(i=t.shader.progVar).contextDep&&a||i.propDep)G(e,n,t,null);else if(i=i.append(e,n),n(e.shared.gl,".useProgram(",i,".program);"),t.shader.program)G(e,n,t,t.shader.program);else{var s=e.global.def("{}"),l=(o=n.def(i,".id"),n.def(s,"[",o,"]"));n(e.cond(l).then(l,".call(this,a0,a1);").else(l,"=",s,"[",o,"]=",e.link((function(r){return V(G,e,t,r,2)})),"(",i,");",l,".call(this,a0,a1);"))}0<Object.keys(t.state).length&&n(e.shared.current,".dirty=true;")}(i,r),i.compile()}}}function j(e,t){for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}var B=function(e,t){for(var r=Object.keys(t),n=0;n<r.length;++n)e[r[n]]=t[r[n]];return e},Y=0,H={DynamicVariable:e,define:function(r,n){return new e(r,t(n+""))},isDynamic:function(t){return"function"==typeof t&&!t._reglType||t instanceof e},unbox:function(t,r){return"function"==typeof t?new e(0,t):t},accessor:t},V={next:"function"==typeof requestAnimationFrame?function(e){return requestAnimationFrame(e)}:function(e){return setTimeout(e,16)},cancel:"function"==typeof cancelAnimationFrame?function(e){return cancelAnimationFrame(e)}:clearTimeout},U="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},W=s();W.zero=s();var G=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(34047));var n=1,a=1;t.webgl_draw_buffers&&(n=e.getParameter(34852),a=e.getParameter(36063));var i=!!t.oes_texture_float;if(i){i=e.createTexture(),e.bindTexture(3553,i),e.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var o=e.createFramebuffer();if(e.bindFramebuffer(36160,o),e.framebufferTexture2D(36160,36064,3553,i,0),e.bindTexture(3553,null),36053!==e.checkFramebufferStatus(36160))i=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(16384);var s=W.allocType(5126,4);e.readPixels(0,0,1,1,6408,5126,s),e.getError()?i=!1:(e.deleteFramebuffer(o),e.deleteTexture(i),i=1===s[0]),W.freeType(s)}}return s=!0,"undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(s=e.createTexture(),o=W.allocType(5121,36),e.activeTexture(33984),e.bindTexture(34067,s),e.texImage2D(34069,0,6408,3,3,0,6408,5121,o),W.freeType(o),e.bindTexture(34067,null),e.deleteTexture(s),s=!e.getError()),{colorBits:[e.getParameter(3410),e.getParameter(3411),e.getParameter(3412),e.getParameter(3413)],depthBits:e.getParameter(3414),stencilBits:e.getParameter(3415),subpixelBits:e.getParameter(3408),extensions:Object.keys(t).filter((function(e){return!!t[e]})),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:a,pointSizeDims:e.getParameter(33901),lineWidthDims:e.getParameter(33902),maxViewportDims:e.getParameter(3386),maxCombinedTextureUnits:e.getParameter(35661),maxCubeMapSize:e.getParameter(34076),maxRenderbufferSize:e.getParameter(34024),maxTextureUnits:e.getParameter(34930),maxTextureSize:e.getParameter(3379),maxAttributes:e.getParameter(34921),maxVertexUniforms:e.getParameter(36347),maxVertexTextureUnits:e.getParameter(35660),maxVaryingVectors:e.getParameter(36348),maxFragmentUniforms:e.getParameter(36349),glsl:e.getParameter(35724),renderer:e.getParameter(7937),vendor:e.getParameter(7936),version:e.getParameter(7938),readFloat:i,npotTextureCube:s}},q=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray},K=function(e){return Object.keys(e).map((function(t){return e[t]}))},X={shape:function(e){for(var t=[];e.length;e=e[0])t.push(e.length);return t},flatten:function(e,t,r,n){var a=1;if(t.length)for(var i=0;i<t.length;++i)a*=t[i];else a=0;switch(r=n||W.allocType(r,a),t.length){case 0:break;case 1:for(n=t[0],t=0;t<n;++t)r[t]=e[t];break;case 2:for(n=t[0],t=t[1],i=a=0;i<n;++i)for(var o=e[i],s=0;s<t;++s)r[a++]=o[s];break;case 3:c(e,t[0],t[1],t[2],r,0);break;default:!function e(t,r,n,a,i){for(var o=1,s=n+1;s<r.length;++s)o*=r[s];var l=r[n];if(4==r.length-n){var u=r[n+1],d=r[n+2];for(r=r[n+3],s=0;s<l;++s)c(t[s],u,d,r,a,i),i+=o}else for(s=0;s<l;++s)e(t[s],r,n+1,a,i),i+=o}(e,t,0,r,0)}return r}},Z={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},J={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},$={dynamic:35048,stream:35040,static:35044},Q=X.flatten,ee=X.shape,te=[];te[5120]=1,te[5122]=2,te[5124]=4,te[5121]=1,te[5123]=2,te[5125]=4,te[5126]=4;var re={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ne=new Float32Array(1),ae=new Uint32Array(ne.buffer),ie=[9984,9986,9985,9987],oe=[0,6409,6410,6407,6408],se={};se[6409]=se[6406]=se[6402]=1,se[34041]=se[6410]=2,se[6407]=se[35904]=3,se[6408]=se[35906]=4;var le=v("HTMLCanvasElement"),ce=v("CanvasRenderingContext2D"),ue=v("ImageBitmap"),de=v("HTMLImageElement"),pe=v("HTMLVideoElement"),he=Object.keys(Z).concat([le,ce,ue,de,pe]),fe=[];fe[5121]=1,fe[5126]=4,fe[36193]=2,fe[5123]=2,fe[5125]=4;var me=[];me[32854]=2,me[32855]=2,me[36194]=2,me[34041]=4,me[33776]=.5,me[33777]=.5,me[33778]=1,me[33779]=1,me[35986]=.5,me[35987]=1,me[34798]=1,me[35840]=.5,me[35841]=.25,me[35842]=.5,me[35843]=.25,me[36196]=.5;var ge=[];ge[32854]=2,ge[32855]=2,ge[36194]=2,ge[33189]=2,ge[36168]=1,ge[34041]=4,ge[35907]=4,ge[34836]=16,ge[34842]=8,ge[34843]=6;var ve=function(e,t,r,n,a){function i(e){this.id=c++,this.refCount=1,this.renderbuffer=e,this.format=32854,this.height=this.width=0,a.profile&&(this.stats={size:0})}function o(t){var r=t.renderbuffer;e.bindRenderbuffer(36161,null),e.deleteRenderbuffer(r),t.renderbuffer=null,t.refCount=0,delete u[t.id],n.renderbufferCount--}var s={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};t.ext_srgb&&(s.srgba=35907),t.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),t.webgl_color_buffer_float&&(s.rgba32f=34836);var l=[];Object.keys(s).forEach((function(e){l[s[e]]=e}));var c=0,u={};return i.prototype.decRef=function(){0>=--this.refCount&&o(this)},a.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(u).forEach((function(t){e+=u[t].stats.size})),e}),{create:function(t,r){function o(t,r){var n=0,i=0,u=32854;if("object"==typeof t&&t?("shape"in t?(n=0|(i=t.shape)[0],i=0|i[1]):("radius"in t&&(n=i=0|t.radius),"width"in t&&(n=0|t.width),"height"in t&&(i=0|t.height)),"format"in t&&(u=s[t.format])):"number"==typeof t?(n=0|t,i="number"==typeof r?0|r:n):t||(n=i=1),n!==c.width||i!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=i,c.format=u,e.bindRenderbuffer(36161,c.renderbuffer),e.renderbufferStorage(36161,u,n,i),a.profile&&(c.stats.size=ge[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new i(e.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(t,r),o.resize=function(t,r){var n=0|t,i=0|r||n;return n===c.width&&i===c.height?o:(o.width=c.width=n,o.height=c.height=i,e.bindRenderbuffer(36161,c.renderbuffer),e.renderbufferStorage(36161,c.format,n,i),a.profile&&(c.stats.size=ge[c.format]*c.width*c.height),o)},o._reglType="renderbuffer",o._renderbuffer=c,a.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){K(u).forEach(o)},restore:function(){K(u).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)})),e.bindRenderbuffer(36161,null)}}},ye=[];ye[6408]=4,ye[6407]=3;var be=[];be[5121]=1,be[5126]=4,be[36193]=2;var _e=["x","y","z","w"],xe="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),we={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ke={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Me={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Te={cw:2304,ccw:2305},Ce=new O(!1,!1,!1,(function(){}));return function(e){function t(){if(0===X.length)w&&w.update(),Q=null;else{Q=V.next(t),d();for(var e=X.length-1;0<=e;--e){var r=X[e];r&&r(D,null,0)}g.flush(),w&&w.update()}}function r(){!Q&&0<X.length&&(Q=V.next(t))}function n(){Q&&(V.cancel(t),Q=null)}function i(e){e.preventDefault(),n(),Z.forEach((function(e){e()}))}function o(e){g.getError(),y.restore(),R.restore(),P.restore(),F.restore(),z.restore(),Y.restore(),w&&w.restore(),W.procs.refresh(),r(),J.forEach((function(e){e()}))}function s(e){function t(e){var t={},r={};return Object.keys(e).forEach((function(n){var a=e[n];H.isDynamic(a)?r[n]=H.unbox(a,n):t[n]=a})),{dynamic:r,static:t}}var r=t(e.context||{}),n=t(e.uniforms||{}),a=t(e.attributes||{}),i=t(function(e){function t(e){if(e in r){var t=r[e];delete r[e],Object.keys(t).forEach((function(n){r[e+"."+n]=t[n]}))}}var r=B({},e);return delete r.uniforms,delete r.attributes,delete r.context,"stencil"in r&&r.stencil.op&&(r.stencil.opBack=r.stencil.opFront=r.stencil.op,delete r.stencil.op),t("blend"),t("depth"),t("cull"),t("stencil"),t("polygonOffset"),t("scissor"),t("sample"),r}(e));e={gpuTime:0,cpuTime:0,count:0};var o=(r=W.compile(i,a,n,r,e)).draw,s=r.batch,l=r.scope,c=[];return B((function(e,t){var r;if("function"==typeof e)return l.call(this,null,e,0);if("function"==typeof t)if("number"==typeof e)for(r=0;r<e;++r)l.call(this,null,t,r);else{if(!Array.isArray(e))return l.call(this,e,t,0);for(r=0;r<e.length;++r)l.call(this,e[r],t,r)}else if("number"==typeof e){if(0<e)return s.call(this,function(e){for(;c.length<e;)c.push(null);return c}(0|e),0|e)}else{if(!Array.isArray(e))return o.call(this,e);if(e.length)return s.call(this,e,e.length)}}),{stats:e})}function l(e,t){var r=0;W.procs.poll();var n=t.color;n&&(g.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),"depth"in t&&(g.clearDepth(+t.depth),r|=256),"stencil"in t&&(g.clearStencil(0|t.stencil),r|=1024),g.clear(r)}function c(e){return X.push(e),r(),{cancel:function(){var t=j(X,e);X[t]=function e(){var t=j(X,e);X[t]=X[X.length-1],--X.length,0>=X.length&&n()}}}}function u(){var e=q.viewport,t=q.scissor_box;e[0]=e[1]=t[0]=t[1]=0,D.viewportWidth=D.framebufferWidth=D.drawingBufferWidth=e[2]=t[2]=g.drawingBufferWidth,D.viewportHeight=D.framebufferHeight=D.drawingBufferHeight=e[3]=t[3]=g.drawingBufferHeight}function d(){D.tick+=1,D.time=m(),u(),W.procs.poll()}function p(){u(),W.procs.refresh(),w&&w.update()}function m(){return(U()-k)/1e3}if(!(e=a(e)))return null;var g=e.gl,v=g.getContextAttributes();g.isContextLost();var y=function(e,t){function r(t){var r;t=t.toLowerCase();try{r=n[t]=e.getExtension(t)}catch(e){}return!!r}for(var n={},a=0;a<t.extensions.length;++a){var i=t.extensions[a];if(!r(i))return t.onDestroy(),t.onDone('"'+i+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return t.optionalExtensions.forEach(r),{extensions:n,restore:function(){Object.keys(n).forEach((function(e){if(n[e]&&!r(e))throw Error("(regl): error restoring extension "+e)}))}}}(g,e);if(!y)return null;var b=function(){var e={"":0},t=[""];return{id:function(r){var n=e[r];return n||(n=e[r]=t.length,t.push(r),n)},str:function(e){return t[e]}}}(),_={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},x=y.extensions,w=function(e,t){function r(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function n(e,t,n){var a=o.pop()||new r;a.startQueryIndex=e,a.endQueryIndex=t,a.sum=0,a.stats=n,s.push(a)}if(!t.ext_disjoint_timer_query)return null;var a=[],i=[],o=[],s=[],l=[],c=[];return{beginQuery:function(e){var r=a.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,r),i.push(r),n(i.length-1,i.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:n,update:function(){var e,r;if(0!==(e=i.length)){c.length=Math.max(c.length,e+1),l.length=Math.max(l.length,e+1),l[0]=0;var n=c[0]=0;for(r=e=0;r<i.length;++r){var u=i[r];t.ext_disjoint_timer_query.getQueryObjectEXT(u,34919)?(n+=t.ext_disjoint_timer_query.getQueryObjectEXT(u,34918),a.push(u)):i[e++]=u,l[r+1]=n,c[r+1]=e}for(i.length=e,r=e=0;r<s.length;++r){var d=(n=s[r]).startQueryIndex;u=n.endQueryIndex,n.sum+=l[u]-l[d],d=c[d],(u=c[u])===d?(n.stats.gpuTime+=n.sum/1e6,o.push(n)):(n.startQueryIndex=d,n.endQueryIndex=u,s[e++]=n)}s.length=e}},getNumPendingQueries:function(){return i.length},clear:function(){a.push.apply(a,i);for(var e=0;e<a.length;e++)t.ext_disjoint_timer_query.deleteQueryEXT(a[e]);i.length=0,a.length=0},restore:function(){i.length=0,a.length=0}}}(0,x),k=U(),A=g.drawingBufferWidth,E=g.drawingBufferHeight,D={tick:0,time:0,viewportWidth:A,viewportHeight:E,framebufferWidth:A,framebufferHeight:E,drawingBufferWidth:A,drawingBufferHeight:E,pixelRatio:e.pixelRatio},I=G(g,x),P=(A=function(e,t,r,n){for(e=r.maxAttributes,t=Array(e),r=0;r<e;++r)t[r]=new C;return{Record:C,scope:{},state:t}}(g,x,I),h(g,_,e,A)),O=f(g,x,P,_),R=S(g,b,_,e),F=M(g,x,I,(function(){W.procs.poll()}),D,_,e),z=ve(g,x,0,_,e),Y=T(g,x,I,F,z,_),W=N(g,b,x,I,P,O,0,Y,{},A,R,{elements:null,primitive:4,count:-1,offset:0,instances:-1},D,w,e),q=(b=L(g,Y,W.procs.poll,D),W.next),K=g.canvas,X=[],Z=[],J=[],$=[e.onDestroy],Q=null;K&&(K.addEventListener("webglcontextlost",i,!1),K.addEventListener("webglcontextrestored",o,!1));var ee=Y.setFBO=s({framebuffer:H.define.call(null,1,"framebuffer")});return p(),v=B(s,{clear:function(e){if("framebuffer"in e)if(e.framebuffer&&"framebufferCube"===e.framebuffer_reglType)for(var t=0;6>t;++t)ee(B({framebuffer:e.framebuffer.faces[t]},e),l);else ee(e,l);else l(0,e)},prop:H.define.bind(null,1),context:H.define.bind(null,2),this:H.define.bind(null,3),draw:s({}),buffer:function(e){return P.create(e,34962,!1,!1)},elements:function(e){return O.create(e,!1)},texture:F.create2D,cube:F.createCube,renderbuffer:z.create,framebuffer:Y.create,framebufferCube:Y.createCube,attributes:v,frame:c,on:function(e,t){var r;switch(e){case"frame":return c(t);case"lost":r=Z;break;case"restore":r=J;break;case"destroy":r=$}return r.push(t),{cancel:function(){for(var e=0;e<r.length;++e)if(r[e]===t){r[e]=r[r.length-1],r.pop();break}}}},limits:I,hasExtension:function(e){return 0<=I.extensions.indexOf(e.toLowerCase())},read:b,destroy:function(){X.length=0,n(),K&&(K.removeEventListener("webglcontextlost",i),K.removeEventListener("webglcontextrestored",o)),R.clear(),Y.clear(),z.clear(),F.clear(),O.clear(),P.clear(),w&&w.clear(),$.forEach((function(e){e()}))},_gl:g,_refresh:p,poll:function(){d(),w&&w.update()},now:m,stats:_}),e.onDone(null,v),v}}))},{}],501:[function(e,t,r){
/*!
 * repeat-string <https://github.com/jonschlinkert/repeat-string>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT License.
 */
"use strict";var n,a="";t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var r=e.length*t;if(n!==e||void 0===n)n=e,a="";else if(a.length>=r)return a.substr(0,r);for(;r>a.length&&t>1;)1&t&&(a+=e),t>>=1,e+=e;return a=(a+=e).substr(0,r)}},{}],502:[function(e,r,n){(function(e){r.exports=e.performance&&e.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],503:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length,r=e[e.length-1],n=t,a=t-2;a>=0;--a){var i=r,o=e[a];(l=o-((r=i+o)-i))&&(e[--n]=r,r=l)}var s=0;for(a=n;a<t;++a){var l;i=e[a],(l=(o=r)-((r=i+o)-i))&&(e[s++]=l)}return e[s++]=r,e.length=s,e}},{}],504:[function(e,t,r){"use strict";var n=e("two-product"),a=e("robust-sum"),i=e("robust-scale"),o=e("robust-compress"),s=6;function l(e,t){for(var r=new Array(e.length-1),n=1;n<e.length;++n)for(var a=r[n-1]=new Array(e.length-1),i=0,o=0;i<e.length;++i)i!==t&&(a[o++]=e[n][i]);return r}function c(e){for(var t=new Array(e),r=0;r<e;++r){t[r]=new Array(e);for(var n=0;n<e;++n)t[r][n]=["m[",r,"][",n,"]"].join("")}return t}function u(e){if(2===e.length)return["sum(prod(",e[0][0],",",e[1][1],"),prod(-",e[0][1],",",e[1][0],"))"].join("");for(var t=[],r=0;r<e.length;++r)t.push(["scale(",u(l(e,r)),",",(n=r,1&n?"-":""),e[0][r],")"].join(""));return function e(t){if(1===t.length)return t[0];if(2===t.length)return["sum(",t[0],",",t[1],")"].join("");var r=t.length>>1;return["sum(",e(t.slice(0,r)),",",e(t.slice(r)),")"].join("")}(t);var n}function d(e){return new Function("sum","scale","prod","compress",["function robustDeterminant",e,"(m){return compress(",u(c(e)),")};return robustDeterminant",e].join(""))(a,i,n,o)}var p=[function(){return[0]},function(e){return[e[0][0]]}];!function(){for(;p.length<s;)p.push(d(p.length));for(var e=[],r=["function robustDeterminant(m){switch(m.length){"],n=0;n<s;++n)e.push("det"+n),r.push("case ",n,":return det",n,"(m);");r.push("}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant"),e.push("CACHE","gen",r.join(""));var a=Function.apply(void 0,e);for(t.exports=a.apply(void 0,p.concat([p,d])),n=0;n<p.length;++n)t.exports[n]=p[n]}()},{"robust-compress":503,"robust-scale":510,"robust-sum":513,"two-product":541}],505:[function(e,t,r){"use strict";var n=e("two-product"),a=e("robust-sum");t.exports=function(e,t){for(var r=n(e[0],t[0]),i=1;i<e.length;++i)r=a(r,n(e[i],t[i]));return r}},{"robust-sum":513,"two-product":541}],506:[function(e,t,r){"use strict";var n=e("two-product"),a=e("robust-sum"),i=e("robust-subtract"),o=e("robust-scale"),s=6;function l(e,t){for(var r=new Array(e.length-1),n=1;n<e.length;++n)for(var a=r[n-1]=new Array(e.length-1),i=0,o=0;i<e.length;++i)i!==t&&(a[o++]=e[n][i]);return r}function c(e){if(1===e.length)return e[0];if(2===e.length)return["sum(",e[0],",",e[1],")"].join("");var t=e.length>>1;return["sum(",c(e.slice(0,t)),",",c(e.slice(t)),")"].join("")}function u(e,t){if("m"===e.charAt(0)){if("w"===t.charAt(0)){var r=e.split("[");return["w",t.substr(1),"m",r[0].substr(1)].join("")}return["prod(",e,",",t,")"].join("")}return u(t,e)}function d(e){if(2===e.length)return[["diff(",u(e[0][0],e[1][1]),",",u(e[1][0],e[0][1]),")"].join("")];for(var t=[],r=0;r<e.length;++r)t.push(["scale(",c(d(l(e,r))),",",(n=r,!0&n?"-":""),e[0][r],")"].join(""));return t;var n}function p(e,t){for(var r=[],n=0;n<t-2;++n)r.push(["prod(m",e,"[",n,"],m",e,"[",n,"])"].join(""));return c(r)}function h(e){for(var t=[],r=[],s=function(e){for(var t=new Array(e),r=0;r<e;++r){t[r]=new Array(e);for(var n=0;n<e;++n)t[r][n]=["m",n,"[",e-r-2,"]"].join("")}return t}(e),u=0;u<e;++u)s[0][u]="1",s[e-1][u]="w"+u;for(u=0;u<e;++u)0==(1&u)?t.push.apply(t,d(l(s,u))):r.push.apply(r,d(l(s,u)));var h=c(t),f=c(r),m="exactInSphere"+e,g=[];for(u=0;u<e;++u)g.push("m"+u);var v=["function ",m,"(",g.join(),"){"];for(u=0;u<e;++u){v.push("var w",u,"=",p(u,e),";");for(var y=0;y<e;++y)y!==u&&v.push("var w",u,"m",y,"=scale(w",u,",m",y,"[0]);")}return v.push("var p=",h,",n=",f,",d=diff(p,n);return d[d.length-1];}return ",m),new Function("sum","diff","prod","scale",v.join(""))(a,i,n,o)}var f=[function(){return 0},function(){return 0},function(){return 0}];function m(e){var t=f[e.length];return t||(t=f[e.length]=h(e.length)),t.apply(void 0,e)}!function(){for(;f.length<=s;)f.push(h(f.length));for(var e=[],r=["slow"],n=0;n<=s;++n)e.push("a"+n),r.push("o"+n);var a=["function testInSphere(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=s;++n)a.push("case ",n,":return o",n,"(",e.slice(0,n).join(),");");a.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere"),r.push(a.join(""));var i=Function.apply(void 0,r);for(t.exports=i.apply(void 0,[m].concat(f)),n=0;n<=s;++n)t.exports[n]=f[n]}()},{"robust-scale":510,"robust-subtract":512,"robust-sum":513,"two-product":541}],507:[function(e,t,r){"use strict";var n=e("robust-determinant"),a=6;function i(e){for(var t="robustLinearSolve"+e+"d",r=["function ",t,"(A,b){return ["],a=0;a<e;++a){r.push("det([");for(var i=0;i<e;++i){i>0&&r.push(","),r.push("[");for(var o=0;o<e;++o)o>0&&r.push(","),o===a?r.push("+b[",i,"]"):r.push("+A[",i,"][",o,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",t);var s=new Function("det",r.join(""));return s(e<6?n[e]:n)}var o=[function(){return[0]},function(e,t){return[[t[0]],[e[0][0]]]}];!function(){for(;o.length<a;)o.push(i(o.length));for(var e=[],r=["function dispatchLinearSolve(A,b){switch(A.length){"],n=0;n<a;++n)e.push("s"+n),r.push("case ",n,":return s",n,"(A,b);");r.push("}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve"),e.push("CACHE","g",r.join(""));var s=Function.apply(void 0,e);for(t.exports=s.apply(void 0,o.concat([o,i])),n=0;n<a;++n)t.exports[n]=o[n]}()},{"robust-determinant":504}],508:[function(e,t,r){"use strict";var n=e("two-product"),a=e("robust-sum"),i=e("robust-scale"),o=e("robust-subtract"),s=5;function l(e,t){for(var r=new Array(e.length-1),n=1;n<e.length;++n)for(var a=r[n-1]=new Array(e.length-1),i=0,o=0;i<e.length;++i)i!==t&&(a[o++]=e[n][i]);return r}function c(e){if(1===e.length)return e[0];if(2===e.length)return["sum(",e[0],",",e[1],")"].join("");var t=e.length>>1;return["sum(",c(e.slice(0,t)),",",c(e.slice(t)),")"].join("")}function u(e){if(2===e.length)return[["sum(prod(",e[0][0],",",e[1][1],"),prod(-",e[0][1],",",e[1][0],"))"].join("")];for(var t=[],r=0;r<e.length;++r)t.push(["scale(",c(u(l(e,r))),",",(n=r,1&n?"-":""),e[0][r],")"].join(""));return t;var n}function d(e){for(var t=[],r=[],s=function(e){for(var t=new Array(e),r=0;r<e;++r){t[r]=new Array(e);for(var n=0;n<e;++n)t[r][n]=["m",n,"[",e-r-1,"]"].join("")}return t}(e),d=[],p=0;p<e;++p)0==(1&p)?t.push.apply(t,u(l(s,p))):r.push.apply(r,u(l(s,p))),d.push("m"+p);var h=c(t),f=c(r),m="orientation"+e+"Exact",g=["function ",m,"(",d.join(),"){var p=",h,",n=",f,",d=sub(p,n);return d[d.length-1];};return ",m].join("");return new Function("sum","prod","scale","sub",g)(a,n,i,o)}var p=d(3),h=d(4),f=[function(){return 0},function(){return 0},function(e,t){return t[0]-e[0]},function(e,t,r){var n,a=(e[1]-r[1])*(t[0]-r[0]),i=(e[0]-r[0])*(t[1]-r[1]),o=a-i;if(a>0){if(i<=0)return o;n=a+i}else{if(!(a<0))return o;if(i>=0)return o;n=-(a+i)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:p(e,t,r)},function(e,t,r,n){var a=e[0]-n[0],i=t[0]-n[0],o=r[0]-n[0],s=e[1]-n[1],l=t[1]-n[1],c=r[1]-n[1],u=e[2]-n[2],d=t[2]-n[2],p=r[2]-n[2],f=i*c,m=o*l,g=o*s,v=a*c,y=a*l,b=i*s,_=u*(f-m)+d*(g-v)+p*(y-b),x=7771561172376103e-31*((Math.abs(f)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(d)+(Math.abs(y)+Math.abs(b))*Math.abs(p));return _>x||-_>x?_:h(e,t,r,n)}];function m(e){var t=f[e.length];return t||(t=f[e.length]=d(e.length)),t.apply(void 0,e)}!function(){for(;f.length<=s;)f.push(d(f.length));for(var e=[],r=["slow"],n=0;n<=s;++n)e.push("a"+n),r.push("o"+n);var a=["function getOrientation(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=s;++n)a.push("case ",n,":return o",n,"(",e.slice(0,n).join(),");");a.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),r.push(a.join(""));var i=Function.apply(void 0,r);for(t.exports=i.apply(void 0,[m].concat(f)),n=0;n<=s;++n)t.exports[n]=f[n]}()},{"robust-scale":510,"robust-subtract":512,"robust-sum":513,"two-product":541}],509:[function(e,t,r){"use strict";var n=e("robust-sum"),a=e("robust-scale");t.exports=function(e,t){if(1===e.length)return a(t,e[0]);if(1===t.length)return a(e,t[0]);if(0===e.length||0===t.length)return[0];var r=[0];if(e.length<t.length)for(var i=0;i<e.length;++i)r=n(r,a(t,e[i]));else for(i=0;i<t.length;++i)r=n(r,a(e,t[i]));return r}},{"robust-scale":510,"robust-sum":513}],510:[function(e,t,r){"use strict";var n=e("two-product"),a=e("two-sum");t.exports=function(e,t){var r=e.length;if(1===r){var i=n(e[0],t);return i[0]?i:[i[1]]}var o=new Array(2*r),s=[.1,.1],l=[.1,.1],c=0;n(e[0],t,s),s[0]&&(o[c++]=s[0]);for(var u=1;u<r;++u){n(e[u],t,l);var d=s[1];a(d,l[0],s),s[0]&&(o[c++]=s[0]);var p=l[1],h=s[1],f=p+h,m=h-(f-p);s[1]=f,m&&(o[c++]=m)}return s[1]&&(o[c++]=s[1]),0===c&&(o[c++]=0),o.length=c,o}},{"two-product":541,"two-sum":542}],511:[function(e,t,r){"use strict";t.exports=function(e,t,r,a){var i=n(e,r,a),o=n(t,r,a);if(i>0&&o>0||i<0&&o<0)return!1;var s=n(r,e,t),l=n(a,e,t);return!(s>0&&l>0||s<0&&l<0)&&(0!==i||0!==o||0!==s||0!==l||function(e,t,r,n){for(var a=0;a<2;++a){var i=e[a],o=t[a],s=Math.min(i,o),l=Math.max(i,o),c=r[a],u=n[a],d=Math.min(c,u);if(Math.max(c,u)<s||l<d)return!1}return!0}(e,t,r,a))};var n=e("robust-orientation")[3]},{"robust-orientation":508}],512:[function(e,t,r){"use strict";t.exports=function(e,t){var r=0|e.length,n=0|t.length;if(1===r&&1===n)return function(e,t){var r=e+t,n=r-e,a=e-(r-n)+(t-n);return a?[a,r]:[r]}(e[0],-t[0]);var a,i,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,d=e[l],p=u(d),h=-t[c],f=u(h);p<f?(i=d,(l+=1)<r&&(d=e[l],p=u(d))):(i=h,(c+=1)<n&&(h=-t[c],f=u(h))),l<r&&p<f||c>=n?(a=d,(l+=1)<r&&(d=e[l],p=u(d))):(a=h,(c+=1)<n&&(h=-t[c],f=u(h)));for(var m,g,v=a+i,y=v-a,b=i-y,_=b,x=v;l<r&&c<n;)p<f?(a=d,(l+=1)<r&&(d=e[l],p=u(d))):(a=h,(c+=1)<n&&(h=-t[c],f=u(h))),(b=(i=_)-(y=(v=a+i)-a))&&(o[s++]=b),_=x-((m=x+v)-(g=m-x))+(v-g),x=m;for(;l<r;)(b=(i=_)-(y=(v=(a=d)+i)-a))&&(o[s++]=b),_=x-((m=x+v)-(g=m-x))+(v-g),x=m,(l+=1)<r&&(d=e[l]);for(;c<n;)(b=(i=_)-(y=(v=(a=h)+i)-a))&&(o[s++]=b),_=x-((m=x+v)-(g=m-x))+(v-g),x=m,(c+=1)<n&&(h=-t[c]);return _&&(o[s++]=_),x&&(o[s++]=x),s||(o[s++]=0),o.length=s,o}},{}],513:[function(e,t,r){"use strict";t.exports=function(e,t){var r=0|e.length,n=0|t.length;if(1===r&&1===n)return function(e,t){var r=e+t,n=r-e,a=e-(r-n)+(t-n);return a?[a,r]:[r]}(e[0],t[0]);var a,i,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,d=e[l],p=u(d),h=t[c],f=u(h);p<f?(i=d,(l+=1)<r&&(d=e[l],p=u(d))):(i=h,(c+=1)<n&&(h=t[c],f=u(h))),l<r&&p<f||c>=n?(a=d,(l+=1)<r&&(d=e[l],p=u(d))):(a=h,(c+=1)<n&&(h=t[c],f=u(h)));for(var m,g,v=a+i,y=v-a,b=i-y,_=b,x=v;l<r&&c<n;)p<f?(a=d,(l+=1)<r&&(d=e[l],p=u(d))):(a=h,(c+=1)<n&&(h=t[c],f=u(h))),(b=(i=_)-(y=(v=a+i)-a))&&(o[s++]=b),_=x-((m=x+v)-(g=m-x))+(v-g),x=m;for(;l<r;)(b=(i=_)-(y=(v=(a=d)+i)-a))&&(o[s++]=b),_=x-((m=x+v)-(g=m-x))+(v-g),x=m,(l+=1)<r&&(d=e[l]);for(;c<n;)(b=(i=_)-(y=(v=(a=h)+i)-a))&&(o[s++]=b),_=x-((m=x+v)-(g=m-x))+(v-g),x=m,(c+=1)<n&&(h=t[c]);return _&&(o[s++]=_),x&&(o[s++]=x),s||(o[s++]=0),o.length=s,o}},{}],514:[function(e,t,r){"use strict";t.exports=function(e){return e<0?-1:e>0?1:0}},{}],515:[function(e,t,r){"use strict";t.exports=function(e){return a(n(e))};var n=e("boundary-cells"),a=e("reduce-simplicial-complex")},{"boundary-cells":96,"reduce-simplicial-complex":490}],516:[function(e,t,r){"use strict";t.exports=function(e,t,r,s){if(r=r||0,void 0===s&&(s=function(e){for(var t=e.length,r=0,n=0;n<t;++n)r=0|Math.max(r,e[n].length);return r-1}(e)),0===e.length||s<1)return{cells:[],vertexIds:[],vertexWeights:[]};var l=function(e,t){for(var r=e.length,n=a.mallocUint8(r),i=0;i<r;++i)n[i]=e[i]<t|0;return n}(t,+r),c=function(e,t){for(var r=e.length,o=t*(t+1)/2*r|0,s=a.mallocUint32(2*o),l=0,c=0;c<r;++c)for(var u=e[c],d=(t=u.length,0);d<t;++d)for(var p=0;p<d;++p){var h=u[p],f=u[d];s[l++]=0|Math.min(h,f),s[l++]=0|Math.max(h,f)}i(n(s,[l/2|0,2]));var m=2;for(c=2;c<l;c+=2)s[c-2]===s[c]&&s[c-1]===s[c+1]||(s[m++]=s[c],s[m++]=s[c+1]);return n(s,[m/2|0,2])}(e,s),u=function(e,t,r,i){for(var o=e.data,s=e.shape[0],l=a.mallocDouble(s),c=0,u=0;u<s;++u){var d=o[2*u],p=o[2*u+1];if(r[d]!==r[p]){var h=t[d],f=t[p];o[2*c]=d,o[2*c+1]=p,l[c++]=(f-i)/(f-h)}}return e.shape[0]=c,n(l,[c])}(c,t,l,+r),d=function(e,t){var r=a.mallocInt32(2*t),n=e.shape[0],i=e.data;r[0]=0;for(var o=0,s=0;s<n;++s){var l=i[2*s];if(l!==o){for(r[2*o+1]=s;++o<l;)r[2*o]=s,r[2*o+1]=s;r[2*o]=s}}for(r[2*o+1]=n;++o<t;)r[2*o]=r[2*o+1]=n;return r}(c,0|t.length),p=o(s)(e,c.data,d,l),h=function(e){for(var t=0|e.shape[0],r=e.data,n=new Array(t),a=0;a<t;++a)n[a]=[r[2*a],r[2*a+1]];return n}(c),f=[].slice.call(u.data,0,u.shape[0]);return a.free(l),a.free(c.data),a.free(u.data),a.free(d),{cells:p,vertexIds:h,vertexWeights:f}};var n=e("ndarray"),a=e("typedarray-pool"),i=e("ndarray-sort"),o=e("./lib/codegen")},{"./lib/codegen":517,ndarray:451,"ndarray-sort":449,"typedarray-pool":543}],517:[function(e,t,r){"use strict";t.exports=function(e){var t=i[e];return t||(t=i[e]=function(e){var t=0,r=new Array(e+1);r[0]=[[]];for(var i=1;i<=e;++i)for(var o=r[i]=a(i),s=0;s<o.length;++s)t=Math.max(t,o[i].length);var l=["function B(C,E,i,j){","var a=Math.min(i,j)|0,b=Math.max(i,j)|0,l=C[2*a],h=C[2*a+1];","while(l<h){","var m=(l+h)>>1,v=E[2*m+1];","if(v===b){return m}","if(b<v){h=m}else{l=m+1}","}","return l;","};","function getContour",e,"d(F,E,C,S){","var n=F.length,R=[];","for(var i=0;i<n;++i){var c=F[i],l=c.length;"];function c(e){if(!(e.length<=0)){l.push("R.push(");for(var t=0;t<e.length;++t){var r=e[t];t>0&&l.push(","),l.push("[");for(var n=0;n<r.length;++n){var a=r[n];n>0&&l.push(","),l.push("B(C,E,c[",a[0],"],c[",a[1],"])")}l.push("]")}l.push(");")}}for(i=e+1;i>1;--i){i<e+1&&l.push("else "),l.push("if(l===",i,"){");var u=[];for(s=0;s<i;++s)u.push("(S[c["+s+"]]<<"+s+")");for(l.push("var M=",u.join("+"),";if(M===0||M===",(1<<i)-1,"){continue}switch(M){"),o=r[i-1],s=0;s<o.length;++s)l.push("case ",s,":"),c(o[s]),l.push("break;");l.push("}}")}return l.push("}return R;};return getContour",e,"d"),new Function("pool",l.join(""))(n)}(e)),t};var n=e("typedarray-pool"),a=e("marching-simplex-table"),i={}},{"marching-simplex-table":428,"typedarray-pool":543}],518:[function(e,t,r){"use strict";var n=e("bit-twiddle"),a=e("union-find");function i(e,t){var r=e.length,n=e.length-t.length,a=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:return(s=e[0]+e[1]-t[0]-t[1])||a(e[0],e[1])-a(t[0],t[1]);case 3:var i=e[0]+e[1],o=t[0]+t[1];if(s=i+e[2]-(o+t[2]))return s;var s,l=a(e[0],e[1]),c=a(t[0],t[1]);return(s=a(l,e[2])-a(c,t[2]))||a(l+e[2],i)-a(c+t[2],o);default:var u=e.slice(0);u.sort();var d=t.slice(0);d.sort();for(var p=0;p<r;++p)if(n=u[p]-d[p])return n;return 0}}function o(e,t){return i(e[0],t[0])}function s(e,t){if(t){for(var r=e.length,n=new Array(r),a=0;a<r;++a)n[a]=[e[a],t[a]];for(n.sort(o),a=0;a<r;++a)e[a]=n[a][0],t[a]=n[a][1];return e}return e.sort(i),e}function l(e){if(0===e.length)return[];for(var t=1,r=e.length,n=1;n<r;++n){var a=e[n];if(i(a,e[n-1])){if(n===t){t++;continue}e[t++]=a}}return e.length=t,e}function c(e,t){for(var r=0,n=e.length-1,a=-1;r<=n;){var o=r+n>>1,s=i(e[o],t);s<=0?(0===s&&(a=o),r=o+1):s>0&&(n=o-1)}return a}function u(e,t){for(var r=new Array(e.length),a=0,o=r.length;a<o;++a)r[a]=[];for(var s=[],l=(a=0,t.length);a<l;++a)for(var u=t[a],d=u.length,p=1,h=1<<d;p<h;++p){s.length=n.popCount(p);for(var f=0,m=0;m<d;++m)p&1<<m&&(s[f++]=u[m]);var g=c(e,s);if(!(g<0))for(;r[g++].push(a),!(g>=e.length||0!==i(e[g],s)););}return r}function d(e,t){if(t<0)return[];for(var r=[],a=(1<<t+1)-1,i=0;i<e.length;++i)for(var o=e[i],l=a;l<1<<o.length;l=n.nextCombination(l)){for(var c=new Array(t+1),u=0,d=0;d<o.length;++d)l&1<<d&&(c[u++]=o[d]);r.push(c)}return s(r)}r.dimension=function(e){for(var t=0,r=Math.max,n=0,a=e.length;n<a;++n)t=r(t,e[n].length);return t-1},r.countVertices=function(e){for(var t=-1,r=Math.max,n=0,a=e.length;n<a;++n)for(var i=e[n],o=0,s=i.length;o<s;++o)t=r(t,i[o]);return t+1},r.cloneCells=function(e){for(var t=new Array(e.length),r=0,n=e.length;r<n;++r)t[r]=e[r].slice(0);return t},r.compareCells=i,r.normalize=s,r.unique=l,r.findCell=c,r.incidence=u,r.dual=function(e,t){if(!t)return u(l(d(e,0)),e);for(var r=new Array(t),n=0;n<t;++n)r[n]=[];n=0;for(var a=e.length;n<a;++n)for(var i=e[n],o=0,s=i.length;o<s;++o)r[i[o]].push(n);return r},r.explode=function(e){for(var t=[],r=0,n=e.length;r<n;++r)for(var a=e[r],i=0|a.length,o=1,l=1<<i;o<l;++o){for(var c=[],u=0;u<i;++u)o>>>u&1&&c.push(a[u]);t.push(c)}return s(t)},r.skeleton=d,r.boundary=function(e){for(var t=[],r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length;i<o;++i){for(var l=new Array(a.length-1),c=0,u=0;c<o;++c)c!==i&&(l[u++]=a[c]);t.push(l)}return s(t)},r.connectedComponents=function(e,t){return t?function(e,t){for(var r=new a(t),n=0;n<e.length;++n)for(var i=e[n],o=0;o<i.length;++o)for(var s=o+1;s<i.length;++s)r.link(i[o],i[s]);var l=[],c=r.ranks;for(n=0;n<c.length;++n)c[n]=-1;for(n=0;n<e.length;++n){var u=r.find(e[n][0]);c[u]<0?(c[u]=l.length,l.push([e[n].slice(0)])):l[c[u]].push(e[n].slice(0))}return l}(e,t):function(e){for(var t=l(s(d(e,0))),r=new a(t.length),n=0;n<e.length;++n)for(var i=e[n],o=0;o<i.length;++o)for(var u=c(t,[i[o]]),p=o+1;p<i.length;++p)r.link(u,c(t,[i[p]]));var h=[],f=r.ranks;for(n=0;n<f.length;++n)f[n]=-1;for(n=0;n<e.length;++n){var m=r.find(c(t,[e[n][0]]));f[m]<0?(f[m]=h.length,h.push([e[n].slice(0)])):h[f[m]].push(e[n].slice(0))}return h}(e)}},{"bit-twiddle":93,"union-find":544}],519:[function(e,t,r){arguments[4][93][0].apply(r,arguments)},{dup:93}],520:[function(e,t,r){arguments[4][518][0].apply(r,arguments)},{"bit-twiddle":519,dup:518,"union-find":521}],521:[function(e,t,r){"use strict";function n(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t<e;++t)this.roots[t]=t,this.ranks[t]=0}t.exports=n,n.prototype.length=function(){return this.roots.length},n.prototype.makeSet=function(){var e=this.roots.length;return this.roots.push(e),this.ranks.push(0),e},n.prototype.find=function(e){for(var t=this.roots;t[e]!==e;){var r=t[e];t[e]=t[r],e=r}return e},n.prototype.link=function(e,t){var r=this.find(e),n=this.find(t);if(r!==n){var a=this.ranks,i=this.roots,o=a[r],s=a[n];o<s?i[r]=n:s<o?i[n]=r:(i[n]=r,++a[r])}}},{}],522:[function(e,t,r){"use strict";t.exports=function(e,t,r){for(var i=t.length,o=e.length,s=new Array(i),l=new Array(i),c=new Array(i),u=new Array(i),d=0;d<i;++d)s[d]=l[d]=-1,c[d]=1/0,u[d]=!1;for(d=0;d<o;++d){var p=e[d];if(2!==p.length)throw new Error("Input must be a graph");var h=p[1],f=p[0];-1!==l[f]?l[f]=-2:l[f]=h,-1!==s[h]?s[h]=-2:s[h]=f}function m(e){if(u[e])return 1/0;var r,a,i,o,c,d=s[e],p=l[e];return d<0||p<0?1/0:(r=t[e],a=t[d],i=t[p],o=Math.abs(n(r,a,i)),c=Math.sqrt(Math.pow(a[0]-i[0],2)+Math.pow(a[1]-i[1],2)),o/c)}function g(e,t){var r=M[e],n=M[t];M[e]=n,M[t]=r,T[r]=t,T[n]=e}function v(e){return c[M[e]]}function y(e){return 1&e?e-1>>1:(e>>1)-1}function b(e){for(var t=v(e);;){var r=t,n=2*e+1,a=2*(e+1),i=e;if(n<C){var o=v(n);o<r&&(i=n,r=o)}if(a<C&&v(a)<r&&(i=a),i===e)return e;g(e,i),e=i}}function _(e){for(var t=v(e);e>0;){var r=y(e);if(!(r>=0&&t<v(r)))return e;g(e,r),e=r}}function x(){if(C>0){var e=M[0];return g(0,C-1),C-=1,b(0),e}return-1}function w(e,t){var r=M[e];return c[r]===t?e:(c[r]=-1/0,_(e),x(),c[r]=t,_((C+=1)-1))}function k(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),T[t]>=0&&w(T[t],m(t)),T[r]>=0&&w(T[r],m(r))}}var M=[],T=new Array(i);for(d=0;d<i;++d)(c[d]=m(d))<1/0?(T[d]=M.length,M.push(d)):T[d]=-1;var C=M.length;for(d=C>>1;d>=0;--d)b(d);for(;;){var S=x();if(S<0||c[S]>r)break;k(S)}var L=[];for(d=0;d<i;++d)u[d]||(T[d]=L.length,L.push(t[d].slice()));function A(e,t){if(e[t]<0)return t;var r=t,n=t;do{var a=e[n];if(!u[n]||a<0||a===n)break;if(a=e[n=a],!u[n]||a<0||a===n)break;n=a,r=e[r]}while(r!==n);for(var i=t;i!==n;i=e[i])e[i]=n;return n}L.length;var E=[];return e.forEach((function(e){var t=A(s,e[0]),r=A(l,e[1]);if(t>=0&&r>=0&&t!==r){var n=T[t],a=T[r];n!==a&&E.push([n,a])}})),a.unique(a.normalize(E)),{positions:L,edges:E}};var n=e("robust-orientation"),a=e("simplicial-complex")},{"robust-orientation":508,"simplicial-complex":520}],523:[function(e,t,r){"use strict";t.exports=function(e,t){var r,i,o,s;if(t[0][0]<t[1][0])r=t[0],i=t[1];else{if(!(t[0][0]>t[1][0]))return a(t,e);r=t[1],i=t[0]}if(e[0][0]<e[1][0])o=e[0],s=e[1];else{if(!(e[0][0]>e[1][0]))return-a(e,t);o=e[1],s=e[0]}var l=n(r,i,s),c=n(r,i,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,i),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return i[0]-s[0]};var n=e("robust-orientation");function a(e,t){var r,a,i,o;if(t[0][0]<t[1][0])r=t[0],a=t[1];else{if(!(t[0][0]>t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return l<c?l-c:s>u?s-u:l-u}r=t[1],a=t[0]}e[0][1]<e[1][1]?(i=e[0],o=e[1]):(i=e[1],o=e[0]);var d=n(a,r,i);return d||(d=n(a,r,o))||o-a}},{"robust-orientation":508}],524:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length,r=2*t,n=new Array(r),i=0;i<t;++i){var l=e[i],c=l[0][0]<l[1][0];n[2*i]=new d(l[0][0],l,c,i),n[2*i+1]=new d(l[1][0],l,!c,i)}n.sort((function(e,t){var r=e.x-t.x;return r||(r=e.create-t.create)||Math.min(e.segment[0][1],e.segment[1][1])-Math.min(t.segment[0][1],t.segment[1][1])}));var p=a(o),h=[],f=[],m=[];for(i=0;i<r;){for(var g=n[i].x,v=[];i<r;){var y=n[i];if(y.x!==g)break;i+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(v.push(new u(y.segment[0][1],y.index,!0,!0)),v.push(new u(y.segment[1][1],y.index,!1,!1))):(v.push(new u(y.segment[1][1],y.index,!0,!1)),v.push(new u(y.segment[0][1],y.index,!1,!0)))):p=y.create?p.insert(y.segment,y.index):p.remove(y.segment)}h.push(p.root),f.push(g),m.push(v)}return new s(h,f,m)};var n=e("binary-search-bounds"),a=e("functional-red-black-tree"),i=e("robust-orientation"),o=e("./lib/order-segments");function s(e,t,r){this.slabs=e,this.coordinates=t,this.horizontal=r}function l(e,t){return e.y-t}function c(e,t){for(var r=null;e;){var n,a,o=e.key;o[0][0]<o[1][0]?(n=o[0],a=o[1]):(n=o[1],a=o[0]);var s=i(n,a,t);if(s<0)e=e.left;else if(s>0)if(t[0]!==o[1][0])r=e,e=e.right;else{if(l=c(e.right,t))return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l;if(l=c(e.right,t))return l;e=e.left}}return r}function u(e,t,r,n){this.y=e,this.index=t,this.start=r,this.closed=n}function d(e,t,r,n){this.x=e,this.segment=t,this.create=r,this.index=n}s.prototype.castUp=function(e){var t=n.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var r=c(this.slabs[t],e),a=-1;if(r&&(a=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?o(u.key,s)>0&&(s=u.key,a=u.value):(a=u.value,s=u.key))}var d=this.horizontal[t];if(d.length>0){var p=n.ge(d,e[1],l);if(p<d.length){var h=d[p];if(e[1]===h.y){if(h.closed)return h.index;for(;p<d.length-1&&d[p+1].y===e[1];)if((h=d[p+=1]).closed)return h.index;if(h.y===e[1]&&!h.start){if((p+=1)>=d.length)return a;h=d[p]}}if(h.start)if(s){var f=i(s[0],s[1],[e[0],h.y]);s[0][0]>s[1][0]&&(f=-f),f>0&&(a=h.index)}else a=h.index;else h.y!==e[1]&&(a=h.index)}}}return a}},{"./lib/order-segments":523,"binary-search-bounds":92,"functional-red-black-tree":232,"robust-orientation":508}],525:[function(e,t,r){"use strict";var n=e("robust-dot-product"),a=e("robust-sum");function i(e,t){var r=a(n(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,n){var a=-t/(n-t);a<0?a=0:a>1&&(a=1);for(var i=1-a,o=e.length,s=new Array(o),l=0;l<o;++l)s[l]=a*e[l]+i*r[l];return s}t.exports=function(e,t){for(var r=[],n=[],a=i(e[e.length-1],t),s=e[e.length-1],l=e[0],c=0;c<e.length;++c,s=l){var u=i(l=e[c],t);if(a<0&&u>0||a>0&&u<0){var d=o(s,u,l,a);r.push(d),n.push(d.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),a=u}return{positive:r,negative:n}},t.exports.positive=function(e,t){for(var r=[],n=i(e[e.length-1],t),a=e[e.length-1],s=e[0],l=0;l<e.length;++l,a=s){var c=i(s=e[l],t);(n<0&&c>0||n>0&&c<0)&&r.push(o(a,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},t.exports.negative=function(e,t){for(var r=[],n=i(e[e.length-1],t),a=e[e.length-1],s=e[0],l=0;l<e.length;++l,a=s){var c=i(s=e[l],t);(n<0&&c>0||n>0&&c<0)&&r.push(o(a,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{"robust-dot-product":505,"robust-sum":513}],526:[function(e,t,r){!function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(r){return function(r,n){var a,i,o,s,l,c,u,d,p,h=1,f=r.length,m="";for(i=0;i<f;i++)if("string"==typeof r[i])m+=r[i];else if("object"==typeof r[i]){if((s=r[i]).keys)for(a=n[h],o=0;o<s.keys.length;o++){if(null==a)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[o],s.keys[o-1]));a=a[s.keys[o]]}else a=s.param_no?n[s.param_no]:n[h++];if(e.not_type.test(s.type)&&e.not_primitive.test(s.type)&&a instanceof Function&&(a=a()),e.numeric_arg.test(s.type)&&"number"!=typeof a&&isNaN(a))throw new TypeError(t("[sprintf] expecting number but found %T",a));switch(e.number.test(s.type)&&(d=a>=0),s.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,s.width?parseInt(s.width):0);break;case"e":a=s.precision?parseFloat(a).toExponential(s.precision):parseFloat(a).toExponential();break;case"f":a=s.precision?parseFloat(a).toFixed(s.precision):parseFloat(a);break;case"g":a=s.precision?String(Number(a.toPrecision(s.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=s.precision?a.substring(0,s.precision):a;break;case"t":a=String(!!a),a=s.precision?a.substring(0,s.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=s.precision?a.substring(0,s.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=s.precision?a.substring(0,s.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase()}e.json.test(s.type)?m+=a:(!e.number.test(s.type)||d&&!s.sign?p="":(p=d?"+":"-",a=a.toString().replace(e.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(p+a).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?p+a+l:"0"===c?p+l+a:l+p+a)}return m}(function(t){if(a[t])return a[t];for(var r,n=t,i=[],o=0;n;){if(null!==(r=e.text.exec(n)))i.push(r[0]);else if(null!==(r=e.modulo.exec(n)))i.push("%");else{if(null===(r=e.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=e.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=e.key_access.exec(l)))s.push(c[1]);else{if(null===(c=e.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[t]=i}(r),arguments)}function n(e,r){return t.apply(null,[e].concat(r||[]))}var a=Object.create(null);void 0!==r&&(r.sprintf=t,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=t,window.vsprintf=n)}()},{}],527:[function(e,t,r){"use strict";var n=e("parenthesis");t.exports=function(e,t,r){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(e){return 1===e.length&&(e+=e),e})));var a=n.parse(e,{flat:!0,brackets:r.ignore}),i=a[0].split(t);if(r.escape){for(var o=[],s=0;s<i.length;s++){var l=i[s],c=i[s+1];"\\"===l[l.length-1]&&"\\"!==l[l.length-2]?(o.push(l+t+c),s++):o.push(l)}i=o}for(s=0;s<i.length;s++)a[0]=i[s],i[s]=n.stringify(a,{flat:!0});return i}},{parenthesis:459}],528:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.length,r=new Array(t),n=new Array(t),a=new Array(t),i=new Array(t),o=new Array(t),s=new Array(t),l=0;l<t;++l)r[l]=-1,n[l]=0,a[l]=!1,i[l]=0,o[l]=-1,s[l]=[];var c,u=0,d=[],p=[];function h(t){var l=[t],c=[t];for(r[t]=n[t]=u,a[t]=!0,u+=1;c.length>0;){t=c[c.length-1];var h=e[t];if(i[t]<h.length){for(var f=i[t];f<h.length;++f){var m=h[f];if(r[m]<0){r[m]=n[m]=u,a[m]=!0,u+=1,l.push(m),c.push(m);break}a[m]&&(n[t]=0|Math.min(n[t],n[m])),o[m]>=0&&s[t].push(o[m])}i[t]=f}else{if(n[t]===r[t]){var g=[],v=[],y=0;for(f=l.length-1;f>=0;--f){var b=l[f];if(a[b]=!1,g.push(b),v.push(s[b]),y+=s[b].length,o[b]=d.length,b===t){l.length=f;break}}d.push(g);var _=new Array(y);for(f=0;f<v.length;f++)for(var x=0;x<v[f].length;x++)_[--y]=v[f][x];p.push(_)}c.pop()}}}for(l=0;l<t;++l)r[l]<0&&h(l);for(l=0;l<p.length;l++){var f=p[l];if(0!==f.length){f.sort((function(e,t){return e-t})),c=[f[0]];for(var m=1;m<f.length;m++)f[m]!==f[m-1]&&c.push(f[m]);p[l]=c}}return{components:d,adjacencyList:p}}},{}],529:[function(e,t,r){"use strict";t.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=i(e,t),n=r.length,a=new Array(n),o=new Array(n),s=0;s<n;++s)a[s]=[r[s]],o[s]=[s];return{positions:a,cells:o}}(e,t);var r=e.order.join()+"-"+e.dtype,s=o[r];return t=+t||0,s||(s=o[r]=function(e,t){var r=e.length,i=["'use strict';"],o="surfaceNets"+e.join("_")+"d"+t;i.push("var contour=genContour({","order:[",e.join(),"],","scalarArguments: 3,","phase:function phaseFunc(p,a,b,c) { return (p > c)|0 },"),"generic"===t&&i.push("getters:[0],");for(var s=[],l=[],c=0;c<r;++c)s.push("d"+c),l.push("d"+c);for(c=0;c<1<<r;++c)s.push("v"+c),l.push("v"+c);for(c=0;c<1<<r;++c)s.push("p"+c),l.push("p"+c);s.push("a","b","c"),l.push("a","c"),i.push("vertex:function vertexFunc(",s.join(),"){");var u=[];for(c=0;c<1<<r;++c)u.push("(p"+c+"<<"+c+")");i.push("var m=(",u.join("+"),")|0;if(m===0||m===",(1<<(1<<r))-1,"){return}");var d=[],p=[];for(1<<(1<<r)<=128?(i.push("switch(m){"),p=i):i.push("switch(m>>>7){"),c=0;c<1<<(1<<r);++c){if(1<<(1<<r)>128&&c%128==0){d.length>0&&p.push("}}");var h="vExtra"+d.length;i.push("case ",c>>>7,":",h,"(m&0x7f,",l.join(),");break;"),p=["function ",h,"(m,",l.join(),"){switch(m){"],d.push(p)}p.push("case ",127&c,":");for(var f=new Array(r),m=new Array(r),g=new Array(r),v=new Array(r),y=0,b=0;b<r;++b)f[b]=[],m[b]=[],g[b]=0,v[b]=0;for(b=0;b<1<<r;++b)for(var _=0;_<r;++_){var x=b^1<<_;if(!(x>b)&&!(c&1<<x)!=!(c&1<<b)){var w=1;c&1<<x?m[_].push("v"+x+"-v"+b):(m[_].push("v"+b+"-v"+x),w=-w),w<0?(f[_].push("-v"+b+"-v"+x),g[_]+=2):(f[_].push("v"+b+"+v"+x),g[_]-=2),y+=1;for(var k=0;k<r;++k)k!==_&&(x&1<<k?v[k]+=1:v[k]-=1)}}var M=[];for(_=0;_<r;++_)if(0===f[_].length)M.push("d"+_+"-0.5");else{var T="";g[_]<0?T=g[_]+"*c":g[_]>0&&(T="+"+g[_]+"*c");var C=f[_].length/y*.5,S=.5+v[_]/y*.5;M.push("d"+_+"-"+S+"-"+C+"*("+f[_].join("+")+T+")/("+m[_].join("+")+")")}p.push("a.push([",M.join(),"]);","break;")}i.push("}},"),d.length>0&&p.push("}}");var L=[];for(c=0;c<1<<r-1;++c)L.push("v"+c);L.push("c0","c1","p0","p1","a","b","c"),i.push("cell:function cellFunc(",L.join(),"){");var A=a(r-1);for(i.push("if(p0){b.push(",A.map((function(e){return"["+e.map((function(e){return"v"+e}))+"]"})).join(),")}else{b.push(",A.map((function(e){var t=e.slice();return t.reverse(),"["+t.map((function(e){return"v"+e}))+"]"})).join(),")}}});function ",o,"(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return ",o,";"),c=0;c<d.length;++c)i.push(d[c].join(""));return new Function("genContour",i.join(""))(n)}(e.order,e.dtype)),s(e,t)};var n=e("ndarray-extract-contour"),a=e("triangulate-hypercube"),i=e("zero-crossings"),o={}},{"ndarray-extract-contour":440,"triangulate-hypercube":539,"zero-crossings":572}],530:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(a)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=2*Math.PI,i=function(e,t,r,n,a,i,o){var s=e.x,l=e.y;return{x:n*(s*=t)-a*(l*=r)+i,y:a*s+n*l+o}},o=function(e,t){var r=.551915024494*(t<0?-1:1),n=Math.cos(e),a=Math.sin(e),i=Math.cos(e+t),o=Math.sin(e+t);return[{x:n-a*r,y:a+n*r},{x:i+o*r,y:o-i*r},{x:i,y:o}]},s=function(e,t,r,n){var a=e*n-t*r<0?-1:1,i=(e*r+t*n)/(Math.sqrt(e*e+t*t)*Math.sqrt(e*e+t*t));return i>1&&(i=1),i<-1&&(i=-1),a*Math.acos(i)};r.default=function(e){var t=e.px,r=e.py,l=e.cx,c=e.cy,u=e.rx,d=e.ry,p=e.xAxisRotation,h=void 0===p?0:p,f=e.largeArcFlag,m=void 0===f?0:f,g=e.sweepFlag,v=void 0===g?0:g,y=[];if(0===u||0===d)return[];var b=Math.sin(h*a/360),_=Math.cos(h*a/360),x=_*(t-l)/2+b*(r-c)/2,w=-b*(t-l)/2+_*(r-c)/2;if(0===x&&0===w)return[];u=Math.abs(u),d=Math.abs(d);var k=Math.pow(x,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(d,2);k>1&&(u*=Math.sqrt(k),d*=Math.sqrt(k));var M=function(e,t,r,n,i,o,l,c,u,d,p,h){var f=Math.pow(i,2),m=Math.pow(o,2),g=Math.pow(p,2),v=Math.pow(h,2),y=f*m-f*v-m*g;y<0&&(y=0),y/=f*v+m*g;var b=(y=Math.sqrt(y)*(l===c?-1:1))*i/o*h,_=y*-o/i*p,x=d*b-u*_+(e+r)/2,w=u*b+d*_+(t+n)/2,k=(p-b)/i,M=(h-_)/o,T=(-p-b)/i,C=(-h-_)/o,S=s(1,0,k,M),L=s(k,M,T,C);return 0===c&&L>0&&(L-=a),1===c&&L<0&&(L+=a),[x,w,S,L]}(t,r,l,c,u,d,m,v,b,_,x,w),T=n(M,4),C=T[0],S=T[1],L=T[2],A=T[3],E=Math.abs(A)/(a/4);Math.abs(1-E)<1e-7&&(E=1);var D=Math.max(Math.ceil(E),1);A/=D;for(var I=0;I<D;I++)y.push(o(L,A)),L+=A;return y.map((function(e){var t=i(e[0],u,d,_,b,C,S),r=t.x,n=t.y,a=i(e[1],u,d,_,b,C,S),o=a.x,s=a.y,l=i(e[2],u,d,_,b,C,S);return{x1:r,y1:n,x2:o,y2:s,x:l.x,y:l.y}}))},t.exports=r.default},{}],531:[function(e,t,r){"use strict";var n=e("parse-svg-path"),a=e("abs-svg-path"),i=e("normalize-svg-path"),o=e("is-svg-path"),s=e("assert");t.exports=function(e){if(Array.isArray(e)&&1===e.length&&"string"==typeof e[0]&&(e=e[0]),"string"==typeof e&&(s(o(e),"String is not an SVG path."),e=n(e)),s(Array.isArray(e),"Argument should be a string or an array of path segments."),e=a(e),!(e=i(e)).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,l=e.length;r<l;r++)for(var c=e[r].slice(1),u=0;u<c.length;u+=2)c[u+0]<t[0]&&(t[0]=c[u+0]),c[u+1]<t[1]&&(t[1]=c[u+1]),c[u+0]>t[2]&&(t[2]=c[u+0]),c[u+1]>t[3]&&(t[3]=c[u+1]);return t}},{"abs-svg-path":62,assert:69,"is-svg-path":425,"normalize-svg-path":532,"parse-svg-path":461}],532:[function(e,t,r){"use strict";t.exports=function(e){for(var t,r=[],o=0,s=0,l=0,c=0,u=null,d=null,p=0,h=0,f=0,m=e.length;f<m;f++){var g=e[f],v=g[0];switch(v){case"M":l=g[1],c=g[2];break;case"A":var y=n({px:p,py:h,cx:g[6],cy:g[7],rx:g[1],ry:g[2],xAxisRotation:g[3],largeArcFlag:g[4],sweepFlag:g[5]});if(!y.length)continue;for(var b,_=0;_<y.length;_++)b=y[_],g=["C",b.x1,b.y1,b.x2,b.y2,b.x,b.y],_<y.length-1&&r.push(g);break;case"S":var x=p,w=h;"C"!=t&&"S"!=t||(x+=x-o,w+=w-s),g=["C",x,w,g[1],g[2],g[3],g[4]];break;case"T":"Q"==t||"T"==t?(u=2*p-u,d=2*h-d):(u=p,d=h),g=i(p,h,u,d,g[1],g[2]);break;case"Q":u=g[1],d=g[2],g=i(p,h,g[1],g[2],g[3],g[4]);break;case"L":g=a(p,h,g[1],g[2]);break;case"H":g=a(p,h,g[1],h);break;case"V":g=a(p,h,p,g[1]);break;case"Z":g=a(p,h,l,c)}t=v,p=g[g.length-2],h=g[g.length-1],g.length>4?(o=g[g.length-4],s=g[g.length-3]):(o=p,s=h),r.push(g)}return r};var n=e("svg-arc-to-cubic-bezier");function a(e,t,r,n){return["C",e,t,r,n,r,n]}function i(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}},{"svg-arc-to-cubic-bezier":530}],533:[function(e,t,r){"use strict";var n,a=e("svg-path-bounds"),i=e("parse-svg-path"),o=e("draw-svg-path"),s=e("is-svg-path"),l=e("bitmap-sdf"),c=document.createElement("canvas"),u=c.getContext("2d");t.exports=function(e,t){if(!s(e))throw Error("Argument should be valid svg path string");var r,d;t||(t={}),t.shape?(r=t.shape[0],d=t.shape[1]):(r=c.width=t.w||t.width||200,d=c.height=t.h||t.height||200);var p=Math.min(r,d),h=t.stroke||0,f=t.viewbox||t.viewBox||a(e),m=[r/(f[2]-f[0]),d/(f[3]-f[1])],g=Math.min(m[0]||0,m[1]||0)/2;if(u.fillStyle="black",u.fillRect(0,0,r,d),u.fillStyle="white",h&&("number"!=typeof h&&(h=1),u.strokeStyle=h>0?"white":"black",u.lineWidth=Math.abs(h)),u.translate(.5*r,.5*d),u.scale(g,g),function(){if(null!=n)return n;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return n=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(e);u.fill(v),h&&u.stroke(v)}else{var y=i(e);o(u,y),u.fill(),h&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*p})}},{"bitmap-sdf":94,"draw-svg-path":169,"is-svg-path":425,"parse-svg-path":461,"svg-path-bounds":531}],534:[function(e,t,r){(function(r){"use strict";t.exports=function e(t,r,a){a=a||{};var o=i[t];o||(o=i[t]={" ":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\d/.test(r))s=o[r]=function(e){for(var t=e.cells,r=e.positions,n=new Float32Array(6*t.length),a=0,i=0,o=0;o<t.length;++o)for(var s=t[o],l=0;l<3;++l){var c=r[s[l]];n[a++]=c[0],n[a++]=c[1]+1.4,i=Math.max(c[0],i)}return{data:n,shape:i}}(n(r,{triangles:!0,font:t,textAlign:a.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var l=r.split(/(\d|\s)/),c=new Array(l.length),u=0,d=0,p=0;p<l.length;++p)c[p]=e(t,l[p]),u+=c[p].data.length,d+=c[p].shape,p>0&&(d+=.02);var h=new Float32Array(u),f=0,m=-.5*d;for(p=0;p<c.length;++p){for(var g=c[p].data,v=0;v<g.length;v+=2)h[f++]=g[v]+m,h[f++]=g[v+1];m+=c[p].shape+.02}s=o[r]={data:h,shape:d}}return s};var n=e("vectorize-text"),a=window||r.global||{},i=a.__TEXT_CACHE||{};a.__TEXT_CACHE={}}).call(this,e("_process"))},{_process:483,"vectorize-text":548}],535:[function(e,t,r){!function(e){var r=/^\s+/,n=/\s+$/,a=0,i=e.round,o=e.min,s=e.max,l=e.random;function c(t,l){if(l=l||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,l);var u=function(t){var a={r:0,g:0,b:0},i=1,l=null,c=null,u=null,d=!1,p=!1;return"string"==typeof t&&(t=function(e){e=e.replace(r,"").replace(n,"").toLowerCase();var t,a=!1;if(S[e])e=S[e],a=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=B.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=B.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=B.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=B.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=B.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=B.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=B.hex8.exec(e))?{r:I(t[1]),g:I(t[2]),b:I(t[3]),a:F(t[4]),format:a?"name":"hex8"}:(t=B.hex6.exec(e))?{r:I(t[1]),g:I(t[2]),b:I(t[3]),format:a?"name":"hex"}:(t=B.hex4.exec(e))?{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:a?"name":"hex8"}:!!(t=B.hex3.exec(e))&&{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),format:a?"name":"hex"}}(t)),"object"==typeof t&&(Y(t.r)&&Y(t.g)&&Y(t.b)?(a=function(e,t,r){return{r:255*E(e,255),g:255*E(t,255),b:255*E(r,255)}}(t.r,t.g,t.b),d=!0,p="%"===String(t.r).substr(-1)?"prgb":"rgb"):Y(t.h)&&Y(t.s)&&Y(t.v)?(l=O(t.s),c=O(t.v),a=function(t,r,n){t=6*E(t,360),r=E(r,100),n=E(n,100);var a=e.floor(t),i=t-a,o=n*(1-r),s=n*(1-i*r),l=n*(1-(1-i)*r),c=a%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(t.h,l,c),d=!0,p="hsv"):Y(t.h)&&Y(t.s)&&Y(t.l)&&(l=O(t.s),u=O(t.l),a=function(e,t,r){var n,a,i;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=E(e,360),t=E(t,100),r=E(r,100),0===t)n=a=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=o(l,s,e+1/3),a=o(l,s,e),i=o(l,s,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(t.h,l,u),d=!0,p="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=A(i),{ok:d,format:t.format||p,r:o(255,s(a.r,0)),g:o(255,s(a.g,0)),b:o(255,s(a.b,0)),a:i}}(t);this._originalInput=t,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=i(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=u.ok,this._tc_id=a++}function u(e,t,r){e=E(e,255),t=E(t,255),r=E(r,255);var n,a,i=s(e,t,r),l=o(e,t,r),c=(i+l)/2;if(i==l)n=a=0;else{var u=i-l;switch(a=c>.5?u/(2-i-l):u/(i+l),i){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:a,l:c}}function d(e,t,r){e=E(e,255),t=E(t,255),r=E(r,255);var n,a,i=s(e,t,r),l=o(e,t,r),c=i,u=i-l;if(a=0===i?0:u/i,i==l)n=0;else{switch(i){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:a,v:c}}function p(e,t,r,n){var a=[P(i(e).toString(16)),P(i(t).toString(16)),P(i(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function h(e,t,r,n){return[P(R(n)),P(i(e).toString(16)),P(i(t).toString(16)),P(i(r).toString(16))].join("")}function f(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.s-=t/100,r.s=D(r.s),c(r)}function m(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.s+=t/100,r.s=D(r.s),c(r)}function g(e){return c(e).desaturate(100)}function v(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.l+=t/100,r.l=D(r.l),c(r)}function y(e,t){t=0===t?0:t||10;var r=c(e).toRgb();return r.r=s(0,o(255,r.r-i(-t/100*255))),r.g=s(0,o(255,r.g-i(-t/100*255))),r.b=s(0,o(255,r.b-i(-t/100*255))),c(r)}function b(e,t){t=0===t?0:t||10;var r=c(e).toHsl();return r.l-=t/100,r.l=D(r.l),c(r)}function _(e,t){var r=c(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,c(r)}function x(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function w(e){var t=c(e).toHsl(),r=t.h;return[c(e),c({h:(r+120)%360,s:t.s,l:t.l}),c({h:(r+240)%360,s:t.s,l:t.l})]}function k(e){var t=c(e).toHsl(),r=t.h;return[c(e),c({h:(r+90)%360,s:t.s,l:t.l}),c({h:(r+180)%360,s:t.s,l:t.l}),c({h:(r+270)%360,s:t.s,l:t.l})]}function M(e){var t=c(e).toHsl(),r=t.h;return[c(e),c({h:(r+72)%360,s:t.s,l:t.l}),c({h:(r+216)%360,s:t.s,l:t.l})]}function T(e,t,r){t=t||6,r=r||30;var n=c(e).toHsl(),a=360/r,i=[c(e)];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(c(n));return i}function C(e,t){t=t||6;for(var r=c(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/t;t--;)o.push(c({h:n,s:a,v:i})),i=(i+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,r,n,a=this.toRgb();return t=a.r/255,r=a.g/255,n=a.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=i(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),n=i(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=u(this._r,this._g,this._b),t=i(360*e.h),r=i(100*e.s),n=i(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return p(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var o=[P(i(e).toString(16)),P(i(t).toString(16)),P(i(r).toString(16)),P(R(n))];return a&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(100*E(this._r,255))+"%",g:i(100*E(this._g,255))+"%",b:i(100*E(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+i(100*E(this._r,255))+"%, "+i(100*E(this._g,255))+"%, "+i(100*E(this._b,255))+"%)":"rgba("+i(100*E(this._r,255))+"%, "+i(100*E(this._g,255))+"%, "+i(100*E(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(L[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+h(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=c(e);r="#"+h(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:O(e[n]));e=r}return c(e,t)},c.equals=function(e,t){return!(!e||!t)&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(e,t,r){r=0===r?0:r||50;var n=c(e).toRgb(),a=c(t).toRgb(),i=r/100;return c({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},c.readability=function(t,r){var n=c(t),a=c(r);return(e.max(n.getLuminance(),a.getLuminance())+.05)/(e.min(n.getLuminance(),a.getLuminance())+.05)},c.isReadable=function(e,t,r){var n,a,i,o,s,l=c.readability(e,t);switch(a=!1,(i=r,o=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase(),s=(i.size||"small").toLowerCase(),"AA"!==o&&"AAA"!==o&&(o="AA"),"small"!==s&&"large"!==s&&(s="small"),n={level:o,size:s}).level+n.size){case"AAsmall":case"AAAlarge":a=l>=4.5;break;case"AAlarge":a=l>=3;break;case"AAAsmall":a=l>=7}return a},c.mostReadable=function(e,t,r){var n,a,i,o,s=null,l=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;u<t.length;u++)(n=c.readability(e,t[u]))>l&&(l=n,s=c(t[u]));return c.isReadable(e,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],r))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},L=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(S);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(t,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(r,s(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function D(e){return o(1,s(0,e))}function I(e){return parseInt(e,16)}function P(e){return 1==e.length?"0"+e:""+e}function O(e){return e<=1&&(e=100*e+"%"),e}function R(t){return e.round(255*parseFloat(t)).toString(16)}function F(e){return I(e)/255}var z,N,j,B=(N="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",j="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+j),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Y(e){return!!B.CSS_UNIT.exec(e)}void 0!==t&&t.exports?t.exports=c:window.tinycolor=c}(Math)},{}],536:[function(e,t,r){"use strict";t.exports=a,t.exports.float32=t.exports.float=a,t.exports.fract32=t.exports.fract=function(e){if(e.length){for(var t=a(e),r=0,n=t.length;r<n;r++)t[r]=e[r]-t[r];return t}return a(e-a(e))};var n=new Float32Array(1);function a(e){if(e.length){if(e instanceof Float32Array)return e;var t=new Float32Array(e);return t.set(e),t}return n[0]=e,n[0]}},{}],537:[function(e,t,r){"use strict";var n=e("parse-unit");t.exports=o;var a=96;function i(e,t){var r=n(getComputedStyle(e).getPropertyValue(t));return r[0]*o(r[1],e)}function o(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),t!==window&&t!==document||(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return function(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=i(r,"font-size")/128;return t.removeChild(r),n}(e,t);case"em":return i(t,"font-size");case"rem":return i(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return a;case"cm":return a/2.54;case"mm":return a/25.4;case"pt":return a/72;case"pc":return a/6}return 1}},{"parse-unit":462}],538:[function(e,t,r){!function(e,n){n("object"==typeof r&&void 0!==t?r:e.topojson=e.topojson||{})}(this,(function(e){"use strict";var t=function(e){return e},r=function(e){if(null==(r=e.transform))return t;var r,n,a,i=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(e,t){return t||(n=a=0),e[0]=(n+=e[0])*i+s,e[1]=(a+=e[1])*o+l,e}},n=function(e){var t=e.bbox;function n(e){l[0]=e[0],l[1]=e[1],s(l),l[0]<c&&(c=l[0]),l[0]>d&&(d=l[0]),l[1]<u&&(u=l[1]),l[1]>p&&(p=l[1])}function a(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(a);break;case"Point":n(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(n)}}if(!t){var i,o,s=r(e),l=new Array(2),c=1/0,u=c,d=-c,p=-c;for(o in e.arcs.forEach((function(e){for(var t=-1,r=e.length;++t<r;)i=e[t],l[0]=i[0],l[1]=i[1],s(l,t),l[0]<c&&(c=l[0]),l[0]>d&&(d=l[0]),l[1]<u&&(u=l[1]),l[1]>p&&(p=l[1])})),e.objects)a(e.objects[o]);t=e.bbox=[c,u,d,p]}return t},a=function(e,t){for(var r,n=e.length,a=n-t;a<--n;)r=e[a],e[a++]=e[n],e[n]=r};function i(e,t){var r=t.id,n=t.bbox,a=null==t.properties?{}:t.properties,i=o(e,t);return null==r&&null==n?{type:"Feature",properties:a,geometry:i}:null==n?{type:"Feature",id:r,properties:a,geometry:i}:{type:"Feature",id:r,bbox:n,properties:a,geometry:i}}function o(e,t){var n=r(e),i=e.arcs;function o(e,t){t.length&&t.pop();for(var r=i[e<0?~e:e],o=0,s=r.length;o<s;++o)t.push(n(r[o].slice(),o));e<0&&a(t,s)}function s(e){return n(e.slice())}function l(e){for(var t=[],r=0,n=e.length;r<n;++r)o(e[r],t);return t.length<2&&t.push(t[0].slice()),t}function c(e){for(var t=l(e);t.length<4;)t.push(t[0].slice());return t}function u(e){return e.map(c)}return function e(t){var r,n=t.type;switch(n){case"GeometryCollection":return{type:n,geometries:t.geometries.map(e)};case"Point":r=s(t.coordinates);break;case"MultiPoint":r=t.coordinates.map(s);break;case"LineString":r=l(t.arcs);break;case"MultiLineString":r=t.arcs.map(l);break;case"Polygon":r=u(t.arcs);break;case"MultiPolygon":r=t.arcs.map(u);break;default:return null}return{type:n,coordinates:r}}(t)}var s=function(e,t){var r={},n={},a={},i=[],o=-1;function s(e,t){for(var n in e){var a=e[n];delete t[a.start],delete a.start,delete a.end,a.forEach((function(e){r[e<0?~e:e]=1})),i.push(a)}}return t.forEach((function(r,n){var a,i=e.arcs[r<0?~r:r];i.length<3&&!i[1][0]&&!i[1][1]&&(a=t[++o],t[o]=r,t[n]=a)})),t.forEach((function(t){var r,i,o=function(t){var r,n=e.arcs[t<0?~t:t],a=n[0];return e.transform?(r=[0,0],n.forEach((function(e){r[0]+=e[0],r[1]+=e[1]}))):r=n[n.length-1],t<0?[r,a]:[a,r]}(t),s=o[0],l=o[1];if(r=a[s])if(delete a[r.end],r.push(t),r.end=l,i=n[l]){delete n[i.start];var c=i===r?r:r.concat(i);n[c.start=r.start]=a[c.end=i.end]=c}else n[r.start]=a[r.end]=r;else if(r=n[l])if(delete n[r.start],r.unshift(t),r.start=s,i=a[s]){delete a[i.end];var u=i===r?r:i.concat(r);n[u.start=i.start]=a[u.end=r.end]=u}else n[r.start]=a[r.end]=r;else n[(r=[t]).start=s]=a[r.end=l]=r})),s(a,n),s(n,a),t.forEach((function(e){r[e<0?~e:e]||i.push([e])})),i};function l(e,t,r){var n,a,i;if(arguments.length>1)n=function(e,t,r){var n,a=[],i=[];function o(e){var t=e<0?~e:e;(i[t]||(i[t]=[])).push({i:e,g:n})}function s(e){e.forEach(o)}function l(e){e.forEach(s)}return function e(t){switch(n=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(l)}(t.arcs)}}(t),i.forEach(null==r?function(e){a.push(e[0].i)}:function(e){r(e[0].g,e[e.length-1].g)&&a.push(e[0].i)}),a}(0,t,r);else for(a=0,n=new Array(i=e.arcs.length);a<i;++a)n[a]=a;return{type:"MultiLineString",arcs:s(e,n)}}function c(e,t){var r={},n=[],a=[];function i(e){e.forEach((function(t){t.forEach((function(t){(r[t=t<0?~t:t]||(r[t]=[])).push(e)}))})),n.push(e)}function l(t){return function(e){for(var t,r=-1,n=e.length,a=e[n-1],i=0;++r<n;)t=a,a=e[r],i+=t[0]*a[1]-t[1]*a[0];return Math.abs(i)}(o(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":i(t.arcs);break;case"MultiPolygon":t.arcs.forEach(i)}})),n.forEach((function(e){if(!e._){var t=[],n=[e];for(e._=1,a.push(t);e=n.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){r[e<0?~e:e].forEach((function(e){e._||(e._=1,n.push(e))}))}))}))}})),n.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:a.map((function(t){var n,a=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){r[e<0?~e:e].length<2&&a.push(e)}))}))})),(n=(a=s(e,a)).length)>1)for(var i,o,c=1,u=l(a[0]);c<n;++c)(i=l(a[c]))>u&&(o=a[0],a[0]=a[c],a[c]=o,u=i);return a}))}}var u=function(e,t){for(var r=0,n=e.length;r<n;){var a=r+n>>>1;e[a]<t?r=a+1:n=a}return r};e.bbox=n,e.feature=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return i(e,t)}))}:i(e,t)},e.mesh=function(e){return o(e,l.apply(this,arguments))},e.meshArcs=l,e.merge=function(e){return o(e,c.apply(this,arguments))},e.mergeArcs=c,e.neighbors=function(e){var t={},r=e.map((function(){return[]}));function n(e,r){e.forEach((function(e){e<0&&(e=~e);var n=t[e];n?n.push(r):t[e]=[r]}))}function a(e,t){e.forEach((function(e){n(e,t)}))}var i={LineString:n,MultiLineString:a,Polygon:a,MultiPolygon:function(e,t){e.forEach((function(e){a(e,t)}))}};for(var o in e.forEach((function e(t,r){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,r)})):t.type in i&&i[t.type](t.arcs,r)})),t)for(var s=t[o],l=s.length,c=0;c<l;++c)for(var d=c+1;d<l;++d){var p,h=s[c],f=s[d];(p=r[h])[o=u(p,f)]!==f&&p.splice(o,0,f),(p=r[f])[o=u(p,h)]!==h&&p.splice(o,0,h)}return r},e.quantize=function(e,t){if(!((t=Math.floor(t))>=2))throw new Error("n must be ≥2");if(e.transform)throw new Error("already quantized");var r,a=n(e),i=a[0],o=(a[2]-i)/(t-1)||1,s=a[1],l=(a[3]-s)/(t-1)||1;function c(e){e[0]=Math.round((e[0]-i)/o),e[1]=Math.round((e[1]-s)/l)}function u(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(u);break;case"Point":c(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(c)}}for(r in e.arcs.forEach((function(e){for(var t,r,n,a=1,c=1,u=e.length,d=e[0],p=d[0]=Math.round((d[0]-i)/o),h=d[1]=Math.round((d[1]-s)/l);a<u;++a)d=e[a],r=Math.round((d[0]-i)/o),n=Math.round((d[1]-s)/l),r===p&&n===h||((t=e[c++])[0]=r-p,p=r,t[1]=n-h,h=n);c<2&&((t=e[c++])[0]=0,t[1]=0),e.length=c})),e.objects)u(e.objects[r]);return e.transform={scale:[o,l],translate:[i,s]},e},e.transform=r,e.untransform=function(e){if(null==(r=e.transform))return t;var r,n,a,i=r.scale[0],o=r.scale[1],s=r.translate[0],l=r.translate[1];return function(e,t){t||(n=a=0);var r=Math.round((e[0]-s)/i),c=Math.round((e[1]-l)/o);return e[0]=r-n,n=r,e[1]=c-a,a=c,e}},Object.defineProperty(e,"__esModule",{value:!0})}))},{}],539:[function(e,t,r){"use strict";t.exports=function(e){if(e<0)return[];if(0===e)return[[0]];for(var t=0|Math.round(i(e+1)),r=[],o=0;o<t;++o){for(var s=n.unrank(e,o),l=[0],c=0,u=0;u<s.length;++u)c+=1<<s[u],l.push(c);a(s)<1&&(l[0]=c,l[e]=0),r.push(l)}return r};var n=e("permutation-rank"),a=e("permutation-parity"),i=e("gamma")},{gamma:233,"permutation-parity":464,"permutation-rank":465}],540:[function(e,t,r){"use strict";t.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.up||[0,1,0],n=e.right||d(r),a=e.radius||1,i=e.theta||0,u=e.phi||0;if(t=[].slice.call(t,0,3),r=[].slice.call(r,0,3),s(r,r),n=[].slice.call(n,0,3),s(n,n),"eye"in e){var h=e.eye,f=[h[0]-t[0],h[1]-t[1],h[2]-t[2]];o(n,f,r),c(n[0],n[1],n[2])<1e-6?n=d(r):s(n,n),a=c(f[0],f[1],f[2]);var m=l(r,f)/a,g=l(n,f)/a;u=Math.acos(m),i=Math.acos(g)}return a=Math.log(a),new p(e.zoomMin,e.zoomMax,t,r,n,a,i,u)};var n=e("filtered-vector"),a=e("gl-mat4/invert"),i=e("gl-mat4/rotate"),o=e("gl-vec3/cross"),s=e("gl-vec3/normalize"),l=e("gl-vec3/dot");function c(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function u(e){return Math.min(1,Math.max(-1,e))}function d(e){var t=Math.abs(e[0]),r=Math.abs(e[1]),n=Math.abs(e[2]),a=[0,0,0];t>Math.max(r,n)?a[2]=1:r>Math.max(t,n)?a[0]=1:a[1]=1;for(var i=0,o=0,l=0;l<3;++l)i+=e[l]*e[l],o+=a[l]*e[l];for(l=0;l<3;++l)a[l]-=o/i*e[l];return s(a,a),a}function p(e,t,r,a,i,o,s,l){this.center=n(r),this.up=n(a),this.right=n(i),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var h=p.prototype;h.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},h.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},h.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,n=0,a=0,i=0;i<3;++i)a+=t[i]*r[i],n+=t[i]*t[i];var l=Math.sqrt(n),u=0;for(i=0;i<3;++i)r[i]-=t[i]*a/n,u+=r[i]*r[i],t[i]/=l;var d=Math.sqrt(u);for(i=0;i<3;++i)r[i]/=d;var p=this.computedToward;o(p,t,r),s(p,p);var h=Math.exp(this.computedRadius[0]),f=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(f),v=Math.sin(f),y=Math.cos(m),b=Math.sin(m),_=this.computedCenter,x=g*y,w=v*y,k=b,M=-g*b,T=-v*b,C=y,S=this.computedEye,L=this.computedMatrix;for(i=0;i<3;++i){var A=x*r[i]+w*p[i]+k*t[i];L[4*i+1]=M*r[i]+T*p[i]+C*t[i],L[4*i+2]=A,L[4*i+3]=0}var E=L[1],D=L[5],I=L[9],P=L[2],O=L[6],R=L[10],F=D*R-I*O,z=I*P-E*R,N=E*O-D*P,j=c(F,z,N);for(F/=j,z/=j,N/=j,L[0]=F,L[4]=z,L[8]=N,i=0;i<3;++i)S[i]=_[i]+L[2+4*i]*h;for(i=0;i<3;++i){u=0;for(var B=0;B<3;++B)u+=L[i+4*B]*S[B];L[12+i]=-u}L[15]=1},h.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r};var f=[0,0,0];h.rotate=function(e,t,r,n){if(this.angle.move(e,t,r),n){this.recalcMatrix(e);var a=this.computedMatrix;f[0]=a[2],f[1]=a[6],f[2]=a[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)a[4*c]=o[c],a[4*c+1]=s[c],a[4*c+2]=l[c];for(i(a,a,n,f),c=0;c<3;++c)o[c]=a[4*c],s[c]=a[4*c+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},h.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var a=this.computedMatrix,i=(Math.exp(this.computedRadius[0]),a[1]),o=a[5],s=a[9],l=c(i,o,s);i/=l,o/=l,s/=l;var u=a[0],d=a[4],p=a[8],h=u*i+d*o+p*s,f=c(u-=i*h,d-=o*h,p-=s*h),m=(u/=f)*t+i*r,g=(d/=f)*t+o*r,v=(p/=f)*t+s*r;this.center.move(e,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(e,Math.log(y))},h.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},h.setMatrix=function(e,t,r,n){var i=1;"number"==typeof r&&(i=0|r),(i<0||i>3)&&(i=1);var o=(i+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[i],l=t[i+4],d=t[i+8];if(n){var p=Math.abs(s),h=Math.abs(l),f=Math.abs(d),m=Math.max(p,h,f);p===m?(s=s<0?-1:1,l=d=0):f===m?(d=d<0?-1:1,s=l=0):(l=l<0?-1:1,s=d=0)}else{var g=c(s,l,d);s/=g,l/=g,d/=g}var v,y,b=t[o],_=t[o+4],x=t[o+8],w=b*s+_*l+x*d,k=c(b-=s*w,_-=l*w,x-=d*w),M=l*(x/=k)-d*(_/=k),T=d*(b/=k)-s*x,C=s*_-l*b,S=c(M,T,C);if(M/=S,T/=S,C/=S,this.center.jump(e,U,W,G),this.radius.idle(e),this.up.jump(e,s,l,d),this.right.jump(e,b,_,x),2===i){var L=t[1],A=t[5],E=t[9],D=L*b+A*_+E*x,I=L*M+A*T+E*C;v=F<0?-Math.PI/2:Math.PI/2,y=Math.atan2(I,D)}else{var P=t[2],O=t[6],R=t[10],F=P*s+O*l+R*d,z=P*b+O*_+R*x,N=P*M+O*T+R*C;v=Math.asin(u(F)),y=Math.atan2(N,z)}this.angle.jump(e,y,v),this.recalcMatrix(e);var j=t[2],B=t[6],Y=t[10],H=this.computedMatrix;a(H,t);var V=H[15],U=H[12]/V,W=H[13]/V,G=H[14]/V,q=Math.exp(this.computedRadius[0]);this.center.jump(e,U-j*q,W-B*q,G-Y*q)},h.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},h.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},h.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},h.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},h.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var a=(n=n||this.computedUp)[0],i=n[1],o=n[2],s=c(a,i,o);if(!(s<1e-6)){a/=s,i/=s,o/=s;var l=t[0]-r[0],d=t[1]-r[1],p=t[2]-r[2],h=c(l,d,p);if(!(h<1e-6)){l/=h,d/=h,p/=h;var f=this.computedRight,m=f[0],g=f[1],v=f[2],y=a*m+i*g+o*v,b=c(m-=y*a,g-=y*i,v-=y*o);if(!(b<.01&&(b=c(m=i*p-o*d,g=o*l-a*p,v=a*d-i*l))<1e-6)){m/=b,g/=b,v/=b,this.up.set(e,a,i,o),this.right.set(e,m,g,v),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(h));var _=i*v-o*g,x=o*m-a*v,w=a*g-i*m,k=c(_,x,w),M=a*l+i*d+o*p,T=m*l+g*d+v*p,C=(_/=k)*l+(x/=k)*d+(w/=k)*p,S=Math.asin(u(M)),L=Math.atan2(C,T),A=this.angle._state,E=A[A.length-1],D=A[A.length-2];E%=2*Math.PI;var I=Math.abs(E+2*Math.PI-L),P=Math.abs(E-L),O=Math.abs(E-2*Math.PI-L);I<P&&(E+=2*Math.PI),O<P&&(E-=2*Math.PI),this.angle.jump(this.angle.lastT(),E,D),this.angle.set(e,L,S)}}}}},{"filtered-vector":228,"gl-mat4/invert":267,"gl-mat4/rotate":272,"gl-vec3/cross":335,"gl-vec3/dot":340,"gl-vec3/normalize":357}],541:[function(e,t,r){"use strict";t.exports=function(e,t,r){var a=e*t,i=n*e,o=i-(i-e),s=e-o,l=n*t,c=l-(l-t),u=t-c,d=s*u-(a-o*c-s*c-o*u);return r?(r[0]=d,r[1]=a,r):[d,a]};var n=+(Math.pow(2,27)+1)},{}],542:[function(e,t,r){"use strict";t.exports=function(e,t,r){var n=e+t,a=n-e,i=t-a,o=e-(n-a);return r?(r[0]=o+i,r[1]=n,r):[o+i,n]}},{}],543:[function(e,r,n){(function(t,r){"use strict";var a=e("bit-twiddle"),i=e("dup");t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o="undefined"!=typeof Uint8ClampedArray,s=t.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=i([32,0])),s.BUFFER||(s.BUFFER=i([32,0]));var l=s.DATA,c=s.BUFFER;function u(e){if(e){var t=e.length||e.byteLength,r=a.log2(t);l[r].push(e)}}function d(e){e=a.nextPow2(e);var t=a.log2(e),r=l[t];return r.length>0?r.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(d(e),0,e)}function h(e){return new Uint16Array(d(2*e),0,e)}function f(e){return new Uint32Array(d(4*e),0,e)}function m(e){return new Int8Array(d(e),0,e)}function g(e){return new Int16Array(d(2*e),0,e)}function v(e){return new Int32Array(d(4*e),0,e)}function y(e){return new Float32Array(d(4*e),0,e)}function b(e){return new Float64Array(d(8*e),0,e)}function _(e){return o?new Uint8ClampedArray(d(e),0,e):p(e)}function x(e){return new DataView(d(e),0,e)}function w(e){e=a.nextPow2(e);var t=a.log2(e),n=c[t];return n.length>0?n.pop():new r(e)}n.free=function(e){if(r.isBuffer(e))c[a.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,n=0|a.log2(t);l[n].push(e)}},n.freeUint8=n.freeUint16=n.freeUint32=n.freeInt8=n.freeInt16=n.freeInt32=n.freeFloat32=n.freeFloat=n.freeFloat64=n.freeDouble=n.freeUint8Clamped=n.freeDataView=function(e){u(e.buffer)},n.freeArrayBuffer=u,n.freeBuffer=function(e){c[a.log2(e.length)].push(e)},n.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return d(e);switch(t){case"uint8":return p(e);case"uint16":return h(e);case"uint32":return f(e);case"int8":return m(e);case"int16":return g(e);case"int32":return v(e);case"float":case"float32":return y(e);case"double":case"float64":return b(e);case"uint8_clamped":return _(e);case"buffer":return w(e);case"data":case"dataview":return x(e);default:return null}return null},n.mallocArrayBuffer=d,n.mallocUint8=p,n.mallocUint16=h,n.mallocUint32=f,n.mallocInt8=m,n.mallocInt16=g,n.mallocInt32=v,n.mallocFloat32=n.mallocFloat=y,n.mallocFloat64=n.mallocDouble=b,n.mallocUint8Clamped=_,n.mallocDataView=x,n.mallocBuffer=w,n.clearCache=function(){for(var e=0;e<32;++e)s.UINT8[e].length=0,s.UINT16[e].length=0,s.UINT32[e].length=0,s.INT8[e].length=0,s.INT16[e].length=0,s.INT32[e].length=0,s.FLOAT[e].length=0,s.DOUBLE[e].length=0,s.UINT8C[e].length=0,l[e].length=0,c[e].length=0}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"bit-twiddle":93,buffer:106,dup:171}],544:[function(e,t,r){"use strict";function n(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t<e;++t)this.roots[t]=t,this.ranks[t]=0}t.exports=n;var a=n.prototype;Object.defineProperty(a,"length",{get:function(){return this.roots.length}}),a.makeSet=function(){var e=this.roots.length;return this.roots.push(e),this.ranks.push(0),e},a.find=function(e){for(var t=e,r=this.roots;r[e]!==e;)e=r[e];for(;r[t]!==e;){var n=r[t];r[t]=e,t=n}return e},a.link=function(e,t){var r=this.find(e),n=this.find(t);if(r!==n){var a=this.ranks,i=this.roots,o=a[r],s=a[n];o<s?i[r]=n:s<o?i[n]=r:(i[n]=r,++a[r])}}},{}],545:[function(e,t,r){"use strict";t.exports=function(e,t,r){return 0===e.length?e:t?(r||e.sort(t),function(e,t){for(var r=1,n=e.length,a=e[0],i=e[0],o=1;o<n;++o)if(i=a,t(a=e[o],i)){if(o===r){r++;continue}e[r++]=a}return e.length=r,e}(e,t)):(r||e.sort(),function(e){for(var t=1,r=e.length,n=e[0],a=e[0],i=1;i<r;++i,a=n)if(a=n,(n=e[i])!==a){if(i===t){t++;continue}e[t++]=n}return e.length=t,e}(e))}},{}],546:[function(e,t,r){var n=/[\'\"]/;t.exports=function(e){return e?(n.test(e.charAt(0))&&(e=e.substr(1)),n.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}},{}],547:[function(e,t,r){"use strict";t.exports=function(e,t,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,a=r.length;n<a;n++){var i=r[n];for(var o in i)if((void 0===t[o]||Array.isArray(t[o])||e[o]!==t[o])&&o in t){var s;if(!0===i[o])s=t[o];else{if(!1===i[o])continue;if("function"==typeof i[o]&&void 0===(s=i[o](t[o],e,t)))continue}e[o]=s}}return e}},{}],548:[function(e,t,r){"use strict";t.exports=function(e,t){return"object"==typeof t&&null!==t||(t={}),n(e,t.canvas||a,t.context||i,t)};var n=e("./lib/vtext"),a=null,i=null;"undefined"!=typeof document&&((a=document.createElement("canvas")).width=8192,a.height=1024,i=a.getContext("2d"))},{"./lib/vtext":549}],549:[function(e,t,r){t.exports=function(e,t,r,n){var i=64,o=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return n&&(n.size&&n.size>0&&(i=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,i+"px",n.font].filter((function(e){return e})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",w(function(e,t,r,n,i,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\<br\>/g,"\n"):r.replace(/\<br\>/g," ");var s="",l=[];for(k=0;k<r.length;++k)l[k]=s;!0===o.bolds&&(l=b(c,u,r,l)),!0===o.italics&&(l=b(d,p,r,l)),!0===o.superscripts&&(l=b(h,m,r,l)),!0===o.subscripts&&(l=b(g,y,r,l));var _=[],x="";for(k=0;k<r.length;++k)null!==l[k]&&(x+=r[k],_.push(l[k]));var w,k,M,T,C,S=x.split("\n"),L=S.length,A=Math.round(i*n),E=n,D=2*n,I=0,P=L*A+D;e.height<P&&(e.height=P),t.fillStyle="#000",t.fillRect(0,0,e.width,e.height),t.fillStyle="#fff";var O=0,R="";function F(){if(""!==R){var e=t.measureText(R).width;t.fillText(R,E+M,D+T),M+=e}}function z(){return Math.round(C)+"px "}function N(e,r){var n=""+t.font;if(!0===o.subscripts){var a=e.indexOf(v),i=r.indexOf(v),s=a>-1?parseInt(e[1+a]):0,l=i>-1?parseInt(r[1+i]):0;s!==l&&(n=n.replace(z(),"?px "),C*=Math.pow(.75,l-s),n=n.replace("?px ",z())),T+=.25*A*(l-s)}if(!0===o.superscripts){var c=e.indexOf(f),d=r.indexOf(f),h=c>-1?parseInt(e[1+c]):0,m=d>-1?parseInt(r[1+d]):0;h!==m&&(n=n.replace(z(),"?px "),C*=Math.pow(.75,m-h),n=n.replace("?px ",z())),T-=.25*A*(m-h)}if(!0===o.bolds){var g=e.indexOf(u)>-1,y=r.indexOf(u)>-1;!g&&y&&(n=b?n.replace("italic ","italic bold "):"bold "+n),g&&!y&&(n=n.replace("bold ",""))}if(!0===o.italics){var b=e.indexOf(p)>-1,_=r.indexOf(p)>-1;!b&&_&&(n="italic "+n),b&&!_&&(n=n.replace("italic ",""))}t.font=n}for(w=0;w<L;++w){var j=S[w]+"\n";for(M=0,T=w*A,C=n,R="",k=0;k<j.length;++k){var B=k+O<_.length?_[k+O]:_[_.length-1];s===B?R+=j[k]:(F(),R=j[k],void 0!==B&&(N(s,B),s=B))}F(),O+=j.length;var Y=0|Math.round(M+2*E);I<Y&&(I=Y)}var H=I,V=D+A*L;return a(t.getImageData(0,0,H,V).data,[V,H,4]).pick(-1,-1,0).transpose(1,0)}(t,r,e,i,o,s),n,i)},t.exports.processPixels=w;var n=e("surface-nets"),a=e("ndarray"),i=e("simplify-planar-graph"),o=e("clean-pslg"),s=e("cdt2d"),l=e("planar-graph-to-polyline"),c="b",u="b|",d="i",p="i|",h="sup",f="+",m="+1",g="sub",v="-",y="-1";function b(e,t,r,n){for(var a="<"+e+">",i="</"+e+">",o=a.length,s=i.length,l=t[0]===f||t[0]===v,c=0,u=-s;c>-1&&-1!==(c=r.indexOf(a,c))&&-1!==(u=r.indexOf(i,c+o))&&!(u<=c);){for(var d=c;d<u+s;++d)if(d<c+o||d>=u)n[d]=null,r=r.substr(0,d)+" "+r.substr(d+1);else if(null!==n[d]){var p=n[d].indexOf(t[0]);-1===p?n[d]+=t:l&&(n[d]=n[d].substr(0,p+1)+(1+parseInt(n[d][p+1]))+n[d].substr(p+2))}var h=c+o,m=r.substr(h,u-h).indexOf(a);c=-1!==m?m:u+s}return n}function _(e,t){var r=n(e,128);return t?i(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function x(e,t,r,n){var a=_(e,n),i=function(e,t,r){for(var n=t.textAlign||"start",a=t.textBaseline||"alphabetic",i=[1<<30,1<<30],o=[0,0],s=e.length,l=0;l<s;++l)for(var c=e[l],u=0;u<2;++u)i[u]=0|Math.min(i[u],c[u]),o[u]=0|Math.max(o[u],c[u]);var d=0;switch(n){case"center":d=-.5*(i[0]+o[0]);break;case"right":case"end":d=-o[0];break;case"left":case"start":d=-i[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+n+"'")}var p=0;switch(a){case"hanging":case"top":p=-i[1];break;case"middle":p=-.5*(i[1]+o[1]);break;case"alphabetic":case"ideographic":p=-3*r;break;case"bottom":p=-o[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+a+"'")}var h=1/r;return"lineHeight"in t?h*=+t.lineHeight:"width"in t?h=t.width/(o[0]-i[0]):"height"in t&&(h=t.height/(o[1]-i[1])),e.map((function(e){return[h*(e[0]+d),h*(e[1]+p)]}))}(a.positions,t,r),c=a.edges,u="ccw"===t.orientation;if(o(i,c),t.polygons||t.polygon||t.polyline){for(var d=l(c,i),p=new Array(d.length),h=0;h<d.length;++h){for(var f=d[h],m=new Array(f.length),g=0;g<f.length;++g){for(var v=f[g],y=new Array(v.length),b=0;b<v.length;++b)y[b]=i[v[b]].slice();u&&y.reverse(),m[g]=y}p[h]=m}return p}return t.triangles||t.triangulate||t.triangle?{cells:s(i,c,{delaunay:!1,exterior:!1,interior:!0}),positions:i}:{edges:c,positions:i}}function w(e,t,r){try{return x(e,t,r,!0)}catch(e){}try{return x(e,t,r,!1)}catch(e){}return t.polygons||t.polyline||t.polygon?[]:t.triangles||t.triangulate||t.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},{cdt2d:107,"clean-pslg":117,ndarray:451,"planar-graph-to-polyline":469,"simplify-planar-graph":522,"surface-nets":529}],550:[function(e,t,r){!function(){"use strict";if("undefined"==typeof ses||!ses.ok||ses.ok()){"undefined"!=typeof ses&&(ses.weakMapPermitHostObjects=g);var e=!1;if("function"==typeof WeakMap){var r=WeakMap;if("undefined"!=typeof navigator&&/Firefox/.test(navigator.userAgent));else{var n=new r,a=Object.freeze({});if(n.set(a,1),1===n.get(a))return void(t.exports=WeakMap);e=!0}}Object.prototype.hasOwnProperty;var i=Object.getOwnPropertyNames,o=Object.defineProperty,s=Object.isExtensible,l="weakmap:",c=l+"ident:"+Math.random()+"___";if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var u=new ArrayBuffer(25),d=new Uint8Array(u);crypto.getRandomValues(d),c=l+"rand:"+Array.prototype.map.call(d,(function(e){return(e%36).toString(36)})).join("")+"___"}if(o(Object,"getOwnPropertyNames",{value:function(e){return i(e).filter(v)}}),"getPropertyNames"in Object){var p=Object.getPropertyNames;o(Object,"getPropertyNames",{value:function(e){return p(e).filter(v)}})}!function(){var e=Object.freeze;o(Object,"freeze",{value:function(t){return y(t),e(t)}});var t=Object.seal;o(Object,"seal",{value:function(e){return y(e),t(e)}});var r=Object.preventExtensions;o(Object,"preventExtensions",{value:function(e){return y(e),r(e)}})}();var h=!1,f=0,m=function(){this instanceof m||_();var e=[],t=[],r=f++;return Object.create(m.prototype,{get___:{value:b((function(n,a){var i,o=y(n);return o?r in o?o[r]:a:(i=e.indexOf(n))>=0?t[i]:a}))},has___:{value:b((function(t){var n=y(t);return n?r in n:e.indexOf(t)>=0}))},set___:{value:b((function(n,a){var i,o=y(n);return o?o[r]=a:(i=e.indexOf(n))>=0?t[i]=a:(i=e.length,t[i]=a,e[i]=n),this}))},delete___:{value:b((function(n){var a,i,o=y(n);return o?r in o&&delete o[r]:!((a=e.indexOf(n))<0||(i=e.length-1,e[a]=void 0,t[a]=t[i],e[a]=e[i],e.length=i,t.length=i,0))}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof m||_();var t,n=new r,a=void 0,i=!1;return t=e?function(e,t){return n.set(e,t),n.has(e)||(a||(a=new m),a.set(e,t)),this}:function(e,t){if(i)try{n.set(e,t)}catch(r){a||(a=new m),a.set___(e,t)}else n.set(e,t);return this},Object.create(m.prototype,{get___:{value:b((function(e,t){return a?n.has(e)?n.get(e):a.get___(e,t):n.get(e,t)}))},has___:{value:b((function(e){return n.has(e)||!!a&&a.has___(e)}))},set___:{value:b(t)},delete___:{value:b((function(e){var t=!!n.delete(e);return a&&a.delete___(e)||t}))},permitHostObjects___:{value:b((function(e){if(e!==g)throw new Error("bogus call to permitHostObjects___");i=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=m.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=m)}function g(e){e.permitHostObjects___&&e.permitHostObjects___(g)}function v(e){return!(e.substr(0,l.length)==l&&"___"===e.substr(e.length-3))}function y(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[c];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return o(e,c,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch(e){return}}}function b(e){return e.prototype=null,Object.freeze(e)}function _(){h||"undefined"==typeof console||(h=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],551:[function(e,t,r){var n=e("./hidden-store.js");t.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:n(t,e)}}},{"./hidden-store.js":552}],552:[function(e,t,r){t.exports=function(e,t){var r={identity:t},n=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?n.apply(this,arguments):r},writable:!0}),r}},{}],553:[function(e,t,r){var n=e("./create-store.js");t.exports=function(){var e=n();return{get:function(t,r){var n=e(t);return n.hasOwnProperty("value")?n.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},{"./create-store.js":551}],554:[function(e,t,r){var n=e("get-canvas-context");t.exports=function(e){return n("webgl",e)}},{"get-canvas-context":234}],555:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(l);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if("string"==typeof e){var t=e.match(c);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(u);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(a="闰"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var a=t[t.length-1];r="i"===a||"I"===a}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var a=this.intercalaryMonth(e);if(r&&t!==a||t<1||t>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!r&&t<=a?t-1:t:t-1},toChineseMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);if(t<0||t>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?t<r?t+1:t:t+1},intercalaryMonth:function(e){return e=this._validateYear(e),d[e-d[0]]>>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(e,t,r){var a,o=this._validateYear(e,n.local.invalidyear),s=p[o-p[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(a=i.newDate(l,c,u)).add(4-(a.dayOfWeek()||7),"d");var d=this.toJD(e,t,r)-a.toJD();return 1+Math.floor(d/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=d[e-d[0]];if(t>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-t?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,s,r,n.local.invalidDate);e=this._validateYear(a.year()),t=a.month(),r=a.day();var o=this.isIntercalaryMonth(e,t),s=this.toChineseMonth(e,t),l=function(e,t,r,n,a){var i,o,s;if("object"==typeof e)o=e,i=t||{};else{var l;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,i=n):(l=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:l}}s=o.day-1;var c,u=d[o.year-d[0]],h=u>>13;c=h?o.month>h?o.month:o.isIntercalary?o.month:o.month-1:o.month-1;for(var f=0;f<c;f++)s+=u&1<<12-f?30:29;var m=p[o.year-p[0]],g=new Date(m>>9&4095,(m>>5&15)-1,(31&m)+s);return i.year=g.getFullYear(),i.month=1+g.getMonth(),i.day=g.getDate(),i}(e,s,r,o);return i.toJD(l.year,l.month,l.day)},fromJD:function(e){var t=i.fromJD(e),r=function(e,t,r,n){var a,i;if("object"==typeof e)a=e,i=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var o=p[a.year-p[0]],s=a.year<<9|a.month<<5|a.day;i.year=s>=o?a.year:a.year-1,o=p[i.year-p[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(a.year,a.month-1,a.day);l=Math.round((u-c)/864e5);var h,f=d[i.year-d[0]];for(h=0;h<13;h++){var m=f&1<<12-h?30:29;if(l<m)break;l-=m}var g=f>>13;return!g||h<g?(i.isIntercalary=!1,i.month=1+h):h===g?(i.isIntercalary=!0,i.month=h):(i.isIntercalary=!1,i.month=h),i.day=1+l,i}(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(s),r=this._validateYear(+t[1]),n=+t[2],a=!!t[3],i=this.toMonthIndex(r,n,a),o=+t[4];return this.newDate(r,i,o)},add:function(e,t,r){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),s=this.toChineseMonth(n,a),l=Object.getPrototypeOf(o.prototype).add.call(this,e,t,r);if("y"===r){var c=l.year(),u=l.month(),d=this.isIntercalaryMonth(c,s),p=i&&d?this.toMonthIndex(c,s,!0):this.toMonthIndex(c,s,!1);p!==u&&l.month(p)}return l}});var s=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,l=/^\d?\d[iI]?/m,c=/^闰?十?[一二三四五六七八九]?月/m,u=/^闰?十?[一二三四五六七八九]?/m;n.calendars.chinese=o;var d=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],p=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904]},{"../main":569,"object-assign":455}],556:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Coptic",jdEpoch:1825029.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.coptic=i},{"../main":569,"object-assign":455}],557:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){return(this._validate(e,t,r,n.local.invalidDate).day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year()+(a.year()<0?1:0),t=a.month(),(r=a.day())+(t>1?16:0)+(t>2?32*(t-2):0)+400*(e-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=i},{"../main":569,"object-assign":455}],558:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==3||e%4==-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return(e=a.year())<0&&e++,a.day()+30*(a.month()-1)+365*(e-1)+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-30*(n-1)+1;return this.newDate(r,n,a)}}),n.calendars.ethiopian=i},{"../main":569,"object-assign":455}],559:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return o(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===e?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),12===t&&this.leapYear(e)?30:8===t&&5===o(this.daysInYear(e),10)?30:9===t&&3===o(this.daysInYear(e),10)?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e<=0?e+1:e,o=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var s=7;s<=this.monthsInYear(e);s++)o+=this.daysInMonth(e,s);for(s=1;s<t;s++)o+=this.daysInMonth(e,s)}else for(s=7;s<t;s++)o+=this.daysInMonth(e,s);return o},_delay1:function(e){var t=Math.floor((235*e-234)/19),r=12084+13753*t,n=29*t+Math.floor(r/25920);return o(3*(n+1),7)<3&&n++,n},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e);return this._delay1(e+1)-r==356?2:r-t==382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor(98496*(e-this.jdEpoch)/35975351)-1;e>=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=e<this.toJD(t,1,1)?7:1;e>this.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.hebrew=i},{"../main":569,"object-assign":455}],560:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){return(11*this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),e=e<=0?e+1:e,(r=a.day())+Math.ceil(29.5*(t-1))+354*(e-1)+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),n.calendars.islamic=i},{"../main":569,"object-assign":455}],561:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return(e=t.year()<0?t.year()+1:t.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=a.year(),t=a.month(),r=a.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),a=Math.floor((t-n)/30.6001),i=a-Math.floor(a<14?1:13),o=r-Math.floor(i>2?4716:4715),s=t-n-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,i,s)}}),n.calendars.julian=i},{"../main":569,"object-assign":455}],562:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}function s(e,t){return o(e-1,t)+1}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(e){e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year();var t=Math.floor(e/400);return e%=400,e+=e<0?400:0,t+"."+Math.floor(e/20)+"."+e%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r<e.length;r++){var n=parseInt(e[r],10);if(Math.abs(n)>19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate).day()},weekDay:function(e,t,r){return this._validate(e,t,r,n.local.invalidDate),!0},extraInfo:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate).toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=o(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,o(t,20)]},_toTzolkin:function(e){return[s(20+(e-=this.jdEpoch),20),s(e+4,13)]},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),n.calendars.mayan=i},{"../main":569,"object-assign":455}],563:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar;var o=n.instance("gregorian");a(i.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidMonth);(e=a.year())<0&&e++;for(var i=a.day(),s=1;s<a.month();s++)i+=this.daysPerMonth[s-1];return i+o.toJD(e+1468,3,13)},fromJD:function(e){e=Math.floor(e+.5);for(var t=Math.floor((e-(this.jdEpoch-1))/366);e>=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),n.calendars.nanakshahi=i},{"../main":569,"object-assign":455}],564:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){if(e=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[e])return this.daysPerYear;for(var t=0,r=this.minMonth;r<=12;r++)t+=this.NEPALI_CALENDAR_DATA[e][r];return t},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[e]?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=n.instance(),o=0,s=t,l=e;this._createMissingCalendarData(e);var c=e-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==t&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===t?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=i.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],i.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(e){var t=n.instance().fromJD(e),r=t.year(),a=t.dayOfYear(),i=r+56;this._createMissingCalendarData(i);for(var o=9,s=this.NEPALI_CALENDAR_DATA[i][0],l=this.NEPALI_CALENDAR_DATA[i][o]-s+1;a>l;)++o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var c=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r<e+2;r++)void 0===this.NEPALI_CALENDAR_DATA[r]&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),n.calendars.nepali=i},{"../main":569,"object-assign":455}],565:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function o(e,t){return e-t*Math.floor(e/t)}i.prototype=new n.baseCalendar,a(i.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 682*((t.year()-(t.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);e=a.year(),t=a.month(),r=a.day();var i=e-(e>=0?474:473),s=474+o(i,2820);return r+(t<=7?31*(t-1):30*(t-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(i/2820)+this.jdEpoch-1},fromJD:function(e){var t=(e=Math.floor(e)+.5)-this.toJD(475,1,1),r=Math.floor(t/1029983),n=o(t,1029983),a=2820;if(1029982!==n){var i=Math.floor(n/366),s=o(n,366);a=Math.floor((2134*i+2816*s+2815)/1028522)+i+1}var l=a+2820*r+474;l=l<=0?l-1:l;var c=e-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),d=e-this.toJD(l,u,1)+1;return this.newDate(l,u,d)}}),n.calendars.persian=i,n.calendars.jalali=i},{"../main":569,"object-assign":455}],566:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{"../main":569,"object-assign":455}],567:[function(e,t,r){var n=e("../main"),a=e("object-assign"),i=n.instance();function o(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,a(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(t.year()),i.leapYear(e)},weekOfYear:function(e,t,r){var a=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return e=this._t2gYear(a.year()),i.weekOfYear(e,a.month(),a.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate);return e=this._t2gYear(a.year()),i.toJD(e,a.month(),a.day())},fromJD:function(e){var t=i.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),n.calendars.thai=o},{"../main":569,"object-assign":455}],568:[function(e,t,r){var n=e("../main"),a=e("object-assign");function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new n.baseCalendar,a(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,a=0,i=0;i<o.length;i++){if(o[i]>r)return o[a]-o[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(e,t,r){var a=this._validate(e,t,r,n.local.invalidDate),i=12*(a.year()-1)+a.month()-15292;return a.day()+o[i-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;n<o.length&&!(o[n]>t);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),s=i+1,l=a-12*i,c=t-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(e,t,r){var a=n.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(e=null!=e.year?e.year:e)>=1276&&e<=1500),a},_validate:function(e,t,r,a){var i=n.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw a.replace(/\{0\}/,this.local.name);return i}}),n.calendars.ummalqura=i;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":569,"object-assign":455}],569:[function(e,t,r){var n=e("object-assign");function a(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function s(){this.shortYearCutoff="+10"}function l(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}n(a.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,a):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(0===i?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),n(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(null==e?this:e,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+o(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);a=e.day(),"y"===r?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):"m"===r&&(function(e){for(;o<e.minMonth;)i--,o+=e.monthsInYear(i);for(var t=e.monthsInYear(i);o>t-1+e.minMonth;)i++,o-=t,t=e.monthsInYear(i)}(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var s=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,s}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),a="m"===r?t:e.month(),i="d"===r?t:e.day();return"y"!==r&&"m"!==r||(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(a)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(a)}return this._validateLevel--,n},toJSDate:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return c.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(e){return this.fromJD(c.instance().fromJSDate(e).toJD())},_validate:function(e,t,r,n){if(e.year){if(0===this._validateLevel&&this.name!==e.calendar().name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,e.calendar().local.name);return e}try{if(this._validateLevel++,1===this._validateLevel&&!this.isValid(e,t,r))throw n.replace(/\{0\}/,this.local.name);var a=this.newDate(e,t,r);return this._validateLevel--,a}catch(e){throw this._validateLevel--,e}}}),l.prototype=new s,n(l.prototype,{name:"Gregorian",jdEpoch:1721425.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(e=t.year()+(t.year()<0?1:0))%4==0&&(e%100!=0||e%400==0)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<3&&(t+=12,e--);var a=Math.floor(e/100),i=2-a+Math.floor(a/4);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+i-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-1867216.25)/36524.25),n=1524+(r=t+1+r-Math.floor(r/4)),a=Math.floor((n-122.1)/365.25),i=Math.floor(365.25*a),o=Math.floor((n-i)/30.6001),s=n-i-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=a-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var c=t.exports=new a;c.cdate=i,c.baseCalendar=s,c.calendars.gregorian=l},{"object-assign":455}],570:[function(e,t,r){var n=e("object-assign"),a=e("./main");n(a.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),a.local=a.regionalOptions[""],n(a.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),n(a.baseCalendar.prototype,{UNIX_EPOCH:a.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:a.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var n,i,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,d=r.monthNamesShort||this.local.monthNamesShort,p=r.monthNames||this.local.monthNames,h=(r.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;w+n<e.length&&e.charAt(w+n)===t;)n++;return w+=n-1,Math.floor(n/(r||1))>1}),f=function(e,t,r,n){var a=""+t;if(h(e,n))for(;a.length<r;)a="0"+a;return a},m=this,g=function(e){return"function"==typeof u?u.call(m,e,h("m")):b(f("m",e.month(),2))},v=function(e,t){return t?"function"==typeof p?p.call(m,e):p[e.month()-m.minMonth]:"function"==typeof d?d.call(m,e):d[e.month()-m.minMonth]},y=this.local.digits,b=function(e){return r.localNumbers&&y?y(e):e},_="",x=!1,w=0;w<e.length;w++)if(x)"'"!==e.charAt(w)||h("'")?_+=e.charAt(w):x=!1;else switch(e.charAt(w)){case"d":_+=b(f("d",t.day(),2));break;case"D":_+=(n="D",i=t.dayOfWeek(),o=l,s=c,h(n)?s[i]:o[i]);break;case"o":_+=f("o",t.dayOfYear(),3);break;case"w":_+=f("w",t.weekOfYear(),2);break;case"m":_+=g(t);break;case"M":_+=v(t,h("M"));break;case"y":_+=h("y",2)?t.year():(t.year()%100<10?"0":"")+t.year()%100;break;case"Y":h("Y",2),_+=t.formatYear();break;case"J":_+=t.toJD();break;case"@":_+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":_+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":h("'")?_+="'":x=!0;break;default:_+=e.charAt(w)}return _},parseDate:function(e,t,r){if(null==t)throw a.local.invalidArguments||a.regionalOptions[""].invalidArguments;if(""===(t="object"==typeof t?t.toString():t+""))return null;e=e||this.local.dateFormat;var n=(r=r||{}).shortYearCutoff||this.shortYearCutoff;n="string"!=typeof n?n:this.today().year()%100+parseInt(n,10);for(var i=r.dayNamesShort||this.local.dayNamesShort,o=r.dayNames||this.local.dayNames,s=r.parseMonth||this.local.parseMonth,l=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,d=-1,p=-1,h=-1,f=-1,m=-1,g=!1,v=!1,y=function(t,r){for(var n=1;C+n<e.length&&e.charAt(C+n)===t;)n++;return C+=n-1,Math.floor(n/(r||1))>1},b=function(e,r){var n=y(e,r),i=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+i+"}"),s=t.substring(T).match(o);if(!s)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=s[0].length,parseInt(s[0],10)},_=this,x=function(){if("function"==typeof l){y("m");var e=l.call(_,t.substring(T));return T+=e.length,e}return b("m")},w=function(e,r,n,i){for(var o=y(e,i)?n:r,s=0;s<o.length;s++)if(t.substr(T,o[s].length).toLowerCase()===o[s].toLowerCase())return T+=o[s].length,s+_.minMonth;throw(a.local.unknownNameAt||a.regionalOptions[""].unknownNameAt).replace(/\{0\}/,T)},k=function(){if("function"==typeof u){var e=y("M")?u.call(_,t.substring(T)):c.call(_,t.substring(T));return T+=e.length,e}return w("M",c,u)},M=function(){if(t.charAt(T)!==e.charAt(C))throw(a.local.unexpectedLiteralAt||a.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,T);T++},T=0,C=0;C<e.length;C++)if(v)"'"!==e.charAt(C)||y("'")?M():v=!1;else switch(e.charAt(C)){case"d":f=b("d");break;case"D":w("D",i,o);break;case"o":m=b("o");break;case"w":b("w");break;case"m":h=x();break;case"M":h=k();break;case"y":var S=C;g=!y("y",2),C=S,p=b("y",2);break;case"Y":p=b("Y",2);break;case"J":d=b("J")+.5,"."===t.charAt(T)&&(T++,b("J"));break;case"@":d=b("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":d=b("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":T=t.length;break;case"'":y("'")?M():v=!0;break;default:M()}if(T<t.length)throw a.local.unexpectedText||a.regionalOptions[""].unexpectedText;if(-1===p?p=this.today().year():p<100&&g&&(p+=-1===n?1900:this.today().year()-this.today().year()%100-(p<=n?0:100)),"string"==typeof h&&(h=s.call(this,p,h)),m>-1){h=1,f=m;for(var L=this.daysInMonth(p,h);f>L;L=this.daysInMonth(p,h))h++,f-=L}return d>-1?this.fromJD(d):this.newDate(p,h,f)},determineDate:function(e,t,r,n,a){r&&"object"!=typeof r&&(a=n,n=r,r=null),"string"!=typeof n&&(a=n,n="");var i=this;return t=t?t.newDate():null,e=null==e?t:"string"==typeof e?function(e){try{return i.parseDate(n,e,a)}catch(e){}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||i.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e)}})},{"./main":569,"object-assign":455}],571:[function(e,t,r){t.exports=e("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n        var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n        var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n        if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n          _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n        }\n      }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":147}],572:[function(e,t,r){"use strict";t.exports=function(e,t){var r=[];return t=+t||0,n(e.hi(e.shape[0]-1),r,t),r};var n=e("./lib/zc-core")},{"./lib/zc-core":571}],573:[function(e,t,r){"use strict";t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},{}],574:[function(e,t,r){"use strict";var n=e("./arrow_paths"),a=e("../../plots/font_attributes"),i=e("../../plots/cartesian/constants"),o=e("../../plot_api/plot_template").templatedArray;t.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:a({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../plot_api/plot_template":754,"../../plots/cartesian/constants":770,"../../plots/font_attributes":790,"./arrow_paths":573}],575:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./draw").draw;function o(e){var t=e._fullLayout;n.filterVisible(t.annotations).forEach((function(t){var r=a.getFromId(e,t.xref),n=a.getFromId(e,t.yref);t._extremes={},r&&s(t,r),n&&s(t,n)}))}function s(e,t){var r,n=t._id,i=n.charAt(0),o=e[i],s=e["a"+i],l=e[i+"ref"],c=e["a"+i+"ref"],u=e["_"+i+"padplus"],d=e["_"+i+"padminus"],p={x:1,y:-1}[i]*e[i+"shift"],h=3*e.arrowsize*e.arrowwidth||0,f=h+p,m=h-p,g=3*e.startarrowsize*e.arrowwidth||0,v=g+p,y=g-p;if(c===l){var b=a.findExtremes(t,[t.r2c(o)],{ppadplus:f,ppadminus:m}),_=a.findExtremes(t,[t.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(d,y)});r={min:[b.min[0],_.min[0]],max:[b.max[0],_.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=a.findExtremes(t,[t.r2c(o)],{ppadplus:Math.max(u,f,v),ppadminus:Math.max(d,m,y)});e._extremes[n]=r}t.exports=function(e){var t=e._fullLayout;if(n.filterVisible(t.annotations).length&&e._fullData.length)return n.syncOrAsync([i,o],e)}},{"../../lib":716,"../../plots/cartesian/axes":764,"./draw":580}],576:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("../../plot_api/plot_template").arrayEditor;function o(e,t){var r,n,a,i,o,l,c,u=e._fullLayout.annotations,d=[],p=[],h=[],f=(t||[]).length;for(r=0;r<u.length;r++)if(i=(a=u[r]).clicktoshow){for(n=0;n<f;n++)if(l=(o=t[n]).xaxis,c=o.yaxis,l._id===a.xref&&c._id===a.yref&&l.d2r(o.x)===s(a._xclick,l)&&c.d2r(o.y)===s(a._yclick,c)){(a.visible?"onout"===i?p:h:d).push(r);break}n===f&&a.visible&&"onout"===i&&p.push(r)}return{on:d,off:p,explicitOff:h}}function s(e,t){return"log"===t.type?t.l2r(e):t.d2r(e)}t.exports={hasClickToShow:function(e,t){var r=o(e,t);return r.on.length>0||r.explicitOff.length>0},onClick:function(e,t){var r,s,l=o(e,t),c=l.on,u=l.off.concat(l.explicitOff),d={},p=e._fullLayout.annotations;if(c.length||u.length){for(r=0;r<c.length;r++)(s=i(e.layout,"annotations",p[c[r]])).modifyItem("visible",!0),n.extendFlat(d,s.getUpdateObj());for(r=0;r<u.length;r++)(s=i(e.layout,"annotations",p[u[r]])).modifyItem("visible",!1),n.extendFlat(d,s.getUpdateObj());return a.call("update",e,{},d)}}}},{"../../lib":716,"../../plot_api/plot_template":754,"../../registry":845}],577:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../color");t.exports=function(e,t,r,i){i("opacity");var o=i("bgcolor"),s=i("bordercolor"),l=a.opacity(s);i("borderpad");var c=i("borderwidth"),u=i("showarrow");if(i("text",u?" ":r._dfltTitle.annotation),i("textangle"),n.coerceFont(i,"font",r.font),i("width"),i("align"),i("height")&&i("valign"),u){var d,p,h=i("arrowside");-1!==h.indexOf("end")&&(d=i("arrowhead"),p=i("arrowsize")),-1!==h.indexOf("start")&&(i("startarrowhead",d),i("startarrowsize",p)),i("arrowcolor",l?t.bordercolor:a.defaultLine),i("arrowwidth",2*(l&&c||1)),i("standoff"),i("startstandoff")}var f=i("hovertext"),m=r.hoverlabel||{};if(f){var g=i("hoverlabel.bgcolor",m.bgcolor||(a.opacity(o)?a.rgb(o):a.defaultLine)),v=i("hoverlabel.bordercolor",m.bordercolor||a.contrast(g));n.coerceFont(i,"hoverlabel.font",{family:m.font.family,size:m.font.size,color:m.font.color||v})}i("captureevents",!!f)}},{"../../lib":716,"../color":591}],578:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib/to_log_range");t.exports=function(e,t,r,i){t=t||{};var o="log"===r&&"linear"===t.type,s="linear"===r&&"log"===t.type;if(o||s)for(var l,c,u=e._fullLayout.annotations,d=t._id.charAt(0),p=0;p<u.length;p++)l=u[p],c="annotations["+p+"].",l[d+"ref"]===t._id&&h(d),l["a"+d+"ref"]===t._id&&h("a"+d);function h(e){var r=l[e],s=null;s=o?a(r,t.range):Math.pow(10,r),n(s)||(s=null),i(c+e,s)}}},{"../../lib/to_log_range":742,"fast-isnumeric":227}],579:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("./common_defaults"),s=e("./attributes");function l(e,t,r){function i(r,a){return n.coerce(e,t,s,r,a)}var l=i("visible"),c=i("clicktoshow");if(l||c){o(e,t,r,i);for(var u=t.showarrow,d=["x","y"],p=[-10,-30],h={_fullLayout:r},f=0;f<2;f++){var m=d[f],g=a.coerceRef(e,t,h,m,"","paper");if("paper"!==g&&a.getFromId(h,g)._annIndices.push(t._index),a.coercePosition(t,h,i,g,m,.5),u){var v="a"+m,y=a.coerceRef(e,t,h,v,"pixel");"pixel"!==y&&y!==g&&(y=t[v]="pixel");var b="pixel"===y?p[f]:.4;a.coercePosition(t,h,i,y,v,b)}i(m+"anchor"),i(m+"shift")}if(n.noneOrAll(e,t,["x","y"]),u&&n.noneOrAll(e,t,["ax","ay"]),c){var _=i("xclick"),x=i("yclick");t._xclick=void 0===_?t.x:a.cleanPosition(_,h,t.xref),t._yclick=void 0===x?t.y:a.cleanPosition(x,h,t.yref)}}}t.exports=function(e,t){i(e,t,{name:"annotations",handleItemDefaults:l})}},{"../../lib":716,"../../plots/array_container_defaults":760,"../../plots/cartesian/axes":764,"./attributes":574,"./common_defaults":577}],580:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../../lib"),s=e("../../plots/cartesian/axes"),l=e("../color"),c=e("../drawing"),u=e("../fx"),d=e("../../lib/svg_text_utils"),p=e("../../lib/setcursor"),h=e("../dragelement"),f=e("../../plot_api/plot_template").arrayEditor,m=e("./draw_arrow_head");function g(e,t){var r=e._fullLayout.annotations[t]||{},n=s.getFromId(e,r.xref),a=s.getFromId(e,r.yref);n&&n.setScale(),a&&a.setScale(),v(e,r,t,!1,n,a)}function v(e,t,r,i,s,g){var v,y,b=e._fullLayout,_=e._fullLayout._size,x=e._context.edits;i?(v="annotation-"+i,y=i+".annotations"):(v="annotation",y="annotations");var w=f(e.layout,y,t),k=w.modifyBase,M=w.modifyItem,T=w.getUpdateObj;b._infolayer.selectAll("."+v+'[data-index="'+r+'"]').remove();var C="clip"+b._uid+"_ann"+r;if(t._input&&!1!==t.visible){var S={x:{},y:{}},L=+t.textangle||0,A=b._infolayer.append("g").classed(v,!0).attr("data-index",String(r)).style("opacity",t.opacity),E=A.append("g").classed("annotation-text-g",!0),D=x[t.showarrow?"annotationTail":"annotationPosition"],I=t.captureevents||x.annotationText||D,P=E.append("g").style("pointer-events",I?"all":null).call(p,"pointer").on("click",(function(){e._dragging=!1,e.emit("plotly_clickannotation",V(n.event))}));t.hovertext&&P.on("mouseover",(function(){var r=t.hoverlabel,n=r.font,a=this.getBoundingClientRect(),i=e.getBoundingClientRect();u.loneHover({x0:a.left-i.left,x1:a.right-i.left,y:(a.top+a.bottom)/2-i.top,text:t.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color},{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:e})})).on("mouseout",(function(){u.loneUnhover(b._hoverlayer.node())}));var O=t.borderwidth,R=t.borderpad,F=O+R,z=P.append("rect").attr("class","bg").style("stroke-width",O+"px").call(l.stroke,t.bordercolor).call(l.fill,t.bgcolor),N=t.width||t.height,j=b._topclips.selectAll("#"+C).data(N?[0]:[]);j.enter().append("clipPath").classed("annclip",!0).attr("id",C).append("rect"),j.exit().remove();var B=t.font,Y=b._meta?o.templateString(t.text,b._meta):t.text,H=P.append("text").classed("annotation-text",!0).text(Y);x.annotationText?H.call(d.makeEditable,{delegate:P,gd:e}).call(U).on("edit",(function(r){t.text=r,this.call(U),M("text",r),s&&s.autorange&&k(s._name+".autorange",!0),g&&g.autorange&&k(g._name+".autorange",!0),a.call("_guiRelayout",e,T())})):H.call(U)}else n.selectAll("#"+C).remove();function V(e){var n={index:r,annotation:t._input,fullAnnotation:t,event:e};return i&&(n.subplotId=i),n}function U(r){return r.call(c.font,B).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),d.convertToTspans(r,e,W),r}function W(){var r=H.selectAll("a");1===r.size()&&r.text()===H.text()&&P.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(z.node());var n=P.select(".annotation-text-math-group"),u=!n.empty(),f=c.bBox((u?n:H).node()),v=f.width,y=f.height,w=t.width||v,I=t.height||y,R=Math.round(w+2*F),B=Math.round(I+2*F);function Y(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var U=!1,W=["x","y"],G=0;G<W.length;G++){var q,K,X,Z,J,$=W[G],Q=t[$+"ref"]||$,ee=t["a"+$+"ref"],te={x:s,y:g}[$],re=(L+("x"===$?0:-90))*Math.PI/180,ne=R*Math.cos(re),ae=B*Math.sin(re),ie=Math.abs(ne)+Math.abs(ae),oe=t[$+"anchor"],se=t[$+"shift"]*("x"===$?1:-1),le=S[$];if(te){var ce=te.r2fraction(t[$]);(ce<0||ce>1)&&(ee===Q?((ce=te.r2fraction(t["a"+$]))<0||ce>1)&&(U=!0):U=!0),q=te._offset+te.r2p(t[$]),Z=.5}else"x"===$?(X=t[$],q=_.l+_.w*X):(X=1-t[$],q=_.t+_.h*X),Z=t.showarrow?.5:X;if(t.showarrow){le.head=q;var ue=t["a"+$];J=ne*Y(.5,t.xanchor)-ae*Y(.5,t.yanchor),ee===Q?(le.tail=te._offset+te.r2p(ue),K=J):(le.tail=q+ue,K=J+ue),le.text=le.tail+J;var de=b["x"===$?"width":"height"];if("paper"===Q&&(le.head=o.constrain(le.head,1,de-1)),"pixel"===ee){var pe=-Math.max(le.tail-3,le.text),he=Math.min(le.tail+3,le.text)-de;pe>0?(le.tail+=pe,le.text+=pe):he>0&&(le.tail-=he,le.text-=he)}le.tail+=se,le.head+=se}else K=J=ie*Y(Z,oe),le.text=q+J;le.text+=se,J+=se,K+=se,t["_"+$+"padplus"]=ie/2+K,t["_"+$+"padminus"]=ie/2-K,t["_"+$+"size"]=ie,t["_"+$+"shift"]=J}if(U)P.remove();else{var fe=0,me=0;if("left"!==t.align&&(fe=(w-v)*("center"===t.align?.5:1)),"top"!==t.valign&&(me=(I-y)*("middle"===t.valign?.5:1)),u)n.select("svg").attr({x:F+fe-1,y:F+me}).call(c.setClipUrl,N?C:null,e);else{var ge=F+me-f.top,ve=F+fe-f.left;H.call(d.positionText,ve,ge).call(c.setClipUrl,N?C:null,e)}j.select("rect").call(c.setRect,F,F,w,I),z.call(c.setRect,O/2,O/2,R-O,B-O),P.call(c.setTranslate,Math.round(S.x.text-R/2),Math.round(S.y.text-B/2)),E.attr({transform:"rotate("+L+","+S.x.text+","+S.y.text+")"});var ye,be=function(r,n){A.selectAll(".annotation-arrow-g").remove();var u=S.x.head,d=S.y.head,p=S.x.tail+r,f=S.y.tail+n,v=S.x.text+r,y=S.y.text+n,b=o.rotationXYMatrix(L,v,y),w=o.apply2DTransform(b),C=o.apply2DTransform2(b),D=+z.attr("width"),I=+z.attr("height"),O=v-.5*D,R=O+D,F=y-.5*I,N=F+I,j=[[O,F,O,N],[O,N,R,N],[R,N,R,F],[R,F,O,F]].map(C);if(!j.reduce((function(e,t){return e^!!o.segmentsIntersect(u,d,u+1e6,d+1e6,t[0],t[1],t[2],t[3])}),!1)){j.forEach((function(e){var t=o.segmentsIntersect(p,f,u,d,e[0],e[1],e[2],e[3]);t&&(p=t.x,f=t.y)}));var B=t.arrowwidth,Y=t.arrowcolor,H=t.arrowside,V=A.append("g").style({opacity:l.opacity(Y)}).classed("annotation-arrow-g",!0),U=V.append("path").attr("d","M"+p+","+f+"L"+u+","+d).style("stroke-width",B+"px").call(l.stroke,l.rgb(Y));if(m(U,H,t),x.annotationPosition&&U.node().parentNode&&!i){var W=u,G=d;if(t.standoff){var q=Math.sqrt(Math.pow(u-p,2)+Math.pow(d-f,2));W+=t.standoff*(p-u)/q,G+=t.standoff*(f-d)/q}var K,X,Z=V.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(p-W)+","+(f-G),transform:"translate("+W+","+G+")"}).style("stroke-width",B+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");h.init({element:Z.node(),gd:e,prepFn:function(){var e=c.getTranslate(P);K=e.x,X=e.y,s&&s.autorange&&k(s._name+".autorange",!0),g&&g.autorange&&k(g._name+".autorange",!0)},moveFn:function(e,r){var n=w(K,X),a=n[0]+e,i=n[1]+r;P.call(c.setTranslate,a,i),M("x",s?s.p2r(s.r2p(t.x)+e):t.x+e/_.w),M("y",g?g.p2r(g.r2p(t.y)+r):t.y-r/_.h),t.axref===t.xref&&M("ax",s.p2r(s.r2p(t.ax)+e)),t.ayref===t.yref&&M("ay",g.p2r(g.r2p(t.ay)+r)),V.attr("transform","translate("+e+","+r+")"),E.attr({transform:"rotate("+L+","+a+","+i+")"})},doneFn:function(){a.call("_guiRelayout",e,T());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&be(0,0),D&&h.init({element:P.node(),gd:e,prepFn:function(){ye=E.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?M("ax",s.p2r(s.r2p(t.ax)+e)):M("ax",t.ax+e),t.ayref===t.yref?M("ay",g.p2r(g.r2p(t.ay)+r)):M("ay",t.ay+r),be(e,r);else{if(i)return;var a,o;if(s)a=s.p2r(s.r2p(t.x)+e);else{var l=t._xsize/_.w,c=t.x+(t._xshift-t.xshift)/_.w-l/2;a=h.align(c+e/_.w,l,0,1,t.xanchor)}if(g)o=g.p2r(g.r2p(t.y)+r);else{var u=t._ysize/_.h,d=t.y-(t._yshift+t.yshift)/_.h-u/2;o=h.align(d-r/_.h,u,0,1,t.yanchor)}M("x",a),M("y",o),s&&g||(n=h.getCursor(s?.5:a,g?.5:o,t.xanchor,t.yanchor))}E.attr({transform:"translate("+e+","+r+")"+ye}),p(P,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",V(n))},doneFn:function(){p(P),a.call("_guiRelayout",e,T());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r<t.annotations.length;r++)t.annotations[r].visible&&g(e,r);return i.previousPromises(e)},drawOne:g,drawRaw:v}},{"../../lib":716,"../../lib/setcursor":736,"../../lib/svg_text_utils":740,"../../plot_api/plot_template":754,"../../plots/cartesian/axes":764,"../../plots/plots":825,"../../registry":845,"../color":591,"../dragelement":609,"../drawing":612,"../fx":629,"./draw_arrow_head":581,d3:164}],581:[function(e,t,r){"use strict";var n=e("d3"),a=e("../color"),i=e("./arrow_paths");t.exports=function(e,t,r){var o,s,l,c,u=e.node(),d=i[r.arrowhead||0],p=i[r.startarrowhead||0],h=(r.arrowwidth||1)*(r.arrowsize||1),f=(r.arrowwidth||1)*(r.startarrowsize||1),m=t.indexOf("start")>=0,g=t.indexOf("end")>=0,v=d.backoff*h+r.standoff,y=p.backoff*f+r.startstandoff;if("line"===u.nodeName){o={x:+e.attr("x1"),y:+e.attr("y1")},s={x:+e.attr("x2"),y:+e.attr("y2")};var b=o.x-s.x,_=o.y-s.y;if(c=(l=Math.atan2(_,b))+Math.PI,v&&y&&v+y>Math.sqrt(b*b+_*_))return void D();if(v){if(v*v>b*b+_*_)return void D();var x=v*Math.cos(l),w=v*Math.sin(l);s.x+=x,s.y+=w,e.attr({x2:s.x,y2:s.y})}if(y){if(y*y>b*b+_*_)return void D();var k=y*Math.cos(l),M=y*Math.sin(l);o.x-=k,o.y-=M,e.attr({x1:o.x,y1:o.y})}}else if("path"===u.nodeName){var T=u.getTotalLength(),C="";if(T<v+y)return void D();var S=u.getPointAtLength(0),L=u.getPointAtLength(.1);l=Math.atan2(S.y-L.y,S.x-L.x),o=u.getPointAtLength(Math.min(y,T)),C="0px,"+y+"px,";var A=u.getPointAtLength(T),E=u.getPointAtLength(T-.1);c=Math.atan2(A.y-E.y,A.x-E.x),s=u.getPointAtLength(Math.max(0,T-v)),C+=T-(C?y+v:v)+"px,"+T+"px",e.style("stroke-dasharray",C)}function D(){e.style("stroke-dasharray","0px,100px")}function I(t,i,o,s){t.path&&(t.noRotate&&(o=0),n.select(u.parentNode).append("path").attr({class:e.attr("class"),d:t.path,transform:"translate("+i.x+","+i.y+")"+(o?"rotate("+180*o/Math.PI+")":"")+"scale("+s+")"}).style({fill:a.rgb(r.arrowcolor),"stroke-width":0}))}m&&I(p,o,l,f),g&&I(d,s,c,h)}},{"../color":591,"./arrow_paths":573,d3:164}],582:[function(e,t,r){"use strict";var n=e("./draw"),a=e("./click");t.exports={moduleType:"component",name:"annotations",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("annotations"),calcAutorange:e("./calc_autorange"),draw:n.draw,drawOne:n.drawOne,drawRaw:n.drawRaw,hasClickToShow:a.hasClickToShow,onClick:a.onClick,convertCoords:e("./convert_coords")}},{"../../plots/cartesian/include_components":774,"./attributes":574,"./calc_autorange":575,"./click":576,"./convert_coords":578,"./defaults":579,"./draw":580}],583:[function(e,t,r){"use strict";var n=e("../annotations/attributes"),a=e("../../plot_api/edit_types").overrideAll,i=e("../../plot_api/plot_template").templatedArray;t.exports=a(i("annotation",{visible:n.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:n.xanchor,xshift:n.xshift,yanchor:n.yanchor,yshift:n.yshift,text:n.text,textangle:n.textangle,font:n.font,width:n.width,height:n.height,opacity:n.opacity,align:n.align,valign:n.valign,bgcolor:n.bgcolor,bordercolor:n.bordercolor,borderpad:n.borderpad,borderwidth:n.borderwidth,showarrow:n.showarrow,arrowcolor:n.arrowcolor,arrowhead:n.arrowhead,startarrowhead:n.startarrowhead,arrowside:n.arrowside,arrowsize:n.arrowsize,startarrowsize:n.startarrowsize,arrowwidth:n.arrowwidth,standoff:n.standoff,startstandoff:n.startstandoff,hovertext:n.hovertext,hoverlabel:n.hoverlabel,captureevents:n.captureevents}),"calc","from-root")},{"../../plot_api/edit_types":747,"../../plot_api/plot_template":754,"../annotations/attributes":574}],584:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes");function i(e,t){var r=t.fullSceneLayout.domain,i=t.fullLayout._size,o={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},n.extendFlat(e._xa,o),a.setConvert(e._xa),e._xa._offset=i.l+r.x[0]*i.w,e._xa.l2p=function(){return.5*(1+e._pdata[0]/e._pdata[3])*i.w*(r.x[1]-r.x[0])},e._ya={},n.extendFlat(e._ya,o),a.setConvert(e._ya),e._ya._offset=i.t+(1-r.y[1])*i.h,e._ya.l2p=function(){return.5*(1-e._pdata[1]/e._pdata[3])*i.h*(r.y[1]-r.y[0])}}t.exports=function(e){for(var t=e.fullSceneLayout.annotations,r=0;r<t.length;r++)i(t[r],e);e.fullLayout._infolayer.selectAll(".annotation-"+e.id).remove()}},{"../../lib":716,"../../plots/cartesian/axes":764}],585:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("../annotations/common_defaults"),s=e("./attributes");function l(e,t,r,i){function l(r,a){return n.coerce(e,t,s,r,a)}function c(e){var n=e+"axis",i={_fullLayout:{}};return i._fullLayout[n]=r[n],a.coercePosition(t,i,l,e,e,.5)}l("visible")&&(o(e,t,i.fullLayout,l),c("x"),c("y"),c("z"),n.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",l("xanchor"),l("yanchor"),l("xshift"),l("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",l("ax",-10),l("ay",-30),n.noneOrAll(e,t,["ax","ay"])))}t.exports=function(e,t,r){i(e,t,{name:"annotations",handleItemDefaults:l,fullLayout:r.fullLayout})}},{"../../lib":716,"../../plots/array_container_defaults":760,"../../plots/cartesian/axes":764,"../annotations/common_defaults":577,"./attributes":583}],586:[function(e,t,r){"use strict";var n=e("../annotations/draw").drawRaw,a=e("../../plots/gl3d/project"),i=["x","y","z"];t.exports=function(e){for(var t=e.fullSceneLayout,r=e.dataScale,o=t.annotations,s=0;s<o.length;s++){for(var l=o[s],c=!1,u=0;u<3;u++){var d=i[u],p=l[d],h=t[d+"axis"].r2fraction(p);if(h<0||h>1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=a(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*r[0],t.yaxis.r2l(l.y)*r[1],t.zaxis.r2l(l.z)*r[2]]),n(e.graphDiv,l,s,e.id,l._xa,l._ya))}}},{"../../plots/gl3d/project":813,"../annotations/draw":580}],587:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib");t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),includeBasePlot:function(e,t){var r=n.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,o=Object.keys(e),s=0;s<o.length;s++){var l=o[s];i.test(l)&&(e[l].annotations||[]).length&&(a.pushUnique(t._basePlotModules,r),a.pushUnique(t._subplots.gl3d,l))}},convert:e("./convert"),draw:e("./draw")}},{"../../lib":716,"../../registry":845,"./attributes":583,"./convert":584,"./defaults":585,"./draw":586}],588:[function(e,t,r){"use strict";t.exports=e("world-calendars/dist/main"),e("world-calendars/dist/plus"),e("world-calendars/dist/calendars/chinese"),e("world-calendars/dist/calendars/coptic"),e("world-calendars/dist/calendars/discworld"),e("world-calendars/dist/calendars/ethiopian"),e("world-calendars/dist/calendars/hebrew"),e("world-calendars/dist/calendars/islamic"),e("world-calendars/dist/calendars/julian"),e("world-calendars/dist/calendars/mayan"),e("world-calendars/dist/calendars/nanakshahi"),e("world-calendars/dist/calendars/nepali"),e("world-calendars/dist/calendars/persian"),e("world-calendars/dist/calendars/taiwan"),e("world-calendars/dist/calendars/thai"),e("world-calendars/dist/calendars/ummalqura")},{"world-calendars/dist/calendars/chinese":555,"world-calendars/dist/calendars/coptic":556,"world-calendars/dist/calendars/discworld":557,"world-calendars/dist/calendars/ethiopian":558,"world-calendars/dist/calendars/hebrew":559,"world-calendars/dist/calendars/islamic":560,"world-calendars/dist/calendars/julian":561,"world-calendars/dist/calendars/mayan":562,"world-calendars/dist/calendars/nanakshahi":563,"world-calendars/dist/calendars/nepali":564,"world-calendars/dist/calendars/persian":565,"world-calendars/dist/calendars/taiwan":566,"world-calendars/dist/calendars/thai":567,"world-calendars/dist/calendars/ummalqura":568,"world-calendars/dist/main":569,"world-calendars/dist/plus":570}],589:[function(e,t,r){"use strict";var n=e("./calendars"),a=e("../../lib"),i=e("../../constants/numerical"),o=i.EPOCHJD,s=i.ONEDAY,l={valType:"enumerated",values:Object.keys(n.calendars),editType:"calc",dflt:"gregorian"},c=function(e,t,r,n){var i={};return i[r]=l,a.coerce(e,t,i,r,n)},u="##",d={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},p={};function h(e){var t=p[e];return t||(t=p[e]=n.instance(e))}function f(e){return a.extendFlat({},l,{description:e})}function m(e){return"Sets the calendar system to use with `"+e+"` date data."}var g={xcalendar:f(m("x"))},v=a.extendFlat({},g,{ycalendar:f(m("y"))}),y=a.extendFlat({},v,{zcalendar:f(m("z"))}),b=f(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:v,bar:v,box:v,heatmap:v,contour:v,histogram:v,histogram2d:v,histogram2dcontour:v,scatter3d:y,surface:y,mesh3d:y,scattergl:v,ohlc:g,candlestick:g},layout:{calendar:f(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:b},yaxis:{calendar:b},scene:{xaxis:{calendar:b},yaxis:{calendar:b},zaxis:{calendar:b}},polar:{radialaxis:{calendar:b}}},transforms:{filter:{valuecalendar:f(["Sets the calendar system to use for `value`, if it is a date."].join(" ")),targetcalendar:f(["Sets the calendar system to use for `target`, if it is an","array of dates. If `target` is a string (eg *x*) we use the","corresponding trace attribute (eg `xcalendar`) if it exists,","even if `targetcalendar` is provided."].join(" "))}}},layoutAttributes:l,handleDefaults:c,handleTraceDefaults:function(e,t,r,n){for(var a=0;a<r.length;a++)c(e,t,r[a]+"calendar",n.calendar)},CANONICAL_SUNDAY:{chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},CANONICAL_TICK:{chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},DFLTRANGE:{chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},getCal:h,worldCalFmt:function(e,t,r){for(var n,a,i,l,c,p=Math.floor((t+.05)/s)+o,f=h(r).fromJD(p),m=0;-1!==(m=e.indexOf("%",m));)"0"===(n=e.charAt(m+1))||"-"===n||"_"===n?(i=3,a=e.charAt(m+2),"_"===n&&(n="-")):(a=n,n="0",i=2),(l=d[a])?(c=l===u?u:f.formatDate(l[n]),e=e.substr(0,m)+c+e.substr(m+i),m+=c.length):m+=i;return e}}},{"../../constants/numerical":692,"../../lib":716,"./calendars":588}],590:[function(e,t,r){"use strict";r.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],r.defaultLine="#444",r.lightLine="#eee",r.background="#fff",r.borderLine="#BEC8D9",r.lightFraction=1e3/11},{}],591:[function(e,t,r){"use strict";var n=e("tinycolor2"),a=e("fast-isnumeric"),i=t.exports={},o=e("./attributes");i.defaults=o.defaults;var s=i.defaultLine=o.defaultLine;i.lightLine=o.lightLine;var l=i.background=o.background;function c(e){if(a(e)||"string"!=typeof e)return e;var t=e.trim();if("rgb"!==t.substr(0,3))return e;var r=t.match(/^rgba?\s*\(([^()]*)\)$/);if(!r)return e;var n=r[1].trim().split(/\s*[\s,]\s*/),i="a"===t.charAt(3)&&4===n.length;if(!i&&3!==n.length)return e;for(var o=0;o<n.length;o++){if(!n[o].length)return e;if(n[o]=Number(n[o]),!(n[o]>=0))return e;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return e}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return i?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}i.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},i.rgb=function(e){return i.tinyRGB(n(e))},i.opacity=function(e){return e?n(e).getAlpha():0},i.addOpacity=function(e,t){var r=n(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"},i.combine=function(e,t){var r=n(e).toRgb();if(1===r.a)return n(e).toRgbString();var a=n(t||l).toRgb(),i=1===a.a?a:{r:255*(1-a.a)+a.r*a.a,g:255*(1-a.a)+a.g*a.a,b:255*(1-a.a)+a.b*a.a},o={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},i.contrast=function(e,t,r){var a=n(e);return 1!==a.getAlpha()&&(a=n(i.combine(e,l))),(a.isDark()?t?a.lighten(t):l:r?a.darken(r):s).toString()},i.stroke=function(e,t){var r=n(t);e.style({stroke:i.tinyRGB(r),"stroke-opacity":r.getAlpha()})},i.fill=function(e,t){var r=n(t);e.style({fill:i.tinyRGB(r),"fill-opacity":r.getAlpha()})},i.clean=function(e){if(e&&"object"==typeof e){var t,r,n,a,o=Object.keys(e);for(t=0;t<o.length;t++)if(a=e[n=o[t]],"color"===n.substr(n.length-5))if(Array.isArray(a))for(r=0;r<a.length;r++)a[r]=c(a[r]);else e[n]=c(a);else if("colorscale"===n.substr(n.length-10)&&Array.isArray(a))for(r=0;r<a.length;r++)Array.isArray(a[r])&&(a[r][1]=c(a[r][1]));else if(Array.isArray(a)){var s=a[0];if(!Array.isArray(s)&&s&&"object"==typeof s)for(r=0;r<a.length;r++)i.clean(a[r])}else a&&"object"==typeof a&&i.clean(a)}}},{"./attributes":590,"fast-isnumeric":227,tinycolor2:535}],592:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/layout_attributes"),a=e("../../plots/font_attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll;t.exports=o({thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",dflt:1.02,min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",dflt:.5,min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle"},ypad:{valType:"number",min:0,dflt:10},outlinecolor:n.linecolor,outlinewidth:n.linewidth,bordercolor:n.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:n.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:i({},n.ticks,{dflt:""}),ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,tickfont:a({}),tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,separatethousands:n.separatethousands,exponentformat:n.exponentformat,showexponent:n.showexponent,title:{text:{valType:"string"},font:a({}),side:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}},_deprecated:{title:{valType:"string"},titlefont:a({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},{"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/cartesian/layout_attributes":776,"../../plots/font_attributes":790}],593:[function(e,t,r){"use strict";t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},{}],594:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plot_api/plot_template"),i=e("../../plots/cartesian/tick_value_defaults"),o=e("../../plots/cartesian/tick_mark_defaults"),s=e("../../plots/cartesian/tick_label_defaults"),l=e("./attributes");t.exports=function(e,t,r){var c=a.newContainer(t,"colorbar"),u=e.colorbar||{};function d(e,t){return n.coerce(u,c,l,e,t)}var p=d("thicknessmode");d("thickness","fraction"===p?30/(r.width-r.margin.l-r.margin.r):30);var h=d("lenmode");d("len","fraction"===h?1:r.height-r.margin.t-r.margin.b),d("x"),d("xanchor"),d("xpad"),d("y"),d("yanchor"),d("ypad"),n.noneOrAll(u,c,["x","y"]),d("outlinecolor"),d("outlinewidth"),d("bordercolor"),d("borderwidth"),d("bgcolor"),i(u,c,d,"linear");var f={outerTicks:!1,font:r.font};s(u,c,d,"linear",f),o(u,c,d,"linear",f),d("title.text",r._dfltTitle.colorbar),n.coerceFont(d,"title.font",r.font),d("title.side")}},{"../../lib":716,"../../plot_api/plot_template":754,"../../plots/cartesian/tick_label_defaults":783,"../../plots/cartesian/tick_mark_defaults":784,"../../plots/cartesian/tick_value_defaults":785,"./attributes":592}],595:[function(e,t,r){"use strict";var n=e("d3"),a=e("tinycolor2"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../plots/cartesian/axes"),l=e("../dragelement"),c=e("../../lib"),u=e("../../lib/extend").extendFlat,d=e("../../lib/setcursor"),p=e("../drawing"),h=e("../color"),f=e("../titles"),m=e("../../lib/svg_text_utils"),g=e("../colorscale/helpers").flipScale,v=e("../../plots/cartesian/axis_defaults"),y=e("../../plots/cartesian/position_defaults"),b=e("../../plots/cartesian/layout_attributes"),_=e("../../constants/alignment"),x=_.LINE_SPACING,w=_.FROM_TL,k=_.FROM_BR,M=e("./constants").cn;t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(e){var t,r,n,a,i=e._fullLayout,o=e.calcdata,s=[];function l(e){return u(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof a.calc?a.calc(e,n,t):(t._fillgradient=r.reversescale?g(r.colorscale):r.colorscale,t._zrange=[r[a.min],r[a.max]])}for(var d=0;d<o.length;d++){var p=o[d],h=(n=p[0].trace)._module.colorbar;if(!0===n.visible&&h)for(var f=Array.isArray(h),m=f?h:[h],v=0;v<m.length;v++){var y=(a=m[v]).container;(r=y?n[y]:n)&&r.showscale&&((t=l(r.colorbar))._id="cb"+n.uid+(f&&y?"-"+y:""),t._traceIndex=n.index,t._propPrefix=(y?y+".":"")+"colorbar.",t._meta=n._meta,c(),s.push(t))}}for(var b in i._colorAxes)if((r=i[b]).showscale){var _=i._colorAxes[b];(t=l(r.colorbar))._id="cb"+b,t._propPrefix=b+".colorbar.",t._meta=i._meta,a={min:"cmin",max:"cmax"},"heatmap"!==_[0]&&(n=_[1],a.calc=n._module.colorbar.calc),c(),s.push(t)}return s}(e),(function(e){return e._id}));t.enter().append("g").attr("class",(function(e){return e._id})).classed(M.colorbar,!0),t.each((function(t){var r=n.select(this);c.ensureSingle(r,"rect",M.cbbg),c.ensureSingle(r,"g",M.cbfills),c.ensureSingle(r,"g",M.cblines),c.ensureSingle(r,"g",M.cbaxis,(function(e){e.classed(M.crisp,!0)})),c.ensureSingle(r,"g",M.cbtitleunshift,(function(e){e.append("g").classed(M.cbtitle,!0)})),c.ensureSingle(r,"rect",M.cboutline);var g=function(e,t,r){var o=r._fullLayout,l=o._size,d=t._fillcolor,g=t._line,_=t.title,T=_.side,C=t._zrange||n.extent(("function"==typeof d?d:g.color).domain()),S="function"==typeof g.color?g.color:function(){return g.color},L="function"==typeof d?d:function(){return d},A=t._levels,E=function(e,t,r){var n,a,i=t._levels,o=[],s=[],l=i.end+i.size/100,c=i.size,u=1.001*r[0]-.001*r[1],d=1.001*r[1]-.001*r[0];for(a=0;a<1e5&&(n=i.start+a*c,!(c>0?n>=l:n<=l));a++)n>u&&n<d&&o.push(n);if(t._fillgradient)s=[0];else if("function"==typeof t._fillcolor){var p=t._filllevels;if(p)for(l=p.end+p.size/100,c=p.size,a=0;a<1e5&&(n=p.start+a*c,!(c>0?n>=l:n<=l));a++)n>r[0]&&n<r[1]&&s.push(n);else(s=o.map((function(e){return e-i.size/2}))).push(s[s.length-1]+i.size)}else t._fillcolor&&"string"==typeof t._fillcolor&&(s=[0]);return i.size<0&&(o.reverse(),s.reverse()),{line:o,fill:s}}(0,t,C),D=E.fill,I=E.line,P=Math.round(t.thickness*("fraction"===t.thicknessmode?l.w:1)),O=P/l.w,R=Math.round(t.len*("fraction"===t.lenmode?l.h:1)),F=R/l.h,z=t.xpad/l.w,N=(t.borderwidth+t.outlinewidth)/2,j=t.ypad/l.h,B=Math.round(t.x*l.w+t.xpad),Y=t.x-O*({middle:.5,right:1}[t.xanchor]||0),H=t.y+F*(({top:-.5,bottom:.5}[t.yanchor]||0)-.5),V=Math.round(l.h*(1-H)),U=V-R;t._lenFrac=F,t._thickFrac=O,t._xLeftFrac=Y,t._yBottomFrac=H;var W=t._axis=function(e,t,r){var n=e._fullLayout,a={type:"linear",range:r,tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,exponentformat:t.exponentformat,separatethousands:t.separatethousands,showexponent:t.showexponent,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,title:t.title,showline:!0,anchor:"free",side:"right",position:1},i={type:"linear",_id:"y"+t._id},o={letter:"y",font:n.font,noHover:!0,noTickson:!0,calendar:n.calendar};function s(e,t){return c.coerce(a,i,b,e,t)}return v(a,i,s,o,n),y(a,i,s,o),i}(r,t,C);if(W.position=t.x+z+O,-1!==["top","bottom"].indexOf(T)&&(W.title.side=T,W.titlex=t.x+z,W.titley=H+("top"===_.side?F-j:j)),g.color&&"auto"===t.tickmode){W.tickmode="linear",W.tick0=A.start;var G=A.size,q=c.constrain((V-U)/50,4,15)+1,K=(C[1]-C[0])/((t.nticks||q)*G);if(K>1){var X=Math.pow(10,Math.floor(Math.log(K)/Math.LN10));G*=X*c.roundUp(K/X,[2,5,10]),(Math.abs(A.start)/A.size+1e-6)%1<2e-6&&(W.tick0=0)}W.dtick=G}W.domain=[H+j,H+F-j],W.setScale(),e.attr("transform","translate("+Math.round(l.l)+","+Math.round(l.t)+")");var Z,J=e.select("."+M.cbtitleunshift).attr("transform","translate(-"+Math.round(l.l)+",-"+Math.round(l.t)+")"),$=e.select("."+M.cbaxis),Q=0;function ee(n,a){var i={propContainer:W,propName:t._propPrefix+"title",traceIndex:t._traceIndex,_meta:t._meta,placeholder:o._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;e.selectAll("."+s+",."+s+"-math-group").remove(),f.draw(r,n,u(i,a||{}))}return c.syncOrAsync([i.previousPromises,function(){if(-1!==["top","bottom"].indexOf(T)){var e,r=l.l+(t.x+z)*l.w,n=W.title.font.size;e="top"===T?(1-(H+F-j))*l.h+l.t+3+.75*n:(1-(H+j))*l.h+l.t-3-.25*n,ee(W._id+"title",{attributes:{x:r,y:e,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(T)){var i=e.select("."+M.cbtitle),o=i.select("text"),u=[-t.outlinewidth/2,t.outlinewidth/2],d=i.select(".h"+W._id+"title-math-group").node(),h=15.6;if(o.node()&&(h=parseInt(o.node().style.fontSize,10)*x),d?(Q=p.bBox(d).height)>h&&(u[1]-=(Q-h)/2):o.node()&&!o.classed(M.jsPlaceholder)&&(Q=p.bBox(o.node()).height),Q){if(Q+=5,"top"===T)W.domain[1]-=Q/l.h,u[1]*=-1;else{W.domain[0]+=Q/l.h;var f=m.lineCount(o);u[1]+=(1-f)*h}i.attr("transform","translate("+u+")"),W.setScale()}}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform","translate(0,"+Math.round(l.h*(1-W.domain[1]))+")"),$.attr("transform","translate(0,"+Math.round(-l.t)+")");var v=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).data(D);v.enter().append("rect").classed(M.cbfill,!0).style("stroke","none"),v.exit().remove();var y=C.map(W.c2p).map(Math.round).sort((function(e,t){return e-t}));v.each((function(e,i){var o=[0===i?C[0]:(D[i]+D[i-1])/2,i===D.length-1?C[1]:(D[i]+D[i+1])/2].map(W.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,y[0],y[1]);var s=n.select(this).attr({x:B,width:Math.max(P,2),y:n.min(o),height:Math.max(n.max(o)-n.min(o),2)});if(t._fillgradient)p.gradient(s,r,t._id,"vertical",t._fillgradient,"fill");else{var l=L(e).replace("e-","");s.attr("fill",a(l).toHexString())}}));var b=e.select("."+M.cblines).selectAll("path."+M.cbline).data(g.color&&g.width?I:[]);b.enter().append("path").classed(M.cbline,!0),b.exit().remove(),b.each((function(e){n.select(this).attr("d","M"+B+","+(Math.round(W.c2p(e))+g.width/2%1)+"h"+P).call(p.lineGroupStyle,g.width,S(e),g.dash)})),$.selectAll("g."+W._id+"tick,path").remove();var _=B+P+(t.outlinewidth||0)/2-("outside"===t.ticks?1:0),w=s.calcTicks(W),k=s.makeTransFn(W),A=s.getTickSigns(W)[2];return s.drawTicks(r,W,{vals:"inside"===W.ticks?s.clipEnds(W,w):w,layer:$,path:s.makeTickPath(W,_,A),transFn:k}),s.drawLabels(r,W,{vals:w,layer:$,transFn:k,labelFns:s.makeLabelFns(W,_)})},function(){if(-1===["top","bottom"].indexOf(T)){var e=W.title.font.size,t=W._offset+W._length/2,a=l.l+(W.position||0)*l.w+("right"===W.side?10+e*(W.showticklabels?1:.5):-10-e*(W.showticklabels?.5:0));ee("h"+W._id+"title",{avoid:{selection:n.select(r).selectAll("g."+W._id+"tick"),side:T,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:a,y:t,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},i.previousPromises,function(){var n=P+t.outlinewidth/2+p.bBox($.node()).width;if((Z=J.select("text")).node()&&!Z.classed(M.jsPlaceholder)){var a,o=J.select(".h"+W._id+"title-math-group").node();a=o&&-1!==["top","bottom"].indexOf(T)?p.bBox(o).width:p.bBox(J.node()).right-B-l.l,n=Math.max(n,a)}var s=2*t.xpad+n+t.borderwidth+t.outlinewidth/2,c=V-U;e.select("."+M.cbbg).attr({x:B-t.xpad-(t.borderwidth+t.outlinewidth)/2,y:U-N,width:Math.max(s,2),height:Math.max(c+2*N,2)}).call(h.fill,t.bgcolor).call(h.stroke,t.bordercolor).style("stroke-width",t.borderwidth),e.selectAll("."+M.cboutline).attr({x:B,y:U+t.ypad+("top"===T?Q:0),width:Math.max(P,2),height:Math.max(c-2*t.ypad-Q,2)}).call(h.stroke,t.outlinecolor).style({fill:"none","stroke-width":t.outlinewidth});var u=({center:.5,right:1}[t.xanchor]||0)*s;e.attr("transform","translate("+(l.l-u)+","+l.t+")");var d={},f=w[t.yanchor],m=k[t.yanchor];"pixels"===t.lenmode?(d.y=t.y,d.t=c*f,d.b=c*m):(d.t=d.b=0,d.yt=t.y+t.len*f,d.yb=t.y-t.len*m);var g=w[t.xanchor],v=k[t.xanchor];if("pixels"===t.thicknessmode)d.x=t.x,d.l=s*g,d.r=s*v;else{var y=s-P;d.l=y*g,d.r=y*v,d.xl=t.x-t.thickness*g,d.xr=t.x+t.thickness*v}i.autoMargin(r,t._id,d)}],r)}(r,t,e);g&&g.then&&(e._promises||[]).push(g),e._context.edits.colorbarPosition&&function(e,t,r){var n,a,i,s=r._fullLayout._size;l.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),d(e)},moveFn:function(r,o){e.attr("transform",n+" translate("+r+","+o+")"),a=l.align(t._xLeftFrac+r/s.w,t._thickFrac,0,1,t.xanchor),i=l.align(t._yBottomFrac-o/s.h,t._lenFrac,0,1,t.yanchor);var c=l.getCursor(a,i,t.xanchor,t.yanchor);d(e,c)},doneFn:function(){if(d(e),void 0!==a&&void 0!==i){var n={};n[t._propPrefix+"x"]=a,n[t._propPrefix+"y"]=i,void 0!==t._traceIndex?o.call("_guiRestyle",r,n,t._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}},{"../../constants/alignment":685,"../../lib":716,"../../lib/extend":707,"../../lib/setcursor":736,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../plots/cartesian/axis_defaults":766,"../../plots/cartesian/layout_attributes":776,"../../plots/cartesian/position_defaults":779,"../../plots/plots":825,"../../registry":845,"../color":591,"../colorscale/helpers":602,"../dragelement":609,"../drawing":612,"../titles":678,"./constants":593,d3:164,tinycolor2:535}],596:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e){return n.isPlainObject(e.colorbar)}},{"../../lib":716}],597:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:e("./attributes"),supplyDefaults:e("./defaults"),draw:e("./draw").draw,hasColorbar:e("./has_colorbar")}},{"./attributes":592,"./defaults":594,"./draw":595,"./has_colorbar":596}],598:[function(e,t,r){"use strict";var n=e("../colorbar/attributes"),a=e("../../lib/regex").counter,i=e("./scales.js").scales;function o(e){return"`"+e+"`"}Object.keys(i),t.exports=function(e,t){e=e||"";var r,s=(t=t||{}).cLetter||"c",l=("onlyIfNumerical"in t?t.onlyIfNumerical:Boolean(e),"noScale"in t?t.noScale:"marker.line"===e),c="showScaleDflt"in t?t.showScaleDflt:"z"===s,u="string"==typeof t.colorscaleDflt?i[t.colorscaleDflt]:null,d=t.editTypeOverride||"",p=e?e+".":"";"colorAttr"in t?(r=t.colorAttr,t.colorAttr):o(p+(r={z:"z",c:"color"}[s]));var h=s+"auto",f=s+"min",m=s+"max",g=s+"mid",v=(o(p+h),o(p+f),o(p+m),{});v[f]=v[m]=void 0;var y={};y[h]=!1;var b={};return"color"===r&&(b.color={valType:"color",arrayOk:!0,editType:d||"style"},t.anim&&(b.color.anim=!0)),b[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},b[f]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},b[m]={valType:"number",dflt:null,editType:d||"plot",impliedEdits:y},b[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},b.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},b.autocolorscale={valType:"boolean",dflt:!1!==t.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},b.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(b.showscale={valType:"boolean",dflt:c,editType:"calc"},b.colorbar=n),t.noColorAxis||(b.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),b}},{"../../lib/regex":732,"../colorbar/attributes":592,"./scales.js":606}],599:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("./helpers").extractOpts;t.exports=function(e,t,r){var o,s=e._fullLayout,l=r.vals,c=r.containerStr,u=c?a.nestedProperty(t,c).get():t,d=i(u),p=!1!==d.auto,h=d.min,f=d.max,m=d.mid,g=function(){return a.aggNums(Math.min,null,l)},v=function(){return a.aggNums(Math.max,null,l)};void 0===h?h=g():p&&(h=u._colorAx&&n(h)?Math.min(h,g()):g()),void 0===f?f=v():p&&(f=u._colorAx&&n(f)?Math.max(f,v()):v()),p&&void 0!==m&&(f-m>m-h?h=m-(f-m):f-m<m-h&&(f=m+(m-h))),h===f&&(h-=.5,f+=.5),d._sync("min",h),d._sync("max",f),d.autocolorscale&&(o=h*f<0?s.colorscale.diverging:h>=0?s.colorscale.sequential:s.colorscale.sequentialminus,d._sync("colorscale",o))}},{"../../lib":716,"./helpers":602,"fast-isnumeric":227}],600:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./helpers").hasColorscale,i=e("./helpers").extractOpts;t.exports=function(e,t){function r(e,t){var r=e["_"+t];void 0!==r&&(e[t]=r)}function o(e,a){var o=a.container?n.nestedProperty(e,a.container).get():e;if(o)if(o.coloraxis)o._colorAx=t[o.coloraxis];else{var s=i(o),l=s.auto;(l||void 0===s.min)&&r(o,a.min),(l||void 0===s.max)&&r(o,a.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s<e.length;s++){var l=e[s],c=l._module.colorbar;if(c)if(Array.isArray(c))for(var u=0;u<c.length;u++)o(l,c[u]);else o(l,c);a(l,"marker.line")&&o(l,{container:"marker.line",min:"cmin",max:"cmax"})}for(var d in t._colorAxes)o(t[d],{min:"cmin",max:"cmax"})}},{"../../lib":716,"./helpers":602}],601:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../colorbar/has_colorbar"),o=e("../colorbar/defaults"),s=e("./scales").isValid,l=e("../../registry").traceIs;function c(e,t){var r=t.slice(0,t.length-1);return t?a.nestedProperty(e,r).get()||{}:e}t.exports=function e(t,r,u,d,p){var h=p.prefix,f=p.cLetter,m="_module"in r,g=c(t,h),v=c(r,h),y=c(r._template||{},h)||{},b=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,u,d,p)};if(m){var _=u._colorAxes||{},x=d(h+"coloraxis");if(x){var w=l(r,"contour")&&a.nestedProperty(r,"contours.coloring").get()||"heatmap",k=_[x];return void(k?(k[2].push(b),k[0]!==w&&(k[0]=!1,a.warn(["Ignoring coloraxis:",x,"setting","as it is linked to incompatible colorscales."].join(" ")))):_[x]=[w,r,[b]])}}var M=g[f+"min"],T=g[f+"max"],C=n(M)&&n(T)&&M<T;d(h+f+"auto",!C)?d(h+f+"mid"):(d(h+f+"min"),d(h+f+"max"));var S,L,A=g.colorscale,E=y.colorscale;void 0!==A&&(S=!s(A)),void 0!==E&&(S=!s(E)),d(h+"autocolorscale",S),d(h+"colorscale"),d(h+"reversescale"),"marker.line."!==h&&(h&&m&&(L=i(g)),d(h+"showscale",L)&&o(g,v,u))}},{"../../lib":716,"../../registry":845,"../colorbar/defaults":594,"../colorbar/has_colorbar":596,"./scales":606,"fast-isnumeric":227}],602:[function(e,t,r){"use strict";var n=e("d3"),a=e("tinycolor2"),i=e("fast-isnumeric"),o=e("../../lib"),s=e("../color"),l=e("./scales").isValid,c=["showscale","autocolorscale","colorscale","reversescale","colorbar"],u=["min","max","mid","auto"];function d(e){var t,r,n,a=e._colorAx,i=a||e,o={};for(r=0;r<c.length;r++)o[n=c[r]]=i[n];if(a)for(t="c",r=0;r<u.length;r++)o[n=u[r]]=i["c"+n];else{var s;for(r=0;r<u.length;r++)(s="c"+(n=u[r]))in i?o[n]=i[s]:(s="z"+n)in i&&(o[n]=i[s]);t=s.charAt(0)}return o._sync=function(e,r){var n=-1!==u.indexOf(e)?t+e:e;i[n]=i["_"+n]=r},o}function p(e){for(var t=d(e),r=t.min,n=t.max,a=t.reversescale?h(t.colorscale):t.colorscale,i=a.length,o=new Array(i),s=new Array(i),l=0;l<i;l++){var c=a[l];o[l]=r+c[0]*(n-r),s[l]=c[1]}return{domain:o,range:s}}function h(e){for(var t=e.length,r=new Array(t),n=t-1,a=0;n>=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function f(e,t){t=t||{};for(var r=e.domain,o=e.range,l=o.length,c=new Array(l),u=0;u<l;u++){var d=a(o[u]).toRgb();c[u]=[d.r,d.g,d.b,d.a]}var p,h=n.scale.linear().domain(r).range(c).clamp(!0),f=t.noNumericCheck,g=t.returnArray;return(p=f&&g?h:f?function(e){return m(h(e))}:g?function(e){return i(e)?h(e):a(e).isValid()?e:s.defaultLine}:function(e){return i(e)?m(h(e)):a(e).isValid()?e:s.defaultLine}).domain=h.domain,p.range=function(){return o},p}function m(e){var t={r:e[0],g:e[1],b:e[2],a:e[3]};return a(t).toRgbString()}t.exports={hasColorscale:function(e,t,r){var n=t?o.nestedProperty(e,t).get()||{}:e,a=n[r||"color"],s=!1;if(o.isArrayOrTypedArray(a))for(var c=0;c<a.length;c++)if(i(a[c])){s=!0;break}return o.isPlainObject(n)&&(s||!0===n.showscale||i(n.cmin)&&i(n.cmax)||l(n.colorscale)||o.isPlainObject(n.colorbar))},extractOpts:d,extractScale:p,flipScale:h,makeColorScaleFunc:f,makeColorScaleFuncFromTrace:function(e,t){return f(p(e),t)}}},{"../../lib":716,"../color":591,"./scales":606,d3:164,"fast-isnumeric":227,tinycolor2:535}],603:[function(e,t,r){"use strict";var n=e("./scales"),a=e("./helpers");t.exports={moduleType:"component",name:"colorscale",attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),handleDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc"),scales:n.scales,defaultScale:n.defaultScale,getScale:n.get,isValidScale:n.isValid,hasColorscale:a.hasColorscale,extractOpts:a.extractOpts,extractScale:a.extractScale,flipScale:a.flipScale,makeColorScaleFunc:a.makeColorScaleFunc,makeColorScaleFuncFromTrace:a.makeColorScaleFuncFromTrace}},{"./attributes":598,"./calc":599,"./cross_trace_defaults":600,"./defaults":601,"./helpers":602,"./layout_attributes":604,"./layout_defaults":605,"./scales":606}],604:[function(e,t,r){"use strict";var n=e("../../lib/extend").extendFlat,a=e("./attributes"),i=e("./scales").scales;t.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:i.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:i.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:i.RdBu,editType:"calc"}},coloraxis:n({_isSubplotObj:!0,editType:"calc"},a("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},{"../../lib/extend":707,"./attributes":598,"./scales":606}],605:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plot_api/plot_template"),i=e("./layout_attributes"),o=e("./defaults");t.exports=function(e,t){function r(r,a){return n.coerce(e,t,i,r,a)}r("colorscale.sequential"),r("colorscale.sequentialminus"),r("colorscale.diverging");var s,l,c=t._colorAxes;function u(e,t){return n.coerce(s,l,i.coloraxis,e,t)}for(var d in c){var p=c[d];if(p[0])s=e[d]||{},(l=a.newContainer(t,d,"coloraxis"))._name=d,o(s,l,t,u,{prefix:"",cLetter:"c"});else{for(var h=0;h<p[2].length;h++)p[2][h]();delete t._colorAxes[d]}}}},{"../../lib":716,"../../plot_api/plot_template":754,"./defaults":601,"./layout_attributes":604}],606:[function(e,t,r){"use strict";var n=e("tinycolor2"),a={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},i=a.RdBu;function o(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var r=0;r<e.length;r++){var a=e[r];if(2!==a.length||+a[0]<t||!n(a[1]).isValid())return!1;t=+a[0]}return!0}t.exports={scales:a,defaultScale:i,get:function(e,t){if(t||(t=i),!e)return t;function r(){try{e=a[e]||JSON.parse(e)}catch(r){e=t}}return"string"==typeof e&&(r(),"string"==typeof e&&r()),o(e)?e:t},isValid:function(e){return void 0!==a[e]||o(e)}}},{tinycolor2:535}],607:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){var i=(e-r)/(n-r),o=i+t/(n-r),s=(i+o)/2;return"left"===a||"bottom"===a?i:"center"===a||"middle"===a?s:"right"===a||"top"===a?o:i<2/3-s?i:o>4/3-s?o:s}},{}],608:[function(e,t,r){"use strict";var n=e("../../lib"),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,r,i){return e="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*e),0,2),t="bottom"===i?0:"middle"===i?1:"top"===i?2:n.constrain(Math.floor(3*t),0,2),a[t][e]}},{"../../lib":716}],609:[function(e,t,r){"use strict";var n=e("mouse-event-offset"),a=e("has-hover"),i=e("has-passive-events"),o=e("../../lib").removeElement,s=e("../../plots/cartesian/constants"),l=t.exports={};l.align=e("./align"),l.getCursor=e("./cursor");var c=e("./unhover");function u(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function d(e){return n(e.changedTouches?e.changedTouches[0]:e,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(e){var t,r,n,c,p,h,f,m,g=e.gd,v=1,y=g._context.doubleClickDelay,b=e.element;g._mouseDownTime||(g._mouseDownTime=0),b.style.pointerEvents="all",b.onmousedown=x,i?(b._ontouchstart&&b.removeEventListener("touchstart",b._ontouchstart),b._ontouchstart=x,b.addEventListener("touchstart",x,{passive:!1})):b.ontouchstart=x;var _=e.clampFn||function(e,t,r){return Math.abs(e)<r&&(e=0),Math.abs(t)<r&&(t=0),[e,t]};function x(i){g._dragged=!1,g._dragging=!0;var o=d(i);t=o[0],r=o[1],f=i.target,h=i,m=2===i.buttons||i.ctrlKey,void 0===i.clientX&&void 0===i.clientY&&(i.clientX=t,i.clientY=r),(n=(new Date).getTime())-g._mouseDownTime<y?v+=1:(v=1,g._mouseDownTime=n),e.prepFn&&e.prepFn(i,t,r),a&&!m?(p=u()).style.cursor=window.getComputedStyle(b).cursor:a||(p=document,c=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(b).cursor),document.addEventListener("mouseup",k),document.addEventListener("touchend",k),!1!==e.dragmode&&(i.preventDefault(),document.addEventListener("mousemove",w),document.addEventListener("touchmove",w,{passive:!1}))}function w(n){n.preventDefault();var a=d(n),i=e.minDrag||s.MINDRAG,o=_(a[0]-t,a[1]-r,i),c=o[0],u=o[1];(c||u)&&(g._dragged=!0,l.unhover(g)),g._dragged&&e.moveFn&&!m&&(g._dragdata={element:b,dx:c,dy:u},e.moveFn(c,u))}function k(t){if(delete g._dragdata,!1!==e.dragmode&&(t.preventDefault(),document.removeEventListener("mousemove",w),document.removeEventListener("touchmove",w)),document.removeEventListener("mouseup",k),document.removeEventListener("touchend",k),a?o(p):c&&(p.documentElement.style.cursor=c,c=null),g._dragging){if(g._dragging=!1,(new Date).getTime()-g._mouseDownTime>y&&(v=Math.max(v-1,1)),g._dragged)e.doneFn&&e.doneFn();else if(e.clickFn&&e.clickFn(v,h),!m){var r;try{r=new MouseEvent("click",t)}catch(e){var n=d(t);(r=document.createEvent("MouseEvents")).initMouseEvent("click",t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,n[0],n[1],t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget)}f.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=u},{"../../lib":716,"../../plots/cartesian/constants":770,"./align":607,"./cursor":608,"./unhover":610,"has-hover":411,"has-passive-events":412,"mouse-event-offset":437}],610:[function(e,t,r){"use strict";var n=e("../../lib/events"),a=e("../../lib/throttle"),i=e("../../lib/dom").getGraphDiv,o=e("../fx/constants"),s=t.exports={};s.wrapped=function(e,t,r){(e=i(e))._fullLayout&&a.clear(e._fullLayout._uid+o.HOVERID),s.raw(e,t,r)},s.raw=function(e,t){var r=e._fullLayout,a=e._hoverdata;t||(t={}),t.target&&!1===n.triggerHandler(e,"plotly_beforehover",t)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&a&&e.emit("plotly_unhover",{event:t,points:a}))}},{"../../lib/dom":705,"../../lib/events":706,"../../lib/throttle":741,"../fx/constants":624}],611:[function(e,t,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],612:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../../registry"),s=e("../color"),l=e("../colorscale"),c=e("../../lib"),u=e("../../lib/svg_text_utils"),d=e("../../constants/xmlns_namespaces"),p=e("../../constants/alignment").LINE_SPACING,h=e("../../constants/interactions").DESELECTDIM,f=e("../../traces/scatter/subtypes"),m=e("../../traces/scatter/make_bubble_size_func"),g=e("../../components/fx/helpers").appendArrayPointValue,v=t.exports={};v.font=function(e,t,r,n){c.isPlainObject(t)&&(n=t.color,r=t.size,t=t.family),t&&e.style("font-family",t),r+1&&e.style("font-size",r+"px"),n&&e.call(s.fill,n)},v.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)},v.setSize=function(e,t,r){e.attr("width",t).attr("height",r)},v.setRect=function(e,t,r,n,a){e.call(v.setPosition,t,r).call(v.setSize,n,a)},v.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),o=n.c2p(e.y);return!!(a(i)&&a(o)&&t.node())&&("text"===t.node().nodeName?t.attr("x",i).attr("y",o):t.attr("transform","translate("+i+","+o+")"),!0)},v.translatePoints=function(e,t,r){e.each((function(e){var a=n.select(this);v.translatePoint(e,a,t,r)}))},v.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")},v.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,a=t.yaxis;e.each((function(t){var i=t[0].trace,s=i.xcalendar,l=i.ycalendar,c=o.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(c).each((function(e){v.hideOutsideRangePoint(e,n.select(this),r,a,s,l)}))}))}},v.crispRound=function(e,t,r){return t&&a(t)?e._context.staticPlot?t:t<1?1:Math.round(t):r||0},v.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,l=a||i.dash||"";s.stroke(t,n||i.color),v.dashLine(t,l,o)},v.lineGroupStyle=function(e,t,r,a){e.style("fill","none").each((function(e){var i=(((e||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,l=a||i.dash||"";n.select(this).call(s.stroke,r||i.color).call(v.dashLine,l,o)}))},v.dashLine=function(e,t,r){r=+r||0,t=v.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})},v.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return"solid"===e?e="":"dot"===e?e=r+"px,"+r+"px":"dash"===e?e=3*r+"px,"+3*r+"px":"longdash"===e?e=5*r+"px,"+5*r+"px":"dashdot"===e?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===e&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e},v.singleFillStyle=function(e){var t=(((n.select(e.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;t&&e.call(s.fill,t)},v.fillGroupStyle=function(e){e.style("stroke-width",0).each((function(e){var t=n.select(this);e[0].trace&&t.call(s.fill,e[0].trace.fillcolor)}))};var y=e("./symbol_defs");v.symbolNames=[],v.symbolFuncs=[],v.symbolNeedLines={},v.symbolNoDot={},v.symbolNoFill={},v.symbolList=[],Object.keys(y).forEach((function(e){var t=y[e];v.symbolList=v.symbolList.concat([t.n,e,t.n+100,e+"-open"]),v.symbolNames[t.n]=e,v.symbolFuncs[t.n]=t.f,t.needLine&&(v.symbolNeedLines[t.n]=!0),t.noDot?v.symbolNoDot[t.n]=!0:v.symbolList=v.symbolList.concat([t.n+200,e+"-dot",t.n+300,e+"-open-dot"]),t.noFill&&(v.symbolNoFill[t.n]=!0)}));var b=v.symbolNames.length,_="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";function x(e,t){var r=e%100;return v.symbolFuncs[r](t)+(e>=200?_:"")}v.symbolNumber=function(e){if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=v.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=b||e>=400?0:Math.floor(Math.max(e,0))};var w={x1:1,x2:0,y1:0,y2:0},k={x1:0,x2:0,y1:1,y2:0},M=n.format("~.1f"),T={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:w},horizontalreversed:{node:"linearGradient",attrs:w,reversed:!0},vertical:{node:"linearGradient",attrs:k},verticalreversed:{node:"linearGradient",attrs:k,reversed:!0}};v.gradient=function(e,t,r,a,o,l){for(var u=o.length,d=T[a],p=new Array(u),h=0;h<u;h++)d.reversed?p[u-1-h]=[M(100*(1-o[h][0])),o[h][1]]:p[h]=[M(100*o[h][0]),o[h][1]];var f="g"+t._fullLayout._uid+"-"+r,m=t._fullLayout._defs.select(".gradients").selectAll("#"+f).data([a+p.join(";")],c.identity);m.exit().remove(),m.enter().append(d.node).each((function(){var e=n.select(this);d.attrs&&e.attr(d.attrs),e.attr("id",f);var t=e.selectAll("stop").data(p);t.exit().remove(),t.enter().append("stop"),t.each((function(e){var t=i(e[1]);n.select(this).attr({offset:e[0]+"%","stop-color":s.tinyRGB(t),"stop-opacity":t.getAlpha()})}))})),e.style(l,R(f,t)).style(l+"-opacity",null)},v.initGradients=function(e){c.ensureSingle(e._fullLayout._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove()},v.pointStyle=function(e,t,r){if(e.size()){var a=v.makePointStyleFns(t);e.each((function(e){v.singlePointStyle(e,n.select(this),t,a,r)}))}},v.singlePointStyle=function(e,t,r,n,a){var i=r.marker,o=i.line;if(t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?i.opacity:e.mo),n.ms2mrc){var l;l="various"===e.ms||"various"===i.size?3:n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=v.symbolNumber(e.mx||i.symbol)||0;e.om=u%200>=100,t.attr("d",x(u,l))}var d,p,h,f=!1;if(e.so)h=o.outlierwidth,p=o.outliercolor,d=i.outliercolor;else{var m=(o||{}).width;h=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in e?e.mlcc=n.lineScale(e.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(i.color)&&(d=s.defaultLine,f=!0),d="mc"in e?e.mcc=n.markerScale(e.mc):i.color||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}if(e.om)t.call(s.stroke,d).style({"stroke-width":(h||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:h)+"px");var g=i.gradient,y=e.mgt;if(y?f=!0:y=g&&g.type,Array.isArray(y)&&(y=y[0],T[y]||(y=0)),y&&"none"!==y){var b=e.mgc;b?f=!0:b=g.color;var _=r.uid;f&&(_+="-"+e.i),v.gradient(t,a,_,y,[[0,b],[1,d]],"fill")}else s.fill(t,d);h&&s.stroke(t,p)}},v.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=v.tryColorscale(r,""),t.lineScale=v.tryColorscale(r,"line"),o.traceIs(e,"symbols")&&(t.ms2mrc=f.isBubble(e)?m(e):function(){return(r.size||6)/2}),e.selectedpoints&&c.extendFlat(t,v.makeSelectedPointStyleFns(e)),t},v.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},i=r.marker||{},s=n.marker||{},l=a.opacity,u=i.opacity,d=s.opacity,p=void 0!==u,f=void 0!==d;(c.isArrayOrTypedArray(l)||p||f)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?a.opacity:e.mo;return e.selected?p?u:t:f?d:h*t});var m=a.color,g=i.color,v=s.color;(g||v)&&(t.selectedColorFn=function(e){var t=e.mcc||m;return e.selected?g||t:v||t});var y=a.size,b=i.size,_=s.size,x=void 0!==b,w=void 0!==_;return o.traceIs(e,"symbols")&&(x||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?x?b/2:t:w?_/2:t}),t},v.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},l=a.color,c=i.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||l;return e.selected?c||t:u||(c?t:s.addOpacity(t,h))},t},v.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=v.makeSelectedPointStyleFns(t),a=t.marker||{},i=[];r.selectedOpacityFn&&i.push((function(e,t){e.style("opacity",r.selectedOpacityFn(t))})),r.selectedColorFn&&i.push((function(e,t){s.fill(e,r.selectedColorFn(t))})),r.selectedSizeFn&&i.push((function(e,t){var n=t.mx||a.symbol||0,i=r.selectedSizeFn(t);e.attr("d",x(v.symbolNumber(n),i)),t.mrc2=i})),i.length&&e.each((function(e){for(var t=n.select(this),r=0;r<i.length;r++)i[r](t,e)}))}},v.tryColorscale=function(e,t){var r=t?c.nestedProperty(e,t).get():e;if(r){var n=r.color;if((r.colorscale||r._colorAx)&&c.isArrayOrTypedArray(n))return l.makeColorScaleFuncFromTrace(r)}return c.identity};var C={start:1,end:-1,middle:0,bottom:1,top:-1};function S(e,t,r,a){var i=n.select(e.node().parentNode),o=-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle",s=-1!==t.indexOf("left")?"end":-1!==t.indexOf("right")?"start":"middle",l=a?a/.8+1:0,c=(u.lineCount(e)-1)*p+1,d=C[s]*l,h=.75*r+C[o]*l+(C[o]-1)*c*r/2;e.attr("text-anchor",s),i.attr("transform","translate("+d+","+h+")")}function L(e,t){var r=e.ts||t.textfont.size;return a(r)&&r>0?r:0}v.textPointStyle=function(e,t,r){if(e.size()){var a;if(t.selectedpoints){var i=v.makeSelectedTextStyleFns(t);a=i.selectedTextColorFn}var o=t.texttemplate,s=r._fullLayout;e.each((function(e){var i=n.select(this),l=o?c.extractOption(e,t,"txt","texttemplate"):c.extractOption(e,t,"tx","text");if(l||0===l){if(o){var d=t._module.formatLabels?t._module.formatLabels(e,t,s):{},p={};g(p,t,e.i);var h=t._meta||{};l=c.texttemplateString(l,d,s._d3locale,p,e,h)}var f=e.tp||t.textposition,m=L(e,t),y=a?a(e):e.tc||t.textfont.color;i.call(v.font,e.tf||t.textfont.family,m,y).text(l).call(u.convertToTspans,r).call(S,f,m,e.mrc)}else i.remove()}))}},v.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var r=v.makeSelectedTextStyleFns(t);e.each((function(e){var a=n.select(this),i=r.selectedTextColorFn(e),o=e.tp||t.textposition,l=L(e,t);s.fill(a,i),S(a,o,l,e.mrc2||e.mrc)}))}};var A=.5;function E(e,t,r,a){var i=e[0]-t[0],o=e[1]-t[1],s=r[0]-t[0],l=r[1]-t[1],c=Math.pow(i*i+o*o,A/2),u=Math.pow(s*s+l*l,A/2),d=(u*u*i-c*c*s)*a,p=(u*u*o-c*c*l)*a,h=3*u*(c+u),f=3*c*(c+u);return[[n.round(t[0]+(h&&d/h),2),n.round(t[1]+(h&&p/h),2)],[n.round(t[0]-(f&&d/f),2),n.round(t[1]-(f&&p/f),2)]]}v.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],a=[];for(r=1;r<e.length-1;r++)a.push(E(e[r-1],e[r],e[r+1],t));for(n+="Q"+a[0][0]+" "+e[1],r=2;r<e.length-1;r++)n+="C"+a[r-2][1]+" "+a[r-1][0]+" "+e[r];return n+="Q"+a[e.length-3][1]+" "+e[e.length-1]},v.smoothclosed=function(e,t){if(e.length<3)return"M"+e.join("L")+"Z";var r,n="M"+e[0],a=e.length-1,i=[E(e[a],e[0],e[1],t)];for(r=1;r<a;r++)i.push(E(e[r-1],e[r],e[r+1],t));for(i.push(E(e[a-1],e[a],e[0],t)),r=1;r<=a;r++)n+="C"+i[r-1][1]+" "+i[r][0]+" "+e[r];return n+="C"+i[a][1]+" "+i[0][0]+" "+e[0]+"Z"};var D={hv:function(e,t){return"H"+n.round(t[0],2)+"V"+n.round(t[1],2)},vh:function(e,t){return"V"+n.round(t[1],2)+"H"+n.round(t[0],2)},hvh:function(e,t){return"H"+n.round((e[0]+t[0])/2,2)+"V"+n.round(t[1],2)+"H"+n.round(t[0],2)},vhv:function(e,t){return"V"+n.round((e[1]+t[1])/2,2)+"H"+n.round(t[0],2)+"V"+n.round(t[1],2)}},I=function(e,t){return"L"+n.round(t[0],2)+","+n.round(t[1],2)};v.steps=function(e){var t=D[e]||I;return function(e){for(var r="M"+n.round(e[0][0],2)+","+n.round(e[0][1],2),a=1;a<e.length;a++)r+=t(e[a-1],e[a]);return r}},v.makeTester=function(){var e=c.ensureSingleById(n.select("body"),"svg","js-plotly-tester",(function(e){e.attr(d.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})})),t=c.ensureSingle(e,"path","js-reference-point",(function(e){e.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})}));v.tester=e,v.testref=t},v.savedBBoxes={};var P=0;function O(e){var t=e.getAttribute("data-unformatted");if(null!==t)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}function R(e,t){if(!e)return null;var r=t._context;return"url('"+(r._exportedPlot?"":r._baseUrl||"")+"#"+e+"')"}v.bBox=function(e,t,r){var a,i,o;if(r||(r=O(e)),r){if(a=v.savedBBoxes[r])return c.extendFlat({},a)}else if(1===e.childNodes.length){var s=e.childNodes[0];if(r=O(s)){var l=+s.getAttribute("x")||0,d=+s.getAttribute("y")||0,p=s.getAttribute("transform");if(!p){var h=v.bBox(s,!1,r);return l&&(h.left+=l,h.right+=l),d&&(h.top+=d,h.bottom+=d),h}if(r+="~"+l+"~"+d+"~"+p,a=v.savedBBoxes[r])return c.extendFlat({},a)}}t?i=e:(o=v.tester.node(),i=e.cloneNode(!0),o.appendChild(i)),n.select(i).attr("transform",null).call(u.positionText,0,0);var f=i.getBoundingClientRect(),m=v.testref.node().getBoundingClientRect();t||o.removeChild(i);var g={height:f.height,width:f.width,left:f.left-m.left,top:f.top-m.top,right:f.right-m.left,bottom:f.bottom-m.top};return P>=1e4&&(v.savedBBoxes={},P=0),r&&(v.savedBBoxes[r]=g),P++,c.extendFlat({},g)},v.setClipUrl=function(e,t,r){e.attr("clip-path",R(t,r))},v.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},v.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||0,r=r||0,i=i.replace(/(\btranslate\(.*?\);?)/,"").trim(),i=(i+=" translate("+t+", "+r+")").trim(),e[a]("transform",i),i},v.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},v.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",i=e[n]("transform")||"";return t=t||1,r=r||1,i=i.replace(/(\bscale\(.*?\);?)/,"").trim(),i=(i+=" scale("+t+", "+r+")").trim(),e[a]("transform",i),i};var F=/\s*sc.*/;v.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":" scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(F,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var z=/translate\([^)]*\)\s*$/;v.setTextPointsScale=function(e,t,r){e&&e.each((function(){var e,a=n.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),s=parseFloat(i.attr("y")||0),l=(a.attr("transform")||"").match(z);e=1===t&&1===r?[]:["translate("+o+","+s+")","scale("+t+","+r+")","translate("+-o+","+-s+")"],l&&e.push(l),a.attr("transform",e.join(" "))}}))}},{"../../components/fx/helpers":626,"../../constants/alignment":685,"../../constants/interactions":691,"../../constants/xmlns_namespaces":693,"../../lib":716,"../../lib/svg_text_utils":740,"../../registry":845,"../../traces/scatter/make_bubble_size_func":1135,"../../traces/scatter/subtypes":1142,"../color":591,"../colorscale":603,"./symbol_defs":613,d3:164,"fast-isnumeric":227,tinycolor2:535}],613:[function(e,t,r){"use strict";var n=e("d3");t.exports={circle:{n:0,f:function(e){var t=n.round(e,2);return"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"}},square:{n:1,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"}},diamond:{n:2,f:function(e){var t=n.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"Z"}},cross:{n:3,f:function(e){var t=n.round(.4*e,2),r=n.round(1.2*e,2);return"M"+r+","+t+"H"+t+"V"+r+"H-"+t+"V"+t+"H-"+r+"V-"+t+"H-"+t+"V-"+r+"H"+t+"V-"+t+"H"+r+"Z"}},x:{n:4,f:function(e){var t=n.round(.8*e/Math.sqrt(2),2),r="l"+t+","+t,a="l"+t+",-"+t,i="l-"+t+",-"+t,o="l-"+t+","+t;return"M0,"+t+r+a+i+a+i+o+i+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+t+","+n.round(e/2,2)+"H"+t+"L0,-"+n.round(e,2)+"Z"}},"triangle-down":{n:6,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+t+",-"+n.round(e/2,2)+"H"+t+"L0,"+n.round(e,2)+"Z"}},"triangle-left":{n:7,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M"+n.round(e/2,2)+",-"+t+"V"+t+"L-"+n.round(e,2)+",0Z"}},"triangle-right":{n:8,f:function(e){var t=n.round(2*e/Math.sqrt(3),2);return"M-"+n.round(e/2,2)+",-"+t+"V"+t+"L"+n.round(e,2)+",0Z"}},"triangle-ne":{n:9,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M-"+r+",-"+t+"H"+t+"V"+r+"Z"}},"triangle-se":{n:10,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M"+t+",-"+r+"V"+t+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M"+r+","+t+"H-"+t+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(e){var t=n.round(.6*e,2),r=n.round(1.2*e,2);return"M-"+t+","+r+"V-"+t+"H"+r+"Z"}},pentagon:{n:13,f:function(e){var t=n.round(.951*e,2),r=n.round(.588*e,2),a=n.round(-e,2),i=n.round(-.309*e,2);return"M"+t+","+i+"L"+r+","+n.round(.809*e,2)+"H-"+r+"L-"+t+","+i+"L0,"+a+"Z"}},hexagon:{n:14,f:function(e){var t=n.round(e,2),r=n.round(e/2,2),a=n.round(e*Math.sqrt(3)/2,2);return"M"+a+",-"+r+"V"+r+"L0,"+t+"L-"+a+","+r+"V-"+r+"L0,-"+t+"Z"}},hexagon2:{n:15,f:function(e){var t=n.round(e,2),r=n.round(e/2,2),a=n.round(e*Math.sqrt(3)/2,2);return"M-"+r+","+a+"H"+r+"L"+t+",0L"+r+",-"+a+"H-"+r+"L-"+t+",0Z"}},octagon:{n:16,f:function(e){var t=n.round(.924*e,2),r=n.round(.383*e,2);return"M-"+r+",-"+t+"H"+r+"L"+t+",-"+r+"V"+r+"L"+r+","+t+"H-"+r+"L-"+t+","+r+"V-"+r+"Z"}},star:{n:17,f:function(e){var t=1.4*e,r=n.round(.225*t,2),a=n.round(.951*t,2),i=n.round(.363*t,2),o=n.round(.588*t,2),s=n.round(-t,2),l=n.round(-.309*t,2),c=n.round(.118*t,2),u=n.round(.809*t,2);return"M"+r+","+l+"H"+a+"L"+i+","+c+"L"+o+","+u+"L0,"+n.round(.382*t,2)+"L-"+o+","+u+"L-"+i+","+c+"L-"+a+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(e){var t=n.round(.66*e,2),r=n.round(.38*e,2),a=n.round(.76*e,2);return"M-"+a+",0l-"+r+",-"+t+"h"+a+"l"+r+",-"+t+"l"+r+","+t+"h"+a+"l-"+r+","+t+"l"+r+","+t+"h-"+a+"l-"+r+","+t+"l-"+r+",-"+t+"h-"+a+"Z"}},"star-triangle-up":{n:19,f:function(e){var t=n.round(e*Math.sqrt(3)*.8,2),r=n.round(.8*e,2),a=n.round(1.6*e,2),i=n.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M-"+t+","+r+o+t+","+r+o+"0,-"+a+o+"-"+t+","+r+"Z"}},"star-triangle-down":{n:20,f:function(e){var t=n.round(e*Math.sqrt(3)*.8,2),r=n.round(.8*e,2),a=n.round(1.6*e,2),i=n.round(4*e,2),o="A "+i+","+i+" 0 0 1 ";return"M"+t+",-"+r+o+"-"+t+",-"+r+o+"0,"+a+o+t+",-"+r+"Z"}},"star-square":{n:21,f:function(e){var t=n.round(1.1*e,2),r=n.round(2*e,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+t+",-"+t+a+"-"+t+","+t+a+t+","+t+a+t+",-"+t+a+"-"+t+",-"+t+"Z"}},"star-diamond":{n:22,f:function(e){var t=n.round(1.4*e,2),r=n.round(1.9*e,2),a="A "+r+","+r+" 0 0 1 ";return"M-"+t+",0"+a+"0,"+t+a+t+",0"+a+"0,-"+t+a+"-"+t+",0Z"}},"diamond-tall":{n:23,f:function(e){var t=n.round(.7*e,2),r=n.round(1.4*e,2);return"M0,"+r+"L"+t+",0L0,-"+r+"L-"+t+",0Z"}},"diamond-wide":{n:24,f:function(e){var t=n.round(1.4*e,2),r=n.round(.7*e,2);return"M0,"+r+"L"+t+",0L0,-"+r+"L-"+t+",0Z"}},hourglass:{n:25,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"H-"+t+"L"+t+",-"+t+"H-"+t+"Z"},noDot:!0},bowtie:{n:26,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"V-"+t+"L-"+t+","+t+"V-"+t+"Z"},noDot:!0},"circle-cross":{n:27,f:function(e){var t=n.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e){var t=n.round(e,2),r=n.round(e/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+t+",0A"+t+","+t+" 0 1,1 0,-"+t+"A"+t+","+t+" 0 0,1 "+t+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e){var t=n.round(e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t+"M"+t+","+t+"H-"+t+"V-"+t+"H"+t+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e){var t=n.round(1.3*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM0,-"+t+"V"+t+"M-"+t+",0H"+t},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e){var t=n.round(1.3*e,2),r=n.round(.65*e,2);return"M"+t+",0L0,"+t+"L-"+t+",0L0,-"+t+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e){var t=n.round(1.4*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t+"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e){var t=n.round(1.2*e,2),r=n.round(.85*e,2);return"M0,"+t+"V-"+t+"M"+t+",0H-"+t+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e){var t=n.round(e/2,2),r=n.round(e,2);return"M"+t+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+t+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+t+","+a+"L0,0M"+t+","+a+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+t+",-"+a+"L0,0M"+t+",-"+a+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M"+a+","+t+"L0,0M"+a+",-"+t+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e){var t=n.round(1.2*e,2),r=n.round(1.6*e,2),a=n.round(.8*e,2);return"M-"+a+","+t+"L0,0M-"+a+",-"+t+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e){var t=n.round(1.4*e,2);return"M"+t+",0H-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e){var t=n.round(1.4*e,2);return"M0,"+t+"V-"+t},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e){var t=n.round(e,2);return"M"+t+",-"+t+"L-"+t+","+t},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e){var t=n.round(e,2);return"M"+t+","+t+"L-"+t+",-"+t},needLine:!0,noDot:!0,noFill:!0}}},{d3:164}],614:[function(e,t,r){"use strict";t.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},{}],615:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../registry"),i=e("../../plots/cartesian/axes"),o=e("../../lib"),s=e("./compute_error");function l(e,t,r,a){var l=t["error_"+a]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),d=0;d<e.length;d++){var p=e[d],h=p.i;if(void 0===h)h=d;else if(null===h)continue;var f=p[a];if(n(r.c2l(f))){var m=u(f,h);if(n(m[0])&&n(m[1])){var g=p[a+"s"]=f-m[0],v=p[a+"h"]=f+m[1];c.push(g,v)}}}var y=r._id,b=t._extremes[y],_=i.findExtremes(r,c,o.extendFlat({tozero:b.opts.tozero},{padded:!0}));b.min=b.min.concat(_.min),b.max=b.max.concat(_.max)}}t.exports=function(e){for(var t=e.calcdata,r=0;r<t.length;r++){var n=t[r],o=n[0].trace;if(!0===o.visible&&a.traceIs(o,"errorBarsOK")){var s=i.getFromId(e,o.xaxis),c=i.getFromId(e,o.yaxis);l(n,o,s,"x"),l(n,o,c,"y")}}}},{"../../lib":716,"../../plots/cartesian/axes":764,"../../registry":845,"./compute_error":616,"fast-isnumeric":227}],616:[function(e,t,r){"use strict";function n(e,t){return"percent"===e?function(e){return Math.abs(e*t/100)}:"constant"===e?function(){return Math.abs(t)}:"sqrt"===e?function(e){return Math.sqrt(Math.abs(e))}:void 0}t.exports=function(e){var t=e.type,r=e.symmetric;if("data"===t){var a=e.array||[];if(r)return function(e,t){var r=+a[t];return[r,r]};var i=e.arrayminus||[];return function(e,t){var r=+a[t],n=+i[t];return isNaN(r)&&isNaN(n)?[NaN,NaN]:[n||0,r||0]}}var o=n(t,e.value),s=n(t,e.valueminus);return r||void 0===e.valueminus?function(e){var t=o(e);return[t,t]}:function(e){return[s(e),o(e)]}}},{}],617:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../registry"),i=e("../../lib"),o=e("../../plot_api/plot_template"),s=e("./attributes");t.exports=function(e,t,r,l){var c="error_"+l.axis,u=o.newContainer(t,c),d=e[c]||{};function p(e,t){return i.coerce(d,u,s,e,t)}if(!1!==p("visible",void 0!==d.array||void 0!==d.value||"sqrt"===d.type)){var h=p("type","array"in d?"data":"percent"),f=!0;"sqrt"!==h&&(f=p("symmetric",!(("data"===h?"arrayminus":"valueminus")in d))),"data"===h?(p("array"),p("traceref"),f||(p("arrayminus"),p("tracerefminus"))):"percent"!==h&&"constant"!==h||(p("value"),f||p("valueminus"));var m="copy_"+l.inherit+"style";l.inherit&&(t["error_"+l.inherit]||{}).visible&&p(m,!(d.color||n(d.thickness)||n(d.width))),l.inherit&&u[m]||(p("color",r),p("thickness"),p("width",a.traceIs(t,"gl3d")?0:4))}}},{"../../lib":716,"../../plot_api/plot_template":754,"../../registry":845,"./attributes":614,"fast-isnumeric":227}],618:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plot_api/edit_types").overrideAll,i=e("./attributes"),o={error_x:n.extendFlat({},i),error_y:n.extendFlat({},i)};delete o.error_x.copy_zstyle,delete o.error_y.copy_zstyle,delete o.error_y.copy_ystyle;var s={error_x:n.extendFlat({},i),error_y:n.extendFlat({},i),error_z:n.extendFlat({},i)};delete s.error_x.copy_ystyle,delete s.error_y.copy_ystyle,delete s.error_z.copy_ystyle,delete s.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:o,bar:o,histogram:o,scatter3d:a(s,"calc","nested"),scattergl:a(o,"calc","nested")}},supplyDefaults:e("./defaults"),calc:e("./calc"),makeComputeError:e("./compute_error"),plot:e("./plot"),style:e("./style"),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}},{"../../lib":716,"../../plot_api/edit_types":747,"./attributes":614,"./calc":615,"./compute_error":616,"./defaults":617,"./plot":619,"./style":620}],619:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../drawing"),o=e("../../traces/scatter/subtypes");t.exports=function(e,t,r,s){var l=r.xaxis,c=r.yaxis,u=s&&s.duration>0;t.each((function(t){var d,p=t[0].trace,h=p.error_x||{},f=p.error_y||{};p.ids&&(d=function(e){return e.id});var m=o.hasMarkers(p)&&p.marker.maxdisplayed>0;f.visible||h.visible||(t=[]);var g=n.select(this).selectAll("g.errorbar").data(t,d);if(g.exit().remove(),t.length){h.visible||g.selectAll("path.xerror").remove(),f.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var v=g.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(g,r.layerClipId,e),g.each((function(e){var t=n.select(this),r=function(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),a(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),a(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}(e,l,c);if(!m||e.vis){var i,o=t.select("path.yerror");if(f.visible&&a(r.x)&&a(r.yh)&&a(r.ys)){var d=f.width;i="M"+(r.x-d)+","+r.yh+"h"+2*d+"m-"+d+",0V"+r.ys,r.noYS||(i+="m-"+d+",0h"+2*d),o.size()?u&&(o=o.transition().duration(s.duration).ease(s.easing)):o=t.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),o.attr("d",i)}else o.remove();var p=t.select("path.xerror");if(h.visible&&a(r.y)&&a(r.xh)&&a(r.xs)){var g=(h.copy_ystyle?f:h).width;i="M"+r.xh+","+(r.y-g)+"v"+2*g+"m0,-"+g+"H"+r.xs,r.noXS||(i+="m0,-"+g+"v"+2*g),p.size()?u&&(p=p.transition().duration(s.duration).ease(s.easing)):p=t.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),p.attr("d",i)}else p.remove()}}))}}))}},{"../../traces/scatter/subtypes":1142,"../drawing":612,d3:164,"fast-isnumeric":227}],620:[function(e,t,r){"use strict";var n=e("d3"),a=e("../color");t.exports=function(e){e.each((function(e){var t=e[0].trace,r=t.error_y||{},i=t.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(a.stroke,r.color),i.copy_ystyle&&(i=r),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(a.stroke,i.color)}))}},{"../color":591,d3:164}],621:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("./layout_attributes").hoverlabel,i=e("../../lib/extend").extendFlat;t.exports={hoverlabel:{bgcolor:i({},a.bgcolor,{arrayOk:!0}),bordercolor:i({},a.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:i({},a.align,{arrayOk:!0}),namelength:i({},a.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":707,"../../plots/font_attributes":790,"./layout_attributes":630}],622:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry");function i(e,t,r,a){a=a||n.identity,Array.isArray(e)&&(t[0][r]=a(e))}t.exports=function(e){var t=e.calcdata,r=e._fullLayout;function o(e){return function(t){return n.coerceHoverinfo({hoverinfo:t},{_module:e._module},r)}}for(var s=0;s<t.length;s++){var l=t[s],c=l[0].trace;if(!a.traceIs(c,"pie-like")){var u=a.traceIs(c,"2dMap")?i:n.fillArray;u(c.hoverinfo,l,"hi",o(c)),c.hovertemplate&&u(c.hovertemplate,l,"ht"),c.hoverlabel&&(u(c.hoverlabel.bgcolor,l,"hbg"),u(c.hoverlabel.bordercolor,l,"hbc"),u(c.hoverlabel.font.size,l,"hts"),u(c.hoverlabel.font.color,l,"htc"),u(c.hoverlabel.font.family,l,"htf"),u(c.hoverlabel.namelength,l,"hnl"),u(c.hoverlabel.align,l,"hta"))}}}},{"../../lib":716,"../../registry":845}],623:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("./hover").hover;t.exports=function(e,t,r){var i=n.getComponentMethod("annotations","onClick")(e,e._hoverdata);function o(){e.emit("plotly_click",{points:e._hoverdata,event:t})}void 0!==r&&a(e,t,r,!0),e._hoverdata&&t&&t.target&&(i&&i.then?i.then(o):o(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}},{"../../registry":845,"./hover":627}],624:[function(e,t,r){"use strict";t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},{}],625:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("./hoverlabel_defaults");t.exports=function(e,t,r,o){var s=n.extendFlat({},o.hoverlabel);t.hovertemplate&&(s.namelength=-1),i(e,t,(function(r,i){return n.coerce(e,t,a,r,i)}),s)}},{"../../lib":716,"./attributes":621,"./hoverlabel_defaults":628}],626:[function(e,t,r){"use strict";var n=e("../../lib");r.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},r.isTraceInSubplots=function(e,t){if("splom"===e.type){for(var n=e.xaxes||[],a=e.yaxes||[],i=0;i<n.length;i++)for(var o=0;o<a.length;o++)if(-1!==t.indexOf(n[i]+a[o]))return!0;return!1}return-1!==t.indexOf(r.getSubplot(e))},r.flat=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=t;return r},r.p2c=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]=e[n].p2c(t);return r},r.getDistanceFunction=function(e,t,n,a){return"closest"===e?a||r.quadrature(t,n):"x"===e?t:n},r.getClosest=function(e,t,r){if(!1!==r.index)r.index>=0&&r.index<e.length?r.distance=0:r.index=!1;else for(var n=0;n<e.length;n++){var a=t(e[n]);a<=r.distance&&(r.index=n,r.distance=a)}return r},r.inbox=function(e,t,r){return e*t<0||0===e?r:1/0},r.quadrature=function(e,t){return function(r){var n=e(r),a=t(r);return Math.sqrt(n*n+a*a)}},r.makeEventData=function(e,t,n){var a="index"in e?e.index:e.pointNumber,i={data:t._input,fullData:t,curveNumber:t.index,pointNumber:a};if(t._indexToPoints){var o=t._indexToPoints[a];1===o.length?i.pointIndex=o[0]:i.pointIndices=o}else i.pointIndex=a;return t._module.eventData?i=t._module.eventData(i,e,t,n,a):("xVal"in e?i.x=e.xVal:"x"in e&&(i.x=e.x),"yVal"in e?i.y=e.yVal:"y"in e&&(i.y=e.y),e.xa&&(i.xaxis=e.xa),e.ya&&(i.yaxis=e.ya),void 0!==e.zLabelVal&&(i.z=e.zLabelVal)),r.appendArrayPointValue(i,t,a),i},r.appendArrayPointValue=function(e,t,r){var a=t._arrayAttrs;if(a)for(var s=0;s<a.length;s++){var l=a[s],c=i(l);if(void 0===e[c]){var u=o(n.nestedProperty(t,l).get(),r);void 0!==u&&(e[c]=u)}}},r.appendArrayMultiPointValues=function(e,t,r){var a=t._arrayAttrs;if(a)for(var s=0;s<a.length;s++){var l=a[s],c=i(l);if(void 0===e[c]){for(var u=n.nestedProperty(t,l).get(),d=new Array(r.length),p=0;p<r.length;p++)d[p]=o(u,r[p]);e[c]=d}}};var a={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function i(e){return a[e]||e}function o(e,t){return Array.isArray(t)?Array.isArray(e)&&Array.isArray(e[t[0]])?e[t[0]][t[1]]:void 0:e[t]}},{"../../lib":716}],627:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("tinycolor2"),o=e("../../lib"),s=e("../../lib/events"),l=e("../../lib/svg_text_utils"),c=e("../../lib/override_cursor"),u=e("../drawing"),d=e("../color"),p=e("../dragelement"),h=e("../../plots/cartesian/axes"),f=e("../../registry"),m=e("./helpers"),g=e("./constants"),v=g.YANGLE,y=Math.PI*v/180,b=1/Math.sin(y),_=Math.cos(y),x=Math.sin(y),w=g.HOVERARROWSIZE,k=g.HOVERTEXTPAD;r.hover=function(e,t,r,i){e=o.getGraphDiv(e),o.throttle(e._fullLayout._uid+g.HOVERID,g.HOVERMINTIME,(function(){!function(e,t,r,i){r||(r="xy");var l=Array.isArray(r)?r:[r],u=e._fullLayout,h=u._plots||[],g=h[r],v=u._has("cartesian");if(g){var y=g.overlays.map((function(e){return e.id}));l=l.concat(y)}for(var _=l.length,x=new Array(_),w=new Array(_),k=!1,M=0;M<_;M++){var E=l[M];if(h[E])k=!0,x[M]=h[E].xaxis,w[M]=h[E].yaxis;else{if(!u[E]||!u[E]._subplot)return void o.warn("Unrecognized subplot: "+E);var D=u[E]._subplot;x[M]=D.xaxis,w[M]=D.yaxis}}var I=t.hovermode||u.hovermode;if(I&&!k&&(I="closest"),-1===["x","y","closest"].indexOf(I)||!e.calcdata||e.querySelector(".zoombox")||e._dragging)return p.unhoverRaw(e,t);var P,O,R,F,z,N,j,B,Y,H,V,U,W,G=-1===u.hoverdistance?1/0:u.hoverdistance,q=-1===u.spikedistance?1/0:u.spikedistance,K=[],X=[],Z={hLinePoint:null,vLinePoint:null},J=!1;if(Array.isArray(t))for(I="array",R=0;R<t.length;R++)(z=e.calcdata[t[R].curveNumber||0])&&(N=z[0].trace,"skip"!==z[0].trace.hoverinfo&&(X.push(z),"h"===N.orientation&&(J=!0)));else{for(F=0;F<e.calcdata.length;F++)z=e.calcdata[F],"skip"!==(N=z[0].trace).hoverinfo&&m.isTraceInSubplots(N,l)&&(X.push(z),"h"===N.orientation&&(J=!0));var $,Q;if(t.target){if(!1===s.triggerHandler(e,"plotly_beforehover",t))return;var ee=t.target.getBoundingClientRect();if($=t.clientX-ee.left,Q=t.clientY-ee.top,$<0||$>x[0]._length||Q<0||Q>w[0]._length)return p.unhoverRaw(e,t)}else $="xpx"in t?t.xpx:x[0]._length/2,Q="ypx"in t?t.ypx:w[0]._length/2;if(t.pointerX=$+x[0]._offset,t.pointerY=Q+w[0]._offset,P="xval"in t?m.flat(l,t.xval):m.p2c(x,$),O="yval"in t?m.flat(l,t.yval):m.p2c(w,Q),!a(P[0])||!a(O[0]))return o.warn("Fx.hover failed",t,e),p.unhoverRaw(e,t)}var te=1/0;for(F=0;F<X.length;F++)if((z=X[F])&&z[0]&&z[0].trace&&!0===(N=z[0].trace).visible&&0!==N._length&&-1===["carpet","contourcarpet"].indexOf(N._module.name)){if("splom"===N.type?j=l[B=0]:(j=m.getSubplot(N),B=l.indexOf(j)),Y=I,U={cd:z,trace:N,xa:x[B],ya:w[B],maxHoverDistance:G,maxSpikeDistance:q,index:!1,distance:Math.min(te,G),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:d.defaultLine,name:N.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},u[j]&&(U.subplot=u[j]._subplot),u._splomScenes&&u._splomScenes[N.uid]&&(U.scene=u._splomScenes[N.uid]),W=K.length,"array"===Y){var re=t[F];"pointNumber"in re?(U.index=re.pointNumber,Y="closest"):(Y="","xval"in re&&(H=re.xval,Y="x"),"yval"in re&&(V=re.yval,Y=Y?"closest":"y"))}else H=P[B],V=O[B];if(0!==G)if(N._module&&N._module.hoverPoints){var ne=N._module.hoverPoints(U,H,V,Y,u._hoverlayer);if(ne)for(var ae,ie=0;ie<ne.length;ie++)ae=ne[ie],a(ae.x0)&&a(ae.y0)&&K.push(S(ae,I))}else o.log("Unrecognized trace type in hover:",N);if("closest"===I&&K.length>W&&(K.splice(0,W),te=K[0].distance),v&&0!==q&&0===K.length){U.distance=q,U.index=!1;var oe=N._module.hoverPoints(U,H,V,"closest",u._hoverlayer);if(oe&&(oe=oe.filter((function(e){return e.spikeDistance<=q}))),oe&&oe.length){var se,le=oe.filter((function(e){return e.xa.showspikes}));if(le.length){var ce=le[0];a(ce.x0)&&a(ce.y0)&&(se=he(ce),(!Z.vLinePoint||Z.vLinePoint.spikeDistance>se.spikeDistance)&&(Z.vLinePoint=se))}var ue=oe.filter((function(e){return e.ya.showspikes}));if(ue.length){var de=ue[0];a(de.x0)&&a(de.y0)&&(se=he(de),(!Z.hLinePoint||Z.hLinePoint.spikeDistance>se.spikeDistance)&&(Z.hLinePoint=se))}}}}function pe(e,t){for(var r,n=null,a=1/0,i=0;i<e.length;i++)(r=e[i].spikeDistance)<a&&r<=t&&(n=e[i],a=r);return n}function he(e){return e?{xa:e.xa,ya:e.ya,x:void 0!==e.xSpike?e.xSpike:(e.x0+e.x1)/2,y:void 0!==e.ySpike?e.ySpike:(e.y0+e.y1)/2,distance:e.distance,spikeDistance:e.spikeDistance,curveNumber:e.trace.index,color:e.color,pointNumber:e.index}:null}var fe={fullLayout:u,container:u._hoverlayer,outerContainer:u._paperdiv,event:t},me=e._spikepoints,ge={vLinePoint:Z.vLinePoint,hLinePoint:Z.hLinePoint};if(e._spikepoints=ge,v&&0!==q&&0!==K.length){var ve=pe(K.filter((function(e){return e.ya.showspikes})),q);Z.hLinePoint=he(ve);var ye=pe(K.filter((function(e){return e.xa.showspikes})),q);Z.vLinePoint=he(ye)}if(0===K.length){var be=p.unhoverRaw(e,t);return!v||null===Z.hLinePoint&&null===Z.vLinePoint||A(me)&&L(e,Z,fe),be}v&&A(me)&&L(e,Z,fe),K.sort((function(e,t){return e.distance-t.distance}));var _e=e._hoverdata,xe=[];for(R=0;R<K.length;R++){var we=K[R],ke=m.makeEventData(we,we.trace,we.cd);if(!1!==we.hovertemplate){var Me=!1;we.cd[we.index]&&we.cd[we.index].ht&&(Me=we.cd[we.index].ht),we.hovertemplate=Me||we.trace.hovertemplate||!1}we.eventData=[ke],xe.push(ke)}e._hoverdata=xe;var Te="y"===I&&(X.length>1||K.length>1)||"closest"===I&&J&&K.length>1,Ce=d.combine(u.plot_bgcolor||d.background,u.paper_bgcolor),Se={hovermode:I,rotateLabels:Te,bgColor:Ce,container:u._hoverlayer,outerContainer:u._paperdiv,commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance},Le=T(K,Se,e);if(function(e,t,r){var n,a,i,o,s,l,c,u=0,d=1,p=e.size(),h=new Array(p),f=0;function m(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,i=r.pos+r.dp+r.size-t.pmax,a>.01){for(s=e.length-1;s>=0;s--)e[s].dp+=a;n=!1}if(!(i<.01)){if(a<-.01){for(s=e.length-1;s>=0;s--)e[s].dp-=i;n=!1}if(n){var c=0;for(o=0;o<e.length;o++)(l=e[o]).pos+l.dp+l.size>t.pmax&&c++;for(o=e.length-1;o>=0&&!(c<=0);o--)(l=e[o]).pos>t.pmax-1&&(l.del=!0,c--);for(o=0;o<e.length&&!(c<=0);o++)if((l=e[o]).pos<t.pmin+1)for(l.del=!0,c--,i=2*l.size,s=e.length-1;s>=0;s--)e[s].dp-=i;for(o=e.length-1;o>=0&&!(c<=0);o--)(l=e[o]).pos+l.dp+l.size>t.pmax&&(l.del=!0,c--)}}}for(e.each((function(e){var n=e[t],a="x"===n._id.charAt(0),i=n.range;0===f&&i&&i[0]>i[1]!==a&&(d=-1),h[f++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?b:1)/2,pmin:0,pmax:a?r.width:r.height}]})),h.sort((function(e,t){return e[0].posref-t[0].posref||d*(t[0].traceIndex-e[0].traceIndex)}));!n&&u<=p;){for(u++,n=!0,o=0;o<h.length-1;){var g=h[o],v=h[o+1],y=g[g.length-1],_=v[0];if((a=y.pos+y.dp+y.size-_.pos-_.dp+_.size)>.01&&y.pmin===_.pmin&&y.pmax===_.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=a;for(g.push.apply(g,v),h.splice(o+1,1),c=0,s=g.length-1;s>=0;s--)c+=g[s].dp;for(i=c/g.length,s=g.length-1;s>=0;s--)g[s].dp-=i;n=!1}else o++}h.forEach(m)}for(o=h.length-1;o>=0;o--){var x=h[o];for(s=x.length-1;s>=0;s--){var w=x[s],k=w.datum;k.offset=w.dp,k.del=w.del}}}(Le,Te?"xa":"ya",u),C(Le,Te),t.target&&t.target.tagName){var Ae=f.getComponentMethod("annotations","hasClickToShow")(e,xe);c(n.select(t.target),Ae?"pointer":"")}t.target&&!i&&function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers))return!0}return!1}(e,0,_e)&&(_e&&e.emit("plotly_unhover",{event:t,points:_e}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:x,yaxes:w,xvals:P,yvals:O}))}(e,t,r,i)}))},r.loneHover=function(e,t){var r=!0;Array.isArray(e)||(r=!1,e=[e]);var a=e.map((function(e){return{color:e.color||d.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,eventData:e.eventData||!1,hovertemplateLabels:e.hovertemplateLabels||!1}})),i=n.select(t.container),o=t.outerContainer?n.select(t.outerContainer):i,s={hovermode:"closest",rotateLabels:!1,bgColor:t.bgColor||d.background,container:i,outerContainer:o},l=T(a,s,t.gd),c=0,u=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,r){var n=e.y0-e.by/2;e.offset=n-5<c?c-n+5:0,c=n+e.by+e.offset,r===t.anchorIndex&&(u=e.offset)})).each((function(e){e.offset-=u})),C(l,s.rotateLabels),r?l:l.node()};var M=/<extra>([\s\S]*)<\/extra>/;function T(e,t,r){var a=r._fullLayout,i=t.hovermode,s=t.rotateLabels,c=t.bgColor,p=t.container,h=t.outerContainer,f=t.commonLabelOpts||{},m=t.fontFamily||g.HOVERFONT,y=t.fontSize||g.HOVERFONTSIZE,b=e[0],_=b.xa,x=b.ya,T="y"===i?"yLabel":"xLabel",C=b[T],S=(String(C)||"").split(" ")[0],L=h.node().getBoundingClientRect(),A=L.top,D=L.width,I=L.height,P=void 0!==C&&b.distance<=t.hoverdistance&&("x"===i||"y"===i);if(P){var O,R,F=!0;for(O=0;O<e.length;O++)if(F&&void 0===e[O].zLabel&&(F=!1),R=e[O].hoverinfo||e[O].trace.hoverinfo){var z=Array.isArray(R)?R:R.split("+");if(-1===z.indexOf("all")&&-1===z.indexOf(i)){P=!1;break}}F&&(P=!1)}var N=p.selectAll("g.axistext").data(P?[0]:[]);N.enter().append("g").classed("axistext",!0),N.exit().remove(),N.each((function(){var t=n.select(this),s=o.ensureSingle(t,"path","",(function(e){e.style({"stroke-width":"1px"})})),c=o.ensureSingle(t,"text","",(function(e){e.attr("data-notex",1)})),p=f.bgcolor||d.defaultLine,h=f.bordercolor||d.contrast(p),g=d.contrast(p),v={family:f.font.family||m,size:f.font.size||y,color:f.font.color||g};s.style({fill:p,stroke:h}),c.text(C).call(u.font,v).call(l.positionText,0,0).call(l.convertToTspans,r),t.attr("transform","");var M,L,E=c.node().getBoundingClientRect();if("x"===i){var D="top"===_.side?"-":"";c.attr("text-anchor","middle").call(l.positionText,0,"top"===_.side?A-E.bottom-w-k:A-E.top+w+k),M=_._offset+(b.x0+b.x1)/2,L=x._offset+("top"===_.side?0:x._length);var I=E.width/2+k;M<I?(M=I,s.attr("d","M-"+(I-w)+",0L-"+(I-2*w)+","+D+w+"H"+(k+E.width/2)+"v"+D+(2*k+E.height)+"H-"+I+"V"+D+w+"Z")):M>a.width-I?(M=a.width-I,s.attr("d","M"+(I-w)+",0L"+I+","+D+w+"v"+D+(2*k+E.height)+"H-"+I+"V"+D+w+"H"+(I-2*w)+"Z")):s.attr("d","M0,0L"+w+","+D+w+"H"+(k+E.width/2)+"v"+D+(2*k+E.height)+"H-"+(k+E.width/2)+"V"+D+w+"H-"+w+"Z")}else{var P,O,R;"right"===x.side?(P="start",O=1,R="",M=_._offset+_._length):(P="end",O=-1,R="-",M=_._offset),L=x._offset+(b.y0+b.y1)/2,c.attr("text-anchor",P),s.attr("d","M0,0L"+R+w+","+w+"V"+(k+E.height/2)+"h"+R+(2*k+E.width)+"V-"+(k+E.height/2)+"H"+R+w+"V-"+w+"Z");var F,z=E.height/2,N=A-E.top-z,j="clip"+a._uid+"commonlabel"+x._id;if(M<E.width+2*k+w){F="M-"+(w+k)+"-"+z+"h-"+(E.width-k)+"V"+z+"h"+(E.width-k)+"Z";var B=E.width-M+k;l.positionText(c,B,N),"end"===P&&c.selectAll("tspan").each((function(){var e=n.select(this),t=u.tester.append("text").text(e.text()).call(u.font,v),r=t.node().getBoundingClientRect();Math.round(r.width)<Math.round(E.width)&&e.attr("x",B-r.width),t.remove()}))}else l.positionText(c,O*(k+w),N),F=null;var Y=a._topclips.selectAll("#"+j).data(F?[0]:[]);Y.enter().append("clipPath").attr("id",j).append("path"),Y.exit().remove(),Y.select("path").attr("d",F),u.setClipUrl(c,F?j:null,r)}t.attr("transform","translate("+M+","+L+")"),e=e.filter((function(e){return void 0!==e.zLabelVal||(e[T]||"").split(" ")[0]===S}))}));var j=p.selectAll("g.hovertext").data(e,(function(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa,e.ya||""].join(",")}));return j.enter().append("g").classed("hovertext",!0).each((function(){var e=n.select(this);e.append("rect").call(d.fill,d.addOpacity(c,.8)),e.append("text").classed("name",!0),e.append("path").style("stroke-width","1px"),e.append("text").classed("nums",!0).call(u.font,m,y)})),j.exit().remove(),j.each((function(e){var t=n.select(this).attr("transform",""),p="",h="",f=e.bgcolor||e.color,g=d.combine(d.opacity(f)?f:d.defaultLine,c),b=d.combine(d.opacity(e.color)?e.color:d.defaultLine,c),_=e.borderColor||d.contrast(g);void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=o.templateString(e.name,e.trace._meta)),p=E(e.name,e.nameLength)),void 0!==e.zLabel?(void 0!==e.xLabel&&(h+="x: "+e.xLabel+"<br>"),void 0!==e.yLabel&&(h+="y: "+e.yLabel+"<br>"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&(h+=(h?"z: ":"")+e.zLabel)):P&&e[i+"Label"]===C?h=e[("x"===i?"y":"x")+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(h=e.yLabel):h=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",!e.text&&0!==e.text||Array.isArray(e.text)||(h+=(h?"<br>":"")+e.text),void 0!==e.extraText&&(h+=(h?"<br>":"")+e.extraText),""!==h||e.hovertemplate||(""===p&&t.remove(),h=p);var x=a._d3locale,T=e.hovertemplate||!1,S=e.hovertemplateLabels||e,L=e.eventData[0]||{};T&&(h=(h=o.hovertemplateString(T,S,x,L,e.trace._meta)).replace(M,(function(t,r){return p=E(r,e.nameLength),""})));var O=t.select("text.nums").call(u.font,e.fontFamily||m,e.fontSize||y,e.fontColor||_).text(h).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r),R=t.select("text.name"),F=0,z=0;if(p&&p!==h){R.call(u.font,e.fontFamily||m,e.fontSize||y,b).text(p).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,r);var N=R.node().getBoundingClientRect();F=N.width+2*k,z=N.height+2*k}else R.remove(),t.select("rect").remove();t.select("path").style({fill:g,stroke:_});var j,B,Y=O.node().getBoundingClientRect(),H=e.xa._offset+(e.x0+e.x1)/2,V=e.ya._offset+(e.y0+e.y1)/2,U=Math.abs(e.x1-e.x0),W=Math.abs(e.y1-e.y0),G=Y.width+w+k+F;if(e.ty0=A-Y.top,e.bx=Y.width+2*k,e.by=Math.max(Y.height+2*k,z),e.anchor="start",e.txwidth=Y.width,e.tx2width=F,e.offset=0,s)e.pos=H,j=V+W/2+G<=I,B=V-W/2-G>=0,"top"!==e.idealAlign&&j||!B?j?(V+=W/2,e.anchor="start"):e.anchor="middle":(V-=W/2,e.anchor="end");else if(e.pos=V,j=H+U/2+G<=D,B=H-U/2-G>=0,"left"!==e.idealAlign&&j||!B)if(j)H+=U/2,e.anchor="start";else{e.anchor="middle";var q=G/2,K=H+q-D,X=H-q;K>0&&(H-=K),X<0&&(H+=-X)}else H-=U/2,e.anchor="end";O.attr("text-anchor",e.anchor),F&&R.attr("text-anchor",e.anchor),t.attr("transform","translate("+H+","+V+")"+(s?"rotate("+v+")":""))})),j}function C(e,t){e.each((function(e){var r=n.select(this);if(e.del)return r.remove();var a=r.select("text.nums"),i=e.anchor,o="end"===i?-1:1,s={start:1,end:-1,middle:0}[i],c=s*(w+k),d=c+s*(e.txwidth+k),p=0,h=e.offset;"middle"===i&&(c-=e.tx2width/2,d+=e.txwidth/2+k),t&&(h*=-x,p=e.offset*_),r.select("path").attr("d","middle"===i?"M-"+(e.bx/2+e.tx2width/2)+","+(h-e.by/2)+"h"+e.bx+"v"+e.by+"h-"+e.bx+"Z":"M0,0L"+(o*w+p)+","+(w+h)+"v"+(e.by/2-w)+"h"+o*e.bx+"v-"+e.by+"H"+(o*w+p)+"V"+(h-w)+"Z");var f=c+p,m=h+e.ty0-e.by/2+k,g=e.textAlign||"auto";"auto"!==g&&("left"===g&&"start"!==i?(a.attr("text-anchor","start"),f="middle"===i?-e.bx/2-e.tx2width/2+k:-e.bx-k):"right"===g&&"end"!==i&&(a.attr("text-anchor","end"),f="middle"===i?e.bx/2-e.tx2width/2-k:e.bx+k)),a.call(l.positionText,f,m),e.tx2width&&(r.select("text.name").call(l.positionText,d+s*k+p,h+e.ty0-e.by/2+k),r.select("rect").call(u.setRect,d+(s-1)*e.tx2width/2+p,h-e.by/2-1,e.tx2width,e.by+2))}))}function S(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],s=e.cd[r]||{};function l(e){return e||a(e)&&0===e}var c=Array.isArray(r)?function(e,t){var a=o.castOption(i,r,e);return l(a)?a:o.extractOption({},n,"",t)}:function(e,t){return o.extractOption(s,n,e,t)};function u(t,r,n){var a=c(r,n);l(a)&&(e[t]=a)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===n.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=o.constrain(e.x0,0,e.xa._length),e.x1=o.constrain(e.x1,0,e.xa._length),e.y0=o.constrain(e.y0,0,e.ya._length),e.y1=o.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:h.hoverLabelText(e.xa,e.xLabelVal),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:h.hoverLabelText(e.ya,e.yLabelVal),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var d=h.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+d+" / -"+h.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+d,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var p=h.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+p+" / -"+h.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+p,"y"===t&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&"all"!==f&&(-1===(f=Array.isArray(f)?f:f.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===f.indexOf("y")&&(e.yLabel=void 0),-1===f.indexOf("z")&&(e.zLabel=void 0),-1===f.indexOf("text")&&(e.text=void 0),-1===f.indexOf("name")&&(e.name=void 0)),e}function L(e,t,r){var n,a,o=r.container,s=r.fullLayout,l=s._size,c=r.event,p=!!t.hLinePoint,f=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),f||p){var m=d.combine(s.plot_bgcolor,s.paper_bgcolor);if(p){var g,v,y=t.hLinePoint;n=y&&y.xa,"cursor"===(a=y&&y.ya).spikesnap?(g=c.pointerX,v=c.pointerY):(g=n._offset+y.x,v=a._offset+y.y);var b,_,x=i.readability(y.color,m)<1.5?d.contrast(m):y.color,w=a.spikemode,k=a.spikethickness,M=a.spikecolor||x,T=h.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(b=T,_=g),-1!==w.indexOf("across")){var C=a._counterDomainMin,S=a._counterDomainMax;"free"===a.anchor&&(C=Math.min(C,a.position),S=Math.max(S,a.position)),b=l.l+C*l.w,_=l.l+S*l.w}o.insert("line",":first-child").attr({x1:b,x2:_,y1:v,y2:v,"stroke-width":k,stroke:M,"stroke-dasharray":u.dashStyle(a.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:b,x2:_,y1:v,y2:v,"stroke-width":k+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:T+("right"!==a.side?k:-k),cy:v,r:k,fill:M}).classed("spikeline",!0)}if(f){var L,A,E=t.vLinePoint;n=E&&E.xa,a=E&&E.ya,"cursor"===n.spikesnap?(L=c.pointerX,A=c.pointerY):(L=n._offset+E.x,A=a._offset+E.y);var D,I,P=i.readability(E.color,m)<1.5?d.contrast(m):E.color,O=n.spikemode,R=n.spikethickness,F=n.spikecolor||P,z=h.getPxPosition(e,n);if(-1!==O.indexOf("toaxis")||-1!==O.indexOf("across")){if(-1!==O.indexOf("toaxis")&&(D=z,I=A),-1!==O.indexOf("across")){var N=n._counterDomainMin,j=n._counterDomainMax;"free"===n.anchor&&(N=Math.min(N,n.position),j=Math.max(j,n.position)),D=l.t+(1-j)*l.h,I=l.t+(1-N)*l.h}o.insert("line",":first-child").attr({x1:L,x2:L,y1:D,y2:I,"stroke-width":R,stroke:F,"stroke-dasharray":u.dashStyle(n.spikedash,R)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:L,x2:L,y1:D,y2:I,"stroke-width":R+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==O.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:L,cy:z-("top"!==n.side?R:-R),r:R,fill:F}).classed("spikeline",!0)}}}function A(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function E(e,t){return l.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em"]})}},{"../../lib":716,"../../lib/events":706,"../../lib/override_cursor":727,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../registry":845,"../color":591,"../dragelement":609,"../drawing":612,"./constants":624,"./helpers":626,d3:164,"fast-isnumeric":227,tinycolor2:535}],628:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t,r,a){r("hoverlabel.bgcolor",(a=a||{}).bgcolor),r("hoverlabel.bordercolor",a.bordercolor),r("hoverlabel.namelength",a.namelength),n.coerceFont(r,"hoverlabel.font",a.font),r("hoverlabel.align",a.align)}},{"../../lib":716}],629:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../dragelement"),o=e("./helpers"),s=e("./layout_attributes"),l=e("./hover");t.exports={moduleType:"component",name:"fx",constants:e("./constants"),schema:{layout:s},attributes:e("./attributes"),layoutAttributes:s,supplyLayoutGlobalDefaults:e("./layout_global_defaults"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(e,t,r){return a.castOption(e,t,"hoverlabel."+r)},castHoverinfo:function(e,t,r){return a.castOption(e,r,"hoverinfo",(function(r){return a.coerceHoverinfo({hoverinfo:r},{_module:e._module},t)}))},hover:l.hover,unhover:i.unhover,loneHover:l.loneHover,loneUnhover:function(e){var t=a.isD3Selection(e)?e:n.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e("./click")}},{"../../lib":716,"../dragelement":609,"./attributes":621,"./calc":622,"./click":623,"./constants":624,"./defaults":625,"./helpers":626,"./hover":627,"./layout_attributes":630,"./layout_defaults":631,"./layout_global_defaults":632,d3:164}],630:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../plots/font_attributes")({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1],editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:20,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:a,align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},{"../../plots/font_attributes":790,"./constants":624}],631:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r){function i(r,i){return n.coerce(e,t,a,r,i)}var o,s=i("clickmode");"select"===i("dragmode")&&i("selectdirection"),t._has("cartesian")?s.indexOf("select")>-1?o="closest":(t._isHoriz=function(e,t){for(var r=t._scatterStackOpts||{},n=0;n<e.length;n++){var a=e[n],i=a.xaxis+a.yaxis,o=(r[i]||{})[a.stackgroup]||{};if("h"!==a.orientation&&"h"!==o.orientation)return!1}return!0}(r,t),o=t._isHoriz?"y":"x"):o="closest",i("hovermode",o)&&(i("hoverdistance"),i("spikedistance"));var l=t._has("mapbox"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||c)&&1===u||l&&c&&2===u)&&(t.dragmode="pan")}},{"../../lib":716,"./layout_attributes":630}],632:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./hoverlabel_defaults"),i=e("./layout_attributes");t.exports=function(e,t){a(e,t,(function(r,a){return n.coerce(e,t,i,r,a)}))}},{"../../lib":716,"./hoverlabel_defaults":628,"./layout_attributes":630}],633:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../lib/regex").counter,i=e("../../plots/domain").attributes,o=e("../../plots/cartesian/constants").idRegex,s=e("../../plot_api/plot_template"),l={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[a("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:i({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function c(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});return Array.isArray(n)?n:a.length?a:void 0}function u(e,t,r,n,a,i){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(a),c=s[0],u=(s[1]-c)/(a-o),d=u*(1-o),p=0;p<a;p++){var h=c+u*p;l[i?a-1-p:p]=[h,h+d]}return l}function d(e,t,r,n,a){var i,o=new Array(r);function s(e,r){-1!==t.indexOf(r)&&void 0===n[r]?(o[e]=r,n[r]=e):o[e]=""}if(Array.isArray(e))for(i=0;i<r;i++)s(i,e[i]);else for(s(0,a),i=1;i<r;i++)s(i,a+(i+1));return o}t.exports={moduleType:"component",name:"grid",schema:{layout:{grid:l}},layoutAttributes:l,sizeDefaults:function(e,t){var r=e.grid||{},a=c(t,r,"x"),i=c(t,r,"y");if(e.grid||a||i){var o,d,p=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),h=Array.isArray(a),f=Array.isArray(i),m=h&&a!==r.xaxes&&f&&i!==r.yaxes;p?(o=r.subplots.length,d=r.subplots[0].length):(f&&(o=i.length),h&&(d=a.length));var g=s.newContainer(t,"grid"),v=M("rows",o),y=M("columns",d);if(v*y>1){p||h||f||"independent"===M("pattern")&&(p=!0),g._hasSubplotGrid=p;var b,_,x="top to bottom"===M("roworder"),w=p?.2:.1,k=p?.3:.1;m&&t._splomGridDflt&&(b=t._splomGridDflt.xside,_=t._splomGridDflt.yside),g._domains={x:u("x",M,w,b,y),y:u("y",M,k,_,v,x)}}else delete t.grid}function M(e,t){return n.coerce(r,g,l,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,a,i,o,s,l,u,p=e.grid||{},h=t._subplots,f=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(f){var b=p.subplots||[];l=r.subplots=new Array(m);var _=1;for(n=0;n<m;n++){var x=l[n]=new Array(g),w=b[n]||[];for(a=0;a<g;a++)if(v?(s=1===_?"xy":"x"+_+"y"+_,_++):s=w[a],x[a]="",-1!==h.cartesian.indexOf(s)){if(u=s.indexOf("y"),i=s.slice(0,u),o=s.slice(u),void 0!==y[i]&&y[i]!==a||void 0!==y[o]&&y[o]!==n)continue;x[a]=s,y[i]=a,y[o]=n}}}else{var k=c(t,p,"x"),M=c(t,p,"y");r.xaxes=d(k,h.xaxis,g,y,"x"),r.yaxes=d(M,h.yaxis,m,y,"y")}var T=r._anchors={},C="top to bottom"===r.roworder;for(var S in y){var L,A,E,D=S.charAt(0),I=r[D+"side"];if(I.length<8)T[S]="free";else if("x"===D){if("t"===I.charAt(0)===C?(L=0,A=1,E=m):(L=m-1,A=-1,E=-1),f){var P=y[S];for(n=L;n!==E;n+=A)if((s=l[n][P])&&(u=s.indexOf("y"),s.slice(0,u)===S)){T[S]=s.slice(u);break}}else for(n=L;n!==E;n+=A)if(o=r.yaxes[n],-1!==h.cartesian.indexOf(S+o)){T[S]=o;break}}else if("l"===I.charAt(0)?(L=0,A=1,E=g):(L=g-1,A=-1,E=-1),f){var O=y[S];for(n=L;n!==E;n+=A)if((s=l[O][n])&&(u=s.indexOf("y"),s.slice(u)===S)){T[S]=s.slice(0,u);break}}else for(n=L;n!==E;n+=A)if(i=r.xaxes[n],-1!==h.cartesian.indexOf(i+S)){T[S]=i;break}}}}}},{"../../lib":716,"../../lib/regex":732,"../../plot_api/plot_template":754,"../../plots/cartesian/constants":770,"../../plots/domain":789}],634:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/constants"),a=e("../../plot_api/plot_template").templatedArray;t.exports=a("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",n.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",n.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},{"../../plot_api/plot_template":754,"../../plots/cartesian/constants":770}],635:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib/to_log_range");t.exports=function(e,t,r,i){t=t||{};var o="log"===r&&"linear"===t.type,s="linear"===r&&"log"===t.type;if(o||s)for(var l,c,u=e._fullLayout.images,d=t._id.charAt(0),p=0;p<u.length;p++)if(c="images["+p+"].",(l=u[p])[d+"ref"]===t._id){var h=l[d],f=l["size"+d],m=null,g=null;if(o){m=a(h,t.range);var v=f/Math.pow(10,m)/2;g=2*Math.log(v+Math.sqrt(1+v*v))/Math.LN10}else g=(m=Math.pow(10,h))*(Math.pow(10,f/2)-Math.pow(10,-f/2));n(m)?n(g)||(g=null):(m=null,g=null),i(c+d,m),i(c+"size"+d,g)}}},{"../../lib/to_log_range":742,"fast-isnumeric":227}],636:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("./attributes");function s(e,t,r){function i(r,a){return n.coerce(e,t,o,r,a)}var s=i("source");if(!i("visible",!!s))return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var l={_fullLayout:r},c=["x","y"],u=0;u<2;u++){var d=c[u],p=a.coerceRef(e,t,l,d,"paper");"paper"!==p&&a.getFromId(l,p)._imgIndices.push(t._index),a.coercePosition(t,l,i,p,d,0)}return t}t.exports=function(e,t){i(e,t,{name:"images",handleItemDefaults:s})}},{"../../lib":716,"../../plots/array_container_defaults":760,"../../plots/cartesian/axes":764,"./attributes":634}],637:[function(e,t,r){"use strict";var n=e("d3"),a=e("../drawing"),i=e("../../plots/cartesian/axes"),o=e("../../constants/xmlns_namespaces");t.exports=function(e){var t,r,s=e._fullLayout,l=[],c={},u=[];for(r=0;r<s.images.length;r++){var d=s.images[r];if(d.visible)if("below"===d.layer&&"paper"!==d.xref&&"paper"!==d.yref){t=d.xref+d.yref;var p=s._plots[t];if(!p){u.push(d);continue}p.mainplot&&(t=p.mainplot.id),c[t]||(c[t]=[]),c[t].push(d)}else"above"===d.layer?l.push(d):u.push(d)}var h={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}}};function f(t){var r=n.select(this);if(this._imgSrc!==t.source)if(r.attr("xmlns",o.svg),t.source&&"data:"===t.source.slice(0,5))r.attr("xlink:href",t.source),this._imgSrc=t.source;else{var a=new Promise(function(e){var n=new Image;function a(){r.remove(),e()}this.img=n,n.setAttribute("crossOrigin","anonymous"),n.onerror=a,n.onload=function(){var t=document.createElement("canvas");t.width=this.width,t.height=this.height,t.getContext("2d").drawImage(this,0,0);var n=t.toDataURL("image/png");r.attr("xlink:href",n),e()},r.on("error",a),n.src=t.source,this._imgSrc=t.source}.bind(this));e._promises.push(a)}}function m(t){var r=n.select(this),o=i.getFromId(e,t.xref),l=i.getFromId(e,t.yref),c=s._size,u=o?Math.abs(o.l2p(t.sizex)-o.l2p(0)):t.sizex*c.w,d=l?Math.abs(l.l2p(t.sizey)-l.l2p(0)):t.sizey*c.h,p=u*h.x[t.xanchor].offset,f=d*h.y[t.yanchor].offset,m=h.x[t.xanchor].sizing+h.y[t.yanchor].sizing,g=(o?o.r2p(t.x)+o._offset:t.x*c.w+c.l)+p,v=(l?l.r2p(t.y)+l._offset:c.h-t.y*c.h+c.t)+f;switch(t.sizing){case"fill":m+=" slice";break;case"stretch":m="none"}r.attr({x:g,y:v,width:u,height:d,preserveAspectRatio:m,opacity:t.opacity});var y=(o?o._id:"")+(l?l._id:"");a.setClipUrl(r,y?"clip"+s._uid+y:null,e)}var g=s._imageLowerLayer.selectAll("image").data(u),v=s._imageUpperLayer.selectAll("image").data(l);g.enter().append("image"),v.enter().append("image"),g.exit().remove(),v.exit().remove(),g.each((function(e){f.bind(this)(e),m.bind(this)(e)})),v.each((function(e){f.bind(this)(e),m.bind(this)(e)}));var y=Object.keys(s._plots);for(r=0;r<y.length;r++){t=y[r];var b=s._plots[t];if(b.imagelayer){var _=b.imagelayer.selectAll("image").data(c[t]||[]);_.enter().append("image"),_.exit().remove(),_.each((function(e){f.bind(this)(e),m.bind(this)(e)}))}}}},{"../../constants/xmlns_namespaces":693,"../../plots/cartesian/axes":764,"../drawing":612,d3:164}],638:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"images",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("images"),draw:e("./draw"),convertCoords:e("./convert_coords")}},{"../../plots/cartesian/include_components":774,"./attributes":634,"./convert_coords":635,"./defaults":636,"./draw":637}],639:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../color/attributes");t.exports={bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:a.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:n({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},x:{valType:"number",min:-2,max:3,editType:"legend"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",min:-2,max:3,editType:"legend"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},editType:"legend"}},{"../../plots/font_attributes":790,"../color/attributes":590}],640:[function(e,t,r){"use strict";t.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},textGap:40,itemGap:5}},{}],641:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../plot_api/plot_template"),o=e("./attributes"),s=e("../../plots/layout_attributes"),l=e("./helpers");t.exports=function(e,t,r){for(var c=e.legend||{},u=0,d=!1,p="normal",h=0;h<r.length;h++){var f=r[h];f.visible&&((f.showlegend||f._dfltShowLegend)&&(u++,f.showlegend&&(d=!0,(n.traceIs(f,"pie-like")||!0===f._input.showlegend)&&u++)),(n.traceIs(f,"bar")&&"stack"===t.barmode||-1!==["tonextx","tonexty"].indexOf(f.fill))&&(p=l.isGrouped({traceorder:p})?"grouped+reversed":"reversed"),void 0!==f.legendgroup&&""!==f.legendgroup&&(p=l.isReversed({traceorder:p})?"reversed+grouped":"grouped"))}var m=a.coerce(e,t,s,"showlegend",d&&u>1);if(!1!==m||c.uirevision){var g,v,y,b=i.newContainer(t,"legend");_("uirevision",t.uirevision),!1!==m&&(_("bgcolor",t.paper_bgcolor),_("bordercolor"),_("borderwidth"),a.coerceFont(_,"font",t.font),"h"===_("orientation")?(g=0,n.getComponentMethod("rangeslider","isVisible")(e.xaxis)?(v=1.1,y="bottom"):(v=-.1,y="top")):(g=1.02,v=1,y="auto"),_("traceorder",p),l.isGrouped(t.legend)&&_("tracegroupgap"),_("itemsizing"),_("itemclick"),_("itemdoubleclick"),_("x",g),_("xanchor"),_("y",v),_("yanchor",y),_("valign"),a.noneOrAll(c,b,["x","y"]))}function _(e,t){return a.coerce(c,b,o,e,t)}}},{"../../lib":716,"../../plot_api/plot_template":754,"../../plots/layout_attributes":816,"../../registry":845,"./attributes":639,"./helpers":645}],642:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../lib/events"),l=e("../dragelement"),c=e("../drawing"),u=e("../color"),d=e("../../lib/svg_text_utils"),p=e("./handle_click"),h=e("./constants"),f=e("../../constants/alignment"),m=f.LINE_SPACING,g=f.FROM_TL,v=f.FROM_BR,y=e("./get_legend_data"),b=e("./style"),_=e("./helpers");function x(e,t,r,n,a){var i=r.data()[0][0].trace,l={event:a,node:r.node(),curveNumber:i.index,expandedIndex:i._expandedIndex,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:e._fullLayout};i._group&&(l.group=i._group),o.traceIs(i,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(e,"plotly_legendclick",l)&&(1===n?t._clickTimeout=setTimeout((function(){p(r,e,n)}),e._context.doubleClickDelay):2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==s.triggerHandler(e,"plotly_legenddoubleclick",l)&&p(r,e,n)))}function w(e,t){var r=e.data()[0][0],n=t._fullLayout,i=n.legend,s=r.trace,l=o.traceIs(s,"pie-like"),u=s.index,p=t._context.edits.legendText&&!l,f=i._maxNameLength,g=l?r.label:s.name;s._meta&&(g=a.templateString(g,s._meta));var v=a.ensureSingle(e,"text","legendtext");function y(r){d.convertToTspans(r,t,(function(){!function(e,t){var r=e.data()[0][0];if(r.trace.showlegend){var n,a,i=e.select("g[class*=math-group]"),o=i.node(),s=t._fullLayout.legend.font.size*m;if(o){var l=c.bBox(o);n=l.height,a=l.width,c.setTranslate(i,0,n/4)}else{var u=e.select(".legendtext"),p=d.lineCount(u),f=u.node();n=s*p,a=f?c.bBox(f).width:0;var g=s*(.3+(1-p)/2);d.positionText(u,h.textGap,g)}r.lineHeight=s,r.height=Math.max(n,16)+3,r.width=a}else e.remove()}(e,t)}))}v.attr("text-anchor","start").classed("user-select-none",!0).call(c.font,n.legend.font).text(p?k(g,f):g),d.positionText(v,h.textGap,0),p?v.call(d.makeEditable,{gd:t,text:g}).call(y).on("edit",(function(e){this.text(k(e,f)).call(y);var n=r.trace._fullInput||{},i={};if(o.hasTransform(n,"groupby")){var s=o.getTransformIndices(n,"groupby"),l=s[s.length-1],c=a.keyedContainer(n,"transforms["+l+"].styles","target","value.name");c.set(r.trace._group,e),i=c.constructUpdate()}else i.name=e;return o.call("_guiRestyle",t,i,u)})):y(v)}function k(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function M(e,t){var r,i=t._context.doubleClickDelay,o=1,s=a.ensureSingle(e,"rect","legendtoggle",(function(e){e.style("cursor","pointer").attr("pointer-events","all").call(u.fill,"rgba(0,0,0,0)")}));s.on("mousedown",(function(){(r=(new Date).getTime())-t._legendMouseDownTime<i?o+=1:(o=1,t._legendMouseDownTime=r)})),s.on("mouseup",(function(){if(!t._dragged&&!t._editing){var r=t._fullLayout.legend;(new Date).getTime()-t._legendMouseDownTime>i&&(o=Math.max(o-1,1)),x(t,r,e,o,n.event)}}))}function T(e){return a.isRightAnchor(e)?"right":a.isCenterAnchor(e)?"center":"left"}function C(e){return a.isBottomAnchor(e)?"bottom":a.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e){var t=e._fullLayout,r="legend"+t._uid;if(t._infolayer&&e.calcdata){e._legendMouseDownTime||(e._legendMouseDownTime=0);var s=t.legend,d=t.showlegend&&y(e.calcdata,s),p=t.hiddenlabels||[];if(!t.showlegend||!d.length)return t._infolayer.selectAll(".legend").remove(),t._topdefs.select("#"+r).remove(),i.autoMargin(e,"legend");var f=a.ensureSingle(t._infolayer,"g","legend",(function(e){e.attr("pointer-events","all")})),m=a.ensureSingleById(t._topdefs,"clipPath",r,(function(e){e.append("rect")})),k=a.ensureSingle(f,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));k.call(u.stroke,s.bordercolor).call(u.fill,s.bgcolor).style("stroke-width",s.borderwidth+"px");var S=a.ensureSingle(f,"g","scrollbox"),L=a.ensureSingle(f,"rect","scrollbar",(function(e){e.attr(h.scrollBarEnterAttrs).call(u.fill,h.scrollBarColor)})),A=S.selectAll("g.groups").data(d);A.enter().append("g").attr("class","groups"),A.exit().remove();var E=A.selectAll("g.traces").data(a.identity);E.enter().append("g").attr("class","traces"),E.exit().remove(),E.style("opacity",(function(e){var t=e[0].trace;return o.traceIs(t,"pie-like")?-1!==p.indexOf(e[0].label)?.5:1:"legendonly"===t.visible?.5:1})).each((function(){n.select(this).call(w,e)})).call(b,e).each((function(){n.select(this).call(M,e)})),a.syncOrAsync([i.previousPromises,function(){return function(e,t,r){var a=e._fullLayout,i=a.legend,o=a._size,s=_.isVertical(i),l=_.isGrouped(i),u=i.borderwidth,d=2*u,p=h.textGap,f=h.itemGap,m=2*(u+f),g=C(i),v=i.y<0||0===i.y&&"top"===g,y=i.y>1||1===i.y&&"bottom"===g;i._maxHeight=Math.max(v||y?a.height/2:o.h,30);var b=0;if(i._width=0,i._height=0,s)r.each((function(e){var t=e[0].height;c.setTranslate(this,u,f+u+i._height+t/2),i._height+=t,i._width=Math.max(i._width,e[0].width)})),b=p+i._width,i._width+=f+p+d,i._height+=m,l&&(t.each((function(e,t){c.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var x=T(i),w=i.x<0||0===i.x&&"right"===x,k=i.x>1||1===i.x&&"left"===x,M=y||v,S=a.width/2;i._maxWidth=Math.max(w?M&&"left"===x?o.l+o.w:S:k?M&&"right"===x?o.r+o.w:S:o.w,2*p);var L=0,A=0;r.each((function(e){var t=e[0].width+p;L=Math.max(L,t),A+=t})),b=null;var E=0;if(l){var D=0,I=0,P=0;t.each((function(){var e=0,t=0;n.select(this).selectAll("g.traces").each((function(r){var n=r[0].height;c.setTranslate(this,0,f+u+n/2+t),t+=n,e=Math.max(e,p+r[0].width)})),D=Math.max(D,t);var r=e+f;r+u+I>i._maxWidth&&(E=Math.max(E,I),I=0,P+=D+i.tracegroupgap,D=t),c.setTranslate(this,I,P),I+=r})),i._width=Math.max(E,I)+u,i._height=P+D+m}else{var O=r.size(),R=A+d+(O-1)*f<i._maxWidth,F=0,z=0,N=0,j=0;r.each((function(e){var t=e[0].height,r=p+e[0].width,n=(R?r:L)+f;n+u+z>i._maxWidth&&(E=Math.max(E,j),z=0,N+=F,i._height+=F,F=0),c.setTranslate(this,u+z,f+u+t/2+N),j=z+r+f,z+=n,F=Math.max(F,t)})),R?(i._width=z+d,i._height=F+m):(i._width=Math.max(E,j)+d,i._height+=F+m)}}i._width=Math.ceil(i._width),i._height=Math.ceil(i._height),i._effHeight=Math.min(i._height,i._maxHeight);var B=e._context.edits,Y=B.legendText||B.legendPosition;r.each((function(e){var t=n.select(this).select(".legendtoggle"),r=e[0].height,a=Y?p:b||p+e[0].width;s||(a+=f/2),c.setRect(t,0,-r/2,a,r)}))}(e,A,E)},function(){if(!function(e){var t=e._fullLayout.legend,r=T(t),n=C(t);return i.autoMargin(e,"legend",{x:t.x,y:t.y,l:t._width*g[r],r:t._width*v[r],b:t._effHeight*v[n],t:t._effHeight*g[n]})}(e)){var u,d,p,y,b=t._size,_=s.borderwidth,w=b.l+b.w*s.x-g[T(s)]*s._width,M=b.t+b.h*(1-s.y)-g[C(s)]*s._effHeight;if(t.margin.autoexpand){var A=w,E=M;w=a.constrain(w,0,t.width-s._width),M=a.constrain(M,0,t.height-s._effHeight),w!==A&&a.log("Constrain legend.x to make legend fit inside graph"),M!==E&&a.log("Constrain legend.y to make legend fit inside graph")}if(c.setTranslate(f,w,M),L.on(".drag",null),f.on("wheel",null),s._height<=s._maxHeight||e._context.staticPlot)k.attr({width:s._width-_,height:s._effHeight-_,x:_/2,y:_/2}),c.setTranslate(S,0,0),m.select("rect").attr({width:s._width-2*_,height:s._effHeight-2*_,x:_,y:_}),c.setClipUrl(S,r,e),c.setRect(L,0,0,0,0),delete s._scrollY;else{var D,I,P,O=Math.max(h.scrollBarMinHeight,s._effHeight*s._effHeight/s._height),R=s._effHeight-O-2*h.scrollBarMargin,F=s._height-s._effHeight,z=R/F,N=Math.min(s._scrollY||0,F);k.attr({width:s._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:s._effHeight-_,x:_/2,y:_/2}),m.select("rect").attr({width:s._width-2*_+h.scrollBarWidth+h.scrollBarMargin,height:s._effHeight-2*_,x:_,y:_+N}),c.setClipUrl(S,r,e),Y(N,O,z),f.on("wheel",(function(){Y(N=a.constrain(s._scrollY+n.event.deltaY/R*F,0,F),O,z),0!==N&&N!==F&&n.event.preventDefault()}));var j=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;D="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,P=N})).on("drag",(function(){var e=n.event.sourceEvent;2===e.buttons||e.ctrlKey||(I="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,Y(N=function(e,t,r){var n=(r-t)/z+e;return a.constrain(n,0,F)}(P,D,I),O,z))}));L.call(j);var B=n.behavior.drag().on("dragstart",(function(){var e=n.event.sourceEvent;"touchstart"===e.type&&(D=e.changedTouches[0].clientY,P=N)})).on("drag",(function(){var e=n.event.sourceEvent;"touchmove"===e.type&&(I=e.changedTouches[0].clientY,Y(N=function(e,t,r){var n=(t-r)/z+e;return a.constrain(n,0,F)}(P,D,I),O,z))}));S.call(B)}e._context.edits.legendPosition&&(f.classed("cursor-move",!0),l.init({element:f.node(),gd:e,prepFn:function(){var e=c.getTranslate(f);p=e.x,y=e.y},moveFn:function(e,t){var r=p+e,n=y+t;c.setTranslate(f,r,n),u=l.align(r,0,b.l,b.l+b.w,s.xanchor),d=l.align(n,0,b.t+b.h,b.t,s.yanchor)},doneFn:function(){void 0!==u&&void 0!==d&&o.call("_guiRelayout",e,{"legend.x":u,"legend.y":d})},clickFn:function(r,n){var a=t._infolayer.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return n.clientX>=e.left&&n.clientX<=e.right&&n.clientY>=e.top&&n.clientY<=e.bottom}));a.size()>0&&x(e,f,a,r,n)}}))}function Y(t,r,n){s._scrollY=e._fullLayout.legend._scrollY=t,c.setTranslate(S,0,-t),c.setRect(L,s._width,h.scrollBarMargin+t*n,h.scrollBarWidth,r),m.select("rect").attr("y",_+t)}}],e)}}},{"../../constants/alignment":685,"../../lib":716,"../../lib/events":706,"../../lib/svg_text_utils":740,"../../plots/plots":825,"../../registry":845,"../color":591,"../dragelement":609,"../drawing":612,"./constants":640,"./get_legend_data":643,"./handle_click":644,"./helpers":645,"./style":647,d3:164}],643:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("./helpers");t.exports=function(e,t){var r,i,o={},s=[],l=!1,c={},u=0,d=0;function p(e,r){if(""!==e&&a.isGrouped(t))-1===s.indexOf(e)?(s.push(e),l=!0,o[e]=[[r]]):o[e].push([r]);else{var n="~~i"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r<e.length;r++){var h=e[r],f=h[0],m=f.trace,g=m.legendgroup;if(m.visible&&m.showlegend)if(n.traceIs(m,"pie-like"))for(c[g]||(c[g]={}),i=0;i<h.length;i++){var v=h[i].label;c[g][v]||(p(g,{label:v,color:h[i].color,i:h[i].i,trace:m,pts:h[i].pts}),c[g][v]=!0,d=Math.max(d,(v||"").length))}else p(g,f),d=Math.max(d,(m.name||"").length)}if(!s.length)return[];var y,b,_=s.length;if(l&&a.isGrouped(t))for(b=new Array(_),r=0;r<_;r++)y=o[s[r]],b[r]=a.isReversed(t)?y.reverse():y;else{for(b=[new Array(_)],r=0;r<_;r++)y=o[s[r]][0],b[0][a.isReversed(t)?_-r-1:r]=y;_=1}return t._lgroupsLength=_,t._maxNameLength=d,b}},{"../../registry":845,"./helpers":645}],644:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=!0;t.exports=function(e,t,r){var o=t._fullLayout;if(!t._dragged&&!t._editing){var s,l=o.legend.itemclick,c=o.legend.itemdoubleclick;if(1===r&&"toggle"===l&&"toggleothers"===c&&i&&t.data&&t._context.showTips?(n.notifier(n._(t,"Double-click on legend to isolate one trace"),"long"),i=!1):i=!1,1===r?s=l:2===r&&(s=c),s){var u,d,p,h,f,m=o.hiddenlabels?o.hiddenlabels.slice():[],g=e.data()[0][0],v=t._fullData,y=g.trace,b=y.legendgroup,_={},x=[],w=[],k=[];if(a.traceIs(y,"pie-like")){var M=g.label,T=m.indexOf(M);"toggle"===s?-1===T?m.push(M):m.splice(T,1):"toggleothers"===s&&(m=[],t.calcdata[0].forEach((function(e){M!==e.label&&m.push(e.label)})),t._fullLayout.hiddenlabels&&t._fullLayout.hiddenlabels.length===m.length&&-1===T&&(m=[])),a.call("_guiRelayout",t,"hiddenlabels",m)}else{var C,S=b&&b.length,L=[];if(S)for(u=0;u<v.length;u++)(C=v[u]).visible&&C.legendgroup===b&&L.push(u);if("toggle"===s){var A;switch(y.visible){case!0:A="legendonly";break;case!1:A=!1;break;case"legendonly":A=!0}if(S)for(u=0;u<v.length;u++)!1!==v[u].visible&&v[u].legendgroup===b&&F(v[u],A);else F(y,A)}else if("toggleothers"===s){var E,D,I=!0;for(u=0;u<v.length;u++)if(v[u]!==y&&!(E=S&&v[u].legendgroup===b)&&!0===v[u].visible&&!a.traceIs(v[u],"notLegendIsolatable")){I=!1;break}for(u=0;u<v.length;u++)if(!1!==v[u].visible&&!a.traceIs(v[u],"notLegendIsolatable"))switch(y.visible){case"legendonly":F(v[u],!0);break;case!0:D=!!I||"legendonly",E=v[u]===y||S&&v[u].legendgroup===b,F(v[u],!!E||D)}}for(u=0;u<w.length;u++)if(p=w[u]){var P=p.constructUpdate(),O=Object.keys(P);for(d=0;d<O.length;d++)h=O[d],(_[h]=_[h]||[])[k[u]]=P[h]}for(f=Object.keys(_),u=0;u<f.length;u++)for(h=f[u],d=0;d<x.length;d++)_[h].hasOwnProperty(d)||(_[h][d]=void 0);a.call("_guiRestyle",t,_,x)}}}function R(e,t,r){var n=x.indexOf(e),a=_[t];return a||(a=_[t]=[]),-1===x.indexOf(e)&&(x.push(e),n=x.length-1),a[n]=r,n}function F(e,t){var r=e._fullInput;if(a.hasTransform(r,"groupby")){var i=w[r.index];if(!i){var o=a.getTransformIndices(r,"groupby"),s=o[o.length-1];i=n.keyedContainer(r,"transforms["+s+"].styles","target","value.visible"),w[r.index]=i}var l=i.get(e._group);void 0===l&&(l=!0),!1!==l&&i.set(e._group,t),k[r.index]=R(r.index,"visible",!1!==r.visible)}else{var c=!1!==r.visible&&t;R(r.index,"visible",c)}}}},{"../../lib":716,"../../registry":845}],645:[function(e,t,r){"use strict";r.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},r.isVertical=function(e){return"h"!==e.orientation},r.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},{}],646:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"legend",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),draw:e("./draw"),style:e("./style")}},{"./attributes":639,"./defaults":641,"./draw":642,"./style":647}],647:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../lib"),o=e("../drawing"),s=e("../color"),l=e("../colorscale/helpers").extractOpts,c=e("../../traces/scatter/subtypes"),u=e("../../traces/pie/style_one"),d=e("../../traces/pie/helpers").castOption,p=12,h=5,f=2,m=10,g=5;function v(e){return e?"horizontal":"horizontalreversed"}t.exports=function(e,t){var r=t._fullLayout.legend,y="constant"===r.itemsizing,b=function(e,t,r,n){var a;if(e+1)a=e;else{if(!(t&&t.width>0))return 0;a=t.width}return y?n:Math.min(a,r)};function _(e,t,r){var i=e[0].trace,o=i.marker||{},l=o.line||{},c=r?i.visible&&i.type===r:a.traceIs(i,"bar"),u=n.select(t).select("g.legendpoints").selectAll("path.legend"+r).data(c?[e]:[]);u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),u.exit().remove(),u.each((function(e){var t=n.select(this),r=e[0],a=b(r.mlw,o.line,g,f);t.style("stroke-width",a+"px").call(s.fill,r.mc||o.color),a&&s.stroke(t,r.mlc||l.color)}))}function x(e,t,r){var o=e[0],s=o.trace,l=r?s.visible&&s.type===r:a.traceIs(s,r),c=n.select(t).select("g.legendpoints").selectAll("path.legend"+r).data(l?[e]:[]);if(c.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),c.exit().remove(),c.size()){var p=(s.marker||{}).line,h=b(d(p.width,o.pts),p,g,f),m=i.minExtend(s,{marker:{line:{width:h}}});m.marker.line.color=p.color;var v=i.minExtend(o,{trace:m});u(c,v,m)}}e.each((function(e){var t=n.select(this),a=i.ensureSingle(t,"g","layers");a.style("opacity",e[0].trace.opacity);var o=r.valign,s=e[0].lineHeight,l=e[0].height;if("middle"!==o&&s&&l){var c={top:1,bottom:-1}[o]*(.5*(s-l+3));a.attr("transform","translate(0,"+c+")")}else a.attr("transform",null);a.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var u=a.selectAll("g.legendsymbols").data([e]);u.enter().append("g").classed("legendsymbols",!0),u.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var t=e[0].trace,r=[];t.visible&&"waterfall"===t.type&&(r=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var a=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(r);a.enter().append("path").classed("legendwaterfall",!0).attr("transform","translate(20,0)").style("stroke-miterlimit",1),a.exit().remove(),a.each((function(e){var r=n.select(this),a=t[e[0]].marker,i=b(void 0,a.line,g,f);r.attr("d",e[1]).style("stroke-width",i+"px").call(s.fill,a.color),i&&r.call(s.stroke,a.line.color)}))})).each((function(e){_(e,this,"funnel")})).each((function(e){_(e,this)})).each((function(e){var r=e[0].trace,l=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&a.traceIs(r,"box-violin")?[e]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform","translate(20,0)"),l.exit().remove(),l.each((function(){var e=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==s.opacity(r.fillcolor)||0!==s.opacity((r.line||{}).color)){var a=b(void 0,r.line,g,f);e.style("stroke-width",a+"px").call(s.fill,r.fillcolor),a&&s.stroke(e,r.line.color)}else{var c=i.minExtend(r,{marker:{size:y?p:i.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,t)}}))})).each((function(e){x(e,this,"funnelarea")})).each((function(e){x(e,this,"pie")})).each((function(e){var r,a,s=e[0],u=s.trace,d=u.visible&&u.fill&&"none"!==u.fill,p=c.hasLines(u),f=u.contours,g=!1,y=!1,_=l(u),x=_.colorscale,w=_.reversescale;if(f){var k=f.coloring;"lines"===k?g=!0:p="none"===k||"heatmap"===k||f.showlines,"constraint"===f.type?d="="!==f._operation:"fill"!==k&&"heatmap"!==k||(y=!0)}var M=c.hasMarkers(u)||c.hasText(u),T=d||y,C=p||g,S=M||!T?"M5,0":C?"M5,-2":"M5,-3",L=n.select(this),A=L.select(".legendfill").selectAll("path").data(d||y?[e]:[]);if(A.enter().append("path").classed("js-fill",!0),A.exit().remove(),A.attr("d",S+"h30v6h-30z").call(d?o.fillGroupStyle:function(e){if(e.size()){var r="legendfill-"+u.uid;o.gradient(e,t,r,v(w),x,"fill")}}),p||g){var E=b(void 0,u.line,m,h);a=i.minExtend(u,{line:{width:E}}),r=[i.minExtend(s,{trace:a})]}var D=L.select(".legendlines").selectAll("path").data(p||g?[r]:[]);D.enter().append("path").classed("js-line",!0),D.exit().remove(),D.attr("d",S+(g?"l30,0.0001":"h30")).call(p?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+u.uid;o.lineGroupStyle(e),o.gradient(e,t,r,v(w),x,"stroke")}})})).each((function(e){var r,a,s=e[0],l=s.trace,u=c.hasMarkers(l),d=c.hasText(l),m=c.hasLines(l);function g(e,t,r,n){var a=i.nestedProperty(l,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(y&&o&&void 0!==n&&(o=n),r){if(o<r[0])return r[0];if(o>r[1])return r[1]}return o}function v(e){return e[0]}if(u||d||m){var b={},_={};if(u){b.mc=g("marker.color",v),b.mx=g("marker.symbol",v),b.mo=g("marker.opacity",i.mean,[.2,1]),b.mlc=g("marker.line.color",v),b.mlw=g("marker.line.width",i.mean,[0,5],f),_.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var x=g("marker.size",i.mean,[2,16],p);b.ms=x,_.marker.size=x}m&&(_.line={width:g("line.width",v,[0,10],h)}),d&&(b.tx="Aa",b.tp=g("textposition",v),b.ts=10,b.tc=g("textfont.color",v),b.tf=g("textfont.family",v)),r=[i.minExtend(s,b)],(a=i.minExtend(l,_)).selectedpoints=null,a.texttemplate=null}var w=n.select(this).select("g.legendpoints"),k=w.selectAll("path.scatterpts").data(u?r:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform","translate(20,0)"),k.exit().remove(),k.call(o.pointStyle,a,t),u&&(r[0].mrc=3);var M=w.selectAll("g.pointtext").data(d?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform","translate(20,0)"),M.exit().remove(),M.selectAll("text").call(o.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],o=b(void 0,i.line,g,f);a.style("stroke-width",o+"px").call(s.fill,i.fillcolor),o&&s.stroke(a,i.line.color)}))})).each((function(e){var t=e[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform","translate(20,0)").style("stroke-miterlimit",1),r.exit().remove(),r.each((function(e,r){var a=n.select(this),i=t[r?"increasing":"decreasing"],l=b(void 0,i.line,g,f);a.style("fill","none").call(o.dashLine,i.line.dash,l),l&&s.stroke(a,i.line.color)}))}))}},{"../../lib":716,"../../registry":845,"../../traces/pie/helpers":1097,"../../traces/pie/style_one":1103,"../../traces/scatter/subtypes":1142,"../color":591,"../colorscale/helpers":602,"../drawing":612,d3:164}],648:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../plots/plots"),i=e("../../plots/cartesian/axis_ids"),o=e("../../lib"),s=e("../../fonts/ploticon"),l=o._,c=t.exports={};function u(e,t){var r,a,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},d=i.list(e,null,!0),p=c._cartesianSpikesEnabled;if("zoom"===s){var h,f="in"===l?.5:2,m=(1+f)/2,g=(1-f)/2;for(a=0;a<d.length;a++)if(!(r=d[a]).fixedrange)if(h=r._name,"auto"===l)u[h+".autorange"]=!0;else if("reset"===l){if(void 0===r._rangeInitial)u[h+".autorange"]=!0;else{var v=r._rangeInitial.slice();u[h+".range[0]"]=v[0],u[h+".range[1]"]=v[1]}void 0!==r._showSpikeInitial&&(u[h+".showspikes"]=r._showSpikeInitial,"on"!==p||r._showSpikeInitial||(p="off"))}else{var y=[r.r2l(r.range[0]),r.r2l(r.range[1])],b=[m*y[0]+g*y[1],m*y[1]+g*y[0]];u[h+".range[0]"]=r.l2r(b[0]),u[h+".range[1]"]=r.l2r(b[1])}}else"hovermode"!==s||"x"!==l&&"y"!==l||(l=c._isHoriz?"y":"x",o.setAttribute("data-val",l)),u[s]=l;c._cartesianSpikesEnabled=p,n.call("_guiRelayout",e,u)}function d(e,t){for(var r=t.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,o=e._fullLayout._subplots.gl3d,s={},l=a.split("."),c=0;c<o.length;c++)s[o[c]+"."+l[1]]=i;var u="pan"===i?i:"zoom";s.dragmode=u,n.call("_guiRelayout",e,s)}function p(e,t){for(var r=t.currentTarget.getAttribute("data-attr"),a=e._fullLayout,i=a._subplots.gl3d||[],o={},s=0;s<i.length;s++){var l,c=i[s],u=c+".camera",d=c+".aspectratio",p=a[c]._scene;"resetLastSave"===r?(o[u+".up"]=p.viewInitial.up,o[u+".eye"]=p.viewInitial.eye,o[u+".center"]=p.viewInitial.center,l=!0):"resetDefault"===r&&(o[u+".up"]=null,o[u+".eye"]=null,o[u+".center"]=null,l=!0),l&&(o[d+".x"]=p.viewInitial.aspectratio.x,o[d+".y"]=p.viewInitial.aspectratio.y,o[d+".z"]=p.viewInitial.aspectratio.z)}n.call("_guiRelayout",e,o)}function h(e,t){var r=t.currentTarget,n=r._previousVal,a=e._fullLayout,i=a._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],s={},l={};if(n)l=n,r._previousVal=null;else{for(var c=0;c<i.length;c++){var u=i[c],d=a[u],p=u+".hovermode";s[p]=d.hovermode,l[p]=!1;for(var h=0;h<3;h++){var f=o[h],m=u+"."+f+".showspikes";l[m]=!1,s[m]=d[f].showspikes}}r._previousVal=s}return l}function f(e,t){for(var r=t.currentTarget,a=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,o=e._fullLayout,s=o._subplots.geo,l=0;l<s.length;l++){var c=s[l],u=o[c];if("zoom"===a){var d=u.projection.scale,p="in"===i?2*d:.5*d;n.call("_guiRelayout",e,c+".projection.scale",p)}else"reset"===a&&v(e,"geo")}}function m(e){var t=e._fullLayout;return!t.hovermode&&(t._has("cartesian")?t._isHoriz?"y":"x":"closest")}function g(e){var t=m(e);n.call("_guiRelayout",e,"hovermode",t)}function v(e,t){for(var r=e._fullLayout,a=r._subplots[t]||[],i={},o=0;o<a.length;o++)for(var s=a[o],l=r[s]._subplot.viewInitial,c=Object.keys(l),u=0;u<c.length;u++){var d=c[u];i[s+"."+d]=l[d]}n.call("_guiRelayout",e,i)}c.toImage={name:"toImage",title:function(e){var t=(e._context.toImageButtonOptions||{}).format||"png";return l(e,"png"===t?"Download plot as a png":"Download plot")},icon:s.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};o.notifier(l(e,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==r.format&&o.isIE()&&(o.notifier(l(e,"IE only supports svg.  Changing format to svg."),"long"),r.format="svg"),["filename","width","height","scale"].forEach((function(e){e in t&&(r[e]=t[e])})),n.call("downloadImage",e,r).then((function(t){o.notifier(l(e,"Snapshot succeeded")+" - "+t,"long")})).catch((function(){o.notifier(l(e,"Sorry, there was a problem downloading your snapshot!"),"long")}))}},c.sendDataToCloud={name:"sendDataToCloud",title:function(e){return l(e,"Edit in Chart Studio")},icon:s.disk,click:function(e){a.sendDataToCloud(e)}},c.editInChartStudio={name:"editInChartStudio",title:function(e){return l(e,"Edit in Chart Studio")},icon:s.pencil,click:function(e){a.sendDataToCloud(e)}},c.zoom2d={name:"zoom2d",title:function(e){return l(e,"Zoom")},attr:"dragmode",val:"zoom",icon:s.zoombox,click:u},c.pan2d={name:"pan2d",title:function(e){return l(e,"Pan")},attr:"dragmode",val:"pan",icon:s.pan,click:u},c.select2d={name:"select2d",title:function(e){return l(e,"Box Select")},attr:"dragmode",val:"select",icon:s.selectbox,click:u},c.lasso2d={name:"lasso2d",title:function(e){return l(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:s.lasso,click:u},c.zoomIn2d={name:"zoomIn2d",title:function(e){return l(e,"Zoom in")},attr:"zoom",val:"in",icon:s.zoom_plus,click:u},c.zoomOut2d={name:"zoomOut2d",title:function(e){return l(e,"Zoom out")},attr:"zoom",val:"out",icon:s.zoom_minus,click:u},c.autoScale2d={name:"autoScale2d",title:function(e){return l(e,"Autoscale")},attr:"zoom",val:"auto",icon:s.autoscale,click:u},c.resetScale2d={name:"resetScale2d",title:function(e){return l(e,"Reset axes")},attr:"zoom",val:"reset",icon:s.home,click:u},c.hoverClosestCartesian={name:"hoverClosestCartesian",title:function(e){return l(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:s.tooltip_basic,gravity:"ne",click:u},c.hoverCompareCartesian={name:"hoverCompareCartesian",title:function(e){return l(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:s.tooltip_compare,gravity:"ne",click:u},c.zoom3d={name:"zoom3d",title:function(e){return l(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:s.zoombox,click:d},c.pan3d={name:"pan3d",title:function(e){return l(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:s.pan,click:d},c.orbitRotation={name:"orbitRotation",title:function(e){return l(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:s["3d_rotate"],click:d},c.tableRotation={name:"tableRotation",title:function(e){return l(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:s["z-axis"],click:d},c.resetCameraDefault3d={name:"resetCameraDefault3d",title:function(e){return l(e,"Reset camera to default")},attr:"resetDefault",icon:s.home,click:p},c.resetCameraLastSave3d={name:"resetCameraLastSave3d",title:function(e){return l(e,"Reset camera to last save")},attr:"resetLastSave",icon:s.movie,click:p},c.hoverClosest3d={name:"hoverClosest3d",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:s.tooltip_basic,gravity:"ne",click:function(e,t){var r=h(e,t);n.call("_guiRelayout",e,r)}},c.zoomInGeo={name:"zoomInGeo",title:function(e){return l(e,"Zoom in")},attr:"zoom",val:"in",icon:s.zoom_plus,click:f},c.zoomOutGeo={name:"zoomOutGeo",title:function(e){return l(e,"Zoom out")},attr:"zoom",val:"out",icon:s.zoom_minus,click:f},c.resetGeo={name:"resetGeo",title:function(e){return l(e,"Reset")},attr:"reset",val:null,icon:s.autoscale,click:f},c.hoverClosestGeo={name:"hoverClosestGeo",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:s.tooltip_basic,gravity:"ne",click:g},c.hoverClosestGl2d={name:"hoverClosestGl2d",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:s.tooltip_basic,gravity:"ne",click:g},c.hoverClosestPie={name:"hoverClosestPie",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:s.tooltip_basic,gravity:"ne",click:g},c.resetViewSankey={name:"resetSankeyGroup",title:function(e){return l(e,"Reset view")},icon:s.home,click:function(e){for(var t={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<e._fullData.length;r++){var a=e._fullData[r]._viewInitial;t["node.groups"].push(a.node.groups.slice()),t["node.x"].push(a.node.x.slice()),t["node.y"].push(a.node.y.slice())}n.call("restyle",e,t)}},c.toggleHover={name:"toggleHover",title:function(e){return l(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:s.tooltip_basic,gravity:"ne",click:function(e,t){var r=h(e,t);r.hovermode=m(e),n.call("_guiRelayout",e,r)}},c.resetViews={name:"resetViews",title:function(e){return l(e,"Reset views")},icon:s.home,click:function(e,t){var r=t.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),u(e,t),r.setAttribute("data-attr","resetLastSave"),p(e,t),v(e,"geo"),v(e,"mapbox")}},c.toggleSpikelines={name:"toggleSpikelines",title:function(e){return l(e,"Toggle Spike Lines")},icon:s.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(e){var t=e._fullLayout,r=t._cartesianSpikesEnabled;t._cartesianSpikesEnabled="on"===r?"off":"on",n.call("_guiRelayout",e,function(e){for(var t="on"===e._fullLayout._cartesianSpikesEnabled,r=i.list(e,null,!0),n={},a=0;a<r.length;a++){var o=r[a];n[o._name+".showspikes"]=!!t||o._showSpikeInitial}return n}(e))}},c.resetViewMapbox={name:"resetViewMapbox",title:function(e){return l(e,"Reset view")},attr:"reset",icon:s.home,click:function(e){v(e,"mapbox")}}},{"../../fonts/ploticon":696,"../../lib":716,"../../plots/cartesian/axis_ids":767,"../../plots/plots":825,"../../registry":845}],649:[function(e,t,r){"use strict";r.manage=e("./manage")},{"./manage":650}],650:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axis_ids"),a=e("../../traces/scatter/subtypes"),i=e("../../registry"),o=e("./modebar"),s=e("./buttons");t.exports=function(e){var t=e._fullLayout,r=e._context,l=t._modeBar;if(r.displayModeBar||r.watermark){if(!Array.isArray(r.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(r.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var c,u=r.modeBarButtons;c=Array.isArray(u)&&u.length?function(e){for(var t=0;t<e.length;t++)for(var r=e[t],n=0;n<r.length;n++){var a=r[n];if("string"==typeof a){if(void 0===s[a])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));e[t][n]=s[a]}}return e}(u):!r.displayModeBar&&r.watermark?[]:function(e){var t=e._fullLayout,r=e._fullData,o=e._context,l=o.modeBarButtonsToRemove,c=o.modeBarButtonsToAdd,u=t._has("cartesian"),d=t._has("gl3d"),p=t._has("geo"),h=t._has("pie"),f=t._has("funnelarea"),m=t._has("gl2d"),g=t._has("ternary"),v=t._has("mapbox"),y=t._has("polar"),b=t._has("sankey"),_=function(e){for(var t=n.list({_fullLayout:e},null,!0),r=0;r<t.length;r++)if(!t[r].fixedrange)return!1;return!0}(t),x=[];function w(e){if(e.length){for(var t=[],r=0;r<e.length;r++){var n=e[r];-1===l.indexOf(n)&&t.push(s[n])}x.push(t)}}var k=["toImage"];o.showEditInChartStudio?k.push("editInChartStudio"):o.showSendToCloud&&k.push("sendDataToCloud"),w(k);var M=[],T=[],C=[],S=[];return(u||m||h||f||g)+p+d+v+y>1?(T=["toggleHover"],C=["resetViews"]):p?(M=["zoomInGeo","zoomOutGeo"],T=["hoverClosestGeo"],C=["resetGeo"]):d?(T=["hoverClosest3d"],C=["resetCameraDefault3d","resetCameraLastSave3d"]):v?(T=["toggleHover"],C=["resetViewMapbox"]):m?T=["hoverClosestGl2d"]:h?T=["hoverClosestPie"]:b?(T=["hoverClosestCartesian","hoverCompareCartesian"],C=["resetViewSankey"]):T=["toggleHover"],u&&(T=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),function(e){for(var t=0;t<e.length;t++)if(!i.traceIs(e[t],"noHover"))return!1;return!0}(r)&&(T=[]),!u&&!m||_||(M=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==C[0]&&(C=["resetScale2d"])),d?S=["zoom3d","pan3d","orbitRotation","tableRotation"]:(u||m)&&!_||g?S=["zoom2d","pan2d"]:v||p?S=["pan2d"]:y&&(S=["zoom2d"]),function(e){for(var t=!1,r=0;r<e.length&&!t;r++){var n=e[r];n._module&&n._module.selectPoints&&(i.traceIs(n,"scatter-like")?(a.hasMarkers(n)||a.hasText(n))&&(t=!0):i.traceIs(n,"box-violin")&&"all"!==n.boxpoints&&"all"!==n.points||(t=!0))}return t}(r)&&S.push("select2d","lasso2d"),w(S),w(M.concat(C)),w(T),function(e,t){if(t.length)if(Array.isArray(t[0]))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t);return e}(x,c)}(e),l?l.update(e,c):t._modeBar=o(e,c)}else l&&(l.destroy(),delete t._modeBar)}},{"../../plots/cartesian/axis_ids":767,"../../registry":845,"../../traces/scatter/subtypes":1142,"./buttons":648,"./modebar":651}],651:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../fonts/ploticon"),s=new DOMParser;function l(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var c=l.prototype;c.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=n.modebar,s="hover"===r.displayModeBar?".js-plotly-plot .plotly:hover ":"";i.deleteRelatedStyleRule(a),i.addRelatedStyleRule(a,s+"#"+a+" .modebar-group","background-color: "+o.bgcolor),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn .icon path","fill: "+o.color),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn:hover .icon path","fill: "+o.activecolor),i.addRelatedStyleRule(a,"#"+a+" .modebar-btn.active .icon path","fill: "+o.activecolor);var l=!this.hasButtons(t),c=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(l||c||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var d=this.getLogo();r.watermark&&(d.className=d.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(d,this.element.childNodes[0]):this.element.appendChild(d),this.hasLogo=!0}this.updateActiveButton()},c.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach((function(e){var r=t.createGroup();e.forEach((function(e){var n=e.name;if(!n)throw new Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(n))throw new Error("button name '"+n+"' is taken");t.buttonsNames.push(n);var a=t.createButton(e);t.buttonElements.push(a),r.appendChild(a)})),t.element.appendChild(r)}))},c.createGroup=function(){var e=document.createElement("div");return e.className="modebar-group",e},c.createButton=function(e){var t=this,r=document.createElement("a");r.setAttribute("rel","tooltip"),r.className="modebar-btn";var a=e.title;void 0===a?a=e.name:"function"==typeof a&&(a=a(this.graphInfo)),(a||0===a)&&r.setAttribute("data-title",a),void 0!==e.attr&&r.setAttribute("data-attr",e.attr);var i=e.val;if(void 0!==i&&("function"==typeof i&&(i=i(this.graphInfo)),r.setAttribute("data-val",i)),"function"!=typeof e.click)throw new Error("must provide button 'click' function in button config");r.addEventListener("click",(function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)})),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&n.select(r).classed("active",!0);var s=e.icon;return"function"==typeof s?r.appendChild(s()):r.appendChild(this.createIcon(s||o.question)),r.setAttribute("data-gravity",e.gravity||"n"),r},c.createIcon=function(e){var t,r=a(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",[0,0,e.width,r].join(" ")),t.setAttribute("class","icon");var i=document.createElementNS(n,"path");i.setAttribute("d",e.path),e.transform?i.setAttribute("transform",e.transform):void 0!==e.ascent&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(i)}return e.svg&&(t=s.parseFromString(e.svg,"application/xml").childNodes[0]),t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},c.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach((function(e){var a=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=n.select(e);if(s)o===r&&l.classed("active",!l.classed("active"));else{var c=null===o?o:i.nestedProperty(t,o).get();l.classed("active",c===a)}}))},c.hasButtons=function(e){var t=this.buttons;if(!t)return!1;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;n<e[r].length;n++)if(e[r][n].name!==t[r][n].name)return!1}return!0},c.getLogo=function(){var e=this.createGroup(),t=document.createElement("a");return t.href="https://plot.ly/",t.target="_blank",t.setAttribute("data-title",i._(this.graphInfo,"Produced with Plotly")),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(o.newplotlylogo)),e.appendChild(t),e},c.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},c.destroy=function(){i.removeElement(this.container.querySelector(".modebar")),i.deleteRelatedStyleRule(this._uid)},t.exports=function(e,t){var r=e._fullLayout,a=new l({graphInfo:e,container:r._modebardiv.node(),buttons:t});return r._privateplot&&n.select(a.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),a}},{"../../fonts/ploticon":696,"../../lib":716,d3:164,"fast-isnumeric":227}],652:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../color/attributes"),i=(0,e("../../plot_api/plot_template").templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});t.exports={visible:{valType:"boolean",editType:"plot"},buttons:i,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:n({editType:"plot"}),bgcolor:{valType:"color",dflt:a.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:a.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},{"../../plot_api/plot_template":754,"../../plots/font_attributes":790,"../color/attributes":590}],653:[function(e,t,r){"use strict";t.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},{}],654:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../color"),i=e("../../plot_api/plot_template"),o=e("../../plots/array_container_defaults"),s=e("./attributes"),l=e("./constants");function c(e,t,r,a){var i=a.calendar;function o(r,a){return n.coerce(e,t,s.buttons,r,a)}if(o("visible")){var l=o("step");"all"!==l&&(!i||"gregorian"===i||"month"!==l&&"year"!==l?o("stepmode"):t.stepmode="backward",o("count")),o("label")}}t.exports=function(e,t,r,u,d){var p=e.rangeselector||{},h=i.newContainer(t,"rangeselector");function f(e,t){return n.coerce(p,h,s,e,t)}if(f("visible",o(p,h,{name:"buttons",handleItemDefaults:c,calendar:d}).length>0)){var m=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),a=0,i=0;i<n.length;i++){var o=t[n[i]].domain;o&&(a=Math.max(o[1],a))}return[e.domain[0],a+l.yPad]}(t,r,u);f("x",m[0]),f("y",m[1]),n.noneOrAll(e,t,["x","y"]),f("xanchor"),f("yanchor"),n.coerceFont(f,"font",r.font);var g=f("bgcolor");f("activecolor",a.contrast(g,l.lightAmount,l.darkAmount)),f("bordercolor"),f("borderwidth")}}},{"../../lib":716,"../../plot_api/plot_template":754,"../../plots/array_container_defaults":760,"../color":591,"./attributes":652,"./constants":653}],655:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../color"),s=e("../drawing"),l=e("../../lib"),c=e("../../lib/svg_text_utils"),u=e("../../plots/cartesian/axis_ids"),d=e("../../constants/alignment"),p=d.LINE_SPACING,h=d.FROM_TL,f=d.FROM_BR,m=e("./constants"),g=e("./get_update_object");function v(e){return e._id}function y(e,t,r){var n=l.ensureSingle(e,"rect","selector-rect",(function(e){e.attr("shape-rendering","crispEdges")}));n.attr({rx:m.rx,ry:m.ry}),n.call(o.stroke,t.bordercolor).call(o.fill,function(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}(t,r)).style("stroke-width",t.borderwidth+"px")}function b(e,t,r,n){var a,i;l.ensureSingle(e,"text","selector-text",(function(e){e.classed("user-select-none",!0).attr("text-anchor","middle")})).call(s.font,t.font).text((a=r,i=n._fullLayout._meta,a.label?i?l.templateString(a.label,i):a.label:"all"===a.step?"all":a.count+a.step.charAt(0))).call((function(e){c.convertToTspans(e,n)}))}t.exports=function(e){var t=e._fullLayout._infolayer.selectAll(".rangeselector").data(function(e){for(var t=u.list(e,"x",!0),r=[],n=0;n<t.length;n++){var a=t[n];a.rangeselector&&a.rangeselector.visible&&r.push(a)}return r}(e),v);t.enter().append("g").classed("rangeselector",!0),t.exit().remove(),t.style({cursor:"pointer","pointer-events":"all"}),t.each((function(t){var r=n.select(this),o=t,u=o.rangeselector,d=r.selectAll("g.button").data(l.filterVisible(u.buttons));d.enter().append("g").classed("button",!0),d.exit().remove(),d.each((function(t){var r=n.select(this),i=g(o,t);t._isActive=function(e,t,r){if("all"===t.step)return!0===e.autorange;var n=Object.keys(r);return e.range[0]===r[n[0]]&&e.range[1]===r[n[1]]}(o,t,i),r.call(y,u,t),r.call(b,u,t,e),r.on("click",(function(){e._dragged||a.call("_guiRelayout",e,i)})),r.on("mouseover",(function(){t._isHovered=!0,r.call(y,u,t)})),r.on("mouseout",(function(){t._isHovered=!1,r.call(y,u,t)}))})),function(e,t,r,a,o){var u=0,d=0,g=r.borderwidth;t.each((function(){var e=n.select(this).select(".selector-text"),t=r.font.size*p,a=Math.max(t*c.lineCount(e),16)+3;d=Math.max(d,a)})),t.each((function(){var e=n.select(this),t=e.select(".selector-rect"),a=e.select(".selector-text"),i=a.node()&&s.bBox(a.node()).width,o=r.font.size*p,l=c.lineCount(a),h=Math.max(i+10,m.minButtonWidth);e.attr("transform","translate("+(g+u)+","+g+")"),t.attr({x:0,y:0,width:h,height:d}),c.positionText(a,h/2,d/2-(l-1)*o/2+3),u+=h+5}));var v=e._fullLayout._size,y=v.l+v.w*r.x,b=v.t+v.h*(1-r.y),_="left";l.isRightAnchor(r)&&(y-=u,_="right"),l.isCenterAnchor(r)&&(y-=u/2,_="center");var x="top";l.isBottomAnchor(r)&&(b-=d,x="bottom"),l.isMiddleAnchor(r)&&(b-=d/2,x="middle"),u=Math.ceil(u),d=Math.ceil(d),y=Math.round(y),b=Math.round(b),i.autoMargin(e,a+"-range-selector",{x:r.x,y:r.y,l:u*h[_],r:u*f[_],b:d*f[x],t:d*h[x]}),o.attr("transform","translate("+y+","+b+")")}(e,d,u,o._name,r)}))}},{"../../constants/alignment":685,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/cartesian/axis_ids":767,"../../plots/plots":825,"../../registry":845,"../color":591,"../drawing":612,"./constants":653,"./get_update_object":656,d3:164}],656:[function(e,t,r){"use strict";var n=e("d3");t.exports=function(e,t){var r=e._name,a={};if("all"===t.step)a[r+".autorange"]=!0;else{var i=function(e,t){var r,a=e.range,i=new Date(e.r2l(a[1])),o=t.step,s=t.count;switch(t.stepmode){case"backward":r=e.l2r(+n.time[o].utc.offset(i,-s));break;case"todate":var l=n.time[o].utc.offset(i,-s);r=e.l2r(+n.time[o].utc.ceil(l))}var c=a[1];return[r,c]}(e,t);a[r+".range[0]"]=i[0],a[r+".range[1]"]=i[1]}return a}},{d3:164}],657:[function(e,t,r){"use strict";t.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:e("./attributes")}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),draw:e("./draw")}},{"./attributes":652,"./defaults":654,"./draw":655}],658:[function(e,t,r){"use strict";var n=e("../color/attributes");t.exports={bgcolor:{valType:"color",dflt:n.background,editType:"plot"},bordercolor:{valType:"color",dflt:n.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},{"../color/attributes":590}],659:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axis_ids").list,a=e("../../plots/cartesian/autorange").getAutoRange,i=e("./constants");t.exports=function(e){for(var t=n(e,"x",!0),r=0;r<t.length;r++){var o=t[r],s=o[i.name];s&&s.visible&&s.autorange&&(s._input.autorange=!0,s._input.range=s.range=a(e,o))}}},{"../../plots/cartesian/autorange":763,"../../plots/cartesian/axis_ids":767,"./constants":660}],660:[function(e,t,r){"use strict";t.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},{}],661:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plot_api/plot_template"),i=e("../../plots/cartesian/axis_ids"),o=e("./attributes"),s=e("./oppaxis_attributes");t.exports=function(e,t,r){var l=e[r],c=t[r];if(l.rangeslider||t._requestRangeslider[c._id]){n.isPlainObject(l.rangeslider)||(l.rangeslider={});var u,d,p=l.rangeslider,h=a.newContainer(c,"rangeslider");if(x("visible")){x("bgcolor",t.plot_bgcolor),x("bordercolor"),x("borderwidth"),x("thickness"),x("autorange",!c.isValidRange(p.range)),x("range");var f=t._subplots;if(f)for(var m=f.cartesian.filter((function(e){return e.substr(0,e.indexOf("y"))===i.name2id(r)})).map((function(e){return e.substr(e.indexOf("y"),e.length)})),g=n.simpleMap(m,i.id2name),v=0;v<g.length;v++){var y=g[v];u=p[y]||{},d=a.newContainer(h,y,"yaxis");var b,_=t[y];u.range&&_.isValidRange(u.range)&&(b="fixed"),"match"!==w("rangemode",b)&&w("range",_.range.slice())}h._input=p}}function x(e,t){return n.coerce(p,h,o,e,t)}function w(e,t){return n.coerce(u,d,s,e,t)}}},{"../../lib":716,"../../plot_api/plot_template":754,"../../plots/cartesian/axis_ids":767,"./attributes":658,"./oppaxis_attributes":665}],662:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../plots/plots"),o=e("../../lib"),s=e("../drawing"),l=e("../color"),c=e("../titles"),u=e("../../plots/cartesian"),d=e("../../plots/cartesian/axis_ids"),p=e("../dragelement"),h=e("../../lib/setcursor"),f=e("./constants");function m(e,t,r,n){var a=o.ensureSingle(e,"rect",f.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),i=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,l=-n._offsetShift,c=s.crispRound(t,n.borderwidth);a.attr({width:n._width+i,height:n._height+i,transform:"translate("+l+","+l+")",fill:n.bgcolor,stroke:n.bordercolor,"stroke-width":c})}function g(e,t,r,n){var a=t._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function v(e,t,r,a){var l,c=t.calcdata,p=e.selectAll("g."+f.rangePlotClassName).data(r._subplotsWith,o.identity);p.enter().append("g").attr("class",(function(e){return f.rangePlotClassName+" "+e})).call(s.setClipUrl,a._clipId,t),p.order(),p.exit().remove(),p.each((function(e,o){var s=n.select(this),p=0===o,h=d.getFromId(t,e,"y"),f=h._name,m=a[f],g={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:a.range.slice(),calendar:r.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};g.layout[f]={type:h.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():h.range.slice(),calendar:h.calendar},i.supplyDefaults(g);var v=g._fullLayout.xaxis,y=g._fullLayout[f];v.clearCalc(),v.setScale(),y.clearCalc(),y.setScale();var b={id:e,plotgroup:s,xaxis:v,yaxis:y,isRangePlot:!0};p?l=b:(b.mainplot="xy",b.mainplotinfo=l),u.rangePlot(t,b,function(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n],i=a[0].trace;i.xaxis+i.yaxis===t&&r.push(a)}return r}(c,e))}))}function y(e,t,r,n,a){o.ensureSingle(e,"rect",f.maskMinClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(l.fill,f.maskColor),o.ensureSingle(e,"rect",f.maskMaxClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("height",n._height).call(l.fill,f.maskColor),"match"!==a.rangemode&&(o.ensureSingle(e,"rect",f.maskMinOppAxisClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).call(l.fill,f.maskOppAxisColor),o.ensureSingle(e,"rect",f.maskMaxOppAxisClassName,(function(e){e.attr({y:0,"shape-rendering":"crispEdges"})})).attr("width",n._width).style("border-top",f.maskOppBorder).call(l.fill,f.maskOppAxisColor))}function b(e,t,r,n){t._context.staticPlot||o.ensureSingle(e,"rect",f.slideBoxClassName,(function(e){e.attr({y:0,cursor:f.slideBoxCursor,"shape-rendering":"crispEdges"})})).attr({height:n._height,fill:f.slideBoxFill})}function _(e,t,r,n){var a=o.ensureSingle(e,"g",f.grabberMinClassName),i=o.ensureSingle(e,"g",f.grabberMaxClassName),s={x:0,width:f.handleWidth,rx:f.handleRadius,fill:l.background,stroke:l.defaultLine,"stroke-width":f.handleStrokeWidth,"shape-rendering":"crispEdges"},c={y:Math.round(n._height/4),height:Math.round(n._height/2)};if(o.ensureSingle(a,"rect",f.handleMinClassName,(function(e){e.attr(s)})).attr(c),o.ensureSingle(i,"rect",f.handleMaxClassName,(function(e){e.attr(s)})).attr(c),!t._context.staticPlot){var u={width:f.grabAreaWidth,x:0,y:0,fill:f.grabAreaFill,cursor:f.grabAreaCursor};o.ensureSingle(a,"rect",f.grabAreaMinClassName,(function(e){e.attr(u)})).attr("height",n._height),o.ensureSingle(i,"rect",f.grabAreaMaxClassName,(function(e){e.attr(u)})).attr("height",n._height)}}t.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i<r.length;i++){var s=r[i][f.name];s._clipId=s._id+"-"+t._uid}var l=t._infolayer.selectAll("g."+f.containerClassName).data(r,(function(e){return e._name}));l.exit().each((function(e){var r=e[f.name];t._topdefs.select("#"+r._clipId).remove()})).remove(),0!==r.length&&(l.enter().append("g").classed(f.containerClassName,!0).attr("pointer-events","all"),l.each((function(r){var i=n.select(this),s=r[f.name],l=t[d.id2name(r.anchor)],u=s[d.id2name(r.anchor)];if(s.range){var x,w=o.simpleMap(s.range,r.r2l),k=o.simpleMap(r.range,r.r2l);x=k[0]<k[1]?[Math.min(w[0],k[0]),Math.max(w[1],k[1])]:[Math.max(w[0],k[0]),Math.min(w[1],k[1])],s.range=s._input.range=o.simpleMap(x,r.l2r)}r.cleanRange("rangeslider.range");var M=t._size,T=r.domain;s._width=M.w*(T[1]-T[0]);var C=Math.round(M.l+M.w*T[0]),S=Math.round(M.t+M.h*(1-r._counterDomainMin)+("bottom"===r.side?r._depth:0)+s._offsetShift+f.extraPad);i.attr("transform","translate("+C+","+S+")");var L=r.r2l(s.range[0]),A=r.r2l(s.range[1]),E=A-L;if(s.p2d=function(e){return e/s._width*E+L},s.d2p=function(e){return(e-L)/E*s._width},s._rl=[L,A],"match"!==u.rangemode){var D=l.r2l(u.range[0]),I=l.r2l(u.range[1])-D;s.d2pOppAxis=function(e){return(e-D)/I*s._height}}i.call(m,e,r,s).call(g,e,r,s).call(v,e,r,s).call(y,e,r,s,u).call(b,e,r,s).call(_,e,r,s),function(e,t,r,i){var s=e.select("rect."+f.slideBoxClassName).node(),l=e.select("rect."+f.grabAreaMinClassName).node(),c=e.select("rect."+f.grabAreaMaxClassName).node();e.on("mousedown",(function(){var u=n.event,d=u.target,f=u.clientX,m=f-e.node().getBoundingClientRect().left,g=i.d2p(r._rl[0]),v=i.d2p(r._rl[1]),y=p.coverSlip();function b(e){var u,p,b,_=+e.clientX-f;switch(d){case s:b="ew-resize",u=g+_,p=v+_;break;case l:b="col-resize",u=g+_,p=v;break;case c:b="col-resize",u=g,p=v+_;break;default:b="ew-resize",u=m,p=m+_}if(p<u){var x=p;p=u,u=x}i._pixelMin=u,i._pixelMax=p,h(n.select(y),b),function(e,t,r,n){function i(e){return r.l2r(o.constrain(e,n._rl[0],n._rl[1]))}var s=i(n.p2d(n._pixelMin)),l=i(n.p2d(n._pixelMax));window.requestAnimationFrame((function(){a.call("_guiRelayout",t,r._name+".range",[s,l])}))}(0,t,r,i)}y.addEventListener("mousemove",b),y.addEventListener("mouseup",(function e(){y.removeEventListener("mousemove",b),y.removeEventListener("mouseup",e),o.removeElement(y)}))}))}(i,e,r,s),function(e,t,r,n,a,i){var s=f.handleWidth/2;function l(e){return o.constrain(e,0,n._width)}function c(e){return o.constrain(e,0,n._height)}function u(e){return o.constrain(e,-s,n._width+s)}var d=l(n.d2p(r._rl[0])),p=l(n.d2p(r._rl[1]));if(e.select("rect."+f.slideBoxClassName).attr("x",d).attr("width",p-d),e.select("rect."+f.maskMinClassName).attr("width",d),e.select("rect."+f.maskMaxClassName).attr("x",p).attr("width",n._width-p),"match"!==i.rangemode){var h=n._height-c(n.d2pOppAxis(a._rl[1])),m=n._height-c(n.d2pOppAxis(a._rl[0]));e.select("rect."+f.maskMinOppAxisClassName).attr("x",d).attr("height",h).attr("width",p-d),e.select("rect."+f.maskMaxOppAxisClassName).attr("x",d).attr("y",m).attr("height",n._height-m).attr("width",p-d),e.select("rect."+f.slideBoxClassName).attr("y",h).attr("height",m-h)}var g=Math.round(u(d-s))-.5,v=Math.round(u(p-s))+.5;e.select("g."+f.grabberMinClassName).attr("transform","translate("+g+",0.5)"),e.select("g."+f.grabberMaxClassName).attr("transform","translate("+v+",0.5)")}(i,0,r,s,l,u),"bottom"===r.side&&c.draw(e,r._id+"title",{propContainer:r,propName:r._name+".title",placeholder:t._dfltTitle.x,attributes:{x:r._offset+r._length/2,y:S+s._height+s._offsetShift+10+1.5*r.title.font.size,"text-anchor":"middle"}})})))}},{"../../lib":716,"../../lib/setcursor":736,"../../plots/cartesian":775,"../../plots/cartesian/axis_ids":767,"../../plots/plots":825,"../../registry":845,"../color":591,"../dragelement":609,"../drawing":612,"../titles":678,"./constants":660,d3:164}],663:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axis_ids"),a=e("../../lib/svg_text_utils"),i=e("./constants"),o=e("../../constants/alignment").LINE_SPACING,s=i.name;function l(e){var t=e&&e[s];return t&&t.visible}r.isVisible=l,r.makeData=function(e){var t=n.list({_fullLayout:e},"x",!0),r=e.margin,a=[];if(!e._has("gl2d"))for(var i=0;i<t.length;i++){var o=t[i];if(l(o)){a.push(o);var c=o[s];c._id=s+o._id,c._height=(e.height-r.b-r.t)*c.thickness,c._offsetShift=Math.floor(c.borderwidth/2)}}e._rangeSliderData=a},r.autoMarginOpts=function(e,t){var r=e._fullLayout,n=t[s],l=t._id.charAt(0),c=0,u=0;return"bottom"===t.side&&(c=t._depth,t.title.text!==r._dfltTitle[l]&&(u=1.5*t.title.font.size+10+n._offsetShift,u+=(t.title.text.match(a.BR_TAG_ALL)||[]).length*t.title.font.size*o)),{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:n._height+c+Math.max(r.margin.b,u),pad:i.extraPad+2*n._offsetShift}}},{"../../constants/alignment":685,"../../lib/svg_text_utils":740,"../../plots/cartesian/axis_ids":767,"./constants":660}],664:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("./oppaxis_attributes"),o=e("./helpers");t.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:n.extendFlat({},a,{yaxis:i})}}},layoutAttributes:e("./attributes"),handleDefaults:e("./defaults"),calcAutorange:e("./calc_autorange"),draw:e("./draw"),isVisible:o.isVisible,makeData:o.makeData,autoMarginOpts:o.autoMarginOpts}},{"../../lib":716,"./attributes":658,"./calc_autorange":659,"./defaults":661,"./draw":662,"./helpers":663,"./oppaxis_attributes":665}],665:[function(e,t,r){"use strict";t.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},{}],666:[function(e,t,r){"use strict";var n=e("../annotations/attributes"),a=e("../../traces/scatter/attributes").line,i=e("../drawing/attributes").dash,o=e("../../lib/extend").extendFlat,s=e("../../plot_api/plot_template").templatedArray;t.exports=s("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:o({},n.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:o({},n.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:o({},a.color,{editType:"arraydraw"}),width:o({},a.width,{editType:"calc+arraydraw"}),dash:o({},i,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},editType:"arraydraw"})},{"../../lib/extend":707,"../../plot_api/plot_template":754,"../../traces/scatter/attributes":1118,"../annotations/attributes":574,"../drawing/attributes":611}],667:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("./constants"),o=e("./helpers");function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,r,a,s,l){var c=e/2,u=l;if("pixel"===t){var d=s?o.extractPathCoords(s,l?i.paramIsY:i.paramIsX):[r,a],p=n.aggNums(Math.max,null,d),h=n.aggNums(Math.min,null,d),f=h<0?Math.abs(h)+c:c,m=p>0?p+c:c;return{ppad:c,ppadplus:u?f:m,ppadminus:u?m:f}}return{ppad:c}}function u(e,t,r,n,a){var s="category"===e.type||"multicategory"===e.type?e.r2c:e.d2c;if(void 0!==t)return[s(t),s(r)];if(n){var l,c,u,d,p=1/0,h=-1/0,f=n.match(i.segmentRE);for("date"===e.type&&(s=o.decodeDate(s)),l=0;l<f.length;l++)void 0!==(c=a[f[l].charAt(0)].drawn)&&(!(u=f[l].substr(1).match(i.paramRE))||u.length<c||((d=s(u[c]))<p&&(p=d),d>h&&(h=d)));return h>=p?[p,h]:void 0}}t.exports=function(e){var t=e._fullLayout,r=n.filterVisible(t.shapes);if(r.length&&e._fullData.length)for(var o=0;o<r.length;o++){var c,d,p=r[o];if(p._extremes={},"paper"!==p.xref){var h="pixel"===p.xsizemode?p.xanchor:p.x0,f="pixel"===p.xsizemode?p.xanchor:p.x1;(d=u(c=a.getFromId(e,p.xref),h,f,p.path,i.paramIsX))&&(p._extremes[c._id]=a.findExtremes(c,d,s(p)))}if("paper"!==p.yref){var m="pixel"===p.ysizemode?p.yanchor:p.y0,g="pixel"===p.ysizemode?p.yanchor:p.y1;(d=u(c=a.getFromId(e,p.yref),m,g,p.path,i.paramIsY))&&(p._extremes[c._id]=a.findExtremes(c,d,l(p)))}}}},{"../../lib":716,"../../plots/cartesian/axes":764,"./constants":668,"./helpers":671}],668:[function(e,t,r){"use strict";t.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},{}],669:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../../plots/array_container_defaults"),o=e("./attributes"),s=e("./helpers");function l(e,t,r){function i(r,a){return n.coerce(e,t,o,r,a)}if(i("visible")){i("layer"),i("opacity"),i("fillcolor"),i("line.color"),i("line.width"),i("line.dash");for(var l=i("type",e.path?"path":"rect"),c=i("xsizemode"),u=i("ysizemode"),d=["x","y"],p=0;p<2;p++){var h,f,m,g=d[p],v=g+"anchor",y="x"===g?c:u,b={_fullLayout:r},_=a.coerceRef(e,t,b,g,"","paper");if("paper"!==_?((h=a.getFromId(b,_))._shapeIndices.push(t._index),m=s.rangeToShapePosition(h),f=s.shapePositionToRange(h)):f=m=n.identity,"path"!==l){var x=g+"0",w=g+"1",k=e[x],M=e[w];e[x]=f(e[x],!0),e[w]=f(e[w],!0),"pixel"===y?(i(x,0),i(w,10)):(a.coercePosition(t,b,i,_,x,.25),a.coercePosition(t,b,i,_,w,.75)),t[x]=m(t[x]),t[w]=m(t[w]),e[x]=k,e[w]=M}if("pixel"===y){var T=e[v];e[v]=f(e[v],!0),a.coercePosition(t,b,i,_,v,.25),t[v]=m(t[v]),e[v]=T}}"path"===l?i("path"):n.noneOrAll(e,t,["x0","x1","y0","y1"])}}t.exports=function(e,t){i(e,t,{name:"shapes",handleItemDefaults:l})}},{"../../lib":716,"../../plots/array_container_defaults":760,"../../plots/cartesian/axes":764,"./attributes":666,"./helpers":671}],670:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../color"),s=e("../drawing"),l=e("../../plot_api/plot_template").arrayEditor,c=e("../dragelement"),u=e("../../lib/setcursor"),d=e("./constants"),p=e("./helpers");function h(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var r=e._fullLayout.shapes[t]||{};if(r._input&&!1!==r.visible)if("below"!==r.layer)v(e._fullLayout._shapeUpperLayer);else if("paper"===r.xref||"paper"===r.yref)v(e._fullLayout._shapeLowerLayer);else{var h=e._fullLayout._plots[r.xref+r.yref];v(h?(h.mainplotinfo||h).shapelayer:e._fullLayout._shapeLowerLayer)}function v(h){var v={"data-index":t,"fill-rule":"evenodd",d:m(e,r)},y=r.line.width?r.line.color:"rgba(0,0,0,0)",b=h.append("path").attr(v).style("opacity",r.opacity).call(o.stroke,y).call(o.fill,r.fillcolor).call(s.dashLine,r.line.dash,r.line.width);f(b,e,r),e._context.edits.shapePosition&&function(e,t,r,o,h){var v,y,b,_,x,w,k,M,T,C,S,L,A,E,D,I,P=10,O=10,R="pixel"===r.xsizemode,F="pixel"===r.ysizemode,z="line"===r.type,N="path"===r.type,j=l(e.layout,"shapes",r),B=j.modifyItem,Y=i.getFromId(e,r.xref),H=i.getFromId(e,r.yref),V=p.getDataToPixel(e,Y),U=p.getDataToPixel(e,H,!0),W=p.getPixelToData(e,Y),G=p.getPixelToData(e,H,!0),q=z?function(){var e=Math.max(r.line.width,10),n=h.append("g").attr("data-index",o);n.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":e,"stroke-opacity":"0"});var a={"fill-opacity":"0"},i=e/2>10?e/2:10;return n.append("circle").attr({"data-line-point":"start-point",cx:R?V(r.xanchor)+r.x0:V(r.x0),cy:F?U(r.yanchor)-r.y0:U(r.y0),r:i}).style(a).classed("cursor-grab",!0),n.append("circle").attr({"data-line-point":"end-point",cx:R?V(r.xanchor)+r.x1:V(r.x1),cy:F?U(r.yanchor)-r.y1:U(r.y1),r:i}).style(a).classed("cursor-grab",!0),n}():t,K={element:q.node(),gd:e,prepFn:function(n){R&&(x=V(r.xanchor)),F&&(w=U(r.yanchor)),"path"===r.type?D=r.path:(v=R?r.x0:V(r.x0),y=F?r.y0:U(r.y0),b=R?r.x1:V(r.x1),_=F?r.y1:U(r.y1)),v<b?(T=v,A="x0",C=b,E="x1"):(T=b,A="x1",C=v,E="x0"),!F&&y<_||F&&y>_?(k=y,S="y0",M=_,L="y1"):(k=_,S="y1",M=y,L="y0"),X(n),$(h,r),function(e,t,r){var n=t.xref,a=t.yref,o=i.getFromId(r,n),l=i.getFromId(r,a),c="";"paper"===n||o.autorange||(c+=n),"paper"===a||l.autorange||(c+=a),s.setClipUrl(e,c?"clip"+r._fullLayout._uid+c:null,r)}(t,r,e),K.moveFn="move"===I?Z:J},doneFn:function(){u(t),Q(h),f(t,e,r),n.call("_guiRelayout",e,j.getUpdateObj())},clickFn:function(){Q(h)}};function X(e){if(z)I="path"===e.target.tagName?"move":"start-point"===e.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var r=K.element.getBoundingClientRect(),n=r.right-r.left,a=r.bottom-r.top,i=e.clientX-r.left,o=e.clientY-r.top,s=!N&&n>P&&a>O&&!e.shiftKey?c.getCursor(i/n,1-o/a):"move";u(t,s),I=s.split("-")[0]}}function Z(n,a){if("path"===r.type){var i=function(e){return e},o=i,s=i;R?B("xanchor",r.xanchor=W(x+n)):(o=function(e){return W(V(e)+n)},Y&&"date"===Y.type&&(o=p.encodeDate(o))),F?B("yanchor",r.yanchor=G(w+a)):(s=function(e){return G(U(e)+a)},H&&"date"===H.type&&(s=p.encodeDate(s))),B("path",r.path=g(D,o,s))}else R?B("xanchor",r.xanchor=W(x+n)):(B("x0",r.x0=W(v+n)),B("x1",r.x1=W(b+n))),F?B("yanchor",r.yanchor=G(w+a)):(B("y0",r.y0=G(y+a)),B("y1",r.y1=G(_+a)));t.attr("d",m(e,r)),$(h,r)}function J(n,a){if(N){var i=function(e){return e},o=i,s=i;R?B("xanchor",r.xanchor=W(x+n)):(o=function(e){return W(V(e)+n)},Y&&"date"===Y.type&&(o=p.encodeDate(o))),F?B("yanchor",r.yanchor=G(w+a)):(s=function(e){return G(U(e)+a)},H&&"date"===H.type&&(s=p.encodeDate(s))),B("path",r.path=g(D,o,s))}else if(z){if("resize-over-start-point"===I){var l=v+n,c=F?y-a:y+a;B("x0",r.x0=R?l:W(l)),B("y0",r.y0=F?c:G(c))}else if("resize-over-end-point"===I){var u=b+n,d=F?_-a:_+a;B("x1",r.x1=R?u:W(u)),B("y1",r.y1=F?d:G(d))}}else{var f=~I.indexOf("n")?k+a:k,j=~I.indexOf("s")?M+a:M,q=~I.indexOf("w")?T+n:T,K=~I.indexOf("e")?C+n:C;~I.indexOf("n")&&F&&(f=k-a),~I.indexOf("s")&&F&&(j=M-a),(!F&&j-f>O||F&&f-j>O)&&(B(S,r[S]=F?f:G(f)),B(L,r[L]=F?j:G(j))),K-q>P&&(B(A,r[A]=R?q:W(q)),B(E,r[E]=R?K:W(K)))}t.attr("d",m(e,r)),$(h,r)}function $(e,t){(R||F)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var i=V(R?t.xanchor:a.midRange(r?[t.x0,t.x1]:p.extractPathCoords(t.path,d.paramIsX))),o=U(F?t.yanchor:a.midRange(r?[t.y0,t.y1]:p.extractPathCoords(t.path,d.paramIsY)));if(i=p.roundPositionForSharpStrokeRendering(i,1),o=p.roundPositionForSharpStrokeRendering(o,1),R&&F){var s="M"+(i-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(R){var l="M"+(i-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(i-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function Q(e){e.selectAll(".visual-cue").remove()}c.init(K),q.node().onmousemove=X}(e,b,r,t,h)}}function f(e,t,r){var n=(r.xref+r.yref).replace(/paper/g,"");s.setClipUrl(e,n?"clip"+t._fullLayout._uid+n:null,t)}function m(e,t){var r,n,o,s,l,c,u,h,f=t.type,m=i.getFromId(e,t.xref),g=i.getFromId(e,t.yref),v=e._fullLayout._size;if(m?(r=p.shapePositionToRange(m),n=function(e){return m._offset+m.r2p(r(e,!0))}):n=function(e){return v.l+v.w*e},g?(o=p.shapePositionToRange(g),s=function(e){return g._offset+g.r2p(o(e,!0))}):s=function(e){return v.t+v.h*(1-e)},"path"===f)return m&&"date"===m.type&&(n=p.decodeDate(n)),g&&"date"===g.type&&(s=p.decodeDate(s)),function(e,t,r){var n=e.path,i=e.xsizemode,o=e.ysizemode,s=e.xanchor,l=e.yanchor;return n.replace(d.segmentRE,(function(e){var n=0,c=e.charAt(0),u=d.paramIsX[c],p=d.paramIsY[c],h=d.numParams[c],f=e.substr(1).replace(d.paramRE,(function(e){return u[n]?e="pixel"===i?t(s)+Number(e):t(e):p[n]&&(e="pixel"===o?r(l)-Number(e):r(e)),++n>h&&(e="X"),e}));return n>h&&(f=f.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+e)),c+f}))}(t,n,s);if("pixel"===t.xsizemode){var y=n(t.xanchor);l=y+t.x0,c=y+t.x1}else l=n(t.x0),c=n(t.x1);if("pixel"===t.ysizemode){var b=s(t.yanchor);u=b-t.y0,h=b-t.y1}else u=s(t.y0),h=s(t.y1);if("line"===f)return"M"+l+","+u+"L"+c+","+h;if("rect"===f)return"M"+l+","+u+"H"+c+"V"+h+"H"+l+"Z";var _=(l+c)/2,x=(u+h)/2,w=Math.abs(_-l),k=Math.abs(x-u),M="A"+w+","+k,T=_+w+","+x;return"M"+T+M+" 0 1,1 "+_+","+(x-k)+M+" 0 0,1 "+T+"Z"}function g(e,t,r){return e.replace(d.segmentRE,(function(e){var n=0,a=e.charAt(0),i=d.paramIsX[a],o=d.paramIsY[a],s=d.numParams[a];return a+e.substr(1).replace(d.paramRE,(function(e){return n>=s?e:(i[n]?e=t(e):o[n]&&(e=r(e)),n++,e)}))}))}t.exports={draw:function(e){var t=e._fullLayout;for(var r in t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._plots){var n=t._plots[r].shapelayer;n&&n.selectAll("path").remove()}for(var a=0;a<t.shapes.length;a++)t.shapes[a].visible&&h(e,a)},drawOne:h}},{"../../lib":716,"../../lib/setcursor":736,"../../plot_api/plot_template":754,"../../plots/cartesian/axes":764,"../../registry":845,"../color":591,"../dragelement":609,"../drawing":612,"./constants":668,"./helpers":671}],671:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../lib");r.rangeToShapePosition=function(e){return"log"===e.type?e.r2d:function(e){return e}},r.shapePositionToRange=function(e){return"log"===e.type?e.d2r:function(e){return e}},r.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}},r.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}},r.extractPathCoords=function(e,t){var r=[];return e.match(n.segmentRE).forEach((function(e){var i=t[e.charAt(0)].drawn;if(void 0!==i){var o=e.substr(1).match(n.paramRE);!o||o.length<i||r.push(a.cleanNumber(o[i]))}})),r},r.getDataToPixel=function(e,t,n){var a,i=e._fullLayout._size;if(t){var o=r.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(o(e,!0))},"date"===t.type&&(a=r.decodeDate(a))}else a=n?function(e){return i.t+i.h*(1-e)}:function(e){return i.l+i.w*e};return a},r.getPixelToData=function(e,t,n){var a,i=e._fullLayout._size;if(t){var o=r.rangeToShapePosition(t);a=function(e){return o(t.p2r(e-t._offset))}}else a=n?function(e){return 1-(e-i.t)/i.h}:function(e){return(e-i.l)/i.w};return a},r.roundPositionForSharpStrokeRendering=function(e,t){var r=1===Math.round(t%2),n=Math.round(e);return r?n+.5:n}},{"../../lib":716,"./constants":668}],672:[function(e,t,r){"use strict";var n=e("./draw");t.exports={moduleType:"component",name:"shapes",layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),includeBasePlot:e("../../plots/cartesian/include_components")("shapes"),calcAutorange:e("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"../../plots/cartesian/include_components":774,"./attributes":666,"./calc_autorange":667,"./defaults":669,"./draw":670}],673:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../../plots/pad_attributes"),i=e("../../lib/extend").extendDeepAll,o=e("../../plot_api/edit_types").overrideAll,s=e("../../plots/animation_attributes"),l=e("../../plot_api/plot_template").templatedArray,c=e("./constants"),u=l("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(a({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:s.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:n({})},font:n({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")},{"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plot_api/plot_template":754,"../../plots/animation_attributes":759,"../../plots/font_attributes":790,"../../plots/pad_attributes":824,"./constants":674}],674:[function(e,t,r){"use strict";t.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},{}],675:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("./constants").name,s=i.steps;function l(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}for(var s=a(e,t,{name:"steps",handleItemDefaults:c}),l=0,u=0;u<s.length;u++)s[u].visible&&l++;if(l<2?t.visible=!1:o("visible")){t._stepCount=l;var d=t._visibleSteps=n.filterVisible(s);(s[o("active")]||{}).visible||(t.active=d[0]._index),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("len"),o("lenmode"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("currentvalue.visible")&&(o("currentvalue.xanchor"),o("currentvalue.prefix"),o("currentvalue.suffix"),o("currentvalue.offset"),n.coerceFont(o,"currentvalue.font",t.font)),o("transition.duration"),o("transition.easing"),o("bgcolor"),o("activebgcolor"),o("bordercolor"),o("borderwidth"),o("ticklen"),o("tickwidth"),o("tickcolor"),o("minorticklen")}}function c(e,t){function r(r,a){return n.coerce(e,t,s,r,a)}if("skip"===e.method||Array.isArray(e.args)?r("visible"):t.visible=!1){r("method"),r("args");var a=r("label","step-"+t._index);r("value",a),r("execute")}}t.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:l})}},{"../../lib":716,"../../plots/array_container_defaults":760,"./attributes":673,"./constants":674}],676:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../plots/plots"),i=e("../color"),o=e("../drawing"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../../plot_api/plot_template").arrayEditor,u=e("./constants"),d=e("../../constants/alignment"),p=d.LINE_SPACING,h=d.FROM_TL,f=d.FROM_BR;function m(e){return u.autoMarginIdRoot+e._index}function g(e){return e._index}function v(e,t){var r=o.tester.selectAll("g."+u.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(u.labelGroupClass,!0);var i=0,c=0;r.each((function(e){var r=_(n.select(this),{step:e},t).node();if(r){var a=o.bBox(r);c=Math.max(c,a.height),i=Math.max(i,a.width)}})),r.remove();var d=t._dims={};d.inputAreaWidth=Math.max(u.railWidth,u.gripHeight);var p=e._fullLayout._size;d.lx=p.l+p.w*t.x,d.ly=p.t+p.h*(1-t.y),"fraction"===t.lenmode?d.outerLength=Math.round(p.w*t.len):d.outerLength=t.len,d.inputAreaStart=0,d.inputAreaLength=Math.round(d.outerLength-t.pad.l-t.pad.r);var g=(d.inputAreaLength-2*u.stepInset)/(t._stepCount-1),v=i+u.labelPadding;if(d.labelStride=Math.max(1,Math.ceil(v/g)),d.labelHeight=c,d.currentValueMaxWidth=0,d.currentValueHeight=0,d.currentValueTotalHeight=0,d.currentValueMaxLines=1,t.currentvalue.visible){var b=o.tester.append("g");r.each((function(e){var r=y(b,t,e.label),n=r.node()&&o.bBox(r.node())||{width:0,height:0},a=l.lineCount(r);d.currentValueMaxWidth=Math.max(d.currentValueMaxWidth,Math.ceil(n.width)),d.currentValueHeight=Math.max(d.currentValueHeight,Math.ceil(n.height)),d.currentValueMaxLines=Math.max(d.currentValueMaxLines,a)})),d.currentValueTotalHeight=d.currentValueHeight+t.currentvalue.offset,b.remove()}d.height=d.currentValueTotalHeight+u.tickOffset+t.ticklen+u.labelOffset+d.labelHeight+t.pad.t+t.pad.b;var x="left";s.isRightAnchor(t)&&(d.lx-=d.outerLength,x="right"),s.isCenterAnchor(t)&&(d.lx-=d.outerLength/2,x="center");var w="top";s.isBottomAnchor(t)&&(d.ly-=d.height,w="bottom"),s.isMiddleAnchor(t)&&(d.ly-=d.height/2,w="middle"),d.outerLength=Math.ceil(d.outerLength),d.height=Math.ceil(d.height),d.lx=Math.round(d.lx),d.ly=Math.round(d.ly);var k={y:t.y,b:d.height*f[w],t:d.height*h[w]};"fraction"===t.lenmode?(k.l=0,k.xl=t.x-t.len*h[x],k.r=0,k.xr=t.x+t.len*f[x]):(k.x=t.x,k.l=d.outerLength*h[x],k.r=d.outerLength*f[x]),a.autoMargin(e,m(t),k)}function y(e,t,r){if(t.currentvalue.visible){var n,a,i=t._dims;switch(t.currentvalue.xanchor){case"right":n=i.inputAreaLength-u.currentValueInset-i.currentValueMaxWidth,a="left";break;case"center":n=.5*i.inputAreaLength,a="middle";break;default:n=u.currentValueInset,a="left"}var c=s.ensureSingle(e,"text",u.labelClass,(function(e){e.classed("user-select-none",!0).attr({"text-anchor":a,"data-notex":1})})),d=t.currentvalue.prefix?t.currentvalue.prefix:"";if("string"==typeof r)d+=r;else{var h=t.steps[t.active].label,f=t._gd._fullLayout._meta;f&&(h=s.templateString(h,f)),d+=h}t.currentvalue.suffix&&(d+=t.currentvalue.suffix),c.call(o.font,t.currentvalue.font).text(d).call(l.convertToTspans,t._gd);var m=l.lineCount(c),g=(i.currentValueMaxLines+1-m)*t.currentvalue.font.size*p;return l.positionText(c,n,g),c}}function b(e,t,r){s.ensureSingle(e,"rect",u.gripRectClass,(function(n){n.call(M,t,e,r).style("pointer-events","all")})).attr({width:u.gripWidth,height:u.gripHeight,rx:u.gripRadius,ry:u.gripRadius}).call(i.stroke,r.bordercolor).call(i.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function _(e,t,r){var n=s.ensureSingle(e,"text",u.labelClass,(function(e){e.classed("user-select-none",!0).attr({"text-anchor":"middle","data-notex":1})})),a=t.step.label,i=r._gd._fullLayout._meta;return i&&(a=s.templateString(a,i)),n.call(o.font,r.font).text(a).call(l.convertToTspans,r._gd),n}function x(e,t){var r=s.ensureSingle(e,"g",u.labelsClass),a=t._dims,i=r.selectAll("g."+u.labelGroupClass).data(a.labelSteps);i.enter().append("g").classed(u.labelGroupClass,!0),i.exit().remove(),i.each((function(e){var r=n.select(this);r.call(_,e,t),o.setTranslate(r,S(t,e.fraction),u.tickOffset+t.ticklen+t.font.size*p+u.labelOffset+a.currentValueTotalHeight)}))}function w(e,t,r,n,a){var i=Math.round(n*(r._stepCount-1)),o=r._visibleSteps[i]._index;o!==r.active&&k(e,t,r,o,!0,a)}function k(e,t,r,n,i,o){var s=r.active;r.active=n,c(e.layout,u.name,r).applyUpdate("active",n);var l=r.steps[r.active];t.call(C,r,o),t.call(y,r),e.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:i,previousActive:s}),l&&l.method&&i&&(t._nextMethod?(t._nextMethod.step=l,t._nextMethod.doCallback=i,t._nextMethod.doTransition=o):(t._nextMethod={step:l,doCallback:i,doTransition:o},t._nextMethodRaf=window.requestAnimationFrame((function(){var r=t._nextMethod.step;r.method&&(r.execute&&a.executeAPICommand(e,r.method,r.args),t._nextMethod=null,t._nextMethodRaf=null)}))))}function M(e,t,r){var a=r.node(),o=n.select(t);function s(){return r.data()[0]}e.on("mousedown",(function(){var e=s();t.emit("plotly_sliderstart",{slider:e});var l=r.select("."+u.gripRectClass);n.event.stopPropagation(),n.event.preventDefault(),l.call(i.fill,e.activebgcolor);var c=L(e,n.mouse(a)[0]);w(t,r,e,c,!0),e._dragging=!0,o.on("mousemove",(function(){var e=s(),i=L(e,n.mouse(a)[0]);w(t,r,e,i,!1)})),o.on("mouseup",(function(){var e=s();e._dragging=!1,l.call(i.fill,e.bgcolor),o.on("mouseup",null),o.on("mousemove",null),t.emit("plotly_sliderend",{slider:e,step:e.steps[e.active]})}))}))}function T(e,t){var r=e.selectAll("rect."+u.tickRectClass).data(t._visibleSteps),a=t._dims;r.enter().append("rect").classed(u.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),r.each((function(e,r){var s=r%a.labelStride==0,l=n.select(this);l.attr({height:s?t.ticklen:t.minorticklen}).call(i.fill,t.tickcolor),o.setTranslate(l,S(t,r/(t._stepCount-1))-.5*t.tickwidth,(s?u.tickOffset:u.minorTickOffset)+a.currentValueTotalHeight)}))}function C(e,t,r){for(var n=e.select("rect."+u.gripRectClass),a=0,i=0;i<t._stepCount;i++)if(t._visibleSteps[i]._index===t.active){a=i;break}var o=S(t,a/(t._stepCount-1));if(!t._invokingCommand){var s=n;r&&t.transition.duration>0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform","translate("+(o-.5*u.gripWidth)+","+t._dims.currentValueTotalHeight+")")}}function S(e,t){var r=e._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function L(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function A(e,t,r){var n=r._dims,a=s.ensureSingle(e,"rect",u.railTouchRectClass,(function(n){n.call(M,t,e,r).style("pointer-events","all")}));a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),o.setTranslate(a,0,n.currentValueTotalHeight)}function E(e,t){var r=t._dims,n=r.inputAreaLength-2*u.railInset,a=s.ensureSingle(e,"rect",u.railRectClass);a.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),o.setTranslate(a,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}t.exports=function(e){var t=e._fullLayout,r=function(e,t){for(var r=e[u.name],n=[],a=0;a<r.length;a++){var i=r[a];i.visible&&(i._gd=t,n.push(i))}return n}(t,e),i=t._infolayer.selectAll("g."+u.containerClassName).data(r.length>0?[0]:[]);function s(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),a.autoMargin(e,m(t))}if(i.enter().append("g").classed(u.containerClassName,!0).style("cursor","ew-resize"),i.exit().each((function(){n.select(this).selectAll("g."+u.groupClassName).each(s)})).remove(),0!==r.length){var l=i.selectAll("g."+u.groupClassName).data(r,g);l.enter().append("g").classed(u.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c<r.length;c++){var d=r[c];v(e,d)}l.each((function(t){var r=n.select(this);!function(e){var t=e._dims;t.labelSteps=[];for(var r=e._stepCount,n=0;n<r;n+=t.labelStride)t.labelSteps.push({fraction:n/(r-1),step:e._visibleSteps[n]})}(t),a.manageCommandObserver(e,t,t._visibleSteps,(function(t){var n=r.data()[0];n.active!==t.index&&(n._dragging||k(e,r,n,t.index,!1,!0))})),function(e,t,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),t.call(y,r).call(E,r).call(x,r).call(T,r).call(A,e,r).call(b,e,r);var n=r._dims;o.setTranslate(t,n.lx+r.pad.l,n.ly+r.pad.t),t.call(C,r,!1),t.call(y,r)}(e,n.select(this),t)}))}}},{"../../constants/alignment":685,"../../lib":716,"../../lib/svg_text_utils":740,"../../plot_api/plot_template":754,"../../plots/plots":825,"../color":591,"../drawing":612,"./constants":674,d3:164}],677:[function(e,t,r){"use strict";var n=e("./constants");t.exports={moduleType:"component",name:n.name,layoutAttributes:e("./attributes"),supplyLayoutDefaults:e("./defaults"),draw:e("./draw")}},{"./attributes":673,"./constants":674,"./defaults":675,"./draw":676}],678:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../lib"),l=e("../drawing"),c=e("../color"),u=e("../../lib/svg_text_utils"),d=e("../../constants/interactions"),p=e("../../constants/alignment").OPPOSITE_SIDE,h=/ [XY][0-9]* /;t.exports={draw:function(e,t,r){var f,m=r.propContainer,g=r.propName,v=r.placeholder,y=r.traceIndex,b=r.avoid||{},_=r.attributes,x=r.transform,w=r.containerGroup,k=e._fullLayout,M=1,T=!1,C=m.title,S=(C&&C.text?C.text:"").trim(),L=C&&C.font?C.font:{},A=L.family,E=L.size,D=L.color;"title.text"===g?f="titleText":-1!==g.indexOf("axis")?f="axisTitleText":g.indexOf(!0)&&(f="colorbarTitleText");var I=e._context.edits[f];""===S?M=0:S.replace(h," % ")===v.replace(h," % ")&&(M=.2,T=!0,I||(S="")),r._meta?S=s.templateString(S,r._meta):k._meta&&(S=s.templateString(S,k._meta));var P=S||I;w||(w=s.ensureSingle(k._infolayer,"g","g-"+t));var O=w.selectAll("text").data(P?[0]:[]);if(O.enter().append("text"),O.text(S).attr("class",t),O.exit().remove(),!P)return w;function R(e){s.syncOrAsync([F,z],e)}function F(t){var r;return x?(r="",x.rotate&&(r+="rotate("+[x.rotate,_.x,_.y]+")"),x.offset&&(r+="translate(0, "+x.offset+")")):r=null,t.attr("transform",r),t.style({"font-family":A,"font-size":n.round(E,2)+"px",fill:c.rgb(D),opacity:M*c.opacity(D),"font-weight":i.fontWeight}).attr(_).call(u.convertToTspans,e),i.previousPromises(e)}function z(e){var t=n.select(e.node().parentNode);if(b&&b.selection&&b.side&&S){t.attr("transform",null);var r=p[b.side],i="left"===b.side||"top"===b.side?-1:1,o=a(b.pad)?b.pad:2,c=l.bBox(t.node()),u={left:0,top:0,right:k.width,bottom:k.height},d=b.maxShift||i*(u[b.side]-c[b.side]),h=0;if(d<0)h=d;else{var f=b.offsetLeft||0,m=b.offsetTop||0;c.left-=f,c.right-=f,c.top-=m,c.bottom-=m,b.selection.each((function(){var e=l.bBox(this);s.bBoxIntersect(c,e,o)&&(h=Math.max(h,i*(e[b.side]-c[r])+o))})),h=Math.min(d,h)}if(h>0||d<0){var g={left:[-h,0],right:[h,0],top:[0,-h],bottom:[0,h]}[b.side];t.attr("transform","translate("+g+")")}}}return O.call(R),I&&(S?O.on(".opacity",null):(M=0,T=!0,O.text(v).on("mouseover.opacity",(function(){n.select(this).transition().duration(d.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(d.HIDE_PLACEHOLDER).style("opacity",0)}))),O.call(u.makeEditable,{gd:e}).on("edit",(function(t){void 0!==y?o.call("_guiRestyle",e,g,t,y):o.call("_guiRelayout",e,g,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(R)})).on("input",(function(e){this.text(e||" ").call(u.positionText,_.x,_.y)}))),O.classed("js-placeholder",T),w}}},{"../../constants/alignment":685,"../../constants/interactions":691,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/plots":825,"../../registry":845,"../color":591,"../drawing":612,d3:164,"fast-isnumeric":227}],679:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../color/attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll,s=e("../../plots/pad_attributes"),l=e("../../plot_api/plot_template").templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});t.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plot_api/plot_template":754,"../../plots/font_attributes":790,"../../plots/pad_attributes":824,"../color/attributes":590}],680:[function(e,t,r){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:"  "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},{}],681:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("./constants").name,s=i.buttons;function l(e,t,r){function o(r,a){return n.coerce(e,t,i,r,a)}o("visible",a(e,t,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(e,t){function r(r,a){return n.coerce(e,t,s,r,a)}r("visible","skip"===e.method||Array.isArray(e.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(e,t){a(e,t,{name:o,handleItemDefaults:l})}},{"../../lib":716,"../../plots/array_container_defaults":760,"./attributes":679,"./constants":680}],682:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../plots/plots"),i=e("../color"),o=e("../drawing"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../../plot_api/plot_template").arrayEditor,u=e("../../constants/alignment").LINE_SPACING,d=e("./constants"),p=e("./scrollbox");function h(e){return e._index}function f(e,t){return+e.attr(d.menuIndexAttrName)===t._index}function m(e,t,r,n,a,i,o,s){t.active=o,c(e.layout,d.name,t).applyUpdate("active",o),"buttons"===t.type?v(e,n,null,null,t):"dropdown"===t.type&&(a.attr(d.menuIndexAttrName,"-1"),g(e,n,a,i,t),s||v(e,n,a,i,t))}function g(e,t,r,n,a){var i=s.ensureSingle(t,"g",d.headerClassName,(function(e){e.style("pointer-events","all")})),l=a._dims,c=a.active,u=a.buttons[c]||d.blankHeaderOpts,p={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},h={width:l.headerWidth,height:l.headerHeight};i.call(y,a,u,e).call(C,a,p,h),s.ensureSingle(t,"text",d.headerArrowClassName,(function(e){e.classed("user-select-none",!0).attr("text-anchor","end").call(o.font,a.font).text(d.arrowSymbol[a.direction])})).attr({x:l.headerWidth-d.arrowOffsetX+a.pad.l,y:l.headerHeight/2+d.textOffsetY+a.pad.t}),i.on("click",(function(){r.call(S,String(f(r,a)?-1:a._index)),v(e,t,r,n,a)})),i.on("mouseover",(function(){i.call(w)})),i.on("mouseout",(function(){i.call(k,a)})),o.setTranslate(t,l.lx,l.ly)}function v(e,t,r,i,o){r||(r=t).attr("pointer-events","all");var l=function(e){return-1==+e.attr(d.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?d.dropdownButtonClassName:d.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),p=u.enter().append("g").classed(c,!0),h=u.exit();"dropdown"===o.type?(p.attr("opacity","0").transition().attr("opacity","1"),h.transition().attr("opacity","0").remove()):h.remove();var f=0,g=0,v=o._dims,b=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(b?g=v.headerHeight+d.gapButtonHeader:f=v.headerWidth+d.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-d.gapButtonHeader+d.gapButton-v.openHeight),"dropdown"===o.type&&"left"===o.direction&&(f=-d.gapButtonHeader+d.gapButton-v.openWidth);var _={x:v.lx+f+o.pad.l,y:v.ly+g+o.pad.t,yPad:d.gapButton,xPad:d.gapButton,index:0},M={l:_.x+o.borderwidth,t:_.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,e).call(C,o,_),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(m(e,o,0,t,r,i,-1),a.executeAPICommand(e,s.method,s.args2)):(m(e,o,0,t,r,i,l),a.executeAPICommand(e,s.method,s.args))),e.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(k,o),u.call(x,o)}))})),u.call(x,o),b?(M.w=Math.max(v.openWidth,v.headerWidth),M.h=_.y-M.t):(M.w=_.x-M.l,M.h=Math.max(v.openHeight,v.headerHeight)),M.direction=o.direction,i&&(u.size()?function(e,t,r,n,a,i){var o,s,l,c=a.direction,u="up"===c||"down"===c,p=a._dims,h=a.active;if(u)for(s=0,l=0;l<h;l++)s+=p.heights[l]+d.gapButton;else for(o=0,l=0;l<h;l++)o+=p.widths[l]+d.gapButton;n.enable(i,o,s),n.hbar&&n.hbar.attr("opacity","0").transition().attr("opacity","1"),n.vbar&&n.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,i,o,M):function(e){var t=!!e.hbar,r=!!e.vbar;t&&e.hbar.transition().attr("opacity","0").each("end",(function(){t=!1,r||e.disable()})),r&&e.vbar.transition().attr("opacity","0").each("end",(function(){r=!1,t||e.disable()}))}(i))}function y(e,t,r,n){e.call(b,t).call(_,t,r,n)}function b(e,t){s.ensureSingle(e,"rect",d.itemRectClassName,(function(e){e.attr({rx:d.rx,ry:d.ry,"shape-rendering":"crispEdges"})})).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px")}function _(e,t,r,n){var a=s.ensureSingle(e,"text",d.itemTextClassName,(function(e){e.classed("user-select-none",!0).attr({"text-anchor":"start","data-notex":1})})),i=r.label,c=n._fullLayout._meta;c&&(i=s.templateString(i,c)),a.call(o.font,t.font).text(i).call(l.convertToTspans,n)}function x(e,t){var r=t.active;e.each((function(e,a){var o=n.select(this);a===r&&t.showactive&&o.select("rect."+d.itemRectClassName).call(i.fill,d.activeColor)}))}function w(e){e.select("rect."+d.itemRectClassName).call(i.fill,d.hoverColor)}function k(e,t){e.select("rect."+d.itemRectClassName).call(i.fill,t.bgcolor)}function M(e,t){var r=t._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},i=o.tester.selectAll("g."+d.dropdownButtonClassName).data(s.filterVisible(t.buttons));i.enter().append("g").classed(d.dropdownButtonClassName,!0);var c=-1!==["up","down"].indexOf(t.direction);i.each((function(a,i){var s=n.select(this);s.call(y,t,a,e);var p=s.select("."+d.itemTextClassName),h=p.node()&&o.bBox(p.node()).width,f=Math.max(h+d.textPadX,d.minWidth),m=t.font.size*u,g=l.lineCount(p),v=Math.max(m*g,d.minHeight)+d.textOffsetY;v=Math.ceil(v),f=Math.ceil(f),r.widths[i]=f,r.heights[i]=v,r.height1=Math.max(r.height1,v),r.width1=Math.max(r.width1,f),c?(r.totalWidth=Math.max(r.totalWidth,f),r.openWidth=r.totalWidth,r.totalHeight+=v+d.gapButton,r.openHeight+=v+d.gapButton):(r.totalWidth+=f+d.gapButton,r.openWidth+=f+d.gapButton,r.totalHeight=Math.max(r.totalHeight,v),r.openHeight=r.totalHeight)})),c?r.totalHeight-=d.gapButton:r.totalWidth-=d.gapButton,r.headerWidth=r.width1+d.arrowPadX,r.headerHeight=r.height1,"dropdown"===t.type&&(c?(r.width1+=d.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=d.arrowPadX),i.remove();var p=r.totalWidth+t.pad.l+t.pad.r,h=r.totalHeight+t.pad.t+t.pad.b,f=e._fullLayout._size;r.lx=f.l+f.w*t.x,r.ly=f.t+f.h*(1-t.y);var m="left";s.isRightAnchor(t)&&(r.lx-=p,m="right"),s.isCenterAnchor(t)&&(r.lx-=p/2,m="center");var g="top";s.isBottomAnchor(t)&&(r.ly-=h,g="bottom"),s.isMiddleAnchor(t)&&(r.ly-=h/2,g="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),a.autoMargin(e,T(t),{x:t.x,y:t.y,l:p*({right:1,center:.5}[m]||0),r:p*({left:1,center:.5}[m]||0),b:h*({top:1,middle:.5}[g]||0),t:h*({bottom:1,middle:.5}[g]||0)})}function T(e){return d.autoMarginIdRoot+e._index}function C(e,t,r,n){n=n||{};var a=e.select("."+d.itemRectClassName),i=e.select("."+d.itemTextClassName),s=t.borderwidth,c=r.index,p=t._dims;o.setTranslate(e,s+r.x,s+r.y);var h=-1!==["up","down"].indexOf(t.direction),f=n.height||(h?p.heights[c]:p.height1);a.attr({x:0,y:0,width:n.width||(h?p.width1:p.widths[c]),height:f});var m=t.font.size*u,g=(l.lineCount(i)-1)*m/2;l.positionText(i,d.textOffsetX,f/2-g+d.textOffsetY),h?r.y+=p.heights[c]+r.yPad:r.x+=p.widths[c]+r.xPad,r.index++}function S(e,t){e.attr(d.menuIndexAttrName,t||"-1").selectAll("g."+d.dropdownButtonClassName).remove()}t.exports=function(e){var t=e._fullLayout,r=s.filterVisible(t[d.name]);function i(t){a.autoMargin(e,T(t))}var o=t._menulayer.selectAll("g."+d.containerClassName).data(r.length>0?[0]:[]);if(o.enter().append("g").classed(d.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+d.headerGroupClassName).each(i)})).remove(),0!==r.length){var l=o.selectAll("g."+d.headerGroupClassName).data(r,h);l.enter().append("g").classed(d.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",d.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),u=0;u<r.length;u++){var y=r[u];M(e,y)}var b="updatemenus"+t._uid,_=new p(e,c,b);l.enter().size()&&(c.node().parentNode.appendChild(c.node()),c.call(S)),l.exit().each((function(e){c.call(S),i(e)})).remove(),l.each((function(t){var r=n.select(this),i="dropdown"===t.type?c:null;a.manageCommandObserver(e,t,t.buttons,(function(n){m(e,t,t.buttons[n.index],r,i,_,n.index,!0)})),"dropdown"===t.type?(g(e,r,c,_,t),f(c,t)&&v(e,r,c,_,t)):v(e,r,null,null,t)}))}}},{"../../constants/alignment":685,"../../lib":716,"../../lib/svg_text_utils":740,"../../plot_api/plot_template":754,"../../plots/plots":825,"../color":591,"../drawing":612,"./constants":680,"./scrollbox":684,d3:164}],683:[function(e,t,r){arguments[4][677][0].apply(r,arguments)},{"./attributes":679,"./constants":680,"./defaults":681,"./draw":682,dup:677}],684:[function(e,t,r){"use strict";t.exports=s;var n=e("d3"),a=e("../color"),i=e("../drawing"),o=e("../../lib");function s(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}s.barWidth=2,s.barLength=20,s.barRadius=2,s.barPad=1,s.barColor="#808BA4",s.prototype.enable=function(e,t,r){var o=this.gd._fullLayout,l=o.width,c=o.height;this.position=e;var u,d,p,h,f=this.position.l,m=this.position.w,g=this.position.t,v=this.position.h,y=this.position.direction,b="down"===y,_="left"===y,x="up"===y,w=m,k=v;b||_||"right"===y||x||(this.position.direction="down",b=!0),b||x?(d=(u=f)+w,b?(p=g,k=(h=Math.min(p+k,c))-p):k=(h=g+k)-(p=Math.max(h-k,0))):(h=(p=g)+k,_?w=(d=f+w)-(u=Math.max(d-w,0)):(u=f,w=(d=Math.min(u+w,l))-u)),this._box={l:u,t:p,w:w,h:k};var M=m>w,T=s.barLength+2*s.barPad,C=s.barWidth+2*s.barPad,S=f,L=g+v;L+C>c&&(L=c-C);var A=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);A.exit().on(".drag",null).remove(),A.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,s.barColor),M?(this.hbar=A.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:L,width:T,height:C}),this._hbarXMin=S+T/2,this._hbarTranslateMax=w-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=v>k,D=s.barWidth+2*s.barPad,I=s.barLength+2*s.barPad,P=f+m,O=g;P+D>l&&(P=l-D);var R=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,s.barColor),E?(this.vbar=R.attr({rx:s.barRadius,ry:s.barRadius,x:P,y:O,width:D,height:I}),this._vbarYMin=O+I/2,this._vbarTranslateMax=k-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var F=this.id,z=u-.5,N=E?d+D+.5:d+.5,j=p-.5,B=M?h+C+.5:h+.5,Y=o._topdefs.selectAll("#"+F).data(M||E?[0]:[]);if(Y.exit().remove(),Y.enter().append("clipPath").attr("id",F).append("rect"),M||E?(this._clipRect=Y.select("rect").attr({x:Math.floor(z),y:Math.floor(j),width:Math.ceil(N)-Math.floor(z),height:Math.ceil(B)-Math.floor(j)}),this.container.call(i.setClipUrl,F,this.gd),this.bg.attr({x:f,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||E){var H=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(H);var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(V),E&&this.vbar.on(".drag",null).call(V)}this.setTranslate(t,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=n.event.dx),this.vbar&&(t-=n.event.dy),this.setTranslate(e,t)},s.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=n.event.deltaY),this.vbar&&(t+=n.event.deltaY),this.setTranslate(e,t)},s.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var r=e+this._hbarXMin,a=r+this._hbarTranslateMax;e=(o.constrain(n.event.x,r,a)-r)/(a-r)*(this.position.w-this._box.w)}if(this.vbar){var i=t+this._vbarYMin,s=i+this._vbarTranslateMax;t=(o.constrain(n.event.y,i,s)-i)/(s-i)*(this.position.h-this._box.h)}this.setTranslate(e,t)},s.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=o.constrain(e||0,0,r),t=o.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var a=e/r;this.hbar.call(i.setTranslate,e+a*this._hbarTranslateMax,t)}if(this.vbar){var s=t/n;this.vbar.call(i.setTranslate,e,t+s*this._vbarTranslateMax)}}},{"../../lib":716,"../color":591,"../drawing":612,d3:164}],685:[function(e,t,r){"use strict";t.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},{}],686:[function(e,t,r){"use strict";t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},{}],687:[function(e,t,r){"use strict";t.exports={FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format",DATE_FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format"}},{}],688:[function(e,t,r){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],689:[function(e,t,r){"use strict";t.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],690:[function(e,t,r){"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},{}],691:[function(e,t,r){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],692:[function(e,t,r){"use strict";t.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEAVGYEAR:315576e5,ONEAVGMONTH:26298e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}},{}],693:[function(e,t,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],694:[function(e,t,r){"use strict";r.version="1.51.2",e("es6-promise").polyfill(),e("../build/plotcss"),e("./fonts/mathjax_config")();for(var n=e("./registry"),a=r.register=n.register,i=e("./plot_api"),o=Object.keys(i),s=0;s<o.length;s++){var l=o[s];"_"!==l.charAt(0)&&(r[l]=i[l]),a({moduleType:"apiMethod",name:l,fn:i[l]})}a(e("./traces/scatter")),a([e("./components/fx"),e("./components/legend"),e("./components/annotations"),e("./components/annotations3d"),e("./components/shapes"),e("./components/images"),e("./components/updatemenus"),e("./components/sliders"),e("./components/rangeslider"),e("./components/rangeselector"),e("./components/grid"),e("./components/errorbars"),e("./components/colorscale"),e("./components/colorbar")]),a([e("./locale-en"),e("./locale-en-us")]),r.Icons=e("./fonts/ploticon"),r.Plots=e("./plots/plots"),r.Fx=e("./components/fx"),r.Snapshot=e("./snapshot"),r.PlotSchema=e("./plot_api/plot_schema"),r.Queue=e("./lib/queue"),r.d3=e("d3")},{"../build/plotcss":1,"./components/annotations":582,"./components/annotations3d":587,"./components/colorbar":597,"./components/colorscale":603,"./components/errorbars":618,"./components/fx":629,"./components/grid":633,"./components/images":638,"./components/legend":646,"./components/rangeselector":657,"./components/rangeslider":664,"./components/shapes":672,"./components/sliders":677,"./components/updatemenus":683,"./fonts/mathjax_config":695,"./fonts/ploticon":696,"./lib/queue":731,"./locale-en":745,"./locale-en-us":744,"./plot_api":749,"./plot_api/plot_schema":753,"./plots/plots":825,"./registry":845,"./snapshot":850,"./traces/scatter":1130,d3:164,"es6-promise":220}],695:[function(e,t,r){"use strict";t.exports=function(){"undefined"!=typeof MathJax&&"local"!==(window.PlotlyConfig||{}).MathJaxConfig&&(MathJax.Hub.Config({messageStyle:"none",skipStartupTypeset:!0,displayAlign:"left",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}}),MathJax.Hub.Configured())}},{}],696:[function(e,t,r){"use strict";t.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'><defs><style>.cls-1 {fill: #119dff;} .cls-2 {fill: #25fefd;} .cls-3 {fill: #fff;}</style></defs><title>plotly-logomark</title><g id='symbol'><rect class='cls-1' width='132' height='132' rx='6' ry='6'/><circle class='cls-2' cx='78' cy='54' r='6'/><circle class='cls-2' cx='102' cy='30' r='6'/><circle class='cls-2' cx='78' cy='30' r='6'/><circle class='cls-2' cx='54' cy='30' r='6'/><circle class='cls-2' cx='30' cy='30' r='6'/><circle class='cls-2' cx='30' cy='54' r='6'/><path class='cls-3' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/><path class='cls-3' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/><path class='cls-3' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/><path class='cls-3' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/></g></svg>"}}},{}],697:[function(e,t,r){"use strict";r.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},r.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},r.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},r.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},r.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},r.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}},{}],698:[function(e,t,r){"use strict";var n=e("./mod"),a=n.mod,i=n.modHalf,o=Math.PI,s=2*o;function l(e){return Math.abs(e[1]-e[0])>s-1e-14}function c(e,t){return i(t-e,s)}function u(e,t){if(l(t))return!0;var r,n;t[0]<t[1]?(r=t[0],n=t[1]):(r=t[1],n=t[0]),(r=a(r,s))>(n=a(n,s))&&(n+=s);var i=a(e,s),o=i+s;return i>=r&&i<=n||o>=r&&o<=n}function d(e,t,r,n,a,i,c){a=a||0,i=i||0;var u,d,p,h,f,m=l([r,n]);function g(e,t){return[e*Math.cos(t)+a,i-e*Math.sin(t)]}m?(u=0,d=o,p=s):r<n?(u=r,p=n):(u=n,p=r),e<t?(h=e,f=t):(h=t,f=e);var v,y=Math.abs(p-u)<=o?0:1;function b(e,t,r){return"A"+[e,e]+" "+[0,y,r]+" "+g(e,t)}return m?v=null===h?"M"+g(f,u)+b(f,d,0)+b(f,p,0)+"Z":"M"+g(h,u)+b(h,d,0)+b(h,p,0)+"ZM"+g(f,u)+b(f,d,1)+b(f,p,1)+"Z":null===h?(v="M"+g(f,u)+b(f,p,0),c&&(v+="L0,0Z")):v="M"+g(h,u)+"L"+g(f,u)+b(f,p,0)+"L"+g(h,p)+b(h,u,1)+"Z",v}t.exports={deg2rad:function(e){return e/180*o},rad2deg:function(e){return e/o*180},angleDelta:c,angleDist:function(e,t){return Math.abs(c(e,t))},isFullCircle:l,isAngleInsideSector:u,isPtInsideSector:function(e,t,r,n){return!!u(t,n)&&(r[0]<r[1]?(a=r[0],i=r[1]):(a=r[1],i=r[0]),e>=a&&e<=i);var a,i},pathArc:function(e,t,r,n,a){return d(null,e,t,r,n,a,0)},pathSector:function(e,t,r,n,a){return d(null,e,t,r,n,a,1)},pathAnnulus:function(e,t,r,n,a,i){return d(e,t,r,n,a,i,1)}}},{"./mod":723}],699:[function(e,t,r){"use strict";var n=Array.isArray,a="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},i="undefined"==typeof DataView?function(){}:DataView;function o(e){return a.isView(e)&&!(e instanceof i)}function s(e){return n(e)||o(e)}function l(e,t,r){if(s(e)){if(s(e[0])){for(var n=r,a=0;a<e.length;a++)n=t(n,e[a].length);return n}return e.length}return 0}r.isTypedArray=o,r.isArrayOrTypedArray=s,r.isArray1D=function(e){return!s(e[0])},r.ensureArray=function(e,t){return n(e)||(e=[]),e.length=t,e},r.concat=function(){var e,t,r,a,i,o,s,l,c=[],u=!0,d=0;for(r=0;r<arguments.length;r++)(o=(a=arguments[r]).length)&&(t?c.push(a):(t=a,i=o),n(a)?e=!1:(u=!1,d?e!==a.constructor&&(e=!1):e=a.constructor),d+=o);if(!d)return[];if(!c.length)return t;if(u)return t.concat.apply(t,c);if(e){for((s=new e(d)).set(t),r=0;r<c.length;r++)a=c[r],s.set(a,i),i+=a.length;return s}for(s=new Array(d),l=0;l<t.length;l++)s[l]=t[l];for(r=0;r<c.length;r++){for(a=c[r],l=0;l<a.length;l++)s[i+l]=a[l];i+=l}return s},r.maxRowLength=function(e){return l(e,Math.max,0)},r.minRowLength=function(e){return l(e,Math.min,1/0)}},{}],700:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../constants/numerical").BADNUM,i=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(e){return"string"==typeof e&&(e=e.replace(i,"")),n(e)?Number(e):a}},{"../constants/numerical":692,"fast-isnumeric":227}],701:[function(e,t,r){"use strict";t.exports=function(e){var t=e._fullLayout;t._glcanvas&&t._glcanvas.size()&&t._glcanvas.each((function(e){e.regl&&e.regl.clear({color:!0,depth:!0})}))}},{}],702:[function(e,t,r){"use strict";t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}},{}],703:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("tinycolor2"),i=e("../plots/attributes"),o=e("../components/colorscale/scales"),s=e("../constants/interactions").DESELECTDIM,l=e("./nested_property"),c=e("./regex").counter,u=e("./mod").modHalf,d=e("./array").isArrayOrTypedArray;function p(e,t){var n=r.valObjectMeta[t.valType];if(t.arrayOk&&d(e))return!0;if(n.validateFunction)return n.validateFunction(e,t);var a={},i=a,o={set:function(e){i=e}};return n.coerceFunction(e,o,a,t),i!==a}r.valObjectMeta={data_array:{coerceFunction:function(e,t,r){d(e)?t.set(e):void 0!==r&&t.set(r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),-1===n.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;n<r.length;n++){var a=String(r[n]);if("/"===a.charAt(0)&&"/"===a.charAt(a.length-1)){if(new RegExp(a.substr(1,a.length-2)).test(e))return!0}else if(e===r[n])return!0}return!1}},boolean:{coerceFunction:function(e,t,r){!0===e||!1===e?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,a){!n(e)||void 0!==a.min&&e<a.min||void 0!==a.max&&e>a.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,a){e%1||!n(e)||void 0!==a.min&&e<a.min||void 0!==a.max&&e>a.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var a="number"==typeof e;!0!==n.strict&&a?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){a(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every((function(e){return a(e).isValid()}))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(o.get(e,r))}},angle:{coerceFunction:function(e,t,r){"auto"===e?t.set("auto"):n(e)?t.set(u(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||c(r);"string"==typeof e&&a.test(e)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!c(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if("string"==typeof e)if(-1===(n.extras||[]).indexOf(e)){for(var a=e.split("+"),i=0;i<a.length;){var o=a[i];-1===n.flags.indexOf(o)||a.indexOf(o)<i?a.splice(i,1):i++}a.length?t.set(a.join("+")):t.set(r)}else t.set(e);else t.set(r)}},any:{coerceFunction:function(e,t,r){void 0===e?t.set(r):t.set(e)}},info_array:{coerceFunction:function(e,t,n,a){function i(e,t,n){var a,i={set:function(e){a=e}};return void 0===n&&(n=t.dflt),r.valObjectMeta[t.valType].coerceFunction(e,i,n,t),a}var o=2===a.dimensions||"1-2"===a.dimensions&&Array.isArray(e)&&Array.isArray(e[0]);if(Array.isArray(e)){var s,l,c,u,d,p,h=a.items,f=[],m=Array.isArray(h),g=m&&o&&Array.isArray(h[0]),v=o&&m&&!g,y=m&&!v?h.length:e.length;if(n=Array.isArray(n)?n:[],o)for(s=0;s<y;s++)for(f[s]=[],c=Array.isArray(e[s])?e[s]:[],d=v?h.length:m?h[s].length:c.length,l=0;l<d;l++)u=v?h[l]:m?h[s][l]:h,void 0!==(p=i(c[l],u,(n[s]||[])[l]))&&(f[s][l]=p);else for(s=0;s<y;s++)void 0!==(p=i(e[s],m?h[s]:h,n[s]))&&(f[s]=p);t.set(f)}else t.set(n)},validateFunction:function(e,t){if(!Array.isArray(e))return!1;var r=t.items,n=Array.isArray(r),a=2===t.dimensions;if(!t.freeLength&&e.length!==r.length)return!1;for(var i=0;i<e.length;i++)if(a){if(!Array.isArray(e[i])||!t.freeLength&&e[i].length!==r[i].length)return!1;for(var o=0;o<e[i].length;o++)if(!p(e[i][o],n?r[i][o]:r))return!1}else if(!p(e[i],n?r[i]:r))return!1;return!0}}},r.coerce=function(e,t,n,a,i){var o=l(n,a).get(),s=l(e,a),c=l(t,a),u=s.get(),h=t._template;if(void 0===u&&h&&(u=l(h,a).get(),h=0),void 0===i&&(i=o.dflt),o.arrayOk&&d(u))return c.set(u),u;var f=r.valObjectMeta[o.valType].coerceFunction;f(u,c,i,o);var m=c.get();return h&&m===i&&!p(u,o)&&(f(u=l(h,a).get(),c,i,o),m=c.get()),m},r.coerce2=function(e,t,n,a,i){var o=l(e,a),s=r.coerce(e,t,n,a,i),c=o.get();return null!=c&&s},r.coerceFont=function(e,t,r){var n={};return r=r||{},n.family=e(t+".family",r.family),n.size=e(t+".size",r.size),n.color=e(t+".color",r.color),n},r.coerceHoverinfo=function(e,t,n){var a,o=t._module.attributes,s=o.hoverinfo?o:i,l=s.hoverinfo;if(1===n._dataLength){var c="all"===l.dflt?l.flags.slice():l.dflt.split("+");c.splice(c.indexOf("name"),1),a=c.join("+")}return r.coerce(e,t,s,"hoverinfo",a)},r.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var r,n,a=e.marker.opacity;void 0!==a&&(d(a)||e.selected||e.unselected||(r=a,n=s*a),t("selected.marker.opacity",r),t("unselected.marker.opacity",n))}},r.validate=p},{"../components/colorscale/scales":606,"../constants/interactions":691,"../plots/attributes":761,"./array":699,"./mod":723,"./nested_property":724,"./regex":732,"fast-isnumeric":227,tinycolor2:535}],704:[function(e,t,r){"use strict";var n,a,i=e("d3"),o=e("fast-isnumeric"),s=e("./loggers"),l=e("./mod").mod,c=e("../constants/numerical"),u=c.BADNUM,d=c.ONEDAY,p=c.ONEHOUR,h=c.ONEMIN,f=c.ONESEC,m=c.EPOCHJD,g=e("../registry"),v=i.time.format.utc,y=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m,b=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d:?\d\d)?)?)?)?)?\s*$/m,_=(new Date).getFullYear()-70;function x(e){return e&&g.componentsRegistry.calendars&&"string"==typeof e&&"gregorian"!==e}function w(e,t){return String(e+Math.pow(10,t)).substr(1)}r.dateTick0=function(e,t){return x(e)?t?g.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:g.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"},r.dfltRange=function(e){return x(e)?g.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]},r.isJSDate=function(e){return"object"==typeof e&&null!==e&&"function"==typeof e.getTime},r.dateTime2ms=function(e,t){if(r.isJSDate(e)){var i=e.getTimezoneOffset()*h,o=(e.getUTCMinutes()-e.getMinutes())*h+(e.getUTCSeconds()-e.getSeconds())*f+(e.getUTCMilliseconds()-e.getMilliseconds());if(o){var s=3*h;i=i-s/2+l(o-i+s/2,s)}return(e=Number(e)-i)>=n&&e<=a?e:u}if("string"!=typeof e&&"number"!=typeof e)return u;e=String(e);var c=x(t),v=e.charAt(0);!c||"G"!==v&&"g"!==v||(e=e.substr(1),t="");var w=c&&"chinese"===t.substr(0,7),k=e.match(w?b:y);if(!k)return u;var M=k[1],T=k[3]||"1",C=Number(k[5]||1),S=Number(k[7]||0),L=Number(k[9]||0),A=Number(k[11]||0);if(c){if(2===M.length)return u;var E;M=Number(M);try{var D=g.getComponentMethod("calendars","getCal")(t);if(w){var I="i"===T.charAt(T.length-1);T=parseInt(T,10),E=D.newDate(M,D.toMonthIndex(M,T,I),C)}else E=D.newDate(M,Number(T),C)}catch(e){return u}return E?(E.toJD()-m)*d+S*p+L*h+A*f:u}M=2===M.length?(Number(M)+2e3-_)%100+_:Number(M),T-=1;var P=new Date(Date.UTC(2e3,T,C,S,L));return P.setUTCFullYear(M),P.getUTCMonth()!==T?u:P.getUTCDate()!==C?u:P.getTime()+A*f},n=r.MIN_MS=r.dateTime2ms("-9999"),a=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(e,t){return r.dateTime2ms(e,t)!==u};var k=90*d,M=3*p,T=5*h;function C(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+w(t,2)+":"+w(r,2),(n||a)&&(e+=":"+w(n,2),a))){for(var i=4;a%10==0;)i-=1,a/=10;e+="."+w(a,i)}return e}r.ms2DateTime=function(e,t,r){if("number"!=typeof e||!(e>=n&&e<=a))return u;t||(t=0);var i,o,s,c,y,b,_=Math.floor(10*l(e+.05,1)),w=Math.round(e-_/10);if(x(r)){var S=Math.floor(w/d)+m,L=Math.floor(l(e,d));try{i=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(e){i=v("G%Y-%m-%d")(new Date(w))}if("-"===i.charAt(0))for(;i.length<11;)i="-0"+i.substr(1);else for(;i.length<10;)i="0"+i;o=t<k?Math.floor(L/p):0,s=t<k?Math.floor(L%p/h):0,c=t<M?Math.floor(L%h/f):0,y=t<T?L%f*10+_:0}else b=new Date(w),i=v("%Y-%m-%d")(b),o=t<k?b.getUTCHours():0,s=t<k?b.getUTCMinutes():0,c=t<M?b.getUTCSeconds():0,y=t<T?10*b.getUTCMilliseconds()+_:0;return C(i,o,s,c,y)},r.ms2DateTimeLocal=function(e){if(!(e>=n+d&&e<=a-d))return u;var t=Math.floor(10*l(e+.05,1)),r=new Date(Math.round(e-t/10));return C(i.time.format("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+t)},r.cleanDate=function(e,t,n){if(e===u)return t;if(r.isJSDate(e)||"number"==typeof e&&isFinite(e)){if(x(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(!(e=r.ms2DateTimeLocal(+e))&&void 0!==t)return t}else if(!r.isDateTime(e,n))return s.error("unrecognized date",e),t;return e};var S=/%\d?f/g;function L(e,t,r,n){e=e.replace(S,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(t+.05));if(x(n))try{e=g.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(e){return"Invalid"}return r(e)(a)}var A=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(e,t,r,n,a,i){if(a=x(a)&&a,!t)if("y"===r)t=i.year;else if("m"===r)t=i.month;else{if("d"!==r)return function(e,t){var r=l(e+.05,d),n=w(Math.floor(r/p),2)+":"+w(l(Math.floor(r/h),60),2);if("M"!==t){o(t)||(t=0);var a=(100+Math.min(l(e/f,60),A[t])).toFixed(t).substr(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+L(i.dayMonthYear,e,n,a);t=i.dayMonth+"\n"+i.year}return L(t,e,n,a)};var E=3*d;r.incrementMonth=function(e,t,r){r=x(r)&&r;var n=l(e,d);if(e=Math.round(e-n),r)try{var a=Math.round(e/d)+m,i=g.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-m)*d+n}catch(t){s.error("invalid ms "+e+" in calendar "+r)}var c=new Date(e+E);return c.setUTCMonth(c.getUTCMonth()+t)+n-E},r.findExactDates=function(e,t){for(var r,n,a=0,i=0,s=0,l=0,c=x(t)&&g.getComponentMethod("calendars","getCal")(t),u=0;u<e.length;u++)if(n=e[u],o(n)){if(!(n%d))if(c)try{1===(r=c.fromJD(n/d+m)).day()?1===r.month()?a++:i++:s++}catch(e){}else 1===(r=new Date(n)).getUTCDate()?0===r.getUTCMonth()?a++:i++:s++}else l++;s+=i+=a;var p=e.length-l;return{exactYears:a/p,exactMonths:i/p,exactDays:s/p}}},{"../constants/numerical":692,"../registry":845,"./loggers":720,"./mod":723,d3:164,"fast-isnumeric":227}],705:[function(e,t,r){"use strict";var n=e("d3"),a=e("./loggers");function i(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function o(e,t,r){var n="plotly.js-style-"+e,i=document.getElementById(n);i||((i=document.createElement("style")).setAttribute("id",n),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var o=i.sheet;o.insertRule?o.insertRule(t+"{"+r+"}",0):o.addRule?o.addRule(t,r,0):a.warn("addStyleRule failed")}t.exports={getGraphDiv:function(e){var t;if("string"==typeof e){if(null===(t=document.getElementById(e)))throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}if(null==e)throw new Error("DOM element provided is null or undefined");return e},isPlotDiv:function(e){var t=n.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")},removeElement:i,addStyleRule:function(e,t){o("global",e,t)},addRelatedStyleRule:o,deleteRelatedStyleRule:function(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&i(r)}}},{"./loggers":720,d3:164}],706:[function(e,t,r){"use strict";var n=e("events").EventEmitter,a={init:function(e){if(e._ev instanceof n)return e;var t=new n,r=new n;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,a){"undefined"!=typeof jQuery&&jQuery(e).trigger(n,a),t.emit(n,a),r.emit(n,a)},e},triggerHandler:function(e,t,r){var n,a;"undefined"!=typeof jQuery&&(n=jQuery(e).triggerHandler(t,r));var i=e._ev;if(!i)return n;var o,s=i._events[t];if(!s)return n;function l(e){return e.listener?(i.removeListener(t,e.listener),e.fired?void 0:(e.fired=!0,e.listener.apply(i,[r]))):e.apply(i,[r])}for(s=Array.isArray(s)?s:[s],o=0;o<s.length-1;o++)l(s[o]);return a=l(s[o]),void 0!==n?n:a},purge:function(e){return delete e._ev,delete e.on,delete e.once,delete e.removeListener,delete e.removeAllListeners,delete e.emit,delete e._ev,delete e._internalEv,delete e._internalOn,delete e._internalOnce,delete e._removeInternalListener,delete e._removeAllInternalListeners,e}};t.exports=a},{events:105}],707:[function(e,t,r){"use strict";var n=e("./is_plain_object.js"),a=Array.isArray;function i(e,t,r,o){var s,l,c,u,d,p,h=e[0],f=e.length;if(2===f&&a(h)&&a(e[1])&&0===h.length){if(function(e,t){var r,n;for(r=0;r<e.length;r++){if(null!==(n=e[r])&&"object"==typeof n)return!1;void 0!==n&&(t[r]=n)}return!0}(e[1],h))return h;h.splice(0,h.length)}for(var m=1;m<f;m++)for(l in s=e[m])c=h[l],u=s[l],o&&a(u)?h[l]=u:t&&u&&(n(u)||(d=a(u)))?(d?(d=!1,p=c&&a(c)?c:[]):p=c&&n(c)?c:{},h[l]=i([p,u],t,r,o)):(void 0!==u||r)&&(h[l]=u);return h}r.extendFlat=function(){return i(arguments,!1,!1,!1)},r.extendDeep=function(){return i(arguments,!0,!1,!1)},r.extendDeepAll=function(){return i(arguments,!0,!0,!1)},r.extendDeepNoArrays=function(){return i(arguments,!0,!1,!0)}},{"./is_plain_object.js":717}],708:[function(e,t,r){"use strict";t.exports=function(e){for(var t={},r=[],n=0,a=0;a<e.length;a++){var i=e[a];1!==t[i]&&(t[i]=1,r[n++]=i)}return r}},{}],709:[function(e,t,r){"use strict";function n(e){return!0===e.visible}function a(e){var t=e[0].trace;return!0===t.visible&&0!==t._length}t.exports=function(e){for(var t,r=(t=e,Array.isArray(t)&&Array.isArray(t[0])&&t[0][0]&&t[0][0].trace?a:n),i=[],o=0;o<e.length;o++){var s=e[o];r(s)&&i.push(s)}return i}},{}],710:[function(e,t,r){"use strict";var n=e("country-regex"),a=e("../lib"),i=Object.keys(n),o={"ISO-3":a.identity,"USA-states":a.identity,"country names":function(e){for(var t=0;t<i.length;t++){var r=i[t];if(new RegExp(n[r]).test(e.trim().toLowerCase()))return r}return a.log("Unrecognized country name: "+e+"."),!1}};t.exports={locationToFeature:function(e,t,r){if(!t||"string"!=typeof t)return!1;var n,i,s,l=o[e](t);if(l){if("USA-states"===e)for(n=[],s=0;s<r.length;s++)(i=r[s]).properties&&i.properties.gu&&"USA"===i.properties.gu&&n.push(i);else n=r;for(s=0;s<n.length;s++)if((i=n[s]).id===l)return i;a.log(["Location with id",l,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}}},{"../lib":716,"country-regex":135}],711:[function(e,t,r){"use strict";var n=e("../constants/numerical").BADNUM;r.calcTraceToLineCoords=function(e){for(var t=e[0].trace.connectgaps,r=[],a=[],i=0;i<e.length;i++){var o=e[i].lonlat;o[0]!==n?a.push(o):!t&&a.length>0&&(r.push(a),a=[])}return a.length>0&&r.push(a),r},r.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},r.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=[e[r]];return{type:"MultiPolygon",coordinates:t}},r.makeBlank=function(){return{type:"Point",coordinates:[]}}},{"../constants/numerical":692}],712:[function(e,t,r){"use strict";var n,a,i,o=e("./mod").mod;function s(e,t,r,n,a,i,o,s){var l=r-e,c=a-e,u=o-a,d=n-t,p=i-t,h=s-i,f=l*h-u*d;if(0===f)return null;var m=(c*h-u*p)/f,g=(c*d-l*p)/f;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+d*m}}function l(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,s=a-t;return o*o+s*s}var l=n*t-a*e;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(e,t,r,n,a,i,o,c){if(s(e,t,r,n,a,i,o,c))return 0;var u=r-e,d=n-t,p=o-a,h=c-i,f=u*u+d*d,m=p*p+h*h,g=Math.min(l(u,d,f,a-e,i-t),l(u,d,f,o-e,c-t),l(p,h,m,e-a,t-i),l(p,h,m,r-a,n-i));return Math.sqrt(g)},r.getTextLocation=function(e,t,r,s){if(e===a&&s===i||(n={},a=e,i=s),n[r])return n[r];var l=e.getPointAtLength(o(r-s/2,t)),c=e.getPointAtLength(o(r+s/2,t)),u=Math.atan((c.y-l.y)/(c.x-l.x)),d=e.getPointAtLength(o(r,t)),p={x:(4*d.x+l.x+c.x)/6,y:(4*d.y+l.y+c.y)/6,theta:u};return n[r]=p,p},r.clearLocationCache=function(){a=null},r.getVisibleSegment=function(e,t,r){var n,a,i=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),d=u;function p(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(a=r);var c=r.x<i?i-r.x:r.x>o?r.x-o:0,d=r.y<s?s-r.y:r.y>l?r.y-l:0;return Math.sqrt(c*c+d*d)}for(var h=p(c);h;){if((c+=h+r)>d)return;h=p(c)}for(h=p(d);h;){if(c>(d-=h+r))return;h=p(d)}return{min:c,max:d,len:d-c,total:u,isClosed:0===c&&d===u&&Math.abs(n.x-a.x)<.1&&Math.abs(n.y-a.y)<.1}},r.findPointOnPath=function(e,t,r,n){for(var a,i,o,s=(n=n||{}).pathLength||e.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,d=0,p=0,h=s;d<c;){if(a=(p+h)/2,o=(i=e.getPointAtLength(a))[r]-t,Math.abs(o)<l)return i;u*o>0?h=a:p=a,d++}return i}},{"./mod":723}],713:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("tinycolor2"),i=e("color-normalize"),o=e("../components/colorscale"),s=e("../components/color/attributes").defaultLine,l=e("./array").isArrayOrTypedArray,c=i(s),u=1;function d(e,t){var r=e;return r[3]*=t,r}function p(e){if(n(e))return c;var t=i(e);return t.length?t:c}function h(e){return n(e)?e:u}t.exports={formatColor:function(e,t,r){var n,a,s,f,m,g=e.color,v=l(g),y=l(t),b=o.extractOpts(e),_=[];if(n=void 0!==b.colorscale?o.makeColorScaleFuncFromTrace(e):p,a=v?function(e,t){return void 0===e[t]?c:i(n(e[t]))}:p,s=y?function(e,t){return void 0===e[t]?u:h(e[t])}:h,v||y)for(var x=0;x<r;x++)f=a(g,x),m=s(t,x),_[x]=d(f,m);else _=d(i(g),t);return _},parseColorScale:function(e,t){void 0===t&&(t=1);var r=o.extractOpts(e);return(r.reversescale?o.flipScale(r.colorscale):r.colorscale).map((function(e){var r=e[0],n=a(e[1]).toRgb();return{index:r,rgb:[n.r,n.g,n.b,t]}}))}}},{"../components/color/attributes":590,"../components/colorscale":603,"./array":699,"color-normalize":121,"fast-isnumeric":227,tinycolor2:535}],714:[function(e,t,r){"use strict";var n=e("./identity");function a(e){return[e]}t.exports={keyFun:function(e){return e.key},repeat:a,descend:n,wrap:a,unwrap:function(e){return e[0]}}},{"./identity":715}],715:[function(e,t,r){"use strict";t.exports=function(e){return e}},{}],716:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../constants/numerical"),o=i.FP_SAFE,s=i.BADNUM,l=t.exports={};l.nestedProperty=e("./nested_property"),l.keyedContainer=e("./keyed_container"),l.relativeAttr=e("./relative_attr"),l.isPlainObject=e("./is_plain_object"),l.toLogRange=e("./to_log_range"),l.relinkPrivateKeys=e("./relink_private");var c=e("./array");l.isTypedArray=c.isTypedArray,l.isArrayOrTypedArray=c.isArrayOrTypedArray,l.isArray1D=c.isArray1D,l.ensureArray=c.ensureArray,l.concat=c.concat,l.maxRowLength=c.maxRowLength,l.minRowLength=c.minRowLength;var u=e("./mod");l.mod=u.mod,l.modHalf=u.modHalf;var d=e("./coerce");l.valObjectMeta=d.valObjectMeta,l.coerce=d.coerce,l.coerce2=d.coerce2,l.coerceFont=d.coerceFont,l.coerceHoverinfo=d.coerceHoverinfo,l.coerceSelectionMarkerOpacity=d.coerceSelectionMarkerOpacity,l.validate=d.validate;var p=e("./dates");l.dateTime2ms=p.dateTime2ms,l.isDateTime=p.isDateTime,l.ms2DateTime=p.ms2DateTime,l.ms2DateTimeLocal=p.ms2DateTimeLocal,l.cleanDate=p.cleanDate,l.isJSDate=p.isJSDate,l.formatDate=p.formatDate,l.incrementMonth=p.incrementMonth,l.dateTick0=p.dateTick0,l.dfltRange=p.dfltRange,l.findExactDates=p.findExactDates,l.MIN_MS=p.MIN_MS,l.MAX_MS=p.MAX_MS;var h=e("./search");l.findBin=h.findBin,l.sorterAsc=h.sorterAsc,l.sorterDes=h.sorterDes,l.distinctVals=h.distinctVals,l.roundUp=h.roundUp,l.sort=h.sort,l.findIndexOfMin=h.findIndexOfMin;var f=e("./stats");l.aggNums=f.aggNums,l.len=f.len,l.mean=f.mean,l.median=f.median,l.midRange=f.midRange,l.variance=f.variance,l.stdev=f.stdev,l.interp=f.interp;var m=e("./matrix");l.init2dArray=m.init2dArray,l.transposeRagged=m.transposeRagged,l.dot=m.dot,l.translationMatrix=m.translationMatrix,l.rotationMatrix=m.rotationMatrix,l.rotationXYMatrix=m.rotationXYMatrix,l.apply2DTransform=m.apply2DTransform,l.apply2DTransform2=m.apply2DTransform2;var g=e("./angles");l.deg2rad=g.deg2rad,l.rad2deg=g.rad2deg,l.angleDelta=g.angleDelta,l.angleDist=g.angleDist,l.isFullCircle=g.isFullCircle,l.isAngleInsideSector=g.isAngleInsideSector,l.isPtInsideSector=g.isPtInsideSector,l.pathArc=g.pathArc,l.pathSector=g.pathSector,l.pathAnnulus=g.pathAnnulus;var v=e("./anchor_utils");l.isLeftAnchor=v.isLeftAnchor,l.isCenterAnchor=v.isCenterAnchor,l.isRightAnchor=v.isRightAnchor,l.isTopAnchor=v.isTopAnchor,l.isMiddleAnchor=v.isMiddleAnchor,l.isBottomAnchor=v.isBottomAnchor;var y=e("./geometry2d");l.segmentsIntersect=y.segmentsIntersect,l.segmentDistance=y.segmentDistance,l.getTextLocation=y.getTextLocation,l.clearLocationCache=y.clearLocationCache,l.getVisibleSegment=y.getVisibleSegment,l.findPointOnPath=y.findPointOnPath;var b=e("./extend");l.extendFlat=b.extendFlat,l.extendDeep=b.extendDeep,l.extendDeepAll=b.extendDeepAll,l.extendDeepNoArrays=b.extendDeepNoArrays;var _=e("./loggers");l.log=_.log,l.warn=_.warn,l.error=_.error;var x=e("./regex");l.counterRegex=x.counter;var w=e("./throttle");l.throttle=w.throttle,l.throttleDone=w.done,l.clearThrottle=w.clear;var k=e("./dom");function M(e){var t={};for(var r in e)for(var n=e[r],a=0;a<n.length;a++)t[n[a]]=+r;return t}l.getGraphDiv=k.getGraphDiv,l.isPlotDiv=k.isPlotDiv,l.removeElement=k.removeElement,l.addStyleRule=k.addStyleRule,l.addRelatedStyleRule=k.addRelatedStyleRule,l.deleteRelatedStyleRule=k.deleteRelatedStyleRule,l.clearResponsive=e("./clear_responsive"),l.makeTraceGroups=e("./make_trace_groups"),l._=e("./localize"),l.notifier=e("./notifier"),l.filterUnique=e("./filter_unique"),l.filterVisible=e("./filter_visible"),l.pushUnique=e("./push_unique"),l.cleanNumber=e("./clean_number"),l.ensureNumber=function(e){return a(e)?(e=Number(e))<-o||e>o?s:a(e)?Number(e):s:s},l.isIndex=function(e,t){return!(void 0!==t&&e>=t)&&a(e)&&e>=0&&e%1==0},l.noop=e("./noop"),l.identity=e("./identity"),l.repeat=function(e,t){for(var r=new Array(t),n=0;n<t;n++)r[n]=e;return r},l.swapAttrs=function(e,t,r,n){r||(r="x"),n||(n="y");for(var a=0;a<t.length;a++){var i=t[a],o=l.nestedProperty(e,i.replace("?",r)),s=l.nestedProperty(e,i.replace("?",n)),c=o.get();o.set(s.get()),s.set(c)}},l.raiseToTop=function(e){e.parentNode.appendChild(e)},l.cancelTransition=function(e){return e.transition().duration(0)},l.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},l.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},l.simpleMap=function(e,t,r,n){for(var a=e.length,i=new Array(a),o=0;o<a;o++)i[o]=t(e[o],r,n);return i},l.randstr=function e(t,r,n,a){if(n||(n=16),void 0===r&&(r=24),r<=0)return"0";var i,o,s=Math.log(Math.pow(2,r))/Math.log(n),c="";for(i=2;s===1/0;i*=2)s=Math.log(Math.pow(2,r/i))/Math.log(n)*i;var u=s-Math.floor(s);for(i=0;i<Math.floor(s);i++)c=Math.floor(Math.random()*n).toString(n)+c;u&&(o=Math.pow(n,u),c=Math.floor(Math.random()*o).toString(n)+c);var d=parseInt(c,n);return t&&t[c]||d!==1/0&&d>=Math.pow(2,r)?a>10?(l.warn("randstr failed uniqueness"),c):e(t,r,n,(a||0)+1):c},l.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},l.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,a,i,o=e.length,s=2*o,l=2*t-1,c=new Array(l),u=new Array(o);for(r=0;r<l;r++)c[r]=(1-Math.cos(Math.PI*(r+1)/t))/(2*t);for(r=0;r<o;r++){for(i=0,n=0;n<l;n++)(a=r+n+1-t)<-o?a-=s*Math.round(a/s):a>=s&&(a-=s*Math.floor(a/s)),a<0?a=-1-a:a>=o&&(a=s-1-a),i+=e[a]*c[n];u[r]=i}return u},l.syncOrAsync=function(e,t,r){var n;function a(){return l.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(a).then(void 0,l.promiseError);return r&&r(t)},l.stripTrailingSlash=function(e){return"/"===e.substr(-1)?e.substr(0,e.length-1):e},l.noneOrAll=function(e,t,r){if(e){var n,a=!1,i=!0;for(n=0;n<r.length;n++)null!=e[r[n]]?a=!0:i=!1;if(a&&!i)for(n=0;n<r.length;n++)e[r[n]]=t[r[n]]}},l.mergeArray=function(e,t,r,n){var a="function"==typeof n;if(l.isArrayOrTypedArray(e))for(var i=Math.min(e.length,t.length),o=0;o<i;o++){var s=e[o];t[o][r]=a?n(s):s}},l.mergeArrayCastPositive=function(e,t,r){return l.mergeArray(e,t,r,(function(e){var t=+e;return isFinite(t)&&t>0?t:0}))},l.fillArray=function(e,t,r,n){if(n=n||l.identity,l.isArrayOrTypedArray(e))for(var a=0;a<t.length;a++)t[a][r]=n(e[a])},l.castOption=function(e,t,r,n){n=n||l.identity;var a=l.nestedProperty(e,r).get();return l.isArrayOrTypedArray(a)?Array.isArray(t)&&l.isArrayOrTypedArray(a[t[0]])?n(a[t[0]][t[1]]):n(a[t]):a},l.extractOption=function(e,t,r,n){if(r in e)return e[r];var a=l.nestedProperty(t,n).get();return Array.isArray(a)?void 0:a},l.tagSelected=function(e,t,r){var n,a,i=t.selectedpoints,o=t._indexToPoints;o&&(n=M(o));for(var s=0;s<i.length;s++){var c=i[s];if(l.isIndex(c)){var u=n?n[c]:c,d=r?r[u]:u;void 0!==(a=d)&&a<e.length&&(e[d].selected=1)}}},l.selIndices2selPoints=function(e){var t=e.selectedpoints,r=e._indexToPoints;if(r){for(var n=M(r),a=[],i=0;i<t.length;i++){var o=t[i];if(l.isIndex(o)){var s=n[o];l.isIndex(s)&&a.push(s)}}return a}return t},l.getTargetArray=function(e,t){var r=t.target;if("string"==typeof r&&r){var n=l.nestedProperty(e,r).get();return!!Array.isArray(n)&&n}return!!Array.isArray(r)&&r},l.minExtend=function(e,t){var r={};"object"!=typeof t&&(t={});var n,a,i,o=Object.keys(e);for(n=0;n<o.length;n++)i=e[a=o[n]],"_"!==a.charAt(0)&&"function"!=typeof i&&("module"===a?r[a]=i:Array.isArray(i)?r[a]="colorscale"===a?i.slice():i.slice(0,3):l.isTypedArray(i)?r[a]=i.subarray(0,3):r[a]=i&&"object"==typeof i?l.minExtend(e[a],t[a]):i);for(o=Object.keys(t),n=0;n<o.length;n++)"object"==typeof(i=t[a=o[n]])&&a in r&&"object"==typeof r[a]||(r[a]=i);return r},l.titleCase=function(e){return e.charAt(0).toUpperCase()+e.substr(1)},l.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(-1!==e.indexOf(t[r]))return!0;return!1},l.isIE=function(){return void 0!==window.navigator.msSaveBlob};var T=/MSIE [1-9]\./;l.isIE9orBelow=function(){return l.isIE()&&T.test(window.navigator.userAgent)};var C=/Version\/[\d\.]+.*Safari/;l.isSafari=function(){return C.test(window.navigator.userAgent)},l.isD3Selection=function(e){return e&&"function"==typeof e.classed},l.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i},l.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i},l.objectFromPath=function(e,t){for(var r,n=e.split("."),a=r={},i=0;i<n.length;i++){var o=n[i],s=null,l=n[i].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],r=r[o]=[],i===n.length-1?r[s]=t:r[s]={},r=r[s]):(i===n.length-1?r[o]=t:r[o]={},r=r[o])}return a};var S=/^([^\[\.]+)\.(.+)?/,L=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;l.expandObjectPaths=function(e){var t,r,n,a,i,o,s;if("object"==typeof e&&!Array.isArray(e))for(r in e)e.hasOwnProperty(r)&&((t=r.match(S))?(a=e[r],n=t[1],delete e[r],e[n]=l.extendDeepNoArrays(e[n]||{},l.objectFromPath(r,l.expandObjectPaths(a))[n])):(t=r.match(L))?(a=e[r],n=t[1],i=parseInt(t[2]),delete e[r],e[n]=e[n]||[],"."===t[3]?(s=t[4],o=e[n][i]=e[n][i]||{},l.extendDeepNoArrays(o,l.objectFromPath(s,l.expandObjectPaths(a)))):e[n][i]=l.expandObjectPaths(a)):e[r]=l.expandObjectPaths(e[r]));return e},l.numSeparate=function(e,t,r){if(r||(r=!1),"string"!=typeof t||0===t.length)throw new Error("Separator string required for formatting!");"number"==typeof e&&(e=String(e));var n=/(\d+)(\d{3})/,a=t.charAt(0),i=t.charAt(1),o=e.split("."),s=o[0],l=o.length>1?a+o[1]:"";if(i&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+i+"$2");return s+l},l.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var A=/^\w*$/;l.templateString=function(e,t){var r={};return e.replace(l.TEMPLATE_STRING_REGEX,(function(e,n){return A.test(n)?t[n]||"":(r[n]=r[n]||l.nestedProperty(t,n).get,r[n]()||"")}))};var E={max:10,count:0,name:"hovertemplate"};l.hovertemplateString=function(){return P.apply(E,arguments)};var D={max:10,count:0,name:"texttemplate"};l.texttemplateString=function(){return P.apply(D,arguments)};var I=/^[:|\|]/;function P(e,t,r){var a=this,i=arguments;t||(t={});var o={};return e.replace(l.TEMPLATE_STRING_REGEX,(function(e,s,c){var u,d,p,h;for(p=3;p<i.length;p++)if(u=i[p]){if(u.hasOwnProperty(s)){d=u[s];break}if(A.test(s)||(d=o[s]||l.nestedProperty(u,s).get())&&(o[s]=d),void 0!==d)break}if(void 0===d&&a)return a.count<a.max&&(l.warn("Variable '"+s+"' in "+a.name+" could not be found!"),d=e),a.count===a.max&&l.warn("Too many "+a.name+" warnings - additional warnings will be suppressed"),a.count++,e;if(c){if(":"===c[0]&&(d=(h=r?r.numberFormat:n.format)(c.replace(I,""))(d)),"|"===c[0]){h=r?r.timeFormat.utc:n.time.format.utc;var f=l.dateTime2ms(d);d=l.formatDate(f,c.replace(I,""),!1,h)}}else t.hasOwnProperty(s+"Label")&&(d=t[s+"Label"]);return d}))}l.subplotSort=function(e,t){for(var r=Math.min(e.length,t.length)+1,n=0,a=0,i=0;i<r;i++){var o=e.charCodeAt(i)||0,s=t.charCodeAt(i)||0,l=o>=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(a=10*a+s-48),!l||!c){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var O=2e9;l.seedPseudoRandom=function(){O=2e9},l.pseudoRandom=function(){var e=O;return O=(69069*O+1)%4294967296,Math.abs(O-e)<429496729?l.pseudoRandom():O/4294967296},l.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},a=l.extractOption(e,t,"htx","hovertext");if(l.isValidTextValue(a))return n(a);var i=l.extractOption(e,t,"tx","text");return l.isValidTextValue(i)?n(i):void 0},l.isValidTextValue=function(e){return e||0===e},l.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n<t;n++)-1!==r.indexOf(".")&&(r=(r=r.replace("0%","%")).replace(".%","%"));return r},l.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||"none"===t},l.getTextTransform=function(e){var t,r=e.textX,n=e.textY,a=e.targetX,i=e.targetY,o=e.scale,s=e.rotate;return o<1?t="scale("+o+") ":(o=1,t=""),"translate("+(a-o*r)+" "+(i-o*n)+")"+t+(s?"rotate("+s+" "+r+" "+n+") ":"")}},{"../constants/numerical":692,"./anchor_utils":697,"./angles":698,"./array":699,"./clean_number":700,"./clear_responsive":702,"./coerce":703,"./dates":704,"./dom":705,"./extend":707,"./filter_unique":708,"./filter_visible":709,"./geometry2d":712,"./identity":715,"./is_plain_object":717,"./keyed_container":718,"./localize":719,"./loggers":720,"./make_trace_groups":721,"./matrix":722,"./mod":723,"./nested_property":724,"./noop":725,"./notifier":726,"./push_unique":730,"./regex":732,"./relative_attr":733,"./relink_private":734,"./search":735,"./stats":738,"./throttle":741,"./to_log_range":742,d3:164,"fast-isnumeric":227}],717:[function(e,t,r){"use strict";t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e)===Object.prototype}},{}],718:[function(e,t,r){"use strict";var n=e("./nested_property"),a=/^\w*$/;t.exports=function(e,t,r,i){var o,s,l;r=r||"name",i=i||"value";var c={};t&&t.length?(l=n(e,t),s=l.get()):s=e,t=t||"";var u={};if(s)for(o=0;o<s.length;o++)u[s[o][r]]=o;var d=a.test(i),p={set:function(e,t){var a=null===t?4:0;if(!s){if(!l||4===a)return;s=[],l.set(s)}var o=u[e];if(void 0===o){if(4===a)return;a|=3,o=s.length,u[e]=o}else t!==(d?s[o][i]:n(s[o],i).get())&&(a|=2);var h=s[o]=s[o]||{};return h[r]=e,d?h[i]=t:n(h,i).set(t),null!==t&&(a&=-5),c[o]=c[o]|a,p},get:function(e){if(s){var t=u[e];return void 0===t?void 0:d?s[t][i]:n(s[t],i).get()}},rename:function(e,t){var n=u[e];return void 0===n?p:(c[n]=1|c[n],u[t]=n,delete u[e],s[n][r]=t,p)},remove:function(e){var t=u[e];if(void 0===t)return p;var a=s[t];if(Object.keys(a).length>2)return c[t]=2|c[t],p.set(e,null);if(d){for(o=t;o<s.length;o++)c[o]=3|c[o];for(o=t;o<s.length;o++)u[s[o][r]]--;s.splice(t,1),delete u[e]}else n(a,i).set(null),c[t]=6|c[t];return p},constructUpdate:function(){for(var e,a,o={},l=Object.keys(c),u=0;u<l.length;u++)a=l[u],e=t+"["+a+"]",s[a]?(1&c[a]&&(o[e+"."+r]=s[a][r]),2&c[a]&&(o[e+"."+i]=d?4&c[a]?null:s[a][i]:4&c[a]?null:n(s[a],i).get())):o[e]=null;return o}};return p}},{"./nested_property":724}],719:[function(e,t,r){"use strict";var n=e("../registry");t.exports=function(e,t){for(var r=e._context.locale,a=0;a<2;a++){for(var i=e._context.locales,o=0;o<2;o++){var s=(i[r]||{}).dictionary;if(s){var l=s[t];if(l)return l}i=n.localeRegistry}var c=r.split("-")[0];if(c===r)break;r=c}return t}},{"../registry":845}],720:[function(e,t,r){"use strict";var n=e("../plot_api/plot_config").dfltConfig,a=t.exports={};function i(e,t){if(e&&e.apply)try{return void e.apply(console,t)}catch(e){}for(var r=0;r<t.length;r++)try{e(t[r])}catch(e){console.log(t[r])}}a.log=function(){if(n.logging>1){for(var e=["LOG:"],t=0;t<arguments.length;t++)e.push(arguments[t]);i(console.trace||console.log,e)}},a.warn=function(){if(n.logging>0){for(var e=["WARN:"],t=0;t<arguments.length;t++)e.push(arguments[t]);i(console.trace||console.log,e)}},a.error=function(){if(n.logging>0){for(var e=["ERROR:"],t=0;t<arguments.length;t++)e.push(arguments[t]);i(console.error,e)}}},{"../plot_api/plot_config":752}],721:[function(e,t,r){"use strict";var n=e("d3");t.exports=function(e,t,r){var a=e.selectAll("g."+r.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",r),a.order();var i=e.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(e){e[0][i]=n.select(this)})),a}},{d3:164}],722:[function(e,t,r){"use strict";r.init2dArray=function(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=new Array(t);return r},r.transposeRagged=function(e){var t,r,n=0,a=e.length;for(t=0;t<a;t++)n=Math.max(n,e[t].length);var i=new Array(n);for(t=0;t<n;t++)for(i[t]=new Array(a),r=0;r<a;r++)i[t][r]=e[r][t];return i},r.dot=function(e,t){if(!e.length||!t.length||e.length!==t.length)return null;var n,a,i=e.length;if(e[0].length)for(n=new Array(i),a=0;a<i;a++)n[a]=r.dot(e[a],t);else if(t[0].length){var o=r.transposeRagged(t);for(n=new Array(o.length),a=0;a<o.length;a++)n[a]=r.dot(e,o[a])}else for(n=0,a=0;a<i;a++)n+=e[a]*t[a];return n},r.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]},r.rotationMatrix=function(e){var t=e*Math.PI/180;return[[Math.cos(t),-Math.sin(t),0],[Math.sin(t),Math.cos(t),0],[0,0,1]]},r.rotationXYMatrix=function(e,t,n){return r.dot(r.dot(r.translationMatrix(t,n),r.rotationMatrix(e)),r.translationMatrix(-t,-n))},r.apply2DTransform=function(e){return function(){var t=arguments;3===t.length&&(t=t[0]);var n=1===arguments.length?t[0]:[t[0],t[1]];return r.dot(e,[n[0],n[1],1]).slice(0,2)}},r.apply2DTransform2=function(e){var t=r.apply2DTransform(e);return function(e){return t(e.slice(0,2)).concat(t(e.slice(2,4)))}}},{}],723:[function(e,t,r){"use strict";t.exports={mod:function(e,t){var r=e%t;return r<0?r+t:r},modHalf:function(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}}},{}],724:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./array").isArrayOrTypedArray;function i(e,t){return function(){var r,n,o,s,l,c=e;for(s=0;s<t.length-1;s++){if(-1===(r=t[s])){for(n=!0,o=[],l=0;l<c.length;l++)o[l]=i(c[l],t.slice(s+1))(),o[l]!==o[0]&&(n=!1);return n?o[0]:o}if("number"==typeof r&&!a(c))return;if("object"!=typeof(c=c[r])||null===c)return}if("object"==typeof c&&null!==c&&null!==(o=c[t[s]]))return o}}t.exports=function(e,t){if(n(t))t=String(t);else if("string"!=typeof t||"[-1]"===t.substr(t.length-4))throw"bad property string";for(var r,a,o,s=0,c=t.split(".");s<c.length;){if(r=String(c[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(r[1])c[s]=r[1];else{if(0!==s)throw"bad property string";c.splice(0,1)}for(a=r[2].substr(1,r[2].length-2).split("]["),o=0;o<a.length;o++)s++,c.splice(s,0,Number(a[o]))}s++}return"object"!=typeof e?function(e,t,r){return{set:function(){throw"bad container"},get:function(){},astr:t,parts:r,obj:e}}(e,t,c):{set:l(e,c,t),get:i(e,c),astr:t,parts:c,obj:e}};var o=/(^|\.)args\[/;function s(e,t){return void 0===e||null===e&&!t.match(o)}function l(e,t,r){return function(n){var i,o,l=e,p="",h=[[e,p]],f=s(n,r);for(o=0;o<t.length-1;o++){if("number"==typeof(i=t[o])&&!a(l))throw"array index but container is not an array";if(-1===i){if(f=!u(l,t.slice(o+1),n,r))break;return}if(!d(l,i,t[o+1],f))break;if("object"!=typeof(l=l[i])||null===l)throw"container is not an object";p=c(p,i),h.push([l,p])}if(f){if(o===t.length-1&&(delete l[t[o]],Array.isArray(l)&&+t[o]==l.length-1))for(;l.length&&void 0===l[l.length-1];)l.pop()}else l[t[o]]=n}}function c(e,t){var r=t;return n(t)?r="["+t+"]":e&&(r="."+t),e+r}function u(e,t,r,n){var i,o=a(r),c=!0,u=r,p=n.replace("-1",0),h=!o&&s(r,p),f=t[0];for(i=0;i<e.length;i++)p=n.replace("-1",i),o&&(h=s(u=r[i%r.length],p)),h&&(c=!1),d(e,i,f,h)&&l(e[i],t,n.replace("-1",i))(u);return c}function d(e,t,r,n){if(void 0===e[t]){if(n)return!1;e[t]="number"==typeof r?[]:{}}return!0}},{"./array":699,"fast-isnumeric":227}],725:[function(e,t,r){"use strict";t.exports=function(){}},{}],726:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=[];t.exports=function(e,t){if(-1===i.indexOf(e)){i.push(e);var r=1e3;a(t)?r=t:"long"===t&&(r=3e3);var o=n.select("body").selectAll(".plotly-notifier").data([0]);o.enter().append("div").classed("plotly-notifier",!0),o.selectAll(".notifier-note").data(i).enter().append("div").classed("notifier-note",!0).style("opacity",0).each((function(e){var t=n.select(this);t.append("button").classed("notifier-close",!0).html("&times;").on("click",(function(){t.transition().call(s)}));for(var a=t.append("p"),i=e.split(/<br\s*\/?>/g),o=0;o<i.length;o++)o&&a.append("br"),a.append("span").text(i[o]);t.transition().duration(700).style("opacity",1).transition().delay(r).call(s)}))}function s(e){e.duration(700).style("opacity",0).each("end",(function(e){var t=i.indexOf(e);-1!==t&&i.splice(t,1),n.select(this).remove()}))}}},{d3:164,"fast-isnumeric":227}],727:[function(e,t,r){"use strict";var n=e("./setcursor"),a="data-savedcursor";t.exports=function(e,t){var r=e.attr(a);if(t){if(!r){for(var i=(e.attr("class")||"").split(" "),o=0;o<i.length;o++){var s=i[o];0===s.indexOf("cursor-")&&e.attr(a,s.substr(7)).classed(s,!1)}e.attr(a)||e.attr(a,"!!")}n(e,t)}else r&&(e.attr(a,null),"!!"===r?n(e):n(e,r))}},{"./setcursor":736}],728:[function(e,t,r){"use strict";var n=e("./matrix").dot,a=e("../constants/numerical").BADNUM,i=t.exports={};i.tester=function(e){var t,r=e.slice(),n=r[0][0],i=n,o=r[0][1],s=o;for(r.push(r[0]),t=1;t<r.length;t++)n=Math.min(n,r[t][0]),i=Math.max(i,r[t][0]),o=Math.min(o,r[t][1]),s=Math.max(s,r[t][1]);var l,c=!1;5===r.length&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(c=!0,l=function(e){return e[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(c=!0,l=function(e){return e[1]===r[0][1]}));var u=!0,d=r[0];for(t=1;t<r.length;t++)if(d[0]!==r[t][0]||d[1]!==r[t][1]){u=!1;break}return{xmin:n,xmax:i,ymin:o,ymax:s,pts:r,contains:c?function(e,t){var r=e[0],c=e[1];return!(r===a||r<n||r>i||c===a||c<o||c>s||t&&l(e))}:function(e,t){var l=e[0],c=e[1];if(l===a||l<n||l>i||c===a||c<o||c>s)return!1;var u,d,p,h,f,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;u<m;u++)if(d=g,p=v,g=r[u][0],v=r[u][1],!(l<(h=Math.min(d,g))||l>Math.max(d,g)||c>Math.max(p,v)))if(c<Math.min(p,v))l!==h&&y++;else{if(c===(f=g===d?c:p+(l-d)*(v-p)/(g-d)))return 1!==u||!t;c<=f&&l!==h&&y++}return y%2==1},isRect:c,degenerate:u}},i.isSegmentBent=function(e,t,r,a){var i,o,s,l=e[t],c=[e[r][0]-l[0],e[r][1]-l[1]],u=n(c,c),d=Math.sqrt(u),p=[-c[1]/d,c[0]/d];for(i=t+1;i<r;i++)if(o=[e[i][0]-l[0],e[i][1]-l[1]],(s=n(o,c))<0||s>u||Math.abs(n(o,p))>a)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var s=r.length,l=n;r.splice(a+1);for(var c=l+1;c<e.length;c++)(c===e.length-1||i.isSegmentBent(e,l,c+1,t))&&(r.push(e[c]),r.length<s-2&&(n=c,a=r.length-1),l=c)}return e.length>1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}},{"../constants/numerical":692,"./matrix":722}],729:[function(e,r,n){(function(t){"use strict";var n=e("./show_no_webgl_msg"),a=e("regl");r.exports=function(e,r){var i=e._fullLayout,o=!0;return i._glcanvas.each((function(n){if(!n.regl&&(!n.pick||i._has("parcoords"))){try{n.regl=a({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||t.devicePixelRatio,extensions:r||[]})}catch(e){o=!1}o&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:n.key})}),!1)}})),o||n({container:i._glcontainer.node()}),o}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":737,regl:500}],730:[function(e,t,r){"use strict";t.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;n<e.length;n++)if(e[n]instanceof RegExp&&e[n].toString()===r)return e;e.push(t)}else!t&&0!==t||-1!==e.indexOf(t)||e.push(t);return e}},{}],731:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/plot_config").dfltConfig,i={add:function(e,t,r,n,i){var o,s;e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},s=e.undoQueue.index,e.autoplay?e.undoQueue.inSequence||(e.autoplay=!1):(!e.undoQueue.sequence||e.undoQueue.beginSequence?(o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(s,e.undoQueue.queue.length-s,o),e.undoQueue.index+=1):o=e.undoQueue.queue[s-1],e.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(t),o.undo.args.unshift(r),o.redo.calls.push(n),o.redo.args.push(i)),e.undoQueue.queue.length>a.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(e.framework&&e.framework.isPolar)e.framework.undo();else if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r<t.undo.calls.length;r++)i.plotDo(e,t.undo.calls[r],t.undo.args[r]);e.undoQueue.inSequence=!1,e.autoplay=!1}},redo:function(e){var t,r;if(e.framework&&e.framework.isPolar)e.framework.redo();else if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index>=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r<t.redo.calls.length;r++)i.plotDo(e,t.redo.calls[r],t.redo.args[r]);e.undoQueue.inSequence=!1,e.autoplay=!1,e.undoQueue.index++}},plotDo:function(e,t,r){e.autoplay=!0,r=function(e,t){for(var r,a=[],i=0;i<t.length;i++)r=t[i],a[i]=r===e?r:"object"==typeof r?Array.isArray(r)?n.extendDeep([],r):n.extendDeepAll({},r):r;return a}(e,r),t.apply(null,r)}};t.exports=i},{"../lib":716,"../plot_api/plot_config":752}],732:[function(e,t,r){"use strict";r.counter=function(e,t,r,n){var a=(t||"")+(r?"":"$"),i=!1===n?"":"^";return"xy"===e?new RegExp(i+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+a):new RegExp(i+e+"([2-9]|[1-9][0-9]+)?"+a)}},{}],733:[function(e,t,r){"use strict";var n=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,a=/^[^\.\[\]]+$/;t.exports=function(e,t){for(;t;){var r=e.match(n);if(r)e=r[1];else{if(!e.match(a))throw new Error("bad relativeAttr call:"+[e,t]);e=""}if("^"!==t.charAt(0))break;t=t.slice(1)}return e&&"["!==t.charAt(0)?e+"."+t:e+t}},{}],734:[function(e,t,r){"use strict";var n=e("./array").isArrayOrTypedArray,a=e("./is_plain_object");t.exports=function e(t,r){for(var i in r){var o=r[i],s=t[i];if(s!==o)if("_"===i.charAt(0)||"function"==typeof o){if(i in t)continue;t[i]=o}else if(n(o)&&n(s)&&a(o[0])){if("customdata"===i||"ids"===i)continue;for(var l=Math.min(o.length,s.length),c=0;c<l;c++)s[c]!==o[c]&&a(o[c])&&a(s[c])&&e(s[c],o[c])}else a(o)&&a(s)&&(e(s,o),Object.keys(s).length||delete t[i])}}},{"./array":699,"./is_plain_object":717}],735:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./loggers"),i=e("./identity");function o(e,t){return e<t}function s(e,t){return e<=t}function l(e,t){return e>t}function c(e,t){return e>=t}r.findBin=function(e,t,r){if(n(t.start))return r?Math.ceil((e-t.start)/t.size-1e-9)-1:Math.floor((e-t.start)/t.size+1e-9);var i,u,d=0,p=t.length,h=0,f=p>1?(t[p-1]-t[0])/(p-1):1;for(u=f>=0?r?o:s:r?c:l,e+=1e-9*f*(r?-1:1)*(f>=0?1:-1);d<p&&h++<100;)u(t[i=Math.floor((d+p)/2)],e)?d=i+1:p=i;return h>90&&a.log("Long binary search..."),d-1},r.sorterAsc=function(e,t){return e-t},r.sorterDes=function(e,t){return t-e},r.distinctVals=function(e){var t=e.slice();t.sort(r.sorterAsc);for(var n=t.length-1,a=t[n]-t[0]||1,i=a/(n||1)/1e4,o=[t[0]],s=0;s<n;s++)t[s+1]>t[s]+i&&(a=Math.min(a,t[s+1]-t[s]),o.push(t[s+1]));return{vals:o,minDiff:a}},r.roundUp=function(e,t,r){for(var n,a=0,i=t.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;a<i&&o++<100;)t[n=c((a+i)/2)]<=e?a=n+s:i=n-l;return t[a]},r.sort=function(e,t){for(var r=0,n=0,a=1;a<e.length;a++){var i=t(e[a],e[a-1]);if(i<0?r=1:i>0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},r.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;a<e.length;a++){var o=t(e[a]);o<n&&(n=o,r=a)}return r}},{"./identity":715,"./loggers":720,"fast-isnumeric":227}],736:[function(e,t,r){"use strict";t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach((function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)})),t&&e.classed("cursor-"+t,!0)}},{}],737:[function(e,t,r){"use strict";var n=e("../components/color"),a=function(){};t.exports=function(e){for(var t in e)"function"==typeof e[t]&&(e[t]=a);e.destroy=function(){e.container.parentNode.removeChild(e.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=n.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=n.lightLine,r.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",r.appendChild(i),e.container.appendChild(r),e.container.style.background="#FFFFFF",e.container.onclick=function(){window.open("https://get.webgl.org")},!1}},{"../components/color":591}],738:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./array").isArrayOrTypedArray;r.aggNums=function(e,t,i,o){var s,l;if((!o||o>i.length)&&(o=i.length),n(t)||(t=!1),a(i[0])){for(l=new Array(o),s=0;s<o;s++)l[s]=r.aggNums(e,t,i[s]);i=l}for(s=0;s<o;s++)n(t)?n(i[s])&&(t=e(+t,+i[s])):t=i[s];return t},r.len=function(e){return r.aggNums((function(e){return e+1}),0,e)},r.mean=function(e,t){return t||(t=r.len(e)),r.aggNums((function(e,t){return e+t}),0,e)/t},r.midRange=function(e){if(void 0!==e&&0!==e.length)return(r.aggNums(Math.max,null,e)+r.aggNums(Math.min,null,e))/2},r.variance=function(e,t,a){return t||(t=r.len(e)),n(a)||(a=r.mean(e,t)),r.aggNums((function(e,t){return e+Math.pow(t-a,2)}),0,e)/t},r.stdev=function(e,t,n){return Math.sqrt(r.variance(e,t,n))},r.median=function(e){var t=e.slice().sort();return r.interp(t,.5)},r.interp=function(e,t){if(!n(t))throw"n should be a finite number";if((t=t*e.length-.5)<0)return e[0];if(t>e.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}},{"./array":699,"fast-isnumeric":227}],739:[function(e,t,r){"use strict";var n=e("color-normalize");t.exports=function(e){return e?n(e):[0,0,0,1]}},{"color-normalize":121}],740:[function(e,t,r){"use strict";var n=e("d3"),a=e("../lib"),i=e("../constants/xmlns_namespaces"),o=e("../constants/alignment").LINE_SPACING;function s(e,t){return e.node().getBoundingClientRect()[t]}var l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(e,t,C){var S=e.text(),A=!e.attr("data-notex")&&"undefined"!=typeof MathJax&&S.match(l),E=n.select(e.node().parentNode);if(!E.empty()){var D=e.attr("class")?e.attr("class").split(" ")[0]:"text";return D+="-math",E.selectAll("svg."+D).remove(),E.selectAll("g."+D+"-group").remove(),e.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),A?(t&&t._promises||[]).push(new Promise((function(t){e.style("display","none");var r=parseInt(e.node().style.fontSize,10),i={fontSize:r};!function(e,t,r){var i,o,s,l;MathJax.Hub.Queue((function(){return o=a.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},displayAlign:"left"})}),(function(){if("SVG"!==(i=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),(function(){var r="math-output-"+a.randstr({},64);return l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":t.fontSize+"px"}).text(e.replace(c,"\\lt ").replace(u,"\\gt ")),MathJax.Hub.Typeset(l.node())}),(function(){var t=n.select("body").select("#MathJax_SVG_glyphs");if(l.select(".MathJax_SVG").empty()||!l.select("svg").node())a.log("There was an error in the tex syntax.",e),r();else{var o=l.select("svg").node().getBoundingClientRect();r(l.select(".MathJax_SVG"),t,o)}if(l.remove(),"SVG"!==i)return MathJax.Hub.setRenderer(i)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)}))}(A[2],i,(function(n,a,i){E.selectAll("svg."+D).remove(),E.selectAll("g."+D+"-group").remove();var o=n&&n.select("svg");if(!o||!o.node())return I(),void t();var l=E.append("g").classed(D+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(o.node()),a&&a.node()&&o.node().insertBefore(a.node().cloneNode(!0),o.node().firstChild),o.attr({class:D,height:i.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var c=e.node().style.fill||"black",u=o.select("g");u.attr({fill:c,stroke:c});var d=s(u,"width"),p=s(u,"height"),h=+e.attr("x")-d*{start:0,middle:.5,end:1}[e.attr("text-anchor")||"start"],f=-(r||s(e,"height"))/4;"y"===D[0]?(l.attr({transform:"rotate("+[-90,+e.attr("x"),+e.attr("y")]+") translate("+[-d/2,f-p/2]+")"}),o.attr({x:+e.attr("x"),y:+e.attr("y")})):"l"===D[0]?o.attr({x:e.attr("x"),y:f-p/2}):"a"===D[0]&&0!==D.indexOf("atitle")?o.attr({x:0,y:f}):o.attr({x:h,y:+e.attr("y")+f-p/2}),C&&C.call(e,l),t(l)}))}))):I(),e}function I(){E.empty()||(D=e.attr("class")+"-math",E.select("svg."+D).remove()),e.text("").style("white-space","pre"),function(e,t){t=t.replace(g," ");var r,s=!1,l=[],c=-1;function u(){c++;var t=document.createElementNS(i.svg,"tspan");n.select(t).attr({class:"line",dy:c*o+"em"}),e.appendChild(t),r=t;var a=l;if(l=[{node:t}],a.length>1)for(var s=1;s<a.length;s++)C(a[s])}function C(e){var t,a=e.type,o={};if("a"===a){t="a";var s=e.target,c=e.href,u=e.popup;c&&(o={"xlink:xlink:show":"_blank"===s||"_"!==s.charAt(0)?"new":"replace",target:s,"xlink:xlink:href":c},u&&(o.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+u+'");return false;'))}else t="tspan";e.style&&(o.style=e.style);var d=document.createElementNS(i.svg,t);if("sup"===a||"sub"===a){S(r,f),r.appendChild(d);var m=document.createElementNS(i.svg,"tspan");S(m,f),n.select(m).attr("dy",h[a]),o.dy=p[a],r.appendChild(d),r.appendChild(m)}else r.appendChild(d);n.select(d).attr(o),r=e.node=d,l.push(e)}function S(e,t){e.appendChild(document.createTextNode(t))}function A(e){if(1!==l.length){var n=l.pop();e!==n.type&&a.log("Start tag <"+n.type+"> doesnt match end tag <"+e+">. Pretending it did match.",t),r=l[l.length-1].node}else a.log("Ignoring unexpected end tag </"+e+">.",t)}b.test(t)?u():(r=e,l=[{node:e}]);for(var E=t.split(v),D=0;D<E.length;D++){var I=E[D],P=I.match(y),O=P&&P[2].toLowerCase(),R=d[O];if("br"===O)u();else if(void 0===R)S(r,L(I));else if(P[1])A(O);else{var F=P[4],z={type:O},N=M(F,_);if(N?(N=N.replace(T,"$1 fill:"),R&&(N+=";"+R)):R&&(N=R),N&&(z.style=N),"a"===O){s=!0;var j=M(F,x);if(j){var B=document.createElement("a");B.href=j,-1!==m.indexOf(B.protocol)&&(z.href=encodeURI(decodeURI(j)),z.target=M(F,w)||"_blank",z.popup=M(F,k))}}C(z)}}return s}(e.node(),S)&&e.style("pointer-events","all"),r.positionText(e),C&&C.call(e)}};var c=/(<|&lt;|&#60;)/g,u=/(>|&gt;|&#62;)/g,d={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},p={sub:"0.3em",sup:"-0.6em"},h={sub:"-0.21em",sup:"0.42em"},f="​",m=["http:","https:","mailto:","",void 0,":"],g=r.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=/<br(\s+.*)?>/i;r.BR_TAG_ALL=/<br(\s+.*)?>/gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,x=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function M(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&L(n)}var T=/(^|;)\s*color:/;r.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],a="...".length,i=e.split(v),o=[],s="",l=0,c=0;c<i.length;c++){var u=i[c],d=u.match(y),p=d&&d[2].toLowerCase();if(p)-1!==n.indexOf(p)&&(o.push(u),s=p);else{var h=u.length;if(l+h<r)o.push(u),l+=h;else if(l<r){var f=r-l;s&&("br"!==s||f<=a||h<=a)&&o.pop(),r>a?o.push(u.substr(0,f-a)+"..."):o.push(u.substr(0,f));break}s=""}}return o.join("")};var C={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function L(e){return e.replace(S,(function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.substr(2),16):parseInt(t.substr(1),10)):C[t])||e}))}function A(e,t,r){var n,a,i,o=r.horizontalAlign,s=r.verticalAlign||"top",l=e.node().getBoundingClientRect(),c=t.node().getBoundingClientRect();return a="bottom"===s?function(){return l.bottom-n.height}:"middle"===s?function(){return l.top+(l.height-n.height)/2}:function(){return l.top},i="right"===o?function(){return l.right-n.width}:"center"===o?function(){return l.left+(l.width-n.width)/2}:function(){return l.left},function(){return n=this.node().getBoundingClientRect(),this.style({top:a()-c.top+"px",left:i()-c.left+"px","z-index":1e3}),this}}r.convertEntities=L,r.lineCount=function(e){return e.selectAll("tspan.line").size()||1},r.positionText=function(e,t,r){return e.each((function(){var e=n.select(this);function a(t,r){return void 0===r?null===(r=e.attr(t))&&(e.attr(t,0),r=0):e.attr(t,r),r}var i=a("x",t),o=a("y",r);"text"===this.nodeName&&e.selectAll("tspan.line").attr({x:i,y:o})}))},r.makeEditable=function(e,t){var r=t.gd,a=t.delegate,i=n.dispatch("edit","input","cancel"),o=a||e;if(e.style({"pointer-events":a?"none":"all"}),1!==e.size())throw new Error("boo");function s(){var a,s,c,u,d;a=n.select(r).select(".svg-container"),s=a.append("div"),c=e.node().style,u=parseFloat(c.fontSize||12),void 0===(d=t.text)&&(d=e.attr("data-unformatted")),s.classed("plugin-editable editable",!0).style({position:"absolute","font-family":c.fontFamily||"Arial","font-size":u,color:t.fill||c.fill||"black",opacity:1,"background-color":t.background||"transparent",outline:"#ffffff33 1px solid",margin:[-u/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(d).call(A(e,a,t)).on("blur",(function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var t,a=n.select(this).attr("class");(t=a?"."+a.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(e.node().parentNode).select(t).style({opacity:0});var o=this.textContent;n.select(this).transition().duration(0).remove(),n.select(document).on("mouseup",null),i.edit.call(e,o)})).on("focus",(function(){var e=this;r._editing=!0,n.select(document).on("mouseup",(function(){if(n.event.target===e)return!1;document.activeElement===s.node()&&s.node().blur()}))})).on("keyup",(function(){27===n.event.which?(r._editing=!1,e.style({opacity:1}),n.select(this).style({opacity:0}).on("blur",(function(){return!1})).transition().remove(),i.cancel.call(e,this.textContent)):(i.input.call(e,this.textContent),n.select(this).call(A(e,a,t)))})).on("keydown",(function(){13===n.event.which&&this.blur()})).call(l),e.style({opacity:0});var p,h=o.attr("class");(p=h?"."+h.split(" ")[0]+"-math-group":"[class*=-math-group]")&&n.select(e.node().parentNode).select(p).style({opacity:0})}function l(e){var t=e.node(),r=document.createRange();r.selectNodeContents(t);var n=window.getSelection();n.removeAllRanges(),n.addRange(r),t.focus()}return t.immediate?s():o.on("click",s),n.rebind(e,i,"on")}},{"../constants/alignment":685,"../constants/xmlns_namespaces":693,"../lib":716,d3:164}],741:[function(e,t,r){"use strict";var n={};function a(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}r.throttle=function(e,t,r){var i=n[e],o=Date.now();if(!i){for(var s in n)n[s].ts<o-6e4&&delete n[s];i=n[e]={ts:0,timer:null}}function l(){r(),i.ts=Date.now(),i.onDone&&(i.onDone(),i.onDone=null)}a(i),o>i.ts+t?l():i.timer=setTimeout((function(){l(),i.timer=null}),t)},r.done=function(e){var t=n[e];return t&&t.timer?new Promise((function(e){var r=t.onDone;t.onDone=function(){r&&r(),e(),t.onDone=null}})):Promise.resolve()},r.clear=function(e){if(e)a(n[e]),delete n[e];else for(var t in n)r.clear(t)}},{}],742:[function(e,t,r){"use strict";var n=e("fast-isnumeric");t.exports=function(e,t){if(e>0)return Math.log(e)/Math.LN10;var r=Math.log(Math.min(t[0],t[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),r}},{"fast-isnumeric":227}],743:[function(e,t,r){"use strict";var n=t.exports={},a=e("../plots/geo/constants").locationmodeToLayer,i=e("topojson-client").feature;n.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(e,t){return e+t+".json"},n.getTopojsonFeatures=function(e,t){var r=a[e.locationmode],n=t.objects[r];return i(t,n).features}},{"../plots/geo/constants":792,"topojson-client":538}],744:[function(e,t,r){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],745:[function(e,t,r){"use strict";t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},{}],746:[function(e,t,r){"use strict";var n=e("../registry");t.exports=function(e){for(var t,r,a=n.layoutArrayContainers,i=n.layoutArrayRegexes,o=e.split("[")[0],s=0;s<i.length;s++)if((r=e.match(i[s]))&&0===r.index){t=r[0];break}if(t||(t=a[a.indexOf(o)]),!t)return!1;var l=e.substr(t.length);return l?!!(r=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:t,index:Number(r[1]),property:r[3]||""}:{array:t,index:"",property:""}}},{"../registry":845}],747:[function(e,t,r){"use strict";var n=e("../lib"),a=n.extendFlat,i=n.isPlainObject,o={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},s={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},l=o.flags.slice().concat(["fullReplot"]),c=s.flags.slice().concat("layoutReplot");function u(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!1;return t}function d(e,t,r){var n=a({},e);for(var o in n){var s=n[o];i(s)&&(n[o]=p(s,t,0,o))}return"from-root"===r&&(n.editType=t),n}function p(e,t,r,n){if(e.valType){var i=a({},e);if(i.editType=t,Array.isArray(e.items)){i.items=new Array(e.items.length);for(var o=0;o<e.items.length;o++)i.items[o]=p(e.items[o],t)}return i}return d(e,t,"_"===n.charAt(0)?"nested":"from-root")}t.exports={traces:o,layout:s,traceFlags:function(){return u(l)},layoutFlags:function(){return u(c)},update:function(e,t){var r=t.editType;if(r&&"none"!==r)for(var n=r.split("+"),a=0;a<n.length;a++)e[n[a]]=!0},overrideAll:d}},{"../lib":716}],748:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("gl-mat4/fromQuat"),i=e("../registry"),o=e("../lib"),s=e("../plots/plots"),l=e("../plots/cartesian/axis_ids"),c=e("../components/color"),u=l.cleanId,d=l.getFromTrace,p=i.traceIs;function h(e,t){var r=e[t],n=t.charAt(0);r&&"paper"!==r&&(e[t]=u(r,n))}function f(e){function t(t,r){var n=e[t],a=e.title&&e.title[r];n&&!a&&(e.title||(e.title={}),e.title[r]=e[t],delete e[t])}e&&("string"!=typeof e.title&&"number"!=typeof e.title||(e.title={text:e.title}),t("titlefont","font"),t("titleposition","position"),t("titleside","side"),t("titleoffset","offset"))}function m(e){if(!o.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,("string"==typeof t||"number"==typeof t)&&String(t)}function g(e,t,r,n){if(r&&!n)return e;if(n&&!r)return t;if(!e.trim())return t;if(!t.trim())return e;var a,i=Math.min(e.length,t.length);for(a=0;a<i&&e.charAt(a)===t.charAt(a);a++);return e.substr(0,a).trim()}function v(e){var t="middle",r="center";return"string"==typeof e&&(-1!==e.indexOf("top")?t="top":-1!==e.indexOf("bottom")&&(t="bottom"),-1!==e.indexOf("left")?r="left":-1!==e.indexOf("right")&&(r="right")),t+" "+r}function y(e,t){return t in e&&"object"==typeof e[t]&&0===Object.keys(e[t]).length}r.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&o.log("Clearing previous rejected promises from queue."),e._promises=[]},r.cleanLayout=function(e){var t,n;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,d=(s.subplotsRegistry.ternary||{}).attrRegex,p=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(e);for(t=0;t<m.length;t++){var g=m[t];if(i&&i.test(g)){var v=e[g];v.anchor&&"free"!==v.anchor&&(v.anchor=u(v.anchor)),v.overlaying&&(v.overlaying=u(v.overlaying)),v.type||(v.isdate?v.type="date":v.islog?v.type="log":!1===v.isdate&&!1===v.islog&&(v.type="linear")),"withzero"!==v.autorange&&"tozero"!==v.autorange||(v.autorange=!0,v.rangemode="tozero"),delete v.islog,delete v.isdate,delete v.categories,y(v,"domain")&&delete v.domain,void 0!==v.autotick&&(void 0===v.tickmode&&(v.tickmode=v.autotick?"auto":"linear"),delete v.autotick),f(v)}else if(l&&l.test(g))f(e[g].radialaxis);else if(d&&d.test(g)){var b=e[g];f(b.aaxis),f(b.baxis),f(b.caxis)}else if(p&&p.test(g)){var _=e[g],x=_.cameraposition;if(Array.isArray(x)&&4===x[0].length){var w=x[0],k=x[1],M=x[2],T=a([],w),C=[];for(n=0;n<3;++n)C[n]=k[n]+M*T[2+4*n];_.camera={eye:{x:C[0],y:C[1],z:C[2]},center:{x:k[0],y:k[1],z:k[2]},up:{x:0,y:0,z:1}},delete _.cameraposition}f(_.xaxis),f(_.yaxis),f(_.zaxis)}}var S=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<S;t++){var L=e.annotations[t];o.isPlainObject(L)&&(L.ref&&("paper"===L.ref?(L.xref="paper",L.yref="paper"):"data"===L.ref&&(L.xref="x",L.yref="y"),delete L.ref),h(L,"xref"),h(L,"yref"))}var A=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<A;t++){var E=e.shapes[t];o.isPlainObject(E)&&(h(E,"xref"),h(E,"yref"))}var D=e.legend;return D&&(D.x>3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),f(e),"rotate"===e.dragmode&&(e.dragmode="orbit"),c.clean(e),e.template&&e.template.layout&&r.cleanLayout(e.template.layout),e},r.cleanData=function(e){for(var t=0;t<e.length;t++){var n,a=e[t];if("histogramy"===a.type&&"xbins"in a&&!("ybins"in a)&&(a.ybins=a.xbins,delete a.xbins),a.error_y&&"opacity"in a.error_y){var l=c.defaults,d=a.error_y.color||(p(a,"bar")?c.defaultLine:l[t%l.length]);a.error_y.color=c.addOpacity(c.rgb(d),c.opacity(d)*a.error_y.opacity),delete a.error_y.opacity}if("bardir"in a&&("h"!==a.bardir||!p(a,"bar")&&"histogram"!==a.type.substr(0,9)||(a.orientation="h",r.swapXYData(a)),delete a.bardir),"histogramy"===a.type&&r.swapXYData(a),"histogramx"!==a.type&&"histogramy"!==a.type||(a.type="histogram"),"scl"in a&&!("colorscale"in a)&&(a.colorscale=a.scl,delete a.scl),"reversescl"in a&&!("reversescale"in a)&&(a.reversescale=a.reversescl,delete a.reversescl),a.xaxis&&(a.xaxis=u(a.xaxis,"x")),a.yaxis&&(a.yaxis=u(a.yaxis,"y")),p(a,"gl3d")&&a.scene&&(a.scene=s.subplotsRegistry.gl3d.cleanId(a.scene)),!p(a,"pie-like")&&!p(a,"bar-like"))if(Array.isArray(a.textposition))for(n=0;n<a.textposition.length;n++)a.textposition[n]=v(a.textposition[n]);else a.textposition&&(a.textposition=v(a.textposition));var h=i.getModule(a);if(h&&h.colorbar){var b=h.colorbar.container,_=b?a[b]:a;_&&_.colorscale&&("YIGnBu"===_.colorscale&&(_.colorscale="YlGnBu"),"YIOrRd"===_.colorscale&&(_.colorscale="YlOrRd"))}if("surface"===a.type&&o.isPlainObject(a.contours)){var x=["x","y","z"];for(n=0;n<x.length;n++){var w=a.contours[x[n]];o.isPlainObject(w)&&(w.highlightColor&&(w.highlightcolor=w.highlightColor,delete w.highlightColor),w.highlightWidth&&(w.highlightwidth=w.highlightWidth,delete w.highlightWidth))}}if("candlestick"===a.type||"ohlc"===a.type){var k=!1!==(a.increasing||{}).showlegend,M=!1!==(a.decreasing||{}).showlegend,T=m(a.increasing),C=m(a.decreasing);if(!1!==T&&!1!==C){var S=g(T,C,k,M);S&&(a.name=S)}else!T&&!C||a.name||(a.name=T||C)}if(Array.isArray(a.transforms)){var L=a.transforms;for(n=0;n<L.length;n++){var A=L[n];if(o.isPlainObject(A))switch(A.type){case"filter":A.filtersrc&&(A.target=A.filtersrc,delete A.filtersrc),A.calendar&&(A.valuecalendar||(A.valuecalendar=A.calendar),delete A.calendar);break;case"groupby":if(A.styles=A.styles||A.style,A.styles&&!Array.isArray(A.styles)){var E=A.styles,D=Object.keys(E);A.styles=[];for(var I=0;I<D.length;I++)A.styles.push({target:D[I],value:E[D[I]]})}}}}y(a,"line")&&delete a.line,"marker"in a&&(y(a.marker,"line")&&delete a.marker.line,y(a,"marker")&&delete a.marker),c.clean(a),a.autobinx&&(delete a.autobinx,delete a.xbins),a.autobiny&&(delete a.autobiny,delete a.ybins),f(a),a.colorbar&&f(a.colorbar),a.marker&&a.marker.colorbar&&f(a.marker.colorbar),a.line&&a.line.colorbar&&f(a.line.colorbar),a.aaxis&&f(a.aaxis),a.baxis&&f(a.baxis)}},r.swapXYData=function(e){var t;if(o.swapAttrs(e,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(e.z)&&Array.isArray(e.z[0])&&(e.transpose?delete e.transpose:e.transpose=!0),e.error_x&&e.error_y){var r=e.error_y,n="copy_ystyle"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);o.swapAttrs(e,["error_?.copy_ystyle"]),n&&o.swapAttrs(e,["error_?.color","error_?.thickness","error_?.width"])}if("string"==typeof e.hoverinfo){var a=e.hoverinfo.split("+");for(t=0;t<a.length;t++)"x"===a[t]?a[t]="y":"y"===a[t]&&(a[t]="x");e.hoverinfo=a.join("+")}},r.coerceTraceIndices=function(e,t){if(n(t))return[t];if(!Array.isArray(t)||!t.length)return e.data.map((function(e,t){return t}));if(Array.isArray(t)){for(var r=[],a=0;a<t.length;a++)o.isIndex(t[a],e.data.length)?r.push(t[a]):o.warn("trace index (",t[a],") is not a number or is out of bounds");return r}return t},r.manageArrayContainers=function(e,t,r){var a=e.obj,i=e.parts,s=i.length,l=i[s-1],c=n(l);if(c&&null===t){var u=i.slice(0,s-1).join(".");o.nestedProperty(a,u).get().splice(l,1)}else c&&void 0===e.get()?(void 0===e.get()&&(r[e.astr]=null),e.set(t)):e.set(t)};var b=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function _(e){var t=e.search(b);if(t>0)return e.substr(0,t)}r.hasParent=function(e,t){for(var r=_(t);r;){if(r in e)return!0;r=_(r)}return!1};var x=["x","y","z"];r.clearAxisTypes=function(e,t,r){for(var n=0;n<t.length;n++)for(var a=e._fullData[n],i=0;i<3;i++){var s=d(e,a,x[i]);if(s&&"log"!==s.type){var l=s._name,c=s._id.substr(1);if("scene"===c.substr(0,5)){if(void 0!==r[c])continue;l=c+"."+l}var u=l+".type";void 0===r[l]&&void 0===r[u]&&o.nestedProperty(e.layout,u).set(null)}}}},{"../components/color":591,"../lib":716,"../plots/cartesian/axis_ids":767,"../plots/plots":825,"../registry":845,"fast-isnumeric":227,"gl-mat4/fromQuat":264}],749:[function(e,t,r){"use strict";var n=e("./plot_api");r.plot=n.plot,r.newPlot=n.newPlot,r.restyle=n.restyle,r.relayout=n.relayout,r.redraw=n.redraw,r.update=n.update,r._guiRestyle=n._guiRestyle,r._guiRelayout=n._guiRelayout,r._guiUpdate=n._guiUpdate,r._storeDirectGUIEdit=n._storeDirectGUIEdit,r.react=n.react,r.extendTraces=n.extendTraces,r.prependTraces=n.prependTraces,r.addTraces=n.addTraces,r.deleteTraces=n.deleteTraces,r.moveTraces=n.moveTraces,r.purge=n.purge,r.addFrames=n.addFrames,r.deleteFrames=n.deleteFrames,r.animate=n.animate,r.setPlotConfig=n.setPlotConfig,r.toImage=e("./to_image"),r.validate=e("./validate"),r.downloadImage=e("../snapshot/download");var a=e("./template_api");r.makeTemplate=a.makeTemplate,r.validateTemplate=a.validateTemplate},{"../snapshot/download":847,"./plot_api":751,"./template_api":756,"./to_image":757,"./validate":758}],750:[function(e,t,r){"use strict";var n=e("../lib/is_plain_object"),a=e("../lib/noop"),i=e("../lib/loggers"),o=e("../lib/search").sorterAsc,s=e("../registry");r.containerArrayMatch=e("./container_array_match");var l=r.isAddVal=function(e){return"add"===e||n(e)},c=r.isRemoveVal=function(e){return null===e||"remove"===e};r.applyContainerArrayChanges=function(e,t,r,n,u){var d=t.astr,p=s.getComponentMethod(d,"supplyLayoutDefaults"),h=s.getComponentMethod(d,"draw"),f=s.getComponentMethod(d,"drawOne"),m=n.replot||n.recalc||p===a||h===a,g=e.layout,v=e._fullLayout;if(r[""]){Object.keys(r).length>1&&i.warn("Full array edits are incompatible with other edits",d);var y=r[""][""];if(c(y))t.set(null);else{if(!Array.isArray(y))return i.warn("Unrecognized full array edit value",d,y),!0;t.set(y)}return!m&&(p(g,v),h(e),!0)}var b,_,x,w,k,M,T,C,S=Object.keys(r).map(Number).sort(o),L=t.get(),A=L||[],E=u(v,d).get(),D=[],I=-1,P=A.length;for(b=0;b<S.length;b++)if(w=r[x=S[b]],k=Object.keys(w),M=w[""],T=l(M),x<0||x>A.length-(T?0:1))i.warn("index out of range",d,x);else if(void 0!==M)k.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,x),c(M)?D.push(x):T?("add"===M&&(M={}),A.splice(x,0,M),E&&E.splice(x,0,{})):i.warn("Unrecognized full object edit value",d,x,M),-1===I&&(I=x);else for(_=0;_<k.length;_++)C=d+"["+x+"].",u(A[x],k[_],C).set(w[k[_]]);for(b=D.length-1;b>=0;b--)A.splice(D[b],1),E&&E.splice(D[b],1);if(A.length?L||t.set(A):t.set(null),m)return!1;if(p(g,v),f!==a){var O;if(-1===I)O=S;else{for(P=Math.max(A.length,P),O=[],b=0;b<S.length&&!((x=S[b])>=I);b++)O.push(x);for(b=I;b<P;b++)O.push(b)}for(b=0;b<O.length;b++)f(e,O[b])}else h(e);return!0}},{"../lib/is_plain_object":717,"../lib/loggers":720,"../lib/noop":725,"../lib/search":735,"../registry":845,"./container_array_match":746}],751:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("has-hover"),o=e("../lib"),s=o.nestedProperty,l=e("../lib/events"),c=e("../lib/queue"),u=e("../registry"),d=e("./plot_schema"),p=e("../plots/plots"),h=e("../plots/polar/legacy"),f=e("../plots/cartesian/axes"),m=e("../components/drawing"),g=e("../components/color"),v=e("../plots/cartesian/graph_interact").initInteractions,y=e("../constants/xmlns_namespaces"),b=e("../lib/svg_text_utils"),_=e("../plots/cartesian/select").clearSelect,x=e("./plot_config").dfltConfig,w=e("./manage_arrays"),k=e("./helpers"),M=e("./subroutines"),T=e("./edit_types"),C=e("../plots/cartesian/constants").AX_NAME_PATTERN,S=0,L=5;function A(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function E(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){o.error(e)}}function D(e,t){E(e,g.combine(t,"white"))}function I(e,t){if(!e._context){e._context=o.extendDeep({},x);var r=n.select("base");e._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var a,s,l,c=e._context;if(t){for(s=Object.keys(t),a=0;a<s.length;a++)"editable"!==(l=s[a])&&"edits"!==l&&l in c&&("setBackground"===l&&"opaque"===t[l]?c[l]=D:c[l]=t[l]);t.plot3dPixelRatio&&!c.plotGlPixelRatio&&(c.plotGlPixelRatio=c.plot3dPixelRatio);var u=t.editable;if(void 0!==u)for(c.editable=u,s=Object.keys(c.edits),a=0;a<s.length;a++)c.edits[s[a]]=u;if(t.edits)for(s=Object.keys(t.edits),a=0;a<s.length;a++)(l=s[a])in c.edits&&(c.edits[l]=t.edits[l]);c._exportedPlot=t._exportedPlot}c.staticPlot&&(c.editable=!1,c.edits={},c.autosizable=!1,c.scrollZoom=!1,c.doubleClick=!1,c.showTips=!1,c.showLink=!1,c.displayModeBar=!1),"hover"!==c.displayModeBar||i||(c.displayModeBar=!0),"transparent"!==c.setBackground&&"function"==typeof c.setBackground||(c.setBackground=E),c._hasZeroHeight=c._hasZeroHeight||0===e.clientHeight,c._hasZeroWidth=c._hasZeroWidth||0===e.clientWidth;var d=c.scrollZoom,p=c._scrollZoom={};if(!0===d)p.cartesian=1,p.gl3d=1,p.geo=1,p.mapbox=1;else if("string"==typeof d){var h=d.split("+");for(a=0;a<h.length;a++)p[h[a]]=1}else!1!==d&&(p.gl3d=1,p.geo=1,p.mapbox=1)}function P(e,t){var r,n,a=t+1,i=[];for(r=0;r<e.length;r++)(n=e[r])<0?i.push(a+n):i.push(n);return i}function O(e,t,r){var n,a;for(n=0;n<t.length;n++){if((a=t[n])!==parseInt(a,10))throw new Error("all values in "+r+" must be integers");if(a>=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function R(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),O(e,t,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&O(e,r,"newIndices"),void 0!==r&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function F(e,t,r,n,i){!function(e,t,r,n){var a=o.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(t))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var i in O(e,r,"indices"),t){if(!Array.isArray(t[i])||t[i].length!==r.length)throw new Error("attribute "+i+" must be an array of length equal to indices array length");if(a&&(!(i in n)||!Array.isArray(n[i])||n[i].length!==t[i].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(e,t,r,n);for(var l=function(e,t,r,n){var i,l,c,u,d,p=o.isPlainObject(n),h=[];for(var f in Array.isArray(r)||(r=[r]),r=P(r,e.data.length-1),t)for(var m=0;m<r.length;m++){if(i=e.data[r[m]],l=(c=s(i,f)).get(),u=t[f][m],!o.isArrayOrTypedArray(u))throw new Error("attribute: "+f+" index: "+m+" must be an array");if(!o.isArrayOrTypedArray(l))throw new Error("cannot extend missing or non-array attribute: "+f);if(l.constructor!==u.constructor)throw new Error("cannot extend array with an array of a different type: "+f);d=p?n[f][m]:n,a(d)||(d=-1),h.push({prop:c,target:l,insert:u,maxp:Math.floor(d)})}return h}(e,t,r,n),c={},u={},d=0;d<l.length;d++){var p=l[d].prop,h=l[d].maxp,f=i(l[d].target,l[d].insert,h);p.set(f[0]),Array.isArray(c[p.astr])||(c[p.astr]=[]),c[p.astr].push(f[1]),Array.isArray(u[p.astr])||(u[p.astr]=[]),u[p.astr].push(l[d].target.length)}return{update:c,maxPoints:u}}function z(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function N(e,t,n,a){e=o.getGraphDiv(e),k.clearPromiseQueue(e);var i={};if("string"==typeof t)i[t]=n;else{if(!o.isPlainObject(t))return o.warn("Restyle fail.",t,n,a),Promise.reject();i=o.extendFlat({},t),void 0===a&&(a=n)}Object.keys(i).length&&(e.changed=!0);var s=k.coerceTraceIndices(e,a),l=H(e,i,s),u=l.flags;u.calc&&(e.calcdata=void 0),u.clearAxisTypes&&k.clearAxisTypes(e,s,{});var d=[];u.fullReplot?d.push(r.plot):(d.push(p.previousPromises),p.supplyDefaults(e),u.markerSize&&(p.doCalcdata(e),G(d)),u.style&&d.push(M.doTraceStyle),u.colorbars&&d.push(M.doColorBars),d.push(A)),d.push(p.rehover,p.redrag),c.add(e,N,[e,l.undoit,l.traces],N,[e,l.redoit,l.traces]);var h=o.syncOrAsync(d,e);return h&&h.then||(h=Promise.resolve()),h.then((function(){return e.emit("plotly_restyle",l.eventData),e}))}function j(e){return void 0===e?null:e}function B(e,t){return t?function(t,r,n){var a=s(t,r),i=a.set;return a.set=function(t){Y((n||"")+r,a.get(),t,e),i(t)},a}:s}function Y(e,t,r,n){if(Array.isArray(t)||Array.isArray(r))for(var a=Array.isArray(t)?t:[],i=Array.isArray(r)?r:[],s=Math.max(a.length,i.length),l=0;l<s;l++)Y(e+"["+l+"]",a[l],i[l],n);else if(o.isPlainObject(t)||o.isPlainObject(r)){var c=o.isPlainObject(t)?t:{},u=o.isPlainObject(r)?r:{},d=o.extendFlat({},c,u);for(var p in d)Y(e+"."+p,c[p],u[p],n)}else void 0===n[e]&&(n[e]=j(t))}function H(e,t,r){var n,a=e._fullLayout,i=e._fullData,l=e.data,c=a._guiEditing,h=B(a._preGUI,c),m=o.extendDeepAll({},t);V(t);var g,v=T.traceFlags(),y={},b={};function _(){return r.map((function(){}))}function x(e){var t=f.id2name(e);-1===g.indexOf(t)&&g.push(t)}function w(e){return"LAYOUT"+e+".autorange"}function M(e){return"LAYOUT"+e+".range"}function C(e){for(var t=e;t<i.length;t++)if(i[t]._input===l[e])return i[t]}function S(n,i,o){if(Array.isArray(n))n.forEach((function(e){S(e,i,o)}));else if(!(n in t||k.hasParent(t,n))){var s;if("LAYOUT"===n.substr(0,6))s=h(e.layout,n.replace("LAYOUT",""));else{var u=r[o];s=B(a._tracePreGUI[C(u)._fullInput.uid],c)(l[u],n)}n in b||(b[n]=_()),void 0===b[n][o]&&(b[n][o]=j(s.get())),void 0!==i&&s.set(i)}}function L(e){return function(t){return i[t][e]}}function A(e){return function(t,n){return!1===t?i[r[n]][e]:null}}for(var E in t){if(k.hasParent(t,E))throw new Error("cannot set "+E+" and a parent attribute simultaneously");var D,I,P,O,R,F,z=t[E];if("autobinx"!==E&&"autobiny"!==E||(E=E.charAt(E.length-1)+"bins",z=Array.isArray(z)?z.map(A(E)):!1===z?r.map(L(E)):null),y[E]=z,"LAYOUT"!==E.substr(0,6)){for(b[E]=_(),n=0;n<r.length;n++)if(D=l[r[n]],I=C(r[n]),O=(P=B(a._tracePreGUI[I._fullInput.uid],c)(D,E)).get(),void 0!==(R=Array.isArray(z)?z[n%z.length]:z)){var N=P.parts[P.parts.length-1],Y=E.substr(0,E.length-N.length-1),H=Y?Y+".":"",U=Y?s(I,Y).get():I;if((F=d.getTraceValObject(I,P.parts))&&F.impliedEdits&&null!==R)for(var W in F.impliedEdits)S(o.relativeAttr(E,W),F.impliedEdits[W],n);else if("thicknessmode"!==N&&"lenmode"!==N||O===R||"fraction"!==R&&"pixels"!==R||!U){if("type"===E&&("pie"===R!=("pie"===O)||"funnelarea"===R!=("funnelarea"===O))){var G="x",q="y";"bar"!==R&&"bar"!==O||"h"!==D.orientation||(G="y",q="x"),o.swapAttrs(D,["?","?src"],"labels",G),o.swapAttrs(D,["d?","?0"],"label",G),o.swapAttrs(D,["?","?src"],"values",q),"pie"===O||"funnelarea"===O?(s(D,"marker.color").set(s(D,"marker.colors").get()),a._pielayer.selectAll("g.trace").remove()):u.traceIs(D,"cartesian")&&s(D,"marker.colors").set(s(D,"marker.color").get())}}else{var K=a._size,X=U.orient,Z="top"===X||"bottom"===X;if("thicknessmode"===N){var J=Z?K.h:K.w;S(H+"thickness",U.thickness*("fraction"===R?1/J:J),n)}else{var $=Z?K.w:K.h;S(H+"len",U.len*("fraction"===R?1/$:$),n)}}if(b[E][n]=j(O),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(E)){if("orientation"===E){P.set(R);var Q=D.x&&!D.y?"h":"v";if((P.get()||Q)===I.orientation)continue}else"orientationaxes"===E&&(D.orientation={v:"h",h:"v"}[I.orientation]);k.swapXYData(D),v.calc=v.clearAxisTypes=!0}else-1!==p.dataArrayContainers.indexOf(P.parts[0])?(k.manageArrayContainers(P,R,b),v.calc=!0):(F?F.arrayOk&&!u.traceIs(I,"regl")&&(o.isArrayOrTypedArray(R)||o.isArrayOrTypedArray(O))?v.calc=!0:T.update(v,F):v.calc=!0,P.set(R))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(E)&&f.swap(e,r),"orientationaxes"===E){var ee=s(e.layout,"hovermode");"x"===ee.get()?ee.set("y"):"y"===ee.get()&&ee.set("x")}if(-1!==["orientation","type"].indexOf(E)){for(g=[],n=0;n<r.length;n++){var te=l[r[n]];u.traceIs(te,"cartesian")&&(x(te.xaxis||"x"),x(te.yaxis||"y"))}S(g.map(w),!0,0),S(g.map(M),[0,1],0)}}else P=h(e.layout,E.replace("LAYOUT","")),b[E]=[j(P.get())],P.set(Array.isArray(z)?z[0]:z),v.calc=!0}return(v.calc||v.plot)&&(v.fullReplot=!0),{flags:v,undoit:b,redoit:y,traces:r,eventData:o.extendDeepNoArrays([],[m,r])}}function V(e){var t,r,n,a=o.counterRegex("axis",".title",!1,!1),i=/colorbar\.title$/,s=Object.keys(e);for(t=0;t<s.length;t++)r=s[t],n=e[r],"title"!==r&&!a.test(r)&&!i.test(r)||"string"!=typeof n&&"number"!=typeof n?r.indexOf("titlefont")>-1?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(t,r){e[r]=e[t],delete e[t]}}function U(e,t,r){if(e=o.getGraphDiv(e),k.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);var n={};if("string"==typeof t)n[t]=r;else{if(!o.isPlainObject(t))return o.warn("Relayout fail.",t,r),Promise.reject();n=o.extendFlat({},t)}Object.keys(n).length&&(e.changed=!0);var a=Z(e,n),i=a.flags;i.calc&&(e.calcdata=void 0);var s=[p.previousPromises];i.layoutReplot?s.push(M.layoutReplot):Object.keys(n).length&&(W(e,i,a)||p.supplyDefaults(e),i.legend&&s.push(M.doLegend),i.layoutstyle&&s.push(M.layoutStyles),i.axrange&&G(s,a.rangesAltered),i.ticks&&s.push(M.doTicksRelayout),i.modebar&&s.push(M.doModeBar),i.camera&&s.push(M.doCamera),i.colorbars&&s.push(M.doColorBars),s.push(A)),s.push(p.rehover,p.redrag),c.add(e,U,[e,a.undoit],U,[e,a.redoit]);var l=o.syncOrAsync(s,e);return l&&l.then||(l=Promise.resolve(e)),l.then((function(){return e.emit("plotly_relayout",a.eventData),e}))}function W(e,t,r){var n=e._fullLayout;if(!t.axrange)return!1;for(var a in t)if("axrange"!==a&&t[a])return!1;for(var i in r.rangesAltered){var o=f.id2name(i),s=e.layout[o],l=n[o];if(l.autorange=s.autorange,l.range=s.range.slice(),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==i){var u=n[f.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function G(e,t){var r=t?function(e){var r=[],n=!0;for(var a in t){var i=f.getFromId(e,a);if(r.push(a),i._matchGroup)for(var o in i._matchGroup)t[o]||r.push(o);i.automargin&&(n=!1)}return f.draw(e,r,{skipTitle:n})}:function(e){return f.draw(e,"redraw")};e.push(_,M.doAutoRangeAndConstraints,r,M.drawData,M.finalDraw)}var q=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,K=/^[xyz]axis[0-9]*\.autorange$/,X=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(e,t){var r,n,a,i=e.layout,l=e._fullLayout,c=l._guiEditing,p=B(l._preGUI,c),h=Object.keys(t),m=f.list(e),g=o.extendDeepAll({},t),v={};for(V(t),h=Object.keys(t),n=0;n<h.length;n++)if(0===h[n].indexOf("allaxes")){for(a=0;a<m.length;a++){var y=m[a]._id.substr(1),b=-1!==y.indexOf("scene")?y+".":"",_=h[n].replace("allaxes",b+m[a]._name);t[_]||(t[_]=t[h[n]])}delete t[h[n]]}var x=T.layoutFlags(),M={},S={};function L(e,r){if(Array.isArray(e))e.forEach((function(e){L(e,r)}));else if(!(e in t||k.hasParent(t,e))){var n=p(i,e);e in S||(S[e]=j(n.get())),void 0!==r&&n.set(r)}}var A,E={};function D(e){var t=f.name2id(e.split(".")[0]);return E[t]=1,t}for(var I in t){if(k.hasParent(t,I))throw new Error("cannot set "+I+" and a parent attribute simultaneously");for(var P=p(i,I),O=t[I],R=P.parts.length-1;R>0&&"string"!=typeof P.parts[R];)R--;var F=P.parts[R],z=P.parts[R-1]+"."+F,N=P.parts.slice(0,R).join("."),Y=s(e.layout,N).get(),H=s(l,N).get(),U=P.get();if(void 0!==O){M[I]=O,S[I]="reverse"===F?O:j(U);var W=d.getLayoutValObject(l,P.parts);if(W&&W.impliedEdits&&null!==O)for(var G in W.impliedEdits)L(o.relativeAttr(I,G),W.impliedEdits[G]);if(-1!==["width","height"].indexOf(I))if(O){L("autosize",null);var Z="height"===I?"width":"height";L(Z,l[Z])}else l[I]=e._initialAutoSize[I];else if("autosize"===I)L("width",O?null:l.width),L("height",O?null:l.height);else if(z.match(q))D(z),s(l,N+"._inputRange").set(null);else if(z.match(K)){D(z),s(l,N+"._inputRange").set(null);var $=s(l,N).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else z.match(X)&&s(l,N+"._inputDomain").set(null);if("type"===F){var Q=Y,ee="linear"===H.type&&"log"===O,te="log"===H.type&&"linear"===O;if(ee||te){if(Q&&Q.range)if(H.autorange)ee&&(Q.range=Q.range[1]>Q.range[0]?[1,2]:[2,1]);else{var re=Q.range[0],ne=Q.range[1];ee?(re<=0&&ne<=0&&L(N+".autorange",!0),re<=0?re=ne/1e6:ne<=0&&(ne=re/1e6),L(N+".range[0]",Math.log(re)/Math.LN10),L(N+".range[1]",Math.log(ne)/Math.LN10)):(L(N+".range[0]",Math.pow(10,re)),L(N+".range[1]",Math.pow(10,ne)))}else L(N+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[P.parts[0]]&&"radialaxis"===P.parts[1]&&delete l[P.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(e,H,O,L),u.getComponentMethod("images","convertCoords")(e,H,O,L)}else L(N+".autorange",!0),L(N+".range",null);s(l,N+"._inputRange").set(null)}else if(F.match(C)){var ae=s(l,I).get(),ie=(O||{}).type;ie&&"-"!==ie||(ie="linear"),u.getComponentMethod("annotations","convertCoords")(e,ae,ie,L),u.getComponentMethod("images","convertCoords")(e,ae,ie,L)}var oe=w.containerArrayMatch(I);if(oe){r=oe.array,n=oe.index;var se=oe.property,le=W||{editType:"calc"};""!==n&&""===se&&(w.isAddVal(O)?S[I]=null:w.isRemoveVal(O)?S[I]=(s(i,r).get()||[])[n]:o.warn("unrecognized full object value",t)),T.update(x,le),v[r]||(v[r]={});var ce=v[r][n];ce||(ce=v[r][n]={}),ce[se]=O,delete t[I]}else"reverse"===F?(Y.range?Y.range.reverse():(L(N+".autorange",!0),Y.range=[1,0]),H.autorange?x.calc=!0:x.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===I&&("lasso"===O||"select"===O)&&"lasso"!==U&&"select"!==U?x.plot=!0:l._has("gl2d")?x.plot=!0:W?T.update(x,W):x.calc=!0,P.set(O))}}for(r in v)w.applyContainerArrayChanges(e,p(i,r),v[r],x,p)||(x.plot=!0);var ue=l._axisConstraintGroups||[];for(A in E)for(n=0;n<ue.length;n++){var de=ue[n];if(de[A])for(var pe in x.calc=!0,de)E[pe]||(f.getFromId(e,pe)._constraintShrinkable=!0)}return(J(e)||t.height||t.width)&&(x.plot=!0),(x.plot||x.calc)&&(x.layoutReplot=!0),{flags:x,rangesAltered:E,undoit:S,redoit:M,eventData:g}}function J(e){var t=e._fullLayout,r=t.width,n=t.height;return e.layout.autosize&&p.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==n}function $(e,t,n,a){if(e=o.getGraphDiv(e),k.clearPromiseQueue(e),e.framework&&e.framework.isPolar)return Promise.resolve(e);o.isPlainObject(t)||(t={}),o.isPlainObject(n)||(n={}),Object.keys(t).length&&(e.changed=!0),Object.keys(n).length&&(e.changed=!0);var i=k.coerceTraceIndices(e,a),s=H(e,o.extendFlat({},t),i),l=s.flags,u=Z(e,o.extendFlat({},n)),d=u.flags;(l.calc||d.calc)&&(e.calcdata=void 0),l.clearAxisTypes&&k.clearAxisTypes(e,i,n);var h=[];d.layoutReplot?h.push(M.layoutReplot):l.fullReplot?h.push(r.plot):(h.push(p.previousPromises),W(e,d,u)||p.supplyDefaults(e),l.style&&h.push(M.doTraceStyle),(l.colorbars||d.colorbars)&&h.push(M.doColorBars),d.legend&&h.push(M.doLegend),d.layoutstyle&&h.push(M.layoutStyles),d.axrange&&G(h,u.rangesAltered),d.ticks&&h.push(M.doTicksRelayout),d.modebar&&h.push(M.doModeBar),d.camera&&h.push(M.doCamera),h.push(A)),h.push(p.rehover,p.redrag),c.add(e,$,[e,s.undoit,u.undoit,s.traces],$,[e,s.redoit,u.redoit,s.traces]);var f=o.syncOrAsync(h,e);return f&&f.then||(f=Promise.resolve(e)),f.then((function(){return e.emit("plotly_update",{data:s.eventData,layout:u.eventData}),e}))}function Q(e){return function(t){t._fullLayout._guiEditing=!0;var r=e.apply(null,arguments);return t._fullLayout._guiEditing=!1,r}}var ee=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],te=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function re(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=e.match(n.pattern);if(a)return{head:a[1],attr:n.attr}}}function ne(e,t){var r=s(t,e).get();if(void 0!==r)return r;var n=e.split(".");for(n.pop();n.length>1;)if(n.pop(),void 0!==(r=s(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ae(e,t){for(var r=0;r<t.length;r++)if(t[r]._fullInput.uid===e)return r;return-1}function ie(e,t,r){for(var n=0;n<t.length;n++)if(t[n].uid===e)return n;return!t[r]||t[r].uid?-1:r}function oe(e,t){var r=o.isPlainObject(e),n=Array.isArray(e);return r||n?(r&&o.isPlainObject(t)||n&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function se(e,t,r,n){var a,i,l,c=n.getValObject,u=n.flags,d=n.immutable,p=n.inArray,h=n.arrayIndex;function f(){var e=a.editType;p&&-1!==e.indexOf("arraydraw")?o.pushUnique(u.arrays[p],h):(T.update(u,a),"none"!==e&&u.nChanges++,n.transition&&a.anim&&u.nChangesAnim++,(q.test(l)||K.test(l))&&(u.rangesAltered[r[0]]=1),X.test(l)&&s(t,"_inputDomain").set(null),"datarevision"===i&&(u.newDataRevision=1))}function m(e){return"data_array"===e.valType||e.arrayOk}for(i in e){if(u.calc&&!n.transition)return;var g=e[i],v=t[i],y=r.concat(i);if(l=y.join("."),"_"!==i.charAt(0)&&"function"!=typeof g&&g!==v){if(("tick0"===i||"dtick"===i)&&"geo"!==r[0]){var b=t.tickmode;if("auto"===b||"array"===b||!b)continue}if(("range"!==i||!t.autorange)&&("zmin"!==i&&"zmax"!==i||"contourcarpet"!==t.type)&&(a=c(y))&&(!a._compareAsJSON||JSON.stringify(g)!==JSON.stringify(v))){var _,x=a.valType,w=m(a),k=Array.isArray(g),M=Array.isArray(v);if(k&&M){var C="_input_"+i,S=e[C],L=t[C];if(Array.isArray(S)&&S===L)continue}if(void 0===v)w&&k?u.calc=!0:f();else if(a._isLinkedToArray){var A=[],E=!1;p||(u.arrays[i]=A);var D=Math.min(g.length,v.length),I=Math.max(g.length,v.length);if(D!==I){if("arraydraw"!==a.editType){f();continue}E=!0}for(_=0;_<D;_++)se(g[_],v[_],y.concat(_),o.extendFlat({inArray:i,arrayIndex:_},n));if(E)for(_=D;_<I;_++)A.push(_)}else!x&&o.isPlainObject(g)?se(g,v,y,n):w?k&&M?(d&&(u.calc=!0),(d||n.newDataRevision)&&f()):k!==M?u.calc=!0:f():k&&M&&g.length===v.length&&String(g)===String(v)||f()}}}for(i in t)if(!(i in e||"_"===i.charAt(0)||"function"==typeof t[i])){if(m(a=c(r.concat(i)))&&Array.isArray(t[i]))return void(u.calc=!0);f()}}function le(e){var t=n.select(e),r=e._fullLayout;if(r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var a={};n.selectAll("defs").each((function(){this.id&&(a[this.id.split("-")[1]]=1)})),r._uid=o.randstr(a)}r._paperdiv.selectAll(".main-svg").attr(y.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var s=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=s.append("g").classed("imagelayer",!0),r._shapeUpperLayer=s.append("g").classed("shapelayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}r.animate=function(e,t,r){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before animating it. For more details, see https://plot.ly/javascript/animations/");var n=e._transitionData;n._frameQueue||(n._frameQueue=[]);var a=(r=p.supplyAnimationDefaults(r)).transition,i=r.frame;function s(e){return Array.isArray(a)?e>=a.length?a[0]:a[e]:a}function l(e){return Array.isArray(i)?e>=i.length?i[0]:i[e]:i}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return(void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(i,u){function d(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,p.transition(e,t.frame.data,t.frame.layout,k.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function h(){e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var t=function(){n._animationRaf=window.requestAnimationFrame(t),Date.now()-n._lastFrameAt>n._timeToNext&&d()};t()}var f,m,g=0;function v(e){return Array.isArray(a)?g>=a.length?e.transitionOpts=a[g]:e.transitionOpts=a[0]:e.transitionOpts=a,g++,e}var y=[],b=null==t,_=Array.isArray(t);if(b||_||!o.isPlainObject(t)){if(b||-1!==["string","number"].indexOf(typeof t))for(f=0;f<n._frames.length;f++)(m=n._frames[f])&&(b||String(m.group)===String(t))&&y.push({type:"byname",name:String(m.name),data:v({name:m.name})});else if(_)for(f=0;f<t.length;f++){var x=t[f];-1!==["number","string"].indexOf(typeof x)?(x=String(x),y.push({type:"byname",name:x,data:v({name:x})})):o.isPlainObject(x)&&y.push({type:"object",data:v(o.extendFlat({},x))})}}else y.push({type:"object",data:v(o.extendFlat({},t))});for(f=0;f<y.length;f++)if("byname"===(m=y[f]).type&&!n._frameHash[m.data.name])return o.warn('animate failure: frame not found: "'+m.data.name+'"'),void u();-1!==["next","immediate"].indexOf(r.mode)&&function(){if(0!==n._frameQueue.length){for(;n._frameQueue.length;){var t=n._frameQueue.pop();t.onInterrupt&&t.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}(),"reverse"===r.direction&&y.reverse();var w=e._fullLayout._currentFrame;if(w&&r.fromcurrent){var M=-1;for(f=0;f<y.length;f++)if("byname"===(m=y[f]).type&&m.name===w){M=f;break}if(M>0&&M<y.length-1){var T=[];for(f=0;f<y.length;f++)m=y[f],("byname"!==y[f].type||f>M)&&T.push(m);y=T}}y.length>0?function(t){if(0!==t.length){for(var a=0;a<t.length;a++){var o;o="byname"===t[a].type?p.computeFrame(e,t[a].name):t[a].data;var d=l(a),f=s(a);f.duration=Math.min(f.duration,d.duration);var m={frame:o,name:t[a].name,frameOpts:d,transitionOpts:f};a===t.length-1&&(m.onComplete=c(i,2),m.onInterrupt=u),n._frameQueue.push(m)}"immediate"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||h()}}(y):(e.emit("plotly_animated"),i())})))},r.addFrames=function(e,t,r){if(e=o.getGraphDiv(e),null==t)return Promise.resolve();if(!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plot.ly/javascript/animations/");var n,a,i,s,l=e._transitionData._frames,u=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var d=l.length+2*t.length,h=[],f={};for(n=t.length-1;n>=0;n--)if(o.isPlainObject(t[n])){var m=t[n].name,g=(u[m]||f[m]||{}).name,v=t[n].name,y=u[g]||f[g];g&&v&&"number"==typeof v&&y&&S<L&&(S++,o.warn('addFrames: overwriting frame "'+(u[g]||f[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),S===L&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f[m]={name:m},h.push({frame:p.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:d+n})}h.sort((function(e,t){return e.index>t.index?-1:e.index<t.index?1:0}));var b=[],_=[],x=l.length;for(n=h.length-1;n>=0;n--){if("number"==typeof(a=h[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;u[a.name="frame "+e._transitionData._counter++];);if(u[a.name]){for(i=0;i<l.length&&(l[i]||{}).name!==a.name;i++);b.push({type:"replace",index:i,value:a}),_.unshift({type:"replace",index:i,value:l[i]})}else s=Math.max(0,Math.min(h[n].index,x)),b.push({type:"insert",index:s,value:a}),_.unshift({type:"delete",index:s}),x++}var w=p.modifyFrames,k=p.modifyFrames,M=[e,_],T=[e,b];return c&&c.add(e,w,M,k,T),p.modifyFrames(e,b)},r.deleteFrames=function(e,t){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);var r,n,a=e._transitionData._frames,i=[],s=[];if(!t)for(t=[],r=0;r<a.length;r++)t.push(r);for((t=t.slice()).sort(),r=t.length-1;r>=0;r--)n=t[r],i.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:a[n]});var l=p.modifyFrames,u=p.modifyFrames,d=[e,s],h=[e,i];return c&&c.add(e,l,d,u,h),p.modifyFrames(e,i)},r.addTraces=function e(t,n,a){t=o.getGraphDiv(t);var i,s,l=[],u=r.deleteTraces,d=e,p=[t,l],h=[t,n];for(function(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(void 0===t)throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n<t.length;n++)if("object"!=typeof(a=t[n])||Array.isArray(a)||null===a)throw new Error("all values in traces array must be non-array objects");if(void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&r.length!==t.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(t,n,a),Array.isArray(n)||(n=[n]),n=n.map((function(e){return o.extendFlat({},e)})),k.cleanData(n),i=0;i<n.length;i++)t.data.push(n[i]);for(i=0;i<n.length;i++)l.push(-n.length+i);if(void 0===a)return s=r.redraw(t),c.add(t,u,p,d,h),s;Array.isArray(a)||(a=[a]);try{R(t,l,a)}catch(e){throw t.data.splice(t.data.length-n.length,n.length),e}return c.startSequence(t),c.add(t,u,p,d,h),s=r.moveTraces(t,l,a),c.stopSequence(t),s},r.deleteTraces=function e(t,n){t=o.getGraphDiv(t);var a,i,s=[],l=r.addTraces,u=e,d=[t,s,n],p=[t,n];if(void 0===n)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),O(t,n,"indices"),(n=P(n,t.data.length-1)).sort(o.sorterDes),a=0;a<n.length;a+=1)i=t.data.splice(n[a],1)[0],s.push(i);var h=r.redraw(t);return c.add(t,l,d,u,p),h},r.extendTraces=function e(t,n,a,i){var s=F(t=o.getGraphDiv(t),n,a,i,(function(e,t,r){var n,a;if(o.isTypedArray(e))if(r<0){var i=new e.constructor(0),s=z(e,t);r<0?(n=s,a=i):(n=i,a=s)}else if(n=new e.constructor(r),a=new e.constructor(e.length+t.length-r),r===t.length)n.set(t),a.set(e);else if(r<t.length){var l=t.length-r;n.set(t.subarray(l)),a.set(e),a.set(t.subarray(0,l),e.length)}else{var c=r-t.length,u=e.length-c;n.set(e.subarray(u)),n.set(t,c),a.set(e.subarray(0,u))}else n=e.concat(t),a=r>=0&&r<n.length?n.splice(0,n.length-r):[];return[n,a]})),l=r.redraw(t),u=[t,s.update,a,s.maxPoints];return c.add(t,r.prependTraces,u,e,arguments),l},r.moveTraces=function e(t,n,a){var i,s=[],l=[],u=e,d=e,p=[t=o.getGraphDiv(t),a,n],h=[t,n,a];if(R(t,n,a),n=Array.isArray(n)?n:[n],void 0===a)for(a=[],i=0;i<n.length;i++)a.push(-n.length+i);for(a=Array.isArray(a)?a:[a],n=P(n,t.data.length-1),a=P(a,t.data.length-1),i=0;i<t.data.length;i++)-1===n.indexOf(i)&&s.push(t.data[i]);for(i=0;i<n.length;i++)l.push({newIndex:a[i],trace:t.data[n[i]]});for(l.sort((function(e,t){return e.newIndex-t.newIndex})),i=0;i<l.length;i+=1)s.splice(l[i].newIndex,0,l[i].trace);t.data=s;var f=r.redraw(t);return c.add(t,u,p,d,h),f},r.prependTraces=function e(t,n,a,i){var s=F(t=o.getGraphDiv(t),n,a,i,(function(e,t,r){var n,a;if(o.isTypedArray(e))if(r<=0){var i=new e.constructor(0),s=z(t,e);r<0?(n=s,a=i):(n=i,a=s)}else if(n=new e.constructor(r),a=new e.constructor(e.length+t.length-r),r===t.length)n.set(t),a.set(e);else if(r<t.length){var l=t.length-r;n.set(t.subarray(0,l)),a.set(t.subarray(l)),a.set(e,l)}else{var c=r-t.length;n.set(t),n.set(e.subarray(0,c),t.length),a.set(e.subarray(c))}else n=t.concat(e),a=r>=0&&r<n.length?n.splice(r,n.length):[];return[n,a]})),l=r.redraw(t),u=[t,s.update,a,s.maxPoints];return c.add(t,r.extendTraces,u,e,arguments),l},r.newPlot=function(e,t,n,a){return e=o.getGraphDiv(e),p.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),p.purge(e),r.plot(e,t,n,a)},r.plot=function(e,t,a,i){var s;if(e=o.getGraphDiv(e),l.init(e),o.isPlainObject(t)){var c=t;t=c.data,a=c.layout,i=c.config,s=c.frames}if(!1===l.triggerHandler(e,"plotly_beforeplot",[t,a,i]))return Promise.reject();t||a||o.isPlotDiv(e)||o.warn("Calling Plotly.plot as if redrawing but this container doesn't yet have a plot.",e),I(e,i),a||(a={}),n.select(e).classed("js-plotly-plot",!0),m.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var d=0===(e.data||[]).length&&Array.isArray(t);Array.isArray(t)&&(k.cleanData(t),d?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),e.layout&&!d||(e.layout=k.cleanLayout(a)),p.supplyDefaults(e);var g=e._fullLayout,y=g._has("cartesian");if(!g._has("polar")&&t&&t[0]&&t[0].r)return o.log("Legacy polar charts are deprecated!"),function(e,t,r){var a=n.select(e).selectAll(".plot-container").data([0]);a.enter().insert("div",":first-child").classed("plot-container plotly",!0);var i=a.selectAll(".svg-container").data([0]);i.enter().append("div").classed("svg-container",!0).style("position","relative"),i.html(""),t&&(e.data=t),r&&(e.layout=r),h.manager.fillLayout(e),i.style({width:e._fullLayout.width+"px",height:e._fullLayout.height+"px"}),e.framework=h.manager.framework(e),e.framework({data:e.data,layout:e.layout},i.node()),e.framework.setUndoPoint();var s=e.framework.svg(),l=1,c=e._fullLayout.title?e._fullLayout.title.text:"";""!==c&&c||(l=0);var u=function(){this.call(b.convertToTspans,e)},d=s.select(".title-group text").call(u);if(e._context.edits.titleText){var f=o._(e,"Click to enter Plot title");c&&c!==f||(l=.2,d.attr({"data-unformatted":f}).text(f).style({opacity:l}).on("mouseover.opacity",(function(){n.select(this).transition().duration(100).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(1e3).style("opacity",0)})));var m=function(){this.call(b.makeEditable,{gd:e}).on("edit",(function(t){e.framework({layout:{title:{text:t}}}),this.text(t).call(u),this.call(m)})).on("cancel",(function(){var e=this.attr("data-unformatted");this.text(e).call(u)}))};d.call(m)}return e._context.setBackground(e,e._fullLayout.paper_bgcolor),p.addLinks(e),Promise.resolve()}(e,t,a);g._replotting=!0,d&&le(e),e.framework!==le&&(e.framework=le,le(e)),m.initGradients(e),d&&f.saveShowSpikeInitial(e);var _=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;_&&p.doCalcdata(e);for(var x=0;x<e.calcdata.length;x++)e.calcdata[x][0].trace=e._fullData[x];e._context.responsive?e._responsiveChartHandler||(e._responsiveChartHandler=function(){o.isHidden(e)||p.resize(e)},window.addEventListener("resize",e._responsiveChartHandler)):o.clearResponsive(e);var w=o.extendFlat({},g._size),T=0;function C(){if(p.clearAutoMarginIds(e),M.drawMarginPushers(e),f.allowAutoMargin(e),g._has("pie"))for(var t=e._fullData,r=0;r<t.length;r++){var n=t[r];"pie"===n.type&&n.automargin&&p.allowAutoMargin(e,"pie."+n.uid+".automargin")}return p.doAutoMargin(e),p.previousPromises(e)}function S(){e._transitioning||(M.doAutoRangeAndConstraints(e),d&&f.saveRangeInitial(e),u.getComponentMethod("rangeslider","calcAutorange")(e))}var L=[p.previousPromises,function(){if(s)return r.addFrames(e,s)},function t(){for(var r=g._basePlotModules,n=0;n<r.length;n++)r[n].drawFramework&&r[n].drawFramework(e);if(!g._glcanvas&&g._has("gl")&&(g._glcanvas=g._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],(function(e){return e.key})),g._glcanvas.enter().append("canvas").attr("class",(function(e){return"gl-canvas gl-canvas-"+e.key.replace("Layer","")})).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"})),g._glcanvas){g._glcanvas.attr("width",g.width).attr("height",g.height);var a=g._glcanvas.data()[0].regl;if(a&&(Math.floor(g.width)!==a._gl.drawingBufferWidth||Math.floor(g.height)!==a._gl.drawingBufferHeight)){var i="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!T)return o.log(i+" Clearing graph and plotting again."),p.cleanPlot([],{},e._fullData,g),p.supplyDefaults(e),g=e._fullLayout,p.doCalcdata(e),T++,t();o.error(i)}}return"h"===g.modebar.orientation?g._modebardiv.style("height",null).style("width","100%"):g._modebardiv.style("width",null).style("height",g.height+"px"),p.previousPromises(e)},C,function(){if(p.didMarginChange(w,g._size))return o.syncOrAsync([C,M.layoutStyles],e)}];y&&L.push((function(){if(_)return o.syncOrAsync([u.getComponentMethod("shapes","calcAutorange"),u.getComponentMethod("annotations","calcAutorange"),S],e);S()})),L.push(M.layoutStyles),y&&L.push((function(){return f.draw(e,d?"":"redraw")})),L.push(M.drawData,M.finalDraw,v,p.addLinks,p.rehover,p.redrag,p.doAutoMargin,p.previousPromises);var E=o.syncOrAsync(L,e);return E&&E.then||(E=Promise.resolve()),E.then((function(){return A(e),e}))},r.purge=function(e){var t=(e=o.getGraphDiv(e))._fullLayout||{},r=e._fullData||[];return p.cleanPlot([],{},r,t),p.purge(e),l.purge(e),t._container&&t._container.remove(),delete e._context,e},r.react=function(e,t,n,a){var i,l;e=o.getGraphDiv(e),k.clearPromiseQueue(e);var c=e._fullData,h=e._fullLayout;if(o.isPlotDiv(e)&&c&&h){if(o.isPlainObject(t)){var f=t;t=f.data,n=f.layout,a=f.config,i=f.frames}var m=!1;if(a){var g=o.extendDeep({},e._context);e._context=void 0,I(e,a),m=function e(t,r){var n;for(n in t)if("_"!==n.charAt(0)){var a=t[n],i=r[n];if(a!==i)if(o.isPlainObject(a)&&o.isPlainObject(i)){if(e(a,i))return!0}else{if(!Array.isArray(a)||!Array.isArray(i))return!0;if(a.length!==i.length)return!0;for(var s=0;s<a.length;s++)if(a[s]!==i[s]){if(!o.isPlainObject(a[s])||!o.isPlainObject(i[s]))return!0;if(e(a[s],i[s]))return!0}}}}(g,e._context)}e.data=t||[],k.cleanData(e.data),e.layout=n||{},k.cleanLayout(e.layout),function(e,t,r,n){var a,i,l,c,u,d,p,h,f=n._preGUI,m=[],g={};for(a in f){if(u=re(a,ee)){if(i=u.attr||u.head+".uirevision",(c=(l=s(n,i).get())&&ne(i,t))&&c===l&&(null===(d=f[a])&&(d=void 0),oe(h=(p=s(t,a)).get(),d))){void 0===h&&"autorange"===a.substr(a.length-9)&&m.push(a.substr(0,a.length-10)),p.set(j(s(n,a).get()));continue}}else o.warn("unrecognized GUI edit: "+a);delete f[a],"range["===a.substr(a.length-8,6)&&(g[a.substr(0,a.length-9)]=1)}for(var v=0;v<m.length;v++){var y=m[v];if(g[y]){var b=s(t,y).get();b&&delete b.autorange}}var _=n._tracePreGUI;for(var x in _){var w,k=_[x],M=null;for(a in k){if(!M){var T=ae(x,r);if(T<0){delete _[x];break}var C=ie(x,e,(w=r[T]._fullInput).index);if(C<0){delete _[x];break}M=e[C]}if(u=re(a,te)){if(u.attr?c=(l=s(n,u.attr).get())&&ne(u.attr,t):(l=w.uirevision,void 0===(c=M.uirevision)&&(c=t.uirevision)),c&&c===l&&(null===(d=k[a])&&(d=void 0),oe(h=(p=s(M,a)).get(),d))){p.set(j(s(w,a).get()));continue}}else o.warn("unrecognized GUI edit: "+a+" in trace uid "+x);delete k[a]}}}(e.data,e.layout,c,h),p.supplyDefaults(e,{skipUpdateCalc:!0});var v=e._fullData,y=e._fullLayout,b=void 0===y.datarevision,_=y.transition,x=function(e,t,r,n,a){var i=T.layoutFlags();return i.arrays={},i.rangesAltered={},i.nChanges=0,i.nChangesAnim=0,se(t,r,[],{getValObject:function(e){return d.getLayoutValObject(r,e)},flags:i,immutable:n,transition:a,gd:e}),(i.plot||i.calc)&&(i.layoutReplot=!0),a&&i.nChanges&&i.nChangesAnim&&(i.anim=i.nChanges===i.nChangesAnim?"all":"some"),i}(e,h,y,b,_),w=x.newDataRevision,C=function(e,t,r,n,a,i){var o=t.length===r.length;if(!a&&!o)return{fullReplot:!0,calc:!0};var s,l,c=T.traceFlags();c.arrays={},c.nChanges=0,c.nChangesAnim=0;var u={getValObject:function(e){var t=d.getTraceValObject(l,e);return!l._module.animatable&&t.anim&&(t.anim=!1),t},flags:c,immutable:n,transition:a,newDataRevision:i,gd:e},h={};for(s=0;s<t.length;s++)if(r[s]){if(l=r[s]._fullInput,p.hasMakesDataTransform(l)&&(l=r[s]),h[l.uid])continue;h[l.uid]=1,se(t[s]._fullInput,l,[],u)}return(c.calc||c.plot)&&(c.fullReplot=!0),a&&c.nChanges&&c.nChangesAnim&&(c.anim=c.nChanges===c.nChangesAnim&&o?"all":"some"),c}(e,c,v,b,_,w);J(e)&&(x.layoutReplot=!0),C.calc||x.calc?e.calcdata=void 0:p.supplyDefaultsUpdateCalc(e.calcdata,v);var S=[];if(i&&(e._transitionData={},p.createTransitionData(e),S.push((function(){return r.addFrames(e,i)}))),y.transition&&!m&&(C.anim||x.anim))p.doCalcdata(e),M.doAutoRangeAndConstraints(e),S.push((function(){return p.transitionFromReact(e,C,x,h)}));else if(C.fullReplot||x.layoutReplot||m)e._fullLayout._skipDefaults=!0,S.push(r.plot);else{for(var L in x.arrays){var E=x.arrays[L];if(E.length){var D=u.getComponentMethod(L,"drawOne");if(D!==o.noop)for(var P=0;P<E.length;P++)D(e,E[P]);else{var O=u.getComponentMethod(L,"draw");if(O===o.noop)throw new Error("cannot draw components: "+L);O(e)}}}S.push(p.previousPromises),C.style&&S.push(M.doTraceStyle),(C.colorbars||x.colorbars)&&S.push(M.doColorBars),x.legend&&S.push(M.doLegend),x.layoutstyle&&S.push(M.layoutStyles),x.axrange&&G(S),x.ticks&&S.push(M.doTicksRelayout),x.modebar&&S.push(M.doModeBar),x.camera&&S.push(M.doCamera),S.push(A)}S.push(p.rehover,p.redrag),(l=o.syncOrAsync(S,e))&&l.then||(l=Promise.resolve(e))}else l=r.newPlot(e,t,n,a);return l.then((function(){return e.emit("plotly_react",{data:t,layout:n}),e}))},r.redraw=function(e){if(e=o.getGraphDiv(e),!o.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);return k.cleanData(e.data),k.cleanLayout(e.layout),e.calcdata=void 0,r.plot(e).then((function(){return e.emit("plotly_redraw"),e}))},r.relayout=U,r.restyle=N,r.setPlotConfig=function(e){return o.extendFlat(x,e)},r.update=$,r._guiRelayout=Q(U),r._guiRestyle=Q(N),r._guiUpdate=Q($),r._storeDirectGUIEdit=function(e,t,r){for(var n in r)Y(n,s(e,n).get(),r[n],t)}},{"../components/color":591,"../components/drawing":612,"../constants/xmlns_namespaces":693,"../lib":716,"../lib/events":706,"../lib/queue":731,"../lib/svg_text_utils":740,"../plots/cartesian/axes":764,"../plots/cartesian/constants":770,"../plots/cartesian/graph_interact":773,"../plots/cartesian/select":781,"../plots/plots":825,"../plots/polar/legacy":833,"../registry":845,"./edit_types":747,"./helpers":748,"./manage_arrays":750,"./plot_config":752,"./plot_schema":753,"./subroutines":755,d3:164,"fast-isnumeric":227,"has-hover":411}],752:[function(e,t,r){"use strict";var n={staticPlot:{valType:"boolean",dflt:!1},plotlyServerURL:{valType:"string",dflt:"https://plot.ly"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"boolean",dflt:1},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},a={};!function e(t,r){for(var n in t){var a=t[n];a.valType?r[n]=a.dflt:(r[n]||(r[n]={}),e(a,r[n]))}}(n,a),t.exports={configAttributes:n,dfltConfig:a}},{}],753:[function(e,t,r){"use strict";var n=e("../registry"),a=e("../lib"),i=e("../plots/attributes"),o=e("../plots/layout_attributes"),s=e("../plots/frame_attributes"),l=e("../plots/animation_attributes"),c=e("./plot_config").configAttributes,u=e("../plots/polar/legacy/area_attributes"),d=e("../plots/polar/legacy/axis_attributes"),p=e("./edit_types"),h=a.extendFlat,f=a.extendDeepAll,m=a.isPlainObject,g=a.isArrayOrTypedArray,v=a.nestedProperty,y=a.valObjectMeta,b="_isSubplotObj",_="_isLinkedToArray",x=[b,_,"_arrayAttrRegexps","_deprecated"];function w(e,t,r){if(!e)return!1;if(e._isLinkedToArray)if(k(t[r]))r++;else if(r<t.length)return!1;for(;r<t.length;r++){var n=e[t[r]];if(!m(n))break;if(e=n,r===t.length-1)break;if(e._isLinkedToArray){if(!k(t[++r]))return!1}else if("info_array"===e.valType){var a=t[++r];if(!k(a))return!1;var i=e.items;if(Array.isArray(i)){if(a>=i.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!k(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function k(e){return e===Math.round(e)&&e>=0}function M(){var e,t,r={};for(e in f(r,o),n.subplotsRegistry)if((t=n.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(t.attr))for(var a=0;a<t.attr.length;a++)C(r,t,t.attr[a]);else C(r,t,"subplot"===t.attr?t.name:t.attr);for(e in r=function(e){return h(e,{radialaxis:d.radialaxis,angularaxis:d.angularaxis}),h(e,d.layout),e}(r),n.componentsRegistry){var i=(t=n.componentsRegistry[e]).schema;if(i&&(i.subplots||i.layout)){var s=i.subplots;if(s&&s.xaxis&&!s.yaxis)for(var l in s.xaxis)delete r.yaxis[l]}else"colorscale"===t.name?f(r,t.layoutAttributes):t.layoutAttributes&&S(r,t.layoutAttributes,t.name)}return{layoutAttributes:T(r)}}function T(e){return function(e){r.crawl(e,(function(e,t,n){r.isValObject(e)?"data_array"===e.valType?(e.role="data",n[t+"src"]={valType:"string",editType:"none"}):!0===e.arrayOk&&(n[t+"src"]={valType:"string",editType:"none"}):m(e)&&(e.role="object")}))}(e),function(e){r.crawl(e,(function(e,t,r){if(e){var n=e[_];n&&(delete e[_],r[t]={items:{}},r[t].items[n]=e,r[t].role="object")}}))}(e),function(e){!function e(t){for(var r in t)if(m(t[r]))e(t[r]);else if(Array.isArray(t[r]))for(var n=0;n<t[r].length;n++)e(t[r][n]);else t[r]instanceof RegExp&&(t[r]=t[r].toString())}(e)}(e),e}function C(e,t,r){var n=v(e,r),a=f({},t.layoutAttributes);a[b]=!0,n.set(a)}function S(e,t,r){var n=v(e,r);n.set(f(n.get()||{},t))}r.IS_SUBPLOT_OBJ=b,r.IS_LINKED_TO_ARRAY=_,r.DEPRECATED="_deprecated",r.UNDERSCORE_ATTRS=x,r.get=function(){var e={};n.allTypes.concat("area").forEach((function(t){e[t]=function(e){var t,a;"area"===e?(t={attributes:u},a={}):(t=n.modules[e]._module,a=t.basePlotModule);var o={type:null},s=f({},i),l=f({},t.attributes);r.crawl(l,(function(e,t,r,n,a){v(s,a).set(void 0),void 0===e&&v(l,a).set(void 0)})),f(o,s),n.traceIs(e,"noOpacity")&&delete o.opacity,n.traceIs(e,"showLegend")||(delete o.showlegend,delete o.legendgroup),n.traceIs(e,"noHover")&&(delete o.hoverinfo,delete o.hoverlabel),t.selectPoints||delete o.selectedpoints,f(o,l),a.attributes&&f(o,a.attributes),o.type=e;var c={meta:t.meta||{},categories:t.categories||{},animatable:Boolean(t.animatable),type:e,attributes:T(o)};if(t.layoutAttributes){var d={};f(d,t.layoutAttributes),c.layoutAttributes=T(d)}return t.animatable||r.crawl(c,(function(e){r.isValObject(e)&&"anim"in e&&delete e.anim})),c}(t)}));var t,a={};return Object.keys(n.transformsRegistry).forEach((function(e){a[e]=function(e){var t=n.transformsRegistry[e],r=f({},t.attributes);return Object.keys(n.componentsRegistry).forEach((function(t){var a=n.componentsRegistry[t];a.schema&&a.schema.transforms&&a.schema.transforms[e]&&Object.keys(a.schema.transforms[e]).forEach((function(t){S(r,a.schema.transforms[e][t],t)}))})),{attributes:T(r)}}(e)})),{defs:{valObjects:y,metaKeys:x.concat(["description","role","editType","impliedEdits"]),editType:{traces:p.traces,layout:p.layout},impliedEdits:{}},traces:e,layout:M(),transforms:a,frames:(t={frames:f({},s)},T(t),t.frames),animation:T(l),config:T(c)}},r.crawl=function(e,t,n,a){var i=n||0;a=a||"",Object.keys(e).forEach((function(n){var o=e[n];if(-1===x.indexOf(n)){var s=(a?a+".":"")+n;t(o,n,e,i,s),r.isValObject(o)||m(o)&&"impliedEdits"!==n&&r.crawl(o,t,i+1,s)}}))},r.isValObject=function(e){return e&&void 0!==e.valType},r.findArrayAttributes=function(e){var t,n,a=[],o=[],s=[];function l(e,r,i,l){o=o.slice(0,l).concat([r]),s=s.slice(0,l).concat([e&&e._isLinkedToArray]),e&&("data_array"===e.valType||!0===e.arrayOk)&&("colorbar"!==o[l-1]||"ticktext"!==r&&"tickvals"!==r)&&function e(t,r,i){var l=t[o[r]],c=i+o[r];if(r===o.length-1)g(l)&&a.push(n+c);else if(s[r]){if(Array.isArray(l))for(var u=0;u<l.length;u++)m(l[u])&&e(l[u],r+1,c+"["+u+"].")}else m(l)&&e(l,r+1,c+".")}(t,0,"")}t=e,n="",r.crawl(i,l),e._module&&e._module.attributes&&r.crawl(e._module.attributes,l);var c=e.transforms;if(c)for(var u=0;u<c.length;u++){var d=c[u],p=d._module;p&&(n="transforms["+u+"].",t=d,r.crawl(p.attributes,l))}return a},r.getTraceValObject=function(e,t){var r,a,o=t[0],s=1;if("transforms"===o){if(1===t.length)return i.transforms;var l=e.transforms;if(!Array.isArray(l)||!l.length)return!1;var c=t[1];if(!k(c)||c>=l.length)return!1;a=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[t[2]],s=3}else if("area"===e.type)a=u[o];else{var d=e._module;if(d||(d=(n.modules[e.type||i.type.dflt]||{})._module),!d)return!1;if(!(a=(r=d.attributes)&&r[o])){var p=d.basePlotModule;p&&p.attributes&&(a=p.attributes[o])}a||(a=i[o])}return w(a,t,s)},r.getLayoutValObject=function(e,t){return w(function(e,t){var r,a,i,s,l=e._basePlotModules;if(l){var c;for(r=0;r<l.length;r++){if((i=l[r]).attrRegex&&i.attrRegex.test(t)){if(i.layoutAttrOverrides)return i.layoutAttrOverrides;!c&&i.layoutAttributes&&(c=i.layoutAttributes)}var u=i.baseLayoutAttrOverrides;if(u&&t in u)return u[t]}if(c)return c}var p=e._modules;if(p)for(r=0;r<p.length;r++)if((s=p[r].layoutAttributes)&&t in s)return s[t];for(a in n.componentsRegistry){if("colorscale"===(i=n.componentsRegistry[a]).name&&0===t.indexOf("coloraxis"))return i.layoutAttributes[t];if(!i.schema&&t===i.name)return i.layoutAttributes}return t in o?o[t]:"radialaxis"===t||"angularaxis"===t?d[t]:d.layout[t]||!1}(e,t[0]),t,1)}},{"../lib":716,"../plots/animation_attributes":759,"../plots/attributes":761,"../plots/frame_attributes":791,"../plots/layout_attributes":816,"../plots/polar/legacy/area_attributes":831,"../plots/polar/legacy/axis_attributes":832,"../registry":845,"./edit_types":747,"./plot_config":752}],754:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/attributes"),i="templateitemname",o={name:{valType:"string",editType:"none"}};function s(e){return e&&"string"==typeof e}function l(e){var t=e.length-1;return"s"!==e.charAt(t)&&n.warn("bad argument to arrayDefaultKey: "+e),e.substr(0,e.length-1)+"defaults"}o[i]={valType:"string",editType:"calc"},r.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=o.name,t[i]=o[i],t},r.traceTemplater=function(e){var t,r,i={};for(t in e)r=e[t],Array.isArray(r)&&r.length&&(i[t]=0);return{newTrace:function(o){var s={type:t=n.coerce(o,{},a,"type"),_template:null};if(t in i){r=e[t];var l=i[t]%r.length;i[t]++,s._template=r[l]}return s}}},r.newContainer=function(e,t,r){var a=e._template,i=a&&(a[t]||r&&a[r]);return n.isPlainObject(i)||(i=null),e[t]={_template:i}},r.arrayTemplater=function(e,t,r){var n=e._template,a=n&&n[l(t)],o=n&&n[t];Array.isArray(o)&&o.length||(o=[]);var c={};return{newItem:function(e){var t={name:e.name,_input:e},n=t[i]=e[i];if(!s(n))return t._template=a,t;for(var l=0;l<o.length;l++){var u=o[l];if(u.name===n)return c[n]=1,t._template=u,t}return t[r]=e[r]||!1,t._template=!1,t},defaultItems:function(){for(var e=[],t=0;t<o.length;t++){var r=o[t],n=r.name;if(s(n)&&!c[n]){var a={_template:r,name:n,_input:{_templateitemname:n}};a[i]=r[i],e.push(a),c[n]=1}}return e}}},r.arrayDefaultKey=l,r.arrayEditor=function(e,t,r){var a=(n.nestedProperty(e,t).get()||[]).length,o=r._index,s=o>=a&&(r._input||{})._templateitemname;s&&(o=a);var l,c=t+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][i]=s)}function d(e,t){s?n.nestedProperty(l[c],e).set(t):l[c+"."+e]=t}function p(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:d,getUpdateObj:p,applyUpdate:function(t,r){t&&d(t,r);var a=p();for(var i in a)n.nestedProperty(e,i).set(a[i])}}}},{"../lib":716,"../plots/attributes":761}],755:[function(e,t,r){"use strict";var n=e("d3"),a=e("../registry"),i=e("../plots/plots"),o=e("../lib"),s=e("../lib/clear_gl_canvases"),l=e("../components/color"),c=e("../components/drawing"),u=e("../components/titles"),d=e("../components/modebar"),p=e("../plots/cartesian/axes"),h=e("../constants/alignment"),f=e("../plots/cartesian/constraints"),m=f.enforce,g=f.clean,v=e("../plots/cartesian/autorange").doAutoRange,y="start",b="middle",_="end";function x(e,t,r){for(var n=0;n<r.length;n++){var a=r[n][0],i=r[n][1];if(!(a[0]>=e[1]||a[1]<=e[0])&&i[0]<t[1]&&i[1]>t[0])return!0}return!1}function w(e){var t,a,s,u,f,m,g=e._fullLayout,v=g._size,y=v.p,b=p.list(e,"",!0);if(g._paperdiv.style({width:e._context.responsive&&g.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":g.width+"px",height:e._context.responsive&&g.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),e._context.setBackground(e,g.paper_bgcolor),r.drawMainTitle(e),d.manage(e),!g._has("cartesian"))return i.previousPromises(e);function _(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-y-n:t._offset+t._length+y+n:v.t+v.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+y+n:t._offset-y-n:v.l+v.w*(e.position||0)+n%1}for(t=0;t<b.length;t++){var w=(u=b[t])._anchorAxis;u._linepositions={},u._lw=c.crispRound(e,u.linewidth,1),u._mainLinePosition=_(u,w,u.side),u._mainMirrorPosition=u.mirror&&w?_(u,w,h.OPPOSITE_SIDE[u.side]):null}var M=[],C=[],S=[],L=1===l.opacity(g.paper_bgcolor)&&1===l.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(a in g._plots)if((s=g._plots[a]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var A=s.xaxis.domain,E=s.yaxis.domain,D=s.plotgroup;if(x(A,E,S)){var I=D.node(),P=s.bg=o.ensureSingle(D,"rect","bg");I.insertBefore(P.node(),I.childNodes[0]),C.push(a)}else D.select("rect.bg").remove(),S.push([A,E]),L||(M.push(a),C.push(a))}var O,R,F,z,N,j,B,Y,H,V,U,W,G,q=g._bgLayer.selectAll(".bg").data(M);for(q.enter().append("rect").classed("bg",!0),q.exit().remove(),q.each((function(e){g._plots[e].bg=n.select(this)})),t=0;t<C.length;t++)s=g._plots[C[t]],f=s.xaxis,m=s.yaxis,s.bg&&s.bg.call(c.setRect,f._offset-y,m._offset-y,f._length+2*y,m._length+2*y).call(l.fill,g.plot_bgcolor).style("stroke-width",0);if(!g._hasOnlyLargeSploms)for(a in g._plots){s=g._plots[a],f=s.xaxis,m=s.yaxis;var K,X,Z=s.clipId="clip"+g._uid+a+"plot",J=o.ensureSingleById(g._clips,"clipPath",Z,(function(e){e.classed("plotclip",!0).append("rect")}));s.clipRect=J.select("rect").attr({width:f._length,height:m._length}),c.setTranslate(s.plot,f._offset,m._offset),s._hasClipOnAxisFalse?(K=null,X=Z):(K=Z,X=null),c.setClipUrl(s.plot,K,e),s.layerClipId=X}function $(e){return"M"+O+","+e+"H"+R}function Q(e){return"M"+f._offset+","+e+"h"+f._length}function ee(e){return"M"+e+","+Y+"V"+B}function te(e){return"M"+e+","+m._offset+"v"+m._length}function re(e,t,r){if(!e.showline||a!==e._mainSubplot)return"";if(!e._anchorAxis)return r(e._mainLinePosition);var n=t(e._mainLinePosition);return e.mirror&&(n+=t(e._mainMirrorPosition)),n}for(a in g._plots){s=g._plots[a],f=s.xaxis,m=s.yaxis;var ne="M0,0";k(f,a)&&(N=T(f,"left",m,b),O=f._offset-(N?y+N:0),j=T(f,"right",m,b),R=f._offset+f._length+(j?y+j:0),F=_(f,m,"bottom"),z=_(f,m,"top"),!(G=!f._anchorAxis||a!==f._mainSubplot)||"allticks"!==f.mirror&&"all"!==f.mirror||(f._linepositions[a]=[F,z]),ne=re(f,$,Q),G&&f.showline&&("all"===f.mirror||"allticks"===f.mirror)&&(ne+=$(F)+$(z)),s.xlines.style("stroke-width",f._lw+"px").call(l.stroke,f.showline?f.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",ne);var ae="M0,0";k(m,a)&&(U=T(m,"bottom",f,b),B=m._offset+m._length+(U?y:0),W=T(m,"top",f,b),Y=m._offset-(W?y:0),H=_(m,f,"left"),V=_(m,f,"right"),!(G=!m._anchorAxis||a!==m._mainSubplot)||"allticks"!==m.mirror&&"all"!==m.mirror||(m._linepositions[a]=[H,V]),ae=re(m,ee,te),G&&m.showline&&("all"===m.mirror||"allticks"===m.mirror)&&(ae+=ee(H)+ee(V)),s.ylines.style("stroke-width",m._lw+"px").call(l.stroke,m.showline?m.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",ae)}return p.makeClipPaths(e),i.previousPromises(e)}function k(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||"all"===e.mirror||"allticks"===e.mirror)}function M(e,t,r){if(!r.showline||!r._lw)return!1;if("all"===r.mirror||"allticks"===r.mirror)return!0;var n=r._anchorAxis;if(!n)return!1;var a=h.FROM_BL[t];return r.side===t?n.domain[a]===e.domain[a]:r.mirror&&n.domain[1-a]===e.domain[1-a]}function T(e,t,r,n){if(M(e,t,r))return r._lw;for(var a=0;a<n.length;a++){var i=n[a];if(i._mainAxis===r._mainAxis&&M(e,t,i))return i._lw}return 0}function C(e,t){var r=e.title,n=e._size,a=0;switch(t===y?a=r.pad.l:t===_&&(a=-r.pad.r),r.xref){case"paper":return n.l+n.w*r.x+a;case"container":default:return e.width*r.x+a}}function S(e,t){var r=e.title,n=e._size,a=0;if("0em"!==t&&t?t===h.CAP_SHIFT+"em"&&(a=r.pad.t):a=-r.pad.b,"auto"===r.y)return n.t/2;switch(r.yref){case"paper":return n.t+n.h-n.h*r.y+a;case"container":default:return e.height-e.height*r.y+a}}r.layoutStyles=function(e){return o.syncOrAsync([i.doAutoMargin,w],e)},r.drawMainTitle=function(e){var t=e._fullLayout,r=function(e){var t=e.title,r=b;return o.isRightAnchor(t)?r=_:o.isLeftAnchor(t)&&(r=y),r}(t),n=function(e){var t=e.title,r="0em";return o.isTopAnchor(t)?r=h.CAP_SHIFT+"em":o.isMiddleAnchor(t)&&(r=h.MID_SHIFT+"em"),r}(t);u.draw(e,"gtitle",{propContainer:t,propName:"title.text",placeholder:t._dfltTitle.plot,attributes:{x:C(t,r),y:S(t,n),"text-anchor":r,dy:n}})},r.doTraceStyle=function(e){var t,n=e.calcdata,o=[];for(t=0;t<n.length;t++){var l=n[t],c=l[0]||{},u=c.trace||{},d=u._module||{},p=d.arraysToCalcdata;p&&p(l,u);var h=d.editStyle;h&&o.push({fn:h,cd0:c})}if(o.length){for(t=0;t<o.length;t++){var f=o[t];f.fn(e,f.cd0)}s(e),r.redrawReglTraces(e)}return i.style(e),a.getComponentMethod("legend","draw")(e),i.previousPromises(e)},r.doColorBars=function(e){return a.getComponentMethod("colorbar","draw")(e),i.previousPromises(e)},r.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,a.call("plot",e,"",t)},r.doLegend=function(e){return a.getComponentMethod("legend","draw")(e),i.previousPromises(e)},r.doTicksRelayout=function(e){return p.draw(e,"redraw"),e._fullLayout._hasOnlyLargeSploms&&(a.subplotsRegistry.splom.updateGrid(e),s(e),r.redrawReglTraces(e)),r.drawMainTitle(e),i.previousPromises(e)},r.doModeBar=function(e){var t=e._fullLayout;d.manage(e);for(var r=0;r<t._basePlotModules.length;r++){var n=t._basePlotModules[r].updateFx;n&&n(e)}return i.previousPromises(e)},r.doCamera=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,n=0;n<r.length;n++){var a=t[r[n]];a._scene.setViewport(a)}},r.drawData=function(e){var t=e._fullLayout;s(e);for(var n=t._basePlotModules,o=0;o<n.length;o++)n[o].plot(e);return r.redrawReglTraces(e),i.style(e),a.getComponentMethod("shapes","draw")(e),a.getComponentMethod("annotations","draw")(e),a.getComponentMethod("images","draw")(e),t._replotting=!1,i.previousPromises(e)},r.redrawReglTraces=function(e){var t=e._fullLayout;if(t._has("regl")){var r,n,a=e._fullData,i=[],s=[];for(t._hasOnlyLargeSploms&&t._splomGrid.draw(),r=0;r<a.length;r++){var l=a[r];!0===l.visible&&0!==l._length&&("splom"===l.type?t._splomScenes[l.uid].draw():"scattergl"===l.type?o.pushUnique(i,l.xaxis+l.yaxis):"scatterpolargl"===l.type&&o.pushUnique(s,l.subplot))}for(r=0;r<i.length;r++)(n=t._plots[i[r]])._scene&&n._scene.draw();for(r=0;r<s.length;r++)(n=t[s[r]]._subplot)._scene&&n._scene.draw()}},r.doAutoRangeAndConstraints=function(e){for(var t,r,n=e._fullLayout,a=p.list(e,"",!0),i=n._axisMatchGroups||[],s=0;s<a.length;s++)t=a[s],g(e,t),v(e,t);m(e);e:for(var l=0;l<i.length;l++){var c,u=i[l],d=null;for(c in u){if(!1===(t=p.getFromId(e,c)).autorange)continue e;r=o.simpleMap(t.range,t.r2l),d?d[0]<d[1]?(d[0]=Math.min(d[0],r[0]),d[1]=Math.max(d[1],r[1])):(d[0]=Math.max(d[0],r[0]),d[1]=Math.min(d[1],r[1])):d=r}for(c in u)(t=p.getFromId(e,c)).range=o.simpleMap(d,t.l2r),t._input.range=t.range.slice(),t.setScale()}},r.finalDraw=function(e){a.getComponentMethod("rangeslider","draw")(e),a.getComponentMethod("rangeselector","draw")(e)},r.drawMarginPushers=function(e){a.getComponentMethod("legend","draw")(e),a.getComponentMethod("rangeselector","draw")(e),a.getComponentMethod("sliders","draw")(e),a.getComponentMethod("updatemenus","draw")(e),a.getComponentMethod("colorbar","draw")(e)}},{"../components/color":591,"../components/drawing":612,"../components/modebar":649,"../components/titles":678,"../constants/alignment":685,"../lib":716,"../lib/clear_gl_canvases":701,"../plots/cartesian/autorange":763,"../plots/cartesian/axes":764,"../plots/cartesian/constraints":771,"../plots/plots":825,"../registry":845,d3:164}],756:[function(e,t,r){"use strict";var n=e("../lib"),a=n.isPlainObject,i=e("./plot_schema"),o=e("../plots/plots"),s=e("../plots/attributes"),l=e("./plot_template"),c=e("./plot_config").dfltConfig;function u(e,t){e=n.extendDeep({},e);var r,i,o=Object.keys(e).sort();function s(t,r,n){if(a(r)&&a(t))u(t,r);else if(Array.isArray(r)&&Array.isArray(t)){var o=l.arrayTemplater({_template:e},n);for(i=0;i<r.length;i++){var s=r[i],c=o.newItem(s)._template;c&&u(c,s)}var d=o.defaultItems();for(i=0;i<d.length;i++)r.push(d[i]._template);for(i=0;i<r.length;i++)delete r[i].templateitemname}}for(r=0;r<o.length;r++){var c=o[r],p=e[c];if(c in t?s(p,t[c],c):t[c]=p,d(c)===c)for(var h in t){var f=d(h);h===f||f!==c||h in e||s(p,t[h],c)}}}function d(e){return e.replace(/[0-9]+$/,"")}function p(e,t,r,i,o){var s=o&&r(o);for(var c in e){var u=e[c],h=m(e,c,i),f=m(e,c,o),g=r(f);if(!g){var v=d(c);v!==c&&(g=r(f=m(e,v,o)))}if(!(s&&s===g||!g||g._noTemplating||"data_array"===g.valType||g.arrayOk&&Array.isArray(u)))if(!g.valType&&a(u))p(u,t,r,h,f);else if(g._isLinkedToArray&&Array.isArray(u))for(var y=!1,b=0,_={},x=0;x<u.length;x++){var w=u[x];if(a(w)){var k=w.name;if(k)_[k]||(p(w,t,r,m(u,b,h),m(u,b,f)),b++,_[k]=1);else if(!y){var M=m(e,l.arrayDefaultKey(c),i),T=m(u,b,h);p(w,t,r,T,m(u,b,f));var C=n.nestedProperty(t,T);n.nestedProperty(t,M).set(C.get()),C.set(null),y=!0}}}else n.nestedProperty(t,h).set(u)}}function h(e,t){return i.getLayoutValObject(e,n.nestedProperty({},t).parts)}function f(e,t){return i.getTraceValObject(e,n.nestedProperty({},t).parts)}function m(e,t,r){return r?Array.isArray(e)?r+"["+t+"]":r+"."+t:t}function g(e){for(var t=0;t<e.length;t++)if(a(e[t]))return!0}function v(e){var t;switch(e.code){case"data":t="The template has no key data.";break;case"layout":t="The template has no key layout.";break;case"missing":t=e.path?"There are no templates for item "+e.path+" with name "+e.templateitemname:"There are no templates for trace "+e.index+", of type "+e.traceType+".";break;case"unused":t=e.path?"The template item at "+e.path+" was not used in constructing the plot.":e.dataCount?"Some of the templates of type "+e.traceType+" were not used. The template has "+e.templateCount+" traces, the data only has "+e.dataCount+" of this type.":"The template has "+e.templateCount+" traces of type "+e.traceType+" but there are none in the data.";break;case"reused":t="Some of the templates of type "+e.traceType+" were used more than once. The template has "+e.templateCount+" traces, the data has "+e.dataCount+" of this type."}return e.msg=t,e}r.makeTemplate=function(e){e=n.isPlainObject(e)?e:n.getGraphDiv(e),e=n.extendDeep({_context:c},{data:e.data,layout:e.layout}),o.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var i={data:{},layout:{}};t.forEach((function(e){var t={};p(e,t,f.bind(null,e));var r=n.coerce(e,{},s,"type"),a=i.data[r];a||(a=i.data[r]=[]),a.push(t)})),p(r,i.layout,h.bind(null,r)),delete i.layout.template;var l=r.template;if(a(l)){var d,m,g,v,y,b,_=l.layout;a(_)&&u(_,i.layout);var x=l.data;if(a(x)){for(m in i.data)if(g=x[m],Array.isArray(g)){for(b=(y=i.data[m]).length,v=g.length,d=0;d<b;d++)u(g[d%v],y[d]);for(d=b;d<v;d++)y.push(n.extendDeep({},g[d]))}for(m in x)m in i.data||(i.data[m]=n.extendDeep([],x[m]))}}return i},r.validateTemplate=function(e,t){var r=n.extendDeep({},{_context:c,data:e.data,layout:e.layout}),i=r.layout||{};a(t)||(t=i.template||{});var s=t.layout,l=t.data,u=[];r.layout=i,r.layout.template=t,o.supplyDefaults(r);var p=r._fullLayout,h=r._fullData,f={};if(a(s)?(function e(t,r){for(var n in t)if("_"!==n.charAt(0)&&a(t[n])){var i,o=d(n),s=[];for(i=0;i<r.length;i++)s.push(m(t,n,r[i])),o!==n&&s.push(m(t,o,r[i]));for(i=0;i<s.length;i++)f[s[i]]=1;e(t[n],s)}}(p,["layout"]),function e(t,r){for(var n in t)if(-1===n.indexOf("defaults")&&a(t[n])){var i=m(t,n,r);f[i]?e(t[n],i):u.push({code:"unused",path:i})}}(s,"layout")):u.push({code:"layout"}),a(l)){for(var y,b={},_=0;_<h.length;_++){var x=h[_];b[y=x.type]=(b[y]||0)+1,x._fullInput._template||u.push({code:"missing",index:x._fullInput.index,traceType:y})}for(y in l){var w=l[y].length,k=b[y]||0;w>k?u.push({code:"unused",traceType:y,templateCount:w,dataCount:k}):k>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:k})}}else u.push({code:"data"});if(function e(t,r){for(var n in t)if("_"!==n.charAt(0)){var i=t[n],o=m(t,n,r);a(i)?(Array.isArray(t)&&!1===i._template&&i.templateitemname&&u.push({code:"missing",path:o,templateitemname:i.templateitemname}),e(i,o)):Array.isArray(i)&&g(i)&&e(i,o)}}({data:h,layout:p},""),u.length)return u.map(v)}},{"../lib":716,"../plots/attributes":761,"../plots/plots":825,"./plot_config":752,"./plot_schema":753,"./plot_template":754}],757:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./plot_api"),i=e("../lib"),o=e("../snapshot/helpers"),s=e("../snapshot/tosvg"),l=e("../snapshot/svgtoimg"),c={format:{valType:"enumerated",values:["png","jpeg","webp","svg"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){var r,u,d,p;function h(e){return!(e in t)||i.validate(t[e],c[e])}if(t=t||{},i.isPlainObject(e)?(r=e.data||[],u=e.layout||{},d=e.config||{},p={}):(e=i.getGraphDiv(e),r=i.extendDeep([],e.data),u=i.extendDeep({},e.layout),d=e._context,p=e._fullLayout||{}),!h("width")&&null!==t.width||!h("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!h("format"))throw new Error("Image format is not jpeg, png, svg or webp.");var f={};function m(e,r){return i.coerce(t,f,c,e,r)}var g=m("format"),v=m("width"),y=m("height"),b=m("scale"),_=m("setBackground"),x=m("imageDataOnly"),w=document.createElement("div");w.style.position="absolute",w.style.left="-5000px",document.body.appendChild(w);var k=i.extendFlat({},u);v?k.width=v:null===t.width&&n(p.width)&&(k.width=p.width),y?k.height=y:null===t.height&&n(p.height)&&(k.height=p.height);var M=i.extendFlat({},d,{_exportedPlot:!0,staticPlot:!0,setBackground:_}),T=o.getRedrawFunc(w);function C(){return new Promise((function(e){setTimeout(e,o.getDelay(w._fullLayout))}))}function S(){return new Promise((function(e,t){var r=s(w,g,b),n=w._fullLayout.width,c=w._fullLayout.height;if(a.purge(w),document.body.removeChild(w),"svg"===g)return e(x?r:o.encodeSVG(r));var u=document.createElement("canvas");u.id=i.randstr(),l({format:g,width:n,height:c,scale:b,canvas:u,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){a.plot(w,r,k,M).then(T).then(C).then(S).then((function(t){e(function(e){return x?e.replace(o.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}},{"../lib":716,"../snapshot/helpers":849,"../snapshot/svgtoimg":851,"../snapshot/tosvg":853,"./plot_api":751,"fast-isnumeric":227}],758:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/plots"),i=e("./plot_schema"),o=e("./plot_config").dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(e,t,r,a,i,o){o=o||[];for(var d=Object.keys(e),p=0;p<d.length;p++){var h=d[p];if("transforms"!==h){var v=o.slice();v.push(h);var y=e[h],b=t[h],_=g(r,h),x="info_array"===(_||{}).valType,w="colorscale"===(_||{}).valType,k=(_||{}).items;if(m(r,h))if(s(y)&&s(b))u(y,b,_,a,i,v);else if(x&&l(y)){y.length>b.length&&a.push(f("unused",i,v.concat(b.length)));var M,T,C,S,L,A=b.length,E=Array.isArray(k);if(E&&(A=Math.min(A,k.length)),2===_.dimensions)for(T=0;T<A;T++)if(l(y[T])){y[T].length>b[T].length&&a.push(f("unused",i,v.concat(T,b[T].length)));var D=b[T].length;for(M=0;M<(E?Math.min(D,k[T].length):D);M++)C=E?k[T][M]:k,S=y[T][M],L=b[T][M],n.validate(S,C)?L!==S&&L!==+S&&a.push(f("dynamic",i,v.concat(T,M),S,L)):a.push(f("value",i,v.concat(T,M),S))}else a.push(f("array",i,v.concat(T),y[T]));else for(T=0;T<A;T++)C=E?k[T]:k,S=y[T],L=b[T],n.validate(S,C)?L!==S&&L!==+S&&a.push(f("dynamic",i,v.concat(T),S,L)):a.push(f("value",i,v.concat(T),S))}else if(_.items&&!x&&l(y)){var I,P,O=k[Object.keys(k)[0]],R=[];for(I=0;I<b.length;I++){var F=b[I]._index||I;if((P=v.slice()).push(F),s(y[F])&&s(b[I])){R.push(F);var z=y[F],N=b[I];s(z)&&!1!==z.visible&&!1===N.visible?a.push(f("invisible",i,P)):u(z,N,O,a,i,P)}}for(I=0;I<y.length;I++)(P=v.slice()).push(I),s(y[I])?-1===R.indexOf(I)&&a.push(f("unused",i,P)):a.push(f("object",i,P,y[I]))}else!s(y)&&s(b)?a.push(f("object",i,v,y)):c(y)||!c(b)||x||w?h in t?n.validate(y,_)?"enumerated"===_.valType&&(_.coerceNumber&&y!==+b||y!==b)&&a.push(f("dynamic",i,v,y,b)):a.push(f("value",i,v,y)):a.push(f("unused",i,v,y)):a.push(f("array",i,v,y));else a.push(f("schema",i,v))}}return a}function d(e,t){for(var r=e.layout.layoutAttributes,a=0;a<t.length;a++){var i=t[a],o=e.traces[i.type],s=o.layoutAttributes;s&&(i.subplot?n.extendFlat(r[o.attributes.subplot.dflt],s):n.extendFlat(r,s))}return r}t.exports=function(e,t){var r,c,p=i.get(),h=[],m={_context:n.extendFlat({},o)};l(e)?(m.data=n.extendDeep([],e),r=e):(m.data=[],r=[],h.push(f("array","data"))),s(t)?(m.layout=n.extendDeep({},t),c=t):(m.layout={},c={},arguments.length>1&&h.push(f("object","layout"))),a.supplyDefaults(m);for(var g=m._fullData,v=r.length,y=0;y<v;y++){var b=r[y],_=["data",y];if(s(b)){var x=g[y],w=x.type,k=p.traces[w].attributes;k.type={valType:"enumerated",values:[w]},!1===x.visible&&!1!==b.visible&&h.push(f("invisible",_)),u(b,x,k,h,_);var M=b.transforms,T=x.transforms;if(M){l(M)||h.push(f("array",_,["transforms"])),_.push("transforms");for(var C=0;C<M.length;C++){var S=["transforms",C],L=M[C].type;if(s(M[C])){var A=p.transforms[L]?p.transforms[L].attributes:{};A.type={valType:"enumerated",values:Object.keys(p.transforms)},u(M[C],T[C],A,h,_,S)}else h.push(f("object",_,S))}}}else h.push(f("object",_))}var E=m._fullLayout,D=d(p,g);return u(c,E,D,h,"layout"),0===h.length?void 0:h};var p={object:function(e,t){return("layout"===e&&""===t?"The layout argument":"data"===e[0]&&""===t?"Trace "+e[1]+" in the data argument":h(e)+"key "+t)+" must be linked to an object container"},array:function(e,t){return("data"===e?"The data argument":h(e)+"key "+t)+" must be linked to an array container"},schema:function(e,t){return h(e)+"key "+t+" is not part of the schema"},unused:function(e,t,r){var n=s(r)?"container":"key";return h(e)+n+" "+t+" did not get coerced"},dynamic:function(e,t,r,n){return[h(e)+"key",t,"(set to '"+r+"')","got reset to","'"+n+"'","during defaults."].join(" ")},invisible:function(e,t){return(t?h(e)+"item "+t:"Trace "+e[1])+" got defaulted to be not visible"},value:function(e,t,r){return[h(e)+"key "+t,"is set to an invalid value ("+r+")"].join(" ")}};function h(e){return l(e)?"In data trace "+e[1]+", ":"In "+e+", "}function f(e,t,r,a,i){var o,s;r=r||"",l(t)?(o=t[0],s=t[1]):(o=t,s=null);var c=function(e){if(!l(e))return String(e);for(var t="",r=0;r<e.length;r++){var n=e[r];"number"==typeof n?t=t.substr(0,t.length-1)+"["+n+"]":t+=n,r<e.length-1&&(t+=".")}return t}(r),u=p[e](t,c,a,i);return n.log(u),{code:e,container:o,trace:s,path:r,astr:c,msg:u}}function m(e,t){var r=y(t),n=r.keyMinusId,a=r.id;return!!(n in e&&e[n]._isSubplotObj&&a)||t in e}function g(e,t){return t in e?e[t]:e[y(t).keyMinusId]}var v=n.counterRegex("([a-z]+)");function y(e){var t=e.match(v);return{keyMinusId:t&&t[1],id:t&&t[2]}}},{"../lib":716,"../plots/plots":825,"./plot_config":752,"./plot_schema":753}],759:[function(e,t,r){"use strict";t.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},{}],760:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/plot_template");t.exports=function(e,t,r){var i,o,s=r.name,l=r.inclusionAttr||"visible",c=t[s],u=n.isArrayOrTypedArray(e[s])?e[s]:[],d=t[s]=[],p=a.arrayTemplater(t,s,l);for(i=0;i<u.length;i++){var h=u[i];n.isPlainObject(h)?o=p.newItem(h):(o=p.newItem({}))[l]=!1,o._index=i,!1!==o[l]&&r.handleItemDefaults(h,o,t,r),d.push(o)}var f=p.defaultItems();for(i=0;i<f.length;i++)(o=f[i])._index=d.length,r.handleItemDefaults({},o,t,r,{}),d.push(o);if(n.isArrayOrTypedArray(c)){var m=Math.min(c.length,d.length);for(i=0;i<m;i++)n.relinkPrivateKeys(d[i],c[i])}return d}},{"../lib":716,"../plot_api/plot_template":754}],761:[function(e,t,r){"use strict";var n=e("../components/fx/attributes");t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:n.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},{"../components/fx/attributes":621}],762:[function(e,t,r){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],763:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").FP_SAFE,o=e("../../registry");function s(e,t){var r,n,i=[],o=l(t),s=c(e,t),u=s.min,d=s.max;if(0===u.length||0===d.length)return a.simpleMap(t.range,t.r2l);var p=u[0].val,h=d[0].val;for(r=1;r<u.length&&p===h;r++)p=Math.min(p,u[r].val);for(r=1;r<d.length&&p===h;r++)h=Math.max(h,d[r].val);var f=!1;if(t.range){var m=a.simpleMap(t.range,t.r2l);f=m[1]<m[0]}"reversed"===t.autorange&&(f=!0,t.autorange=!0);var g,v,y,b,_,x,w=t.rangemode,k="tozero"===w,M="nonnegative"===w,T=t._length,C=T/10,S=0;for(r=0;r<u.length;r++)for(g=u[r],n=0;n<d.length;n++)(x=(v=d[n]).val-g.val)>0&&((_=T-o(g)-o(v))>C?x/_>S&&(y=g,b=v,S=x/_):x/T>S&&(y={val:g.val,pad:0},b={val:v.val,pad:0},S=x/T));if(p===h){var L=p-1,A=p+1;if(k)if(0===p)i=[0,1];else{var E=(p>0?d:u).reduce((function(e,t){return Math.max(e,o(t))}),0),D=p/(1-Math.min(.5,E/T));i=p>0?[0,D]:[D,0]}else i=M?[Math.max(0,L),Math.max(1,A)]:[L,A]}else k?(y.val>=0&&(y={val:0,pad:0}),b.val<=0&&(b={val:0,pad:0})):M&&(y.val-S*o(y)<0&&(y={val:0,pad:0}),b.val<=0&&(b={val:1,pad:0})),S=(b.val-y.val)/(T-o(y)-o(b)),i=[y.val-S*o(y),b.val+S*o(b)];return f&&i.reverse(),a.simpleMap(i,t.l2r||Number)}function l(e){var t=e._length/20;return"domain"===e.constrain&&e._inputDomain&&(t*=(e._inputDomain[1]-e._inputDomain[0])/(e.domain[1]-e.domain[0])),function(e){return e.pad+(e.extrapad?t:0)}}function c(e,t){var r,n,a,i=t._id,o=e._fullData,s=e._fullLayout,l=[],c=[];function p(e,t){for(r=0;r<t.length;r++){var o=e[t[r]],s=(o._extremes||{})[i];if(!0===o.visible&&s){for(n=0;n<s.min.length;n++)a=s.min[n],u(l,a.val,a.pad,{extrapad:a.extrapad});for(n=0;n<s.max.length;n++)a=s.max[n],d(c,a.val,a.pad,{extrapad:a.extrapad})}}}return p(o,t._traceIndices),p(s.annotations||[],t._annIndices||[]),p(s.shapes||[],t._shapeIndices||[]),{min:l,max:c}}function u(e,t,r,n){p(e,t,r,n,f)}function d(e,t,r,n){p(e,t,r,n,m)}function p(e,t,r,n,a){for(var i=n.tozero,o=n.extrapad,s=!0,l=0;l<e.length&&s;l++){var c=e[l];if(a(c.val,t)&&c.pad>=r&&(c.extrapad||!o)){s=!1;break}a(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=i&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function h(e){return n(e)&&Math.abs(e)<i}function f(e,t){return e<=t}function m(e,t){return e>=t}t.exports={getAutoRange:s,makePadFn:l,doAutoRange:function(e,t){if(t.setScale(),t.autorange){t.range=s(e,t),t._r=t.range.slice(),t._rl=a.simpleMap(t._r,t.r2l);var r=t._input,n={};n[t._attr+".range"]=t.range,n[t._attr+".autorange"]=t.autorange,o.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,n),r.range=t.range.slice(),r.autorange=t.autorange}var i=t._anchorAxis;if(i&&i.rangeslider){var l=i.rangeslider[t._name];l&&"auto"===l.rangemode&&(l.range=s(e,t)),i._input.rangeslider[t._name]=a.extendFlat({},l)}},findExtremes:function(e,t,r){r||(r={}),e._m||e.setScale();var a,o,s,l,c,p,f,m,g,v=[],y=[],b=t.length,_=r.padded||!1,x=r.tozero&&("linear"===e.type||"-"===e.type),w="log"===e.type,k=!1,M=r.vpadLinearized||!1;function T(e){if(Array.isArray(e))return k=!0,function(t){return Math.max(Number(e[t]||0),0)};var t=Math.max(Number(e||0),0);return function(){return t}}var C=T((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),L=T(r.vpadplus||r.vpad),A=T(r.vpadminus||r.vpad);if(!k){if(m=1/0,g=-1/0,w)for(a=0;a<b;a++)(o=t[a])<m&&o>0&&(m=o),o>g&&o<i&&(g=o);else for(a=0;a<b;a++)(o=t[a])<m&&o>-i&&(m=o),o>g&&o<i&&(g=o);t=[m,g],b=2}var E={tozero:x,extrapad:_};function D(r){s=t[r],n(s)&&(p=C(r),f=S(r),M?(l=e.c2l(s)-A(r),c=e.c2l(s)+L(r)):(m=s-A(r),g=s+L(r),w&&m<g/10&&(m=g/10),l=e.c2l(m),c=e.c2l(g)),x&&(l=Math.min(0,l),c=Math.max(0,c)),h(l)&&u(v,l,f,E),h(c)&&d(y,c,p,E))}var I=Math.min(6,b);for(a=0;a<I;a++)D(a);for(a=b-1;a>=I;a--)D(a);return{min:v,max:y,opts:r}},concatExtremes:c}},{"../../constants/numerical":692,"../../lib":716,"../../registry":845,"fast-isnumeric":227}],764:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../../plots/plots"),o=e("../../registry"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../../components/titles"),u=e("../../components/color"),d=e("../../components/drawing"),p=e("./layout_attributes"),h=e("./clean_ticks"),f=e("../../constants/numerical"),m=f.ONEAVGYEAR,g=f.ONEAVGMONTH,v=f.ONEDAY,y=f.ONEHOUR,b=f.ONEMIN,_=f.ONESEC,x=f.MINUS_SIGN,w=f.BADNUM,k=e("../../constants/alignment"),M=k.MID_SHIFT,T=k.CAP_SHIFT,C=k.LINE_SPACING,S=k.OPPOSITE_SIDE,L=t.exports={};L.setConvert=e("./set_convert");var A=e("./axis_autotype"),E=e("./axis_ids");L.id2name=E.id2name,L.name2id=E.name2id,L.cleanId=E.cleanId,L.list=E.list,L.listIds=E.listIds,L.getFromId=E.getFromId,L.getFromTrace=E.getFromTrace;var D=e("./autorange");L.getAutoRange=D.getAutoRange,L.findExtremes=D.findExtremes,L.coerceRef=function(e,t,r,n,a,i){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return a||(a=l[0]||i),i||(i=a),u[c]={valType:"enumerated",values:l.concat(i?[i]:[]),dflt:a},s.coerce(e,t,u,c)},L.coercePosition=function(e,t,r,n,a,i){var o,l;if("paper"===n||"pixel"===n)o=s.ensureNumber,l=r(a,i);else{var c=L.getFromId(t,n);l=r(a,i=c.fraction2r(i)),o=c.cleanPos}e[a]=o(l)},L.cleanPosition=function(e,t,r){return("paper"===r||"pixel"===r?s.ensureNumber:L.getFromId(t,r).cleanPos)(e)},L.redrawComponents=function(e,t){t=t||L.listIds(e);var r=e._fullLayout;function n(n,a,i,s){for(var l=o.getComponentMethod(n,a),c={},u=0;u<t.length;u++)for(var d=r[L.id2name(t[u])][i],p=0;p<d.length;p++){var h=d[p];if(!c[h]&&(l(e,h),c[h]=1,s))return}}n("annotations","drawOne","_annIndices"),n("shapes","drawOne","_shapeIndices"),n("images","draw","_imgIndices",!0)};var I=L.getDataConversions=function(e,t,r,n){var a,i="x"===r||"y"===r||"z"===r?r:n;if(Array.isArray(i)){if(a={type:A(n),_categories:[]},L.setConvert(a),"category"===a.type)for(var o=0;o<n.length;o++)a.d2c(n[o])}else a=L.getFromTrace(e,t,i);return a?{d2c:a.d2c,c2d:a.c2d}:"ids"===i?{d2c:O,c2d:O}:{d2c:P,c2d:P}};function P(e){return+e}function O(e){return String(e)}L.getDataToCoordFunc=function(e,t,r,n){return I(e,t,r,n).d2c},L.counterLetter=function(e){var t=e.charAt(0);return"x"===t?"y":"y"===t?"x":void 0},L.minDtick=function(e,t,r,n){-1===["log","category","multicategory"].indexOf(e.type)&&n?void 0===e._minDtick?(e._minDtick=t,e._forceTick0=r):e._minDtick&&((e._minDtick/t+1e-6)%1<2e-6&&((r-e._forceTick0)/t%1+1.000001)%1<2e-6?(e._minDtick=t,e._forceTick0=r):((t/e._minDtick+1e-6)%1>2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},L.saveRangeInitial=function(e,t){for(var r=L.list(e,"",!0),n=!1,a=0;a<r.length;a++){var i=r[a],o=void 0===i._rangeInitial,s=o||!(i.range[0]===i._rangeInitial[0]&&i.range[1]===i._rangeInitial[1]);(o&&!1===i.autorange||t&&s)&&(i._rangeInitial=i.range.slice(),n=!0)}return n},L.saveShowSpikeInitial=function(e,t){for(var r=L.list(e,"",!0),n=!1,a="on",i=0;i<r.length;i++){var o=r[i],s=void 0===o._showSpikeInitial,l=s||!(o.showspikes===o._showspikes);(s||t&&l)&&(o._showSpikeInitial=o.showspikes,n=!0),"on"!==a||o.showspikes||(a="off")}return e._fullLayout._cartesianSpikesEnabled=a,n},L.autoBin=function(e,t,r,n,i,o){var l,c=s.aggNums(Math.min,null,e),u=s.aggNums(Math.max,null,e);if("category"===t.type||"multicategory"===t.type)return{start:c-.5,end:u+.5,size:Math.max(1,Math.round(o)||1),_dataSpan:u-c};if(i||(i=t.calendar),l="log"===t.type?{type:"linear",range:[c,u]}:{type:t.type,range:s.simpleMap([c,u],t.c2r,0,i),calendar:i},L.setConvert(l),o=o&&h.dtick(o,l.type))l.dtick=o,l.tick0=h.tick0(void 0,l.type,i);else{var d;if(r)d=(u-c)/r;else{var p=s.distinctVals(e),f=Math.pow(10,Math.floor(Math.log(p.minDiff)/Math.LN10)),m=f*s.roundUp(p.minDiff/f,[.9,1.9,4.9,9.9],!0);d=Math.max(m,2*s.stdev(e)/Math.pow(e.length,n?.25:.4)),a(d)||(d=1)}L.autoTicks(l,d)}var g,y=l.dtick,b=L.tickIncrement(L.tickFirst(l),y,"reverse",i);if("number"==typeof y)g=(b=function(e,t,r,n,i){var o=0,s=0,l=0,c=0;function u(t){return(1+100*(t-e)/r.dtick)%100<2}for(var d=0;d<t.length;d++)t[d]%1==0?l++:a(t[d])||c++,u(t[d])&&o++,u(t[d]+r.dtick/2)&&s++;var p=t.length-c;if(l===p&&"date"!==r.type)r.dtick<1?e=n-.5*r.dtick:(e-=.5)+r.dtick<n&&(e+=r.dtick);else if(s<.1*p&&(o>.3*p||u(n)||u(i))){var h=r.dtick/2;e+=e+h<n?h:-h}return e}(b,e,l,c,u))+(1+Math.floor((u-b)/y))*y;else for("M"===l.dtick.charAt(0)&&(b=function(e,t,r,n,a){var i=s.findExactDates(t,a);if(i.exactDays>.8){var o=Number(r.substr(1));i.exactYears>.8&&o%12==0?e=L.tickIncrement(e,"M6","reverse")+1.5*v:i.exactMonths>.8?e=L.tickIncrement(e,"M1","reverse")+15.5*v:e-=v/2;var l=L.tickIncrement(e,r);if(l<=n)return l}return e}(b,e,y,c,i)),g=b;g<=u;)g=L.tickIncrement(g,y,!1,i);return{start:t.c2r(b,0,i),end:t.c2r(g,0,i),size:y,_dataSpan:u-c}},L.prepTicks=function(e){var t=s.simpleMap(e.range,e.r2l);if("auto"===e.tickmode||!e.dtick){var r,n=e.nticks;n||("category"===e.type||"multicategory"===e.type?(r=e.tickfont?1.2*(e.tickfont.size||12):15,n=e._length/r):(r="y"===e._id.charAt(0)?40:80,n=s.constrain(e._length/r,4,9)+1),"radialaxis"===e._name&&(n*=2)),"array"===e.tickmode&&(n*=100),L.autoTicks(e,Math.abs(t[1]-t[0])/n),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}e.tick0||(e.tick0="date"===e.type?"2000-01-01":0),"date"===e.type&&e.dtick<.1&&(e.dtick=.1),V(e)},L.calcTicks=function(e){L.prepTicks(e);var t=s.simpleMap(e.range,e.r2l);if("array"===e.tickmode)return function(e){var t=e.tickvals,r=e.ticktext,n=new Array(t.length),a=s.simpleMap(e.range,e.r2l),i=1.0001*a[0]-1e-4*a[1],o=1.0001*a[1]-1e-4*a[0],l=Math.min(i,o),c=Math.max(i,o),u=0;Array.isArray(r)||(r=[]);var d="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var p=0;p<t.length;p++){var h=d(t[p]);h>l&&h<c&&(void 0===r[p]?n[u]=L.tickText(e,h):n[u]=U(e,h,String(r[p])),u++)}return u<t.length&&n.splice(u,t.length-u),n}(e);e._tmin=L.tickFirst(e);var r=1.0001*t[0]-1e-4*t[1],n=1.0001*t[1]-1e-4*t[0],i=t[1]<t[0];if(e._tmin<r!==i)return[];var o=[];"category"!==e.type&&"multicategory"!==e.type||(n=i?Math.max(-.5,n):Math.min(e._categories.length-.5,n));for(var l="log"===e.type&&!(a(e.dtick)||"L"===e.dtick.charAt(0)),c=null,u=Math.max(1e3,e._length||0),d=e._tmin;(i?d>=n:d<=n)&&!(o.length>u||d===c);d=L.tickIncrement(d,e.dtick,i,e.calendar)){c=d;var p=!1;l&&d!==(0|d)&&(p=!0),o.push({minor:p,value:d})}oe(e)&&360===Math.abs(t[1]-t[0])&&o.pop(),e._tmax=(o[o.length-1]||{}).value,e._prevDateHead="",e._inCalcTicks=!0;for(var h=new Array(o.length),f=0;f<o.length;f++)h[f]=L.tickText(e,o[f].value,!1,o[f].minor);return e._inCalcTicks=!1,h};var R=[2,5,10],F=[1,2,3,6,12],z=[1,2,5,10,15,30],N=[1,2,3,7,14],j=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],B=[-.301,0,.301,.699,1],Y=[15,30,45,90,180];function H(e,t,r){return t*s.roundUp(e/t,r)}function V(e){var t=e.dtick;if(e._tickexponent=0,a(t)||"string"==typeof t||(t=1),"category"!==e.type&&"multicategory"!==e.type||(e._tickround=null),"date"===e.type){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),i=n.length;if("M"===String(t).charAt(0))i>10||"01-01"!==n.substr(5)?e._tickround="d":e._tickround=+t.substr(1)%12==0?"y":"m";else if(t>=v&&i<=10||t>=15*v)e._tickround="d";else if(t>=b&&i<=16||t>=y)e._tickround="M";else if(t>=_&&i<=19||t>=b)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,o)-20,e._tickround<0&&(e._tickround=4)}}else if(a(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);a(t)||(t=Number(t.substr(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01);Math.abs(c)>3&&(G(e.exponentformat)&&!q(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function U(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}L.autoTicks=function(e,t){var r;function n(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=s.dateTick0(e.calendar);var i=2*t;i>m?(t/=m,r=n(10),e.dtick="M"+12*H(t,r,R)):i>g?(t/=g,e.dtick="M"+H(t,1,F)):i>v?(e.dtick=H(t,v,N),e.tick0=s.dateTick0(e.calendar,!0)):i>y?e.dtick=H(t,y,F):i>b?e.dtick=H(t,b,z):i>_?e.dtick=H(t,_,z):(r=n(10),e.dtick=H(t,r,R))}else if("log"===e.type){e.tick0=0;var o=s.simpleMap(e.range,e.r2l);if(t>.7)e.dtick=Math.ceil(t);else if(Math.abs(o[1]-o[0])<1){var l=1.5*Math.abs((o[1]-o[0])/t);t=Math.abs(Math.pow(10,o[1])-Math.pow(10,o[0]))/l,r=n(10),e.dtick="L"+H(t,r,R)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):oe(e)?(e.tick0=0,r=1,e.dtick=H(t,r,Y)):(e.tick0=0,r=n(10),e.dtick=H(t,r,R));if(0===e.dtick&&(e.dtick=1),!a(e.dtick)&&"string"!=typeof e.dtick){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}},L.tickIncrement=function(e,t,r,i){var o=r?-1:1;if(a(t))return e+o*t;var l=t.charAt(0),c=o*Number(t.substr(1));if("M"===l)return s.incrementMonth(e,c,i);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?B:j,d=e+.01*o,p=s.roundUp(s.mod(d,1),u,r);return Math.floor(d)+Math.log(n.round(Math.pow(10,p),1))/Math.LN10}throw"unrecognized dtick "+String(t)},L.tickFirst=function(e){var t=e.r2l||Number,r=s.simpleMap(e.range,t),i=r[1]<r[0],o=i?Math.floor:Math.ceil,l=1.0001*r[0]-1e-4*r[1],c=e.dtick,u=t(e.tick0);if(a(c)){var d=o((l-u)/c)*c+u;return"category"!==e.type&&"multicategory"!==e.type||(d=s.constrain(d,0,e._categories.length-1)),d}var p=c.charAt(0),h=Number(c.substr(1));if("M"===p){for(var f,m,g,v=0,y=u;v<10;){if(((f=L.tickIncrement(y,c,i,e.calendar))-l)*(y-l)<=0)return i?Math.min(y,f):Math.max(y,f);m=(l-(y+f)/2)/(f-y),g=p+(Math.abs(Math.round(m))||1)*h,y=L.tickIncrement(y,g,m<0?!i:i,e.calendar),v++}return s.error("tickFirst did not converge",e),y}if("L"===p)return Math.log(o((Math.pow(10,l)-u)/h)*h+u)/Math.LN10;if("D"===p){var b="D2"===c?B:j,_=s.roundUp(s.mod(l,1),b,i);return Math.floor(l)+Math.log(n.round(Math.pow(10,_),1))/Math.LN10}throw"unrecognized dtick "+String(c)},L.tickText=function(e,t,r,n){var i,o=U(e,t),l="array"===e.tickmode,c=r||l,u=e.type,d="category"===u?e.d2l_noadd:e.d2l;if(l&&Array.isArray(e.ticktext)){var p=s.simpleMap(e.range,e.r2l),h=Math.abs(p[1]-p[0])/1e4;for(i=0;i<e.ticktext.length&&!(Math.abs(t-d(e.tickvals[i]))<h);i++);if(i<e.ticktext.length)return o.text=String(e.ticktext[i]),o}function f(n){if(void 0===n)return!0;if(r)return"none"===n;var a={first:e._tmin,last:e._tmax}[n];return"all"!==n&&t!==a}var m=r?"never":"none"!==e.exponentformat&&f(e.showexponent)?"hide":"";if("date"===u?function(e,t,r,n){var i=e._tickround,o=r&&e.hoverformat||L.getTickFormat(e);n&&(i=a(i)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[i]);var l,c=s.formatDate(t.x,o,i,e._dateFormat,e.calendar,e._extraFormat),u=c.indexOf("\n");-1!==u&&(l=c.substr(u+1),c=c.substr(0,u)),n&&("00:00:00"===c||"00:00"===c?(c=l,l=""):8===c.length&&(c=c.replace(/:00$/,""))),l&&(r?"d"===i?c+=", "+l:c=l+(c?", "+c:""):e._inCalcTicks&&l===e._prevDateHead||(c+="<br>"+l,e._prevDateHead=l)),t.text=c}(e,o,r,c):"log"===u?function(e,t,r,n,i){var o=e.dtick,l=t.x,c=e.tickformat,u="string"==typeof o&&o.charAt(0);if("never"===i&&(i=""),n&&"L"!==u&&(o="L3",u="L"),c||"L"===u)t.text=K(Math.pow(10,l),e,i,n);else if(a(o)||"D"===u&&s.mod(l+.01,1)<.1){var d=Math.round(l),p=Math.abs(d),h=e.exponentformat;"power"===h||G(h)&&q(d)?(t.text=0===d?1:1===d?"10":"10<sup>"+(d>1?"":x)+p+"</sup>",t.fontSize*=1.25):("e"===h||"E"===h)&&p>2?t.text="1"+h+(d>0?"+":x)+p:(t.text=K(Math.pow(10,l),e,"","fakehover"),"D1"===o&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);t.text=String(Math.round(Math.pow(10,s.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var f=String(t.text).charAt(0);"0"!==f&&"1"!==f||("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,o,0,c,m):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,o):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}(e,o,r):oe(e)?function(e,t,r,n,a){if("radians"!==e.thetaunit||r)t.text=K(t.x,e,a,n);else{var i=t.x/180;if(0===i)t.text="0";else{var o=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,a=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/a),Math.round(r/a)]}(i);if(o[1]>=100)t.text=K(s.deg2rad(t.x),e,a,n);else{var l=t.x<0;1===o[1]?1===o[0]?t.text="π":t.text=o[0]+"π":t.text=["<sup>",o[0],"</sup>","⁄","<sub>",o[1],"</sub>","π"].join(""),l&&(t.text=x+t.text)}}}}(e,o,r,c,m):function(e,t,r,n,a){"never"===a?a="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=K(t.x,e,a,n)}(e,o,0,c,m),n||(e.tickprefix&&!f(e.showtickprefix)&&(o.text=e.tickprefix+o.text),e.ticksuffix&&!f(e.showticksuffix)&&(o.text+=e.ticksuffix)),"boundaries"===e.tickson||e.showdividers){var g=function(t){var r=e.l2p(t);return r>=0&&r<=e._length?t:null};o.xbnd=[g(o.x-.5),g(o.x+e.dtick-.5)]}return o},L.hoverLabelText=function(e,t,r){if(r!==w&&r!==t)return L.hoverLabelText(e,t)+" - "+L.hoverLabelText(e,r);var n="log"===e.type&&t<=0,a=L.tickText(e,e.c2l(n?-t:t),"hover").text;return n?0===t?"0":x+a:a};var W=["f","p","n","μ","m","","k","M","G","T"];function G(e){return"SI"===e||"B"===e}function q(e){return e>14||e<-15}function K(e,t,r,n){var i=e<0,o=t._tickround,l=r||t.exponentformat||"B",c=t._tickexponent,u=L.getTickFormat(t),d=t.separatethousands;if(n){var p={exponentformat:l,dtick:"none"===t.showexponent?t.dtick:a(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};V(p),o=(Number(p._tickround)||0)+4,c=p._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,x);var h,f=Math.pow(10,-o)/2;if("none"===l&&(c=0),(e=Math.abs(e))<f)e="0",i=!1;else{if(e+=f,c&&(e*=Math.pow(10,-c),o+=c),0===o)e=String(Math.floor(e));else if(o<0){e=(e=String(Math.round(e))).substr(0,e.length+o);for(var m=o;m<0;m++)e+="0"}else{var g=(e=String(e)).indexOf(".")+1;g&&(e=e.substr(0,g+o).replace(/\.?0+$/,""))}e=s.numSeparate(e,t._separators,d)}return c&&"hide"!==l&&(G(l)&&q(c)&&(l="power"),h=c<0?x+-c:"power"!==l?"+"+c:String(c),"e"===l||"E"===l?e+=l+h:"power"===l?e+="×10<sup>"+h+"</sup>":"B"===l&&9===c?e+="B":G(l)&&(e+=W[c/3+5])),i?x+e:e}function X(e,t){for(var r=[],n={},a=0;a<t.length;a++){var i=t[a];n[i.text2]?n[i.text2].push(i.x):n[i.text2]=[i.x]}for(var o in n)r.push(U(e,s.interp(n[o],.5),o));return r}function Z(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function J(e){var t=e.title.font.size,r=(e.title.text.match(l.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?r?t*(T+r*C):t*T:r?t*(r+1)*C:t}function $(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function Q(e){var t=n.select(e),r=t.select(".text-math-group");return r.empty()?t.select("text"):r}function ee(e){return e._id+".automargin"}function te(e){return ee(e)+".mirror"}function re(e){return e._id+".rangeslider"}function ne(e,t){for(var r=0;r<t.length;r++)-1===e.indexOf(t[r])&&e.push(t[r])}function ae(e,t,r){var n,a,i=[],o=[],l=e.layout;for(n=0;n<t.length;n++)i.push(L.getFromId(e,t[n]));for(n=0;n<r.length;n++)o.push(L.getFromId(e,r[n]));var c=Object.keys(p),u=["anchor","domain","overlaying","position","side","tickangle","editType"],d=["linear","log"];for(n=0;n<c.length;n++){var h=c[n],f=i[0][h],m=o[0][h],g=!0,v=!1,y=!1;if("_"!==h.charAt(0)&&"function"!=typeof f&&-1===u.indexOf(h)){for(a=1;a<i.length&&g;a++){var b=i[a][h];"type"===h&&-1!==d.indexOf(f)&&-1!==d.indexOf(b)&&f!==b?v=!0:b!==f&&(g=!1)}for(a=1;a<o.length&&g;a++){var _=o[a][h];"type"===h&&-1!==d.indexOf(m)&&-1!==d.indexOf(_)&&m!==_?y=!0:o[a][h]!==m&&(g=!1)}g&&(v&&(l[i[0]._name].type="linear"),y&&(l[o[0]._name].type="linear"),ie(l,h,i,o,e._fullLayout._dfltTitle))}}for(n=0;n<e._fullLayout.annotations.length;n++){var x=e._fullLayout.annotations[n];-1!==t.indexOf(x.xref)&&-1!==r.indexOf(x.yref)&&s.swapAttrs(l.annotations[n],["?"])}}function ie(e,t,r,n,a){var i,o=s.nestedProperty,l=o(e[r[0]._name],t).get(),c=o(e[n[0]._name],t).get();for("title"===t&&(l&&l.text===a.x&&(l.text=a.y),c&&c.text===a.y&&(c.text=a.x)),i=0;i<r.length;i++)o(e,r[i]._name+"."+t).set(c);for(i=0;i<n.length;i++)o(e,n[i]._name+"."+t).set(l)}function oe(e){return"angularaxis"===e._id}L.getTickFormat=function(e){var t,r,n,a,i,o,s,l;function c(e){return"string"!=typeof e?e:Number(e.replace("M",""))*g}function u(e,t){var r=["L","D"];if(typeof e==typeof t){if("number"==typeof e)return e-t;var n=r.indexOf(e.charAt(0)),a=r.indexOf(t.charAt(0));return n===a?Number(e.replace(/(L|D)/g,""))-Number(t.replace(/(L|D)/g,"")):n-a}return"number"==typeof e?1:-1}function d(e,t){var r=null===t[0],n=null===t[1],a=u(e,t[0])>=0,i=u(e,t[1])<=0;return(r||a)&&(n||i)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t<e.tickformatstops.length;t++)if((n=e.tickformatstops[t]).enabled&&(a=e.dtick,i=n.dtickrange,o=void 0,s=void 0,l=void 0,o=c||function(e){return e},s=i[0],l=i[1],(!s&&"number"!=typeof s||o(s)<=o(a))&&(!l&&"number"!=typeof l||o(l)>=o(a)))){r=n;break}break;case"log":for(t=0;t<e.tickformatstops.length;t++)if((n=e.tickformatstops[t]).enabled&&d(e.dtick,n.dtickrange)){r=n;break}}return r?r.value:e.tickformat},L.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),a=t?L.findSubplotsWithAxis(n,t):n;return a.sort((function(e,t){var r=e.substr(1).split("y"),n=t.substr(1).split("y");return r[0]===n[0]?+r[1]-+n[1]:+r[0]-+n[0]})),a},L.findSubplotsWithAxis=function(e,t){for(var r=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),n=[],a=0;a<e.length;a++){var i=e[a];r.test(i)&&n.push(i)}return n},L.makeClipPaths=function(e){var t=e._fullLayout;if(!t._hasOnlyLargeSploms){var r,a,i={_offset:0,_length:t.width,_id:""},o={_offset:0,_length:t.height,_id:""},s=L.list(e,"x",!0),l=L.list(e,"y",!0),c=[];for(r=0;r<s.length;r++)for(c.push({x:s[r],y:o}),a=0;a<l.length;a++)0===r&&c.push({x:i,y:l[a]}),c.push({x:s[r],y:l[a]});var u=t._clips.selectAll(".axesclip").data(c,(function(e){return e.x._id+e.y._id}));u.enter().append("clipPath").classed("axesclip",!0).attr("id",(function(e){return"clip"+t._uid+e.x._id+e.y._id})).append("rect"),u.exit().remove(),u.each((function(e){n.select(this).select("rect").attr({x:e.x._offset||0,y:e.y._offset||0,width:e.x._length||1,height:e.y._length||1})}))}},L.draw=function(e,t,r){var n=e._fullLayout;"redraw"===t&&n._paper.selectAll("g.subplot").each((function(e){var t=e[0],r=n._plots[t],a=r.xaxis,i=r.yaxis;r.xaxislayer.selectAll("."+a._id+"tick").remove(),r.yaxislayer.selectAll("."+i._id+"tick").remove(),r.xaxislayer.selectAll("."+a._id+"tick2").remove(),r.yaxislayer.selectAll("."+i._id+"tick2").remove(),r.xaxislayer.selectAll("."+a._id+"divider").remove(),r.yaxislayer.selectAll("."+i._id+"divider").remove(),r.gridlayer&&r.gridlayer.selectAll("path").remove(),r.zerolinelayer&&r.zerolinelayer.selectAll("path").remove(),n._infolayer.select(".g-"+a._id+"title").remove(),n._infolayer.select(".g-"+i._id+"title").remove()}));var a=t&&"redraw"!==t?t:L.listIds(e);return s.syncOrAsync(a.map((function(t){return function(){if(t){var n=L.getFromId(e,t),a=L.drawOne(e,n,r);return n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),a}}})))},L.drawOne=function(e,t,r){var n,a,l;r=r||{},t.setScale();var p=e._fullLayout,h=t._id,f=h.charAt(0),m=L.counterLetter(h),g=t._mainLinePosition,v=t._mainMirrorPosition,y=p._plots[t._mainSubplot][f+"axislayer"],b=t._vals=L.calcTicks(t),_=[t.mirror,g,v].join("_");for(n=0;n<b.length;n++)b[n].axInfo=_;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var x={};function w(e){var r=h+(e||"tick");return x[r]||(x[r]=function(e,t){var r,n,a,i;return e._selections[t].size()?(r=1/0,n=-1/0,a=1/0,i=-1/0,e._selections[t].each((function(){var e=Q(this),t=d.bBox(e.node().parentNode);r=Math.min(r,t.top),n=Math.max(n,t.bottom),a=Math.min(a,t.left),i=Math.max(i,t.right)}))):(r=0,n=0,a=0,i=0),{top:r,bottom:n,left:a,right:i,height:n-r,width:i-a}}(t,r)),x[r]}if(t.visible){var k,M,T=L.makeTransFn(t);if("boundaries"===t.tickson){var A=function(e,t){var r,n=[],a=function(e,t){var r=e.xbnd[t];null!==r&&n.push(s.extendFlat({},e,{x:r}))};if(t.length){for(r=0;r<t.length;r++)a(t[r],0);a(t[r-1],1)}return n}(0,b);M=L.clipEnds(t,A),k="inside"===t.ticks?M:A}else M=L.clipEnds(t,b),k="inside"===t.ticks?M:b;var E=t._gridVals=M,D=function(e,t){var r,n,a=[],i=function(e,t){var r=e.xbnd[t];null!==r&&a.push(s.extendFlat({},e,{x:r}))};if(e.showdividers&&t.length){for(r=0;r<t.length;r++){var o=t[r];o.text2!==n&&i(o,0),n=o.text2}i(t[r-1],1)}return a}(t,b);if(!p._hasOnlyLargeSploms){var I=t._subplotsWith,P={};for(n=0;n<I.length;n++){a=I[n];var O=(l=p._plots[a])[m+"axis"],R=O._mainAxis._id;if(!P[R]){P[R]=1;var F="x"===f?"M0,"+O._offset+"v"+O._length:"M"+O._offset+",0h"+O._length;L.drawGrid(e,t,{vals:E,counterAxis:O,layer:l.gridlayer.select("."+h),path:F,transFn:T}),L.drawZeroLine(e,t,{counterAxis:O,layer:l.zerolinelayer,path:F,transFn:T})}}}var z=L.getTickSigns(t),N=[];if(t.ticks){var j,B,Y,H=L.makeTickPath(t,g,z[2]);if(t._anchorAxis&&t.mirror&&!0!==t.mirror?(j=L.makeTickPath(t,v,z[3]),B=H+j):(j="",B=H),t.showdividers&&"outside"===t.ticks&&"boundaries"===t.tickson){var V={};for(n=0;n<D.length;n++)V[D[n].x]=1;Y=function(e){return V[e.x]?j:B}}else Y=B;L.drawTicks(e,t,{vals:k,layer:y,path:Y,transFn:T}),"allticks"===t.mirror&&(N=Object.keys(t._linepositions||{}))}for(n=0;n<N.length;n++){a=N[n],l=p._plots[a];var U=t._linepositions[a]||[],W=L.makeTickPath(t,U[0],z[0])+L.makeTickPath(t,U[1],z[1]);L.drawTicks(e,t,{vals:k,layer:l[f+"axislayer"],path:W,transFn:T})}var G=[];if(G.push((function(){return L.drawLabels(e,t,{vals:b,layer:y,transFn:T,labelFns:L.makeLabelFns(t,g)})})),"multicategory"===t.type){var q={x:2,y:10}[f];G.push((function(){var r={x:"height",y:"width"}[f],n=w()[r]+q+(t._tickAngles[h+"tick"]?t.tickfont.size*C:0);return L.drawLabels(e,t,{vals:X(t,b),layer:y,cls:h+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:T,labelFns:L.makeLabelFns(t,g+n*z[4])})})),G.push((function(){return t._depth=z[4]*(w("tick2")[t.side]-g),function(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,Z);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(u.stroke,t.dividercolor).style("stroke-width",d.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}(e,t,{vals:D,layer:y,path:L.makeTickPath(t,g,z[4],t._depth),transFn:T})}))}else t.title.hasOwnProperty("standoff")&&G.push((function(){t._depth=z[4]*(w()[t.side]-g)}));var K=o.getComponentMethod("rangeslider","isVisible")(t);return G.push((function(){var r,n,a,s,l=t.side.charAt(0),c=S[t.side].charAt(0),u=L.getPxPosition(e,t),d="outside"===t.ticks?t.ticklen:0;if((t.automargin||K)&&("multicategory"===t.type?r=w("tick2"):(r=w(),"x"===f&&"b"===l&&(t._depth=Math.max(r.width>0?r.bottom-u:0,d)))),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var h=[0,1];if("x"===f){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?u-r.top:0,d),h.reverse()),r.width>0){var g=r.right-(t._offset+t._length);g>0&&(n.xr=1,n.r=g);var v=t._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if("l"===l?n[l]=t._depth=Math.max(r.height>0?u-r.left:0,d):(n[l]=t._depth=Math.max(r.height>0?r.right-u:0,d),h.reverse()),r.height>0){var y=r.bottom-(t._offset+t._length);y>0&&(n.yb=0,n.b=y);var b=t._offset-r.top;b>0&&(n.yt=1,n.t=b)}n[m]="free"===t.anchor?t.position:t._anchorAxis.domain[h[0]],t.title.text!==p._dfltTitle[f]&&(n[l]+=J(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(a[c]+=d),!0===t.mirror||"ticks"===t.mirror?a[m]=t._anchorAxis.domain[h[1]]:"all"!==t.mirror&&"allticks"!==t.mirror||(a[m]=[t._counterDomainMin,t._counterDomainMax][h[1]]))}K&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),i.autoMargin(e,ee(t),n),i.autoMargin(e,te(t),a),i.autoMargin(e,re(t),s)})),r.skipTitle||K&&"bottom"===t.side||G.push((function(){return function(e,t){var r,n=e._fullLayout,a=t._id,i=a.charAt(0),o=t.title.font.size;t.title.hasOwnProperty("standoff")?r=t._depth+t.title.standoff+J(t):(r="multicategory"===t.type?t._depth:10+1.5*o+(t.linewidth?t.linewidth-1:0),r+="x"===i?"top"===t.side?o*(t.showticklabels?1:0):o*(t.showticklabels?1.5:.5):"right"===t.side?o*(t.showticklabels?1:.5):o*(t.showticklabels?.5:0));var s,l,u,p,h=L.getPxPosition(e,t);if("x"===i?(l=t._offset+t._length/2,u="top"===t.side?h-r:h+r):(u=t._offset+t._length/2,l="right"===t.side?h+r:h-r,s={rotate:"-90",offset:0}),"multicategory"!==t.type){var f=t._selections[t._id+"tick"];if(p={selection:f,side:t.side},f&&f.node()&&f.node().parentNode){var m=d.getTranslate(f.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return c.draw(e,a+"title",{propContainer:t,propName:t._name+".title.text",placeholder:n._dfltTitle[i],avoid:p,transform:s,attributes:{x:l,y:u,"text-anchor":"middle"}})}(e,t)})),s.syncOrAsync(G)}},L.getTickSigns=function(e){var t=e._id.charAt(0),r={x:"top",y:"right"}[t],n=e.side===r?1:-1,a=[-1,1,n,-n];return"inside"!==e.ticks==("x"===t)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},L.makeTransFn=function(e){var t=e._id.charAt(0),r=e._offset;return"x"===t?function(t){return"translate("+(r+e.l2p(t.x))+",0)"}:function(t){return"translate(0,"+(r+e.l2p(t.x))+")"}},L.makeTickPath=function(e,t,r,n){n=void 0!==n?n:e.ticklen;var a=e._id.charAt(0),i=(e.linewidth||1)/2;return"x"===a?"M0,"+(t+i*r)+"v"+n*r:"M"+(t+i*r)+",0h"+n*r},L.makeLabelFns=function(e,t,r){var n=e._id.charAt(0),i="boundaries"!==e.tickson&&"outside"===e.ticks,o=0,l=0;if(i&&(o+=e.ticklen),r&&"outside"===e.ticks){var c=s.deg2rad(r);o=e.ticklen*Math.cos(c)+1,l=e.ticklen*Math.sin(c)}e.showticklabels&&(i||e.showline)&&(o+=.2*e.tickfont.size);var u,d,p,h,f={labelStandoff:o+=(e.linewidth||1)/2,labelShift:l};return"x"===n?(h="bottom"===e.side?1:-1,u=l*h,d=t+o*h,p="bottom"===e.side?1:-.2,f.xFn=function(e){return e.dx+u},f.yFn=function(e){return e.dy+d+e.fontSize*p},f.anchorFn=function(e,t){return a(t)&&0!==t&&180!==t?t*h<0?"end":"start":"middle"},f.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side?-n:0}):"y"===n&&(h="right"===e.side?1:-1,u=o,d=-l*h,p=90===Math.abs(e.tickangle)?.5:0,f.xFn=function(e){return e.dx+t+(u+e.fontSize*p)*h},f.yFn=function(e){return e.dy+d+e.fontSize*M},f.anchorFn=function(t,r){return a(r)&&90===Math.abs(r)?"middle":"right"===e.side?"start":"end"},f.heightFn=function(t,r,n){return(r*="left"===e.side?1:-1)<-30?-n:r<30?-.5*n:0}),f},L.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=r.layer.selectAll("path."+n).data(t.ticks?r.vals:[],Z);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(u.stroke,t.tickcolor).style("stroke-width",d.crispRound(e,t.tickwidth,1)+"px").attr("d",r.path),a.attr("transform",r.transFn)},L.drawGrid=function(e,t,r){r=r||{};var n=t._id+"grid",a=r.vals,i=r.counterAxis;if(!1===t.showgrid)a=[];else if(i&&L.shouldShowZeroLine(e,t,i))for(var o="array"===t.tickmode,s=0;s<a.length;s++){var l=a[s].x;if(o?!l:Math.abs(l)<t.dtick/100){if(a=a.slice(0,s).concat(a.slice(s+1)),!o)break;s--}}var c=r.layer.selectAll("path."+n).data(a,Z);c.exit().remove(),c.enter().append("path").classed(n,1).classed("crisp",!1!==r.crisp),t._gw=d.crispRound(e,t.gridwidth,1),c.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.gridcolor||"#ddd").style("stroke-width",t._gw+"px"),"function"==typeof r.path&&c.attr("d",r.path)},L.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=L.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return E.idSort(e.id,t.id)}))})),i.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",d.crispRound(e,t.zerolinewidth,t._gw||1)+"px")},L.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,o=t._id,c=o.charAt(0),u=r.cls||o+"tick",p=r.vals,h=r.labelFns,f=r.secondary?0:t.tickangle,m=(t._prevTickAngles||{})[u],g=r.layer.selectAll("g."+u).data(t.showticklabels?p:[],Z),v=[];function y(e,t){e.each((function(e){var i=n.select(this),o=i.select(".text-math-group"),s=h.anchorFn(e,t),c=r.transFn.call(i.node(),e)+(a(t)&&0!=+t?" rotate("+t+","+h.xFn(e)+","+(h.yFn(e)-e.fontSize/2)+")":""),u=l.lineCount(i),p=C*e.fontSize,f=h.heightFn(e,a(t)?+t:0,(u-1)*p);if(f&&(c+=" translate(0, "+f+")"),o.empty())i.select("text").attr({transform:c,"text-anchor":s});else{var m=d.bBox(o.node()).width*{end:-.5,start:.5}[s];o.attr("transform",c+(m?"translate("+m+",0)":""))}}))}g.enter().append("g").classed(u,1).append("text").attr("text-anchor","middle").each((function(t){var r=n.select(this),a=e._promises.length;r.call(l.positionText,h.xFn(t),h.yFn(t)).call(d.font,t.font,t.fontSize,t.fontColor).text(t.text).call(l.convertToTspans,e),e._promises[a]?v.push(e._promises.pop().then((function(){y(r,f)}))):y(r,f)})),g.exit().remove(),r.repositionOnUpdate&&g.each((function(e){n.select(this).select("text").call(l.positionText,h.xFn(e),h.yFn(e))})),y(g,m+1?m:f);var b=null;t._selections&&(t._selections[u]=g);var _=[function(){return v.length&&Promise.all(v)}];t.automargin&&i._redrawFromAutoMarginCount&&90===m?(b=90,_.push((function(){y(g,m)}))):_.push((function(){if(y(g,f),p.length&&"x"===c&&!a(f)&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=0;var e,n=0,i=[];if(g.each((function(e){n=Math.max(n,e.fontSize);var r=t.l2p(e.x),a=Q(this),o=d.bBox(a.node());i.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),"boundaries"!==t.tickson&&!t.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*t._m)/(o-1)<2.5*n||"multicategory"===t.type;for(e=0;e<i.length-1;e++)if(s.bBoxIntersect(i[e],i[e+1])){b=l?90:30;break}}else{var u=2;for(t.ticks&&(u+=t.tickwidth/2),e=0;e<i.length;e++){var h=p[e].xbnd,m=i[e];if(null!==h[0]&&m.left-t.l2p(h[0])<u||null!==h[1]&&t.l2p(h[1])-m.right<u){b=90;break}}}b&&y(g,b)}})),t._tickAngles&&_.push((function(){t._tickAngles[u]=null===b?a(f)?f:0:b}));var x=s.syncOrAsync(_);return x&&x.then&&e._promises.push(x),x},L.getPxPosition=function(e,t){var r,n=e._fullLayout._size,a=t._id.charAt(0),i=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===a?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===a&&(r={_offset:n.l+(t.position||0)*n.w,_length:0}),"top"===i||"left"===i?r._offset:"bottom"===i||"right"===i?r._offset+r._length:void 0},L.shouldShowZeroLine=function(e,t,r){var n=s.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&($(t,0)||!function(e,t,r,n){var a=r._mainAxis;if(a){var i=e._fullLayout,o=t._id.charAt(0),s=L.counterLetter(t._id),l=t._offset+(Math.abs(n[0])<Math.abs(n[1])==("x"===o)?0:t._length),c=i._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return h(r);for(var u=L.list(e,s),d=0;d<u.length;d++){var p=u[d];if(p._mainAxis===a&&h(p))return!0}}function h(e){if(!e.showline||!e.linewidth)return!1;var r=Math.max((e.linewidth+t.zerolinewidth)/2,1);function n(e){return"number"==typeof e&&Math.abs(e-l)<r}if(n(e._mainLinePosition)||n(e._mainMirrorPosition))return!0;var a=e._linepositions||{};for(var i in a)if(n(a[i][0])||n(a[i][1]))return!0}}(e,t,r,n)||function(e,t){for(var r=e._fullData,n=t._mainSubplot,a=t._id.charAt(0),i=0;i<r.length;i++){var s=r[i];if(!0===s.visible&&s.xaxis+s.yaxis===n){if(o.traceIs(s,"bar-like")&&s.orientation==={x:"h",y:"v"}[a])return!0;if(s.fill&&s.fill.charAt(s.fill.length-1)===a)return!0}}return!1}(e,t))},L.clipEnds=function(e,t){return t.filter((function(t){return $(e,t.x)}))},L.allowAutoMargin=function(e){for(var t=L.list(e,"",!0),r=0;r<t.length;r++){var n=t[r];n.automargin&&(i.allowAutoMargin(e,ee(n)),n.mirror&&i.allowAutoMargin(e,te(n))),o.getComponentMethod("rangeslider","isVisible")(n)&&i.allowAutoMargin(e,re(n))}},L.swap=function(e,t){for(var r=function(e,t){var r,n,a=[];for(r=0;r<t.length;r++){var i=[],o=e._fullData[t[r]].xaxis,s=e._fullData[t[r]].yaxis;if(o&&s){for(n=0;n<a.length;n++)-1===a[n].x.indexOf(o)&&-1===a[n].y.indexOf(s)||i.push(n);if(i.length){var l,c=a[i[0]];if(i.length>1)for(n=1;n<i.length;n++)l=a[i[n]],ne(c.x,l.x),ne(c.y,l.y);ne(c.x,[o]),ne(c.y,[s])}else a.push({x:[o],y:[s]})}}return a}(e,t),n=0;n<r.length;n++)ae(e,r[n].x,r[n].y)}},{"../../components/color":591,"../../components/drawing":612,"../../components/titles":678,"../../constants/alignment":685,"../../constants/numerical":692,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/plots":825,"../../registry":845,"./autorange":763,"./axis_autotype":765,"./axis_ids":767,"./clean_ticks":769,"./layout_attributes":776,"./set_convert":782,d3:164,"fast-isnumeric":227}],765:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM;t.exports=function(e,t,r){return!(r=r||{}).noMultiCategory&&(o=e,a.isArrayOrTypedArray(o[0])&&a.isArrayOrTypedArray(o[1]))?"multicategory":function(e,t){for(var r=Math.max(1,(e.length-1)/1e3),i=0,o=0,s={},l=0;l<e.length;l+=r){var c=e[Math.round(l)],u=String(c);s[u]||(s[u]=1,a.isDateTime(c,t)&&(i+=1),n(c)&&(o+=1))}return i>2*o}(e,t)?"date":function(e){for(var t=Math.max(1,(e.length-1)/1e3),r=0,n=0,o={},s=0;s<e.length;s+=t){var l=e[Math.round(s)],c=String(l);o[c]||(o[c]=1,"boolean"==typeof l?n++:a.cleanNumber(l)!==i?r++:"string"==typeof l&&n++)}return n>2*r}(e)?"category":function(e){if(!e)return!1;for(var t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}(e)?"linear":"-";var o}},{"../../constants/numerical":692,"../../lib":716,"fast-isnumeric":227}],766:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("./layout_attributes"),o=e("./tick_value_defaults"),s=e("./tick_mark_defaults"),l=e("./tick_label_defaults"),c=e("./category_order_defaults"),u=e("./line_grid_defaults"),d=e("./set_convert");t.exports=function(e,t,r,p,h){var f=p.letter,m=p.font||{},g=p.splomStash||{},v=r("visible",!p.visibleDflt),y=t.type;"date"===y&&n.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",p.calendar),d(t,h);var b=!t.isValidRange(e.range);b&&p.reverseDflt&&(b="reversed"),!r("autorange",b)||"linear"!==y&&"-"!==y||r("rangemode"),r("range"),t.cleanRange(),c(e,t,r,p),"category"===y||p.noHover||r("hoverformat");var _=r("color"),x=_!==i.color.dflt?_:m.color,w=g.label||h._dfltTitle[f];if(l(e,t,r,y,p,{pass:1}),!v)return t;r("title.text",w),a.coerceFont(r,"title.font",{family:m.family,size:Math.round(1.2*m.size),color:x}),o(e,t,r,y),l(e,t,r,y,p,{pass:2}),s(e,t,r,p),u(e,t,r,{dfltColor:_,bgColor:p.bgColor,showGrid:p.showGrid,attributes:i}),(t.showline||t.ticks)&&r("mirror"),p.automargin&&r("automargin");var k,M="multicategory"===t.type;return p.noTickson||"category"!==t.type&&!M||!t.ticks&&!t.showgrid||(M&&(k="boundaries"),r("tickson",k)),M&&r("showdividers")&&(r("dividercolor"),r("dividerwidth")),t}},{"../../lib":716,"../../registry":845,"./category_order_defaults":768,"./layout_attributes":776,"./line_grid_defaults":778,"./set_convert":782,"./tick_label_defaults":783,"./tick_mark_defaults":784,"./tick_value_defaults":785}],767:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("./constants");r.id2name=function(e){if("string"==typeof e&&e.match(a.AX_ID_PATTERN)){var t=e.substr(1);return"1"===t&&(t=""),e.charAt(0)+"axis"+t}},r.name2id=function(e){if(e.match(a.AX_NAME_PATTERN)){var t=e.substr(5);return"1"===t&&(t=""),e.charAt(0)+t}},r.cleanId=function(e,t){if(e.match(a.AX_ID_PATTERN)&&(!t||e.charAt(0)===t)){var r=e.substr(1).replace(/^0+/,"");return"1"===r&&(r=""),e.charAt(0)+r}},r.list=function(e,t,n){var a=e._fullLayout;if(!a)return[];var i,o=r.listIds(e,t),s=new Array(o.length);for(i=0;i<o.length;i++){var l=o[i];s[i]=a[l.charAt(0)+"axis"+l.substr(1)]}if(!n){var c=a._subplots.gl3d||[];for(i=0;i<c.length;i++){var u=a[c[i]];t?s.push(u[t+"axis"]):s.push(u.xaxis,u.yaxis,u.zaxis)}}return s},r.listIds=function(e,t){var r=e._fullLayout;if(!r)return[];var n=r._subplots;return t?n[t+"axis"]:n.xaxis.concat(n.yaxis)},r.getFromId=function(e,t,n){var a=e._fullLayout;return"x"===n?t=t.replace(/y[0-9]*/,""):"y"===n&&(t=t.replace(/x[0-9]*/,"")),a[r.id2name(t)]},r.getFromTrace=function(e,t,a){var i=e._fullLayout,o=null;if(n.traceIs(t,"gl3d")){var s=t.scene;"scene"===s.substr(0,5)&&(o=i[s][a+"axis"])}else o=r.getFromId(e,t[a+"axis"]||a);return o},r.idSort=function(e,t){var r=e.charAt(0),n=t.charAt(0);return r!==n?r>n?1:-1:+(e.substr(1)||1)-+(t.substr(1)||1)},r.getAxisGroup=function(e,t){for(var r=e._axisMatchGroups,n=0;n<r.length;n++)if(r[n][t])return"g"+n;return t}},{"../../registry":845,"./constants":770}],768:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){if("category"===t.type){var a,i=e.categoryarray,o=Array.isArray(i)&&i.length>0;o&&(a="array");var s,l=r("categoryorder",a);"array"===l&&(s=r("categoryarray")),o||"array"!==l||(l=t.categoryorder="trace"),"trace"===l?t._initialCategories=[]:"array"===l?t._initialCategories=s.slice():(s=function(e,t){var r,n,a,i=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;n<t.data.length;n++){var s=t.data[n];s[i+"axis"]===e._id&&r.push(s)}for(n=0;n<r.length;n++){var l=r[n][i];for(a=0;a<l.length;a++){var c=l[a];null!=c&&(o[c]=1)}}return Object.keys(o)}(t,n).sort(),"category ascending"===l?t._initialCategories=s:"category descending"===l&&(t._initialCategories=s.reverse()))}}},{}],769:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").ONEDAY;r.dtick=function(e,t){var r="log"===t,a="date"===t,o="category"===t,s=a?i:1;if(!e)return s;if(n(e))return(e=Number(e))<=0?s:o?Math.max(1,Math.round(e)):a?Math.max(.1,e):e;if("string"!=typeof e||!a&&!r)return s;var l=e.charAt(0),c=e.substr(1);return(c=n(c)?Number(c):0)<=0||!(a&&"M"===l&&c===Math.round(c)||r&&"L"===l||r&&"D"===l&&(1===c||2===c))?s:e},r.tick0=function(e,t,r,i){return"date"===t?a.cleanDate(e,a.dateTick0(r)):"D1"!==i&&"D2"!==i?n(e)?Number(e):0:void 0}},{"../../constants/numerical":692,"../../lib":716,"fast-isnumeric":227}],770:[function(e,t,r){"use strict";var n=e("../../lib/regex").counter;t.exports={idRegex:{x:n("x"),y:n("y")},attrRegex:n("[xy]axis"),xAxisMatch:n("xaxis"),yAxisMatch:n("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,MINDRAG:8,MINSELECT:12,MINZOOM:20,DRAGGERSIZE:20,BENDPX:1.5,REDRAWDELAY:50,SELECTDELAY:100,SELECTID:"-select",DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},{"../../lib/regex":732}],771:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./axis_ids").id2name,i=e("./scale_zoom"),o=e("./autorange").makePadFn,s=e("./autorange").concatExtremes,l=e("../../constants/numerical").ALMOST_EQUAL,c=e("../../constants/alignment").FROM_BL;function u(e,t,r,n,i){var o,s,l,c,u="range"!==i,d=n[a(t)].type,p=[];for(s=0;s<r.length;s++)(l=r[s])!==t&&(c=n[a(l)]).type===d&&(c.fixedrange?u&&c.anchor&&n[a(c.anchor)].fixedrange&&p.push(l):p.push(l));for(o=0;o<e.length;o++)if(e[o][t]){var h=e[o],f=[];for(s=0;s<p.length;s++)h[l=p[s]]||f.push(l);return{linkableAxes:f,thisGroup:h}}return{linkableAxes:p,thisGroup:null}}function d(e,t,r,n,a){var i,o,s,l,c;null===t?((t={})[r]=1,c=e.length,e.push(t)):c=e.indexOf(t);var u=Object.keys(t);for(i=0;i<e.length;i++)if(s=e[i],i!==c&&s[n]){var d=s[n];for(o=0;o<u.length;o++)s[l=u[o]]=d*a*t[l];return void e.splice(c,1)}if(1!==a)for(o=0;o<u.length;o++)t[u[o]]*=a;t[n]=1}function p(e,t){var r=e._inputDomain,n=c[e.constraintoward],a=r[0]+(r[1]-r[0])*n;e.domain=e._input.domain=[a+(r[0]-a)/t,a+(r[1]-a)/t],e.setScale()}r.handleConstraintDefaults=function(e,t,r,a){var i,o,s,l,c=a.allAxisIds,p=a.layoutOut,h=a.scaleanchorDflt,f=a.constrainDflt,m=p._axisConstraintGroups,g=p._axisMatchGroups,v=t._id,y=v.charAt(0),b=((p._splomAxes||{})[y]||{})[v]||{},_=t._id,x=_.charAt(0),w=r("constrain",f);if(n.coerce(e,t,{constraintoward:{valType:"enumerated",values:"x"===x?["left","center","right"]:["bottom","middle","top"],dflt:"x"===x?"center":"middle"}},"constraintoward"),!e.matches&&!b.matches||t.fixedrange||(o=u(g,_,c,p),i=n.coerce(e,t,{matches:{valType:"enumerated",values:o.linkableAxes||[],dflt:b.matches}},"matches")),i||t.fixedrange&&"domain"!==w||!e.scaleanchor&&!h||(l=u(m,_,c,p,w),s=n.coerce(e,t,{scaleanchor:{valType:"enumerated",values:l.linkableAxes||[]}},"scaleanchor",h)),i?(delete t.constrain,d(g,o.thisGroup,_,i,1)):-1!==c.indexOf(e.matches)&&n.warn("ignored "+t._name+'.matches: "'+e.matches+'" to avoid either an infinite loop or because the target axis has fixed range.'),s){var k=r("scaleratio");k||(k=t.scaleratio=1),d(m,l.thisGroup,_,s,k)}else-1!==c.indexOf(e.scaleanchor)&&n.warn("ignored "+t._name+'.scaleanchor: "'+e.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because the target axis has fixed range or this axis declares a *matches* constraint.')},r.enforce=function(e){var t,r,n,c,u,d,h,f=e._fullLayout,m=f._axisConstraintGroups||[];for(t=0;t<m.length;t++){var g=m[t],v=Object.keys(g),y=1/0,b=0,_=1/0,x={},w={},k=!1;for(r=0;r<v.length;r++)w[n=v[r]]=c=f[a(n)],c._inputDomain?c.domain=c._inputDomain.slice():c._inputDomain=c.domain.slice(),c._inputRange||(c._inputRange=c.range.slice()),c.setScale(),x[n]=u=Math.abs(c._m)/g[n],y=Math.min(y,u),"domain"!==c.constrain&&c._constraintShrinkable||(_=Math.min(_,u)),delete c._constraintShrinkable,b=Math.max(b,u),"domain"===c.constrain&&(k=!0);if(!(y>l*b)||k)for(r=0;r<v.length;r++)if(u=x[n=v[r]],d=(c=w[n]).constrain,u!==_||"domain"===d)if(h=u/_,"range"===d)i(c,h);else{var M=c._inputDomain,T=(c.domain[1]-c.domain[0])/(M[1]-M[0]),C=(c.r2l(c.range[1])-c.r2l(c.range[0]))/(c.r2l(c._inputRange[1])-c.r2l(c._inputRange[0]));if((h/=T)*C<1){c.domain=c._input.domain=M.slice(),i(c,h);continue}if(C<1&&(c.range=c._input.range=c._inputRange.slice(),h*=C),c.autorange){var S=c.r2l(c.range[0]),L=c.r2l(c.range[1]),A=(S+L)/2,E=A,D=A,I=Math.abs(L-A),P=A-I*h*1.0001,O=A+I*h*1.0001,R=o(c);p(c,h);var F,z,N=Math.abs(c._m),j=s(e,c),B=j.min,Y=j.max;for(z=0;z<B.length;z++)(F=B[z].val-R(B[z])/N)>P&&F<E&&(E=F);for(z=0;z<Y.length;z++)(F=Y[z].val+R(Y[z])/N)<O&&F>D&&(D=F);h/=(D-E)/(2*I),E=c.l2r(E),D=c.l2r(D),c.range=c._input.range=S<L?[E,D]:[D,E]}p(c,h)}}},r.clean=function(e,t){if(t._inputDomain){for(var r=!1,n=t._id,a=e._fullLayout._axisConstraintGroups,i=0;i<a.length;i++)if(a[i][n]){r=!0;break}r&&"domain"===t.constrain||(t._input.domain=t.domain=t._inputDomain,delete t._inputDomain)}}},{"../../constants/alignment":685,"../../constants/numerical":692,"../../lib":716,"./autorange":763,"./axis_ids":767,"./scale_zoom":780}],772:[function(e,t,r){"use strict";var n=e("d3"),a=e("tinycolor2"),i=e("has-passive-events"),o=e("../../registry"),s=e("../../lib"),l=e("../../lib/svg_text_utils"),c=e("../../components/color"),u=e("../../components/drawing"),d=e("../../components/fx"),p=e("./axes"),h=e("../../lib/setcursor"),f=e("../../components/dragelement"),m=e("../../constants/alignment").FROM_TL,g=e("../../lib/clear_gl_canvases"),v=e("../../plot_api/subroutines").redrawReglTraces,y=e("../plots"),b=e("./axis_ids").getFromId,_=e("./select").prepSelect,x=e("./select").clearSelect,w=e("./select").selectOnClick,k=e("./scale_zoom"),M=e("./constants"),T=M.MINDRAG,C=M.MINZOOM,S=!0;function L(e,t,r,n){var a=s.ensureSingle(e.draglayer,t,r,(function(t){t.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)}));return a.call(h,n),a.node()}function A(e,t,r,a,i,o,s){var l=L(e,"rect",t,r);return n.select(l).call(u.setRect,a,i,o,s),l}function E(e,t){for(var r=0;r<e.length;r++)if(!e[r].fixedrange)return t;return""}function D(e,t,r,n,a){for(var i=0;i<e.length;i++){var o=e[i];if(!o.fixedrange){var s=o._rl[0],l=o._rl[1]-s;n[o._name+".range[0]"]=o.l2r(s+l*t),n[o._name+".range[1]"]=o.l2r(s+l*r)}}if(a&&a.length){var c=(t+(1-r))/2;D(a,c,1-c,n,[])}}function I(e,t){for(var r=0;r<e.length;r++){var n=e[r];n.fixedrange||(n.range=[n.l2r(n._rl[0]-t/n._m),n.l2r(n._rl[1]-t/n._m)])}}function P(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function O(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform","translate("+r+", "+n+")").attr("d",a+"Z")}function R(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform","translate("+t+", "+r+")").attr("d","M0,0Z")}function F(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),z(e,t,a,i)}function z(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function N(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function j(e){S&&e.data&&e._context.showTips&&(s.notifier(s._(e,"Double-click to zoom back out"),"long"),S=!1)}function B(e){return"lasso"===e||"select"===e}function Y(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,C)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function H(e,t,r,n){for(var a,i,o,l,c=!1,u={},d={},p=0;p<t.length;p++){var h=t[p];for(a in r)if(h[a]){for(o in h)("x"===o.charAt(0)?r:n)[o]||(u[o]=a);for(i in n)h[i]&&(c=!0)}for(i in n)if(h[i])for(l in h)("x"===l.charAt(0)?r:n)[l]||(d[l]=i)}c&&(s.extendFlat(u,d),d={});var f={},m=[];for(o in u){var g=b(e,o);m.push(g),f[g._id]=g}var v={},y=[];for(l in d){var _=b(e,l);y.push(_),v[_._id]=_}return{xaHash:f,yaHash:v,xaxes:m,yaxes:y,xLinks:u,yLinks:d,isSubplotConstrained:c}}function V(e,t){if(i){var r=void 0!==e.onwheel?"wheel":"mousewheel";e._onwheel&&e.removeEventListener(r,e._onwheel),e._onwheel=t,e.addEventListener(r,t,{passive:!1})}else void 0!==e.onwheel?e.onwheel=t:void 0!==e.onmousewheel&&(e.onmousewheel=t)}function U(e){var t=[];for(var r in e)t.push(e[r]);return t}t.exports={makeDragBox:function(e,t,r,i,c,h,S,L){var z,W,G,q,K,X,Z,J,$,Q,ee,te,re,ne,ae,ie,oe,se,le,ce,ue,de=e._fullLayout._zoomlayer,pe=S+L==="nsew",he=1===(S+L).length;function fe(){if(z=t.xaxis,W=t.yaxis,$=z._length,Q=W._length,Z=z._offset,J=W._offset,(G={})[z._id]=z,(q={})[W._id]=W,S&&L)for(var r=t.overlays,n=0;n<r.length;n++){var a=r[n].xaxis;G[a._id]=a;var i=r[n].yaxis;q[i._id]=i}K=U(G),X=U(q),re=E(K,L),ne=E(X,S),ae=!ne&&!re,ee=H(e,e._fullLayout._axisConstraintGroups,G,q),te=H(e,e._fullLayout._axisMatchGroups,G,q),ie=L||ee.isSubplotConstrained||te.isSubplotConstrained,oe=S||ee.isSubplotConstrained||te.isSubplotConstrained;var o=e._fullLayout;se=o._has("scattergl"),le=o._has("splom"),ce=o._has("svg")}fe();var me=function(e,t,r){return e?"nsew"===e?r?"":"pan"===t?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}(ne+re,e._fullLayout.dragmode,pe),ge=A(t,S+L+"drag",me,r,i,c,h);if(ae&&!pe)return ge.onmousedown=null,ge.style.pointerEvents="none",ge;var ve,ye,be,_e,xe,we,ke,Me,Te,Ce,Se={element:ge,gd:e,plotinfo:t};function Le(){Se.plotinfo.selection=!1,x(e)}function Ae(r,a){var i=e._fullLayout.clickmode;if(N(e),2!==r||he||function(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];re&&(r=r.concat(K)),ne&&(r=r.concat(X)),te.xaxes&&(r=r.concat(te.xaxes)),te.yaxes&&(r=r.concat(te.yaxes));var n,a,i,s={};if("reset+autosize"===t)for(t="autosize",a=0;a<r.length;a++)if((n=r[a])._rangeInitial&&(n.range[0]!==n._rangeInitial[0]||n.range[1]!==n._rangeInitial[1])||!n._rangeInitial&&!n.autorange){t="reset";break}if("autosize"===t)for(a=0;a<r.length;a++)(n=r[a]).fixedrange||(s[n._name+".autorange"]=!0);else if("reset"===t)for((re||ee.isSubplotConstrained)&&(r=r.concat(ee.xaxes)),ne&&!ee.isSubplotConstrained&&(r=r.concat(ee.yaxes)),ee.isSubplotConstrained&&(re?ne||(r=r.concat(X)):r=r.concat(K)),a=0;a<r.length;a++)(n=r[a]).fixedrange||(n._rangeInitial?(i=n._rangeInitial,s[n._name+".range[0]"]=i[0],s[n._name+".range[1]"]=i[1]):s[n._name+".autorange"]=!0);e.emit("plotly_doubleclick",null),o.call("_guiRelayout",e,s)}}(),pe)i.indexOf("select")>-1&&w(a,e,K,X,t.id,Se),i.indexOf("event")>-1&&d.click(e,a,t.id);else if(1===r&&he){var s=S?W:z,c="s"===S||"w"===L?0:1,u=s._name+".range["+c+"]",p=function(e,t){var r,a=e.range[t],i=Math.abs(a-e.range[1-t]);return"date"===e.type?a:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,n.format("."+r+"g")(Math.pow(10,a))):(r=Math.floor(Math.log(Math.abs(a))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,n.format("."+String(r)+"g")(a))}(s,c),h="left",f="middle";if(s.fixedrange)return;S?(f="n"===S?"top":"bottom","right"===s.side&&(h="right")):"e"===L&&(h="right"),e._context.showAxisRangeEntryBoxes&&n.select(ge).call(l.makeEditable,{gd:e,immediate:!0,background:e._fullLayout.paper_bgcolor,text:String(p),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:h,verticalAlign:f}).on("edit",(function(t){var r=s.d2r(t);void 0!==r&&o.call("_guiRelayout",e,u,r)}))}}function Ee(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,t+ve)),a=Math.max(0,Math.min(Q,r+ye)),i=Math.abs(n-ve),o=Math.abs(a-ye);function s(){ke="",be.r=be.l,be.t=be.b,Te.attr("d","M0,0Z")}if(be.l=Math.min(ve,n),be.r=Math.max(ve,n),be.t=Math.min(ye,a),be.b=Math.max(ye,a),ee.isSubplotConstrained)i>C||o>C?(ke="xy",i/$>o/Q?(o=i*Q/$,ye>a?be.t=ye-o:be.b=ye+o):(i=o*$/Q,ve>n?be.l=ve-i:be.r=ve+i),Te.attr("d",Y(be))):s();else if(te.isSubplotConstrained)if(i>C||o>C){ke="xy";var l=Math.min(be.l/$,(Q-be.b)/Q),c=Math.max(be.r/$,(Q-be.t)/Q);be.l=l*$,be.r=c*$,be.b=(1-l)*Q,be.t=(1-c)*Q,Te.attr("d",Y(be))}else s();else!ne||o<Math.min(Math.max(.6*i,T),C)?i<T||!re?s():(be.t=0,be.b=Q,ke="x",Te.attr("d",function(e,t){return"M"+(e.l-.5)+","+(t-C-.5)+"h-3v"+(2*C+1)+"h3ZM"+(e.r+.5)+","+(t-C-.5)+"h3v"+(2*C+1)+"h-3Z"}(be,ye))):!re||i<Math.min(.6*o,C)?(be.l=0,be.r=$,ke="y",Te.attr("d",function(e,t){return"M"+(t-C-.5)+","+(e.t-.5)+"v-3h"+(2*C+1)+"v3ZM"+(t-C-.5)+","+(e.b+.5)+"v3h"+(2*C+1)+"v-3Z"}(be,ve))):(ke="xy",Te.attr("d",Y(be)));be.w=be.r-be.l,be.h=be.b-be.t,ke&&(Ce=!0),e._dragged=Ce,F(Me,Te,be,xe,we,_e),De(),e.emit("plotly_relayouting",ue),we=!0}function De(){ue={},"xy"!==ke&&"x"!==ke||(D(K,be.l/$,be.r/$,ue,ee.xaxes),Ne("x",ue)),"xy"!==ke&&"y"!==ke||(D(X,(Q-be.b)/Q,(Q-be.t)/Q,ue,ee.yaxes),Ne("y",ue))}function Ie(){De(),N(e),Be(),j(e)}Se.prepFn=function(t,r,n){var i=Se.dragmode,o=e._fullLayout.dragmode;o!==i&&(Se.dragmode=o),fe(),ae||(pe?t.shiftKey?"pan"===o?o="zoom":B(o)||(o="pan"):t.ctrlKey&&(o="pan"):o="pan"),Se.minDrag="lasso"===o?1:void 0,B(o)?(Se.xaxes=K,Se.yaxes=X,_(t,r,n,Se,o)):(Se.clickFn=Ae,B(i)&&Le(),ae||("zoom"===o?(Se.moveFn=Ee,Se.doneFn=Ie,Se.minDrag=1,function(t,r,n){var i=ge.getBoundingClientRect();ve=r-i.left,ye=n-i.top,be={l:ve,r:ve,w:0,t:ye,b:ye,h:0},_e=e._hmpixcount?e._hmlumcount/e._hmpixcount:a(e._fullLayout.plot_bgcolor).getLuminance(),we=!1,ke="xy",Ce=!1,Me=O(de,_e,Z,J,xe="M0,0H"+$+"V"+Q+"H0V0"),Te=R(de,Z,J)}(0,r,n)):"pan"===o&&(Se.moveFn=ze,Se.doneFn=Be))),e._fullLayout._redrag=function(){var t=e._dragdata;t&&t.element===ge&&(B(e._fullLayout.dragmode)||(fe(),Ye([0,0,$,Q]),Se.moveFn(t.dx,t.dy)))}},f.init(Se);var Pe=[0,0,$,Q],Oe=null,Re=M.REDRAWDELAY,Fe=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function ze(t,r){if(!e._transitioningWithDuration){if(e._fullLayout._replotting=!0,"ew"===re||"ns"===ne)return re&&(I(K,t),Ne("x")),ne&&(I(X,r),Ne("y")),Ye([re?-t:0,ne?-r:0,$,Q]),je(),void e.emit("plotly_relayouting",ue);if(ee.isSubplotConstrained&&re&&ne){var n="w"===re==("n"===ne)?1:-1,a=(t/$+n*r/Q)/2;t=a*$,r=n*a*Q}"w"===re?t=l(K,0,t):"e"===re?t=l(K,1,-t):re||(t=0),"n"===ne?r=l(X,1,r):"s"===ne?r=l(X,0,-r):ne||(r=0);var i="w"===re?t:0,o="n"===ne?r:0;if(ee.isSubplotConstrained){var s;if(!re&&1===ne.length){for(s=0;s<K.length;s++)K[s].range=K[s]._r.slice(),k(K[s],1-r/Q);i=(t=r*$/Q)/2}if(!ne&&1===re.length){for(s=0;s<X.length;s++)X[s].range=X[s]._r.slice(),k(X[s],1-t/$);o=(r=t*Q/$)/2}}Ne("x"),Ne("y"),Ye([i,o,$-t,Q-r]),je(),e.emit("plotly_relayouting",ue)}function l(e,t,r){for(var n,a,i=1-t,o=0;o<e.length;o++){var s=e[o];if(!s.fixedrange){n=s,a=s._rl[i]+(s._rl[t]-s._rl[i])/P(r/s._length);var l=s.l2r(a);!1!==l&&void 0!==l&&(s.range[t]=l)}}return n._length*(n._rl[t]-a)/(n._rl[t]-n._rl[i])}}function Ne(e,t){for(var r=te.isSubplotConstrained?{x:X,y:K}[e]:te[e+"axes"],n=te.isSubplotConstrained?{x:K,y:X}[e]:[],a=0;a<r.length;a++){var i=r[a],o=i._id,s=te.xLinks[o]||te.yLinks[o],l=n[0]||G[s]||q[s];l&&(t?(t[i._name+".range[0]"]=t[l._name+".range[0]"],t[i._name+".range[1]"]=t[l._name+".range[1]"]):i.range=l.range.slice())}}function je(){var t,r=[];function n(e){for(t=0;t<e.length;t++)e[t].fixedrange||r.push(e[t]._id)}for(ie&&(n(K),n(ee.xaxes),n(te.xaxes)),oe&&(n(X),n(ee.yaxes),n(te.yaxes)),ue={},t=0;t<r.length;t++){var a=r[t],i=b(e,a);p.drawOne(e,i,{skipTitle:!0}),ue[i._name+".range[0]"]=i.range[0],ue[i._name+".range[1]"]=i.range[1]}p.redrawComponents(e,r)}function Be(){Ye([0,0,$,Q]),s.syncOrAsync([y.previousPromises,function(){e._fullLayout._replotting=!1,o.call("_guiRelayout",e,ue)}],e)}function Ye(t){var r,n,a,i,l=e._fullLayout,c=l._plots,d=l._subplots.cartesian;if(le&&o.subplotsRegistry.splom.drag(e),se)for(r=0;r<d.length;r++)if(a=(n=c[d[r]]).xaxis,i=n.yaxis,n._scene){var p=s.simpleMap(a.range,a.r2l),h=s.simpleMap(i.range,i.r2l);n._scene.update({range:[p[0],h[0],p[1],h[1]]})}if((le||se)&&(g(e),v(e)),ce){var f=t[2]/z._length,m=t[3]/W._length;for(r=0;r<d.length;r++){a=(n=c[d[r]]).xaxis,i=n.yaxis;var y,b,_,x,w=ie&&!a.fixedrange&&G[a._id],k=oe&&!i.fixedrange&&q[i._id];if(w?(y=f,_=L?t[0]:Ue(a,y)):te.xaHash[a._id]?(y=f,_=t[0]*a._length/z._length):te.yaHash[a._id]?(y=m,_="ns"===ne?-t[1]*a._length/W._length:Ue(a,y,{n:"top",s:"bottom"}[ne])):_=Ve(a,y=He(a,f,m)),k?(b=m,x=S?t[1]:Ue(i,b)):te.yaHash[i._id]?(b=m,x=t[1]*i._length/W._length):te.xaHash[i._id]?(b=f,x="ew"===re?-t[0]*i._length/z._length:Ue(i,b,{e:"right",w:"left"}[re])):x=Ve(i,b=He(i,f,m)),y||b){y||(y=1),b||(b=1);var M=a._offset-_/y,T=i._offset-x/b;n.clipRect.call(u.setTranslate,_,x).call(u.setScale,y,b),n.plot.call(u.setTranslate,M,T).call(u.setScale,1/y,1/b),y===n.xScaleFactor&&b===n.yScaleFactor||(u.setPointGroupScale(n.zoomScalePts,y,b),u.setTextPointsScale(n.zoomScaleTxt,y,b)),u.hideOutsideRangePoints(n.clipOnAxisFalseTraces,n),n.xScaleFactor=y,n.yScaleFactor=b}}}}function He(e,t,r){return e.fixedrange?0:ie&&ee.xaHash[e._id]?t:oe&&(ee.isSubplotConstrained?ee.xaHash:ee.yaHash)[e._id]?r:0}function Ve(e,t){return t?(e.range=e._r.slice(),k(e,t),Ue(e,t)):0}function Ue(e,t,r){return e._length*(1-t)*m[r||e.constraintoward||"middle"]}return(S.length*L.length!=1&&V(ge,(function(t){if(e._context._scrollZoom.cartesian||e._fullLayout._enablescrollzoom){if(Le(),e._transitioningWithDuration)return t.preventDefault(),void t.stopPropagation();fe(),clearTimeout(Oe);var r=-t.deltaY;if(isFinite(r)||(r=t.wheelDelta/10),isFinite(r)){var n,a=Math.exp(-Math.min(Math.max(r,-20),20)/200),i=Fe.draglayer.select(".nsewdrag").node().getBoundingClientRect(),o=(t.clientX-i.left)/i.width,l=(i.bottom-t.clientY)/i.height;if(ie){for(L||(o=.5),n=0;n<K.length;n++)c(K[n],o,a);Ne("x"),Pe[2]*=a,Pe[0]+=Pe[2]*o*(1/a-1)}if(oe){for(S||(l=.5),n=0;n<X.length;n++)c(X[n],l,a);Ne("y"),Pe[3]*=a,Pe[1]+=Pe[3]*(1-l)*(1/a-1)}Ye(Pe),je(),e.emit("plotly_relayouting",ue),Oe=setTimeout((function(){Pe=[0,0,$,Q],Be()}),Re),t.preventDefault()}else s.log("Did not find wheel motion attributes: ",t)}function c(e,t,r){if(!e.fixedrange){var n=s.simpleMap(e.range,e.r2l),a=n[0]+(n[1]-n[0])*t;e.range=n.map((function(t){return e.l2r(a+(t-a)*r)}))}}})),ge)},makeDragger:L,makeRectDragger:A,makeZoombox:O,makeCorners:R,updateZoombox:F,xyCorners:Y,transitionZoombox:z,removeZoombox:N,showDoubleClickNotifier:j,attachWheelEventHandler:V}},{"../../components/color":591,"../../components/dragelement":609,"../../components/drawing":612,"../../components/fx":629,"../../constants/alignment":685,"../../lib":716,"../../lib/clear_gl_canvases":701,"../../lib/setcursor":736,"../../lib/svg_text_utils":740,"../../plot_api/subroutines":755,"../../registry":845,"../plots":825,"./axes":764,"./axis_ids":767,"./constants":770,"./scale_zoom":780,"./select":781,d3:164,"has-passive-events":412,tinycolor2:535}],773:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/fx"),i=e("../../components/dragelement"),o=e("../../lib/setcursor"),s=e("./dragbox").makeDragBox,l=e("./constants").DRAGGERSIZE;r.initInteractions=function(e){var t=e._fullLayout;if(e._context.staticPlot)n.select(e).selectAll(".drag").remove();else if(t._has("cartesian")||t._has("splom")){Object.keys(t._plots||{}).sort((function(e,r){if((t._plots[e].mainplot&&!0)===(t._plots[r].mainplot&&!0)){var n=e.split("y"),a=r.split("y");return n[0]===a[0]?Number(n[1]||1)-Number(a[1]||1):Number(n[0]||1)-Number(a[0]||1)}return t._plots[e].mainplot?1:-1})).forEach((function(r){var n=t._plots[r],o=n.xaxis,c=n.yaxis;if(!n.mainplot){var u=s(e,n,o._offset,c._offset,o._length,c._length,"ns","ew");u.onmousemove=function(t){e._fullLayout._rehover=function(){e._fullLayout._hoversubplot===r&&e._fullLayout._plots[r]&&a.hover(e,t,r)},a.hover(e,t,r),e._fullLayout._lasthover=u,e._fullLayout._hoversubplot=r},u.onmouseout=function(t){e._dragging||(e._fullLayout._hoversubplot=null,i.unhover(e,t))},e._context.showAxisDragHandles&&(s(e,n,o._offset-l,c._offset-l,l,l,"n","w"),s(e,n,o._offset+o._length,c._offset-l,l,l,"n","e"),s(e,n,o._offset-l,c._offset+c._length,l,l,"s","w"),s(e,n,o._offset+o._length,c._offset+c._length,l,l,"s","e"))}if(e._context.showAxisDragHandles){if(r===o._mainSubplot){var d=o._mainLinePosition;"top"===o.side&&(d-=l),s(e,n,o._offset+.1*o._length,d,.8*o._length,l,"","ew"),s(e,n,o._offset,d,.1*o._length,l,"","w"),s(e,n,o._offset+.9*o._length,d,.1*o._length,l,"","e")}if(r===c._mainSubplot){var p=c._mainLinePosition;"right"!==c.side&&(p-=l),s(e,n,p,c._offset+.1*c._length,l,.8*c._length,"ns",""),s(e,n,p,c._offset+.9*c._length,l,.1*c._length,"s",""),s(e,n,p,c._offset,l,.1*c._length,"n","")}}}));var o=t._hoverlayer.node();o.onmousemove=function(r){r.target=e._fullLayout._lasthover,a.hover(e,r,t._hoversubplot)},o.onclick=function(t){t.target=e._fullLayout._lasthover,a.click(e,t)},o.onmousedown=function(t){e._fullLayout._lasthover.onmousedown(t)},r.updateFx(e)}},r.updateFx=function(e){var t=e._fullLayout,r="pan"===t.dragmode?"move":"crosshair";o(t._draggers,r)}},{"../../components/dragelement":609,"../../components/fx":629,"../../lib/setcursor":736,"./constants":770,"./dragbox":772,d3:164}],774:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib");t.exports=function(e){return function(t,r){var i=t[e];if(Array.isArray(i))for(var o=n.subplotsRegistry.cartesian,s=o.idRegex,l=r._subplots,c=l.xaxis,u=l.yaxis,d=l.cartesian,p=r._has("cartesian")||r._has("gl2d"),h=0;h<i.length;h++){var f=i[h];if(a.isPlainObject(f)){var m=f.xref,g=f.yref,v=s.x.test(m),y=s.y.test(g);if(v||y){p||a.pushUnique(r._basePlotModules,o);var b=!1;v&&-1===c.indexOf(m)&&(c.push(m),b=!0),y&&-1===u.indexOf(g)&&(u.push(g),b=!0),b&&v&&y&&d.push(m+g)}}}}}},{"../../lib":716,"../../registry":845}],775:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../lib"),o=e("../plots"),s=e("../../components/drawing"),l=e("../get_data").getModuleCalcData,c=e("./axis_ids"),u=e("./constants"),d=e("../../constants/xmlns_namespaces"),p=i.ensureSingle;function h(e,t,r){return i.ensureSingle(e,t,r,(function(e){e.datum(r)}))}function f(e,t,r,i,o){for(var c,d,p,h=u.traceLayerClasses,f=e._fullLayout,m=f._modules,g=[],v=[],y=0;y<m.length;y++){var b=(c=m[y]).name,_=a.modules[b].categories;if(_.svg){var x=c.layerName||b+"layer",w=c.plot;p=(d=l(r,w))[0],r=d[1],p.length&&g.push({i:h.indexOf(x),className:x,plotMethod:w,cdModule:p}),_.zoomScale&&v.push("."+x)}}g.sort((function(e,t){return e.i-t.i}));var k=t.plot.selectAll("g.mlayer").data(g,(function(e){return e.className}));if(k.enter().append("g").attr("class",(function(e){return e.className})).classed("mlayer",!0).classed("rangeplot",t.isRangePlot),k.exit().remove(),k.order(),k.each((function(r){var a=n.select(this),l=r.className;r.plotMethod(e,t,r.cdModule,a,i,o),-1===u.clipOnAxisFalseQuery.indexOf("."+l)&&s.setClipUrl(a,t.layerClipId,e)})),f._has("scattergl")&&(c=a.getModule("scattergl"),p=l(r,c)[0],c.plot(e,t,p)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(u.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),v.length)){var M=t.plot.selectAll(v.join(",")).selectAll(".trace");t.zoomScalePts=M.selectAll("path.point"),t.zoomScaleTxt=M.selectAll(".textpoint")}}function m(e,t){var r=t.plotgroup,n=t.id,a=u.layerValue2layerClass[t.xaxis.layer],i=u.layerValue2layerClass[t.yaxis.layer],o=e._fullLayout._hasOnlyLargeSploms;if(t.mainplot){var s=t.mainplotinfo,l=s.plotgroup,d=n+"-x",f=n+"-y";t.gridlayer=s.gridlayer,t.zerolinelayer=s.zerolinelayer,p(s.overlinesBelow,"path",d),p(s.overlinesBelow,"path",f),p(s.overaxesBelow,"g",d),p(s.overaxesBelow,"g",f),t.plot=p(s.overplot,"g",n),p(s.overlinesAbove,"path",d),p(s.overlinesAbove,"path",f),p(s.overaxesAbove,"g",d),p(s.overaxesAbove,"g",f),t.xlines=l.select(".overlines-"+a).select("."+d),t.ylines=l.select(".overlines-"+i).select("."+f),t.xaxislayer=l.select(".overaxes-"+a).select("."+d),t.yaxislayer=l.select(".overaxes-"+i).select("."+f)}else if(o)t.xlines=p(r,"path","xlines-above"),t.ylines=p(r,"path","ylines-above"),t.xaxislayer=p(r,"g","xaxislayer-above"),t.yaxislayer=p(r,"g","yaxislayer-above");else{var m=p(r,"g","layer-subplot");t.shapelayer=p(m,"g","shapelayer"),t.imagelayer=p(m,"g","imagelayer"),t.gridlayer=p(r,"g","gridlayer"),t.zerolinelayer=p(r,"g","zerolinelayer"),p(r,"path","xlines-below"),p(r,"path","ylines-below"),t.overlinesBelow=p(r,"g","overlines-below"),p(r,"g","xaxislayer-below"),p(r,"g","yaxislayer-below"),t.overaxesBelow=p(r,"g","overaxes-below"),t.plot=p(r,"g","plot"),t.overplot=p(r,"g","overplot"),t.xlines=p(r,"path","xlines-above"),t.ylines=p(r,"path","ylines-above"),t.overlinesAbove=p(r,"g","overlines-above"),p(r,"g","xaxislayer-above"),p(r,"g","yaxislayer-above"),t.overaxesAbove=p(r,"g","overaxes-above"),t.xlines=r.select(".xlines-"+a),t.ylines=r.select(".ylines-"+i),t.xaxislayer=r.select(".xaxislayer-"+a),t.yaxislayer=r.select(".yaxislayer-"+i)}o||(h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map((function(e){return e[0]})).sort(c.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0)}function g(e,t){if(e){var r={};for(var a in e.each((function(e){var a=e[0];n.select(this).remove(),v(a,t),r[a]=!0})),t._plots)for(var i=t._plots[a].overlays||[],o=0;o<i.length;o++){var s=i[o];r[s.id]&&s.plot.selectAll(".trace").remove()}}}function v(e,t){t._draggers.selectAll("g."+e).remove(),t._defs.select("#clip"+t._uid+e+"plot").remove()}r.name="cartesian",r.attr=["xaxis","yaxis"],r.idRoot=["x","y"],r.idRegex=u.idRegex,r.attrRegex=u.attrRegex,r.attributes=e("./attributes"),r.layoutAttributes=e("./layout_attributes"),r.supplyLayoutDefaults=e("./layout_defaults"),r.transitionAxes=e("./transition_axes"),r.finalizeSubplots=function(e,t){var r,n,a,o=t._subplots,s=o.xaxis,l=o.yaxis,d=o.cartesian,p=d.concat(o.gl2d||[]),h={},f={};for(r=0;r<p.length;r++){var m=p[r].split("y");h[m[0]]=1,f["y"+m[1]]=1}for(r=0;r<s.length;r++)h[n=s[r]]||(a=(e[c.id2name(n)]||{}).anchor,u.idRegex.y.test(a)||(a="y"),d.push(n+a),p.push(n+a),f[a]||(f[a]=1,i.pushUnique(l,a)));for(r=0;r<l.length;r++)f[a=l[r]]||(n=(e[c.id2name(a)]||{}).anchor,u.idRegex.x.test(n)||(n="x"),d.push(n+a),p.push(n+a),h[n]||(h[n]=1,i.pushUnique(s,n)));if(!p.length){for(var g in n="",a="",e)u.attrRegex.test(g)&&("x"===g.charAt(0)?(!n||+g.substr(5)<+n.substr(5))&&(n=g):(!a||+g.substr(5)<+a.substr(5))&&(a=g));n=n?c.name2id(n):"x",a=a?c.name2id(a):"y",s.push(n),l.push(a),d.push(n+a)}},r.plot=function(e,t,r,n){var a,i=e._fullLayout,o=i._subplots.cartesian,s=e.calcdata;if(!Array.isArray(t))for(t=[],a=0;a<s.length;a++)t.push(a);for(a=0;a<o.length;a++){for(var l,c=o[a],u=i._plots[c],d=[],p=0;p<s.length;p++){var h=s[p],m=h[0].trace;m.xaxis+m.yaxis===c&&((-1!==t.indexOf(m.index)||m.carpet)&&(l&&l[0].trace.xaxis+l[0].trace.yaxis===c&&-1!==["tonextx","tonexty","tonext"].indexOf(m.fill)&&-1===d.indexOf(l)&&d.push(l),d.push(h)),l=h)}f(e,u,d,r,n)}},r.clean=function(e,t,r,n){var a,i,o,s=n._plots||{},l=t._plots||{},u=n._subplots||{};if(n._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(o in s)(a=s[o]).plotgroup&&a.plotgroup.remove();var d=n._has&&n._has("gl"),p=t._has&&t._has("gl");if(d&&!p)for(o in s)(a=s[o])._scene&&a._scene.destroy();if(u.xaxis&&u.yaxis){var h=c.listIds({_fullLayout:n});for(i=0;i<h.length;i++){var f=h[i];t[c.id2name(f)]||n._infolayer.selectAll(".g-"+f+"title").remove()}}var m=n._has&&n._has("cartesian"),y=t._has&&t._has("cartesian");if(m&&!y)g(n._cartesianlayer.selectAll(".subplot"),n),n._defs.selectAll(".axesclip").remove(),delete n._axisConstraintGroups;else if(u.cartesian)for(i=0;i<u.cartesian.length;i++){var b=u.cartesian[i];if(!l[b]){var _="."+b+",."+b+"-x,."+b+"-y";n._cartesianlayer.selectAll(_).remove(),v(b,n)}}},r.drawFramework=function(e){var t=e._fullLayout,r=function(e){var t,r,n,a,i,o,s=e._fullLayout,l=s._subplots.cartesian,c=l.length,u=[],d=[];for(t=0;t<c;t++){n=l[t],a=s._plots[n],i=a.xaxis,o=a.yaxis;var p=i._mainAxis,h=o._mainAxis,f=p._id+h._id,m=s._plots[f];a.overlays=[],f!==n&&m?(a.mainplot=f,a.mainplotinfo=m,d.push(n)):(a.mainplot=void 0,a.mainPlotinfo=void 0,u.push(n))}for(t=0;t<d.length;t++)n=d[t],(a=s._plots[n]).mainplotinfo.overlays.push(a);var g=u.concat(d),v=new Array(c);for(t=0;t<c;t++){n=g[t],a=s._plots[n],i=a.xaxis,o=a.yaxis;var y=[n,i.layer,o.layer,i.overlaying||"",o.overlaying||""];for(r=0;r<a.overlays.length;r++)y.push(a.overlays[r].id);v[t]=y}return v}(e),a=t._cartesianlayer.selectAll(".subplot").data(r,String);a.enter().append("g").attr("class",(function(e){return"subplot "+e[0]})),a.order(),a.exit().call(g,t),a.each((function(r){var a=r[0],i=t._plots[a];i.plotgroup=n.select(this),m(e,i),i.draglayer=p(t._draggers,"g",a)}))},r.rangePlot=function(e,t,r){m(e,t),f(e,t,r),o.style(e)},r.toSVG=function(e){var t=e._fullLayout._glimages,r=n.select(e).selectAll(".svg-container");r.filter((function(e,t){return t===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this.toDataURL("image/png");t.append("svg:image").attr({xmlns:d.svg,"xlink:href":e,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})}))},r.updateFx=e("./graph_interact").updateFx},{"../../components/drawing":612,"../../constants/xmlns_namespaces":693,"../../lib":716,"../../registry":845,"../get_data":799,"../plots":825,"./attributes":762,"./axis_ids":767,"./constants":770,"./graph_interact":773,"./layout_attributes":776,"./layout_defaults":777,"./transition_axes":786,d3:164}],776:[function(e,t,r){"use strict";var n=e("../font_attributes"),a=e("../../components/color/attributes"),i=e("../../components/drawing/attributes").dash,o=e("../../lib/extend").extendFlat,s=e("../../plot_api/plot_template").templatedArray,l=(e("../../constants/docs").FORMAT_LINK,e("../../constants/docs").DATE_FORMAT_LINK,e("./constants"));t.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:a.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:n({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},scaleanchor:{valType:"enumerated",values:[l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],dflt:"range",editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"calc"},tickmode:{valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},nticks:{valType:"integer",min:0,dflt:0,editType:"ticks"},tick0:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},dtick:{valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},tickvals:{valType:"data_array",editType:"ticks"},ticktext:{valType:"data_array",editType:"ticks"},ticks:{valType:"enumerated",values:["outside","inside",""],editType:"ticks"},tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:{valType:"number",min:0,dflt:5,editType:"ticks"},tickwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},tickcolor:{valType:"color",dflt:a.defaultLine,editType:"ticks"},showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},automargin:{valType:"boolean",dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:o({},i,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor"],dflt:"data",editType:"none"},tickfont:n({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks"},tickformatstops:s("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:a.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:{valType:"boolean",editType:"ticks"},gridcolor:{valType:"color",dflt:a.lightLine,editType:"ticks"},gridwidth:{valType:"number",min:0,dflt:1,editType:"ticks"},zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:a.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:a.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"plot"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{autotick:{valType:"boolean",editType:"ticks"},title:{valType:"string",editType:"ticks"},titlefont:n({editType:"ticks"})}}},{"../../components/color/attributes":590,"../../components/drawing/attributes":611,"../../constants/docs":687,"../../lib/extend":707,"../../plot_api/plot_template":754,"../font_attributes":790,"./constants":770}],777:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../../plot_api/plot_template"),o=e("../layout_attributes"),s=e("./layout_attributes"),l=e("./type_defaults"),c=e("./axis_defaults"),u=e("./constraints").handleConstraintDefaults,d=e("./position_defaults"),p=e("./axis_ids"),h=p.id2name,f=p.name2id,m=e("../../registry"),g=m.traceIs,v=m.getComponentMethod;function y(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,r){var p,m,b={},_={},x={},w={},k={},M={},T={},C={},S={},L={};for(p=0;p<r.length;p++){var A=r[p];if(g(A,"cartesian")||g(A,"gl2d")){var E,D;if(A.xaxis)y(b,E=h(A.xaxis),A);else if(A.xaxes)for(m=0;m<A.xaxes.length;m++)y(b,h(A.xaxes[m]),A);if(A.yaxis)y(b,D=h(A.yaxis),A);else if(A.yaxes)for(m=0;m<A.yaxes.length;m++)y(b,h(A.yaxes[m]),A);"funnel"===A.type?"h"===A.orientation?(E&&(_[E]=!0),D&&(T[D]=!0)):D&&(x[D]=!0):"image"===A.type?(D&&(C[D]=!0),E&&(C[E]=!0)):(D&&(k[D]=!0,M[D]=!0),g(A,"carpet")&&("carpet"!==A.type||A._cheater)||E&&(w[E]=!0)),"carpet"===A.type&&A._cheater&&E&&(_[E]=!0),g(A,"2dMap")&&(S[E]=!0,S[D]=!0),g(A,"oriented")&&(L["h"===A.orientation?D:E]=!0)}}var I=t._subplots,P=I.xaxis,O=I.yaxis,R=n.simpleMap(P,h),F=n.simpleMap(O,h),z=R.concat(F),N=a.background;P.length&&O.length&&(N=n.coerce(e,t,o,"plot_bgcolor"));var j,B,Y,H,V=a.combine(N,t.paper_bgcolor);function U(e,t){return n.coerce(Y,H,s,e,t)}function W(e,t){return n.coerce2(Y,H,s,e,t)}function G(e){return"x"===e?O:P}var q={x:G("x"),y:G("y")},K=q.x.concat(q.y);function X(t,r){for(var n="x"===t?R:F,a=[],i=0;i<n.length;i++){var o=n[i];o===r||(e[o]||{}).overlaying||a.push(f(o))}return a}for(p=0;p<z.length;p++){B=(j=z[p]).charAt(0),n.isPlainObject(e[j])||(e[j]={}),Y=e[j],H=i.newContainer(t,j,B+"axis");var Z=b[j]||[];H._traceIndices=Z.map((function(e){return e._expandedIndex})),H._annIndices=[],H._shapeIndices=[],H._imgIndices=[],H._subplotsWith=[],H._counterAxes=[],H._name=H._attr=j;var J=H._id=f(j),$=X(B,j),Q="x"===B&&!w[j]&&_[j]||"y"===B&&!k[j]&&x[j],ee="y"===B&&(!M[j]&&T[j]||C[j]),te={letter:B,font:t.font,outerTicks:S[j],showGrid:!L[j],data:Z,bgColor:V,calendar:t.calendar,automargin:!0,visibleDflt:Q,reverseDflt:ee,splomStash:((t._splomAxes||{})[B]||{})[J]};U("uirevision",t.uirevision),l(Y,H,U,te),c(Y,H,U,te,t);var re=W("spikecolor"),ne=W("spikethickness"),ae=W("spikedash"),ie=W("spikemode"),oe=W("spikesnap");U("showspikes",!!(re||ne||ae||ie||oe))||(delete H.spikecolor,delete H.spikethickness,delete H.spikedash,delete H.spikemode,delete H.spikesnap),d(Y,H,U,{letter:B,counterAxes:q[B],overlayableAxes:$,grid:t.grid}),U("title.standoff"),H._input=Y}var se=v("rangeslider","handleDefaults"),le=v("rangeselector","handleDefaults");for(p=0;p<R.length;p++)j=R[p],Y=e[j],H=t[j],se(e,t,j),"date"===H.type&&le(Y,H,t,F,H.calendar),U("fixedrange");for(p=0;p<F.length;p++){j=F[p],Y=e[j],H=t[j];var ce=t[h(H.anchor)];U("fixedrange",v("rangeslider","isVisible")(ce))}var ue=t._axisConstraintGroups=[],de=t._axisMatchGroups=[];for(p=0;p<z.length;p++){var pe,he;B=(j=z[p]).charAt(0),Y=e[j],H=t[j],pe="y"===B&&!Y.hasOwnProperty("scaleanchor")&&C[j]?H.anchor:void 0,he=!Y.hasOwnProperty("constrain")&&C[j]?"domain":void 0,u(Y,H,U,{allAxisIds:K,layoutOut:t,scaleanchorDflt:pe,constrainDflt:he})}for(p=0;p<de.length;p++){var fe,me=de[p],ge=null,ve=null;for(fe in me)(H=t[h(fe)]).matches||(ge=H.range,ve=H.autorange);if(null===ge||null===ve)for(fe in me){ge=(H=t[h(fe)]).range,ve=H.autorange;break}for(fe in me)(H=t[h(fe)]).matches&&(H.range=ge.slice(),H.autorange=ve),H._matchGroup=me;if(ue.length)for(fe in me)for(m=0;m<ue.length;m++){var ye=ue[m];for(var be in ye)fe===be&&(n.warn("Axis "+be+" is set with both a *scaleanchor* and *matches* constraint; ignoring the scale constraint."),delete ye[be],Object.keys(ye).length<2&&ue.splice(m,1))}}}},{"../../components/color":591,"../../lib":716,"../../plot_api/plot_template":754,"../../registry":845,"../layout_attributes":816,"./axis_defaults":766,"./axis_ids":767,"./constraints":771,"./layout_attributes":776,"./position_defaults":779,"./type_defaults":787}],778:[function(e,t,r){"use strict";var n=e("tinycolor2").mix,a=e("../../components/color/attributes").lightFraction,i=e("../../lib");t.exports=function(e,t,r,o){var s=(o=o||{}).dfltColor;function l(r,n){return i.coerce2(e,t,o.attributes,r,n)}var c=l("linecolor",s),u=l("linewidth");r("showline",o.showLine||!!c||!!u)||(delete t.linecolor,delete t.linewidth);var d=l("gridcolor",n(s,o.bgColor,o.blend||a).toRgbString()),p=l("gridwidth");if(r("showgrid",o.showGrid||!!d||!!p)||(delete t.gridcolor,delete t.gridwidth),!o.noZeroLine){var h=l("zerolinecolor",s),f=l("zerolinewidth");r("zeroline",o.showGrid||!!h||!!f)||(delete t.zerolinecolor,delete t.zerolinewidth)}}},{"../../components/color/attributes":590,"../../lib":716,tinycolor2:535}],779:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib");t.exports=function(e,t,r,i){var o,s,l,c,u=i.counterAxes||[],d=i.overlayableAxes||[],p=i.letter,h=i.grid;h&&(s=h._domains[p][h._axisMap[t._id]],o=h._anchors[t._id],s&&(l=h[p+"side"].split(" ")[0],c=h.domain[p]["right"===l||"top"===l?1:0])),s=s||[0,1],o=o||(n(e.position)?"free":u[0]||"free"),l=l||("x"===p?"bottom":"left"),c=c||0,"free"===a.coerce(e,t,{anchor:{valType:"enumerated",values:["free"].concat(u),dflt:o}},"anchor")&&r("position",c),a.coerce(e,t,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:l}},"side");var f=!1;if(d.length&&(f=a.coerce(e,t,{overlaying:{valType:"enumerated",values:[!1].concat(d),dflt:!1}},"overlaying")),!f){var m=r("domain",s);m[0]>m[1]-1/4096&&(t.domain=s),a.noneOrAll(e.domain,t.domain,s)}return r("layer"),t}},{"../../lib":716,"fast-isnumeric":227}],780:[function(e,t,r){"use strict";var n=e("../../constants/alignment").FROM_BL;t.exports=function(e,t,r){void 0===r&&(r=n[e.constraintoward||"center"]);var a=[e.r2l(e.range[0]),e.r2l(e.range[1])],i=a[0]+(a[1]-a[0])*r;e.range=e._input.range=[e.l2r(i+(a[0]-i)*t),e.l2r(i+(a[1]-i)*t)]}},{"../../constants/alignment":685}],781:[function(e,t,r){"use strict";var n=e("polybooljs"),a=e("../../registry"),i=e("../../components/color"),o=e("../../components/fx"),s=e("../../lib"),l=e("../../lib/polygon"),c=e("../../lib/throttle"),u=e("../../components/fx/helpers").makeEventData,d=e("./axis_ids").getFromId,p=e("../../lib/clear_gl_canvases"),h=e("../../plot_api/subroutines").redrawReglTraces,f=e("./constants"),m=f.MINSELECT,g=l.filter,v=l.tester;function y(e){return e._id}function b(e,t,r,n,a,i,o){var s,l,c,u,d,p,h,f,m,g=t._hoverdata,v=t._fullLayout.clickmode.indexOf("event")>-1,y=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(g)){k(e,t,i);var b=function(e,t){var r,n,a=e[0],i=-1,o=[];for(n=0;n<t.length;n++)if(r=t[n],a.fullData._expandedIndex===r.cd[0].trace._expandedIndex){if(!0===a.hoverOnBox)break;void 0!==a.pointNumber?i=a.pointNumber:void 0!==a.binNumber&&(i=a.binNumber,o=a.pointNumbers);break}return{pointNumber:i,pointNumbers:o,searchInfo:r}}(g,s=T(t,r,n,a));if(b.pointNumbers.length>0?function(e,t){var r,n,a,i=[];for(a=0;a<e.length;a++)(r=e[a]).cd[0].trace.selectedpoints&&r.cd[0].trace.selectedpoints.length>0&&i.push(r);if(1===i.length&&i[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(a=0;a<t.pointNumbers.length;a++)if(n.selectedpoints.indexOf(t.pointNumbers[a])<0)return!1;return!0}return!1}(s,b):function(e){var t,r,n,a=0;for(n=0;n<e.length;n++)if(t=e[n],(r=t.cd[0].trace).selectedpoints){if(r.selectedpoints.length>1)return!1;if((a+=r.selectedpoints.length)>1)return!1}return 1===a}(s)&&(p=S(b))){for(o&&o.remove(),m=0;m<s.length;m++)(l=s[m])._module.selectPoints(l,!1);L(t,s),M(i),v&&t.emit("plotly_deselect",null)}else{for(h=e.shiftKey&&(void 0!==p?p:S(b)),c=function(e,t,r){return{pointNumber:e,searchInfo:t,subtract:r}}(b.pointNumber,b.searchInfo,h),u=w(i.selectionDefs.concat([c])),m=0;m<s.length;m++)if(d=A(s[m]._module.selectPoints(s[m],u),s[m]),y.length)for(var _=0;_<d.length;_++)y.push(d[_]);else y=d;L(t,s,f={points:y}),c&&i&&i.selectionDefs.push(c),o&&C(i.mergedPolygons,o),v&&t.emit("plotly_selected",f)}}}function _(e){return"pointNumber"in e&&"searchInfo"in e}function x(e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(t,r,n,a){var i=e.searchInfo.cd[0].trace._expandedIndex;return a.cd[0].trace._expandedIndex===i&&n===e.pointNumber},isRect:!1,degenerate:!1,subtract:e.subtract}}function w(e){for(var t=[],r=_(e[0])?0:e[0][0][0],n=r,a=_(e[0])?0:e[0][0][1],i=a,o=0;o<e.length;o++)if(_(e[o]))t.push(x(e[o]));else{var s=l.tester(e[o]);s.subtract=e[o].subtract,t.push(s),r=Math.min(r,s.xmin),n=Math.max(n,s.xmax),a=Math.min(a,s.ymin),i=Math.max(i,s.ymax)}return{xmin:r,xmax:n,ymin:a,ymax:i,pts:[],contains:function(e,r,n,a){for(var i=!1,o=0;o<t.length;o++)t[o].contains(e,r,n,a)&&(i=!1===t[o].subtract);return i},isRect:!1,degenerate:!1}}function k(e,t,r){var n=t._fullLayout,a=r.plotinfo,i=n._lastSelectedSubplot&&n._lastSelectedSubplot===a.id,o=e.shiftKey||e.altKey;i&&o&&a.selection&&a.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=a.selection.selectionDefs,r.mergedPolygons=a.selection.mergedPolygons):o&&a.selection||M(r),i||(E(t),n._lastSelectedSubplot=a.id)}function M(e){var t=e.plotinfo;t.selection={},t.selection.selectionDefs=e.selectionDefs=[],t.selection.mergedPolygons=e.mergedPolygons=[]}function T(e,t,r,n){var a,i,o,s=[],l=t.map(y),c=r.map(y);for(o=0;o<e.calcdata.length;o++)if(!0===(i=(a=e.calcdata[o])[0].trace).visible&&i._module&&i._module.selectPoints)if(!n||i.subplot!==n&&i.geo!==n)if("splom"===i.type&&i._xaxes[l[0]]&&i._yaxes[c[0]]){var u=h(i._module,a,t[0],r[0]);u.scene=e._fullLayout._splomScenes[i.uid],s.push(u)}else if("sankey"===i.type){var p=h(i._module,a,t[0],r[0]);s.push(p)}else{if(-1===l.indexOf(i.xaxis))continue;if(-1===c.indexOf(i.yaxis))continue;s.push(h(i._module,a,d(e,i.xaxis),d(e,i.yaxis)))}else s.push(h(i._module,a,t[0],r[0]));return s;function h(e,t,r,n){return{_module:e,cd:t,xaxis:r,yaxis:n}}}function C(e,t){var r,n,a=[];for(r=0;r<e.length;r++){var i=e[r];a.push(i.join("L")+"L"+i[0])}n=e.length>0?"M"+a.join("M")+"Z":"M0,0Z",t.attr("d",n)}function S(e){var t=e.searchInfo.cd[0].trace,r=e.pointNumber,n=e.pointNumbers,a=n.length>0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(a)>-1}function L(e,t,r){var n,i,o,s;for(n=0;n<t.length;n++){var l=t[n].cd[0].trace._fullInput,c=e._fullLayout._tracePreGUI[l.uid]||{};void 0===c.selectedpoints&&(c.selectedpoints=l._input.selectedpoints||null)}if(r){var u=r.points||[];for(n=0;n<t.length;n++)(s=t[n].cd[0].trace)._input.selectedpoints=s._fullInput.selectedpoints=[],s._fullInput!==s&&(s.selectedpoints=[]);for(n=0;n<u.length;n++){var d=u[n],f=d.data,m=d.fullData;d.pointIndices?([].push.apply(f.selectedpoints,d.pointIndices),s._fullInput!==s&&[].push.apply(m.selectedpoints,d.pointIndices)):(f.selectedpoints.push(d.pointIndex),s._fullInput!==s&&m.selectedpoints.push(d.pointIndex))}}else for(n=0;n<t.length;n++)delete(s=t[n].cd[0].trace).selectedpoints,delete s._input.selectedpoints,s._fullInput!==s&&delete s._fullInput.selectedpoints;var g=!1;for(n=0;n<t.length;n++){s=(o=(i=t[n]).cd)[0].trace,a.traceIs(s,"regl")&&(g=!0);var v=i._module,y=v.styleOnSelect||v.style;y&&(y(e,o,o[0].node3),o[0].nodeRangePlot3&&y(e,o,o[0].nodeRangePlot3))}g&&(p(e),h(e))}function A(e,t){if(Array.isArray(e))for(var r=t.cd,n=t.cd[0].trace,a=0;a<e.length;a++)e[a]=u(e[a],n,r);return e}function E(e){var t=(e._fullLayout||{})._zoomlayer;t&&t.selectAll(".select-outline").remove()}t.exports={prepSelect:function(e,t,r,a,l){var u,d,p,h,y,_,x,S=a.gd,E=S._fullLayout,D=E._zoomlayer,I=a.element.getBoundingClientRect(),P=a.plotinfo,O=P.xaxis._offset,R=P.yaxis._offset,F=t-I.left,z=r-I.top,N=F,j=z,B="M"+F+","+z,Y=a.xaxes[0]._length,H=a.yaxes[0]._length,V=a.xaxes.concat(a.yaxes),U=e.altKey;k(e,S,a),"lasso"===l&&(u=g([[F,z]],f.BENDPX));var W=D.selectAll("path.select-outline-"+P.id).data([1,2]);W.enter().append("path").attr("class",(function(e){return"select-outline select-outline-"+e+" select-outline-"+P.id})).attr("transform","translate("+O+", "+R+")").attr("d",B+"Z");var G,q=D.append("path").attr("class","zoombox-corners").style({fill:i.background,stroke:i.defaultLine,"stroke-width":1}).attr("transform","translate("+O+", "+R+")").attr("d","M0,0Z"),K=E._uid+f.SELECTID,X=[],Z=T(S,a.xaxes,a.yaxes,a.subplot);function J(e,t){return"log"===e.type?e.p2d(t):e.p2r(t)}function $(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return J(e,r[t])}}function Q(e,t){return e-t}G=P.fillRangeItems?P.fillRangeItems:"select"===l?function(e,t){var r=e.range={};for(y=0;y<V.length;y++){var n=V[y],a=n._id.charAt(0);r[n._id]=[J(n,t[a+"min"]),J(n,t[a+"max"])].sort(Q)}}:function(e,t,r){var n=e.lassoPoints={};for(y=0;y<V.length;y++){var a=V[y];n[a._id]=r.filtered.map($(a))}},a.moveFn=function(e,t){N=Math.max(0,Math.min(Y,e+F)),j=Math.max(0,Math.min(H,t+z));var r=Math.abs(N-F),i=Math.abs(j-z);if("select"===l){var o=E.selectdirection;"h"===(o="any"===E.selectdirection?i<Math.min(.6*r,m)?"h":r<Math.min(.6*i,m)?"v":"d":E.selectdirection)?((h=[[F,0],[F,H],[N,H],[N,0]]).xmin=Math.min(F,N),h.xmax=Math.max(F,N),h.ymin=Math.min(0,H),h.ymax=Math.max(0,H),q.attr("d","M"+h.xmin+","+(z-m)+"h-4v"+2*m+"h4ZM"+(h.xmax-1)+","+(z-m)+"h4v"+2*m+"h-4Z")):"v"===o?((h=[[0,z],[0,j],[Y,j],[Y,z]]).xmin=Math.min(0,Y),h.xmax=Math.max(0,Y),h.ymin=Math.min(z,j),h.ymax=Math.max(z,j),q.attr("d","M"+(F-m)+","+h.ymin+"v-4h"+2*m+"v4ZM"+(F-m)+","+(h.ymax-1)+"v4h"+2*m+"v-4Z")):"d"===o&&((h=[[F,z],[F,j],[N,j],[N,z]]).xmin=Math.min(F,N),h.xmax=Math.max(F,N),h.ymin=Math.min(z,j),h.ymax=Math.max(z,j),q.attr("d","M0,0Z"))}else"lasso"===l&&(u.addPt([N,j]),h=u.filtered);a.selectionDefs&&a.selectionDefs.length?(p=function(e,t,r){return r?n.difference({regions:e,inverted:!1},{regions:[t],inverted:!1}).regions:n.union({regions:e,inverted:!1},{regions:[t],inverted:!1}).regions}(a.mergedPolygons,h,U),h.subtract=U,d=w(a.selectionDefs.concat([h]))):(p=[h],d=v(h)),C(p,W),c.throttle(K,f.SELECTDELAY,(function(){var e;X=[];var t,r=[];for(y=0;y<Z.length;y++)if(t=(_=Z[y])._module.selectPoints(_,d),r.push(t),e=A(t,_),X.length)for(var n=0;n<e.length;n++)X.push(e[n]);else X=e;L(S,Z,x={points:X}),G(x,h,u),a.gd.emit("plotly_selecting",x)}))},a.clickFn=function(e,t){var r=E.clickmode;q.remove(),c.done(K).then((function(){if(c.clear(K),2===e){for(W.remove(),y=0;y<Z.length;y++)(_=Z[y])._module.selectPoints(_,!1);L(S,Z),M(a),S.emit("plotly_deselect",null)}else r.indexOf("select")>-1&&b(t,S,a.xaxes,a.yaxes,a.subplot,a,W),"event"===r&&S.emit("plotly_selected",void 0);o.click(S,t)})).catch(s.error)},a.doneFn=function(){q.remove(),c.done(K).then((function(){c.clear(K),a.gd.emit("plotly_selected",x),h&&a.selectionDefs&&(h.subtract=U,a.selectionDefs.push(h),a.mergedPolygons.length=0,[].push.apply(a.mergedPolygons,p)),a.doneFnCompleted&&a.doneFnCompleted(X)})).catch(s.error)}},clearSelect:E,selectOnClick:b}},{"../../components/color":591,"../../components/fx":629,"../../components/fx/helpers":626,"../../lib":716,"../../lib/clear_gl_canvases":701,"../../lib/polygon":728,"../../lib/throttle":741,"../../plot_api/subroutines":755,"../../registry":845,"./axis_ids":767,"./constants":770,polybooljs:474}],782:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=i.cleanNumber,s=i.ms2DateTime,l=i.dateTime2ms,c=i.ensureNumber,u=i.isArrayOrTypedArray,d=e("../../constants/numerical"),p=d.FP_SAFE,h=d.BADNUM,f=d.LOG_CLIP,m=e("./constants"),g=e("./axis_ids");function v(e){return Math.pow(10,e)}function y(e){return null!=e}t.exports=function(e,t){t=t||{};var r=e._id||"x",d=r.charAt(0);function b(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],a=e.range[1];return.5*(n+a-2*f*Math.abs(n-a))}return h}function _(t,r,n){var o=l(t,n||e.calendar);if(o===h){if(!a(t))return h;t=+t;var s=Math.floor(10*i.mod(t+.05,1)),c=Math.round(t-s/10);o=l(new Date(c))+s/10}return o}function x(t,r,n){return s(t,r,n||e.calendar)}function w(t){return e._categories[Math.round(t)]}function k(t){if(y(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return h}function M(t){if(e._categoriesMap)return e._categoriesMap[t]}function T(e){var t=M(e);return void 0!==t?t:a(e)?+e:void 0}function C(t){return a(t)?n.round(e._b+e._m*t,2):h}function S(t){return(t-e._b)/e._m}e.c2l="log"===e.type?b:c,e.l2c="log"===e.type?v:c,e.l2p=C,e.p2l=S,e.c2p="log"===e.type?function(e,t){return C(b(e,t))}:C,e.p2c="log"===e.type?function(e){return v(S(e))}:S,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=o,e.c2d=e.c2r=e.l2d=e.l2r=c,e.d2p=e.r2p=function(t){return e.l2p(o(t))},e.p2d=e.p2r=S,e.cleanPos=c):"log"===e.type?(e.d2r=e.d2l=function(e,t){return b(o(e),t)},e.r2d=e.r2c=function(e){return v(o(e))},e.d2c=e.r2l=o,e.c2d=e.l2r=c,e.c2r=b,e.l2d=v,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return v(S(e))},e.r2p=function(t){return e.l2p(o(t))},e.p2r=S,e.cleanPos=c):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=_,e.c2d=e.c2r=e.l2d=e.l2r=x,e.d2p=e.r2p=function(t,r,n){return e.l2p(_(t,0,n))},e.p2d=e.p2r=function(e,t,r){return x(S(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,h,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=k,e.r2d=e.c2d=e.l2d=w,e.d2r=e.d2l_noadd=T,e.r2c=function(t){var r=T(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=c,e.r2l=T,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return w(S(e))},e.r2p=e.d2p,e.p2r=S,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:c(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=w,e.d2r=e.d2l_noadd=T,e.r2c=function(t){var r=T(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=M,e.l2r=e.c2r=c,e.r2l=T,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return w(S(e))},e.r2p=e.d2p,e.p2r=S,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:c(e)},e.setupMultiCategory=function(n){var a,o,s=e._traceIndices,l=t._axisMatchGroups;if(l&&l.length&&0===e._categories.length)for(a=0;a<l.length;a++){var c=l[a];if(c[r])for(var p in c)if(p!==r){var h=t[g.id2name(p)];s=s.concat(h._traceIndices)}}var f=[[0,{}],[0,{}]],m=[];for(a=0;a<s.length;a++){var v=n[s[a]];if(d in v){var b=v[d],_=v._length||i.minRowLength(b);if(u(b[0])&&u(b[1]))for(o=0;o<_;o++){var x=b[0][o],w=b[1][o];y(x)&&y(w)&&(m.push([x,w]),x in f[0][1]||(f[0][1][x]=f[0][0]++),w in f[1][1]||(f[1][1][w]=f[1][0]++))}}}for(m.sort((function(e,t){var r=f[0][1],n=r[e[0]]-r[t[0]];if(n)return n;var a=f[1][1];return a[e[1]]-a[t[1]]})),a=0;a<m.length;a++)k(m[a])}),e.fraction2r=function(t){var r=e.r2l(e.range[0]),n=e.r2l(e.range[1]);return e.l2r(r+t*(n-r))},e.r2fraction=function(t){var r=e.r2l(e.range[0]),n=e.r2l(e.range[1]);return(e.r2l(t)-r)/(n-r)},e.cleanRange=function(t,r){r||(r={}),t||(t="range");var n,o,s=i.nestedProperty(e,t).get();if(o=(o="date"===e.type?i.dfltRange(e.calendar):"y"===d?m.DFLTRANGEY:r.dfltRange||m.DFLTRANGEX).slice(),"tozero"!==e.rangemode&&"nonnegative"!==e.rangemode||(o[0]=0),s&&2===s.length)for("date"!==e.type||e.autorange||(s[0]=i.cleanDate(s[0],h,e.calendar),s[1]=i.cleanDate(s[1],h,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(s[n],e.calendar)){e[t]=o;break}if(e.r2l(s[0])===e.r2l(s[1])){var l=i.constrain(e.r2l(s[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);s[0]=e.l2r(l-1e3),s[1]=e.l2r(l+1e3);break}}else{if(!a(s[n])){if(!a(s[1-n])){e[t]=o;break}s[n]=s[1-n]*(n?10:.1)}if(s[n]<-p?s[n]=-p:s[n]>p&&(s[n]=p),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else i.nestedProperty(e,t).set(o)},e.setScale=function(r){var n=t._size;if(e.overlaying){var a=g.getFromId({_fullLayout:t},e.overlaying);e.domain=a.domain}var i=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(i);var s=e.r2l(e[i][0],o),l=e.r2l(e[i][1],o);if("y"===d?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(s-l),e._b=-e._m*l):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(l-s),e._b=-e._m*s),!isFinite(e._m)||!isFinite(e._b)||e._length<0)throw t._replotting=!1,new Error("Something went wrong with axis scaling")},e.makeCalcdata=function(t,r){var n,a,o,s,l=e.type,c="date"===l&&t[r+"calendar"];if(r in t){if(n=t[r],s=t._length||i.minRowLength(n),i.isTypedArray(n)&&("linear"===l||"log"===l)){if(s===n.length)return n;if(n.subarray)return n.subarray(0,s)}if("multicategory"===l)return function(e,t){for(var r=new Array(t),n=0;n<t;n++){var a=(e[0]||[])[n],i=(e[1]||[])[n];r[n]=M([a,i])}return r}(n,s);for(a=new Array(s),o=0;o<s;o++)a[o]=e.d2c(n[o],0,c)}else{var u=r+"0"in t?e.d2c(t[r+"0"],0,c):0,d=t["d"+r]?Number(t["d"+r]):1;for(n=t[{x:"y",y:"x"}[r]],s=t._length||n.length,a=new Array(s),o=0;o<s;o++)a[o]=u+o*d}return a},e.isValidRange=function(t){return Array.isArray(t)&&2===t.length&&a(e.r2l(t[0]))&&a(e.r2l(t[1]))},e.isPtWithinRange=function(t,r){var n=e.c2l(t[d],null,r),a=e.r2l(e.range[0]),i=e.r2l(e.range[1]);return a<i?a<=n&&n<=i:i<=n&&n<=a},e.clearCalc=function(){var n=function(){e._categories=[],e._categoriesMap={}},a=t._axisMatchGroups;if(a&&a.length){for(var i=!1,o=0;o<a.length;o++){var s=a[o];if(s[r]){i=!0;var l=null,c=null;for(var u in s){var d=t[g.id2name(u)];if(d._categories){l=d._categories,c=d._categoriesMap;break}}l&&c?(e._categories=l,e._categoriesMap=c):n();break}}i||n()}else n();if(e._initialCategories)for(var p=0;p<e._initialCategories.length;p++)k(e._initialCategories[p])},e.sortByInitialCategories=function(){var n=[];if(e._categories=[],e._categoriesMap={},e._initialCategories)for(var a=0;a<e._initialCategories.length;a++)k(e._initialCategories[a]);n=n.concat(e._traceIndices);var i=e._matchGroup;for(var o in i)if(r!==o){var s=t[g.id2name(o)];s._categories=e._categories,s._categoriesMap=e._categoriesMap,n=n.concat(s._traceIndices)}return n};var L=t._d3locale;"date"===e.type&&(e._dateFormat=L?L.timeFormat.utc:n.time.format.utc,e._extraFormat=t._extraFormat),e._separators=t.separators,e._numFormat=L?L.numberFormat:n.format,delete e._minDtick,delete e._forceTick0}},{"../../constants/numerical":692,"../../lib":716,"./axis_ids":767,"./constants":770,d3:164,"fast-isnumeric":227}],783:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes"),i=e("../array_container_defaults");function o(e){var t=["showexponent","showtickprefix","showticksuffix"].filter((function(t){return void 0!==e[t]}));if(t.every((function(r){return e[r]===e[t[0]]}))||1===t.length)return e[t[0]]}function s(e,t){function r(r,i){return n.coerce(e,t,a.tickformatstops,r,i)}r("enabled")&&(r("dtickrange"),r("value"))}t.exports=function(e,t,r,l,c,u){u&&1!==u.pass||function(e,t,r,n,a){var i=o(e);r("tickprefix")&&r("showtickprefix",i),r("ticksuffix",a.tickSuffixDflt)&&r("showticksuffix",i)}(e,0,r,0,c),u&&2!==u.pass||function(e,t,r,l,c){var u=o(e);if(r("tickprefix")&&r("showtickprefix",u),r("ticksuffix",c.tickSuffixDflt)&&r("showticksuffix",u),r("showticklabels")){var d=c.font||{},p=t.color,h=p&&p!==a.color.dflt?p:d.color;if(n.coerceFont(r,"tickfont",{family:d.family,size:d.size,color:h}),r("tickangle"),"category"!==l){var f=r("tickformat"),m=e.tickformatstops;Array.isArray(m)&&m.length&&i(e,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:s}),f||"date"===l||(r("showexponent",u),r("exponentformat"),r("separatethousands"))}}}(e,t,r,l,c)}},{"../../lib":716,"../array_container_defaults":760,"./layout_attributes":776}],784:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r,i){var o=n.coerce2(e,t,a,"ticklen"),s=n.coerce2(e,t,a,"tickwidth"),l=n.coerce2(e,t,a,"tickcolor",t.color);r("ticks",i.outerTicks||o||s||l?"outside":"")||(delete t.ticklen,delete t.tickwidth,delete t.tickcolor)}},{"../../lib":716,"./layout_attributes":776}],785:[function(e,t,r){"use strict";var n=e("./clean_ticks");t.exports=function(e,t,r,a){var i;if("auto"===(i="array"!==e.tickmode||"log"!==a&&"date"!==a?r("tickmode",Array.isArray(e.tickvals)?"array":e.dtick?"linear":"auto"):t.tickmode="auto"))r("nticks");else if("linear"===i){var o=t.dtick=n.dtick(e.dtick,a);t.tick0=n.tick0(e.tick0,a,t.calendar,o)}else"multicategory"!==a&&(void 0===r("tickvals")?t.tickmode="auto":r("ticktext"))}},{"./clean_ticks":769}],786:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../lib"),o=e("../../components/drawing"),s=e("./axes");t.exports=function(e,t,r,l){var c=e._fullLayout;if(0!==t.length){var u,d,p,h;l&&(u=l());var f=n.ease(r.easing);return e._transitionData._interruptCallbacks.push((function(){return window.cancelAnimationFrame(h),h=null,function(){for(var r={},n=0;n<t.length;n++){var i=t[n],o=i.plotinfo.xaxis,s=i.plotinfo.yaxis;i.xr0&&(r[o._name+".range"]=i.xr0.slice()),i.yr0&&(r[s._name+".range"]=i.yr0.slice())}return a.call("relayout",e,r).then((function(){for(var e=0;e<t.length;e++)m(t[e].plotinfo)}))}()})),d=Date.now(),h=window.requestAnimationFrame((function n(){p=Date.now();for(var i=Math.min(1,(p-d)/r.duration),o=f(i),s=0;s<t.length;s++)g(t[s],o);p-d>r.duration?(function(){for(var r={},n=0;n<t.length;n++){var i=t[n],o=i.plotinfo.xaxis,s=i.plotinfo.yaxis;i.xr1&&(r[o._name+".range"]=i.xr1.slice()),i.yr1&&(r[s._name+".range"]=i.yr1.slice())}u&&u(),a.call("relayout",e,r).then((function(){for(var e=0;e<t.length;e++)m(t[e].plotinfo)}))}(),h=window.cancelAnimationFrame(n)):h=window.requestAnimationFrame(n)})),Promise.resolve()}function m(e){var t=e.xaxis,r=e.yaxis;c._defs.select("#"+e.clipId+"> rect").call(o.setTranslate,0,0).call(o.setScale,1,1),e.plot.call(o.setTranslate,t._offset,r._offset).call(o.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,a=n.xaxis,l=n.yaxis,c=a._length,u=l._length,d=!!t.xr1,p=!!t.yr1,h=[];if(d){var f=i.simpleMap(t.xr0,a.r2l),m=i.simpleMap(t.xr1,a.r2l),g=f[1]-f[0],v=m[1]-m[0];h[0]=(f[0]*(1-r)+r*m[0]-f[0])/(f[1]-f[0])*c,h[2]=c*(1-r+r*v/g),a.range[0]=a.l2r(f[0]*(1-r)+r*m[0]),a.range[1]=a.l2r(f[1]*(1-r)+r*m[1])}else h[0]=0,h[2]=c;if(p){var y=i.simpleMap(t.yr0,l.r2l),b=i.simpleMap(t.yr1,l.r2l),_=y[1]-y[0],x=b[1]-b[0];h[1]=(y[1]*(1-r)+r*b[1]-y[1])/(y[0]-y[1])*u,h[3]=u*(1-r+r*x/_),l.range[0]=a.l2r(y[0]*(1-r)+r*b[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*b[1])}else h[1]=0,h[3]=u;s.drawOne(e,a,{skipTitle:!0}),s.drawOne(e,l,{skipTitle:!0}),s.redrawComponents(e,[a._id,l._id]);var w=d?c/h[2]:1,k=p?u/h[3]:1,M=d?h[0]:0,T=p?h[1]:0,C=d?h[0]/h[2]*c:0,S=p?h[1]/h[3]*u:0,L=a._offset-C,A=l._offset-S;n.clipRect.call(o.setTranslate,M,T).call(o.setScale,1/w,1/k),n.plot.call(o.setTranslate,L,A).call(o.setScale,w,k),o.setPointGroupScale(n.zoomScalePts,1/w,1/k),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/k)}s.redrawComponents(e)}},{"../../components/drawing":612,"../../lib":716,"../../registry":845,"./axes":764,d3:164}],787:[function(e,t,r){"use strict";var n=e("../../registry").traceIs,a=e("./axis_autotype");function i(e){return{v:"x",h:"y"}[e.orientation||"v"]}function o(e,t){var r=i(e),a=n(e,"box-violin"),o=n(e._fullInput||{},"candlestick");return a&&!o&&t===r&&void 0===e[r]&&void 0===e[r+"0"]}t.exports=function(e,t,r,s){"-"===r("type",(s.splomStash||{}).type)&&(function(e,t){if("-"===e.type){var r=e._id,s=r.charAt(0);-1!==r.indexOf("scene")&&(r=s);var l=function(e,t,r){for(var n=0;n<e.length;n++){var a=e[n];if("splom"===a.type&&a._length>0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(o(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}(t,r,s);if(l)if("histogram"!==l.type||s!=={v:"y",h:"x"}[l.orientation||"v"]){var c,u=s+"calendar",d=l[u],p={noMultiCategory:!n(l,"cartesian")||n(l,"noMultiCategory")};if(o(l,s)){var h=i(l),f=[];for(c=0;c<t.length;c++){var m=t[c];n(m,"box-violin")&&(m[s+"axis"]||s)===r&&(void 0!==m[h]?f.push(m[h][0]):void 0!==m.name?f.push(m.name):f.push("text"),m[u]!==d&&(d=void 0))}e.type=a(f,d,p)}else if("splom"===l.type){var g=l.dimensions[l._axesDim[r]];g.visible&&(e.type=a(g.values,d,p))}else e.type=a(l[s]||[l[s+"0"]],d,p)}else e.type="linear"}}(t,s.data),"-"===t.type?t.type="linear":e.type=t.type)}},{"../../registry":845,"./axis_autotype":765}],788:[function(e,t,r){"use strict";var n=e("../registry"),a=e("../lib");function i(e,t,r){var n,i,o,s=!1;if("data"===t.type)n=e._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;n=e._fullLayout}return i=a.nestedProperty(n,t.prop).get(),(o=r[t.type]=r[t.type]||{}).hasOwnProperty(t.prop)&&o[t.prop]!==i&&(s=!0),o[t.prop]=i,{changed:s,value:i}}function o(e,t){var r=[],n=t[0],i={};if("string"==typeof n)i[n]=t[1];else{if(!a.isPlainObject(n))return r;i=n}return l(i,(function(e,t,n){r.push({type:"layout",prop:e,value:n})}),"",0),r}function s(e,t){var r,n,i,o,s=[];if(n=t[0],i=t[1],r=t[2],o={},"string"==typeof n)o[n]=i;else{if(!a.isPlainObject(n))return s;o=n,void 0===r&&(r=i)}return void 0===r&&(r=null),l(o,(function(t,n,a){var i,o;if(Array.isArray(a)){o=a.slice();var l=Math.min(o.length,e.data.length);r&&(l=Math.min(l,r.length)),i=[];for(var c=0;c<l;c++)i[c]=r?r[c]:c}else o=a,i=r?r.slice():null;if(null===i)Array.isArray(o)&&(o=o[0]);else if(Array.isArray(i)){if(!Array.isArray(o)){var u=o;o=[];for(var d=0;d<i.length;d++)o[d]=u}o.length=Math.min(i.length,o.length)}s.push({type:"data",prop:t,traces:i,value:o})}),"",0),s}function l(e,t,r,n){Object.keys(e).forEach((function(i){var o=e[i];if("_"!==i[0]){var s=r+(n>0?".":"")+i;a.isPlainObject(o)?l(o,t,s,n+1):t(s,i,o)}}))}r.manageCommandObserver=function(e,t,n,o){var s={},l=!0;t&&t._commandObserver&&(s=t._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(e,n,s.lookupTable);if(t&&t._commandObserver){if(c)return s;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,s}if(c){i(e,c,s.cache),s.check=function(){if(l){var t=i(e,c,s.cache);return t.changed&&o&&void 0!==s.lookupTable[t.value]&&(s.disable(),Promise.resolve(o({value:t.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[t.value]})).then(s.enable,s.enable)),t.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],d=0;d<u.length;d++)e._internalOn(u[d],s.check);s.remove=function(){for(var t=0;t<u.length;t++)e._removeInternalListener(u[t],s.check)}}else a.log("Unable to automatically bind plot updates to API command"),s.lookupTable={},s.remove=function(){};return s.disable=function(){l=!1},s.enable=function(){l=!0},t&&(t._commandObserver=s),s},r.hasSimpleAPICommandBindings=function(e,t,n){var a,i,o=t.length;for(a=0;a<o;a++){var s,l=t[a],c=l.method,u=l.args;if(Array.isArray(u)||(u=[]),!c)return!1;var d=r.computeAPICommandBindings(e,c,u);if(1!==d.length)return!1;if(i){if((s=d[0]).type!==i.type)return!1;if(s.prop!==i.prop)return!1;if(Array.isArray(i.traces)){if(!Array.isArray(s.traces))return!1;s.traces.sort();for(var p=0;p<i.traces.length;p++)if(i.traces[p]!==s.traces[p])return!1}else if(s.prop!==i.prop)return!1}else i=d[0],Array.isArray(i.traces)&&i.traces.sort();var h=(s=d[0]).value;if(Array.isArray(h)){if(1!==h.length)return!1;h=h[0]}n&&(n[h]=a)}return i},r.executeAPICommand=function(e,t,r){if("skip"===t)return Promise.resolve();var i=n.apiMethodRegistry[t],o=[e];Array.isArray(r)||(r=[]);for(var s=0;s<r.length;s++)o.push(r[s]);return i.apply(null,o).catch((function(e){return a.warn("API call to Plotly."+t+" rejected.",e),Promise.reject(e)}))},r.computeAPICommandBindings=function(e,t,r){var n;switch(Array.isArray(r)||(r=[]),t){case"restyle":n=s(e,r);break;case"relayout":n=o(0,r);break;case"update":n=s(e,[r[0],r[2]]).concat(o(0,[r[1]]));break;case"animate":n=function(e,t){return Array.isArray(t[0])&&1===t[0].length&&-1!==["string","number"].indexOf(typeof t[0][0])?[{type:"layout",prop:"_currentFrame",value:t[0][0].toString()}]:[]}(0,r);break;default:n=[]}return n}},{"../lib":716,"../registry":845}],789:[function(e,t,r){"use strict";var n=e("../lib/extend").extendFlat;r.attributes=function(e,t){t=t||{};var r={valType:"info_array",editType:(e=e||{}).editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},a=(e.name&&e.name,e.trace,t.description&&t.description,{x:n({},r,{}),y:n({},r,{}),editType:e.editType});return e.noGridCell||(a.row={valType:"integer",min:0,dflt:0,editType:e.editType},a.column={valType:"integer",min:0,dflt:0,editType:e.editType}),a},r.defaults=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");void 0!==s&&(s<o.columns?a=o._domains.x[s]:delete e.domain.column);var l=r("domain.row");void 0!==l&&(l<o.rows?i=o._domains.y[l]:delete e.domain.row)}var c=r("domain.x",a),u=r("domain.y",i);c[0]<c[1]||(e.domain.x=a.slice()),u[0]<u[1]||(e.domain.y=i.slice())}},{"../lib/extend":707}],790:[function(e,t,r){"use strict";t.exports=function(e){var t=e.editType,r=e.colorEditType;void 0===r&&(r=t);var n={family:{valType:"string",noBlank:!0,strict:!0,editType:t},size:{valType:"number",min:1,editType:t},color:{valType:"color",editType:r},editType:t};return e.arrayOk&&(n.family.arrayOk=!0,n.size.arrayOk=!0,n.color.arrayOk=!0),n}},{}],791:[function(e,t,r){"use strict";t.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},{}],792:[function(e,t,r){"use strict";r.projNames={equirectangular:"equirectangular",mercator:"mercator",orthographic:"orthographic","natural earth":"naturalEarth",kavrayskiy7:"kavrayskiy7",miller:"miller",robinson:"robinson",eckert4:"eckert4","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant","conic equal area":"conicEqualArea","conic conformal":"conicConformal","conic equidistant":"conicEquidistant",gnomonic:"gnomonic",stereographic:"stereographic",mollweide:"mollweide",hammer:"hammer","transverse mercator":"transverseMercator","albers usa":"albersUsa","winkel tripel":"winkel3",aitoff:"aitoff",sinusoidal:"sinusoidal"},r.axesNames=["lonaxis","lataxis"],r.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},r.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},r.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]}},r.clipPad=.001,r.precision=.1,r.landColor="#F0DC82",r.waterColor="#3399FF",r.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},r.sphereSVG={type:"Sphere"},r.fillLayers={ocean:1,land:1,lakes:1},r.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},r.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],r.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],r.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},{}],793:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../lib"),o=e("../../components/color"),s=e("../../components/drawing"),l=e("../../components/fx"),c=e("../plots"),u=e("../cartesian/axes"),d=e("../../components/dragelement"),p=e("../cartesian/select").prepSelect,h=e("../cartesian/select").selectOnClick,f=e("./zoom"),m=e("./constants"),g=e("../../lib/topojson_utils"),v=e("topojson-client").feature;function y(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}e("./projections")(n);var b=y.prototype;t.exports=function(e){return new y(e)},b.plot=function(e,t,r){var n=this,a=t[this.id],i=!1;for(var o in m.layerNameToAdjective)if("frame"!==o&&a["show"+o]){i=!0;break}for(var s=0;s<e.length;s++)if(e[0][0].trace.locationmode){i=!0;break}if(!i)return n.update(e,t);var l=g.getTopojsonName(a);null===n.topojson||l!==n.topojsonName?(n.topojsonName=l,void 0===PlotlyGeoAssets.topojson[n.topojsonName]?r.push(n.fetchTopojson().then((function(r){PlotlyGeoAssets.topojson[n.topojsonName]=r,n.topojson=r,n.update(e,t)}))):(n.topojson=PlotlyGeoAssets.topojson[n.topojsonName],n.update(e,t))):n.update(e,t)},b.fetchTopojson=function(){var e=g.getTopojsonPath(this.topojsonURL,this.topojsonName);return new Promise((function(t,r){n.json(e,(function(n,a){if(n)return 404===n.status?r(new Error(["plotly.js could not find topojson file at",e,".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):r(new Error(["unexpected error while fetching topojson file at",e].join(" ")));t(a)}))}))},b.update=function(e,t){var r=t[this.id];if(!this.updateProjection(t,r)){this.hasChoropleth=!1;for(var n=0;n<e.length;n++)if("choropleth"===e[n][0].trace.type){this.hasChoropleth=!0;break}this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(t,r),this.updateDims(t,r),this.updateFx(t,r),c.generalUpdatePerTraceModule(this.graphDiv,this,e,r);var a=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=a.selectAll(".point"),this.dataPoints.text=a.selectAll("text"),this.dataPaths.line=a.selectAll(".js-line");var i=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=i.selectAll("path"),this.render()}},b.updateProjection=function(e,t){var r=e._size,o=t.domain,s=t.projection,l=s.rotation||{},c=t.center||{},u=this.projection=function(e){for(var t=e.projection.type,r=n.geo[m.projNames[t]](),a=e._isClipped?m.lonaxisSpan[t]/2:null,i=["center","rotate","parallels","clipExtent"],o=function(e){return e?r:[]},s=0;s<i.length;s++){var l=i[s];"function"!=typeof r[l]&&(r[l]=o)}return r.isLonLatOverEdges=function(e){if(null===r(e))return!0;if(a){var t=r.rotate();return n.geo.distance(e,[-t[0],-t[1]])>a*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(e){return r.getPath().bounds(e)},r.fitExtent=function(e,t){var n=e[1][0]-e[0][0],a=e[1][1]-e[0][1],i=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),i&&r.clipExtent(null);var o=r.getBounds(t),s=Math.min(n/(o[1][0]-o[0][0]),a/(o[1][1]-o[0][1])),l=+e[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+e[0][1]+(a-s*(o[1][1]+o[0][1]))/2;return i&&r.clipExtent(i),r.scale(150*s).translate([l,c])},r.precision(m.precision),a&&r.clipAngle(a-m.clipPad),r}(t);u.center([c.lon-l.lon,c.lat-l.lat]).rotate([-l.lon,-l.lat,l.roll]).parallels(s.parallels);var d=[[r.l+r.w*o.x[0],r.t+r.h*(1-o.y[1])],[r.l+r.w*o.x[1],r.t+r.h*(1-o.y[0])]],p=t.lonaxis,h=t.lataxis,f=function(e,t){var r=m.clipPad,n=e[0]+r,a=e[1]-r,i=t[0]+r,o=t[1]-r;n>0&&a<0&&(a+=360);var s=(a-n)/4;return{type:"Polygon",coordinates:[[[n,i],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[a,o],[a,i],[a-s,i],[a-2*s,i],[a-3*s,i],[n,i]]]}}(p.range,h.range);u.fitExtent(d,f);var g=this.bounds=u.getBounds(f),v=this.fitScale=u.scale(),y=u.translate();if(!isFinite(g[0][0])||!isFinite(g[0][1])||!isFinite(g[1][0])||!isFinite(g[1][1])||isNaN(y[0])||isNaN(y[0])){for(var b=this.graphDiv,_=["projection.rotation","center","lonaxis.range","lataxis.range"],x="Invalid geo settings, relayout'ing to default view.",w={},k=0;k<_.length;k++)w[this.id+"."+_[k]]=null;return this.viewInitial=null,i.warn(x),b._promises.push(a.call("relayout",b,w)),x}var M=this.midPt=[(g[0][0]+g[1][0])/2,(g[0][1]+g[1][1])/2];if(u.scale(s.scale*v).translate([y[0]+(M[0]-y[0]),y[1]+(M[1]-y[1])]).clipExtent(g),t._isAlbersUsa){var T=u([c.lon,c.lat]),C=u.translate();u.translate([C[0]-(T[0]-C[0]),C[1]-(T[1]-C[1])])}},b.updateBaseLayers=function(e,t){var r=this,a=r.topojson,i=r.layers,l=r.basePaths;function c(e){return"lonaxis"===e||"lataxis"===e}function d(e){return Boolean(m.lineLayers[e])}function p(e){return Boolean(m.fillLayers[e])}var h=(this.hasChoropleth?m.layersForChoropleth:m.layers).filter((function(e){return d(e)||p(e)?t["show"+e]:!c(e)||t[e].showgrid})),f=r.framework.selectAll(".layer").data(h,String);f.exit().each((function(e){delete i[e],delete l[e],n.select(this).remove()})),f.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=i[e]=n.select(this);"bg"===e?r.bgRect=t.append("rect").style("pointer-events","all"):c(e)?l[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):d(e)?l[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):p(e)&&(l[e]=t.append("path").style("stroke","none"))})),f.order(),f.each((function(r){var n=l[r],i=m.layerNameToAdjective[r];"frame"===r?n.datum(m.sphereSVG):d(r)||p(r)?n.datum(v(a,a.objects[r])):c(r)&&n.datum(function(e,t,r){var n,a,i,o=t[e],s=m.scopeDefaults[t.scope];"lonaxis"===e?(n=s.lonaxisRange,a=s.lataxisRange,i=function(e,t){return[e,t]}):"lataxis"===e&&(n=s.lataxisRange,a=s.lonaxisRange,i=function(e,t){return[t,e]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};u.setConvert(l,r);var c=u.calcTicks(l);t.isScoped||"lonaxis"!==e||c.pop();for(var d=c.length,p=new Array(d),h=0;h<d;h++)for(var f=c[h].x,g=p[h]=[],v=a[0];v<a[1]+2.5;v+=2.5)g.push(i(f,v));return{type:"MultiLineString",coordinates:p}}(r,t,e)).call(o.stroke,t[r].gridcolor).call(s.dashLine,"",t[r].gridwidth),d(r)?n.call(o.stroke,t[i+"color"]).call(s.dashLine,"",t[i+"width"]):p(r)&&n.call(o.fill,t[i+"color"])}))},b.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,a=r[0][0]-n,i=r[0][1]-n,l=r[1][0]-a+n,c=r[1][1]-i+n;s.setRect(this.clipRect,a,i,l,c),this.bgRect.call(s.setRect,a,i,l,c).call(o.fill,t.bgcolor),this.xaxis._offset=a,this.xaxis._length=l,this.yaxis._offset=i,this.yaxis._length=c},b.updateFx=function(e,t){var r=this,i=r.graphDiv,o=r.bgRect,s=e.dragmode,c=e.clickmode;if(!r.isStatic){var u;"select"===s?u=function(e,t){(e.range={})[r.id]=[g([t.xmin,t.ymin]),g([t.xmax,t.ymax])]}:"lasso"===s&&(u=function(e,t,n){(e.lassoPoints={})[r.id]=n.filtered.map(g)});var m={element:r.bgRect.node(),gd:i,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(t){2===t&&e._zoomlayer.selectAll(".select-outline").remove()}};"pan"===s?(o.node().onmousedown=null,o.call(f(r,t)),o.on("dblclick.zoom",(function(){var e=r.viewInitial,t={};for(var n in e)t[r.id+"."+n]=e[n];a.call("_guiRelayout",i,t),i.emit("plotly_doubleclick",null)})),i._context._scrollZoom.geo||o.on("wheel.zoom",null)):"select"!==s&&"lasso"!==s||(o.on(".zoom",null),m.prepFn=function(e,t,r){p(e,t,r,m,s)},d.init(m)),o.on("mousemove",(function(){var e=r.projection.invert(n.mouse(this));if(!e||isNaN(e[0])||isNaN(e[1]))return d.unhover(i,n.event);r.xaxis.p2c=function(){return e[0]},r.yaxis.p2c=function(){return e[1]},l.hover(i,n.event,r.id)})),o.on("mouseout",(function(){i._dragging||d.unhover(i,n.event)})),o.on("click",(function(){"select"!==s&&"lasso"!==s&&(c.indexOf("select")>-1&&h(n.event,i,[r.xaxis],[r.yaxis],r.id,m),c.indexOf("event")>-1&&l.click(i,n.event))}))}function g(e){return r.projection.invert([e[0]+r.xaxis._offset,e[1]+r.yaxis._offset])}},b.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,a="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",a),e.clipRect=e.clipDef.append("rect"),e.framework=n.select(e.container).append("g").attr("class","geo "+e.id).call(s.setClipUrl,a,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},u.setConvert(e.mockAxis,r)},b.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};e._isScoped?this.viewInitial={"center.lon":t.lon,"center.lat":t.lat,"projection.scale":r.scale}:e._isClipped?this.viewInitial={"projection.scale":r.scale,"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:this.viewInitial={"center.lon":t.lon,"center.lat":t.lat,"projection.scale":r.scale,"projection.rotation.lon":n.lon}},b.render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?"translate("+r[0]+","+r[1]+")":null}function a(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return r(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",a).attr("transform",n)}},{"../../components/color":591,"../../components/dragelement":609,"../../components/drawing":612,"../../components/fx":629,"../../lib":716,"../../lib/topojson_utils":743,"../../registry":845,"../cartesian/axes":764,"../cartesian/select":781,"../plots":825,"./constants":792,"./projections":797,"./zoom":798,d3:164,"topojson-client":538}],794:[function(e,t,r){"use strict";var n=e("../../plots/get_data").getSubplotCalcData,a=e("../../lib").counterRegex,i=e("./geo"),o="geo",s=a(o),l={};l[o]={valType:"subplotid",dflt:o,editType:"calc"},t.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,a=t._subplots[o],s=0;s<a.length;s++){var l=a[s],c=n(r,o,l),u=t[l]._subplot;u||(u=i({id:l,graphDiv:e,container:t._geolayer.node(),topojsonURL:e._context.topojsonURL,staticPlot:e._context.staticPlot}),t[l]._subplot=u),u.plot(c,t,e._promises)}},updateFx:function(e){for(var t=e._fullLayout,r=t._subplots[o],n=0;n<r.length;n++){var a=t[r[n]];a._subplot.updateFx(t,a)}},clean:function(e,t,r,n){for(var a=n._subplots[o]||[],i=0;i<a.length;i++){var s=a[i],l=n[s]._subplot;!t[s]&&l&&(l.framework.remove(),l.clipDef.remove())}}}},{"../../lib":716,"../../plots/get_data":799,"./geo":793,"./layout_attributes":795,"./layout_defaults":796}],795:[function(e,t,r){"use strict";var n=e("../../components/color/attributes"),a=e("../domain").attributes,i=e("./constants"),o=e("../../plot_api/edit_types").overrideAll,s={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:n.lightLine},gridwidth:{valType:"number",min:0,dflt:1}};(t.exports=o({domain:a({name:"geo"},{}),resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:Object.keys(i.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:Object.keys(i.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:n.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:i.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:i.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:i.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:i.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:n.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:n.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:n.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:n.background},lonaxis:s,lataxis:s},"plot","from-root")).uirevision={valType:"any",editType:"none"}},{"../../components/color/attributes":590,"../../plot_api/edit_types":747,"../domain":789,"./constants":792}],796:[function(e,t,r){"use strict";var n=e("../subplot_defaults"),a=e("./constants"),i=e("./layout_attributes"),o=a.axesNames;function s(e,t,r){var n=r("resolution"),i=r("scope"),s=a.scopeDefaults[i],l=r("projection.type",s.projType),c=t._isAlbersUsa="albers usa"===l;c&&(i=t.scope="usa");var u=t._isScoped="world"!==i,d=t._isConic=-1!==l.indexOf("conic");t._isClipped=!!a.lonaxisSpan[l];for(var p=0;p<o.length;p++){var h,f=o[p],m=[30,10][p];if(u)h=s[f+"Range"];else{var g=a[f+"Span"],v=(g[l]||g["*"])/2,y=r("projection.rotation."+f.substr(0,3),s.projRotate[p]);h=[y-v,y+v]}r(f+".range",h),r(f+".tick0"),r(f+".dtick",m),r(f+".showgrid")&&(r(f+".gridcolor"),r(f+".gridwidth"))}var b=t.lonaxis.range,_=t.lataxis.range,x=b[0],w=b[1];x>0&&w<0&&(w+=360);var k,M,T,C=(x+w)/2;if(!c){var S=u?s.projRotate:[C,0,0];k=r("projection.rotation.lon",S[0]),r("projection.rotation.lat",S[1]),r("projection.rotation.roll",S[2]),r("showcoastlines",!u)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean")&&r("oceancolor")}c?(M=-96.6,T=38.7):(M=u?C:k,T=(_[0]+_[1])/2),r("center.lon",M),r("center.lat",T),d&&r("projection.parallels",s.projParallels||[0,60]),r("projection.scale"),r("showland")&&r("landcolor"),r("showlakes")&&r("lakecolor"),r("showrivers")&&(r("rivercolor"),r("riverwidth")),r("showcountries",u&&"usa"!==i)&&(r("countrycolor"),r("countrywidth")),("usa"===i||"north america"===i&&50===n)&&(r("showsubunits",!0),r("subunitcolor"),r("subunitwidth")),u||r("showframe",!0)&&(r("framecolor"),r("framewidth")),r("bgcolor")}t.exports=function(e,t,r){n(e,t,r,{type:"geo",attributes:i,handleDefaults:s,partition:"y"})}},{"../subplot_defaults":839,"./constants":792,"./layout_attributes":795}],797:[function(e,t,r){"use strict";t.exports=function(e){function t(e,t){return{type:"Feature",id:e.id,properties:e.properties,geometry:r(e.geometry,t)}}function r(t,n){if(!t)return null;if("GeometryCollection"===t.type)return{type:"GeometryCollection",geometries:object.geometries.map((function(e){return r(e,n)}))};if(!c.hasOwnProperty(t.type))return null;var a=c[t.type];return e.geo.stream(t,n(a)),a.result()}e.geo.project=function(e,t){var a=t.stream;if(!a)throw new Error("not yet supported");return(e&&n.hasOwnProperty(e.type)?n[e.type]:r)(e,a)};var n={Feature:t,FeatureCollection:function(e,r){return{type:"FeatureCollection",features:e.features.map((function(e){return t(e,r)}))}}},a=[],i=[],o={point:function(e,t){a.push([e,t])},result:function(){var e=a.length?a.length<2?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a}:null;return a=[],e}},s={lineStart:u,point:function(e,t){a.push([e,t])},lineEnd:function(){a.length&&(i.push(a),a=[])},result:function(){var e=i.length?i.length<2?{type:"LineString",coordinates:i[0]}:{type:"MultiLineString",coordinates:i}:null;return i=[],e}},l={polygonStart:u,lineStart:u,point:function(e,t){a.push([e,t])},lineEnd:function(){var e=a.length;if(e){do{a.push(a[0].slice())}while(++e<4);i.push(a),a=[]}},polygonEnd:u,result:function(){if(!i.length)return null;var e=[],t=[];return i.forEach((function(r){!function(e){if((t=e.length)<4)return!1;for(var t,r=0,n=e[t-1][1]*e[0][0]-e[t-1][0]*e[0][1];++r<t;)n+=e[r-1][1]*e[r][0]-e[r-1][0]*e[r][1];return n<=0}(r)?t.push(r):e.push([r])})),t.forEach((function(t){var r=t[0];e.some((function(e){if(function(e,t){for(var r=t[0],n=t[1],a=!1,i=0,o=e.length,s=o-1;i<o;s=i++){var l=e[i],c=l[0],u=l[1],d=e[s],p=d[0],h=d[1];u>n^h>n&&r<(p-c)*(n-u)/(h-u)+c&&(a=!a)}return a}(e[0],r))return e.push(t),!0}))||e.push([t])})),i=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var d=1e-6,p=d*d,h=Math.PI,f=h/2,m=(Math.sqrt(h),h/180),g=180/h;function v(e){return e>1?f:e<-1?-f:Math.asin(e)}function y(e){return e>1?0:e<-1?h:Math.acos(e)}var b=e.geo.projection,_=e.geo.projectionMutator;function x(e,t){var r=(2+f)*Math.sin(t);t/=2;for(var n=0,a=1/0;n<10&&Math.abs(a)>d;n++){var i=Math.cos(t);t-=a=(t+Math.sin(t)*(i+2)-r)/(2*i*(1+i))}return[2/Math.sqrt(h*(4+h))*e*(1+Math.cos(t)),2*Math.sqrt(h/(4+h))*Math.sin(t)]}e.geo.interrupt=function(t){var r,n=[[[[-h,0],[0,f],[h,0]]],[[[-h,0],[0,-f],[h,0]]]];function a(e,r){for(var a=r<0?-1:1,i=n[+(r<0)],o=0,s=i.length-1;o<s&&e>i[o][2][0];++o);var l=t(e-i[o][1][0],r);return l[0]+=t(i[o][1][0],a*r>a*i[o][0][1]?i[o][0][1]:r)[0],l}function i(){r=n.map((function(e){return e.map((function(e){var r,n=t(e[0][0],e[0][1])[0],a=t(e[2][0],e[2][1])[0],i=t(e[1][0],e[0][1])[1],o=t(e[1][0],e[1][1])[1];return i>o&&(r=i,i=o,o=r),[[n,i],[a,o]]}))}))}t.invert&&(a.invert=function(e,i){for(var o=r[+(i<0)],s=n[+(i<0)],l=0,u=o.length;l<u;++l){var d=o[l];if(d[0][0]<=e&&e<d[1][0]&&d[0][1]<=i&&i<d[1][1]){var p=t.invert(e-t(s[l][1][0],0)[0],i);return p[0]+=s[l][1][0],c(a(p[0],p[1]),[e,i])?p:null}}});var o=e.geo.projection(a),s=o.stream;function l(e,t){for(var r,n,a,i=-1,o=e.length,s=e[0],l=[];++i<o;){n=((r=e[i])[0]-s[0])/t,a=(r[1]-s[1])/t;for(var c=0;c<t;++c)l.push([s[0]+c*n,s[1]+c*a]);s=r}return l.push(r),l}function c(e,t){return Math.abs(e[0]-t[0])<d&&Math.abs(e[1]-t[1])<d}return o.stream=function(t){var r=o.rotate(),a=s(t),i=(o.rotate([0,0]),s(t));return o.rotate(r),a.sphere=function(){e.geo.stream(function(){for(var t=1e-6,r=[],a=0,i=n[0].length;a<i;++a){var o=180*(p=n[0][a])[0][0]/h,s=180*p[0][1]/h,c=180*p[1][1]/h,u=180*p[2][0]/h,d=180*p[2][1]/h;r.push(l([[o+t,s+t],[o+t,c-t],[u-t,c-t],[u-t,d+t]],30))}for(a=n[1].length-1;a>=0;--a){var p;o=180*(p=n[1][a])[0][0]/h,s=180*p[0][1]/h,c=180*p[1][1]/h,u=180*p[2][0]/h,d=180*p[2][1]/h,r.push(l([[u-t,d-t],[u-t,c+t],[o+t,c+t],[o+t,s-t]],30))}return{type:"Polygon",coordinates:[e.merge(r)]}}(),i)},a},o.lobes=function(e){return arguments.length?(n=e.map((function(e){return e.map((function(e){return[[e[0][0]*h/180,e[0][1]*h/180],[e[1][0]*h/180,e[1][1]*h/180],[e[2][0]*h/180,e[2][1]*h/180]]}))})),i(),o):n.map((function(e){return e.map((function(e){return[[180*e[0][0]/h,180*e[0][1]/h],[180*e[1][0]/h,180*e[1][1]/h],[180*e[2][0]/h,180*e[2][1]/h]]}))}))},o},x.invert=function(e,t){var r=.5*t*Math.sqrt((4+h)/h),n=v(r),a=Math.cos(n);return[e/(2/Math.sqrt(h*(4+h))*(1+a)),v((n+r*(a+2))/(2+f))]},(e.geo.eckert4=function(){return b(x)}).raw=x;var w=e.geo.azimuthalEqualArea.raw;function k(e,t){if(arguments.length<2&&(t=e),1===t)return w;if(t===1/0)return M;function r(r,n){var a=w(r/t,n);return a[0]*=e,a}return r.invert=function(r,n){var a=w.invert(r/e,n);return a[0]*=t,a},r}function M(e,t){return[e*Math.cos(t)/Math.cos(t/=2),2*Math.sin(t)]}function T(e,t){return[3*e/(2*h)*Math.sqrt(h*h/3-t*t),t]}function C(e,t){return[e,1.25*Math.log(Math.tan(h/4+.4*t))]}function S(e){return function(t){var r,n=e*Math.sin(t),a=30;do{t-=r=(t+Math.sin(t)-n)/(1+Math.cos(t))}while(Math.abs(r)>d&&--a>0);return t/2}}M.invert=function(e,t){var r=2*v(t/2);return[e*Math.cos(r/2)/Math.cos(r),r]},(e.geo.hammer=function(){var e=2,t=_(k),r=t(e);return r.coefficient=function(r){return arguments.length?t(e=+r):e},r}).raw=k,T.invert=function(e,t){return[2/3*h*e/Math.sqrt(h*h/3-t*t),t]},(e.geo.kavrayskiy7=function(){return b(T)}).raw=T,C.invert=function(e,t){return[e,2.5*Math.atan(Math.exp(.8*t))-.625*h]},(e.geo.miller=function(){return b(C)}).raw=C,S(h);var L=function(e,t,r){var n=S(r);function a(r,a){return[e*r*Math.cos(a=n(a)),t*Math.sin(a)]}return a.invert=function(n,a){var i=v(a/t);return[n/(e*Math.cos(i)),v((2*i+Math.sin(2*i))/r)]},a}(Math.SQRT2/f,Math.SQRT2,h);function A(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(e.geo.mollweide=function(){return b(L)}).raw=L,A.invert=function(e,t){var r,n=t,a=25;do{var i=n*n,o=i*i;n-=r=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-t)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(Math.abs(r)>d&&--a>0);return[e/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},(e.geo.naturalEarth=function(){return b(A)}).raw=A;var E=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function D(e,t){var r,n=Math.min(18,36*Math.abs(t)/h),a=Math.floor(n),i=n-a,o=(r=E[a])[0],s=r[1],l=(r=E[++a])[0],c=r[1],u=(r=E[Math.min(19,++a)])[0],d=r[1];return[e*(l+i*(u-o)/2+i*i*(u-2*l+o)/2),(t>0?f:-f)*(c+i*(d-s)/2+i*i*(d-2*c+s)/2)]}function I(e,t){return[e*Math.cos(t),t]}function P(e,t){var r,n=Math.cos(t),a=(r=y(n*Math.cos(e/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(e)*a,Math.sin(t)*a]}function O(e,t){var r=P(e,t);return[(r[0]+e/f)/2,(r[1]+t)/2]}E.forEach((function(e){e[1]*=1.0144})),D.invert=function(e,t){var r=t/f,n=90*r,a=Math.min(18,Math.abs(n/5)),i=Math.max(0,Math.floor(a));do{var o=E[i][1],s=E[i+1][1],l=E[Math.min(19,i+2)][1],c=l-o,u=l-2*s+o,d=2*(Math.abs(r)-s)/c,h=u/c,v=d*(1-h*d*(1-2*h*d));if(v>=0||1===i){n=(t>=0?5:-5)*(v+a);var y,b=50;do{v=(a=Math.min(18,Math.abs(n)/5))-(i=Math.floor(a)),o=E[i][1],s=E[i+1][1],l=E[Math.min(19,i+2)][1],n-=(y=(t>=0?f:-f)*(s+v*(l-o)/2+v*v*(l-2*s+o)/2)-t)*g}while(Math.abs(y)>p&&--b>0);break}}while(--i>=0);var _=E[i][0],x=E[i+1][0],w=E[Math.min(19,i+2)][0];return[e/(x+v*(w-_)/2+v*v*(w-2*x+_)/2),n*m]},(e.geo.robinson=function(){return b(D)}).raw=D,I.invert=function(e,t){return[e/Math.cos(t),t]},(e.geo.sinusoidal=function(){return b(I)}).raw=I,P.invert=function(e,t){if(!(e*e+4*t*t>h*h+d)){var r=e,n=t,a=25;do{var i,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),p=Math.sin(2*n),f=c*c,m=u*u,g=s*s,v=1-m*l*l,b=v?y(u*l)*Math.sqrt(i=1/v):i=0,_=2*b*u*s-e,x=b*c-t,w=i*(m*g+b*u*l*f),k=i*(.5*o*p-2*b*c*s),M=.25*i*(p*s-b*c*m*o),T=i*(f*l+b*g*u),C=k*M-T*w;if(!C)break;var S=(x*k-_*T)/C,L=(_*M-x*w)/C;r-=S,n-=L}while((Math.abs(S)>d||Math.abs(L)>d)&&--a>0);return[r,n]}},(e.geo.aitoff=function(){return b(P)}).raw=P,O.invert=function(e,t){var r=e,n=t,a=25;do{var i,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,p=Math.sin(r),h=Math.cos(r/2),m=Math.sin(r/2),g=m*m,v=1-u*h*h,b=v?y(o*h)*Math.sqrt(i=1/v):i=0,_=.5*(2*b*o*m+r/f)-e,x=.5*(b*s+n)-t,w=.5*i*(u*g+b*o*h*c)+.5/f,k=i*(p*l/4-b*s*m),M=.125*i*(l*m-b*s*u*p),T=.5*i*(c*h+b*g*o)+.5,C=k*M-T*w,S=(x*k-_*T)/C,L=(_*M-x*w)/C;r-=S,n-=L}while((Math.abs(S)>d||Math.abs(L)>d)&&--a>0);return[r,n]},(e.geo.winkel3=function(){return b(O)}).raw=O}},{}],798:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../registry"),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(e,t){return n.behavior.zoom().translate(t.translate()).scale(t.scale())}function d(e,t,r){var n=e.id,o=e.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],d={},p={};function h(e,t){d[n+"."+e]=a.nestedProperty(l,e).get(),i.call("_storeDirectGUIEdit",s,c._preGUI,d);var r=a.nestedProperty(u,e);r.get()!==t&&(r.set(t),a.nestedProperty(l,e).set(t),p[n+"."+e]=t)}r(h),h("projection.scale",t.scale()/e.fitScale),o.emit("plotly_relayout",p)}function p(e,t){var r=u(0,t);function a(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){t.scale(n.event.scale).translate(n.event.translate),e.render();var r=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),d(e,t,a)})),r}function h(e,t){var r,a,i,o,s,p,h,f,m,g=u(0,t),v=2;function y(e){return t.invert(e)}function b(r){var n=t.rotate(),a=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",a[0]),r("center.lat",a[1])}return g.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),a=t.rotate(),i=t.translate(),o=a,s=y(r)})).on("zoom",(function(){if(p=n.mouse(this),function(e){var r=y(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>v||Math.abs(n[1]-e[1])>v}(r))return g.scale(t.scale()),void g.translate(t.translate());t.scale(n.event.scale),t.translate([i[0],n.event.translate[1]]),s?y(p)&&(f=y(p),h=[o[0]+(f[0]-s[0]),a[1],a[2]],t.rotate(h),o=h):s=y(r=p),m=!0,e.render();var l=t.rotate(),c=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(c),m&&d(e,t,b)})),g}function f(e,t){var r,a={r:t.rotate(),k:t.scale()},i=u(0,t),o=function(e){for(var t=0,r=arguments.length,a=[];++t<r;)a.push(arguments[t]);var i=n.dispatch.apply(null,a);return i.of=function(t,r){return function(a){var o;try{o=a.sourceEvent=n.event,a.target=e,n.event=a,i[a.type].apply(t,r)}finally{n.event=o}}},i}(i,"zoomstart","zoom","zoomend"),s=0,p=i.on;function h(e){s++||e({type:"zoomstart"})}function f(e){e({type:"zoom"})}function _(e){--s||e({type:"zoomend"})}function x(e){var r=t.rotate();e("projection.rotation.lon",-r[0]),e("projection.rotation.lat",-r[1])}return i.on("zoomstart",(function(){n.select(this).style(l);var e=n.mouse(this),s=t.rotate(),c=s,u=t.translate(),d=g(s);r=m(t,e),p.call(i,"zoom",(function(){var i=n.mouse(this);if(t.scale(a.k=n.event.scale),r){if(m(t,i)){t.rotate(s).translate(u);var l=m(t,i),p=y(r,l),h=k(v(d,p)),g=a.r=b(h,r,c);isFinite(g[0])&&isFinite(g[1])&&isFinite(g[2])||(g=c),t.rotate(g),c=g}}else r=m(t,e=i);f(o.of(this,arguments))})),h(o.of(this,arguments))})).on("zoomend",(function(){n.select(this).style(c),p.call(i,"zoom",null),_(o.of(this,arguments)),d(e,t,x)})).on("zoom.redraw",(function(){e.render();var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),n.rebind(i,o,"on")}function m(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&function(e){var t=e[0]*o,r=e[1]*o,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}(r)}function g(e){var t=.5*e[0]*o,r=.5*e[1]*o,n=.5*e[2]*o,a=Math.sin(t),i=Math.cos(t),s=Math.sin(r),l=Math.cos(r),c=Math.sin(n),u=Math.cos(n);return[i*l*u+a*s*c,a*l*u-i*s*c,i*s*u+a*l*c,i*l*c-a*s*u]}function v(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],s=t[1],l=t[2],c=t[3];return[r*o-n*s-a*l-i*c,r*s+n*o+a*c-i*l,r*l-n*c+a*o+i*s,r*c+n*l-a*s+i*o]}function y(e,t){if(e&&t){var r=function(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}(e,t),n=Math.sqrt(M(r,r)),a=.5*Math.acos(Math.max(-1,Math.min(1,M(e,t)))),i=Math.sin(a)/n;return n&&[Math.cos(a),r[2]*i,-r[1]*i,r[0]*i]}}function b(e,t,r){var n=w(t,2,e[0]);n=w(n,1,e[1]),n=w(n,0,e[2]-r[2]);var a,i,o=t[0],l=t[1],c=t[2],u=n[0],d=n[1],p=n[2],h=Math.atan2(l,o)*s,f=Math.sqrt(o*o+l*l);Math.abs(d)>f?(i=(d>0?90:-90)-h,a=0):(i=Math.asin(d/f)*s-h,a=Math.sqrt(f*f-d*d));var m=180-i-2*h,g=(Math.atan2(p,u)-Math.atan2(c,a))*s,v=(Math.atan2(p,u)-Math.atan2(c,-a))*s;return _(r[0],r[1],i,g)<=_(r[0],r[1],m,v)?[i,g,r[2]]:[m,v,r[2]]}function _(e,t,r,n){var a=x(r-e),i=x(n-t);return Math.sqrt(a*a+i*i)}function x(e){return(e%360+540)%360-180}function w(e,t,r){var n=r*o,a=e.slice(),i=0===t?1:0,s=2===t?1:2,l=Math.cos(n),c=Math.sin(n);return a[i]=e[i]*l-e[s]*c,a[s]=e[s]*l+e[i]*c,a}function k(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*s,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*s]}function M(e,t){for(var r=0,n=0,a=e.length;n<a;++n)r+=e[n]*t[n];return r}t.exports=function(e,t){var r=e.projection;return(t._isScoped?p:t._isClipped?f:h)(e,r)}},{"../../lib":716,"../../registry":845,d3:164}],799:[function(e,t,r){"use strict";var n=e("../registry"),a=e("./cartesian/constants").SUBPLOT_PATTERN;r.getSubplotCalcData=function(e,t,r){var a=n.subplotsRegistry[t];if(!a)return[];for(var i=a.attr,o=[],s=0;s<e.length;s++){var l=e[s];l[0].trace[i]===r&&o.push(l)}return o},r.getModuleCalcData=function(e,t){var r,a=[],i=[];if(!(r="string"==typeof t?n.getModule(t).plot:"function"==typeof t?t:t.plot))return[a,e];for(var o=0;o<e.length;o++){var s=e[o],l=s[0].trace;!0===l.visible&&0!==l._length&&(l._module.plot===r?a.push(s):i.push(s))}return[a,i]},r.getSubplotData=function(e,t,r){if(!n.subplotsRegistry[t])return[];var i,o,s,l=n.subplotsRegistry[t].attr,c=[];if("gl2d"===t){var u=r.match(a);o="x"+u[1],s="y"+u[2]}for(var d=0;d<e.length;d++)i=e[d],"gl2d"===t&&n.traceIs(i,"gl2d")?i[l[0]]===o&&i[l[1]]===s&&c.push(i):i[l]===r&&c.push(i);return c}},{"../registry":845,"./cartesian/constants":770}],800:[function(e,t,r){"use strict";var n=e("mouse-change"),a=e("mouse-wheel"),i=e("mouse-event-offset"),o=e("../cartesian/constants"),s=e("has-passive-events");function l(e,t){this.element=e,this.plot=t,this.mouseListener=null,this.wheelListener=null,this.lastInputTime=Date.now(),this.lastPos=[0,0],this.boxEnabled=!1,this.boxInited=!1,this.boxStart=[0,0],this.boxEnd=[0,0],this.dragStart=[0,0]}t.exports=function(e){var t=e.mouseContainer,r=e.glplot,c=new l(t,r);function u(){e.xaxis.autorange=!1,e.yaxis.autorange=!1}function d(t,n,a){var i,s,l=e.calcDataBox(),d=r.viewBox,p=c.lastPos[0],h=c.lastPos[1],f=o.MINDRAG*r.pixelRatio,m=o.MINZOOM*r.pixelRatio;function g(t,r,n){var a=Math.min(r,n),i=Math.max(r,n);a!==i?(l[t]=a,l[t+2]=i,c.dataBox=l,e.setRanges(l)):(e.selectBox.selectBox=[0,0,1,1],e.glplot.setDirty())}switch(n*=r.pixelRatio,a*=r.pixelRatio,a=d[3]-d[1]-a,e.fullLayout.dragmode){case"zoom":if(t){var v=n/(d[2]-d[0])*(l[2]-l[0])+l[0],y=a/(d[3]-d[1])*(l[3]-l[1])+l[1];c.boxInited||(c.boxStart[0]=v,c.boxStart[1]=y,c.dragStart[0]=n,c.dragStart[1]=a),c.boxEnd[0]=v,c.boxEnd[1]=y,c.boxInited=!0,c.boxEnabled||c.boxStart[0]===c.boxEnd[0]&&c.boxStart[1]===c.boxEnd[1]||(c.boxEnabled=!0);var b=Math.abs(c.dragStart[0]-n)<m,_=Math.abs(c.dragStart[1]-a)<m;if(!function(){for(var t=e.graphDiv._fullLayout._axisConstraintGroups,r=e.xaxis._id,n=e.yaxis._id,a=0;a<t.length;a++)if(-1!==t[a][r]){if(-1!==t[a][n])return!0;break}return!1}()||b&&_)b&&(c.boxEnd[0]=c.boxStart[0]),_&&(c.boxEnd[1]=c.boxStart[1]);else{i=c.boxEnd[0]-c.boxStart[0],s=c.boxEnd[1]-c.boxStart[1];var x=(l[3]-l[1])/(l[2]-l[0]);Math.abs(i*x)>Math.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(i)*x*(s>=0?1:-1),c.boxEnd[1]<l[1]?(c.boxEnd[1]=l[1],c.boxEnd[0]=c.boxStart[0]+(l[1]-c.boxStart[1])/Math.abs(x)):c.boxEnd[1]>l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(x))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/x*(i>=0?1:-1),c.boxEnd[0]<l[0]?(c.boxEnd[0]=l[0],c.boxEnd[1]=c.boxStart[1]+(l[0]-c.boxStart[0])*Math.abs(x)):c.boxEnd[0]>l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(x)))}}else c.boxEnabled?(i=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],i||s?(i&&(g(0,c.boxStart[0],c.boxEnd[0]),e.xaxis.autorange=!1),s&&(g(1,c.boxStart[1],c.boxEnd[1]),e.yaxis.autorange=!1),e.relayoutCallback()):e.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,t?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=a),Math.abs(c.dragStart[0]-n)<f&&(n=c.dragStart[0]),Math.abs(c.dragStart[1]-a)<f&&(a=c.dragStart[1]),i=(p-n)*(l[2]-l[0])/(r.viewBox[2]-r.viewBox[0]),s=(h-a)*(l[3]-l[1])/(r.viewBox[3]-r.viewBox[1]),l[0]+=i,l[2]+=i,l[1]+=s,l[3]+=s,e.setRanges(l),c.panning=!0,c.lastInputTime=Date.now(),u(),e.cameraChanged(),e.handleAnnotations()):c.panning&&(c.panning=!1,e.relayoutCallback())}c.lastPos[0]=n,c.lastPos[1]=a}return c.mouseListener=n(t,d),t.addEventListener("touchstart",(function(e){var r=i(e.changedTouches[0],t);d(0,r[0],r[1]),d(1,r[0],r[1]),e.preventDefault()}),!!s&&{passive:!1}),t.addEventListener("touchmove",(function(e){e.preventDefault();var r=i(e.changedTouches[0],t);d(1,r[0],r[1]),e.preventDefault()}),!!s&&{passive:!1}),t.addEventListener("touchend",(function(e){d(0,c.lastPos[0],c.lastPos[1]),e.preventDefault()}),!!s&&{passive:!1}),c.wheelListener=a(t,(function(t,n){if(!e.scrollZoom)return!1;var a=e.calcDataBox(),i=r.viewBox,o=c.lastPos[0],s=c.lastPos[1],l=Math.exp(5*n/(i[3]-i[1])),d=o/(i[2]-i[0])*(a[2]-a[0])+a[0],p=s/(i[3]-i[1])*(a[3]-a[1])+a[1];return a[0]=(a[0]-d)*l+d,a[2]=(a[2]-d)*l+d,a[1]=(a[1]-p)*l+p,a[3]=(a[3]-p)*l+p,e.setRanges(a),c.lastInputTime=Date.now(),u(),e.cameraChanged(),e.handleAnnotations(),e.relayoutCallback(),!0}),!0),c}},{"../cartesian/constants":770,"has-passive-events":412,"mouse-change":436,"mouse-event-offset":437,"mouse-wheel":439}],801:[function(e,t,r){"use strict";var n=e("../cartesian/axes"),a=e("../../lib/str2rgbarray");function i(e){this.scene=e,this.gl=e.gl,this.pixelRatio=e.pixelRatio,this.screenBox=[0,0,1,1],this.viewBox=[0,0,1,1],this.dataBox=[-1,-1,1,1],this.borderLineEnable=[!1,!1,!1,!1],this.borderLineWidth=[1,1,1,1],this.borderLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.ticks=[[],[]],this.tickEnable=[!0,!0,!1,!1],this.tickPad=[15,15,15,15],this.tickAngle=[0,0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickMarkLength=[0,0,0,0],this.tickMarkWidth=[0,0,0,0],this.tickMarkColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labels=["x","y"],this.labelEnable=[!0,!0,!1,!1],this.labelAngle=[0,Math.PI/2,0,3*Math.PI/2],this.labelPad=[15,15,15,15],this.labelSize=[12,12],this.labelFont=["sans-serif","sans-serif"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.title="",this.titleEnable=!0,this.titleCenter=[0,0,0,0],this.titleAngle=0,this.titleColor=[0,0,0,1],this.titleFont="sans-serif",this.titleSize=18,this.gridLineEnable=[!0,!0],this.gridLineColor=[[0,0,0,.5],[0,0,0,.5]],this.gridLineWidth=[1,1],this.zeroLineEnable=[!0,!0],this.zeroLineWidth=[1,1],this.zeroLineColor=[[0,0,0,1],[0,0,0,1]],this.borderColor=[0,0,0,0],this.backgroundColor=[0,0,0,0],this.static=this.scene.staticPlot}var o=i.prototype,s=["xaxis","yaxis"];o.merge=function(e){var t,r,n,i,o,l,c,u,d,p,h;for(this.titleEnable=!1,this.backgroundColor=a(e.plot_bgcolor),p=0;p<2;++p){var f=(t=s[p]).charAt(0);for(n=(r=e[this.scene[t]._name]).title.text===this.scene.fullLayout._dfltTitle[f]?"":r.title.text,h=0;h<=2;h+=2)this.labelEnable[p+h]=!1,this.labels[p+h]=n,this.labelColor[p+h]=a(r.title.font.color),this.labelFont[p+h]=r.title.font.family,this.labelSize[p+h]=r.title.font.size,this.labelPad[p+h]=this.getLabelPad(t,r),this.tickEnable[p+h]=!1,this.tickColor[p+h]=a((r.tickfont||{}).color),this.tickAngle[p+h]="auto"===r.tickangle?0:Math.PI*-r.tickangle/180,this.tickPad[p+h]=this.getTickPad(r),this.tickMarkLength[p+h]=0,this.tickMarkWidth[p+h]=r.tickwidth||0,this.tickMarkColor[p+h]=a(r.tickcolor),this.borderLineEnable[p+h]=!1,this.borderLineColor[p+h]=a(r.linecolor),this.borderLineWidth[p+h]=r.linewidth||0;c=this.hasSharedAxis(r),o=this.hasAxisInDfltPos(t,r)&&!c,l=this.hasAxisInAltrPos(t,r)&&!c,i=r.mirror||!1,u=c?-1!==String(i).indexOf("all"):!!i,d=c?"allticks"===i:-1!==String(i).indexOf("ticks"),o?this.labelEnable[p]=!0:l&&(this.labelEnable[p+2]=!0),o?this.tickEnable[p]=r.showticklabels:l&&(this.tickEnable[p+2]=r.showticklabels),(o||u)&&(this.borderLineEnable[p]=r.showline),(l||u)&&(this.borderLineEnable[p+2]=r.showline),(o||d)&&(this.tickMarkLength[p]=this.getTickMarkLength(r)),(l||d)&&(this.tickMarkLength[p+2]=this.getTickMarkLength(r)),this.gridLineEnable[p]=r.showgrid,this.gridLineColor[p]=a(r.gridcolor),this.gridLineWidth[p]=r.gridwidth,this.zeroLineEnable[p]=r.zeroline,this.zeroLineColor[p]=a(r.zerolinecolor),this.zeroLineWidth[p]=r.zerolinewidth}},o.hasSharedAxis=function(e){var t=this.scene,r=t.fullLayout._subplots.gl2d;return 0!==n.findSubplotsWithAxis(r,e).indexOf(t.id)},o.hasAxisInDfltPos=function(e,t){var r=t.side;return"xaxis"===e?"bottom"===r:"yaxis"===e?"left"===r:void 0},o.hasAxisInAltrPos=function(e,t){var r=t.side;return"xaxis"===e?"top"===r:"yaxis"===e?"right"===r:void 0},o.getLabelPad=function(e,t){var r=t.title.font.size,n=t.showticklabels;return"xaxis"===e?"top"===t.side?r*(1.5+(n?1:0))-10:r*(1.5+(n?.5:0))-10:"yaxis"===e?"right"===t.side?10+r*(1.5+(n?1:.5)):10+r*(1.5+(n?.5:0)):void 0},o.getTickPad=function(e){return"outside"===e.ticks?10+e.ticklen:15},o.getTickMarkLength=function(e){if(!e.ticks)return 0;var t=e.ticklen;return"inside"===e.ticks?-t:t},t.exports=function(e){return new i(e)}},{"../../lib/str2rgbarray":739,"../cartesian/axes":764}],802:[function(e,t,r){"use strict";var n=e("../../plot_api/edit_types").overrideAll,a=e("./scene2d"),i=e("../layout_attributes"),o=e("../../constants/xmlns_namespaces"),s=e("../cartesian/constants"),l=e("../cartesian"),c=e("../../components/fx/layout_attributes"),u=e("../get_data").getSubplotData;r.name="gl2d",r.attr=["xaxis","yaxis"],r.idRoot=["x","y"],r.idRegex=s.idRegex,r.attrRegex=s.attrRegex,r.attributes=e("../cartesian/attributes"),r.supplyLayoutDefaults=function(e,t,r){t._has("cartesian")||l.supplyLayoutDefaults(e,t,r)},r.layoutAttrOverrides=n(l.layoutAttributes,"plot","from-root"),r.baseLayoutAttrOverrides=n({plot_bgcolor:i.plot_bgcolor,hoverlabel:c.hoverlabel},"plot","nested"),r.plot=function(e){for(var t=e._fullLayout,r=e._fullData,n=t._subplots.gl2d,i=0;i<n.length;i++){var o=n[i],s=t._plots[o],l=u(r,"gl2d",o),c=s._scene2d;void 0===c&&(c=new a({id:o,graphDiv:e,container:e.querySelector(".gl-container"),staticPlot:e._context.staticPlot,plotGlPixelRatio:e._context.plotGlPixelRatio},t),s._scene2d=c),c.plot(l,e.calcdata,t,e.layout)}},r.clean=function(e,t,r,n){for(var a=n._subplots.gl2d||[],i=0;i<a.length;i++){var o=a[i],s=n._plots[o];if(s._scene2d){var c=u(e,"gl2d",o);0===c.length&&(s._scene2d.destroy(),delete n._plots[o])}}l.clean.apply(this,arguments)},r.drawFramework=function(e){e._context.staticPlot||l.drawFramework(e)},r.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots.gl2d,n=0;n<r.length;n++){var a=t._plots[r[n]]._scene2d,i=a.toImage("png");t._glimages.append("svg:image").attr({xmlns:o.svg,"xlink:href":i,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),a.destroy()}},r.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots.gl2d,n=0;n<r.length;n++)t._plots[r[n]]._scene2d.updateFx(t.dragmode)}},{"../../components/fx/layout_attributes":630,"../../constants/xmlns_namespaces":693,"../../plot_api/edit_types":747,"../cartesian":775,"../cartesian/attributes":762,"../cartesian/constants":770,"../get_data":799,"../layout_attributes":816,"./scene2d":803}],803:[function(e,t,r){"use strict";var n,a,i=e("../../registry"),o=e("../../plots/cartesian/axes"),s=e("../../components/fx"),l=e("gl-plot2d"),c=e("gl-spikes2d"),u=e("gl-select-box"),d=e("webgl-context"),p=e("./convert"),h=e("./camera"),f=e("../../lib/show_no_webgl_msg"),m=e("../cartesian/constraints"),g=m.enforce,v=m.clean,y=e("../cartesian/autorange").doAutoRange,b=["xaxis","yaxis"],_=e("../cartesian/constants").SUBPLOT_PATTERN;function x(e,t){this.container=e.container,this.graphDiv=e.graphDiv,this.pixelRatio=e.plotGlPixelRatio||window.devicePixelRatio,this.id=e.id,this.staticPlot=!!e.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(t),this.makeFramework(),this.stopped||(this.glplotOptions=p(this),this.glplotOptions.merge(t),this.glplot=l(this.glplotOptions),this.camera=h(this),this.traces={},this.spikes=c(this.glplot),this.selectBox=u(this.glplot,{innerFill:!1,outerFill:!0}),this.lastButtonState=0,this.pickResult=null,this.isMouseOver=!0,this.stopped=!1,this.redraw=this.draw.bind(this),this.redraw())}t.exports=x;var w=x.prototype;w.makeFramework=function(){if(this.staticPlot){if(!(a||(n=document.createElement("canvas"),a=d({canvas:n,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error("Error creating static canvas/context for image server");this.canvas=n,this.gl=a}else{var e=this.container.querySelector(".gl-canvas-focus"),t=d({canvas:e,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!t)return f(this),void(this.stopped=!0);this.canvas=e,this.gl=t}var r=this.canvas;r.style.width="100%",r.style.height="100%",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style["pointer-events"]="none",this.updateSize(r),r.className+=" user-select-none";var i=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none";var o=this.mouseContainer=document.createElement("div");o.style.position="absolute",o.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var s=this.container;s.appendChild(i),s.appendChild(o);var l=this;o.addEventListener("mouseout",(function(){l.isMouseOver=!1,l.unhover()})),o.addEventListener("mouseover",(function(){l.isMouseOver=!0}))},w.toImage=function(e){e||(e="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(n),this.updateSize(this.canvas);var t=this.glplot.gl,r=t.drawingBufferWidth,a=t.drawingBufferHeight;t.clearColor(1,1,1,0),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),t.bindFramebuffer(t.FRAMEBUFFER,null);var i=new Uint8Array(r*a*4);t.readPixels(0,0,r,a,t.RGBA,t.UNSIGNED_BYTE,i);for(var o=0,s=a-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=i[4*(r*o+l)+c];i[4*(r*o+l)+c]=i[4*(r*s+l)+c],i[4*(r*s+l)+c]=u}var d=document.createElement("canvas");d.width=r,d.height=a;var p,h=d.getContext("2d"),f=h.createImageData(r,a);switch(f.data.set(i),h.putImageData(f,0,0),e){case"jpeg":p=d.toDataURL("image/jpeg");break;case"webp":p=d.toDataURL("image/webp");break;default:p=d.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(n),p},w.updateSize=function(e){e||(e=this.canvas);var t=this.pixelRatio,r=this.fullLayout,n=r.width,a=r.height,i=0|Math.ceil(t*n),o=0|Math.ceil(t*a);return e.width===i&&e.height===o||(e.width=i,e.height=o),e},w.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var e=[o.calcTicks(this.xaxis),o.calcTicks(this.yaxis)],t=0;t<2;++t)for(var r=0;r<e[t].length;++r)e[t][r].text=e[t][r].text+"";return e},w.updateRefs=function(e){this.fullLayout=e;var t=this.id.match(_),r="xaxis"+t[1],n="yaxis"+t[2];this.xaxis=this.fullLayout[r],this.yaxis=this.fullLayout[n]},w.relayoutCallback=function(){var e=this.graphDiv,t=this.xaxis,r=this.yaxis,n=e.layout,a={},o=a[t._name+".range"]=t.range.slice(),s=a[r._name+".range"]=r.range.slice();a[t._name+".autorange"]=t.autorange,a[r._name+".autorange"]=r.autorange,i.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,a);var l=n[t._name];l.range=o,l.autorange=t.autorange;var c=n[r._name];c.range=s,c.autorange=r.autorange,a.lastInputTime=this.camera.lastInputTime,e.emit("plotly_relayout",a)},w.cameraChanged=function(){var e=this.camera;this.glplot.setDataBox(this.calcDataBox());var t=this.computeTickMarks();(function(e,t){for(var r=0;r<2;++r){var n=e[r],a=t[r];if(n.length!==a.length)return!0;for(var i=0;i<n.length;++i)if(n[i].x!==a[i].x)return!0}return!1})(t,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=t,this.glplotOptions.dataBox=e.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},w.handleAnnotations=function(){for(var e=this.graphDiv,t=this.fullLayout.annotations,r=0;r<t.length;r++){var n=t[r];n.xref===this.xaxis._id&&n.yref===this.yaxis._id&&i.getComponentMethod("annotations","drawOne")(e,r)}},w.destroy=function(){if(this.glplot){var e=this.traces;e&&Object.keys(e).map((function(t){e[t].dispose(),delete e[t]})),this.glplot.dispose(),this.container.removeChild(this.svgContainer),this.container.removeChild(this.mouseContainer),this.fullData=null,this.glplot=null,this.stopped=!0,this.camera.mouseListener.enabled=!1,this.mouseContainer.removeEventListener("wheel",this.camera.wheelListener),this.camera=null}},w.plot=function(e,t,r){var n=this.glplot;this.updateRefs(r),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(e,t),this.updateFx(r.dragmode);var a=r.width,i=r.height;this.updateSize(this.canvas);var o=this.glplotOptions;o.merge(r),o.screenBox=[0,0,a,i];var s={_fullLayout:{_axisConstraintGroups:this.graphDiv._fullLayout._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis}};v(s,this.xaxis),v(s,this.yaxis);var l,c,u=r._size,d=this.xaxis.domain,p=this.yaxis.domain;for(o.viewBox=[u.l+d[0]*u.w,u.b+p[0]*u.h,a-u.r-(1-d[1])*u.w,i-u.t-(1-p[1])*u.h],this.mouseContainer.style.width=u.w*(d[1]-d[0])+"px",this.mouseContainer.style.height=u.h*(p[1]-p[0])+"px",this.mouseContainer.height=u.h*(p[1]-p[0]),this.mouseContainer.style.left=u.l+d[0]*u.w+"px",this.mouseContainer.style.top=u.t+(1-p[1])*u.h+"px",c=0;c<2;++c)(l=this[b[c]])._length=o.viewBox[c+2]-o.viewBox[c],y(this.graphDiv,l),l.setScale();g(s),o.ticks=this.computeTickMarks(),o.dataBox=this.calcDataBox(),o.merge(r),n.update(o),this.glplot.draw()},w.calcDataBox=function(){var e=this.xaxis,t=this.yaxis,r=e.range,n=t.range,a=e.r2l,i=t.r2l;return[a(r[0]),i(n[0]),a(r[1]),i(n[1])]},w.setRanges=function(e){var t=this.xaxis,r=this.yaxis,n=t.l2r,a=r.l2r;t.range=[n(e[0]),n(e[2])],r.range=[a(e[1]),a(e[3])]},w.updateTraces=function(e,t){var r,n,a,i=Object.keys(this.traces);this.fullData=e;e:for(r=0;r<i.length;r++){var o=i[r],s=this.traces[o];for(n=0;n<e.length;n++)if((a=e[n]).uid===o&&a.type===s.type)continue e;s.dispose(),delete this.traces[o]}for(r=0;r<e.length;r++){a=e[r];var l=t[r],c=this.traces[a.uid];c?c.update(a,l):(c=a._module.plot(this,a,l),this.traces[a.uid]=c)}this.glplot.objects.sort((function(e,t){return e._trace.index-t._trace.index}))},w.updateFx=function(e){"lasso"===e||"select"===e?(this.pickCanvas.style["pointer-events"]="none",this.mouseContainer.style["pointer-events"]="none"):(this.pickCanvas.style["pointer-events"]="auto",this.mouseContainer.style["pointer-events"]="auto"),this.mouseContainer.style.cursor="pan"===e?"move":"zoom"===e?"crosshair":null},w.emitPointAction=function(e,t){for(var r,n=e.trace.uid,a=e.pointIndex,i=0;i<this.fullData.length;i++)this.fullData[i].uid===n&&(r=this.fullData[i]);var o={x:e.traceCoord[0],y:e.traceCoord[1],curveNumber:r.index,pointNumber:a,data:r._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};s.appendArrayPointValue(o,r,a),this.graphDiv.emit(t,{points:[o]})},w.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var e=this.glplot,t=this.camera,r=t.mouseListener,n=1===this.lastButtonState&&0===r.buttons,a=this.fullLayout;this.lastButtonState=r.buttons,this.cameraChanged();var i,o=r.x*e.pixelRatio,l=this.canvas.height-e.pixelRatio*r.y;if(t.boxEnabled&&"zoom"===a.dragmode){this.selectBox.enabled=!0;for(var c=this.selectBox.selectBox=[Math.min(t.boxStart[0],t.boxEnd[0]),Math.min(t.boxStart[1],t.boxEnd[1]),Math.max(t.boxStart[0],t.boxEnd[0]),Math.max(t.boxStart[1],t.boxEnd[1])],u=0;u<2;u++)t.boxStart[u]===t.boxEnd[u]&&(c[u]=e.dataBox[u],c[u+2]=e.dataBox[u+2]);e.setDirty()}else if(!t.panning&&this.isMouseOver){this.selectBox.enabled=!1;var d=a._size,p=this.xaxis.domain,h=this.yaxis.domain,f=(i=e.pick(o/e.pixelRatio+d.l+p[0]*d.w,l/e.pixelRatio-(d.t+(1-h[1])*d.h)))&&i.object._trace.handlePick(i);if(f&&n&&this.emitPointAction(f,"plotly_click"),i&&"skip"!==i.object._trace.hoverinfo&&a.hovermode&&f&&(!this.lastPickResult||this.lastPickResult.traceUid!==f.trace.uid||this.lastPickResult.dataCoord[0]!==f.dataCoord[0]||this.lastPickResult.dataCoord[1]!==f.dataCoord[1])){var m=f;this.lastPickResult={traceUid:f.trace?f.trace.uid:null,dataCoord:f.dataCoord.slice()},this.spikes.update({center:i.dataCoord}),m.screenCoord=[((e.viewBox[2]-e.viewBox[0])*(i.dataCoord[0]-e.dataBox[0])/(e.dataBox[2]-e.dataBox[0])+e.viewBox[0])/e.pixelRatio,(this.canvas.height-(e.viewBox[3]-e.viewBox[1])*(i.dataCoord[1]-e.dataBox[1])/(e.dataBox[3]-e.dataBox[1])-e.viewBox[1])/e.pixelRatio],this.emitPointAction(f,"plotly_hover");var g=this.fullData[m.trace.index]||{},v=m.pointIndex,y=s.castHoverinfo(g,a,v);if(y&&"all"!==y){var b=y.split("+");-1===b.indexOf("x")&&(m.traceCoord[0]=void 0),-1===b.indexOf("y")&&(m.traceCoord[1]=void 0),-1===b.indexOf("z")&&(m.traceCoord[2]=void 0),-1===b.indexOf("text")&&(m.textLabel=void 0),-1===b.indexOf("name")&&(m.name=void 0)}s.loneHover({x:m.screenCoord[0],y:m.screenCoord[1],xLabel:this.hoverFormatter("xaxis",m.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",m.traceCoord[1]),zLabel:m.traceCoord[2],text:m.textLabel,name:m.name,color:s.castHoverOption(g,v,"bgcolor")||m.color,borderColor:s.castHoverOption(g,v,"bordercolor"),fontFamily:s.castHoverOption(g,v,"font.family"),fontSize:s.castHoverOption(g,v,"font.size"),fontColor:s.castHoverOption(g,v,"font.color"),nameLength:s.castHoverOption(g,v,"namelength"),textAlign:s.castHoverOption(g,v,"align")},{container:this.svgContainer,gd:this.graphDiv})}}i||this.unhover(),e.draw()}},w.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),s.loneUnhover(this.svgContainer))},w.hoverFormatter=function(e,t){if(void 0!==t){var r=this[e];return o.tickText(r,r.c2l(t),"hover").text}}},{"../../components/fx":629,"../../lib/show_no_webgl_msg":737,"../../plots/cartesian/axes":764,"../../registry":845,"../cartesian/autorange":763,"../cartesian/constants":770,"../cartesian/constraints":771,"./camera":800,"./convert":801,"gl-plot2d":289,"gl-select-box":301,"gl-spikes2d":310,"webgl-context":554}],804:[function(e,t,r){"use strict";var n=e("../../plot_api/edit_types").overrideAll,a=e("../../components/fx/layout_attributes"),i=e("./scene"),o=e("../get_data").getSubplotData,s=e("../../lib"),l=e("../../constants/xmlns_namespaces");r.name="gl3d",r.attr="scene",r.idRoot="scene",r.idRegex=r.attrRegex=s.counterRegex("scene"),r.attributes=e("./layout/attributes"),r.layoutAttributes=e("./layout/layout_attributes"),r.baseLayoutAttrOverrides=n({hoverlabel:a.hoverlabel},"plot","nested"),r.supplyLayoutDefaults=e("./layout/defaults"),r.plot=function(e){for(var t=e._fullLayout,r=e._fullData,n=t._subplots.gl3d,a=0;a<n.length;a++){var s=n[a],l=o(r,"gl3d",s),c=t[s],u=c.camera,d=c._scene;d||(d=new i({id:s,graphDiv:e,container:e.querySelector(".gl-container"),staticPlot:e._context.staticPlot,plotGlPixelRatio:e._context.plotGlPixelRatio,camera:u},t),c._scene=d),d.viewInitial||(d.viewInitial={up:{x:u.up.x,y:u.up.y,z:u.up.z},eye:{x:u.eye.x,y:u.eye.y,z:u.eye.z},center:{x:u.center.x,y:u.center.y,z:u.center.z}}),d.plot(l,t,e.layout)}},r.clean=function(e,t,r,n){for(var a=n._subplots.gl3d||[],i=0;i<a.length;i++){var o=a[i];!t[o]&&n[o]._scene&&(n[o]._scene.destroy(),n._infolayer&&n._infolayer.selectAll(".annotation-"+o).remove())}},r.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,n=t._size,a=0;a<r.length;a++){var i=t[r[a]],o=i.domain,s=i._scene,c=s.toImage("png");t._glimages.append("svg:image").attr({xmlns:l.svg,"xlink:href":c,x:n.l+n.w*o.x[0],y:n.t+n.h*(1-o.y[1]),width:n.w*(o.x[1]-o.x[0]),height:n.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"}),s.destroy()}},r.cleanId=function(e){if(e.match(/^scene[0-9]*$/)){var t=e.substr(5);return"1"===t&&(t=""),"scene"+t}},r.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,n=0;n<r.length;n++)t[r[n]]._scene.updateFx(t.dragmode,t.hovermode)}},{"../../components/fx/layout_attributes":630,"../../constants/xmlns_namespaces":693,"../../lib":716,"../../plot_api/edit_types":747,"../get_data":799,"./layout/attributes":805,"./layout/defaults":809,"./layout/layout_attributes":810,"./scene":814}],805:[function(e,t,r){"use strict";t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},{}],806:[function(e,t,r){"use strict";var n=e("../../../components/color"),a=e("../../cartesian/layout_attributes"),i=e("../../../lib/extend").extendFlat,o=e("../../../plot_api/edit_types").overrideAll;t.exports=o({visible:a.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:n.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:a.color,categoryorder:a.categoryorder,categoryarray:a.categoryarray,title:{text:a.title.text,font:a.title.font},type:i({},a.type,{values:["-","linear","log","date","category"]}),autorange:a.autorange,rangemode:a.rangemode,range:i({},a.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:a.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,mirror:a.mirror,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,showticklabels:a.showticklabels,tickfont:a.tickfont,tickangle:a.tickangle,tickprefix:a.tickprefix,showtickprefix:a.showtickprefix,ticksuffix:a.ticksuffix,showticksuffix:a.showticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,separatethousands:a.separatethousands,tickformat:a.tickformat,tickformatstops:a.tickformatstops,hoverformat:a.hoverformat,showline:a.showline,linecolor:a.linecolor,linewidth:a.linewidth,showgrid:a.showgrid,gridcolor:i({},a.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:a.gridwidth,zeroline:a.zeroline,zerolinecolor:a.zerolinecolor,zerolinewidth:a.zerolinewidth,_deprecated:{title:a._deprecated.title,titlefont:a._deprecated.titlefont}},"plot","from-root")},{"../../../components/color":591,"../../../lib/extend":707,"../../../plot_api/edit_types":747,"../../cartesian/layout_attributes":776}],807:[function(e,t,r){"use strict";var n=e("tinycolor2").mix,a=e("../../../lib"),i=e("../../../plot_api/plot_template"),o=e("./axis_attributes"),s=e("../../cartesian/type_defaults"),l=e("../../cartesian/axis_defaults"),c=["xaxis","yaxis","zaxis"];t.exports=function(e,t,r){var u,d;function p(e,t){return a.coerce(u,d,o,e,t)}for(var h=0;h<c.length;h++){var f=c[h];u=e[f]||{},(d=i.newContainer(t,f))._id=f[0]+r.scene,d._name=f,s(u,d,p,r),l(u,d,p,{font:r.font,letter:f[0],data:r.data,showGrid:!0,noTickson:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),p("gridcolor",n(d.color,r.bgColor,13600/187).toRgbString()),p("title.text",f[0]),d.setScale=a.noop,p("showspikes")&&(p("spikesides"),p("spikethickness"),p("spikecolor",d.color)),p("showaxeslabels"),p("showbackground")&&p("backgroundcolor")}}},{"../../../lib":716,"../../../plot_api/plot_template":754,"../../cartesian/axis_defaults":766,"../../cartesian/type_defaults":787,"./axis_attributes":806,tinycolor2:535}],808:[function(e,t,r){"use strict";var n=e("../../../lib/str2rgbarray"),a=e("../../../lib"),i=["xaxis","yaxis","zaxis"];function o(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}o.prototype.merge=function(e,t){for(var r=0;r<3;++r){var o=t[i[r]];o.visible?(this.labels[r]=e._meta?a.templateString(o.title.text,e._meta):o.title.text,"font"in o.title&&(o.title.font.color&&(this.labelColor[r]=n(o.title.font.color)),o.title.font.family&&(this.labelFont[r]=o.title.font.family),o.title.font.size&&(this.labelSize[r]=o.title.font.size)),"showline"in o&&(this.lineEnable[r]=o.showline),"linecolor"in o&&(this.lineColor[r]=n(o.linecolor)),"linewidth"in o&&(this.lineWidth[r]=o.linewidth),"showgrid"in o&&(this.gridEnable[r]=o.showgrid),"gridcolor"in o&&(this.gridColor[r]=n(o.gridcolor)),"gridwidth"in o&&(this.gridWidth[r]=o.gridwidth),"log"===o.type?this.zeroEnable[r]=!1:"zeroline"in o&&(this.zeroEnable[r]=o.zeroline),"zerolinecolor"in o&&(this.zeroLineColor[r]=n(o.zerolinecolor)),"zerolinewidth"in o&&(this.zeroLineWidth[r]=o.zerolinewidth),"ticks"in o&&o.ticks?this.lineTickEnable[r]=!0:this.lineTickEnable[r]=!1,"ticklen"in o&&(this.lineTickLength[r]=this._defaultLineTickLength[r]=o.ticklen),"tickcolor"in o&&(this.lineTickColor[r]=n(o.tickcolor)),"tickwidth"in o&&(this.lineTickWidth[r]=o.tickwidth),"tickangle"in o&&(this.tickAngle[r]="auto"===o.tickangle?-3600:Math.PI*-o.tickangle/180),"showticklabels"in o&&(this.tickEnable[r]=o.showticklabels),"tickfont"in o&&(o.tickfont.color&&(this.tickColor[r]=n(o.tickfont.color)),o.tickfont.family&&(this.tickFont[r]=o.tickfont.family),o.tickfont.size&&(this.tickSize[r]=o.tickfont.size)),"mirror"in o?-1!==["ticks","all","allticks"].indexOf(o.mirror)?(this.lineTickMirror[r]=!0,this.lineMirror[r]=!0):!0===o.mirror?(this.lineTickMirror[r]=!1,this.lineMirror[r]=!0):(this.lineTickMirror[r]=!1,this.lineMirror[r]=!1):this.lineMirror[r]=!1,"showbackground"in o&&!1!==o.showbackground?(this.backgroundEnable[r]=!0,this.backgroundColor[r]=n(o.backgroundcolor)):this.backgroundEnable[r]=!1):(this.tickEnable[r]=!1,this.labelEnable[r]=!1,this.lineEnable[r]=!1,this.lineTickEnable[r]=!1,this.gridEnable[r]=!1,this.zeroEnable[r]=!1,this.backgroundEnable[r]=!1)}},t.exports=function(e,t){var r=new o;return r.merge(e,t),r}},{"../../../lib":716,"../../../lib/str2rgbarray":739}],809:[function(e,t,r){"use strict";var n=e("../../../lib"),a=e("../../../components/color"),i=e("../../../registry"),o=e("../../subplot_defaults"),s=e("./axis_defaults"),l=e("./layout_attributes"),c=e("../../get_data").getSubplotData,u="gl3d";function d(e,t,r,n){for(var o=r("bgcolor"),l=a.combine(o,n.paper_bgcolor),d=["up","center","eye"],p=0;p<d.length;p++)r("camera."+d[p]+".x"),r("camera."+d[p]+".y"),r("camera."+d[p]+".z");r("camera.projection.type");var h=!!r("aspectratio.x")&&!!r("aspectratio.y")&&!!r("aspectratio.z"),f=r("aspectmode",h?"manual":"auto");h||(e.aspectratio=t.aspectratio={x:1,y:1,z:1},"manual"===f&&(t.aspectmode="auto"),e.aspectmode=t.aspectmode);var m=c(n.fullData,u,n.id);s(e,t,{font:n.font,scene:n.id,data:m,bgColor:l,calendar:n.calendar,fullLayout:n.fullLayout}),i.getComponentMethod("annotations3d","handleDefaults")(e,t,n);var g=n.getDfltFromLayout("dragmode");if(!1!==g&&!g)if(g="orbit",e.camera&&e.camera.up){var v=e.camera.up.x,y=e.camera.up.y,b=e.camera.up.z;0!==b&&(v&&y&&b?b/Math.sqrt(v*v+y*y+b*b)>.999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(e,t,r){var a=t._basePlotModules.length>1;o(e,t,r,{type:u,attributes:l,handleDefaults:d,fullLayout:t,font:t.font,fullData:r,getDfltFromLayout:function(t){if(!a)return n.validate(e[t],l[t])?e[t]:void 0},paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}},{"../../../components/color":591,"../../../lib":716,"../../../registry":845,"../../get_data":799,"../../subplot_defaults":839,"./axis_defaults":807,"./layout_attributes":810}],810:[function(e,t,r){"use strict";var n=e("./axis_attributes"),a=e("../../domain").attributes,i=e("../../../lib/extend").extendFlat,o=e("../../../lib").counterRegex;function s(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(s(0,0,1),{}),center:i(s(0,0,0),{}),eye:i(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:a({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},{"../../../lib":716,"../../../lib/extend":707,"../../domain":789,"./axis_attributes":806}],811:[function(e,t,r){"use strict";var n=e("../../../lib/str2rgbarray"),a=["xaxis","yaxis","zaxis"];function i(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}i.prototype.merge=function(e){for(var t=0;t<3;++t){var r=e[a[t]];r.visible?(this.enabled[t]=r.showspikes,this.colors[t]=n(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness):(this.enabled[t]=!1,this.drawSides[t]=!1)}},t.exports=function(e){var t=new i;return t.merge(e),t}},{"../../../lib/str2rgbarray":739}],812:[function(e,t,r){"use strict";t.exports=function(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,s=e.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[i[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/e.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/e.dataScale[c],u.range[1]=r[c].hi/e.dataScale[c],u._m=1/(e.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var d=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var p=u.nticks||a.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/p)}for(var h=n.calcTicks(u),f=0;f<h.length;++f)h[f].x=h[f].x*e.dataScale[c],"date"===u.type&&(h[f].text=h[f].text.replace(/\<br\>/g," "));l[c]=h,u.tickmode=d}}for(t.ticks=l,c=0;c<3;++c)for(o[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]),f=0;f<2;++f)t.bounds[f][c]=e.glplot.bounds[f][c];e.contourLevels=function(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],a=new Array(n.length),i=0;i<n.length;++i)a[i]=n[i].x;t[r]=a}return t}(l)};var n=e("../../cartesian/axes"),a=e("../../../lib"),i=["xaxis","yaxis","zaxis"],o=[0,0,0]},{"../../../lib":716,"../../cartesian/axes":764}],813:[function(e,t,r){"use strict";function n(e,t){var r,n,a=[0,0,0,0];for(r=0;r<4;++r)for(n=0;n<4;++n)a[n]+=e[4*r+n]*t[r];return a}t.exports=function(e,t){return n(e.projection,n(e.view,n(e.model,[t[0],t[1],t[2],1])))}},{}],814:[function(e,t,r){"use strict";var n,a,i=e("gl-plot3d"),o=i.createCamera,s=i.createScene,l=e("webgl-context"),c=e("has-passive-events"),u=e("../../registry"),d=e("../../lib"),p=e("../../plots/cartesian/axes"),h=e("../../components/fx"),f=e("../../lib/str2rgbarray"),m=e("../../lib/show_no_webgl_msg"),g=e("./project"),v=e("./layout/convert"),y=e("./layout/spikes"),b=e("./layout/tick_marks");function _(e){var t,r=e.graphDiv,n=e.svgContainer,a=e.container.getBoundingClientRect(),i=a.width,o=a.height;n.setAttributeNS(null,"viewBox","0 0 "+i+" "+o),n.setAttributeNS(null,"width",i),n.setAttributeNS(null,"height",o),b(e),e.glplot.axes.update(e.axesOptions);for(var s,l=Object.keys(e.traces),c=null,u=e.glplot.selection,f=0;f<l.length;++f)"skip"!==(t=e.traces[l[f]]).data.hoverinfo&&t.handlePick(u)&&(c=t),t.setContourLevels&&t.setContourLevels();function m(t,r){var n=e.fullSceneLayout[t];return p.tickText(n,n.d2l(r),"hover").text}if(null!==c){var v=g(e.glplot.cameraParams,u.dataCoordinate);t=c.data;var y,_=r._fullData[t.index],x=u.index,w={xLabel:m("xaxis",u.traceCoordinate[0]),yLabel:m("yaxis",u.traceCoordinate[1]),zLabel:m("zaxis",u.traceCoordinate[2])},k=h.castHoverinfo(_,e.fullLayout,x),M=(k||"").split("+"),T=k&&"all"===k;_.hovertemplate||T||(-1===M.indexOf("x")&&(w.xLabel=void 0),-1===M.indexOf("y")&&(w.yLabel=void 0),-1===M.indexOf("z")&&(w.zLabel=void 0),-1===M.indexOf("text")&&(u.textLabel=void 0),-1===M.indexOf("name")&&(c.name=void 0));var C=[];"cone"===t.type||"streamtube"===t.type?(w.uLabel=m("xaxis",u.traceCoordinate[3]),(T||-1!==M.indexOf("u"))&&C.push("u: "+w.uLabel),w.vLabel=m("yaxis",u.traceCoordinate[4]),(T||-1!==M.indexOf("v"))&&C.push("v: "+w.vLabel),w.wLabel=m("zaxis",u.traceCoordinate[5]),(T||-1!==M.indexOf("w"))&&C.push("w: "+w.wLabel),w.normLabel=u.traceCoordinate[6].toPrecision(3),(T||-1!==M.indexOf("norm"))&&C.push("norm: "+w.normLabel),"streamtube"===t.type&&(w.divergenceLabel=u.traceCoordinate[7].toPrecision(3),(T||-1!==M.indexOf("divergence"))&&C.push("divergence: "+w.divergenceLabel)),u.textLabel&&C.push(u.textLabel),y=C.join("<br>")):"isosurface"===t.type||"volume"===t.type?(w.valueLabel=p.tickText(e.mockAxis,e.mockAxis.d2l(u.traceCoordinate[3]),"hover").text,C.push("value: "+w.valueLabel),u.textLabel&&C.push(u.textLabel),y=C.join("<br>")):y=u.textLabel;var S={x:u.traceCoordinate[0],y:u.traceCoordinate[1],z:u.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:x};h.appendArrayPointValue(S,_,x),t._module.eventData&&(S=_._module.eventData(S,u,_,{},x));var L={points:[S]};e.fullSceneLayout.hovermode&&h.loneHover({trace:_,x:(.5+.5*v[0]/v[3])*i,y:(.5-.5*v[1]/v[3])*o,xLabel:w.xLabel,yLabel:w.yLabel,zLabel:w.zLabel,text:y,name:c.name,color:h.castHoverOption(_,x,"bgcolor")||c.color,borderColor:h.castHoverOption(_,x,"bordercolor"),fontFamily:h.castHoverOption(_,x,"font.family"),fontSize:h.castHoverOption(_,x,"font.size"),fontColor:h.castHoverOption(_,x,"font.color"),nameLength:h.castHoverOption(_,x,"namelength"),textAlign:h.castHoverOption(_,x,"align"),hovertemplate:d.castOption(_,x,"hovertemplate"),hovertemplateLabels:d.extendFlat({},S,w),eventData:[S]},{container:n,gd:r}),u.buttons&&u.distance<5?r.emit("plotly_click",L):r.emit("plotly_hover",L),s=L}else h.loneUnhover(n),r.emit("plotly_unhover",s);e.drawAnnotations(e)}function x(e,t,r){if(e.initializeGLCamera(),!function(e,t,r,i,o){var c={canvas:i,gl:o,container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:t,pixelRatio:r};if(e.staticMode){if(!(a||(n=document.createElement("canvas"),a=l({canvas:n,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");c.pixelRatio=e.pixelRatio,c.gl=a,c.canvas=n}var u=0;try{e.glplot=s(c)}catch(t){u++;try{e.glplot=s(c)}catch(e){u++}}return u<2}(e,e.camera,e.pixelRatio,t,r))return m(e);var i=e.graphDiv,o=i.layout,u=function(){var t={};return e.isCameraChanged(o)&&(t[e.id+".camera"]=e.getCamera()),e.isAspectChanged(o)&&(t[e.id+".aspectratio"]=e.glplot.getAspectratio()),t},d=function(e){if(!1!==e.fullSceneLayout.dragmode){var t=u();e.saveLayout(o),e.graphDiv.emit("plotly_relayout",t)}};return e.glplot.canvas.addEventListener("mouseup",(function(){d(e)})),e.glplot.canvas.addEventListener("wheel",(function(t){if(i._context._scrollZoom.gl3d){if(e.glplot.camera._ortho){var r=t.deltaX>t.deltaY?1.1:1/1.1,n=e.glplot.getAspectratio();e.glplot.setAspectratio({x:r*n.x,y:r*n.y,z:r*n.z})}d(e)}}),!!c&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=u();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(t){i&&i.emit&&i.emit("plotly_webglcontextlost",{event:t,layer:e.id})}),!1),e.glplot.camera=e.camera,e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=_.bind(null,e),e.traces={},e.make4thDimension(),!0}function w(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",r.appendChild(a),this.svgContainer=a,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=v(t,t[this.id]),this.spikeOptions=y(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=u.getComponentMethod("annotations3d","convert"),this.drawAnnotations=u.getComponentMethod("annotations3d","draw"),x(this)}var k=w.prototype;k.initializeGLCamera=function(){var e=this.fullSceneLayout.camera,t="orthographic"===e.projection.type;this.camera=o(this.container,{center:[e.center.x,e.center.y,e.center.z],eye:[e.eye.x,e.eye.y,e.eye.z],up:[e.up.x,e.up.y,e.up.z],_ortho:t,zoomMin:.01,zoomMax:100,mode:"orbit"})},k.recoverContext=function(){var e=this,t=this.glplot.gl,r=this.glplot.canvas;this.glplot.dispose(),requestAnimationFrame((function n(){t.isContextLost()?requestAnimationFrame(n):x(e,r,t)?e.plot.apply(e,e.plotArgs):d.error("Catastrophic and unrecoverable WebGL error. Context lost.")}))};var M=["xaxis","yaxis","zaxis"];function T(e,t,r){for(var n=e.fullSceneLayout,a=0;a<3;a++){var i=M[a],o=i.charAt(0),s=n[i],l=t[o],c=t[o+"calendar"],u=t["_"+o+"length"];if(d.isArrayOrTypedArray(l))for(var p,h=0;h<(u||l.length);h++)if(d.isArrayOrTypedArray(l[h]))for(var f=0;f<l[h].length;++f)p=s.d2l(l[h][f],0,c),!isNaN(p)&&isFinite(p)&&(r[0][a]=Math.min(r[0][a],p),r[1][a]=Math.max(r[1][a],p));else p=s.d2l(l[h],0,c),!isNaN(p)&&isFinite(p)&&(r[0][a]=Math.min(r[0][a],p),r[1][a]=Math.max(r[1][a],p));else r[0][a]=Math.min(r[0][a],0),r[1][a]=Math.max(r[1][a],u-1)}}k.plot=function(e,t,r){if(this.plotArgs=[e,t,r],!this.glplot.contextLost){var n,a,i,o,s,l,c=t[this.id],u=r[this.id];c.bgcolor?this.glplot.clearColor=f(c.bgcolor):this.glplot.clearColor=[0,0,0,0],this.glplot.snapToData=!0,this.fullLayout=t,this.fullSceneLayout=c,this.glplotLayout=c,this.axesOptions.merge(t,c),this.spikeOptions.merge(c),this.setViewport(c),this.updateFx(c.dragmode,c.hovermode),this.camera.enableWheel=this.graphDiv._context._scrollZoom.gl3d,this.glplot.update({}),this.setConvert(s),e?Array.isArray(e)||(e=[e]):e=[];var d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(i=0;i<e.length;++i)!0===(n=e[i]).visible&&0!==n._length&&T(this,n,d);!function(e,t){for(var r=e.fullSceneLayout,n=r.annotations||[],a=0;a<3;a++)for(var i=M[a],o=i.charAt(0),s=r[i],l=0;l<n.length;l++){var c=n[l];if(c.visible){var u=s.r2l(c[o]);!isNaN(u)&&isFinite(u)&&(t[0][a]=Math.min(t[0][a],u),t[1][a]=Math.max(t[1][a],u))}}}(this,d);var p=[1,1,1];for(o=0;o<3;++o)d[1][o]===d[0][o]?p[o]=1:p[o]=1/(d[1][o]-d[0][o]);for(this.dataScale=p,this.convertAnnotations(this),i=0;i<e.length;++i)!0===(n=e[i]).visible&&0!==n._length&&((a=this.traces[n.uid])?a.data.type===n.type?a.update(n):(a.dispose(),a=n._module.plot(this,n),this.traces[n.uid]=a):(a=n._module.plot(this,n),this.traces[n.uid]=a),a.name=n.name);var h=Object.keys(this.traces);e:for(i=0;i<h.length;++i){for(o=0;o<e.length;++o)if(e[o].uid===h[i]&&!0===e[o].visible&&0!==e[o]._length)continue e;(a=this.traces[h[i]]).dispose(),delete this.traces[h[i]]}this.glplot.objects.sort((function(e,t){return e._trace.data.index-t._trace.data.index}));var m=[[0,0,0],[0,0,0]],g=[],v={};for(i=0;i<3;++i){if((l=(s=c[M[i]]).type)in v?(v[l].acc*=p[i],v[l].count+=1):v[l]={acc:p[i],count:1},s.autorange){m[0][i]=1/0,m[1][i]=-1/0;var y=this.glplot.objects,b=this.fullSceneLayout.annotations||[],_=s._name.charAt(0);for(o=0;o<y.length;o++){var x=y[o],w=x.bounds,k=x._trace.data._pad||0;"ErrorBars"===x.constructor.name&&s._lowerLogErrorBound?m[0][i]=Math.min(m[0][i],s._lowerLogErrorBound):m[0][i]=Math.min(m[0][i],w[0][i]/p[i]-k),m[1][i]=Math.max(m[1][i],w[1][i]/p[i]+k)}for(o=0;o<b.length;o++){var C=b[o];if(C.visible){var S=s.r2l(C[_]);m[0][i]=Math.min(m[0][i],S),m[1][i]=Math.max(m[1][i],S)}}if("rangemode"in s&&"tozero"===s.rangemode&&(m[0][i]=Math.min(m[0][i],0),m[1][i]=Math.max(m[1][i],0)),m[0][i]>m[1][i])m[0][i]=-1,m[1][i]=1;else{var L=m[1][i]-m[0][i];m[0][i]-=L/32,m[1][i]+=L/32}if("reversed"===s.autorange){var A=m[0][i];m[0][i]=m[1][i],m[1][i]=A}}else{var E=s.range;m[0][i]=s.r2l(E[0]),m[1][i]=s.r2l(E[1])}m[0][i]===m[1][i]&&(m[0][i]-=1,m[1][i]+=1),g[i]=m[1][i]-m[0][i],this.glplot.bounds[0][i]=m[0][i]*p[i],this.glplot.bounds[1][i]=m[1][i]*p[i]}var D,I=[1,1,1];for(i=0;i<3;++i){var P=v[l=(s=c[M[i]]).type];I[i]=Math.pow(P.acc,1/P.count)/p[i]}if("auto"===c.aspectmode)D=Math.max.apply(null,I)/Math.min.apply(null,I)<=4?I:[1,1,1];else if("cube"===c.aspectmode)D=[1,1,1];else if("data"===c.aspectmode)D=I;else{if("manual"!==c.aspectmode)throw new Error("scene.js aspectRatio was not one of the enumerated types");var O=c.aspectratio;D=[O.x,O.y,O.z]}c.aspectratio.x=u.aspectratio.x=D[0],c.aspectratio.y=u.aspectratio.y=D[1],c.aspectratio.z=u.aspectratio.z=D[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z});var R=c.domain||null,F=t._size||null;if(R&&F){var z=this.container.style;z.position="absolute",z.left=F.l+R.x[0]*F.w+"px",z.top=F.t+(1-R.y[1])*F.h+"px",z.width=F.w*(R.x[1]-R.x[0])+"px",z.height=F.h*(R.y[1]-R.y[0])+"px"}this.glplot.redraw()}},k.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=this.glplot.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},k.getCamera=function(){return this.glplot.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(e=this.glplot.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}};var e},k.setViewport=function(e){var t,r=e.camera;this.glplot.camera.lookAt.apply(this,[[(t=r).eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),this.glplot.setAspectratio(e.aspectratio);var n="orthographic"===r.projection.type;if(n!==this.glplot.camera._ortho){this.glplot.redraw();var a=this.glplot.clearColor;this.glplot.gl.clearColor(a[0],a[1],a[2],a[3]),this.glplot.gl.clear(this.glplot.gl.DEPTH_BUFFER_BIT|this.glplot.gl.COLOR_BUFFER_BIT),this.glplot.dispose(),x(this),this.glplot.camera._ortho=n}},k.isCameraChanged=function(e){var t=this.getCamera(),r=d.nestedProperty(e,this.id+".camera").get();function n(e,t,r,n){var a=["up","center","eye"],i=["x","y","z"];return t[a[r]]&&e[a[r]][i[n]]===t[a[r]][i[n]]}var a=!1;if(void 0===r)a=!0;else{for(var i=0;i<3;i++)for(var o=0;o<3;o++)if(!n(t,r,i,o)){a=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(a=!0)}return a},k.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=d.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},k.saveLayout=function(e){var t,r,n,a,i,o,s=this.fullLayout,l=this.isCameraChanged(e),c=this.isAspectChanged(e),p=l||c;if(p){var h={};l&&(t=this.getCamera(),n=(r=d.nestedProperty(e,this.id+".camera")).get(),h[this.id+".camera"]=n),c&&(a=this.glplot.getAspectratio(),o=(i=d.nestedProperty(e,this.id+".aspectratio")).get(),h[this.id+".aspectratio"]=o),u.call("_storeDirectGUIEdit",e,s._preGUI,h),l&&(r.set(t),d.nestedProperty(s,this.id+".camera").set(t)),c&&(i.set(a),d.nestedProperty(s,this.id+".aspectratio").set(a),this.glplot.redraw())}return p},k.updateFx=function(e,t){var r=this.camera;if(r)if("orbit"===e)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===e){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var n=this.graphDiv,a=n._fullLayout,i=this.fullSceneLayout.camera,o=i.up.x,s=i.up.y,l=i.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+".camera.up",p={x:0,y:0,z:1},h={};h[c]=p;var f=n.layout;u.call("_storeDirectGUIEdit",f,a._preGUI,h),i.up=p,d.nestedProperty(f,c).set(p)}}else r.keyBindingMode=e;this.fullSceneLayout.hovermode=t},k.toImage=function(e){e||(e="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var t=this.glplot.gl,r=t.drawingBufferWidth,a=t.drawingBufferHeight;t.bindFramebuffer(t.FRAMEBUFFER,null);var i=new Uint8Array(r*a*4);t.readPixels(0,0,r,a,t.RGBA,t.UNSIGNED_BYTE,i);for(var o=0,s=a-1;o<s;++o,--s)for(var l=0;l<r;++l)for(var c=0;c<4;++c){var u=i[4*(r*o+l)+c];i[4*(r*o+l)+c]=i[4*(r*s+l)+c],i[4*(r*s+l)+c]=u}var d=document.createElement("canvas");d.width=r,d.height=a;var p,h=d.getContext("2d"),f=h.createImageData(r,a);switch(f.data.set(i),h.putImageData(f,0,0),e){case"jpeg":p=d.toDataURL("image/jpeg");break;case"webp":p=d.toDataURL("image/webp");break;default:p=d.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(n),p},k.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[M[e]];p.setConvert(t,this.fullLayout),t.setScale=d.noop}},k.make4thDimension=function(){var e=this.graphDiv._fullLayout;this.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(this.mockAxis,e)},t.exports=w},{"../../components/fx":629,"../../lib":716,"../../lib/show_no_webgl_msg":737,"../../lib/str2rgbarray":739,"../../plots/cartesian/axes":764,"../../registry":845,"./layout/convert":808,"./layout/spikes":811,"./layout/tick_marks":812,"./project":813,"gl-plot3d":292,"has-passive-events":412,"webgl-context":554}],815:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){n=n||e.length;for(var a=new Array(n),i=0;i<n;i++)a[i]=[e[i],t[i],r[i]];return a}},{}],816:[function(e,t,r){"use strict";var n=e("./font_attributes"),a=e("./animation_attributes"),i=e("../components/color/attributes"),o=e("./pad_attributes"),s=e("../lib/extend").extendFlat,l=n({editType:"calc"});l.family.dflt='"Open Sans", verdana, arial, sans-serif',l.size.dflt=12,l.color.dflt=i.defaultLine,t.exports={font:l,title:{text:{valType:"string",editType:"layoutstyle"},font:n({editType:"layoutstyle"}),xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:s(o({editType:"layoutstyle"}),{}),editType:"layoutstyle"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},paper_bgcolor:{valType:"color",dflt:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},modebar:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"modebar"},meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:s({},a.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:n({editType:"layoutstyle"})}}},{"../components/color/attributes":590,"../lib/extend":707,"./animation_attributes":759,"./font_attributes":790,"./pad_attributes":824}],817:[function(e,t,r){"use strict";var n={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:'<a href="http://www.openstreetmap.org/about/" target="_blank">© OpenStreetMap</a>',tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:'<a href="https://carto.com/" target="_blank">© CARTO</a>',tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:'<a href="https://carto.com/" target="_blank">© CARTO</a>',tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> | Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> | Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> | Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.',tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},a=Object.keys(n);t.exports={requiredVersion:"1.3.2",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:n,styleValuesNonMapbox:a,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.3.2."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:","  Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",a.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},{}],818:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){var r=e.split(" "),a=r[0],i=r[1],o=n.isArrayOrTypedArray(t)?n.mean(t):t,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(a){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(i){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},{"../../lib":716}],819:[function(e,t,r){"use strict";var n=e("mapbox-gl"),a=e("../../lib"),i=e("../../plots/get_data").getSubplotCalcData,o=e("../../constants/xmlns_namespaces"),s=e("d3"),l=e("../../components/drawing"),c=e("../../lib/svg_text_utils"),u=e("./mapbox"),d=r.constants=e("./constants");function p(e){return"string"==typeof e&&(-1!==d.styleValuesMapbox.indexOf(e)||0===e.indexOf("mapbox://"))}r.name="mapbox",r.attr="subplot",r.idRoot="mapbox",r.idRegex=r.attrRegex=a.counterRegex("mapbox"),r.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},r.layoutAttributes=e("./layout_attributes"),r.supplyLayoutDefaults=e("./layout_defaults"),r.plot=function(e){var t=e._fullLayout,r=e.calcdata,o=t._subplots.mapbox;if(n.version!==d.requiredVersion)throw new Error(d.wrongVersionErrorMsg);var s=function(e,t){var r=e._fullLayout;if(""===e._context.mapboxAccessToken)return"";for(var n=[],i=[],o=!1,s=!1,l=0;l<t.length;l++){var c=r[t[l]],u=c.accesstoken;p(c.style)&&(u?a.pushUnique(n,u):(p(c._input.style)&&(a.error("Uses Mapbox map style, but did not set an access token."),o=!0),s=!0)),u&&a.pushUnique(i,u)}if(s){var h=o?d.noAccessTokenErrorMsg:d.missingStyleErrorMsg;throw new Error(h)}return n.length?(n.length>1&&a.warn(d.multipleTokensErrorMsg),n[0]):(i.length&&a.log(["Listed mapbox access token(s)",i.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,o);n.accessToken=s;for(var l=0;l<o.length;l++){var c=o[l],h=i(r,"mapbox",c),f=t[c],m=f._subplot;m||(m=new u(e,c),t[c]._subplot=m),m.viewInitial||(m.viewInitial={center:a.extendFlat({},f.center),zoom:f.zoom,bearing:f.bearing,pitch:f.pitch}),m.plot(h,t,e._promises)}},r.clean=function(e,t,r,n){for(var a=n._subplots.mapbox||[],i=0;i<a.length;i++){var o=a[i];!t[o]&&n[o]._subplot&&n[o]._subplot.destroy()}},r.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots.mapbox,n=t._size,a=0;a<r.length;a++){var i=t[r[a]],u=i.domain,p=i._subplot.toImage("png");t._glimages.append("svg:image").attr({xmlns:o.svg,"xlink:href":p,x:n.l+n.w*u.x[0],y:n.t+n.h*(1-u.y[1]),width:n.w*(u.x[1]-u.x[0]),height:n.h*(u.y[1]-u.y[0]),preserveAspectRatio:"none"});var h=s.select(i._subplot.div);if(null!==h.select(".mapboxgl-ctrl-logo").node().offsetParent){var f=t._glimages.append("g");f.attr("transform","translate("+(n.l+n.w*u.x[0]+10)+", "+(n.t+n.h*(1-u.y[0])-31)+")"),f.append("path").attr("d",d.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),f.append("path").attr("d",d.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),f.append("path").attr("d",d.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),f.append("polygon").attr("points",d.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var m=h.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),g=t._glimages.append("g"),v=g.append("text");v.text(m).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":m});var y=l.bBox(v.node()),b=n.w*(u.x[1]-u.x[0]);if(y.width>b/2){var _=m.split("|").join("<br>");v.text(_).attr("data-unformatted",_).call(c.convertToTspans,e),y=l.bBox(v.node())}v.attr("transform","translate(-3, "+(8-y.height)+")"),g.insert("rect",".static-attribution").attr({x:-y.width-6,y:-y.height-3,width:y.width+6,height:y.height+3,fill:"rgba(255, 255, 255, 0.75)"});var x=1;y.width+6>b&&(x=b/(y.width+6));var w=[n.l+n.w*u.x[1],n.t+n.h*(1-u.y[0])];g.attr("transform","translate("+w[0]+","+w[1]+") scale("+x+")")}},r.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots.mapbox,n=0;n<r.length;n++)t[r[n]]._subplot.updateFx(t)}},{"../../components/drawing":612,"../../constants/xmlns_namespaces":693,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/get_data":799,"./constants":817,"./layout_attributes":821,"./layout_defaults":822,"./mapbox":823,d3:164,"mapbox-gl":427}],820:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./convert_text_opts"),i=e("./constants");function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=i.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if("string"!=typeof t[r]||0===t[r].length)return!1;return!0}return n.isPlainObject(t)||"string"==typeof t&&t.length>0}function c(e){var t={},r={};switch(e.type){case"circle":n.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":n.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(t,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity})}return{layout:t,paint:r}}s.update=function(e){this.visible?this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||this.source!==e.source||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r=function(e){var t,r=e.sourcetype,n=e.source,a={type:r};return"geojson"===r?t="data":"vector"===r?t="string"==typeof n?"url":"tiles":"raster"===r?(t="tiles",a.tileSize=256):"image"===r&&(t="url",a.coordinates=e.coordinates),a[t]=n,e.sourceattribution&&(a.attribution=e.sourceattribution),a}(e);t.addSource(this.idSource,r)}},s.updateLayer=function(e){var t,r=this.subplot,n=c(e),a=this.subplot.belowLookup["layout-"+this.index];if("traces"===a)for(var o=r.getMapLayers(),s=0;s<o.length;s++){var u=o[s].id;if("string"==typeof u&&0===u.indexOf(i.traceLayerPrefix)){t=u;break}}else t=a;this.removeLayer(),l(e)&&r.addLayer({id:this.idLayer,source:this.idSource,"source-layer":e.sourcelayer||"",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:n.layout,paint:n.paint},t),this.layerType=e.type,this.below=a},s.updateStyle=function(e){if(l(e)){var t=c(e);this.subplot.setOptions(this.idLayer,"setLayoutProperty",t.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",t.paint)}},s.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)},s.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)},t.exports=function(e,t,r){var n=new o(e,t);return n.update(r),n}},{"../../lib":716,"./constants":817,"./convert_text_opts":818}],821:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color").defaultLine,i=e("../domain").attributes,o=e("../font_attributes"),s=e("../../traces/scatter/attributes").textposition,l=e("../../plot_api/edit_types").overrideAll,c=e("../../plot_api/plot_template").templatedArray,u=e("./constants"),d=o({});d.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=l({_arrayAttrRegexps:[n.counterRegex("mapbox",".layers",!0)],domain:i({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:u.styleValuesMapbox.concat(u.styleValuesNonMapbox),dflt:u.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},layers:c("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:a},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:a}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:d,textposition:n.extendFlat({},s,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}},{"../../components/color":591,"../../lib":716,"../../plot_api/edit_types":747,"../../plot_api/plot_template":754,"../../traces/scatter/attributes":1118,"../domain":789,"../font_attributes":790,"./constants":817}],822:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../subplot_defaults"),i=e("../array_container_defaults"),o=e("./layout_attributes");function s(e,t,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch"),i(e,t,{name:"layers",handleItemDefaults:l}),t._input=e}function l(e,t){function r(r,a){return n.coerce(e,t,o.layers,r,a)}if(r("visible")){var a,i=r("sourcetype"),s="raster"===i||"image"===i;r("source"),r("sourceattribution"),"vector"===i&&r("sourcelayer"),"image"===i&&r("coordinates"),s&&(a="raster");var l=r("type",a);s&&"raster"!==l&&(l=t.type="raster",n.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),"circle"===l&&r("circle.radius"),"line"===l&&(r("line.width"),r("line.dash")),"fill"===l&&r("fill.outlinecolor"),"symbol"===l&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),n.coerceFont(r,"symbol.textfont"),r("symbol.textposition"),r("symbol.placement"))}}t.exports=function(e,t,r){a(e,t,r,{type:"mapbox",attributes:o,handleDefaults:s,partition:"y",accessToken:t._mapboxAccessToken})}},{"../../lib":716,"../array_container_defaults":760,"../subplot_defaults":839,"./layout_attributes":821}],823:[function(e,t,r){"use strict";var n=e("mapbox-gl"),a=e("d3"),i=e("../../components/fx"),o=e("../../lib"),s=e("../../registry"),l=e("../cartesian/axes"),c=e("../../components/dragelement"),u=e("../cartesian/select").prepSelect,d=e("../cartesian/select").selectOnClick,p=e("./constants"),h=e("./layers");function f(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={}}var m=f.prototype;m.plot=function(e,t,r){var n,a=this,i=t[a.id];a.map&&i.accesstoken!==a.accessToken&&(a.map.remove(),a.map=null,a.styleObj=null,a.traceHash=[],a.layerList={}),n=a.map?new Promise((function(r,n){a.updateMap(e,t,r,n)})):new Promise((function(r,n){a.createMap(e,t,r,n)})),r.push(n)},m.createMap=function(e,t,r,a){var i=this,o=t[i.id],s=i.styleObj=v(o.style);i.accessToken=o.accesstoken;var l=i.map=new n.Map({container:i.div,style:s.style,center:b(o.center),zoom:o.zoom,bearing:o.bearing,pitch:o.pitch,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new n.AttributionControl({compact:!0}));l._canvas.style.left="0px",l._canvas.style.top="0px",i.rejectOnError(a),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise((function(e){l.once("load",e)}))),c=c.concat(i.fetchMapData(e,t)),Promise.all(c).then((function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)})).catch(a)},m.fetchMapData=function(e){var t=[];function r(e){return new Promise((function(t,r){a.json(e,(function(n,a){if(n){delete PlotlyGeoAssets[e];var i=404===n.status?'GeoJSON at URL "'+e+'" does not exist.':"Unexpected error while fetching from "+e;return r(new Error(i))}PlotlyGeoAssets[e]=a,t(a)}))}))}for(var n=0;n<e.length;n++){var i=e[n][0].trace.geojson;"string"!=typeof i||PlotlyGeoAssets[i]||(PlotlyGeoAssets[i]="pending",t.push(r(i)))}return t},m.updateMap=function(e,t,r,n){var a=this,i=a.map,o=t[this.id];a.rejectOnError(n);var s=[],l=v(o.style);a.styleObj.id!==l.id&&(a.styleObj=l,i.setStyle(l.style),a.traceHash={},s.push(new Promise((function(e){i.once("styledata",e)})))),s=s.concat(a.fetchMapData(e,t)),Promise.all(s).then((function(){a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)})).catch(n)},m.fillBelowLookup=function(e,t){var r,n,a=t[this.id].layers,i=this.belowLookup={},o=!1;for(r=0;r<e.length;r++){var s=e[r][0].trace,l=s._module;"string"==typeof s.below?n=s.below:l.getBelow&&(n=l.getBelow(s,this)),""===n&&(o=!0),i["trace-"+s.uid]=n||""}for(r=0;r<a.length;r++){var c=a[r];n="string"==typeof c.below?c.below:o?"traces":"",i["layout-"+r]=n}var u,d,p={};for(u in i)p[n=i[u]]?p[n].push(u):p[n]=[u];for(n in p){var h=p[n];if(h.length>1)for(r=0;r<h.length;r++)0===(u=h[r]).indexOf("trace-")?(d=u.split("trace-")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):0===u.indexOf("layout-")&&(d=u.split("layout-")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var g={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function v(e){var t={};return o.isPlainObject(e)?(t.id=e.id,t.style=e):"string"==typeof e?(t.id=e,-1!==p.styleValuesMapbox.indexOf(e)?t.style=y(e):p.stylesNonMapbox[e]?t.style=p.stylesNonMapbox[e]:t.style=e):(t.id=p.styleValueDflt,t.style=y(p.styleValueDflt)),t.transition={duration:0,delay:0},t}function y(e){return p.styleUrlPrefix+e+"-"+p.styleUrlSuffix}function b(e){return[e.lon,e.lat]}m.updateData=function(e){var t,r,n,a,i=this.traceHash,o=e.slice().sort((function(e,t){return g[e[0].trace.type]-g[t[0].trace.type]}));for(n=0;n<o.length;n++){var s=o[n],l=!1;(t=i[(r=s[0].trace).uid])&&(t.type===r.type?(t.update(s),l=!0):t.dispose()),!l&&r._module&&(i[r.uid]=r._module.plot(this,s))}var c=Object.keys(i);e:for(n=0;n<c.length;n++){var u=c[n];for(a=0;a<e.length;a++)if(u===(r=e[a][0].trace).uid)continue e;(t=i[u]).dispose(),delete i[u]}},m.updateLayout=function(e){var t=this.map,r=e[this.id];t.setCenter(b(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.mapbox?t.scrollZoom.enable():t.scrollZoom.disable()},m.resolveOnRender=function(e){var t=this.map;t.on("render",(function r(){t.loaded()&&(t.off("render",r),setTimeout(e,10))}))},m.rejectOnError=function(e){var t=this.map;function r(){e(new Error(p.mapOnErrorMsg))}t.once("error",r),t.once("style.error",r),t.once("source.error",r),t.once("tile.error",r),t.once("layer.error",r)},m.createFramework=function(e){var t=this,r=t.div=document.createElement("div");r.id=t.uid,r.style.position="absolute",t.container.appendChild(r),t.xaxis={_id:"x",c2p:function(e){return t.project(e).x}},t.yaxis={_id:"y",c2p:function(e){return t.project(e).y}},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(t.mockAxis,e)},m.initFx=function(e,t){var r=this,n=r.gd,a=r.map,o=!1;function l(){i.loneUnhover(t._hoverlayer)}function c(){var e=r.getView();n.emit("plotly_relayouting",r.getViewEdits(e))}a.on("moveend",(function(e){if(r.map){var t=n._fullLayout;if(e.originalEvent||o){var a=t[r.id];s.call("_storeDirectGUIEdit",n.layout,t._preGUI,r.getViewEdits(a));var i=r.getView();a._input.center=a.center=i.center,a._input.zoom=a.zoom=i.zoom,a._input.bearing=a.bearing=i.bearing,a._input.pitch=a.pitch=i.pitch,n.emit("plotly_relayout",r.getViewEdits(i))}o=!1,t._rehover&&t._rehover()}})),a.on("wheel",(function(){o=!0})),a.on("mousemove",(function(e){var t=r.div.getBoundingClientRect();e.clientX=e.point.x+t.left,e.clientY=e.point.y+t.top,e.target.getBoundingClientRect=function(){return t},r.xaxis.p2c=function(){return e.lngLat.lng},r.yaxis.p2c=function(){return e.lngLat.lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&i.hover(n,e,r.id)},i.hover(n,e,r.id),n._fullLayout._hoversubplot=r.id})),a.on("dragstart",l),a.on("zoomstart",l),a.on("mouseout",(function(){n._fullLayout._hoversubplot=null})),a.on("drag",c),a.on("zoom",c),a.on("dblclick",(function(){var e=n._fullLayout[r.id];s.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(e));var t=r.viewInitial;a.setCenter(b(t.center)),a.setZoom(t.zoom),a.setBearing(t.bearing),a.setPitch(t.pitch);var i=r.getView();e._input.center=e.center=i.center,e._input.zoom=e.zoom=i.zoom,e._input.bearing=e.bearing=i.bearing,e._input.pitch=e.pitch=i.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEdits(i))})),r.clearSelect=function(){n._fullLayout._zoomlayer.selectAll(".select-outline").remove()},r.onClickInPanFn=function(e){return function(t){var a=n._fullLayout.clickmode;a.indexOf("select")>-1&&d(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),a.indexOf("event")>-1&&i.click(n,t.originalEvent)}}},m.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var a,i=e.dragmode;a="select"===i?function(e,r){(e.range={})[t.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]}:function(e,r,n){(e.lassoPoints={})[t.id]=n.filtered.map(l)};var s=t.dragOptions;t.dragOptions=o.extendDeep(s||{},{element:t.div,gd:n,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),"select"===i||"lasso"===i?(r.dragPan.disable(),r.on("zoomstart",t.clearSelect),t.dragOptions.prepFn=function(e,r,n){u(e,r,n,t.dragOptions,i)},c.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearSelect),t.div.onmousedown=null,t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function l(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},m.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},m.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;t<n.length;t++)n[t].dispose();for(n=this.layerList=[],t=0;t<r.length;t++)n.push(h(this,t,r[t]))}else for(t=0;t<r.length;t++)n[t].update(r[t])},m.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},m.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},m.setOptions=function(e,t,r){for(var n in r)this.map[t](e,n,r[n])},m.getMapLayers=function(){return this.map.getStyle().layers},m.addLayer=function(e,t){var r=this.map;if("string"==typeof t){if(""===t)return void r.addLayer(e,t);for(var n=this.getMapLayers(),a=0;a<n.length;a++)if(t===n[a].id)return void r.addLayer(e,t);o.warn(["Trying to add layer with *below* value",t,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(e)},m.project=function(e){return this.map.project(new n.LngLat(e[0],e[1]))},m.getView=function(){var e=this.map,t=e.getCenter();return{center:{lon:t.lng,lat:t.lat},zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch()}},m.getViewEdits=function(e){for(var t=this.id,r=["center","zoom","bearing","pitch"],n={},a=0;a<r.length;a++){var i=r[a];n[t+"."+i]=e[i]}return n},t.exports=f},{"../../components/dragelement":609,"../../components/fx":629,"../../lib":716,"../../registry":845,"../cartesian/axes":764,"../cartesian/select":781,"./constants":817,"./layers":820,d3:164,"mapbox-gl":427}],824:[function(e,t,r){"use strict";t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}},{}],825:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../registry"),o=e("../plot_api/plot_schema"),s=e("../plot_api/plot_template"),l=e("../lib"),c=e("../components/color"),u=e("../constants/numerical").BADNUM,d=e("./cartesian/axis_ids"),p=e("./animation_attributes"),h=e("./frame_attributes"),f=e("../plots/get_data").getModuleCalcData,m=l.relinkPrivateKeys,g=l._,v=t.exports={};l.extendFlat(v,i),v.attributes=e("./attributes"),v.attributes.type.values=v.allTypes,v.fontAttrs=e("./font_attributes"),v.layoutAttributes=e("./layout_attributes"),v.fontWeight="normal";var y=v.transformsRegistry,b=e("./command");v.executeAPICommand=b.executeAPICommand,v.computeAPICommandBindings=b.computeAPICommandBindings,v.manageCommandObserver=b.manageCommandObserver,v.hasSimpleAPICommandBindings=b.hasSimpleAPICommandBindings,v.redrawText=function(e){var t=(e=l.getGraphDiv(e))._fullLayout||{};if(t._has&&t._has("polar")||!e.data||!e.data[0]||!e.data[0].r)return new Promise((function(t){setTimeout((function(){i.getComponentMethod("annotations","draw")(e),i.getComponentMethod("legend","draw")(e),i.getComponentMethod("colorbar","draw")(e),t(v.previousPromises(e))}),300)}))},v.resize=function(e){return e=l.getGraphDiv(e),new Promise((function(t,r){e&&!l.isHidden(e)||r(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._redrawTimer=setTimeout((function(){if(!e.layout||e.layout.width&&e.layout.height||l.isHidden(e))t(e);else{delete e.layout.width,delete e.layout.height;var r=e.changed;e.autoplay=!0,i.call("relayout",e,{autosize:!0}).then((function(){e.changed=r,t(e)}))}}),100)}))},v.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then((function(){e._promises=[]}))},v.addLinks=function(e){if(e._context.showLink||e._context.showSources){var t=e._fullLayout,r=l.ensureSingle(t._paper,"text","js-plot-link-container",(function(e){e.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:c.defaultLine,"pointer-events":"all"}).each((function(){var e=n.select(this);e.append("tspan").classed("js-link-to-tool",!0),e.append("tspan").classed("js-link-spacer",!0),e.append("tspan").classed("js-sourcelinks",!0)}))})),a=r.node(),i={y:t._paper.attr("height")-9};document.body.contains(a)&&a.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),u=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" "+String.fromCharCode(187));if(e._context.sendData)r.on("click",(function(){v.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),a=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+a})}}(e,o),s.text(o.text()&&u.text()?" - ":"")}},v.sendDataToCloud=function(e){e.emit("plotly_beforeexport");var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL,r=n.select(e).append("div").attr("id","hiddenform").style("display","none"),a=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=v.graphJson(e,!1,"keepdata"),a.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],x=["year","month","dayMonth","dayMonthYear"];function w(e,t){var r=e._context.locale,n=!1,a={};function o(e){for(var r=!0,i=0;i<t.length;i++){var o=t[i];a[o]||(e[o]?a[o]=e[o]:r=!1)}r&&(n=!0)}for(var s=0;s<2;s++){for(var l=e._context.locales,c=0;c<2;c++){var u=(l[r]||{}).format;if(u&&(o(u),n))break;l=i.localeRegistry}var d=r.split("-")[0];if(n||d===r)break;r=d}return n||o(i.localeRegistry.en.format),a}function k(e,t){var r={_fullLayout:t},n="x"===e._id.charAt(0),a=e._mainAxis._anchorAxis,i="",o="",s="";if(a&&(s=a._mainAxis._id,i=n?e._id+s:s+e._id),!i||!t._plots[i]){i="";for(var l=e._counterAxes,c=0;c<l.length;c++){var u=l[c],p=n?e._id+u:u+e._id;o||(o=p);var h=d.getFromId(r,u);if(s&&h.overlaying===s){i=p;break}}}return i||o}function M(e){var t=e.transforms;if(Array.isArray(t)&&t.length)for(var r=0;r<t.length;r++){var n=t[r],a=n._module||y[n.type];if(a&&a.makesData)return!0}return!1}function T(e,t,r,n){for(var a=e.transforms,i=[e],o=0;o<a.length;o++){var s=a[o],l=y[s.type];l&&l.transform&&(i=l.transform(i,{transform:s,fullTrace:e,fullData:t,layout:r,fullLayout:n,transformIndex:o}))}return i}function C(e){var t=e.margin;if(!e._size){var r=e._size={l:Math.round(t.l),r:Math.round(t.r),t:Math.round(t.t),b:Math.round(t.b),p:Math.round(t.pad)};r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b}e._pushmargin||(e._pushmargin={}),e._pushmarginIds||(e._pushmarginIds={})}v.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,a=e._fullLayout||{};if(a._skipDefaults)delete a._skipDefaults;else{var o,s=e._fullLayout={},c=e.layout||{},u=e._fullData||[],d=e._fullData=[],p=e.data||[],h=e.calcdata||[],f=e._context||{};e._transitionData||v.createTransitionData(e),s._dfltTitle={plot:g(e,"Click to enter Plot title"),x:g(e,"Click to enter X axis title"),y:g(e,"Click to enter Y axis title"),colorbar:g(e,"Click to enter Colorscale title"),annotation:g(e,"new text")},s._traceWord=g(e,"trace");var y=w(e,_);if(s._mapboxAccessToken=f.mapboxAccessToken,a._initialAutoSizeIsDone){var b=a.width,k=a.height;v.supplyLayoutGlobalDefaults(c,s,y),c.width||(s.width=b),c.height||(s.height=k),v.sanitizeMargins(s)}else{v.supplyLayoutGlobalDefaults(c,s,y);var M=!c.width||!c.height,T=s.autosize,S=f.autosizable;M&&(T||S)?v.plotAutoSize(e,c,s):M&&v.sanitizeMargins(s),!T&&M&&(c.width=s.width,c.height=s.height)}s._d3locale=function(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),n.locale(e)}(y,s.separators),s._extraFormat=w(e,x),s._initialAutoSizeIsDone=!0,s._dataLength=p.length,s._modules=[],s._visibleModules=[],s._basePlotModules=[];var L=s._subplots=function(){var e,t,r=i.collectableSubplotTypes,n={};if(!r){r=[];var a=i.subplotsRegistry;for(var o in a){var s=a[o].attr;if(s&&(r.push(o),Array.isArray(s)))for(t=0;t<s.length;t++)l.pushUnique(r,s[t])}}for(e=0;e<r.length;e++)n[r[e]]=[];return n}(),A=s._splomAxes={x:{},y:{}},E=s._splomSubplots={};s._splomGridDflt={},s._scatterStackOpts={},s._firstScatter={},s._alignmentOpts={},s._colorAxes={},s._requestRangeslider={},s._traceUids=function(e,t){var r,n,a=t.length,i=[];for(r=0;r<e.length;r++){var o=e[r]._fullInput;o!==n&&i.push(o),n=o}var s=i.length,c=new Array(a),u={};function d(e,t){c[t]=e,u[e]=1}function p(e,t){if(e&&"string"==typeof e&&!u[e])return d(e,t),!0}for(r=0;r<a;r++){var h=t[r].uid;"number"==typeof h&&(h=String(h)),p(h,r)||r<s&&p(i[r].uid,r)||d(l.randstr(u),r)}return c}(u,p),s._globalTransforms=(e._context||{}).globalTransforms,v.supplyDataDefaults(p,d,c,s);var D=Object.keys(A.x),I=Object.keys(A.y);if(D.length>1&&I.length>1){for(i.getComponentMethod("grid","sizeDefaults")(c,s),o=0;o<D.length;o++)l.pushUnique(L.xaxis,D[o]);for(o=0;o<I.length;o++)l.pushUnique(L.yaxis,I[o]);for(var P in E)l.pushUnique(L.cartesian,P)}if(s._has=v._hasPlotType.bind(s),u.length===d.length)for(o=0;o<d.length;o++)m(d[o],u[o]);v.supplyLayoutModuleDefaults(c,s,d,e._transitionData);var O=s._visibleModules,R=[];for(o=0;o<O.length;o++){var F=O[o].crossTraceDefaults;F&&l.pushUnique(R,F)}for(o=0;o<R.length;o++)R[o](d,s);s._hasOnlyLargeSploms=1===s._basePlotModules.length&&"splom"===s._basePlotModules[0].name&&D.length>15&&I.length>15&&0===s.shapes.length&&0===s.images.length,s._hasCartesian=s._has("cartesian"),s._hasGeo=s._has("geo"),s._hasGL3D=s._has("gl3d"),s._hasGL2D=s._has("gl2d"),s._hasTernary=s._has("ternary"),s._hasPie=s._has("pie"),v.linkSubplots(d,s,u,a),v.cleanPlot(d,s,u,a),a._zoomlayer&&!e._dragging&&a._zoomlayer.selectAll(".select-outline").remove(),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var a=0;a<e.length;a++){var i=e[a];i.meta?n[i.index]=i._meta={meta:i.meta}:t.meta&&(i._meta={meta:t.meta}),t.meta&&(i._meta.layout={meta:t.meta})}n.length&&(r||(r=t._meta={}),r.data=n)}(d,s),m(s,a),i.getComponentMethod("colorscale","crossTraceDefaults")(d,s),s._preGUI||(s._preGUI={}),s._tracePreGUI||(s._tracePreGUI={});var z,N=s._tracePreGUI,j={};for(z in N)j[z]="old";for(o=0;o<d.length;o++)j[z=d[o]._fullInput.uid]||(N[z]={}),j[z]="new";for(z in j)"old"===j[z]&&delete N[z];C(s),i.getComponentMethod("rangeslider","makeData")(s),r||h.length!==d.length||v.supplyDefaultsUpdateCalc(h,d)}},v.supplyDefaultsUpdateCalc=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],a=(e[r]||[])[0];if(a&&a.trace){var i=a.trace;if(i._hasCalcTransform){var o,s,c,u=i._arrayAttrs;for(o=0;o<u.length;o++)s=u[o],c=l.nestedProperty(i,s).get().slice(),l.nestedProperty(n,s).set(c)}a.trace=n}}},v.createTransitionData=function(e){e._transitionData||(e._transitionData={}),e._transitionData._frames||(e._transitionData._frames=[]),e._transitionData._frameHash||(e._transitionData._frameHash={}),e._transitionData._counter||(e._transitionData._counter=0),e._transitionData._interruptCallbacks||(e._transitionData._interruptCallbacks=[])},v._hasPlotType=function(e){var t,r=this._basePlotModules||[];for(t=0;t<r.length;t++)if(r[t].name===e)return!0;var n=this._modules||[];for(t=0;t<n.length;t++){var a=n[t].name;if(a===e)return!0;var o=i.modules[a];if(o&&o.categories[e])return!0}return!1},v.cleanPlot=function(e,t,r,n){var a,i,o=n._basePlotModules||[];for(a=0;a<o.length;a++){var s=o[a];s.clean&&s.clean(e,t,r,n)}var l=n._has&&n._has("gl"),c=t._has&&t._has("gl");l&&!c&&void 0!==n._glcontainer&&(n._glcontainer.selectAll(".gl-canvas").remove(),n._glcontainer.selectAll(".no-webgl").remove(),n._glcanvas=null);var u=!!n._infolayer;e:for(a=0;a<r.length;a++){var d=r[a].uid;for(i=0;i<e.length;i++)if(d===e[i].uid)continue e;u&&n._infolayer.select(".cb"+d).remove()}},v.linkSubplots=function(e,t,r,n){var a,o,s=n._plots||{},c=t._plots={},u=t._subplots,p={_fullData:e,_fullLayout:t},h=u.cartesian.concat(u.gl2d||[]);for(a=0;a<h.length;a++){var f,m=h[a],g=s[m],v=d.getFromId(p,m,"x"),y=d.getFromId(p,m,"y");for(g?f=c[m]=g:(f=c[m]={}).id=m,v._counterAxes.push(y._id),y._counterAxes.push(v._id),v._subplotsWith.push(m),y._subplotsWith.push(m),f.xaxis=v,f.yaxis=y,f._hasClipOnAxisFalse=!1,o=0;o<e.length;o++){var b=e[o];if(b.xaxis===f.xaxis._id&&b.yaxis===f.yaxis._id&&!1===b.cliponaxis){f._hasClipOnAxisFalse=!0;break}}}var _,x=d.list(p,null,!0);for(a=0;a<x.length;a++){var w=null;(_=x[a]).overlaying&&(w=d.getFromId(p,_.overlaying))&&w.overlaying&&(_.overlaying=!1,w=null),_._mainAxis=w||_,w&&(_.domain=w.domain.slice()),_._anchorAxis="free"===_.anchor?null:d.getFromId(p,_.anchor)}for(a=0;a<x.length;a++)if((_=x[a])._counterAxes.sort(d.idSort),_._subplotsWith.sort(l.subplotSort),_._mainSubplot=k(_,t),_._counterAxes.length&&(_.spikemode&&-1!==_.spikemode.indexOf("across")||_.automargin&&_.mirror&&"free"!==_.anchor||i.getComponentMethod("rangeslider","isVisible")(_))){var M=1,T=0;for(o=0;o<_._counterAxes.length;o++){var C=d.getFromId(p,_._counterAxes[o]);M=Math.min(M,C.domain[0]),T=Math.max(T,C.domain[1])}M<T&&(_._counterDomainMin=M,_._counterDomainMax=T)}},v.clearExpandedTraceDefaultColors=function(e){var t,r,n;for(r=[],(t=e._module._colorAttrs)||(e._module._colorAttrs=t=[],o.crawl(e._module.attributes,(function(e,n,a,i){r[i]=n,r.length=i+1,"color"===e.valType&&void 0===e.dflt&&t.push(r.join("."))}))),n=0;n<t.length;n++)l.nestedProperty(e,"_input."+t[n]).get()||l.nestedProperty(e,t[n]).set(null)},v.supplyDataDefaults=function(e,t,r,n){var a,o,c,u=n._modules,d=n._visibleModules,p=n._basePlotModules,h=0,f=0;function g(e){t.push(e);var r=e._module;r&&(l.pushUnique(u,r),!0===e.visible&&l.pushUnique(d,r),l.pushUnique(p,e._module.basePlotModule),h++,!1!==e._input.visible&&f++)}n._transformModules=[];var y={},b=[],_=(r.template||{}).data||{},x=s.traceTemplater(_);for(a=0;a<e.length;a++){if(c=e[a],(o=x.newTrace(c)).uid=n._traceUids[a],v.supplyTraceDefaults(c,o,f,n,a),o.index=a,o._input=c,o._expandedIndex=h,o.transforms&&o.transforms.length)for(var w=!1!==c.visible&&!1===o.visible,k=T(o,t,r,n),M=0;M<k.length;M++){var C=k[M],S={_template:o._template,type:o.type,uid:o.uid+M};w&&!1===C.visible&&delete C.visible,v.supplyTraceDefaults(C,S,h,n,a),m(S,C),S.index=a,S._input=c,S._fullInput=o,S._expandedIndex=h,S._expandedInput=C,g(S)}else o._fullInput=o,o._expandedInput=o,g(o);i.traceIs(o,"carpetAxis")&&(y[o.carpet]=o),i.traceIs(o,"carpetDependent")&&b.push(a)}for(a=0;a<b.length;a++)if((o=t[b[a]]).visible){var L=y[o.carpet];o._carpet=L,L&&L.visible?(o.xaxis=L.xaxis,o.yaxis=L.yaxis):o.visible=!1}},v.supplyAnimationDefaults=function(e){var t;e=e||{};var r={};function n(t,n){return l.coerce(e||{},r,p,t,n)}if(n("mode"),n("direction"),n("fromcurrent"),Array.isArray(e.frame))for(r.frame=[],t=0;t<e.frame.length;t++)r.frame[t]=v.supplyAnimationFrameDefaults(e.frame[t]||{});else r.frame=v.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(r.transition=[],t=0;t<e.transition.length;t++)r.transition[t]=v.supplyAnimationTransitionDefaults(e.transition[t]||{});else r.transition=v.supplyAnimationTransitionDefaults(e.transition||{});return r},v.supplyAnimationFrameDefaults=function(e){var t={};function r(r,n){return l.coerce(e||{},t,p.frame,r,n)}return r("duration"),r("redraw"),t},v.supplyAnimationTransitionDefaults=function(e){var t={};function r(r,n){return l.coerce(e||{},t,p.transition,r,n)}return r("duration"),r("easing"),t},v.supplyFrameDefaults=function(e){var t={};function r(r,n){return l.coerce(e,t,h,r,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),t},v.supplyTraceDefaults=function(e,t,r,n,a){var o,s=n.colorway||c.defaults,u=s[r%s.length];function d(r,n){return l.coerce(e,t,v.attributes,r,n)}var p=d("visible");d("type"),d("name",n._traceWord+" "+a),d("uirevision",n.uirevision);var h=v.getModule(t);if(t._module=h,h){var f=h.basePlotModule,m=f.attr,g=f.attributes;if(m&&g){var y=n._subplots,b="";if("gl2d"!==f.name||p){if(Array.isArray(m))for(o=0;o<m.length;o++){var _=m[o],x=l.coerce(e,t,g,_);y[_]&&l.pushUnique(y[_],x),b+=x}else b=l.coerce(e,t,g,m);y[f.name]&&l.pushUnique(y[f.name],b)}}}return p&&(d("customdata"),d("ids"),d("meta"),i.traceIs(t,"showLegend")?(t._dfltShowLegend=!0,d("showlegend"),d("legendgroup")):t._dfltShowLegend=!1,h&&h.supplyDefaults(e,t,u,n),i.traceIs(t,"noOpacity")||d("opacity"),i.traceIs(t,"notLegendIsolatable")&&(t.visible=!!t.visible),i.traceIs(t,"noHover")||(t.hovertemplate||l.coerceHoverinfo(e,t,n),"parcats"!==t.type&&i.getComponentMethod("fx","supplyDefaults")(e,t,u,n)),h&&h.selectPoints&&d("selectedpoints"),v.supplyTransformDefaults(e,t,n)),t},v.hasMakesDataTransform=M,v.supplyTransformDefaults=function(e,t,r){if(t._length||M(e)){var n=r._globalTransforms||[],a=r._transformModules||[];if(Array.isArray(e.transforms)||0!==n.length)for(var i=e.transforms||[],o=n.concat(i),s=t.transforms=[],c=0;c<o.length;c++){var u,d=o[c],p=d.type,h=y[p],f=!(d._module&&d._module===h),m=h&&"function"==typeof h.transform;h||l.warn("Unrecognized transform type "+p+"."),h&&h.supplyDefaults&&(f||m)?((u=h.supplyDefaults(d,t,r,e)).type=p,u._module=h,l.pushUnique(a,h)):u=l.extendFlat({},d),s.push(u)}}},v.supplyLayoutGlobalDefaults=function(e,t,r){function n(r,n){return l.coerce(e,t,v.layoutAttributes,r,n)}var a=e.template;l.isPlainObject(a)&&(t.template=a,t._template=a.layout,t._dataTemplate=a.data);var o=l.coerceFont(n,"font");n("title.text",t._dfltTitle.plot),l.coerceFont(n,"title.font",{family:o.family,size:Math.round(1.4*o.size),color:o.color}),n("title.xref"),n("title.yref"),n("title.x"),n("title.y"),n("title.xanchor"),n("title.yanchor"),n("title.pad.t"),n("title.pad.r"),n("title.pad.b"),n("title.pad.l"),n("autosize",!(e.width&&e.height)),n("width"),n("height"),n("margin.l"),n("margin.r"),n("margin.t"),n("margin.b"),n("margin.pad"),n("margin.autoexpand"),e.width&&e.height&&v.sanitizeMargins(t),i.getComponentMethod("grid","sizeDefaults")(e,t),n("paper_bgcolor"),n("separators",r.decimal+r.thousands),n("hidesources"),n("colorway"),n("datarevision");var s=n("uirevision");n("editrevision",s),n("selectionrevision",s),n("modebar.orientation"),n("modebar.bgcolor",c.addOpacity(t.paper_bgcolor,.5));var u=c.contrast(c.rgb(t.modebar.bgcolor));n("modebar.color",c.addOpacity(u,.3)),n("modebar.activecolor",c.addOpacity(u,.7)),n("modebar.uirevision",s),n("meta"),l.isPlainObject(e.transition)&&(n("transition.duration"),n("transition.easing"),n("transition.ordering")),i.getComponentMethod("calendars","handleDefaults")(e,t,"calendar"),i.getComponentMethod("fx","supplyLayoutGlobalDefaults")(e,t,n)},v.plotAutoSize=function(e,t,r){var n,i,o=e._context||{},s=o.frameMargins,c=l.isPlotDiv(e);if(c&&e.emit("plotly_autosize"),o.fillFrame)n=window.innerWidth,i=window.innerHeight,document.body.style.overflow="hidden";else{var u=c?window.getComputedStyle(e):{};if(n=parseFloat(u.width)||parseFloat(u.maxWidth)||r.width,i=parseFloat(u.height)||parseFloat(u.maxHeight)||r.height,a(s)&&s>0){var d=1-2*s;n=Math.round(d*n),i=Math.round(d*i)}}var p=v.layoutAttributes.width.min,h=v.layoutAttributes.height.min;n<p&&(n=p),i<h&&(i=h);var f=!t.width&&Math.abs(r.width-n)>1,m=!t.height&&Math.abs(r.height-i)>1;(m||f)&&(f&&(r.width=n),m&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),v.sanitizeMargins(r)},v.supplyLayoutModuleDefaults=function(e,t,r,n){var a,o,s,c=i.componentsRegistry,u=t._basePlotModules,d=i.subplotsRegistry.cartesian;for(a in c)(s=c[a]).includeBasePlot&&s.includeBasePlot(e,t);for(var p in u.length||u.push(d),t._has("cartesian")&&(i.getComponentMethod("grid","contentDefaults")(e,t),d.finalizeSubplots(e,t)),t._subplots)t._subplots[p].sort(l.subplotSort);for(o=0;o<u.length;o++)(s=u[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(e,t,r);var h=t._modules;for(o=0;o<h.length;o++)(s=h[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(e,t,r);var f=t._transformModules;for(o=0;o<f.length;o++)(s=f[o]).supplyLayoutDefaults&&s.supplyLayoutDefaults(e,t,r,n);for(a in c)(s=c[a]).supplyLayoutDefaults&&s.supplyLayoutDefaults(e,t,r)},v.purge=function(e){var t=e._fullLayout||{};void 0!==t._glcontainer&&(t._glcontainer.selectAll(".gl-canvas").remove(),t._glcontainer.remove(),t._glcanvas=null),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),l.clearThrottle(),l.clearResponsive(e),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,delete e.framework,delete e.empty,delete e.fid,delete e.undoqueue,delete e.undonum,delete e.autoplay,delete e.changed,delete e._promises,delete e._redrawTimer,delete e._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._dragdata,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()},v.style=function(e){var t,r=e._fullLayout._visibleModules,n=[];for(t=0;t<r.length;t++){var a=r[t];a.style&&l.pushUnique(n,a.style)}for(t=0;t<n.length;t++)n[t](e)},v.sanitizeMargins=function(e){if(e&&e.margin){var t,r=e.width,n=e.height,a=e.margin,i=r-(a.l+a.r),o=n-(a.t+a.b);i<0&&(t=(r-1)/(a.l+a.r),a.l=Math.floor(t*a.l),a.r=Math.floor(t*a.r)),o<0&&(t=(n-1)/(a.t+a.b),a.t=Math.floor(t*a.t),a.b=Math.floor(t*a.b))}},v.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}},v.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1},v.autoMargin=function(e,t,r){var n=e._fullLayout,a=n._pushmargin,i=n._pushmarginIds;if(!1!==n.margin.autoexpand){if(r){var o=r.pad;if(void 0===o){var s=n.margin;o=Math.min(12,s.l,s.r,s.t,s.b)}r.l+r.r>.5*n.width&&(l.log("Margin push",t,"is too big in x, dropping"),r.l=r.r=0),r.b+r.t>.5*n.height&&(l.log("Margin push",t,"is too big in y, dropping"),r.b=r.t=0);var c=void 0!==r.xl?r.xl:r.x,u=void 0!==r.xr?r.xr:r.x,d=void 0!==r.yt?r.yt:r.y,p=void 0!==r.yb?r.yb:r.y;a[t]={l:{val:c,size:r.l+o},r:{val:u,size:r.r+o},b:{val:p,size:r.b+o},t:{val:d,size:r.t+o}},i[t]=1}else delete a[t],delete i[t];if(!n._replotting)return v.doAutoMargin(e)}},v.doAutoMargin=function(e){var t=e._fullLayout;t._size||(t._size={}),C(t);var r=t._size,n=t.margin,o=l.extendFlat({},r),s=n.l,c=n.r,u=n.t,d=n.b,p=t.width,h=t.height,f=t._pushmargin,m=t._pushmarginIds;if(!1!==t.margin.autoexpand){for(var g in f)m[g]||delete f[g];for(var y in f.base={l:{val:0,size:s},r:{val:1,size:c},t:{val:1,size:u},b:{val:0,size:d}},f){var b=f[y].l||{},_=f[y].b||{},x=b.val,w=b.size,k=_.val,M=_.size;for(var T in f){if(a(w)&&f[T].r){var S=f[T].r.val,L=f[T].r.size;if(S>x){var A=(w*S+(L-p)*x)/(S-x),E=(L*(1-x)+(w-p)*(1-S))/(S-x);A>=0&&E>=0&&p-(A+E)>0&&A+E>s+c&&(s=A,c=E)}}if(a(M)&&f[T].t){var D=f[T].t.val,I=f[T].t.size;if(D>k){var P=(M*D+(I-h)*k)/(D-k),O=(I*(1-k)+(M-h)*(1-D))/(D-k);P>=0&&O>=0&&h-(O+P)>0&&P+O>d+u&&(d=P,u=O)}}}}}if(r.l=Math.round(s),r.r=Math.round(c),r.t=Math.round(u),r.b=Math.round(d),r.p=Math.round(n.pad),r.w=Math.round(p)-r.l-r.r,r.h=Math.round(h)-r.t-r.b,!t._replotting&&v.didMarginChange(o,r)){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var R=3*(1+Object.keys(m).length);if(t._redrawFromAutoMarginCount<R)return i.call("plot",e);l.warn("Too many auto-margin redraws.")}};var S=["l","r","t","b","p","w","h"];function L(e,t,r){var n=!1,a=[v.previousPromises,function(){if(e._transitionData)return e._transitioning=!1,function(e){var t=Promise.resolve();if(!e)return t;for(;e.length;)t=t.then(e.shift());return t}(e._transitionData._interruptCallbacks)},r.prepareFn,v.rehover,function(){return e.emit("plotly_transitioning",[]),new Promise((function(a){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return i.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var o=0,s=0;function l(){return o++,function(){var t;s++,n||s!==o||(t=a,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return i.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t)))}}r.runFn(l),setTimeout(l())}))}],o=l.syncOrAsync(a,e);return o&&o.then||(o=Promise.resolve()),o.then((function(){return e}))}v.didMarginChange=function(e,t){for(var r=0;r<S.length;r++){var n=S[r],i=e[n],o=t[n];if(!a(i)||Math.abs(o-i)>1)return!0}return!1},v.graphJson=function(e,t,r,n,a){(a&&t&&!e._fullData||a&&!t&&!e._fullLayout)&&v.supplyDefaults(e);var i=a?e._fullData:e.data,o=a?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function c(e){if("function"==typeof e)return null;if(l.isPlainObject(e)){var t,n,a={};for(t in e)if("function"!=typeof e[t]&&-1===["_","["].indexOf(t.charAt(0))){if("keepdata"===r){if("src"===t.substr(t.length-3))continue}else if("keepstream"===r){if("string"==typeof(n=e[t+"src"])&&n.indexOf(":")>0&&!l.isPlainObject(e.stream))continue}else if("keepall"!==r&&"string"==typeof(n=e[t+"src"])&&n.indexOf(":")>0)continue;a[t]=c(e[t])}return a}return Array.isArray(e)?e.map(c):l.isTypedArray(e)?l.simpleMap(e,l.identity):l.isJSDate(e)?l.ms2DateTimeLocal(+e):e}var u={data:(i||[]).map((function(e){var r=c(e);return t&&delete r.fit,r}))};return t||(u.layout=c(o)),e.framework&&e.framework.isPolar&&(u=e.framework.getConfig()),s&&(u.frames=c(s)),"object"===n?u:JSON.stringify(u)},v.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r<t.length;r++)switch((n=t[r]).type){case"replace":a=n.value;var s=(i[n.index]||{}).name,l=a.name;i[n.index]=o[l]=a,l!==s&&(delete o[s],o[l]=a);break;case"insert":o[(a=n.value).name]=a,i.splice(n.index,0,a);break;case"delete":delete o[(a=i[n.index]).name],i.splice(n.index,1)}return Promise.resolve()},v.computeFrame=function(e,t){var r,n,a,i,o=e._transitionData._frameHash;if(!t)throw new Error("computeFrame must be given a string frame name");var s=o[t.toString()];if(!s)return!1;for(var l=[s],c=[s.name];s.baseframe&&(s=o[s.baseframe.toString()])&&-1===c.indexOf(s.name);)l.push(s),c.push(s.name);for(var u={};s=l.pop();)if(s.layout&&(u.layout=v.extendLayout(u.layout,s.layout)),s.data){if(u.data||(u.data=[]),!(n=s.traces))for(n=[],r=0;r<s.data.length;r++)n[r]=r;for(u.traces||(u.traces=[]),r=0;r<s.data.length;r++)null!=(a=n[r])&&(-1===(i=u.traces.indexOf(a))&&(i=u.data.length,u.traces[i]=a),u.data[i]=v.extendTrace(u.data[i],s.data[r]))}return u},v.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},r=e._transitionData._frames,n=0;n<r.length;n++){var a=r[n];a&&a.name&&(t[a.name]=a)}},v.extendObjectWithContainers=function(e,t,r){var n,a,i,o,s,c,u,d=l.extendDeepNoArrays({},t||{}),p=l.expandObjectPaths(d),h={};if(r&&r.length)for(i=0;i<r.length;i++)void 0===(a=(n=l.nestedProperty(p,r[i])).get())?l.nestedProperty(h,r[i]).set(null):(n.set(null),l.nestedProperty(h,r[i]).set(a));if(e=l.extendDeepNoArrays(e||{},p),r&&r.length)for(i=0;i<r.length;i++)if(c=l.nestedProperty(h,r[i]).get()){for(u=(s=l.nestedProperty(e,r[i])).get(),Array.isArray(u)||(u=[],s.set(u)),o=0;o<c.length;o++){var f=c[o];u[o]=null===f?null:v.extendObjectWithContainers(u[o],f)}s.set(u)}return e},v.dataArrayContainers=["transforms","dimensions"],v.layoutArrayContainers=i.layoutArrayContainers,v.extendTrace=function(e,t){return v.extendObjectWithContainers(e,t,v.dataArrayContainers)},v.extendLayout=function(e,t){return v.extendObjectWithContainers(e,t,v.layoutArrayContainers)},v.transition=function(e,t,r,n,a,i){var o={redraw:a.redraw},s={},c=[];return o.prepareFn=function(){for(var a=Array.isArray(t)?t.length:0,i=n.slice(0,a),o=0;o<i.length;o++){var u=i[o],d=e._fullData[u]._module;if(d){if(d.animatable){var p=d.basePlotModule.name;s[p]||(s[p]=[]),s[p].push(u)}e.data[i[o]]=v.extendTrace(e.data[i[o]],t[o])}}var h=l.expandObjectPaths(l.extendDeepNoArrays({},r)),f=/^[xy]axis[0-9]*$/;for(var m in h)f.test(m)&&delete h[m].range;v.extendLayout(e.layout,h),delete e.calcdata,v.supplyDefaults(e),v.doCalcdata(e);var g=l.expandObjectPaths(r);if(g){var y=e._fullLayout._plots;for(var b in y){var _=y[b],x=_.xaxis,w=_.yaxis,k=x.range.slice(),M=w.range.slice(),T=null,C=null,S=null,L=null;Array.isArray(g[x._name+".range"])?T=g[x._name+".range"].slice():Array.isArray((g[x._name]||{}).range)&&(T=g[x._name].range.slice()),Array.isArray(g[w._name+".range"])?C=g[w._name+".range"].slice():Array.isArray((g[w._name]||{}).range)&&(C=g[w._name].range.slice()),k&&T&&(x.r2l(k[0])!==x.r2l(T[0])||x.r2l(k[1])!==x.r2l(T[1]))&&(S={xr0:k,xr1:T}),M&&C&&(w.r2l(M[0])!==w.r2l(C[0])||w.r2l(M[1])!==w.r2l(C[1]))&&(L={yr0:M,yr1:C}),(S||L)&&c.push(l.extendFlat({plotinfo:_},S,L))}}return Promise.resolve()},o.runFn=function(t){var n,a,o=e._fullLayout._basePlotModules,u=c.length;if(r)for(a=0;a<o.length;a++)o[a].transitionAxes&&o[a].transitionAxes(e,c,i,t);for(var d in u?((n=l.extendFlat({},i)).duration=0,delete s.cartesian):n=i,s){var p=s[d];e._fullData[p[0]]._module.basePlotModule.plot(e,p,n,t)}},L(e,i,o)},v.transitionFromReact=function(e,t,r,n){var a=e._fullLayout,i=a.transition,o={},s=[];return o.prepareFn=function(){var e=a._plots;for(var i in o.redraw=!1,"some"===t.anim&&(o.redraw=!0),"some"===r.anim&&(o.redraw=!0),e){var c=e[i],u=c.xaxis,d=c.yaxis,p=n[u._name].range.slice(),h=n[d._name].range.slice(),f=u.range.slice(),m=d.range.slice();u.setScale(),d.setScale();var g=null,v=null;u.r2l(p[0])===u.r2l(f[0])&&u.r2l(p[1])===u.r2l(f[1])||(g={xr0:p,xr1:f}),d.r2l(h[0])===d.r2l(m[0])&&d.r2l(h[1])===d.r2l(m[1])||(v={yr0:h,yr1:m}),(g||v)&&s.push(l.extendFlat({plotinfo:c},g,v))}return Promise.resolve()},o.runFn=function(r){for(var n,a,o,c=e._fullData,u=e._fullLayout._basePlotModules,d=[],p=0;p<c.length;p++)d.push(p);function h(){for(var t=0;t<u.length;t++)u[t].transitionAxes&&u[t].transitionAxes(e,s,n,r)}function f(){for(var t=0;t<u.length;t++)u[t].plot(e,o,a,r)}s.length&&t.anim?"traces first"===i.ordering?(n=l.extendFlat({},i,{duration:0}),o=d,a=i,setTimeout(h,i.duration),f()):(n=i,o=null,a=l.extendFlat({},i,{duration:0}),setTimeout(f,n.duration),h()):s.length?(n=i,h()):t.anim&&(o=d,a=i,f())},L(e,i,o)},v.doCalcdata=function(e,t){var r,n,a,s,c=d.list(e),p=e._fullData,h=e._fullLayout,f=new Array(p.length),m=(e.calcdata||[]).slice();for(e.calcdata=f,h._numBoxes=0,h._numViolins=0,h._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,h._piecolormap={},h._sunburstcolormap={},h._treemapcolormap={},h._funnelareacolormap={},a=0;a<p.length;a++)Array.isArray(t)&&-1===t.indexOf(a)&&(f[a]=m[a]);for(a=0;a<p.length;a++)(r=p[a])._arrayAttrs=o.findArrayAttributes(r),r._extremes={};var g=h._subplots.polar||[];for(a=0;a<g.length;a++)c.push(h[g[a]].radialaxis,h[g[a]].angularaxis);for(var v in h._colorAxes){var b=h[v];!1!==b.cauto&&(delete b.cmin,delete b.cmax)}var _=!1;function x(t){if(r=p[t],n=r._module,!0===r.visible&&r.transforms){if(n&&n.calc){var a=n.calc(e,r);a[0]&&a[0].t&&a[0].t._scene&&delete a[0].t._scene.dirty}for(s=0;s<r.transforms.length;s++){var i=r.transforms[s];(n=y[i.type])&&n.calcTransform&&(r._hasCalcTransform=!0,_=!0,n.calcTransform(e,r,i))}}}function w(t,a){if(r=p[t],!!(n=r._module).isContainer===a){var i=[];if(!0===r.visible&&0!==r._length){delete r._indexToPoints;var o=r.transforms||[];for(s=o.length-1;s>=0;s--)if(o[s].enabled){r._indexToPoints=o[s]._indexToPoints;break}n&&n.calc&&(i=n.calc(e,r))}Array.isArray(i)&&i[0]||(i=[{x:u,y:u}]),i[0].t||(i[0].t={}),i[0].trace=r,f[t]=i}}for(E(c,p),a=0;a<p.length;a++)w(a,!0);for(a=0;a<p.length;a++)x(a);for(_&&E(c,p),a=0;a<p.length;a++)w(a,!0);for(a=0;a<p.length;a++)w(a,!1);D(e);var k=function(e,t){var r,n,a,o,s,c=[];function u(e,r,n){var a=r._id.charAt(0);if("histogram2dcontour"===e){var i=r._counterAxes[0],o=d.getFromId(t,i),s="x"===a||"x"===i&&"category"===o.type,l="y"===a||"y"===i&&"category"===o.type;return function(e,t){return 0===e||0===t?-1:s&&e===n[t].length-1?-1:l&&t===n.length-1?-1:("y"===a?t:e)-1}}return function(e,t){return"y"===a?t:e}}var p={min:function(e){return l.aggNums(Math.min,null,e)},max:function(e){return l.aggNums(Math.max,null,e)},sum:function(e){return l.aggNums((function(e,t){return e+t}),null,e)},total:function(e){return l.aggNums((function(e,t){return e+t}),null,e)},mean:function(e){return l.mean(e)},median:function(e){return l.median(e)}};for(r=0;r<e.length;r++){var h=e[r];if("category"===h.type){var f=h.categoryorder.match(A);if(f){var m=f[1],g=f[2],v=[];for(n=0;n<h._categories.length;n++)v.push([h._categories[n],[]]);for(n=0;n<h._traceIndices.length;n++){var y=h._traceIndices[n],b=t._fullData[y],_=h._id.charAt(0);if(!0===b.visible){var x=b.type;i.traceIs(b,"histogram")&&(delete b._xautoBinFinished,delete b._yautoBinFinished);var w=t.calcdata[y];for(a=0;a<w.length;a++){var k,M,T,C=w[a];if("splom"===x){var S=b._axesDim[h._id];if("y"===_){var L=b._diag[S][0];L&&(h=t._fullLayout[d.id2name(L)])}var E=C.trace.dimensions[S].values;for(o=0;o<E.length;o++)for(k=E[o],M=h._categoriesMap[k],s=0;s<C.trace.dimensions.length;s++)if(s!==S){var D=C.trace.dimensions[s];v[M][1].push(D.values[o])}}else if("scattergl"===x){for(o=0;o<C.t.x.length;o++)"x"===_&&(k=C.t.x[o],M=k,T=C.t.y[o]),"y"===_&&(k=C.t.y[o],M=k,T=C.t.x[o]),v[M][1].push(T);C.t&&C.t._scene&&delete C.t._scene.dirty}else if(C.hasOwnProperty("z")){T=C.z;var I=u(b.type,h,T);for(o=0;o<T.length;o++)for(s=0;s<T[o].length;s++)(M=I(s,o))+1&&v[M][1].push(T[o][s])}else for("x"===_?(k=C.p+1?C.p:C.x,T=C.s||C.v||C.y):"y"===_&&(k=C.p+1?C.p:C.y,T=C.s||C.v||C.x),Array.isArray(T)||(T=[T]),o=0;o<T.length;o++)v[k][1].push(T[o])}}}h._categoriesValue=v;var P=[];for(n=0;n<v.length;n++)P.push([v[n][0],p[m](v[n][1])]);P.sort((function(e,t){return e[1]-t[1]})),h._categoriesAggregatedValue=P,h._initialCategories=P.map((function(e){return e[0]})),"descending"===g&&h._initialCategories.reverse(),c=c.concat(h.sortByInitialCategories())}}}return c}(c,e);if(k.length){for(h._numBoxes=0,h._numViolins=0,a=0;a<k.length;a++)w(k[a],!0);for(a=0;a<k.length;a++)w(k[a],!1);D(e)}i.getComponentMethod("fx","calc")(e),i.getComponentMethod("errorbars","calc")(e)};var A=/(total|sum|min|max|mean|median) (ascending|descending)/;function E(e,t){for(var r=0;r<e.length;r++){var n=e[r];n.clearCalc(),"multicategory"===n.type&&n.setupMultiCategory(t)}}function D(e){var t,r,n,a=e._fullLayout,i=a._visibleModules,o={};for(r=0;r<i.length;r++){var s=i[r],c=s.crossTraceCalc;if(c){var u=s.basePlotModule.name;o[u]?l.pushUnique(o[u],c):o[u]=[c]}}for(n in o){var d=o[n],p=a._subplots[n];if(Array.isArray(p))for(t=0;t<p.length;t++){var h=p[t],f="cartesian"===n?a._plots[h]:a[h];for(r=0;r<d.length;r++)d[r](e,f,h)}else for(r=0;r<d.length;r++)d[r](e)}}v.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()},v.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()},v.generalUpdatePerTraceModule=function(e,t,r,n){var a,i=t.traceHash,o={};for(a=0;a<r.length;a++){var s=r[a],c=s[0].trace;c.visible&&(o[c.type]=o[c.type]||[],o[c.type].push(s))}for(var u in i)if(!o[u]){var d=i[u][0];d[0].trace.visible=!1,o[u]=[d]}for(var p in o){var h=o[p];h[0][0].trace._module.plot(e,t,l.filterVisible(h),n)}t.traceHash=o},v.plotBasePlot=function(e,t,r,n,a){var o=i.getModule(e),s=f(t.calcdata,o)[0];o.plot(t,s,n,a)},v.cleanBasePlot=function(e,t,r,n,a){var i=a._has&&a._has(e),o=r._has&&r._has(e);i&&!o&&a["_"+e+"layer"].selectAll("g.trace").remove()}},{"../components/color":591,"../constants/numerical":692,"../lib":716,"../plot_api/plot_schema":753,"../plot_api/plot_template":754,"../plots/get_data":799,"../registry":845,"./animation_attributes":759,"./attributes":761,"./cartesian/axis_ids":767,"./command":788,"./font_attributes":790,"./frame_attributes":791,"./layout_attributes":816,d3:164,"fast-isnumeric":227}],826:[function(e,t,r){"use strict";t.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},{}],827:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../lib/polygon").tester,i=n.findIndexOfMin,o=n.isAngleInsideSector,s=n.angleDelta,l=n.angleDist;function c(e,t,r,n){var a,i,o=n[0],s=n[1],l=d(Math.sin(t)-Math.sin(e)),c=d(Math.cos(t)-Math.cos(e)),u=Math.tan(r),p=d(1/u),h=l/c,f=s-h*o;return p?l&&c?i=u*(a=f/(u-h)):c?(a=s*p,i=s):(a=o,i=o*u):l&&c?(a=0,i=f):c?(a=0,i=s):a=i=NaN,[a,i]}function u(e,t,r,a){return n.isFullCircle([t,r])?function(e,t){var r,n=t.length,a=new Array(n+1);for(r=0;r<n;r++){var i=t[r];a[r]=[e*Math.cos(i),e*Math.sin(i)]}return a[r]=a[0].slice(),a}(e,a):function(e,t,r,a){var s,u,d=a.length,p=[];function h(t){return[e*Math.cos(t),e*Math.sin(t)]}function f(e,t,r){return c(e,t,r,h(e))}function m(e){return n.mod(e,d)}function g(e){return o(e,[t,r])}var v=i(a,(function(e){return g(e)?l(e,t):1/0})),y=f(a[v],a[m(v-1)],t);for(p.push(y),s=v,u=0;u<d;s++,u++){var b=a[m(s)];if(!g(b))break;p.push(h(b))}var _=i(a,(function(e){return g(e)?l(e,r):1/0})),x=f(a[_],a[m(_+1)],r);return p.push(x),p.push([0,0]),p.push(p[0].slice()),p}(e,t,r,a)}function d(e){return Math.abs(e)>1e-10?e:0}function p(e,t,r){t=t||0,r=r||0;for(var n=e.length,a=new Array(n),i=0;i<n;i++){var o=e[i];a[i]=[t+o[0],r-o[1]]}return a}t.exports={isPtInsidePolygon:function(e,t,r,n,i){if(!o(t,n))return!1;var s,l;r[0]<r[1]?(s=r[0],l=r[1]):(s=r[1],l=r[0]);var c=a(u(s,n[0],n[1],i)),d=a(u(l,n[0],n[1],i)),p=[e*Math.cos(t),e*Math.sin(t)];return d.contains(p)&&!c.contains(p)},findPolygonOffset:function(e,t,r,n){for(var a=1/0,i=1/0,o=u(e,t,r,n),s=0;s<o.length;s++){var l=o[s];a=Math.min(a,l[0]),i=Math.min(i,-l[1])}return[a,i]},findEnclosingVertexAngles:function(e,t){var r=i(t,(function(t){var r=s(t,e);return r>0?r:1/0})),a=n.mod(r+1,t.length);return[t[r],t[a]]},findIntersectionXY:c,findXYatLength:function(e,t,r,n){var a=-t*r,i=t*t+1,o=2*(t*a-r),s=a*a+r*r-e*e,l=Math.sqrt(o*o-4*i*s),c=(-o+l)/(2*i),u=(-o-l)/(2*i);return[[c,t*c+a+n],[u,t*u+a+n]]},clampTiny:d,pathPolygon:function(e,t,r,n,a,i){return"M"+p(u(e,t,r,n),a,i).join("L")},pathPolygonAnnulus:function(e,t,r,n,a,i,o){var s,l;e<t?(s=e,l=t):(s=t,l=e);var c=p(u(s,r,n,a),i,o);return"M"+p(u(l,r,n,a),i,o).reverse().join("L")+"M"+c.join("L")}}},{"../../lib":716,"../../lib/polygon":728}],828:[function(e,t,r){"use strict";var n=e("../get_data").getSubplotCalcData,a=e("../../lib").counterRegex,i=e("./polar"),o=e("./constants"),s=o.attr,l=o.name,c=a(l),u={};u[s]={valType:"subplotid",dflt:l,editType:"calc"},t.exports={attr:s,name:l,idRoot:l,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:e("./layout_attributes"),supplyLayoutDefaults:e("./layout_defaults"),plot:function(e){for(var t=e._fullLayout,r=e.calcdata,a=t._subplots[l],o=0;o<a.length;o++){var s=a[o],c=n(r,l,s),u=t[s]._subplot;u||(u=i(e,s),t[s]._subplot=u),u.plot(c,t,e._promises)}},clean:function(e,t,r,n){for(var a=n._subplots[l]||[],i=n._has&&n._has("gl"),o=t._has&&t._has("gl"),s=i&&!o,c=0;c<a.length;c++){var u=a[c],d=n[u]._subplot;if(!t[u]&&d)for(var p in d.framework.remove(),d.layers["radial-axis-title"].remove(),d.clipPaths)d.clipPaths[p].remove();s&&d._scene&&(d._scene.destroy(),d._scene=null)}},toSVG:e("../cartesian").toSVG}},{"../../lib":716,"../cartesian":775,"../get_data":799,"./constants":826,"./layout_attributes":829,"./layout_defaults":830,"./polar":837}],829:[function(e,t,r){"use strict";var n=e("../../components/color/attributes"),a=e("../cartesian/layout_attributes"),i=e("../domain").attributes,o=e("../../lib").extendFlat,s=e("../../plot_api/edit_types").overrideAll,l=s({color:a.color,showline:o({},a.showline,{dflt:!0}),linecolor:a.linecolor,linewidth:a.linewidth,showgrid:o({},a.showgrid,{dflt:!0}),gridcolor:a.gridcolor,gridwidth:a.gridwidth},"plot","from-root"),c=s({tickmode:a.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:a.ticks,ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,showticklabels:a.showticklabels,showtickprefix:a.showtickprefix,tickprefix:a.tickprefix,showticksuffix:a.showticksuffix,ticksuffix:a.ticksuffix,showexponent:a.showexponent,exponentformat:a.exponentformat,separatethousands:a.separatethousands,tickfont:a.tickfont,tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,layer:a.layer},"plot","from-root"),u={visible:o({},a.visible,{dflt:!0}),type:o({},a.type,{values:["-","linear","log","date","category"]}),autorange:o({},a.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},range:o({},a.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:a.categoryorder,categoryarray:a.categoryarray,angle:{valType:"angle",editType:"plot"},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:o({},a.title.text,{editType:"plot",dflt:""}),font:o({},a.title.font,{editType:"plot"}),editType:"plot"},hoverformat:a.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:a._deprecated.title,titlefont:a._deprecated.titlefont}};o(u,l,c);var d={visible:o({},a.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},categoryorder:a.categoryorder,categoryarray:a.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:a.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};o(d,l,c),t.exports={domain:i({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:n.background},radialaxis:u,angularaxis:d,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},{"../../components/color/attributes":590,"../../lib":716,"../../plot_api/edit_types":747,"../cartesian/layout_attributes":776,"../domain":789}],830:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../../plot_api/plot_template"),o=e("../subplot_defaults"),s=e("../get_data").getSubplotData,l=e("../cartesian/tick_value_defaults"),c=e("../cartesian/tick_mark_defaults"),u=e("../cartesian/tick_label_defaults"),d=e("../cartesian/category_order_defaults"),p=e("../cartesian/line_grid_defaults"),h=e("../cartesian/axis_autotype"),f=e("./layout_attributes"),m=e("./set_convert"),g=e("./constants"),v=g.axisNames;function y(e,t,r,o){var h=r("bgcolor");o.bgColor=a.combine(h,o.paper_bgcolor);var y=r("sector");r("hole");var _,x=s(o.fullData,g.name,o.id),w=o.layoutOut;function k(e,t){return r(_+"."+e,t)}for(var M=0;M<v.length;M++){_=v[M],n.isPlainObject(e[_])||(e[_]={});var T=e[_],C=i.newContainer(t,_);C._id=C._name=_,C._attr=o.id+"."+_,C._traceIndices=x.map((function(e){return e._expandedIndex}));var S=g.axisName2dataArray[_],L=b(T,C,k,x,S);d(T,C,k,{axData:x,dataAttr:S});var A,E,D=k("visible");switch(m(C,t,w),k("uirevision",t.uirevision),D&&(E=(A=k("color"))===T.color?A:o.font.color),C._m=1,_){case"radialaxis":var I=k("autorange",!C.isValidRange(T.range));T.autorange=I,!I||"linear"!==L&&"-"!==L||k("rangemode"),"reversed"===I&&(C._m=-1),k("range"),C.cleanRange("range",{dfltRange:[0,1]}),D&&(k("side"),k("angle",y[0]),k("title.text"),n.coerceFont(k,"title.font",{family:o.font.family,size:Math.round(1.2*o.font.size),color:E}));break;case"angularaxis":if("date"===L){n.log("Polar plots do not support date angular axes yet.");for(var P=0;P<x.length;P++)x[P].visible=!1;L=T.type=C.type="linear"}k("linear"===L?"thetaunit":"period");var O=k("direction");k("rotation",{counterclockwise:0,clockwise:90}[O])}D&&(l(T,C,k,C.type),u(T,C,k,C.type,{tickSuffixDflt:"degrees"===C.thetaunit?"°":void 0}),c(T,C,k,{outerTicks:!0}),k("showticklabels")&&(n.coerceFont(k,"tickfont",{family:o.font.family,size:o.font.size,color:E}),k("tickangle"),k("tickformat")),p(T,C,k,{dfltColor:A,bgColor:o.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:f[_]}),k("layer")),"category"!==L&&k("hoverformat"),C._input=T}"category"===t.angularaxis.type&&r("gridshape")}function b(e,t,r,n,a){if("-"===r("type")){for(var i,o=0;o<n.length;o++)if(n[o].visible){i=n[o];break}i&&i[a]&&(t.type=h(i[a],"gregorian")),"-"===t.type?t.type="linear":e.type=t.type}return t.type}t.exports=function(e,t,r){o(e,t,r,{type:g.name,attributes:f,handleDefaults:y,font:t.font,paper_bgcolor:t.paper_bgcolor,fullData:r,layoutOut:t})}},{"../../components/color":591,"../../lib":716,"../../plot_api/plot_template":754,"../cartesian/axis_autotype":765,"../cartesian/category_order_defaults":768,"../cartesian/line_grid_defaults":778,"../cartesian/tick_label_defaults":783,"../cartesian/tick_mark_defaults":784,"../cartesian/tick_value_defaults":785,"../get_data":799,"../subplot_defaults":839,"./constants":826,"./layout_attributes":829,"./set_convert":838}],831:[function(e,t,r){"use strict";var n=e("../../../traces/scatter/attributes"),a=n.marker,i=e("../../../lib/extend").extendFlat;["Area traces are deprecated!","Please switch to the *barpolar* trace type."].join(" "),t.exports={r:i({},n.r,{}),t:i({},n.t,{}),marker:{color:i({},a.color,{}),size:i({},a.size,{}),symbol:i({},a.symbol,{}),opacity:i({},a.opacity,{}),editType:"calc"}}},{"../../../lib/extend":707,"../../../traces/scatter/attributes":1118}],832:[function(e,t,r){"use strict";var n=e("../../cartesian/layout_attributes"),a=e("../../../lib/extend").extendFlat,i=e("../../../plot_api/edit_types").overrideAll,o=["Legacy polar charts are deprecated!","Please switch to *polar* subplots."].join(" "),s=a({},n.domain,{});function l(e,t){return a({},t,{showline:{valType:"boolean"},showticklabels:{valType:"boolean"},tickorientation:{valType:"enumerated",values:["horizontal","vertical"]},ticklen:{valType:"number",min:0},tickcolor:{valType:"color"},ticksuffix:{valType:"string"},endpadding:{valType:"number",description:o},visible:{valType:"boolean"}})}t.exports=i({radialaxis:l(0,{range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},domain:s,orientation:{valType:"number"}}),angularaxis:l(0,{range:{valType:"info_array",items:[{valType:"number",dflt:0},{valType:"number",dflt:360}]},domain:s}),layout:{direction:{valType:"enumerated",values:["clockwise","counterclockwise"]},orientation:{valType:"angle"}}},"plot","nested")},{"../../../lib/extend":707,"../../../plot_api/edit_types":747,"../../cartesian/layout_attributes":776}],833:[function(e,t,r){"use strict";(t.exports=e("./micropolar")).manager=e("./micropolar_manager")},{"./micropolar":834,"./micropolar_manager":835}],834:[function(e,t,r){var n=e("d3"),a=e("../../../lib").extendDeepAll,i=e("../../../constants/alignment").MID_SHIFT,o=t.exports={version:"0.2.2"};o.Axis=function(){var e,t,r,s,l={data:[],layout:{}},c={},u={},d=n.dispatch("hover"),p={render:function(c){return function(c){t=c||t;var d=l.data,p=l.layout;("string"==typeof t||t.nodeName)&&(t=n.select(t)),t.datum(d).each((function(t,l){var c=t.slice();u={data:o.util.cloneJson(c),layout:o.util.cloneJson(p)};var d=0;c.forEach((function(e,t){e.color||(e.color=p.defaultColorRange[d],d=(d+1)%p.defaultColorRange.length),e.strokeColor||(e.strokeColor="LinePlot"===e.geometry?e.color:n.rgb(e.color).darker().toString()),u.data[t].color=e.color,u.data[t].strokeColor=e.strokeColor,u.data[t].strokeDash=e.strokeDash,u.data[t].strokeSize=e.strokeSize}));var h=c.filter((function(e,t){var r=e.visible;return void 0===r||!0===r})),f=!1,m=h.map((function(e,t){return f=f||void 0!==e.groupId,e}));if(f){var g=n.nest().key((function(e,t){return void 0!==e.groupId?e.groupId:"unstacked"})).entries(m),v=[],y=g.map((function(e,t){if("unstacked"===e.key)return e.values;var r=e.values[0].r.map((function(e,t){return 0}));return e.values.forEach((function(e,t,n){e.yStack=[r],v.push(r),r=o.util.sumArrays(e.r,r)})),e.values}));h=n.merge(y)}h.forEach((function(e,t){e.t=Array.isArray(e.t[0])?e.t:[e.t],e.r=Array.isArray(e.r[0])?e.r:[e.r]}));var b=Math.min(p.width-p.margin.left-p.margin.right,p.height-p.margin.top-p.margin.bottom)/2;b=Math.max(10,b);var _,x=[p.margin.left+b,p.margin.top+b];_=f?[0,n.max(o.util.sumArrays(o.util.arrayLast(h).r[0],o.util.arrayLast(v)))]:n.extent(o.util.flattenArray(h.map((function(e,t){return e.r})))),p.radialAxis.domain!=o.DATAEXTENT&&(_[0]=0),r=n.scale.linear().domain(p.radialAxis.domain!=o.DATAEXTENT&&p.radialAxis.domain?p.radialAxis.domain:_).range([0,b]),u.layout.radialAxis.domain=r.domain();var w,k=o.util.flattenArray(h.map((function(e,t){return e.t}))),M="string"==typeof k[0];M&&(k=o.util.deduplicate(k),w=k.slice(),k=n.range(k.length),h=h.map((function(e,t){var r=e;return e.t=[k],f&&(r.yStack=e.yStack),r})));var T=h.filter((function(e,t){return"LinePlot"===e.geometry||"DotPlot"===e.geometry})).length===h.length,C=null===p.needsEndSpacing?M||!T:p.needsEndSpacing,S=p.angularAxis.domain&&p.angularAxis.domain!=o.DATAEXTENT&&!M&&p.angularAxis.domain[0]>=0?p.angularAxis.domain:n.extent(k),L=Math.abs(k[1]-k[0]);T&&!M&&(L=0);var A=S.slice();C&&M&&(A[1]+=L);var E=p.angularAxis.ticksCount||4;E>8&&(E=E/(E/8)+E%8),p.angularAxis.ticksStep&&(E=(A[1]-A[0])/E);var D=p.angularAxis.ticksStep||(A[1]-A[0])/(E*(p.minorTicks+1));w&&(D=Math.max(Math.round(D),1)),A[2]||(A[2]=D);var I=n.range.apply(this,A);if(I=I.map((function(e,t){return parseFloat(e.toPrecision(12))})),s=n.scale.linear().domain(A.slice(0,2)).range("clockwise"===p.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=C?L:0,void 0===(e=n.select(this).select("svg.chart-root"))||e.empty()){var P=(new DOMParser).parseFromString("<svg xmlns='http://www.w3.org/2000/svg' class='chart-root'>' + '<g class='outer-group'>' + '<g class='chart-group'>' + '<circle class='background-circle'></circle>' + '<g class='geometry-group'></g>' + '<g class='radial axis-group'>' + '<circle class='outside-circle'></circle>' + '</g>' + '<g class='angular axis-group'></g>' + '<g class='guides-group'><line></line><circle r='0'></circle></g>' + '</g>' + '<g class='legend-group'></g>' + '<g class='tooltips-group'></g>' + '<g class='title-group'><text></text></g>' + '</g>' + '</svg>","application/xml"),O=this.appendChild(this.ownerDocument.importNode(P.documentElement,!0));e=n.select(O)}e.select(".guides-group").style({"pointer-events":"none"}),e.select(".angular.axis-group").style({"pointer-events":"none"}),e.select(".radial.axis-group").style({"pointer-events":"none"});var R,F=e.select(".chart-group"),z={fill:"none",stroke:p.tickColor},N={"font-size":p.font.size,"font-family":p.font.family,fill:p.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map((function(e,t){return" "+e+" 0 "+p.font.outlineColor})).join(",")};if(p.showLegend){R=e.select(".legend-group").attr({transform:"translate("+[b,p.margin.top]+")"}).style({display:"block"});var j=h.map((function(e,t){var r=o.util.cloneJson(e);return r.symbol="DotPlot"===e.geometry?e.dotType||"circle":"LinePlot"!=e.geometry?"square":"line",r.visibleInLegend=void 0===e.visibleInLegend||e.visibleInLegend,r.color="LinePlot"===e.geometry?e.strokeColor:e.color,r}));o.Legend().config({data:h.map((function(e,t){return e.name||"Element"+t})),legendConfig:a({},o.Legend.defaultConfig().legendConfig,{container:R,elements:j,reverseOrder:p.legend.reverseOrder})})();var B=R.node().getBBox();b=Math.min(p.width-B.width-p.margin.left-p.margin.right,p.height-p.margin.top-p.margin.bottom)/2,b=Math.max(10,b),x=[p.margin.left+b,p.margin.top+b],r.range([0,b]),u.layout.radialAxis.domain=r.domain(),R.attr("transform","translate("+[x[0]+b,x[1]-b]+")")}else R=e.select(".legend-group").style({display:"none"});e.attr({width:p.width,height:p.height}).style({opacity:p.opacity}),F.attr("transform","translate("+x+")").style({cursor:"crosshair"});var Y=[(p.width-(p.margin.left+p.margin.right+2*b+(B?B.width:0)))/2,(p.height-(p.margin.top+p.margin.bottom+2*b))/2];if(Y[0]=Math.max(0,Y[0]),Y[1]=Math.max(0,Y[1]),e.select(".outer-group").attr("transform","translate("+Y+")"),p.title&&p.title.text){var H=e.select("g.title-group text").style(N).text(p.title.text),V=H.node().getBBox();H.attr({x:x[0]-V.width/2,y:x[1]-b-20})}var U=e.select(".radial.axis-group");if(p.radialAxis.gridLinesVisible){var W=U.selectAll("circle.grid-circle").data(r.ticks(5));W.enter().append("circle").attr({class:"grid-circle"}).style(z),W.attr("r",r),W.exit().remove()}U.select("circle.outside-circle").attr({r:b}).style(z);var G=e.select("circle.background-circle").attr({r:b}).style({fill:p.backgroundColor,stroke:p.stroke});function q(e,t){return s(e)%360+p.orientation}if(p.radialAxis.visible){var K=n.svg.axis().scale(r).ticks(5).tickSize(5);U.call(K).attr({transform:"rotate("+p.radialAxis.orientation+")"}),U.selectAll(".domain").style(z),U.selectAll("g>text").text((function(e,t){return this.textContent+p.radialAxis.ticksSuffix})).style(N).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(e,t){return"horizontal"===p.radialAxis.tickOrientation?"rotate("+-p.radialAxis.orientation+") translate("+[0,N["font-size"]]+")":"translate("+[0,N["font-size"]]+")"}}),U.selectAll("g>line").style({stroke:"black"})}var X=e.select(".angular.axis-group").selectAll("g.angular-tick").data(I),Z=X.enter().append("g").classed("angular-tick",!0);X.attr({transform:function(e,t){return"rotate("+q(e)+")"}}).style({display:p.angularAxis.visible?"block":"none"}),X.exit().remove(),Z.append("line").classed("grid-line",!0).classed("major",(function(e,t){return t%(p.minorTicks+1)==0})).classed("minor",(function(e,t){return!(t%(p.minorTicks+1)==0)})).style(z),Z.selectAll(".minor").style({stroke:p.minorTickColor}),X.select("line.grid-line").attr({x1:p.tickLength?b-p.tickLength:0,x2:b}).style({display:p.angularAxis.gridLinesVisible?"block":"none"}),Z.append("text").classed("axis-text",!0).style(N);var J=X.select("text.axis-text").attr({x:b+p.labelOffset,dy:i+"em",transform:function(e,t){var r=q(e),n=b+p.labelOffset,a=p.angularAxis.tickOrientation;return"horizontal"==a?"rotate("+-r+" "+n+" 0)":"radial"==a?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:p.angularAxis.labelsVisible?"block":"none"}).text((function(e,t){return t%(p.minorTicks+1)!=0?"":w?w[e]+p.angularAxis.ticksSuffix:e+p.angularAxis.ticksSuffix})).style(N);p.angularAxis.rewriteTicks&&J.text((function(e,t){return t%(p.minorTicks+1)!=0?"":p.angularAxis.rewriteTicks(this.textContent,t)}));var $=n.max(F.selectAll(".angular-tick text")[0].map((function(e,t){return e.getCTM().e+e.getBBox().width})));R.attr({transform:"translate("+[b+$,p.margin.top]+")"});var Q=e.select("g.geometry-group").selectAll("g").size()>0,ee=e.select("g.geometry-group").selectAll("g.geometry").data(h);if(ee.enter().append("g").attr({class:function(e,t){return"geometry geometry"+t}}),ee.exit().remove(),h[0]||Q){var te=[];h.forEach((function(e,t){var n={};n.radialScale=r,n.angularScale=s,n.container=ee.filter((function(e,r){return r==t})),n.geometry=e.geometry,n.orientation=p.orientation,n.direction=p.direction,n.index=t,te.push({data:e,geometryConfig:n})}));var re=n.nest().key((function(e,t){return void 0!==e.data.groupId||"unstacked"})).entries(te),ne=[];re.forEach((function(e,t){"unstacked"===e.key?ne=ne.concat(e.values.map((function(e,t){return[e]}))):ne.push(e.values)})),ne.forEach((function(e,t){var r;r=Array.isArray(e)?e[0].geometryConfig.geometry:e.geometryConfig.geometry;var n=e.map((function(e,t){return a(o[r].defaultConfig(),e)}));o[r]().config(n)()}))}var ae,ie,oe=e.select(".guides-group"),se=e.select(".tooltips-group"),le=o.tooltipPanel().config({container:se,fontSize:8})(),ce=o.tooltipPanel().config({container:se,fontSize:8})(),ue=o.tooltipPanel().config({container:se,hasTick:!0})();if(!M){var de=oe.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});F.on("mousemove.angular-guide",(function(e,t){var r=o.util.getMousePos(G).angle;de.attr({x2:-b,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-p.orientation)%360;ae=s.invert(n);var a=o.util.convertToCartesian(b+12,r+180);le.text(o.util.round(ae)).move([a[0]+x[0],a[1]+x[1]])})).on("mouseout.angular-guide",(function(e,t){oe.select("line").style({opacity:0})}))}var pe=oe.select("circle").style({stroke:"grey",fill:"none"});F.on("mousemove.radial-guide",(function(e,t){var n=o.util.getMousePos(G).radius;pe.attr({r:n}).style({opacity:.5}),ie=r.invert(o.util.getMousePos(G).radius);var a=o.util.convertToCartesian(n,p.radialAxis.orientation);ce.text(o.util.round(ie)).move([a[0]+x[0],a[1]+x[1]])})).on("mouseout.radial-guide",(function(e,t){pe.style({opacity:0}),ue.hide(),le.hide(),ce.hide()})),e.selectAll(".geometry-group .mark").on("mouseover.tooltip",(function(t,r){var a=n.select(this),i=this.style.fill,s="black",l=this.style.opacity||1;if(a.attr({"data-opacity":l}),i&&"none"!==i){a.attr({"data-fill":i}),s=n.hsl(i).darker().toString(),a.style({fill:s,opacity:1});var c={t:o.util.round(t[0]),r:o.util.round(t[1])};M&&(c.t=w[t[0]]);var u="t: "+c.t+", r: "+c.r,d=this.getBoundingClientRect(),p=e.node().getBoundingClientRect(),h=[d.left+d.width/2-Y[0]-p.left,d.top+d.height/2-Y[1]-p.top];ue.config({color:s}).text(u),ue.move(h)}else i=this.style.stroke||"black",a.attr({"data-stroke":i}),s=n.hsl(i).darker().toString(),a.style({stroke:s,opacity:1})})).on("mousemove.tooltip",(function(e,t){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ue.show()})).on("mouseout.tooltip",(function(e,t){ue.hide();var r=n.select(this),a=r.attr("data-fill");a?r.style({fill:a,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})}))}))}(c),this},config:function(e){if(!arguments.length)return l;var t=o.util.cloneJson(e);return t.data.forEach((function(e,t){l.data[t]||(l.data[t]={}),a(l.data[t],o.Axis.defaultConfig().data[0]),a(l.data[t],e)})),a(l.layout,o.Axis.defaultConfig().layout),a(l.layout,t.layout),this},getLiveConfig:function(){return u},getinputConfig:function(){return c},radialScale:function(e){return r},angularScale:function(e){return s},svg:function(){return e}};return n.rebind(p,d,"on"),p},o.Axis.defaultConfig=function(e,t){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(e,t){for(var r in e)r in t&&(t[r]=e[r])},o.util._extend=function(e,t){for(var r in e)t[r]=e[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(e,t){var r=t||6;return n.range(0,360+r,r).map((function(t,r){var n=t*Math.PI/180;return[t,e(n)]}))},o.util.dataFromEquation=function(e,t,r){var a=t||6,i=[],o=[];n.range(0,360+a,a).forEach((function(t,r){var n=t*Math.PI/180,a=e(n);i.push(t),o.push(a)}));var s={t:i,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(e,t){if(void 0===e)return null;var r=[].concat(e);return n.range(t).map((function(e,t){return r[t]||r[0]}))},o.util.fillArrays=function(e,t,r){return t.forEach((function(t,n){e[t]=o.util.ensureArray(e[t],r)})),e},o.util.cloneJson=function(e){return JSON.parse(JSON.stringify(e))},o.util.validateKeys=function(e,t){"string"==typeof t&&(t=t.split("."));var r=t.shift();return e[r]&&(!t.length||objHasKeys(e[r],t))},o.util.sumArrays=function(e,t){return n.zip(e,t).map((function(e,t){return n.sum(e)}))},o.util.arrayLast=function(e){return e[e.length-1]},o.util.arrayEqual=function(e,t){for(var r=Math.max(e.length,t.length,1);r-- >=0&&e[r]===t[r];);return-2===r},o.util.flattenArray=function(e){for(var t=[];!o.util.arrayEqual(t,e);)t=e,e=[].concat.apply([],e);return e},o.util.deduplicate=function(e){return e.filter((function(e,t,r){return r.indexOf(e)==t}))},o.util.convertToCartesian=function(e,t){var r=t*Math.PI/180;return[e*Math.cos(r),e*Math.sin(r)]},o.util.round=function(e,t){var r=t||2,n=Math.pow(10,r);return Math.round(e*n)/n},o.util.getMousePos=function(e){var t=n.mouse(e.node()),r=t[0],a=t[1],i={};return i.x=r,i.y=a,i.pos=t,i.angle=180*(Math.atan2(a,r)+Math.PI)/Math.PI,i.radius=Math.sqrt(r*r+a*a),i},o.util.duplicatesCount=function(e){for(var t,r={},n={},a=0,i=e.length;a<i;a++)(t=e[a])in r?(r[t]++,n[t]=r[t]):r[t]=1;return n},o.util.duplicates=function(e){return Object.keys(o.util.duplicatesCount(e))},o.util.translator=function(e,t,r,n){if(n){var a=r.slice();r=t,t=a}var i=t.reduce((function(e,t){if(void 0!==e)return e[t]}),e);void 0!==i&&(t.reduce((function(e,r,n){if(void 0!==e)return n===t.length-1&&delete e[r],e[r]}),e),r.reduce((function(e,t,n){return void 0===e[t]&&(e[t]={}),n===r.length-1&&(e[t]=i),e[t]}),e))},o.PolyChart=function(){var e=[o.PolyChart.defaultConfig()],t=n.dispatch("hover"),r={solid:"none",dash:[5,2],dot:[2,5]};function i(){var t=e[0].geometryConfig,a=t.container;"string"==typeof a&&(a=n.select(a)),a.datum(e).each((function(e,a){var i=!!e[0].data.yStack,o=e.map((function(e,t){return i?n.zip(e.data.t[0],e.data.r[0],e.data.yStack[0]):n.zip(e.data.t[0],e.data.r[0])})),s=t.angularScale,l=t.radialScale.domain()[0],c={bar:function(r,a,i){var o=e[i].data,l=t.radialScale(r[1])-t.radialScale(0),c=t.radialScale(r[2]||0),u=o.barWidth;n.select(this).attr({class:"mark bar",d:"M"+[[l+c,-u/2],[l+c,u/2],[c,u/2],[c,-u/2]].join("L")+"Z",transform:function(e,r){return"rotate("+(t.orientation+s(e[0]))+")"}})},dot:function(r,a,i){var o=r[2]?[r[0],r[1]+r[2]]:r,s=n.svg.symbol().size(e[i].data.dotSize).type(e[i].data.dotType)(r,a);n.select(this).attr({class:"mark dot",d:s,transform:function(e,r){var n,a,i,s=(n=function(e,r){var n=t.radialScale(e[1]),a=(t.angularScale(e[0])+t.orientation)*Math.PI/180;return{r:n,t:a}}(o),a=n.r*Math.cos(n.t),i=n.r*Math.sin(n.t),{x:a,y:i});return"translate("+[s.x,s.y]+")"}})}},u=n.svg.line.radial().interpolate(e[0].data.lineInterpolation).radius((function(e){return t.radialScale(e[1])})).angle((function(e){return t.angularScale(e[0])*Math.PI/180}));c.line=function(r,a,i){var s=r[2]?o[i].map((function(e,t){return[e[0],e[1]+e[2]]})):o[i];if(n.select(this).each(c.dot).style({opacity:function(t,r){return+e[i].data.dotVisible},fill:f.stroke(r,a,i)}).attr({class:"mark dot"}),!(a>0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(e,r){return"rotate("+(t.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(e,t){return f.fill(r,a,i)},"fill-opacity":0,stroke:function(e,t){return f.stroke(r,a,i)},"stroke-width":function(e,t){return f["stroke-width"](r,a,i)},"stroke-dasharray":function(e,t){return f["stroke-dasharray"](r,a,i)},opacity:function(e,t){return f.opacity(r,a,i)},display:function(e,t){return f.display(r,a,i)}})}};var d=t.angularScale.range(),p=Math.abs(d[1]-d[0])/o[0].length*Math.PI/180,h=n.svg.arc().startAngle((function(e){return-p/2})).endAngle((function(e){return p/2})).innerRadius((function(e){return t.radialScale(l+(e[2]||0))})).outerRadius((function(e){return t.radialScale(l+(e[2]||0))+t.radialScale(e[1])}));c.arc=function(e,r,a){n.select(this).attr({class:"mark arc",d:h,transform:function(e,r){return"rotate("+(t.orientation+s(e[0])+90)+")"}})};var f={fill:function(t,r,n){return e[n].data.color},stroke:function(t,r,n){return e[n].data.strokeColor},"stroke-width":function(t,r,n){return e[n].data.strokeSize+"px"},"stroke-dasharray":function(t,n,a){return r[e[a].data.strokeDash]},opacity:function(t,r,n){return e[n].data.opacity},display:function(t,r,n){return void 0===e[n].data.visible||e[n].data.visible?"block":"none"}},m=n.select(this).selectAll("g.layer").data(o);m.enter().append("g").attr({class:"layer"});var g=m.selectAll("path.mark").data((function(e,t){return e}));g.enter().append("path").attr({class:"mark"}),g.style(f).each(c[t.geometryType]),g.exit().remove(),m.exit().remove()}))}return i.config=function(t){return arguments.length?(t.forEach((function(t,r){e[r]||(e[r]={}),a(e[r],o.PolyChart.defaultConfig()),a(e[r],t)})),this):e},i.getColorScale=function(){},n.rebind(i,t,"on"),i},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){var e=o.Legend.defaultConfig(),t=n.dispatch("hover");function r(){var t=e.legendConfig,i=e.data.map((function(e,r){return[].concat(e).map((function(e,n){var i=a({},t.elements[r]);return i.name=e,i.color=[].concat(t.elements[r].color)[n],i}))})),o=n.merge(i);o=o.filter((function(e,r){return t.elements[r]&&(t.elements[r].visibleInLegend||void 0===t.elements[r].visibleInLegend)})),t.reverseOrder&&(o=o.reverse());var s=t.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map((function(e,t){return e.color})),c=t.fontSize,u=null==t.isContinuous?"number"==typeof o[0]:t.isContinuous,d=u?t.height:c*o.length,p=s.classed("legend-group",!0).selectAll("svg").data([0]),h=p.enter().append("svg").attr({width:300,height:d+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});h.append("g").classed("legend-axis",!0),h.append("g").classed("legend-marks",!0);var f=n.range(o.length),m=n.scale[u?"linear":"ordinal"]().domain(f).range(l),g=n.scale[u?"linear":"ordinal"]().domain(f)[u?"range":"rangePoints"]([0,d]);if(u){var v=p.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);v.enter().append("stop"),v.attr({offset:function(e,t){return t/(l.length-1)*100+"%"}}).style({"stop-color":function(e,t){return e}}),p.append("rect").classed("legend-mark",!0).attr({height:t.height,width:t.colorBandWidth,fill:"url(#grad1)"})}else{var y=p.select(".legend-marks").selectAll("path.legend-mark").data(o);y.enter().append("path").classed("legend-mark",!0),y.attr({transform:function(e,t){return"translate("+[c/2,g(t)+c/2]+")"},d:function(e,t){var r,a,i,o=e.symbol;return i=3*(a=c),"line"===(r=o)?"M"+[[-a/2,-a/12],[a/2,-a/12],[a/2,a/12],[-a/2,a/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(i)():n.svg.symbol().type("square").size(i)()},fill:function(e,t){return m(t)}}),y.exit().remove()}var b=n.svg.axis().scale(g).orient("right"),_=p.select("g.legend-axis").attr({transform:"translate("+[u?t.colorBandWidth:c,c/2]+")"}).call(b);return _.selectAll(".domain").style({fill:"none",stroke:"none"}),_.selectAll("line").style({fill:"none",stroke:u?t.textColor:"none"}),_.selectAll("text").style({fill:t.textColor,"font-size":t.fontSize}).text((function(e,t){return o[t].name})),r}return r.config=function(t){return arguments.length?(a(e,t),this):e},n.rebind(r,t,"on"),r},o.Legend.defaultConfig=function(e,t){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var e,t,r,i={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var n=(e=i.container.selectAll("g."+s).data([0])).enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),t=n.append("text").attr({dx:i.padding+l,dy:.3*+i.fontSize}),c};return c.text=function(a){var o=n.hsl(i.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",d=a||"";t.style({fill:u,"font-size":i.fontSize+"px"}).text(d);var p=i.padding,h=t.node().getBBox(),f={fill:i.color,stroke:s,"stroke-width":"2px"},m=h.width+2*p+l,g=h.height+2*p;return r.attr({d:"M"+[[l,-g/2],[l,-g/4],[i.hasTick?0:l,0],[l,g/4],[l,g/2],[m,g/2],[m,-g/2]].join("L")+"Z"}).style(f),e.attr({transform:"translate("+[l,-g/2+2*p]+")"}),e.style({display:"block"}),c},c.move=function(t){if(e)return e.attr({transform:"translate("+[t[0],t[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(e)return e.style({display:"none"}),c},c.show=function(){if(e)return e.style({display:"block"}),c},c.config=function(e){return a(i,e),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var e={convert:function(e,t){var r={};if(e.data&&(r.data=e.data.map((function(e,r){var n=a({},e);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach((function(e,r){o.util.translator.apply(null,e.concat(t))})),t||delete n.marker,t&&delete n.groupId,t?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n})),!t&&e.layout&&"stack"===e.layout.barmode)){var i=o.util.duplicates(r.data.map((function(e,t){return e.geometry})));r.data.forEach((function(e,t){var n=i.indexOf(e.geometry);-1!=n&&(r.data[t].groupId=n)}))}if(e.layout){var s=a({},e.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach((function(e,r){o.util.translator.apply(null,e.concat(t))})),t?(void 0!==s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&void 0!==s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&void 0!==s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&void 0!==s.margin.t){var l=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};n.entries(s.margin).forEach((function(e,t){u[c[l.indexOf(e.key)]]=e.value})),s.margin=u}t&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return e}},{"../../../constants/alignment":685,"../../../lib":716,d3:164}],835:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../../lib"),i=e("../../../components/color"),o=e("./micropolar"),s=e("./undo_manager"),l=a.extendDeepAll,c=t.exports={};c.framework=function(e){var t,r,a,i,u,d=new s;function p(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),t=t?l(t,r):r,a||(a=o.Axis()),i=o.adapter.plotly().convert(t),a.config(i).render(u),e.data=t.data,e.layout=t.layout,c.fillLayout(e),t}return p.isPolar=!0,p.svg=function(){return a.svg()},p.getConfig=function(){return t},p.getLiveConfig=function(){return o.adapter.plotly().convert(a.getLiveConfig(),!0)},p.getLiveScales=function(){return{t:a.angularScale(),r:a.radialScale()}},p.setUndoPoint=function(){var e,n,a=this,i=o.util.cloneJson(t);e=i,n=r,d.add({undo:function(){n&&a(n)},redo:function(){a(e)}}),r=o.util.cloneJson(i)},p.undo=function(){d.undo()},p.redo=function(){d.redo()},p},c.fillLayout=function(e){var t=n.select(e).selectAll(".plot-container"),r=t.selectAll(".svg-container"),a=e.framework&&e.framework.svg&&e.framework.svg(),o={width:800,height:600,paper_bgcolor:i.background,_container:t,_paperdiv:r,_paper:a};e._fullLayout=l(o,e.layout)}},{"../../../components/color":591,"../../../lib":716,"./micropolar":834,"./undo_manager":836,d3:164}],836:[function(e,t,r){"use strict";t.exports=function(){var e,t=[],r=-1,n=!1;function a(e,t){return e?(n=!0,e[t](),n=!1,this):this}return{add:function(e){return n?this:(t.splice(r+1,t.length-r),t.push(e),r=t.length-1,this)},setCallback:function(t){e=t},undo:function(){var n=t[r];return n?(a(n,"undo"),r-=1,e&&e(n.undo),this):this},redo:function(){var n=t[r+1];return n?(a(n,"redo"),r+=1,e&&e(n.redo),this):this},clear:function(){t=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r<t.length-1},getCommands:function(){return t},getPreviousCommand:function(){return t[r-1]},getIndex:function(){return r}}}},{}],837:[function(e,t,r){"use strict";var n=e("d3"),a=e("tinycolor2"),i=e("../../registry"),o=e("../../lib"),s=e("../../components/color"),l=e("../../components/drawing"),c=e("../plots"),u=e("../../plots/cartesian/axes"),d=e("../cartesian/set_convert"),p=e("./set_convert"),h=e("../cartesian/autorange").doAutoRange,f=e("../cartesian/dragbox"),m=e("../../components/dragelement"),g=e("../../components/fx"),v=e("../../components/titles"),y=e("../cartesian/select").prepSelect,b=e("../cartesian/select").selectOnClick,_=e("../cartesian/select").clearSelect,x=e("../../lib/setcursor"),w=e("../../lib/clear_gl_canvases"),k=e("../../plot_api/subroutines").redrawReglTraces,M=e("../../constants/alignment").MID_SHIFT,T=e("./constants"),C=e("./helpers"),S=o._,L=o.mod,A=o.deg2rad,E=o.rad2deg;function D(e,t){this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var r=e._fullLayout,n="clip"+r._uid+t;this.clipIds.forTraces=n+"-for-traces",this.clipPaths.forTraces=r._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=r._polarlayer.append("g").attr("class",t),this.radialTickLayout=null,this.angularTickLayout=null}var I=D.prototype;function P(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return"side"in e&&(t+=e.side),t}function O(e,t){return t[o.findIndexOfMin(t,(function(t){return o.angleDist(e,t)}))]}function R(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}function F(e,t){return"translate("+e+","+t+")"}function z(e){return"rotate("+e+")"}t.exports=function(e,t){return new D(e,t)},I.plot=function(e,t){var r=t[this.id];this._hasClipOnAxisFalse=!1;for(var n=0;n<e.length;n++)if(!1===e[n][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}this.updateLayers(t,r),this.updateLayout(t,r),c.generalUpdatePerTraceModule(this.gd,this,e,r),this.updateFx(t,r)},I.updateLayers=function(e,t){var r=this.layers,a=t.radialaxis,i=t.angularaxis,o=T.layerNames,s=o.indexOf("frontplot"),l=o.slice(0,s),c="below traces"===i.layer,u="below traces"===a.layer;c&&l.push("angular-line"),u&&l.push("radial-line"),c&&l.push("angular-axis"),u&&l.push("radial-axis"),l.push("frontplot"),c||l.push("angular-line"),u||l.push("radial-line"),c||l.push("angular-axis"),u||l.push("radial-axis");var d=this.framework.selectAll(".polarsublayer").data(l,String);d.enter().append("g").attr("class",(function(e){return"polarsublayer "+e})).each((function(e){var t=r[e]=n.select(this);switch(e){case"frontplot":t.append("g").classed("barlayer",!0),t.append("g").classed("scatterlayer",!0);break;case"backplot":t.append("g").classed("maplayer",!0);break;case"plotbg":r.bg=t.append("path");break;case"radial-grid":case"angular-grid":t.style("fill","none");break;case"radial-line":t.append("line").style("fill","none");break;case"angular-line":t.append("path").style("fill","none")}})),d.order()},I.updateLayout=function(e,t){var r=this.layers,n=e._size,a=t.radialaxis,i=t.angularaxis,o=t.domain.x,c=t.domain.y;this.xOffset=n.l+n.w*o[0],this.yOffset=n.t+n.h*(1-c[1]);var u=this.xLength=n.w*(o[1]-o[0]),d=this.yLength=n.h*(c[1]-c[0]),p=t.sector;this.sectorInRad=p.map(A);var h,f,m,g,v,y=this.sectorBBox=function(e){var t,r,n,a,i=e[0],o=e[1]-i,s=L(i,360),l=s+o,c=Math.cos(A(s)),u=Math.sin(A(s)),d=Math.cos(A(l)),p=Math.sin(A(l));return a=s<=90&&l>=90||s>90&&l>=450?1:u<=0&&p<=0?0:Math.max(u,p),t=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&d>=0?0:Math.min(c,d),r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&p>=0?0:Math.min(u,p),n=l>=360?1:c<=0&&d<=0?0:Math.max(c,d),[t,r,n,a]}(p),b=y[2]-y[0],_=y[3]-y[1],x=d/u,w=Math.abs(_/b);x>w?(h=u,v=(d-(f=u*w))/n.h/2,m=[o[0],o[1]],g=[c[0]+v,c[1]-v]):(f=d,v=(u-(h=d/w))/n.w/2,m=[o[0]+v,o[1]-v],g=[c[0],c[1]]),this.xLength2=h,this.yLength2=f,this.xDomain2=m,this.yDomain2=g;var k=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-g[1]),T=this.radius=h/b,C=this.innerRadius=t.hole*T,S=this.cx=k-T*y[0],E=this.cy=M+T*y[3],D=this.cxx=S-k,I=this.cyy=E-M;this.radialAxis=this.mockAxis(e,t,a,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[a.side],domain:[C/n.w,T/n.w]}),this.angularAxis=this.mockAxis(e,t,i,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(e,t),this.updateAngularAxis(e,t),this.updateRadialAxis(e,t),this.updateRadialAxisTitle(e,t),this.xaxis=this.mockCartesianAxis(e,t,{_id:"x",domain:m}),this.yaxis=this.mockCartesianAxis(e,t,{_id:"y",domain:g});var P=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",P).attr("transform",F(D,I)),r.frontplot.attr("transform",F(k,M)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",P).attr("transform",F(S,E)).call(s.fill,t.bgcolor)},I.mockAxis=function(e,t,r,n){var a=o.extendFlat({},r,n);return p(a,t,e),a},I.mockCartesianAxis=function(e,t,r){var n=this,a=r._id,i=o.extendFlat({type:"linear"},r);d(i,e);var s={x:[0,2],y:[1,3]};return i.setRange=function(){var e=n.sectorBBox,r=s[a],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-t.hole);i.range=[e[r[0]]*l,e[r[1]]*l]},i.isPtWithinRange="x"===a?function(e){return n.isPtInside(e)}:function(){return!0},i.setRange(),i.setScale(),i},I.doAutoRange=function(e,t){var r=this.gd,n=this.radialAxis,a=t.radialaxis;n.setScale(),h(r,n);var i=n.range;a.range=i.slice(),a._input.range=i.slice(),n._rl=[n.r2l(i[0],null,"gregorian"),n.r2l(i[1],null,"gregorian")]},I.updateRadialAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,d=r.cy,p=t.radialaxis,h=L(t.sector[0],360),f=r.radialAxis,m=l<i;r.fillViewInitialKey("radialaxis.angle",p.angle),r.fillViewInitialKey("radialaxis.range",f.range.slice()),f.setGeometry(),"auto"===f.tickangle&&h>90&&h<=270&&(f.tickangle=180);var g=function(e){return"translate("+(f.l2p(e.x)+l)+",0)"},v=P(p);if(r.radialTickLayout!==v&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=v),m){f.setScale();var y=u.calcTicks(f),b=u.clipEnds(f,y),_=u.getTickSigns(f)[2];u.drawTicks(n,f,{vals:y,layer:a["radial-axis"],path:u.makeTickPath(f,0,_),transFn:g,crisp:!1}),u.drawGrid(n,f,{vals:b,layer:a["radial-grid"],path:function(e){return r.pathArc(f.r2p(e.x)+l)},transFn:o.noop,crisp:!1}),u.drawLabels(n,f,{vals:y,layer:a["radial-axis"],transFn:g,labelFns:u.makeLabelFns(f,0)})}var x=r.radialAxisAngle=r.vangles?E(O(A(p.angle),r.vangles)):p.angle,w=F(c,d),k=w+z(-x);R(a["radial-axis"],m&&(p.showticklabels||p.ticks),{transform:k}),R(a["radial-grid"],m&&p.showgrid,{transform:w}),R(a["radial-line"].select("line"),m&&p.showline,{x1:l,y1:0,x2:i,y2:0,transform:k}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},I.updateRadialAxisTitle=function(e,t,r){var n=this.gd,a=this.radius,i=this.cx,o=this.cy,s=t.radialaxis,c=this.id+"title",u=void 0!==r?r:this.radialAxisAngle,d=A(u),p=Math.cos(d),h=Math.sin(d),f=0;if(s.title){var m=l.bBox(this.layers["radial-axis"].node()).height,g=s.title.font.size;f="counterclockwise"===s.side?-m-.4*g:m+.8*g}this.layers["radial-axis-title"]=v.draw(n,c,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:S(n,"Click to enter radial axis title"),attributes:{x:i+a/2*p+f*h,y:o-a/2*h+f*p,"text-anchor":"middle"},transform:{rotate:-u}})},I.updateAngularAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,l=r.innerRadius,c=r.cx,d=r.cy,p=t.angularaxis,h=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",p.rotation),h.setGeometry(),h.setScale();var f=function(e){return h.t2g(e.x)};"linear"===h.type&&"radians"===h.thetaunit&&(h.tick0=E(h.tick0),h.dtick=E(h.dtick));var m=function(e){return F(c+i*Math.cos(e),d-i*Math.sin(e))},g=u.makeLabelFns(h,0).labelStandoff,v={xFn:function(e){var t=f(e);return Math.cos(t)*g},yFn:function(e){var t=f(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(g+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*M)},anchorFn:function(e){var t=f(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(e,t,r){var n=f(e);return-.5*(1+Math.sin(n))*r}},y=P(p);r.angularTickLayout!==y&&(a["angular-axis"].selectAll("."+h._id+"tick").remove(),r.angularTickLayout=y);var b,_=u.calcTicks(h);if("linear"===t.gridshape?(b=_.map(f),o.angleDelta(b[0],b[1])<0&&(b=b.slice().reverse())):b=null,r.vangles=b,"category"===h.type&&(_=_.filter((function(e){return o.isAngleInsideSector(f(e),r.sectorInRad)}))),h.visible){var x="inside"===h.ticks?-1:1,w=(h.linewidth||1)/2;u.drawTicks(n,h,{vals:_,layer:a["angular-axis"],path:"M"+x*w+",0h"+x*h.ticklen,transFn:function(e){var t=f(e);return m(t)+z(-E(t))},crisp:!1}),u.drawGrid(n,h,{vals:_,layer:a["angular-grid"],path:function(e){var t=f(e),r=Math.cos(t),n=Math.sin(t);return"M"+[c+l*r,d-l*n]+"L"+[c+i*r,d-i*n]},transFn:o.noop,crisp:!1}),u.drawLabels(n,h,{vals:_,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:function(e){return m(f(e))},labelFns:v})}R(a["angular-line"].select("path"),p.showline,{d:r.pathSubplot(),transform:F(c,d)}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},I.updateFx=function(e,t){this.gd._context.staticPlot||(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1),this.updateMainDrag(e))},I.updateMainDrag=function(e){var t=this,r=t.gd,o=t.layers,s=e._zoomlayer,l=T.MINZOOM,c=T.OFFEDGE,u=t.radius,d=t.innerRadius,p=t.cx,h=t.cy,v=t.cxx,x=t.cyy,w=t.sectorInRad,k=t.vangles,M=t.radialAxis,S=C.clampTiny,L=C.findXYatLength,A=C.findEnclosingVertexAngles,E=T.cornerHalfWidth,D=T.cornerLen/2,I=f.makeDragger(o,"path","maindrag","crosshair");n.select(I).attr("d",t.pathSubplot()).attr("transform",F(p,h));var P,O,R,z,N,j,B,Y,H,V={element:I,gd:r,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]};function U(e,t){return Math.sqrt(e*e+t*t)}function W(e,t){return U(e-v,t-x)}function G(e,t){return Math.atan2(x-t,e-v)}function q(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function K(e,r){if(0===e)return t.pathSector(2*E);var n=D/e,a=r-n,i=r+n,o=Math.max(0,Math.min(e,u)),s=o-E,l=o+E;return"M"+q(s,a)+"A"+[s,s]+" 0,0,0 "+q(s,i)+"L"+q(l,i)+"A"+[l,l]+" 0,0,1 "+q(l,a)+"Z"}function X(e,r,n){if(0===e)return t.pathSector(2*E);var a,i,o=q(e,r),s=q(e,n),l=S((o[0]+s[0])/2),c=S((o[1]+s[1])/2);if(l&&c){var u=c/l,d=-1/u,p=L(E,u,l,c);a=L(D,d,p[0][0],p[0][1]),i=L(D,d,p[1][0],p[1][1])}else{var h,f;c?(h=D,f=E):(h=E,f=D),a=[[l-h,c-f],[l+h,c-f]],i=[[l-h,c+f],[l+h,c+f]]}return"M"+a.join("L")+"L"+i.reverse().join("L")+"Z"}function Z(e,t){return t=Math.max(Math.min(t,u),d),e<c?e=0:u-e<c?e=u:t<c?t=0:u-t<c&&(t=u),Math.abs(t-e)>l?(e<t?(R=e,z=t):(R=t,z=e),!0):(R=null,z=null,!1)}function J(e,t){e=e||N,t=t||"M0,0Z",Y.attr("d",e),H.attr("d",t),f.transitionZoombox(Y,H,j,B),j=!0;var n={};re(n),r.emit("plotly_relayouting",n)}function $(e,r){var n,a,i=P+e,o=O+r,s=W(P,O),l=Math.min(W(i,o),u),c=G(P,O);Z(s,l)&&(n=N+t.pathSector(z),R&&(n+=t.pathSector(R)),a=K(R,c)+K(z,c)),J(n,a)}function Q(e,t,r,n){var a=C.findIntersectionXY(r,n,r,[e-v,x-t]);return U(a[0],a[1])}function ee(e,r){var n,a,i=P+e,o=O+r,s=G(P,O),l=G(i,o),c=A(s,k),d=A(l,k);Z(Q(P,O,c[0],c[1]),Math.min(Q(i,o,d[0],d[1]),u))&&(n=N+t.pathSector(z),R&&(n+=t.pathSector(R)),a=[X(R,c[0],c[1]),X(z,c[0],c[1])].join(" ")),J(n,a)}function te(){if(f.removeZoombox(r),null!==R&&null!==z){var e={};re(e),f.showDoubleClickNotifier(r),i.call("_guiRelayout",r,e)}}function re(e){var r=M._rl,n=(r[1]-r[0])/(1-d/u)/u,a=[r[0]+(R-d)*n,r[0]+(z-d)*n];e[t.id+".radialaxis.range"]=a}function ne(e,n){var a=r._fullLayout.clickmode;if(f.removeZoombox(r),2===e){var o={};for(var s in t.viewInitial)o[t.id+"."+s]=t.viewInitial[s];r.emit("plotly_doubleclick",null),i.call("_guiRelayout",r,o)}a.indexOf("select")>-1&&1===e&&b(n,r,[t.xaxis],[t.yaxis],t.id,V),a.indexOf("event")>-1&&g.click(r,n,t.id)}V.prepFn=function(e,n,i){var o=r._fullLayout.dragmode,l=I.getBoundingClientRect();if(P=n-l.left,O=i-l.top,k){var c=C.findPolygonOffset(u,w[0],w[1],k);P+=v+c[0],O+=x+c[1]}switch(o){case"zoom":V.moveFn=k?ee:$,V.clickFn=ne,V.doneFn=te,function(){R=null,z=null,N=t.pathSubplot(),j=!1;var e=r._fullLayout[t.id];B=a(e.bgcolor).getLuminance(),(Y=f.makeZoombox(s,B,p,h,N)).attr("fill-rule","evenodd"),H=f.makeCorners(s,p,h),_(r)}();break;case"select":case"lasso":y(e,n,i,V,o)}},I.onmousemove=function(e){g.hover(r,e,t.id),r._fullLayout._lasthover=I,r._fullLayout._hoversubplot=t.id},I.onmouseout=function(e){r._dragging||m.unhover(r,e)},m.init(V)},I.updateRadialDrag=function(e,t,r){var a=this,s=a.gd,l=a.layers,c=a.radius,u=a.innerRadius,d=a.cx,p=a.cy,h=a.radialAxis,g=T.radialDragBoxSize,v=g/2;if(h.visible){var y,b,x,M=A(a.radialAxisAngle),C=h._rl,S=C[0],L=C[1],D=C[r],I=.75*(C[1]-C[0])/(1-t.hole)/c;r?(y=d+(c+v)*Math.cos(M),b=p-(c+v)*Math.sin(M),x="radialdrag"):(y=d+(u-v)*Math.cos(M),b=p-(u-v)*Math.sin(M),x="radialdrag-inner");var P,N,j,B=f.makeRectDragger(l,x,"crosshair",-v,-v,g,g),Y={element:B,gd:s};R(n.select(B),h.visible&&u<c,{transform:F(y,b)}),Y.prepFn=function(){P=null,N=null,j=null,Y.moveFn=H,Y.doneFn=V,_(s)},Y.clampFn=function(e,t){return Math.sqrt(e*e+t*t)<T.MINDRAG&&(e=0,t=0),[e,t]},m.init(Y)}function H(e,t){if(P)P(e,t);else{var n=[e,-t],i=[Math.cos(M),Math.sin(M)],l=Math.abs(o.dot(n,i)/Math.sqrt(o.dot(n,n)));isNaN(l)||(P=l<.5?U:W)}var c={};!function(e){null!==N?e[a.id+".radialaxis.angle"]=N:null!==j&&(e[a.id+".radialaxis.range["+r+"]"]=j)}(c),s.emit("plotly_relayouting",c)}function V(){null!==N?i.call("_guiRelayout",s,a.id+".radialaxis.angle",N):null!==j&&i.call("_guiRelayout",s,a.id+".radialaxis.range["+r+"]",j)}function U(e,t){if(0!==r){var n=y+e,i=b+t;N=Math.atan2(p-i,n-d),a.vangles&&(N=O(N,a.vangles)),N=E(N);var o=F(d,p)+z(-N);l["radial-axis"].attr("transform",o),l["radial-line"].select("line").attr("transform",o);var s=a.gd._fullLayout,c=s[a.id];a.updateRadialAxisTitle(s,c,N)}}function W(e,t){var n=o.dot([e,-t],[Math.cos(M),Math.sin(M)]);if(j=D-I*n,I>0==(r?j>S:j<L)){var l=s._fullLayout,c=l[a.id];h.range[r]=j,h._rl[r]=j,a.updateRadialAxis(l,c),a.xaxis.setRange(),a.xaxis.setScale(),a.yaxis.setRange(),a.yaxis.setScale();var u=!1;for(var d in a.traceHash){var p=a.traceHash[d],f=o.filterVisible(p);p[0][0].trace._module.plot(s,a,f,c),i.traceIs(d,"gl")&&f.length&&(u=!0)}u&&(w(s),k(s))}else j=null}},I.updateAngularDrag=function(e){var t=this,r=t.gd,a=t.layers,s=t.radius,c=t.angularAxis,u=t.cx,d=t.cy,p=t.cxx,h=t.cyy,g=T.angularDragBoxSize,v=f.makeDragger(a,"path","angulardrag","move"),y={element:v,gd:r};function b(e,t){return Math.atan2(h+g-t,e-p-g)}n.select(v).attr("d",t.pathAnnulus(s,s+g)).attr("transform",F(u,d)).call(x,"move");var M,C,S,L,A,D,I=a.frontplot.select(".scatterlayer").selectAll(".trace"),P=I.selectAll(".point"),O=I.selectAll(".textpoint");function R(e,s){var f=t.gd._fullLayout,m=f[t.id],g=b(M+e,C+s),v=E(g-D);if(L=S+v,a.frontplot.attr("transform",F(t.xOffset2,t.yOffset2)+z([-v,p,h])),t.vangles){A=t.radialAxisAngle+v;var y=F(u,d)+z(-v),_=F(u,d)+z(-A);a.bg.attr("transform",y),a["radial-grid"].attr("transform",y),a["radial-axis"].attr("transform",_),a["radial-line"].select("line").attr("transform",_),t.updateRadialAxisTitle(f,m,A)}else t.clipPaths.forTraces.select("path").attr("transform",F(p,h)+z(v));P.each((function(){var e=n.select(this),t=l.getTranslate(e);e.attr("transform",F(t.x,t.y)+z([v]))})),O.each((function(){var e=n.select(this),t=e.select("text"),r=l.getTranslate(e);e.attr("transform",z([v,t.attr("x"),t.attr("y")])+F(r.x,r.y))})),c.rotation=o.modHalf(L,360),t.updateAngularAxis(f,m),t._hasClipOnAxisFalse&&!o.isFullCircle(t.sectorInRad)&&I.call(l.hideOutsideRangePoints,t);var x=!1;for(var T in t.traceHash)if(i.traceIs(T,"gl")){var R=t.traceHash[T],j=o.filterVisible(R);R[0][0].trace._module.plot(r,t,j,m),j.length&&(x=!0)}x&&(w(r),k(r));var B={};N(B),r.emit("plotly_relayouting",B)}function N(e){e[t.id+".angularaxis.rotation"]=L,t.vangles&&(e[t.id+".radialaxis.angle"]=A)}function j(){O.select("text").attr("transform",null);var e={};N(e),i.call("_guiRelayout",r,e)}y.prepFn=function(n,a,i){var o=e[t.id];S=o.angularaxis.rotation;var s=v.getBoundingClientRect();M=a-s.left,C=i-s.top,D=b(M,C),y.moveFn=R,y.doneFn=j,_(r)},t.vangles&&!o.isFullCircle(t.sectorInRad)&&(y.prepFn=o.noop,x(n.select(v),null)),m.init(y)},I.isPtInside=function(e){var t=this.sectorInRad,r=this.vangles,n=this.angularAxis.c2g(e.theta),a=this.radialAxis,i=a.c2l(e.r),s=a._rl;return(r?C.isPtInsidePolygon:o.isPtInsideSector)(i,n,s,t,r)},I.pathArc=function(e){var t=this.sectorInRad,r=this.vangles;return(r?C.pathPolygon:o.pathArc)(e,t[0],t[1],r)},I.pathSector=function(e){var t=this.sectorInRad,r=this.vangles;return(r?C.pathPolygon:o.pathSector)(e,t[0],t[1],r)},I.pathAnnulus=function(e,t){var r=this.sectorInRad,n=this.vangles;return(n?C.pathPolygonAnnulus:o.pathAnnulus)(e,t,r[0],r[1],n)},I.pathSubplot=function(){var e=this.innerRadius,t=this.radius;return e?this.pathAnnulus(e,t):this.pathSector(t)},I.fillViewInitialKey=function(e,t){e in this.viewInitial||(this.viewInitial[e]=t)}},{"../../components/color":591,"../../components/dragelement":609,"../../components/drawing":612,"../../components/fx":629,"../../components/titles":678,"../../constants/alignment":685,"../../lib":716,"../../lib/clear_gl_canvases":701,"../../lib/setcursor":736,"../../plot_api/subroutines":755,"../../plots/cartesian/axes":764,"../../registry":845,"../cartesian/autorange":763,"../cartesian/dragbox":772,"../cartesian/select":781,"../cartesian/set_convert":782,"../plots":825,"./constants":826,"./helpers":827,"./set_convert":838,d3:164,tinycolor2:535}],838:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../cartesian/set_convert"),i=n.deg2rad,o=n.rad2deg;t.exports=function(e,t,r){switch(a(e,r),e._id){case"x":case"radialaxis":!function(e,t){var r=t._subplot;e.setGeometry=function(){var t=e._rl[0],n=e._rl[1],a=r.innerRadius,i=(r.radius-a)/(n-t),o=a/i,s=t>n?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(r){var n=e.c2l(r)-t;return(s(n)?n:0)+o},e.g2c=function(r){return e.l2c(r+t-o)},e.g2p=function(e){return e*i},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var r=e.type;if("linear"===r){var a=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?i(e):e}(a(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?o(e):e}(e,t))}}e.makeCalcdata=function(t,a){var i,o,s=t[a],l=t._length,c=function(r){return e.d2c(r,t.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(i=new Array(l),o=0;o<l;o++)i[o]=c(s[o])}else{var u=a+"0",d="d"+a,p=u in t?c(t[u]):0,h=t[d]?c(t[d]):(e.period||2*Math.PI)/l;for(i=new Array(l),o=0;o<l;o++)i[o]=p+o*h}return i},e.setGeometry=function(){var a,s,l,c,u=t.sector,d=u.map(i),p={clockwise:-1,counterclockwise:1}[e.direction],h=i(e.rotation),f=function(e){return p*e+h},m=function(e){return(e-h)/p};switch(r){case"linear":s=a=n.identity,c=i,l=o,e.range=n.isFullCircle(d)?[u[0],u[0]+360]:d.map(m).map(o);break;case"category":var g=e._categories.length,v=e.period?Math.max(e.period,g):g;0===v&&(v=1),s=c=function(e){return 2*e*Math.PI/v},a=l=function(e){return e*v/Math.PI/2},e.range=[0,v]}e.c2g=function(e){return f(s(e))},e.g2c=function(e){return a(m(e))},e.t2g=function(e){return f(c(e))},e.g2t=function(e){return l(m(e))}}}(e,t)}}},{"../../lib":716,"../cartesian/set_convert":782}],839:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/plot_template"),i=e("./domain").defaults;t.exports=function(e,t,r,o){var s,l,c=o.type,u=o.attributes,d=o.handleDefaults,p=o.partition||"x",h=t._subplots[c],f=h.length,m=f&&h[0].replace(/\d+$/,"");function g(e,t){return n.coerce(s,l,u,e,t)}for(var v=0;v<f;v++){var y=h[v];s=e[y]?e[y]:e[y]={},l=a.newContainer(t,y,m),g("uirevision",t.uirevision);var b={};b[p]=[v/f,(v+1)/f],i(l,t,g,b),o.id=y,d(s,l,g,o)}}},{"../lib":716,"../plot_api/plot_template":754,"./domain":789}],840:[function(e,t,r){"use strict";function n(e){var t=e.description?" "+e.description:"",r=e.keys||[];if(r.length>0){for(var n=[],a=0;a<r.length;a++)n[a]="`"+r[a]+"`";t+="Finally, the template string has access to ",t=1===r.length?"variable "+n[0]:"variables "+n.slice(0,-1).join(", ")+" and "+n.slice(-1)+"."}return t}['Variables are inserted using %{variable}, for example "y: %{y}".','Numbers are formatted using d3-format\'s syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".',e("../constants/docs").FORMAT_LINK,"for details on the formatting syntax.",'Dates are formatted using d3-time-format\'s syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".',e("../constants/docs").DATE_FORMAT_LINK,"for details on the date formatting syntax."].join(" "),r.hovertemplateAttrs=function(e,t){e=e||{},n(t=t||{});var r={valType:"string",dflt:"",editType:e.editType||"none"};return!1!==e.arrayOk&&(r.arrayOk=!0),r},r.texttemplateAttrs=function(e,t){e=e||{},n(t=t||{});var r={valType:"string",dflt:"",editType:e.editType||"calc"};return!1!==e.arrayOk&&(r.arrayOk=!0),r}},{"../constants/docs":687}],841:[function(e,t,r){"use strict";var n=e("./ternary"),a=e("../../plots/get_data").getSubplotCalcData,i=e("../../lib").counterRegex;r.name="ternary";var o=r.attr="subplot";r.idRoot="ternary",r.idRegex=r.attrRegex=i("ternary"),(r.attributes={})[o]={valType:"subplotid",dflt:"ternary",editType:"calc"},r.layoutAttributes=e("./layout_attributes"),r.supplyLayoutDefaults=e("./layout_defaults"),r.plot=function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots.ternary,o=0;o<i.length;o++){var s=i[o],l=a(r,"ternary",s),c=t[s]._subplot;c||(c=new n({id:s,graphDiv:e,container:t._ternarylayer.node()},t),t[s]._subplot=c),c.plot(l,t,e._promises)}},r.clean=function(e,t,r,n){for(var a=n._subplots.ternary||[],i=0;i<a.length;i++){var o=a[i],s=n[o]._subplot;!t[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers["a-title"].remove(),s.layers["b-title"].remove(),s.layers["c-title"].remove())}}},{"../../lib":716,"../../plots/get_data":799,"./layout_attributes":842,"./layout_defaults":843,"./ternary":844}],842:[function(e,t,r){"use strict";var n=e("../../components/color/attributes"),a=e("../domain").attributes,i=e("../cartesian/layout_attributes"),o=e("../../plot_api/edit_types").overrideAll,s=e("../../lib/extend").extendFlat,l={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.tickmode,nticks:s({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:s({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:s({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,layer:i.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:i._deprecated.title,titlefont:i._deprecated.titlefont}},c=t.exports=o({domain:a({name:"ternary"}),bgcolor:{valType:"color",dflt:n.background},sum:{valType:"number",dflt:1,min:0},aaxis:l,baxis:l,caxis:l},"plot","from-root");c.uirevision={valType:"any",editType:"none"},c.aaxis.uirevision=c.baxis.uirevision=c.caxis.uirevision={valType:"any",editType:"none"}},{"../../components/color/attributes":590,"../../lib/extend":707,"../../plot_api/edit_types":747,"../cartesian/layout_attributes":776,"../domain":789}],843:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../plot_api/plot_template"),i=e("../../lib"),o=e("../subplot_defaults"),s=e("../cartesian/tick_label_defaults"),l=e("../cartesian/tick_mark_defaults"),c=e("../cartesian/tick_value_defaults"),u=e("../cartesian/line_grid_defaults"),d=e("./layout_attributes"),p=["aaxis","baxis","caxis"];function h(e,t,r,i){var o,s,l,c=r("bgcolor"),u=r("sum");i.bgColor=n.combine(c,i.paper_bgcolor);for(var d=0;d<p.length;d++)s=e[o=p[d]]||{},(l=a.newContainer(t,o))._name=o,f(s,l,i,t);var h=t.aaxis,m=t.baxis,g=t.caxis;h.min+m.min+g.min>=u&&(h.min=0,m.min=0,g.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function f(e,t,r,n){var a=d[t._name];function o(r,n){return i.coerce(e,t,a,r,n)}o("uirevision",n.uirevision),t.type="linear";var p=o("color"),h=p!==a.color.dflt?p:r.font.color,f=t._name.charAt(0).toUpperCase(),m="Component "+f,g=o("title.text",m);t._hovertitle=g===m?g:f,i.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:h}),o("min"),c(e,t,o,"linear"),s(e,t,o,"linear",{}),l(e,t,o,{outerTicks:!0}),o("showticklabels")&&(i.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:h}),o("tickangle"),o("tickformat")),u(e,t,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}t.exports=function(e,t,r){o(e,t,r,{type:"ternary",attributes:d,handleDefaults:h,font:t.font,paper_bgcolor:t.paper_bgcolor})}},{"../../components/color":591,"../../lib":716,"../../plot_api/plot_template":754,"../cartesian/line_grid_defaults":778,"../cartesian/tick_label_defaults":783,"../cartesian/tick_mark_defaults":784,"../cartesian/tick_value_defaults":785,"../subplot_defaults":839,"./layout_attributes":842}],844:[function(e,t,r){"use strict";var n=e("d3"),a=e("tinycolor2"),i=e("../../registry"),o=e("../../lib"),s=o._,l=e("../../components/color"),c=e("../../components/drawing"),u=e("../cartesian/set_convert"),d=e("../../lib/extend").extendFlat,p=e("../plots"),h=e("../cartesian/axes"),f=e("../../components/dragelement"),m=e("../../components/fx"),g=e("../../components/titles"),v=e("../cartesian/select").prepSelect,y=e("../cartesian/select").selectOnClick,b=e("../cartesian/select").clearSelect,_=e("../cartesian/constants");function x(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=x;var w=x.prototype;w.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},w.plot=function(e,t){var r=t[this.id],n=t._size;this._hasClipOnAxisFalse=!1;for(var a=0;a<e.length;a++)if(!1===e[a][0].trace.cliponaxis){this._hasClipOnAxisFalse=!0;break}this.updateLayers(r),this.adjustLayout(r,n),p.generalUpdatePerTraceModule(this.graphDiv,this,e,r),this.layers.plotbg.select("path").call(l.fill,r.bgcolor)},w.makeFramework=function(e){var t=this.graphDiv,r=e[this.id],n=this.clipId="clip"+this.layoutId+this.id,a=this.clipIdRelative="clip-relative"+this.layoutId+this.id;this.clipDef=o.ensureSingleById(e._clips,"clipPath",n,(function(e){e.append("path").attr("d","M0,0Z")})),this.clipDefRelative=o.ensureSingleById(e._clips,"clipPath",a,(function(e){e.append("path").attr("d","M0,0Z")})),this.plotContainer=o.ensureSingle(this.container,"g",this.id),this.updateLayers(r),c.setClipUrl(this.layers.backplot,n,t),c.setClipUrl(this.layers.grids,n,t)},w.updateLayers=function(e){var t=this.layers,r=["draglayer","plotbg","backplot","grids"];"below traces"===e.aaxis.layer&&r.push("aaxis","aline"),"below traces"===e.baxis.layer&&r.push("baxis","bline"),"below traces"===e.caxis.layer&&r.push("caxis","cline"),r.push("frontplot"),"above traces"===e.aaxis.layer&&r.push("aaxis","aline"),"above traces"===e.baxis.layer&&r.push("baxis","bline"),"above traces"===e.caxis.layer&&r.push("caxis","cline");var a=this.plotContainer.selectAll("g.toplevel").data(r,String),i=["agrid","bgrid","cgrid"];a.enter().append("g").attr("class",(function(e){return"toplevel "+e})).each((function(e){var r=n.select(this);t[e]=r,"frontplot"===e?r.append("g").classed("scatterlayer",!0):"backplot"===e?r.append("g").classed("maplayer",!0):"plotbg"===e?r.append("path").attr("d","M0,0Z"):"aline"===e||"bline"===e||"cline"===e?r.append("path"):"grids"===e&&i.forEach((function(e){t[e]=r.append("g").classed("grid "+e,!0)}))})),a.order()};var k=Math.sqrt(4/3);w.adjustLayout=function(e,t){var r,n,a,i,o,s,p=this,h=e.domain,f=(h.x[0]+h.x[1])/2,m=(h.y[0]+h.y[1])/2,g=h.x[1]-h.x[0],v=h.y[1]-h.y[0],y=g*t.w,b=v*t.h,_=e.sum,x=e.aaxis.min,w=e.baxis.min,M=e.caxis.min;y>k*b?a=(i=b)*k:i=(a=y)/k,o=g*a/y,s=v*i/b,r=t.l+t.w*f-a/2,n=t.t+t.h*(1-m)-i/2,p.x0=r,p.y0=n,p.w=a,p.h=i,p.sum=_,p.xaxis={type:"linear",range:[x+2*M-_,_-x-2*w],domain:[f-o/2,f+o/2],_id:"x"},u(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(e){return e.a>=p.aaxis.range[0]&&e.a<=p.aaxis.range[1]&&e.b>=p.baxis.range[1]&&e.b<=p.baxis.range[0]&&e.c>=p.caxis.range[1]&&e.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[x,_-w-M],domain:[m-s/2,m+s/2],_id:"y"},u(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var T=p.yaxis.domain[0],C=p.aaxis=d({},e.aaxis,{range:[x,_-w-M],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+s*k],anchor:"free",position:0,_id:"y",_length:a});u(C,p.graphDiv._fullLayout),C.setScale();var S=p.baxis=d({},e.baxis,{range:[_-x-M,w],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});u(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=d({},e.caxis,{range:[_-x-w,M],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+s*k],anchor:"free",position:0,_id:"y",_length:a});u(L,p.graphDiv._fullLayout),L.setScale();var A="M"+r+","+(n+i)+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDef.select("path").attr("d",A),p.layers.plotbg.select("path").attr("d",A);var E="M0,"+i+"h"+a+"l-"+a/2+",-"+i+"Z";p.clipDefRelative.select("path").attr("d",E);var D="translate("+r+","+n+")";p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",D),p.clipDefRelative.select("path").attr("transform",null);var I="translate("+(r-S._offset)+","+(n+i)+")";p.layers.baxis.attr("transform",I),p.layers.bgrid.attr("transform",I);var P="translate("+(r+a/2)+","+n+")rotate(30)translate(0,"+-C._offset+")";p.layers.aaxis.attr("transform",P),p.layers.agrid.attr("transform",P);var O="translate("+(r+a/2)+","+n+")rotate(-30)translate(0,"+-L._offset+")";p.layers.caxis.attr("transform",O),p.layers.cgrid.attr("transform",O),p.drawAxes(!0),p.layers.aline.select("path").attr("d",C.showline?"M"+r+","+(n+i)+"l"+a/2+",-"+i:"M0,0").call(l.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+i)+"h"+a:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",L.showline?"M"+(r+a/2)+","+n+"l"+a/2+","+i:"M0,0").call(l.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},w.drawAxes=function(e){var t=this.graphDiv,r=this.id.substr(7)+"title",n=this.layers,a=this.aaxis,i=this.baxis,o=this.caxis;if(this.drawAx(a),this.drawAx(i),this.drawAx(o),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0)),c=(i.showticklabels?i.tickfont.size:0)+("outside"===i.ticks?i.ticklen:0)+3;n["a-title"]=g.draw(t,"a"+r,{propContainer:a,propName:this.id+".aaxis.title",placeholder:s(t,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=g.draw(t,"b"+r,{propContainer:i,propName:this.id+".baxis.title",placeholder:s(t,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*i.title.font.size+c,"text-anchor":"middle"}}),n["c-title"]=g.draw(t,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:s(t,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,"text-anchor":"middle"}})}},w.drawAx=function(e){var t,r=this.graphDiv,n=e._name,a=n.charAt(0),i=e._id,s=this.layers[n],l=a+"tickLayout",c=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);this[l]!==c&&(s.selectAll("."+i+"tick").remove(),this[l]=c),e.setScale();var u=h.calcTicks(e),d=h.clipEnds(e,u),p=h.makeTransFn(e),f=h.getTickSigns(e)[2],m=o.deg2rad(30),g=f*(e.linewidth||1)/2,v=f*e.ticklen,y=this.w,b=this.h,_="b"===a?"M0,"+g+"l"+Math.sin(m)*v+","+Math.cos(m)*v:"M"+g+",0l"+Math.cos(m)*v+","+-Math.sin(m)*v,x={a:"M0,0l"+b+",-"+y/2,b:"M0,0l-"+y/2+",-"+b,c:"M0,0l-"+b+","+y/2}[a];h.drawTicks(r,e,{vals:"inside"===e.ticks?d:u,layer:s,path:_,transFn:p,crisp:!1}),h.drawGrid(r,e,{vals:d,layer:this.layers[a+"grid"],path:x,transFn:p,crisp:!1}),h.drawLabels(r,e,{vals:u,layer:s,transFn:p,labelFns:h.makeLabelFns(e,0,30)})};var M=_.MINZOOM/2+.87,T="m-0.87,.5h"+M+"v3h-"+(M+5.2)+"l"+(M/2+2.6)+",-"+(.87*M+4.5)+"l2.6,1.5l-"+M/2+","+.87*M+"Z",C="m0.87,.5h-"+M+"v3h"+(M+5.2)+"l-"+(M/2+2.6)+",-"+(.87*M+4.5)+"l-2.6,1.5l"+M/2+","+.87*M+"Z",S="m0,1l"+M/2+","+.87*M+"l2.6,-1.5l-"+(M/2+2.6)+",-"+(.87*M+4.5)+"l-"+(M/2+2.6)+","+(.87*M+4.5)+"l2.6,1.5l"+M/2+",-"+.87*M+"Z",L="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",A=!0;function E(e){n.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}w.initInteractions=function(){var e,t,r,n,u,d,p,h,g,x,w=this,M=w.layers.plotbg.select("path").node(),D=w.graphDiv,I=D._fullLayout._zoomlayer,P={element:M,gd:D,plotinfo:{id:w.id,xaxis:w.xaxis,yaxis:w.yaxis},subplot:w.id,prepFn:function(i,o,s){P.xaxes=[w.xaxis],P.yaxes=[w.yaxis];var c=D._fullLayout.dragmode;P.minDrag="lasso"===c?1:void 0,"zoom"===c?(P.moveFn=j,P.clickFn=R,P.doneFn=B,function(i,o,s){var c=M.getBoundingClientRect();e=o-c.left,t=s-c.top,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,n=w.aaxis.range[1]-r.a,d=a(w.graphDiv._fullLayout[w.id].bgcolor).getLuminance(),p="M0,"+w.h+"L"+w.w/2+", 0L"+w.w+","+w.h+"Z",h=!1,g=I.append("path").attr("class","zoombox").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:d>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",p),x=I.append("path").attr("class","zoombox-corners").attr("transform","translate("+w.x0+", "+w.y0+")").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),b(D)}(0,o,s)):"pan"===c?(P.moveFn=Y,P.clickFn=R,P.doneFn=H,r={a:w.aaxis.range[0],b:w.baxis.range[1],c:w.caxis.range[1]},u=r,b(D)):"select"!==c&&"lasso"!==c||v(i,o,s,P,c)}};function O(e){var t={};return t[w.id+".aaxis.min"]=e.a,t[w.id+".baxis.min"]=e.b,t[w.id+".caxis.min"]=e.c,t}function R(e,t){var r=D._fullLayout.clickmode;E(D),2===e&&(D.emit("plotly_doubleclick",null),i.call("_guiRelayout",D,O({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&y(t,D,[w.xaxis],[w.yaxis],w.id,P),r.indexOf("event")>-1&&m.click(D,t,w.id)}function F(e,t){return 1-t/w.h}function z(e,t){return 1-(e+(w.h-t)/Math.sqrt(3))/w.w}function N(e,t){return(e-(w.h-t)/Math.sqrt(3))/w.w}function j(a,i){var o=e+a,s=t+i,l=Math.max(0,Math.min(1,F(0,t),F(0,s))),c=Math.max(0,Math.min(1,z(e,t),z(o,s))),f=Math.max(0,Math.min(1,N(e,t),N(o,s))),m=(l/2+f)*w.w,v=(1-l/2-c)*w.w,y=(m+v)/2,b=v-m,M=(1-l)*w.h,A=M-b/k;b<_.MINZOOM?(u=r,g.attr("d",p),x.attr("d","M0,0Z")):(u={a:r.a+l*n,b:r.b+c*n,c:r.c+f*n},g.attr("d",p+"M"+m+","+M+"H"+v+"L"+y+","+A+"L"+m+","+M+"Z"),x.attr("d","M"+e+","+t+L+"M"+m+","+M+T+"M"+v+","+M+C+"M"+y+","+A+S)),h||(g.transition().style("fill",d>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),h=!0),D.emit("plotly_relayouting",O(u))}function B(){E(D),u!==r&&(i.call("_guiRelayout",D,O(u)),A&&D.data&&D._context.showTips&&(o.notifier(s(D,"Double-click to zoom back out"),"long"),A=!1))}function Y(e,t){var n=e/w.xaxis._m,a=t/w.yaxis._m,i=[(u={a:r.a-a,b:r.b+(n+a)/2,c:r.c-(n-a)/2}).a,u.b,u.c].sort(),o=i.indexOf(u.a),s=i.indexOf(u.b),l=i.indexOf(u.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),u={a:i[o],b:i[s],c:i[l]},t=(r.a-u.a)*w.yaxis._m,e=(r.c-u.c-r.b+u.b)*w.xaxis._m);var d="translate("+(w.x0+e)+","+(w.y0+t)+")";w.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",d);var p="translate("+-e+","+-t+")";w.clipDefRelative.select("path").attr("transform",p),w.aaxis.range=[u.a,w.sum-u.b-u.c],w.baxis.range=[w.sum-u.a-u.c,u.b],w.caxis.range=[w.sum-u.a-u.b,u.c],w.drawAxes(!1),w._hasClipOnAxisFalse&&w.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,w),D.emit("plotly_relayouting",O(u))}function H(){i.call("_guiRelayout",D,O(u))}M.onmousemove=function(e){m.hover(D,e,w.id),D._fullLayout._lasthover=M,D._fullLayout._hoversubplot=w.id},M.onmouseout=function(e){D._dragging||f.unhover(D,e)},f.init(P)}},{"../../components/color":591,"../../components/dragelement":609,"../../components/drawing":612,"../../components/fx":629,"../../components/titles":678,"../../lib":716,"../../lib/extend":707,"../../registry":845,"../cartesian/axes":764,"../cartesian/constants":770,"../cartesian/select":781,"../cartesian/set_convert":782,"../plots":825,d3:164,tinycolor2:535}],845:[function(e,t,r){"use strict";var n=e("./lib/loggers"),a=e("./lib/noop"),i=e("./lib/push_unique"),o=e("./lib/is_plain_object"),s=e("./lib/dom").addStyleRule,l=e("./lib/extend"),c=e("./plots/attributes"),u=e("./plots/layout_attributes"),d=l.extendFlat,p=l.extendDeepAll;function h(e){var t=e.name,a=e.categories,i=e.meta;if(r.modules[t])n.log("Type "+t+" already registered");else{r.subplotsRegistry[e.basePlotModule.name]||function(e){var t=e.name;if(r.subplotsRegistry[t])n.log("Plot type "+t+" already registered.");else for(var a in v(e),r.subplotsRegistry[t]=e,r.componentsRegistry)_(a,e.name)}(e.basePlotModule);for(var o={},l=0;l<a.length;l++)o[a[l]]=!0,r.allCategories[a[l]]=!0;for(var c in r.modules[t]={_module:e,categories:o},i&&Object.keys(i).length&&(r.modules[t].meta=i),r.allTypes.push(t),r.componentsRegistry)y(c,t);e.layoutAttributes&&d(r.traceLayoutAttributes,e.layoutAttributes);var u=e.basePlotModule,p=u.name;if("mapbox"===p){var h=u.constants.styleRules;for(var f in h)s(".js-plotly-plot .plotly .mapboxgl-"+f,h[f])}"geo"!==p&&"mapbox"!==p||void 0===typeof window||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function f(e){if("string"!=typeof e.name)throw new Error("Component module *name* must be a string.");var t=e.name;for(var n in r.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&i(r.layoutArrayContainers,t),v(e)),r.modules)y(t,n);for(var a in r.subplotsRegistry)_(t,a);for(var o in r.transformsRegistry)b(t,o);e.schema&&e.schema.layout&&p(u,e.schema.layout)}function m(e){if("string"!=typeof e.name)throw new Error("Transform module *name* must be a string.");var t="Transform module "+e.name,a="function"==typeof e.transform,i="function"==typeof e.calcTransform;if(!a&&!i)throw new Error(t+" is missing a *transform* or *calcTransform* method.");for(var s in a&&i&&n.log([t+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),o(e.attributes)||n.log(t+" registered without an *attributes* object."),"function"!=typeof e.supplyDefaults&&n.log(t+" registered without a *supplyDefaults* method."),r.transformsRegistry[e.name]=e,r.componentsRegistry)b(s,e.name)}function g(e){var t=e.name,n=t.split("-")[0],a=e.dictionary,i=e.format,o=a&&Object.keys(a).length,s=i&&Object.keys(i).length,l=r.localeRegistry,c=l[t];if(c||(l[t]=c={}),n!==t){var u=l[n];u||(l[n]=u={}),o&&u.dictionary===c.dictionary&&(u.dictionary=a),s&&u.format===c.format&&(u.format=i)}o&&(c.dictionary=a),s&&(c.format=i)}function v(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var n=0;n<t.length;n++)i(r.layoutArrayRegexes,t[n])}}function y(e,t){var n=r.componentsRegistry[e].schema;if(n&&n.traces){var a=n.traces[t];a&&p(r.modules[t]._module.attributes,a)}}function b(e,t){var n=r.componentsRegistry[e].schema;if(n&&n.transforms){var a=n.transforms[t];a&&p(r.transformsRegistry[t].attributes,a)}}function _(e,t){var n=r.componentsRegistry[e].schema;if(n&&n.subplots){var a=r.subplotsRegistry[t],i=a.layoutAttributes,o="subplot"===a.attr?a.name:a.attr;Array.isArray(o)&&(o=o[0]);var s=n.subplots[o];i&&s&&p(i,s)}}function x(e){return"object"==typeof e&&(e=e.type),e}r.modules={},r.allCategories={},r.allTypes=[],r.subplotsRegistry={},r.transformsRegistry={},r.componentsRegistry={},r.layoutArrayContainers=[],r.layoutArrayRegexes=[],r.traceLayoutAttributes={},r.localeRegistry={},r.apiMethodRegistry={},r.collectableSubplotTypes=null,r.register=function(e){if(r.collectableSubplotTypes=null,!e)throw new Error("No argument passed to Plotly.register.");e&&!Array.isArray(e)&&(e=[e]);for(var t=0;t<e.length;t++){var n=e[t];if(!n)throw new Error("Invalid module was attempted to be registered!");switch(n.moduleType){case"trace":h(n);break;case"transform":m(n);break;case"component":f(n);break;case"locale":g(n);break;case"apiMethod":var a=n.name;r.apiMethodRegistry[a]=n.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},r.getModule=function(e){var t=r.modules[x(e)];return!!t&&t._module},r.traceIs=function(e,t){if("various"===(e=x(e)))return!1;var a=r.modules[e];return a||(e&&"area"!==e&&n.log("Unrecognized trace type "+e+"."),a=r.modules[c.type.dflt]),!!a.categories[t]},r.getTransformIndices=function(e,t){for(var r=[],n=e.transforms||[],a=0;a<n.length;a++)n[a].type===t&&r.push(a);return r},r.hasTransform=function(e,t){for(var r=e.transforms||[],n=0;n<r.length;n++)if(r[n].type===t)return!0;return!1},r.getComponentMethod=function(e,t){var n=r.componentsRegistry[e];return n&&n[t]||a},r.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return r.apiMethodRegistry[e].apply(null,t)}},{"./lib/dom":705,"./lib/extend":707,"./lib/is_plain_object":717,"./lib/loggers":720,"./lib/noop":725,"./lib/push_unique":730,"./plots/attributes":761,"./plots/layout_attributes":816}],846:[function(e,t,r){"use strict";var n=e("../registry"),a=e("../lib"),i=a.extendFlat,o=a.extendDeep;function s(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var r;e.framework&&e.framework.isPolar&&(e=e.framework.getConfig());var a,l=e.data,c=e.layout,u=o([],l),d=o({},c,s(t.tileClass)),p=e._context||{};if(t.width&&(d.width=t.width),t.height&&(d.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){d.annotations=[];var h=Object.keys(d);for(r=0;r<h.length;r++)a=h[r],["xaxis","yaxis","zaxis"].indexOf(a.slice(0,5))>-1&&(d[h[r]].title={text:""});for(r=0;r<u.length;r++){var f=u[r];f.showscale=!1,f.marker&&(f.marker.showscale=!1),n.traceIs(f,"pie-like")&&(f.textposition="none")}}if(Array.isArray(t.annotations))for(r=0;r<t.annotations.length;r++)d.annotations.push(t.annotations[r]);var m=Object.keys(d).filter((function(e){return e.match(/^scene\d*$/)}));if(m.length){var g={};for("thumbnail"===t.tileClass&&(g={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),r=0;r<m.length;r++){var v=d[m[r]];v.xaxis||(v.xaxis={}),v.yaxis||(v.yaxis={}),v.zaxis||(v.zaxis={}),i(v.xaxis,g),i(v.yaxis,g),i(v.zaxis,g),v._scene=null}}var y=document.createElement("div");t.tileClass&&(y.className=t.tileClass);var b={gd:y,td:y,layout:d,data:u,config:{staticPlot:void 0===t.staticPlot||t.staticPlot,plotGlPixelRatio:void 0===t.plotGlPixelRatio?2:t.plotGlPixelRatio,displaylogo:t.displaylogo||!1,showLink:t.showLink||!1,showTips:t.showTips||!1,mapboxAccessToken:p.mapboxAccessToken}};return"transparent"!==t.setBackground&&(b.config.setBackground=t.setBackground||"opaque"),b.gd.defaultLayout=s(t.tileClass),b}},{"../lib":716,"../registry":845}],847:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/to_image"),i=e("./filesaver"),o=e("./helpers");t.exports=function(e,t){var r;return n.isPlainObject(e)||(r=n.getGraphDiv(e)),(t=t||{}).format=t.format||"png",t.imageDataOnly=!0,new Promise((function(s,l){r&&r._snapshotInProgress&&l(new Error("Snapshotting already in progress.")),n.isIE()&&"svg"!==t.format&&l(new Error(o.MSG_IE_BAD_FORMAT)),r&&(r._snapshotInProgress=!0);var c=a(e,t),u=t.filename||e.fn||"newplot";u+="."+t.format,c.then((function(e){return r&&(r._snapshotInProgress=!1),i(e,u,t.format)})).then((function(e){s(e)})).catch((function(e){r&&(r._snapshotInProgress=!1),l(e)}))}))}},{"../lib":716,"../plot_api/to_image":757,"./filesaver":848,"./helpers":849}],848:[function(e,t,r){"use strict";var n=e("../lib"),a=e("./helpers");t.exports=function(e,t,r){var i=document.createElement("a"),o="download"in i;return new Promise((function(s,l){var c,u;if(n.isIE9orBelow()&&l(new Error("IE < 10 unsupported")),n.isSafari()){var d="svg"===r?",":";base64,";return a.octetStream(d+encodeURIComponent(e)),s(t)}return n.isIE()?(c=a.createBlob(e,"svg"),window.navigator.msSaveBlob(c,t),c=null,s(t)):o?(c=a.createBlob(e,r),u=a.createObjectURL(c),i.href=u,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),a.revokeObjectURL(u),c=null,s(t)):void l(new Error("download error"))}))}},{"../lib":716,"./helpers":849}],849:[function(e,t,r){"use strict";var n=e("../registry");r.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("gl2d")||e._has("mapbox"))?500:0},r.getRedrawFunc=function(e){return function(){var t=e._fullLayout||{};(!t._has||!t._has("polar"))&&e.data&&e.data[0]&&e.data[0].r||n.getComponentMethod("colorbar","draw")(e)}},r.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};var a=window.URL||window.webkitURL;r.createObjectURL=function(e){return a.createObjectURL(e)},r.revokeObjectURL=function(e){return a.revokeObjectURL(e)},r.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a<t;a++)n[a]=e.charCodeAt(a);return r}(window.atob(e));return new window.Blob([r],{type:"image/"+t})},r.octetStream=function(e){document.location.href="data:application/octet-stream"+e},r.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,r.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},{"../registry":845}],850:[function(e,t,r){"use strict";var n=e("./helpers"),a={getDelay:n.getDelay,getRedrawFunc:n.getRedrawFunc,clone:e("./cloneplot"),toSVG:e("./tosvg"),svgToImg:e("./svgtoimg"),toImage:e("./toimage"),downloadImage:e("./download")};t.exports=a},{"./cloneplot":846,"./download":847,"./helpers":849,"./svgtoimg":851,"./toimage":852,"./tosvg":853}],851:[function(e,t,r){"use strict";var n=e("../lib"),a=e("events").EventEmitter,i=e("./helpers");t.exports=function(e){var t=e.emitter||new a,r=new Promise((function(a,o){var s=window.Image,l=e.svg,c=e.format||"png";if(n.isIE()&&"svg"!==c){var u=new Error(i.MSG_IE_BAD_FORMAT);return o(u),e.promise?r:t.emit("error",u)}var d,p,h=e.canvas,f=e.scale||1,m=e.width||300,g=e.height||150,v=f*m,y=f*g,b=h.getContext("2d"),_=new s;"svg"===c||n.isIE9orBelow()||n.isSafari()?p=i.encodeSVG(l):(d=i.createBlob(l,"svg"),p=i.createObjectURL(d)),h.width=v,h.height=y,_.onload=function(){var r;switch(d=null,i.revokeObjectURL(p),"svg"!==c&&b.drawImage(_,0,0,v,y),c){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=p;break;default:var n="Image format is not jpeg, png, svg or webp.";if(o(new Error(n)),!e.promise)return t.emit("error",n)}a(r),e.promise||t.emit("success",r)},_.onerror=function(r){if(d=null,i.revokeObjectURL(p),o(r),!e.promise)return t.emit("error",r)},_.src=p}));return e.promise?r:t}},{"../lib":716,"./helpers":849,events:105}],852:[function(e,t,r){"use strict";var n=e("events").EventEmitter,a=e("../registry"),i=e("../lib"),o=e("./helpers"),s=e("./cloneplot"),l=e("./tosvg"),c=e("./svgtoimg");t.exports=function(e,t){var r=new n,u=s(e,{format:"png"}),d=u.gd;d.style.position="absolute",d.style.left="-5000px",document.body.appendChild(d);var p=o.getRedrawFunc(d);return a.call("plot",d,u.data,u.layout,u.config).then(p).then((function(){var e=o.getDelay(d._fullLayout);setTimeout((function(){var e=l(d),n=document.createElement("canvas");n.id=i.randstr(),(r=c({format:t.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:n,emitter:r,svg:e})).clean=function(){d&&document.body.removeChild(d)}}),e)})).catch((function(e){r.emit("error",e)})),r}},{"../lib":716,"../registry":845,"./cloneplot":846,"./helpers":849,"./svgtoimg":851,"./tosvg":853,events:105}],853:[function(e,t,r){"use strict";var n=e("d3"),a=e("../lib"),i=e("../components/drawing"),o=e("../components/color"),s=e("../constants/xmlns_namespaces"),l=/"/g,c=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");t.exports=function(e,t,r){var u,d=e._fullLayout,p=d._paper,h=d._toppaper,f=d.width,m=d.height;p.insert("rect",":first-child").call(i.setRect,0,0,f,m).call(o.fill,d.paper_bgcolor);var g=d._basePlotModules||[];for(u=0;u<g.length;u++){var v=g[u];v.toSVG&&v.toSVG(e)}if(h){var y=h.node().childNodes,b=Array.prototype.slice.call(y);for(u=0;u<b.length;u++){var _=b[u];_.childNodes.length&&p.node().appendChild(_)}}d._draggers&&d._draggers.remove(),p.node().style.background="",p.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each((function(){var e=n.select(this);if("hidden"!==this.style.visibility&&"none"!==this.style.display){e.style({visibility:null,display:null});var t=this.style.fontFamily;t&&-1!==t.indexOf('"')&&e.style("font-family",t.replace(l,"TOBESTRIPPED"))}else e.remove()})),p.selectAll(".point, .scatterpts, .legendfill>path, .legendlines>path, .cbfill").each((function(){var e=n.select(this),t=this.style.fill;t&&-1!==t.indexOf("url(")&&e.style("fill",t.replace(l,"TOBESTRIPPED"));var r=this.style.stroke;r&&-1!==r.indexOf("url(")&&e.style("stroke",r.replace(l,"TOBESTRIPPED"))})),"pdf"!==t&&"eps"!==t||p.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),p.node().setAttributeNS(s.xmlns,"xmlns",s.svg),p.node().setAttributeNS(s.xmlns,"xmlns:xlink",s.xlink),"svg"===t&&r&&(p.attr("width",r*f),p.attr("height",r*m),p.attr("viewBox","0 0 "+f+" "+m));var x=(new window.XMLSerializer).serializeToString(p.node());return x=(x=(x=function(e){var t=n.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,(function(e){return"&lt;"===e?"&#60;":"&rt;"===e?"&#62;":-1!==e.indexOf("<")||-1!==e.indexOf(">")?"":t.html(e).text()}));return t.remove(),r}(x)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(c,"'"),a.isIE()&&(x=(x=(x=x.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),x}},{"../components/color":591,"../components/drawing":612,"../constants/xmlns_namespaces":693,"../lib":716,d3:164}],854:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){for(var r=0;r<e.length;r++)e[r].i=r;n.mergeArray(t.text,e,"tx"),n.mergeArray(t.hovertext,e,"htx");var a=t.marker;if(a){n.mergeArray(a.opacity,e,"mo",!0),n.mergeArray(a.color,e,"mc");var i=a.line;i&&(n.mergeArray(i.color,e,"mlc"),n.mergeArrayCastPositive(i.width,e,"mlw"))}}},{"../../lib":716}],855:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../../components/colorscale/attributes"),s=e("../../plots/font_attributes"),l=e("./constants"),c=e("../../lib/extend").extendFlat,u=s({editType:"calc",arrayOk:!0,colorEditType:"style"}),d=c({},n.marker.line.width,{dflt:0}),p=c({width:d,editType:"calc"},o("marker.line")),h=c({line:p,editType:"calc"},o("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"}});t.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,texttemplate:i({editType:"plot"},{keys:l.eventDataKeys}),hovertext:n.hovertext,hovertemplate:a({},{keys:l.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"none",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:c({},u,{}),insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:c({},n.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:h,offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},selected:{marker:{opacity:n.selected.marker.opacity,color:n.selected.marker.color,editType:"style"},textfont:n.selected.textfont,editType:"style"},unselected:{marker:{opacity:n.unselected.marker.opacity,color:n.unselected.marker.color,editType:"style"},textfont:n.unselected.textfont,editType:"style"},r:n.r,t:n.t,_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/font_attributes":790,"../../plots/template_attributes":840,"../scatter/attributes":1118,"./constants":857}],856:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/calc"),o=e("./arrays_to_calcdata"),s=e("../scatter/calc_selection");t.exports=function(e,t){var r,l,c=n.getFromId(e,t.xaxis||"x"),u=n.getFromId(e,t.yaxis||"y");"h"===t.orientation?(r=c.makeCalcdata(t,"x"),l=u.makeCalcdata(t,"y")):(r=u.makeCalcdata(t,"y"),l=c.makeCalcdata(t,"x"));for(var d=Math.min(l.length,r.length),p=new Array(d),h=0;h<d;h++)p[h]={p:l[h],s:r[h]},t.ids&&(p[h].id=String(t.ids[h]));return a(t,"marker")&&i(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),a(t,"marker.line")&&i(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),o(p,t),s(p,t),p}},{"../../components/colorscale/calc":599,"../../components/colorscale/helpers":602,"../../plots/cartesian/axes":764,"../scatter/calc_selection":1120,"./arrays_to_calcdata":854}],857:[function(e,t,r){"use strict";t.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},{}],858:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib").isArrayOrTypedArray,i=e("../../constants/numerical").BADNUM,o=e("../../registry"),s=e("../../plots/cartesian/axes"),l=e("../../plots/cartesian/axis_ids").getAxisGroup,c=e("./sieve.js");function u(e,t,r,o,u){if(o.length){var _,x,w,k;switch(function(e,t){var r,i;for(r=0;r<t.length;r++){var o,s=t[r],l=s[0].trace,c="funnel"===l.type?l._base:l.base,u="h"===l.orientation?l.xcalendar:l.ycalendar,d="category"===e.type||"multicategory"===e.type?function(){return null}:e.d2c;if(a(c)){for(i=0;i<Math.min(c.length,s.length);i++)o=d(c[i],0,u),n(o)?(s[i].b=+o,s[i].hasB=1):s[i].b=0;for(;i<s.length;i++)s[i].b=0}else{o=d(c,0,u);var p=n(o);for(o=p?o:0,i=0;i<s.length;i++)s[i].b=o,p&&(s[i].hasB=1)}}}(r,o),u.mode){case"overlay":d(t,r,o,u);break;case"group":for(_=[],x=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.offset?x.push(k):_.push(k);x.length&&function(e,t,r,n,a){var o=new c(n,{sepNegVal:!1,overlapNoMerge:!a.norm});(function(e,t,r,n){for(var a=e._fullLayout,i=r.positions,o=r.distinctPositions,s=r.minDiff,c=r.traces,u=c.length,d=i.length!==o.length,p=s*(1-n.gap),g=l(a,t._id)+c[0][0].trace.orientation,v=a._alignmentOpts[g]||{},y=0;y<u;y++){var b,_,x=c[y],w=x[0].trace,k=v[w.alignmentgroup]||{},M=Object.keys(k.offsetGroups||{}).length,T=(b=M?p/M:d?p/u:p)*(1-(n.groupgap||0));_=M?((2*w._offsetIndex+1-M)*b-T)/2:d?((2*y+1-u)*b-T)/2:-T/2;var C=x[0].t;C.barwidth=T,C.poffset=_,C.bargroupwidth=p,C.bardelta=s}r.binWidth=c[0][0].t.barwidth/100,h(r),f(t,r),m(t,r,d)})(e,t,o,a),function(e){for(var t=e.traces,r=0;r<t.length;r++){var n=t[r];if(void 0===n[0].trace.base)for(var a=new c([n],{sepNegVal:!0,overlapNoMerge:!0}),o=0;o<n.length;o++){var s=n[o];if(s.p!==i){var l=a.put(s.p,s.b+s.s);l&&(s.b=l)}}}}(o),a.norm?(v(o),y(r,o,a)):g(r,o)}(e,t,r,x,u),_.length&&d(t,r,_,u);break;case"stack":case"relative":for(_=[],x=[],w=0;w<o.length;w++)void 0===(k=o[w])[0].trace.base?x.push(k):_.push(k);x.length&&function(e,t,r,n,a){var o=new c(n,{sepNegVal:"relative"===a.mode,overlapNoMerge:!(a.norm||"stack"===a.mode||"relative"===a.mode)});p(t,o,a),function(e,t,r){var n,a,o,l,c,u,d=b(e),p=t.traces;for(l=0;l<p.length;l++)if(n=p[l],"funnel"===(a=n[0].trace).type)for(c=0;c<n.length;c++)(u=n[c]).s!==i&&t.put(u.p,-.5*u.s);for(l=0;l<p.length;l++){n=p[l],a=n[0].trace,o="funnel"===a.type;var h=[];for(c=0;c<n.length;c++)if((u=n[c]).s!==i){var f;f=o?u.s:u.s+u.b;var m=t.put(u.p,f),g=m+f;u.b=m,u[d]=g,r.norm||(h.push(g),u.hasB&&h.push(m))}r.norm||(a._extremes[e._id]=s.findExtremes(e,h,{tozero:!0,padded:!0}))}}(r,o,a);for(var l=0;l<n.length;l++)for(var u=n[l],d=0;d<u.length;d++){var h=u[d];h.s!==i&&h.b+h.s===o.get(h.p,h.s)&&(h._outmost=!0)}a.norm&&y(r,o,a)}(0,t,r,x,u),_.length&&d(t,r,_,u)}!function(e,t){var r,a,i,o=b(t),s={},l=1/0,c=-1/0;for(r=0;r<e.length;r++)for(i=e[r],a=0;a<i.length;a++){var u=i[a].p;n(u)&&(l=Math.min(l,u),c=Math.max(c,u))}var d=1e4/(c-l),p=s.round=function(e){return String(Math.round(d*(e-l)))};for(r=0;r<e.length;r++){(i=e[r])[0].t.extents=s;var h=i[0].t.poffset,f=Array.isArray(h);for(a=0;a<i.length;a++){var m=i[a],g=m[o]-m.w/2;if(n(g)){var v=m[o]+m.w/2,y=p(m.p);s[y]?s[y]=[Math.min(g,s[y][0]),Math.max(v,s[y][1])]:s[y]=[g,v]}m.p0=m.p+(f?h[a]:h),m.p1=m.p0+m.w,m.s0=m.b,m.s1=m.s0+m.s}}}(o,t)}}function d(e,t,r,n){for(var a=0;a<r.length;a++){var i=r[a],o=new c([i],{sepNegVal:!1,overlapNoMerge:!n.norm});p(e,o,n),n.norm?(v(o),y(t,o,n)):g(t,o)}}function p(e,t,r){for(var n=t.minDiff,a=t.traces,i=n*(1-r.gap),o=i*(1-(r.groupgap||0)),s=-o/2,l=0;l<a.length;l++){var c=a[l][0].t;c.barwidth=o,c.poffset=s,c.bargroupwidth=i,c.bardelta=n}t.binWidth=a[0][0].t.barwidth/100,h(t),f(e,t),m(e,t)}function h(e){var t,r,i=e.traces;for(t=0;t<i.length;t++){var o,s=i[t],l=s[0],c=l.trace,u=l.t,d=c._offset||c.offset,p=u.poffset;if(a(d)){for(o=Array.prototype.slice.call(d,0,s.length),r=0;r<o.length;r++)n(o[r])||(o[r]=p);for(r=o.length;r<s.length;r++)o.push(p);u.poffset=o}else void 0!==d&&(u.poffset=d);var h=c._width||c.width,f=u.barwidth;if(a(h)){var m=Array.prototype.slice.call(h,0,s.length);for(r=0;r<m.length;r++)n(m[r])||(m[r]=f);for(r=m.length;r<s.length;r++)m.push(f);if(u.barwidth=m,void 0===d){for(o=[],r=0;r<s.length;r++)o.push(p+(f-m[r])/2);u.poffset=o}}else void 0!==h&&(u.barwidth=h,void 0===d&&(u.poffset=p+(f-h)/2))}}function f(e,t){for(var r=t.traces,n=b(e),a=0;a<r.length;a++)for(var i=r[a],o=i[0].t,s=o.poffset,l=Array.isArray(s),c=o.barwidth,u=Array.isArray(c),d=0;d<i.length;d++){var p=i[d],h=p.w=u?c[d]:c;p[n]=p.p+(l?s[d]:s)+h/2}}function m(e,t,r){var n=t.traces,a=t.minDiff/2;s.minDtick(e,t.minDiff,t.distinctPositions[0],r);for(var i=0;i<n.length;i++){var o,l,c,u,d=n[i],p=d[0],h=p.trace,f=[];for(u=0;u<d.length;u++)l=(o=d[u]).p-a,c=o.p+a,f.push(l,c);if(h.width||h.offset){var m=p.t,g=m.poffset,v=m.barwidth,y=Array.isArray(g),b=Array.isArray(v);for(u=0;u<d.length;u++){o=d[u];var _=y?g[u]:g,x=b?v[u]:v;c=(l=o.p+_)+x,f.push(l,c)}}h._extremes[e._id]=s.findExtremes(e,f,{padded:!1})}}function g(e,t){for(var r=t.traces,n=b(e),a=0;a<r.length;a++){for(var i=r[a],o=i[0].trace,l=[],c=!0,u=0;u<i.length;u++){var d=i[u],p=d.b,h=p+d.s;d[n]=h,l.push(h),d.hasB&&l.push(p),d.hasB&&d.b>0&&d.s>0||(c=!1)}o._extremes[e._id]=s.findExtremes(e,l,{tozero:!c,padded:!0})}}function v(e){for(var t=e.traces,r=0;r<t.length;r++)for(var n=t[r],a=0;a<n.length;a++){var o=n[a];o.s!==i&&e.put(o.p,o.b+o.s)}}function y(e,t,r){var a=t.traces,o=b(e),l="fraction"===r.norm?1:100,c=l/1e9,u=e.l2c(e.c2l(0)),d="stack"===r.mode?l:u;function p(t){return n(e.c2l(t))&&(t<u-c||t>d+c||!n(u))}for(var h=0;h<a.length;h++){for(var f=a[h],m=f[0].trace,g=[],v=!0,y=!1,_=0;_<f.length;_++){var x=f[_];if(x.s!==i){var w=Math.abs(l/t.get(x.p,x.s));x.b*=w,x.s*=w;var k=x.b,M=k+x.s;x[o]=M,g.push(M),y=y||p(M),x.hasB&&(g.push(k),y=y||p(k)),x.hasB&&x.b>0&&x.s>0||(v=!1)}}m._extremes[e._id]=s.findExtremes(e,g,{tozero:!v,padded:y})}}function b(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,s=e.calcdata,l=[],c=[],d=0;d<i.length;d++){var p=i[d];!0===p.visible&&o.traceIs(p,"bar")&&p.xaxis===r._id&&p.yaxis===n._id&&("h"===p.orientation?l.push(s[d]):c.push(s[d]))}var h={mode:a.barmode,norm:a.barnorm,gap:a.bargap,groupgap:a.bargroupgap};u(e,r,n,c,h),u(e,n,r,l,h)},setGroupPositions:u}},{"../../constants/numerical":692,"../../lib":716,"../../plots/cartesian/axes":764,"../../plots/cartesian/axis_ids":767,"../../registry":845,"./sieve.js":868,"fast-isnumeric":227}],859:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../../registry"),o=e("../scatter/xy_defaults"),s=e("./style_defaults"),l=e("../../plots/cartesian/axis_ids").getAxisGroup,c=e("./attributes"),u=n.coerceFont;function d(e,t,r,n){var a=t.orientation,i=t[{v:"x",h:"y"}[a]+"axis"],o=l(r,i)+a,s=r._alignmentOpts||{},c=n("alignmentgroup"),u=s[o];u||(u=s[o]={});var d=u[c];d?d.traces.push(t):d=u[c]={traces:[t],alignmentIndex:Object.keys(u).length,offsetGroups:{}};var p=n("offsetgroup"),h=d.offsetGroups,f=h[p];p&&(f||(f=h[p]={offsetIndex:Object.keys(h).length}),t._offsetIndex=f.offsetIndex)}function p(e,t,r,a,i,o){var s=!(!1===(o=o||{}).moduleHasSelected),l=!(!1===o.moduleHasUnselected),c=!(!1===o.moduleHasConstrain),d=!(!1===o.moduleHasCliponaxis),p=!(!1===o.moduleHasTextangle),h=!(!1===o.moduleHasInsideanchor),f=Array.isArray(i)||"auto"===i,m=f||"inside"===i,g=f||"outside"===i;if(m||g){var v=u(a,"textfont",r.font),y=n.extendFlat({},v);!(e.textfont&&e.textfont.color)&&delete y.color,u(a,"insidetextfont",y),g&&u(a,"outsidetextfont",v),s&&a("selected.textfont.color"),l&&a("unselected.textfont.color"),c&&a("constraintext"),d&&a("cliponaxis"),p&&a("textangle"),a("texttemplate")}m&&h&&a("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,l){function u(r,a){return n.coerce(e,t,c,r,a)}if(o(e,t,l,u)){u("orientation",t.x&&!t.y?"h":"v"),u("base"),u("offset"),u("width"),u("text"),u("hovertext"),u("hovertemplate");var d=u("textposition");p(e,0,l,u,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),s(e,t,u,r,l);var h=(t.marker.line||{}).color,f=i.getComponentMethod("errorbars","supplyDefaults");f(e,t,h||a.defaultLine,{axis:"y"}),f(e,t,h||a.defaultLine,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,u)}else t.visible=!1},crossTraceDefaults:function(e,t){var r;function a(e){return n.coerce(r._input,r,c,e)}if("group"===t.barmode)for(var i=0;i<e.length;i++)"bar"===(r=e[i]).type&&(r._input,d(0,r,t,a))},handleGroupingDefaults:d,handleText:p}},{"../../components/color":591,"../../lib":716,"../../plots/cartesian/axis_ids":767,"../../registry":845,"../scatter/xy_defaults":1144,"./attributes":855,"./style_defaults":870}],860:[function(e,t,r){"use strict";t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},{}],861:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("tinycolor2"),i=e("../../lib").isArrayOrTypedArray;r.coerceString=function(e,t,r){if("string"==typeof t){if(t||!e.noBlank)return t}else if(("number"==typeof t||!0===t)&&!e.strict)return String(t);return void 0!==r?r:e.dflt},r.coerceNumber=function(e,t,r){if(n(t)){t=+t;var a=e.min,i=e.max;if(!(void 0!==a&&t<a||void 0!==i&&t>i))return t}return void 0!==r?r:e.dflt},r.coerceColor=function(e,t,r){return a(t).isValid()?t:void 0!==r?r:e.dflt},r.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},r.getValue=function(e,t){var r;return Array.isArray(e)?t<e.length&&(r=e[t]):r=e,r},r.getLineWidth=function(e,t){return 0<t.mlw?t.mlw:i(e.marker.line.width)?0:e.marker.line.width}},{"../../lib":716,"fast-isnumeric":227,tinycolor2:535}],862:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../registry"),i=e("../../components/color"),o=e("../../lib").fillText,s=e("./helpers").getLineWidth,l=e("../../plots/cartesian/axes").hoverLabelText;function c(e,t,r,a){var i,s,c,u,d,p,h,f=e.cd,m=f[0].trace,g=f[0].t,v="closest"===a,y="waterfall"===m.type,b=e.maxHoverDistance,_=e.maxSpikeDistance;function x(e){return e[c]-e.w/2}function w(e){return e[c]+e.w/2}var k=v?x:function(e){return Math.min(x(e),e.p-g.bardelta/2)},M=v?w:function(e){return Math.max(w(e),e.p+g.bardelta/2)};function T(e,t){return n.inbox(e-i,t-i,b+Math.min(1,Math.abs(t-e)/h)-1)}function C(e){return T(k(e),M(e))}function S(e){var t=s,r=e.b,a=e[u];return y&&(a+=Math.abs(e.rawS||0)),n.inbox(r-t,a-t,b+(a-t)/(a-r)-1)}"h"===m.orientation?(i=r,s=t,c="y",u="x",d=S,p=C):(i=t,s=r,c="x",u="y",p=S,d=C);var L=e[c+"a"],A=e[u+"a"];h=Math.abs(L.r2c(L.range[1])-L.r2c(L.range[0]));var E=n.getDistanceFunction(a,d,p,(function(e){return(d(e)+p(e))/2}));if(n.getClosest(f,E,e),!1!==e.index){v||(k=function(e){return Math.min(x(e),e.p-g.bargroupwidth/2)},M=function(e){return Math.max(w(e),e.p+g.bargroupwidth/2)});var D=f[e.index],I=m.base?D.b+D.s:D.s;e[u+"0"]=e[u+"1"]=A.c2p(D[u],!0),e[u+"LabelVal"]=I;var P=g.extents[g.extents.round(D.p)];return e[c+"0"]=L.c2p(v?k(D):P[0],!0),e[c+"1"]=L.c2p(v?M(D):P[1],!0),e[c+"LabelVal"]=D.p,e.labelLabel=l(L,e[c+"LabelVal"]),e.valueLabel=l(A,e[u+"LabelVal"]),e.spikeDistance=(S(D)+function(e){return T(x(e),w(e))}(D))/2+_-b,e[c+"Spike"]=L.c2p(D.p,!0),o(D,m,e),e.hovertemplate=m.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=s(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}t.exports={hoverPoints:function(e,t,r,n){var i=c(e,t,r,n);if(i){var o=i.cd,s=o[0].trace,l=o[i.index];return i.color=u(s,l),a.getComponentMethod("errorbars","hoverInfo")(l,s,i),[i]}},hoverOnBars:c,getTraceColor:u}},{"../../components/color":591,"../../components/fx":629,"../../lib":716,"../../plots/cartesian/axes":764,"../../registry":845,"./helpers":861}],863:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc").crossTraceCalc,colorbar:e("../scatter/marker_colorbar"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"bar",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":775,"../scatter/marker_colorbar":1136,"./arrays_to_calcdata":854,"./attributes":855,"./calc":856,"./cross_trace_calc":858,"./defaults":859,"./event_data":860,"./hover":862,"./layout_attributes":864,"./layout_defaults":865,"./plot":866,"./select":867,"./style":869}],864:[function(e,t,r){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],865:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../plots/cartesian/axes"),i=e("../../lib"),o=e("./layout_attributes");t.exports=function(e,t,r){function s(r,n){return i.coerce(e,t,o,r,n)}for(var l=!1,c=!1,u=!1,d={},p=s("barmode"),h=0;h<r.length;h++){var f=r[h];if(n.traceIs(f,"bar")&&f.visible){if(l=!0,"group"===p){var m=f.xaxis+f.yaxis;d[m]&&(u=!0),d[m]=!0}f.visible&&"histogram"===f.type&&"category"!==a.getFromId({_fullLayout:t},f["v"===f.orientation?"xaxis":"yaxis"]).type&&(c=!0)}}l?("overlay"!==p&&s("barnorm"),s("bargap",c&&!u?0:.2),s("bargroupgap")):delete t.barmode}},{"../../lib":716,"../../plots/cartesian/axes":764,"../../registry":845,"./layout_attributes":864}],866:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../lib/svg_text_utils"),s=e("../../components/color"),l=e("../../components/drawing"),c=e("../../registry"),u=e("../../plots/cartesian/axes").tickText,d=e("./style"),p=e("./helpers"),h=e("./constants"),f=e("./attributes"),m=f.text,g=f.textposition,v=e("../../components/fx/helpers").appendArrayPointValue,y=h.TEXTPAD;function b(e){return e.id}function _(e){if(e.ids)return b}function x(e,t){return e<t?1:-1}function w(e,t,r){var n;return k(t)?(r&&(n=r()),e.transition().duration(t.duration).ease(t.easing).each("end",(function(){n&&n()})).each("interrupt",(function(){n&&n()}))):e}function k(e){return e&&e.duration>0}function M(e){return"auto"===e?0:e}function T(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,c=i.anchor||0,u=a.width,d=a.height,p=Math.abs(t-e),h=Math.abs(n-r),f=p>2*y&&h>2*y?y:0;p-=2*f,h-=2*f;var m=!1;if(!("auto"===l)||u<=p&&d<=h||!(u>p||d>h)||(u>h||d>p)&&u<d==p<h||(m=!0),m){var g=h;h=p,p=g}var v=M(l),b=Math.abs(Math.sin(Math.PI/180*v)),_=Math.abs(Math.cos(Math.PI/180*v)),w=Math.max(p*_,h*b),k=Math.max(p*b,h*_),T=s?Math.min(w/u,k/d):Math.max(_,b);T=Math.min(1,T);var C=(e+t)/2,S=(r+n)/2;return"middle"!==c&&(f+=.5*(T*(o!==m?d:u)*b+T*(o!==m?u:d)*_),o?(f*=x(e,t),C="start"===c?e+f:t-f):(f*=x(r,n),S="start"===c?r+f:n-f)),m&&(v+=90),{textX:(a.left+a.right)/2,textY:(a.top+a.bottom)/2,targetX:C,targetY:S,scale:T,rotate:v}}function C(e,t,r,n,a,i){var o,s=!!i.isHorizontal,l=!!i.constrained,c=i.angle||0,u=a.width,d=a.height,p=Math.abs(t-e),h=Math.abs(n-r);o=s?h>2*y?y:0:p>2*y?y:0;var f=1;l&&(f=s?Math.min(1,h/d):Math.min(1,p/u));var m=M(c);o+=.5*(f*(s?d:u)*Math.abs(Math.sin(Math.PI/180*m))+f*(s?u:d)*Math.abs(Math.cos(Math.PI/180*m)));var g=(e+t)/2,v=(r+n)/2;return s?g=t-o*x(t,e):v=n+o*x(r,n),{textX:(a.left+a.right)/2,textY:(a.top+a.bottom)/2,targetX:g,targetY:v,scale:f,rotate:m}}t.exports={plot:function(e,t,r,h,f,b){var M=t.xaxis,S=t.yaxis,L=e._fullLayout;f||(f={mode:L.barmode,norm:L.barmode,gap:L.bargap,groupgap:L.bargroupgap});var A=i.makeTraceGroups(h,r,"trace bars").each((function(r){var c=n.select(this),h=r[0].trace,L="waterfall"===h.type,A="funnel"===h.type,E="bar"===h.type||A,D=0;L&&h.connector.visible&&"between"===h.connector.mode&&(D=h.connector.line.width/2);var I="h"===h.orientation,P=i.ensureSingle(c,"g","points"),O=_(h),R=P.selectAll("g.point").data(i.identity,O);R.enter().append("g").classed("point",!0),R.exit().remove(),R.each((function(c,_){var L,A,P=n.select(this),O=function(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),n?[a,i]:[i,a]}(c,M,S,I),R=O[0][0],F=O[0][1],z=O[1][0],N=O[1][1],j=!(R!==F&&z!==N&&a(R)&&a(F)&&a(z)&&a(N));if(j&&E&&p.getLineWidth(h,c)&&(I?F-R==0:N-z==0)&&(j=!1),c.isBlank=j,j&&I&&(F=R),j&&!I&&(N=z),D&&!j&&(I?(R-=x(R,F)*D,F+=x(R,F)*D):(z-=x(z,N)*D,N+=x(z,N)*D)),"waterfall"===h.type){if(!j){var B=h[c.dir].marker;L=B.line.width,A=B.color}}else L=p.getLineWidth(h,c),A=c.mc||h.marker.color;var Y=n.round(L/2%1,2);function H(e){return 0===f.gap&&0===f.groupgap?n.round(Math.round(e)-Y,2):e}if(!e._context.staticPlot){var V=s.opacity(A)<1||L>.01?H:function(e,t){return Math.abs(e-t)>=2?H(e):e>t?Math.ceil(e):Math.floor(e)};R=V(R,F),F=V(F,R),z=V(z,N),N=V(N,z)}var U=w(i.ensureSingle(P,"path"),f,b);if(U.style("vector-effect","non-scaling-stroke").attr("d","M"+R+","+z+"V"+N+"H"+F+"V"+z+"Z").call(l.setClipUrl,t.layerClipId,e),k(f)){var W=l.makePointStyleFns(h);l.singlePointStyle(c,U,h,W,e)}!function(e,t,r,n,a,s,c,h,f,b,_){var x,k=t.xaxis,M=t.yaxis,S=e._fullLayout;function L(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+x,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,e)}var A=n[0].trace,E="h"===A.orientation,D=function(e,t,r,n,a){var o,s=t[0].trace;return o=s.texttemplate?function(e,t,r,n,a){var o=t[0].trace,s=i.castOption(o,r,"texttemplate");if(!s)return"";var l,c,d,p,h="waterfall"===o.type,f="funnel"===o.type;function m(e){return u(p,+e,!0).text}"h"===o.orientation?(l="y",c=a,d="x",p=n):(l="x",c=n,d="y",p=a);var g,y=t[r],b={};b.label=y.p,b.labelLabel=b[l+"Label"]=(g=y.p,u(c,g,!0).text);var _=i.castOption(o,y.i,"text");(0===_||_)&&(b.text=_),b.value=y.s,b.valueLabel=b[d+"Label"]=m(y.s);var x={};v(x,o,y.i),h&&(b.delta=+y.rawS||y.s,b.deltaLabel=m(b.delta),b.final=y.v,b.finalLabel=m(b.final),b.initial=b.final-b.delta,b.initialLabel=m(b.initial)),f&&(b.value=y.s,b.valueLabel=m(b.value),b.percentInitial=y.begR,b.percentInitialLabel=i.formatPercent(y.begR),b.percentPrevious=y.difR,b.percentPreviousLabel=i.formatPercent(y.difR),b.percentTotal=y.sumR,b.percenTotalLabel=i.formatPercent(y.sumR));var w=i.castOption(o,y.i,"customdata");return w&&(b.customdata=w),i.texttemplateString(s,b,e._d3locale,x,b,o._meta||{})}(e,t,r,n,a):s.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function c(e){return u(o?r:n,+e,!0).text}var d,p,h=a.textinfo,f=e[t],m=h.split("+"),g=[],v=function(e){return-1!==m.indexOf(e)};if(v("label")&&g.push((p=e[t].p,u(o?n:r,p,!0).text)),v("text")&&(0===(d=i.castOption(a,f.i,"text"))||d)&&g.push(d),s){var y=+f.rawS||f.s,b=f.v,_=b-y;v("initial")&&g.push(c(_)),v("delta")&&g.push(c(y)),v("final")&&g.push(c(b))}if(l){v("value")&&g.push(c(f.s));var x=0;v("percent initial")&&x++,v("percent previous")&&x++,v("percent total")&&x++;var w=x>1;v("percent initial")&&(d=i.formatPercent(f.begR),w&&(d+=" of initial"),g.push(d)),v("percent previous")&&(d=i.formatPercent(f.difR),w&&(d+=" of previous"),g.push(d)),v("percent total")&&(d=i.formatPercent(f.sumR),w&&(d+=" of total"),g.push(d))}return g.join("<br>")}(t,r,n,a):p.getValue(s.text,r),p.coerceString(m,o)}(S,n,a,k,M);x=function(e,t){var r=p.getValue(e.textposition,t);return p.coerceEnumerated(g,r)}(A,a);var I="stack"===b.mode||"relative"===b.mode,P=n[a],O=!I||P._outmost;if(D&&"none"!==x&&(!P.isBlank&&s!==c&&h!==f||"auto"!==x&&"inside"!==x)){var R=S.font,F=d.getBarColor(n[a],A),z=d.getInsideTextFont(A,a,R,F),N=d.getOutsideTextFont(A,a,R),j=r.datum();E?"log"===k.type&&j.s0<=0&&(s=k.range[0]<k.range[1]?0:k._length):"log"===M.type&&j.s0<=0&&(h=M.range[0]<M.range[1]?M._length:0);var B,Y,H,V,U,W,G=Math.abs(c-s)-2*y,q=Math.abs(f-h)-2*y;if("outside"===x&&(O||P.hasB||(x="inside")),"auto"===x)if(O){x="inside",B=L(r,D,z),Y=l.bBox(B.node()),H=Y.width,V=Y.height;var K=H<=G&&V<=q,X=H<=q&&V<=G,Z=E?G>=H*(q/V):q>=V*(G/H);H>0&&V>0&&(K||X||Z)?x="inside":(x="outside",B.remove(),B=null)}else x="inside";if(!B){var J=(B=L(r,D,"outside"===x?N:z)).attr("transform");if(B.attr("transform",""),Y=l.bBox(B.node()),H=Y.width,V=Y.height,B.attr("transform",J),H<=0||V<=0)return void B.remove()}"outside"===x?(W="both"===A.constraintext||"outside"===A.constraintext,U=i.getTextTransform(C(s,c,h,f,Y,{isHorizontal:E,constrained:W,angle:A.textangle}))):(W="both"===A.constraintext||"inside"===A.constraintext,U=i.getTextTransform(T(s,c,h,f,Y,{isHorizontal:E,constrained:W,angle:A.textangle,anchor:A.insidetextanchor}))),w(B,b,_).attr("transform",U)}else r.select("text").remove()}(e,t,P,r,_,R,F,z,N,f,b),t.layerClipId&&l.hideOutsideRangePoint(c,P.select("text"),M,S,h.xcalendar,h.ycalendar)}));var F=!1===h.cliponaxis;l.setClipUrl(c,F?null:t.layerClipId,e)}));c.getComponentMethod("errorbars","plot")(e,A,t,f)},toMoveInsideBar:T,toMoveOutsideBar:C}},{"../../components/color":591,"../../components/drawing":612,"../../components/fx/helpers":626,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../registry":845,"./attributes":855,"./constants":857,"./helpers":861,"./style":869,d3:164,"fast-isnumeric":227}],867:[function(e,t,r){"use strict";function n(e,t,r,n,a){var i=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return a?[(i+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(i+o)/2,l]}t.exports=function(e,t){var r,a=e.cd,i=e.xaxis,o=e.yaxis,s=a[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===t)for(r=0;r<a.length;r++)a[r].selected=0;else for(r=0;r<a.length;r++){var d=a[r],p="ct"in d?d.ct:n(d,i,o,c,l);t.contains(p,!1,r,e)?(u.push({pointNumber:r,x:i.c2d(d.x),y:o.c2d(d.y)}),d.selected=1):d.selected=0}return u}},{}],868:[function(e,t,r){"use strict";t.exports=i;var n=e("../../lib").distinctVals,a=e("../../constants/numerical").BADNUM;function i(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=[],o=0;o<e.length;o++){for(var s=e[o],l=0;l<s.length;l++){var c=s[l];c.p!==a&&i.push(c.p)}s[0]&&s[0].width1&&(r=Math.min(s[0].width1,r))}this.positions=i;var u=n(i);this.distinctPositions=u.vals,1===u.vals.length&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(u.minDiff,r),this.binWidth=this.minDiff,this.bins={}}i.prototype.put=function(e,t){var r=this.getLabel(e,t),n=this.bins[r]||0;return this.bins[r]=n+t,n},i.prototype.get=function(e,t){var r=this.getLabel(e,t);return this.bins[r]||0},i.prototype.getLabel=function(e,t){return(t<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?e:Math.round(e/this.binWidth))}},{"../../constants/numerical":692,"../../lib":716}],869:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/color"),i=e("../../components/drawing"),o=e("../../lib"),s=e("../../registry"),l=e("./attributes"),c=l.textfont,u=l.insidetextfont,d=l.outsidetextfont,p=e("./helpers");function h(e,t,r){i.pointStyle(e.selectAll("path"),t,r),f(e,t,r)}function f(e,t,r){e.selectAll("text").each((function(e){var a=n.select(this),o=m(a,e,t,r);i.font(a,o)}))}function m(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=_(t,r);i=v(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=y(r,t.i,a));return i}function g(e,t,r){return b(c,e.textfont,t,r)}function v(e,t,r,n){var i=g(e,t,r);return(void 0===e._input.textfont||void 0===e._input.textfont.color||Array.isArray(e.textfont.color)&&void 0===e.textfont.color[t])&&(i={color:a.contrast(n),family:i.family,size:i.size}),b(u,e.insidetextfont,t,i)}function y(e,t,r){var n=g(e,t,r);return b(d,e.outsidetextfont,t,n)}function b(e,t,r,n){t=t||{};var a=p.getValue(t.family,r),i=p.getValue(t.size,r),o=p.getValue(t.color,r);return{family:p.coerceString(e.family,a,n.family),size:p.coerceNumber(e.size,i,n.size),color:p.coerceColor(e.color,o,n.color)}}function _(e,t){return"waterfall"===t.type?t[e.dir].marker.color:e.mc||t.marker.color}t.exports={style:function(e){var t=n.select(e).selectAll("g.barlayer").selectAll("g.trace"),r=t.size(),a=e._fullLayout;t.style("opacity",(function(e){return e[0].trace.opacity})).each((function(e){("stack"===a.barmode&&r>1||0===a.bargap&&0===a.bargroupgap&&!e[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){h(n.select(this),t[0].trace,e)})),s.getComponentMethod("errorbars","style")(t)},styleTextPoints:f,styleOnSelect:function(e,t,r){var a=t[0].trace;a.selectedpoints?function(e,t,r){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,r){e.each((function(e){var a,s=n.select(this);if(e.selected){a=o.extendFlat({},m(s,e,t,r));var l=t.selected.textfont&&t.selected.textfont.color;l&&(a.color=l),i.font(s,a)}else i.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,r)}(r,a,e):(h(r,a,e),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:v,getOutsideTextFont:y,getBarColor:_}},{"../../components/color":591,"../../components/drawing":612,"../../lib":716,"../../registry":845,"./attributes":855,"./helpers":861,d3:164}],870:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults");t.exports=function(e,t,r,o,s){r("marker.color",o),a(e,"marker")&&i(e,t,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),a(e,"marker.line")&&i(e,t,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":591,"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602}],871:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../lib/extend").extendFlat,i=e("../scatterpolar/attributes"),o=e("../bar/attributes");t.exports={r:i.r,theta:i.theta,r0:i.r0,dr:i.dr,theta0:i.theta0,dtheta:i.dtheta,thetaunit:i.thetaunit,base:a({},o.base,{}),offset:a({},o.offset,{}),width:a({},o.width,{}),text:a({},o.text,{}),hovertext:a({},o.hovertext,{}),marker:o.marker,hoverinfo:i.hoverinfo,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{"../../lib/extend":707,"../../plots/template_attributes":840,"../bar/attributes":855,"../scatterpolar/attributes":1190}],872:[function(e,t,r){"use strict";var n=e("../../components/colorscale/helpers").hasColorscale,a=e("../../components/colorscale/calc"),i=e("../bar/arrays_to_calcdata"),o=e("../bar/cross_trace_calc").setGroupPositions,s=e("../scatter/calc_selection"),l=e("../../registry").traceIs,c=e("../../lib").extendFlat;t.exports={calc:function(e,t){for(var r=e._fullLayout,o=t.subplot,l=r[o].radialaxis,c=r[o].angularaxis,u=l.makeCalcdata(t,"r"),d=c.makeCalcdata(t,"theta"),p=t._length,h=new Array(p),f=u,m=d,g=0;g<p;g++)h[g]={p:m[g],s:f[g]};function v(e){var r=t[e];void 0!==r&&(t["_"+e]=Array.isArray(r)?c.makeCalcdata(t,e):c.d2c(r,t.thetaunit))}return"linear"===c.type&&(v("width"),v("offset")),n(t,"marker")&&a(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),n(t,"marker.line")&&a(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),i(h,t),s(h,t),h},crossTraceCalc:function(e,t,r){for(var n=e.calcdata,a=[],i=0;i<n.length;i++){var s=n[i],u=s[0].trace;!0===u.visible&&l(u,"bar")&&u.subplot===r&&a.push(s)}var d=c({},t.radialaxis,{_id:"x"}),p=t.angularaxis;o(e,p,d,a,{mode:t.barmode,norm:t.barnorm,gap:t.bargap,groupgap:t.bargroupgap})}}},{"../../components/colorscale/calc":599,"../../components/colorscale/helpers":602,"../../lib":716,"../../registry":845,"../bar/arrays_to_calcdata":854,"../bar/cross_trace_calc":858,"../scatter/calc_selection":1120}],873:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatterpolar/defaults").handleRThetaDefaults,i=e("../bar/style_defaults"),o=e("./attributes");t.exports=function(e,t,r,s){function l(r,a){return n.coerce(e,t,o,r,a)}a(e,t,s,l)?(l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),i(e,t,l,r,s),n.coerceSelectionMarkerOpacity(t,l)):t.visible=!1}},{"../../lib":716,"../bar/style_defaults":870,"../scatterpolar/defaults":1192,"./attributes":871}],874:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../lib"),i=e("../bar/hover").getTraceColor,o=a.fillText,s=e("../scatterpolar/hover").makeHoverPointText,l=e("../../plots/polar/helpers").isPtInsidePolygon;t.exports=function(e,t,r){var c=e.cd,u=c[0].trace,d=e.subplot,p=d.radialAxis,h=d.angularAxis,f=d.vangles,m=f?l:a.isPtInsideSector,g=e.maxHoverDistance,v=h._period||2*Math.PI,y=Math.abs(p.g2p(Math.sqrt(t*t+r*r))),b=Math.atan2(r,t);if(p.range[0]>p.range[1]&&(b+=Math.PI),n.getClosest(c,(function(e){return m(y,b,[e.rp0,e.rp1],[e.thetag0,e.thetag1],f)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/v)-1+(e.rp1-y)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var _=c[e.index];e.x0=e.x1=_.ct[0],e.y0=e.y1=_.ct[1];var x=a.extendFlat({},_,{r:_.s,theta:_.p});return o(_,u,e),s(x,u,d,e),e.hovertemplate=u.hovertemplate,e.color=i(u,_),e.xLabelVal=e.yLabelVal=void 0,_.s<0&&(e.idealAlign="left"),[e]}}},{"../../components/fx":629,"../../lib":716,"../../plots/polar/helpers":827,"../bar/hover":862,"../scatterpolar/hover":1194}],875:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"barpolar",basePlotModule:e("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("../scatterpolar/format_labels"),style:e("../bar/style").style,styleOnSelect:e("../bar/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../bar/select"),meta:{}}},{"../../plots/polar":828,"../bar/select":867,"../bar/style":869,"../scatter/marker_colorbar":1136,"../scatterpolar/format_labels":1193,"./attributes":871,"./calc":872,"./defaults":873,"./hover":874,"./layout_attributes":876,"./layout_defaults":877,"./plot":878}],876:[function(e,t,r){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],877:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r){var i,o={};function s(r,o){return n.coerce(e[i]||{},t[i],a,r,o)}for(var l=0;l<r.length;l++){var c=r[l];"barpolar"===c.type&&!0===c.visible&&(o[i=c.subplot]||(s("barmode"),s("bargap"),o[i]=1))}}},{"../../lib":716,"./layout_attributes":876}],878:[function(e,t,r){"use strict";var n=e("d3"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../components/drawing"),s=e("../../plots/polar/helpers");t.exports=function(e,t,r){var l=t.xaxis,c=t.yaxis,u=t.radialAxis,d=t.angularAxis,p=function(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,a,o,l){var c,u;i.angleDelta(o,l)>0?(c=o,u=l):(c=l,u=o);var d=[s.findEnclosingVertexAngles(c,e.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,e.vangles)[1]];return s.pathPolygonAnnulus(n,a,c,u,d,t,r)}:function(e,n,a,o){return i.pathAnnulus(e,n,a,o,t,r)}}(t),h=t.layers.frontplot.select("g.barlayer");i.makeTraceGroups(h,r,"trace bars").each((function(){var r=n.select(this),s=i.ensureSingle(r,"g","points").selectAll("g.point").data(i.identity);s.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,r=n.select(this),o=e.rp0=u.c2p(e.s0),s=e.rp1=u.c2p(e.s1),h=e.thetag0=d.c2g(e.p0),f=e.thetag1=d.c2g(e.p1);if(a(o)&&a(s)&&a(h)&&a(f)&&o!==s&&h!==f){var m=u.c2g(e.s1),g=(h+f)/2;e.ct=[l.c2p(m*Math.cos(g)),c.c2p(m*Math.sin(g))],t=p(o,s,h,f)}else t="M0,0Z";i.ensureSingle(r,"path").attr("d",t)})),o.setClipUrl(r,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}},{"../../components/drawing":612,"../../lib":716,"../../plots/polar/helpers":827,d3:164,"fast-isnumeric":227}],879:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../bar/attributes"),i=e("../../components/color/attributes"),o=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../lib/extend").extendFlat,l=n.marker,c=l.line;t.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},name:{valType:"string",editType:"calc+clearAxisTypes"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],dflt:"outliers",editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],dflt:!1,editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},l.size,{arrayOk:!1,editType:"calc"}),color:s({},l.color,{arrayOk:!1,editType:"style"}),line:{color:s({},c.color,{arrayOk:!1,dflt:i.defaultLine,editType:"style"}),width:s({},c.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n.fillcolor,offsetgroup:a.offsetgroup,alignmentgroup:a.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":590,"../../lib/extend":707,"../../plots/template_attributes":840,"../bar/attributes":855,"../scatter/attributes":1118}],880:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=a._,o=e("../../plots/cartesian/axes");function s(e,t,r){var n={text:"tx",hovertext:"htx"};for(var a in n)Array.isArray(t[a])&&(e[n[a]]=t[a][r])}function l(e,t){return e.v-t.v}function c(e){return e.v}t.exports=function(e,t){var r,u,d,p,h,f=e._fullLayout,m=o.getFromId(e,t.xaxis||"x"),g=o.getFromId(e,t.yaxis||"y"),v=[],y="violin"===t.type?"_numViolins":"_numBoxes";"h"===t.orientation?(u=m,d="x",p=g,h="y"):(u=g,d="y",p=m,h="x");var b,_=u.makeCalcdata(t,d),x=function(e,t,r,i,o){if(t in e)return r.makeCalcdata(e,t);var s;s=t+"0"in e?e[t+"0"]:"name"in e&&("category"===r.type||n(e.name)&&-1!==["linear","log"].indexOf(r.type)||a.isDateTime(e.name)&&"date"===r.type)?e.name:o;var l="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,e[t+"calendar"]);return i.map((function(){return l}))}(t,h,p,_,f[y]),w=a.distinctVals(x),k=w.vals,M=w.minDiff/2,T=function(e,t){for(var r=e.length,n=new Array(r+1),a=0;a<r;a++)n[a]=e[a]-t;return n[r]=e[r-1]+t,n}(k,M),C=k.length,S=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}(C);for(r=0;r<t._length;r++){var L=_[r];if(n(L)){var A=a.findBin(x[r],T);if(A>=0&&A<C){var E={v:L,i:r};s(E,t,r),S[A].push(E)}}}var D="all"===(t.boxpoints||t.points)?a.identity:function(e){return e.v<b.lf||e.v>b.uf};for(r=0;r<C;r++)if(S[r].length>0){var I=S[r].sort(l),P=I.map(c),O=P.length;(b={}).pos=k[r],b.pts=I,b[h]=b.pos,b[d]=b.pts.map((function(e){return e.v})),b.min=P[0],b.max=P[O-1],b.mean=a.mean(P,O),b.sd=a.stdev(P,O,b.mean),b.q1=a.interp(P,.25),b.med=a.interp(P,.5),b.q3=a.interp(P,.75),b.lf=Math.min(b.q1,P[Math.min(a.findBin(2.5*b.q1-1.5*b.q3,P,!0)+1,O-1)]),b.uf=Math.max(b.q3,P[Math.max(a.findBin(2.5*b.q3-1.5*b.q1,P),0)]),b.lo=4*b.q1-3*b.q3,b.uo=4*b.q3-3*b.q1;var R=1.57*(b.q3-b.q1)/Math.sqrt(O);b.ln=b.med-R,b.un=b.med+R,b.pts2=I.filter(D),v.push(b)}!function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r<e.length;r++){for(var n=e[r].pts||[],i={},o=0;o<n.length;o++)i[n[o].i]=o;a.tagSelected(n,t,i)}}(v,t);var F=o.findExtremes(u,_,{padded:!0});return t._extremes[u._id]=F,v.length>0?(v[0].t={num:f[y],dPos:M,posLetter:h,valLetter:d,labels:{med:i(e,"median:"),min:i(e,"min:"),q1:i(e,"q1:"),q3:i(e,"q3:"),max:i(e,"max:"),mean:"sd"===t.boxmean?i(e,"mean ± σ:"):i(e,"mean:"),lf:i(e,"lower fence:"),uf:i(e,"upper fence:")}},f[y]++,v):[{t:{empty:!0}}]}},{"../../lib":716,"../../plots/cartesian/axes":764,"fast-isnumeric":227}],881:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib"),i=e("../../plots/cartesian/axis_ids").getAxisGroup,o=["v","h"];function s(e,t,r,o){var s,l,c,u=t.calcdata,d=t._fullLayout,p=o._id,h=p.charAt(0),f=[],m=0;for(s=0;s<r.length;s++)for(c=u[r[s]],l=0;l<c.length;l++)f.push(o.c2l(c[l].pos,!0)),m+=(c[l].pts2||[]).length;if(f.length){var g=a.distinctVals(f),v=g.minDiff/2;n.minDtick(o,g.minDiff,g.vals[0],!0);var y=d["violin"===e?"_numViolins":"_numBoxes"],b="group"===d[e+"mode"]&&y>1,_=1-d[e+"gap"],x=1-d[e+"groupgap"];for(s=0;s<r.length;s++){var w,k,M,T,C,S,L=(c=u[r[s]])[0].trace,A=c[0].t,E=L.width,D=L.side;if(E)w=k=T=E/2,M=0;else if(w=v,b){var I=i(d,o._id)+L.orientation,P=(d._alignmentOpts[I]||{})[L.alignmentgroup]||{},O=Object.keys(P.offsetGroups||{}).length,R=O||y;k=w*_*x/R,M=2*w*(((O?L._offsetIndex:A.num)+.5)/R-.5)*_,T=w*_/R}else k=w*_*x,M=0,T=w;A.dPos=w,A.bPos=M,A.bdPos=k,A.wHover=T;var F,z,N,j,B,Y,H=M+k,V=Boolean(E);if("positive"===D?(C=w*(E?1:.5),F=H,S=F=M):"negative"===D?(C=F=M,S=w*(E?1:.5),z=H):(C=S=w,F=z=H),(L.boxpoints||L.points)&&m>0){var U=L.pointpos,W=L.jitter,G=L.marker.size/2,q=0;U+W>=0&&((q=H*(U+W))>C?(V=!0,B=G,N=q):q>F&&(B=G,N=C)),q<=C&&(N=C);var K=0;U-W<=0&&((K=-H*(U-W))>S?(V=!0,Y=G,j=K):K>z&&(Y=G,j=S)),K<=S&&(j=S)}else N=C,j=S;var X=new Array(c.length);for(l=0;l<c.length;l++)X[l]=c[l].pos;L._extremes[p]=n.findExtremes(o,X,{padded:V,vpadminus:j,vpadplus:N,vpadLinearized:!0,ppadminus:{x:Y,y:B}[h],ppadplus:{x:B,y:Y}[h]})}}}t.exports={crossTraceCalc:function(e,t){for(var r=e.calcdata,n=t.xaxis,a=t.yaxis,i=0;i<o.length;i++){for(var l=o[i],c="h"===l?a:n,u=[],d=0;d<r.length;d++){var p=r[d],h=p[0].t,f=p[0].trace;!0!==f.visible||"box"!==f.type&&"candlestick"!==f.type||h.empty||(f.orientation||"v")!==l||f.xaxis!==n._id||f.yaxis!==a._id||u.push(d)}s("box",e,u,c)}},setPositionOffset:s}},{"../../lib":716,"../../plots/cartesian/axes":764,"../../plots/cartesian/axis_ids":767}],882:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("../../components/color"),o=e("../bar/defaults").handleGroupingDefaults,s=e("./attributes");function l(e,t,r,i){var o,s,l=r("y"),c=r("x"),u=c&&c.length;if(l&&l.length)o="v",u?s=Math.min(n.minRowLength(c),n.minRowLength(l)):(r("x0"),s=n.minRowLength(l));else{if(!u)return void(t.visible=!1);o="h",r("y0"),s=n.minRowLength(c)}t._length=s,a.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],i),r("orientation",o)}function c(e,t,r,a){var i=a.prefix,o=n.coerce2(e,t,s,"marker.outliercolor"),l=r("marker.line.outliercolor"),c=r(i+"points",o||l?"suspectedoutliers":void 0);c?(r("jitter","all"===c?.3:0),r("pointpos","all"===c?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===c&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");"all"!==u&&-1===u.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(t,r)}t.exports={supplyDefaults:function(e,t,r,a){function o(r,a){return n.coerce(e,t,s,r,a)}l(e,t,o,a),!1!==t.visible&&(o("line.color",(e.marker||{}).color||r),o("line.width"),o("fillcolor",i.addOpacity(t.line.color,.5)),o("whiskerwidth"),o("boxmean"),o("width"),o("notched",void 0!==e.notchwidth)&&o("notchwidth"),c(e,t,o,{prefix:"box"}))},crossTraceDefaults:function(e,t){var r,a;function i(e){return n.coerce(a._input,a,s,e)}for(var l=0;l<e.length;l++){var c=(a=e[l]).type;"box"!==c&&"violin"!==c||(r=a._input,"group"===t[c+"mode"]&&o(r,a,t,i))}},handleSampleDefaults:l,handlePointsDefaults:c}},{"../../components/color":591,"../../lib":716,"../../registry":845,"../bar/defaults":859,"./attributes":879}],883:[function(e,t,r){"use strict";t.exports=function(e,t){return t.hoverOnBox&&(e.hoverOnBox=t.hoverOnBox),"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},{}],884:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib"),i=e("../../components/fx"),o=e("../../components/color"),s=a.fillText;function l(e,t,r,s){var l,c,u,d,p,h,f,m,g,v,y,b,_,x,w=e.cd,k=e.xa,M=e.ya,T=w[0].trace,C=w[0].t,S="violin"===T.type,L=[],A=C.bdPos,E=C.wHover,D=function(e){return u.c2l(e.pos)+C.bPos-u.c2l(h)};S&&"both"!==T.side?("positive"===T.side&&(g=function(e){var t=D(e);return i.inbox(t,t+E,v)},b=A,_=0),"negative"===T.side&&(g=function(e){var t=D(e);return i.inbox(t-E,t,v)},b=0,_=A)):(g=function(e){var t=D(e);return i.inbox(t-E,t+E,v)},b=_=A),x=S?function(e){return i.inbox(e.span[0]-p,e.span[1]-p,v)}:function(e){return i.inbox(e.min-p,e.max-p,v)},"h"===T.orientation?(p=t,h=r,f=x,m=g,l="y",u=M,c="x",d=k):(p=r,h=t,f=g,m=x,l="x",u=k,c="y",d=M);var I=Math.min(1,A/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function P(e){return(f(e)+m(e))/2}v=e.maxHoverDistance-I,y=e.maxSpikeDistance-I;var O=i.getDistanceFunction(s,f,m,P);if(i.getClosest(w,O,e),!1===e.index)return[];var R=w[e.index],F=T.line.color,z=(T.marker||{}).color;o.opacity(F)&&T.line.width?e.color=F:o.opacity(z)&&T.boxpoints?e.color=z:e.color=T.fillcolor,e[l+"0"]=u.c2p(R.pos+C.bPos-_,!0),e[l+"1"]=u.c2p(R.pos+C.bPos+b,!0),e[l+"LabelVal"]=R.pos;var N=l+"Spike";e.spikeDistance=P(R)*y/v,e[N]=u.c2p(R.pos,!0);var j={},B=["med","q1","q3","min","max"];(T.boxmean||(T.meanline||{}).visible)&&B.push("mean"),(T.boxpoints||T.points)&&B.push("lf","uf");for(var Y=0;Y<B.length;Y++){var H=B[Y];if(H in R&&!(R[H]in j)){j[R[H]]=!0;var V=R[H],U=d.c2p(V,!0),W=a.extendFlat({},e);W.attr=H,W[c+"0"]=W[c+"1"]=U,W[c+"LabelVal"]=V,W[c+"Label"]=(C.labels?C.labels[H]+" ":"")+n.hoverLabelText(d,V),W.hoverOnBox=!0,"mean"===H&&"sd"in R&&"sd"===T.boxmean&&(W[c+"err"]=R.sd),e.name="",e.spikeDistance=void 0,e[N]=void 0,W.hovertemplate=!1,L.push(W)}}return L}function c(e,t,r){for(var n,o,l,c=e.cd,u=e.xa,d=e.ya,p=c[0].trace,h=u.c2p(t),f=d.c2p(r),m=i.quadrature((function(e){var t=Math.max(3,e.mrc||0);return Math.max(Math.abs(u.c2p(e.x)-h)-t,1-3/t)}),(function(e){var t=Math.max(3,e.mrc||0);return Math.max(Math.abs(d.c2p(e.y)-f)-t,1-3/t)})),g=!1,v=0;v<c.length;v++){o=c[v];for(var y=0;y<(o.pts||[]).length;y++){var b=m(l=o.pts[y]);b<=e.distance&&(e.distance=b,g=[v,y])}}if(!g)return!1;l=(o=c[g[0]]).pts[g[1]];var _,x=u.c2p(l.x,!0),w=d.c2p(l.y,!0),k=l.mrc||1;return n=a.extendFlat({},e,{index:l.i,color:(p.marker||{}).color,name:p.name,x0:x-k,x1:x+k,y0:w-k,y1:w+k,spikeDistance:e.distance,hovertemplate:p.hovertemplate}),"h"===p.orientation?(_=d,n.xLabelVal=l.x,n.yLabelVal=o.pos):(_=u,n.xLabelVal=o.pos,n.yLabelVal=l.y),n[_._id.charAt(0)+"Spike"]=_.c2p(o.pos,!0),s(l,p,n),n}t.exports={hoverPoints:function(e,t,r,n){var a,i=e.cd[0].trace.hoveron,o=[];return-1!==i.indexOf("boxes")&&(o=o.concat(l(e,t,r,n))),-1!==i.indexOf("points")&&(a=c(e,t,r)),"closest"===n?a?[a]:o:a?(o.push(a),o):o},hoverOnBoxes:l,hoverOnPoints:c}},{"../../components/color":591,"../../components/fx":629,"../../lib":716,"../../plots/cartesian/axes":764}],885:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults").supplyLayoutDefaults,calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"box",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"./attributes":879,"./calc":880,"./cross_trace_calc":881,"./defaults":882,"./event_data":883,"./hover":884,"./layout_attributes":886,"./layout_defaults":887,"./plot":888,"./select":889,"./style":890}],886:[function(e,t,r){"use strict";t.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}},{}],887:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("./layout_attributes");function o(e,t,r,a,i){for(var o=i+"Layout",s=!1,l=0;l<r.length;l++){var c=r[l];if(n.traceIs(c,o)){s=!0;break}}s&&(a(i+"mode"),a(i+"gap"),a(i+"groupgap"))}t.exports={supplyLayoutDefaults:function(e,t,r){o(0,0,r,(function(r,n){return a.coerce(e,t,i,r,n)}),"box")},_supply:o}},{"../../lib":716,"../../registry":845,"./layout_attributes":886}],888:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=5,s=.01;function l(e,t,r,i){var o,s,l=t.pos,c=t.val,u=i.bPos,d=i.wdPos||0,p=i.bPosPxOffset||0,h=r.whiskerwidth||0,f=r.notched||!1,m=f?1-2*r.notchwidth:1;Array.isArray(i.bdPos)?(o=i.bdPos[0],s=i.bdPos[1]):(o=i.bdPos,s=i.bdPos);var g=e.selectAll("path.box").data("violin"!==r.type||r.box.visible?a.identity:[]);g.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","box"),g.exit().remove(),g.each((function(e){if(e.empty)return"M0,0Z";var t=l.c2l(e.pos+u,!0),i=l.l2p(t)+p,g=l.l2p(t-o)+p,v=l.l2p(t+s)+p,y=l.l2p(t-d)+p,b=l.l2p(t+d)+p,_=l.l2p(t-o*m)+p,x=l.l2p(t+s*m)+p,w=c.c2p(e.q1,!0),k=c.c2p(e.q3,!0),M=a.constrain(c.c2p(e.med,!0),Math.min(w,k)+1,Math.max(w,k)-1),T=void 0===e.lf||!1===r.boxpoints,C=c.c2p(T?e.min:e.lf,!0),S=c.c2p(T?e.max:e.uf,!0),L=c.c2p(e.ln,!0),A=c.c2p(e.un,!0);"h"===r.orientation?n.select(this).attr("d","M"+M+","+_+"V"+x+"M"+w+","+g+"V"+v+(f?"H"+L+"L"+M+","+x+"L"+A+","+v:"")+"H"+k+"V"+g+(f?"H"+A+"L"+M+","+_+"L"+L+","+g:"")+"ZM"+w+","+i+"H"+C+"M"+k+","+i+"H"+S+(0===h?"":"M"+C+","+y+"V"+b+"M"+S+","+y+"V"+b)):n.select(this).attr("d","M"+_+","+M+"H"+x+"M"+g+","+w+"H"+v+(f?"V"+L+"L"+x+","+M+"L"+v+","+A:"")+"V"+k+"H"+g+(f?"V"+A+"L"+_+","+M+"L"+g+","+L:"")+"ZM"+i+","+w+"V"+C+"M"+i+","+k+"V"+S+(0===h?"":"M"+y+","+C+"H"+b+"M"+y+","+S+"H"+b))}))}function c(e,t,r,n){var l=t.x,c=t.y,u=n.bdPos,d=n.bPos,p=r.boxpoints||r.points;a.seedPseudoRandom();var h=e.selectAll("g.points").data(p?function(e){return e.forEach((function(e){e.t=n,e.trace=r})),e}:[]);h.enter().append("g").attr("class","points"),h.exit().remove();var f=h.selectAll("path").data((function(e){var t,n,i=e.pts2,l=Math.max((e.max-e.min)/10,e.q3-e.q1),c=1e-9*l,h=l*s,f=[],m=0;if(r.jitter){if(0===l)for(m=1,f=new Array(i.length),t=0;t<i.length;t++)f[t]=1;else for(t=0;t<i.length;t++){var g=Math.max(0,t-o),v=i[g].v,y=Math.min(i.length-1,t+o),b=i[y].v;"all"!==p&&(i[t].v<e.lf?b=Math.min(b,e.lf):v=Math.max(v,e.uf));var _=Math.sqrt(h*(y-g)/(b-v+c))||0;_=a.constrain(Math.abs(_),0,1),f.push(_),m=Math.max(_,m)}n=2*r.jitter/(m||1)}for(t=0;t<i.length;t++){var x=i[t],w=x.v,k=r.jitter?n*f[t]*(a.pseudoRandom()-.5):0,M=e.pos+d+u*(r.pointpos+k);"h"===r.orientation?(x.y=M,x.x=w):(x.x=M,x.y=w),"suspectedoutliers"===p&&w<e.uo&&w>e.lo&&(x.so=!0)}return i}));f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(i.translatePoints,l,c)}function u(e,t,r,i){var o,s,l=t.pos,c=t.val,u=i.bPos,d=i.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(i.bdPos)?(o=i.bdPos[0],s=i.bdPos[1]):(o=i.bdPos,s=i.bdPos);var h=e.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?a.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each((function(e){var t=l.c2l(e.pos+u,!0),a=l.l2p(t)+d,i=l.l2p(t-o)+d,h=l.l2p(t+s)+d,f=c.c2p(e.mean,!0),m=c.c2p(e.mean-e.sd,!0),g=c.c2p(e.mean+e.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+f+","+i+"V"+h+("sd"===p?"m0,0L"+m+","+a+"L"+f+","+i+"L"+g+","+a+"Z":"")):n.select(this).attr("d","M"+i+","+f+"H"+h+("sd"===p?"m0,0L"+a+","+m+"L"+i+","+f+"L"+a+","+g+"Z":""))}))}t.exports={plot:function(e,t,r,i){var o=t.xaxis,s=t.yaxis;a.makeTraceGroups(i,r,"trace boxes").each((function(e){var t,r,a=n.select(this),i=e[0],d=i.t,p=i.trace;d.wdPos=d.bdPos*p.whiskerwidth,!0!==p.visible||d.empty?a.remove():("h"===p.orientation?(t=s,r=o):(t=o,r=s),l(a,{pos:t,val:r},p,d),c(a,{x:o,y:s},p,d),u(a,{pos:t,val:r},p,d))}))},plotBoxAndWhiskers:l,plotPoints:c,plotBoxMean:u}},{"../../components/drawing":612,"../../lib":716,d3:164}],889:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,a=e.cd,i=e.xaxis,o=e.yaxis,s=[];if(!1===t)for(r=0;r<a.length;r++)for(n=0;n<(a[r].pts||[]).length;n++)a[r].pts[n].selected=0;else for(r=0;r<a.length;r++)for(n=0;n<(a[r].pts||[]).length;n++){var l=a[r].pts[n],c=i.c2p(l.x),u=o.c2p(l.y);t.contains([c,u],null,l.i,e)?(s.push({pointNumber:l.i,x:i.c2d(l.x),y:o.c2d(l.y)}),l.selected=1):l.selected=0}return s}},{}],890:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/color"),i=e("../../components/drawing");t.exports={style:function(e,t,r){var o=r||n.select(e).selectAll("g.trace.boxes");o.style("opacity",(function(e){return e[0].trace.opacity})),o.each((function(t){var r=n.select(this),o=t[0].trace,s=o.line.width;function l(e,t,r,n){e.style("stroke-width",t+"px").call(a.stroke,r).call(a.fill,n)}var c=r.selectAll("path.box");if("candlestick"===o.type)c.each((function(e){if(!e.empty){var t=n.select(this),r=o[e.dir];l(t,r.line.width,r.line.color,r.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}}));else{l(c,s,o.line.color,o.fillcolor),r.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(a.stroke,o.line.color);var u=r.selectAll("path.point");i.pointStyle(u,o,e)}}))},styleOnSelect:function(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?i.selectedPointStyle(a,n):i.pointStyle(a,n,e)}}},{"../../components/color":591,"../../components/drawing":612,d3:164}],891:[function(e,t,r){"use strict";var n=e("../../lib").extendFlat,a=e("../ohlc/attributes"),i=e("../box/attributes");function o(e){return{line:{color:n({},i.line.color,{dflt:e}),width:i.line.width,editType:"style"},fillcolor:i.fillcolor,editType:"style"}}t.exports={x:a.x,open:a.open,high:a.high,low:a.low,close:a.close,line:{width:n({},i.line.width,{}),editType:"style"},increasing:o(a.increasing.line.color.dflt),decreasing:o(a.decreasing.line.color.dflt),text:a.text,hovertext:a.hovertext,whiskerwidth:n({},i.whiskerwidth,{dflt:0}),hoverlabel:a.hoverlabel}},{"../../lib":716,"../box/attributes":879,"../ohlc/attributes":1064}],892:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../ohlc/calc").calcCommon;function o(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}t.exports=function(e,t){var r=e._fullLayout,s=a.getFromId(e,t.xaxis),l=a.getFromId(e,t.yaxis),c=s.makeCalcdata(t,"x"),u=i(e,t,c,l,o);return u.length?(n.extendFlat(u[0].t,{num:r._numBoxes,dPos:n.distinctVals(c).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,u):[{t:{empty:!0}}]}},{"../../lib":716,"../../plots/cartesian/axes":764,"../ohlc/calc":1065}],893:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../ohlc/ohlc_defaults"),o=e("./attributes");function s(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",a.addOpacity(i,.5))}t.exports=function(e,t,r,a){function l(r,a){return n.coerce(e,t,o,r,a)}i(e,t,l,a)?(l("line.width"),s(0,t,l,"increasing"),s(0,t,l,"decreasing"),l("text"),l("hovertext"),l("whiskerwidth"),a._requestRangeslider[t.xaxis]=!0):t.visible=!1}},{"../../components/color":591,"../../lib":716,"../ohlc/ohlc_defaults":1069,"./attributes":891}],894:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"candlestick",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:e("./attributes"),layoutAttributes:e("../box/layout_attributes"),supplyLayoutDefaults:e("../box/layout_defaults").supplyLayoutDefaults,crossTraceCalc:e("../box/cross_trace_calc").crossTraceCalc,supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("../box/plot").plot,layerName:"boxlayer",style:e("../box/style").style,hoverPoints:e("../ohlc/hover").hoverPoints,selectPoints:e("../ohlc/select")}},{"../../plots/cartesian":775,"../box/cross_trace_calc":881,"../box/layout_attributes":886,"../box/layout_defaults":887,"../box/plot":888,"../box/style":890,"../ohlc/hover":1067,"../ohlc/select":1071,"./attributes":891,"./calc":892,"./defaults":893}],895:[function(e,t,r){"use strict";var n=e("./axis_defaults"),a=e("../../plot_api/plot_template");t.exports=function(e,t,r,i,o){i("a")||(i("da"),i("a0")),i("b")||(i("db"),i("b0")),function(e,t,r,i){["aaxis","baxis"].forEach((function(o){var s=o.charAt(0),l=e[o]||{},c=a.newContainer(t,o),u={tickfont:"x",id:s+"axis",letter:s,font:t.font,name:o,data:e[s],calendar:t.calendar,dfltColor:i,bgColor:r.paper_bgcolor,fullLayout:r};n(l,c,u),c._categories=c._categories||[],e[o]||"-"===l.type||(e[o]={type:l.type})}))}(e,t,r,o)}},{"../../plot_api/plot_template":754,"./axis_defaults":900}],896:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray;t.exports=function(e){return function e(t,r){if(!n(t)||r>=10)return null;for(var a=1/0,i=-1/0,o=t.length,s=0;s<o;s++){var l=t[s];if(n(l)){var c=e(l,r+1);c&&(a=Math.min(c[0],a),i=Math.max(c[1],i))}else a=Math.min(l,a),i=Math.max(l,i)}return[a,i]}(e,0)}},{"../../lib":716}],897:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("./axis_attributes"),i=e("../../components/color/attributes"),o=n({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=i.defaultLine,t.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:a,baxis:a,font:o,color:{valType:"color",dflt:i.defaultLine,editType:"plot"},transforms:void 0}},{"../../components/color/attributes":590,"../../plots/font_attributes":790,"./axis_attributes":899}],898:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r,a){var i,o,s,l,c,u,d,p,h,f,m,g,v,y=n(r)?"a":"b",b=("a"===y?e.aaxis:e.baxis).smoothing,_="a"===y?e.a2i:e.b2j,x="a"===y?r:a,w="a"===y?a:r,k="a"===y?t.a.length:t.b.length,M="a"===y?t.b.length:t.a.length,T=Math.floor("a"===y?e.b2j(w):e.a2i(w)),C="a"===y?function(t){return e.evalxy([],t,T)}:function(t){return e.evalxy([],T,t)};b&&(s=Math.max(0,Math.min(M-2,T)),l=T-s,o="a"===y?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var S=_(x[0]),L=_(x[1]),A=S<L?1:-1,E=1e-8*(L-S),D=A>0?Math.floor:Math.ceil,I=A>0?Math.ceil:Math.floor,P=A>0?Math.min:Math.max,O=A>0?Math.max:Math.min,R=D(S+E),F=I(L-E),z=[[d=C(S)]];for(i=R;i*A<F*A;i+=A)c=[],m=O(S,i),v=(g=P(L,i+A))-m,u=Math.max(0,Math.min(k-2,Math.floor(.5*(m+g)))),p=C(g),b&&(h=o(u,m-u),f=o(u,g-u),c.push([d[0]+h[0]/3*v,d[1]+h[1]/3*v]),c.push([p[0]-f[0]/3*v,p[1]-f[1]/3*v])),c.push(p),z.push(c),d=p;return z}},{"../../lib":716}],899:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../../components/color/attributes"),i=e("../../plots/cartesian/layout_attributes"),o=e("../../plot_api/edit_types").overrideAll;e("../../constants/docs").FORMAT_LINK,e("../../constants/docs").TIME_FORMAT_LINK,t.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:n({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},tickfont:n({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc"},tickformatstops:o(i.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:a.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgridcolor:{valType:"color",dflt:a.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},_deprecated:{title:{valType:"string",editType:"calc"},titlefont:n({editType:"calc"}),titleoffset:{valType:"number",dflt:10,editType:"calc"}},editType:"calc"}},{"../../components/color/attributes":590,"../../constants/docs":687,"../../plot_api/edit_types":747,"../../plots/cartesian/layout_attributes":776,"../../plots/font_attributes":790}],900:[function(e,t,r){"use strict";var n=e("./attributes"),a=e("../../components/color").addOpacity,i=e("../../registry"),o=e("../../lib"),s=e("../../plots/cartesian/tick_value_defaults"),l=e("../../plots/cartesian/tick_label_defaults"),c=e("../../plots/cartesian/category_order_defaults"),u=e("../../plots/cartesian/set_convert"),d=e("../../plots/cartesian/axis_autotype");t.exports=function(e,t,r){var p=r.letter,h=r.font||{},f=n[p+"axis"];function m(r,n){return o.coerce(e,t,f,r,n)}function g(r,n){return o.coerce2(e,t,f,r,n)}r.name&&(t._name=r.name,t._id=r.name);var v=m("type");"-"===v&&(r.data&&function(e,t){if("-"===e.type){var r=e._id.charAt(0),n=e[r+"calendar"];e.type=d(t,n)}}(t,r.data),"-"===t.type?t.type="linear":v=e.type=t.type),m("smoothing"),m("cheatertype"),m("showticklabels"),m("labelprefix",p+" = "),m("labelsuffix"),m("showtickprefix"),m("showticksuffix"),m("separatethousands"),m("tickformat"),m("exponentformat"),m("showexponent"),m("categoryorder"),m("tickmode"),m("tickvals"),m("ticktext"),m("tick0"),m("dtick"),"array"===t.tickmode&&(m("arraytick0"),m("arraydtick")),m("labelpadding"),t._hovertitle=p,"date"===v&&i.getComponentMethod("calendars","handleDefaults")(e,t,"calendar",r.calendar),u(t,r.fullLayout),t.c2p=o.identity;var y=m("color",r.dfltColor),b=y===e.color?y:h.color;m("title.text")&&(o.coerceFont(m,"title.font",{family:h.family,size:Math.round(1.2*h.size),color:b}),m("title.offset")),m("tickangle"),m("autorange",!t.isValidRange(e.range))&&m("rangemode"),m("range"),t.cleanRange(),m("fixedrange"),s(e,t,m,v),l(e,t,m,v,r),c(e,t,m,{data:r.data,dataAttr:p});var _=g("gridcolor",a(y,.3)),x=g("gridwidth"),w=m("showgrid");w||(delete t.gridcolor,delete t.gridwidth);var k=g("startlinecolor",y),M=g("startlinewidth",x);m("startline",t.showgrid||!!k||!!M)||(delete t.startlinecolor,delete t.startlinewidth);var T=g("endlinecolor",y),C=g("endlinewidth",x);return m("endline",t.showgrid||!!T||!!C)||(delete t.endlinecolor,delete t.endlinewidth),w?(m("minorgridcount"),m("minorgridwidth",x),m("minorgridcolor",a(_,.06)),t.minorgridcount||(delete t.minorgridwidth,delete t.minorgridcolor)):(delete t.gridcolor,delete t.gridWidth),"none"===t.showticklabels&&(delete t.tickfont,delete t.tickangle,delete t.showexponent,delete t.exponentformat,delete t.tickformat,delete t.showticksuffix,delete t.showtickprefix),t.showticksuffix||delete t.ticksuffix,t.showtickprefix||delete t.tickprefix,m("tickmode"),t}},{"../../components/color":591,"../../lib":716,"../../plots/cartesian/axis_autotype":765,"../../plots/cartesian/category_order_defaults":768,"../../plots/cartesian/set_convert":782,"../../plots/cartesian/tick_label_defaults":783,"../../plots/cartesian/tick_value_defaults":785,"../../registry":845,"./attributes":897}],901:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib").isArray1D,i=e("./cheater_basis"),o=e("./array_minmax"),s=e("./calc_gridlines"),l=e("./calc_labels"),c=e("./calc_clippath"),u=e("../heatmap/clean_2d_array"),d=e("./smooth_fill_2d_array"),p=e("../heatmap/convert_column_xyz"),h=e("./set_convert");t.exports=function(e,t){var r=n.getFromId(e,t.xaxis),f=n.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,v=t.x,y=t.y,b=[];v&&a(v)&&b.push("x"),y&&a(y)&&b.push("y"),b.length&&p(t,m,g,"a","b",b);var _=t._a=t._a||t.a,x=t._b=t._b||t.b;v=t._x||t.x,y=t._y||t.y;var w={};if(t._cheater){var k="index"===m.cheatertype?_.length:_,M="index"===g.cheatertype?x.length:x;v=i(k,M,t.cheaterslope)}t._x=v=u(v),t._y=y=u(y),d(v,_,x),d(y,_,x),h(t),t.setScale();var T=o(v),C=o(y),S=.5*(T[1]-T[0]),L=.5*(T[1]+T[0]),A=.5*(C[1]-C[0]),E=.5*(C[1]+C[0]);return T=[L-1.3*S,L+1.3*S],C=[E-1.3*A,E+1.3*A],t._extremes[r._id]=n.findExtremes(r,T,{padded:!0}),t._extremes[f._id]=n.findExtremes(f,C,{padded:!0}),s(t,"a","b"),s(t,"b","a"),l(t,m),l(t,g),w.clipsegments=c(t._xctrl,t._yctrl,m,g),w.x=v,w.y=y,w.a=_,w.b=x,[w]}},{"../../lib":716,"../../plots/cartesian/axes":764,"../heatmap/clean_2d_array":1e3,"../heatmap/convert_column_xyz":1002,"./array_minmax":896,"./calc_clippath":902,"./calc_gridlines":903,"./calc_labels":904,"./cheater_basis":906,"./set_convert":919,"./smooth_fill_2d_array":920}],902:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var a,i,o,s=[],l=!!r.smoothing,c=!!n.smoothing,u=e[0].length-1,d=e.length-1;for(a=0,i=[],o=[];a<=u;a++)i[a]=e[0][a],o[a]=t[0][a];for(s.push({x:i,y:o,bicubic:l}),a=0,i=[],o=[];a<=d;a++)i[a]=e[a][u],o[a]=t[a][u];for(s.push({x:i,y:o,bicubic:c}),a=u,i=[],o=[];a>=0;a--)i[u-a]=e[d][a],o[u-a]=t[d][a];for(s.push({x:i,y:o,bicubic:l}),a=d,i=[],o=[];a>=0;a--)i[d-a]=e[a][0],o[d-a]=t[a][0];return s.push({x:i,y:o,bicubic:c}),s}},{}],903:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib/extend").extendFlat;t.exports=function(e,t,r){var i,o,s,l,c,u,d,p,h,f,m,g,v,y,b=e["_"+t],_=e[t+"axis"],x=_._gridlines=[],w=_._minorgridlines=[],k=_._boundarylines=[],M=e["_"+r],T=e[r+"axis"];"array"===_.tickmode&&(_.tickvals=b.slice());var C=e._xctrl,S=e._yctrl,L=C[0].length,A=C.length,E=e._a.length,D=e._b.length;n.prepTicks(_),"array"===_.tickmode&&delete _.tickvals;var I=_.smoothing?3:1;function P(n){var a,i,o,s,l,c,u,d,h,f,m,g,v=[],y=[],b={};if("b"===t)for(i=e.b2j(n),o=Math.floor(Math.max(0,Math.min(D-2,i))),s=i-o,b.length=D,b.crossLength=E,b.xy=function(t){return e.evalxy([],t,i)},b.dxy=function(t,r){return e.dxydi([],t,o,r,s)},a=0;a<E;a++)c=Math.min(E-2,a),u=a-c,d=e.evalxy([],a,i),T.smoothing&&a>0&&(h=e.dxydi([],a-1,o,0,s),v.push(l[0]+h[0]/3),y.push(l[1]+h[1]/3),f=e.dxydi([],a-1,o,1,s),v.push(d[0]-f[0]/3),y.push(d[1]-f[1]/3)),v.push(d[0]),y.push(d[1]),l=d;else for(a=e.a2i(n),c=Math.floor(Math.max(0,Math.min(E-2,a))),u=a-c,b.length=E,b.crossLength=D,b.xy=function(t){return e.evalxy([],a,t)},b.dxy=function(t,r){return e.dxydj([],c,t,u,r)},i=0;i<D;i++)o=Math.min(D-2,i),s=i-o,d=e.evalxy([],a,i),T.smoothing&&i>0&&(m=e.dxydj([],c,i-1,u,0),v.push(l[0]+m[0]/3),y.push(l[1]+m[1]/3),g=e.dxydj([],c,i-1,u,1),v.push(d[0]-g[0]/3),y.push(d[1]-g[1]/3)),v.push(d[0]),y.push(d[1]),l=d;return b.axisLetter=t,b.axis=_,b.crossAxis=T,b.value=n,b.constvar=r,b.index=p,b.x=v,b.y=y,b.smoothing=T.smoothing,b}function O(n){var a,i,o,s,l,c=[],u=[],d={};if(d.length=b.length,d.crossLength=M.length,"b"===t)for(o=Math.max(0,Math.min(D-2,n)),l=Math.min(1,Math.max(0,n-o)),d.xy=function(t){return e.evalxy([],t,n)},d.dxy=function(t,r){return e.dxydi([],t,o,r,l)},a=0;a<L;a++)c[a]=C[n*I][a],u[a]=S[n*I][a];else for(i=Math.max(0,Math.min(E-2,n)),s=Math.min(1,Math.max(0,n-i)),d.xy=function(t){return e.evalxy([],n,t)},d.dxy=function(t,r){return e.dxydj([],i,t,s,r)},a=0;a<A;a++)c[a]=C[a][n*I],u[a]=S[a][n*I];return d.axisLetter=t,d.axis=_,d.crossAxis=T,d.value=b[n],d.constvar=r,d.index=n,d.x=c,d.y=u,d.smoothing=T.smoothing,d}if("array"===_.tickmode){for(l=5e-15,u=(c=[Math.floor((b.length-1-_.arraytick0)/_.arraydtick*(1+l)),Math.ceil(-_.arraytick0/_.arraydtick/(1+l))].sort((function(e,t){return e-t})))[0]-1,d=c[1]+1,p=u;p<d;p++)(o=_.arraytick0+_.arraydtick*p)<0||o>b.length-1||x.push(a(O(o),{color:_.gridcolor,width:_.gridwidth}));for(p=u;p<d;p++)if(s=_.arraytick0+_.arraydtick*p,m=Math.min(s+_.arraydtick,b.length-1),!(s<0||s>b.length-1||m<0||m>b.length-1))for(g=b[s],v=b[m],i=0;i<_.minorgridcount;i++)(y=m-s)<=0||(f=g+(v-g)*(i+1)/(_.minorgridcount+1)*(_.arraydtick/y))<b[0]||f>b[b.length-1]||w.push(a(P(f),{color:_.minorgridcolor,width:_.minorgridwidth}));_.startline&&k.push(a(O(0),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&k.push(a(O(b.length-1),{color:_.endlinecolor,width:_.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((b[b.length-1]-_.tick0)/_.dtick*(1+l)),Math.ceil((b[0]-_.tick0)/_.dtick/(1+l))].sort((function(e,t){return e-t})))[0],d=c[1],p=u;p<=d;p++)h=_.tick0+_.dtick*p,x.push(a(P(h),{color:_.gridcolor,width:_.gridwidth}));for(p=u-1;p<d+1;p++)for(h=_.tick0+_.dtick*p,i=0;i<_.minorgridcount;i++)(f=h+_.dtick*(i+1)/(_.minorgridcount+1))<b[0]||f>b[b.length-1]||w.push(a(P(f),{color:_.minorgridcolor,width:_.minorgridwidth}));_.startline&&k.push(a(P(b[0]),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&k.push(a(P(b[b.length-1]),{color:_.endlinecolor,width:_.endlinewidth}))}}},{"../../lib/extend":707,"../../plots/cartesian/axes":764}],904:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib/extend").extendFlat;t.exports=function(e,t){var r,i,o,s=t._labels=[],l=t._gridlines;for(r=0;r<l.length;r++)o=l[r],-1!==["start","both"].indexOf(t.showticklabels)&&(i=n.tickText(t,o.value),a(i,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:o.xy(0),dxy:o.dxy(0,0),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(i)),-1!==["end","both"].indexOf(t.showticklabels)&&(i=n.tickText(t,o.value),a(i,{endAnchor:!1,xy:o.xy(o.crossLength-1),dxy:o.dxy(o.crossLength-2,1),axis:o.axis,length:o.crossAxis.length,font:o.axis.tickfont,isFirst:0===r,isLast:r===l.length-1}),s.push(i))}},{"../../lib/extend":707,"../../plots/cartesian/axes":764}],905:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var a=e[0]-t[0],i=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(a*a+i*i,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*a-l*l*o)*n,d=(c*c*i-l*l*s)*n,p=c*(l+c)*3,h=l*(l+c)*3;return[[t[0]+(p&&u/p),t[1]+(p&&d/p)],[t[0]-(h&&u/h),t[1]-(h&&d/h)]]}},{}],906:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r){var a,i,o,s,l,c,u=[],d=n(e)?e.length:e,p=n(t)?t.length:t,h=n(e)?e:null,f=n(t)?t:null;h&&(o=(h.length-1)/(h[h.length-1]-h[0])/(d-1)),f&&(s=(f.length-1)/(f[f.length-1]-f[0])/(p-1));var m=1/0,g=-1/0;for(i=0;i<p;i++)for(u[i]=[],l=f?(f[i]-f[0])*s:i/(p-1),a=0;a<d;a++)c=(h?(h[a]-h[0])*o:a/(d-1))-l*r,m=Math.min(c,m),g=Math.max(c,g),u[i][a]=c;var v=1/(g-m),y=-m*v;for(i=0;i<p;i++)for(a=0;a<d;a++)u[i][a]=v*u[i][a]+y;return u}},{"../../lib":716}],907:[function(e,t,r){"use strict";var n=e("./catmull_rom"),a=e("../../lib").ensureArray;function i(e,t,r){var n=-.5*r[0]+1.5*t[0],a=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*a+e[1])/3]}t.exports=function(e,t,r,o,s,l){var c,u,d,p,h,f,m,g,v,y,b=r[0].length,_=r.length,x=s?3*b-2:b,w=l?3*_-2:_;for(e=a(e,w),t=a(t,w),d=0;d<w;d++)e[d]=a(e[d],x),t[d]=a(t[d],x);for(u=0,p=0;u<_;u++,p+=l?3:1)for(h=e[p],f=t[p],m=r[u],g=o[u],c=0,d=0;c<b;c++,d+=s?3:1)h[d]=m[c],f[d]=g[c];if(s)for(u=0,p=0;u<_;u++,p+=l?3:1){for(c=1,d=3;c<b-1;c++,d+=3)v=n([r[u][c-1],o[u][c-1]],[r[u][c],o[u][c]],[r[u][c+1],o[u][c+1]],s),e[p][d-1]=v[0][0],t[p][d-1]=v[0][1],e[p][d+1]=v[1][0],t[p][d+1]=v[1][1];y=i([e[p][0],t[p][0]],[e[p][2],t[p][2]],[e[p][3],t[p][3]]),e[p][1]=y[0],t[p][1]=y[1],y=i([e[p][x-1],t[p][x-1]],[e[p][x-3],t[p][x-3]],[e[p][x-4],t[p][x-4]]),e[p][x-2]=y[0],t[p][x-2]=y[1]}if(l)for(d=0;d<x;d++){for(p=3;p<w-3;p+=3)v=n([e[p-3][d],t[p-3][d]],[e[p][d],t[p][d]],[e[p+3][d],t[p+3][d]],l),e[p-1][d]=v[0][0],t[p-1][d]=v[0][1],e[p+1][d]=v[1][0],t[p+1][d]=v[1][1];y=i([e[0][d],t[0][d]],[e[2][d],t[2][d]],[e[3][d],t[3][d]]),e[1][d]=y[0],t[1][d]=y[1],y=i([e[w-1][d],t[w-1][d]],[e[w-3][d],t[w-3][d]],[e[w-4][d],t[w-4][d]]),e[w-2][d]=y[0],t[w-2][d]=y[1]}if(s&&l)for(p=1;p<w;p+=(p+1)%3==0?2:1){for(d=3;d<x-3;d+=3)v=n([e[p][d-3],t[p][d-3]],[e[p][d],t[p][d]],[e[p][d+3],t[p][d+3]],s),e[p][d-1]=.5*(e[p][d-1]+v[0][0]),t[p][d-1]=.5*(t[p][d-1]+v[0][1]),e[p][d+1]=.5*(e[p][d+1]+v[1][0]),t[p][d+1]=.5*(t[p][d+1]+v[1][1]);y=i([e[p][0],t[p][0]],[e[p][2],t[p][2]],[e[p][3],t[p][3]]),e[p][1]=.5*(e[p][1]+y[0]),t[p][1]=.5*(t[p][1]+y[1]),y=i([e[p][x-1],t[p][x-1]],[e[p][x-3],t[p][x-3]],[e[p][x-4],t[p][x-4]]),e[p][x-2]=.5*(e[p][x-2]+y[0]),t[p][x-2]=.5*(t[p][x-2]+y[1])}return[e,t]}},{"../../lib":716,"./catmull_rom":905}],908:[function(e,t,r){"use strict";t.exports={RELATIVE_CULL_TOLERANCE:1e-6}},{}],909:[function(e,t,r){"use strict";t.exports=function(e,t,r){return t&&r?function(t,r,n,a,i){var o,s,l,c,u,d;t||(t=[]),r*=3,n*=3;var p=a*a,h=1-a,f=h*h,m=h*a*2,g=-3*f,v=3*(f-m),y=3*(m-p),b=3*p,_=i*i,x=_*i,w=1-i,k=w*w,M=k*w;for(d=0;d<e.length;d++)o=g*(u=e[d])[n][r]+v*u[n][r+1]+y*u[n][r+2]+b*u[n][r+3],s=g*u[n+1][r]+v*u[n+1][r+1]+y*u[n+1][r+2]+b*u[n+1][r+3],l=g*u[n+2][r]+v*u[n+2][r+1]+y*u[n+2][r+2]+b*u[n+2][r+3],c=g*u[n+3][r]+v*u[n+3][r+1]+y*u[n+3][r+2]+b*u[n+3][r+3],t[d]=M*o+3*(k*i*s+w*_*l)+x*c;return t}:t?function(t,r,n,a,i){var o,s,l,c;t||(t=[]),r*=3;var u=a*a,d=1-a,p=d*d,h=d*a*2,f=-3*p,m=3*(p-h),g=3*(h-u),v=3*u,y=1-i;for(l=0;l<e.length;l++)o=f*(c=e[l])[n][r]+m*c[n][r+1]+g*c[n][r+2]+v*c[n][r+3],s=f*c[n+1][r]+m*c[n+1][r+1]+g*c[n+1][r+2]+v*c[n+1][r+3],t[l]=y*o+i*s;return t}:r?function(t,r,n,a,i){var o,s,l,c,u,d;t||(t=[]),n*=3;var p=i*i,h=p*i,f=1-i,m=f*f,g=m*f;for(u=0;u<e.length;u++)o=(d=e[u])[n][r+1]-d[n][r],s=d[n+1][r+1]-d[n+1][r],l=d[n+2][r+1]-d[n+2][r],c=d[n+3][r+1]-d[n+3][r],t[u]=g*o+3*(m*i*s+f*p*l)+h*c;return t}:function(t,r,n,a,i){var o,s,l,c;t||(t=[]);var u=1-i;for(l=0;l<e.length;l++)o=(c=e[l])[n][r+1]-c[n][r],s=c[n+1][r+1]-c[n+1][r],t[l]=u*o+i*s;return t}}},{}],910:[function(e,t,r){"use strict";t.exports=function(e,t,r){return t&&r?function(t,r,n,a,i){var o,s,l,c,u,d;t||(t=[]),r*=3,n*=3;var p=a*a,h=p*a,f=1-a,m=f*f,g=m*f,v=i*i,y=1-i,b=y*y,_=y*i*2,x=-3*b,w=3*(b-_),k=3*(_-v),M=3*v;for(d=0;d<e.length;d++)o=x*(u=e[d])[n][r]+w*u[n+1][r]+k*u[n+2][r]+M*u[n+3][r],s=x*u[n][r+1]+w*u[n+1][r+1]+k*u[n+2][r+1]+M*u[n+3][r+1],l=x*u[n][r+2]+w*u[n+1][r+2]+k*u[n+2][r+2]+M*u[n+3][r+2],c=x*u[n][r+3]+w*u[n+1][r+3]+k*u[n+2][r+3]+M*u[n+3][r+3],t[d]=g*o+3*(m*a*s+f*p*l)+h*c;return t}:t?function(t,r,n,a,i){var o,s,l,c,u,d;t||(t=[]),r*=3;var p=i*i,h=p*i,f=1-i,m=f*f,g=m*f;for(u=0;u<e.length;u++)o=(d=e[u])[n+1][r]-d[n][r],s=d[n+1][r+1]-d[n][r+1],l=d[n+1][r+2]-d[n][r+2],c=d[n+1][r+3]-d[n][r+3],t[u]=g*o+3*(m*i*s+f*p*l)+h*c;return t}:r?function(t,r,n,a,i){var o,s,l,c;t||(t=[]),n*=3;var u=1-a,d=i*i,p=1-i,h=p*p,f=p*i*2,m=-3*h,g=3*(h-f),v=3*(f-d),y=3*d;for(l=0;l<e.length;l++)o=m*(c=e[l])[n][r]+g*c[n+1][r]+v*c[n+2][r]+y*c[n+3][r],s=m*c[n][r+1]+g*c[n+1][r+1]+v*c[n+2][r+1]+y*c[n+3][r+1],t[l]=u*o+a*s;return t}:function(t,r,n,a,i){var o,s,l,c;t||(t=[]);var u=1-a;for(l=0;l<e.length;l++)o=(c=e[l])[n+1][r]-c[n][r],s=c[n+1][r+1]-c[n][r+1],t[l]=u*o+a*s;return t}}},{}],911:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){var i=t-2,o=r-2;return n&&a?function(t,r,n){var a,s,l,c,u,d;t||(t=[]);var p=Math.max(0,Math.min(Math.floor(r),i)),h=Math.max(0,Math.min(Math.floor(n),o)),f=Math.max(0,Math.min(1,r-p)),m=Math.max(0,Math.min(1,n-h));p*=3,h*=3;var g=f*f,v=g*f,y=1-f,b=y*y,_=b*y,x=m*m,w=x*m,k=1-m,M=k*k,T=M*k;for(d=0;d<e.length;d++)a=_*(u=e[d])[h][p]+3*(b*f*u[h][p+1]+y*g*u[h][p+2])+v*u[h][p+3],s=_*u[h+1][p]+3*(b*f*u[h+1][p+1]+y*g*u[h+1][p+2])+v*u[h+1][p+3],l=_*u[h+2][p]+3*(b*f*u[h+2][p+1]+y*g*u[h+2][p+2])+v*u[h+2][p+3],c=_*u[h+3][p]+3*(b*f*u[h+3][p+1]+y*g*u[h+3][p+2])+v*u[h+3][p+3],t[d]=T*a+3*(M*m*s+k*x*l)+w*c;return t}:n?function(t,r,n){t||(t=[]);var a,s,l,c,u,d,p=Math.max(0,Math.min(Math.floor(r),i)),h=Math.max(0,Math.min(Math.floor(n),o)),f=Math.max(0,Math.min(1,r-p)),m=Math.max(0,Math.min(1,n-h));p*=3;var g=f*f,v=g*f,y=1-f,b=y*y,_=b*y,x=1-m;for(u=0;u<e.length;u++)a=x*(d=e[u])[h][p]+m*d[h+1][p],s=x*d[h][p+1]+m*d[h+1][p+1],l=x*d[h][p+2]+m*d[h+1][p+1],c=x*d[h][p+3]+m*d[h+1][p+1],t[u]=_*a+3*(b*f*s+y*g*l)+v*c;return t}:a?function(t,r,n){t||(t=[]);var a,s,l,c,u,d,p=Math.max(0,Math.min(Math.floor(r),i)),h=Math.max(0,Math.min(Math.floor(n),o)),f=Math.max(0,Math.min(1,r-p)),m=Math.max(0,Math.min(1,n-h));h*=3;var g=m*m,v=g*m,y=1-m,b=y*y,_=b*y,x=1-f;for(u=0;u<e.length;u++)a=x*(d=e[u])[h][p]+f*d[h][p+1],s=x*d[h+1][p]+f*d[h+1][p+1],l=x*d[h+2][p]+f*d[h+2][p+1],c=x*d[h+3][p]+f*d[h+3][p+1],t[u]=_*a+3*(b*m*s+y*g*l)+v*c;return t}:function(t,r,n){t||(t=[]);var a,s,l,c,u=Math.max(0,Math.min(Math.floor(r),i)),d=Math.max(0,Math.min(Math.floor(n),o)),p=Math.max(0,Math.min(1,r-u)),h=Math.max(0,Math.min(1,n-d)),f=1-h,m=1-p;for(l=0;l<e.length;l++)a=m*(c=e[l])[d][u]+p*c[d][u+1],s=m*c[d+1][u]+p*c[d+1][u+1],t[l]=f*a+h*s;return t}}},{}],912:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./xy_defaults"),i=e("./ab_defaults"),o=e("./attributes"),s=e("../../components/color/attributes");t.exports=function(e,t,r,l){function c(r,a){return n.coerce(e,t,o,r,a)}t._clipPathId="clip"+t.uid+"carpet";var u=c("color",s.defaultLine);n.coerceFont(c,"font"),c("carpet"),i(e,t,l,c,u),t.a&&t.b?(t.a.length<3&&(t.aaxis.smoothing=0),t.b.length<3&&(t.baxis.smoothing=0),a(e,t,c)||(t.visible=!1),t._cheater&&c("cheaterslope")):t.visible=!1}},{"../../components/color/attributes":590,"../../lib":716,"./ab_defaults":895,"./attributes":897,"./xy_defaults":921}],913:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),plot:e("./plot"),calc:e("./calc"),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":775,"./attributes":897,"./calc":901,"./defaults":912,"./plot":918}],914:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r,n=e._fullData.length,a=0;a<n;a++){var i=e._fullData[a];if(i.index!==t.index&&"carpet"===i.type&&(r||(r=i),i.carpet===t.carpet))return i}return r}},{}],915:[function(e,t,r){"use strict";t.exports=function(e,t,r){if(0===e.length)return"";var n,a=[],i=r?3:1;for(n=0;n<e.length;n+=i)a.push(e[n]+","+t[n]),r&&n<e.length-i&&(a.push("C"),a.push([e[n+1]+","+t[n+1],e[n+2]+","+t[n+2]+" "].join(" ")));return a.join(r?"":"L")}},{}],916:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r){var a;for(n(e)?e.length>t.length&&(e=e.slice(0,t.length)):e=[],a=0;a<t.length;a++)e[a]=r(t[a]);return e}},{"../../lib":716}],917:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a,i){var o=a[0]*e.dpdx(t),s=a[1]*e.dpdy(r),l=1,c=1;if(i){var u=Math.sqrt(a[0]*a[0]+a[1]*a[1]),d=Math.sqrt(i[0]*i[0]+i[1]*i[1]),p=(a[0]*i[0]+a[1]*i[1])/u/d;c=Math.max(0,p)}var h=180*Math.atan2(s,o)/Math.PI;return h<-90?(h+=180,l=-l):h>90&&(h-=180,l=-l),{angle:h,flip:l,p:e.c2p(n,t,r),offsetMultplier:c}}},{}],918:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("./map_1d_array"),o=e("./makepath"),s=e("./orient_text"),l=e("../../lib/svg_text_utils"),c=e("../../lib"),u=e("../../constants/alignment");function d(e,t,r,a,s,l){var c="const-"+s+"-lines",u=r.selectAll("."+c).data(l);u.enter().append("path").classed(c,!0).style("vector-effect","non-scaling-stroke"),u.each((function(r){var a=r,s=a.x,l=a.y,c=i([],s,e.c2p),u=i([],l,t.c2p),d="M"+o(c,u,a.smoothing);n.select(this).attr("d",d).style("stroke-width",a.width).style("stroke",a.color).style("fill","none")})),u.exit().remove()}function p(e,t,r,i,o,c,u,d){var p=c.selectAll("text."+d).data(u);p.enter().append("text").classed(d,!0);var h=0,f={};return p.each((function(o,c){var u;if("auto"===o.axis.tickangle)u=s(i,t,r,o.xy,o.dxy);else{var d=(o.axis.tickangle+180)*Math.PI/180;u=s(i,t,r,o.xy,[Math.cos(d),Math.sin(d)])}c||(f={angle:u.angle,flip:u.flip});var p=(o.endAnchor?-1:1)*u.flip,m=n.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(a.font,o.font).text(o.text).call(l.convertToTspans,e),g=a.bBox(this);m.attr("transform","translate("+u.p[0]+","+u.p[1]+") rotate("+u.angle+")translate("+o.axis.labelpadding*p+","+.3*g.height+")"),h=Math.max(h,g.width+o.axis.labelpadding)})),p.exit().remove(),f.maxExtent=h,f}t.exports=function(e,t,r,a){var l=t.xaxis,u=t.yaxis,h=e._fullLayout._clips;c.makeTraceGroups(a,r,"trace").each((function(t){var r=n.select(this),a=t[0],f=a.trace,g=f.aaxis,v=f.baxis,y=c.ensureSingle(r,"g","minorlayer"),b=c.ensureSingle(r,"g","majorlayer"),_=c.ensureSingle(r,"g","boundarylayer"),x=c.ensureSingle(r,"g","labellayer");r.style("opacity",f.opacity),d(l,u,b,0,"a",g._gridlines),d(l,u,b,0,"b",v._gridlines),d(l,u,y,0,"a",g._minorgridlines),d(l,u,y,0,"b",v._minorgridlines),d(l,u,_,0,"a-boundary",g._boundarylines),d(l,u,_,0,"b-boundary",v._boundarylines);var w=p(e,l,u,f,0,x,g._labels,"a-label"),k=p(e,l,u,f,0,x,v._labels,"b-label");!function(e,t,r,n,a,i,o,l){var u,d,p,h,f=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),v=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(f+g),d=v,p=r.ab2xy(u,d,!0),h=r.dxyda_rough(u,d),void 0===o.angle&&c.extendFlat(o,s(r,a,i,p,r.dxydb_rough(u,d))),m(e,t,r,0,p,h,r.aaxis,a,i,o,"a-title"),u=f,d=.5*(v+y),p=r.ab2xy(u,d,!0),h=r.dxydb_rough(u,d),void 0===l.angle&&c.extendFlat(l,s(r,a,i,p,r.dxyda_rough(u,d))),m(e,t,r,0,p,h,r.baxis,a,i,l,"b-title")}(e,x,f,0,l,u,w,k),function(e,t,r,n,a){var s,l,u,d,p=r.select("#"+e._clipPathId);p.size()||(p=r.append("clipPath").classed("carpetclip",!0));var h=c.ensureSingle(p,"path","carpetboundary"),f=t.clipsegments,m=[];for(d=0;d<f.length;d++)s=f[d],l=i([],s.x,n.c2p),u=i([],s.y,a.c2p),m.push(o(l,u,s.bicubic));var g="M"+m.join("L")+"Z";p.attr("id",e._clipPathId),h.attr("d",g)}(f,a,h,l,u)}))};var h=u.LINE_SPACING,f=(1-u.MID_SHIFT)/h+1;function m(e,t,r,i,o,c,u,d,p,m,g){var v=[];u.title.text&&v.push(u.title.text);var y=t.selectAll("text."+g).data(v),b=m.maxExtent;y.enter().append("text").classed(g,!0),y.each((function(){var t=s(r,d,p,o,c);-1===["start","both"].indexOf(u.showticklabels)&&(b=0);var i=u.title.font.size;b+=i+u.title.offset;var g=(m.angle+(m.flip<0?180:0)-t.angle+450)%360,v=g>90&&g<270,y=n.select(this);y.text(u.title.text).call(l.convertToTspans,e),v&&(b=(-l.lineCount(y)+f)*h*i-b),y.attr("transform","translate("+t.p[0]+","+t.p[1]+") rotate("+t.angle+") translate(0,"+b+")").classed("user-select-none",!0).attr("text-anchor","middle").call(a.font,u.title.font)})),y.exit().remove()}},{"../../components/drawing":612,"../../constants/alignment":685,"../../lib":716,"../../lib/svg_text_utils":740,"./makepath":915,"./map_1d_array":916,"./orient_text":917,d3:164}],919:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../lib/search").findBin,i=e("./compute_control_points"),o=e("./create_spline_evaluator"),s=e("./create_i_derivative_evaluator"),l=e("./create_j_derivative_evaluator");t.exports=function(e){var t=e._a,r=e._b,c=t.length,u=r.length,d=e.aaxis,p=e.baxis,h=t[0],f=t[c-1],m=r[0],g=r[u-1],v=t[t.length-1]-t[0],y=r[r.length-1]-r[0],b=v*n.RELATIVE_CULL_TOLERANCE,_=y*n.RELATIVE_CULL_TOLERANCE;h-=b,f+=b,m-=_,g+=_,e.isVisible=function(e,t){return e>h&&e<f&&t>m&&t<g},e.isOccluded=function(e,t){return e<h||e>f||t<m||t>g},e.setScale=function(){var t=e._x,r=e._y,n=i(e._xctrl,e._yctrl,t,r,d.smoothing,p.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=o([e._xctrl,e._yctrl],c,u,d.smoothing,p.smoothing),e.dxydi=s([e._xctrl,e._yctrl],d.smoothing,p.smoothing),e.dxydj=l([e._xctrl,e._yctrl],d.smoothing,p.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),n=e[1]-t;return(1-n)*r[t]+n*r[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(a(e,t),c-2)),n=t[r],i=t[r+1];return Math.max(0,Math.min(c-1,r+(e-n)/(i-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(a(e,r),u-2)),n=r[t],i=r[t+1];return Math.max(0,Math.min(u-1,t+(e-n)/(i-n)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(n,a,i){if(!i&&(n<t[0]||n>t[c-1]|a<r[0]||a>r[u-1]))return[!1,!1];var o=e.a2i(n),s=e.b2j(a),l=e.evalxy([],o,s);if(i){var d,p,h,f,m=0,g=0,v=[];n<t[0]?(d=0,p=0,m=(n-t[0])/(t[1]-t[0])):n>t[c-1]?(d=c-2,p=1,m=(n-t[c-1])/(t[c-1]-t[c-2])):p=o-(d=Math.max(0,Math.min(c-2,Math.floor(o)))),a<r[0]?(h=0,f=0,g=(a-r[0])/(r[1]-r[0])):a>r[u-1]?(h=u-2,f=1,g=(a-r[u-1])/(r[u-1]-r[u-2])):f=s-(h=Math.max(0,Math.min(u-2,Math.floor(s)))),m&&(e.dxydi(v,d,h,p,f),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(e.dxydj(v,d,h,p,f),l[0]+=v[0]*g,l[1]+=v[1]*g)}return l},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(r.length-2,e));return r[t+1]-r[t]},e.dxyda=function(t,r,n,a){var i=e.dxydi(null,t,r,n,a),o=e.dadi(t,n);return[i[0]/o,i[1]/o]},e.dxydb=function(t,r,n,a){var i=e.dxydj(null,t,r,n,a),o=e.dbdj(r,a);return[i[0]/o,i[1]/o]},e.dxyda_rough=function(t,r,n){var a=v*(n||.1),i=e.ab2xy(t+a,r,!0),o=e.ab2xy(t-a,r,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},e.dxydb_rough=function(t,r,n){var a=y*(n||.1),i=e.ab2xy(t,r+a,!0),o=e.ab2xy(t,r-a,!0);return[.5*(i[0]-o[0])/a,.5*(i[1]-o[1])/a]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}},{"../../lib/search":735,"./compute_control_points":907,"./constants":908,"./create_i_derivative_evaluator":909,"./create_j_derivative_evaluator":910,"./create_spline_evaluator":911}],920:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t,r){var a,i,o,s=[],l=[],c=e[0].length,u=e.length;function d(t,r){var n,a=0,i=0;return t>0&&void 0!==(n=e[r][t-1])&&(i++,a+=n),t<c-1&&void 0!==(n=e[r][t+1])&&(i++,a+=n),r>0&&void 0!==(n=e[r-1][t])&&(i++,a+=n),r<u-1&&void 0!==(n=e[r+1][t])&&(i++,a+=n),a/Math.max(1,i)}var p,h,f,m,g,v,y,b,_,x,w,k=0;for(a=0;a<c;a++)for(i=0;i<u;i++)void 0===e[i][a]&&(s.push(a),l.push(i),e[i][a]=d(a,i)),k=Math.max(k,Math.abs(e[i][a]));if(!s.length)return e;var M=0,T=0,C=s.length;do{for(M=0,o=0;o<C;o++){a=s[o],i=l[o];var S,L,A,E,D,I,P=0,O=0;0===a?(A=t[D=Math.min(c-1,2)],E=t[1],S=e[i][D],O+=(L=e[i][1])+(L-S)*(t[0]-E)/(E-A),P++):a===c-1&&(A=t[D=Math.max(0,c-3)],E=t[c-2],S=e[i][D],O+=(L=e[i][c-2])+(L-S)*(t[c-1]-E)/(E-A),P++),(0===a||a===c-1)&&i>0&&i<u-1&&(p=r[i+1]-r[i],O+=((h=r[i]-r[i-1])*e[i+1][a]+p*e[i-1][a])/(h+p),P++),0===i?(A=r[I=Math.min(u-1,2)],E=r[1],S=e[I][a],O+=(L=e[1][a])+(L-S)*(r[0]-E)/(E-A),P++):i===u-1&&(A=r[I=Math.max(0,u-3)],E=r[u-2],S=e[I][a],O+=(L=e[u-2][a])+(L-S)*(r[u-1]-E)/(E-A),P++),(0===i||i===u-1)&&a>0&&a<c-1&&(p=t[a+1]-t[a],O+=((h=t[a]-t[a-1])*e[i][a+1]+p*e[i][a-1])/(h+p),P++),P?O/=P:(f=t[a+1]-t[a],m=t[a]-t[a-1],b=(g=r[i+1]-r[i])*(v=r[i]-r[i-1])*(g+v),O=((y=f*m*(f+m))*(v*e[i+1][a]+g*e[i-1][a])+b*(m*e[i][a+1]+f*e[i][a-1]))/(b*(m+f)+y*(v+g))),M+=(x=(_=O-e[i][a])/k)*x,w=P?0:.85,e[i][a]+=_*(1+w)}M=Math.sqrt(M)}while(T++<100&&M>1e-5);return n.log("Smoother converged to",M,"after",T,"iterations"),e}},{"../../lib":716}],921:[function(e,t,r){"use strict";var n=e("../../lib").isArray1D;t.exports=function(e,t,r){var a=r("x"),i=a&&a.length,o=r("y"),s=o&&o.length;if(!i&&!s)return!1;if(t._cheater=!a,i&&!n(a)||s&&!n(o))t._length=null;else{var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),t.a&&t.a.length&&(l=Math.min(l,t.a.length)),t.b&&t.b.length&&(l=Math.min(l,t.b.length)),t._length=l}return!0}},{"../../lib":716}],922:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../scattergeo/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../plots/attributes"),s=e("../../components/color/attributes").defaultLine,l=e("../../lib/extend").extendFlat,c=a.marker.line;t.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},text:l({},a.text,{}),hovertext:l({},a.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:a.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:a.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n()},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":590,"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scattergeo/attributes":1159}],923:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,i=e("../../components/colorscale/calc"),o=e("../scatter/arrays_to_calcdata"),s=e("../scatter/calc_selection");function l(e){return e&&"string"==typeof e}t.exports=function(e,t){var r,c=t._length,u=new Array(c);r=t.geojson?function(e){return l(e)||n(e)}:l;for(var d=0;d<c;d++){var p=u[d]={},h=t.locations[d],f=t.z[d];r(h)&&n(f)?(p.loc=h,p.z=f):(p.loc=null,p.z=a),p.index=d}return o(u,t),i(e,t,{vals:t.z,containerStr:"",cLetter:"z"}),s(u,t),u}},{"../../components/colorscale/calc":599,"../../constants/numerical":692,"../scatter/arrays_to_calcdata":1117,"../scatter/calc_selection":1120,"fast-isnumeric":227}],924:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/colorscale/defaults"),i=e("./attributes");t.exports=function(e,t,r,o){function s(r,a){return n.coerce(e,t,i,r,a)}var l=s("locations"),c=s("z");l&&l.length&&n.isArrayOrTypedArray(c)&&c.length?(t._length=Math.min(l.length,c.length),s("locationmode"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),a(e,t,o,s,{prefix:"",cLetter:"z"}),n.coerceSelectionMarkerOpacity(t,s)):t.visible=!1}},{"../../components/colorscale/defaults":601,"../../lib":716,"./attributes":922}],925:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){e.location=t.location,e.z=t.z;var i=n[a];return i.fIn&&(e.properties=i.fIn.properties),e}},{}],926:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("./attributes"),i=e("../../lib").fillText;t.exports=function(e,t,r){var o,s,l,c,u=e.cd,d=u[0].trace,p=e.subplot;for(s=0;s<u.length;s++)if(c=!1,(o=u[s])._polygons){for(l=0;l<o._polygons.length;l++)o._polygons[l].contains([t,r])&&(c=!c),o._polygons[l].contains([t+360,r])&&(c=!c);if(c)break}if(c&&o)return e.x0=e.x1=e.xa.c2p(o.ct),e.y0=e.y1=e.ya.c2p(o.ct),e.index=o.index,e.location=o.loc,e.z=o.z,e.zLabel=n.tickText(p.mockAxis,p.mockAxis.c2l(o.z),"hover").text,e.hovertemplate=o.hovertemplate,function(e,t,r){if(!t.hovertemplate){var n=r.hi||t.hoverinfo,o=String(r.loc),s="all"===n?a.hoverinfo.flags:n.split("+"),l=-1!==s.indexOf("name"),c=-1!==s.indexOf("location"),u=-1!==s.indexOf("z"),d=-1!==s.indexOf("text"),p=[];!l&&c?e.nameOverride=o:(l&&(e.nameOverride=t.name),c&&p.push(o)),u&&p.push(e.zLabel),d&&i(r,t,p),e.extraText=p.join("<br>")}}(e,d,o,p.mockAxis),[e]}},{"../../lib":716,"../../plots/cartesian/axes":764,"./attributes":922}],927:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),calc:e("./calc"),plot:e("./plot").plot,style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"choropleth",basePlotModule:e("../../plots/geo"),categories:["geo","noOpacity"],meta:{}}},{"../../plots/geo":794,"../heatmap/colorbar":1001,"./attributes":922,"./calc":923,"./defaults":924,"./event_data":925,"./hover":926,"./plot":928,"./select":929,"./style":930}],928:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../lib/polygon"),o=e("../../lib/topojson_utils").getTopojsonFeatures,s=e("../../lib/geo_location_utils").locationToFeature,l=e("./style").style;function c(e,t){for(var r=e[0].trace,n=e.length,a=o(r,t),i=0;i<n;i++){var l=e[i],c=s(r.locationmode,l.loc,a);c?(l.geojson=c,l.ct=c.properties.ct,l._polygons=u(c)):l.geojson=null}}function u(e){var t,r,n,a,o=e.geometry,s=o.coordinates,l=e.id,c=[];function u(e){for(var t=0;t<e.length-1;t++)if(e[t][0]>0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===l||"FJI"===l?function(e){var t;if(null===u(e))t=e;else for(t=new Array(e.length),a=0;a<e.length;a++)t[a]=[e[a][0]<0?e[a][0]+360:e[a][0],e[a][1]];c.push(i.tester(t))}:"ATA"===l?function(e){var t=u(e);if(null===t)return c.push(i.tester(e));var r=new Array(e.length+1),n=0;for(a=0;a<e.length;a++)a>t?r[n++]=[e[a][0]+360,e[a][1]]:a===t?(r[n++]=e[a],r[n++]=[e[a][0],-90]):r[n++]=e[a];var o=i.tester(r);o.pts.pop(),c.push(o)}:function(e){c.push(i.tester(e))},o.type){case"MultiPolygon":for(r=0;r<s.length;r++)for(n=0;n<s[r].length;n++)t(s[r][n]);break;case"Polygon":for(r=0;r<s.length;r++)t(s[r])}return c}t.exports={plot:function(e,t,r){for(var i=0;i<r.length;i++)c(r[i],t.topojson);var o=t.layers.backplot.select(".choroplethlayer");a.makeTraceGroups(o,r,"trace choropleth").each((function(t){var r=n.select(this).selectAll("path.choroplethlocation").data(a.identity);r.enter().append("path").classed("choroplethlocation",!0),r.exit().remove(),l(e,t)}))},feature2polygons:u}},{"../../lib":716,"../../lib/geo_location_utils":710,"../../lib/polygon":728,"../../lib/topojson_utils":743,"./style":930,d3:164}],929:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,a,i,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)(a=(n=s[r]).ct)&&(i=l.c2p(a),o=c.c2p(a),t.contains([i,o],null,r,e)?(u.push({pointNumber:r,lon:a[0],lat:a[1]}),n.selected=1):n.selected=0);return u}},{}],930:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/color"),i=e("../../components/drawing"),o=e("../../components/colorscale");function s(e,t){var r=t[0].trace,s=t[0].node3.selectAll(".choroplethlocation"),l=r.marker||{},c=l.line||{},u=o.makeColorScaleFuncFromTrace(r);s.each((function(e){n.select(this).attr("fill",u(e.z)).call(a.stroke,e.mlc||c.color).call(i.dashLine,"",e.mlw||c.width||0).style("opacity",l.opacity)})),i.selectedPointStyle(s,r,e)}t.exports={style:function(e,t){t&&s(e,t)},styleOnSelect:function(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?i.selectedPointStyle(r.selectAll(".choroplethlocation"),n,e):s(e,t)}}},{"../../components/color":591,"../../components/colorscale":603,"../../components/drawing":612,d3:164}],931:[function(e,t,r){"use strict";var n=e("../choropleth/attributes"),a=e("../../components/colorscale/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../lib/extend").extendFlat;t.exports=o({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},below:{valType:"string",editType:"plot"},text:n.text,hovertext:n.hovertext,marker:{line:{color:o({},n.marker.line.color,{editType:"plot"}),width:o({},n.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:o({},n.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:o({},n.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:o({},n.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:n.hoverinfo,hovertemplate:i({},{keys:["properties"]})},a("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/template_attributes":840,"../choropleth/attributes":922}],932:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("@turf/area"),i=e("@turf/centroid"),o=e("../../lib"),s=e("../../components/colorscale"),l=e("../../components/drawing"),c=e("../../lib/geojson_utils").makeBlank,u=e("../choropleth/plot").feature2polygons;function d(e){var t,r=e[0].trace,n=r._opts;if(r.selectedpoints){for(var a=l.makeSelectedPointStyleFns(r),i=0;i<e.length;i++){var s=e[i];s.fOut&&(s.fOut.properties.mo2=a.selectedOpacityFn(s))}t={type:"identity",property:"mo2"}}else t=o.isArrayOrTypedArray(r.marker.opacity)?{type:"identity",property:"mo"}:r.marker.opacity;return o.extendFlat(n.fill.paint,{"fill-opacity":t}),o.extendFlat(n.line.paint,{"line-opacity":t}),n}t.exports={convert:function(e){var t=e[0].trace,r=!0===t.visible&&0!==t._length,l={layout:{visibility:"none"},paint:{}},p={layout:{visibility:"none"},paint:{}},h=t._opts={fill:l,line:p,geojson:c()};if(!r)return h;var f="string"==typeof t.geojson?(window.PlotlyGeoAssets||{})[t.geojson]:t.geojson;if(!o.isPlainObject(f))return o.error("Oops ... something when wrong when fetching "+t.geojson),h;var m,g={},v=[];for(m=0;m<e.length;m++){var y=e[m];y.loc&&(g[y.loc]=y)}var b,_,x,w=s.makeColorScaleFuncFromTrace(t),k=t.marker,M=k.line||{};function T(e){var t=g[e.id];if(t){var r=e.geometry;if("Polygon"===r.type||"MultiPolygon"===r.type){var n={fc:w(t.z)};b&&(n.mo=b(t)),_&&(n.mlc=_(t)),x&&(n.mlw=x(t));var s={type:"Feature",geometry:r,properties:n};t._polygons=u(s),t.ct=function(e){var t,r=e.geometry;if("MultiPolygon"===r.type)for(var n=r.coordinates,o=0,s=0;s<n.length;s++){var l={type:"Polygon",coordinates:n[s]},c=a.default(l);c>o&&(o=c,t=l)}else t=r;return i.default(t).geometry.coordinates}(s),t.fIn=e,t.fOut=s,v.push(s)}else o.log(["Location with id",t.loc,"does not have a valid GeoJSON geometry,","choroplethmapbox traces only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete g[e.id]}switch(o.isArrayOrTypedArray(k.opacity)&&(b=function(e){var t=e.mo;return n(t)?+o.constrain(t,0,1):0}),o.isArrayOrTypedArray(M.color)&&(_=function(e){return e.mlc}),o.isArrayOrTypedArray(M.width)&&(x=function(e){return e.mlw}),f.type){case"FeatureCollection":var C=f.features;for(m=0;m<C.length;m++)T(C[m]);break;case"Feature":T(f);break;default:return o.warn(["Invalid GeoJSON type",(f.type||"none")+",","choroplethmapbox traces only support *FeatureCollection* and *Feature* types."].join(" ")),h}for(var S in g)o.log("Location with id "+S+" does not have a matching feature");var L=b?{type:"identity",property:"mo"}:k.opacity;return o.extendFlat(l.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":L}),o.extendFlat(p.paint,{"line-color":_?{type:"identity",property:"mlc"}:M.color,"line-width":x?{type:"identity",property:"mlw"}:M.width,"line-opacity":L}),l.layout.visibility="visible",p.layout.visibility="visible",h.geojson={type:"FeatureCollection",features:v},d(e),h},convertOnSelect:d}},{"../../components/colorscale":603,"../../components/drawing":612,"../../lib":716,"../../lib/geojson_utils":711,"../choropleth/plot":928,"@turf/area":57,"@turf/centroid":58,"fast-isnumeric":227}],933:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/colorscale/defaults"),i=e("./attributes");t.exports=function(e,t,r,o){function s(r,a){return n.coerce(e,t,i,r,a)}var l=s("locations"),c=s("z"),u=s("geojson");n.isArrayOrTypedArray(l)&&l.length&&n.isArrayOrTypedArray(c)&&c.length&&("string"==typeof u&&""!==u||n.isPlainObject(u))?(t._length=Math.min(l.length,c.length),s("below"),s("text"),s("hovertext"),s("hovertemplate"),s("marker.line.width")&&s("marker.line.color"),s("marker.opacity"),a(e,t,o,s,{prefix:"",cLetter:"z"}),n.coerceSelectionMarkerOpacity(t,s)):t.visible=!1}},{"../../components/colorscale/defaults":601,"../../lib":716,"./attributes":931}],934:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),calc:e("../choropleth/calc"),plot:e("./plot"),hoverPoints:e("../choropleth/hover"),eventData:e("../choropleth/event_data"),selectPoints:e("../choropleth/select"),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var a=r[n].id;if("string"==typeof a&&0===a.indexOf("water"))for(var i=n+1;i<r.length;i++)if("string"==typeof(a=r[i].id)&&-1===a.indexOf("plotly-"))return a}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl","noOpacity"],meta:{hr_name:"choropleth_mapbox"}}},{"../../plots/mapbox":819,"../choropleth/calc":923,"../choropleth/event_data":925,"../choropleth/hover":926,"../choropleth/select":929,"../heatmap/colorbar":1001,"./attributes":931,"./defaults":933,"./plot":935}],935:[function(e,t,r){"use strict";var n=e("./convert").convert,a=e("./convert").convertOnSelect,i=e("../../plots/mapbox/constants").traceLayerPrefix;function o(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",i+t+"-fill"],["line",i+t+"-line"]],this.below=null}var s=o.prototype;s.update=function(e){this._update(n(e))},s.updateOnSelect=function(e){this._update(a(e))},s._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var a=0;a<r.length;a++){var i=r[a],o=i[0],s=i[1],l=e[o];t.setOptions(s,"setLayoutProperty",l.layout),"visible"===l.layout.visibility&&t.setOptions(s,"setPaintProperty",l.paint)}},s._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,a=this.sourceId,i=0;i<n.length;i++){var o=n[i],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:a,layout:l.layout,paint:l.paint},t)}},s._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},s.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var r=t[0].trace,a=new o(e,r.uid),i=a.sourceId,s=n(t),l=a.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(i,{type:"geojson",data:s.geojson}),a._addLayers(s,l),t[0].trace._glTrace=a,a}},{"../../plots/mapbox/constants":817,"./convert":932}],936:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../mesh3d/attributes"),o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(e){l[e]=i[e]})),l.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,t.exports=l},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../mesh3d/attributes":1059}],937:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc");t.exports=function(e,t){for(var r=t.u,a=t.v,i=t.w,o=Math.min(t.x.length,t.y.length,t.z.length,r.length,a.length,i.length),s=-1/0,l=1/0,c=0;c<o;c++){var u=r[c],d=a[c],p=i[c],h=Math.sqrt(u*u+d*d+p*p);s=Math.max(s,h),l=Math.min(l,h)}t._len=o,t._normMax=s,n(e,t,{vals:[l,s],containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":599}],938:[function(e,t,r){"use strict";var n=e("gl-cone3d"),a=e("gl-cone3d").createConeMesh,i=e("../../lib").simpleMap,o=e("../../lib/gl_format_color").parseColorScale,s=e("../../components/colorscale").extractOpts,l=e("../../plots/gl3d/zip3");function c(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var u=c.prototype;u.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],a=this.data.z[t],i=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,a,i,o,s,Math.sqrt(i*i+o*o+s*s)];var l=this.data.hovertext||this.data.text;return Array.isArray(l)&&void 0!==l[t]?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var d={xaxis:0,yaxis:1,zaxis:2},p={tip:1,tail:0,cm:.25,center:.5},h={tip:1,tail:1,cm:.75,center:.5};function f(e,t){var r=e.fullSceneLayout,a=e.dataScale,c={};function u(e,t){var n=r[t],o=a[d[t]];return i(e,(function(e){return n.d2l(e)*o}))}c.vectors=l(u(t.u,"xaxis"),u(t.v,"yaxis"),u(t.w,"zaxis"),t._len),c.positions=l(u(t.x,"xaxis"),u(t.y,"yaxis"),u(t.z,"zaxis"),t._len);var f=s(t);c.colormap=o(t),c.vertexIntensityBounds=[f.min/t._normMax,f.max/t._normMax],c.coneOffset=p[t.anchor],"scaled"===t.sizemode?c.coneSize=t.sizeref||.5:c.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5;var m=n(c),g=t.lightposition;return m.lightPosition=[g.x,g.y,g.z],m.ambient=t.lighting.ambient,m.diffuse=t.lighting.diffuse,m.specular=t.lighting.specular,m.roughness=t.lighting.roughness,m.fresnel=t.lighting.fresnel,m.opacity=t.opacity,t._pad=h[t.anchor]*m.vectorScale*m.coneScale*t._normMax,m}u.update=function(e){this.data=e;var t=f(this.scene,e);this.mesh.update(t)},u.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var r=e.glplot.gl,n=f(e,t),i=a(r,n),o=new c(e,t.uid);return o.mesh=i,o.data=t,i._trace=o,e.glplot.add(i),o}},{"../../components/colorscale":603,"../../lib":716,"../../lib/gl_format_color":713,"../../plots/gl3d/zip3":815,"gl-cone3d":244}],939:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/colorscale/defaults"),i=e("./attributes");t.exports=function(e,t,r,o){function s(r,a){return n.coerce(e,t,i,r,a)}var l=s("u"),c=s("v"),u=s("w"),d=s("x"),p=s("y"),h=s("z");l&&l.length&&c&&c.length&&u&&u.length&&d&&d.length&&p&&p.length&&h&&h.length?(s("sizeref"),s("sizemode"),s("anchor"),s("lighting.ambient"),s("lighting.diffuse"),s("lighting.specular"),s("lighting.roughness"),s("lighting.fresnel"),s("lightposition.x"),s("lightposition.y"),s("lightposition.z"),a(e,t,o,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),t._length=null):t.visible=!1}},{"../../components/colorscale/defaults":601,"../../lib":716,"./attributes":936}],940:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"cone",basePlotModule:e("../../plots/gl3d"),categories:["gl3d"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:e("./calc"),plot:e("./convert"),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}},{"../../plots/gl3d":804,"./attributes":936,"./calc":937,"./convert":938,"./defaults":939}],941:[function(e,t,r){"use strict";var n=e("../heatmap/attributes"),a=e("../scatter/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../components/drawing/attributes").dash,s=e("../../plots/font_attributes"),l=e("../../lib/extend").extendFlat,c=e("../../constants/filter_ops"),u=c.COMPARISON_OPS2,d=c.INTERVAL_OPS,p=(e("../../constants/docs").FORMAT_LINK,a.line);t.exports=l({z:n.z,x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,xtype:n.xtype,ytype:n.ytype,zhoverformat:n.zhoverformat,hovertemplate:n.hovertemplate,hoverongaps:n.hoverongaps,connectgaps:l({},n.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:s({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot"},operation:{valType:"enumerated",values:[].concat(u).concat(d),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:l({},p.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:o,smoothing:l({},p.smoothing,{}),editType:"plot"}},i("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":598,"../../components/drawing/attributes":611,"../../constants/docs":687,"../../constants/filter_ops":688,"../../lib/extend":707,"../../plots/font_attributes":790,"../heatmap/attributes":998,"../scatter/attributes":1118}],942:[function(e,t,r){"use strict";var n=e("../../components/colorscale"),a=e("../heatmap/calc"),i=e("./set_contours"),o=e("./end_plus");t.exports=function(e,t){var r=a(e,t),s=r[0].z;i(t,s);var l,c=t.contours,u=n.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var d=c.start,p=o(c),h=c.size||1,f=Math.floor((p-d)/h)+1;isFinite(h)||(h=1,f=1);var m=d-h/2;l=[m,m+f*h]}else l=s;return n.calc(e,t,{vals:l,cLetter:"z"}),r}},{"../../components/colorscale":603,"../heatmap/calc":999,"./end_plus":952,"./set_contours":960}],943:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n=e[0],a=n.z;switch(t.type){case"levels":var i=Math.min(a[0][0],a[0][1]);for(r=0;r<e.length;r++){var o=e[r];o.prefixBoundary=!o.edgepaths.length&&(i>o.level||o.starts.length&&i===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r<l;r++)u=Math.min(u,a[r][0]),u=Math.min(u,a[r][s-1]),c=Math.max(c,a[r][0]),c=Math.max(c,a[r][s-1]);for(r=1;r<s-1;r++)u=Math.min(u,a[0][r]),u=Math.min(u,a[l-1][r]),c=Math.max(c,a[0][r]),c=Math.max(c,a[l-1][r]);var d,p,h=t.value;switch(t._operation){case">":h>c&&(n.prefixBoundary=!0);break;case"<":(h<u||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case"[]":d=Math.min(h[0],h[1]),((p=Math.max(h[0],h[1]))<u||d>c||n.starts.length&&p===u)&&(n.prefixBoundary=!0);break;case"][":d=Math.min(h[0],h[1]),p=Math.max(h[0],h[1]),d<u&&p>c&&(n.prefixBoundary=!0)}}}},{}],944:[function(e,t,r){"use strict";var n=e("../../components/colorscale").extractOpts,a=e("./make_color_map"),i=e("./end_plus");t.exports={min:"zmin",max:"zmax",calc:function(e,t,r){var o=t.contours,s=t.line,l=o.size||1,c=o.coloring,u=a(t,{isColorbar:!0});if("heatmap"===c){var d=n(t);r._fillgradient=t.colorscale,r._zrange=[d.min,d.max]}else"fill"===c&&(r._fillcolor=u);r._line={color:"lines"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:i(o),size:l}}}},{"../../components/colorscale":603,"./end_plus":952,"./make_color_map":957}],945:[function(e,t,r){"use strict";t.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],946:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("./label_defaults"),i=e("../../components/color"),o=i.addOpacity,s=i.opacity,l=e("../../constants/filter_ops"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;t.exports=function(e,t,r,i,l,d){var p,h,f,m=t.contours,g=r("contours.operation");m._operation=c[g],function(e,t){var r;-1===u.indexOf(t.operation)?(e("contours.value",[0,1]),Array.isArray(t.value)?t.value.length>2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:n(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),n(t.value)||(Array.isArray(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(r,m),"="===g?p=m.showlines=!0:(p=r("contours.showlines"),f=r("fillcolor",o((e.line||{}).color||l,.5))),p&&(h=r("line.color",f&&s(f)?o(t.fillcolor,1):l),r("line.width",2),r("line.dash")),r("line.smoothing"),a(r,i,h,d)}},{"../../components/color":591,"../../constants/filter_ops":688,"./label_defaults":956,"fast-isnumeric":227}],947:[function(e,t,r){"use strict";var n=e("../../constants/filter_ops"),a=e("fast-isnumeric");function i(e,t){var r,i=Array.isArray(t);function o(e){return a(e)?+e:null}return-1!==n.COMPARISON_OPS2.indexOf(e)?r=o(i?t[0]:t):-1!==n.INTERVAL_OPS.indexOf(e)?r=i?[o(t[0]),o(t[1])]:[o(t),o(t)]:-1!==n.SET_OPS.indexOf(e)&&(r=i?t.map(o):[o(t)]),r}function o(e){return function(t){t=i(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function s(e){return function(t){return{start:t=i(e,t),end:1/0,size:1/0}}}t.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":688,"fast-isnumeric":227}],948:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var a=n("contours.start"),i=n("contours.end"),o=!1===a||!1===i,s=r("contours.size");!(o?t.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},{}],949:[function(e,t,r){"use strict";var n=e("../../lib");function a(e){return n.extendFlat({},e,{edgepaths:n.extendDeep([],e.edgepaths),paths:n.extendDeep([],e.paths),starts:n.extendDeep([],e.starts)})}t.exports=function(e,t){var r,i,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&n.warn("Contour data invalid for the specified inequality operation."),i=e[0],r=0;r<i.edgepaths.length;r++)i.edgepaths[r]=s(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=s(i.paths[r]);for(r=0;r<i.starts.length;r++)i.starts[r]=s(i.starts[r]);return e;case"][":var c=s;s=l,l=c;case"[]":for(2!==e.length&&n.warn("Contour data invalid for the specified inequality range operation."),i=a(e[0]),o=a(e[1]),r=0;r<i.edgepaths.length;r++)i.edgepaths[r]=s(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=s(i.paths[r]);for(r=0;r<i.starts.length;r++)i.starts[r]=s(i.starts[r]);for(;o.edgepaths.length;)i.edgepaths.push(l(o.edgepaths.shift()));for(;o.paths.length;)i.paths.push(l(o.paths.shift()));for(;o.starts.length;)i.starts.push(l(o.starts.shift()));return[i]}}},{"../../lib":716}],950:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../heatmap/xyz_defaults"),i=e("./constraint_defaults"),o=e("./contours_defaults"),s=e("./style_defaults"),l=e("./attributes");t.exports=function(e,t,r,c){function u(r,a){return n.coerce(e,t,l,r,a)}if(a(e,t,u,c)){u("text"),u("hovertext"),u("hovertemplate"),u("hoverongaps");var d="constraint"===u("contours.type");u("connectgaps",n.isArray1D(t.z)),d?i(e,t,u,c,r):(o(e,t,u,(function(r){return n.coerce2(e,t,l,r)})),s(e,t,u,c))}else t.visible=!1}},{"../../lib":716,"../heatmap/xyz_defaults":1012,"./attributes":941,"./constraint_defaults":946,"./contours_defaults":948,"./style_defaults":962}],951:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./constraint_mapping"),i=e("./end_plus");t.exports=function(e,t,r){for(var o="constraint"===e.type?a[e._operation](e.value):e,s=o.size,l=[],c=i(o),u=r.trace._carpetTrace,d=u?{xaxis:u.aaxis,yaxis:u.baxis,x:r.a,y:r.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:r.x,y:r.y},p=o.start;p<c;p+=s)if(l.push(n.extendFlat({level:p,crossings:{},starts:[],edgepaths:[],paths:[],z:r.z,smoothing:r.trace.line.smoothing},d)),l.length>1e3){n.warn("Too many contours, clipping at 1000",e);break}return l}},{"../../lib":716,"./constraint_mapping":947,"./end_plus":952}],952:[function(e,t,r){"use strict";t.exports=function(e){return e.end+e.size/1e6}},{}],953:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./constants");function i(e,t,r,n){return Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<n}function o(e,t,r,o,l){var c,u=t.join(","),d=e.crossings[u],p=function(e,t,r){var n=0,i=0;return e>20&&t?208===e||1114===e?n=0===r[0]?1:-1:i=0===r[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(e)?i=1:-1!==a.LEFTSTART.indexOf(e)?n=1:-1!==a.TOPSTART.indexOf(e)?i=-1:n=-1,[n,i]}(d,r,t),h=[s(e,t,[-p[0],-p[1]])],f=e.z.length,m=e.z[0].length,g=t.slice(),v=p.slice();for(c=0;c<1e4;c++){if(d>20?(d=a.CHOOSESADDLE[d][(p[0]||p[1])<0?0:1],e.crossings[u]=a.SADDLEREMAINDER[d]):delete e.crossings[u],!(p=a.NEWDELTA[d])){n.log("Found bad marching index:",d,t,e.level);break}h.push(s(e,t,p)),t[0]+=p[0],t[1]+=p[1],u=t.join(","),i(h[h.length-1],h[h.length-2],o,l)&&h.pop();var y=p[0]&&(t[0]<0||t[0]>m-2)||p[1]&&(t[1]<0||t[1]>f-2);if(t[0]===g[0]&&t[1]===g[1]&&p[0]===v[0]&&p[1]===v[1]||r&&y)break;d=e.crossings[u]}1e4===c&&n.log("Infinite loop in contour?");var b,_,x,w,k,M,T,C,S,L,A,E,D,I,P,O=i(h[0],h[h.length-1],o,l),R=0,F=.2*e.smoothing,z=[],N=0;for(c=1;c<h.length;c++)E=h[c],D=h[c-1],I=void 0,P=void 0,I=E[2]-D[2],P=E[3]-D[3],R+=T=Math.sqrt(I*I+P*P),z.push(T);var j=R/z.length*F;function B(e){return h[e%h.length]}for(c=h.length-2;c>=N;c--)if((b=z[c])<j){for(x=0,_=c-1;_>=N&&b+z[_]<j;_--)b+=z[_];if(O&&c===h.length-2)for(x=0;x<_&&b+z[x]<j;x++)b+=z[x];k=c-_+x+1,M=Math.floor((c+_+x+2)/2),w=O||c!==h.length-2?O||-1!==_?k%2?B(M):[(B(M)[0]+B(M+1)[0])/2,(B(M)[1]+B(M+1)[1])/2]:h[0]:h[h.length-1],h.splice(_+1,c-_+1,w),c=_+1,x&&(N=x),O&&(c===h.length-2?h[x]=h[h.length-1]:0===c&&(h[h.length-1]=h[0]))}for(h.splice(0,N),c=0;c<h.length;c++)h[c].length=2;if(!(h.length<2))if(O)h.pop(),e.paths.push(h);else{r||n.log("Unclosed interior contour?",e.level,g.join(","),h.join("L"));var Y=!1;for(C=0;C<e.edgepaths.length;C++)if(L=e.edgepaths[C],!Y&&i(L[0],h[h.length-1],o,l)){h.pop(),Y=!0;var H=!1;for(S=0;S<e.edgepaths.length;S++)if(i((A=e.edgepaths[S])[A.length-1],h[0],o,l)){H=!0,h.shift(),e.edgepaths.splice(C,1),S===C?e.paths.push(h.concat(A)):(S>C&&S--,e.edgepaths[S]=A.concat(h,L));break}H||(e.edgepaths[C]=h.concat(L))}for(C=0;C<e.edgepaths.length&&!Y;C++)i((L=e.edgepaths[C])[L.length-1],h[0],o,l)&&(h.shift(),e.edgepaths[C]=L.concat(h),Y=!0);Y||e.edgepaths.push(h)}}function s(e,t,r){var n=t[0]+Math.max(r[0],0),a=t[1]+Math.max(r[1],0),i=e.z[a][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-i)/(e.z[a][n+1]-i);return[o.c2p((1-l)*e.x[n]+l*e.x[n+1],!0),s.c2p(e.y[a],!0),n+l,a]}var c=(e.level-i)/(e.z[a+1][n]-i);return[o.c2p(e.x[n],!0),s.c2p((1-c)*e.y[a]+c*e.y[a+1],!0),n,a+c]}t.exports=function(e,t,r){var a,i,s,l;for(t=t||.01,r=r||.01,i=0;i<e.length;i++){for(s=e[i],l=0;l<s.starts.length;l++)o(s,s.starts[l],"edge",t,r);for(a=0;Object.keys(s.crossings).length&&a<1e4;)a++,o(s,Object.keys(s.crossings)[0].split(",").map(Number),void 0,t,r);1e4===a&&n.log("Infinite loop in contour?")}}},{"../../lib":716,"./constants":945}],954:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../heatmap/hover");t.exports=function(e,t,r,i,o){var s=a(e,t,r,i,o,!0);return s&&s.forEach((function(e){var t=e.trace;"constraint"===t.contours.type&&(t.fillcolor&&n.opacity(t.fillcolor)?e.color=n.addOpacity(t.fillcolor,1):t.contours.showlines&&n.opacity(t.line.color)&&(e.color=n.addOpacity(t.line.color,1)))})),s}},{"../../components/color":591,"../heatmap/hover":1005}],955:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot").plot,style:e("./style"),colorbar:e("./colorbar"),hoverPoints:e("./hover"),moduleType:"trace",name:"contour",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},{"../../plots/cartesian":775,"./attributes":941,"./calc":942,"./colorbar":944,"./defaults":950,"./hover":954,"./plot":959,"./style":961}],956:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t,r,a){if(a||(a={}),e("contours.showlabels")){var i=t.font;n.coerceFont(e,"contours.labelfont",{family:i.family,size:i.size,color:r}),e("contours.labelformat")}!1!==a.hasHover&&e("zhoverformat")}},{"../../lib":716}],957:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/colorscale"),i=e("./end_plus");t.exports=function(e){var t=e.contours,r=t.start,o=i(t),s=t.size||1,l=Math.floor((o-r)/s)+1,c="lines"===t.coloring?0:1,u=a.extractOpts(e);isFinite(s)||(s=1,l=1);var d,p,h=u.reversescale?a.flipScale(u.colorscale):u.colorscale,f=h.length,m=new Array(f),g=new Array(f);if("heatmap"===t.coloring){var v=u.min,y=u.max;for(p=0;p<f;p++)d=h[p],m[p]=d[0]*(y-v)+v,g[p]=d[1];var b=n.extent([v,y,t.start,t.start+s*(l-1)]),_=b[v<y?0:1],x=b[v<y?1:0];_!==v&&(m.splice(0,0,_),g.splice(0,0,g[0])),x!==y&&(m.push(x),g.push(g[g.length-1]))}else for(p=0;p<f;p++)d=h[p],m[p]=(d[0]*(l+c-1)-c/2)*s+r,g[p]=d[1];return a.makeColorScaleFunc({domain:m,range:g},{noNumericCheck:!0})}},{"../../components/colorscale":603,"./end_plus":952,d3:164}],958:[function(e,t,r){"use strict";var n=e("./constants");function a(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}t.exports=function(e){var t,r,i,o,s,l,c,u,d,p=e[0].z,h=p.length,f=p[0].length,m=2===h||2===f;for(r=0;r<h-1;r++)for(o=[],0===r&&(o=o.concat(n.BOTTOMSTART)),r===h-2&&(o=o.concat(n.TOPSTART)),t=0;t<f-1;t++)for(i=o.slice(),0===t&&(i=i.concat(n.LEFTSTART)),t===f-2&&(i=i.concat(n.RIGHTSTART)),s=t+","+r,l=[[p[r][t],p[r][t+1]],[p[r+1][t],p[r+1][t+1]]],d=0;d<e.length;d++)(c=a((u=e[d]).level,l))&&(u.crossings[s]=c,-1!==i.indexOf(c)&&(u.starts.push([t,r]),m&&-1!==i.indexOf(c,i.indexOf(c)+1)&&u.starts.push([t,r])))}},{"./constants":945}],959:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../../components/colorscale"),s=e("../../lib/svg_text_utils"),l=e("../../plots/cartesian/axes"),c=e("../../plots/cartesian/set_convert"),u=e("../heatmap/plot"),d=e("./make_crossings"),p=e("./find_all_paths"),h=e("./empty_pathinfo"),f=e("./convert_to_constraints"),m=e("./close_boundaries"),g=e("./constants"),v=g.LABELOPTIMIZER;function y(e,t){var r,n,o,s,l,c,u,d="",p=0,h=e.edgepaths.map((function(e,t){return t})),f=!0;function m(e){return Math.abs(e[1]-t[2][1])<.01}function g(e){return Math.abs(e[0]-t[0][0])<.01}function v(e){return Math.abs(e[0]-t[2][0])<.01}for(;h.length;){for(c=i.smoothopen(e.edgepaths[p],e.smoothing),d+=f?c:c.replace(/^M/,"L"),h.splice(h.indexOf(p),1),r=e.edgepaths[p][e.edgepaths[p].length-1],s=-1,o=0;o<4;o++){if(!r){a.log("Missing end?",p,e);break}for(u=r,Math.abs(u[1]-t[0][1])<.01&&!v(r)?n=t[1]:g(r)?n=t[0]:m(r)?n=t[3]:v(r)&&(n=t[2]),l=0;l<e.edgepaths.length;l++){var y=e.edgepaths[l][0];Math.abs(r[0]-n[0])<.01?Math.abs(r[0]-y[0])<.01&&(y[1]-r[1])*(n[1]-y[1])>=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):a.log("endpt to newendpt is not vert. or horz.",r,n,y)}if(r=n,s>=0)break;d+="L"+n}if(s===e.edgepaths.length){a.log("unclosed perimeter path");break}p=s,(f=-1===h.indexOf(p))&&(p=h[0],d+="Z")}for(p=0;p<e.paths.length;p++)d+=i.smoothclosed(e.paths[p],e.smoothing);return d}function b(e,t,r,n){var i=t.width/2,o=t.height/2,s=e.x,l=e.y,c=e.theta,u=Math.cos(c)*i,d=Math.sin(c)*i,p=(s>n.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),h=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(d)+Math.cos(c)*o);if(p<1||h<1)return 1/0;var f=v.EDGECOST*(1/(p-1)+1/(h-1));f+=v.ANGLECOST*c*c;for(var m=s-u,g=l-d,y=s+u,b=l+d,_=0;_<r.length;_++){var x=r[_],w=Math.cos(x.theta)*x.width/2,k=Math.sin(x.theta)*x.width/2,M=2*a.segmentDistance(m,g,y,b,x.x-w,x.y-k,x.x+w,x.y+k)/(t.height+x.height),T=x.level===t.level,C=T?v.SAMELEVELDISTANCE:1;if(M<=C)return 1/0;f+=v.NEIGHBORCOST*(T?v.SAMELEVELFACTOR:1)/(M-C)}return f}function _(e){var t,r,n=e.trace._emptypoints,a=[],i=e.z.length,o=e.z[0].length,s=[];for(t=0;t<o;t++)s.push(1);for(t=0;t<i;t++)a.push(s.slice());for(t=0;t<n.length;t++)a[(r=n[t])[0]][r[1]]=0;return e.zmask=a,a}r.plot=function(e,t,o,s){var l=t.xaxis,c=t.yaxis;a.makeTraceGroups(s,o,"contour").each((function(o){var s=n.select(this),v=o[0],b=v.trace,x=v.x,w=v.y,k=b.contours,M=h(k,t,v),T=a.ensureSingle(s,"g","heatmapcoloring"),C=[];"heatmap"===k.coloring&&(C=[o]),u(e,t,C,T),d(M),p(M);var S=l.c2p(x[0],!0),L=l.c2p(x[x.length-1],!0),A=c.c2p(w[0],!0),E=c.c2p(w[w.length-1],!0),D=[[S,E],[L,E],[L,A],[S,A]],I=M;"constraint"===k.type&&(I=f(M,k._operation)),function(e,t,r){var n=a.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"===r.coloring?[0]:[]);n.enter().append("path"),n.exit().remove(),n.attr("d","M"+t.join("L")+"Z").style("stroke","none")}(s,D,k),function(e,t,r,i){var o="fill"===i.coloring||"constraint"===i.type&&"="!==i._operation,s="M"+r.join("L")+"Z";o&&m(t,i);var l=a.ensureSingle(e,"g","contourfill").selectAll("path").data(o?t:[]);l.enter().append("path"),l.exit().remove(),l.each((function(e){var t=(e.prefixBoundary?s:"")+y(e,r);t?n.select(this).attr("d",t).style("stroke","none"):n.select(this).remove()}))}(s,I,D,k),function(e,t,o,s,l){var c=a.ensureSingle(e,"g","contourlines"),u=!1!==l.showlines,d=l.showlabels,p=u&&d,h=r.createLines(c,u||d,t),f=r.createLineClip(c,p,o,s.trace.uid),m=e.selectAll("g.contourlabels").data(d?[0]:[]);if(m.exit().remove(),m.enter().append("g").classed("contourlabels",!0),d){var v=[],y=[];a.clearLocationCache();var b=r.labelFormatter(o,s),_=i.tester.append("text").attr("data-notex",1).call(i.font,l.labelfont),x=t[0].xaxis,w=t[0].yaxis,k=x._length,M=w._length,T=x.range,C=w.range,S=a.aggNums(Math.min,null,s.x),L=a.aggNums(Math.max,null,s.x),A=a.aggNums(Math.min,null,s.y),E=a.aggNums(Math.max,null,s.y),D=Math.max(x.c2p(S,!0),0),I=Math.min(x.c2p(L,!0),k),P=Math.max(w.c2p(E,!0),0),O=Math.min(w.c2p(A,!0),M),R={};T[0]<T[1]?(R.left=D,R.right=I):(R.left=I,R.right=D),C[0]<C[1]?(R.top=P,R.bottom=O):(R.top=O,R.bottom=P),R.middle=(R.top+R.bottom)/2,R.center=(R.left+R.right)/2,v.push([[R.left,R.top],[R.right,R.top],[R.right,R.bottom],[R.left,R.bottom]]);var F=Math.sqrt(k*k+M*M),z=g.LABELDISTANCE*F/Math.max(1,t.length/g.LABELINCREASE);h.each((function(e){var t=r.calcTextOpts(e.level,b,_,o);n.select(this).selectAll("path").each((function(){var e=a.getVisibleSegment(this,R,t.height/2);if(e&&!(e.len<(t.width+t.height)*g.LABELMIN))for(var n=Math.min(Math.ceil(e.len/z),g.LABELMAX),i=0;i<n;i++){var o=r.findBestTextLocation(this,e,t,y,R);if(!o)break;r.addLabelData(o,t,y,v)}}))})),_.remove(),r.drawLabels(m,y,o,f,p?v:null)}d&&!u&&h.remove()}(s,M,e,v,k),function(e,t,r,n,o){var s=n.trace,l=r._fullLayout._clips,c="clip"+s.uid,u=l.selectAll("#"+c).data(s.connectgaps?[]:[0]);if(u.enter().append("clipPath").classed("contourclip",!0).attr("id",c),u.exit().remove(),!1===s.connectgaps){var h={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:t.xaxis,yaxis:t.yaxis,x:n.x,y:n.y,z:_(n),smoothing:0};d([h]),p([h]),m([h],{type:"levels"}),a.ensureSingle(u,"path","").attr("d",(h.prefixBoundary?"M"+o.join("L")+"Z":"")+y(h,o))}else c=null;i.setClipUrl(e,c,r)}(s,t,e,v,D)}))},r.createLines=function(e,t,r){var n=r[0].smoothing,a=e.selectAll("g.contourlevel").data(t?r:[]);if(a.exit().remove(),a.enter().append("g").classed("contourlevel",!0),t){var o=a.selectAll("path.openline").data((function(e){return e.pedgepaths||e.edgepaths}));o.exit().remove(),o.enter().append("path").classed("openline",!0),o.attr("d",(function(e){return i.smoothopen(e,n)})).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke");var s=a.selectAll("path.closedline").data((function(e){return e.ppaths||e.paths}));s.exit().remove(),s.enter().append("path").classed("closedline",!0),s.attr("d",(function(e){return i.smoothclosed(e,n)})).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke")}return a},r.createLineClip=function(e,t,r,n){var a=t?"clipline"+n:null,o=r._fullLayout._clips.selectAll("#"+a).data(t?[0]:[]);return o.exit().remove(),o.enter().append("clipPath").classed("contourlineclip",!0).attr("id",a),i.setClipUrl(e,a,r),o},r.labelFormatter=function(e,t){var r=e._fullLayout,n=t.trace,a=n.contours;if(a.labelformat)return r._d3locale.numberFormat(a.labelformat);var i,s=o.extractOpts(n);if(s&&s.colorbar&&s.colorbar._axis)i=s.colorbar._axis;else{if(i={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"},"constraint"===a.type){var u=a.value;Array.isArray(u)?i.range=[u[0],u[u.length-1]]:i.range=[u,u]}else i.range=[a.start,a.end],i.nticks=(a.end-a.start)/a.size;i.range[0]===i.range[1]&&(i.range[1]+=i.range[0]||1),i.nticks||(i.nticks=1e3),c(i,r),l.prepTicks(i),i._tmin=null,i._tmax=null}return function(e){return l.tickText(i,e).text}},r.calcTextOpts=function(e,t,r,n){var a=t(e);r.text(a).call(s.convertToTspans,n);var o=i.bBox(r.node(),!0);return{text:a,width:o.width,height:o.height,level:e,dy:(o.top+o.bottom)/2}},r.findBestTextLocation=function(e,t,r,n,i){var o,s,l,c,u,d=r.width;t.isClosed?(s=t.len/v.INITIALSEARCHPOINTS,o=t.min+s/2,l=t.max):(s=(t.len-d)/(v.INITIALSEARCHPOINTS+1),o=t.min+s+d/2,l=t.max-(s+d)/2);for(var p=1/0,h=0;h<v.ITERATIONS;h++){for(var f=o;f<l;f+=s){var m=a.getTextLocation(e,t.total,f,d),g=b(m,r,n,i);g<p&&(p=g,u=m,c=f)}if(p>2*v.MAXCOST)break;h&&(s/=2),l=(o=c-s/2)+1.5*s}if(p<=v.MAXCOST)return u},r.addLabelData=function(e,t,r,n){var a=t.width/2,i=t.height/2,o=e.x,s=e.y,l=e.theta,c=Math.sin(l),u=Math.cos(l),d=a*u,p=i*c,h=a*c,f=-i*u,m=[[o-d-p,s-h-f],[o+d-p,s+h-f],[o+d+p,s+h+f],[o-d+p,s-h+f]];r.push({text:t.text,x:o,y:s,dy:t.dy,theta:l,level:t.level,width:t.width,height:t.height}),n.push(m)},r.drawLabels=function(e,t,r,i,o){var l=e.selectAll("text").data(t,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var t=e.x+Math.sin(e.theta)*e.dy,a=e.y-Math.cos(e.theta)*e.dy;n.select(this).text(e.text).attr({x:t,y:a,transform:"rotate("+180*e.theta/Math.PI+" "+t+" "+a+")"}).call(s.convertToTspans,r)})),o){for(var c="",u=0;u<o.length;u++)c+="M"+o[u].join("L")+"Z";a.ensureSingle(i,"path","").attr("d",c)}}},{"../../components/colorscale":603,"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../plots/cartesian/set_convert":782,"../heatmap/plot":1009,"./close_boundaries":943,"./constants":945,"./convert_to_constraints":949,"./empty_pathinfo":951,"./find_all_paths":953,"./make_crossings":958,d3:164}],960:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib");function i(e,t,r){var a={type:"linear",range:[e,t]};return n.autoTicks(a,(t-e)/(r||15)),a}t.exports=function(e,t){var r=e.contours;if(e.autocontour){var o=e.zmin,s=e.zmax;(e.zauto||void 0===o)&&(o=a.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=a.aggNums(Math.max,null,t));var l=i(o,s,e.ncontours);r.size=l.dtick,r.start=n.tickFirst(l),l.range.reverse(),r.end=n.tickFirst(l),r.start===o&&(r.start+=r.size),r.end===s&&(r.end-=r.size),r.start>r.end&&(r.start=r.end=(r.start+r.end)/2),e._input.contours||(e._input.contours={}),a.extendFlat(e._input.contours,{start:r.start,end:r.end,size:r.size}),e._input.autocontour=!0}else if("constraint"!==r.type){var c,u=r.start,d=r.end,p=e._input.contours;u>d&&(r.start=p.start=d,d=r.end=p.end=u,u=r.start),r.size>0||(c=u===d?1:i(u,d,e.ncontours).dtick,p.size=r.size=c)}}},{"../../lib":716,"../../plots/cartesian/axes":764}],961:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../heatmap/style"),o=e("./make_color_map");t.exports=function(e){var t=n.select(e).selectAll("g.contour");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(e){var t=n.select(this),r=e[0].trace,i=r.contours,s=r.line,l=i.size||1,c=i.start,u="constraint"===i.type,d=!u&&"lines"===i.coloring,p=!u&&"fill"===i.coloring,h=d||p?o(r):null;t.selectAll("g.contourlevel").each((function(e){n.select(this).selectAll("path").call(a.lineGroupStyle,s.width,d?h(e.level):s.color,s.dash)}));var f=i.labelfont;if(t.selectAll("g.contourlabels text").each((function(e){a.font(n.select(this),{family:f.family,size:f.size,color:f.color||(d?h(e.level):s.color)})})),u)t.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(p){var m;t.selectAll("g.contourfill path").style("fill",(function(e){return void 0===m&&(m=e.level),h(e.level+.5*l)})),void 0===m&&(m=c),t.selectAll("g.contourbg path").style("fill",h(m-.5*l))}})),i(e)}},{"../../components/drawing":612,"../heatmap/style":1010,"./make_color_map":957,d3:164}],962:[function(e,t,r){"use strict";var n=e("../../components/colorscale/defaults"),a=e("./label_defaults");t.exports=function(e,t,r,i,o){var s,l=r("contours.coloring"),c="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(c=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,n(e,t,i,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),a(r,i,c,o)}},{"../../components/colorscale/defaults":601,"./label_defaults":956}],963:[function(e,t,r){"use strict";var n=e("../heatmap/attributes"),a=e("../contour/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../lib/extend").extendFlat,s=a.contours;t.exports=o({carpet:{valType:"string",editType:"calc"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:a.fillcolor,autocontour:a.autocontour,ncontours:a.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:a.line.color,width:a.line.width,dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../contour/attributes":941,"../heatmap/attributes":998}],964:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc"),a=e("../../lib"),i=e("../heatmap/convert_column_xyz"),o=e("../heatmap/clean_2d_array"),s=e("../heatmap/interp2d"),l=e("../heatmap/find_empties"),c=e("../heatmap/make_bound_array"),u=e("./defaults"),d=e("../carpet/lookup_carpetid"),p=e("../contour/set_contours");t.exports=function(e,t){var r=t._carpetTrace=d(e,t);if(r&&r.visible&&"legendonly"!==r.visible){if(!t.a||!t.b){var h=e.data[r.index],f=e.data[t.index];f.a||(f.a=h.a),f.b||(f.b=h.b),u(f,t,t._defaultColor,e._fullLayout)}var m=function(e,t){var r,u,d,p,h,f,m,g=t._carpetTrace,v=g.aaxis,y=g.baxis;v._minDtick=0,y._minDtick=0,a.isArray1D(t.z)&&i(t,v,y,"a","b",["z"]),r=t._a=t._a||t.a,p=t._b=t._b||t.b,r=r?v.makeCalcdata(t,"_a"):[],p=p?y.makeCalcdata(t,"_b"):[],u=t.a0||0,d=t.da||1,h=t.b0||0,f=t.db||1,m=t._z=o(t._z||t.z,t.transpose),t._emptypoints=l(m),s(m,t._emptypoints);var b=a.maxRowLength(m),_="scaled"===t.xtype?"":r,x=c(t,_,u,d,b,v),w="scaled"===t.ytype?"":p,k=c(t,w,h,f,m.length,y),M={a:x,b:k,z:m};return"levels"===t.contours.type&&"none"!==t.contours.coloring&&n(e,t,{vals:m,containerStr:"",cLetter:"z"}),[M]}(e,t);return p(t,t._z),m}}},{"../../components/colorscale/calc":599,"../../lib":716,"../carpet/lookup_carpetid":914,"../contour/set_contours":960,"../heatmap/clean_2d_array":1e3,"../heatmap/convert_column_xyz":1002,"../heatmap/find_empties":1004,"../heatmap/interp2d":1007,"../heatmap/make_bound_array":1008,"./defaults":965}],965:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../heatmap/xyz_defaults"),i=e("./attributes"),o=e("../contour/constraint_defaults"),s=e("../contour/contours_defaults"),l=e("../contour/style_defaults");t.exports=function(e,t,r,c){function u(r,a){return n.coerce(e,t,i,r,a)}if(u("carpet"),e.a&&e.b){if(!a(e,t,u,c,"a","b"))return void(t.visible=!1);u("text"),"constraint"===u("contours.type")?o(e,t,u,c,r,{hasHover:!1}):(s(e,t,u,(function(r){return n.coerce2(e,t,i,r)})),l(e,t,u,c,{hasHover:!1}))}else t._defaultColor=r,t._length=null}},{"../../lib":716,"../contour/constraint_defaults":946,"../contour/contours_defaults":948,"../contour/style_defaults":962,"../heatmap/xyz_defaults":1012,"./attributes":963}],966:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../contour/colorbar"),calc:e("./calc"),plot:e("./plot"),style:e("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":775,"../contour/colorbar":944,"../contour/style":961,"./attributes":963,"./calc":964,"./defaults":965,"./plot":967}],967:[function(e,t,r){"use strict";var n=e("d3"),a=e("../carpet/map_1d_array"),i=e("../carpet/makepath"),o=e("../../components/drawing"),s=e("../../lib"),l=e("../contour/make_crossings"),c=e("../contour/find_all_paths"),u=e("../contour/plot"),d=e("../contour/constants"),p=e("../contour/convert_to_constraints"),h=e("../contour/empty_pathinfo"),f=e("../contour/close_boundaries"),m=e("../carpet/lookup_carpetid"),g=e("../carpet/axis_aligned_line");function v(e,t,r){var n=e.getPointAtLength(t),a=e.getPointAtLength(r),i=a.x-n.x,o=a.y-n.y,s=Math.sqrt(i*i+o*o);return[i/s,o/s]}function y(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function b(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]);return Math.sqrt(1-r*r)/r}t.exports=function(e,t,r,_){var x=t.xaxis,w=t.yaxis;s.makeTraceGroups(_,r,"contour").each((function(r){var _=n.select(this),k=r[0],M=k.trace,T=M._carpetTrace=m(e,M),C=e.calcdata[T.index][0];if(T.visible&&"legendonly"!==T.visible){var S=k.a,L=k.b,A=M.contours,E=h(A,t,k),D="constraint"===A.type,I=A._operation,P=D?"="===I?"lines":"fill":A.coloring,O=[[S[0],L[L.length-1]],[S[S.length-1],L[L.length-1]],[S[S.length-1],L[0]],[S[0],L[0]]];l(E);var R=1e-8*(S[S.length-1]-S[0]),F=1e-8*(L[L.length-1]-L[0]);c(E,R,F);var z,N,j,B,Y=E;"constraint"===A.type&&(Y=p(E,I)),function(e,t){var r,n,a,i,o,s,l,c,u;for(r=0;r<e.length;r++){for(i=e[r],o=i.pedgepaths=[],s=i.ppaths=[],n=0;n<i.edgepaths.length;n++){for(u=i.edgepaths[n],l=[],a=0;a<u.length;a++)l[a]=t(u[a]);o.push(l)}for(n=0;n<i.paths.length;n++){for(u=i.paths[n],c=[],a=0;a<u.length;a++)c[a]=t(u[a]);s.push(c)}}}(E,U);var H=[];for(B=C.clipsegments.length-1;B>=0;B--)z=C.clipsegments[B],N=a([],z.x,x.c2p),j=a([],z.y,w.c2p),N.reverse(),j.reverse(),H.push(i(N,j,z.bicubic));var V="M"+H.join("L")+"Z";!function(e,t,r,n,o,l){var c,u,d,p,h=s.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);h.enter().append("path"),h.exit().remove();var f=[];for(p=0;p<t.length;p++)c=t[p],u=a([],c.x,r.c2p),d=a([],c.y,n.c2p),f.push(i(u,d,c.bicubic));h.attr("d","M"+f.join("L")+"Z").style("stroke","none")}(_,C.clipsegments,x,w,D,P),function(e,t,r,a,i,l,c,u,d,p,h){var m="fill"===p;m&&f(i,e.contours);var v=s.ensureSingle(t,"g","contourfill").selectAll("path").data(m?i:[]);v.enter().append("path"),v.exit().remove(),v.each((function(e){var t=(e.prefixBoundary?h:"")+function(e,t,r,n,a,i,l,c){var u,d,p,h,f,m,v,y="",b=t.edgepaths.map((function(e,t){return t})),_=!0,x=1e-4*Math.abs(r[0][0]-r[2][0]),w=1e-4*Math.abs(r[0][1]-r[2][1]);function k(e){return Math.abs(e[1]-r[0][1])<w}function M(e){return Math.abs(e[1]-r[2][1])<w}function T(e){return Math.abs(e[0]-r[0][0])<x}function C(e){return Math.abs(e[0]-r[2][0])<x}function S(e,t){var r,n,o,s,u="";for(k(e)&&!C(e)||M(e)&&!T(e)?(s=a.aaxis,o=g(a,i,[e[0],t[0]],.5*(e[1]+t[1]))):(s=a.baxis,o=g(a,i,.5*(e[0]+t[0]),[e[1],t[1]])),r=1;r<o.length;r++)for(u+=s.smoothing?"C":"L",n=0;n<o[r].length;n++){var d=o[r][n];u+=[l.c2p(d[0]),c.c2p(d[1])]+" "}return u}for(u=0,d=null;b.length;){var L=t.edgepaths[u][0];for(d&&(y+=S(d,L)),v=o.smoothopen(t.edgepaths[u].map(n),t.smoothing),y+=_?v:v.replace(/^M/,"L"),b.splice(b.indexOf(u),1),d=t.edgepaths[u][t.edgepaths[u].length-1],f=-1,h=0;h<4;h++){if(!d){s.log("Missing end?",u,t);break}for(k(d)&&!C(d)?p=r[1]:T(d)?p=r[0]:M(d)?p=r[3]:C(d)&&(p=r[2]),m=0;m<t.edgepaths.length;m++){var A=t.edgepaths[m][0];Math.abs(d[0]-p[0])<x?Math.abs(d[0]-A[0])<x&&(A[1]-d[1])*(p[1]-A[1])>=0&&(p=A,f=m):Math.abs(d[1]-p[1])<w?Math.abs(d[1]-A[1])<w&&(A[0]-d[0])*(p[0]-A[0])>=0&&(p=A,f=m):s.log("endpt to newendpt is not vert. or horz.",d,p,A)}if(f>=0)break;y+=S(d,p),d=p}if(f===t.edgepaths.length){s.log("unclosed perimeter path");break}u=f,(_=-1===b.indexOf(u))&&(u=b[0],y+=S(d,p)+"Z",d=null)}for(u=0;u<t.paths.length;u++)y+=o.smoothclosed(t.paths[u].map(n),t.smoothing);return y}(0,e,l,c,u,d,r,a);t?n.select(this).attr("d",t).style("stroke","none"):n.select(this).remove()}))}(M,_,x,w,Y,O,U,T,C,P,V),function(e,t,r,a,i,l,c){var p=s.ensureSingle(e,"g","contourlines"),h=!1!==i.showlines,f=i.showlabels,m=h&&f,g=u.createLines(p,h||f,t),_=u.createLineClip(p,m,r,a.trace.uid),x=e.selectAll("g.contourlabels").data(f?[0]:[]);if(x.exit().remove(),x.enter().append("g").classed("contourlabels",!0),f){var w=l.xaxis,k=l.yaxis,M=w._length,T=k._length,C=[[[0,0],[M,0],[M,T],[0,T]]],S=[];s.clearLocationCache();var L=u.labelFormatter(r,a),A=o.tester.append("text").attr("data-notex",1).call(o.font,i.labelfont),E={left:0,right:M,center:M/2,top:0,bottom:T,middle:T/2},D=Math.sqrt(M*M+T*T),I=d.LABELDISTANCE*D/Math.max(1,t.length/d.LABELINCREASE);g.each((function(e){var t=u.calcTextOpts(e.level,L,A,r);n.select(this).selectAll("path").each((function(r){var n=s.getVisibleSegment(this,E,t.height/2);if(n&&(function(e,t,r,n,a,i){for(var o,s=0;s<r.pedgepaths.length;s++)t===r.pedgepaths[s]&&(o=r.edgepaths[s]);if(o){var l=a.a[0],c=a.a[a.a.length-1],u=a.b[0],d=a.b[a.b.length-1],p=v(e,0,1),h=v(e,n.total,n.total-1),f=g(o[0],p),m=n.total-g(o[o.length-1],h);n.min<f&&(n.min=f),n.max>m&&(n.max=m),n.len=n.max-n.min}function g(e,t){var r,n=0;return(Math.abs(e[0]-l)<.1||Math.abs(e[0]-c)<.1)&&(r=y(a.dxydb_rough(e[0],e[1],.1)),n=Math.max(n,i*b(t,r)/2)),(Math.abs(e[1]-u)<.1||Math.abs(e[1]-d)<.1)&&(r=y(a.dxyda_rough(e[0],e[1],.1)),n=Math.max(n,i*b(t,r)/2)),n}}(this,r,e,n,c,t.height),!(n.len<(t.width+t.height)*d.LABELMIN)))for(var a=Math.min(Math.ceil(n.len/I),d.LABELMAX),i=0;i<a;i++){var o=u.findBestTextLocation(this,n,t,S,E);if(!o)break;u.addLabelData(o,t,S,C)}}))})),A.remove(),u.drawLabels(x,S,r,_,m?C:null)}f&&!h&&g.remove()}(_,E,e,k,A,t,T),o.setClipUrl(_,T._clipPathId,e)}function U(e){var t=T.ab2xy(e[0],e[1],!0);return[x.c2p(t[0]),w.c2p(t[1])]}}))}},{"../../components/drawing":612,"../../lib":716,"../carpet/axis_aligned_line":898,"../carpet/lookup_carpetid":914,"../carpet/makepath":915,"../carpet/map_1d_array":916,"../contour/close_boundaries":943,"../contour/constants":945,"../contour/convert_to_constraints":949,"../contour/empty_pathinfo":951,"../contour/find_all_paths":953,"../contour/make_crossings":958,"../contour/plot":959,d3:164}],968:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/attributes"),o=e("../scattermapbox/attributes"),s=e("../../lib/extend").extendFlat;t.exports=s({lon:o.lon,lat:o.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:o.text,hovertext:o.hovertext,hoverinfo:s({},i.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:a()},n("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scattermapbox/attributes":1181}],969:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib").isArrayOrTypedArray,i=e("../../constants/numerical").BADNUM,o=e("../../components/colorscale/calc"),s=e("../../lib")._;t.exports=function(e,t){for(var r=t._length,l=new Array(r),c=t.z,u=a(c)&&c.length,d=0;d<r;d++){var p=l[d]={},h=t.lon[d],f=t.lat[d];if(p.lonlat=n(h)&&n(f)?[+h,+f]:[i,i],u){var m=c[d];p.z=n(m)?m:i}}return o(e,t,{vals:u?c:[0,1],containerStr:"",cLetter:"z"}),r&&(l[0].t={labels:{lat:s(e,"lat:")+" ",lon:s(e,"lon:")+" "}}),l}},{"../../components/colorscale/calc":599,"../../constants/numerical":692,"../../lib":716,"fast-isnumeric":227}],970:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../components/color"),o=e("../../components/colorscale"),s=e("../../constants/numerical").BADNUM,l=e("../../lib/geojson_utils").makeBlank;t.exports=function(e){var t=e[0].trace,r=!0===t.visible&&0!==t._length,c=t._opts={heatmap:{layout:{visibility:"none"},paint:{}},geojson:l()};if(!r)return c;var u,d=[],p=t.z,h=t.radius,f=a.isArrayOrTypedArray(p)&&p.length,m=a.isArrayOrTypedArray(h);for(u=0;u<e.length;u++){var g=e[u],v=g.lonlat;if(v[0]!==s){var y={};if(f){var b=g.z;y.z=b!==s?b:0}m&&(y.r=n(h[u])&&h[u]>0?+h[u]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:y})}}var _=o.extractOpts(t),x=_.reversescale?o.flipScale(_.colorscale):_.colorscale,w=x[0][1],k=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u<x.length;u++)k.push(x[u][0],x[u][1]);var M=["interpolate",["linear"],["get","z"],_.min,0,_.max,1];return a.extendFlat(c.heatmap.paint,{"heatmap-weight":f?M:1/(_.max-_.min),"heatmap-color":k,"heatmap-radius":m?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),c.geojson={type:"FeatureCollection",features:d},c.heatmap.layout.visibility="visible",c}},{"../../components/color":591,"../../components/colorscale":603,"../../constants/numerical":692,"../../lib":716,"../../lib/geojson_utils":711,"fast-isnumeric":227}],971:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/colorscale/defaults"),i=e("./attributes");t.exports=function(e,t,r,o){function s(r,a){return n.coerce(e,t,i,r,a)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(t._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),a(e,t,o,s,{prefix:"",cLetter:"z"})):t.visible=!1}},{"../../components/colorscale/defaults":601,"../../lib":716,"./attributes":968}],972:[function(e,t,r){"use strict";t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}},{}],973:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../scattermapbox/hover");t.exports=function(e,t,r){var o=i(e,t,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var d=s.subplot.mockAxis;s.z=u.z,s.zLabel=a.tickText(d,d.c2l(u.z),"hover").text}return s.extraText=function(e,t,r){if(!e.hovertemplate){var a=(t.hi||e.hoverinfo).split("+"),i=-1!==a.indexOf("all"),o=-1!==a.indexOf("lon"),s=-1!==a.indexOf("lat"),l=t.lonlat,c=[];return i||o&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1])),(i||-1!==a.indexOf("text"))&&n.fillText(t,e,c),c.join("<br>")}function u(e){return e+"°"}}(c,u,l[0].t.labels),[s]}}},{"../../lib":716,"../../plots/cartesian/axes":764,"../scattermapbox/hover":1186}],974:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../heatmap/colorbar"),formatLabels:e("../scattermapbox/format_labels"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover"),eventData:e("./event_data"),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n<r.length;n++){var a=r[n],i=a.id;if("symbol"===a.type&&"string"==typeof i&&-1===i.indexOf("plotly-"))return i}},moduleType:"trace",name:"densitymapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl"],meta:{hr_name:"density_mapbox"}}},{"../../plots/mapbox":819,"../heatmap/colorbar":1001,"../scattermapbox/format_labels":1185,"./attributes":968,"./calc":969,"./defaults":971,"./event_data":972,"./hover":973,"./plot":975}],975:[function(e,t,r){"use strict";var n=e("./convert"),a=e("../../plots/mapbox/constants").traceLayerPrefix;function i(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",a+t+"-heatmap"]],this.below=null}var o=i.prototype;o.update=function(e){var t=this.subplot,r=this.layerList,a=n(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(a.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(a,i),this.below=i);for(var o=0;o<r.length;o++){var s=r[o],l=s[0],c=s[1],u=a[l];t.setOptions(c,"setLayoutProperty",u.layout),"visible"===u.layout.visibility&&t.setOptions(c,"setPaintProperty",u.paint)}},o._addLayers=function(e,t){for(var r=this.subplot,n=this.layerList,a=this.sourceId,i=0;i<n.length;i++){var o=n[i],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:a,layout:l.layout,paint:l.paint},t)}},o._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var r=t[0].trace,a=new i(e,r.uid),o=a.sourceId,s=n(t),l=a.below=e.belowLookup["trace-"+r.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}},{"../../plots/mapbox/constants":817,"./convert":970}],976:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){for(var r=0;r<e.length;r++)e[r].i=r;n.mergeArray(t.text,e,"tx"),n.mergeArray(t.hovertext,e,"htx");var a=t.marker;if(a){n.mergeArray(a.opacity,e,"mo"),n.mergeArray(a.color,e,"mc");var i=a.line;i&&(n.mergeArray(i.color,e,"mlc"),n.mergeArrayCastPositive(i.width,e,"mlw"))}}},{"../../lib":716}],977:[function(e,t,r){"use strict";var n=e("../bar/attributes"),a=e("../scatter/attributes").line,i=e("../../plots/attributes"),o=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,l=e("./constants"),c=e("../../lib/extend").extendFlat,u=e("../../components/color");t.exports={x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,hovertext:n.hovertext,hovertemplate:o({},{keys:l.eventDataKeys}),hoverinfo:c({},i.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:s({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),text:n.text,textposition:c({},n.textposition,{dflt:"auto"}),insidetextanchor:c({},n.insidetextanchor,{dflt:"middle"}),textangle:c({},n.textangle,{dflt:0}),textfont:n.textfont,insidetextfont:n.insidetextfont,outsidetextfont:n.outsidetextfont,constraintext:n.constraintext,cliponaxis:n.cliponaxis,orientation:c({},n.orientation,{}),offset:c({},n.offset,{arrayOk:!1}),width:c({},n.width,{arrayOk:!1}),marker:n.marker,connector:{fillcolor:{valType:"color",editType:"style"},line:{color:c({},a.color,{dflt:u.defaultLine}),width:c({},a.width,{dflt:0,editType:"plot"}),dash:a.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup}},{"../../components/color":591,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../bar/attributes":855,"../scatter/attributes":1118,"./constants":979}],978:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("./arrays_to_calcdata"),i=e("../scatter/calc_selection"),o=e("../../constants/numerical").BADNUM;function s(e){return e===o?0:e}t.exports=function(e,t){var r,l,c,u,d=n.getFromId(e,t.xaxis||"x"),p=n.getFromId(e,t.yaxis||"y");"h"===t.orientation?(r=d.makeCalcdata(t,"x"),l=p.makeCalcdata(t,"y")):(r=p.makeCalcdata(t,"y"),l=d.makeCalcdata(t,"x"));var h,f=Math.min(l.length,r.length),m=new Array(f);for(t._base=[],c=0;c<f;c++){r[c]<0&&(r[c]=o);var g=!1;r[c]!==o&&c+1<f&&r[c+1]!==o&&(g=!0),u=m[c]={p:l[c],s:r[c],cNext:g},t._base[c]=-.5*u.s,t.ids&&(u.id=String(t.ids[c])),0===c&&(m[0].vTotal=0),m[0].vTotal+=s(u.s),u.begR=s(u.s)/s(m[0].s)}for(c=0;c<f;c++)(u=m[c]).s!==o&&(u.sumR=u.s/m[0].vTotal,u.difR=void 0!==h?u.s/h:1,h=u.s);return a(m,t),i(m,t),m}},{"../../constants/numerical":692,"../../plots/cartesian/axes":764,"../scatter/calc_selection":1120,"./arrays_to_calcdata":976}],979:[function(e,t,r){"use strict";t.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},{}],980:[function(e,t,r){"use strict";var n=e("../bar/cross_trace_calc").setGroupPositions;t.exports=function(e,t){var r,a,i=e._fullLayout,o=e._fullData,s=e.calcdata,l=t.xaxis,c=t.yaxis,u=[],d=[],p=[];for(a=0;a<o.length;a++){var h=o[a],f="h"===h.orientation;!0===h.visible&&h.xaxis===l._id&&h.yaxis===c._id&&"funnel"===h.type&&(r=s[a],f?p.push(r):d.push(r),u.push(r))}var m={mode:i.funnelmode,norm:i.funnelnorm,gap:i.funnelgap,groupgap:i.funnelgroupgap};for(n(e,l,c,d,m),n(e,c,l,p,m),a=0;a<u.length;a++){r=u[a];for(var g=0;g<r.length;g++)g+1<r.length&&(r[g].nextP0=r[g+1].p0,r[g].nextS0=r[g+1].s0,r[g].nextP1=r[g+1].p1,r[g].nextS1=r[g+1].s1)}}},{"../bar/cross_trace_calc":858}],981:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../bar/defaults").handleGroupingDefaults,i=e("../bar/defaults").handleText,o=e("../scatter/xy_defaults"),s=e("./attributes"),l=e("../../components/color");t.exports={supplyDefaults:function(e,t,r,a){function c(r,a){return n.coerce(e,t,s,r,a)}if(o(e,t,a,c)){c("orientation",t.y&&!t.x?"v":"h"),c("offset"),c("width");var u=c("text");c("hovertext"),c("hovertemplate");var d=c("textposition");i(e,t,a,c,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"===t.textposition||t.texttemplate||c("textinfo",Array.isArray(u)?"text+value":"value");var p=c("marker.color",r);c("marker.line.color",l.defaultLine),c("marker.line.width"),c("connector.visible")&&(c("connector.fillcolor",function(e){var t=n.isArrayOrTypedArray(e)?"#000":e;return l.addOpacity(t,.5*l.opacity(t))}(p)),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash")))}else t.visible=!1},crossTraceDefaults:function(e,t){var r,i;function o(e){return n.coerce(i._input,i,s,e)}if("group"===t.funnelmode)for(var l=0;l<e.length;l++)r=(i=e[l])._input,a(r,i,t,o)}}},{"../../components/color":591,"../../lib":716,"../bar/defaults":859,"../scatter/xy_defaults":1144,"./attributes":977}],982:[function(e,t,r){"use strict";t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},{}],983:[function(e,t,r){"use strict";var n=e("../../components/color").opacity,a=e("../bar/hover").hoverOnBars,i=e("../../lib").formatPercent;t.exports=function(e,t,r,o){var s=a(e,t,r,o);if(s){var l=s.cd,c=l[0].trace,u="h"===c.orientation,d=l[s.index];s[(u?"x":"y")+"LabelVal"]=d.s,s.percentInitial=d.begR,s.percentInitialLabel=i(d.begR,1),s.percentPrevious=d.difR,s.percentPreviousLabel=i(d.difR,1),s.percentTotal=d.sumR,s.percentTotalLabel=i(d.sumR,1);var p=d.hi||c.hoverinfo,h=[];if(p&&"none"!==p&&"skip"!==p){var f="all"===p,m=p.split("+"),g=function(e){return f||-1!==m.indexOf(e)};g("percent initial")&&h.push(s.percentInitialLabel+" of initial"),g("percent previous")&&h.push(s.percentPreviousLabel+" of previous"),g("percent total")&&h.push(s.percentTotalLabel+" of total")}return s.extraText=h.join("<br>"),s.color=function(e,t){var r=e.marker,a=t.mc||r.color,i=t.mlc||r.line.color,o=t.mlw||r.line.width;return n(a)?a:n(i)&&o?i:void 0}(c,d),[s]}}},{"../../components/color":591,"../../lib":716,"../bar/hover":862}],984:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"../bar/select":867,"./attributes":977,"./calc":978,"./cross_trace_calc":980,"./defaults":981,"./event_data":982,"./hover":983,"./layout_attributes":985,"./layout_defaults":986,"./plot":987,"./style":988}],985:[function(e,t,r){"use strict";t.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],986:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r){var i=!1;function o(r,i){return n.coerce(e,t,a,r,i)}for(var s=0;s<r.length;s++){var l=r[s];if(l.visible&&"funnel"===l.type){i=!0;break}}i&&(o("funnelmode"),o("funnelgap",.2),o("funnelgroupgap"))}},{"../../lib":716,"./layout_attributes":985}],987:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../bar/plot").plot;function s(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),a[2]=o.c2p(e.nextS0,!0),i[2]=s.c2p(e.nextP0,!0),a[3]=o.c2p(e.nextS1,!0),i[3]=s.c2p(e.nextP1,!0),n?[a,i]:[i,a]}t.exports=function(e,t,r,l){var c=e._fullLayout;!function(e,t,r,o){var l=t.xaxis,c=t.yaxis;a.makeTraceGroups(o,r,"trace bars").each((function(r){var o=n.select(this),u=r[0].trace,d=a.ensureSingle(o,"g","regions");if(u.connector&&u.connector.visible){var p="h"===u.orientation,h=d.selectAll("g.region").data(a.identity);h.enter().append("g").classed("region",!0),h.exit().remove();var f=h.size();h.each((function(r,o){if(o===f-1||r.cNext){var u=s(r,l,c,p),d=u[0],h=u[1],m="";void 0!==d[3]&&void 0!==h[3]&&(m+=p?"M"+d[0]+","+h[1]+"L"+d[2]+","+h[2]+"H"+d[3]+"L"+d[1]+","+h[1]+"Z":"M"+d[1]+","+h[1]+"L"+d[2]+","+h[3]+"V"+h[2]+"L"+d[1]+","+h[0]+"Z"),a.ensureSingle(n.select(this),"path").attr("d",m).call(i.setClipUrl,t.layerClipId,e)}}))}else d.remove()}))}(e,t,r,l),function(e,t,r,o){var l=t.xaxis,c=t.yaxis;a.makeTraceGroups(o,r,"trace bars").each((function(r){var o=n.select(this),u=r[0].trace,d=a.ensureSingle(o,"g","lines");if(u.connector&&u.connector.visible&&u.connector.line.width){var p="h"===u.orientation,h=d.selectAll("g.line").data(a.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var f=h.size();h.each((function(r,o){if(o===f-1||r.cNext){var u=s(r,l,c,p),d=u[0],h=u[1],m="";void 0!==d[3]&&void 0!==h[3]&&(p?(m+="M"+d[0]+","+h[1]+"L"+d[2]+","+h[2],m+="M"+d[1]+","+h[1]+"L"+d[3]+","+h[2]):(m+="M"+d[1]+","+h[1]+"L"+d[2]+","+h[3],m+="M"+d[1]+","+h[0]+"L"+d[2]+","+h[2])),""===m&&(m="M0,0Z"),a.ensureSingle(n.select(this),"path").attr("d",m).call(i.setClipUrl,t.layerClipId,e)}}))}else d.remove()}))}(e,t,r,l),o(e,t,r,l,{mode:c.funnelmode,norm:c.funnelmode,gap:c.funnelgap,groupgap:c.funnelgroupgap})}},{"../../components/drawing":612,"../../lib":716,"../bar/plot":866,d3:164}],988:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../../components/color"),o=e("../../constants/interactions").DESELECTDIM,s=e("../bar/style").styleTextPoints;t.exports={style:function(e,t,r){var l=r||n.select(e).selectAll("g.funnellayer").selectAll("g.trace");l.style("opacity",(function(e){return e[0].trace.opacity})),l.each((function(t){var r=n.select(this),l=t[0].trace;r.selectAll(".point > path").each((function(e){if(!e.isBlank){var t=l.marker;n.select(this).call(i.fill,e.mc||t.color).call(i.stroke,e.mlc||t.line.color).call(a.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",l.selectedpoints&&!e.selected?o:1)}})),s(r,l,e),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(i.fill,l.connector.fillcolor)})),r.selectAll(".lines").each((function(){var e=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},{"../../components/color":591,"../../components/drawing":612,"../../constants/interactions":691,"../bar/style":869,d3:164}],989:[function(e,t,r){"use strict";var n=e("../pie/attributes"),a=e("../../plots/attributes"),i=e("../../plots/domain").attributes,o=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,l=e("../../lib/extend").extendFlat;t.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:l({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},{"../../lib/extend":707,"../../plots/attributes":761,"../../plots/domain":789,"../../plots/template_attributes":840,"../pie/attributes":1092}],990:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="funnelarea",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":825}],991:[function(e,t,r){"use strict";var n=e("../pie/calc");t.exports={calc:function(e,t){return n.calc(e,t)},crossTraceCalc:function(e){n.crossTraceCalc(e,{type:"funnelarea"})}}},{"../pie/calc":1094}],992:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../plots/domain").defaults,o=e("../bar/defaults").handleText;t.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}var c,u=l("values"),d=n.isArrayOrTypedArray(u),p=l("labels");if(Array.isArray(p)?(c=p.length,d&&(c=Math.min(c,u.length))):d&&(c=u.length,l("label0"),l("dlabel")),c){t._length=c,l("marker.line.width")&&l("marker.line.color",s.paper_bgcolor),l("marker.colors"),l("scalegroup");var h,f=l("text"),m=l("texttemplate");if(m||(h=l("textinfo",Array.isArray(f)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),m||h&&"none"!==h){var g=l("textposition");o(e,t,s,l,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}i(t,s,l),l("title.text")&&(l("title.position"),n.coerceFont(l,"title.font",s.font)),l("aspectratio"),l("baseratio")}else t.visible=!1}},{"../../lib":716,"../../plots/domain":789,"../bar/defaults":859,"./attributes":989}],993:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style"),styleOne:e("../pie/style_one"),meta:{}}},{"../pie/style_one":1103,"./attributes":989,"./base_plot":990,"./calc":991,"./defaults":992,"./layout_attributes":994,"./layout_defaults":995,"./plot":996,"./style":997}],994:[function(e,t,r){"use strict";var n=e("../pie/layout_attributes").hiddenlabels;t.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":1099}],995:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("hiddenlabels"),r("funnelareacolorway",t.colorway),r("extendfunnelareacolors")}},{"../../lib":716,"./layout_attributes":994}],996:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../../lib"),o=e("../../lib/svg_text_utils"),s=e("../bar/plot").toMoveInsideBar,l=e("../pie/helpers"),c=e("../pie/plot"),u=c.attachFxHandlers,d=c.determineInsideTextFont,p=c.layoutAreas,h=c.prerenderTitles,f=c.positionTitleOutside;function m(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}t.exports=function(e,t){var r=e._fullLayout;h(t,e),p(t,r._size),i.makeTraceGroups(r._funnelarealayer,t,"trace").each((function(t){var p=n.select(this),h=t[0],g=h.trace;!function(e){if(e.length){var t=e[0],r=t.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i,o,s,l=Math.pow(a,2),c=t.vTotal,u=c,d=c*l/(1-l)/c,p=[];for(p.push(L()),o=e.length-1;o>-1;o--)if(!(s=e[o]).hidden){var h=s.v/u;d+=h,p.push(L())}var f=1/0,m=-1/0;for(o=0;o<p.length;o++)i=p[o],f=Math.min(f,i[1]),m=Math.max(m,i[1]);for(o=0;o<p.length;o++)p[o][1]-=(m+f)/2;var g=p[p.length-1][0],v=t.r,y=(m-f)/2,b=v/g,_=v/y*n;for(t.r=_*y,o=0;o<p.length;o++)p[o][0]*=b,p[o][1]*=_;var x,w,k=[-(i=p[0])[0],i[1]],M=[i[0],i[1]],T=0;for(o=e.length-1;o>-1;o--)if(!(s=e[o]).hidden){var C=p[T+=1][0],S=p[T][1];s.TL=[-C,S],s.TR=[C,S],s.BL=k,s.BR=M,s.pxmid=(x=s.TR,w=s.BR,[.5*(x[0]+w[0]),.5*(x[1]+w[1])]),k=s.TL,M=s.TR}}function L(){var e,t={x:e=Math.sqrt(d),y:-e};return[t.x,t.y]}}(t),p.each((function(){var p=n.select(this).selectAll("g.slice").data(t);p.enter().append("g").classed("slice",!0),p.exit().remove(),p.each((function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=g.index;var p=h.cx,f=h.cy,v=n.select(this),y=v.selectAll("path.surface").data([r]);y.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),v.call(u,e,t);var b="M"+(p+r.TR[0])+","+(f+r.TR[1])+m(r.TR,r.BR)+m(r.BR,r.BL)+m(r.BL,r.TL)+"Z";y.attr("d",b),c.formatSliceLabel(e,r,h);var _=l.castOption(g.textposition,r.pts),x=v.selectAll("g.slicetext").data(r.text&&"none"!==_?[0]:[]);x.enter().append("g").classed("slicetext",!0),x.exit().remove(),x.each((function(){var t=i.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)}));t.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,d(g,r,e._fullLayout.font)).call(o.convertToTspans,e);var l,c,u,h=a.bBox(t.node()),m=Math.min(r.BL[1],r.BR[1]),v=Math.max(r.TL[1],r.TR[1]);c=Math.max(r.TL[0],r.BL[0]),u=Math.min(r.TR[0],r.BR[0]),l=i.getTextTransform(s(c,u,m,v,h,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})),t.attr("transform","translate("+p+","+f+")"+l)}))}}));var v=n.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);v.enter().append("g").classed("titletext",!0),v.exit().remove(),v.each((function(){var t=i.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),s=g.title.text;g._meta&&(s=i.templateString(s,g._meta)),t.text(s).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,g.title.font).call(o.convertToTspans,e);var l=f(h,r._size);t.attr("transform","translate("+l.x+","+l.y+")"+(l.scale<1?"scale("+l.scale+")":"")+"translate("+l.tx+","+l.ty+")")}))}))}))}},{"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../bar/plot":866,"../pie/helpers":1097,"../pie/plot":1101,d3:164}],997:[function(e,t,r){"use strict";var n=e("d3"),a=e("../pie/style_one");t.exports=function(e){e._fullLayout._funnelarealayer.selectAll(".trace").each((function(e){var t=e[0].trace,r=n.select(this);r.style({opacity:t.opacity}),r.selectAll("path.surface").each((function(e){n.select(this).call(a,e,t)}))}))}},{"../pie/style_one":1103,d3:164}],998:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../components/colorscale/attributes"),o=(e("../../constants/docs").FORMAT_LINK,e("../../lib/extend").extendFlat);t.exports=o({z:{valType:"data_array",editType:"calc"},x:o({},n.x,{impliedEdits:{xtype:"array"}}),x0:o({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:o({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:o({},n.y,{impliedEdits:{ytype:"array"}}),y0:o({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:o({},n.dy,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},zhoverformat:{valType:"string",dflt:"",editType:"none"},hovertemplate:a()},{transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":598,"../../constants/docs":687,"../../lib/extend":707,"../../plots/template_attributes":840,"../scatter/attributes":1118}],999:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../histogram2d/calc"),s=e("../../components/colorscale/calc"),l=e("./convert_column_xyz"),c=e("./clean_2d_array"),u=e("./interp2d"),d=e("./find_empties"),p=e("./make_bound_array");t.exports=function(e,t){var r,h,f,m,g,v,y,b,_,x=i.getFromId(e,t.xaxis||"x"),w=i.getFromId(e,t.yaxis||"y"),k=n.traceIs(t,"contour"),M=n.traceIs(t,"histogram"),T=n.traceIs(t,"gl2d"),C=k?"best":t.zsmooth;if(x._minDtick=0,w._minDtick=0,M)r=(_=o(e,t)).x,h=_.x0,f=_.dx,m=_.y,g=_.y0,v=_.dy,y=_.z;else{var S=t.z;a.isArray1D(S)?(l(t,x,w,"x","y",["z"]),r=t._x,m=t._y,S=t._z):(r=t._x=t.x?x.makeCalcdata(t,"x"):[],m=t._y=t.y?w.makeCalcdata(t,"y"):[]),h=t.x0,f=t.dx,g=t.y0,v=t.dy,y=c(S,t,x,w),(k||t.connectgaps)&&(t._emptypoints=d(y),u(y,t._emptypoints))}function L(e){C=t._input.zsmooth=t.zsmooth=!1,a.warn('cannot use zsmooth: "fast": '+e)}if("fast"===C)if("log"===x.type||"log"===w.type)L("log axis found");else if(!M){if(r.length){var A=(r[r.length-1]-r[0])/(r.length-1),E=Math.abs(A/100);for(b=0;b<r.length-1;b++)if(Math.abs(r[b+1]-r[b]-A)>E){L("x scale is not linear");break}}if(m.length&&"fast"===C){var D=(m[m.length-1]-m[0])/(m.length-1),I=Math.abs(D/100);for(b=0;b<m.length-1;b++)if(Math.abs(m[b+1]-m[b]-D)>I){L("y scale is not linear");break}}}var P=a.maxRowLength(y),O="scaled"===t.xtype?"":r,R=p(t,O,h,f,P,x),F="scaled"===t.ytype?"":m,z=p(t,F,g,v,y.length,w);T||(t._extremes[x._id]=i.findExtremes(x,R),t._extremes[w._id]=i.findExtremes(w,z));var N={x:R,y:z,z:y,text:t._text||t.text,hovertext:t._hovertext||t.hovertext};if(O&&O.length===R.length-1&&(N.xCenter=O),F&&F.length===z.length-1&&(N.yCenter=F),M&&(N.xRanges=_.xRanges,N.yRanges=_.yRanges,N.pts=_.pts),k||s(e,t,{vals:y,cLetter:"z"}),k&&t.contours&&"heatmap"===t.contours.coloring){var j={type:"contour"===t.type?"heatmap":"histogram2d",xcalendar:t.xcalendar,ycalendar:t.ycalendar};N.xfill=p(j,O,h,f,P,x),N.yfill=p(j,F,g,v,y.length,w)}return[N]}},{"../../components/colorscale/calc":599,"../../lib":716,"../../plots/cartesian/axes":764,"../../registry":845,"../histogram2d/calc":1030,"./clean_2d_array":1e3,"./convert_column_xyz":1002,"./find_empties":1004,"./interp2d":1007,"./make_bound_array":1008}],1e3:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM;t.exports=function(e,t,r,o){var s,l,c,u,d,p;function h(e){if(n(e))return+e}if(t&&t.transpose){for(s=0,d=0;d<e.length;d++)s=Math.max(s,e[d].length);if(0===s)return!1;c=function(e){return e.length},u=function(e,t,r){return(e[r]||[])[t]}}else s=e.length,c=function(e,t){return e[t].length},u=function(e,t,r){return(e[t]||[])[r]};var f=function(e,t,r){return t===i||r===i?i:u(e,t,r)};function m(e){if(t&&"carpet"!==t.type&&"contourcarpet"!==t.type&&e&&"category"===e.type&&t["_"+e._id.charAt(0)].length){var r=e._id.charAt(0),n={},o=t["_"+r+"CategoryMap"]||t[r];for(d=0;d<o.length;d++)n[o[d]]=d;return function(t){var r=n[e._categories[t]];return r+1?r:i}}return a.identity}var g=m(r),v=m(o);o&&"category"===o.type&&(s=o._categories.length);var y=new Array(s);for(d=0;d<s;d++)for(l=r&&"category"===r.type?r._categories.length:c(e,d),y[d]=new Array(l),p=0;p<l;p++)y[d][p]=h(f(e,v(d),g(p)));return y}},{"../../constants/numerical":692,"../../lib":716,"fast-isnumeric":227}],1001:[function(e,t,r){"use strict";t.exports={min:"zmin",max:"zmax"}},{}],1002:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../constants/numerical").BADNUM;t.exports=function(e,t,r,i,o,s){var l,c,u,d,p=e._length,h=t.makeCalcdata(e,i),f=r.makeCalcdata(e,o),m=e.text,g=void 0!==m&&n.isArray1D(m),v=e.hovertext,y=void 0!==v&&n.isArray1D(v),b=n.distinctVals(h),_=b.vals,x=n.distinctVals(f),w=x.vals,k=[];for(l=0;l<s.length;l++)k[l]=n.init2dArray(w.length,_.length);for(g&&(u=n.init2dArray(w.length,_.length)),y&&(d=n.init2dArray(w.length,_.length)),l=0;l<p;l++)if(h[l]!==a&&f[l]!==a){var M=n.findBin(h[l]+b.minDiff/2,_),T=n.findBin(f[l]+x.minDiff/2,w);for(c=0;c<s.length;c++){var C=e[s[c]];k[c][T][M]=C[l]}g&&(u[T][M]=m[l]),y&&(d[T][M]=v[l])}for(e["_"+i]=_,e["_"+o]=w,c=0;c<s.length;c++)e["_"+s[c]]=k[c];g&&(e._text=u),y&&(e._hovertext=d),t&&"category"===t.type&&(e["_"+i+"CategoryMap"]=_.map((function(e){return t._categories[e]}))),r&&"category"===r.type&&(e["_"+o+"CategoryMap"]=w.map((function(e){return r._categories[e]})))}},{"../../constants/numerical":692,"../../lib":716}],1003:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./xyz_defaults"),i=e("./style_defaults"),o=e("../../components/colorscale/defaults"),s=e("./attributes");t.exports=function(e,t,r,l){function c(r,a){return n.coerce(e,t,s,r,a)}a(e,t,c,l)?(c("text"),c("hovertext"),c("hovertemplate"),i(e,t,c,l),c("hoverongaps"),c("connectgaps",n.isArray1D(t.z)&&!1!==t.zsmooth),o(e,t,l,c,{prefix:"",cLetter:"z"})):t.visible=!1}},{"../../components/colorscale/defaults":601,"../../lib":716,"./attributes":998,"./style_defaults":1011,"./xyz_defaults":1012}],1004:[function(e,t,r){"use strict";var n=e("../../lib").maxRowLength;t.exports=function(e){var t,r,a,i,o,s,l,c,u=[],d={},p=[],h=e[0],f=[],m=[0,0,0],g=n(e);for(r=0;r<e.length;r++)for(t=f,f=h,h=e[r+1]||[],a=0;a<g;a++)void 0===f[a]&&((s=(void 0!==f[a-1]?1:0)+(void 0!==f[a+1]?1:0)+(void 0!==t[a]?1:0)+(void 0!==h[a]?1:0))?(0===r&&s++,0===a&&s++,r===e.length-1&&s++,a===f.length-1&&s++,s<4&&(d[[r,a]]=[r,a,s]),u.push([r,a,s])):p.push([r,a]));for(;p.length;){for(l={},c=!1,o=p.length-1;o>=0;o--)(s=((d[[(r=(i=p[o])[0])-1,a=i[1]]]||m)[2]+(d[[r+1,a]]||m)[2]+(d[[r,a-1]]||m)[2]+(d[[r,a+1]]||m)[2])/20)&&(l[i]=[r,a,s],p.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(i in l)d[i]=l[i],u.push(l[i])}return u.sort((function(e,t){return t[2]-e[2]}))}},{"../../lib":716}],1005:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../components/colorscale").extractOpts;t.exports=function(e,t,r,s,l,c){var u,d,p,h,f=e.cd[0],m=f.trace,g=e.xa,v=e.ya,y=f.x,b=f.y,_=f.z,x=f.xCenter,w=f.yCenter,k=f.zmask,M=m.zhoverformat,T=y,C=b;if(!1!==e.index){try{p=Math.round(e.index[1]),h=Math.round(e.index[0])}catch(t){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",e.index)}if(p<0||p>=_[0].length||h<0||h>_.length)return}else{if(n.inbox(t-y[0],t-y[y.length-1],0)>0||n.inbox(r-b[0],r-b[b.length-1],0)>0)return;if(c){var S;for(T=[2*y[0]-y[1]],S=1;S<y.length;S++)T.push((y[S]+y[S-1])/2);for(T.push([2*y[y.length-1]-y[y.length-2]]),C=[2*b[0]-b[1]],S=1;S<b.length;S++)C.push((b[S]+b[S-1])/2);C.push([2*b[b.length-1]-b[b.length-2]])}p=Math.max(0,Math.min(T.length-2,a.findBin(t,T))),h=Math.max(0,Math.min(C.length-2,a.findBin(r,C)))}var L=g.c2p(y[p]),A=g.c2p(y[p+1]),E=v.c2p(b[h]),D=v.c2p(b[h+1]);c?(A=L,u=y[p],D=E,d=b[h]):(u=x?x[p]:(y[p]+y[p+1])/2,d=w?w[h]:(b[h]+b[h+1])/2,g&&"category"===g.type&&(u=y[p]),v&&"category"===v.type&&(d=b[h]),m.zsmooth&&(L=A=g.c2p(u),E=D=v.c2p(d)));var I=_[h][p];if(k&&!k[h][p]&&(I=void 0),void 0!==I||m.hoverongaps){var P;Array.isArray(f.hovertext)&&Array.isArray(f.hovertext[h])?P=f.hovertext[h][p]:Array.isArray(f.text)&&Array.isArray(f.text[h])&&(P=f.text[h][p]);var O=o(m),R={type:"linear",range:[O.min,O.max],hoverformat:M,_separators:g._separators,_numFormat:g._numFormat},F=i.tickText(R,I,"hover").text;return[a.extendFlat(e,{index:[h,p],distance:e.maxHoverDistance,spikeDistance:e.maxSpikeDistance,x0:L,x1:A,y0:E,y1:D,xLabelVal:u,yLabelVal:d,zLabelVal:I,zLabel:F,text:P})]}}},{"../../components/colorscale":603,"../../components/fx":629,"../../lib":716,"../../plots/cartesian/axes":764}],1006:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:e("./colorbar"),style:e("./style"),hoverPoints:e("./hover"),moduleType:"trace",name:"heatmap",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap"],meta:{}}},{"../../plots/cartesian":775,"./attributes":998,"./calc":999,"./colorbar":1001,"./defaults":1003,"./hover":1005,"./plot":1009,"./style":1010}],1007:[function(e,t,r){"use strict";var n=e("../../lib"),a=[[-1,0],[1,0],[0,-1],[0,1]];function i(e){return.5-.25*Math.min(1,.5*e)}function o(e,t,r){var n,i,o,s,l,c,u,d,p,h,f,m,g,v=0;for(s=0;s<t.length;s++){for(i=(n=t[s])[0],o=n[1],f=e[i][o],h=0,p=0,l=0;l<4;l++)(u=e[i+(c=a[l])[0]])&&void 0!==(d=u[o+c[1]])&&(0===h?m=g=d:(m=Math.min(m,d),g=Math.max(g,d)),p++,h+=d);if(0===p)throw"iterateInterp2d order is wrong: no defined neighbors";e[i][o]=h/p,void 0===f?p<4&&(v=1):(e[i][o]=(1+r)*e[i][o]-r*f,g>m&&(v=Math.max(v,Math.abs(e[i][o]-f)/(g-m))))}return v}t.exports=function(e,t){var r,a=1;for(o(e,t),r=0;r<t.length&&!(t[r][2]<4);r++);for(t=t.slice(r),r=0;r<100&&a>.01;r++)a=o(e,t,i(a));return a>.01&&n.log("interp2d didn't converge quickly",a),e}},{"../../lib":716}],1008:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r,i,o,s){var l,c,u,d=[],p=n.traceIs(e,"contour"),h=n.traceIs(e,"histogram"),f=n.traceIs(e,"gl2d");if(a(t)&&t.length>1&&!h&&"category"!==s.type){var m=t.length;if(!(m<=o))return p?t.slice(0,o):t.slice(0,o+1);if(p||f)d=t.slice(0,o);else if(1===o)d=[t[0]-.5,t[0]+.5];else{for(d=[1.5*t[0]-.5*t[1]],u=1;u<m;u++)d.push(.5*(t[u-1]+t[u]));d.push(1.5*t[m-1]-.5*t[m-2])}if(m<o){var g=d[d.length-1],v=g-d[d.length-2];for(u=m;u<o;u++)g+=v,d.push(g)}}else{var y=e[s._id.charAt(0)+"calendar"];for(l=h?s.r2c(r,0,y):a(t)&&1===t.length?t[0]:void 0===r?0:("log"===s.type?s.d2c:s.r2c)(r,0,y),c=i||1,u=p||f?0:-.5;u<o;u++)d.push(l+c*u)}return d}},{"../../lib":716,"../../registry":845}],1009:[function(e,t,r){"use strict";var n=e("d3"),a=e("tinycolor2"),i=e("../../registry"),o=e("../../lib"),s=e("../../components/colorscale").makeColorScaleFuncFromTrace,l=e("../../constants/xmlns_namespaces");function c(e,t){var r=t.length-2,n=o.constrain(o.findBin(e,t),0,r),a=t[n],i=t[n+1],s=o.constrain(n+(e-a)/(i-a)-.5,0,r),l=Math.round(s),c=Math.abs(s-l);return s&&s!==r&&c?{bin0:l,frac:c,bin1:Math.round(l+c/(s-l))}:{bin0:l,bin1:l,frac:0}}function u(e,t){var r=t.length-1,n=o.constrain(o.findBin(e,t),0,r),a=t[n],i=(e-a)/(t[n+1]-a)||0;return i<=0?{bin0:n,bin1:n,frac:0}:i<.5?{bin0:n,bin1:n+1,frac:i}:{bin0:n+1,bin1:n,frac:1-i}}function d(e,t,r){e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=Math.round(255*r[3])}t.exports=function(e,t,r,p){var h=t.xaxis,f=t.yaxis;o.makeTraceGroups(p,r,"hm").each((function(t){var r,p,m,g,v,y,b=n.select(this),_=t[0],x=_.trace,w=_.z,k=_.x,M=_.y,T=_.xCenter,C=_.yCenter,S=i.traceIs(x,"contour"),L=S?"best":x.zsmooth,A=w.length,E=o.maxRowLength(w),D=!1,I=!1;for(y=0;void 0===r&&y<k.length-1;)r=h.c2p(k[y]),y++;for(y=k.length-1;void 0===p&&y>0;)p=h.c2p(k[y]),y--;for(p<r&&(m=p,p=r,r=m,D=!0),y=0;void 0===g&&y<M.length-1;)g=f.c2p(M[y]),y++;for(y=M.length-1;void 0===v&&y>0;)v=f.c2p(M[y]),y--;if(v<g&&(m=g,g=v,v=m,I=!0),S&&(T=k,C=M,k=_.xfill,M=_.yfill),"fast"!==L){var P="best"===L?0:.5;r=Math.max(-P*h._length,r),p=Math.min((1+P)*h._length,p),g=Math.max(-P*f._length,g),v=Math.min((1+P)*f._length,v)}var O=Math.round(p-r),R=Math.round(v-g);if(O<=0||R<=0)b.selectAll("image").data([]).exit().remove();else{var F,z;"fast"===L?(F=E,z=A):(F=O,z=R);var N=document.createElement("canvas");N.width=F,N.height=z;var j,B,Y=N.getContext("2d"),H=s(x,{noNumericCheck:!0,returnArray:!0});"fast"===L?(j=D?function(e){return E-1-e}:o.identity,B=I?function(e){return A-1-e}:o.identity):(j=function(e){return o.constrain(Math.round(h.c2p(k[e])-r),0,O)},B=function(e){return o.constrain(Math.round(f.c2p(M[e])-g),0,R)});var V,U,W,G,q,K=B(0),X=[K,K],Z=D?0:1,J=I?0:1,$=0,Q=0,ee=0,te=0;if(L){var re,ne=0;try{re=new Uint8Array(O*R*4)}catch(e){re=new Array(O*R*4)}if("best"===L){var ae,ie,oe,se=T||k,le=C||M,ce=new Array(se.length),ue=new Array(le.length),de=new Array(O),pe=T?u:c,he=C?u:c;for(y=0;y<se.length;y++)ce[y]=Math.round(h.c2p(se[y])-r);for(y=0;y<le.length;y++)ue[y]=Math.round(f.c2p(le[y])-g);for(y=0;y<O;y++)de[y]=pe(y,ce);for(U=0;U<R;U++)for(ie=w[(ae=he(U,ue)).bin0],oe=w[ae.bin1],y=0;y<O;y++,ne+=4)d(re,ne,q=Me(ie,oe,de[y],ae))}else for(U=0;U<A;U++)for(G=w[U],X=B(U),y=0;y<O;y++)q=ke(G[y],1),d(re,ne=4*(X*O+j(y)),q);var fe=Y.createImageData(O,R);try{fe.data.set(re)}catch(e){var me=fe.data,ge=me.length;for(U=0;U<ge;U++)me[U]=re[U]}Y.putImageData(fe,0,0)}else{var ve=x.xgap,ye=x.ygap,be=Math.floor(ve/2),_e=Math.floor(ye/2);for(U=0;U<A;U++)if(G=w[U],X.reverse(),X[J]=B(U+1),X[0]!==X[1]&&void 0!==X[0]&&void 0!==X[1])for(V=[W=j(0),W],y=0;y<E;y++)V.reverse(),V[Z]=j(y+1),V[0]!==V[1]&&void 0!==V[0]&&void 0!==V[1]&&(q=ke(G[y],(V[1]-V[0])*(X[1]-X[0])),Y.fillStyle="rgba("+q.join(",")+")",Y.fillRect(V[0]+be,X[0]+_e,V[1]-V[0]-ve,X[1]-X[0]-ye))}Q=Math.round(Q/$),ee=Math.round(ee/$),te=Math.round(te/$);var xe=a("rgb("+Q+","+ee+","+te+")");e._hmpixcount=(e._hmpixcount||0)+$,e._hmlumcount=(e._hmlumcount||0)+$*xe.getLuminance();var we=b.selectAll("image").data(t);we.enter().append("svg:image").attr({xmlns:l.svg,preserveAspectRatio:"none"}),we.attr({height:R,width:O,x:r,y:g,"xlink:href":N.toDataURL("image/png")})}function ke(e,t){if(void 0!==e){var r=H(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),$+=t,Q+=r[0]*t,ee+=r[1]*t,te+=r[2]*t,r}return[0,0,0,0]}function Me(e,t,r,n){var a=e[r.bin0];if(void 0===a)return ke(void 0,1);var i,o=e[r.bin1],s=t[r.bin0],l=t[r.bin1],c=o-a||0,u=s-a||0;return i=void 0===o?void 0===l?0:void 0===s?2*(l-a):2*(2*l-s-a)/3:void 0===l?void 0===s?0:2*(2*a-o-s)/3:void 0===s?2*(2*l-o-a)/3:l+a-o-s,ke(a+r.frac*c+n.frac*(u+r.frac*i))}}))}},{"../../components/colorscale":603,"../../constants/xmlns_namespaces":693,"../../lib":716,"../../registry":845,d3:164,tinycolor2:535}],1010:[function(e,t,r){"use strict";var n=e("d3");t.exports=function(e){n.select(e).selectAll(".hm image").style("opacity",(function(e){return e.trace.opacity}))}},{d3:164}],1011:[function(e,t,r){"use strict";t.exports=function(e,t,r){!1===r("zsmooth")&&(r("xgap"),r("ygap")),r("zhoverformat")}},{}],1012:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../registry");function o(e,t){var r=t(e);return"scaled"===(r?t(e+"type","array"):"scaled")&&(t(e+"0"),t("d"+e)),r}t.exports=function(e,t,r,s,l,c){var u,d,p=r("z");if(l=l||"x",c=c||"y",void 0===p||!p.length)return 0;if(a.isArray1D(e.z)){u=r(l),d=r(c);var h=a.minRowLength(u),f=a.minRowLength(d);if(0===h||0===f)return 0;t._length=Math.min(h,f,p.length)}else{if(u=o(l,r),d=o(c,r),!function(e){for(var t,r=!0,i=!1,o=!1,s=0;s<e.length;s++){if(t=e[s],!a.isArrayOrTypedArray(t)){r=!1;break}t.length>0&&(i=!0);for(var l=0;l<t.length;l++)if(n(t[l])){o=!0;break}}return r&&i&&o}(p))return 0;r("transpose"),t._length=null}return i.getComponentMethod("calendars","handleTraceDefaults")(e,t,[l,c],s),!0}},{"../../lib":716,"../../registry":845,"fast-isnumeric":227}],1013:[function(e,t,r){"use strict";for(var n=e("../heatmap/attributes"),a=e("../../components/colorscale/attributes"),i=e("../../lib/extend").extendFlat,o=e("../../plot_api/edit_types").overrideAll,s=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],l={},c=0;c<s.length;c++){var u=s[c];l[u]=n[u]}i(l,a("",{cLetter:"z",autoColorDflt:!1})),t.exports=o(l,"calc","nested")},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/edit_types":747,"../heatmap/attributes":998}],1014:[function(e,t,r){"use strict";var n=e("gl-heatmap2d"),a=e("../../plots/cartesian/axes"),i=e("../../lib/str2rgbarray");function o(e,t){this.scene=e,this.uid=t,this.type="heatmapgl",this.name="",this.hoverinfo="all",this.xData=[],this.yData=[],this.zData=[],this.textLabels=[],this.idToIndex=[],this.bounds=[0,0,0,0],this.options={z:[],x:[],y:[],shape:[0,0],colorLevels:[0],colorValues:[0,0,0,1]},this.heatmap=n(e.glplot,this.options),this.heatmap._trace=this}var s=o.prototype;s.handlePick=function(e){var t=this.options,r=t.shape,n=e.pointId,a=n%r[0],i=Math.floor(n/r[0]),o=n;return{trace:this,dataCoord:e.dataCoord,traceCoord:[t.x[a],t.y[i],t.z[o]],textLabel:this.textLabels[n],name:this.name,pointIndex:[i,a],hoverinfo:this.hoverinfo}},s.update=function(e,t){var r=t[0];this.index=e.index,this.name=e.name,this.hoverinfo=e.hoverinfo;var n=r.z;this.options.z=[].concat.apply([],n);var o=n[0].length,s=n.length;this.options.shape=[o,s],this.options.x=r.x,this.options.y=r.y;var l=function(e){for(var t=e.colorscale,r=e.zmin,n=e.zmax,a=t.length,o=new Array(a),s=new Array(4*a),l=0;l<a;l++){var c=t[l],u=i(c[1]);o[l]=r+c[0]*(n-r);for(var d=0;d<4;d++)s[4*l+d]=u[d]}return{colorLevels:o,colorValues:s}}(e);this.options.colorLevels=l.colorLevels,this.options.colorValues=l.colorValues,this.textLabels=[].concat.apply([],e.text),this.heatmap.update(this.options);var c=this.scene.xaxis,u=this.scene.yaxis;e._extremes[c._id]=a.findExtremes(c,r.x),e._extremes[u._id]=a.findExtremes(u,r.y)},s.dispose=function(){this.heatmap.dispose()},t.exports=function(e,t,r){var n=new o(e,t.uid);return n.update(t,r),n}},{"../../lib/str2rgbarray":739,"../../plots/cartesian/axes":764,"gl-heatmap2d":253}],1015:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("../heatmap/defaults"),colorbar:e("../heatmap/colorbar"),calc:e("../heatmap/calc"),plot:e("./convert"),moduleType:"trace",name:"heatmapgl",basePlotModule:e("../../plots/gl2d"),categories:["gl","gl2d","2dMap"],meta:{}}},{"../../plots/gl2d":802,"../heatmap/calc":999,"../heatmap/colorbar":1001,"../heatmap/defaults":1003,"./attributes":1013,"./convert":1014}],1016:[function(e,t,r){"use strict";var n=e("../bar/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("./bin_attributes"),o=e("./constants"),s=e("../../lib/extend").extendFlat;t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),orientation:n.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:i("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:i("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:a({},{keys:o.eventDataKeys}),marker:n.marker,offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,_deprecated:{bardir:n._deprecated.bardir}}},{"../../lib/extend":707,"../../plots/template_attributes":840,"../bar/attributes":855,"./bin_attributes":1018,"./constants":1022}],1017:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=e.length,n=0,a=0;a<r;a++)t[a]?(e[a]/=t[a],n+=e[a]):e[a]=null;return n}},{}],1018:[function(e,t,r){"use strict";t.exports=function(e,t){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},{}],1019:[function(e,t,r){"use strict";var n=e("fast-isnumeric");t.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,a){var i=a[t];return n(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,a,i){var o=a[t];return n(o)&&(o=Number(o),r[e]+=o,i[e]++),0},min:function(e,t,r,a){var i=a[t];if(n(i)){if(i=Number(i),!n(r[e]))return r[e]=i,i;if(r[e]>i){var o=i-r[e];return r[e]=i,o}}return 0},max:function(e,t,r,a){var i=a[t];if(n(i)){if(i=Number(i),!n(r[e]))return r[e]=i,i;if(r[e]<i){var o=i-r[e];return r[e]=i,o}}return 0}}},{"fast-isnumeric":227}],1020:[function(e,t,r){"use strict";var n=e("../../constants/numerical"),a=n.ONEAVGYEAR,i=n.ONEAVGMONTH,o=n.ONEDAY,s=n.ONEHOUR,l=n.ONEMIN,c=n.ONESEC,u=e("../../plots/cartesian/axes").tickIncrement;function d(e,t,r,n){if(e*t<=0)return 1/0;for(var a=Math.abs(t-e),i="date"===r.type,o=p(a,i),s=0;s<10;s++){var l=p(80*o,i);if(o===l)break;if(!h(l,e,t,i,r,n))break;o=l}return o}function p(e,t){return t&&e>c?e>o?e>1.1*a?a:e>1.1*i?i:o:e>s?s:e>l?l:c:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function h(e,t,r,n,i,s){if(n&&e>o){var l=f(t,i,s),c=f(r,i,s),u=e===a?0:1;return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function f(e,t,r){var n=t.c2d(e,a,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(e,t,r,n,i){var s,l,c=-1.1*t,p=-.1*t,h=e-p,f=r[0],m=r[1],g=Math.min(d(f+p,f+h,n,i),d(m+p,m+h,n,i)),v=Math.min(d(f+c,f+p,n,i),d(m+c,m+p,n,i));if(g>v&&v<Math.abs(m-f)/4e3?(s=g,l=!1):(s=Math.min(g,v),l=!0),"date"===n.type&&s>o){var y=s===a?1:6,b=s===a?"M12":"M1";return function(t,r){var o=n.c2d(t,a,i),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,i);if(c<t){var d=u(c,b,!1,i);(c+d)/2<t+e&&(c=d)}return r&&l?u(c,b,!0,i):c}}return function(t,r){var n=s*Math.round(t/s);return n+s/10<t&&n+.9*s<t+e&&(n+=s),r&&l&&(n-=s),n}}},{"../../constants/numerical":692,"../../plots/cartesian/axes":764}],1021:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../registry"),o=e("../../plots/cartesian/axes"),s=e("../bar/arrays_to_calcdata"),l=e("./bin_functions"),c=e("./norm_functions"),u=e("./average"),d=e("./bin_label_vals");function p(e,t,r,s,l){var c,u,d,h,f,m,g,v=s+"bins",y=e._fullLayout,b=t["_"+s+"bingroup"],_=y._histogramBinOpts[b],x="overlay"===y.barmode,w=function(e){return r.r2c(e,0,h)},k=function(e){return r.c2r(e,0,h)},M="date"===r.type?function(e){return e||0===e?a.cleanDate(e,null,h):null}:function(e){return n(e)?Number(e):null};function T(e,t,r){t[e+"Found"]?(t[e]=M(t[e]),null===t[e]&&(t[e]=r[e])):(m[e]=t[e]=r[e],a.nestedProperty(u[0],v+"."+e).set(r[e]))}if(t["_"+s+"autoBinFinished"])delete t["_"+s+"autoBinFinished"];else{u=_.traces;var C=[],S=!0,L=!1,A=!1;for(c=0;c<u.length;c++)if((d=u[c]).visible){var E=_.dirs[c];f=d["_"+E+"pos0"]=r.makeCalcdata(d,E),C=a.concat(C,f),delete d["_"+s+"autoBinFinished"],!0===t.visible&&(S?S=!1:(delete d._autoBin,d["_"+s+"autoBinFinished"]=1),i.traceIs(d,"2dMap")&&(L=!0),"histogram2dcontour"===d.type&&(A=!0))}h=u[0][s+"calendar"];var D=o.autoBin(C,r,_.nbins,L,h,_.sizeFound&&_.size),I=u[0]._autoBin={};if(m=I[_.dirs[0]]={},A&&(_.size||(D.start=k(o.tickIncrement(w(D.start),D.size,!0,h))),void 0===_.end&&(D.end=k(o.tickIncrement(w(D.end),D.size,!1,h)))),x&&!i.traceIs(t,"2dMap")&&0===D._dataSpan&&"category"!==r.type&&"multicategory"!==r.type){if(l)return[D,f,!0];D=function(e,t,r,n,i){var o,s,l,c=e._fullLayout,u=function(e,t){for(var r=t.xaxis,n=t.yaxis,a=t.orientation,i=[],o=e._fullData,s=0;s<o.length;s++){var l=o[s];"histogram"===l.type&&!0===l.visible&&l.orientation===a&&l.xaxis===r&&l.yaxis===n&&i.push(l)}return i}(e,t),d=!1,h=1/0,f=[t];for(o=0;o<u.length;o++)if((s=u[o])===t)d=!0;else if(d){var m=p(e,s,r,n,!0),g=m[0],v=m[2];s["_"+n+"autoBinFinished"]=1,s["_"+n+"pos0"]=m[1],v?f.push(s):h=Math.min(h,g.size)}else l=c._histogramBinOpts[s["_"+n+"bingroup"]],h=Math.min(h,l.size||s[i].size);var y=new Array(f.length);for(o=0;o<f.length;o++)for(var b=f[o]["_"+n+"pos0"],_=0;_<b.length;_++)if(void 0!==b[_]){y[o]=b[_];break}for(isFinite(h)||(h=a.distinctVals(y).minDiff),o=0;o<f.length;o++){var x=(s=f[o])[n+"calendar"],w={start:r.c2r(y[o]-h/2,0,x),end:r.c2r(y[o]+h/2,0,x),size:h};s._input[i]=s[i]=w,(l=c._histogramBinOpts[s["_"+n+"bingroup"]])&&a.extendFlat(l,w)}return t[i]}(e,t,r,s,v)}(g=d.cumulative||{}).enabled&&"include"!==g.currentbin&&("decreasing"===g.direction?D.start=k(o.tickIncrement(w(D.start),D.size,!0,h)):D.end=k(o.tickIncrement(w(D.end),D.size,!1,h))),_.size=D.size,_.sizeFound||(m.size=D.size,a.nestedProperty(u[0],v+".size").set(D.size)),T("start",_,D),T("end",_,D)}f=t["_"+s+"pos0"],delete t["_"+s+"pos0"];var P=t._input[v]||{},O=a.extendFlat({},_),R=_.start,F=r.r2l(P.start),z=void 0!==F;if((_.startFound||z)&&F!==r.r2l(R)){var N=z?F:a.aggNums(Math.min,null,f),j={type:"category"===r.type||"multicategory"===r.type?"linear":r.type,r2l:r.r2l,dtick:_.size,tick0:R,calendar:h,range:[N,o.tickIncrement(N,_.size,!1,h)].map(r.l2r)},B=o.tickFirst(j);B>r.r2l(N)&&(B=o.tickIncrement(B,_.size,!0,h)),O.start=r.l2r(B),z||a.nestedProperty(t,v+".start").set(O.start)}var Y=_.end,H=r.r2l(P.end),V=void 0!==H;if((_.endFound||V)&&H!==r.r2l(Y)){var U=V?H:a.aggNums(Math.max,null,f);O.end=r.l2r(U),V||a.nestedProperty(t,v+".start").set(O.end)}var W="autobin"+s;return!1===t._input[W]&&(t._input[v]=a.extendFlat({},t[v]||{}),delete t._input[W],delete t[W]),[O,f]}t.exports={calc:function(e,t){var r,i,h,f,m=[],g=[],v=o.getFromId(e,"h"===t.orientation?t.yaxis:t.xaxis),y="h"===t.orientation?"y":"x",b={x:"y",y:"x"}[y],_=t[y+"calendar"],x=t.cumulative,w=p(e,t,v,y),k=w[0],M=w[1],T="string"==typeof k.size,C=[],S=T?C:k,L=[],A=[],E=[],D=0,I=t.histnorm,P=t.histfunc,O=-1!==I.indexOf("density");x.enabled&&O&&(I=I.replace(/ ?density$/,""),O=!1);var R,F="max"===P||"min"===P?null:0,z=l.count,N=c[I],j=!1,B=function(e){return v.r2c(e,0,_)};for(a.isArrayOrTypedArray(t[b])&&"count"!==P&&(R=t[b],j="avg"===P,z=l[P]),r=B(k.start),h=B(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r<h&&m.length<1e6&&(i=o.tickIncrement(r,k.size,!1,_),m.push((r+i)/2),g.push(F),E.push([]),C.push(r),O&&L.push(1/(i-r)),j&&A.push(0),!(i<=r));)r=i;C.push(r),T||"date"!==v.type||(S={start:B(S.start),end:B(S.end),size:S.size});var Y,H=g.length,V=!0,U=1/0,W=1/0,G={};for(r=0;r<M.length;r++){var q=M[r];(f=a.findBin(q,S))>=0&&f<H&&(D+=z(f,r,g,R,A),V&&E[f].length&&q!==M[E[f][0]]&&(V=!1),E[f].push(r),G[r]=f,U=Math.min(U,q-C[f]),W=Math.min(W,C[f+1]-q))}V||(Y=d(U,W,C,v,_)),j&&(D=u(g,A)),N&&N(g,D,L),x.enabled&&function(e,t,r){var n,a,i;function o(t){i=e[t],e[t]/=2}function s(t){a=e[t],e[t]=i+a/2,i+=a}if("half"===r)if("increasing"===t)for(o(0),n=1;n<e.length;n++)s(n);else for(o(e.length-1),n=e.length-2;n>=0;n--)s(n);else if("increasing"===t){for(n=1;n<e.length;n++)e[n]+=e[n-1];"exclude"===r&&(e.unshift(0),e.pop())}else{for(n=e.length-2;n>=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(g,x.direction,x.currentbin);var K=Math.min(m.length,g.length),X=[],Z=0,J=K-1;for(r=0;r<K;r++)if(g[r]){Z=r;break}for(r=K-1;r>=Z;r--)if(g[r]){J=r;break}for(r=Z;r<=J;r++)if(n(m[r])&&n(g[r])){var $={p:m[r],s:g[r],b:0};x.enabled||($.pts=E[r],V?$.ph0=$.ph1=E[r].length?M[E[r][0]]:m[r]:($.ph0=Y(C[r]),$.ph1=Y(C[r+1],!0))),X.push($)}return 1===X.length&&(X[0].width1=o.tickIncrement(X[0].p,k.size,!1,_)-X[0].p),s(X,t),a.isArrayOrTypedArray(t.selectedpoints)&&a.tagSelected(X,t,G),X},calcAllAutoBins:p}},{"../../lib":716,"../../plots/cartesian/axes":764,"../../registry":845,"../bar/arrays_to_calcdata":854,"./average":1017,"./bin_functions":1019,"./bin_label_vals":1020,"./norm_functions":1028,"fast-isnumeric":227}],1022:[function(e,t,r){"use strict";t.exports={eventDataKeys:["binNumber"]}},{}],1023:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axis_ids"),i=e("../../registry").traceIs,o=e("../bar/defaults").handleGroupingDefaults,s=n.nestedProperty,l=a.getAxisGroup,c=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],u=["x","y"];t.exports=function(e,t){var r,d,p,h,f,m,g,v=t._histogramBinOpts={},y=[],b={},_=[];function x(e,t){return n.coerce(r._input,r,r._module.attributes,e,t)}function w(e){return"v"===e.orientation?"x":"y"}function k(e,r,i){var o=e.uid+"__"+i;r||(r=o);var s=function(e,r){return a.getFromTrace({_fullLayout:t},e,r).type}(e,i),l=e[i+"calendar"],c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(e),c.dirs.push(i)):(r=o,s!==c.axType&&n.warn(["Attempted to group the bins of trace",e.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&n.warn(["Attempted to group the bins of trace",e.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(v[r]={traces:[e],dirs:[i],axType:s,calendar:e[i+"calendar"]||""}),e["_"+i+"bingroup"]=r}for(f=0;f<e.length;f++)r=e[f],i(r,"histogram")&&(y.push(r),delete r._xautoBinFinished,delete r._yautoBinFinished,i(r,"2dMap")||o(r._input,r,t,x));var M=t._alignmentOpts||{};for(f=0;f<y.length;f++){if(r=y[f],p="",!i(r,"2dMap")){if(h=w(r),"group"===t.barmode&&r.alignmentgroup){var T=r[h+"axis"],C=l(t,T)+r.orientation;(M[C]||{})[r.alignmentgroup]&&(p=C)}p||"overlay"===t.barmode||(p=l(t,r.xaxis)+l(t,r.yaxis)+w(r))}p?(b[p]||(b[p]=[]),b[p].push(r)):_.push(r)}for(p in b)if(1!==(d=b[p]).length){var S=!1;for(f=0;f<d.length;f++){r=d[f],S=x("bingroup");break}for(p=S||p,f=0;f<d.length;f++){var L=(r=d[f])._input.bingroup;L&&L!==p&&n.warn(["Trace",r.index,"must match","within bingroup",p+".","Ignoring its bingroup:",L,"setting."].join(" ")),r.bingroup=p,k(r,p,w(r))}}else _.push(d[0]);for(f=0;f<_.length;f++){r=_[f];var A=x("bingroup");if(i(r,"2dMap"))for(g=0;g<2;g++){var E=x((h=u[g])+"bingroup",A?A+"__"+h:null);k(r,E,h)}else k(r,A,w(r))}for(p in v){var D=v[p];for(d=D.traces,m=0;m<c.length;m++){var I,P,O=c[m],R=O.name;if("nbins"!==R||!D.sizeFound){for(f=0;f<d.length;f++){if(r=d[f],h=D.dirs[f],I=O.aStr[h],void 0!==s(r._input,I).get()){D[R]=x(I),D[R+"Found"]=!0;break}(P=(r._autoBin||{})[h]||{})[R]&&s(r,I).set(P[R])}if("start"===R||"end"===R)for(;f<d.length;f++)(r=d[f])["_"+h+"bingroup"]&&x(I,(P=(r._autoBin||{})[h]||{})[R]);"nbins"!==R||D.sizeFound||D.nbinsFound||(r=d[0],D[R]=x(I))}}}}},{"../../lib":716,"../../plots/cartesian/axis_ids":767,"../../registry":845,"../bar/defaults":859}],1024:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../components/color"),o=e("../bar/style_defaults"),s=e("./attributes");t.exports=function(e,t,r,l){function c(r,n){return a.coerce(e,t,s,r,n)}var u=c("x"),d=c("y");c("cumulative.enabled")&&(c("cumulative.direction"),c("cumulative.currentbin")),c("text"),c("hovertext"),c("hovertemplate");var p=c("orientation",d&&!u?"h":"v"),h="v"===p?"x":"y",f="v"===p?"y":"x",m=u&&d?Math.min(a.minRowLength(u)&&a.minRowLength(d)):a.minRowLength(t[h]||[]);if(m){t._length=m,n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],l),t[f]&&c("histfunc"),c("histnorm"),c("autobin"+h),o(e,t,c,r,l),a.coerceSelectionMarkerOpacity(t,c);var g=(t.marker.line||{}).color,v=n.getComponentMethod("errorbars","supplyDefaults");v(e,t,g||i.defaultLine,{axis:"y"}),v(e,t,g||i.defaultLine,{axis:"x",inherit:"y"})}else t.visible=!1}},{"../../components/color":591,"../../lib":716,"../../registry":845,"../bar/style_defaults":870,"./attributes":1016}],1025:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){if(e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"zLabelVal"in t&&(e.z=t.zLabelVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),!(r.cumulative||{}).enabled){var i,o=Array.isArray(a)?n[0].pts[a[0]][a[1]]:n[a].pts;if(e.pointNumbers=o,e.binNumber=e.pointNumber,delete e.pointNumber,delete e.pointIndex,r._indexToPoints){i=[];for(var s=0;s<o.length;s++)i=i.concat(r._indexToPoints[o[s]])}else i=o;e.pointIndices=i}return e}},{}],1026:[function(e,t,r){"use strict";var n=e("../bar/hover").hoverPoints,a=e("../../plots/cartesian/axes").hoverLabelText;t.exports=function(e,t,r,i){var o=n(e,t,r,i);if(o){var s=(e=o[0]).cd[e.index],l=e.cd[0].trace;if(!l.cumulative.enabled){var c="h"===l.orientation?"y":"x";e[c+"Label"]=a(e[c+"a"],s.ph0,s.ph1)}return l.hovermplate&&(e.hovertemplate=l.hovertemplate),o}}},{"../../plots/cartesian/axes":764,"../bar/hover":862}],1027:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("../bar/layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),supplyLayoutDefaults:e("../bar/layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("../bar/cross_trace_calc").crossTraceCalc,plot:e("../bar/plot").plot,layerName:"barlayer",style:e("../bar/style").style,styleOnSelect:e("../bar/style").styleOnSelect,colorbar:e("../scatter/marker_colorbar"),hoverPoints:e("./hover"),selectPoints:e("../bar/select"),eventData:e("./event_data"),moduleType:"trace",name:"histogram",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}},{"../../plots/cartesian":775,"../bar/cross_trace_calc":858,"../bar/layout_attributes":864,"../bar/layout_defaults":865,"../bar/plot":866,"../bar/select":867,"../bar/style":869,"../scatter/marker_colorbar":1136,"./attributes":1016,"./calc":1021,"./cross_trace_defaults":1023,"./defaults":1024,"./event_data":1025,"./hover":1026}],1028:[function(e,t,r){"use strict";t.exports={percent:function(e,t){for(var r=e.length,n=100/t,a=0;a<r;a++)e[a]*=n},probability:function(e,t){for(var r=e.length,n=0;n<r;n++)e[n]/=t},density:function(e,t,r,n){var a=e.length;n=n||1;for(var i=0;i<a;i++)e[i]*=r[i]*n},"probability density":function(e,t,r,n){var a=e.length;n&&(t/=n);for(var i=0;i<a;i++)e[i]*=r[i]/t}}},{}],1029:[function(e,t,r){"use strict";var n=e("../histogram/attributes"),a=e("../histogram/bin_attributes"),i=e("../heatmap/attributes"),o=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../components/colorscale/attributes"),l=e("../../lib/extend").extendFlat;t.exports=l({x:n.x,y:n.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:a("x"),nbinsy:n.nbinsy,ybins:a("y"),autobinx:n.autobinx,autobiny:n.autobiny,bingroup:l({},n.bingroup,{}),xbingroup:l({},n.bingroup,{}),ybingroup:l({},n.bingroup,{}),xgap:i.xgap,ygap:i.ygap,zsmooth:i.zsmooth,zhoverformat:i.zhoverformat,hovertemplate:o({},{keys:"z"})},s("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/template_attributes":840,"../heatmap/attributes":998,"../histogram/attributes":1016,"../histogram/bin_attributes":1018}],1030:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../histogram/bin_functions"),o=e("../histogram/norm_functions"),s=e("../histogram/average"),l=e("../histogram/bin_label_vals"),c=e("../histogram/calc").calcAllAutoBins;function u(e,t,r,n){var a,i=new Array(e);if(n)for(a=0;a<e;a++)i[a]=1/(t[a+1]-t[a]);else{var o=1/r;for(a=0;a<e;a++)i[a]=o}return i}function d(e,t){return{start:e(t.start),end:e(t.end),size:t.size}}function p(e,t,r,n,a,i){var o,s=e.length-1,c=new Array(s),u=l(r,n,e,a,i);for(o=0;o<s;o++){var d=(t||[])[o];c[o]=void 0===d?[u(e[o]),u(e[o+1],!0)]:[d,d]}return c}t.exports=function(e,t){var r,l,h,f,m=a.getFromId(e,t.xaxis),g=a.getFromId(e,t.yaxis),v=t.xcalendar,y=t.ycalendar,b=function(e){return m.r2c(e,0,v)},_=function(e){return g.r2c(e,0,y)},x=c(e,t,m,"x"),w=x[0],k=x[1],M=c(e,t,g,"y"),T=M[0],C=M[1],S=t._length;k.length>S&&k.splice(S,k.length-S),C.length>S&&C.splice(S,C.length-S);var L=[],A=[],E=[],D="string"==typeof w.size,I="string"==typeof T.size,P=[],O=[],R=D?P:w,F=I?O:T,z=0,N=[],j=[],B=t.histnorm,Y=t.histfunc,H=-1!==B.indexOf("density"),V="max"===Y||"min"===Y?null:0,U=i.count,W=o[B],G=!1,q=[],K=[],X="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";X&&"count"!==Y&&(G="avg"===Y,U=i[Y]);var Z=w.size,J=b(w.start),$=b(w.end)+(J-a.tickIncrement(J,Z,!1,v))/1e6;for(r=J;r<$;r=a.tickIncrement(r,Z,!1,v))A.push(V),P.push(r),G&&E.push(0);P.push(r);var Q,ee=A.length,te=(r-J)/ee,re=(Q=J+te/2,m.c2r(Q,0,v)),ne=T.size,ae=_(T.start),ie=_(T.end)+(ae-a.tickIncrement(ae,ne,!1,y))/1e6;for(r=ae;r<ie;r=a.tickIncrement(r,ne,!1,y)){L.push(A.slice()),O.push(r);var oe=new Array(ee);for(l=0;l<ee;l++)oe[l]=[];j.push(oe),G&&N.push(E.slice())}O.push(r);var se=L.length,le=(r-ae)/se,ce=function(e){return g.c2r(e,0,y)}(ae+le/2);H&&(q=u(A.length,R,te,D),K=u(L.length,F,le,I)),D||"date"!==m.type||(R=d(b,R)),I||"date"!==g.type||(F=d(_,F));var ue=!0,de=!0,pe=new Array(ee),he=new Array(se),fe=1/0,me=1/0,ge=1/0,ve=1/0;for(r=0;r<S;r++){var ye=k[r],be=C[r];h=n.findBin(ye,R),f=n.findBin(be,F),h>=0&&h<ee&&f>=0&&f<se&&(z+=U(h,r,L[f],X,N[f]),j[f][h].push(r),ue&&(void 0===pe[h]?pe[h]=ye:pe[h]!==ye&&(ue=!1)),de&&(void 0===he[f]?he[f]=be:he[f]!==be&&(de=!1)),fe=Math.min(fe,ye-P[h]),me=Math.min(me,P[h+1]-ye),ge=Math.min(ge,be-O[f]),ve=Math.min(ve,O[f+1]-be))}if(G)for(f=0;f<se;f++)z+=s(L[f],N[f]);if(W)for(f=0;f<se;f++)W(L[f],z,q,K[f]);return{x:k,xRanges:p(P,ue&&pe,fe,me,m,v),x0:re,dx:te,y:C,yRanges:p(O,de&&he,ge,ve,g,y),y0:ce,dy:le,z:L,pts:j}}},{"../../lib":716,"../../plots/cartesian/axes":764,"../histogram/average":1017,"../histogram/bin_functions":1019,"../histogram/bin_label_vals":1020,"../histogram/calc":1021,"../histogram/norm_functions":1028}],1031:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./sample_defaults"),i=e("../heatmap/style_defaults"),o=e("../../components/colorscale/defaults"),s=e("./attributes");t.exports=function(e,t,r,l){function c(r,a){return n.coerce(e,t,s,r,a)}a(e,t,c,l),!1!==t.visible&&(i(e,t,c,l),o(e,t,l,c,{prefix:"",cLetter:"z"}),c("hovertemplate"))}},{"../../components/colorscale/defaults":601,"../../lib":716,"../heatmap/style_defaults":1011,"./attributes":1029,"./sample_defaults":1034}],1032:[function(e,t,r){"use strict";var n=e("../heatmap/hover"),a=e("../../plots/cartesian/axes").hoverLabelText;t.exports=function(e,t,r,i,o,s){var l=n(e,t,r,i,o,s);if(l){var c=(e=l[0]).index,u=c[0],d=c[1],p=e.cd[0],h=p.xRanges[d],f=p.yRanges[u];return e.xLabel=a(e.xa,h[0],h[1]),e.yLabel=a(e.ya,f[0],f[1]),l}}},{"../../plots/cartesian/axes":764,"../heatmap/hover":1005}],1033:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../histogram/cross_trace_defaults"),calc:e("../heatmap/calc"),plot:e("../heatmap/plot"),layerName:"heatmaplayer",colorbar:e("../heatmap/colorbar"),style:e("../heatmap/style"),hoverPoints:e("./hover"),eventData:e("../histogram/event_data"),moduleType:"trace",name:"histogram2d",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","histogram"],meta:{}}},{"../../plots/cartesian":775,"../heatmap/calc":999,"../heatmap/colorbar":1001,"../heatmap/plot":1009,"../heatmap/style":1010,"../histogram/cross_trace_defaults":1023,"../histogram/event_data":1025,"./attributes":1029,"./defaults":1031,"./hover":1032}],1034:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib");t.exports=function(e,t,r,i){var o=r("x"),s=r("y"),l=a.minRowLength(o),c=a.minRowLength(s);l&&c?(t._length=Math.min(l,c),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],i),(r("z")||r("marker.color"))&&r("histfunc"),r("histnorm"),r("autobinx"),r("autobiny")):t.visible=!1}},{"../../lib":716,"../../registry":845}],1035:[function(e,t,r){"use strict";var n=e("../histogram2d/attributes"),a=e("../contour/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../lib/extend").extendFlat;t.exports=o({x:n.x,y:n.y,z:n.z,marker:n.marker,histnorm:n.histnorm,histfunc:n.histfunc,nbinsx:n.nbinsx,xbins:n.xbins,nbinsy:n.nbinsy,ybins:n.ybins,autobinx:n.autobinx,autobiny:n.autobiny,bingroup:n.bingroup,xbingroup:n.xbingroup,ybingroup:n.ybingroup,autocontour:a.autocontour,ncontours:a.ncontours,contours:a.contours,line:{color:a.line.color,width:o({},a.line.width,{dflt:.5}),dash:a.line.dash,smoothing:a.line.smoothing,editType:"plot"},zhoverformat:n.zhoverformat,hovertemplate:n.hovertemplate},i("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../contour/attributes":941,"../histogram2d/attributes":1029}],1036:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../histogram2d/sample_defaults"),i=e("../contour/contours_defaults"),o=e("../contour/style_defaults"),s=e("./attributes");t.exports=function(e,t,r,l){function c(r,a){return n.coerce(e,t,s,r,a)}a(e,t,c,l),!1!==t.visible&&(i(e,t,c,(function(r){return n.coerce2(e,t,s,r)})),o(e,t,c,l),c("hovertemplate"))}},{"../../lib":716,"../contour/contours_defaults":948,"../contour/style_defaults":962,"../histogram2d/sample_defaults":1034,"./attributes":1035}],1037:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../histogram/cross_trace_defaults"),calc:e("../contour/calc"),plot:e("../contour/plot").plot,layerName:"contourlayer",style:e("../contour/style"),colorbar:e("../contour/colorbar"),hoverPoints:e("../contour/hover"),moduleType:"trace",name:"histogram2dcontour",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}},{"../../plots/cartesian":775,"../contour/calc":942,"../contour/colorbar":944,"../contour/hover":954,"../contour/plot":959,"../contour/style":961,"../histogram/cross_trace_defaults":1023,"./attributes":1035,"./defaults":1036}],1038:[function(e,t,r){"use strict";for(var n=e("../../plots/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../lib/extend").extendFlat,o=e("./constants").colormodel,s=["rgb","rgba","hsl","hsla"],l=[],c=[],u=0;u<s.length;u++)l.push("For the `"+s[u]+"` colormodel, it is ["+o[s[u]].min.join(", ")+"]."),c.push("For the `"+s[u]+"` colormodel, it is ["+o[s[u]].max.join(", ")+"].");t.exports=i({z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:s,dflt:"rgb",editType:"calc"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:i({},n.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:a({},{keys:["z","color","colormodel"]}),transforms:void 0})},{"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"./constants":1040}],1039:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./constants"),i=e("fast-isnumeric"),o=e("../../plots/cartesian/axes"),s=e("../../lib").maxRowLength;function l(e,t,r,a){return function(i){return n.constrain((i-e)*t,r,a)}}function c(e,t){return function(r){return n.constrain(r,e,t)}}t.exports=function(e,t){var r,n=o.getFromId(e,t.xaxis||"x"),u=o.getFromId(e,t.yaxis||"y"),d=n.d2c(t.x0)-t.dx/2,p=u.d2c(t.y0)-t.dy/2,h=t.z.length,f=s(t.z),m=[d,d+f*t.dx],g=[p,p+h*t.dy];if(n&&"log"===n.type)for(r=0;r<f;r++)m.push(d+r*t.dx);if(u&&"log"===u.type)for(r=0;r<h;r++)g.push(p+r*t.dy);return t._extremes[n._id]=o.findExtremes(n,m),t._extremes[u._id]=o.findExtremes(u,g),t._scaler=function(e){var t=e.colormodel,r=t.length,n=a.colormodel[t];e._sArray=[];for(var o=0;o<r;o++)n.min[o]!==e.zmin[o]||n.max[o]!==e.zmax[o]?e._sArray.push(l(e.zmin[o],(n.max[o]-n.min[o])/(e.zmax[o]-e.zmin[o]),n.min[o],n.max[o])):e._sArray.push(c(n.min[o],n.max[o]));return function(t){for(var n=t.slice(0,r),a=0;a<r;a++){var o=n[a];if(!i(o))return!1;n[a]=e._sArray[a](o)}return n}}(t),[{x0:d,y0:p,z:t.z,w:f,h:h}]}},{"../../lib":716,"../../plots/cartesian/axes":764,"./constants":1040,"fast-isnumeric":227}],1040:[function(e,t,r){"use strict";t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%",""]}}}},{}],1041:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("./constants");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}var o=r("z");if(void 0!==o&&o.length&&o[0]&&o[0].length){r("x0"),r("y0"),r("dx"),r("dy");var s=r("colormodel");r("zmin",i.colormodel[s].min),r("zmax",i.colormodel[s].max),r("text"),r("hovertext"),r("hovertemplate"),t._length=null}else t.visible=!1}},{"../../lib":716,"./attributes":1038,"./constants":1040}],1042:[function(e,t,r){"use strict";t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e}},{}],1043:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../lib"),i=e("./constants");t.exports=function(e,t,r){var o=e.cd[0],s=o.trace,l=e.xa,c=e.ya;if(!(n.inbox(t-o.x0,t-(o.x0+o.w*s.dx),0)>0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u=Math.floor((t-o.x0)/s.dx),d=Math.floor(Math.abs(r-o.y0)/s.dy);if(o.z[d][u]){var p,h=o.hi||s.hoverinfo;if(h){var f=h.split("+");-1!==f.indexOf("all")&&(f=["color"]),-1!==f.indexOf("color")&&(p=!0)}var m,g=s.colormodel,v=g.length,y=s._scaler(o.z[d][u]),b=i.colormodel[g].suffix,_=[];(s.hovertemplate||p)&&(_.push("["+[y[0]+b[0],y[1]+b[1],y[2]+b[2]].join(", ")),4===v&&_.push(", "+y[3]+b[3]),_.push("]"),_=_.join(""),e.extraText=g.toUpperCase()+": "+_),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[d])?m=s.hovertext[d][u]:Array.isArray(s.text)&&Array.isArray(s.text[d])&&(m=s.text[d][u]);var x=c.c2p(o.y0+(d+.5)*s.dy),w=o.x0+(u+.5)*s.dx,k=o.y0+(d+.5)*s.dy,M="["+o.z[d][u].slice(0,s.colormodel.length).join(", ")+"]";return[a.extendFlat(e,{index:[d,u],x0:l.c2p(o.x0+u*s.dx),x1:l.c2p(o.x0+(u+1)*s.dx),y0:x,y1:x,color:y,xVal:w,xLabelVal:w,yVal:k,yLabelVal:k,zLabelVal:M,text:m,hovertemplateLabels:{zLabel:M,colorLabel:_,"color[0]Label":y[0]+b[0],"color[1]Label":y[1]+b[1],"color[2]Label":y[2]+b[2],"color[3]Label":y[3]+b[3]}})]}}}},{"../../components/fx":629,"../../lib":716,"./constants":1040}],1044:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover"),eventData:e("./event_data"),moduleType:"trace",name:"image",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":775,"./attributes":1038,"./calc":1039,"./defaults":1041,"./event_data":1042,"./hover":1043,"./plot":1045,"./style":1046}],1045:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../constants/xmlns_namespaces"),o=e("./constants");t.exports=function(e,t,r,s){var l=t.xaxis,c=t.yaxis;a.makeTraceGroups(s,r,"im").each((function(e){var t,r,s,u,d,p,h=n.select(this),f=e[0],m=f.trace,g=f.z,v=f.x0,y=f.y0,b=f.w,_=f.h,x=m.dx,w=m.dy;for(p=0;void 0===t&&p<b;)t=l.c2p(v+p*x),p++;for(p=b;void 0===r&&p>0;)r=l.c2p(v+p*x),p--;for(p=0;void 0===u&&p<_;)u=c.c2p(y+p*w),p++;for(p=_;void 0===d&&p>0;)d=c.c2p(y+p*w),p--;r<t&&(s=r,r=t,t=s),d<u&&(s=u,u=d,d=s),t=Math.max(-.5*l._length,t),r=Math.min(1.5*l._length,r),u=Math.max(-.5*c._length,u),d=Math.min(1.5*c._length,d);var k=Math.round(r-t),M=Math.round(d-u);if(k<=0||M<=0)h.selectAll("image").data([]).exit().remove();else{var T=document.createElement("canvas");T.width=k,T.height=M;var C,S=T.getContext("2d"),L=function(e){return a.constrain(Math.round(l.c2p(v+e*x)-t),0,k)},A=function(e){return a.constrain(Math.round(c.c2p(y+e*w)-u),0,M)},E=o.colormodel[m.colormodel].fmt;for(p=0;p<f.w;p++){var D=L(p),I=L(p+1);if(I!==D&&!isNaN(I)&&!isNaN(D))for(var P=0;P<f.h;P++){var O=A(P),R=A(P+1);R===O||isNaN(R)||isNaN(O)||!g[P][p]||(C=m._scaler(g[P][p]),S.fillStyle=C?m.colormodel+"("+E(C).join(",")+")":"rgba(0,0,0,0)",S.fillRect(D,O,I-D,R-O))}}var F=h.selectAll("image").data(e);F.enter().append("svg:image").attr({xmlns:i.svg,preserveAspectRatio:"none"}),F.attr({height:M,width:k,x:t,y:u,"xlink:href":T.toDataURL("image/png")})}}))}},{"../../constants/xmlns_namespaces":693,"../../lib":716,"./constants":1040,d3:164}],1046:[function(e,t,r){"use strict";var n=e("d3");t.exports=function(e){n.select(e).selectAll(".im image").style("opacity",(function(e){return e.trace.opacity}))}},{d3:164}],1047:[function(e,t,r){"use strict";var n=e("../../lib/extend").extendFlat,a=e("../../lib/extend").extendDeep,i=e("../../plot_api/edit_types").overrideAll,o=e("../../plots/font_attributes"),s=e("../../components/color/attributes"),l=e("../../plots/domain").attributes,c=e("../../plots/cartesian/layout_attributes"),u=e("../../plot_api/plot_template").templatedArray,d=e("../../constants/delta.js"),p=(e("../../constants/docs").FORMAT_LINK,o({editType:"plot",colorEditType:"plot"})),h={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:s.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},f={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},m=u("step",a({},h,{range:f}));t.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:l({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:n({},p,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot"},font:n({},p,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot"},increasing:{symbol:{valType:"string",dflt:d.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:d.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:d.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:d.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:n({},p,{}),editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:a({},h,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:s.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:i({range:f,visible:n({},c.visible,{dflt:!0}),tickmode:c.tickmode,nticks:c.nticks,tick0:c.tick0,dtick:c.dtick,tickvals:c.tickvals,ticktext:c.ticktext,ticks:n({},c.ticks,{dflt:"outside"}),ticklen:c.ticklen,tickwidth:c.tickwidth,tickcolor:c.tickcolor,showticklabels:c.showticklabels,tickfont:o({}),tickangle:c.tickangle,tickformat:c.tickformat,tickformatstops:c.tickformatstops,tickprefix:c.tickprefix,showtickprefix:c.showtickprefix,ticksuffix:c.ticksuffix,showticksuffix:c.showticksuffix,separatethousands:c.separatethousands,exponentformat:c.exponentformat,showexponent:c.showexponent,editType:"plot"},"plot"),steps:m,threshold:{line:{color:n({},h.line.color,{}),width:n({},h.line.width,{dflt:1}),editType:"plot"},thickness:n({},h.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},{"../../components/color/attributes":590,"../../constants/delta.js":686,"../../constants/docs":687,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plot_api/plot_template":754,"../../plots/cartesian/layout_attributes":776,"../../plots/domain":789,"../../plots/font_attributes":790}],1048:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="indicator",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":825}],1049:[function(e,t,r){"use strict";t.exports={calc:function(e,t){var r=[],n=t.value;"number"!=typeof t._lastValue&&(t._lastValue=t.value);var a=t._lastValue,i=a;return t._hasDelta&&"number"==typeof t.delta.reference&&(i=t.delta.reference),r[0]={y:n,lastY:a,delta:n-i,relativeDelta:(n-i)/i},r}}},{}],1050:[function(e,t,r){"use strict";t.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},{}],1051:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../plots/domain").defaults,o=e("../../plot_api/plot_template"),s=e("../../plots/array_container_defaults"),l=e("./constants.js"),c=e("../../plots/cartesian/tick_value_defaults"),u=e("../../plots/cartesian/tick_mark_defaults"),d=e("../../plots/cartesian/tick_label_defaults");function p(e,t){function r(r,i){return n.coerce(e,t,a.gauge.steps,r,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}t.exports={supplyDefaults:function(e,t,r,h){function f(r,i){return n.coerce(e,t,a,r,i)}i(t,h,f),f("mode"),t._hasNumber=-1!==t.mode.indexOf("number"),t._hasDelta=-1!==t.mode.indexOf("delta"),t._hasGauge=-1!==t.mode.indexOf("gauge");var m=f("value");t._range=[0,"number"==typeof m?1.5*m:1];var g,v,y,b,_,x,w=new Array(2);function k(e,t){return n.coerce(y,b,a.gauge,e,t)}function M(e,t){return n.coerce(_,x,a.gauge.axis,e,t)}if(t._hasNumber&&(f("number.valueformat"),f("number.font.color",h.font.color),f("number.font.family",h.font.family),f("number.font.size"),void 0===t.number.font.size&&(t.number.font.size=l.defaultNumberFontSize,w[0]=!0),f("number.prefix"),f("number.suffix"),g=t.number.font.size),t._hasDelta&&(f("delta.font.color",h.font.color),f("delta.font.family",h.font.family),f("delta.font.size"),void 0===t.delta.font.size&&(t.delta.font.size=(t._hasNumber?.5:1)*(g||l.defaultNumberFontSize),w[1]=!0),f("delta.reference",t.value),f("delta.relative"),f("delta.valueformat",t.delta.relative?"2%":""),f("delta.increasing.symbol"),f("delta.increasing.color"),f("delta.decreasing.symbol"),f("delta.decreasing.color"),f("delta.position"),v=t.delta.font.size),t._scaleNumbers=(!t._hasNumber||w[0])&&(!t._hasDelta||w[1])||!1,f("title.font.color",h.font.color),f("title.font.family",h.font.family),f("title.font.size",.25*(g||v||l.defaultNumberFontSize)),f("title.text"),t._hasGauge){(y=e.gauge)||(y={}),b=o.newContainer(t,"gauge"),k("shape"),(t._isBullet="bullet"===t.gauge.shape)||f("title.align","center"),(t._isAngular="angular"===t.gauge.shape)||f("align","center"),k("bgcolor",h.paper_bgcolor),k("borderwidth"),k("bordercolor"),k("bar.color"),k("bar.line.color"),k("bar.line.width"),k("bar.thickness",l.valueThickness*("bullet"===t.gauge.shape?.5:1)),s(y,b,{name:"steps",handleItemDefaults:p}),k("threshold.value"),k("threshold.thickness"),k("threshold.line.width"),k("threshold.line.color"),_={},y&&(_=y.axis||{}),x=o.newContainer(b,"axis"),M("visible"),t._range=M("range",t._range);var T={outerTicks:!0};c(_,x,M,"linear"),d(_,x,M,"linear",T),u(_,x,M,T)}else f("title.align","center"),f("align","center"),t._isAngular=t._isBullet=!1;t._length=null}}},{"../../lib":716,"../../plot_api/plot_template":754,"../../plots/array_container_defaults":760,"../../plots/cartesian/tick_label_defaults":783,"../../plots/cartesian/tick_mark_defaults":784,"../../plots/cartesian/tick_value_defaults":785,"../../plots/domain":789,"./attributes":1047,"./constants.js":1050}],1052:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"indicator",basePlotModule:e("./base_plot"),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,calc:e("./calc").calc,plot:e("./plot"),meta:{}}},{"./attributes":1047,"./base_plot":1048,"./calc":1049,"./defaults":1051,"./plot":1053}],1053:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=a.rad2deg,o=e("../../constants/alignment").MID_SHIFT,s=e("../../components/drawing"),l=e("./constants"),c=e("../../lib/svg_text_utils"),u=e("../../plots/cartesian/axes"),d=e("../../plots/cartesian/axis_defaults"),p=e("../../plots/cartesian/position_defaults"),h=e("../../plots/cartesian/layout_attributes"),f=e("../../components/color"),m={left:"start",center:"middle",right:"end"},g={left:0,center:.5,right:1},v=/[yzafpnµmkMGTPEZY]/;function y(e){return e&&e.duration>0}function b(e){e.each((function(e){f.stroke(n.select(this),e.line.color)})).each((function(e){f.fill(n.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function _(e,t,r){var n=e._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(i,o,h,e,t)}return d(i,o,l,s,n),p(i,o,l,s),o}function x(e,t){return"translate("+e+","+t+")"}function w(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function k(e,t,r,a){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(i);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(c.convertToTspans,a).call(s.font,t),s.bBox(o.node())}function M(e,t,r,n,i,o){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:r});var l=a.aggNums(o,null,[e[s].value,n],2);return e[s].value=l,l}t.exports=function(e,t,r,d){var p,h=e._fullLayout;y(r)&&d&&(p=d()),a.makeTraceGroups(h._indicatorlayer,t,"trace").each((function(t){var d,T,C,S,L,A=t[0].trace,E=n.select(this),D=A._hasGauge,I=A._isAngular,P=A._isBullet,O=A.domain,R={w:h._size.w*(O.x[1]-O.x[0]),h:h._size.h*(O.y[1]-O.y[0]),l:h._size.l+h._size.w*O.x[0],r:h._size.r+h._size.w*(1-O.x[1]),t:h._size.t+h._size.h*(1-O.y[1]),b:h._size.b+h._size.h*O.y[0]},F=R.l+R.w/2,z=R.t+R.h/2,N=Math.min(R.w/2,R.h),j=l.innerRadius*N,B=A.align||"center";if(T=z,D){if(I&&(d=F,T=z+N/2,C=function(e){return function(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height);return[t/r,e,t]}(e,.9*j)}),P){var Y=l.bulletPadding,H=1-l.bulletNumberDomainSize+Y;d=R.l+(H+(1-H)*g[B])*R.w,C=function(e){return w(e,(l.bulletNumberDomainSize-Y)*R.w,R.h)}}}else d=R.l+g[B]*R.w,C=function(e){return w(e,R.w,R.h)};!function(e,t,r,i){var o,l,d,p=r[0].trace,h=i.numbersX,b=i.numbersY,w=p.align||"center",T=m[w],C=i.transitionOpts,S=i.onComplete,L=a.ensureSingle(t,"g","numbers"),A=[];p._hasNumber&&A.push("number"),p._hasDelta&&(A.push("delta"),"left"===p.delta.position&&A.reverse());var E=L.selectAll("text").data(A);function D(t,r,n,a){if(!t.match("s")||n>=0==a>=0||r(n).slice(-1).match(v)||r(a).slice(-1).match(v))return r;var i=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),o=_(e,{tickformat:i});return function(e){return Math.abs(e)<1?u.tickText(o,e).text:r(e)}}E.enter().append("text"),E.attr("text-anchor",(function(){return T})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),E.exit().remove();var I,P=p.mode+p.align;if(p._hasDelta&&(I=function(){var t=_(e,{tickformat:p.delta.valueformat},p._range);t.setScale(),u.prepTicks(t);var a=function(e){return u.tickText(t,e).text},i=function(e){return p.delta.relative?e.relativeDelta:e.delta},o=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?p.delta.increasing.symbol:p.delta.decreasing.symbol)+t(e)},d=function(e){return e.delta>=0?p.delta.increasing.color:p.delta.decreasing.color};void 0===p._deltaLastValue&&(p._deltaLastValue=i(r[0]));var h=L.select("text.delta");function m(){h.text(o(i(r[0]),a)).call(f.fill,d(r[0])).call(c.convertToTspans,e)}return h.call(s.font,p.delta.font).call(f.fill,d({delta:p._deltaLastValue})),y(C)?h.transition().duration(C.duration).ease(C.easing).tween("text",(function(){var e=n.select(this),t=i(r[0]),s=p._deltaLastValue,l=D(p.delta.valueformat,a,s,t),c=n.interpolateNumber(s,t);return p._deltaLastValue=t,function(t){e.text(o(c(t),l)),e.call(f.fill,d({delta:c(t)}))}})).each("end",(function(){m(),S&&S()})).each("interrupt",(function(){m(),S&&S()})):m(),l=k(o(i(r[0]),a),p.delta.font,T,e),h}(),P+=p.delta.position+p.delta.font.size+p.delta.font.family+p.delta.valueformat,P+=p.delta.increasing.symbol+p.delta.decreasing.symbol,d=l),p._hasNumber&&(function(){var t=_(e,{tickformat:p.number.valueformat},p._range);t.setScale(),u.prepTicks(t);var a=function(e){return u.tickText(t,e).text},i=p.number.suffix,l=p.number.prefix,d=L.select("text.number");function h(){var t="number"==typeof r[0].y?l+a(r[0].y)+i:"-";d.text(t).call(s.font,p.number.font).call(c.convertToTspans,e)}y(C)?d.transition().duration(C.duration).ease(C.easing).each("end",(function(){h(),S&&S()})).each("interrupt",(function(){h(),S&&S()})).attrTween("text",(function(){var e=n.select(this),t=n.interpolateNumber(r[0].lastY,r[0].y);p._lastValue=r[0].y;var o=D(p.number.valueformat,a,r[0].lastY,r[0].y);return function(r){e.text(l+o(t(r))+i)}})):h(),o=k(l+a(r[0].y)+i,p.number.font,T,e)}(),P+=p.number.font.size+p.number.font.family+p.number.valueformat+p.number.suffix+p.number.prefix,d=o),p._hasDelta&&p._hasNumber){var O,R,F=[(o.left+o.right)/2,(o.top+o.bottom)/2],z=[(l.left+l.right)/2,(l.top+l.bottom)/2],N=.75*p.delta.font.size;"left"===p.delta.position&&(O=M(p,"deltaPos",0,-1*(o.width*g[p.align]+l.width*(1-g[p.align])+N),P,Math.min),R=F[1]-z[1],d={width:o.width+l.width+N,height:Math.max(o.height,l.height),left:l.left+O,right:o.right,top:Math.min(o.top,l.top+R),bottom:Math.max(o.bottom,l.bottom+R)}),"right"===p.delta.position&&(O=M(p,"deltaPos",0,o.width*(1-g[p.align])+l.width*g[p.align]+N,P,Math.max),R=F[1]-z[1],d={width:o.width+l.width+N,height:Math.max(o.height,l.height),left:o.left,right:l.right+O,top:Math.min(o.top,l.top+R),bottom:Math.max(o.bottom,l.bottom+R)}),"bottom"===p.delta.position&&(O=null,R=l.height,d={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height,bottom:o.bottom+l.height}),"top"===p.delta.position&&(O=null,R=o.top,d={width:Math.max(o.width,l.width),height:o.height+l.height,left:Math.min(o.left,l.left),right:Math.max(o.right,l.right),top:o.bottom-o.height-l.height,bottom:o.bottom}),I.attr({dx:O,dy:R})}(p._hasNumber||p._hasDelta)&&L.attr("transform",(function(){var e=i.numbersScaler(d);P+=e[2];var t,r=M(p,"numbersScale",1,e[0],P,Math.min);p._scaleNumbers||(r=1),t=p._isAngular?b-r*d.bottom:b-r*(d.top+d.bottom)/2,p._numbersTop=r*d.top+t;var n=d[w];"center"===w&&(n=(d.left+d.right)/2);var a=h-r*n;return x(a=M(p,"numbersTranslate",0,a,P,Math.max),t)+" scale("+r+")"}))}(e,E,t,{numbersX:d,numbersY:T,numbersScaler:C,transitionOpts:r,onComplete:p}),D&&(S={range:A.gauge.axis.range,color:A.gauge.bgcolor,line:{color:A.gauge.bordercolor,width:0},thickness:1},L={range:A.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:A.gauge.bordercolor,width:A.gauge.borderwidth},thickness:1});var V=E.selectAll("g.angular").data(I?t:[]);V.exit().remove();var U=E.selectAll("g.angularaxis").data(I?t:[]);U.exit().remove(),I&&function(e,t,r,a){var s,l,c,d,p=r[0].trace,h=a.size,f=a.radius,m=a.innerRadius,g=a.gaugeBg,v=a.gaugeOutline,w=[h.l+h.w/2,h.t+h.h/2+f/2],k=a.gauge,M=a.layer,T=a.transitionOpts,C=a.onComplete,S=Math.PI/2;function L(e){var t=p.gauge.axis.range[0],r=(e-t)/(p.gauge.axis.range[1]-t)*Math.PI-S;return r<-S?-S:r>S?S:r}function A(e){return n.svg.arc().innerRadius((m+f)/2-e/2*(f-m)).outerRadius((m+f)/2+e/2*(f-m)).startAngle(-S)}function E(e){e.attr("d",(function(e){return A(e.thickness).startAngle(L(e.range[0])).endAngle(L(e.range[1]))()}))}k.enter().append("g").classed("angular",!0),k.attr("transform",x(w[0],w[1])),M.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),M.selectAll("g.xangularaxistick,path,text").remove(),(s=_(e,p.gauge.axis)).type="linear",s.range=p.gauge.axis.range,s._id="xangularaxis",s.setScale();var D=function(e){return(s.range[0]-e.x)/(s.range[1]-s.range[0])*Math.PI+Math.PI},I={},P=u.makeLabelFns(s,0).labelStandoff;I.xFn=function(e){var t=D(e);return Math.cos(t)*P},I.yFn=function(e){var t=D(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(P+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*o)},I.anchorFn=function(e){var t=D(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},I.heightFn=function(e,t,r){var n=D(e);return-.5*(1+Math.sin(n))*r};var O=function(e){return x(w[0]+f*Math.cos(e),w[1]-f*Math.sin(e))};if(c=function(e){return O(D(e))},l=u.calcTicks(s),d=u.getTickSigns(s)[2],s.visible){d="inside"===s.ticks?-1:1;var R=(s.linewidth||1)/2;u.drawTicks(e,s,{vals:l,layer:M,path:"M"+d*R+",0h"+d*s.ticklen,transFn:function(e){var t=D(e);return O(t)+"rotate("+-i(t)+")"}}),u.drawLabels(e,s,{vals:l,layer:M,transFn:c,labelFns:I})}var F=[g].concat(p.gauge.steps),z=k.selectAll("g.bg-arc").data(F);z.enter().append("g").classed("bg-arc",!0).append("path"),z.select("path").call(E).call(b),z.exit().remove();var N=A(p.gauge.bar.thickness),j=k.selectAll("g.value-arc").data([p.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var B,Y,H,V=j.select("path");y(T)?(V.transition().duration(T.duration).ease(T.easing).each("end",(function(){C&&C()})).each("interrupt",(function(){C&&C()})).attrTween("d",(B=N,Y=L(r[0].lastY),H=L(r[0].y),function(){var e=n.interpolate(Y,H);return function(t){return B.endAngle(e(t))()}})),p._lastValue=r[0].y):V.attr("d","number"==typeof r[0].y?N.endAngle(L(r[0].y)):"M0,0Z"),V.call(b),j.exit().remove(),F=[];var U=p.gauge.threshold.value;U&&F.push({range:[U,U],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var W=k.selectAll("g.threshold-arc").data(F);W.enter().append("g").classed("threshold-arc",!0).append("path"),W.select("path").call(E).call(b),W.exit().remove();var G=k.selectAll("g.gauge-outline").data([v]);G.enter().append("g").classed("gauge-outline",!0).append("path"),G.select("path").call(E).call(b),G.exit().remove()}(e,0,t,{radius:N,innerRadius:j,gauge:V,layer:U,size:R,gaugeBg:S,gaugeOutline:L,transitionOpts:r,onComplete:p});var W=E.selectAll("g.bullet").data(P?t:[]);W.exit().remove();var G=E.selectAll("g.bulletaxis").data(P?t:[]);G.exit().remove(),P&&function(e,t,r,n){var a,i,o,s,c,d=r[0].trace,p=n.gauge,h=n.layer,m=n.gaugeBg,g=n.gaugeOutline,v=n.size,x=d.domain,w=n.transitionOpts,k=n.onComplete;p.enter().append("g").classed("bullet",!0),p.attr("transform","translate("+v.l+", "+v.t+")"),h.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),h.selectAll("g.xbulletaxistick,path,text").remove();var M=v.h,T=d.gauge.bar.thickness*M,C=x.x[0],S=x.x[0]+(x.x[1]-x.x[0])*(d._hasNumber||d._hasDelta?1-l.bulletNumberDomainSize:1);function L(e){e.attr("width",(function(e){return Math.max(0,a.c2p(e.range[1])-a.c2p(e.range[0]))})).attr("x",(function(e){return a.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*M})).attr("height",(function(e){return e.thickness*M}))}(a=_(e,d.gauge.axis))._id="xbulletaxis",a.domain=[C,S],a.setScale(),i=u.calcTicks(a),o=u.makeTransFn(a),s=u.getTickSigns(a)[2],c=v.t+v.h,a.visible&&(u.drawTicks(e,a,{vals:"inside"===a.ticks?u.clipEnds(a,i):i,layer:h,path:u.makeTickPath(a,c,s),transFn:o}),u.drawLabels(e,a,{vals:i,layer:h,transFn:o,labelFns:u.makeLabelFns(a,c)}));var A=[m].concat(d.gauge.steps),E=p.selectAll("g.bg-bullet").data(A);E.enter().append("g").classed("bg-bullet",!0).append("rect"),E.select("rect").call(L).call(b),E.exit().remove();var D=p.selectAll("g.value-bullet").data([d.gauge.bar]);D.enter().append("g").classed("value-bullet",!0).append("rect"),D.select("rect").attr("height",T).attr("y",(M-T)/2).call(b),y(w)?D.select("rect").transition().duration(w.duration).ease(w.easing).each("end",(function(){k&&k()})).each("interrupt",(function(){k&&k()})).attr("width",Math.max(0,a.c2p(Math.min(d.gauge.axis.range[1],r[0].y)))):D.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,a.c2p(Math.min(d.gauge.axis.range[1],r[0].y))):0),D.exit().remove();var I=r.filter((function(){return d.gauge.threshold.value})),P=p.selectAll("g.threshold-bullet").data(I);P.enter().append("g").classed("threshold-bullet",!0).append("line"),P.select("line").attr("x1",a.c2p(d.gauge.threshold.value)).attr("x2",a.c2p(d.gauge.threshold.value)).attr("y1",(1-d.gauge.threshold.thickness)/2*M).attr("y2",(1-(1-d.gauge.threshold.thickness)/2)*M).call(f.stroke,d.gauge.threshold.line.color).style("stroke-width",d.gauge.threshold.line.width),P.exit().remove();var O=p.selectAll("g.gauge-outline").data([g]);O.enter().append("g").classed("gauge-outline",!0).append("rect"),O.select("rect").call(L).call(b),O.exit().remove()}(e,0,t,{gauge:W,layer:G,size:R,gaugeBg:S,gaugeOutline:L,transitionOpts:r,onComplete:p});var q=E.selectAll("text.title").data(t);q.exit().remove(),q.enter().append("text").classed("title",!0),q.attr("text-anchor",(function(){return P?m.right:m[A.title.align]})).text(A.title.text).call(s.font,A.title.font).call(c.convertToTspans,e),q.attr("transform",(function(){var e,t=R.l+R.w*g[A.title.align],r=l.titlePadding,n=s.bBox(q.node());return D?(I&&(e=A.gauge.axis.visible?s.bBox(U.node()).top-r-n.bottom:R.t+R.h/2-N/2-n.bottom-r),P&&(e=T-(n.top+n.bottom)/2,t=R.l-l.bulletPadding*R.w)):e=A._numbersTop-r-n.bottom,x(t,e)}))}))}},{"../../components/color":591,"../../components/drawing":612,"../../constants/alignment":685,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"../../plots/cartesian/axis_defaults":766,"../../plots/cartesian/layout_attributes":776,"../../plots/cartesian/position_defaults":779,"./constants":1050,d3:164}],1054:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../mesh3d/attributes"),o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l=e("../../plot_api/edit_types").overrideAll,c=t.exports=l(s({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a()},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:i.opacity,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:s({},o.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../../plots/template_attributes":840,"../mesh3d/attributes":1059}],1055:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc");t.exports=function(e,t){t._len=Math.min(t.x.length,t.y.length,t.z.length,t.value.length);for(var r=1/0,a=-1/0,i=t.value.length,o=0;o<i;o++){var s=t.value[o];r=Math.min(r,s),a=Math.max(a,s)}t._minValues=r,t._maxValues=a,t._vMin=void 0===t.isomin||null===t.isomin?r:t.isomin,t._vMax=void 0===t.isomax||null===t.isomin?a:t.isomax,n(e,t,{vals:[t._vMin,t._vMax],containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":599}],1056:[function(e,t,r){"use strict";var n=e("gl-mesh3d"),a=e("../../lib"),i=e("../../lib/gl_format_color").parseColorScale,o=e("../../lib/str2rgbarray"),s=e("../../components/colorscale").extractOpts,l=e("../../plots/gl3d/zip3");function c(e){return a.distinctVals(e).vals}var u=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),a=Math.max(t[r],t[r-1]);if(a>n&&n<e&&e<=a)return{id:r,distRatio:(a-e)/(a-n)}}return{id:0,distRatio:0}};function d(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var p=d.prototype;function h(e){e._i=[],e._j=[],e._k=[];var t,r,n=e.surface.show,a=e.spaceframe.show,i=e.surface.fill,o=e.spaceframe.fill,s=!1,l=!1,d=0,p=c(e.x.slice(0,e._len)),h=c(e.y.slice(0,e._len)),f=c(e.z.slice(0,e._len)),m=p.length,g=h.length,v=f.length;function y(e,t,r){return r+v*t+v*g*e}var b,_,x,w,k,M=e._minValues,T=e._maxValues,C=e._vMin,S=e._vMax;function L(e,t,n){for(var a=w.length,i=r;i<a;i++)if(e===b[i]&&t===_[i]&&n===x[i])return i;return-1}function A(){r=t}function E(){b=[],_=[],x=[],w=[],t=0,A()}function D(e,r,n,a){return b.push(e),_.push(r),x.push(n),w.push(a),++t-1}function I(e,t,r){for(var n=[],a=0;a<e.length;a++)n[a]=e[a]*(1-r)+r*t[a];return n}function P(e){k=e}function O(e,t){return"all"===e||null===e||e.indexOf(t)>-1}function R(e,t){return null===e?t:e}function F(t,r,n){A();var a,i,o,s=[r],l=[n];if(k>=1)s=[r],l=[n];else if(k>0){var c=function(e,t){var r=e[0],n=e[1],a=e[2],i=function(e,t,r){for(var n=[],a=0;a<e.length;a++)n[a]=(e[a]+t[a]+r[a])/3;return n}(r,n,a),o=Math.sqrt(1-k),s=I(i,r,o),l=I(i,n,o),c=I(i,a,o),u=t[0],d=t[1],p=t[2];return{xyzv:[[r,n,l],[l,s,r],[n,a,c],[c,l,n],[a,r,s],[s,c,a]],abc:[[u,d,-1],[-1,-1,u],[d,p,-1],[-1,-1,d],[p,u,-1],[-1,-1,p]]}}(r,n);s=c.xyzv,l=c.abc}for(var u=0;u<s.length;u++){r=s[u],n=l[u];for(var p=[],h=0;h<3;h++){var f=r[h][0],m=r[h][1],g=r[h][2],v=r[h][3],y=n[h]>-1?n[h]:L(f,m,g);p[h]=y>-1?y:D(f,m,g,R(t,v))}a=p[0],i=p[1],o=p[2],e._i.push(a),e._j.push(i),e._k.push(o),++d}}function z(e,t,r,n){var a=e[3];a<r&&(a=r),a>n&&(a=n);for(var i=(e[3]-a)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-i)*e[s]+i*t[s];return o}function N(e,t,r){return e>=t&&e<=r}function j(e){var t=.001*(S-C);return e>=C-t&&e<=S+t}function B(t){for(var r=[],n=0;n<4;n++){var a=t[n];r.push([e.x[a],e.y[a],e.z[a],e.value[a]])}return r}var Y=3;function H(e,t,r,n,a,i){i||(i=1),r=[-1,-1,-1];var o=!1,s=[N(t[0][3],n,a),N(t[1][3],n,a),N(t[2][3],n,a)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,r){return j(t[0][3])&&j(t[1][3])&&j(t[2][3])?(F(e,t,r),!0):i<Y&&H(e,t,r,C,S,++i)};if(s[0]&&s[1]&&s[2])return l(e,t,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(i){if(s[i[0]]&&s[i[1]]&&!s[i[2]]){var u=t[i[0]],d=t[i[1]],p=t[i[2]],h=z(p,u,n,a),f=z(p,d,n,a);o=l(e,[f,h,u],[-1,-1,r[i[0]]])||o,o=l(e,[u,d,f],[r[i[0]],r[i[1]],-1])||o,c=!0}})),c?o:([[0,1,2],[1,2,0],[2,0,1]].forEach((function(i){if(s[i[0]]&&!s[i[1]]&&!s[i[2]]){var u=t[i[0]],d=t[i[1]],p=t[i[2]],h=z(d,u,n,a),f=z(p,u,n,a);o=l(e,[f,h,u],[-1,-1,r[i[0]]])||o,c=!0}})),o)}function V(e,t,r,n){var a=!1,i=B(t),o=[N(i[0][3],r,n),N(i[1][3],r,n),N(i[2][3],r,n),N(i[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return a;if(o[0]&&o[1]&&o[2]&&o[3])return l&&(a=function(e,t,r){var n=function(n,a,i){F(e,[t[n],t[a],t[i]],[r[n],r[a],r[i]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(e,i,t)||a),a;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(c){if(o[c[0]]&&o[c[1]]&&o[c[2]]&&!o[c[3]]){var u=i[c[0]],d=i[c[1]],p=i[c[2]],h=i[c[3]];if(l)a=F(e,[u,d,p],[t[c[0]],t[c[1]],t[c[2]]])||a;else{var f=z(h,u,r,n),m=z(h,d,r,n),g=z(h,p,r,n);a=F(null,[f,m,g],[-1,-1,-1])||a}s=!0}})),s?a:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(c){if(o[c[0]]&&o[c[1]]&&!o[c[2]]&&!o[c[3]]){var u=i[c[0]],d=i[c[1]],p=i[c[2]],h=i[c[3]],f=z(p,u,r,n),m=z(p,d,r,n),g=z(h,d,r,n),v=z(h,u,r,n);l?(a=F(e,[u,v,f],[t[c[0]],-1,-1])||a,a=F(e,[d,m,g],[t[c[1]],-1,-1])||a):a=function(e,t,r){var n=function(n,a,i){F(e,[t[n],t[a],t[i]],[r[n],r[a],r[i]])};n(0,1,2),n(2,3,0)}(null,[f,m,g,v],[-1,-1,-1,-1])||a,s=!0}})),s?a:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(c){if(o[c[0]]&&!o[c[1]]&&!o[c[2]]&&!o[c[3]]){var u=i[c[0]],d=i[c[1]],p=i[c[2]],h=i[c[3]],f=z(d,u,r,n),m=z(p,u,r,n),g=z(h,u,r,n);l?(a=F(e,[u,f,m],[t[c[0]],-1,-1])||a,a=F(e,[u,m,g],[t[c[0]],-1,-1])||a,a=F(e,[u,g,f],[t[c[0]],-1,-1])||a):a=F(null,[f,m,g],[-1,-1,-1])||a,s=!0}})),a))}function U(e,t,r,n,a,i,o,c,u,d,p){var h=!1;return s&&(O(e,"A")&&(h=V(null,[t,r,n,i],d,p)||h),O(e,"B")&&(h=V(null,[r,n,a,u],d,p)||h),O(e,"C")&&(h=V(null,[r,i,o,u],d,p)||h),O(e,"D")&&(h=V(null,[n,i,c,u],d,p)||h),O(e,"E")&&(h=V(null,[r,n,i,u],d,p)||h)),l&&(h=V(e,[r,n,i,u],d,p)||h),h}function W(e,t,r,n,a,i,o,s){return[!0===s[0]||H(e,B([t,r,n]),[t,r,n],i,o),!0===s[1]||H(e,B([n,a,t]),[n,a,t],i,o)]}function G(e,t,r,n,a,i,o,s,l){return s?W(e,t,r,a,n,i,o,l):W(e,r,a,n,t,i,o,l)}function q(e,t,r,n,a,i,o){var s,l,c,u,d=!1,p=function(){d=H(e,[s,l,c],[-1,-1,-1],a,i)||d,d=H(e,[c,u,s],[-1,-1,-1],a,i)||d},h=o[0],f=o[1],m=o[2];return h&&(s=I(B([y(t,r-0,n-0)])[0],B([y(t-1,r-0,n-0)])[0],h),l=I(B([y(t,r-0,n-1)])[0],B([y(t-1,r-0,n-1)])[0],h),c=I(B([y(t,r-1,n-1)])[0],B([y(t-1,r-1,n-1)])[0],h),u=I(B([y(t,r-1,n-0)])[0],B([y(t-1,r-1,n-0)])[0],h),p()),f&&(s=I(B([y(t-0,r,n-0)])[0],B([y(t-0,r-1,n-0)])[0],f),l=I(B([y(t-0,r,n-1)])[0],B([y(t-0,r-1,n-1)])[0],f),c=I(B([y(t-1,r,n-1)])[0],B([y(t-1,r-1,n-1)])[0],f),u=I(B([y(t-1,r,n-0)])[0],B([y(t-1,r-1,n-0)])[0],f),p()),m&&(s=I(B([y(t-0,r-0,n)])[0],B([y(t-0,r-0,n-1)])[0],m),l=I(B([y(t-0,r-1,n)])[0],B([y(t-0,r-1,n-1)])[0],m),c=I(B([y(t-1,r-1,n)])[0],B([y(t-1,r-1,n-1)])[0],m),u=I(B([y(t-1,r-0,n)])[0],B([y(t-1,r-0,n-1)])[0],m),p()),d}function K(e,t,r,n,a,i,o,l,c,u,d,p){var h=e;return p?(s&&"even"===e&&(h=null),U(h,t,r,n,a,i,o,l,c,u,d)):(s&&"odd"===e&&(h=null),U(h,c,l,o,i,a,n,r,t,u,d))}function X(e,t,r,n,a){for(var i=[],o=0,s=0;s<t.length;s++)for(var l=t[s],c=1;c<v;c++)for(var u=1;u<g;u++)i.push(G(e,y(l,u-1,c-1),y(l,u-1,c),y(l,u,c-1),y(l,u,c),r,n,(l+u+c)%2,a&&a[o]?a[o]:[])),o++;return i}function Z(e,t,r,n,a){for(var i=[],o=0,s=0;s<t.length;s++)for(var l=t[s],c=1;c<m;c++)for(var u=1;u<v;u++)i.push(G(e,y(c-1,l,u-1),y(c,l,u-1),y(c-1,l,u),y(c,l,u),r,n,(c+l+u)%2,a&&a[o]?a[o]:[])),o++;return i}function J(e,t,r,n,a){for(var i=[],o=0,s=0;s<t.length;s++)for(var l=t[s],c=1;c<g;c++)for(var u=1;u<m;u++)i.push(G(e,y(u-1,c-1,l),y(u-1,c,l),y(u,c-1,l),y(u,c,l),r,n,(u+c+l)%2,a&&a[o]?a[o]:[])),o++;return i}function $(e,t,r){for(var n=1;n<v;n++)for(var a=1;a<g;a++)for(var i=1;i<m;i++)K(e,y(i-1,a-1,n-1),y(i-1,a-1,n),y(i-1,a,n-1),y(i-1,a,n),y(i,a-1,n-1),y(i,a-1,n),y(i,a,n-1),y(i,a,n),t,r,(i+a+n)%2)}function Q(e,t,r){s=!0,$(e,t,r),s=!1}function ee(e,t,r,n,a,i){for(var o=[],s=0,l=0;l<t.length;l++)for(var c=t[l],u=1;u<v;u++)for(var d=1;d<g;d++)o.push(q(e,c,d,u,r,n,a[l],i&&i[s]&&i[s])),s++;return o}function te(e,t,r,n,a,i){for(var o=[],s=0,l=0;l<t.length;l++)for(var c=t[l],u=1;u<m;u++)for(var d=1;d<v;d++)o.push(q(e,u,c,d,r,n,a[l],i&&i[s]&&i[s])),s++;return o}function re(e,t,r,n,a,i){for(var o=[],s=0,l=0;l<t.length;l++)for(var c=t[l],u=1;u<g;u++)for(var d=1;d<m;d++)o.push(q(e,d,u,c,r,n,a[l],i&&i[s]&&i[s])),s++;return o}function ne(e,t){for(var r=[],n=e;n<t;n++)r.push(n);return r}return function(){if(E(),function(){for(var t=0;t<m;t++)for(var r=0;r<g;r++)for(var n=0;n<v;n++){var a=y(t,r,n);D(e.x[a],e.y[a],e.z[a],e.value[a])}}(),a&&o&&(P(o),l=!0,$(null,C,S),l=!1),n&&i){P(i);for(var t=e.surface.pattern,r=e.surface.count,s=0;s<r;s++){var c=1===r?.5:s/(r-1),k=(1-c)*C+c*S,L=Math.abs(k-M)>Math.abs(k-T)?[M,k]:[k,T];Q(t,L[0],L[1])}}var A=[[Math.min(C,T),Math.max(C,T)],[Math.min(M,S),Math.max(M,S)]];["x","y","z"].forEach((function(t){for(var r=[],n=0;n<A.length;n++){var a=0,i=A[n][0],o=A[n][1],s=e.slices[t];if(s.show&&s.fill){P(s.fill);var l=[],c=[],d=[];if(s.locations.length)for(var y=0;y<s.locations.length;y++){var b=u(s.locations[y],"x"===t?p:"y"===t?h:f);0===b.distRatio?l.push(b.id):b.id>0&&(c.push(b.id),"x"===t?d.push([b.distRatio,0,0]):"y"===t?d.push([0,b.distRatio,0]):d.push([0,0,b.distRatio]))}else l=ne(1,"x"===t?m-1:"y"===t?g-1:v-1);c.length>0&&(r[a]="x"===t?ee(null,c,i,o,d,r[a]):"y"===t?te(null,c,i,o,d,r[a]):re(null,c,i,o,d,r[a]),a++),l.length>0&&(r[a]="x"===t?X(null,l,i,o,r[a]):"y"===t?Z(null,l,i,o,r[a]):J(null,l,i,o,r[a]),a++)}var _=e.caps[t];_.show&&_.fill&&(P(_.fill),r[a]="x"===t?X(null,[0,m-1],i,o,r[a]):"y"===t?Z(null,[0,g-1],i,o,r[a]):J(null,[0,v-1],i,o,r[a]),a++)}})),0===d&&E(),e._x=b,e._y=_,e._z=x,e._intensity=w,e._Xs=p,e._Ys=h,e._Zs=f}(),e}p.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._x[t],n=this.data._y[t],a=this.data._z[t],i=this.data._Ys.length,o=this.data._Zs.length,s=u(r,this.data._Xs).id,l=u(n,this.data._Ys).id,c=u(a,this.data._Zs).id,d=e.index=c+o*l+o*i*s;e.traceCoordinate=[this.data._x[d],this.data._y[d],this.data._z[d],this.data.value[d]];var p=this.data.hovertext||this.data.text;return Array.isArray(p)&&void 0!==p[d]?e.textLabel=p[d]:p&&(e.textLabel=p),!0}},p.update=function(e){var t=this.scene,r=t.fullSceneLayout;function n(e,t,r,n){return t.map((function(t){return e.d2l(t,0,n)*r}))}this.data=h(e);var a={positions:l(n(r.xaxis,e._x,t.dataScale[0],e.xcalendar),n(r.yaxis,e._y,t.dataScale[1],e.ycalendar),n(r.zaxis,e._z,t.dataScale[2],e.zcalendar)),cells:l(e._i,e._j,e._k),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:o(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},c=s(e);a.vertexIntensity=e._intensity,a.vertexIntensityBounds=[c.min,c.max],a.colormap=i(e),this.mesh.update(a)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports={findNearestOnAxis:u,generateIsoMeshes:h,createIsosurfaceTrace:function(e,t){var r=e.glplot.gl,a=n({gl:r}),i=new d(e,a,t.uid);return a._trace=i,i.update(t),e.glplot.add(a),i}}},{"../../components/colorscale":603,"../../lib":716,"../../lib/gl_format_color":713,"../../lib/str2rgbarray":739,"../../plots/gl3d/zip3":815,"gl-mesh3d":282}],1057:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("../../components/colorscale/defaults");function s(e,t,r,n,i){var s=i("isomin"),l=i("isomax");null!=l&&null!=s&&s>l&&(t.isomin=null,t.isomax=null);var c=i("x"),u=i("y"),d=i("z"),p=i("value");c&&c.length&&u&&u.length&&d&&d.length&&p&&p.length?(a.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],n),["x","y","z"].forEach((function(e){var t="caps."+e;i(t+".show")&&i(t+".fill");var r="slices."+e;i(r+".show")&&(i(r+".fill"),i(r+".locations"))})),i("spaceframe.show")&&i("spaceframe.fill"),i("surface.show")&&(i("surface.count"),i("surface.fill"),i("surface.pattern")),i("contour.show")&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(e){i(e)})),o(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}t.exports={supplyDefaults:function(e,t,r,a){s(e,t,0,a,(function(r,a){return n.coerce(e,t,i,r,a)}))},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":601,"../../lib":716,"../../registry":845,"./attributes":1054}],1058:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,calc:e("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e("../../plots/gl3d"),categories:["gl3d"],meta:{}}},{"../../plots/gl3d":804,"./attributes":1054,"./calc":1055,"./convert":1056,"./defaults":1057}],1059:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../surface/attributes"),o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat;t.exports=s({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"}),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:i.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},i.contours.x.show,{}),color:i.contours.x.color,width:i.contours.x.width,editType:"calc"},lightposition:{x:s({},i.lightposition.x,{dflt:1e5}),y:s({},i.lightposition.y,{dflt:1e5}),z:s({},i.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},i.lighting),hoverinfo:s({},o.hoverinfo,{editType:"calc"})})},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../surface/attributes":1240}],1060:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc");t.exports=function(e,t){t.intensity&&n(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":599}],1061:[function(e,t,r){"use strict";var n=e("gl-mesh3d"),a=e("delaunay-triangulate"),i=e("alpha-shape"),o=e("convex-hull"),s=e("../../lib/gl_format_color").parseColorScale,l=e("../../lib/str2rgbarray"),c=e("../../components/colorscale").extractOpts,u=e("../../plots/gl3d/zip3");function d(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p=d.prototype;function h(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=l(e[n]);return t}function f(e,t,r,n){for(var a=[],i=t.length,o=0;o<i;o++)a[o]=e.d2l(t[o],0,n)*r;return a}function m(e){for(var t=[],r=e.length,n=0;n<r;n++)t[n]=Math.round(e[n]);return t}function g(e,t){for(var r=e.length,n=0;n<r;n++)if(e[n]<=-.5||e[n]>=t-.5)return!1;return!0}p.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},p.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n,d=e.x.length,p=u(f(r.xaxis,e.x,t.dataScale[0],e.xcalendar),f(r.yaxis,e.y,t.dataScale[1],e.ycalendar),f(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,d)||!g(e.j,d)||!g(e.k,d))return;n=u(m(e.i),m(e.j),m(e.k))}else n=0===e.alphahull?o(p):e.alphahull>0?i(e.alphahull,p):function(e,t){for(var r=["x","y","z"].indexOf(e),n=[],i=t.length,o=0;o<i;o++)n[o]=[t[o][(r+1)%3],t[o][(r+2)%3]];return a(n)}(e.delaunayaxis,p);var v={positions:p,cells:n,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:l(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var y=c(e);this.color="#fff",v.vertexIntensity=e.intensity,v.vertexIntensityBounds=[y.min,y.max],v.colormap=s(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],v.vertexColors=h(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],v.cellColors=h(e.facecolor)):(this.color=e.color,v.meshColor=l(e.color));this.mesh.update(v)},p.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var r=e.glplot.gl,a=n({gl:r}),i=new d(e,a,t.uid);return a._trace=i,i.update(t),e.glplot.add(a),i}},{"../../components/colorscale":603,"../../lib/gl_format_color":713,"../../lib/str2rgbarray":739,"../../plots/gl3d/zip3":815,"alpha-shape":66,"convex-hull":131,"delaunay-triangulate":166,"gl-mesh3d":282}],1062:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../components/colorscale/defaults"),o=e("./attributes");t.exports=function(e,t,r,s){function l(r,n){return a.coerce(e,t,o,r,n)}function c(e){var t=e.map((function(e){var t=l(e);return t&&a.isArrayOrTypedArray(t)?t:null}));return t.every((function(e){return e&&e.length===t[0].length}))&&t}c(["x","y","z"])?(c(["i","j","k"]),(!t.i||t.j&&t.k)&&(!t.j||t.k&&t.i)&&(!t.k||t.i&&t.j)?(n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],s),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach((function(e){l(e)})),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),i(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",r)),l("text"),l("hovertext"),l("hovertemplate"),t._length=null):t.visible=!1):t.visible=!1}},{"../../components/colorscale/defaults":601,"../../lib":716,"../../registry":845,"./attributes":1059}],1063:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert"),moduleType:"trace",name:"mesh3d",basePlotModule:e("../../plots/gl3d"),categories:["gl3d"],meta:{}}},{"../../plots/gl3d":804,"./attributes":1059,"./calc":1060,"./convert":1061,"./defaults":1062}],1064:[function(e,t,r){"use strict";var n=e("../../lib").extendFlat,a=e("../scatter/attributes"),i=e("../../components/drawing/attributes").dash,o=e("../../components/fx/attributes"),s=e("../../constants/delta.js"),l=s.INCREASING.COLOR,c=s.DECREASING.COLOR,u=a.line;function d(e){return{line:{color:n({},u.color,{dflt:e}),width:u.width,dash:i,editType:"style"},editType:"style"}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:n({},u.width,{}),dash:n({},i,{}),editType:"style"},increasing:d(l),decreasing:d(c),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:n({},o.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},{"../../components/drawing/attributes":611,"../../components/fx/attributes":621,"../../constants/delta.js":686,"../../lib":716,"../scatter/attributes":1118}],1065:[function(e,t,r){"use strict";var n=e("../../lib"),a=n._,i=e("../../plots/cartesian/axes"),o=e("../../constants/numerical").BADNUM;function s(e,t,r,n){return{o:e,h:t,l:r,c:n}}function l(e,t,r,s,l){for(var c=s.makeCalcdata(t,"open"),u=s.makeCalcdata(t,"high"),d=s.makeCalcdata(t,"low"),p=s.makeCalcdata(t,"close"),h=Array.isArray(t.text),f=Array.isArray(t.hovertext),m=!0,g=null,v=[],y=0;y<r.length;y++){var b=r[y],_=c[y],x=u[y],w=d[y],k=p[y];if(b!==o&&_!==o&&x!==o&&w!==o&&k!==o){k===_?null!==g&&k!==g&&(m=k>g):m=k>_,g=k;var M=l(_,x,w,k);M.pos=b,M.yc=(_+k)/2,M.i=y,M.dir=m?"increasing":"decreasing",M.x=M.pos,M.y=[w,x],h&&(M.tx=t.text[y]),f&&(M.htx=t.hovertext[y]),v.push(M)}else v.push({pos:b,empty:!0})}return t._extremes[s._id]=i.findExtremes(s,n.concat(d,u),{padded:!0}),v.length&&(v[0].t={labels:{open:a(e,"open:")+" ",high:a(e,"high:")+" ",low:a(e,"low:")+" ",close:a(e,"close:")+" "}}),v}t.exports={calc:function(e,t){var r=i.getFromId(e,t.xaxis),a=i.getFromId(e,t.yaxis),o=function(e,t,r){var a=r._minDiff;if(!a){var i,o=e._fullData,s=[];for(a=1/0,i=0;i<o.length;i++){var l=o[i];if("ohlc"===l.type&&!0===l.visible&&l.xaxis===t._id){s.push(l);var c=t.makeCalcdata(l,"x");l._xcalc=c;var u=n.distinctVals(c).minDiff;u&&isFinite(u)&&(a=Math.min(a,u))}}for(a===1/0&&(a=1),i=0;i<s.length;i++)s[i]._minDiff=a}return a*r.tickwidth}(e,r,t),c=t._minDiff;t._minDiff=null;var u=t._xcalc;t._xcalc=null;var d=l(e,t,u,a,s);return t._extremes[r._id]=i.findExtremes(r,u,{vpad:c/2}),d.length?(n.extendFlat(d[0].t,{wHover:c/2,tickLen:o}),d):[{t:{empty:!0}}]},calcCommon:l}},{"../../constants/numerical":692,"../../lib":716,"../../plots/cartesian/axes":764}],1066:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./ohlc_defaults"),i=e("./attributes");function o(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}t.exports=function(e,t,r,s){function l(r,a){return n.coerce(e,t,i,r,a)}a(e,t,l,s)?(l("line.width"),l("line.dash"),o(0,t,l,"increasing"),o(0,t,l,"decreasing"),l("text"),l("hovertext"),l("tickwidth"),s._requestRangeslider[t.xaxis]=!0):t.visible=!1}},{"../../lib":716,"./attributes":1064,"./ohlc_defaults":1069}],1067:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib"),i=e("../../components/fx"),o=e("../../components/color"),s=e("../../lib").fillText,l=e("../../constants/delta.js"),c={increasing:l.INCREASING.SYMBOL,decreasing:l.DECREASING.SYMBOL};function u(e,t,r,n){var a,s,l=e.cd,c=e.xa,u=l[0].trace,d=l[0].t,p=u.type,h="ohlc"===p?"l":"min",f="ohlc"===p?"h":"max",m=d.bPos||0,g=function(e){return e.pos+m-t},v=d.bdPos||d.tickLen,y=d.wHover,b=Math.min(1,v/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function _(e){var t=g(e);return i.inbox(t-y,t+y,a)}function x(e){var t=e[h],n=e[f];return t===n||i.inbox(t-r,n-r,a)}function w(e){return(_(e)+x(e))/2}a=e.maxHoverDistance-b,s=e.maxSpikeDistance-b;var k=i.getDistanceFunction(n,_,x,w);if(i.getClosest(l,k,e),!1===e.index)return null;var M=l[e.index];if(M.empty)return null;var T=u[M.dir],C=T.line.color;return o.opacity(C)&&T.line.width?e.color=C:e.color=T.fillcolor,e.x0=c.c2p(M.pos+m-v,!0),e.x1=c.c2p(M.pos+m+v,!0),e.xLabelVal=M.pos,e.spikeDistance=w(M)*s/a,e.xSpike=c.c2p(M.pos,!0),e}function d(e,t,r,i){var o=e.cd,s=e.ya,l=o[0].trace,c=o[0].t,d=[],p=u(e,t,r,i);if(!p)return[];var h=o[p.index].hi||l.hoverinfo,f=h.split("+");if("all"!==h&&-1===f.indexOf("y"))return[];for(var m=["high","open","close","low"],g={},v=0;v<m.length;v++){var y,b=m[v],_=l[b][p.index],x=s.c2p(_,!0);_ in g?(y=g[_]).yLabel+="<br>"+c.labels[b]+n.hoverLabelText(s,_):((y=a.extendFlat({},p)).y0=y.y1=x,y.yLabelVal=_,y.yLabel=c.labels[b]+n.hoverLabelText(s,_),y.name="",d.push(y),g[_]=y)}return d}function p(e,t,r,a){var i=e.cd,o=e.ya,l=i[0].trace,d=i[0].t,p=u(e,t,r,a);if(!p)return[];var h=i[p.index],f=p.index=h.i,m=h.dir;function g(e){return d.labels[e]+n.hoverLabelText(o,l[e][f])}var v=h.hi||l.hoverinfo,y=v.split("+"),b="all"===v,_=b||-1!==y.indexOf("y"),x=b||-1!==y.indexOf("text"),w=_?[g("open"),g("high"),g("low"),g("close")+"  "+c[m]]:[];return x&&s(h,l,w),p.extraText=w.join("<br>"),p.y0=p.y1=o.c2p(h.yc,!0),[p]}t.exports={hoverPoints:function(e,t,r,n){return e.cd[0].trace.hoverlabel.split?d(e,t,r,n):p(e,t,r,n)},hoverSplit:d,hoverOnPoints:p}},{"../../components/color":591,"../../components/fx":629,"../../constants/delta.js":686,"../../lib":716,"../../plots/cartesian/axes":764}],1068:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"ohlc",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc").calc,plot:e("./plot"),style:e("./style"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select")}},{"../../plots/cartesian":775,"./attributes":1064,"./calc":1065,"./defaults":1066,"./hover":1067,"./plot":1070,"./select":1071,"./style":1072}],1069:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib");t.exports=function(e,t,r,i){var o=r("x"),s=r("open"),l=r("high"),c=r("low"),u=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x"],i),s&&l&&c&&u){var d=Math.min(s.length,l.length,c.length,u.length);return o&&(d=Math.min(d,a.minRowLength(o))),t._length=d,d}}},{"../../lib":716,"../../registry":845}],1070:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib");t.exports=function(e,t,r,i){var o=t.xaxis,s=t.yaxis;a.makeTraceGroups(i,r,"trace ohlc").each((function(e){var t=n.select(this),r=e[0],i=r.t;if(!0!==r.trace.visible||i.empty)t.remove();else{var l=i.tickLen,c=t.selectAll("path").data(a.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",(function(e){if(e.empty)return"M0,0Z";var t=o.c2p(e.pos,!0),r=o.c2p(e.pos-l,!0),n=o.c2p(e.pos+l,!0);return"M"+r+","+s.c2p(e.o,!0)+"H"+t+"M"+t+","+s.c2p(e.h,!0)+"V"+s.c2p(e.l,!0)+"M"+n+","+s.c2p(e.c,!0)+"H"+t}))}}))}},{"../../lib":716,d3:164}],1071:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n=e.cd,a=e.xaxis,i=e.yaxis,o=[],s=n[0].t.bPos||0;if(!1===t)for(r=0;r<n.length;r++)n[r].selected=0;else for(r=0;r<n.length;r++){var l=n[r];t.contains([a.c2p(l.pos+s),i.c2p(l.yc)],null,l.i,e)?(o.push({pointNumber:l.i,x:a.c2d(l.pos),y:i.c2d(l.yc)}),l.selected=1):l.selected=0}return o}},{}],1072:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../../components/color");t.exports=function(e,t,r){var o=r||n.select(e).selectAll("g.ohlclayer").selectAll("g.trace");o.style("opacity",(function(e){return e[0].trace.opacity})),o.each((function(e){var t=e[0].trace;n.select(this).selectAll("path").each((function(e){if(!e.empty){var r=t[e.dir].line;n.select(this).style("fill","none").call(i.stroke,r.color).call(a.dashLine,r.dash,r.width).style("opacity",t.selectedpoints&&!e.selected?.3:1)}}))}))}},{"../../components/color":591,"../../components/drawing":612,d3:164}],1073:[function(e,t,r){"use strict";var n=e("../../lib/extend").extendFlat,a=e("../../plots/attributes"),i=e("../../plots/font_attributes"),o=e("../../components/colorscale/attributes"),s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../plots/domain").attributes,c=n({editType:"calc"},o("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});t.exports={domain:l({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:n({},a.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:s({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:i({editType:"calc"}),tickfont:i({editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legendgroup:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/domain":789,"../../plots/font_attributes":790,"../../plots/template_attributes":840}],1074:[function(e,t,r){"use strict";var n=e("../../plots/get_data").getModuleCalcData,a=e("./plot");r.name="parcats",r.plot=function(e,t,r,i){var o=n(e.calcdata,"parcats");if(o.length){var s=o[0];a(e,s,r,i)}},r.clean=function(e,t,r,n){var a=n._has&&n._has("parcats"),i=t._has&&t._has("parcats");a&&!i&&n._paperdiv.selectAll(".parcats").remove()}},{"../../plots/get_data":799,"./plot":1079}],1075:[function(e,t,r){"use strict";var n=e("../../lib/gup").wrap,a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/calc"),o=e("../../lib/filter_unique.js"),s=e("../../components/drawing"),l=e("../../lib");function c(e,t,r){e.valueInds.push(t),e.count+=r}function u(e,t,r){return{categoryInds:e,color:t,rawColor:r,valueInds:[],count:0}}function d(e,t,r){e.valueInds.push(t),e.count+=r}t.exports=function(e,t){var r=l.filterVisible(t.dimensions);if(0===r.length)return[];var p,h,f,m=r.map((function(e){var t;return"trace"===e.categoryorder?t=null:"array"===e.categoryorder?t=e.categoryarray:(t=o(e.values).sort(),"category descending"===e.categoryorder&&(t=t.reverse())),function(e,t){t=null==t?[]:t.map((function(e){return e}));var r={},n={},a=[];t.forEach((function(e,t){r[e]=0,n[e]=t}));for(var i=0;i<e.length;i++){var o,s=e[i];void 0===r[s]?(r[s]=1,o=t.push(s)-1,n[s]=o):(r[s]++,o=n[s]),a.push(o)}var l=t.map((function(e){return r[e]}));return{uniqueValues:t,uniqueCounts:l,inds:a}}(e.values,t)}));p=l.isArrayOrTypedArray(t.counts)?t.counts:[t.counts],function(e){var t;if(function(e){for(var t=new Array(e.length),r=0;r<e.length;r++){if(e[r]<0||e[r]>=e.length)return!1;if(void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(e.map((function(e){return e.displayindex}))))for(t=0;t<e.length;t++)e[t]._displayindex=e[t].displayindex;else for(t=0;t<e.length;t++)e[t]._displayindex=t}(r),r.forEach((function(e,t){!function(e,t){e._categoryarray=t.uniqueValues,null===e.ticktext||void 0===e.ticktext?e._ticktext=[]:e._ticktext=e.ticktext.slice();for(var r=e._ticktext.length;r<t.uniqueValues.length;r++)e._ticktext.push(t.uniqueValues[r])}(e,m[t])}));var g,v=t.line;v?(a(t,"line")&&i(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),g=s.tryColorscale(v)):g=l.identity;var y,b,_,x,w,k=r[0].values.length,M={},T=m.map((function(e){return e.inds}));for(f=0,y=0;y<k;y++){var C=[];for(b=0;b<T.length;b++)C.push(T[b][y]);h=p[y%p.length],f+=h;var S=(_=y,x=void 0,w=void 0,l.isArrayOrTypedArray(v.color)?w=x=v.color[_%v.color.length]:x=v.color,{color:g(x),rawColor:w}),L=C+"-"+S.rawColor;void 0===M[L]&&(M[L]=u(C,S.color,S.rawColor)),d(M[L],y,h)}var A,E=r.map((function(e,t){return function(e,t,r,n,a){return{dimensionInd:e,containerInd:t,displayInd:r,dimensionLabel:n,count:a,categories:[],dragX:null}}(t,e._index,e._displayindex,e.label,f)}));for(y=0;y<k;y++)for(h=p[y%p.length],b=0;b<E.length;b++){var D=E[b].containerInd,I=m[b].inds[y],P=E[b].categories;if(void 0===P[I]){var O=t.dimensions[D]._categoryarray[I],R=t.dimensions[D]._ticktext[I];P[I]={dimensionInd:b,categoryInd:A=I,categoryValue:O,displayInd:A,categoryLabel:R,valueInds:[],count:0,dragY:null}}c(P[I],y,h)}return n(function(e,t,r){var n=e.map((function(e){return e.categories.length})).reduce((function(e,t){return Math.max(e,t)}));return{dimensions:e,paths:t,trace:void 0,maxCats:n,count:r}}(E,M,f))}},{"../../components/colorscale/calc":599,"../../components/colorscale/helpers":602,"../../components/drawing":612,"../../lib":716,"../../lib/filter_unique.js":708,"../../lib/gup":714}],1076:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults"),o=e("../../plots/domain").defaults,s=e("../../plots/array_container_defaults"),l=e("./attributes"),c=e("../parcoords/merge_length");function u(e,t){function r(r,a){return n.coerce(e,t,l.dimensions,r,a)}var a=r("values"),i=r("visible");if(a&&a.length||(i=t.visible=!1),i){r("label"),r("displayindex",t._index);var o,s=e.categoryarray,c=Array.isArray(s)&&s.length>0;c&&(o="array");var u=r("categoryorder",o);"array"===u?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),c||"array"!==u||(t.categoryorder="trace")}}t.exports=function(e,t,r,d){function p(r,a){return n.coerce(e,t,l,r,a)}var h=s(e,t,{name:"dimensions",handleItemDefaults:u}),f=function(e,t,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(a(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,d,p);o(t,d,p),Array.isArray(h)&&h.length||(t.visible=!1),c(t,h,"values",f),p("hoveron"),p("hovertemplate"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var m={family:d.font.family,size:Math.round(d.font.size),color:d.font.color};n.coerceFont(p,"labelfont",m);var g={family:d.font.family,size:Math.round(d.font.size/1.2),color:d.font.color};n.coerceFont(p,"tickfont",g)}},{"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602,"../../lib":716,"../../plots/array_container_defaults":760,"../../plots/domain":789,"../parcoords/merge_length":1089,"./attributes":1073}],1077:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1073,"./base_plot":1074,"./calc":1075,"./defaults":1076,"./plot":1079}],1078:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../plot_api/plot_api"),i=e("../../components/fx"),o=e("../../lib"),s=e("../../components/drawing"),l=e("tinycolor2"),c=e("../../lib/svg_text_utils");function u(e,t,r,a){var i=e.map(R.bind(0,t,r)),l=a.selectAll("g.parcatslayer").data([null]);l.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var u=l.selectAll("g.trace.parcats").data(i,d),g=u.enter().append("g").attr("class","trace parcats");u.attr("transform",(function(e){return"translate("+e.x+", "+e.y+")"})),g.append("g").attr("class","paths");var v=u.select("g.paths").selectAll("path.path").data((function(e){return e.paths}),d);v.attr("fill",(function(e){return e.model.color}));var _=v.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(e){return e.model.color})).attr("fill-opacity",0);b(_),v.attr("d",(function(e){return e.svgD})),_.empty()||v.sort(h),v.exit().remove(),v.on("mouseover",f).on("mouseout",m).on("click",y),g.append("g").attr("class","dimensions");var k=u.select("g.dimensions").selectAll("g.dimension").data((function(e){return e.dimensions}),d);k.enter().append("g").attr("class","dimension"),k.attr("transform",(function(e){return"translate("+e.x+", 0)"})),k.exit().remove();var M=k.selectAll("g.category").data((function(e){return e.categories}),d),T=M.enter().append("g").attr("class","category");M.attr("transform",(function(e){return"translate(0, "+e.y+")"})),T.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),x(T);var C=M.selectAll("rect.bandrect").data((function(e){return e.bands}),d);C.each((function(){o.raiseToTop(this)})),C.attr("fill",(function(e){return e.color}));var I=C.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);C.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})).attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"})),w(I),C.exit().remove(),T.append("text").attr("class","catlabel").attr("pointer-events","none");var P=t._fullLayout.paper_bgcolor;M.select("text.catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",P+" -1px  1px 2px, "+P+" 1px  1px 2px, "+P+"  1px -1px 2px, "+P+" -1px -1px 2px").style("fill","rgb(0, 0, 0)").attr("x",(function(e){return p(e)?e.width+5:-5})).attr("y",(function(e){return e.height/2})).text((function(e){return e.model.categoryLabel})).each((function(e){s.font(n.select(this),e.parcatsViewModel.categorylabelfont),c.convertToTspans(n.select(this),t)})),T.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(e){return e.width/2})).attr("y",-5).text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})).each((function(e){s.font(n.select(this),e.parcatsViewModel.labelfont)})),M.selectAll("rect.bandrect").on("mouseover",S).on("mouseout",L),M.exit().remove(),k.call(n.behavior.drag().origin((function(e){return{x:e.x,y:0}})).on("dragstart",A).on("drag",E).on("dragend",D)),u.each((function(e){e.traceSelection=n.select(this),e.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),u.exit().remove()}function d(e){return e.key}function p(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function h(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor<t.model.rawColor?-1:0}function f(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){o.raiseToTop(this),_(n.select(this));var t=g(e),r=v(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:n.event,constraints:r}),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none")){var a,s,c,u=n.mouse(this)[0],d=e.parcatsViewModel.graphDiv,p=e.parcatsViewModel.trace,h=d._fullLayout,f=h._paperdiv.node().getBoundingClientRect(),m=e.parcatsViewModel.graphDiv.getBoundingClientRect();for(c=0;c<e.leftXs.length-1;c++)if(e.leftXs[c]+e.dimWidths[c]-2<=u&&u<=e.leftXs[c+1]+2){var y=e.parcatsViewModel.dimensions[c],b=e.parcatsViewModel.dimensions[c+1];a=(y.x+y.width+b.x)/2,s=(e.topYs[c]+e.topYs[c+1]+e.height)/2;break}var x=e.parcatsViewModel.x+a,w=e.parcatsViewModel.y+s,k=l.mostReadable(e.model.color,["black","white"]),M=e.model.count,T=M/e.parcatsViewModel.model.count,C={countLabel:M,probabilityLabel:T.toFixed(3)},S=[];-1!==e.parcatsViewModel.hoverinfoItems.indexOf("count")&&S.push(["Count:",C.countLabel].join(" ")),-1!==e.parcatsViewModel.hoverinfoItems.indexOf("probability")&&S.push(["P:",C.probabilityLabel].join(" "));var L=S.join("<br>"),A=n.mouse(d)[0];i.loneHover({trace:p,x:x-f.left+m.left,y:w-f.top+m.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:A<x?"right":"left",hovertemplate:(p.line||{}).hovertemplate,hovertemplateLabels:C,eventData:[{data:p._input,fullData:p,count:M,probability:T}]},{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:d})}}}function m(e){if(!e.parcatsViewModel.dragDimension&&(b(n.select(this)),i.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(h),-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var t=g(e),r=v(e);e.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:t,event:n.event,constraints:r})}}function g(e){for(var t=[],r=I(e.parcatsViewModel),n=0;n<e.model.valueInds.length;n++){var a=e.model.valueInds[n];t.push({curveNumber:r,pointNumber:a})}return t}function v(e){for(var t={},r=e.parcatsViewModel.model.dimensions,n=0;n<r.length;n++){var a=r[n],i=a.categories[e.model.categoryInds[n]];t[a.containerInd]=i.categoryValue}return void 0!==e.model.rawColor&&(t.color=e.model.rawColor),t}function y(e){if(-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){var t=g(e),r=v(e);e.parcatsViewModel.graphDiv.emit("plotly_click",{points:t,event:n.event,constraints:r})}}function b(e){e.attr("fill",(function(e){return e.model.color})).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function _(e){e.attr("fill-opacity",.8).attr("stroke",(function(e){return l.mostReadable(e.model.color,["black","white"])})).attr("stroke-width",.3)}function x(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function w(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function k(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter((function(t){return t.model.categoryInds[r]===n&&t.model.color===e.color}))}function M(e,t,r){var a=n.select(e).datum(),i=a.categoryViewModel.model,o=a.parcatsViewModel.graphDiv,s=n.select(e.parentNode).selectAll("rect.bandrect"),l=[];s.each((function(e){k(e).each((function(e){Array.prototype.push.apply(l,g(e))}))}));var c={};c[i.dimensionInd]=i.categoryValue,o.emit(t,{points:l,event:r,constraints:c})}function T(e,t,r){var a=n.select(e).datum(),i=a.categoryViewModel.model,o=a.parcatsViewModel.graphDiv,s=k(a),l=[];s.each((function(e){Array.prototype.push.apply(l,g(e))}));var c={};c[i.dimensionInd]=i.categoryValue,void 0!==a.rawColor&&(c.color=a.rawColor),o.emit(t,{points:l,event:r,constraints:c})}function C(e,t){var r,a,i=n.select(t.parentNode).select("rect.catrect"),o=i.node().getBoundingClientRect(),s=i.datum(),l=s.parcatsViewModel,c=l.model.dimensions[s.model.dimensionInd],u=l.trace,d=o.top+o.height/2;l.dimensions.length>1&&c.displayInd===l.dimensions.length-1?(r=o.left,a="left"):(r=o.left+o.width,a="right");var p=s.model.count,h=s.model.categoryLabel,f=p/s.parcatsViewModel.model.count,m={countLabel:p,categoryLabel:h,probabilityLabel:f.toFixed(3)},g=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&g.push(["Count:",m.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&g.push(["P("+m.categoryLabel+"):",m.probabilityLabel].join(" "));var v=g.join("<br>");return{trace:u,x:r-e.left,y:d-e.top,text:v,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:u.hovertemplate,hovertemplateLabels:m,eventData:[{data:u._input,fullData:u,count:p,category:h,probability:f}]}}function S(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var t,r=e.parcatsViewModel.graphDiv,a=r._fullLayout,s=a._paperdiv.node().getBoundingClientRect(),c=e.parcatsViewModel.hoveron;"color"===c?(function(e){var t=n.select(e).datum(),r=k(t);_(r),r.each((function(){o.raiseToTop(this)})),n.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(this),T(this,"plotly_hover",n.event)):(function(e){n.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=k(e);_(t),t.each((function(){o.raiseToTop(this)}))})),n.select(e.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),M(this,"plotly_hover",n.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===c?t=C(s,this):"color"===c?t=function(e,t){var r,a,i=t.getBoundingClientRect(),o=n.select(t).datum(),s=o.categoryViewModel,c=s.parcatsViewModel,u=c.model.dimensions[s.model.dimensionInd],d=c.trace,p=i.y+i.height/2;c.dimensions.length>1&&u.displayInd===c.dimensions.length-1?(r=i.left,a="left"):(r=i.left+i.width,a="right");var h=s.model.categoryLabel,f=o.parcatsViewModel.model.count,m=0;o.categoryViewModel.bands.forEach((function(e){e.color===o.color&&(m+=e.count)}));var g=s.model.count,v=0;c.pathSelection.each((function(e){e.model.color===o.color&&(v+=e.model.count)}));var y=m/f,b=m/v,_=m/g,x={countLabel:f,categoryLabel:h,probabilityLabel:y.toFixed(3)},w=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&w.push(["Count:",x.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(w.push("P(color ∩ "+h+"): "+x.probabilityLabel),w.push("P("+h+" | color): "+b.toFixed(3)),w.push("P(color | "+h+"): "+_.toFixed(3)));var k=w.join("<br>"),M=l.mostReadable(o.color,["black","white"]);return{trace:d,x:r-e.left,y:p-e.top,text:k,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:M,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:x,eventData:[{data:d._input,fullData:d,category:h,count:f,probability:y,categorycount:g,colorcount:v,bandcolorcount:m}]}}(s,this):"dimension"===c&&(t=function(e,t){var r=[];return n.select(t.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){r.push(C(e,this))})),r}(s,this)),t&&i.loneHover(t,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r}))}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(b(t.pathSelection),x(t.dimensionSelection.selectAll("g.category")),w(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),i.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(h),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?T(this,"plotly_unhover",n.event):M(this,"plotly_unhover",n.event))}function A(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var r=n.mouse(this)[0],a=n.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=a&&a<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.y<a&&a<=t.y+t.height&&(e.potentialClickBand=this)})))})),e.parcatsViewModel.dragDimension=e,i.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function E(e){if("fixed"!==e.parcatsViewModel.arrangement&&(e.dragHasMoved=!0,null!==e.dragDimensionDisplayInd)){var t=e.dragDimensionDisplayInd,r=t-1,a=t+1,i=e.parcatsViewModel.dimensions[t];if(null!==e.dragCategoryDisplayInd){var o=i.categories[e.dragCategoryDisplayInd];o.model.dragY+=n.event.dy;var s=o.model.dragY,l=o.model.displayInd,c=i.categories,u=c[l-1],d=c[l+1];void 0!==u&&s<u.y+u.height/2&&(o.model.displayInd=u.model.displayInd,u.model.displayInd=l),void 0!==d&&s+o.height>d.y+d.height/2&&(o.model.displayInd=d.model.displayInd,d.model.displayInd=l),e.dragCategoryDisplayInd=o.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){i.model.dragX=n.event.x;var p=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[a];void 0!==p&&i.model.dragX<p.x+p.width&&(i.model.displayInd=p.model.displayInd,p.model.displayInd=t),void 0!==h&&i.model.dragX+i.width>h.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}N(e.parcatsViewModel),z(e.parcatsViewModel),O(e.parcatsViewModel),P(e.parcatsViewModel)}}function D(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var t={},r=I(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),o=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==i[t]}));o&&i.forEach((function(r,n){var a=e.parcatsViewModel.model.dimensions[n].containerInd;t["dimensions["+a+"].displayindex"]=r}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var c=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),u=c.map((function(e){return e.categoryValue})),d=c.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[d],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?T(e.potentialClickBand,"plotly_click",n.event.sourceEvent):M(e.potentialClickBand,"plotly_click",n.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,N(e.parcatsViewModel),z(e.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){O(e.parcatsViewModel,!0),P(e.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&a.restyle(e.parcatsViewModel.graphDiv,t,[r])}))}}function I(e){for(var t,r=e.graphDiv._fullData,n=0;n<r.length;n++)if(e.key===r[n].uid){t=n;break}return t}function P(e,t){var r;void 0===t&&(t=!1),e.pathSelection.data((function(e){return e.paths}),d),(r=e.pathSelection,t?r.transition():r).attr("d",(function(e){return e.svgD}))}function O(e,t){function r(e){return t?e.transition():e}void 0===t&&(t=!1),e.dimensionSelection.data((function(e){return e.dimensions}),d);var a=e.dimensionSelection.selectAll("g.category").data((function(e){return e.categories}),d);r(e.dimensionSelection).attr("transform",(function(e){return"translate("+e.x+", 0)"})),r(a).attr("transform",(function(e){return"translate(0, "+e.y+")"})),a.select(".dimlabel").text((function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null})),a.select(".catlabel").attr("text-anchor",(function(e){return p(e)?"start":"end"})).attr("x",(function(e){return p(e)?e.width+5:-5})).each((function(e){var t,r;p(e)?(t=e.width+5,r="start"):(t=-5,r="end"),n.select(this).selectAll("tspan").attr("x",t).attr("text-anchor",r)}));var i=a.selectAll("rect.bandrect").data((function(e){return e.bands}),d),s=i.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",(function(e){return e.color})).attr("fill-opacity",0);i.attr("fill",(function(e){return e.color})).attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})).attr("y",(function(e){return e.y})),w(s),i.each((function(){o.raiseToTop(this)})),i.exit().remove()}function R(e,t,r){var n,a=r[0],i=t.margin||{l:80,r:80,t:100,b:80},o=a.trace,s=o.domain,l=t.width,c=t.height,u=Math.floor(l*(s.x[1]-s.x[0])),d=Math.floor(c*(s.y[1]-s.y[0])),p=s.x[0]*l+i.l,h=t.height-s.y[1]*t.height+i.t,f=o.line.shape;n="all"===o.hoverinfo?["count","probability"]:(o.hoverinfo||"").split("+");var m={trace:o,key:o.uid,model:a,x:p,y:h,width:u,height:d,hoveron:o.hoveron,hoverinfoItems:n,arrangement:o.arrangement,bundlecolors:o.bundlecolors,sortpaths:o.sortpaths,labelfont:o.labelfont,categorylabelfont:o.tickfont,pathShape:f,dragDimension:null,margin:i,paths:[],dimensions:[],graphDiv:e,traceSelection:null,pathSelection:null,dimensionSelection:null};return a.dimensions&&(N(m),z(m)),m}function F(e,t,r,a,i){var o,s,l=[],c=[];for(s=0;s<r.length-1;s++)o=n.interpolateNumber(r[s]+e[s],e[s+1]),l.push(o(i)),c.push(o(1-i));var u="M "+e[0]+","+t[0];for(u+="l"+r[0]+",0 ",s=1;s<r.length;s++)u+="C"+l[s-1]+","+t[s-1]+" "+c[s-1]+","+t[s]+" "+e[s]+","+t[s],u+="l"+r[s]+",0 ";for(u+="l0,"+a+" ",u+="l -"+r[r.length-1]+",0 ",s=r.length-2;s>=0;s--)u+="C"+c[s]+","+(t[s+1]+a)+" "+l[s]+","+(t[s]+a)+" "+(e[s]+r[s])+","+(t[s]+a),u+="l-"+r[s]+",0 ";return u+="Z"}function z(e){var t=e.dimensions,r=e.model,n=t.map((function(e){return e.categories.map((function(e){return e.y}))})),a=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),i=e.model.dimensions.map((function(e){return e.displayInd})),o=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function d(e){var t=e.categoryInds.map((function(e,t){return a[t][e]}));return o.map((function(e){return t[e]}))}c.sort((function(t,r){var n=d(t),a=d(r);return"backward"===e.sortpaths&&(n.reverse(),a.reverse()),n.push(t.valueInds[0]),a.push(r.valueInds[0]),e.bundlecolors&&(n.unshift(t.rawColor),a.unshift(r.rawColor)),n<a?-1:n>a?1:0}));for(var p=new Array(c.length),h=t[0].model.count,f=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),m=0;m<c.length;m++){var g,v=c[m];g=h>0?f*(v.count/h):0;for(var y,b=new Array(n.length),_=0;_<v.categoryInds.length;_++){var x=v.categoryInds[_],w=a[_][x],k=i[_];b[k]=n[k][w],n[k][w]+=g;var M=e.dimensions[k].categories[w],T=M.bands.length,C=M.bands[T-1];if(void 0===C||v.rawColor!==C.rawColor){var S=void 0===C?0:C.y+C.height;M.bands.push({key:S,color:v.color,rawColor:v.rawColor,height:g,width:M.width,count:v.count,y:S,categoryViewModel:M,parcatsViewModel:e})}else{var L=M.bands[T-1];L.height+=g,L.count+=v.count}}y="hspline"===e.pathShape?F(s,b,l,g,.5):F(s,b,l,g,0),p[m]={key:v.valueInds[0],model:v,height:g,leftXs:s,topYs:b,dimWidths:l,svgD:y,parcatsViewModel:e}}e.paths=p}function N(e){var t=e.model.dimensions.map((function(e){return{displayInd:e.displayInd,dimensionInd:e.dimensionInd}}));t.sort((function(e,t){return e.displayInd-t.displayInd}));var r=[];for(var n in t){var a=t[n].dimensionInd,i=e.model.dimensions[a];r.push(j(e,i))}e.dimensions=r}function j(e,t){var r,n=e.model.dimensions.length,a=t.displayInd;r=40+(n>1?(e.width-80-16)/(n-1):0)*a;var i,o,s,l,c,u=[],d=e.model.maxCats,p=t.categories.length,h=t.count,f=e.height-8*(d-1),m=8*(d-p)/2,g=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(g.sort((function(e,t){return e.displayInd-t.displayInd})),c=0;c<p;c++)l=g[c].categoryInd,o=t.categories[l],i=h>0?o.count/h*f:0,s={key:o.valueInds[0],model:o,width:16,height:i,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+i+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}t.exports=function(e,t,r,n){u(r,e,n,t)}},{"../../components/drawing":612,"../../components/fx":629,"../../lib":716,"../../lib/svg_text_utils":740,"../../plot_api/plot_api":751,d3:164,tinycolor2:535}],1079:[function(e,t,r){"use strict";var n=e("./parcats");t.exports=function(e,t,r,a){var i=e._fullLayout,o=i._paper,s=i._size;n(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,a)}},{"./parcats":1078}],1080:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/cartesian/layout_attributes"),i=e("../../plots/font_attributes"),o=e("../../plots/domain").attributes,s=e("../../lib/extend").extendFlat,l=e("../../plot_api/plot_template").templatedArray;t.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},a.tickvals,{editType:"plot"}),ticktext:s({},a.ticktext,{editType:"plot"}),tickformat:s({},a.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:s({editType:"calc"},n("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"}))}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/plot_template":754,"../../plots/cartesian/layout_attributes":776,"../../plots/domain":789,"../../plots/font_attributes":790}],1081:[function(e,t,r){"use strict";var n=e("./constants"),a=e("d3"),i=e("../../lib/gup").keyFun,o=e("../../lib/gup").repeat,s=e("../../lib").sorterAsc,l=n.bar.snapRatio;function c(e,t){return e*(1-l)+t*l}var u=n.bar.snapClose;function d(e,t){return e*(1-u)+t*u}function p(e,t,r,n){if(function(e,t){for(var r=0;r<t.length;r++)if(e>=t[r][0]&&e<=t[r][1])return!0;return!1}(r,n))return r;var a=e?-1:1,i=0,o=t.length-1;if(a<0){var s=i;i=o,o=s}for(var l=t[i],u=l,p=i;a*p<a*o;p+=a){var h=p+a,f=t[h];if(a*r<a*d(l,f))return c(l,u);if(a*r<a*f||h===o)return c(f,l);u=l,l=f}}function h(e){e.attr("x",-n.bar.captureWidth/2).attr("width",n.bar.captureWidth)}function f(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t,r,n,a=g(e.brush.filter.getConsolidated(),e.height),i=[0],o=a.length?a[0][0]:null,s=0;s<a.length;s++)r=(t=a[s])[1]-t[0],i.push(o),i.push(r),(n=s+1)<a.length&&(o=a[n][0]-t[1]);return i.push(e.height),i}function g(e,t){return e.map((function(e){return e.map((function(e){return Math.max(0,e*t)})).sort(s)}))}function v(){a.select(document.body).style("cursor",null)}function y(e){e.attr("stroke-dasharray",m)}function b(e,t){var r=a.select(e).selectAll(".highlight, .highlight-shadow");y(t?r.transition().duration(n.bar.snapDuration).each("end",t):r)}function _(e,t){var r,a=e.brush,i=NaN,o={};if(a.filterSpecified){var s=e.height,l=a.filter.getConsolidated(),c=g(l,s),u=NaN,d=NaN,p=NaN;for(r=0;r<=c.length;r++){var h=c[r];if(h&&h[0]<=t&&t<=h[1]){u=r;break}if(d=r?r-1:NaN,h&&h[0]>t){p=r;break}}if(i=u,isNaN(i)&&(i=isNaN(d)||isNaN(p)?isNaN(d)?p:d:t-c[d][1]<c[p][0]-t?d:p),!isNaN(i)){var f=c[i],m=function(e,t){var r=n.bar.handleHeight;if(!(t>e[1]+r||t<e[0]-r))return t>=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(f,t);m&&(o.interval=l[i],o.intervalPix=f,o.region=m)}}if(e.ordinal&&!o.region){var v=e.unitTickvals,y=e.unitToPaddedPx.invert(t);for(r=0;r<v.length;r++){var b=[.25*v[Math.max(r-1,0)]+.75*v[r],.25*v[Math.min(r+1,v.length-1)]+.75*v[r]];if(y>=b[0]&&y<=b[1]){o.clickableOrdinalRange=b;break}}}return o}function x(e,t){a.event.sourceEvent.stopPropagation();var r=t.height-a.mouse(e)[1]-2*n.verticalPadding,i=t.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(t.unitToPaddedPx.invert):i.newExtent=[i.startExtent,t.unitToPaddedPx.invert(r)].sort(s),t.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(t),b(e.parentNode)}function w(e,t){var r=_(t,t.height-a.mouse(e)[1]-2*n.verticalPadding),i="crosshair";r.clickableOrdinalRange?i="pointer":r.region&&(i=r.region+"-resize"),a.select(document.body).style("cursor",i)}function k(e){e.on("mousemove",(function(e){a.event.preventDefault(),e.parent.inBrushDrag||w(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||v()})).call(a.behavior.drag().on("dragstart",(function(e){!function(e,t){a.event.sourceEvent.stopPropagation();var r=t.height-a.mouse(e)[1]-2*n.verticalPadding,i=t.unitToPaddedPx.invert(r),o=t.brush,s=_(t,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:i,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)})).on("drag",(function(e){x(this,e)})).on("dragend",(function(e){!function(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(w(e,t),x(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1,a.event.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,v(),!i.wasDragged)return i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,0===i.extent.length&&T(r)):T(r),i.brushCallback(t),b(e.parentNode),void i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]<l[0]&&l.reverse(),i.newExtent=[p(0,l,i.newExtent[0],i.stayingIntervals),p(1,l,i.newExtent[1],i.stayingIntervals)];var c=i.newExtent[1]>i.newExtent[0];i.extent=i.stayingIntervals.concat(c?[i.newExtent]:[]),i.extent.length||T(r),i.brushCallback(t),c?b(e.parentNode,s):(s(),b(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,e)})))}function M(e,t){return e[0]-t[0]}function T(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function C(e){for(var t,r=e.slice(),n=[],a=r.shift();a;){for(t=a.slice();(a=r.shift())&&a[0]<=t[1];)t[1]=Math.max(t[1],a[1]);n.push(t)}return n}t.exports={makeBrush:function(e,t,r,n,a,i){var o,l=function(){var e,t,r=[];return{set:function(n){1===(r=n.map((function(e){return e.slice().sort(s)})).sort(M)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),e=C(r),t=r.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return l.set(r),{filter:l,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=a,function(e){var t=e.brush,r=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(t).slice();t.filter.set(r),o()}),brushEndCallback:i}}},ensureAxisBrush:function(e){var t=e.selectAll("."+n.cn.axisBrush).data(o,i);t.enter().append("g").classed(n.cn.axisBrush,!0),function(e){var t=e.selectAll(".background").data(o);t.enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events","auto").attr("transform","translate(0 "+n.verticalPadding+")"),t.call(k).attr("height",(function(e){return e.height-n.verticalPadding}));var r=e.selectAll(".highlight-shadow").data(o);r.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",n.bar.strokeColor).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),r.attr("y1",(function(e){return e.height})).call(y);var a=e.selectAll(".highlight").data(o);a.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),a.attr("y1",(function(e){return e.height})).call(y)}(t)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(s)})),e=t.multiselect?C(e.sort(M)):[e[0]]):e=[e.sort(s)],t.tickvals){var r=t.tickvals.slice().sort(s);if(!(e=e.map((function(e){var t=[p(0,r,e[0],[]),p(1,r,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}},{"../../lib":716,"../../lib/gup":714,"./constants":1084,d3:164}],1082:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../plots/get_data").getModuleCalcData,i=e("./plot"),o=e("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(e){var t=a(e.calcdata,"parcoords")[0];t.length&&i(e,t)},r.clean=function(e,t,r,n){var a=n._has&&n._has("parcoords"),i=t._has&&t._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(e){var t=e._fullLayout._glimages,r=n.select(e).selectAll(".svg-container");r.filter((function(e,t){return t===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this.toDataURL("image/png");t.append("svg:image").attr({xmlns:o.svg,"xlink:href":e,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},{"../../constants/xmlns_namespaces":693,"../../plots/get_data":799,"./plot":1091,d3:164}],1083:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale"),i=e("../../lib/gup").wrap;t.exports=function(e,t){var r,o;return a.hasColorscale(t,"line")&&n(t.line.color)?(r=t.line.color,o=a.extractOpts(t.line).colorscale,a.calc(e,t,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=.5;return t}(t._length),o=[[0,t.line.color],[1,t.line.color]]),i({lineColor:r,cscale:o})}},{"../../components/colorscale":603,"../../lib":716,"../../lib/gup":714}],1084:[function(e,t,r){"use strict";t.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,deselectedLineColor:"#777",bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeColor:"white",strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}},{}],1085:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults"),o=e("../../plots/domain").defaults,s=e("../../plots/array_container_defaults"),l=e("../../plots/cartesian/axes"),c=e("./attributes"),u=e("./axisbrush"),d=e("./constants").maxDimensionCount,p=e("./merge_length");function h(e,t,r,a){function i(r,a){return n.coerce(e,t,c.dimensions,r,a)}var o=i("values"),s=i("visible");if(o&&o.length||(s=t.visible=!1),s){i("label"),i("tickvals"),i("ticktext"),i("tickformat");var d=i("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:d},l.setConvert(t._ax,a.layout),i("multiselect");var p=i("constraintrange");p&&(t.constraintrange=u.cleanRanges(p,t))}}t.exports=function(e,t,r,l){function u(r,a){return n.coerce(e,t,c,r,a)}var f=e.dimensions;Array.isArray(f)&&f.length>d&&(n.log("parcoords traces support up to "+d+" dimensions at the moment"),f.splice(d));var m=s(e,t,{name:"dimensions",layout:l,handleItemDefaults:h}),g=function(e,t,r,o,s){var l=s("line.color",r);if(a(e,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=r}return 1/0}(e,t,r,l,u);o(t,l,u),Array.isArray(m)&&m.length||(t.visible=!1),p(t,m,"values",g);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",v),n.coerceFont(u,"tickfont",v),n.coerceFont(u,"rangefont",v),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602,"../../lib":716,"../../plots/array_container_defaults":760,"../../plots/cartesian/axes":764,"../../plots/domain":789,"./attributes":1080,"./axisbrush":1081,"./constants":1084,"./merge_length":1089}],1086:[function(e,t,r){"use strict";var n=e("../../lib").isTypedArray;r.convertTypedArray=function(e){return n(e)?Array.prototype.slice.call(e):e},r.isOrdinal=function(e){return!!e.tickvals},r.isVisible=function(e){return e.visible||!("visible"in e)}},{"../../lib":716}],1087:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":1080,"./base_plot":1082,"./calc":1083,"./defaults":1085,"./plot":1091}],1088:[function(e,t,r){"use strict";var n=e("glslify"),a=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\n               p17_20, p21_24, p25_28, p29_32,\n               p33_36, p37_40, p41_44, p45_48,\n               p49_52, p53_56, p57_60, colors;\n\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\nuniform sampler2D mask, palette;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\n\nbool isPick    = (drwLayer > 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n    return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n    return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n    return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n    return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n    return (\n        fOutside(p[0], lo[0], hi[0]) ||\n        fOutside(p[1], lo[1], hi[1]) ||\n        fOutside(p[2], lo[2], hi[2]) ||\n        fOutside(p[3], lo[3], hi[3])\n    );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n    return (\n        vOutside(p[0], lo[0], hi[0]) ||\n        vOutside(p[1], lo[1], hi[1]) ||\n        vOutside(p[2], lo[2], hi[2]) ||\n        vOutside(p[3], lo[3], hi[3])\n    );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n    return mOutside(A, loA, hiA) ||\n           mOutside(B, loB, hiB) ||\n           mOutside(C, loC, hiC) ||\n           mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n    mat4 pnts[4];\n    pnts[0] = A;\n    pnts[1] = B;\n    pnts[2] = C;\n    pnts[3] = D;\n\n    for(int i = 0; i < 4; ++i) {\n        for(int j = 0; j < 4; ++j) {\n            for(int k = 0; k < 4; ++k) {\n                if(0 == iMod(\n                    int(255.0 * texture2D(mask,\n                        vec2(\n                            (float(i * 2 + j / 2) + 0.5) / 8.0,\n                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n                        ))[3]\n                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n                    2\n                )) return true;\n            }\n        }\n    }\n    return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n    float x = 0.5 * sign(v) + 0.5;\n    float y = axisY(x, A, B, C, D);\n    float z = 1.0 - abs(v);\n\n    z += isContext ? 0.0 : 2.0 * float(\n        outsideBoundingBox(A, B, C, D) ||\n        outsideRasterMask(A, B, C, D)\n    );\n\n    return vec4(\n        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n        z,\n        1.0\n    );\n}\n\nvoid main() {\n    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n    float v = colors[3];\n\n    gl_Position = position(isContext, v, A, B, C, D);\n\n    fragColor =\n        isContext ? vec4(contextColor) :\n        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}\n"]),i=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n    gl_FragColor = fragColor;\n}\n"]),o=e("./constants").maxDimensionCount,s=e("../../lib"),l=1e-6,c=2048,u=new Uint8Array(4),d=new Uint8Array(4),p={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function h(e,t,r,n,a){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(t,r,n,a),e.clear({color:[0,0,0,0],depth:1})}function f(e,t,r,n,a,i){var o=i.key;r.drawCompleted||(function(e){e.read({x:0,y:0,width:1,height:1,data:u})}(e),r.drawCompleted=!0),function s(l){var c=Math.min(n,a-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],h(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),r.clearOnly||(i.count=2*c,i.offset=2*l*n,t(i),l*n+c<a&&(r.currentRafs[o]=window.requestAnimationFrame((function(){s(l+1)}))),r.drawCompleted=!1)}(0)}function m(e,t){for(var r=new Array(256),n=0;n<256;n++)r[n]=e(n/255).concat(t);return r}function g(e,t){return(e>>>8*t)%256/255}function v(e,t,r){for(var n=new Array(8*t),a=0,i=0;i<t;i++)for(var o=0;o<2;o++)for(var s=0;s<4;s++){var l=4*e+s,c=r[64*i+l];63===l&&0===o&&(c*=-1),n[a++]=c}return n}function y(e){var t="0"+e;return t.substr(t.length-2)}function b(e){return e<o?"p"+y(e+1)+"_"+y(e+4):"colors"}function _(e,t,r,n,a,i,o,l,c,u,d,p,h){for(var f=[[],[]],m=0;m<64;m++)f[0][m]=m===a?1:0,f[1][m]=m===i?1:0;var g=e.lines.canvasOverdrag,v=e.domain,y=e.canvasWidth,b=e.canvasHeight,_=e.deselectedLines.color;return s.extendFlat({key:d,resolution:[y,b],viewBoxPos:[o+g,l],viewBoxSize:[c,u],i0:a,i1:i,dim0A:f[0].slice(0,16),dim0B:f[0].slice(16,32),dim0C:f[0].slice(32,48),dim0D:f[0].slice(48,64),dim1A:f[1].slice(0,16),dim1B:f[1].slice(16,32),dim1C:f[1].slice(32,48),dim1D:f[1].slice(48,64),drwLayer:p,contextColor:[_[0]/255,_[1]/255,_[2]/255,_[3]<1?_[3]:Math.max(1/255,Math.pow(1/e.lines.color.length,1/3))],scissorX:(n===t?0:o+g)+(e.pad.l-g)+e.layoutWidth*v.x[0],scissorWidth:(n===r?y-o+g:c+.5)+(n===t?o+g:0),scissorY:l+e.pad.b+e.layoutHeight*v.y[0],scissorHeight:u,viewportX:e.pad.l-g+e.layoutWidth*v.x[0],viewportY:e.pad.b+e.layoutHeight*v.y[0],viewportWidth:y,viewportHeight:b},h)}function x(e){var t=c-1,r=Math.max(0,Math.floor(e[0]*t),0),n=Math.min(t,Math.ceil(e[1]*t),t);return[Math.min(r,n),Math.max(r,n)]}t.exports=function(e,t){var r,n,u,y,w,k=t.context,M=t.pick,T=t.regl,C={currentRafs:{},drawCompleted:!0,clearOnly:!1},S=function(e){for(var t={},r=0;r<=o;r+=4)t[b(r)]=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return t}(T),L=T.texture(p),A=[];D(t);var E=T({profile:!1,blend:{enable:k,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!k,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:T.prop("scissorX"),y:T.prop("scissorY"),width:T.prop("scissorWidth"),height:T.prop("scissorHeight")}},viewport:{x:T.prop("viewportX"),y:T.prop("viewportY"),width:T.prop("viewportWidth"),height:T.prop("viewportHeight")},dither:!1,vert:a,frag:i,primitive:"lines",lineWidth:1,attributes:S,uniforms:{resolution:T.prop("resolution"),viewBoxPos:T.prop("viewBoxPos"),viewBoxSize:T.prop("viewBoxSize"),dim0A:T.prop("dim0A"),dim1A:T.prop("dim1A"),dim0B:T.prop("dim0B"),dim1B:T.prop("dim1B"),dim0C:T.prop("dim0C"),dim1C:T.prop("dim1C"),dim0D:T.prop("dim0D"),dim1D:T.prop("dim1D"),loA:T.prop("loA"),hiA:T.prop("hiA"),loB:T.prop("loB"),hiB:T.prop("hiB"),loC:T.prop("loC"),hiC:T.prop("hiC"),loD:T.prop("loD"),hiD:T.prop("hiD"),palette:L,contextColor:T.prop("contextColor"),mask:T.prop("maskTexture"),drwLayer:T.prop("drwLayer"),maskHeight:T.prop("maskHeight")},offset:T.prop("offset"),count:T.prop("count")});function D(e){r=e.model,n=e.viewModel,u=n.dimensions.slice(),y=u[0]?u[0].values.length:0;var t=r.lines,a=M?t.color.map((function(e,r){return r/t.color.length})):t.color,i=function(e,t,r){for(var n,a=new Array(e*(o+4)),i=0,s=0;s<e;s++){for(var c=0;c<o;c++)a[i++]=c<t.length?t[c].paddedUnitValues[s]:.5;a[i++]=g(s,2),a[i++]=g(s,1),a[i++]=g(s,0),a[i++]=(n=r[s],Math.max(l,Math.min(1-l,n)))}return a}(y,u,a);!function(e,t,r){for(var n=0;n<=o;n+=4)e[b(n)](v(n/4,t,r))}(S,y,i),k||M||(L=T.texture(s.extendFlat({data:m(r.unitToColor,255)},p)))}return{render:function(e,t,n){var a,i,o,s=e.length,l=1/0,d=-1/0;for(a=0;a<s;a++)e[a].dim0.canvasX<l&&(l=e[a].dim0.canvasX,i=a),e[a].dim1.canvasX>d&&(d=e[a].dim1.canvasX,o=a);0===s&&h(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(e){var t,r,n,a=[[],[]];for(n=0;n<64;n++){var i=!e&&n<u.length?u[n].brush.filter.getBounds():[-1/0,1/0];a[0][n]=i[0],a[1][n]=i[1]}var o=8*c,s=new Array(o);for(t=0;t<o;t++)s[t]=255;if(!e)for(t=0;t<u.length;t++){var l=t%8,d=(t-l)/8,p=Math.pow(2,l),h=u[t].brush.filter.get();if(!(h.length<2)){var f=x(h[0])[1];for(r=1;r<h.length;r++){var m=x(h[r]);for(n=f+1;n<m[0];n++)s[8*n+d]&=~p;f=Math.max(f,m[1])}}}var g={shape:[8,c],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:s};return w?w(g):w=T.texture(g),{maskTexture:w,maskHeight:c,loA:a[0].slice(0,16),loB:a[0].slice(16,32),loC:a[0].slice(32,48),loD:a[0].slice(48,64),hiA:a[1].slice(0,16),hiB:a[1].slice(16,32),hiC:a[1].slice(32,48),hiD:a[1].slice(48,64)}}(k);for(a=0;a<s;a++){var m=e[a],g=m.dim0.crossfilterDimensionIndex,v=m.dim1.crossfilterDimensionIndex,b=m.canvasX,S=m.canvasY,L=b+m.panelSizeX;if(t||!A[g]||A[g][0]!==b||A[g][1]!==L){A[g]=[b,L];var D=_(r,i,o,a,g,v,b,S,m.panelSizeX,m.panelSizeY,m.dim0.crossfilterDimensionIndex,k?0:M?2:1,p);C.clearOnly=n;var I=t?r.lines.blockLineCount:y;f(T,E,C,I,y,D)}}},readPixel:function(e,t){return T.read({x:e,y:t,width:1,height:1,data:d}),d},readPixels:function(e,t,r,n){var a=new Uint8Array(4*r*n);return T.read({x:e,y:t,width:r,height:n,data:a}),a},destroy:function(){for(var t in e.style["pointer-events"]="none",L.destroy(),w&&w.destroy(),S)S[t].destroy()},update:D}}},{"../../lib":716,"./constants":1084,glslify:410}],1089:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var a,i;for(n||(n=1/0),a=0;a<t.length;a++)(i=t[a]).visible&&(n=Math.min(n,i[r].length));for(n===1/0&&(n=0),e._length=n,a=0;a<t.length;a++)(i=t[a]).visible&&(i._length=n);return n}},{}],1090:[function(e,t,r){"use strict";var n=e("d3"),a=e("color-rgba"),i=e("../../plots/cartesian/axes"),o=e("../../lib"),s=e("../../lib/svg_text_utils"),l=e("../../components/drawing"),c=e("../../components/colorscale"),u=e("../../lib/gup"),d=u.keyFun,p=u.repeat,h=u.unwrap,f=e("./helpers"),m=e("./constants"),g=e("./axisbrush"),v=e("./lines");function y(e,t,r){return o.aggNums(e,null,t,r)}function b(e,t){return x(y(Math.min,e,t),y(Math.max,e,t))}function _(e){var t=e.range;return t?x(t[0],t[1]):b(e.values,e._length)}function x(e,t){return!isNaN(e)&&isFinite(e)||(e=0),!isNaN(t)&&isFinite(t)||(t=0),e===t&&(0===e?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function w(e,t,r,a,i){var o,s,l=_(r);return a?n.scale.ordinal().domain(a.map((o=n.format(r.tickformat),s=i,s?function(e,t){var r=s[t];return null==r?o(e):r}:o))).range(a.map((function(r){var n=(r-l[0])/(l[1]-l[0]);return e-t+n*(2*t-e)}))):n.scale.linear().domain(l).range([e-t,t])}function k(e){if(e.tickvals){var t=_(e);return n.scale.ordinal().domain(e.tickvals).range(e.tickvals.map((function(e){return(e-t[0])/(t[1]-t[0])})))}}function M(e){var t=e.map((function(e){return e[0]})),r=e.map((function(e){var t=a(e[1]);return n.rgb("rgb("+t[0]+","+t[1]+","+t[2]+")")})),i="rgb".split("").map((function(e){return n.scale.linear().clamp(!0).domain(t).range(r.map((a=e,function(e){return e[a]})));var a}));return function(e){return i.map((function(t){return t(e)}))}}function T(e){return e.dimensions.some((function(e){return e.brush.filterSpecified}))}function C(e,t,r){var i=h(t),s=i.trace,l=f.convertTypedArray(i.lineColor),u=s.line,d={color:a(m.deselectedLineColor)},p=c.extractOpts(u),g=p.reversescale?c.flipScale(i.cscale):i.cscale,v=s.domain,y=s.dimensions,b=e.width,x=s.labelangle,w=s.labelside,k=s.labelfont,T=s.tickfont,C=s.rangefont,S=o.extendDeepNoArrays({},u,{color:l.map(n.scale.linear().domain(_({values:l,range:[p.min,p.max],_length:s._length}))),blockLineCount:m.blockLineCount,canvasOverdrag:m.overdrag*m.canvasPixelRatio}),L=Math.floor(b*(v.x[1]-v.x[0])),A=Math.floor(e.height*(v.y[1]-v.y[0])),E=e.margin||{l:80,r:80,t:100,b:80},D=L,I=A;return{key:r,colCount:y.filter(f.isVisible).length,dimensions:y,tickDistance:m.tickDistance,unitToColor:M(g),lines:S,deselectedLines:d,labelAngle:x,labelSide:w,labelFont:k,tickFont:T,rangeFont:C,layoutWidth:b,layoutHeight:e.height,domain:v,translateX:v.x[0]*b,translateY:e.height-v.y[1]*e.height,pad:E,canvasWidth:D*m.canvasPixelRatio+2*S.canvasOverdrag,canvasHeight:I*m.canvasPixelRatio,width:D,height:I,canvasPixelRatio:m.canvasPixelRatio}}function S(e,t,r){var a=r.width,i=r.height,s=r.dimensions,l=r.canvasPixelRatio,c=function(e){return a*e/Math.max(1,r.colCount-1)},u=m.verticalPadding/i,d=function(e,t){return n.scale.linear().range([t,e-t])}(i,m.verticalPadding),p={key:r.key,xScale:c,model:r,inBrushDrag:!1},h={};return p.dimensions=s.filter(f.isVisible).map((function(a,s){var v=function(e,t){return n.scale.linear().domain(_(e)).range([t,1-t])}(a,u),y=h[a.label];h[a.label]=(y||0)+1;var b=a.label+(y?"__"+y:""),x=a.constraintrange,M=x&&x.length;M&&!Array.isArray(x[0])&&(x=[x]);var C=M?x.map((function(e){return e.map(v)})):[[-1/0,1/0]],S=a.values;S.length>a._length&&(S=S.slice(0,a._length));var L,A=a.tickvals;function E(e,t){return{val:e,text:L[t]}}function D(e,t){return e.val-t.val}if(Array.isArray(A)&&A.length){L=a.ticktext,Array.isArray(L)&&L.length?L.length>A.length?L=L.slice(0,A.length):A.length>L.length&&(A=A.slice(0,L.length)):L=A.map(n.format(a.tickformat));for(var I=1;I<A.length;I++)if(A[I]<A[I-1]){for(var P=A.map(E).sort(D),O=0;O<A.length;O++)A[O]=P[O].val,L[O]=P[O].text;break}}else A=void 0;return S=f.convertTypedArray(S),{key:b,label:a.label,tickFormat:a.tickformat,tickvals:A,ticktext:L,ordinal:f.isOrdinal(a),multiselect:a.multiselect,xIndex:s,crossfilterDimensionIndex:s,visibleIndex:a._index,height:i,values:S,paddedUnitValues:S.map(v),unitTickvals:A&&A.map(v),xScale:c,x:c(s),canvasX:c(s)*l,unitToPaddedPx:d,domainScale:w(i,m.verticalPadding,a,A,L),ordinalScale:k(a),parent:p,model:r,brush:g.makeBrush(e,M,C,(function(){e.linePickActive(!1)}),(function(){var t=p;t.focusLayer&&t.focusLayer.render(t.panels,!0);var r=T(t);!e.contextShown()&&r?(t.contextLayer&&t.contextLayer.render(t.panels,!0),e.contextShown(!0)):e.contextShown()&&!r&&(t.contextLayer&&t.contextLayer.render(t.panels,!0,!0),e.contextShown(!1))}),(function(r){if(p.focusLayer.render(p.panels,!0),p.pickLayer&&p.pickLayer.render(p.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var n=v.invert,i=r.map((function(e){return e.map(n).sort(o.sorterAsc)})).sort((function(e,t){return e[0]-t[0]}));t.filterChanged(p.key,a._index,i)}}))}})),p}function L(e){e.classed(m.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default").style("user-select","none")}function A(e,t){var r="top"===t?1:-1,n=e*Math.PI/180;return{dir:r,dx:Math.sin(n),dy:Math.cos(n),degrees:e}}function E(e,t){for(var r=t.panels||(t.panels=[]),n=e.data(),a=0;a<n.length-1;a++){var i=r[a]||(r[a]={}),o=n[a],s=n[a+1];i.dim0=o,i.dim1=s,i.canvasX=o.canvasX,i.panelSizeX=s.canvasX-o.canvasX,i.panelSizeY=t.model.canvasHeight,i.y=0,i.canvasY=0}}function D(e,t){return i.tickText(e._ax,t,!1).text}function I(e,t){if(e.ordinal)return"";var r=e.domainScale.domain(),n=r[t?r.length-1:0];return D(e.model.dimensions[e.visibleIndex],n)}t.exports=function(e,t,r,a){var c=e._fullLayout,u=c._toppaper,y=c._glcontainer;!function(e){for(var t=0;t<e.length;t++)for(var r=0;r<e[t].length;r++)for(var n=e[t][r].trace,a=n.dimensions,o=0;o<a.length;o++){var s=a[o].values,l=a[o]._ax;l&&(l.range?l.range=x(l.range[0],l.range[1]):l.range=b(s,n._length),l.dtick||(l.dtick=.01*(Math.abs(l.range[1]-l.range[0])||1)),l.tickformat=a[o].tickformat,i.calcTicks(l),l.cleanRange())}}(t);var _,w,k=(_=!0,w=!1,{linePickActive:function(e){return arguments.length?_=!!e:_},contextShown:function(e){return arguments.length?w=!!e:w}}),M=t.filter((function(e){return h(e).trace.visible})).map(C.bind(0,r)).map(S.bind(0,k,a));y.each((function(e,t){return o.extendFlat(e,M[t])}));var P=y.selectAll(".gl-canvas").each((function(e){e.viewModel=M[0],e.model=e.viewModel?e.viewModel.model:null})),O=null;P.filter((function(e){return e.pick})).style("pointer-events","auto").on("mousemove",(function(e){if(k.linePickActive()&&e.lineLayer&&a&&a.hover){var t=n.event,r=this.width,i=this.height,o=n.mouse(this),s=o[0],l=o[1];if(s<0||l<0||s>=r||l>=i)return;var c=e.lineLayer.readPixel(s,i-1-l),u=0!==c[3],d=u?c[2]+256*(c[1]+256*c[0]):null,p={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:d};d!==O&&(u?a.hover(p):a.unhover&&a.unhover(p),O=d)}})),P.style("opacity",(function(e){return e.pick?0:1})),u.style("background","rgba(255, 255, 255, 0)");var R=u.selectAll("."+m.cn.parcoords).data(M,d);R.exit().remove(),R.enter().append("g").classed(m.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),R.attr("transform",(function(e){return"translate("+e.model.translateX+","+e.model.translateY+")"}));var F=R.selectAll("."+m.cn.parcoordsControlView).data(p,d);F.enter().append("g").classed(m.cn.parcoordsControlView,!0),F.attr("transform",(function(e){return"translate("+e.model.pad.l+","+e.model.pad.t+")"}));var z=F.selectAll("."+m.cn.yAxis).data((function(e){return e.dimensions}),d);z.enter().append("g").classed(m.cn.yAxis,!0),F.each((function(e){E(z,e)})),P.each((function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=v(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}})),z.attr("transform",(function(e){return"translate("+e.xScale(e.xIndex)+", 0)"})),z.call(n.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;k.linePickActive(!1),e.x=Math.max(-m.overdrag,Math.min(e.model.width+m.overdrag,n.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,z.sort((function(e,t){return e.x-t.x})).each((function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),E(z,t),z.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return"translate("+e.xScale(e.xIndex)+", 0)"})),n.select(this).attr("transform","translate("+e.x+", 0)"),z.each((function(r,n,a){a===e.parent.key&&(t.dimensions[n]=r)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!T(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,E(z,t),n.select(this).attr("transform",(function(e){return"translate("+e.x+", 0)"})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!T(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),k.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),z.exit().remove();var N=z.selectAll("."+m.cn.axisOverlays).data(p,d);N.enter().append("g").classed(m.cn.axisOverlays,!0),N.selectAll("."+m.cn.axis).remove();var j=N.selectAll("."+m.cn.axis).data(p,d);j.enter().append("g").classed(m.cn.axis,!0),j.each((function(e){var t=e.model.height/e.model.tickDistance,r=e.domainScale,a=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?a:null).tickFormat((function(t){return f.isOrdinal(e)?t:D(e.model.dimensions[e.visibleIndex],t)})).scale(r)),l.font(j.selectAll("text"),e.model.tickFont)})),j.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),j.selectAll("text").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default").style("user-select","none");var B=N.selectAll("."+m.cn.axisHeading).data(p,d);B.enter().append("g").classed(m.cn.axisHeading,!0);var Y=B.selectAll("."+m.cn.axisTitle).data(p,d);Y.enter().append("text").classed(m.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("user-select","none").style("pointer-events","auto"),Y.text((function(e){return e.label})).each((function(t){var r=n.select(this);l.font(r,t.model.labelFont),s.convertToTspans(r,e)})).attr("transform",(function(e){var t=A(e.model.labelAngle,e.model.labelSide),r=m.axisTitleOffset;return(t.dir>0?"":"translate(0,"+(2*r+e.model.height)+")")+"rotate("+t.degrees+")translate("+-r*t.dx+","+-r*t.dy+")"})).attr("text-anchor",(function(e){var t=A(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var H=N.selectAll("."+m.cn.axisExtent).data(p,d);H.enter().append("g").classed(m.cn.axisExtent,!0);var V=H.selectAll("."+m.cn.axisExtentTop).data(p,d);V.enter().append("g").classed(m.cn.axisExtentTop,!0),V.attr("transform","translate(0,"+-m.axisExtentOffset+")");var U=V.selectAll("."+m.cn.axisExtentTopText).data(p,d);U.enter().append("text").classed(m.cn.axisExtentTopText,!0).call(L),U.text((function(e){return I(e,!0)})).each((function(e){l.font(n.select(this),e.model.rangeFont)}));var W=H.selectAll("."+m.cn.axisExtentBottom).data(p,d);W.enter().append("g").classed(m.cn.axisExtentBottom,!0),W.attr("transform",(function(e){return"translate(0,"+(e.model.height+m.axisExtentOffset)+")"}));var G=W.selectAll("."+m.cn.axisExtentBottomText).data(p,d);G.enter().append("text").classed(m.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(L),G.text((function(e){return I(e,!1)})).each((function(e){l.font(n.select(this),e.model.rangeFont)})),g.ensureAxisBrush(N)}},{"../../components/colorscale":603,"../../components/drawing":612,"../../lib":716,"../../lib/gup":714,"../../lib/svg_text_utils":740,"../../plots/cartesian/axes":764,"./axisbrush":1081,"./constants":1084,"./helpers":1086,"./lines":1088,"color-rgba":123,d3:164}],1091:[function(e,t,r){"use strict";var n=e("./parcoords"),a=e("../../lib/prepare_regl"),i=e("./helpers").isVisible;function o(e,t,r){var n=t.indexOf(r),a=e.indexOf(n);return-1===a&&(a+=t.length),a}t.exports=function(e,t){var r=e._fullLayout;if(a(e)){var s={},l={},c={},u={},d=r._size;t.forEach((function(t,r){var n=t[0].trace;c[r]=n.index;var a=u[r]=n._fullInput.index;s[r]=e.data[a].dimensions,l[r]=e.data[a].dimensions.slice()})),n(e,t,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{filterChanged:function(t,n,a){var i=l[t][n],o=a.map((function(e){return e.slice()})),s="dimensions["+n+"].constraintrange",d=r._tracePreGUI[e._fullData[c[t]]._fullInput.uid];if(void 0===d[s]){var p=i.constraintrange;d[s]=p||null}var h=e._fullData[c[t]].dimensions[n];o.length?(1===o.length&&(o=o[0]),i.constraintrange=o,h.constraintrange=o.slice(),o=[o]):(delete i.constraintrange,delete h.constraintrange,o=null);var f={};f[s]=o,e.emit("plotly_restyle",[f,[u[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var n=function(e,t){return function(r,n){return o(e,t,r)-o(e,t,n)}}(r,l[t].filter(i));s[t].sort(n),l[t].filter((function(e){return!i(e)})).sort((function(e){return l[t].indexOf(e)})).forEach((function(e){s[t].splice(s[t].indexOf(e),1),s[t].splice(l[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[s[t]]},[u[t]]])}})}}},{"../../lib/prepare_regl":729,"./helpers":1086,"./parcoords":1090}],1092:[function(e,t,r){"use strict";var n=e("../../plots/attributes"),a=e("../../plots/domain").attributes,i=e("../../plots/font_attributes"),o=e("../../components/color/attributes"),s=e("../../plots/template_attributes").hovertemplateAttrs,l=e("../../plots/template_attributes").texttemplateAttrs,c=e("../../lib/extend").extendFlat,u=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},u,{}),insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},u,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:a({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:c({},u,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":590,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/domain":789,"../../plots/font_attributes":790,"../../plots/template_attributes":840}],1093:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="pie",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":825}],1094:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib").isArrayOrTypedArray,i=e("tinycolor2"),o=e("../../components/color"),s={};function l(e){return function(t,r){return!!t&&!!(t=i(t)).isValid()&&(t=o.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t)}}function c(e,t){var r,n=JSON.stringify(e),a=t[n];if(!a){for(a=e.slice(),r=0;r<e.length;r++)a.push(i(e[r]).lighten(20).toHexString());for(r=0;r<e.length;r++)a.push(i(e[r]).darken(20).toHexString());t[n]=a}return a}t.exports={calc:function(e,t){var r,i,o=[],s=e._fullLayout,c=s.hiddenlabels||[],u=t.labels,d=t.marker.colors||[],p=t.values,h=a(p)&&p.length;if(t.dlabel)for(u=new Array(p.length),r=0;r<p.length;r++)u[r]=String(t.label0+r*t.dlabel);var f={},m=l(s["_"+t.type+"colormap"]),g=(h?p:u).length,v=0,y=!1;for(r=0;r<g;r++){var b,_,x;if(h){if(b=p[r],!n(b))continue;if((b=+b)<0)continue}else b=1;void 0!==(_=u[r])&&""!==_||(_=r);var w=f[_=String(_)];void 0===w?(f[_]=o.length,(x=-1!==c.indexOf(_))||(v+=b),o.push({v:b,label:_,color:m(d[r],_),i:r,pts:[r],hidden:x})):(y=!0,(i=o[w]).v+=b,i.pts.push(r),i.hidden||(v+=b),!1===i.color&&d[r]&&(i.color=m(d[r],_)))}return("funnelarea"===t.type?y:t.sort)&&o.sort((function(e,t){return t.v-e.v})),o[0]&&(o[0].vTotal=v),o},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=c(i,s));for(var l=0,u=0;u<a.length;u++){var d=a[u];if(d[0].trace.type===r)for(var p=0;p<d.length;p++){var h=d[p];!1===h.color&&(o[h.label]?h.color=o[h.label]:(o[h.label]=h.color=i[l%i.length],l++))}}},makePullColorFn:l,generateExtendedColors:c}},{"../../components/color":591,"../../lib":716,"fast-isnumeric":227,tinycolor2:535}],1095:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../plots/domain").defaults,o=e("../bar/defaults").handleText;t.exports=function(e,t,r,s){function l(r,i){return n.coerce(e,t,a,r,i)}var c,u=l("values"),d=n.isArrayOrTypedArray(u),p=l("labels");if(Array.isArray(p)?(c=p.length,d&&(c=Math.min(c,u.length))):d&&(c=u.length,l("label0"),l("dlabel")),c){t._length=c,l("marker.line.width")&&l("marker.line.color"),l("marker.colors"),l("scalegroup");var h,f=l("text"),m=l("texttemplate");if(m||(h=l("textinfo",Array.isArray(f)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),m||h&&"none"!==h){var g=l("textposition");o(e,t,s,l,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&l("automargin")}i(t,s,l);var v=l("hole");if(l("title.text")){var y=l("title.position",v?"middle center":"top center");v||"middle center"!==y||(t.title.position="top center"),n.coerceFont(l,"title.font",s.font)}l("sort"),l("direction"),l("rotation"),l("pull")}else t.visible=!1}},{"../../lib":716,"../../plots/domain":789,"../bar/defaults":859,"./attributes":1092}],1096:[function(e,t,r){"use strict";var n=e("../../components/fx/helpers").appendArrayMultiPointValues;t.exports=function(e,t){var r={curveNumber:t.index,pointNumbers:e.pts,data:t._input,fullData:t,label:e.label,color:e.color,value:e.v,percent:e.percent,text:e.text,v:e.v};return 1===e.pts.length&&(r.pointNumber=r.i=e.pts[0]),n(r,t,e.pts),"funnelarea"===t.type&&(delete r.v,delete r.i),r}},{"../../components/fx/helpers":626}],1097:[function(e,t,r){"use strict";var n=e("../../lib");r.formatPiePercent=function(e,t){var r=(100*e).toPrecision(3);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,t)+"%"},r.formatPieValue=function(e,t){var r=e.toPrecision(10);return-1!==r.lastIndexOf(".")&&(r=r.replace(/[.]?0+$/,"")),n.numSeparate(r,t)},r.getFirstFilled=function(e,t){if(Array.isArray(e))for(var r=0;r<t.length;r++){var n=e[t[r]];if(n||0===n||""===n)return n}},r.castOption=function(e,t){return Array.isArray(e)?r.getFirstFilled(e,t):e||void 0}},{"../../lib":716}],1098:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),layoutAttributes:e("./layout_attributes"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style"),styleOne:e("./style_one"),moduleType:"trace",name:"pie",basePlotModule:e("./base_plot"),categories:["pie-like","pie","showLegend"],meta:{}}},{"./attributes":1092,"./base_plot":1093,"./calc":1094,"./defaults":1095,"./layout_attributes":1099,"./layout_defaults":1100,"./plot":1101,"./style":1102,"./style_one":1103}],1099:[function(e,t,r){"use strict";t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1100:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("hiddenlabels"),r("piecolorway",t.colorway),r("extendpiecolors")}},{"../../lib":716,"./layout_attributes":1099}],1101:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../plots/plots"),i=e("../../components/fx"),o=e("../../components/color"),s=e("../../components/drawing"),l=e("../../lib"),c=e("../../lib/svg_text_utils"),u=e("./helpers"),d=e("./event_data"),p=e("../../lib").isValidTextValue;function h(e,t,r){var a=r[0],o=a.trace,s=a.cx,c=a.cy;"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",(function(e){var r=t._fullLayout,p=t._fullData[o.index];if(!t._dragging&&!1!==r.hovermode){var h=p.hoverinfo;if(Array.isArray(h)&&(h=i.castHoverinfo({hoverinfo:[u.castOption(h,e.pts)],_module:o._module},r,0)),"all"===h&&(h="label+text+value+percent+name"),p.hovertemplate||"none"!==h&&"skip"!==h&&h){var f=e.rInscribed||0,m=s+e.pxmid[0]*(1-f),g=c+e.pxmid[1]*(1-f),v=r.separators,y=[];if(h&&-1!==h.indexOf("label")&&y.push(e.label),e.text=u.castOption(p.hovertext||p.text,e.pts),h&&-1!==h.indexOf("text")){var b=e.text;l.isValidTextValue(b)&&y.push(b)}e.value=e.v,e.valueLabel=u.formatPieValue(e.v,v),h&&-1!==h.indexOf("value")&&y.push(e.valueLabel),e.percent=e.v/a.vTotal,e.percentLabel=u.formatPiePercent(e.percent,v),h&&-1!==h.indexOf("percent")&&y.push(e.percentLabel);var _=p.hoverlabel,x=_.font;i.loneHover({trace:o,x0:m-f*a.r,x1:m+f*a.r,y:g,text:y.join("<br>"),name:p.hovertemplate||-1!==h.indexOf("name")?p.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:u.castOption(_.bgcolor,e.pts)||e.color,borderColor:u.castOption(_.bordercolor,e.pts),fontFamily:u.castOption(x.family,e.pts),fontSize:u.castOption(x.size,e.pts),fontColor:u.castOption(x.color,e.pts),nameLength:u.castOption(_.namelength,e.pts),textAlign:u.castOption(_.align,e.pts),hovertemplate:u.castOption(p.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[d(e,p)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[d(e,p)],event:n.event})}})),e.on("mouseout",(function(e){var r=t._fullLayout,a=t._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(e.originalEvent=n.event,t.emit("plotly_unhover",{points:[d(s,a)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(i.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)})),e.on("click",(function(e){var r=t._fullLayout,a=t._fullData[o.index];t._dragging||!1===r.hovermode||(t._hoverdata=[d(e,a)],i.click(t,n.event))}))}function f(e,t,r){var n=u.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=u.castOption(e._input.textfont.color,t.pts));var a=u.castOption(e.insidetextfont.family,t.pts)||u.castOption(e.textfont.family,t.pts)||r.family,i=u.castOption(e.insidetextfont.size,t.pts)||u.castOption(e.textfont.size,t.pts)||r.size;return{color:n||o.contrast(t.color),family:a,size:i}}function m(e,t){for(var r,n,a=0;a<e.length;a++)if((n=(r=e[a][0]).trace).title.text){var i=n.title.text;n._meta&&(i=l.templateString(i,n._meta));var o=s.tester.append("text").attr("data-notex",1).text(i).call(s.font,n.title.font).call(c.convertToTspans,t),u=s.bBox(o.node(),!0);r.titleBox={width:u.width,height:u.height},o.remove()}}function g(e,t,r){var n=Math.sqrt(e.width*e.width+e.height*e.height),a=e.width/e.height,i=t.halfangle,o=t.ring,s=t.rInscribed,l=r.r||t.rpx1,c={scale:s*l*2/n,rCenter:1-s,rotate:0};if(c.scale>=1)return c;var u=a+1/(2*Math.tan(i)),d=l*Math.min(1/(Math.sqrt(u*u+.5)+u),o/(Math.sqrt(a*a+o/2)+a)),p={scale:2*d/e.height,rCenter:Math.cos(d/l)-d*a/l,rotate:(180/Math.PI*t.midangle+720)%180-90},h=1/a,f=h+1/(2*Math.tan(i)),m=l*Math.min(1/(Math.sqrt(f*f+.5)+f),o/(Math.sqrt(h*h+o/2)+h)),g={scale:2*m/e.width,rCenter:Math.cos(m/l)-m/a/l,rotate:(180/Math.PI*t.midangle+810)%180-90},v=g.scale>p.scale?g:p;return c.scale<1&&v.scale>c.scale?v:c}function v(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function y(e,t){var r=t.pxmid[0],n=t.pxmid[1],a=e.width/2,i=e.height/2;return r<0&&(a*=-1),n<0&&(i*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(i)*(a>0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function b(e,t){var r,n,a,i=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=x(i),-1!==i.title.position.indexOf("top")?(o.y-=(1+a)*e.r,s.ty-=e.titleBox.height):-1!==i.title.position.indexOf("bottom")&&(o.y+=(1+a)*e.r);var l,c,u=(l=e.r,c=e.trace.aspectratio,l/(void 0===c?1:c)),d=t.w*(i.domain.x[1]-i.domain.x[0])/2;return-1!==i.title.position.indexOf("left")?(d+=u,o.x-=(1+a)*u,s.tx+=e.titleBox.width/2):-1!==i.title.position.indexOf("center")?d*=2:-1!==i.title.position.indexOf("right")&&(d+=u,o.x+=(1+a)*u,s.tx-=e.titleBox.width/2),r=d/e.titleBox.width,n=_(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function _(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function x(e){var t,r=e.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,t=0;t<e.pull.length;t++)e.pull[t]>r&&(r=e.pull[t]);return r}function w(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n][0],i=a.trace,o=i.domain,s=t.w*(o.x[1]-o.x[0]),l=t.h*(o.y[1]-o.y[0]);i.title.text&&"middle center"!==i.title.position&&(l-=_(a,t));var c=s/2,u=l/2;"funnelarea"!==i.type||i.scalegroup||(u/=i.aspectratio),a.r=Math.min(c,u)/(1+x(i)),a.cx=t.l+t.w*(i.domain.x[1]+i.domain.x[0])/2,a.cy=t.t+t.h*(1-i.domain.y[0])-l/2,i.title.text&&-1!==i.title.position.indexOf("bottom")&&(a.cy-=_(a,t)),i.scalegroup&&-1===r.indexOf(i.scalegroup)&&r.push(i.scalegroup)}!function(e,t){for(var r,n,a,i=0;i<t.length;i++){var o=1/0,s=t[i];for(n=0;n<e.length;n++)if(r=e[n][0],(a=r.trace).scalegroup===s){var l;if("pie"===a.type)l=r.r*r.r;else if("funnelarea"===a.type){var c,u;a.aspectratio>1?(c=r.r,u=c/a.aspectratio):(u=r.r,c=u*a.aspectratio),c*=(1+a.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n<e.length;n++)if(r=e[n][0],(a=r.trace).scalegroup===s){var d=o*r.vTotal;"funnelarea"===a.type&&(d/=(1+a.baseratio)/2,d/=a.aspectratio),r.r=Math.sqrt(d)}}}(e,r)}function k(e,t,r){var n=e._fullLayout,a=r.trace,i=a.texttemplate,o=a.textinfo;if(!i&&o&&"none"!==o){var s,c=o.split("+"),d=function(e){return-1!==c.indexOf(e)},h=d("label"),f=d("text"),m=d("value"),g=d("percent"),v=n.separators;if(s=h?[t.label]:[],f){var y=u.getFirstFilled(a.text,t.pts);p(y)&&s.push(y)}m&&s.push(u.formatPieValue(t.v,v)),g&&s.push(u.formatPiePercent(t.v/r.vTotal,v)),t.text=s.join("<br>")}if(i){var b=l.castOption(a,t.i,"texttemplate");if(b){var _=function(e){return{label:e.label,value:e.v,valueLabel:u.formatPieValue(e.v,n.separators),percent:e.v/r.vTotal,percentLabel:u.formatPiePercent(e.v/r.vTotal,n.separators),color:e.color,text:e.text,customdata:l.castOption(a,e.i,"customdata")}}(t),x=u.getFirstFilled(a.text,t.pts);(p(x)||""===x)&&(_.text=x),t.text=l.texttemplateString(b,_,e._fullLayout._d3locale,_,a._meta||{})}else t.text=""}}t.exports={plot:function(e,t){var r=e._fullLayout,i=r._size;m(t,e),w(t,i);var d=l.makeTraceGroups(r._pielayer,t,"trace").each((function(t){var r=n.select(this),d=t[0],p=d.trace;!function(e){var t,r,n,a=e[0],i=a.trace,o=i.rotation*Math.PI/180,s=2*Math.PI/a.vTotal,l="px0",c="px1";if("counterclockwise"===i.direction){for(t=0;t<e.length&&e[t].hidden;t++);if(t===e.length)return;o+=s*e[t].v,s*=-1,l="px1",c="px0"}function u(e){return[a.r*Math.sin(e),-a.r*Math.cos(e)]}for(n=u(o),t=0;t<e.length;t++)(r=e[t]).hidden||(r[l]=n,o+=s*r.v/2,r.pxmid=u(o),r.midangle=o,o+=s*r.v/2,n=u(o),r[c]=n,r.largeArc=r.v>a.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/a.vTotal,.5),r.ring=1-i.hole,r.rInscribed=v(r,a))}(t),r.attr("stroke-linejoin","round"),r.each((function(){var m=n.select(this).selectAll("g.slice").data(t);m.enter().append("g").classed("slice",!0),m.exit().remove();var v=[[[],[]],[[],[]]],_=!1;m.each((function(r){if(r.hidden)n.select(this).selectAll("path,g").remove();else{r.pointNumber=r.i,r.curveNumber=p.index,v[r.pxmid[1]<0?0:1][r.pxmid[0]<0?0:1].push(r);var a=d.cx,i=d.cy,o=n.select(this),m=o.selectAll("path.surface").data([r]);if(m.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),o.call(h,e,t),p.pull){var b=+u.castOption(p.pull,r.pts)||0;b>0&&(a+=b*r.pxmid[0],i+=b*r.pxmid[1])}r.cxFinal=a,r.cyFinal=i;var x=p.hole;if(r.v===d.vTotal){var w="M"+(a+r.px0[0])+","+(i+r.px0[1])+L(r.px0,r.pxmid,!0,1)+L(r.pxmid,r.px0,!0,1)+"Z";x?m.attr("d","M"+(a+x*r.px0[0])+","+(i+x*r.px0[1])+L(r.px0,r.pxmid,!1,x)+L(r.pxmid,r.px0,!1,x)+"Z"+w):m.attr("d",w)}else{var M=L(r.px0,r.px1,!0,1);if(x){var T=1-x;m.attr("d","M"+(a+x*r.px1[0])+","+(i+x*r.px1[1])+L(r.px1,r.px0,!1,x)+"l"+T*r.px0[0]+","+T*r.px0[1]+M+"Z")}else m.attr("d","M"+a+","+i+"l"+r.px0[0]+","+r.px0[1]+M+"Z")}k(e,r,d);var C=u.castOption(p.textposition,r.pts),S=o.selectAll("g.slicetext").data(r.text&&"none"!==C?[0]:[]);S.enter().append("g").classed("slicetext",!0),S.exit().remove(),S.each((function(){var t=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)}));t.text(r.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,"outside"===C?function(e,t,r){var n=u.castOption(e.outsidetextfont.color,t.pts)||u.castOption(e.textfont.color,t.pts)||r.color,a=u.castOption(e.outsidetextfont.family,t.pts)||u.castOption(e.textfont.family,t.pts)||r.family,i=u.castOption(e.outsidetextfont.size,t.pts)||u.castOption(e.textfont.size,t.pts)||r.size;return{color:n,family:a,size:i}}(p,r,e._fullLayout.font):f(p,r,e._fullLayout.font)).call(c.convertToTspans,e);var o,h=s.bBox(t.node());"outside"===C?o=y(h,r):(o=g(h,r,d),"auto"===C&&o.scale<1&&(t.call(s.font,p.outsidetextfont),p.outsidetextfont.family===p.insidetextfont.family&&p.outsidetextfont.size===p.insidetextfont.size||(h=s.bBox(t.node())),o=y(h,r)));var m=a+r.pxmid[0]*o.rCenter+(o.x||0),v=i+r.pxmid[1]*o.rCenter+(o.y||0);o.outside&&(r.yLabelMin=v-h.height/2,r.yLabelMid=v,r.yLabelMax=v+h.height/2,r.labelExtraX=0,r.labelExtraY=0,_=!0),t.attr("transform","translate("+m+","+v+")"+(o.scale<1?"scale("+o.scale+")":"")+(o.rotate?"rotate("+o.rotate+")":"")+"translate("+-(h.left+h.right)/2+","+-(h.top+h.bottom)/2+")")}))}function L(e,t,n,a){var i=a*(t[0]-e[0]),o=a*(t[1]-e[1]);return"a"+a*d.r+","+a*d.r+" 0 "+r.largeArc+(n?" 1 ":" 0 ")+i+","+o}}));var x=n.select(this).selectAll("g.titletext").data(p.title.text?[0]:[]);if(x.enter().append("g").classed("titletext",!0),x.exit().remove(),x.each((function(){var t,r=l.ensureSingle(n.select(this),"text","",(function(e){e.attr("data-notex",1)})),a=p.title.text;p._meta&&(a=l.templateString(a,p._meta)),r.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,p.title.font).call(c.convertToTspans,e),t="middle center"===p.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(d):b(d,i),r.attr("transform","translate("+t.x+","+t.y+")"+(t.scale<1?"scale("+t.scale+")":"")+"translate("+t.tx+","+t.ty+")")})),_&&function(e,t){var r,n,a,i,o,s,l,c,d,p,h,f,m;function g(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function y(e,r){r||(r={});var a,c,d,h,f=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),m=n?e.yLabelMin:e.yLabelMax,g=n?e.yLabelMax:e.yLabelMin,v=e.cyFinal+o(e.px0[1],e.px1[1]),y=f-m;if(y*l>0&&(e.labelExtraY=y),Array.isArray(t.pull))for(c=0;c<p.length;c++)(d=p[c])===e||(u.castOption(t.pull,e.pts)||0)>=(u.castOption(t.pull,d.pts)||0)||((e.pxmid[1]-d.pxmid[1])*l>0?(y=d.cyFinal+o(d.px0[1],d.px1[1])-m-e.labelExtraY)*l>0&&(e.labelExtraY+=y):(g+e.labelExtraY-v)*l>0&&(a=3*s*Math.abs(c-p.indexOf(e)),(h=d.cxFinal+i(d.px0[0],d.px1[0])+a-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*s>0&&(e.labelExtraX+=h)))}for(n=0;n<2;n++)for(a=n?g:v,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,s=r?1:-1,(c=e[n][r]).sort(a),d=e[1-n][r],p=d.concat(c),f=[],h=0;h<c.length;h++)void 0!==c[h].yLabelMid&&f.push(c[h]);for(m=!1,h=0;n&&h<d.length;h++)if(void 0!==d[h].yLabelMid){m=d[h];break}for(h=0;h<f.length;h++){var b=h&&f[h-1];m&&!h&&(b=m),y(f[h],b)}}}(v,p),function(e,t){e.each((function(e){var r=n.select(this);if(e.labelExtraX||e.labelExtraY){var a=r.select("g.slicetext text");a.attr("transform","translate("+e.labelExtraX+","+e.labelExtraY+")"+a.attr("transform"));var i=e.cxFinal+e.pxmid[0],s="M"+i+","+(e.cyFinal+e.pxmid[1]),c=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var u=e.labelExtraX*e.pxmid[1]/e.pxmid[0],d=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(u)>Math.abs(d)?s+="l"+d*e.pxmid[0]/e.pxmid[1]+","+d+"H"+(i+e.labelExtraX+c):s+="l"+e.labelExtraX+","+u+"v"+(d-u)+"h"+c}else s+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;l.ensureSingle(r,"path","textline").call(o.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(m,p),_&&p.automargin){var w=s.bBox(r.node()),M=p.domain,T=i.w*(M.x[1]-M.x[0]),C=i.h*(M.y[1]-M.y[0]),S=(.5*T-d.r)/i.w,L=(.5*C-d.r)/i.h;a.autoMargin(e,"pie."+p.uid+".automargin",{xl:M.x[0]-S,xr:M.x[1]+S,yb:M.y[0]-L,yt:M.y[1]+L,l:Math.max(d.cx-d.r-w.left,0),r:Math.max(w.right-(d.cx+d.r),0),b:Math.max(w.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-w.top,0),pad:5})}}))}));setTimeout((function(){d.selectAll("tspan").each((function(){var e=n.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:k,transformInsideText:g,determineInsideTextFont:f,positionTitleOutside:b,prerenderTitles:m,layoutAreas:w,attachFxHandlers:h}},{"../../components/color":591,"../../components/drawing":612,"../../components/fx":629,"../../lib":716,"../../lib/svg_text_utils":740,"../../plots/plots":825,"./event_data":1096,"./helpers":1097,d3:164}],1102:[function(e,t,r){"use strict";var n=e("d3"),a=e("./style_one");t.exports=function(e){e._fullLayout._pielayer.selectAll(".trace").each((function(e){var t=e[0].trace,r=n.select(this);r.style({opacity:t.opacity}),r.selectAll("path.surface").each((function(e){n.select(this).call(a,e,t)}))}))}},{"./style_one":1103,d3:164}],1103:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("./helpers").castOption;t.exports=function(e,t,r){var i=r.marker.line,o=a(i.color,t.pts)||n.defaultLine,s=a(i.width,t.pts)||0;e.style("stroke-width",s).call(n.fill,t.color).call(n.stroke,o)}},{"../../components/color":591,"./helpers":1097}],1104:[function(e,t,r){"use strict";var n=e("../scatter/attributes");t.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},{"../scatter/attributes":1118}],1105:[function(e,t,r){"use strict";var n=e("gl-pointcloud2d"),a=e("../../lib/str2rgbarray"),i=e("../../plots/cartesian/autorange").findExtremes,o=e("../scatter/get_trace_color");function s(e,t){this.scene=e,this.uid=t,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(e){var t=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},l.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=o(e,{})},l.updateFast=function(e){var t,r,n,o,s,l,c=this.xData=this.pickXData=e.x,u=this.yData=this.pickYData=e.y,d=this.pickXYData=e.xy,p=e.xbounds&&e.ybounds,h=e.indices,f=this.bounds;if(d){if(n=d,t=d.length>>>1,p)f[0]=e.xbounds[0],f[2]=e.xbounds[1],f[1]=e.ybounds[0],f[3]=e.ybounds[1];else for(l=0;l<t;l++)o=n[2*l],s=n[2*l+1],o<f[0]&&(f[0]=o),o>f[2]&&(f[2]=o),s<f[1]&&(f[1]=s),s>f[3]&&(f[3]=s);if(h)r=h;else for(r=new Int32Array(t),l=0;l<t;l++)r[l]=l}else for(t=c.length,n=new Float32Array(2*t),r=new Int32Array(t),l=0;l<t;l++)o=c[l],s=u[l],r[l]=l,n[2*l]=o,n[2*l+1]=s,o<f[0]&&(f[0]=o),o>f[2]&&(f[2]=o),s<f[1]&&(f[1]=s),s>f[3]&&(f[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var m=a(e.marker.color),g=a(e.marker.border.color),v=e.opacity*e.marker.opacity;m[3]*=v,this.pointcloudOptions.color=m;var y=e.marker.blend;null===y&&(y=c.length<100||u.length<100),this.pointcloudOptions.blend=y,g[3]*=v,this.pointcloudOptions.borderColor=g;var b=e.marker.sizemin,_=Math.max(e.marker.sizemax,e.marker.sizemin);this.pointcloudOptions.sizeMin=b,this.pointcloudOptions.sizeMax=_,this.pointcloudOptions.areaRatio=e.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var x=this.scene.xaxis,w=this.scene.yaxis,k=_/2||.5;e._extremes[x._id]=i(x,[f[0],f[2]],{ppad:k}),e._extremes[w._id]=i(w,[f[1],f[3]],{ppad:k})},l.dispose=function(){this.pointcloud.dispose()},t.exports=function(e,t){var r=new s(e,t.uid);return r.update(t),r}},{"../../lib/str2rgbarray":739,"../../plots/cartesian/autorange":763,"../scatter/get_trace_color":1128,"gl-pointcloud2d":294}],1106:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes");t.exports=function(e,t,r){function i(r,i){return n.coerce(e,t,a,r,i)}i("x"),i("y"),i("xbounds"),i("ybounds"),e.xy&&e.xy instanceof Float32Array&&(t.xy=e.xy),e.indices&&e.indices instanceof Int32Array&&(t.indices=e.indices),i("text"),i("marker.color",r),i("marker.opacity"),i("marker.blend"),i("marker.sizemin"),i("marker.sizemax"),i("marker.border.color",r),i("marker.border.arearatio"),t._length=null}},{"../../lib":716,"./attributes":1104}],1107:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("../scatter3d/calc"),plot:e("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:e("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":802,"../scatter3d/calc":1146,"./attributes":1104,"./convert":1105,"./defaults":1106}],1108:[function(e,t,r){"use strict";var n=e("../../plots/font_attributes"),a=e("../../plots/attributes"),i=e("../../components/color/attributes"),o=e("../../components/fx/attributes"),s=e("../../plots/domain").attributes,l=e("../../plots/template_attributes").hovertemplateAttrs,c=e("../../components/colorscale/attributes"),u=e("../../plot_api/plot_template").templatedArray,d=e("../../lib/extend").extendFlat,p=e("../../plot_api/edit_types").overrideAll;e("../../constants/docs").FORMAT_LINK,(t.exports=p({hoverinfo:d({},a.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s"},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},line:{color:{valType:"color",dflt:i.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]})},link:{label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},line:{color:{valType:"color",dflt:i.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:d(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":590,"../../components/colorscale/attributes":598,"../../components/fx/attributes":621,"../../constants/docs":687,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plot_api/plot_template":754,"../../plots/attributes":761,"../../plots/domain":789,"../../plots/font_attributes":790,"../../plots/template_attributes":840}],1109:[function(e,t,r){"use strict";var n=e("../../plot_api/edit_types").overrideAll,a=e("../../plots/get_data").getModuleCalcData,i=e("./plot"),o=e("../../components/fx/layout_attributes"),s=e("../../lib/setcursor"),l=e("../../components/dragelement"),c=e("../../plots/cartesian/select").prepSelect,u=e("../../lib"),d=e("../../registry");function p(e,t){var r=e._fullData[t],n=e._fullLayout,a=n.dragmode,i="pan"===n.dragmode?"move":"crosshair",o=r._bgRect;if("pan"!==a&&"zoom"!==a){s(o,i);var p={_id:"x",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},h={_id:"y",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},f={gd:e,element:o.node(),plotinfo:{id:t,xaxis:p,yaxis:h,fillRangeItems:u.noop},subplot:t,xaxes:[p],yaxes:[h],doneFnCompleted:function(r){var n,a=e._fullData[t],i=a.node.groups.slice(),o=[];function s(e){for(var t=a._sankey.graph.nodes,r=0;r<t.length;r++)if(t[r].pointNumber===e)return t[r]}for(var l=0;l<r.length;l++){var c=s(r[l].pointNumber);if(c)if(c.group){for(var u=0;u<c.childrenNodes.length;u++)o.push(c.childrenNodes[u].pointNumber);i[c.pointNumber-a.node._count]=!1}else o.push(c.pointNumber)}n=i.filter(Boolean).concat([o]),d.call("_guiRestyle",e,{"node.groups":[n]},t)},prepFn:function(e,t,r){c(e,t,r,f,a)}};l.init(f)}}r.name="sankey",r.baseLayoutAttrOverrides=n({hoverlabel:o.hoverlabel},"plot","nested"),r.plot=function(e){var t=a(e.calcdata,"sankey")[0];i(e,t),r.updateFx(e)},r.clean=function(e,t,r,n){var a=n._has&&n._has("sankey"),i=t._has&&t._has("sankey");a&&!i&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())},r.updateFx=function(e){for(var t=0;t<e._fullData.length;t++)p(e,t)}},{"../../components/dragelement":609,"../../components/fx/layout_attributes":630,"../../lib":716,"../../lib/setcursor":736,"../../plot_api/edit_types":747,"../../plots/cartesian/select":781,"../../plots/get_data":799,"../../registry":845,"./plot":1114}],1110:[function(e,t,r){"use strict";var n=e("strongly-connected-components"),a=e("../../lib"),i=e("../../lib/gup").wrap,o=a.isArrayOrTypedArray,s=a.isIndex,l=e("../../components/colorscale");function c(e){var t,r=e.node,i=e.link,c=[],u=o(i.color),d={},p={},h=i.colorscales.length;for(t=0;t<h;t++){var f=i.colorscales[t],m=l.extractScale(f,{cLetter:"c"}),g=l.makeColorScaleFunc(m);p[f.label]=g}var v=0;for(t=0;t<i.value.length;t++)i.source[t]>v&&(v=i.source[t]),i.target[t]>v&&(v=i.target[t]);var y,b=v+1;e.node._count=b;var _=e.node.groups,x={};for(t=0;t<_.length;t++){var w=_[t];for(y=0;y<w.length;y++){var k=w[y],M=b+t;x.hasOwnProperty(k)?a.warn("Node "+k+" is already part of a group."):x[k]=M}}var T={source:[],target:[]};for(t=0;t<i.value.length;t++){var C=i.value[t],S=i.source[t],L=i.target[t];if(C>0&&s(S,b)&&s(L,b)&&(!x.hasOwnProperty(S)||!x.hasOwnProperty(L)||x[S]!==x[L])){x.hasOwnProperty(L)&&(L=x[L]),x.hasOwnProperty(S)&&(S=x[S]),L=+L,d[S=+S]=d[L]=!0;var A="";i.label&&i.label[t]&&(A=i.label[t]);var E=null;A&&p.hasOwnProperty(A)&&(E=p[A]),c.push({pointNumber:t,label:A,color:u?i.color[t]:i.color,concentrationscale:E,source:S,target:L,value:+C}),T.source.push(S),T.target.push(L)}}var D=b+_.length,I=o(r.color),P=[];for(t=0;t<D;t++)if(d[t]){var O=r.label[t];P.push({group:t>b-1,childrenNodes:[],pointNumber:t,label:O,color:I?r.color[t]:r.color})}var R=!1;return function(e,t,r){for(var i=a.init2dArray(e,0),o=0;o<Math.min(t.length,r.length);o++)if(a.isIndex(t[o],e)&&a.isIndex(r[o],e)){if(t[o]===r[o])return!0;i[t[o]].push(r[o])}return n(i).components.some((function(e){return e.length>1}))}(D,T.source,T.target)&&(R=!0),{circular:R,links:c,nodes:P,groups:_,groupLookup:x}}t.exports=function(e,t){var r=c(t);return i({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{"../../components/colorscale":603,"../../lib":716,"../../lib/gup":714,"strongly-connected-components":528}],1111:[function(e,t,r){"use strict";t.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeCapture:"node-capture",nodeCentered:"node-entered",nodeLabelGuide:"node-label-guide",nodeLabel:"node-label",nodeLabelTextPath:"node-label-text-path"}}},{}],1112:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../components/color"),o=e("tinycolor2"),s=e("../../plots/domain").defaults,l=e("../../components/fx/hoverlabel_defaults"),c=e("../../plot_api/plot_template"),u=e("../../plots/array_container_defaults");function d(e,t){function r(r,i){return n.coerce(e,t,a.link.colorscales,r,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}t.exports=function(e,t,r,p){function h(r,i){return n.coerce(e,t,a,r,i)}var f=n.extendDeep(p.hoverlabel,e.hoverlabel),m=e.node,g=c.newContainer(t,"node");function v(e,t){return n.coerce(m,g,a.node,e,t)}v("label"),v("groups"),v("x"),v("y"),v("pad"),v("thickness"),v("line.color"),v("line.width"),v("hoverinfo",e.hoverinfo),l(m,g,v,f),v("hovertemplate");var y=p.colorway;v("color",g.label.map((function(e,t){return i.addOpacity(function(e){return y[e%y.length]}(t),.8)})));var b=e.link||{},_=c.newContainer(t,"link");function x(e,t){return n.coerce(b,_,a.link,e,t)}x("label"),x("source"),x("target"),x("value"),x("line.color"),x("line.width"),x("hoverinfo",e.hoverinfo),l(b,_,x,f),x("hovertemplate");var w,k=o(p.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";x("color",n.repeat(k,_.value.length)),u(b,_,{name:"colorscales",handleItemDefaults:d}),s(t,p,h),h("orientation"),h("valueformat"),h("valuesuffix"),g.x.length&&g.y.length&&(w="freeform"),h("arrangement",w),n.coerceFont(h,"textfont",n.extendFlat({},p.font)),t._length=null}},{"../../components/color":591,"../../components/fx/hoverlabel_defaults":628,"../../lib":716,"../../plot_api/plot_template":754,"../../plots/array_container_defaults":760,"../../plots/domain":789,"./attributes":1108,tinycolor2:535}],1113:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),moduleType:"trace",name:"sankey",basePlotModule:e("./base_plot"),selectPoints:e("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":1108,"./base_plot":1109,"./calc":1110,"./defaults":1112,"./plot":1114,"./select.js":1116}],1114:[function(e,t,r){"use strict";var n=e("d3"),a=e("./render"),i=e("../../components/fx"),o=e("../../components/color"),s=e("../../lib"),l=e("./constants").cn,c=s._;function u(e){return""!==e}function d(e,t){return e.filter((function(e){return e.key===t.traceId}))}function p(e,t){n.select(e).select("path").style("fill-opacity",t),n.select(e).select("rect").style("fill-opacity",t)}function h(e){n.select(e).select("text.name").style("fill","black")}function f(e){return function(t){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(e){return function(t){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(e,t,r){t&&r&&d(r,t).selectAll("."+l.sankeyLink).filter(f(t)).call(y.bind(0,t,r,!1))}function v(e,t,r){t&&r&&d(r,t).selectAll("."+l.sankeyLink).filter(f(t)).call(b.bind(0,t,r,!1))}function y(e,t,r,n){var a=n.datum().link.label;n.style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),a&&d(t,e).selectAll("."+l.sankeyLink).filter((function(e){return e.link.label===a})).style("fill-opacity",(function(e){if(!e.link.concentrationscale)return.4})),r&&d(t,e).selectAll("."+l.sankeyNode).filter(m(e)).call(g)}function b(e,t,r,n){var a=n.datum().link.label;n.style("fill-opacity",(function(e){return e.tinyColorAlpha})),a&&d(t,e).selectAll("."+l.sankeyLink).filter((function(e){return e.link.label===a})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),r&&d(t,e).selectAll(l.sankeyNode).filter(m(e)).call(v)}function _(e,t){var r=e.hoverlabel||{},n=s.nestedProperty(r,t).get();return!Array.isArray(n)&&n}t.exports=function(e,t){for(var r=e._fullLayout,s=r._paper,d=r._size,f=0;f<e._fullData.length;f++)if(e._fullData[f].visible&&e._fullData[f].type===l.sankey&&!e._fullData[f]._viewInitial){var m=e._fullData[f].node;e._fullData[f]._viewInitial={node:{groups:m.groups.slice(),x:m.x.slice(),y:m.y.slice()}}}var x=c(e,"source:")+" ",w=c(e,"target:")+" ",k=c(e,"concentration:")+" ",M=c(e,"incoming flow count:")+" ",T=c(e,"outgoing flow count:")+" ";a(e,s,t,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{linkEvents:{hover:function(t,r,a){!1!==e._fullLayout.hovermode&&(n.select(t).call(y.bind(0,r,a,!0)),"skip"!==r.link.trace.link.hoverinfo&&(r.link.fullData=r.link.trace,e.emit("plotly_hover",{event:n.event,points:[r.link]})))},follow:function(t,a){if(!1!==e._fullLayout.hovermode){var s=a.link.trace.link;if("none"!==s.hoverinfo&&"skip"!==s.hoverinfo){for(var l=[],c=0,d=0;d<a.flow.links.length;d++){var f=a.flow.links[d];if("closest"!==e._fullLayout.hovermode||a.link.pointNumber===f.pointNumber){a.link.pointNumber===f.pointNumber&&(c=d),f.fullData=f.trace,s=a.link.trace.link;var m=v(f),g={valueLabel:n.format(a.valueFormat)(f.value)+a.valueSuffix};l.push({x:m[0],y:m[1],name:g.valueLabel,text:[f.label||"",x+f.source.label,w+f.target.label,f.concentrationscale?k+n.format("%0.2f")(f.flow.labelConcentration):""].filter(u).join("<br>"),color:_(s,"bgcolor")||o.addOpacity(f.color,1),borderColor:_(s,"bordercolor"),fontFamily:_(s,"font.family"),fontSize:_(s,"font.size"),fontColor:_(s,"font.color"),nameLength:_(s,"namelength"),textAlign:_(s,"align"),idealAlign:n.event.x<m[0]?"right":"left",hovertemplate:s.hovertemplate,hovertemplateLabels:g,eventData:[f]})}}i.loneHover(l,{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,anchorIndex:c}).each((function(){a.link.concentrationscale||p(this,.65),h(this)}))}}function v(e){var t,r;return e.circular?(t=(e.circularPathData.leftInnerExtent+e.circularPathData.rightInnerExtent)/2+a.parent.translateX,r=e.circularPathData.verticalFullExtent+a.parent.translateY):(t=(e.source.x1+e.target.x0)/2+a.parent.translateX,r=(e.y0+e.y1)/2+a.parent.translateY),[t,r]}},unhover:function(t,a,o){!1!==e._fullLayout.hovermode&&(n.select(t).call(b.bind(0,a,o,!0)),"skip"!==a.link.trace.link.hoverinfo&&(a.link.fullData=a.link.trace,e.emit("plotly_unhover",{event:n.event,points:[a.link]})),i.loneUnhover(r._hoverlayer.node()))},select:function(t,r){var a=r.link;a.originalEvent=n.event,e._hoverdata=[a],i.click(e,{target:!0})}},nodeEvents:{hover:function(t,r,a){!1!==e._fullLayout.hovermode&&(n.select(t).call(g,r,a),"skip"!==r.node.trace.node.hoverinfo&&(r.node.fullData=r.node.trace,e.emit("plotly_hover",{event:n.event,points:[r.node]})))},follow:function(t,a){if(!1!==e._fullLayout.hovermode){var o=a.node.trace.node;if("none"!==o.hoverinfo&&"skip"!==o.hoverinfo){var s=n.select(t).select("."+l.nodeRect),c=e._fullLayout._paperdiv.node().getBoundingClientRect(),d=s.node().getBoundingClientRect(),f=d.left-2-c.left,m=d.right+2-c.left,g=d.top+d.height/4-c.top,v={valueLabel:n.format(a.valueFormat)(a.node.value)+a.valueSuffix};a.node.fullData=a.node.trace;var y=i.loneHover({x0:f,x1:m,y:g,name:n.format(a.valueFormat)(a.node.value)+a.valueSuffix,text:[a.node.label,M+a.node.targetLinks.length,T+a.node.sourceLinks.length].filter(u).join("<br>"),color:_(o,"bgcolor")||a.tinyColorHue,borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:v,eventData:[a.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e});p(y,.85),h(y)}}},unhover:function(t,a,o){!1!==e._fullLayout.hovermode&&(n.select(t).call(v,a,o),"skip"!==a.node.trace.node.hoverinfo&&(a.node.fullData=a.node.trace,e.emit("plotly_unhover",{event:n.event,points:[a.node]})),i.loneUnhover(r._hoverlayer.node()))},select:function(t,r,a){var o=r.node;o.originalEvent=n.event,e._hoverdata=[o],n.select(t).call(v,r,a),i.click(e,{target:!0})}}})}},{"../../components/color":591,"../../components/fx":629,"../../lib":716,"./constants":1111,"./render":1115,d3:164}],1115:[function(e,t,r){"use strict";var n=e("./constants"),a=e("d3"),i=e("tinycolor2"),o=e("../../components/color"),s=e("../../components/drawing"),l=e("@plotly/d3-sankey"),c=e("@plotly/d3-sankey-circular"),u=e("d3-force"),d=e("../../lib"),p=e("../../lib/gup"),h=p.keyFun,f=p.repeat,m=p.unwrap,g=e("d3-interpolate").interpolateNumber,v=e("../../registry");function y(e,t,r){var a,o=m(t),s=o.trace,u=s.domain,p="h"===s.orientation,h=s.node.pad,f=s.node.thickness,g=e.width*(u.x[1]-u.x[0]),v=e.height*(u.y[1]-u.y[0]),y=o._nodes,b=o._links,_=o.circular;(a=_?c.sankeyCircular().circularLinkGap(0):l.sankey()).iterations(n.sankeyIterations).size(p?[g,v]:[v,g]).nodeWidth(f).nodePadding(h).nodeId((function(e){return e.pointNumber})).nodes(y).links(b);var x,w,k,M=a();for(var T in a.nodePadding()<h&&d.warn("node.pad was reduced to ",a.nodePadding()," to fit within the figure."),o._groupLookup){var C,S=parseInt(o._groupLookup[T]);for(x=0;x<M.nodes.length;x++)if(M.nodes[x].pointNumber===S){C=M.nodes[x];break}if(C){var L={pointNumber:parseInt(T),x0:C.x0,x1:C.x1,y0:C.y0,y1:C.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};M.nodes.unshift(L),C.childrenNodes.unshift(L)}}if(function(){for(x=0;x<M.nodes.length;x++){var e,t,r=M.nodes[x],n={};for(w=0;w<r.targetLinks.length;w++)e=(t=r.targetLinks[w]).source.pointNumber+":"+t.target.pointNumber,n.hasOwnProperty(e)||(n[e]=[]),n[e].push(t);var a=Object.keys(n);for(w=0;w<a.length;w++){var o=n[e=a[w]],s=0,l={};for(k=0;k<o.length;k++)l[(t=o[k]).label]||(l[t.label]=0),l[t.label]+=t.value,s+=t.value;for(k=0;k<o.length;k++)(t=o[k]).flow={value:s,labelConcentration:l[t.label]/s,concentration:t.value/s,links:o},t.concentrationscale&&(t.color=i(t.concentrationscale(t.flow.labelConcentration)))}var c=0;for(w=0;w<r.sourceLinks.length;w++)c+=r.sourceLinks[w].value;for(w=0;w<r.sourceLinks.length;w++)(t=r.sourceLinks[w]).concentrationOut=t.value/c;var u=0;for(w=0;w<r.targetLinks.length;w++)u+=r.targetLinks[w].value;for(w=0;w<r.targetLinks.length;w++)(t=r.targetLinks[w]).concenrationIn=t.value/u}}(),s.node.x.length&&s.node.y.length){for(x=0;x<Math.min(s.node.x.length,s.node.y.length,M.nodes.length);x++)if(s.node.x[x]&&s.node.y[x]){var A=[s.node.x[x]*g,s.node.y[x]*v];M.nodes[x].x0=A[0]-f/2,M.nodes[x].x1=A[0]+f/2;var E=M.nodes[x].y1-M.nodes[x].y0;M.nodes[x].y0=A[1]-E/2,M.nodes[x].y1=A[1]+E/2}"snap"===s.arrangement&&function(e){e.forEach((function(e){var t,r,n,a=0,i=e.length;for(e.sort((function(e,t){return e.y0-t.y0})),n=0;n<i;++n)(t=e[n]).y0>=a||(r=a-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),a=t.y1+h}))}(function(e){var t,r,n=e.map((function(e,t){return{x0:e.x0,index:t}})).sort((function(e,t){return e.x0-t.x0})),a=[],i=-1,o=-1/0;for(x=0;x<n.length;x++){var s=e[n[x].index];s.x0>o+f&&(i+=1,t=s.x0),o=s.x0,a[i]||(a[i]=[]),a[i].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return a}(y=M.nodes)),a.update(M)}return{circular:_,key:r,trace:s,guid:d.randstr(),horizontal:p,width:g,height:v,nodePad:s.node.pad,nodeLineColor:s.node.line.color,nodeLineWidth:s.node.line.width,linkLineColor:s.link.line.color,linkLineWidth:s.link.line.width,valueFormat:s.valueformat,valueSuffix:s.valuesuffix,textFont:s.textfont,translateX:u.x[0]*e.width+e.margin.l,translateY:e.height-u.y[1]*e.height+e.margin.t,dragParallel:p?v:g,dragPerpendicular:p?g:v,arrangement:s.arrangement,sankey:a,graph:M,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function b(e,t,r){var n=i(t.color),a=t.source.label+"|"+t.target.label+"__"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:a,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:_,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function _(){var e=.5;return function(t){if(t.link.circular)return r=t.link,n=r.width/2,a=r.circularPathData,"top"===r.circularLinkType?"M "+a.targetX+" "+(a.targetY+n)+" L"+a.rightInnerExtent+" "+(a.targetY+n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 1 "+(a.rightFullExtent-n)+" "+(a.targetY-a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 1 "+a.rightInnerExtent+" "+(a.verticalFullExtent-n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY-a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.leftInnerExtent+" "+(a.sourceY-n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 0 "+(a.leftFullExtent-n)+" "+(a.sourceY-a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"L"+a.rightInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 0 "+(a.rightFullExtent+n)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n)+" "+(a.targetY-a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 0 "+a.rightInnerExtent+" "+(a.targetY-n)+"L"+a.targetX+" "+(a.targetY-n)+"Z":"M "+a.targetX+" "+(a.targetY-n)+" L"+a.rightInnerExtent+" "+(a.targetY-n)+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n)+" "+(a.targetY+a.rightSmallArcRadius)+"L"+(a.rightFullExtent-n)+" "+a.verticalRightInnerExtent+"A"+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+a.rightInnerExtent+" "+(a.verticalFullExtent+n)+"L"+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent+"L"+(a.leftFullExtent+n)+" "+(a.sourceY+a.leftSmallArcRadius)+"A"+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY-n)+"L"+a.sourceX+" "+(a.sourceY+n)+"L"+a.leftInnerExtent+" "+(a.sourceY+n)+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n)+" "+(a.sourceY+a.leftSmallArcRadius)+"L"+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent+"A"+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+"L"+a.rightInnerExtent+" "+(a.verticalFullExtent-n)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n)+" "+a.verticalRightInnerExtent+"L"+(a.rightFullExtent+n)+" "+(a.targetY+a.rightSmallArcRadius)+"A"+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+a.rightInnerExtent+" "+(a.targetY+n)+"L"+a.targetX+" "+(a.targetY+n)+"Z";var r,n,a,i=t.link.source.x1,o=t.link.target.x0,s=g(i,o),l=s(e),c=s(1-e),u=t.link.y0-t.link.width/2,d=t.link.y0+t.link.width/2,p=t.link.y1-t.link.width/2,h=t.link.y1+t.link.width/2;return"M"+i+","+u+"C"+l+","+u+" "+c+","+p+" "+o+","+p+"L"+o+","+h+"C"+c+","+h+" "+l+","+d+" "+i+","+d+"Z"}}function x(e,t){var r=i(t.color),a=n.nodePadAcross,s=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var l=t.dx,c=Math.max(.5,t.dy),u="node_"+t.pointNumber;return t.group&&(u=d.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:u,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(l),visibleHeight:c,zoneX:-a,zoneY:-s,zoneWidth:l+2*a,zoneHeight:c+2*s,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:o.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,u].join("_"),interactionState:e.interactionState,figure:e}}function w(e){e.attr("transform",(function(e){return"translate("+e.node.x0.toFixed(3)+", "+e.node.y0.toFixed(3)+")"}))}function k(e){e.call(w)}function M(e,t){e.call(k),t.attr("d",_())}function T(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function C(e){return e.link.width>1||e.linkLineWidth>0}function S(e){return"translate("+e.translateX+","+e.translateY+")"+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function L(e){return"translate("+(e.horizontal?0:e.labelY)+" "+(e.horizontal?e.labelY:0)+")"}function A(e){return a.svg.line()([[e.horizontal?e.left?-e.sizeAcross:e.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[e.horizontal?e.left?-n.nodeTextOffsetHorizontal:e.sizeAcross:e.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function E(e){return e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function D(e){return e.horizontal?"scale(1 1)":"scale(-1 1)"}function I(e){return e.darkBackground&&!e.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function P(e){return e.horizontal&&e.left?"100%":"0%"}function O(e,t,r){e.on(".basic",null).on("mouseover.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)}))}function R(e,t,r,i){var o=a.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(a){if("fixed"!==a.arrangement&&(d.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(e){i._fullLayout._dragCover=e})),d.raiseToTop(this),a.interactionState.dragInProgress=a.node,z(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),"snap"===a.arrangement)){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(e,t,r,a){!function(e){for(var t=0;t<e.length;t++)e[t].y=(e[t].y0+e[t].y1)/2,e[t].x=(e[t].x0+e[t].x1)/2}(r.graph.nodes);var i=r.graph.nodes.filter((function(e){return e.originalX===r.node.originalX})).filter((function(e){return!e.partOfGroup}));r.forceLayouts[t]=u.forceSimulation(i).alphaDecay(0).force("collide",u.forceCollide().radius((function(e){return e.dy/2+r.nodePad/2})).strength(1).iterations(n.forceIterations)).force("constrain",function(e,t,r,a){return function(){for(var e=0,i=0;i<r.length;i++){var o=r[i];o===a.interactionState.dragInProgress?(o.x=o.lastDraggedX,o.y=o.lastDraggedY):(o.vx=(o.originalX-o.x)/n.forceTicksPerFrame,o.y=Math.min(a.size-o.dy/2,Math.max(o.dy/2,o.y))),e=Math.max(e,Math.abs(o.vx),Math.abs(o.vy))}!a.interactionState.dragInProgress&&e<.1&&a.forceLayouts[t].alpha()>0&&a.forceLayouts[t].alpha(0)}}(0,t,i,r)).stop()}(0,o,a),function(e,t,r,a,i){window.requestAnimationFrame((function o(){var s;for(s=0;s<n.forceTicksPerFrame;s++)r.forceLayouts[a].tick();if(function(e){for(var t=0;t<e.length;t++)e[t].y0=e[t].y-e[t].dy/2,e[t].y1=e[t].y0+e[t].dy,e[t].x0=e[t].x-e[t].dx/2,e[t].x1=e[t].x0+e[t].dx}(r.graph.nodes),r.sankey.update(r.graph),M(e.filter(N(r)),t),r.forceLayouts[a].alpha()>0)window.requestAnimationFrame(o);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,F(r,i)}}))}(e,t,a,o,i)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=a.event.x,i=a.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),z(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),M(e.filter(N(r)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;t<e.node.childrenNodes.length;t++)e.node.childrenNodes[t].x=e.node.x,e.node.childrenNodes[t].y=e.node.y;"snap"!==e.arrangement&&F(e,i)}}));e.on(".drag",null).call(o)}function F(e,t){for(var r=[],n=[],a=0;a<e.graph.nodes.length;a++){var i=(e.graph.nodes[a].x0+e.graph.nodes[a].x1)/2,o=(e.graph.nodes[a].y0+e.graph.nodes[a].y1)/2;r.push(i/e.figure.width),n.push(o/e.figure.height)}v.call("_guiRestyle",t,{"node.x":[r],"node.y":[n]},e.trace.index).then((function(){t._fullLayout._dragCover&&t._fullLayout._dragCover.remove()}))}function z(e){e.lastDraggedX=e.x0+e.dx/2,e.lastDraggedY=e.y0+e.dy/2}function N(e){return function(t){return t.node.originalX===e.node.originalX}}t.exports=function(e,t,r,l,c){var u=!1;d.ensureSingle(e._fullLayout._infolayer,"g","first-render",(function(){u=!0}));var p=e._fullLayout._dragCover,g=r.filter((function(e){return m(e).trace.visible})).map(y.bind(null,l)),v=t.selectAll("."+n.cn.sankey).data(g,h);v.exit().remove(),v.enter().append("g").classed(n.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events","auto").attr("transform",S),v.each((function(t,r){e._fullData[r]._sankey=t;var n="bgsankey-"+t.trace.uid+"-"+r;d.ensureSingle(e._fullLayout._draggers,"rect",n),e._fullData[r]._bgRect=a.select("."+n),e._fullData[r]._bgRect.style("pointer-events","all").attr("width",t.width).attr("height",t.height).attr("x",t.translateX).attr("y",t.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})})),v.transition().ease(n.ease).duration(n.duration).attr("transform",S);var k=v.selectAll("."+n.cn.sankeyLinks).data(f,h);k.enter().append("g").classed(n.cn.sankeyLinks,!0).style("fill","none");var M=k.selectAll("."+n.cn.sankeyLink).data((function(e){return e.graph.links.filter((function(e){return e.value})).map(b.bind(null,e))}),h);M.enter().append("path").classed(n.cn.sankeyLink,!0).call(O,v,c.linkEvents),M.style("stroke",(function(e){return C(e)?o.tinyRGB(i(e.linkLineColor)):e.tinyColorHue})).style("stroke-opacity",(function(e){return C(e)?o.opacity(e.linkLineColor):e.tinyColorAlpha})).style("fill",(function(e){return e.tinyColorHue})).style("fill-opacity",(function(e){return e.tinyColorAlpha})).style("stroke-width",(function(e){return C(e)?e.linkLineWidth:1})).attr("d",_()),M.style("opacity",(function(){return e._context.staticPlot||u||p?1:0})).transition().ease(n.ease).duration(n.duration).style("opacity",1),M.exit().transition().ease(n.ease).duration(n.duration).style("opacity",0).remove();var F=v.selectAll("."+n.cn.sankeyNodeSet).data(f,h);F.enter().append("g").classed(n.cn.sankeyNodeSet,!0),F.style("cursor",(function(e){switch(e.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}}));var z=F.selectAll("."+n.cn.sankeyNode).data((function(e){var t=e.graph.nodes;return function(e){var t,r=[];for(t=0;t<e.length;t++)e[t].originalX=(e[t].x0+e[t].x1)/2,e[t].originalY=(e[t].y0+e[t].y1)/2,-1===r.indexOf(e[t].originalX)&&r.push(e[t].originalX);for(r.sort((function(e,t){return e-t})),t=0;t<e.length;t++)e[t].originalLayerIndex=r.indexOf(e[t].originalX),e[t].originalLayer=e[t].originalLayerIndex/(r.length-1)}(t),t.map(x.bind(null,e))}),h);z.enter().append("g").classed(n.cn.sankeyNode,!0).call(w).style("opacity",(function(t){return!e._context.staticPlot&&!u||t.partOfGroup?0:1})),z.call(O,v,c.nodeEvents).call(R,M,c,e),z.transition().ease(n.ease).duration(n.duration).call(w).style("opacity",(function(e){return e.partOfGroup?0:1})),z.exit().transition().ease(n.ease).duration(n.duration).style("opacity",0).remove();var N=z.selectAll("."+n.cn.nodeRect).data(f);N.enter().append("rect").classed(n.cn.nodeRect,!0).call(T),N.style("stroke-width",(function(e){return e.nodeLineWidth})).style("stroke",(function(e){return o.tinyRGB(i(e.nodeLineColor))})).style("stroke-opacity",(function(e){return o.opacity(e.nodeLineColor)})).style("fill",(function(e){return e.tinyColorHue})).style("fill-opacity",(function(e){return e.tinyColorAlpha})),N.transition().ease(n.ease).duration(n.duration).call(T);var j=z.selectAll("."+n.cn.nodeCapture).data(f);j.enter().append("rect").classed(n.cn.nodeCapture,!0).style("fill-opacity",0),j.attr("x",(function(e){return e.zoneX})).attr("y",(function(e){return e.zoneY})).attr("width",(function(e){return e.zoneWidth})).attr("height",(function(e){return e.zoneHeight}));var B=z.selectAll("."+n.cn.nodeCentered).data(f);B.enter().append("g").classed(n.cn.nodeCentered,!0).attr("transform",L),B.transition().ease(n.ease).duration(n.duration).attr("transform",L);var Y=B.selectAll("."+n.cn.nodeLabelGuide).data(f);Y.enter().append("path").classed(n.cn.nodeLabelGuide,!0).attr("id",(function(e){return e.uniqueNodeLabelPathId})).attr("d",A).attr("transform",E),Y.transition().ease(n.ease).duration(n.duration).attr("d",A).attr("transform",E);var H=B.selectAll("."+n.cn.nodeLabel).data(f);H.enter().append("text").classed(n.cn.nodeLabel,!0).attr("transform",D).style("user-select","none").style("cursor","default").style("fill","black"),H.style("text-shadow",(function(e){return e.horizontal?"-1px 1px 1px #fff, 1px 1px 1px #fff, 1px -1px 1px #fff, -1px -1px 1px #fff":"none"})).each((function(e){s.font(H,e.textFont)})),H.transition().ease(n.ease).duration(n.duration).attr("transform",D);var V=H.selectAll("."+n.cn.nodeLabelTextPath).data(f);V.enter().append("textPath").classed(n.cn.nodeLabelTextPath,!0).attr("alignment-baseline","middle").attr("xlink:href",(function(e){return"#"+e.uniqueNodeLabelPathId})).attr("startOffset",P).style("fill",I),V.text((function(e){return e.horizontal||e.node.dy>5?e.node.label:""})).attr("text-anchor",(function(e){return e.horizontal&&e.left?"end":"start"})),V.transition().ease(n.ease).duration(n.duration).attr("startOffset",P).style("fill",I)}},{"../../components/color":591,"../../components/drawing":612,"../../lib":716,"../../lib/gup":714,"../../registry":845,"./constants":1111,"@plotly/d3-sankey":56,"@plotly/d3-sankey-circular":55,d3:164,"d3-force":157,"d3-interpolate":159,tinycolor2:535}],1116:[function(e,t,r){"use strict";t.exports=function(e,t){for(var r=[],n=e.cd[0].trace,a=n._sankey.graph.nodes,i=0;i<a.length;i++){var o=a[i];if(!o.partOfGroup){var s=[(o.x0+o.x1)/2,(o.y0+o.y1)/2];"v"===n.orientation&&s.reverse(),t&&t.contains(s,!1,i,e)&&r.push({pointNumber:o.pointNumber})}}return r}},{}],1117:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){for(var r=0;r<e.length;r++)e[r].i=r;n.mergeArray(t.text,e,"tx"),n.mergeArray(t.texttemplate,e,"txt"),n.mergeArray(t.hovertext,e,"htx"),n.mergeArray(t.customdata,e,"data"),n.mergeArray(t.textposition,e,"tp"),t.textfont&&(n.mergeArrayCastPositive(t.textfont.size,e,"ts"),n.mergeArray(t.textfont.color,e,"tc"),n.mergeArray(t.textfont.family,e,"tf"));var a=t.marker;if(a){n.mergeArrayCastPositive(a.size,e,"ms"),n.mergeArrayCastPositive(a.opacity,e,"mo"),n.mergeArray(a.symbol,e,"mx"),n.mergeArray(a.color,e,"mc");var i=a.line;a.line&&(n.mergeArray(i.color,e,"mlc"),n.mergeArrayCastPositive(i.width,e,"mlw"));var o=a.gradient;o&&"none"!==o.type&&(n.mergeArray(o.type,e,"mgt"),n.mergeArray(o.color,e,"mgc"))}}},{"../../lib":716}],1118:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").texttemplateAttrs,a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../components/colorscale/attributes"),o=e("../../plots/font_attributes"),s=e("../../components/drawing/attributes").dash,l=e("../../components/drawing"),c=e("./constants"),u=e("../../lib/extend").extendFlat;t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:n({},{}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:a({},{keys:c.eventDataKeys}),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:u({},s,{editType:"style"}),simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:{valType:"color",editType:"style",anim:!0},marker:u({symbol:{valType:"enumerated",values:l.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:u({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},i("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},i("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:o({editType:"calc",colorEditType:"style",arrayOk:!0}),r:{valType:"data_array",editType:"calc"},t:{valType:"data_array",editType:"calc"}}},{"../../components/colorscale/attributes":598,"../../components/drawing":612,"../../components/drawing/attributes":611,"../../lib/extend":707,"../../plots/font_attributes":790,"../../plots/template_attributes":840,"./constants":1122}],1119:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../plots/cartesian/axes"),o=e("../../constants/numerical").BADNUM,s=e("./subtypes"),l=e("./colorscale_calc"),c=e("./arrays_to_calcdata"),u=e("./calc_selection");function d(e,t,r,n,a,o,l){var c=t._length,u=e._fullLayout,d=r._id,p=n._id,h=u._firstScatter[f(t)]===t.uid,g=(m(t,u,r,n)||{}).orientation,v=t.fill;r._minDtick=0,n._minDtick=0;var y={padded:!0},b={padded:!0};l&&(y.ppad=b.ppad=l);var _=c<2||a[0]!==a[c-1]||o[0]!==o[c-1];_&&("tozerox"===v||"tonextx"===v&&(h||"h"===g))?y.tozero=!0:(t.error_y||{}).visible||"tonexty"!==v&&"tozeroy"!==v&&(s.hasMarkers(t)||s.hasText(t))||(y.padded=!1,y.ppad=0),_&&("tozeroy"===v||"tonexty"===v&&(h||"v"===g))?b.tozero=!0:"tonextx"!==v&&"tozerox"!==v||(b.padded=!1),d&&(t._extremes[d]=i.findExtremes(r,a,y)),p&&(t._extremes[p]=i.findExtremes(n,o,b))}function p(e,t){if(s.hasMarkers(e)){var r,n=e.marker,o=1.6*(e.marker.sizeref||1);if(r="area"===e.marker.sizemode?function(e){return Math.max(Math.sqrt((e||0)/o),3)}:function(e){return Math.max((e||0)/o,3)},a.isArrayOrTypedArray(n.size)){var l={type:"linear"};i.setConvert(l);for(var c=l.makeCalcdata(e.marker,"size"),u=new Array(t),d=0;d<t;d++)u[d]=r(c[d]);return u}return r(n.size)}}function h(e,t){var r=f(t),n=e._firstScatter;n[r]||(n[r]=t.uid)}function f(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?"-"+t:"")}function m(e,t,r,n){var a=e.stackgroup;if(a){var i=t._scatterStackOpts[r._id+n._id][a],o="v"===i.orientation?n:r;return"linear"===o.type||"log"===o.type?i:void 0}}t.exports={calc:function(e,t){var r,s,f,g,v,y,b=e._fullLayout,_=i.getFromId(e,t.xaxis||"x"),x=i.getFromId(e,t.yaxis||"y"),w=_.makeCalcdata(t,"x"),k=x.makeCalcdata(t,"y"),M=t._length,T=new Array(M),C=t.ids,S=m(t,b,_,x),L=!1;h(b,t);var A,E="x",D="y";for(S?(a.pushUnique(S.traceIndices,t._expandedIndex),(r="v"===S.orientation)?(D="s",A="x"):(E="s",A="y"),v="interpolate"===S.stackgaps):d(e,t,_,x,w,k,p(t,M)),s=0;s<M;s++){var I=T[s]={},P=n(w[s]),O=n(k[s]);P&&O?(I[E]=w[s],I[D]=k[s]):S&&(r?P:O)?(I[A]=r?w[s]:k[s],I.gap=!0,v?(I.s=o,L=!0):I.s=0):I[E]=I[D]=o,C&&(I.id=String(C[s]))}if(c(T,t),l(e,t),u(T,t),S){for(s=0;s<T.length;)T[s][A]===o?T.splice(s,1):s++;if(a.sort(T,(function(e,t){return e[A]-t[A]||e.i-t.i})),L){for(s=0;s<T.length-1&&T[s].gap;)s++;for((y=T[s].s)||(y=T[s].s=0),f=0;f<s;f++)T[f].s=y;for(g=T.length-1;g>s&&T[g].gap;)g--;for(y=T[g].s,f=T.length-1;f>g;f--)T[f].s=y;for(;s<g;)if(T[++s].gap){for(f=s+1;T[f].gap;)f++;for(var R=T[s-1][A],F=T[s-1].s,z=(T[f].s-F)/(T[f][A]-R);s<f;)T[s].s=F+(T[s][A]-R)*z,s++}}}return T},calcMarkerSize:p,calcAxisExpansion:d,setFirstScatter:h,getStackOpts:m}},{"../../constants/numerical":692,"../../lib":716,"../../plots/cartesian/axes":764,"./arrays_to_calcdata":1117,"./calc_selection":1120,"./colorscale_calc":1121,"./subtypes":1142,"fast-isnumeric":227}],1120:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(e,t)}},{"../../lib":716}],1121:[function(e,t,r){"use strict";var n=e("../../components/colorscale/helpers").hasColorscale,a=e("../../components/colorscale/calc"),i=e("./subtypes");t.exports=function(e,t){i.hasLines(t)&&n(t,"line")&&a(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(t)&&(n(t,"marker")&&a(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),n(t,"marker.line")&&a(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},{"../../components/colorscale/calc":599,"../../components/colorscale/helpers":602,"./subtypes":1142}],1122:[function(e,t,r){"use strict";t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},{}],1123:[function(e,t,r){"use strict";var n=e("./calc");function a(e,t,r,n,a,i,o){a[n]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,e.splice(t,0,s),t&&r===e[t-1][o]){var l=e[t-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else i&&(s.s=function(e,t,r,n){var a=e[t-1],i=e[t+1];return i?a?a.s+(i.s-a.s)*(r-a[n])/(i[n]-a[n]):i.s:a.s}(e,t,r,o));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}t.exports=function(e,t){var r=t.xaxis,i=t.yaxis,o=r._id+i._id,s=e._fullLayout._scatterStackOpts[o];if(s){var l,c,u,d,p,h,f,m,g,v,y,b,_,x,w,k=e.calcdata;for(var M in s){var T=(v=s[M]).traceIndices;if(T.length){for(y="interpolate"===v.stackgaps,b=v.groupnorm,"v"===v.orientation?(_="x",x="y"):(_="y",x="x"),w=new Array(T.length),l=0;l<w.length;l++)w[l]=!1;h=k[T[0]];var C=new Array(h.length);for(l=0;l<h.length;l++)C[l]=h[l][_];for(l=1;l<T.length;l++){for(p=k[T[l]],c=u=0;c<p.length;c++){for(f=p[c][_];f>C[u]&&u<C.length;u++)a(p,c,C[u],l,w,y,_),c++;if(f!==C[u]){for(d=0;d<l;d++)a(k[T[d]],u,f,d,w,y,_);C.splice(u,0,f)}u++}for(;u<C.length;u++)a(p,c,C[u],l,w,y,_),c++}var S=C.length;for(c=0;c<h.length;c++){for(m=h[c][x]=h[c].s,l=1;l<T.length;l++)(p=k[T[l]])[0].trace._rawLength=p[0].trace._length,p[0].trace._length=S,m+=p[c].s,p[c][x]=m;if(b)for(g=("fraction"===b?m:m/100)||1,l=0;l<T.length;l++){var L=k[T[l]][c];L[x]/=g,L.sNorm=L.s/g}}for(l=0;l<T.length;l++){var A=(p=k[T[l]])[0].trace,E=n.calcMarkerSize(A,A._rawLength),D=Array.isArray(E);if(E&&w[l]||D){var I=E;for(E=new Array(S),c=0;c<S;c++)E[c]=p[c].gap?0:D?I[p[c].i]:I}var P=new Array(S),O=new Array(S);for(c=0;c<S;c++)P[c]=p[c].x,O[c]=p[c].y;n.calcAxisExpansion(e,A,r,i,P,O,E),p[0].t.orientation=v.orientation}}}}}},{"./calc":1119}],1124:[function(e,t,r){"use strict";t.exports=function(e){for(var t=0;t<e.length;t++){var r=e[t];if("scatter"===r.type){var n=r.fill;if("none"!==n&&"toself"!==n&&(r.opacity=void 0,"tonexty"===n||"tonextx"===n))for(var a=t-1;a>=0;a--){var i=e[a];if("scatter"===i.type&&i.xaxis===r.xaxis&&i.yaxis===r.yaxis){i.opacity=void 0;break}}}}}},{}],1125:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("./constants"),s=e("./subtypes"),l=e("./xy_defaults"),c=e("./stack_defaults"),u=e("./marker_defaults"),d=e("./line_defaults"),p=e("./line_shape_defaults"),h=e("./text_defaults"),f=e("./fillcolor_defaults");t.exports=function(e,t,r,m){function g(r,a){return n.coerce(e,t,i,r,a)}var v=l(e,t,m,g);if(v||(t.visible=!1),t.visible){var y=c(e,t,m,g),b=!y&&v<o.PTS_LINESONLY?"lines+markers":"lines";g("text"),g("hovertext"),g("mode",b),s.hasLines(t)&&(d(e,t,r,m,g),p(e,t,g),g("connectgaps"),g("line.simplify")),s.hasMarkers(t)&&u(e,t,r,m,g,{gradient:!0}),s.hasText(t)&&(g("texttemplate"),h(e,t,m,g));var _=[];(s.hasMarkers(t)||s.hasText(t))&&(g("cliponaxis"),g("marker.maxdisplayed"),_.push("points")),g("fill",y?y.fillDflt:"none"),"none"!==t.fill&&(f(e,t,r,g),s.hasLines(t)||p(e,t,g));var x=(t.line||{}).color,w=(t.marker||{}).color;"tonext"!==t.fill&&"toself"!==t.fill||_.push("fills"),g("hoveron",_.join("+")||"points"),"fills"!==t.hoveron&&g("hovertemplate");var k=a.getComponentMethod("errorbars","supplyDefaults");k(e,t,x||w||r,{axis:"y"}),k(e,t,x||w||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,g)}}},{"../../lib":716,"../../registry":845,"./attributes":1118,"./constants":1122,"./fillcolor_defaults":1126,"./line_defaults":1131,"./line_shape_defaults":1133,"./marker_defaults":1137,"./stack_defaults":1140,"./subtypes":1142,"./text_defaults":1143,"./xy_defaults":1144}],1126:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../lib").isArrayOrTypedArray;t.exports=function(e,t,r,i){var o=!1;if(t.marker){var s=t.marker.color,l=(t.marker.line||{}).color;s&&!a(s)?o=s:l&&!a(l)&&(o=l)}i("fillcolor",n.addOpacity((t.line||{}).color||o||r,.5))}},{"../../components/color":591,"../../lib":716}],1127:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes");t.exports=function(e,t,r){var a={},i={_fullLayout:r},o=n.getFromTrace(i,t,"x"),s=n.getFromTrace(i,t,"y");return a.xLabel=n.tickText(o,e.x,!0).text,a.yLabel=n.tickText(s,e.y,!0).text,a}},{"../../plots/cartesian/axes":764}],1128:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("./subtypes");t.exports=function(e,t){var r,i;if("lines"===e.mode)return(r=e.line.color)&&n.opacity(r)?r:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var o=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(i=o&&n.opacity(o)?o:s&&n.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?n.opacity(i)<.3?n.addOpacity(i,.3):i:(r=(e.line||{}).color)&&n.opacity(r)&&a.hasLines(e)&&e.line.width?r:e.fillcolor}},{"../../components/color":591,"./subtypes":1142}],1129:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/fx"),i=e("../../registry"),o=e("./get_trace_color"),s=e("../../components/color"),l=n.fillText;t.exports=function(e,t,r,c){var u=e.cd,d=u[0].trace,p=e.xa,h=e.ya,f=p.c2p(t),m=h.c2p(r),g=[f,m],v=d.hoveron||"",y=-1!==d.mode.indexOf("markers")?3:.5;if(-1!==v.indexOf("points")){var b=function(e){var t=Math.max(y,e.mrc||0),r=p.c2p(e.x)-f,n=h.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-y/t)},_=a.getDistanceFunction(c,(function(e){var t=Math.max(3,e.mrc||0),r=1-1/t,n=Math.abs(p.c2p(e.x)-f);return n<t?r*n/t:n-t+r}),(function(e){var t=Math.max(3,e.mrc||0),r=1-1/t,n=Math.abs(h.c2p(e.y)-m);return n<t?r*n/t:n-t+r}),b);if(a.getClosest(u,_,e),!1!==e.index){var x=u[e.index],w=p.c2p(x.x,!0),k=h.c2p(x.y,!0),M=x.mrc||1;e.index=x.i;var T=u[0].t.orientation,C=T&&(x.sNorm||x.s),S="h"===T?C:x.x,L="v"===T?C:x.y;return n.extendFlat(e,{color:o(d,x),x0:w-M,x1:w+M,xLabelVal:S,y0:k-M,y1:k+M,yLabelVal:L,spikeDistance:b(x),hovertemplate:d.hovertemplate}),l(x,d,e),i.getComponentMethod("errorbars","hoverInfo")(x,d,e),[e]}}if(-1!==v.indexOf("fills")&&d._polygons){var A,E,D,I,P,O,R,F,z,N=d._polygons,j=[],B=!1,Y=1/0,H=-1/0,V=1/0,U=-1/0;for(A=0;A<N.length;A++)(D=N[A]).contains(g)&&(B=!B,j.push(D),V=Math.min(V,D.ymin),U=Math.max(U,D.ymax));if(B){var W=((V=Math.max(V,0))+(U=Math.min(U,h._length)))/2;for(A=0;A<j.length;A++)for(I=j[A].pts,E=1;E<I.length;E++)(F=I[E-1][1])>W!=(z=I[E][1])>=W&&(O=I[E-1][0],R=I[E][0],z-F&&(P=O+(R-O)*(W-F)/(z-F),Y=Math.min(Y,P),H=Math.max(H,P)));Y=Math.max(Y,0),H=Math.min(H,p._length);var G=s.defaultLine;return s.opacity(d.fillcolor)?G=d.fillcolor:s.opacity((d.line||{}).color)&&(G=d.line.color),n.extendFlat(e,{distance:e.maxHoverDistance,x0:Y,x1:H,y0:W,y1:W,color:G,hovertemplate:!1}),delete e.index,d.text&&!Array.isArray(d.text)?e.text=String(d.text):e.text=d.name,[e]}}}},{"../../components/color":591,"../../components/fx":629,"../../lib":716,"../../registry":845,"./get_trace_color":1128}],1130:[function(e,t,r){"use strict";var n=e("./subtypes");t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("./cross_trace_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./cross_trace_calc"),arraysToCalcdata:e("./arrays_to_calcdata"),plot:e("./plot"),colorbar:e("./marker_colorbar"),formatLabels:e("./format_labels"),style:e("./style").style,styleOnSelect:e("./style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"./arrays_to_calcdata":1117,"./attributes":1118,"./calc":1119,"./cross_trace_calc":1123,"./cross_trace_defaults":1124,"./defaults":1125,"./format_labels":1127,"./hover":1129,"./marker_colorbar":1136,"./plot":1138,"./select":1139,"./style":1141,"./subtypes":1142}],1131:[function(e,t,r){"use strict";var n=e("../../lib").isArrayOrTypedArray,a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults");t.exports=function(e,t,r,o,s,l){var c=(e.marker||{}).color;s("line.color",r),a(e,"line")?i(e,t,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r),s("line.width"),(l||{}).noDash||s("line.dash")}},{"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602,"../../lib":716}],1132:[function(e,t,r){"use strict";var n=e("../../constants/numerical"),a=n.BADNUM,i=n.LOG_CLIP,o=i+.5,s=i-.5,l=e("../../lib"),c=l.segmentsIntersect,u=l.constrain,d=e("./constants");t.exports=function(e,t){var r,n,i,p,h,f,m,g,v,y,b,_,x,w,k,M,T,C,S=t.xaxis,L=t.yaxis,A="log"===S.type,E="log"===L.type,D=S._length,I=L._length,P=t.connectGaps,O=t.baseTolerance,R=t.shape,F="linear"===R,z=t.fill&&"none"!==t.fill,N=[],j=d.minTolerance,B=e.length,Y=new Array(B),H=0;function V(r){var n=e[r];if(!n)return!1;var i=t.linearized?S.l2p(n.x):S.c2p(n.x),l=t.linearized?L.l2p(n.y):L.c2p(n.y);if(i===a){if(A&&(i=S.c2p(n.x,!0)),i===a)return!1;E&&l===a&&(i*=Math.abs(S._m*I*(S._m>0?o:s)/(L._m*D*(L._m>0?o:s)))),i*=1e3}if(l===a){if(E&&(l=L.c2p(n.y,!0)),l===a)return!1;l*=1e3}return[i,l]}function U(e,t,r,n){var a=r-e,i=n-t,o=.5-e,s=.5-t,l=a*a+i*i,c=a*o+i*s;if(c>0&&c<l){var u=o*i-s*a;if(u*u<l)return!0}}function W(e,t){var r=e[0]/D,n=e[1]/I,a=Math.max(0,-r,r-1,-n,n-1);return a&&void 0!==T&&U(r,n,T,C)&&(a=0),a&&t&&U(r,n,t[0]/D,t[1]/I)&&(a=0),(1+d.toleranceGrowth*a)*O}function G(e,t){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}var q,K,X,Z,J,$,Q,ee=d.maxScreensAway,te=-D*ee,re=D*(1+ee),ne=-I*ee,ae=I*(1+ee),ie=[[te,ne,re,ne],[re,ne,re,ae],[re,ae,te,ae],[te,ae,te,ne]];function oe(e){if(e[0]<te||e[0]>re||e[1]<ne||e[1]>ae)return[u(e[0],te,re),u(e[1],ne,ae)]}function se(e,t){return e[0]===t[0]&&(e[0]===te||e[0]===re)||e[1]===t[1]&&(e[1]===ne||e[1]===ae)||void 0}function le(e,t,r){return function(n,a){var i=oe(n),o=oe(a),s=[];if(i&&o&&se(i,o))return s;i&&s.push(i),o&&s.push(o);var c=2*l.constrain((n[e]+a[e])/2,t,r)-((i||n)[e]+(o||a)[e]);return c&&((i&&o?c>0==i[e]>o[e]?i:o:i||o)[e]+=c),s}}function ce(e){var t=e[0],r=e[1],n=t===Y[H-1][0],a=r===Y[H-1][1];if(!n||!a)if(H>1){var i=t===Y[H-2][0],o=r===Y[H-2][1];n&&(t===te||t===re)&&i?o?H--:Y[H-1]=e:a&&(r===ne||r===ae)&&o?i?H--:Y[H-1]=e:Y[H++]=e}else Y[H++]=e}function ue(e){Y[H-1][0]!==e[0]&&Y[H-1][1]!==e[1]&&ce([X,Z]),ce(e),J=null,X=Z=0}function de(e){if(T=e[0]/D,C=e[1]/I,q=e[0]<te?te:e[0]>re?re:0,K=e[1]<ne?ne:e[1]>ae?ae:0,q||K){if(H)if(J){var t=Q(J,e);t.length>1&&(ue(t[0]),Y[H++]=t[1])}else $=Q(Y[H-1],e)[0],Y[H++]=$;else Y[H++]=[q||e[0],K||e[1]];var r=Y[H-1];q&&K&&(r[0]!==q||r[1]!==K)?(J&&(X!==q&&Z!==K?ce(X&&Z?(n=J,i=(a=e)[0]-n[0],o=(a[1]-n[1])/i,(n[1]*a[0]-a[1]*n[0])/i>0?[o>0?te:re,ae]:[o>0?re:te,ne]):[X||q,Z||K]):X&&Z&&ce([X,Z])),ce([q,K])):X-q&&Z-K&&ce([q||X,K||Z]),J=e,X=q,Z=K}else J&&ue(Q(J,e)[0]),Y[H++]=e;var n,a,i,o}for("linear"===R||"spline"===R?Q=function(e,t){for(var r=[],n=0,a=0;a<4;a++){var i=ie[a],o=c(e[0],e[1],t[0],t[1],i[0],i[1],i[2],i[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&G(o,e)<G(r[0],e)?r.unshift(o):r.push(o),n++)}return r}:"hv"===R||"vh"===R?Q=function(e,t){var r=[],n=oe(e),a=oe(t);return n&&a&&se(n,a)?r:(n&&r.push(n),a&&r.push(a),r)}:"hvh"===R?Q=le(0,te,re):"vhv"===R&&(Q=le(1,ne,ae)),r=0;r<B;r++)if(n=V(r)){for(H=0,J=null,de(n),r++;r<B;r++){if(!(p=V(r))){if(P)continue;break}if(F&&t.simplify){var pe=V(r+1);if(y=G(p,n),z&&(0===H||H===B-1)||!(y<W(p,pe)*j)){for(g=[(p[0]-n[0])/y,(p[1]-n[1])/y],h=n,b=y,_=w=k=0,m=!1,i=p,r++;r<e.length;r++){if(f=pe,pe=V(r+1),!f){if(P)continue;break}if(M=(v=[f[0]-n[0],f[1]-n[1]])[0]*g[1]-v[1]*g[0],w=Math.min(w,M),(k=Math.max(k,M))-w>W(f,pe))break;i=f,(x=v[0]*g[0]+v[1]*g[1])>b?(b=x,p=f,m=!1):x<_&&(_=x,h=f,m=!0)}if(m?(de(p),i!==h&&de(h)):(h!==n&&de(h),i!==p&&de(p)),de(i),r>=e.length||!f)break;de(f),n=f}}else de(p)}J&&ce([X||J[0],Z||J[1]]),N.push(Y.slice(0,H))}return N}},{"../../constants/numerical":692,"../../lib":716,"./constants":1122}],1133:[function(e,t,r){"use strict";t.exports=function(e,t,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1134:[function(e,t,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};t.exports=function(e,t,r){var a,i,o,s,l,c={},u=!1,d=-1,p=0,h=-1;for(i=0;i<r.length;i++)(o=(a=r[i][0].trace).stackgroup||"")?o in c?l=c[o]:(l=c[o]=p,p++):a.fill in n&&h>=0?l=h:(l=h=p,p++),l<d&&(u=!0),a._groupIndex=d=l;var f=r.slice();u&&f.sort((function(e,t){var r=e[0].trace,n=t[0].trace;return r._groupIndex-n._groupIndex||r.index-n.index}));var m={};for(i=0;i<f.length;i++)o=(a=f[i][0].trace).stackgroup||"",!0===a.visible?(a._nexttrace=null,a.fill in n&&(s=m[o],a._prevtrace=s||null,s&&(s._nexttrace=a)),a._ownfill=a.fill&&("tozero"===a.fill.substr(0,6)||"toself"===a.fill||"to"===a.fill.substr(0,2)&&!a._prevtrace),m[o]=a):a._prevtrace=a._nexttrace=a._ownfill=null;return f}},{}],1135:[function(e,t,r){"use strict";var n=e("fast-isnumeric");t.exports=function(e){var t=e.marker,r=t.sizeref||1,a=t.sizemin||0,i="area"===t.sizemode?function(e){return Math.sqrt(e/r)}:function(e){return e/r};return function(e){var t=i(e/2);return n(t)&&t>0?Math.max(t,a):0}}},{"fast-isnumeric":227}],1136:[function(e,t,r){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1137:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/helpers").hasColorscale,i=e("../../components/colorscale/defaults"),o=e("./subtypes");t.exports=function(e,t,r,s,l,c){var u=o.isBubble(e),d=(e.line||{}).color;c=c||{},d&&(r=d),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),l("marker.color",r),a(e,"marker")&&i(e,t,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",d&&!Array.isArray(d)&&t.marker.color!==d?d:u?n.background:n.defaultLine),a(e,"marker.line")&&i(e,t,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},{"../../components/color":591,"../../components/colorscale/defaults":601,"../../components/colorscale/helpers":602,"./subtypes":1142}],1138:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../lib"),o=i.ensureSingle,s=i.identity,l=e("../../components/drawing"),c=e("./subtypes"),u=e("./line_points"),d=e("./link_traces"),p=e("../../lib/polygon").tester;function h(e,t,r,d,h,f,m){var g;!function(e,t,r,a,o){var s=r.xaxis,l=r.yaxis,u=n.extent(i.simpleMap(s.range,s.r2c)),d=n.extent(i.simpleMap(l.range,l.r2c)),p=a[0].trace;if(c.hasMarkers(p)){var h=p.marker.maxdisplayed;if(0!==h){var f=a.filter((function(e){return e.x>=u[0]&&e.x<=u[1]&&e.y>=d[0]&&e.y<=d[1]})),m=Math.ceil(f.length/h),g=0;o.forEach((function(e,r){var n=e[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r<t&&g++}));var v=Math.round(g*m/3+Math.floor(g/3)*m/7.1);a.forEach((function(e){delete e.vis})),f.forEach((function(e,t){0===Math.round((t+v)%m)&&(e.vis=!0)}))}}}(0,t,r,d,h);var v=!!m&&m.duration>0;function y(e){return v?e.transition():e}var b=r.xaxis,_=r.yaxis,x=d[0].trace,w=x.line,k=n.select(f),M=o(k,"g","errorbars"),T=o(k,"g","lines"),C=o(k,"g","points"),S=o(k,"g","text");if(a.getComponentMethod("errorbars","plot")(e,M,r,m),!0===x.visible){var L,A;y(k).style("opacity",x.opacity);var E=x.fill.charAt(x.fill.length-1);"x"!==E&&"y"!==E&&(E=""),d[0][r.isRangePlot?"nodeRangePlot3":"node3"]=k;var D,I,P="",O=[],R=x._prevtrace;R&&(P=R._prevRevpath||"",A=R._nextFill,O=R._polygons);var F,z,N,j,B,Y,H,V="",U="",W=[],G=i.noop;if(L=x._ownFill,c.hasLines(x)||"none"!==x.fill){for(A&&A.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(F=l.steps(w.shape),z=l.steps(w.shape.split("").reverse().join(""))):F=z="spline"===w.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?l.smoothclosed(e.slice(1),w.smoothing):l.smoothopen(e,w.smoothing)}:function(e){return"M"+e.join("L")},N=function(e){return z(e.reverse())},W=u(d,{xaxis:b,yaxis:_,connectGaps:x.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:x.fill}),H=x._polygons=new Array(W.length),g=0;g<W.length;g++)x._polygons[g]=p(W[g]);W.length&&(j=W[0][0],Y=(B=W[W.length-1])[B.length-1]),G=function(e){return function(t){if(D=F(t),I=N(t),V?E?(V+="L"+D.substr(1),U=I+"L"+U.substr(1)):(V+="Z"+D,U=I+"Z"+U):(V=D,U=I),c.hasLines(x)&&t.length>1){var r=n.select(this);if(r.datum(d),e)y(r.style("opacity",0).attr("d",D).call(l.lineGroupStyle)).style("opacity",1);else{var a=y(r);a.attr("d",D),l.singleLineStyle(d,a)}}}}}var q=T.selectAll(".js-line").data(W);y(q.exit()).style("opacity",0).remove(),q.each(G(!1)),q.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(G(!0)),l.setClipUrl(q,r.layerClipId,e),W.length?(L?(L.datum(d),j&&Y&&(E?("y"===E?j[1]=Y[1]=_.c2p(0,!0):"x"===E&&(j[0]=Y[0]=b.c2p(0,!0)),y(L).attr("d","M"+Y+"L"+j+"L"+V.substr(1)).call(l.singleFillStyle)):y(L).attr("d",V+"Z").call(l.singleFillStyle))):A&&("tonext"===x.fill.substr(0,6)&&V&&P?("tonext"===x.fill?y(A).attr("d",V+"Z"+P+"Z").call(l.singleFillStyle):y(A).attr("d",V+"L"+P.substr(1)+"Z").call(l.singleFillStyle),x._polygons=x._polygons.concat(O)):(X(A),x._polygons=null)),x._prevRevpath=U,x._prevPolygons=H):(L?X(L):A&&X(A),x._polygons=x._prevRevpath=x._prevPolygons=null),C.datum(d),S.datum(d),function(t,a,i){var o,u=i[0].trace,d=c.hasMarkers(u),p=c.hasText(u),h=ee(u),f=te,m=te;if(d||p){var g=s,x=u.stackgroup,w=x&&"infer zero"===e._fullLayout._scatterStackOpts[b._id+_._id][x].stackgaps;u.marker.maxdisplayed||u._needsCull?g=w?J:Z:x&&!w&&(g=$),d&&(f=g),p&&(m=g)}var k,M=(o=t.selectAll("path.point").data(f,h)).enter().append("path").classed("point",!0);v&&M.call(l.pointStyle,u,e).call(l.translatePoints,b,_).style("opacity",0).transition().style("opacity",1),o.order(),d&&(k=l.makePointStyleFns(u)),o.each((function(t){var a=n.select(this),i=y(a);l.translatePoint(t,i,b,_)?(l.singlePointStyle(t,i,u,k,e),r.layerClipId&&l.hideOutsideRangePoint(t,i,b,_,u.xcalendar,u.ycalendar),u.customdata&&a.classed("plotly-customdata",null!==t.data&&void 0!==t.data)):i.remove()})),v?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=a.selectAll("g").data(m,h)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(e){var t=n.select(this),a=y(t.select("text"));l.translatePoint(e,a,b,_)?r.layerClipId&&l.hideOutsideRangePoint(e,t,b,_,u.xcalendar,u.ycalendar):t.remove()})),o.selectAll("text").call(l.textPointStyle,u,e).each((function(e){var t=b.c2p(e.x),r=_.c2p(e.y);n.select(this).selectAll("tspan.line").each((function(){y(n.select(this)).attr({x:t,y:r})}))})),o.exit().remove()}(C,S,d);var K=!1===x.cliponaxis?null:r.layerClipId;l.setClipUrl(C,K,e),l.setClipUrl(S,K,e)}function X(e){y(e).attr("d","M0,0Z")}function Z(e){return e.filter((function(e){return!e.gap&&e.vis}))}function J(e){return e.filter((function(e){return e.vis}))}function $(e){return e.filter((function(e){return!e.gap}))}function Q(e){return e.id}function ee(e){if(e.ids)return Q}function te(){return!1}}t.exports=function(e,t,r,a,i,c){var u,p,f=!i,m=!!i&&i.duration>0,g=d(e,t,r);(u=a.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(e,t,r){t.each((function(t){var a=o(n.select(this),"g","fills");l.setClipUrl(a,r.layerClipId,e);var i=t[0].trace,c=[];i._ownfill&&c.push("_ownFill"),i._nexttrace&&c.push("_nextFill");var u=a.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(e){i[e]=null})).remove(),u.order().each((function(e){i[e]=o(n.select(this),"path","js-fill")}))}))}(e,u,t),m?(c&&(p=c()),n.transition().duration(i.duration).ease(i.easing).each("end",(function(){p&&p()})).each("interrupt",(function(){p&&p()})).each((function(){a.selectAll("g.trace").each((function(r,n){h(e,n,t,r,g,this,i)}))}))):u.each((function(r,n){h(e,n,t,r,g,this,i)})),f&&u.exit().remove(),a.selectAll("path:not([d])").remove()}},{"../../components/drawing":612,"../../lib":716,"../../lib/polygon":728,"../../registry":845,"./line_points":1132,"./link_traces":1134,"./subtypes":1142,d3:164}],1139:[function(e,t,r){"use strict";var n=e("./subtypes");t.exports=function(e,t){var r,a,i,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],d=s[0].trace;if(!n.hasMarkers(d)&&!n.hasText(d))return[];if(!1===t)for(r=0;r<s.length;r++)s[r].selected=0;else for(r=0;r<s.length;r++)a=s[r],i=l.c2p(a.x),o=c.c2p(a.y),null!==a.i&&t.contains([i,o],!1,r,e)?(u.push({pointNumber:a.i,x:l.c2d(a.x),y:c.c2d(a.y)}),a.selected=1):a.selected=0;return u}},{"./subtypes":1142}],1140:[function(e,t,r){"use strict";var n=["orientation","groupnorm","stackgaps"];t.exports=function(e,t,r,a){var i=r._scatterStackOpts,o=a("stackgroup");if(o){var s=t.xaxis+t.yaxis,l=i[s];l||(l=i[s]={});var c=l[o],u=!1;c?c.traces.push(t):(c=l[o]={traceIndices:[],traces:[t]},u=!0);for(var d={orientation:t.x&&!t.y?"h":"v"},p=0;p<n.length;p++){var h=n[p],f=h+"Found";if(!c[f]){var m=void 0!==e[h],g="orientation"===h;if((m||u)&&(c[h]=a(h,d[h]),g&&(c.fillDflt="h"===c[h]?"tonextx":"tonexty"),m&&(c[f]=!0,!u&&(delete c.traces[0][h],g))))for(var v=0;v<c.traces.length-1;v++){var y=c.traces[v];y._input.fill!==y.fill&&(y.fill=c.fillDflt)}}}return c}}},{}],1141:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../../registry");function o(e,t,r){a.pointStyle(e.selectAll("path.point"),t,r)}function s(e,t,r){a.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=n.select(e).selectAll("g.trace.scatter");t.style("opacity",(function(e){return e[0].trace.opacity})),t.selectAll("g.points").each((function(t){o(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.text").each((function(t){s(n.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.trace path.js-line").call(a.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(a.fillGroupStyle),i.getComponentMethod("errorbars","style")(t)},stylePoints:o,styleText:s,styleOnSelect:function(e,t,r){var n=t[0].trace;n.selectedpoints?(a.selectedPointStyle(r.selectAll("path.point"),n),a.selectedTextStyle(r.selectAll("text"),n)):(o(r,n,e),s(r,n,e))}}},{"../../components/drawing":612,"../../registry":845,d3:164}],1142:[function(e,t,r){"use strict";var n=e("../../lib");t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){return n.isPlainObject(e.marker)&&n.isArrayOrTypedArray(e.marker.size)}}},{"../../lib":716}],1143:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t,r,a,i){i=i||{},a("textposition"),n.coerceFont(a,"textfont",r.font),i.noSelect||(a("selected.textfont.color"),a("unselected.textfont.color"))}},{"../../lib":716}],1144:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry");t.exports=function(e,t,r,i){var o,s=i("x"),l=i("y");if(a.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],r),s){var c=n.minRowLength(s);l?o=Math.min(c,n.minRowLength(l)):(o=c,i("y0"),i("dy"))}else{if(!l)return 0;o=n.minRowLength(l),i("x0"),i("dx")}return t._length=o,o}},{"../../lib":716,"../../registry":845}],1145:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../components/colorscale/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/template_attributes").texttemplateAttrs,s=e("../../plots/attributes"),l=e("../../constants/gl3d_dashes"),c=e("../../constants/gl3d_markers"),u=e("../../lib/extend").extendFlat,d=e("../../plot_api/edit_types").overrideAll,p=n.line,h=n.marker,f=h.line,m=u({width:p.width,dash:{valType:"enumerated",values:Object.keys(l),dflt:"solid"}},a("line")),g=t.exports=d({x:n.x,y:n.y,z:{valType:"data_array"},text:u({},n.text,{}),texttemplate:o({},{}),hovertext:u({},n.hovertext,{}),hovertemplate:i(),mode:u({},n.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},y:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},z:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}},connectgaps:n.connectgaps,line:m,marker:u({symbol:{valType:"enumerated",values:Object.keys(c),dflt:"circle",arrayOk:!0},size:u({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:u({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:u({width:u({},f.width,{arrayOk:!1})},a("marker.line"))},a("marker")),textposition:u({},n.textposition,{dflt:"top center"}),textfont:{color:n.textfont.color,size:n.textfont.size,family:u({},n.textfont.family,{arrayOk:!1})},hoverinfo:u({},s.hoverinfo)},"calc","nested");g.x.editType=g.y.editType=g.z.editType="calc+clearAxisTypes"},{"../../components/colorscale/attributes":598,"../../constants/gl3d_dashes":689,"../../constants/gl3d_markers":690,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scatter/attributes":1118}],1146:[function(e,t,r){"use strict";var n=e("../scatter/arrays_to_calcdata"),a=e("../scatter/colorscale_calc");t.exports=function(e,t){var r=[{x:!1,y:!1,trace:t,t:{}}];return n(r,t),a(e,t),r}},{"../scatter/arrays_to_calcdata":1117,"../scatter/colorscale_calc":1121}],1147:[function(e,t,r){"use strict";var n=e("../../registry");function a(e,t,r,a){if(!t||!t.visible)return null;for(var i=n.getComponentMethod("errorbars","makeComputeError")(t),o=new Array(e.length),s=0;s<e.length;s++){var l=i(+e[s],s);if("log"===a.type){var c=a.c2l(e[s]),u=e[s]-l[0],d=e[s]+l[1];if(o[s]=[(a.c2l(u,!0)-c)*r,(a.c2l(d,!0)-c)*r],u>0){var p=a.c2l(u);a._lowerLogErrorBound||(a._lowerLogErrorBound=p),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,p)}}else o[s]=[-l[0]*r,l[1]*r]}return o}t.exports=function(e,t,r){var n=[a(e.x,e.error_x,t[0],r.xaxis),a(e.y,e.error_y,t[1],r.yaxis),a(e.z,e.error_z,t[2],r.zaxis)],i=function(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}(n);if(0===i)return null;for(var o=new Array(i),s=0;s<i;s++){for(var l=[[0,0,0],[0,0,0]],c=0;c<3;c++)if(n[c])for(var u=0;u<2;u++)l[u][c]=n[c][s][u];o[s]=l}return o}},{"../../registry":845}],1148:[function(e,t,r){"use strict";var n=e("gl-line3d"),a=e("gl-scatter3d"),i=e("gl-error3d"),o=e("gl-mesh3d"),s=e("delaunay-triangulate"),l=e("../../lib"),c=e("../../lib/str2rgbarray"),u=e("../../lib/gl_format_color").formatColor,d=e("../scatter/make_bubble_size_func"),p=e("../../constants/gl3d_dashes"),h=e("../../constants/gl3d_markers"),f=e("../../plots/cartesian/axes"),m=e("../../components/fx/helpers").appendArrayPointValue,g=e("./calc_errors");function v(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var y=v.prototype;function b(e){return null==e?0:e.indexOf("left")>-1?-1:e.indexOf("right")>-1?1:0}function _(e){return null==e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function x(e,t){return t(4*e)}function w(e){return h[e]}function k(e,t,r,n,a){var i=null;if(l.isArrayOrTypedArray(e)){i=[];for(var o=0;o<t;o++)void 0===e[o]?i[o]=n:i[o]=r(e[o],a)}else i=r(e,l.identity);return i}function M(e,t){var r,n,a,i,o,s,p=[],h=e.fullSceneLayout,v=e.dataScale,y=h.xaxis,M=h.yaxis,T=h.zaxis,C=t.marker,S=t.line,L=t.x||[],A=t.y||[],E=t.z||[],D=L.length,I=t.xcalendar,P=t.ycalendar,O=t.zcalendar;for(o=0;o<D;o++)r=y.d2l(L[o],0,I)*v[0],n=M.d2l(A[o],0,P)*v[1],a=T.d2l(E[o],0,O)*v[2],p[o]=[r,n,a];if(Array.isArray(t.text))s=t.text;else if(void 0!==t.text)for(s=new Array(D),o=0;o<D;o++)s[o]=t.text;function R(e,t){var r=h[e];return f.tickText(r,r.d2l(t),!0).text}var F=t.texttemplate;if(F){var z=e.fullLayout._d3locale,N=Array.isArray(F),j=N?Math.min(F.length,D):D,B=N?function(e){return F[e]}:function(){return F};for(s=new Array(j),o=0;o<j;o++){var Y={x:L[o],y:A[o],z:E[o]},H={xLabel:R("xaxis",L[o]),yLabel:R("yaxis",A[o]),zLabel:R("zaxis",E[o])},V={};m(V,t,o);var U=t._meta||{};s[o]=l.texttemplateString(B(o),H,z,V,Y,U)}}if(i={position:p,mode:t.mode,text:s},"line"in t&&(i.lineColor=u(S,1,D),i.lineWidth=S.width,i.lineDashes=S.dash),"marker"in t){var W=d(t);i.scatterColor=u(C,1,D),i.scatterSize=k(C.size,D,x,20,W),i.scatterMarker=k(C.symbol,D,w,"●"),i.scatterLineWidth=C.line.width,i.scatterLineColor=u(C.line,1,D),i.scatterAngle=0}"textposition"in t&&(i.textOffset=function(e){var t=[0,0];if(Array.isArray(e))for(var r=0;r<e.length;r++)t[r]=[0,0],e[r]&&(t[r][0]=b(e[r]),t[r][1]=_(e[r]));else t[0]=b(e),t[1]=_(e);return t}(t.textposition),i.textColor=u(t.textfont,1,D),i.textSize=k(t.textfont.size,D,l.identity,12),i.textFont=t.textfont.family,i.textAngle=0);var G=["x","y","z"];for(i.project=[!1,!1,!1],i.projectScale=[1,1,1],i.projectOpacity=[1,1,1],o=0;o<3;++o){var q=t.projection[G[o]];(i.project[o]=q.show)&&(i.projectOpacity[o]=q.opacity,i.projectScale[o]=q.scale)}i.errorBounds=g(t,v,h);var K=function(e){for(var t=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],n=[1,1,1],a=0;a<3;a++){var i=e[a];i&&!1!==i.copy_zstyle&&!1!==e[2].visible&&(i=e[2]),i&&i.visible&&(t[a]=i.width/2,r[a]=c(i.color),n[a]=i.thickness)}return{capSize:t,color:r,lineWidth:n}}([t.error_x,t.error_y,t.error_z]);return i.errorColor=K.color,i.errorLineWidth=K.lineWidth,i.errorCapSize=K.capSize,i.delaunayAxis=t.surfaceaxis,i.delaunayColor=c(t.surfacecolor),i}function T(e){if(Array.isArray(e)){var t=e[0];return Array.isArray(t)&&(e=t),"rgb("+e.slice(0,3).map((function(e){return Math.round(255*e)}))+")"}return null}y.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[t]||0===this.textLabels[t])&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}},y.update=function(e){var t,r,l,c,u=this.scene.glplot.gl,d=p.solid;this.data=e;var h=M(this.scene,e);"mode"in h&&(this.mode=h.mode),"lineDashes"in h&&h.lineDashes in p&&(d=p[h.lineDashes]),this.color=T(h.scatterColor)||T(h.lineColor),this.dataPoints=h.position,t={gl:this.scene.glplot.gl,position:h.position,color:h.lineColor,lineWidth:h.lineWidth||1,dashes:d[0],dashScale:d[1],opacity:e.opacity,connectGaps:e.connectgaps},-1!==this.mode.indexOf("lines")?this.linePlot?this.linePlot.update(t):(this.linePlot=n(t),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var f=e.opacity;if(e.marker&&e.marker.opacity&&(f*=e.marker.opacity),r={gl:this.scene.glplot.gl,position:h.position,color:h.scatterColor,size:h.scatterSize,glyph:h.scatterMarker,opacity:f,orthographic:!0,lineWidth:h.scatterLineWidth,lineColor:h.scatterLineColor,project:h.project,projectScale:h.projectScale,projectOpacity:h.projectOpacity},-1!==this.mode.indexOf("markers")?this.scatterPlot?this.scatterPlot.update(r):(this.scatterPlot=a(r),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),c={gl:this.scene.glplot.gl,position:h.position,glyph:h.text,color:h.textColor,size:h.textSize,angle:h.textAngle,alignment:h.textOffset,font:h.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:e.opacity},this.textLabels=e.hovertext||e.text,-1!==this.mode.indexOf("text")?this.textMarkers?this.textMarkers.update(c):(this.textMarkers=a(c),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),l={gl:this.scene.glplot.gl,position:h.position,color:h.errorColor,error:h.errorBounds,lineWidth:h.errorLineWidth,capSize:h.errorCapSize,opacity:e.opacity},this.errorBars?h.errorBounds?this.errorBars.update(l):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):h.errorBounds&&(this.errorBars=i(l),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),h.delaunayAxis>=0){var m=function(e,t,r){var n,a=(r+1)%3,i=(r+2)%3,o=[],l=[];for(n=0;n<e.length;++n){var c=e[n];!isNaN(c[a])&&isFinite(c[a])&&!isNaN(c[i])&&isFinite(c[i])&&(o.push([c[a],c[i]]),l.push(n))}var u=s(o);for(n=0;n<u.length;++n)for(var d=u[n],p=0;p<d.length;++p)d[p]=l[d[p]];return{positions:e,cells:u,meshColor:t}}(h.position,h.delaunayColor,h.delaunayAxis);m.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(m):(m.gl=u,this.delaunayMesh=o(m),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},y.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},t.exports=function(e,t){var r=new v(e,t.uid);return r.update(t),r}},{"../../components/fx/helpers":626,"../../constants/gl3d_dashes":689,"../../constants/gl3d_markers":690,"../../lib":716,"../../lib/gl_format_color":713,"../../lib/str2rgbarray":739,"../../plots/cartesian/axes":764,"../scatter/make_bubble_size_func":1135,"./calc_errors":1147,"delaunay-triangulate":166,"gl-error3d":249,"gl-line3d":257,"gl-mesh3d":282,"gl-scatter3d":299}],1149:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../scatter/subtypes"),o=e("../scatter/marker_defaults"),s=e("../scatter/line_defaults"),l=e("../scatter/text_defaults"),c=e("./attributes");t.exports=function(e,t,r,u){function d(r,n){return a.coerce(e,t,c,r,n)}if(function(e,t,r,a){var i=0,o=r("x"),s=r("y"),l=r("z");return n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],a),o&&s&&l&&(i=Math.min(o.length,s.length,l.length),t._length=t._xlength=t._ylength=t._zlength=i),i}(e,t,d,u)){d("text"),d("hovertext"),d("hovertemplate"),d("mode"),i.hasLines(t)&&(d("connectgaps"),s(e,t,r,u,d)),i.hasMarkers(t)&&o(e,t,r,u,d,{noSelect:!0}),i.hasText(t)&&(d("texttemplate"),l(e,t,u,d,{noSelect:!0}));var p=(t.line||{}).color,h=(t.marker||{}).color;d("surfaceaxis")>=0&&d("surfacecolor",p||h);for(var f=["x","y","z"],m=0;m<3;++m){var g="projection."+f[m];d(g+".show")&&(d(g+".opacity"),d(g+".scale"))}var v=n.getComponentMethod("errorbars","supplyDefaults");v(e,t,p||h||r,{axis:"z"}),v(e,t,p||h||r,{axis:"y",inherit:"z"}),v(e,t,p||h||r,{axis:"x",inherit:"z"})}else t.visible=!1}},{"../../lib":716,"../../registry":845,"../scatter/line_defaults":1131,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"./attributes":1145}],1150:[function(e,t,r){"use strict";t.exports={plot:e("./convert"),attributes:e("./attributes"),markerSymbols:e("../../constants/gl3d_markers"),supplyDefaults:e("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":690,"../../plots/gl3d":804,"./attributes":1145,"./calc":1146,"./convert":1148,"./defaults":1149}],1151:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../plots/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/template_attributes").texttemplateAttrs,s=e("../../components/colorscale/attributes"),l=e("../../lib/extend").extendFlat,c=n.marker,u=n.line,d=c.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:d.width,editType:"calc"},s("marker.line")),gradient:c.gradient,editType:"calc"},s("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},a.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:i()}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scatter/attributes":1118}],1152:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../scatter/colorscale_calc"),i=e("../scatter/arrays_to_calcdata"),o=e("../scatter/calc_selection"),s=e("../scatter/calc").calcMarkerSize,l=e("../carpet/lookup_carpetid");t.exports=function(e,t){var r=t._carpetTrace=l(e,t);if(r&&r.visible&&"legendonly"!==r.visible){var c;t.xaxis=r.xaxis,t.yaxis=r.yaxis;var u,d,p=t._length,h=new Array(p),f=!1;for(c=0;c<p;c++)if(u=t.a[c],d=t.b[c],n(u)&&n(d)){var m=r.ab2xy(+u,+d,!0),g=r.isVisible(+u,+d);g||(f=!0),h[c]={x:m[0],y:m[1],a:u,b:d,vis:g}}else h[c]={x:!1,y:!1};return t._needsCull=f,h[0].carpet=r,h[0].trace=t,s(t,p),a(e,t),i(h,t),o(h,t),h}}},{"../carpet/lookup_carpetid":914,"../scatter/arrays_to_calcdata":1117,"../scatter/calc":1119,"../scatter/calc_selection":1120,"../scatter/colorscale_calc":1121,"fast-isnumeric":227}],1153:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/constants"),i=e("../scatter/subtypes"),o=e("../scatter/marker_defaults"),s=e("../scatter/line_defaults"),l=e("../scatter/line_shape_defaults"),c=e("../scatter/text_defaults"),u=e("../scatter/fillcolor_defaults"),d=e("./attributes");t.exports=function(e,t,r,p){function h(r,a){return n.coerce(e,t,d,r,a)}h("carpet"),t.xaxis="x",t.yaxis="y";var f=h("a"),m=h("b"),g=Math.min(f.length,m.length);if(g){t._length=g,h("text"),h("texttemplate"),h("hovertext"),h("mode",g<a.PTS_LINESONLY?"lines+markers":"lines"),i.hasLines(t)&&(s(e,t,r,p,h),l(e,t,h),h("connectgaps")),i.hasMarkers(t)&&o(e,t,r,p,h,{gradient:!0}),i.hasText(t)&&c(e,t,p,h);var v=[];(i.hasMarkers(t)||i.hasText(t))&&(h("marker.maxdisplayed"),v.push("points")),h("fill"),"none"!==t.fill&&(u(e,t,r,h),i.hasLines(t)||l(e,t,h)),"tonext"!==t.fill&&"toself"!==t.fill||v.push("fills"),"fills"!==h("hoveron",v.join("+")||"points")&&h("hovertemplate"),n.coerceSelectionMarkerOpacity(t,h)}else t.visible=!1}},{"../../lib":716,"../scatter/constants":1122,"../scatter/fillcolor_defaults":1126,"../scatter/line_defaults":1131,"../scatter/line_shape_defaults":1133,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"./attributes":1151}],1154:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){var i=n[a];return e.a=i.a,e.b=i.b,e.y=i.y,e}},{}],1155:[function(e,t,r){"use strict";t.exports=function(e,t){var r={},n=t._carpet,a=n.ab2ij([e.a,e.b]),i=Math.floor(a[0]),o=a[0]-i,s=Math.floor(a[1]),l=a[1]-s,c=n.evalxy([],i,s,o,l);return r.yLabel=c[1].toFixed(3),r}},{}],1156:[function(e,t,r){"use strict";var n=e("../scatter/hover"),a=e("../../lib").fillText;t.exports=function(e,t,r,i){var o=n(e,t,r,i);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index){var l=1-s.y0/e.ya._length,c=e.xa._length,u=c*l/2,d=c-u;return s.x0=Math.max(Math.min(s.x0,d),u),s.x1=Math.max(Math.min(s.x1,d),u),o}var p=s.cd[s.index];s.a=p.a,s.b=p.b,s.xLabelVal=void 0,s.yLabelVal=void 0;var h=s.trace,f=h._carpet,m=h._module.formatLabels(p,h);s.yLabel=m.yLabel,delete s.text;var g=[];if(!h.hovertemplate){var v=(p.hi||h.hoverinfo).split("+");-1!==v.indexOf("all")&&(v=["a","b","text"]),-1!==v.indexOf("a")&&y(f.aaxis,p.a),-1!==v.indexOf("b")&&y(f.baxis,p.b),g.push("y: "+s.yLabel),-1!==v.indexOf("text")&&a(p,h,g),s.extraText=g.join("<br>")}return o}function y(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,g.push(r+": "+t.toFixed(3)+e.labelsuffix)}}},{"../../lib":716,"../scatter/hover":1129}],1157:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:e("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"../scatter/marker_colorbar":1136,"../scatter/select":1139,"../scatter/style":1141,"./attributes":1151,"./calc":1152,"./defaults":1153,"./event_data":1154,"./format_labels":1155,"./hover":1156,"./plot":1158}],1158:[function(e,t,r){"use strict";var n=e("../scatter/plot"),a=e("../../plots/cartesian/axes"),i=e("../../components/drawing");t.exports=function(e,t,r,o){var s,l,c,u=r[0][0].carpet,d={xaxis:a.getFromId(e,u.xaxis||"x"),yaxis:a.getFromId(e,u.yaxis||"y"),plot:t.plot};for(n(e,d,r,o),s=0;s<r.length;s++)l=r[s][0].trace,c=o.selectAll("g.trace"+l.uid+" .js-line"),i.setClipUrl(c,r[s][0].carpet._clipPathId,e)}},{"../../components/drawing":612,"../../plots/cartesian/axes":764,"../scatter/plot":1138}],1159:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,i=e("../scatter/attributes"),o=e("../../plots/attributes"),s=e("../../components/colorscale/attributes"),l=e("../../components/drawing/attributes").dash,c=e("../../lib/extend").extendFlat,u=e("../../plot_api/edit_types").overrideAll,d=i.marker,p=i.line,h=d.line;t.exports=u({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names"],dflt:"ISO-3"},mode:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:a({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:c({},i.hovertext,{}),textfont:i.textfont,textposition:i.textposition,line:{color:p.color,width:p.width,dash:l},connectgaps:i.connectgaps,marker:c({symbol:d.symbol,opacity:d.opacity,size:d.size,sizeref:d.sizeref,sizemin:d.sizemin,sizemode:d.sizemode,colorbar:d.colorbar,line:c({width:h.width},s("marker.line")),gradient:d.gradient},s("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:i.fillcolor,selected:i.selected,unselected:i.unselected,hoverinfo:c({},o.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:n()},"calc","nested")},{"../../components/colorscale/attributes":598,"../../components/drawing/attributes":611,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scatter/attributes":1118}],1160:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,i=e("../scatter/colorscale_calc"),o=e("../scatter/arrays_to_calcdata"),s=e("../scatter/calc_selection"),l=e("../../lib")._;t.exports=function(e,t){for(var r=Array.isArray(t.locations),c=r?t.locations.length:t._length,u=new Array(c),d=0;d<c;d++){var p=u[d]={};if(r){var h=t.locations[d];p.loc="string"==typeof h?h:null}else{var f=t.lon[d],m=t.lat[d];n(f)&&n(m)?p.lonlat=[+f,+m]:p.lonlat=[a,a]}}return o(u,t),i(e,t),s(u,t),c&&(u[0].t={labels:{lat:l(e,"lat:")+" ",lon:l(e,"lon:")+" "}}),u}},{"../../constants/numerical":692,"../../lib":716,"../scatter/arrays_to_calcdata":1117,"../scatter/calc_selection":1120,"../scatter/colorscale_calc":1121,"fast-isnumeric":227}],1161:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/subtypes"),i=e("../scatter/marker_defaults"),o=e("../scatter/line_defaults"),s=e("../scatter/text_defaults"),l=e("../scatter/fillcolor_defaults"),c=e("./attributes");t.exports=function(e,t,r,u){function d(r,a){return n.coerce(e,t,c,r,a)}!function(e,t,r){var n,a,i=0,o=r("locations");return o?(r("locationmode"),i=o.length):(n=r("lon")||[],a=r("lat")||[],i=Math.min(n.length,a.length),t._length=i,i)}(0,t,d)?t.visible=!1:(d("text"),d("hovertext"),d("hovertemplate"),d("mode"),a.hasLines(t)&&(o(e,t,r,u,d),d("connectgaps")),a.hasMarkers(t)&&i(e,t,r,u,d,{gradient:!0}),a.hasText(t)&&(d("texttemplate"),s(e,t,u,d)),d("fill"),"none"!==t.fill&&l(e,t,r,d),n.coerceSelectionMarkerOpacity(t,d))}},{"../../lib":716,"../scatter/fillcolor_defaults":1126,"../scatter/line_defaults":1131,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"./attributes":1159}],1162:[function(e,t,r){"use strict";t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null,e}},{}],1163:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes");t.exports=function(e,t,r){var a={},i=r[t.geo]._subplot.mockAxis,o=e.lonlat;return a.lonLabel=n.tickText(i,i.c2l(o[0]),!0).text,a.latLabel=n.tickText(i,i.c2l(o[1]),!0).text,a}},{"../../plots/cartesian/axes":764}],1164:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../constants/numerical").BADNUM,i=e("../scatter/get_trace_color"),o=e("../../lib").fillText,s=e("./attributes");t.exports=function(e,t,r){var l=e.cd,c=l[0].trace,u=e.xa,d=e.ya,p=e.subplot,h=p.projection.isLonLatOverEdges,f=p.project;if(n.getClosest(l,(function(e){var n=e.lonlat;if(n[0]===a)return 1/0;if(h(n))return 1/0;var i=f(n),o=f([t,r]),s=Math.abs(i[0]-o[0]),l=Math.abs(i[1]-o[1]),c=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(s*s+l*l)-c,1-3/c)}),e),!1!==e.index){var m=l[e.index],g=m.lonlat,v=[u.c2p(g),d.c2p(g)],y=m.mrc||1;e.x0=v[0]-y,e.x1=v[0]+y,e.y0=v[1]-y,e.y1=v[1]+y,e.loc=m.loc,e.lon=g[0],e.lat=g[1];var b={};b[c.geo]={_subplot:p};var _=c._module.formatLabels(m,c,b);return e.lonLabel=_.lonLabel,e.latLabel=_.latLabel,e.color=i(c,m),e.extraText=function(e,t,r,n){if(!e.hovertemplate){var a=t.hi||e.hoverinfo,i="all"===a?s.hoverinfo.flags:a.split("+"),l=-1!==i.indexOf("location")&&Array.isArray(e.locations),c=-1!==i.indexOf("lon"),u=-1!==i.indexOf("lat"),d=-1!==i.indexOf("text"),p=[];return l?p.push(t.loc):c&&u?p.push("("+h(r.lonLabel)+", "+h(r.latLabel)+")"):c?p.push(n.lon+h(r.lonLabel)):u&&p.push(n.lat+h(r.latLabel)),d&&o(t,e,p),p.join("<br>")}function h(e){return e+"°"}}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}},{"../../components/fx":629,"../../constants/numerical":692,"../../lib":716,"../scatter/get_trace_color":1128,"./attributes":1159}],1165:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:e("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":794,"../scatter/marker_colorbar":1136,"../scatter/style":1141,"./attributes":1159,"./calc":1160,"./defaults":1161,"./event_data":1162,"./format_labels":1163,"./hover":1164,"./plot":1166,"./select":1167,"./style":1168}],1166:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM,o=e("../../lib/topojson_utils").getTopojsonFeatures,s=e("../../lib/geo_location_utils").locationToFeature,l=e("../../lib/geojson_utils"),c=e("../scatter/subtypes"),u=e("./style");function d(e,t){var r=e[0].trace;if(Array.isArray(r.locations))for(var n=o(r,t),a=r.locationmode,l=0;l<e.length;l++){var c=e[l],u=s(a,c.loc,n);c.lonlat=u?u.properties.ct:[i,i]}}t.exports=function(e,t,r){for(var o=0;o<r.length;o++)d(r[o],t.topojson);function s(e,t){e.lonlat[0]===i&&n.select(t).remove()}var p=t.layers.frontplot.select(".scatterlayer"),h=a.makeTraceGroups(p,r,"trace scattergeo");h.selectAll("*").remove(),h.each((function(t){var r=n.select(this),i=t[0].trace;if(c.hasLines(i)||"none"!==i.fill){var o=l.calcTraceToLineCoords(t),d="none"!==i.fill?l.makePolygon(o):l.makeLine(o);r.selectAll("path.js-line").data([{geojson:d,trace:i}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}c.hasMarkers(i)&&r.selectAll("path.point").data(a.identity).enter().append("path").classed("point",!0).each((function(e){s(e,this)})),c.hasText(i)&&r.selectAll("g").data(a.identity).enter().append("g").append("text").each((function(e){s(e,this)})),u(e,t)}))}},{"../../constants/numerical":692,"../../lib":716,"../../lib/geo_location_utils":710,"../../lib/geojson_utils":711,"../../lib/topojson_utils":743,"../scatter/subtypes":1142,"./style":1168,d3:164}],1167:[function(e,t,r){"use strict";var n=e("../scatter/subtypes"),a=e("../../constants/numerical").BADNUM;t.exports=function(e,t){var r,i,o,s,l,c=e.cd,u=e.xaxis,d=e.yaxis,p=[],h=c[0].trace;if(!n.hasMarkers(h)&&!n.hasText(h))return[];if(!1===t)for(l=0;l<c.length;l++)c[l].selected=0;else for(l=0;l<c.length;l++)(i=(r=c[l]).lonlat)[0]!==a&&(o=u.c2p(i),s=d.c2p(i),t.contains([o,s],null,l,e)?(p.push({pointNumber:l,lon:i[0],lat:i[1]}),r.selected=1):r.selected=0);return p}},{"../../constants/numerical":692,"../scatter/subtypes":1142}],1168:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../../components/color"),o=e("../scatter/style"),s=o.stylePoints,l=o.styleText;t.exports=function(e,t){t&&function(e,t){var r=t[0].trace,o=t[0].node3;o.style("opacity",t[0].trace.opacity),s(o,r,e),l(o,r,e),o.selectAll("path.js-line").style("fill","none").each((function(e){var t=n.select(this),r=e.trace,o=r.line||{};t.call(i.stroke,o.color).call(a.dashLine,o.dash||"",o.width||0),"none"!==r.fill&&t.call(i.fill,r.fillcolor)}))}(e,t)}},{"../../components/color":591,"../../components/drawing":612,"../scatter/style":1141,d3:164}],1169:[function(e,t,r){"use strict";var n=e("../../plots/attributes"),a=e("../scatter/attributes"),i=e("../../components/colorscale/attributes"),o=e("../../lib/extend").extendFlat,s=e("../../plot_api/edit_types").overrideAll,l=e("./constants").DASHES,c=a.line,u=a.marker,d=u.line,p=t.exports=s({x:a.x,x0:a.x0,dx:a.dx,y:a.y,y0:a.y0,dy:a.dy,text:a.text,hovertext:a.hovertext,textposition:a.textposition,textfont:a.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:c.color,width:c.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:Object.keys(l),dflt:"solid"}},marker:o({},i("marker"),{symbol:u.symbol,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:o({},i("marker.line"),{width:d.width})}),connectgaps:a.connectgaps,fill:o({},a.fill,{dflt:"none"}),fillcolor:a.fillcolor,selected:{marker:a.selected.marker,textfont:a.selected.textfont},unselected:{marker:a.unselected.marker,textfont:a.unselected.textfont},opacity:n.opacity},"calc","nested");p.x.editType=p.y.editType=p.x0.editType=p.y0.editType="calc+clearAxisTypes",p.hovertemplate=a.hovertemplate,p.texttemplate=a.texttemplate},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../scatter/attributes":1118,"./constants":1171}],1170:[function(e,t,r){"use strict";var n=e("point-cluster"),a=e("../../lib"),i=e("../../plots/cartesian/axis_ids"),o=e("../../plots/cartesian/autorange").findExtremes,s=e("../scatter/calc"),l=s.calcMarkerSize,c=s.calcAxisExpansion,u=s.setFirstScatter,d=e("../scatter/colorscale_calc"),p=e("./convert"),h=e("./scene_update"),f=e("../../constants/numerical").BADNUM,m=e("./constants").TOO_MANY_POINTS;function g(e,t,r){var n=e._extremes[t._id],a=o(t,r._bnds,{padded:!0});n.min=n.min.concat(a.min),n.max=n.max.concat(a.max)}t.exports=function(e,t){var r,o,s,v=e._fullLayout,y=i.getFromId(e,t.xaxis),b=i.getFromId(e,t.yaxis),_=v._plots[t.xaxis+t.yaxis],x=t._length,w=x>=m,k=2*x,M={},T=t._x=y.makeCalcdata(t,"x"),C=t._y=b.makeCalcdata(t,"y"),S=new Array(k);for(r=0;r<x;r++)o=T[r],s=C[r],S[2*r]=o===f?NaN:o,S[2*r+1]=s===f?NaN:s;if("log"===y.type)for(r=0;r<k;r+=2)S[r]=y.c2l(S[r]);if("log"===b.type)for(r=1;r<k;r+=2)S[r]=b.c2l(S[r]);if(w&&"log"!==y.type&&"log"!==b.type)M.tree=n(S);else{var L=M.ids=new Array(x);for(r=0;r<x;r++)L[r]=r}d(e,t);var A,E=function(e,t,r,n,i,o){var s=p.style(e,r);if(s.marker&&(s.marker.positions=n),s.line&&n.length>1&&a.extendFlat(s.line,p.linePositions(e,r,n)),s.errorX||s.errorY){var l=p.errorBarPositions(e,r,n,i,o);s.errorX&&a.extendFlat(s.errorX,l.x),s.errorY&&a.extendFlat(s.errorY,l.y)}return s.text&&(a.extendFlat(s.text,{positions:n},p.textPosition(e,r,s.text,s.marker)),a.extendFlat(s.textSel,{positions:n},p.textPosition(e,r,s.text,s.markerSel)),a.extendFlat(s.textUnsel,{positions:n},p.textPosition(e,r,s.text,s.markerUnsel))),s}(e,0,t,S,T,C),D=h(e,_);return u(v,t),w?E.marker&&(A=2*(E.marker.sizeAvg||Math.max(E.marker.size,3))):A=l(t,x),c(e,t,y,b,T,C,A),E.errorX&&g(t,y,E.errorX),E.errorY&&g(t,b,E.errorY),E.fill&&!D.fill2d&&(D.fill2d=!0),E.marker&&!D.scatter2d&&(D.scatter2d=!0),E.line&&!D.line2d&&(D.line2d=!0),!E.errorX&&!E.errorY||D.error2d||(D.error2d=!0),E.text&&!D.glText&&(D.glText=!0),E.marker&&(E.marker.snap=x),D.lineOptions.push(E.line),D.errorXOptions.push(E.errorX),D.errorYOptions.push(E.errorY),D.fillOptions.push(E.fill),D.markerOptions.push(E.marker),D.markerSelectedOptions.push(E.markerSel),D.markerUnselectedOptions.push(E.markerUnsel),D.textOptions.push(E.text),D.textSelectedOptions.push(E.textSel),D.textUnselectedOptions.push(E.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),M._scene=D,M.index=D.count,M.x=T,M.y=C,M.positions=S,D.count++,[{x:!1,y:!1,t:M,trace:t}]}},{"../../constants/numerical":692,"../../lib":716,"../../plots/cartesian/autorange":763,"../../plots/cartesian/axis_ids":767,"../scatter/calc":1119,"../scatter/colorscale_calc":1121,"./constants":1171,"./convert":1172,"./scene_update":1179,"point-cluster":470}],1171:[function(e,t,r){"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],1172:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("svg-path-sdf"),i=e("color-normalize"),o=e("../../registry"),s=e("../../lib"),l=e("../../components/drawing"),c=e("../../plots/cartesian/axis_ids"),u=e("../../lib/gl_format_color").formatColor,d=e("../scatter/subtypes"),p=e("../scatter/make_bubble_size_func"),h=e("./constants"),f=e("../../constants/interactions").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},g=e("../../components/fx/helpers").appendArrayPointValue;function v(e,t){var r,a=e._fullLayout,i=t._length,o=t.textfont,l=t.textposition,c=Array.isArray(l)?l:[l],u=o.color,d=o.size,p=o.family,h={},f=t.texttemplate;if(f){h.text=[];var m=a._d3locale,v=Array.isArray(f),y=v?Math.min(f.length,i):i,b=v?function(e){return f[e]}:function(){return f};for(r=0;r<y;r++){var _={i:r},x=t._module.formatLabels(_,t,a),w={};g(w,t,r);var k=t._meta||{};h.text.push(s.texttemplateString(b(r),x,m,w,_,k))}}else Array.isArray(t.text)&&t.text.length<i?h.text=t.text.slice():h.text=t.text;if(Array.isArray(h.text))for(r=h.text.length;r<i;r++)h.text[r]="";for(h.opacity=t.opacity,h.font={},h.align=[],h.baseline=[],r=0;r<c.length;r++){var M=c[r].split(/\s+/);switch(M[1]){case"left":h.align.push("right");break;case"right":h.align.push("left");break;default:h.align.push(M[1])}switch(M[0]){case"top":h.baseline.push("bottom");break;case"bottom":h.baseline.push("top");break;default:h.baseline.push(M[0])}}if(Array.isArray(u))for(h.color=new Array(i),r=0;r<i;r++)h.color[r]=u[r];else h.color=u;if(Array.isArray(d)||Array.isArray(p))for(h.font=new Array(i),r=0;r<i;r++){var T=h.font[r]={};T.size=Array.isArray(d)?n(d[r])?d[r]:0:d,T.family=Array.isArray(p)?p[r]:p}else h.font={size:d,family:p};return h}function y(e){var t,r,n=e._length,a=e.marker,o={},l=Array.isArray(a.symbol),c=s.isArrayOrTypedArray(a.color),d=s.isArrayOrTypedArray(a.line.color),f=s.isArrayOrTypedArray(a.opacity),m=s.isArrayOrTypedArray(a.size),g=s.isArrayOrTypedArray(a.line.width);if(l||(r=h.OPEN_RE.test(a.symbol)),l||c||d||f){o.colors=new Array(n),o.borderColors=new Array(n);var v=u(a,a.opacity,n),y=u(a.line,a.opacity,n);if(!Array.isArray(y[0])){var b=y;for(y=Array(n),t=0;t<n;t++)y[t]=b}if(!Array.isArray(v[0])){var _=v;for(v=Array(n),t=0;t<n;t++)v[t]=_}for(o.colors=v,o.borderColors=y,t=0;t<n;t++){if(l){var x=a.symbol[t];r=h.OPEN_RE.test(x)}r&&(y[t]=v[t].slice(),v[t]=v[t].slice(),v[t][3]=0)}o.opacity=e.opacity}else r?(o.color=i(a.color,"uint8"),o.color[3]=0,o.borderColor=i(a.color,"uint8")):(o.color=i(a.color,"uint8"),o.borderColor=i(a.line.color,"uint8")),o.opacity=e.opacity*a.opacity;if(l)for(o.markers=new Array(n),t=0;t<n;t++)o.markers[t]=S(a.symbol[t]);else o.marker=S(a.symbol);var w,k=p(e);if(m||g){var M,T=o.sizes=new Array(n),C=o.borderSizes=new Array(n),L=0;if(m){for(t=0;t<n;t++)T[t]=k(a.size[t]),L+=T[t];M=L/n}else for(w=k(a.size),t=0;t<n;t++)T[t]=w;if(g)for(t=0;t<n;t++)C[t]=a.line.width[t]/2;else for(w=a.line.width/2,t=0;t<n;t++)C[t]=w;o.sizeAvg=M}else o.size=k(a&&a.size||10),o.borderSizes=k(a.line.width);return o}function b(e,t){var r=e.marker,n={};return t?(t.marker&&t.marker.symbol?n=y(s.extendFlat({},r,t.marker)):t.marker&&(t.marker.size&&(n.size=t.marker.size/2),t.marker.color&&(n.colors=t.marker.color),void 0!==t.marker.opacity&&(n.opacity=t.marker.opacity)),n):n}function _(e,t,r){var n={};if(!r)return n;if(r.textfont){var a={opacity:1,text:t.text,texttemplate:t.texttemplate,textposition:t.textposition,textfont:s.extendFlat({},t.textfont)};r.textfont&&s.extendFlat(a.textfont,r.textfont),n=v(e,a)}return n}function x(e,t){var r={capSize:2*t.width,lineWidth:t.thickness,color:t.color};return t.copy_ystyle&&(r=e.error_y),r}var w=h.SYMBOL_SDF_SIZE,k=h.SYMBOL_SIZE,M=h.SYMBOL_STROKE,T={},C=l.symbolFuncs[0](.05*k);function S(e){if("circle"===e)return null;var t,r,n=l.symbolNumber(e),i=l.symbolFuncs[n%100],o=!!l.symbolNoDot[n%100],s=!!l.symbolNoFill[n%100],c=h.DOT_RE.test(e);return T[e]?T[e]:(t=c&&!o?i(1.1*k)+C:i(k),r=a(t,{w:w,h:w,viewBox:[-k,-k,k,k],stroke:s?M:-M}),T[e]=r,r||null)}t.exports={style:function(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0};if(!0!==t.visible)return n;if(d.hasText(t)&&(n.text=v(e,t),n.textSel=_(e,t,t.selected),n.textUnsel=_(e,t,t.unselected)),d.hasMarkers(t)&&(n.marker=y(t),n.markerSel=b(t,t.selected),n.markerUnsel=b(t,t.unselected),!t.unselected&&Array.isArray(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r<a.length;r++)n.markerUnsel.opacity[r]=f*a[r]}if(d.hasLines(t)){n.line={overlay:!0,thickness:t.line.width,color:t.line.color,opacity:t.opacity};var i=(h.DASHES[t.line.dash]||[1]).slice();for(r=0;r<i.length;++r)i[r]*=t.line.width;n.line.dashes=i}return t.error_x&&t.error_x.visible&&(n.errorX=x(t,t.error_x)),t.error_y&&t.error_y.visible&&(n.errorY=x(t,t.error_y)),t.fill&&"none"!==t.fill&&(n.fill={closed:!0,fill:t.fillcolor,thickness:0}),n},markerStyle:y,markerSelection:b,linePositions:function(e,t,r){var n,a,i=r.length,o=i/2;if(d.hasLines(t)&&o)if("hv"===t.line.shape){for(n=[],a=0;a<o-1;a++)isNaN(r[2*a])||isNaN(r[2*a+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*a],r[2*a+1]),isNaN(r[2*a+2])||isNaN(r[2*a+3])?n.push(NaN,NaN):n.push(r[2*a+2],r[2*a+1]));n.push(r[i-2],r[i-1])}else if("hvh"===t.line.shape){for(n=[],a=0;a<o-1;a++)if(isNaN(r[2*a])||isNaN(r[2*a+1])||isNaN(r[2*a+2])||isNaN(r[2*a+3]))isNaN(r[2*a])||isNaN(r[2*a+1])?n.push(NaN,NaN):n.push(r[2*a],r[2*a+1]),n.push(NaN,NaN);else{var s=(r[2*a]+r[2*a+2])/2;n.push(r[2*a],r[2*a+1],s,r[2*a+1],s,r[2*a+3])}n.push(r[i-2],r[i-1])}else if("vhv"===t.line.shape){for(n=[],a=0;a<o-1;a++)if(isNaN(r[2*a])||isNaN(r[2*a+1])||isNaN(r[2*a+2])||isNaN(r[2*a+3]))isNaN(r[2*a])||isNaN(r[2*a+1])?n.push(NaN,NaN):n.push(r[2*a],r[2*a+1]),n.push(NaN,NaN);else{var l=(r[2*a+1]+r[2*a+3])/2;n.push(r[2*a],r[2*a+1],r[2*a],l,r[2*a+2],l)}n.push(r[i-2],r[i-1])}else if("vh"===t.line.shape){for(n=[],a=0;a<o-1;a++)isNaN(r[2*a])||isNaN(r[2*a+1])?n.push(NaN,NaN,NaN,NaN):(n.push(r[2*a],r[2*a+1]),isNaN(r[2*a+2])||isNaN(r[2*a+3])?n.push(NaN,NaN):n.push(r[2*a],r[2*a+3]));n.push(r[i-2],r[i-1])}else n=r;var c=!1;for(a=0;a<n.length;a++)if(isNaN(n[a])){c=!0;break}var u=c||n.length>h.TOO_MANY_POINTS?"rect":d.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var p=n[0],f=n[1];for(a=0;a<n.length;a+=2)isNaN(n[a])||isNaN(n[a+1])?(n[a]=p,n[a+1]=f):(p=n[a],f=n[a+1])}return{join:u,positions:n}},errorBarPositions:function(e,t,r,a,i){var s=o.getComponentMethod("errorbars","makeComputeError"),l=c.getFromId(e,t.xaxis),u=c.getFromId(e,t.yaxis),d=r.length/2,p={};function h(e,a){var i=a._id.charAt(0),o=t["error_"+i];if(o&&o.visible&&("linear"===a.type||"log"===a.type)){for(var l=s(o),c={x:0,y:1}[i],u={x:[0,1,2,3],y:[2,3,0,1]}[i],h=new Float64Array(4*d),f=1/0,m=-1/0,g=0,v=0;g<d;g++,v+=4){var y=e[g];if(n(y)){var b=r[2*g+c],_=l(y,g),x=_[0],w=_[1];if(n(x)&&n(w)){var k=y-x,M=y+w;h[v+u[0]]=b-a.c2l(k),h[v+u[1]]=a.c2l(M)-b,h[v+u[2]]=0,h[v+u[3]]=0,f=Math.min(f,y-x),m=Math.max(m,y+w)}}}p[i]={positions:r,errors:h,_bnds:[f,m]}}}return h(a,l),h(i,u),p},textPosition:function(e,t,r,n){var a,i=t._length,o={};if(d.hasMarkers(t)){var s=r.font,l=r.align,c=r.baseline;for(o.offset=new Array(i),a=0;a<i;a++){var u=n.sizes?n.sizes[a]:n.size,p=Array.isArray(s)?s[a].size:s.size,h=Array.isArray(l)?l.length>1?l[a]:l[0]:l,f=Array.isArray(c)?c.length>1?c[a]:c[0]:c,g=m[h],v=m[f],y=u?u/.8+1:0,b=-v*y-.5*v;o.offset[a]=[g*y/p,b/p]}}return o}}},{"../../components/drawing":612,"../../components/fx/helpers":626,"../../constants/interactions":691,"../../lib":716,"../../lib/gl_format_color":713,"../../plots/cartesian/axis_ids":767,"../../registry":845,"../scatter/make_bubble_size_func":1135,"../scatter/subtypes":1142,"./constants":1171,"color-normalize":121,"fast-isnumeric":227,"svg-path-sdf":533}],1173:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../registry"),i=e("./attributes"),o=e("../scatter/constants"),s=e("../scatter/subtypes"),l=e("../scatter/xy_defaults"),c=e("../scatter/marker_defaults"),u=e("../scatter/line_defaults"),d=e("../scatter/fillcolor_defaults"),p=e("../scatter/text_defaults");t.exports=function(e,t,r,h){function f(r,a){return n.coerce(e,t,i,r,a)}var m=!!e.marker&&/-open/.test(e.marker.symbol),g=s.isBubble(e),v=l(e,t,h,f);if(v){var y=v<o.PTS_LINESONLY?"lines+markers":"lines";f("text"),f("hovertext"),f("hovertemplate"),f("mode",y),s.hasLines(t)&&(f("connectgaps"),u(e,t,r,h,f),f("line.shape")),s.hasMarkers(t)&&(c(e,t,r,h,f),f("marker.line.width",m||g?1:0)),s.hasText(t)&&(f("texttemplate"),p(e,t,h,f));var b=(t.line||{}).color,_=(t.marker||{}).color;f("fill"),"none"!==t.fill&&d(e,t,r,f);var x=a.getComponentMethod("errorbars","supplyDefaults");x(e,t,b||_||r,{axis:"y"}),x(e,t,b||_||r,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}},{"../../lib":716,"../../registry":845,"../scatter/constants":1122,"../scatter/fillcolor_defaults":1126,"../scatter/line_defaults":1131,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"../scatter/xy_defaults":1144,"./attributes":1169}],1174:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../../constants/interactions").DESELECTDIM;t.exports={styleTextSelection:function(e){var t,r,o=e[0],s=o.trace,l=o.t,c=l._scene,u=l.index,d=c.selectBatch[u],p=c.unselectBatch[u],h=c.textOptions[u],f=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=n.extendFlat({},h);if(d.length||p.length){var v=f.color,y=m.color,b=h.color,_=Array.isArray(b);for(g.color=new Array(s._length),t=0;t<d.length;t++)r=d[t],g.color[r]=v||(_?b[r]:b);for(t=0;t<p.length;t++){r=p[t];var x=_?b[r]:b;g.color[r]=y||(v?x:a.addOpacity(x,i))}}c.glText[u].update(g)}}},{"../../components/color":591,"../../constants/interactions":691,"../../lib":716}],1175:[function(e,t,r){"use strict";var n=e("../scatter/format_labels");t.exports=function(e,t,r){var a=e.i;return"x"in e||(e.x=t._x[a]),"y"in e||(e.y=t._y[a]),n(e,t,r)}},{"../scatter/format_labels":1127}],1176:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../scatter/get_trace_color");function o(e,t,r,o){var s=e.xa,l=e.ya,c=e.distance,u=e.dxy,d=e.index,p={pointNumber:d,x:t[d],y:r[d]};p.tx=Array.isArray(o.text)?o.text[d]:o.text,p.htx=Array.isArray(o.hovertext)?o.hovertext[d]:o.hovertext,p.data=Array.isArray(o.customdata)?o.customdata[d]:o.customdata,p.tp=Array.isArray(o.textposition)?o.textposition[d]:o.textposition;var h=o.textfont;h&&(p.ts=Array.isArray(h.size)?h.size[d]:h.size,p.tc=Array.isArray(h.color)?h.color[d]:h.color,p.tf=Array.isArray(h.family)?h.family[d]:h.family);var f=o.marker;f&&(p.ms=a.isArrayOrTypedArray(f.size)?f.size[d]:f.size,p.mo=a.isArrayOrTypedArray(f.opacity)?f.opacity[d]:f.opacity,p.mx=Array.isArray(f.symbol)?f.symbol[d]:f.symbol,p.mc=a.isArrayOrTypedArray(f.color)?f.color[d]:f.color);var m=f&&f.line;m&&(p.mlc=Array.isArray(m.color)?m.color[d]:m.color,p.mlw=a.isArrayOrTypedArray(m.width)?m.width[d]:m.width);var g=f&&f.gradient;g&&"none"!==g.type&&(p.mgt=Array.isArray(g.type)?g.type[d]:g.type,p.mgc=Array.isArray(g.color)?g.color[d]:g.color);var v=s.c2p(p.x,!0),y=l.c2p(p.y,!0),b=p.mrc||1,_=o.hoverlabel;_&&(p.hbg=Array.isArray(_.bgcolor)?_.bgcolor[d]:_.bgcolor,p.hbc=Array.isArray(_.bordercolor)?_.bordercolor[d]:_.bordercolor,p.hts=Array.isArray(_.font.size)?_.font.size[d]:_.font.size,p.htc=Array.isArray(_.font.color)?_.font.color[d]:_.font.color,p.htf=Array.isArray(_.font.family)?_.font.family[d]:_.font.family,p.hnl=Array.isArray(_.namelength)?_.namelength[d]:_.namelength);var x=o.hoverinfo;x&&(p.hi=Array.isArray(x)?x[d]:x);var w=o.hovertemplate;w&&(p.ht=Array.isArray(w)?w[d]:w);var k={};k[e.index]=p;var M=a.extendFlat({},e,{color:i(o,p),x0:v-b,x1:v+b,xLabelVal:p.x,y0:y-b,y1:y+b,yLabelVal:p.y,cd:k,distance:c,spikeDistance:u,hovertemplate:p.ht});return p.htx?M.text=p.htx:p.tx?M.text=p.tx:o.text&&(M.text=o.text),a.fillText(p,o,M),n.getComponentMethod("errorbars","hoverInfo")(p,o,M),M}t.exports={hoverPoints:function(e,t,r,n){var a,i,s,l,c,u,d,p,h,f=e.cd,m=f[0].t,g=f[0].trace,v=e.xa,y=e.ya,b=m.x,_=m.y,x=v.c2p(t),w=y.c2p(r),k=e.distance;if(m.tree){var M=v.p2c(x-k),T=v.p2c(x+k),C=y.p2c(w-k),S=y.p2c(w+k);a="x"===n?m.tree.range(Math.min(M,T),Math.min(y._rl[0],y._rl[1]),Math.max(M,T),Math.max(y._rl[0],y._rl[1])):m.tree.range(Math.min(M,T),Math.min(C,S),Math.max(M,T),Math.max(C,S))}else a=m.ids;var L=k;if("x"===n)for(c=0;c<a.length;c++)s=b[a[c]],(u=Math.abs(v.c2p(s)-x))<L&&(L=u,d=y.c2p(_[a[c]])-w,h=Math.sqrt(u*u+d*d),i=a[c]);else for(c=a.length-1;c>-1;c--)s=b[a[c]],l=_[a[c]],u=v.c2p(s)-x,d=y.c2p(l)-w,(p=Math.sqrt(u*u+d*d))<L&&(L=h=p,i=a[c]);return e.index=i,e.distance=L,e.dxy=h,void 0===i?[e]:[o(e,b,_,g)]},calcHover:o}},{"../../lib":716,"../../registry":845,"../scatter/get_trace_color":1128}],1177:[function(e,t,r){"use strict";var n=e("./hover");t.exports={moduleType:"trace",name:"scattergl",basePlotModule:e("../../plots/cartesian"),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../scatter/cross_trace_defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),hoverPoints:n.hoverPoints,selectPoints:e("./select"),meta:{}}},{"../../plots/cartesian":775,"../scatter/cross_trace_defaults":1124,"../scatter/marker_colorbar":1136,"./attributes":1169,"./calc":1170,"./defaults":1173,"./format_labels":1175,"./hover":1176,"./plot":1178,"./select":1180}],1178:[function(e,t,r){"use strict";var n=e("regl-scatter2d"),a=e("regl-line2d"),i=e("regl-error2d"),o=e("gl-text"),s=e("../../lib"),l=e("../../lib/prepare_regl"),c=e("../scatter/subtypes"),u=e("../scatter/link_traces"),d=e("./edit_style").styleTextSelection;function p(e,t,r){var n=e._size,a=e.width,i=e.height;return[n.l+t.domain[0]*n.w,n.b+r.domain[0]*n.h,a-n.r-(1-t.domain[1])*n.w,i-n.t-(1-r.domain[1])*n.h]}t.exports=function(e,t,r){if(r.length){var h,f,m=e._fullLayout,g=t._scene,v=t.xaxis,y=t.yaxis;if(g)if(l(e,["ANGLE_instanced_arrays","OES_element_index_uint"])){var b=g.count,_=m._glcanvas.data()[0].regl;if(u(e,t,r),g.dirty){if(!0===g.error2d&&(g.error2d=i(_)),!0===g.line2d&&(g.line2d=a(_)),!0===g.scatter2d&&(g.scatter2d=n(_)),!0===g.fill2d&&(g.fill2d=a(_)),!0===g.glText)for(g.glText=new Array(b),h=0;h<b;h++)g.glText[h]=new o(_);if(g.glText){if(b>g.glText.length){var x=b-g.glText.length;for(h=0;h<x;h++)g.glText.push(new o(_))}else if(b<g.glText.length){var w=g.glText.length-b;g.glText.splice(b,w).forEach((function(e){e.destroy()}))}for(h=0;h<b;h++)g.glText[h].update(g.textOptions[h])}if(g.line2d&&(g.line2d.update(g.lineOptions),g.lineOptions=g.lineOptions.map((function(e){if(e&&e.positions){for(var t=e.positions,r=0;r<t.length&&(isNaN(t[r])||isNaN(t[r+1]));)r+=2;for(var n=t.length-2;n>r&&(isNaN(t[n])||isNaN(t[n+1]));)n-=2;e.positions=t.slice(r,n+2)}return e})),g.line2d.update(g.lineOptions)),g.error2d){var k=(g.errorXOptions||[]).concat(g.errorYOptions||[]);g.error2d.update(k)}g.scatter2d&&g.scatter2d.update(g.markerOptions),g.fillOrder=s.repeat(null,b),g.fill2d&&(g.fillOptions=g.fillOptions.map((function(e,t){var n=r[t];if(e&&n&&n[0]&&n[0].trace){var a,i,o=n[0],s=o.trace,l=o.t,c=g.lineOptions[t],u=[];s._ownfill&&u.push(t),s._nexttrace&&u.push(t+1),u.length&&(g.fillOrder[t]=u);var d,p,h=[],f=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(d=0;d<f.length&&isNaN(f[d+1]);)d+=2;for(p=f.length-2;p>d&&isNaN(f[p+1]);)p-=2;0!==f[d+1]&&(h=[f[d],0]),h=h.concat(f.slice(d,p+2)),0!==f[p+1]&&(h=h.concat([f[p],0]))}else if("tozerox"===s.fill){for(d=0;d<f.length&&isNaN(f[d]);)d+=2;for(p=f.length-2;p>d&&isNaN(f[p]);)p-=2;0!==f[d]&&(h=[0,f[d+1]]),h=h.concat(f.slice(d,p+2)),0!==f[p]&&(h=h.concat([0,f[p+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(h=[],a=0,i=0;i<f.length;i+=2)(isNaN(f[i])||isNaN(f[i+1]))&&((h=h.concat(f.slice(a,i))).push(f[a],f[a+1]),a=i+2);h=h.concat(f.slice(a)),a&&h.push(f[a],f[a+1])}else{var m=s._nexttrace;if(m){var v=g.lineOptions[t+1];if(v){var y=v.positions;if("tonexty"===s.fill){for(h=f.slice(),t=Math.floor(y.length/2);t--;){var b=y[2*t],_=y[2*t+1];isNaN(b)||isNaN(_)||h.push(b,_)}e.fill=m.fillcolor}}}}if(s._prevtrace&&"tonext"===s._prevtrace.fill){var x=g.lineOptions[t-1].positions,w=h.length/2,k=[a=w];for(i=0;i<x.length;i+=2)(isNaN(x[i])||isNaN(x[i+1]))&&(k.push(i/2+w+1),a=i+2);h=h.concat(x),e.hole=k}return e.fillmode=s.fill,e.opacity=s.opacity,e.positions=h,e}})),g.fill2d.update(g.fillOptions))}var M=m.dragmode,T="lasso"===M||"select"===M,C=m.clickmode.indexOf("select")>-1;for(h=0;h<b;h++){var S=r[h][0],L=S.trace,A=S.t,E=A.index,D=L._length,I=A.x,P=A.y;if(L.selectedpoints||T||C){if(T||(T=!0),L.selectedpoints){var O=g.selectBatch[E]=s.selIndices2selPoints(L),R={};for(f=0;f<O.length;f++)R[O[f]]=1;var F=[];for(f=0;f<D;f++)R[f]||F.push(f);g.unselectBatch[E]=F}var z=A.xpx=new Array(D),N=A.ypx=new Array(D);for(f=0;f<D;f++)z[f]=v.c2p(I[f]),N[f]=y.c2p(P[f])}else A.xpx=A.ypx=null}if(T){if(g.select2d||(g.select2d=n(m._glcanvas.data()[1].regl)),g.scatter2d){var j=new Array(b);for(h=0;h<b;h++)j[h]=g.selectBatch[h].length||g.unselectBatch[h].length?g.markerUnselectedOptions[h]:{};g.scatter2d.update(j)}g.select2d&&(g.select2d.update(g.markerOptions),g.select2d.update(g.markerSelectedOptions)),g.glText&&r.forEach((function(e){var t=((e||[])[0]||{}).trace||{};c.hasText(t)&&d(e)}))}else g.scatter2d&&g.scatter2d.update(g.markerOptions);var B={viewport:p(m,v,y),range:[(v._rl||v.range)[0],(y._rl||y.range)[0],(v._rl||v.range)[1],(y._rl||y.range)[1]]},Y=s.repeat(B,g.count);g.fill2d&&g.fill2d.update(Y),g.line2d&&g.line2d.update(Y),g.error2d&&g.error2d.update(Y.concat(Y)),g.scatter2d&&g.scatter2d.update(Y),g.select2d&&g.select2d.update(Y),g.glText&&g.glText.forEach((function(e){e.update(B)}))}else g.init()}}},{"../../lib":716,"../../lib/prepare_regl":729,"../scatter/link_traces":1134,"../scatter/subtypes":1142,"./edit_style":1174,"gl-text":318,"regl-error2d":491,"regl-line2d":492,"regl-scatter2d":498}],1179:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){var r=t._scene,a={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},i={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((r=t._scene={}).init=function(){n.extendFlat(r,i,a)},r.init(),r.update=function(e){var t=n.repeat(e,r.count);if(r.fill2d&&r.fill2d.update(t),r.scatter2d&&r.scatter2d.update(t),r.line2d&&r.line2d.update(t),r.error2d&&r.error2d.update(t.concat(t)),r.select2d&&r.select2d.update(t),r.glText)for(var a=0;a<r.count;a++)r.glText[a].update(e)},r.draw=function(){for(var e=r.count,t=r.fill2d,a=r.error2d,i=r.line2d,o=r.scatter2d,s=r.glText,l=r.select2d,c=r.selectBatch,u=r.unselectBatch,d=0;d<e;d++){if(t&&r.fillOrder[d]&&t.draw(r.fillOrder[d]),i&&r.lineOptions[d]&&i.draw(d),a&&(r.errorXOptions[d]&&a.draw(d),r.errorYOptions[d]&&a.draw(d+e)),o&&r.markerOptions[d])if(u[d].length){var p=n.repeat([],r.count);p[d]=u[d],o.draw(p)}else c[d].length||o.draw(d);s[d]&&r.textOptions[d]&&s[d].render()}l&&l.draw(c),r.dirty=!1},r.destroy=function(){r.fill2d&&r.fill2d.destroy&&r.fill2d.destroy(),r.scatter2d&&r.scatter2d.destroy&&r.scatter2d.destroy(),r.error2d&&r.error2d.destroy&&r.error2d.destroy(),r.line2d&&r.line2d.destroy&&r.line2d.destroy(),r.select2d&&r.select2d.destroy&&r.select2d.destroy(),r.glText&&r.glText.forEach((function(e){e.destroy&&e.destroy()})),r.lineOptions=null,r.fillOptions=null,r.markerOptions=null,r.markerSelectedOptions=null,r.markerUnselectedOptions=null,r.errorXOptions=null,r.errorYOptions=null,r.textOptions=null,r.textSelectedOptions=null,r.textUnselectedOptions=null,r.selectBatch=null,r.unselectBatch=null,t._scene=null}),r.dirty||n.extendFlat(r,a),r}},{"../../lib":716}],1180:[function(e,t,r){"use strict";var n=e("../scatter/subtypes"),a=e("./edit_style").styleTextSelection;t.exports=function(e,t){var r=e.cd,i=[],o=r[0].trace,s=r[0].t,l=o._length,c=s.x,u=s.y,d=s._scene,p=s.index;if(!d)return i;var h=n.hasText(o),f=n.hasMarkers(o),m=!f&&!h;if(!0!==o.visible||m)return i;var g=[],v=[];if(!1!==t&&!t.degenerate)for(var y=0;y<l;y++)t.contains([s.xpx[y],s.ypx[y]],!1,y,e)?(g.push(y),i.push({pointNumber:y,x:c[y],y:u[y]})):v.push(y);if(f){var b=d.scatter2d;if(g.length||v.length){if(!d.selectBatch[p].length&&!d.unselectBatch[p].length){var _=new Array(d.count);_[p]=d.markerUnselectedOptions[p],b.update.apply(b,_)}}else{var x=new Array(d.count);x[p]=d.markerOptions[p],b.update.apply(b,x)}}return d.selectBatch[p]=g,d.unselectBatch[p]=v,h&&a(r),i}},{"../scatter/subtypes":1142,"./edit_style":1174}],1181:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,i=e("../scattergeo/attributes"),o=e("../scatter/attributes"),s=e("../../plots/mapbox/layout_attributes"),l=e("../../plots/attributes"),c=e("../../components/colorscale/attributes"),u=e("../../lib/extend").extendFlat,d=e("../../plot_api/edit_types").overrideAll,p=i.line,h=i.marker;t.exports=d({lon:i.lon,lat:i.lat,mode:u({},o.mode,{dflt:"markers"}),text:u({},o.text,{}),texttemplate:a({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:u({},o.hovertext,{}),line:{color:p.color,width:p.width},connectgaps:o.connectgaps,marker:u({symbol:{valType:"string",dflt:"circle",arrayOk:!0},opacity:h.opacity,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode},c("marker")),fill:i.fill,fillcolor:o.fillcolor,textfont:s.layers.symbol.textfont,textposition:s.layers.symbol.textposition,below:{valType:"string"},selected:{marker:o.selected.marker},unselected:{marker:o.unselected.marker},hoverinfo:u({},l.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:n()},"calc","nested")},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../../plots/mapbox/layout_attributes":821,"../../plots/template_attributes":840,"../scatter/attributes":1118,"../scattergeo/attributes":1159}],1182:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../lib"),i=e("../../constants/numerical").BADNUM,o=e("../../lib/geojson_utils"),s=e("../../components/colorscale"),l=e("../../components/drawing"),c=e("../scatter/make_bubble_size_func"),u=e("../scatter/subtypes"),d=e("../../plots/mapbox/convert_text_opts"),p=e("../../components/fx/helpers").appendArrayPointValue,h=e("../../lib/svg_text_utils").NEWLINES,f=e("../../lib/svg_text_utils").BR_TAG_ALL;function m(){return{geojson:o.makeBlank(),layout:{visibility:"none"},paint:{}}}function g(e){return a.isArrayOrTypedArray(e)?function(e){return e}:e?function(){return e}:v}function v(){return""}function y(e){return e[0]===i}t.exports=function(e,t){var r,i=t[0].trace,b=!0===i.visible&&0!==i._length,_="none"!==i.fill,x=u.hasLines(i),w=u.hasMarkers(i),k=u.hasText(i),M=w&&"circle"===i.marker.symbol,T=w&&"circle"!==i.marker.symbol,C=m(),S=m(),L=m(),A=m(),E={fill:C,line:S,circle:L,symbol:A};if(!b)return E;if((_||x)&&(r=o.calcTraceToLineCoords(t)),_&&(C.geojson=o.makePolygon(r),C.layout.visibility="visible",a.extendFlat(C.paint,{"fill-color":i.fillcolor})),x&&(S.geojson=o.makeLine(r),S.layout.visibility="visible",a.extendFlat(S.paint,{"line-width":i.line.width,"line-color":i.line.color,"line-opacity":i.opacity})),M){var D=function(e){var t,r,i,o,u=e[0].trace,d=u.marker,p=u.selectedpoints,h=a.isArrayOrTypedArray(d.color),f=a.isArrayOrTypedArray(d.size),m=a.isArrayOrTypedArray(d.opacity);function g(e){return u.opacity*e}h&&(r=s.hasColorscale(u,"marker")?s.makeColorScaleFuncFromTrace(d):a.identity),f&&(i=c(u)),m&&(o=function(e){return g(n(e)?+a.constrain(e,0,1):0)});var v,b,_=[];for(t=0;t<e.length;t++){var x=e[t],w=x.lonlat;if(!y(w)){var k={};r&&(k.mcc=x.mcc=r(x.mc)),i&&(k.mrc=x.mrc=i(x.ms)),o&&(k.mo=o(x.mo)),p&&(k.selected=x.selected||0),_.push({type:"Feature",geometry:{type:"Point",coordinates:w},properties:k})}}if(p)for(v=l.makeSelectedPointStyleFns(u),t=0;t<_.length;t++){var M=_[t].properties;v.selectedOpacityFn&&(M.mo=g(v.selectedOpacityFn(M))),v.selectedColorFn&&(M.mcc=v.selectedColorFn(M)),v.selectedSizeFn&&(M.mrc=v.selectedSizeFn(M))}return{geojson:{type:"FeatureCollection",features:_},mcc:h||v&&v.selectedColorFn?{type:"identity",property:"mcc"}:d.color,mrc:f||v&&v.selectedSizeFn?{type:"identity",property:"mrc"}:(b=d.size,b/2),mo:m||v&&v.selectedOpacityFn?{type:"identity",property:"mo"}:g(d.opacity)}}(t);L.geojson=D.geojson,L.layout.visibility="visible",a.extendFlat(L.paint,{"circle-color":D.mcc,"circle-radius":D.mrc,"circle-opacity":D.mo})}if((T||k)&&(A.geojson=function(e,t){for(var r=t._fullLayout,n=e[0].trace,i=(n.marker||{}).symbol,o="circle"!==i?g(i):v,s=u.hasText(n)?g(n.text):v,l=[],c=0;c<e.length;c++){var d=e[c];if(!y(d.lonlat)){var m,b=n.texttemplate;if(b){var _=Array.isArray(b)?b[c]||"":b,x=n._module.formatLabels(d,n,r),w={};p(w,n,d.i);var k=n._meta||{};m=a.texttemplateString(_,x,r._d3locale,w,d,k)}else m=s(d.tx);m&&(m=m.replace(h,"").replace(f,"\n")),l.push({type:"Feature",geometry:{type:"Point",coordinates:d.lonlat},properties:{symbol:o(d.mx),text:m}})}}return{type:"FeatureCollection",features:l}}(t,e),a.extendFlat(A.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),T&&(a.extendFlat(A.layout,{"icon-size":i.marker.size/10}),a.extendFlat(A.paint,{"icon-opacity":i.opacity*i.marker.opacity,"icon-color":i.marker.color})),k)){var I=(i.marker||{}).size,P=d(i.textposition,I);a.extendFlat(A.layout,{"text-size":i.textfont.size,"text-anchor":P.anchor,"text-offset":P.offset}),a.extendFlat(A.paint,{"text-color":i.textfont.color,"text-opacity":i.opacity})}return E}},{"../../components/colorscale":603,"../../components/drawing":612,"../../components/fx/helpers":626,"../../constants/numerical":692,"../../lib":716,"../../lib/geojson_utils":711,"../../lib/svg_text_utils":740,"../../plots/mapbox/convert_text_opts":818,"../scatter/make_bubble_size_func":1135,"../scatter/subtypes":1142,"fast-isnumeric":227}],1183:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/subtypes"),i=e("../scatter/marker_defaults"),o=e("../scatter/line_defaults"),s=e("../scatter/text_defaults"),l=e("../scatter/fillcolor_defaults"),c=e("./attributes");t.exports=function(e,t,r,u){function d(r,a){return n.coerce(e,t,c,r,a)}if(function(e,t,r){var n=r("lon")||[],a=r("lat")||[],i=Math.min(n.length,a.length);return t._length=i,i}(0,t,d)){if(d("text"),d("texttemplate"),d("hovertext"),d("hovertemplate"),d("mode"),d("below"),a.hasLines(t)&&(o(e,t,r,u,d,{noDash:!0}),d("connectgaps")),a.hasMarkers(t)){i(e,t,r,u,d,{noLine:!0});var p=t.marker;"circle"!==p.symbol&&(n.isArrayOrTypedArray(p.size)&&(p.size=p.size[0]),n.isArrayOrTypedArray(p.color)&&(p.color=p.color[0]))}a.hasText(t)&&s(e,t,u,d,{noSelect:!0}),d("fill"),"none"!==t.fill&&l(e,t,r,d),n.coerceSelectionMarkerOpacity(t,d)}else t.visible=!1}},{"../../lib":716,"../scatter/fillcolor_defaults":1126,"../scatter/line_defaults":1131,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"./attributes":1181}],1184:[function(e,t,r){"use strict";t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}},{}],1185:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes");t.exports=function(e,t,r){var a={},i=r[t.subplot]._subplot.mockAxis,o=e.lonlat;return a.lonLabel=n.tickText(i,i.c2l(o[0]),!0).text,a.latLabel=n.tickText(i,i.c2l(o[1]),!0).text,a}},{"../../plots/cartesian/axes":764}],1186:[function(e,t,r){"use strict";var n=e("../../components/fx"),a=e("../../lib"),i=e("../scatter/get_trace_color"),o=a.fillText,s=e("../../constants/numerical").BADNUM;t.exports=function(e,t,r){var l=e.cd,c=l[0].trace,u=e.xa,d=e.ya,p=e.subplot,h=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),f=t-h;if(n.getClosest(l,(function(e){var t=e.lonlat;if(t[0]===s)return 1/0;var n=a.modHalf(t[0],360),i=t[1],o=p.project([n,i]),l=o.x-u.c2p([f,i]),c=o.y-d.c2p([n,r]),h=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-h,1-3/h)}),e),!1!==e.index){var m=l[e.index],g=m.lonlat,v=[a.modHalf(g[0],360)+h,g[1]],y=u.c2p(v),b=d.c2p(v),_=m.mrc||1;e.x0=y-_,e.x1=y+_,e.y0=b-_,e.y1=b+_;var x={};x[c.subplot]={_subplot:p};var w=c._module.formatLabels(m,c,x);return e.lonLabel=w.lonLabel,e.latLabel=w.latLabel,e.color=i(c,m),e.extraText=function(e,t,r){if(!e.hovertemplate){var n=(t.hi||e.hoverinfo).split("+"),a=-1!==n.indexOf("all"),i=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=t.lonlat,c=[];return a||i&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):i?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1])),(a||-1!==n.indexOf("text"))&&o(t,e,c),c.join("<br>")}function u(e){return e+"°"}}(c,m,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}},{"../../components/fx":629,"../../constants/numerical":692,"../../lib":716,"../scatter/get_trace_color":1128}],1187:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("../scattergeo/calc"),plot:e("./plot"),hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("./select"),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.update(t)},moduleType:"trace",name:"scattermapbox",basePlotModule:e("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":819,"../scatter/marker_colorbar":1136,"../scattergeo/calc":1160,"./attributes":1181,"./defaults":1183,"./event_data":1184,"./format_labels":1185,"./hover":1186,"./plot":1188,"./select":1189}],1188:[function(e,t,r){"use strict";var n=e("./convert"),a=e("../../plots/mapbox/constants").traceLayerPrefix,i=["fill","line","circle","symbol"];function o(e,t){this.type="scattermapbox",this.subplot=e,this.uid=t,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol"},this.layerIds={fill:a+t+"-fill",line:a+t+"-line",circle:a+t+"-circle",symbol:a+t+"-symbol"},this.below=null}var s=o.prototype;s.addSource=function(e,t){this.subplot.map.addSource(this.sourceIds[e],{type:"geojson",data:t.geojson})},s.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)},s.addLayer=function(e,t,r){this.subplot.addLayer({type:e,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint},r)},s.update=function(e){var t,r,a,o=this.subplot,s=o.map,l=n(o.gd,e),c=o.belowLookup["trace-"+this.uid];if(c!==this.below){for(t=i.length-1;t>=0;t--)r=i[t],s.removeLayer(this.layerIds[r]);for(t=0;t<i.length;t++)a=l[r=i[t]],this.addLayer(r,a,c);this.below=c}for(t=0;t<i.length;t++)a=l[r=i[t]],o.setOptions(this.layerIds[r],"setLayoutProperty",a.layout),"visible"===a.layout.visibility&&(this.setSourceData(r,a),o.setOptions(this.layerIds[r],"setPaintProperty",a.paint));e[0].trace._glTrace=this},s.dispose=function(){for(var e=this.subplot.map,t=i.length-1;t>=0;t--){var r=i[t];e.removeLayer(this.layerIds[r]),e.removeSource(this.sourceIds[r])}},t.exports=function(e,t){for(var r=t[0].trace,a=new o(e,r.uid),s=n(e.gd,t),l=a.below=e.belowLookup["trace-"+r.uid],c=0;c<i.length;c++){var u=i[c],d=s[u];a.addSource(u,d),a.addLayer(u,d,l)}return t[0].trace._glTrace=a,a}},{"../../plots/mapbox/constants":817,"./convert":1182}],1189:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/subtypes"),i=e("../../constants/numerical").BADNUM;t.exports=function(e,t){var r,o=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=o[0].trace;if(!a.hasMarkers(u))return[];if(!1===t)for(r=0;r<o.length;r++)o[r].selected=0;else for(r=0;r<o.length;r++){var d=o[r],p=d.lonlat;if(p[0]!==i){var h=[n.modHalf(p[0],360),p[1]],f=[s.c2p(h),l.c2p(h)];t.contains(f,null,r,e)?(c.push({pointNumber:r,lon:p[0],lat:p[1]}),d.selected=1):d.selected=0}}return c}},{"../../constants/numerical":692,"../../lib":716,"../scatter/subtypes":1142}],1190:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,i=e("../../lib/extend").extendFlat,o=e("../scatter/attributes"),s=e("../../plots/attributes"),l=o.line;t.exports={mode:o.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:o.text,texttemplate:a({editType:"plot"},{keys:["r","theta","text"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,shape:i({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:i({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:i({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o.fillcolor,hoverinfo:i({},s.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scatter/attributes":1118}],1191:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../../constants/numerical").BADNUM,i=e("../../plots/cartesian/axes"),o=e("../scatter/colorscale_calc"),s=e("../scatter/arrays_to_calcdata"),l=e("../scatter/calc_selection"),c=e("../scatter/calc").calcMarkerSize;t.exports=function(e,t){for(var r=e._fullLayout,u=t.subplot,d=r[u].radialaxis,p=r[u].angularaxis,h=d.makeCalcdata(t,"r"),f=p.makeCalcdata(t,"theta"),m=t._length,g=new Array(m),v=0;v<m;v++){var y=h[v],b=f[v],_=g[v]={};n(y)&&n(b)?(_.r=y,_.theta=b):_.r=a}var x=c(t,m);return t._extremes.x=i.findExtremes(d,h,{ppad:x}),o(e,t),s(g,t),l(g,t),g}},{"../../constants/numerical":692,"../../plots/cartesian/axes":764,"../scatter/arrays_to_calcdata":1117,"../scatter/calc":1119,"../scatter/calc_selection":1120,"../scatter/colorscale_calc":1121,"fast-isnumeric":227}],1192:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/subtypes"),i=e("../scatter/marker_defaults"),o=e("../scatter/line_defaults"),s=e("../scatter/line_shape_defaults"),l=e("../scatter/text_defaults"),c=e("../scatter/fillcolor_defaults"),u=e("../scatter/constants").PTS_LINESONLY,d=e("./attributes");function p(e,t,r,n){var a,i=n("r"),o=n("theta");if(i)o?a=Math.min(i.length,o.length):(a=i.length,n("theta0"),n("dtheta"));else{if(!o)return 0;a=t.theta.length,n("r0"),n("dr")}return t._length=a,a}t.exports={handleRThetaDefaults:p,supplyDefaults:function(e,t,r,h){function f(r,a){return n.coerce(e,t,d,r,a)}var m=p(0,t,0,f);if(m){f("thetaunit"),f("mode",m<u?"lines+markers":"lines"),f("text"),f("hovertext"),"fills"!==t.hoveron&&f("hovertemplate"),a.hasLines(t)&&(o(e,t,r,h,f),s(e,t,f),f("connectgaps")),a.hasMarkers(t)&&i(e,t,r,h,f,{gradient:!0}),a.hasText(t)&&(f("texttemplate"),l(e,t,h,f));var g=[];(a.hasMarkers(t)||a.hasText(t))&&(f("cliponaxis"),f("marker.maxdisplayed"),g.push("points")),f("fill"),"none"!==t.fill&&(c(e,t,r,f),a.hasLines(t)||s(e,t,f)),"tonext"!==t.fill&&"toself"!==t.fill||g.push("fills"),f("hoveron",g.join("+")||"points"),n.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}}},{"../../lib":716,"../scatter/constants":1122,"../scatter/fillcolor_defaults":1126,"../scatter/line_defaults":1131,"../scatter/line_shape_defaults":1133,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"./attributes":1190}],1193:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes");t.exports=function(e,t,r){var i,o,s={},l=r[t.subplot]._subplot;l?(i=l.radialAxis,o=l.angularAxis):(i=(l=r[t.subplot]).radialaxis,o=l.angularaxis);var c=i.c2l(e.r);s.rLabel=a.tickText(i,c,!0).text;var u="degrees"===o.thetaunit?n.rad2deg(e.theta):e.theta;return s.thetaLabel=a.tickText(o,u,!0).text,s}},{"../../lib":716,"../../plots/cartesian/axes":764}],1194:[function(e,t,r){"use strict";var n=e("../scatter/hover");function a(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="r",i._hovertitle="θ";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,c=[];function u(e,t){c.push(e._hovertitle+": "+t)}if(!t.hovertemplate){var d=l.split("+");-1!==d.indexOf("all")&&(d=["r","theta","text"]),-1!==d.indexOf("r")&&u(a,n.rLabel),-1!==d.indexOf("theta")&&u(i,n.thetaLabel),-1!==d.indexOf("text")&&n.text&&(c.push(n.text),delete n.text),n.extraText=c.join("<br>")}}t.exports={hoverPoints:function(e,t,r,i){var o=n(e,t,r,i);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,a(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:a}},{"../scatter/hover":1129}],1195:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults").supplyDefaults,colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scatter/select"),meta:{}}},{"../../plots/polar":828,"../scatter/marker_colorbar":1136,"../scatter/select":1139,"../scatter/style":1141,"./attributes":1190,"./calc":1191,"./defaults":1192,"./format_labels":1193,"./hover":1194,"./plot":1196}],1196:[function(e,t,r){"use strict";var n=e("../scatter/plot"),a=e("../../constants/numerical").BADNUM;t.exports=function(e,t,r){for(var i=t.layers.frontplot.select("g.scatterlayer"),o={xaxis:t.xaxis,yaxis:t.yaxis,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},s=t.radialAxis,l=t.angularAxis,c=0;c<r.length;c++)for(var u=r[c],d=0;d<u.length;d++){var p=u[d],h=p.r;if(h===a)p.x=p.y=a;else{var f=s.c2g(h),m=l.c2g(p.theta);p.x=f*Math.cos(m),p.y=f*Math.sin(m)}}n(e,o,r,i)}},{"../../constants/numerical":692,"../scatter/plot":1138}],1197:[function(e,t,r){"use strict";var n=e("../scatterpolar/attributes"),a=e("../scattergl/attributes"),i=e("../../plots/template_attributes").texttemplateAttrs;t.exports={mode:n.mode,r:n.r,theta:n.theta,r0:n.r0,dr:n.dr,theta0:n.theta0,dtheta:n.dtheta,thetaunit:n.thetaunit,text:n.text,texttemplate:i({editType:"plot"},{keys:["r","theta","text"]}),hovertext:n.hovertext,hovertemplate:n.hovertemplate,line:a.line,connectgaps:a.connectgaps,marker:a.marker,fill:a.fill,fillcolor:a.fillcolor,textposition:a.textposition,textfont:a.textfont,hoverinfo:n.hoverinfo,selected:n.selected,unselected:n.unselected}},{"../../plots/template_attributes":840,"../scattergl/attributes":1169,"../scatterpolar/attributes":1190}],1198:[function(e,t,r){"use strict";var n=e("../scatter/colorscale_calc"),a=e("../scatter/calc").calcMarkerSize,i=e("../scattergl/convert"),o=e("../../plots/cartesian/axes"),s=e("../scattergl/constants").TOO_MANY_POINTS;t.exports=function(e,t){var r=e._fullLayout,l=t.subplot,c=r[l].radialaxis,u=r[l].angularaxis,d=t._r=c.makeCalcdata(t,"r"),p=t._theta=u.makeCalcdata(t,"theta"),h=t._length,f={};h<d.length&&(d=d.slice(0,h)),h<p.length&&(p=p.slice(0,h)),f.r=d,f.theta=p,n(e,t);var m,g=f.opts=i.style(e,t);return h<s?m=a(t,h):g.marker&&(m=2*(g.marker.sizeAvg||Math.max(g.marker.size,3))),t._extremes.x=o.findExtremes(c,d,{ppad:m}),[{x:!1,y:!1,t:f,trace:t}]}},{"../../plots/cartesian/axes":764,"../scatter/calc":1119,"../scatter/colorscale_calc":1121,"../scattergl/constants":1171,"../scattergl/convert":1172}],1199:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/subtypes"),i=e("../scatterpolar/defaults").handleRThetaDefaults,o=e("../scatter/marker_defaults"),s=e("../scatter/line_defaults"),l=e("../scatter/text_defaults"),c=e("../scatter/fillcolor_defaults"),u=e("../scatter/constants").PTS_LINESONLY,d=e("./attributes");t.exports=function(e,t,r,p){function h(r,a){return n.coerce(e,t,d,r,a)}var f=i(e,t,p,h);f?(h("thetaunit"),h("mode",f<u?"lines+markers":"lines"),h("text"),h("hovertext"),"fills"!==t.hoveron&&h("hovertemplate"),a.hasLines(t)&&(s(e,t,r,p,h),h("connectgaps")),a.hasMarkers(t)&&o(e,t,r,p,h),a.hasText(t)&&(h("texttemplate"),l(e,t,p,h)),h("fill"),"none"!==t.fill&&c(e,t,r,h),n.coerceSelectionMarkerOpacity(t,h)):t.visible=!1}},{"../../lib":716,"../scatter/constants":1122,"../scatter/fillcolor_defaults":1126,"../scatter/line_defaults":1131,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"../scatterpolar/defaults":1192,"./attributes":1197}],1200:[function(e,t,r){"use strict";var n=e("../scatterpolar/format_labels");t.exports=function(e,t,r){var a=e.i;return"r"in e||(e.r=t._r[a]),"theta"in e||(e.theta=t._theta[a]),n(e,t,r)}},{"../scatterpolar/format_labels":1193}],1201:[function(e,t,r){"use strict";var n=e("../scattergl/hover"),a=e("../scatterpolar/hover").makeHoverPointText;t.exports={hoverPoints:function(e,t,r,i){var o=e.cd[0].t,s=o.r,l=o.theta,c=n.hoverPoints(e,t,r,i);if(c&&!1!==c[0].index){var u=c[0];if(void 0===u.index)return c;var d=e.subplot,p=u.cd[u.index],h=u.trace;if(p.r=s[u.index],p.theta=l[u.index],d.isPtInside(p))return u.xLabelVal=void 0,u.yLabelVal=void 0,a(p,h,d,u),c}}}},{"../scattergl/hover":1176,"../scatterpolar/hover":1194}],1202:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:e("../../plots/polar"),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("../scattergl/select"),meta:{}}},{"../../plots/polar":828,"../scatter/marker_colorbar":1136,"../scattergl/select":1180,"./attributes":1197,"./calc":1198,"./defaults":1199,"./format_labels":1200,"./hover":1201,"./plot":1203}],1203:[function(e,t,r){"use strict";var n=e("point-cluster"),a=e("fast-isnumeric"),i=e("../scattergl/plot"),o=e("../scattergl/scene_update"),s=e("../scattergl/convert"),l=e("../../lib"),c=e("../scattergl/constants").TOO_MANY_POINTS;t.exports=function(e,t,r){if(r.length){var u=t.radialAxis,d=t.angularAxis,p=o(e,t);return r.forEach((function(r){if(r&&r[0]&&r[0].trace){var i,o=r[0],h=o.trace,f=o.t,m=h._length,g=f.r,v=f.theta,y=f.opts,b=g.slice(),_=v.slice();for(i=0;i<g.length;i++)t.isPtInside({r:g[i],theta:v[i]})||(b[i]=NaN,_[i]=NaN);var x=new Array(2*m),w=Array(m),k=Array(m);for(i=0;i<m;i++){var M,T,C=b[i];if(a(C)){var S=u.c2g(C),L=d.c2g(_[i],h.thetaunit);M=S*Math.cos(L),T=S*Math.sin(L)}else M=T=NaN;w[i]=x[2*i]=M,k[i]=x[2*i+1]=T}f.tree=n(x),y.marker&&m>=c&&(y.marker.cluster=f.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=x),y.line&&x.length>1&&l.extendFlat(y.line,s.linePositions(e,h,x)),y.text&&(l.extendFlat(y.text,{positions:x},s.textPosition(e,h,y.text,y.marker)),l.extendFlat(y.textSel,{positions:x},s.textPosition(e,h,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:x},s.textPosition(e,h,y.text,y.markerUnsel))),y.fill&&!p.fill2d&&(p.fill2d=!0),y.marker&&!p.scatter2d&&(p.scatter2d=!0),y.line&&!p.line2d&&(p.line2d=!0),y.text&&!p.glText&&(p.glText=!0),p.lineOptions.push(y.line),p.fillOptions.push(y.fill),p.markerOptions.push(y.marker),p.markerSelectedOptions.push(y.markerSel),p.markerUnselectedOptions.push(y.markerUnsel),p.textOptions.push(y.text),p.textSelectedOptions.push(y.textSel),p.textUnselectedOptions.push(y.textUnsel),p.selectBatch.push([]),p.unselectBatch.push([]),f.x=w,f.y=k,f.rawx=w,f.rawy=k,f.r=g,f.theta=v,f.positions=x,f._scene=p,f.index=p.count,p.count++}})),i(e,t,r)}}},{"../../lib":716,"../scattergl/constants":1171,"../scattergl/convert":1172,"../scattergl/plot":1178,"../scattergl/scene_update":1179,"fast-isnumeric":227,"point-cluster":470}],1204:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,i=e("../scatter/attributes"),o=e("../../plots/attributes"),s=e("../../components/colorscale/attributes"),l=e("../../components/drawing/attributes").dash,c=e("../../lib/extend").extendFlat,u=i.marker,d=i.line,p=u.line;t.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:a({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},i.hovertext,{}),line:{color:d.color,width:d.width,dash:l,shape:c({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:i.connectgaps,cliponaxis:i.cliponaxis,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:p.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:i.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":598,"../../components/drawing/attributes":611,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../scatter/attributes":1118}],1205:[function(e,t,r){"use strict";var n=e("fast-isnumeric"),a=e("../scatter/colorscale_calc"),i=e("../scatter/arrays_to_calcdata"),o=e("../scatter/calc_selection"),s=e("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};t.exports=function(e,t){var r,u,d,p,h,f,m=e._fullLayout[t.subplot].sum,g=t.sum||m,v={a:t.a,b:t.b,c:t.c};for(r=0;r<l.length;r++)if(!v[d=l[r]]){for(h=v[c[d][0]],f=v[c[d][1]],p=new Array(h.length),u=0;u<h.length;u++)p[u]=g-h[u]-f[u];v[d]=p}var y,b,_,x,w,k,M=t._length,T=new Array(M);for(r=0;r<M;r++)y=v.a[r],b=v.b[r],_=v.c[r],n(y)&&n(b)&&n(_)?(1!=(x=m/((y=+y)+(b=+b)+(_=+_)))&&(y*=x,b*=x,_*=x),k=y,w=_-b,T[r]={x:w,y:k,a:y,b:b,c:_}):T[r]={x:!1,y:!1};return s(t,M),a(e,t),i(T,t),o(T,t),T}},{"../scatter/arrays_to_calcdata":1117,"../scatter/calc":1119,"../scatter/calc_selection":1120,"../scatter/colorscale_calc":1121,"fast-isnumeric":227}],1206:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/constants"),i=e("../scatter/subtypes"),o=e("../scatter/marker_defaults"),s=e("../scatter/line_defaults"),l=e("../scatter/line_shape_defaults"),c=e("../scatter/text_defaults"),u=e("../scatter/fillcolor_defaults"),d=e("./attributes");t.exports=function(e,t,r,p){function h(r,a){return n.coerce(e,t,d,r,a)}var f,m=h("a"),g=h("b"),v=h("c");if(m?(f=m.length,g?(f=Math.min(f,g.length),v&&(f=Math.min(f,v.length))):f=v?Math.min(f,v.length):0):g&&v&&(f=Math.min(g.length,v.length)),f){t._length=f,h("sum"),h("text"),h("hovertext"),"fills"!==t.hoveron&&h("hovertemplate"),h("mode",f<a.PTS_LINESONLY?"lines+markers":"lines"),i.hasLines(t)&&(s(e,t,r,p,h),l(e,t,h),h("connectgaps")),i.hasMarkers(t)&&o(e,t,r,p,h,{gradient:!0}),i.hasText(t)&&(h("texttemplate"),c(e,t,p,h));var y=[];(i.hasMarkers(t)||i.hasText(t))&&(h("cliponaxis"),h("marker.maxdisplayed"),y.push("points")),h("fill"),"none"!==t.fill&&(u(e,t,r,h),i.hasLines(t)||l(e,t,h)),"tonext"!==t.fill&&"toself"!==t.fill||y.push("fills"),h("hoveron",y.join("+")||"points"),n.coerceSelectionMarkerOpacity(t,h)}else t.visible=!1}},{"../../lib":716,"../scatter/constants":1122,"../scatter/fillcolor_defaults":1126,"../scatter/line_defaults":1131,"../scatter/line_shape_defaults":1133,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"../scatter/text_defaults":1143,"./attributes":1204}],1207:[function(e,t,r){"use strict";t.exports=function(e,t,r,n,a){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),n[a]){var i=n[a];e.a=i.a,e.b=i.b,e.c=i.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}},{}],1208:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes");t.exports=function(e,t,r){var a={},i=r[t.subplot]._subplot;return a.aLabel=n.tickText(i.aaxis,e.a,!0).text,a.bLabel=n.tickText(i.baxis,e.b,!0).text,a.cLabel=n.tickText(i.caxis,e.c,!0).text,a}},{"../../plots/cartesian/axes":764}],1209:[function(e,t,r){"use strict";var n=e("../scatter/hover");t.exports=function(e,t,r,a){var i=n(e,t,r,a);if(i&&!1!==i[0].index){var o=i[0];if(void 0===o.index){var s=1-o.y0/e.ya._length,l=e.xa._length,c=l*s/2,u=l-c;return o.x0=Math.max(Math.min(o.x0,u),c),o.x1=Math.max(Math.min(o.x1,u),c),i}var d=o.cd[o.index],p=o.trace,h=o.subplot;o.a=d.a,o.b=d.b,o.c=d.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var f={};f[p.subplot]={_subplot:h};var m=p._module.formatLabels(d,p,f);o.aLabel=m.aLabel,o.bLabel=m.bLabel,o.cLabel=m.cLabel;var g=d.hi||p.hoverinfo,v=[];if(!p.hovertemplate){var y=g.split("+");-1!==y.indexOf("all")&&(y=["a","b","c"]),-1!==y.indexOf("a")&&b(h.aaxis,o.aLabel),-1!==y.indexOf("b")&&b(h.baxis,o.bLabel),-1!==y.indexOf("c")&&b(h.caxis,o.cLabel)}return o.extraText=v.join("<br>"),o.hovertemplate=p.hovertemplate,i}function b(e,t){v.push(e._hovertitle+": "+t)}}},{"../scatter/hover":1129}],1210:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),formatLabels:e("./format_labels"),calc:e("./calc"),plot:e("./plot"),style:e("../scatter/style").style,styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../scatter/select"),eventData:e("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:e("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":841,"../scatter/marker_colorbar":1136,"../scatter/select":1139,"../scatter/style":1141,"./attributes":1204,"./calc":1205,"./defaults":1206,"./event_data":1207,"./format_labels":1208,"./hover":1209,"./plot":1211}],1211:[function(e,t,r){"use strict";var n=e("../scatter/plot");t.exports=function(e,t,r){var a=t.plotContainer;a.select(".scatterlayer").selectAll("*").remove();var i={xaxis:t.xaxis,yaxis:t.yaxis,plot:a,layerClipId:t._hasClipOnAxisFalse?t.clipIdRelative:null},o=t.layers.frontplot.select("g.scatterlayer");n(e,i,r,o)}},{"../scatter/plot":1138}],1212:[function(e,t,r){"use strict";var n=e("../scatter/attributes"),a=e("../../components/colorscale/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../scattergl/attributes"),s=e("../../plots/cartesian/constants").idRegex,l=e("../../plot_api/plot_template").templatedArray,c=e("../../lib/extend").extendFlat,u=n.marker,d=u.line,p=c(a("marker.line",{editTypeOverride:"calc"}),{width:c({},d.width,{editType:"calc"}),editType:"calc"}),h=c(a("marker"),{symbol:u.symbol,size:c({},u.size,{editType:"markerSize"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:p,editType:"calc"});function f(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[e],editType:"plot"}}}h.color.editType=h.cmin.editType=h.cmax.editType="style",t.exports={dimensions:l("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:i(),marker:h,xaxes:f("x"),yaxes:f("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:o.selected.marker,editType:"calc"},unselected:{marker:o.unselected.marker,editType:"calc"},opacity:o.opacity}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/plot_template":754,"../../plots/cartesian/constants":770,"../../plots/template_attributes":840,"../scatter/attributes":1118,"../scattergl/attributes":1169}],1213:[function(e,t,r){"use strict";var n=e("regl-line2d"),a=e("../../registry"),i=e("../../lib/prepare_regl"),o=e("../../plots/get_data").getModuleCalcData,s=e("../../plots/cartesian"),l=e("../../plots/cartesian/axis_ids").getFromId,c=e("../../plots/cartesian/axes").shouldShowZeroLine,u="splom";function d(e,t,r){for(var n=r.matrixOptions.data.length,a=t._visibleDims,i=r.viewOpts.ranges=new Array(n),o=0;o<a.length;o++){var s=a[o],c=i[o]=new Array(4),u=l(e,t._diag[s][0]);u&&(c[0]=u.r2l(u.range[0]),c[2]=u.r2l(u.range[1]));var d=l(e,t._diag[s][1]);d&&(c[1]=d.r2l(d.range[0]),c[3]=d.r2l(d.range[1]))}r.selectBatch.length||r.unselectBatch.length?r.matrix.update({ranges:i},{ranges:i}):r.matrix.update({ranges:i})}function p(e){var t=e._fullLayout,r=t._glcanvas.data()[0].regl,a=t._splomGrid;a||(a=t._splomGrid=n(r)),a.update(function(e){var t,r=e._fullLayout,n=r._size,a=[0,0,r.width,r.height],i={};function o(e,t,r,n,o,s){var l=t[e+"color"],c=t[e+"width"],u=String(l+c);u in i?i[u].data.push(NaN,NaN,r,n,o,s):i[u]={data:[r,n,o,s],join:"rect",thickness:c,color:l,viewport:a,range:a,overlay:!1}}for(t in r._splomSubplots){var s,l,u=r._plots[t],d=u.xaxis,p=u.yaxis,h=d._gridVals,f=p._gridVals,m=n.b+p.domain[0]*n.h,g=-p._m,v=-g*p.r2l(p.range[0],p.calendar);if(d.showgrid)for(t=0;t<h.length;t++)s=d._offset+d.l2p(h[t].x),o("grid",d,s,m,s,m+p._length);if(p.showgrid)for(t=0;t<f.length;t++)l=m+v+g*f[t].x,o("grid",p,d._offset,l,d._offset+d._length,l);c(e,d,p)&&(s=d._offset+d.l2p(0),o("zeroline",d,s,m,s,m+p._length)),c(e,p,d)&&(l=m+v+0,o("zeroline",p,d._offset,l,d._offset+d._length,l))}var y=[];for(t in i)y.push(i[t]);return y}(e))}t.exports={name:u,attr:s.attr,attrRegex:s.attrRegex,layoutAttributes:s.layoutAttributes,supplyLayoutDefaults:s.supplyLayoutDefaults,drawFramework:s.drawFramework,plot:function(e){var t=e._fullLayout,r=a.getModule(u),n=o(e.calcdata,r)[0];i(e,["ANGLE_instanced_arrays","OES_element_index_uint"])&&(t._hasOnlyLargeSploms&&p(e),r.plot(e,{},n))},drag:function(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&p(e);for(var n=0;n<t.length;n++){var a=t[n][0].trace,i=r._splomScenes[a.uid];"splom"===a.type&&i&&i.matrix&&d(e,a,i)}},updateGrid:p,clean:function(e,t,r,n){var a,i={};if(n._splomScenes){for(a=0;a<e.length;a++){var o=e[a];"splom"===o.type&&(i[o.uid]=1)}for(a=0;a<r.length;a++){var l=r[a];if(!i[l.uid]){var c=n._splomScenes[l.uid];c&&c.destroy&&c.destroy(),n._splomScenes[l.uid]=null,delete n._splomScenes[l.uid]}}}0===Object.keys(n._splomScenes||{}).length&&delete n._splomScenes,n._splomGrid&&!t._hasOnlyLargeSploms&&n._hasOnlyLargeSploms&&(n._splomGrid.destroy(),n._splomGrid=null,delete n._splomGrid),s.clean(e,t,r,n)},updateFx:s.updateFx,toSVG:s.toSVG}},{"../../lib/prepare_regl":729,"../../plots/cartesian":775,"../../plots/cartesian/axes":764,"../../plots/cartesian/axis_ids":767,"../../plots/get_data":799,"../../registry":845,"regl-line2d":492}],1214:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axis_ids"),i=e("../scatter/calc").calcMarkerSize,o=e("../scatter/calc").calcAxisExpansion,s=e("../scatter/colorscale_calc"),l=e("../scattergl/convert").markerSelection,c=e("../scattergl/convert").markerStyle,u=e("./scene_update"),d=e("../../constants/numerical").BADNUM,p=e("../scattergl/constants").TOO_MANY_POINTS;t.exports=function(e,t){var r,h,f,m,g,v,y=t.dimensions,b=t._length,_={},x=_.cdata=[],w=_.data=[],k=t._visibleDims=[];function M(e,r){for(var a=e.makeCalcdata({v:r.values,vcalendar:t.calendar},"v"),i=0;i<a.length;i++)a[i]=a[i]===d?NaN:a[i];x.push(a),w.push("log"===e.type?n.simpleMap(a,e.c2l):a)}for(r=0;r<y.length;r++)if((f=y[r]).visible){if(m=a.getFromId(e,t._diag[r][0]),g=a.getFromId(e,t._diag[r][1]),m&&g&&m.type!==g.type){n.log("Skipping splom dimension "+r+" with conflicting axis types");continue}m?(M(m,f),g&&"category"===g.type&&(g._categories=m._categories.slice())):M(g,f),k.push(r)}for(s(e,t),n.extendFlat(_,c(t)),v=x.length*b>p?2*(_.sizeAvg||Math.max(_.size,3)):i(t,b),h=0;h<k.length;h++)f=y[r=k[h]],m=a.getFromId(e,t._diag[r][0])||{},g=a.getFromId(e,t._diag[r][1])||{},o(e,t,m,g,x[h],x[h],v);var T=u(e,t);return T.matrix||(T.matrix=!0),T.matrixOptions=_,T.selectedOptions=l(t,t.selected),T.unselectedOptions=l(t,t.unselected),[{x:!1,y:!1,t:{},trace:t}]}},{"../../constants/numerical":692,"../../lib":716,"../../plots/cartesian/axis_ids":767,"../scatter/calc":1119,"../scatter/colorscale_calc":1121,"../scattergl/constants":1171,"../scattergl/convert":1172,"./scene_update":1221}],1215:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/array_container_defaults"),i=e("./attributes"),o=e("../scatter/subtypes"),s=e("../scatter/marker_defaults"),l=e("../parcoords/merge_length"),c=/-open/;function u(e,t){function r(r,a){return n.coerce(e,t,i.dimensions,r,a)}r("label");var a=r("values");a&&a.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}t.exports=function(e,t,r,d){function p(r,a){return n.coerce(e,t,i,r,a)}var h=a(e,t,{name:"dimensions",handleItemDefaults:u}),f=p("diagonal.visible"),m=p("showupperhalf"),g=p("showlowerhalf");if(l(t,h,"values")&&(f||m||g)){p("text"),p("hovertext"),p("hovertemplate"),s(e,t,r,d,p);var v=c.test(t.marker.symbol),y=o.isBubble(t);p("marker.line.width",v||y?1:0),function(e,t,r,n){var a,i,o=t.dimensions,s=o.length,l=t.showupperhalf,c=t.showlowerhalf,u=t.diagonal.visible,d=new Array(s),p=new Array(s);for(a=0;a<s;a++){var h=a?a+1:"";d[a]="x"+h,p[a]="y"+h}var f=n("xaxes",d),m=n("yaxes",p),g=t._diag=new Array(s);t._xaxes={},t._yaxes={};var v=[],y=[];function b(e,n,a,i){if(e){var o=e.charAt(0),s=r._splomAxes[o];if(t["_"+o+"axes"][e]=1,i.push(e),!(e in s)){var l=s[e]={};a&&(l.label=a.label||"",a.visible&&a.axis&&(a.axis.type&&(l.type=a.axis.type),a.axis.matches&&(l.matches=n)))}}}var _=!u&&!c,x=!u&&!l;for(t._axesDim={},a=0;a<s;a++){var w=o[a],k=0===a,M=a===s-1,T=k&&_||M&&x?void 0:f[a],C=k&&x||M&&_?void 0:m[a];b(T,C,w,v),b(C,T,w,y),g[a]=[T,C],t._axesDim[T]=a,t._axesDim[C]=a}for(a=0;a<v.length;a++)for(i=0;i<y.length;i++){var S=v[a]+y[i];a>i&&l?r._splomSubplots[S]=1:a<i&&c?r._splomSubplots[S]=1:a!==i||!u&&c&&l||(r._splomSubplots[S]=1)}(!c||!u&&l&&c)&&(r._splomGridDflt.xside="bottom",r._splomGridDflt.yside="left")}(0,t,d,p),n.coerceSelectionMarkerOpacity(t,p)}else t.visible=!1}},{"../../lib":716,"../../plots/array_container_defaults":760,"../parcoords/merge_length":1089,"../scatter/marker_defaults":1137,"../scatter/subtypes":1142,"./attributes":1212}],1216:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/colorscale_calc"),i=e("../scattergl/convert").markerStyle;t.exports=function(e,t){var r=t.trace,o=e._fullLayout._splomScenes[r.uid];if(o){a(e,r),n.extendFlat(o.matrixOptions,i(r));var s=n.extendFlat({},o.matrixOptions,o.viewOpts);o.matrix.update(s,null)}}},{"../../lib":716,"../scatter/colorscale_calc":1121,"../scattergl/convert":1172}],1217:[function(e,t,r){"use strict";r.getDimIndex=function(e,t){for(var r=t._id,n={x:0,y:1}[r.charAt(0)],a=e._visibleDims,i=0;i<a.length;i++){var o=a[i];if(e._diag[o][n]===r)return i}return!1}},{}],1218:[function(e,t,r){"use strict";var n=e("./helpers"),a=e("../scattergl/hover").calcHover;t.exports={hoverPoints:function(e,t,r){var i=e.cd[0].trace,o=e.scene.matrixOptions.cdata,s=e.xa,l=e.ya,c=s.c2p(t),u=l.c2p(r),d=e.distance,p=n.getDimIndex(i,s),h=n.getDimIndex(i,l);if(!1===p||!1===h)return[e];for(var f,m,g=o[p],v=o[h],y=d,b=0;b<g.length;b++){var _=g[b],x=v[b],w=s.c2p(_)-c,k=l.c2p(x)-u,M=Math.sqrt(w*w+k*k);M<y&&(y=m=M,f=b)}return e.index=f,e.distance=y,e.dxy=m,void 0===f?[e]:[a(e,g,v,i)]}}},{"../scattergl/hover":1176,"./helpers":1217}],1219:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../components/grid");t.exports={moduleType:"trace",name:"splom",basePlotModule:e("./base_plot"),categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:e("../scatter/marker_colorbar"),calc:e("./calc"),plot:e("./plot"),hoverPoints:e("./hover").hoverPoints,selectPoints:e("./select"),editStyle:e("./edit_style"),meta:{}},n.register(a)},{"../../components/grid":633,"../../registry":845,"../scatter/marker_colorbar":1136,"./attributes":1212,"./base_plot":1213,"./calc":1214,"./defaults":1215,"./edit_style":1216,"./hover":1218,"./plot":1220,"./select":1222}],1220:[function(e,t,r){"use strict";var n=e("regl-splom"),a=e("../../lib"),i=e("../../plots/cartesian/axis_ids");function o(e,t){var r,o,s,l,c,u=e._fullLayout,d=u._size,p=t.trace,h=t.t,f=u._splomScenes[p.uid],m=f.matrixOptions,g=m.cdata,v=u._glcanvas.data()[0].regl,y=u.dragmode;if(0!==g.length){m.lower=p.showupperhalf,m.upper=p.showlowerhalf,m.diagonal=p.diagonal.visible;var b=p._visibleDims,_=g.length,x=f.viewOpts={};for(x.ranges=new Array(_),x.domains=new Array(_),c=0;c<b.length;c++){s=b[c];var w=x.ranges[c]=new Array(4),k=x.domains[c]=new Array(4);(r=i.getFromId(e,p._diag[s][0]))&&(w[0]=r._rl[0],w[2]=r._rl[1],k[0]=r.domain[0],k[2]=r.domain[1]),(o=i.getFromId(e,p._diag[s][1]))&&(w[1]=o._rl[0],w[3]=o._rl[1],k[1]=o.domain[0],k[3]=o.domain[1])}x.viewport=[d.l,d.b,d.w+d.l,d.h+d.b],!0===f.matrix&&(f.matrix=n(v));var M=u.clickmode.indexOf("select")>-1,T=!0;if("lasso"===y||"select"===y||p.selectedpoints||M){var C=p._length;if(p.selectedpoints){f.selectBatch=p.selectedpoints;var S=p.selectedpoints,L={};for(s=0;s<S.length;s++)L[S[s]]=!0;var A=[];for(s=0;s<C;s++)L[s]||A.push(s);f.unselectBatch=A}var E=h.xpx=new Array(_),D=h.ypx=new Array(_);for(c=0;c<b.length;c++){if(s=b[c],r=i.getFromId(e,p._diag[s][0]))for(E[c]=new Array(C),l=0;l<C;l++)E[c][l]=r.c2p(g[c][l]);if(o=i.getFromId(e,p._diag[s][1]))for(D[c]=new Array(C),l=0;l<C;l++)D[c][l]=o.c2p(g[c][l])}if(f.selectBatch.length||f.unselectBatch.length){var I=a.extendFlat({},m,f.unselectedOptions,x),P=a.extendFlat({},m,f.selectedOptions,x);f.matrix.update(I,P),T=!1}}else h.xpx=h.ypx=null;if(T){var O=a.extendFlat({},m,x);f.matrix.update(O,null)}}}t.exports=function(e,t,r){if(r.length)for(var n=0;n<r.length;n++)o(e,r[n][0])}},{"../../lib":716,"../../plots/cartesian/axis_ids":767,"regl-splom":499}],1221:[function(e,t,r){"use strict";var n=e("../../lib");t.exports=function(e,t){var r=e._fullLayout,a=t.uid,i=r._splomScenes;i||(i=r._splomScenes={});var o={dirty:!0},s=i[t.uid];return s||((s=i[a]=n.extendFlat({},o,{matrix:!1,selectBatch:[],unselectBatch:[]})).draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||n.extendFlat(s,o),s}},{"../../lib":716}],1222:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../scatter/subtypes"),i=e("./helpers");t.exports=function(e,t){var r=e.cd,o=r[0].trace,s=r[0].t,l=e.scene,c=l.matrixOptions.cdata,u=e.xaxis,d=e.yaxis,p=[];if(!l)return p;var h=!a.hasMarkers(o)&&!a.hasText(o);if(!0!==o.visible||h)return p;var f=i.getDimIndex(o,u),m=i.getDimIndex(o,d);if(!1===f||!1===m)return p;var g=s.xpx[f],v=s.ypx[m],y=c[f],b=c[m],_=[],x=[];if(!1!==t&&!t.degenerate)for(var w=0;w<y.length;w++)t.contains([g[w],v[w]],null,w,e)?(_.push(w),p.push({pointNumber:w,x:y[w],y:b[w]})):x.push(w);var k=l.matrixOptions;return _.length||x.length?l.selectBatch.length||l.unselectBatch.length||l.matrix.update(l.unselectedOptions,n.extendFlat({},k,l.selectedOptions,l.viewOpts)):l.matrix.update(k,null),l.selectBatch=_,l.unselectBatch=x,p}},{"../../lib":716,"../scatter/subtypes":1142,"./helpers":1217}],1223:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../mesh3d/attributes"),o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(e){l[e]=i[e]})),l.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,t.exports=l},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../mesh3d/attributes":1059}],1224:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/colorscale/calc");function i(e){return n.distinctVals(e).vals}t.exports=function(e,t){var r,o,s,l,c,u,d=t.u,p=t.v,h=t.w,f=t.x,m=t.y,g=t.z,v=Math.min(f.length,m.length,g.length,d.length,p.length,h.length),y=0;t.starts&&(l=t.starts.x||[],c=t.starts.y||[],u=t.starts.z||[],y=Math.min(l.length,c.length,u.length));var b=0,_=1/0;for(r=0;r<v;r++){var x=d[r],w=p[r],k=h[r],M=Math.sqrt(x*x+w*w+k*k);b=Math.max(b,M),_=Math.min(_,M)}a(e,t,{vals:[_,b],containerStr:"",cLetter:"c"});var T,C,S,L,A,E,D=-1/0,I=1/0,P=-1/0,O=1/0,R=-1/0,F=1/0,z="";for(v&&(L=f[0],A=m[0],E=g[0]),r=0;r<v;r++)D=Math.max(D,f[r]),I=Math.min(I,f[r]),P=Math.max(P,m[r]),O=Math.min(O,m[r]),R=Math.max(R,g[r]),F=Math.min(F,g[r]),T||f[r]===L||(T=!0,z+="x"),C||m[r]===A||(C=!0,z+="y"),S||g[r]===E||(S=!0,z+="z");T||(z+="x"),C||(z+="y"),S||(z+="z");var N=i(t.x.slice(0,v)),j=i(t.y.slice(0,v)),B=i(t.z.slice(0,v));z=(z=(z=z.replace("x",(f[0]>f[v-1]?"-":"+")+"x")).replace("y",(m[0]>m[v-1]?"-":"+")+"y")).replace("z",(g[0]>g[v-1]?"-":"+")+"z");var Y=function(){v=0,N=[],j=[],B=[]};(!v||v<N.length*j.length*B.length)&&Y();var H=function(e){return"x"===e?f:"y"===e?m:g},V=function(e){return"x"===e?N:"y"===e?j:B},U=function(e){return e[v-1]<e[0]?-1:1},W=H(z[1]),G=H(z[3]),q=H(z[5]),K=V(z[1]).length,X=V(z[3]).length,Z=V(z[5]).length,J=!1,$=function(e,t,r){return K*(X*e+t)+r},Q=U(H(z[1])),ee=U(H(z[3])),te=U(H(z[5]));for(r=0;r<Z-1;r++){for(o=0;o<X-1;o++){for(s=0;s<K-1;s++){var re=$(r,o,s),ne=$(r,o,s+1),ae=$(r,o+1,s),ie=$(r+1,o,s);if(W[re]*Q<W[ne]*Q&&G[re]*ee<G[ae]*ee&&q[re]*te<q[ie]*te||(J=!0),J)break}if(J)break}if(J)break}for(J&&(n.warn("Encountered arbitrary coordinates! Unable to input data grid."),Y()),r=0;r<y;r++){var oe=l[r];D=Math.max(D,oe),I=Math.min(I,oe);var se=c[r];P=Math.max(P,se),O=Math.min(O,se);var le=u[r];R=Math.max(R,le),F=Math.min(F,le)}t._len=v,t._slen=y,t._normMax=b,t._xbnds=[I,D],t._ybnds=[O,P],t._zbnds=[F,R],t._Xs=N,t._Ys=j,t._Zs=B,t._gridFill=z}},{"../../components/colorscale/calc":599,"../../lib":716}],1225:[function(e,t,r){"use strict";var n=e("gl-streamtube3d"),a=n.createTubeMesh,i=e("../../lib"),o=e("../../lib/gl_format_color").parseColorScale,s=e("../../components/colorscale").extractOpts,l=e("../../plots/gl3d/zip3"),c={xaxis:0,yaxis:1,zaxis:2};function u(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var d=u.prototype;function p(e){var t=e.length;return t>2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function h(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function f(e,t){var r=e.fullSceneLayout,a=e.dataScale,u=t._len,d={};function f(e,t){var n=r[t],o=a[c[t]];return i.simpleMap(e,(function(e){return n.d2l(e)*o}))}if(d.vectors=l(f(t.u,"xaxis"),f(t.v,"yaxis"),f(t.w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=f(t._Xs,"xaxis"),g=f(t._Ys,"yaxis"),v=f(t._Zs,"zaxis");d.meshgrid=[m,g,v],d.gridFill=t._gridFill;var y=t._slen;if(y)d.startingPositions=l(f(t.starts.x.slice(0,y),"xaxis"),f(t.starts.y.slice(0,y),"yaxis"),f(t.starts.z.slice(0,y),"zaxis"));else{for(var b=g[0],_=p(m),x=p(v),w=new Array(_.length*x.length),k=0,M=0;M<_.length;M++)for(var T=0;T<x.length;T++)w[k++]=[_[M],b,x[T]];d.startingPositions=w}d.colormap=o(t),d.tubeSize=t.sizeref,d.maxLength=t.maxdisplayed;var C=f(t._xbnds,"xaxis"),S=f(t._ybnds,"yaxis"),L=f(t._zbnds,"zaxis"),A=h(m),E=h(g),D=h(v),I=[[C[0]-A[0],S[0]-E[0],L[0]-D[0]],[C[1]+A[1],S[1]+E[1],L[1]+D[1]]],P=n(d,I),O=s(t);P.vertexIntensityBounds=[O.min/t._normMax,O.max/t._normMax];var R=t.lightposition;return P.lightPosition=[R.x,R.y,R.z],P.ambient=t.lighting.ambient,P.diffuse=t.lighting.diffuse,P.specular=t.lighting.specular,P.roughness=t.lighting.roughness,P.fresnel=t.lighting.fresnel,P.opacity=t.opacity,t._pad=P.tubeScale*t.sizeref*2,P}d.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(e,n){var a=t[n],i=r[c[n]];return a.l2c(e)/i}if(e.object===this.mesh){var a=e.data.position,i=e.data.velocity;return e.traceCoordinate=[n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}},d.update=function(e){this.data=e;var t=f(this.scene,e);this.mesh.update(t)},d.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var r=e.glplot.gl,n=f(e,t),i=a(r,n),o=new u(e,t.uid);return o.mesh=i,o.data=t,i._trace=o,e.glplot.add(i),o}},{"../../components/colorscale":603,"../../lib":716,"../../lib/gl_format_color":713,"../../plots/gl3d/zip3":815,"gl-streamtube3d":314}],1226:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/colorscale/defaults"),i=e("./attributes");t.exports=function(e,t,r,o){function s(r,a){return n.coerce(e,t,i,r,a)}var l=s("u"),c=s("v"),u=s("w"),d=s("x"),p=s("y"),h=s("z");l&&l.length&&c&&c.length&&u&&u.length&&d&&d.length&&p&&p.length&&h&&h.length?(s("starts.x"),s("starts.y"),s("starts.z"),s("maxdisplayed"),s("sizeref"),s("lighting.ambient"),s("lighting.diffuse"),s("lighting.specular"),s("lighting.roughness"),s("lighting.fresnel"),s("lightposition.x"),s("lightposition.y"),s("lightposition.z"),a(e,t,o,s,{prefix:"",cLetter:"c"}),s("text"),s("hovertext"),s("hovertemplate"),t._length=null):t.visible=!1}},{"../../components/colorscale/defaults":601,"../../lib":716,"./attributes":1223}],1227:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"streamtube",basePlotModule:e("../../plots/gl3d"),categories:["gl3d"],attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:e("./calc"),plot:e("./convert"),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}},{"../../plots/gl3d":804,"./attributes":1223,"./calc":1224,"./convert":1225,"./defaults":1226}],1228:[function(e,t,r){"use strict";var n=e("../../plots/attributes"),a=e("../../plots/template_attributes").hovertemplateAttrs,i=e("../../plots/template_attributes").texttemplateAttrs,o=e("../../components/colorscale/attributes"),s=e("../../plots/domain").attributes,l=e("../pie/attributes"),c=e("./constants"),u=e("../../lib/extend").extendFlat;t.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:u({colors:{valType:"data_array",editType:"calc"},line:{color:u({},l.marker.line.color,{dflt:null}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:l.hovertext,hoverinfo:u({},n.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:a({},{keys:c.eventDataKeys}),textfont:l.textfont,insidetextfont:l.insidetextfont,outsidetextfont:l.outsidetextfont,domain:s({name:"sunburst",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/domain":789,"../../plots/template_attributes":840,"../pie/attributes":1092,"./constants":1231}],1229:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="sunburst",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":825}],1230:[function(e,t,r){"use strict";var n=e("d3-hierarchy"),a=e("fast-isnumeric"),i=e("../../lib"),o=e("../../components/colorscale").makeColorScaleFuncFromTrace,s=e("../pie/calc").makePullColorFn,l=e("../pie/calc").generateExtendedColors,c=e("../../components/colorscale").calc,u={},d={};r.calc=function(e,t){var r,l,u,d,p,h,f=e._fullLayout,m=t.ids,g=i.isArrayOrTypedArray(m),v=t.labels,y=t.parents,b=t.values,_=i.isArrayOrTypedArray(b),x=[],w={},k={},M=function(e){return e||"number"==typeof e},T=function(e){return!_||a(b[e])&&b[e]>=0};g?(r=Math.min(m.length,y.length),l=function(e){return M(m[e])&&T(e)},u=function(e){return String(m[e])}):(r=Math.min(v.length,y.length),l=function(e){return M(v[e])&&T(e)},u=function(e){return String(v[e])}),_&&(r=Math.min(r,b.length));for(var C=0;C<r;C++)if(l(C)){var S=u(C),L=M(y[C])?String(y[C]):"",A={i:C,id:S,pid:L,label:M(v[C])?String(v[C]):""};_&&(A.v=+b[C]),x.push(A),p=S,w[d=L]?w[d].push(p):w[d]=[p],k[p]=1}if(w[""]){if(w[""].length>1){for(var E=i.randstr(),D=0;D<x.length;D++)""===x[D].pid&&(x[D].pid=E);x.unshift({hasMultipleRoots:!0,id:E,pid:"",label:""})}}else{var I,P=[];for(I in w)k[I]||P.push(I);if(1!==P.length)return i.warn("Multiple implied roots, cannot build "+t.type+" hierarchy.");I=P[0],x.unshift({hasImpliedRoot:!0,id:I,pid:"",label:I})}try{h=n.stratify().id((function(e){return e.id})).parentId((function(e){return e.pid}))(x)}catch(e){return i.warn("Failed to build "+t.type+" hierarchy. Error: "+e.message)}var O=n.hierarchy(h),R=!1;if(_)switch(t.branchvalues){case"remainder":O.sum((function(e){return e.data.v}));break;case"total":O.each((function(e){var t=e.data.data,r=t.v;if(e.children){var n=e.children.reduce((function(e,t){return e+t.data.data.v}),0);if((t.hasImpliedRoot||t.hasMultipleRoots)&&(r=n),r<n)return R=!0,i.warn(["Total value for node",e.data.data.id,"is smaller than the sum of its children.","\nparent value =",r,"\nchildren sum =",n].join(" "))}e.value=r}))}else!function e(t,r,n){var a=0,i=t.children;if(i){for(var o=i.length,s=0;s<o;s++)a+=e(i[s],r,n);n.branches&&a++}else n.leaves&&a++;return t.value=t.data.data.value=a,r._values||(r._values=[]),r._values[t.data.data.i]=a,a}(O,t,{branches:-1!==t.count.indexOf("branches"),leaves:-1!==t.count.indexOf("leaves")});if(!R){var F,z;O.sort((function(e,t){return t.value-e.value}));var N=t.marker.colors||[],j=!!N.length;return t._hasColorscale?(j||(N=_?t.values:t._values),c(e,t,{vals:N,containerStr:"marker",cLetter:"c"}),z=o(t.marker)):F=s(f["_"+t.type+"colormap"]),O.each((function(e){var r=e.data.data;r.color=t._hasColorscale?z(N[r.i]):F(N[r.i],r.id)})),x[0].hierarchy=O,x}},r._runCrossTraceCalc=function(e,t){var r=t._fullLayout,n=t.calcdata,a=r[e+"colorway"],i=r["_"+e+"colormap"];r["extend"+e+"colors"]&&(a=l(a,"treemap"===e?d:u));var o=0;function s(e){var t=e.data.data,r=t.id;!1===t.color&&(i[r]?t.color=i[r]:e.parent?e.parent.parent?t.color=e.parent.data.data.color:(i[r]=t.color=a[o%a.length],o++):t.color="rgba(0,0,0,0)")}for(var c=0;c<n.length;c++){var p=n[c][0];p.trace.type===e&&p.hierarchy&&p.hierarchy.each(s)}},r.crossTraceCalc=function(e){return r._runCrossTraceCalc("sunburst",e)}},{"../../components/colorscale":603,"../../lib":716,"../pie/calc":1094,"d3-hierarchy":158,"fast-isnumeric":227}],1231:[function(e,t,r){"use strict";t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},{}],1232:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../plots/domain").defaults,o=e("../bar/defaults").handleText,s=e("../../components/colorscale"),l=s.hasColorscale,c=s.handleDefaults;t.exports=function(e,t,r,s){function u(r,i){return n.coerce(e,t,a,r,i)}var d=u("labels"),p=u("parents");if(d&&d.length&&p&&p.length){var h=u("values");h&&h.length?u("branchvalues"):u("count"),u("level"),u("maxdepth"),u("marker.line.width")&&u("marker.line.color",s.paper_bgcolor),u("marker.colors");var f=t._hasColorscale=l(e,"marker","colors");f&&c(e,t,s,u,{prefix:"marker.",cLetter:"c"}),u("leaf.opacity",f?1:.7);var m=u("text");u("texttemplate"),t.texttemplate||u("textinfo",Array.isArray(m)?"text+label":"label"),u("hovertext"),u("hovertemplate"),o(e,t,s,u,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i(t,s,u),t._length=null}else t.visible=!1}},{"../../components/colorscale":603,"../../lib":716,"../../plots/domain":789,"../bar/defaults":859,"./attributes":1228}],1233:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../registry"),i=e("../../components/fx/helpers").appendArrayPointValue,o=e("../../components/fx"),s=e("../../lib"),l=e("../../lib/events"),c=e("./helpers"),u=e("../pie/helpers").formatPieValue;function d(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},o=0;o<r.length;o++){var s=r[o];s in e&&(a[s]=e[s])}return"parentString"in e&&!c.isHierarchyRoot(e)&&(a.parent=e.parentString),i(a,t,n.i),a}t.exports=function(e,t,r,i,p){var h=i[0],f=h.trace,m=h.hierarchy,g="sunburst"===f.type,v="treemap"===f.type;"_hasHoverLabel"in f||(f._hasHoverLabel=!1),"_hasHoverEvent"in f||(f._hasHoverEvent=!1),e.on("mouseover",(function(a){var i=r._fullLayout;if(!r._dragging&&!1!==i.hovermode){var l=r._fullData[f.index],y=a.data.data,b=y.i,_=c.isHierarchyRoot(a),x=c.getParent(m,a),w=c.getValue(a),k=function(e){return s.castOption(l,b,e)},M=k("hovertemplate"),T=o.castHoverinfo(l,i,b),C=i.separators;if(M||T&&"none"!==T&&"skip"!==T){var S,L;g&&(S=h.cx+a.pxmid[0]*(1-a.rInscribed),L=h.cy+a.pxmid[1]*(1-a.rInscribed)),v&&(S=a._hoverX,L=a._hoverY);var A,E={},D=[],I=[],P=function(e){return-1!==D.indexOf(e)};T&&(D="all"===T?l._module.attributes.hoverinfo.flags:T.split("+")),E.label=y.label,P("label")&&E.label&&I.push(E.label),y.hasOwnProperty("v")&&(E.value=y.v,E.valueLabel=u(E.value,C),P("value")&&I.push(E.valueLabel)),E.currentPath=a.currentPath=c.getPath(a.data),P("current path")&&!_&&I.push(E.currentPath);var O=[],R=function(){-1===O.indexOf(A)&&(I.push(A),O.push(A))};E.percentParent=a.percentParent=w/c.getValue(x),E.parent=a.parentString=c.getPtLabel(x),P("percent parent")&&(A=c.formatPercent(E.percentParent,C)+" of "+E.parent,R()),E.percentEntry=a.percentEntry=w/c.getValue(t),E.entry=a.entry=c.getPtLabel(t),!P("percent entry")||_||a.onPathbar||(A=c.formatPercent(E.percentEntry,C)+" of "+E.entry,R()),E.percentRoot=a.percentRoot=w/c.getValue(m),E.root=a.root=c.getPtLabel(m),P("percent root")&&!_&&(A=c.formatPercent(E.percentRoot,C)+" of "+E.root,R()),E.text=k("hovertext")||k("text"),P("text")&&(A=E.text,s.isValidTextValue(A)&&I.push(A));var F={trace:l,y:L,text:I.join("<br>"),name:M||P("name")?l.name:void 0,color:k("hoverlabel.bgcolor")||y.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:M,hovertemplateLabels:E,eventData:[d(a,l,p.eventDataKeys)]};g&&(F.x0=S-a.rInscribed*a.rpx1,F.x1=S+a.rInscribed*a.rpx1,F.idealAlign=a.pxmid[0]<0?"left":"right"),v&&(F.x=S,F.idealAlign=S<0?"left":"right"),o.loneHover(F,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}),f._hasHoverLabel=!0}if(v){var z=e.select("path.surface");p.styleOne(z,a,l,{hovered:!0})}f._hasHoverEvent=!0,r.emit("plotly_hover",{points:[d(a,l,p.eventDataKeys)],event:n.event})}})),e.on("mouseout",(function(t){var a=r._fullLayout,i=r._fullData[f.index],s=n.select(this).datum();if(f._hasHoverEvent&&(t.originalEvent=n.event,r.emit("plotly_unhover",{points:[d(s,i,p.eventDataKeys)],event:n.event}),f._hasHoverEvent=!1),f._hasHoverLabel&&(o.loneUnhover(a._hoverlayer.node()),f._hasHoverLabel=!1),v){var l=e.select("path.surface");p.styleOne(l,s,i,{hovered:!1})}})),e.on("click",(function(e){var t=r._fullLayout,i=r._fullData[f.index];if(!1===l.triggerHandler(r,"plotly_"+f.type+"click",{points:[d(e,i,p.eventDataKeys)],event:n.event})||g&&(c.isHierarchyRoot(e)||c.isLeaf(e)))t.hovermode&&(r._hoverdata=[d(e,i,p.eventDataKeys)],o.click(r,n.event));else if(!r._dragging&&!r._transitioning){a.call("_storeDirectGUIEdit",i,t._tracePreGUI[i.uid],{level:i.level});var s=c.getPtId(e),u=c.isEntry(e)?c.findEntryWithChild(m,s):c.findEntryWithLevel(m,s),h={data:[{level:c.getPtId(u)}],traces:[f.index]},v={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(t._hoverlayer.node()),a.call("animate",r,h,v)}}))}},{"../../components/fx":629,"../../components/fx/helpers":626,"../../lib":716,"../../lib/events":706,"../../registry":845,"../pie/helpers":1097,"./helpers":1234,d3:164}],1234:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../../lib/setcursor"),o=e("../pie/helpers");function s(e){return e.data.data.pid}r.findEntryWithLevel=function(e,t){var n;return t&&e.eachAfter((function(e){if(r.getPtId(e)===t)return n=e.copy()})),n||e},r.findEntryWithChild=function(e,t){var n;return e.eachAfter((function(e){for(var a=e.children||[],i=0;i<a.length;i++){var o=a[i];if(r.getPtId(o)===t)return n=e.copy()}})),n||e},r.isEntry=function(e){return!e.parent},r.isLeaf=function(e){return!e.children},r.getPtId=function(e){return e.data.data.id},r.getPtLabel=function(e){return e.data.data.label},r.getValue=function(e){return e.value},r.isHierarchyRoot=function(e){return""===s(e)},r.setSliceCursor=function(e,t,n){var a=n.isTransitioning;if(!a){var o=e.datum();a=n.hideOnRoot&&r.isHierarchyRoot(o)||n.hideOnLeaves&&r.isLeaf(o)}i(e,a?null:"pointer")},r.getInsideTextFontKey=function(e,t,r,a){var i=r.data.data.i;return n.castOption(t,i,"insidetextfont."+e)||n.castOption(t,i,"textfont."+e)||a.size},r.getOutsideTextFontKey=function(e,t,r,a){var i=r.data.data.i;return n.castOption(t,i,"outsidetextfont."+e)||n.castOption(t,i,"textfont."+e)||a.size},r.isOutsideText=function(e,t){return!e._hasColorscale&&r.isHierarchyRoot(t)},r.determineTextFont=function(e,t,i,o){return r.isOutsideText(e,t)?function(e,t,n){return{color:r.getOutsideTextFontKey("color",e,t,n),family:r.getOutsideTextFontKey("family",e,t,n),size:r.getOutsideTextFontKey("size",e,t,n)}}(e,t,i):function(e,t,i,o){var s=t.data.data,l=s.i,c=n.castOption(e,l,"insidetextfont.color");return!c&&e._input.textfont&&(c=n.castOption(e._input,l,"textfont.color")),{color:c||a.contrast(s.color),family:r.getInsideTextFontKey("family",o||e,t,i),size:r.getInsideTextFontKey("size",o||e,t,i)}}(e,t,i,o)},r.hasTransition=function(e){return!!(e&&e.duration>0)},r.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},r.isHeader=function(e,t){return!(r.isLeaf(e)||e.depth===t._maxDepth-1)},r.getParent=function(e,t){return r.findEntryWithLevel(e,s(t))},r.listPath=function(e,t){var n=e.parent;if(!n)return[];var a=t?[n.data[t]]:[n];return r.listPath(n,t).concat(a)},r.getPath=function(e){return r.listPath(e,"label").join("/")+"/"},r.formatValue=o.formatPieValue,r.formatPercent=function(e,t){var r=n.formatPercent(e,0);return"0%"===r&&(r=o.formatPiePercent(e,t)),r}},{"../../components/color":591,"../../lib":716,"../../lib/setcursor":736,"../pie/helpers":1097}],1235:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"sunburst",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot").plot,style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1136,"./attributes":1228,"./base_plot":1229,"./calc":1230,"./defaults":1232,"./layout_attributes":1236,"./layout_defaults":1237,"./plot":1238,"./style":1239}],1236:[function(e,t,r){"use strict";t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1237:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("sunburstcolorway",t.colorway),r("extendsunburstcolors")}},{"../../lib":716,"./layout_attributes":1236}],1238:[function(e,t,r){"use strict";var n=e("d3"),a=e("d3-hierarchy"),i=e("../../components/drawing"),o=e("../../lib"),s=e("../../lib/svg_text_utils"),l=e("../pie/plot").transformInsideText,c=e("./style").styleOne,u=e("./fx"),d=e("./constants"),p=e("./helpers");function h(e,t,h,f){var m=e._fullLayout,g=p.hasTransition(f),v=n.select(h).selectAll("g.slice"),y=t[0],b=y.trace,_=y.hierarchy,x=p.findEntryWithLevel(_,b.level),w=p.getMaxDepth(b),k=m._size,M=b.domain,T=k.w*(M.x[1]-M.x[0]),C=k.h*(M.y[1]-M.y[0]),S=.5*Math.min(T,C),L=y.cx=k.l+k.w*(M.x[1]+M.x[0])/2,A=y.cy=k.t+k.h*(1-M.y[0])-C/2;if(!x)return v.remove();var E=null,D={};g&&v.each((function(e){D[p.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!E&&p.isEntry(e)&&(E=e)}));var I=function(e){return a.partition().size([2*Math.PI,e.height+1])(e)}(x).descendants(),P=x.height+1,O=0,R=w;y.hasMultipleRoots&&p.isHierarchyRoot(x)&&(I=I.slice(1),P-=1,O=1,R+=1),I=I.filter((function(e){return e.y1<=R}));var F=Math.min(P,w),z=function(e){return(e-O)/F*S},N=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},j=function(e){return o.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,L,A)},B=function(e){return L+e.pxmid[0]*e.transform.rCenter+(e.transform.x||0)},Y=function(e){return A+e.pxmid[1]*e.transform.rCenter+(e.transform.y||0)};(v=v.data(I,p.getPtId)).enter().append("g").classed("slice",!0),g?v.exit().transition().each((function(){var e=n.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,r=p.getPtId(e),a=D[r],i=D[p.getPtId(x)];if(i){var o=e.x1>i.x1?2*Math.PI:0;t=e.rpx1<i.rpx1?{rpx0:0,rpx1:0}:{x0:o,x1:o}}else{var s,l=p.getPtId(e.parent);v.each((function(e){if(p.getPtId(e)===l)return s=e}));var c,u=s.children;u.forEach((function(e,t){if(p.getPtId(e)===r)return c=t}));var d=u.length,h=n.interpolate(s.x0,s.x1);t={rpx0:S,rpx1:S,x0:h(c/d),x1:h((c+1)/d)}}return n.interpolate(a,t)}(e);return function(e){return j(t(e))}})),e.select("g.slicetext").attr("opacity",0)})).remove():v.exit().remove(),v.order();var H=null;if(g&&E){var V=p.getPtId(E);v.each((function(e){null===H&&p.getPtId(e)===V&&(H=e.x1)}))}var U=v;function W(e){var t=e.parent,r=D[p.getPtId(t)],a={};if(r){var i=t.children,o=i.indexOf(e),s=i.length,l=n.interpolate(r.x0,r.x1);a.x0=l(o/s),a.x1=l(o/s)}else a.x0=a.x1=0;return a}g&&(U=U.transition().each("end",(function(){var t=n.select(this);p.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})}))),U.each((function(a){var h=n.select(this),f=o.ensureSingle(h,"path","surface",(function(e){e.style("pointer-events","all")}));a.rpx0=z(a.y0),a.rpx1=z(a.y1),a.xmid=(a.x0+a.x1)/2,a.pxmid=N(a.rpx1,a.xmid),a.midangle=-(a.xmid-Math.PI/2),a.halfangle=.5*Math.min(o.angleDelta(a.x0,a.x1)||Math.PI,Math.PI),a.ring=1-a.rpx0/a.rpx1,a.rInscribed=function(e){return 0===e.rpx0&&o.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}(a),g?f.transition().attrTween("d",(function(e){var t=function(e){var t,r=D[p.getPtId(e)],a={x0:e.x0,x1:e.x1,rpx0:e.rpx0,rpx1:e.rpx1};if(r)t=r;else if(E)if(e.parent)if(H){var i=e.x1>H?2*Math.PI:0;t={x0:i,x1:i}}else t={rpx0:S,rpx1:S},o.extendFlat(t,W(e));else t={rpx0:0,rpx1:0};else t={x0:0,x1:0};return n.interpolate(t,a)}(e);return function(e){return j(t(e))}})):f.attr("d",j),h.call(u,x,e,t,{eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(p.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),f.call(c,a,b);var v=o.ensureSingle(h,"g","slicetext"),_=o.ensureSingle(v,"text","",(function(e){e.attr("data-notex",1)}));_.text(r.formatSliceLabel(a,x,b,t,m)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,p.determineTextFont(b,a,m.font)).call(s.convertToTspans,e);var w=i.bBox(_.node());a.transform=l(w,a,y),a.translateX=B(a),a.translateY=Y(a);var k=function(e,t){return"translate("+e.translateX+","+e.translateY+")"+(e.transform.scale<1?"scale("+e.transform.scale+")":"")+(e.transform.rotate?"rotate("+e.transform.rotate+")":"")+"translate("+-(t.left+t.right)/2+","+-(t.top+t.bottom)/2+")"};g?_.transition().attrTween("transform",(function(e){var t=function(e){var t,r=D[p.getPtId(e)],a=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{scale:0,rotate:a.rotate,rCenter:a.rCenter,x:a.x,y:a.y}},E)if(e.parent)if(H){var i=e.x1>H?2*Math.PI:0;t.x0=t.x1=i}else o.extendFlat(t,W(e));else t.x0=t.x1=0;else t.x0=t.x1=0;var s=n.interpolate(t.rpx1,e.rpx1),l=n.interpolate(t.x0,e.x0),c=n.interpolate(t.x1,e.x1),u=n.interpolate(t.transform.scale,a.scale),d=n.interpolate(t.transform.rotate,a.rotate),h=0===a.rCenter?3:0===t.transform.rCenter?1/3:1,f=n.interpolate(t.transform.rCenter,a.rCenter);return function(e){var t=s(e),r=l(e),n=c(e),i=function(e){return f(Math.pow(e,h))}(e),o={pxmid:N(t,(r+n)/2),transform:{rCenter:i,x:a.x,y:a.y}};return{rpx1:s(e),translateX:B(o),translateY:Y(o),transform:{scale:u(e),rotate:d(e),rCenter:i}}}}(e);return function(e){return k(t(e),w)}})):_.attr("transform",k(a,w))}))}r.plot=function(e,t,r,a){var i,o,s=e._fullLayout._sunburstlayer,l=!r,c=p.hasTransition(r);(i=s.selectAll("g.trace.sunburst").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),i.order(),c?(a&&(o=a()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){s.selectAll("g.trace").each((function(t){h(e,t,this,r)}))}))):i.each((function(t){h(e,t,this,r)})),l&&i.exit().remove()},r.formatSliceLabel=function(e,t,r,n,a){var i=r.texttemplate,s=r.textinfo;if(!(i||s&&"none"!==s))return"";var l=a.separators,c=n[0],u=e.data.data,d=c.hierarchy,h=p.isHierarchyRoot(e),f=p.getParent(d,e),m=p.getValue(e);if(!i){var g,v=s.split("+"),y=function(e){return-1!==v.indexOf(e)},b=[];if(y("label")&&u.label&&b.push(u.label),u.hasOwnProperty("v")&&y("value")&&b.push(p.formatValue(u.v,l)),!h){y("current path")&&b.push(p.getPath(e.data));var _=0;y("percent parent")&&_++,y("percent entry")&&_++,y("percent root")&&_++;var x=_>1;if(_){var w,k=function(e){g=p.formatPercent(w,l),x&&(g+=" of "+e),b.push(g)};y("percent parent")&&!h&&(w=m/p.getValue(f),k("parent")),y("percent entry")&&(w=m/p.getValue(t),k("entry")),y("percent root")&&(w=m/p.getValue(d),k("root"))}}return y("text")&&(g=o.castOption(r,u.i,"text"),o.isValidTextValue(g)&&b.push(g)),b.join("<br>")}var M=o.castOption(r,u.i,"texttemplate");if(!M)return"";var T={};u.label&&(T.label=u.label),u.hasOwnProperty("v")&&(T.value=u.v,T.valueLabel=p.formatValue(u.v,l)),T.currentPath=p.getPath(e.data),h||(T.percentParent=m/p.getValue(f),T.percentParentLabel=p.formatPercent(T.percentParent,l),T.parent=p.getPtLabel(f)),T.percentEntry=m/p.getValue(t),T.percentEntryLabel=p.formatPercent(T.percentEntry,l),T.entry=p.getPtLabel(t),T.percentRoot=m/p.getValue(d),T.percentRootLabel=p.formatPercent(T.percentRoot,l),T.root=p.getPtLabel(d),u.hasOwnProperty("color")&&(T.color=u.color);var C=o.castOption(r,u.i,"text");return(o.isValidTextValue(C)||""===C)&&(T.text=C),T.customdata=o.castOption(r,u.i,"customdata"),o.texttemplateString(M,T,a._d3locale,T,r._meta||{})}},{"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../pie/plot":1101,"./constants":1231,"./fx":1233,"./helpers":1234,"./style":1239,d3:164,"d3-hierarchy":158}],1239:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/color"),i=e("../../lib");function o(e,t,r){var n=t.data.data,o=!t.children,s=n.i,l=i.castOption(r,s,"marker.line.color")||a.defaultLine,c=i.castOption(r,s,"marker.line.width")||0;e.style("stroke-width",c).call(a.fill,n.color).call(a.stroke,l).style("opacity",o?r.leaf.opacity:null)}t.exports={style:function(e){e._fullLayout._sunburstlayer.selectAll(".trace").each((function(e){var t=n.select(this),r=e[0].trace;t.style("opacity",r.opacity),t.selectAll("path.surface").each((function(e){n.select(this).call(o,e,r)}))}))},styleOne:o}},{"../../components/color":591,"../../lib":716,d3:164}],1240:[function(e,t,r){"use strict";var n=e("../../components/color"),a=e("../../components/colorscale/attributes"),i=e("../../plots/template_attributes").hovertemplateAttrs,o=e("../../plots/attributes"),s=e("../../lib/extend").extendFlat,l=e("../../plot_api/edit_types").overrideAll;function c(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:n.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:n.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var u=t.exports=l(s({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:i(),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},a("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},_deprecated:{zauto:s({},a.zauto,{}),zmin:s({},a.zmin,{}),zmax:s({},a.zmax,{})},hoverinfo:s({},o.hoverinfo)}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/color":591,"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../../plots/template_attributes":840}],1241:[function(e,t,r){"use strict";var n=e("../../components/colorscale/calc");t.exports=function(e,t){t.surfacecolor?n(e,t,{vals:t.surfacecolor,containerStr:"",cLetter:"c"}):n(e,t,{vals:t.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":599}],1242:[function(e,t,r){"use strict";var n=e("gl-surface3d"),a=e("ndarray"),i=e("ndarray-homography"),o=e("ndarray-fill"),s=e("../../lib").isArrayOrTypedArray,l=e("../../lib/gl_format_color").parseColorScale,c=e("../../lib/str2rgbarray"),u=e("../../components/colorscale").extractOpts,d=e("../heatmap/interp2d"),p=e("../heatmap/find_empties");function h(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var f=h.prototype;f.getXat=function(e,t,r,n){var a=s(this.data.x)?s(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return void 0===r?a:n.d2l(a,0,r)},f.getYat=function(e,t,r,n){var a=s(this.data.y)?s(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return void 0===r?a:n.d2l(a,0,r)},f.getZat=function(e,t,r,n){var a=this.data.z[t][e];return null===a&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[t][e]),void 0===r?a:n.d2l(a,0,r)},f.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var i=0;i<3;i++){var o=e.dataCoordinate[i];null!=o&&(e.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[a]&&void 0!==s[a][n]?e.textLabel=s[a][n]:e.textLabel=s||"",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};var m=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(e,t){if(e<t)return 0;for(var r=0;0===Math.floor(e%t);)e/=t,r++;return r}function v(e){for(var t=[],r=0;r<m.length;r++){var n=m[r];t.push(g(e,n))}return t}function y(e){for(var t=v(e),r=e,n=0;n<m.length;n++)if(t[n]>0){r=m[n];break}return r}function b(e,t){if(!(e<1||t<1)){for(var r=v(e),n=v(t),a=1,i=0;i<m.length;i++)a*=Math.pow(m[i],Math.max(r[i],n[i]));return a}}f.calcXnums=function(e){var t,r=[];for(t=1;t<e;t++){var n=this.getXat(t-1,0),a=this.getXat(t,0);r[t-1]=a!==n&&null!=n&&null!=a?Math.abs(a-n):0}var i=0;for(t=1;t<e;t++)i+=r[t-1];for(t=1;t<e;t++)0===r[t-1]?r[t-1]=1:r[t-1]=Math.round(i/r[t-1]);return r},f.calcYnums=function(e){var t,r=[];for(t=1;t<e;t++){var n=this.getYat(0,t-1),a=this.getYat(0,t);r[t-1]=a!==n&&null!=n&&null!=a?Math.abs(a-n):0}var i=0;for(t=1;t<e;t++)i+=r[t-1];for(t=1;t<e;t++)0===r[t-1]?r[t-1]=1:r[t-1]=Math.round(i/r[t-1]);return r};var _=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],x=_[9],w=_[13];function k(e,t){for(var r=!1,n=0;n<e.length;n++)if(t===e[n]){r=!0;break}!1===r&&e.push(t)}f.estimateScale=function(e,t){for(var r=1+function(e){if(0!==e.length){for(var t=1,r=0;r<e.length;r++)t=b(t,e[r]);return t}}(0===t?this.calcXnums(e):this.calcYnums(e));r<x;)r*=2;for(;r>w;)r--,r/=y(r),++r<x&&(r=w);var n=Math.round(r/e);return n>1?n:1},f.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,n=e[0].shape[0],o=e[0].shape[1],s=0|Math.floor(e[0].shape[0]*t+1),l=0|Math.floor(e[0].shape[1]*r+1),c=1+n+1,u=1+o+1,d=a(new Float32Array(c*u),[c,u]),p=0;p<e.length;++p){this.surface.padField(d,e[p]);var h=a(new Float32Array(s*l),[s,l]);i(h,d,[t,0,0,0,r,0,0,0,1]),e[p]=h}},f.setContourLevels=function(){var e,t,r,n=[[],[],[]],a=[!1,!1,!1],i=!1;for(e=0;e<3;++e)if(this.showContour[e]&&(i=!0,this.contourSize[e]>0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(a[e]=!0,t=this.contourStart[e];t<this.contourEnd[e];t+=this.contourSize[e])r=t*this.scene.dataScale[e],k(n[e],r);if(i){var o=[[],[],[]];for(e=0;e<3;++e)this.showContour[e]&&(o[e]=a[e]?n[e]:this.scene.contourLevels[e]);this.surface.update({levels:o})}},f.update=function(e){var t,r,n,i,s=this.scene,h=s.fullSceneLayout,f=this.surface,m=e.opacity,g=l(e,m),v=s.dataScale,y=e.z[0].length,b=e._ylength,_=s.contourLevels;this.data=e;var x=[];for(t=0;t<3;t++)for(x[t]=[],r=0;r<y;r++)x[t][r]=[];for(r=0;r<y;r++)for(n=0;n<b;n++)x[0][r][n]=this.getXat(r,n,e.xcalendar,h.xaxis),x[1][r][n]=this.getYat(r,n,e.ycalendar,h.yaxis),x[2][r][n]=this.getZat(r,n,e.zcalendar,h.zaxis);if(e.connectgaps)for(e._emptypoints=p(x[2]),d(x[2],e._emptypoints),e._interpolatedZ=[],r=0;r<y;r++)for(e._interpolatedZ[r]=[],n=0;n<b;n++)e._interpolatedZ[r][n]=x[2][r][n];for(t=0;t<3;t++)for(r=0;r<y;r++)for(n=0;n<b;n++)null==(i=x[t][r][n])?x[t][r][n]=NaN:i=x[t][r][n]*=v[t];for(t=0;t<3;t++)for(r=0;r<y;r++)for(n=0;n<b;n++)null!=(i=x[t][r][n])&&(this.minValues[t]>i&&(this.minValues[t]=i),this.maxValues[t]<i&&(this.maxValues[t]=i));for(t=0;t<3;t++)this.objectOffset[t]=.5*(this.minValues[t]+this.maxValues[t]);for(t=0;t<3;t++)for(r=0;r<y;r++)for(n=0;n<b;n++)null!=(i=x[t][r][n])&&(x[t][r][n]-=this.objectOffset[t]);var k=[a(new Float32Array(y*b),[y,b]),a(new Float32Array(y*b),[y,b]),a(new Float32Array(y*b),[y,b])];o(k[0],(function(e,t){return x[0][e][t]})),o(k[1],(function(e,t){return x[1][e][t]})),o(k[2],(function(e,t){return x[2][e][t]})),x=[];var M={colormap:g,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!e.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacity:e.opacity},T=u(e);if(M.intensityBounds=[T.min,T.max],e.surfacecolor){var C=a(new Float32Array(y*b),[y,b]);o(C,(function(t,r){return e.surfacecolor[r][t]})),k.push(C)}else M.intensityBounds[0]*=v[2],M.intensityBounds[1]*=v[2];(w<k[0].shape[0]||w<k[0].shape[1])&&(this.refineData=!1),!0===this.refineData&&(this.dataScaleX=this.estimateScale(k[0].shape[0],0),this.dataScaleY=this.estimateScale(k[0].shape[1],1),1===this.dataScaleX&&1===this.dataScaleY||this.refineCoords(k)),e.surfacecolor&&(M.intensity=k.pop());var S=[!0,!0,!0],L=["x","y","z"];for(t=0;t<3;++t){var A=e.contours[L[t]];S[t]=A.highlight,M.showContour[t]=A.show||A.highlight,M.showContour[t]&&(M.contourProject[t]=[A.project.x,A.project.y,A.project.z],A.show?(this.showContour[t]=!0,M.levels[t]=_[t],f.highlightColor[t]=M.contourColor[t]=c(A.color),A.usecolormap?f.highlightTint[t]=M.contourTint[t]=0:f.highlightTint[t]=M.contourTint[t]=1,M.contourWidth[t]=A.width,this.contourStart[t]=A.start,this.contourEnd[t]=A.end,this.contourSize[t]=A.size):(this.showContour[t]=!1,this.contourStart[t]=null,this.contourEnd[t]=null,this.contourSize[t]=0),A.highlight&&(M.dynamicColor[t]=c(A.highlightcolor),M.dynamicWidth[t]=A.highlightwidth))}(function(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]})(g)&&(M.vertexColor=!0),M.objectOffset=this.objectOffset,M.coords=k,f.update(M),f.visible=e.visible,f.enableDynamic=S,f.enableHighlight=S,f.snapToData=!0,"lighting"in e&&(f.ambientLight=e.lighting.ambient,f.diffuseLight=e.lighting.diffuse,f.specularLight=e.lighting.specular,f.roughness=e.lighting.roughness,f.fresnel=e.lighting.fresnel),"lightposition"in e&&(f.lightPosition=[e.lightposition.x,e.lightposition.y,e.lightposition.z]),m&&m<1&&(f.supportsTransparency=!0)},f.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},t.exports=function(e,t){var r=e.glplot.gl,a=n({gl:r}),i=new h(e,a,t.uid);return a._trace=i,i.update(t),e.glplot.add(a),i}},{"../../components/colorscale":603,"../../lib":716,"../../lib/gl_format_color":713,"../../lib/str2rgbarray":739,"../heatmap/find_empties":1004,"../heatmap/interp2d":1007,"gl-surface3d":317,ndarray:451,"ndarray-fill":441,"ndarray-homography":443}],1243:[function(e,t,r){"use strict";var n=e("../../registry"),a=e("../../lib"),i=e("../../components/colorscale/defaults"),o=e("./attributes");function s(e,t,r){t in e&&!(r in e)&&(e[r]=e[t])}t.exports=function(e,t,r,l){var c,u;function d(r,n){return a.coerce(e,t,o,r,n)}var p=d("x"),h=d("y"),f=d("z");if(!f||!f.length||p&&p.length<1||h&&h.length<1)t.visible=!1;else{t._xlength=Array.isArray(p)&&a.isArrayOrTypedArray(p[0])?f.length:f[0].length,t._ylength=f.length,n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],l),d("text"),d("hovertext"),d("hovertemplate"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach((function(e){d(e)}));var m=d("surfacecolor"),g=["x","y","z"];for(c=0;c<3;++c){var v="contours."+g[c],y=d(v+".show"),b=d(v+".highlight");if(y||b)for(u=0;u<3;++u)d(v+".project."+g[u]);y&&(d(v+".color"),d(v+".width"),d(v+".usecolormap")),b&&(d(v+".highlightcolor"),d(v+".highlightwidth")),d(v+".start"),d(v+".end"),d(v+".size")}m||(s(e,"zmin","cmin"),s(e,"zmax","cmax"),s(e,"zauto","cauto")),i(e,t,l,d,{prefix:"",cLetter:"c"}),t._length=null}}},{"../../components/colorscale/defaults":601,"../../lib":716,"../../registry":845,"./attributes":1240}],1244:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),colorbar:{min:"cmin",max:"cmax"},calc:e("./calc"),plot:e("./convert"),moduleType:"trace",name:"surface",basePlotModule:e("../../plots/gl3d"),categories:["gl3d","2dMap"],meta:{}}},{"../../plots/gl3d":804,"./attributes":1240,"./calc":1241,"./convert":1242,"./defaults":1243}],1245:[function(e,t,r){"use strict";var n=e("../../components/annotations/attributes"),a=e("../../lib/extend").extendFlat,i=e("../../plot_api/edit_types").overrideAll,o=e("../../plots/font_attributes"),s=e("../../plots/domain").attributes;e("../../constants/docs").FORMAT_LINK,(t.exports=i({domain:s({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[]},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:a({},n.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:a({},o({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[]},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:a({},n.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:a({},o({arrayOk:!0}))}},"calc","from-root")).transforms=void 0},{"../../components/annotations/attributes":574,"../../constants/docs":687,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/domain":789,"../../plots/font_attributes":790}],1246:[function(e,t,r){"use strict";var n=e("../../plots/get_data").getModuleCalcData,a=e("./plot");r.name="table",r.plot=function(e){var t=n(e.calcdata,"table")[0];t.length&&a(e,t)},r.clean=function(e,t,r,n){var a=n._has&&n._has("table"),i=t._has&&t._has("table");a&&!i&&n._paperdiv.selectAll(".table").remove()}},{"../../plots/get_data":799,"./plot":1253}],1247:[function(e,t,r){"use strict";var n=e("../../lib/gup").wrap;t.exports=function(){return n({})}},{"../../lib/gup":714}],1248:[function(e,t,r){"use strict";t.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},{}],1249:[function(e,t,r){"use strict";var n=e("./constants"),a=e("../../lib/extend").extendFlat,i=e("fast-isnumeric");function o(e){if(Array.isArray(e)){for(var t=0,r=0;r<e.length;r++)t=Math.max(t,o(e[r]));return t}return e}function s(e,t){return e+t}function l(e){var t,r=e.slice(),n=1/0,a=0;for(t=0;t<r.length;t++)Array.isArray(r[t])||(r[t]=[r[t]]),n=Math.min(n,r[t].length),a=Math.max(a,r[t].length);if(n!==a)for(t=0;t<r.length;t++){var i=a-r[t].length;i&&(r[t]=r[t].concat(c(i)))}return r}function c(e){for(var t=new Array(e),r=0;r<e;r++)t[r]="";return t}function u(e){return e.calcdata.columns.reduce((function(t,r){return r.xIndex<e.xIndex?t+r.columnWidth:t}),0)}function d(e,t){return Object.keys(e).map((function(r){return a({},e[r],{auxiliaryBlocks:t})}))}function p(e,t){for(var r,n={},a=0,i=0,o={firstRowIndex:null,lastRowIndex:null,rows:[]},s=0,l=0,c=0;c<e.length;c++)r=e[c],o.rows.push({rowIndex:c,rowHeight:r}),((i+=r)>=t||c===e.length-1)&&(n[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},a+=i,s=c+1,i=0);return n}t.exports=function(e,t){var r=l(t.cells.values),h=function(e){return e.slice(t.header.values.length,e.length)},f=l(t.header.values);f.length&&!f[0].length&&(f[0]=[""],f=l(f));var m=f.concat(h(r).map((function(){return c((f[0]||[""]).length)}))),g=t.domain,v=Math.floor(e._fullLayout._size.w*(g.x[1]-g.x[0])),y=Math.floor(e._fullLayout._size.h*(g.y[1]-g.y[0])),b=t.header.values.length?m[0].map((function(){return t.header.height})):[n.emptyHeaderHeight],_=r.length?r[0].map((function(){return t.cells.height})):[],x=b.reduce(s,0),w=p(_,y-x+n.uplift),k=d(p(b,x),[]),M=d(w,k),T={},C=t._fullInput.columnorder.concat(h(r.map((function(e,t){return t})))),S=m.map((function(e,r){var n=Array.isArray(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return i(n)?Number(n):1})),L=S.reduce(s,0);S=S.map((function(e){return e/L*v}));var A=Math.max(o(t.header.line.width),o(t.cells.line.width)),E={key:t.uid+e._context.staticPlot,translateX:g.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-g.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:A,height:y,columnOrder:C,groupHeight:y,rowBlocks:M,headerRowBlocks:k,scrollY:0,cells:a({},t.cells,{values:r}),headerCells:a({},t.header,{values:m}),gdColumns:m.map((function(e){return e[0]})),gdColumnsOriginalOrder:m.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:m.map((function(e,t){var r=T[e];return T[e]=(r||0)+1,{key:e+"__"+T[e],label:e,specIndex:t,xIndex:C[t],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[t]}}))};return E.columns.forEach((function(e){e.calcdata=E,e.x=u(e)})),E}},{"../../lib/extend":707,"./constants":1248,"fast-isnumeric":227}],1250:[function(e,t,r){"use strict";var n=e("../../lib/extend").extendFlat;r.splitToPanels=function(e){var t=[0,0],r=n({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:n({},e.calcdata,{cells:e.calcdata.headerCells})});return[n({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),r]},r.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}}))}},{"../../lib/extend":707}],1251:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../plots/domain").defaults;t.exports=function(e,t,r,o){function s(r,i){return n.coerce(e,t,a,r,i)}i(t,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),n.coerceFont(s,"header.font",n.extendFlat({},o.font)),function(e,t){for(var r=e.columnorder||[],n=e.header.values.length,a=r.slice(0,n),i=a.slice().sort((function(e,t){return e-t})),o=a.map((function(e){return i.indexOf(e)})),s=o.length;s<n;s++)o.push(s);t("columnorder",o)}(t,s),s("cells.values"),s("cells.format"),s("cells.align"),s("cells.prefix"),s("cells.suffix"),s("cells.height"),s("cells.line.width"),s("cells.line.color"),s("cells.fill.color"),n.coerceFont(s,"cells.font",n.extendFlat({},o.font)),t._length=null}},{"../../lib":716,"../../plots/domain":789,"./attributes":1245}],1252:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("./calc"),plot:e("./plot"),moduleType:"trace",name:"table",basePlotModule:e("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1245,"./base_plot":1246,"./calc":1247,"./defaults":1251,"./plot":1253}],1253:[function(e,t,r){"use strict";var n=e("./constants"),a=e("d3"),i=e("../../lib/gup"),o=e("../../components/drawing"),s=e("../../lib/svg_text_utils"),l=e("../../lib").raiseToTop,c=e("../../lib").cancelTransition,u=e("./data_preparation_helper"),d=e("./data_split_helpers"),p=e("../../components/color");function h(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function f(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function m(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function g(e){return[].concat.apply([],e.map((function(e){return e}))).map((function(e){return e.__data__}))}function v(e,t,r){var o=e.selectAll("."+n.cn.scrollbarKit).data(i.repeat,i.keyFun);o.enter().append("g").classed(n.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),o.each((function(e){var t=e.scrollbarState;t.totalHeight=function(e){var t=e.rowBlocks;return P(t,t.length-1)+(t.length?O(t[t.length-1],1/0):1)}(e),t.scrollableAreaHeight=e.groupHeight-T(e),t.currentlyVisibleHeight=Math.min(t.totalHeight,t.scrollableAreaHeight),t.ratio=t.currentlyVisibleHeight/t.totalHeight,t.barLength=Math.max(t.ratio*t.currentlyVisibleHeight,n.goldenRatio*n.scrollbarWidth),t.barWiggleRoom=t.currentlyVisibleHeight-t.barLength,t.wiggleRoom=Math.max(0,t.totalHeight-t.scrollableAreaHeight),t.topY=0===t.barWiggleRoom?0:e.scrollY/t.wiggleRoom*t.barWiggleRoom,t.bottomY=t.topY+t.barLength,t.dragMultiplier=t.wiggleRoom/t.barWiggleRoom})).attr("transform",(function(e){return"translate("+(e.width+n.scrollbarWidth/2+n.scrollbarOffset)+" "+T(e)+")"}));var s=o.selectAll("."+n.cn.scrollbar).data(i.repeat,i.keyFun);s.enter().append("g").classed(n.cn.scrollbar,!0);var l=s.selectAll("."+n.cn.scrollbarSlider).data(i.repeat,i.keyFun);l.enter().append("g").classed(n.cn.scrollbarSlider,!0),l.attr("transform",(function(e){return"translate(0 "+(e.scrollbarState.topY||0)+")"}));var c=l.selectAll("."+n.cn.scrollbarGlyph).data(i.repeat,i.keyFun);c.enter().append("line").classed(n.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",n.scrollbarWidth).attr("stroke-linecap","round").attr("y1",n.scrollbarWidth/2),c.attr("y2",(function(e){return e.scrollbarState.barLength-n.scrollbarWidth/2})).attr("stroke-opacity",(function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||r?0:.4})),c.transition().delay(0).duration(0),c.transition().delay(n.scrollbarHideDelay).duration(n.scrollbarHideDuration).attr("stroke-opacity",0);var u=s.selectAll("."+n.cn.scrollbarCaptureZone).data(i.repeat,i.keyFun);u.enter().append("line").classed(n.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",n.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",(function(r){var n=a.event.y,i=this.getBoundingClientRect(),o=r.scrollbarState,s=n-i.top,l=a.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||S(t,e,null,l(s-o.barLength/2))(r)})).call(a.behavior.drag().origin((function(e){return a.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e})).on("drag",S(t,e)).on("dragend",(function(){}))),u.attr("y2",(function(e){return e.scrollbarState.scrollableAreaHeight})),t._context.staticPlot&&(c.remove(),u.remove())}function y(e,t,r,s){var l=function(e){var t=e.selectAll("."+n.cn.columnCell).data(d.splitToCells,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(n.cn.columnCell,!0),t.exit().remove(),t}(function(e){var t=e.selectAll("."+n.cn.columnCells).data(i.repeat,i.keyFun);return t.enter().append("g").classed(n.cn.columnCells,!0),t.exit().remove(),t}(r));!function(e){e.each((function(e,t){var r=e.calcdata.cells.font,n=e.column.specIndex,a={size:x(r.size,n,t),color:x(r.color,n,t),family:x(r.family,n,t)};e.rowNumber=e.key,e.align=x(e.calcdata.cells.align,n,t),e.cellBorderWidth=x(e.calcdata.cells.line.width,n,t),e.font=a}))}(l),function(e){e.attr("width",(function(e){return e.column.columnWidth})).attr("stroke-width",(function(e){return e.cellBorderWidth})).each((function(e){var t=a.select(this);p.stroke(t,x(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),p.fill(t,x(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))}))}(function(e){var t=e.selectAll("."+n.cn.cellRect).data(i.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("rect").classed(n.cn.cellRect,!0),t}(l));var c=function(e){var t=e.selectAll("."+n.cn.cellText).data(i.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("text").classed(n.cn.cellText,!0).style("cursor",(function(){return"auto"})).on("mousedown",(function(){a.event.stopPropagation()})),t}(function(e){var t=e.selectAll("."+n.cn.cellTextHolder).data(i.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(n.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}(l));!function(e){e.each((function(e){o.font(a.select(this),e.font)}))}(c),b(c,t,s,e),I(l)}function b(e,t,r,i){e.text((function(e){var t=e.column.specIndex,r=e.rowNumber,i=e.value,o="string"==typeof i,s=o&&i.match(/<br>/i),l=!o||s;e.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u="string"==typeof(c=i)&&c.match(n.latexCheck);e.latex=u;var d,p,h=u?"":x(e.calcdata.cells.prefix,t,r)||"",f=u?"":x(e.calcdata.cells.suffix,t,r)||"",m=u?null:x(e.calcdata.cells.format,t,r)||null,g=h+(m?a.format(m)(e.value):e.value)+f;if(e.wrappingNeeded=!e.wrapped&&!l&&!u&&(d=_(g)),e.cellHeightMayIncrease=s||u||e.mayHaveMarkup||(void 0===d?_(g):d),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var v=(" "===n.wrapSplitCharacter?g.replace(/<a href=/gi,"<a_href="):g).split(n.wrapSplitCharacter),y=" "===n.wrapSplitCharacter?v.map((function(e){return e.replace(/<a_href=/gi,"<a href=")})):v;e.fragments=y.map((function(e){return{text:e,width:null}})),e.fragments.push({fragment:n.wrapSpacer,width:null}),p=y.join(n.lineBreaker)+n.lineBreaker+n.wrapSpacer}else delete e.fragments,p=g;return p})).attr("dy",(function(e){return e.needsConvertToTspans?0:"0.75em"})).each((function(e){var o=a.select(this),l=e.wrappingNeeded?A:E;e.needsConvertToTspans?s.convertToTspans(o,i,l(r,this,t,i,e)):a.select(this.parentNode).attr("transform",(function(e){return"translate("+D(e)+" "+n.cellPad+")"})).attr("text-anchor",(function(e){return{left:"start",center:"middle",right:"end"}[e.align]}))}))}function _(e){return-1!==e.indexOf(n.wrapSplitCharacter)}function x(e,t,r){if(Array.isArray(e)){var n=e[Math.min(t,e.length-1)];return Array.isArray(n)?n[Math.min(r,n.length-1)]:n}return e}function w(e,t,r){e.transition().ease(n.releaseTransitionEase).duration(n.releaseTransitionDuration).attr("transform","translate("+t.x+" "+r+")")}function k(e){return"cells"===e.type}function M(e){return"header"===e.type}function T(e){return(e.rowBlocks.length?e.rowBlocks[0].auxiliaryBlocks:[]).reduce((function(e,t){return e+O(t,1/0)}),0)}function C(e,t,r){var n=g(t)[0];if(void 0!==n){var a=n.rowBlocks,i=n.calcdata,o=P(a,a.length),s=n.calcdata.groupHeight-T(n),l=i.scrollY=Math.max(0,Math.min(o-s,i.scrollY)),c=function(e,t,r){for(var n=[],a=0,i=0;i<e.length;i++){for(var o=e[i],s=o.rows,l=0,c=0;c<s.length;c++)l+=s[c].rowHeight;o.allRowsHeight=l,t<a+l&&t+r>a&&n.push(i),a+=l}return n}(a,l,s);1===c.length&&(c[0]===a.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each((function(e,t){e.page=c[t],e.scrollY=l})),t.attr("transform",(function(e){return"translate(0 "+(P(e.rowBlocks,e.page)-e.scrollY)+")"})),e&&(L(e,r,t,c,n.prevPages,n,0),L(e,r,t,c,n.prevPages,n,1),v(r,e))}}function S(e,t,r,i){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter((function(e){return s.key===e.key})),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===i?s.scrollY+c*a.event.dy:i;var d=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return C(e,d,l),s.scrollY===u}}function L(e,t,r,n,a,i,o){n[o]!==a[o]&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout((function(){var i=r.filter((function(e,t){return t===o&&n[t]!==a[t]}));y(e,t,i,r),a[o]=n[o]})))}function A(e,t,r,i){return function(){var o=a.select(t.parentNode);o.each((function(e){var t=e.fragments;o.selectAll("tspan.line").each((function(e,r){t[r].width=this.getComputedTextLength()}));var r,a,i=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*n.cellPad;for(e.value="";s.length;)c+(a=(r=s.shift()).width+i)>u&&(e.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=a;c&&(e.value+=l.join(n.wrapSpacer)),e.wrapped=!0})),o.selectAll("tspan.line").remove(),b(o.select("."+n.cn.cellText),r,e,i),a.select(t.parentNode.parentNode).call(I)}}function E(e,t,r,i,o){return function(){if(!o.settledY){var s=a.select(t.parentNode),l=F(o),c=o.key-l.firstRowIndex,u=l.rows[c].rowHeight,d=o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*n.cellPad:u,p=Math.max(d,u);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,e.selectAll("."+n.cn.columnCell).call(I),C(null,e.filter(k),0),v(r,i,!0)),s.attr("transform",(function(){var e=this.parentNode.getBoundingClientRect(),t=a.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),i=t.top-e.top+(r?r.matrix.f:n.cellPad);return"translate("+D(o,a.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width)+" "+i+")"})),o.settledY=!0}}}function D(e,t){switch(e.align){case"left":return n.cellPad;case"right":return e.column.columnWidth-(t||0)-n.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return n.cellPad}}function I(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+O(t,1/0)}),0);return"translate(0 "+(O(F(e),e.key)+t)+")"})).selectAll("."+n.cn.cellRect).attr("height",(function(e){return(t=F(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight;var t,r}))}function P(e,t){for(var r=0,n=t-1;n>=0;n--)r+=R(e[n]);return r}function O(e,t){for(var r=0,n=0;n<e.rows.length&&e.rows[n].rowIndex<t;n++)r+=e.rows[n].rowHeight;return r}function R(e){var t=e.allRowsHeight;if(void 0!==t)return t;for(var r=0,n=0;n<e.rows.length;n++)r+=e.rows[n].rowHeight;return e.allRowsHeight=r,r}function F(e){return e.rowBlocks[e.page]}t.exports=function(e,t){var r=!e._context.staticPlot,s=e._fullLayout._paper.selectAll("."+n.cn.table).data(t.map((function(t){var r=i.unwrap(t).trace;return u(e,r)})),i.keyFun);s.exit().remove(),s.enter().append("g").classed(n.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),s.attr("width",(function(e){return e.width+e.size.l+e.size.r})).attr("height",(function(e){return e.height+e.size.t+e.size.b})).attr("transform",(function(e){return"translate("+e.translateX+","+e.translateY+")"}));var p=s.selectAll("."+n.cn.tableControlView).data(i.repeat,i.keyFun),b=p.enter().append("g").classed(n.cn.tableControlView,!0).style("box-sizing","content-box");r&&b.on("mousemove",(function(t){p.filter((function(e){return t===e})).call(v,e)})).on("mousewheel",(function(t){if(!t.scrollbarState.wheeling){t.scrollbarState.wheeling=!0;var r=t.scrollY+a.event.deltaY;S(e,p,null,r)(t)||(a.event.stopPropagation(),a.event.preventDefault()),t.scrollbarState.wheeling=!1}})).call(v,e,!0),p.attr("transform",(function(e){return"translate("+e.size.l+" "+e.size.t+")"}));var _=p.selectAll("."+n.cn.scrollBackground).data(i.repeat,i.keyFun);_.enter().append("rect").classed(n.cn.scrollBackground,!0).attr("fill","none"),_.attr("width",(function(e){return e.width})).attr("height",(function(e){return e.height})),p.each((function(t){o.setClipUrl(a.select(this),f(e,t),e)}));var x=p.selectAll("."+n.cn.yColumn).data((function(e){return e.columns}),i.keyFun);x.enter().append("g").classed(n.cn.yColumn,!0),x.exit().remove(),x.attr("transform",(function(e){return"translate("+e.x+" 0)"})),r&&x.call(a.behavior.drag().origin((function(t){return w(a.select(this),t,-n.uplift),l(this),t.calcdata.columnDragInProgress=!0,v(p.filter((function(e){return t.calcdata.key===e.key})),e),t})).on("drag",(function(e){var t=a.select(this),r=function(t){return(e===t?a.event.x:t.x)+t.columnWidth/2};e.x=Math.max(-n.overdrag,Math.min(e.calcdata.width+n.overdrag-e.columnWidth,a.event.x)),g(x).filter((function(t){return t.calcdata.key===e.calcdata.key})).sort((function(e,t){return r(e)-r(t)})).forEach((function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t)})),x.filter((function(t){return e!==t})).transition().ease(n.transitionEase).duration(n.transitionDuration).attr("transform",(function(e){return"translate("+e.x+" 0)"})),t.call(c).attr("transform","translate("+e.x+" -"+n.uplift+" )")})).on("dragend",(function(t){var r=a.select(this),n=t.calcdata;t.x=t.xScale(t),t.calcdata.columnDragInProgress=!1,w(r,t,0),function(e,t,r){var n=t.gdColumnsOriginalOrder;t.gdColumns.sort((function(e,t){return r[n.indexOf(e)]-r[n.indexOf(t)]})),t.columnorder=r,e.emit("plotly_restyle")}(e,n,n.columns.map((function(e){return e.xIndex})))}))),x.each((function(t){o.setClipUrl(a.select(this),m(e,t),e)}));var T=x.selectAll("."+n.cn.columnBlock).data(d.splitToPanels,i.keyFun);T.enter().append("g").classed(n.cn.columnBlock,!0).attr("id",(function(e){return e.key})),T.style("cursor",(function(e){return e.dragHandle?"ew-resize":e.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"}));var L=T.filter(M),A=T.filter(k);r&&A.call(a.behavior.drag().origin((function(e){return a.event.stopPropagation(),e})).on("drag",S(e,p,-1)).on("dragend",(function(){}))),y(e,p,L,T),y(e,p,A,T);var E=p.selectAll("."+n.cn.scrollAreaClip).data(i.repeat,i.keyFun);E.enter().append("clipPath").classed(n.cn.scrollAreaClip,!0).attr("id",(function(t){return f(e,t)}));var D=E.selectAll("."+n.cn.scrollAreaClipRect).data(i.repeat,i.keyFun);D.enter().append("rect").classed(n.cn.scrollAreaClipRect,!0).attr("x",-n.overdrag).attr("y",-n.uplift).attr("fill","none"),D.attr("width",(function(e){return e.width+2*n.overdrag})).attr("height",(function(e){return e.height+n.uplift})),x.selectAll("."+n.cn.columnBoundary).data(i.repeat,i.keyFun).enter().append("g").classed(n.cn.columnBoundary,!0);var I=x.selectAll("."+n.cn.columnBoundaryClippath).data(i.repeat,i.keyFun);I.enter().append("clipPath").classed(n.cn.columnBoundaryClippath,!0),I.attr("id",(function(t){return m(e,t)}));var P=I.selectAll("."+n.cn.columnBoundaryRect).data(i.repeat,i.keyFun);P.enter().append("rect").classed(n.cn.columnBoundaryRect,!0).attr("fill","none"),P.attr("width",(function(e){return e.columnWidth+2*h(e)})).attr("height",(function(e){return e.calcdata.height+2*h(e)+n.uplift})).attr("x",(function(e){return-h(e)})).attr("y",(function(e){return-h(e)})),C(null,A,p)}},{"../../components/color":591,"../../components/drawing":612,"../../lib":716,"../../lib/gup":714,"../../lib/svg_text_utils":740,"./constants":1248,"./data_preparation_helper":1249,"./data_split_helpers":1250,d3:164}],1254:[function(e,t,r){"use strict";var n=e("../../plots/template_attributes").hovertemplateAttrs,a=e("../../plots/template_attributes").texttemplateAttrs,i=e("../../components/colorscale/attributes"),o=e("../../plots/domain").attributes,s=e("../pie/attributes"),l=e("../sunburst/attributes"),c=e("./constants"),u=e("../../lib/extend").extendFlat;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:u({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:l.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:l.marker.line,editType:"calc"},i("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:a({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:s.outsidetextfont,textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},domain:o({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plots/domain":789,"../../plots/template_attributes":840,"../pie/attributes":1092,"../sunburst/attributes":1228,"./constants":1257}],1255:[function(e,t,r){"use strict";var n=e("../../plots/plots");r.name="treemap",r.plot=function(e,t,a,i){n.plotBasePlot(r.name,e,t,a,i)},r.clean=function(e,t,a,i){n.cleanBasePlot(r.name,e,t,a,i)}},{"../../plots/plots":825}],1256:[function(e,t,r){"use strict";var n=e("../sunburst/calc");r.calc=function(e,t){return n.calc(e,t)},r.crossTraceCalc=function(e){return n._runCrossTraceCalc("treemap",e)}},{"../sunburst/calc":1230}],1257:[function(e,t,r){"use strict";t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1258:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../../components/color"),o=e("../../plots/domain").defaults,s=e("../bar/defaults").handleText,l=e("../bar/constants").TEXTPAD,c=e("../../components/colorscale"),u=c.hasColorscale,d=c.handleDefaults;t.exports=function(e,t,r,c){function p(r,i){return n.coerce(e,t,a,r,i)}var h=p("labels"),f=p("parents");if(h&&h.length&&f&&f.length){var m=p("values");m&&m.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),"squarify"===p("tiling.packing")&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var g=p("text");p("texttemplate"),t.texttemplate||p("textinfo",Array.isArray(g)?"text+label":"label"),p("hovertext"),p("hovertemplate"),s(e,t,c,p,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var v=-1!==t.textposition.indexOf("bottom");p("marker.line.width")&&p("marker.line.color",c.paper_bgcolor);var y=p("marker.colors"),b=t._hasColorscale=u(e,"marker","colors");b?d(e,t,c,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(y||[]).length);var _=2*t.textfont.size;p("marker.pad.t",v?_/4:_),p("marker.pad.l",_/4),p("marker.pad.r",_/4),p("marker.pad.b",v?_:_/4),b&&d(e,t,c,p,{prefix:"marker.",cLetter:"c"}),t._hovered={marker:{line:{width:2,color:i.contrast(c.paper_bgcolor)}}},p("pathbar.visible")&&(n.coerceFont(p,"pathbar.textfont",c.font),p("pathbar.thickness",t.pathbar.textfont.size+2*l),p("pathbar.side"),p("pathbar.edgeshape")),o(t,c,p),t._length=null}else t.visible=!1}},{"../../components/color":591,"../../components/colorscale":603,"../../lib":716,"../../plots/domain":789,"../bar/constants":857,"../bar/defaults":859,"./attributes":1254}],1259:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../../lib/svg_text_utils"),s=e("./partition"),l=e("./style").styleOne,c=e("./constants"),u=e("../sunburst/helpers"),d=e("../sunburst/fx");t.exports=function(e,t,r,p,h){var f=h.barDifY,m=h.width,g=h.height,v=h.viewX,y=h.viewY,b=h.pathSlice,_=h.toMoveInsideSlice,x=h.strTransform,w=h.hasTransition,k=h.handleSlicesExit,M=h.makeUpdateSliceInterpolator,T=h.makeUpdateTextInterpolator,C={},S=e._fullLayout,L=t[0],A=L.trace,E=L.hierarchy,D=m/A._entryDepth,I=u.listPath(r.data,"id"),P=s(E.copy(),[m,g],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(P=P.filter((function(e){var t=I.indexOf(e.data.id);return-1!==t&&(e.x0=D*t,e.x1=D*(t+1),e.y0=f,e.y1=f+g,e.onPathbar=!0,!0)}))).reverse(),(p=p.data(P,u.getPtId)).enter().append("g").classed("pathbar",!0),k(p,!0,C,[m,g],b),p.order();var O=p;w&&(O=O.transition().each("end",(function(){var t=n.select(this);u.setSliceCursor(t,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),O.each((function(s){s._hoverX=v(s.x1-g/2),s._hoverY=y(s.y1-g/2);var p=n.select(this),h=a.ensureSingle(p,"path","surface",(function(e){e.style("pointer-events","all")}));w?h.transition().attrTween("d",(function(e){var t=M(e,!0,C,[m,g]);return function(e){return b(t(e))}})):h.attr("d",b),p.call(d,r,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:e._transitioning}),h.call(l,s,A,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("<br>").join(" ")||"";var f=a.ensureSingle(p,"g","slicetext"),k=a.ensureSingle(f,"text","",(function(e){e.attr("data-notex",1)}));k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,u.determineTextFont(A,s,S.font,A.pathdir)).call(o.convertToTspans,e),s.textBB=i.bBox(k.node()),s.transform=_(s,{onPathbar:!0}),u.isOutsideText(A,s)&&(s.transform.targetY-=u.getOutsideTextFontKey("size",A,s,S.font)-u.getInsideTextFontKey("size",A,s,S.font)),w?k.transition().attrTween("transform",(function(e){var t=T(e,!0,C,[m,g]);return function(e){return x(t(e))}})):k.attr("transform",x(s))}))}},{"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../sunburst/fx":1233,"../sunburst/helpers":1234,"./constants":1257,"./partition":1264,"./style":1266,d3:164}],1260:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../../lib/svg_text_utils"),s=e("./partition"),l=e("./style").styleOne,c=e("./constants"),u=e("../sunburst/helpers"),d=e("../sunburst/fx"),p=e("../sunburst/plot").formatSliceLabel;t.exports=function(e,t,r,h,f){var m=f.width,g=f.height,v=f.viewX,y=f.viewY,b=f.pathSlice,_=f.toMoveInsideSlice,x=f.strTransform,w=f.hasTransition,k=f.handleSlicesExit,M=f.makeUpdateSliceInterpolator,T=f.makeUpdateTextInterpolator,C=f.prevEntry,S=e._fullLayout,L=t[0].trace,A=-1!==L.textposition.indexOf("left"),E=-1!==L.textposition.indexOf("right"),D=-1!==L.textposition.indexOf("bottom"),I=!D&&!L.marker.pad.t||D&&!L.marker.pad.b,P=s(r,[m,g],{packing:L.tiling.packing,squarifyratio:L.tiling.squarifyratio,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1,pad:{inner:L.tiling.pad,top:L.marker.pad.t,left:L.marker.pad.l,right:L.marker.pad.r,bottom:L.marker.pad.b}}).descendants(),O=1/0,R=-1/0;P.forEach((function(e){var t=e.depth;t>=L._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(O=Math.min(O,t),R=Math.max(R,t))})),h=h.data(P,u.getPtId),L._maxVisibleLayers=isFinite(R)?R-O+1:0,h.enter().append("g").classed("slice",!0),k(h,!1,{},[m,g],b),h.order();var F=null;if(w&&C){var z=u.getPtId(C);h.each((function(e){null===F&&u.getPtId(e)===z&&(F={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var N=function(){return F||{x0:0,x1:m,y0:0,y1:g}},j=h;return w&&(j=j.transition().each("end",(function(){var t=n.select(this);u.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),j.each((function(s){var h=u.isHeader(s,L);s._hoverX=v(s.x1-L.marker.pad.r),s._hoverY=y(D?s.y1-L.marker.pad.b/2:s.y0+L.marker.pad.t/2);var f=n.select(this),k=a.ensureSingle(f,"path","surface",(function(e){e.style("pointer-events","all")}));w?k.transition().attrTween("d",(function(e){var t=M(e,!1,N(),[m,g]);return function(e){return b(t(e))}})):k.attr("d",b),f.call(d,r,e,t,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,e,{isTransitioning:e._transitioning}),k.call(l,s,L,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=h?I?"":u.getPtLabel(s)||"":p(s,r,L,t,S)||"";var C=a.ensureSingle(f,"g","slicetext"),P=a.ensureSingle(C,"text","",(function(e){e.attr("data-notex",1)}));P.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",E?"end":A||h?"start":"middle").call(i.font,u.determineTextFont(L,s,S.font)).call(o.convertToTspans,e),s.textBB=i.bBox(P.node()),s.transform=_(s,{isHeader:h}),w?P.transition().attrTween("transform",(function(e){var t=T(e,!1,N(),[m,g]);return function(e){return x(t(e))}})):P.attr("transform",x(s))})),F}},{"../../components/drawing":612,"../../lib":716,"../../lib/svg_text_utils":740,"../sunburst/fx":1233,"../sunburst/helpers":1234,"../sunburst/plot":1238,"./constants":1257,"./partition":1264,"./style":1266,d3:164}],1261:[function(e,t,r){"use strict";t.exports={moduleType:"trace",name:"treemap",basePlotModule:e("./base_plot"),categories:[],animatable:!0,attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc").calc,crossTraceCalc:e("./calc").crossTraceCalc,plot:e("./plot"),style:e("./style").style,colorbar:e("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1136,"./attributes":1254,"./base_plot":1255,"./calc":1256,"./defaults":1258,"./layout_attributes":1262,"./layout_defaults":1263,"./plot":1265,"./style":1266}],1262:[function(e,t,r){"use strict";t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1263:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t){function r(r,i){return n.coerce(e,t,a,r,i)}r("treemapcolorway",t.colorway),r("extendtreemapcolors")}},{"../../lib":716,"./layout_attributes":1262}],1264:[function(e,t,r){"use strict";var n=e("d3-hierarchy");t.exports=function(e,t,r){var a,i=r.flipX,o=r.flipY,s="dice-slice"===r.packing,l=r.pad[o?"bottom":"top"],c=r.pad[i?"right":"left"],u=r.pad[i?"left":"right"],d=r.pad[o?"top":"bottom"];s&&(a=c,c=l,l=a,a=u,u=d,d=a);var p=n.treemap().tile(function(e,t){switch(e){case"squarify":return n.treemapSquarify.ratio(t);case"binary":return n.treemapBinary;case"dice":return n.treemapDice;case"slice":return n.treemapSlice;default:return n.treemapSliceDice}}(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(c).paddingRight(u).paddingTop(l).paddingBottom(d).size(s?[t[1],t[0]]:t)(e);return(s||i||o)&&function e(t,r,n){var a;n.swapXY&&(a=t.x0,t.x0=t.y0,t.y0=a,a=t.x1,t.x1=t.y1,t.y1=a),n.flipX&&(a=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-a),n.flipY&&(a=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-a);var i=t.children;if(i)for(var o=0;o<i.length;o++)e(i[o],r,n)}(p,t,{swapXY:s,flipX:i,flipY:o}),p}},{"d3-hierarchy":158}],1265:[function(e,t,r){"use strict";var n=e("d3"),a=e("../sunburst/helpers").hasTransition,i=e("../sunburst/helpers"),o=e("../../lib"),s=e("../bar/constants").TEXTPAD,l=e("../bar/plot").toMoveInsideBar,c=e("./constants"),u=e("./draw_descendants"),d=e("./draw_ancestors");function p(e){return i.isHierarchyRoot(e)?"":i.getPtId(e)}function h(e,t,r,a){var h=e._fullLayout,f=t[0],m=f.trace,g=f.hierarchy,v=i.findEntryWithLevel(g,m.level),y=n.select(r),b=y.selectAll("g.pathbar"),_=y.selectAll("g.slice");if(!v)return b.remove(),void _.remove();var x=i.isHierarchyRoot(v),w=i.hasTransition(a),k=i.getMaxDepth(m),M=h._size,T=m.domain,C=M.w*(T.x[1]-T.x[0]),S=M.h*(T.y[1]-T.y[0]),L=C,A=m.pathbar.thickness,E=m.marker.line.width+c.gapWithPathbar,D=m.pathbar.visible?m.pathbar.side.indexOf("bottom")>-1?S+E:-(A+E):0,I={x0:L,x1:L,y0:D,y1:D+A},P=function(e,t,r){var n=m.tiling.pad,a=function(e){return e-n<=t.x0},i=function(e){return e+n>=t.x1},o=function(e){return e-n<=t.y0},s=function(e){return e+n>=t.y1};return{x0:a(e.x0-n)?0:i(e.x0-n)?r[0]:e.x0,x1:a(e.x1+n)?0:i(e.x1+n)?r[0]:e.x1,y0:o(e.y0-n)?0:s(e.y0-n)?r[1]:e.y0,y1:o(e.y1+n)?0:s(e.y1+n)?r[1]:e.y1}},O=null,R={},F={},z=null,N=function(e,t){return t?R[p(e)]:F[p(e)]},j=function(e,t,r,n){if(t)return R[p(g)]||I;var a=F[m.level]||r;return function(e){return e.data.depth-v.data.depth<k}(e)?P(e,a,n):{}};f.hasMultipleRoots&&x&&k++,m._maxDepth=k,m._backgroundColor=h.paper_bgcolor,m._entryDepth=v.data.depth,m._atRootLevel=x;var B=-C/2+M.l+M.w*(T.x[1]+T.x[0])/2,Y=-S/2+M.t+M.h*(1-(T.y[1]+T.y[0])/2),H=function(e){return B+e},V=function(e){return Y+e},U=V(0),W=H(0),G=function(e){return W+e},q=function(e){return U+e};function K(e,t){return e+","+t}var X=G(0),Z=function(e){e.x=Math.max(X,e.x)},J=m.pathbar.edgeshape,$=function(e,t){var r=e.x0,n=e.x1,a=e.y0,i=e.y1,o=e.textBB;r===n&&(r-=s,n+=s),a===i&&(a-=s,i+=s);var c=function(e){return-1!==m.textposition.indexOf(e)},u=c("bottom"),d=c("top")||t.isHeader&&!u?"start":u?"end":"middle",p=c("right"),h=c("left")||t.onPathbar,f=h?"left":p?"right":"center";!t.onPathbar&&t.isHeader||(r+=h?s:0,n-=p?s:0);var g=m.marker.pad;if(t.isHeader){if((r+=g.l-s)>=(n-=g.r-s)){var v=(r+n)/2;r=v-s,n=v+s}var y;u?a<(y=i-g.b)&&y<i&&(a=y):a<(y=a+g.t)&&y<i&&(i=y)}var b=l(r,n,a,i,o,{isHorizontal:!1,constrained:!0,angle:0,anchor:d});if("center"!==f){var _=(n-r)/2-b.scale*(o.right-o.left)/2;t.isHeader&&(_-=s),"left"===f?b.targetX-=_:"right"===f&&(b.targetX+=_)}return b.targetX=H(b.targetX),b.targetY=V(b.targetY),isNaN(b.targetX)||isNaN(b.targetY)?{}:{scale:b.scale,rotate:b.rotate,textX:b.textX,textY:b.textY,targetX:b.targetX,targetY:b.targetY}},Q=function(e,t){for(var r,n=0,a=e;!r&&n<k;)n++,(a=a.parent)?r=N(a,t):n=k;return r||{}},ee=function(e,t,r,a){var i,s=N(e,t);if(s)i=s;else if(t)i=I;else if(O)if(e.parent){var l=z||r;l&&!t?i=P(e,l,a):(i={},o.extendFlat(i,Q(e,t)))}else i=e;else i={};return n.interpolate(i,{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})},te=function(e,t,r,a){var s=N(e,t),l={},c=j(e,t,r,a);return o.extendFlat(l,{transform:$({x0:c.x0,x1:c.x1,y0:c.y0,y1:c.y1,textBB:e.textBB,_text:e._text},{isHeader:i.isHeader(e,m)})}),s?l=s:e.parent&&o.extendFlat(l,Q(e,t)),n.interpolate(l,{transform:{scale:e.transform.scale,rotate:e.transform.rotate,textX:e.transform.textX,textY:e.transform.textY,targetX:e.transform.targetX,targetY:e.transform.targetY}})},re=function(e,t,r,a,i){var o=a[0],s=a[1];w?e.exit().transition().each((function(){var e=n.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var r=function(e,t,r,a){var i,o=N(e,t);if(t)i=I;else{var s=N(v,t);i=s?P(e,s,a):{}}return n.interpolate(o,i)}(e,t,0,[o,s]);return function(e){return i(r(e))}})),e.select("g.slicetext").attr("opacity",0)})).remove():e.exit().remove()},ne=function(e){return o.getTextTransform({textX:e.transform.textX,textY:e.transform.textY,targetX:e.transform.targetX,targetY:e.transform.targetY,scale:e.transform.scale,rotate:e.transform.rotate})};w&&(b.each((function(e){R[p(e)]={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1},e.transform&&(R[p(e)].transform={textX:e.transform.textX,textY:e.transform.textY,targetX:e.transform.targetX,targetY:e.transform.targetY,scale:e.transform.scale,rotate:e.transform.rotate})})),_.each((function(e){F[p(e)]={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1},e.transform&&(F[p(e)].transform={textX:e.transform.textX,textY:e.transform.textY,targetX:e.transform.targetX,targetY:e.transform.targetY,scale:e.transform.scale,rotate:e.transform.rotate}),!O&&i.isEntry(e)&&(O=e)}))),z=u(e,t,v,_,{width:C,height:S,viewX:H,viewY:V,pathSlice:function(e){var t=H(e.x0),r=H(e.x1),n=V(e.y0),a=V(e.y1),i=r-t,o=a-n;return i&&o?"M"+K(t,n+0)+"L"+K(r-0,n)+"L"+K(r,a-0)+"L"+K(t+0,a)+"Z":""},toMoveInsideSlice:$,prevEntry:O,makeUpdateSliceInterpolator:ee,makeUpdateTextInterpolator:te,handleSlicesExit:re,hasTransition:w,strTransform:ne}),m.pathbar.visible&&d(e,t,v,b,{barDifY:D,width:L,height:A,viewX:G,viewY:q,pathSlice:function(e){var t=G(Math.max(Math.min(e.x0,e.x0),0)),r=G(Math.min(Math.max(e.x1,e.x1),L)),n=q(e.y0),a=q(e.y1),i=A/2,o={},s={};o.x=t,s.x=r,o.y=s.y=(n+a)/2;var l={x:t,y:n},c={x:r,y:n},u={x:r,y:a},d={x:t,y:a};return">"===J?(l.x-=i,c.x-=i,u.x-=i,d.x-=i):"/"===J?(u.x-=i,d.x-=i,o.x-=i/2,s.x-=i/2):"\\"===J?(l.x-=i,c.x-=i,o.x-=i/2,s.x-=i/2):"<"===J&&(o.x-=i,s.x-=i),Z(l),Z(d),Z(o),Z(c),Z(u),Z(s),"M"+K(l.x,l.y)+"L"+K(c.x,c.y)+"L"+K(s.x,s.y)+"L"+K(u.x,u.y)+"L"+K(d.x,d.y)+"L"+K(o.x,o.y)+"Z"},toMoveInsideSlice:$,makeUpdateSliceInterpolator:ee,makeUpdateTextInterpolator:te,handleSlicesExit:re,hasTransition:w,strTransform:ne})}t.exports=function(e,t,r,i){var o,s,l=e._fullLayout._treemaplayer,c=!r;(o=l.selectAll("g.trace.treemap").data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("treemap",!0),o.order(),a(r)?(i&&(s=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){s&&s()})).each("interrupt",(function(){s&&s()})).each((function(){l.selectAll("g.trace").each((function(t){h(e,t,this,r)}))}))):o.each((function(t){h(e,t,this,r)})),c&&o.exit().remove()}},{"../../lib":716,"../bar/constants":857,"../bar/plot":866,"../sunburst/helpers":1234,"./constants":1257,"./draw_ancestors":1259,"./draw_descendants":1260,d3:164}],1266:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/color"),i=e("../../lib"),o=e("../sunburst/helpers");function s(e,t,r,n){var s,l,c=(n||{}).hovered,u=t.data.data,d=u.i,p=u.color,h=o.isHierarchyRoot(t),f=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(h&&"rgba(0,0,0,0)"===p)f=0,s="rgba(0,0,0,0)",l=0;else if(s=i.castOption(r,d,"marker.line.color")||a.defaultLine,l=i.castOption(r,d,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var m=r.marker.depthfade;if(m){var g,v=a.combine(a.addOpacity(r._backgroundColor,.75),p);if(!0===m){var y=o.getMaxDepth(r);g=isFinite(y)?o.isLeaf(t)?0:r._maxVisibleLayers-(t.data.depth-r._entryDepth):t.data.height+1}else g=t.data.depth-r._entryDepth,r._atRootLevel||g++;if(g>0)for(var b=0;b<g;b++){var _=.5*b/g;p=a.combine(a.addOpacity(v,_),p)}}}e.style("stroke-width",l).call(a.fill,p).call(a.stroke,s).style("opacity",f)}t.exports={style:function(e){e._fullLayout._treemaplayer.selectAll(".trace").each((function(e){var t=n.select(this),r=e[0].trace;t.style("opacity",r.opacity),t.selectAll("path.surface").each((function(e){n.select(this).call(s,e,r,{hovered:!1})}))}))},styleOne:s}},{"../../components/color":591,"../../lib":716,"../sunburst/helpers":1234,d3:164}],1267:[function(e,t,r){"use strict";var n=e("../box/attributes"),a=e("../../lib/extend").extendFlat;t.exports={y:n.y,x:n.x,x0:n.x0,y0:n.y0,name:a({},n.name,{}),orientation:a({},n.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n.fillcolor,points:a({},n.boxpoints,{}),jitter:a({},n.jitter,{}),pointpos:a({},n.pointpos,{}),width:a({},n.width,{}),marker:n.marker,text:n.text,hovertext:n.hovertext,hovertemplate:n.hovertemplate,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup,selected:n.selected,unselected:n.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},{"../../lib/extend":707,"../box/attributes":879}],1268:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../box/calc"),o=e("./helpers"),s=e("../../constants/numerical").BADNUM;function l(e,t,r){var a=t.max-t.min;if(!a)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,a/1e4);var i=r.length,o=n.stdev(r,i-1,t.mean);return Math.max(function(e,t,r){return 1.059*Math.min(t,r/1.349)*Math.pow(e,-.2)}(i,o,t.q3-t.q1),a/100)}function c(e,t,r,n){var i,o=e.spanmode,l=e.span||[],c=[t.min,t.max],u=[t.min-2*n,t.max+2*n];function d(n){var a=l[n],i="multicategory"===r.type?r.r2c(a):r.d2c(a,0,e[t.valLetter+"calendar"]);return i===s?u[n]:i}var p={type:"linear",range:i="soft"===o?u:"hard"===o?c:[d(0),d(1)]};return a.setConvert(p),p.cleanRange(),i}t.exports=function(e,t){var r=i(e,t);if(r[0].t.empty)return r;for(var s=e._fullLayout,u=a.getFromId(e,t["h"===t.orientation?"xaxis":"yaxis"]),d=1/0,p=-1/0,h=0,f=0,m=0;m<r.length;m++){var g=r[m],v=g.pts.map(o.extractVal),y=g.bandwidth=l(t,g,v),b=g.span=c(t,g,u,y);if(g.min===g.max&&0===y)b=g.span=[g.min,g.max],g.density=[{v:1,t:b[0]}],g.bandwidth=y,h=Math.max(h,1);else{var _=b[1]-b[0],x=Math.ceil(_/(y/3)),w=_/x;if(!isFinite(w)||!isFinite(x))return n.error("Something went wrong with computing the violin span"),r[0].t.empty=!0,r;var k=o.makeKDE(g,t,v);g.density=new Array(x);for(var M=0,T=b[0];T<b[1]+w/2;M++,T+=w){var C=k(T);g.density[M]={v:C,t:T},h=Math.max(h,C)}}f=Math.max(f,v.length),d=Math.min(d,b[0]),p=Math.max(p,b[1])}var S=a.findExtremes(u,[d,p],{padded:!0});if(t._extremes[u._id]=S,t.width)r[0].t.maxKDE=h;else{var L=s._violinScaleGroupStats,A=t.scalegroup,E=L[A];E?(E.maxKDE=Math.max(E.maxKDE,h),E.maxCount=Math.max(E.maxCount,f)):L[A]={maxKDE:h,maxCount:f}}return r[0].t.labels.kde=n._(e,"kde:"),r}},{"../../constants/numerical":692,"../../lib":716,"../../plots/cartesian/axes":764,"../box/calc":880,"./helpers":1271}],1269:[function(e,t,r){"use strict";var n=e("../box/cross_trace_calc").setPositionOffset,a=["v","h"];t.exports=function(e,t){for(var r=e.calcdata,i=t.xaxis,o=t.yaxis,s=0;s<a.length;s++){for(var l=a[s],c="h"===l?o:i,u=[],d=0;d<r.length;d++){var p=r[d],h=p[0].t,f=p[0].trace;!0!==f.visible||"violin"!==f.type||h.empty||f.orientation!==l||f.xaxis!==i._id||f.yaxis!==o._id||u.push(d)}n("violin",e,u,c)}}},{"../box/cross_trace_calc":881}],1270:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../components/color"),i=e("../box/defaults"),o=e("./attributes");t.exports=function(e,t,r,s){function l(r,a){return n.coerce(e,t,o,r,a)}function c(r,a){return n.coerce2(e,t,o,r,a)}if(i.handleSampleDefaults(e,t,l,s),!1!==t.visible){l("bandwidth"),l("side"),l("width")||(l("scalegroup",t.name),l("scalemode"));var u,d=l("span");Array.isArray(d)&&(u="manual"),l("spanmode",u);var p=l("line.color",(e.marker||{}).color||r),h=l("line.width"),f=l("fillcolor",a.addOpacity(t.line.color,.5));i.handlePointsDefaults(e,t,l,{prefix:""});var m=c("box.width"),g=c("box.fillcolor",f),v=c("box.line.color",p),y=c("box.line.width",h);l("box.visible",Boolean(m||g||v||y))||(t.box={visible:!1});var b=c("meanline.color",p),_=c("meanline.width",h);l("meanline.visible",Boolean(b||_))||(t.meanline={visible:!1})}}},{"../../components/color":591,"../../lib":716,"../box/defaults":882,"./attributes":1267}],1271:[function(e,t,r){"use strict";var n=e("../../lib"),a=function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)};r.makeKDE=function(e,t,r){var n=r.length,i=a,o=e.bandwidth,s=1/(n*o);return function(e){for(var t=0,a=0;a<n;a++)t+=i((e-r[a])/o);return s*t}},r.getPositionOnKdePath=function(e,t,r){var a,i;"h"===t.orientation?(a="y",i="x"):(a="x",i="y");var o=n.findPointOnPath(e.path,r,i,{pathLength:e.pathLength}),s=e.posCenterPx,l=o[a];return[l,"both"===t.side?2*s-l:s]},r.getKdeValue=function(e,t,n){var a=e.pts.map(r.extractVal);return r.makeKDE(e,t,a)(n)/e.posDensityScale},r.extractVal=function(e){return e.v}},{"../../lib":716}],1272:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../../plots/cartesian/axes"),i=e("../box/hover"),o=e("./helpers");t.exports=function(e,t,r,s,l){var c,u,d=e.cd,p=d[0].trace,h=p.hoveron,f=-1!==h.indexOf("violins"),m=-1!==h.indexOf("kde"),g=[];if(f||m){var v=i.hoverOnBoxes(e,t,r,s);if(m&&v.length>0){var y,b,_,x,w,k=e.xa,M=e.ya;"h"===p.orientation?(w=t,y="y",_=M,b="x",x=k):(w=r,y="x",_=k,b="y",x=M);var T=d[e.index];if(w>=T.span[0]&&w<=T.span[1]){var C=n.extendFlat({},e),S=x.c2p(w,!0),L=o.getKdeValue(T,p,w),A=o.getPositionOnKdePath(T,p,S),E=_._offset,D=_._length;C[y+"0"]=A[0],C[y+"1"]=A[1],C[b+"0"]=C[b+"1"]=S,C[b+"Label"]=b+": "+a.hoverLabelText(x,w)+", "+d[0].t.labels.kde+" "+L.toFixed(3),C.spikeDistance=v[0].spikeDistance;var I=y+"Spike";C[I]=v[0][I],v[0].spikeDistance=void 0,v[0][I]=void 0,C.hovertemplate=!1,g.push(C),(u={stroke:e.color})[y+"1"]=n.constrain(E+A[0],E,E+D),u[y+"2"]=n.constrain(E+A[1],E,E+D),u[b+"1"]=u[b+"2"]=x._offset+S}}f&&(g=g.concat(v))}-1!==h.indexOf("points")&&(c=i.hoverOnPoints(e,t,r));var P=l.selectAll(".violinline-"+p.uid).data(u?[0]:[]);return P.enter().append("line").classed("violinline-"+p.uid,!0).attr("stroke-width",1.5),P.exit().remove(),P.attr(u),"closest"===s?c?[c]:g:c?(g.push(c),g):g}},{"../../lib":716,"../../plots/cartesian/axes":764,"../box/hover":884,"./helpers":1271}],1273:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults"),crossTraceDefaults:e("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style"),styleOnSelect:e("../scatter/style").styleOnSelect,hoverPoints:e("./hover"),selectPoints:e("../box/select"),moduleType:"trace",name:"violin",basePlotModule:e("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"../box/defaults":882,"../box/select":889,"../scatter/style":1141,"./attributes":1267,"./calc":1268,"./cross_trace_calc":1269,"./defaults":1270,"./hover":1272,"./layout_attributes":1274,"./layout_defaults":1275,"./plot":1276,"./style":1277}],1274:[function(e,t,r){"use strict";var n=e("../box/layout_attributes"),a=e("../../lib").extendFlat;t.exports={violinmode:a({},n.boxmode,{}),violingap:a({},n.boxgap,{}),violingroupgap:a({},n.boxgroupgap,{})}},{"../../lib":716,"../box/layout_attributes":886}],1275:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes"),i=e("../box/layout_defaults");t.exports=function(e,t,r){i._supply(e,t,r,(function(r,i){return n.coerce(e,t,a,r,i)}),"violin")}},{"../../lib":716,"../box/layout_defaults":887,"./layout_attributes":1274}],1276:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../box/plot"),s=e("../scatter/line_points"),l=e("./helpers");t.exports=function(e,t,r,c){var u=e._fullLayout,d=t.xaxis,p=t.yaxis;function h(e){var t=s(e,{xaxis:d,yaxis:p,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return i.smoothopen(t[0],1)}a.makeTraceGroups(c,r,"trace violins").each((function(e){var r=n.select(this),i=e[0],s=i.t,c=i.trace;if(!0!==c.visible||s.empty)r.remove();else{var f=s.bPos,m=s.bdPos,g=t[s.valLetter+"axis"],v=t[s.posLetter+"axis"],y="both"===c.side,b=y||"positive"===c.side,_=y||"negative"===c.side,x=r.selectAll("path.violin").data(a.identity);x.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each((function(e){var t,r,a,i,o,l,d,p,x=n.select(this),w=e.density,k=w.length,M=v.c2l(e.pos+f,!0),T=v.l2p(M);if(c.width)t=s.maxKDE/m;else{var C=u._violinScaleGroupStats[c.scalegroup];t="count"===c.scalemode?C.maxKDE/m*(C.maxCount/e.pts.length):C.maxKDE/m}if(b){for(d=new Array(k),o=0;o<k;o++)(p=d[o]={})[s.posLetter]=M+w[o].v/t,p[s.valLetter]=g.c2l(w[o].t,!0);r=h(d)}if(_){for(d=new Array(k),l=0,o=k-1;l<k;l++,o--)(p=d[l]={})[s.posLetter]=M-w[o].v/t,p[s.valLetter]=g.c2l(w[o].t,!0);a=h(d)}if(y)i=r+"L"+a.substr(1)+"Z";else{var S=[T,g.c2p(w[0].t)],L=[T,g.c2p(w[k-1].t)];"h"===c.orientation&&(S.reverse(),L.reverse()),i=b?"M"+S+"L"+r.substr(1)+"L"+L:"M"+L+"L"+a.substr(1)+"L"+S}x.attr("d",i),e.posCenterPx=T,e.posDensityScale=t*m,e.path=x.node(),e.pathLength=e.path.getTotalLength()/(y?2:1)}));var w,k,M,T=c.box,C=T.width,S=(T.line||{}).width;y?(w=m*C,k=0):b?(w=[0,m*C/2],k=S*{x:1,y:-1}[s.posLetter]):(w=[m*C/2,0],k=S*{x:-1,y:1}[s.posLetter]),o.plotBoxAndWhiskers(r,{pos:v,val:g},c,{bPos:f,bdPos:w,bPosPxOffset:k}),o.plotBoxMean(r,{pos:v,val:g},c,{bPos:f,bdPos:w,bPosPxOffset:k}),!c.box.visible&&c.meanline.visible&&(M=a.identity);var L=r.selectAll("path.meanline").data(M||[]);L.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect","non-scaling-stroke"),L.exit().remove(),L.each((function(e){var t=g.c2p(e.mean,!0),r=l.getPositionOnKdePath(e,c,t);n.select(this).attr("d","h"===c.orientation?"M"+t+","+r[0]+"V"+r[1]:"M"+r[0]+","+t+"H"+r[1])})),o.plotPoints(r,{x:d,y:p},c,s)}}))}},{"../../components/drawing":612,"../../lib":716,"../box/plot":888,"../scatter/line_points":1132,"./helpers":1271,d3:164}],1277:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/color"),i=e("../scatter/style").stylePoints;t.exports=function(e){var t=n.select(e).selectAll("g.trace.violins");t.style("opacity",(function(e){return e[0].trace.opacity})),t.each((function(t){var r=t[0].trace,o=n.select(this),s=r.box||{},l=s.line||{},c=r.meanline||{},u=c.width;o.selectAll("path.violin").style("stroke-width",r.line.width+"px").call(a.stroke,r.line.color).call(a.fill,r.fillcolor),o.selectAll("path.box").style("stroke-width",l.width+"px").call(a.stroke,l.color).call(a.fill,s.fillcolor);var d={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};o.selectAll("path.mean").style(d).call(a.stroke,c.color),o.selectAll("path.meanline").style(d).call(a.stroke,c.color),i(o,r,e)}))}},{"../../components/color":591,"../scatter/style":1141,d3:164}],1278:[function(e,t,r){"use strict";var n=e("../../components/colorscale/attributes"),a=e("../isosurface/attributes"),i=e("../../plots/attributes"),o=e("../../lib/extend").extendFlat,s=e("../../plot_api/edit_types").overrideAll,l=t.exports=s(o({x:a.x,y:a.y,z:a.z,value:a.value,isomin:a.isomin,isomax:a.isomax,surface:a.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:a.slices,caps:a.caps,text:a.text,hovertext:a.hovertext,hovertemplate:a.hovertemplate},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:a.colorbar,opacity:a.opacity,opacityscale:{valType:"any",editType:"calc"},lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:o({},i.hoverinfo)}),"calc","nested");l.x.editType=l.y.editType=l.z.editType=l.value.editType="calc+clearAxisTypes",l.transforms=void 0},{"../../components/colorscale/attributes":598,"../../lib/extend":707,"../../plot_api/edit_types":747,"../../plots/attributes":761,"../isosurface/attributes":1054}],1279:[function(e,t,r){"use strict";var n=e("gl-mesh3d"),a=e("../../lib/gl_format_color").parseColorScale,i=e("../../lib/str2rgbarray"),o=e("../../components/colorscale").extractOpts,s=e("../../plots/gl3d/zip3"),l=e("../isosurface/convert").findNearestOnAxis,c=e("../isosurface/convert").generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var d=u.prototype;d.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._x[t],n=this.data._y[t],a=this.data._z[t],i=this.data._Ys.length,o=this.data._Zs.length,s=l(r,this.data._Xs).id,c=l(n,this.data._Ys).id,u=l(a,this.data._Zs).id,d=e.index=u+o*c+o*i*s;e.traceCoordinate=[this.data._x[d],this.data._y[d],this.data._z[d],this.data.value[d]];var p=this.data.hovertext||this.data.text;return Array.isArray(p)&&void 0!==p[d]?e.textLabel=p[d]:p&&(e.textLabel=p),!0}},d.update=function(e){var t=this.scene,r=t.fullSceneLayout;function n(e,t,r,n){return t.map((function(t){return e.d2l(t,0,n)*r}))}this.data=c(e);var l={positions:s(n(r.xaxis,e._x,t.dataScale[0],e.xcalendar),n(r.yaxis,e._y,t.dataScale[1],e.ycalendar),n(r.zaxis,e._z,t.dataScale[2],e.zcalendar)),cells:s(e._i,e._j,e._k),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:i(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=o(e);l.vertexIntensity=e._intensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=a(e),this.mesh.update(l)},d.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var r=e.glplot.gl,a=n({gl:r}),i=new u(e,a,t.uid);return a._trace=i,i.update(t),e.glplot.add(a),i}},{"../../components/colorscale":603,"../../lib/gl_format_color":713,"../../lib/str2rgbarray":739,"../../plots/gl3d/zip3":815,"../isosurface/convert":1056,"gl-mesh3d":282}],1280:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./attributes"),i=e("../isosurface/defaults").supplyIsoDefaults;t.exports=function(e,t,r,o){function s(r,i){return n.coerce(e,t,a,r,i)}i(e,t,r,o,s);var l=s("opacityscale");"max"===l?t.opacityscale=[[0,.1],[1,1]]:"min"===l?t.opacityscale=[[0,1],[1,.1]]:"extremes"===l?t.opacityscale=function(e,t){for(var r=[],n=0;n<32;n++){var a=n/31,i=t+(1-t)*(1-Math.pow(Math.sin(e*a*Math.PI),2));r.push([a,Math.max(1,Math.min(0,i))])}return r}(1,.1):function(e){var t=0;if(!Array.isArray(e)||e.length<2)return!1;if(!e[0]||!e[e.length-1])return!1;if(0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var r=0;r<e.length;r++){var n=e[r];if(2!==n.length||+n[0]<t)return!1;t=+n[0]}return!0}(l)||(t.opacityscale=void 0)}},{"../../lib":716,"../isosurface/defaults":1057,"./attributes":1278}],1281:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),supplyDefaults:e("./defaults"),calc:e("../isosurface/calc"),colorbar:{min:"cmin",max:"cmax"},plot:e("./convert"),moduleType:"trace",name:"volume",basePlotModule:e("../../plots/gl3d"),categories:["gl3d"],meta:{}}},{"../../plots/gl3d":804,"../isosurface/calc":1055,"./attributes":1278,"./convert":1279,"./defaults":1280}],1282:[function(e,t,r){"use strict";var n=e("../bar/attributes"),a=e("../scatter/attributes").line,i=e("../../plots/attributes"),o=e("../../plots/template_attributes").hovertemplateAttrs,s=e("../../plots/template_attributes").texttemplateAttrs,l=e("./constants"),c=e("../../lib/extend").extendFlat,u=e("../../components/color");function d(e){return{marker:{color:c({},n.marker.color,{arrayOk:!1,editType:"style"}),line:{color:c({},n.marker.line.color,{arrayOk:!1,editType:"style"}),width:c({},n.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:n.x,x0:n.x0,dx:n.dx,y:n.y,y0:n.y0,dy:n.dy,hovertext:n.hovertext,hovertemplate:o({},{keys:l.eventDataKeys}),hoverinfo:c({},i.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:s({editType:"plot"},{keys:l.eventDataKeys.concat(["label"])}),text:n.text,textposition:n.textposition,insidetextanchor:n.insidetextanchor,textangle:n.textangle,textfont:n.textfont,insidetextfont:n.insidetextfont,outsidetextfont:n.outsidetextfont,constraintext:n.constraintext,cliponaxis:n.cliponaxis,orientation:n.orientation,offset:n.offset,width:n.width,increasing:d(),decreasing:d(),totals:d(),connector:{line:{color:c({},a.color,{dflt:u.defaultLine}),width:c({},a.width,{editType:"plot"}),dash:a.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:n.offsetgroup,alignmentgroup:n.alignmentgroup}},{"../../components/color":591,"../../lib/extend":707,"../../plots/attributes":761,"../../plots/template_attributes":840,"../bar/attributes":855,"../scatter/attributes":1118,"./constants":1284}],1283:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes"),a=e("../../lib").mergeArray,i=e("../scatter/calc_selection"),o=e("../../constants/numerical").BADNUM;function s(e){return"a"===e||"absolute"===e}function l(e){return"t"===e||"total"===e}t.exports=function(e,t){var r,c,u=n.getFromId(e,t.xaxis||"x"),d=n.getFromId(e,t.yaxis||"y");"h"===t.orientation?(r=u.makeCalcdata(t,"x"),c=d.makeCalcdata(t,"y")):(r=d.makeCalcdata(t,"y"),c=u.makeCalcdata(t,"x"));for(var p,h=Math.min(c.length,r.length),f=new Array(h),m=0,g=!1,v=0;v<h;v++){var y=r[v]||0,b=!1;(r[v]!==o||l(t.measure[v])||s(t.measure[v]))&&v+1<h&&(r[v+1]!==o||l(t.measure[v+1])||s(t.measure[v+1]))&&(b=!0);var _=f[v]={i:v,p:c[v],s:y,rawS:y,cNext:b};s(t.measure[v])?(m=_.s,_.isSum=!0,_.dir="totals",_.s=m):l(t.measure[v])?(_.isSum=!0,_.dir="totals",_.s=m):(_.isSum=!1,_.dir=_.rawS<0?"decreasing":"increasing",p=_.s,_.s=m+p,m+=p),"totals"===_.dir&&(g=!0),t.ids&&(_.id=String(t.ids[v])),_.v=(t.base||0)+m}return f.length&&(f[0].hasTotals=g),a(t.text,f,"tx"),a(t.hovertext,f,"htx"),i(f,t),f}},{"../../constants/numerical":692,"../../lib":716,"../../plots/cartesian/axes":764,"../scatter/calc_selection":1120}],1284:[function(e,t,r){"use strict";t.exports={eventDataKeys:["initial","delta","final"]}},{}],1285:[function(e,t,r){"use strict";var n=e("../bar/cross_trace_calc").setGroupPositions;t.exports=function(e,t){var r,a,i=e._fullLayout,o=e._fullData,s=e.calcdata,l=t.xaxis,c=t.yaxis,u=[],d=[],p=[];for(a=0;a<o.length;a++){var h=o[a];!0===h.visible&&h.xaxis===l._id&&h.yaxis===c._id&&"waterfall"===h.type&&(r=s[a],"h"===h.orientation?p.push(r):d.push(r),u.push(r))}var f={mode:i.waterfallmode,norm:i.waterfallnorm,gap:i.waterfallgap,groupgap:i.waterfallgroupgap};for(n(e,l,c,d,f),n(e,c,l,p,f),a=0;a<u.length;a++){r=u[a];for(var m=0;m<r.length;m++){var g=r[m];!1===g.isSum&&(g.s0+=0===m?0:r[m-1].s),m+1<r.length&&(r[m].nextP0=r[m+1].p0,r[m].nextS0=r[m+1].s0)}}}},{"../bar/cross_trace_calc":858}],1286:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("../bar/defaults").handleGroupingDefaults,i=e("../bar/defaults").handleText,o=e("../scatter/xy_defaults"),s=e("./attributes"),l=e("../../components/color"),c=e("../../constants/delta.js"),u=c.INCREASING.COLOR,d=c.DECREASING.COLOR,p="#4499FF";function h(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",l.defaultLine),e(t+".marker.line.width")}t.exports={supplyDefaults:function(e,t,r,a){function l(r,a){return n.coerce(e,t,s,r,a)}if(o(e,t,a,l)){l("measure"),l("orientation",t.x&&!t.y?"h":"v"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate");var c=l("textposition");i(e,t,a,l,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(l("texttemplate"),t.texttemplate||l("textinfo")),h(l,"increasing",u),h(l,"decreasing",d),h(l,"totals",p),l("connector.visible")&&(l("connector.mode"),l("connector.line.width")&&(l("connector.line.color"),l("connector.line.dash")))}else t.visible=!1},crossTraceDefaults:function(e,t){var r,i;function o(e){return n.coerce(i._input,i,s,e)}if("group"===t.waterfallmode)for(var l=0;l<e.length;l++)r=(i=e[l])._input,a(r,i,t,o)}}},{"../../components/color":591,"../../constants/delta.js":686,"../../lib":716,"../bar/defaults":859,"../scatter/xy_defaults":1144,"./attributes":1282}],1287:[function(e,t,r){"use strict";t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}},{}],1288:[function(e,t,r){"use strict";var n=e("../../plots/cartesian/axes").hoverLabelText,a=e("../../components/color").opacity,i=e("../bar/hover").hoverOnBars,o=e("../../constants/delta.js"),s=o.INCREASING.SYMBOL,l=o.DECREASING.SYMBOL;t.exports=function(e,t,r,o){var c=i(e,t,r,o);if(c){var u=c.cd,d=u[0].trace,p="h"===d.orientation,h=p?e.xa:e.ya,f=u[c.index],m=f.isSum?f.b+f.s:f.rawS;if(!f.isSum){c.initial=f.b+f.s-m,c.delta=m,c.final=c.initial+c.delta;var g=w(Math.abs(c.delta));c.deltaLabel=m<0?"("+g+")":g,c.finalLabel=w(c.final),c.initialLabel=w(c.initial)}var v=f.hi||d.hoverinfo,y=[];if(v&&"none"!==v&&"skip"!==v){var b="all"===v,_=v.split("+"),x=function(e){return b||-1!==_.indexOf(e)};f.isSum||(!x("final")||x(p?"x":"y")||y.push(c.finalLabel),x("delta")&&(m<0?y.push(c.deltaLabel+" "+l):y.push(c.deltaLabel+" "+s)),x("initial")&&y.push("Initial: "+c.initialLabel))}return y.length&&(c.extraText=y.join("<br>")),c.color=function(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,o=r.line.width;return a(n)?n:a(i)&&o?i:void 0}(d,f),[c]}function w(e){return n(h,e)}}},{"../../components/color":591,"../../constants/delta.js":686,"../../plots/cartesian/axes":764,"../bar/hover":862}],1289:[function(e,t,r){"use strict";t.exports={attributes:e("./attributes"),layoutAttributes:e("./layout_attributes"),supplyDefaults:e("./defaults").supplyDefaults,crossTraceDefaults:e("./defaults").crossTraceDefaults,supplyLayoutDefaults:e("./layout_defaults"),calc:e("./calc"),crossTraceCalc:e("./cross_trace_calc"),plot:e("./plot"),style:e("./style").style,hoverPoints:e("./hover"),eventData:e("./event_data"),selectPoints:e("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:e("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":775,"../bar/select":867,"./attributes":1282,"./calc":1283,"./cross_trace_calc":1285,"./defaults":1286,"./event_data":1287,"./hover":1288,"./layout_attributes":1290,"./layout_defaults":1291,"./plot":1292,"./style":1293}],1290:[function(e,t,r){"use strict";t.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],1291:[function(e,t,r){"use strict";var n=e("../../lib"),a=e("./layout_attributes");t.exports=function(e,t,r){var i=!1;function o(r,i){return n.coerce(e,t,a,r,i)}for(var s=0;s<r.length;s++){var l=r[s];if(l.visible&&"waterfall"===l.type){i=!0;break}}i&&(o("waterfallmode"),o("waterfallgap",.2),o("waterfallgroupgap"))}},{"../../lib":716,"./layout_attributes":1290}],1292:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../lib"),i=e("../../components/drawing"),o=e("../bar/plot").plot;t.exports=function(e,t,r,s){var l=e._fullLayout;o(e,t,r,s,{mode:l.waterfallmode,norm:l.waterfallmode,gap:l.waterfallgap,groupgap:l.waterfallgroupgap}),function(e,t,r,o){var s=t.xaxis,l=t.yaxis;a.makeTraceGroups(o,r,"trace bars").each((function(r){var o=n.select(this),c=r[0].trace,u=a.ensureSingle(o,"g","lines");if(c.connector&&c.connector.visible){var d="h"===c.orientation,p=c.connector.mode,h=u.selectAll("g.line").data(a.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var f=h.size();h.each((function(r,o){if(o===f-1||r.cNext){var c=function(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),a[2]=o.c2p(e.nextS0,!0),i[2]=s.c2p(e.nextP0,!0),n?[a,i]:[i,a]}(r,s,l,d),u=c[0],h=c[1],m="";"spanning"===p&&!r.isSum&&o>0&&(m+=d?"M"+u[0]+","+h[1]+"V"+h[0]:"M"+u[1]+","+h[0]+"H"+u[0]),"between"!==p&&(r.isSum||o<f-1)&&(m+=d?"M"+u[1]+","+h[0]+"V"+h[1]:"M"+u[0]+","+h[1]+"H"+u[1]),void 0!==u[2]&&void 0!==h[2]&&(m+=d?"M"+u[1]+","+h[1]+"V"+h[2]:"M"+u[1]+","+h[1]+"H"+u[2]),""===m&&(m="M0,0Z"),a.ensureSingle(n.select(this),"path").attr("d",m).call(i.setClipUrl,t.layerClipId,e)}}))}else u.remove()}))}(e,t,r,s)}},{"../../components/drawing":612,"../../lib":716,"../bar/plot":866,d3:164}],1293:[function(e,t,r){"use strict";var n=e("d3"),a=e("../../components/drawing"),i=e("../../components/color"),o=e("../../constants/interactions").DESELECTDIM,s=e("../bar/style").styleTextPoints;t.exports={style:function(e,t,r){var l=r||n.select(e).selectAll("g.waterfalllayer").selectAll("g.trace");l.style("opacity",(function(e){return e[0].trace.opacity})),l.each((function(t){var r=n.select(this),l=t[0].trace;r.selectAll(".point > path").each((function(e){if(!e.isBlank){var t=l[e.dir].marker;n.select(this).call(i.fill,t.color).call(i.stroke,t.line.color).call(a.dashLine,t.line.dash,t.line.width).style("opacity",l.selectedpoints&&!e.selected?o:1)}})),s(r,l,e),r.selectAll(".lines").each((function(){var e=l.connector.line;a.lineGroupStyle(n.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}},{"../../components/color":591,"../../components/drawing":612,"../../constants/interactions":691,"../bar/style":869,d3:164}],1294:[function(e,t,r){"use strict";var n=e("../plots/cartesian/axes"),a=e("../lib"),i=e("../plot_api/plot_schema"),o=e("./helpers").pointsAccessorFunction,s=e("../constants/numerical").BADNUM;r.moduleType="transform",r.name="aggregate";var l=r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=l.aggregations;function u(e,t,r,i){if(i.enabled){for(var o=i.target,l=a.nestedProperty(t,o),c=l.get(),u=function(e,t){var r=e.func,n=t.d2c,a=t.c2d;switch(r){case"count":return d;case"first":return p;case"last":return h;case"sum":return function(e,t){for(var r=0,i=0;i<t.length;i++){var o=n(e[t[i]]);o!==s&&(r+=o)}return a(r)};case"avg":return function(e,t){for(var r=0,i=0,o=0;o<t.length;o++){var l=n(e[t[o]]);l!==s&&(r+=l,i++)}return i?a(r/i):s};case"min":return function(e,t){for(var r=1/0,i=0;i<t.length;i++){var o=n(e[t[i]]);o!==s&&(r=Math.min(r,o))}return r===1/0?s:a(r)};case"max":return function(e,t){for(var r=-1/0,i=0;i<t.length;i++){var o=n(e[t[i]]);o!==s&&(r=Math.max(r,o))}return r===-1/0?s:a(r)};case"range":return function(e,t){for(var r=1/0,i=-1/0,o=0;o<t.length;o++){var l=n(e[t[o]]);l!==s&&(r=Math.min(r,l),i=Math.max(i,l))}return i===-1/0||r===1/0?s:a(i-r)};case"change":return function(e,t){var r=n(e[t[0]]),i=n(e[t[t.length-1]]);return r===s||i===s?s:a(i-r)};case"median":return function(e,t){for(var r=[],i=0;i<t.length;i++){var o=n(e[t[i]]);o!==s&&r.push(o)}if(!r.length)return s;r.sort();var l=(r.length-1)/2;return a((r[Math.floor(l)]+r[Math.ceil(l)])/2)};case"mode":return function(e,t){for(var r={},i=0,o=s,l=0;l<t.length;l++){var c=n(e[t[l]]);if(c!==s){var u=r[c]=(r[c]||0)+1;u>i&&(i=u,o=c)}}return i?a(o):s};case"rms":return function(e,t){for(var r=0,i=0,o=0;o<t.length;o++){var l=n(e[t[o]]);l!==s&&(r+=l*l,i++)}return i?a(Math.sqrt(r/i)):s};case"stddev":return function(t,r){var a,i=0,o=0,l=1,c=s;for(a=0;a<r.length&&c===s;a++)c=n(t[r[a]]);if(c===s)return s;for(;a<r.length;a++){var u=n(t[r[a]]);if(u!==s){var d=u-c;i+=d,o+=d*d,l++}}var p="sample"===e.funcmode?l-1:l;return p?Math.sqrt((o-i*i/l)/p):0}}}(i,n.getDataConversions(e,t,o,c)),f=new Array(r.length),m=0;m<r.length;m++)f[m]=u(c,r[m]);l.set(f),"count"===i.func&&a.pushUnique(t._arrayAttrs,o)}}function d(e,t){return t.length}function p(e,t){return e[t[0]]}function h(e,t){return e[t[t.length-1]]}r.supplyDefaults=function(e,t){var r,n={};function o(t,r){return a.coerce(e,n,l,t,r)}if(!o("enabled"))return n;var s=i.findArrayAttributes(t),u={};for(r=0;r<s.length;r++)u[s[r]]=1;var d=o("groups");if(!Array.isArray(d)){if(!u[d])return n.enabled=!1,n;u[d]=0}var p,h=e.aggregations||[],f=n.aggregations=new Array(h.length);function m(e,t){return a.coerce(h[r],p,c,e,t)}for(r=0;r<h.length;r++){p={_index:r};var g=m("target"),v=m("func");m("enabled")&&g&&(u[g]||"count"===v&&void 0===u[g])?("stddev"===v&&m("funcmode"),u[g]=0,f[r]=p):f[r]={enabled:!1,_index:r}}for(r=0;r<s.length;r++)u[s[r]]&&f.push({target:s[r],func:c.func.dflt,enabled:!0,_index:-1});return n},r.calcTransform=function(e,t,r){if(r.enabled){var n=r.groups,i=a.getTargetArray(t,{target:n});if(i){var s,l,c,d,p={},h={},f=[],m=o(t.transforms,r),g=i.length;for(t._length&&(g=Math.min(g,t._length)),s=0;s<g;s++)void 0===(c=p[l=i[s]])?(p[l]=f.length,d=[s],f.push(d),h[p[l]]=m(s)):(f[c].push(s),h[p[l]]=(h[p[l]]||[]).concat(m(s)));r._indexToPoints=h;var v=r.aggregations;for(s=0;s<v.length;s++)u(e,t,f,v[s]);"string"==typeof n&&u(e,t,f,{target:n,func:"first",enabled:!0}),t._length=f.length}}}},{"../constants/numerical":692,"../lib":716,"../plot_api/plot_schema":753,"../plots/cartesian/axes":764,"./helpers":1297}],1295:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../registry"),i=e("../plots/cartesian/axes"),o=e("./helpers").pointsAccessorFunction,s=e("../constants/filter_ops"),l=s.COMPARISON_OPS,c=s.INTERVAL_OPS,u=s.SET_OPS;r.moduleType="transform",r.name="filter",r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},operation:{valType:"enumerated",values:[].concat(l).concat(c).concat(u),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},r.supplyDefaults=function(e){var t={};function i(a,i){return n.coerce(e,t,r.attributes,a,i)}if(i("enabled")){var o=i("target");if(n.isArrayOrTypedArray(o)&&0===o.length)return t.enabled=!1,t;i("preservegaps"),i("operation"),i("value");var s=a.getComponentMethod("calendars","handleDefaults");s(e,t,"valuecalendar",null),s(e,t,"targetcalendar",null)}return t},r.calcTransform=function(e,t,r){if(r.enabled){var a=n.getTargetArray(t,r);if(a){var s=r.target,d=a.length;t._length&&(d=Math.min(d,t._length));var p=r.targetcalendar,h=t._arrayAttrs,f=r.preservegaps;if("string"==typeof s){var m=n.nestedProperty(t,s+"calendar").get();m&&(p=m)}var g,v,y=function(e,t,r){var n=e.operation,a=e.value,i=Array.isArray(a);function o(e){return-1!==e.indexOf(n)}var s,d=function(r){return t(r,0,e.valuecalendar)},p=function(e){return t(e,0,r)};switch(o(l)?s=d(i?a[0]:a):o(c)?s=i?[d(a[0]),d(a[1])]:[d(a),d(a)]:o(u)&&(s=i?a.map(d):[d(a)]),n){case"=":return function(e){return p(e)===s};case"!=":return function(e){return p(e)!==s};case"<":return function(e){return p(e)<s};case"<=":return function(e){return p(e)<=s};case">":return function(e){return p(e)>s};case">=":return function(e){return p(e)>=s};case"[]":return function(e){var t=p(e);return t>=s[0]&&t<=s[1]};case"()":return function(e){var t=p(e);return t>s[0]&&t<s[1]};case"[)":return function(e){var t=p(e);return t>=s[0]&&t<s[1]};case"(]":return function(e){var t=p(e);return t>s[0]&&t<=s[1]};case"][":return function(e){var t=p(e);return t<=s[0]||t>=s[1]};case")(":return function(e){var t=p(e);return t<s[0]||t>s[1]};case"](":return function(e){var t=p(e);return t<=s[0]||t>s[1]};case")[":return function(e){var t=p(e);return t<s[0]||t>=s[1]};case"{}":return function(e){return-1!==s.indexOf(p(e))};case"}{":return function(e){return-1===s.indexOf(p(e))}}}(r,i.getDataToCoordFunc(e,t,s,a),p),b={},_={},x=0;f?(g=function(e){b[e.astr]=n.extendDeep([],e.get()),e.set(new Array(d))},v=function(e,t){var r=b[e.astr][t];e.get()[t]=r}):(g=function(e){b[e.astr]=n.extendDeep([],e.get()),e.set([])},v=function(e,t){var r=b[e.astr][t];e.get().push(r)}),M(g);for(var w=o(t.transforms,r),k=0;k<d;k++)y(a[k])?(M(v,k),_[x++]=w(k)):f&&x++;r._indexToPoints=_,t._length=x}}function M(e,r){for(var a=0;a<h.length;a++)e(n.nestedProperty(t,h[a]),r)}}},{"../constants/filter_ops":688,"../lib":716,"../plots/cartesian/axes":764,"../registry":845,"./helpers":1297}],1296:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plot_api/plot_schema"),i=e("../plots/plots"),o=e("./helpers").pointsAccessorFunction;function s(e,t){var r,s,l,c,u,d,p,h,f,m,g=t.transform,v=t.transformIndex,y=e.transforms[v].groups,b=o(e.transforms,g);if(!Array.isArray(y)||0===y.length)return[e];var _=n.filterUnique(y),x=new Array(_.length),w=y.length,k=a.findArrayAttributes(e),M=g.styles||[],T={};for(r=0;r<M.length;r++)T[M[r].target]=M[r].value;g.styles&&(m=n.keyedContainer(g,"styles","target","value.name"));var C={},S={};for(r=0;r<_.length;r++){C[d=_[r]]=r,S[d]=0,(p=x[r]=n.extendDeepNoArrays({},e))._group=d,p.transforms[v]._indexToPoints={};var L=null;for(m&&(L=m.get(d)),p.name=L||""===L?L:n.templateString(g.nameformat,{trace:e.name,group:d}),h=p.transforms,p.transforms=[],s=0;s<h.length;s++)p.transforms[s]=n.extendDeepNoArrays({},h[s]);for(s=0;s<k.length;s++)n.nestedProperty(p,k[s]).set([])}for(l=0;l<k.length;l++){for(c=k[l],s=0,f=[];s<_.length;s++)f[s]=n.nestedProperty(x[s],c).get();for(u=n.nestedProperty(e,c).get(),s=0;s<w;s++)f[C[y[s]]].push(u[s])}for(s=0;s<w;s++)(p=x[C[y[s]]]).transforms[v]._indexToPoints[S[y[s]]]=b(s),S[y[s]]++;for(r=0;r<_.length;r++)d=_[r],p=x[r],i.clearExpandedTraceDefaultColors(p),p=n.extendDeepNoArrays(p,T[d]||{});return x}r.moduleType="transform",r.name="groupby",r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},r.supplyDefaults=function(e,t,a){var i,o={};function s(t,a){return n.coerce(e,o,r.attributes,t,a)}if(!s("enabled"))return o;s("groups"),s("nameformat",a._dataLength>1?"%{group} (%{trace})":"%{group}");var l=e.styles,c=o.styles=[];if(l)for(i=0;i<l.length;i++){var u=c[i]={};n.coerce(l[i],c[i],r.attributes.styles,"target");var d=n.coerce(l[i],c[i],r.attributes.styles,"value");n.isPlainObject(d)?u.value=n.extendDeep({},d):d&&delete u.value}return o},r.transform=function(e,t){var r,n,a,i=[];for(n=0;n<e.length;n++)for(r=s(e[n],t),a=0;a<r.length;a++)i.push(r[a]);return i}},{"../lib":716,"../plot_api/plot_schema":753,"../plots/plots":825,"./helpers":1297}],1297:[function(e,t,r){"use strict";r.pointsAccessorFunction=function(e,t){for(var r,n,a=0;a<e.length&&(r=e[a])!==t;a++)r._indexToPoints&&!1!==r.enabled&&(n=r._indexToPoints);return n?function(e){return n[e]}:function(e){return[e]}}},{}],1298:[function(e,t,r){"use strict";var n=e("../lib"),a=e("../plots/cartesian/axes"),i=e("./helpers").pointsAccessorFunction;r.moduleType="transform",r.name="sort",r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},target:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},order:{valType:"enumerated",values:["ascending","descending"],dflt:"ascending",editType:"calc"},editType:"calc"},r.supplyDefaults=function(e){var t={};function a(a,i){return n.coerce(e,t,r.attributes,a,i)}return a("enabled")&&(a("target"),a("order")),t},r.calcTransform=function(e,t,r){if(r.enabled){var o=n.getTargetArray(t,r);if(o){var s=r.target,l=o.length;t._length&&(l=Math.min(l,t._length));var c,u,d=t._arrayAttrs,p=function(e,t,r,n){var a,i=new Array(n),o=new Array(n);for(a=0;a<n;a++)i[a]={v:t[a],i:a};for(i.sort(function(e,t){switch(e.order){case"ascending":return function(e,r){return t(e.v)-t(r.v)};case"descending":return function(e,r){return t(r.v)-t(e.v)}}}(e,r)),a=0;a<n;a++)o[a]=i[a].i;return o}(r,o,a.getDataToCoordFunc(e,t,s,o),l),h=i(t.transforms,r),f={};for(c=0;c<d.length;c++){var m=n.nestedProperty(t,d[c]),g=m.get(),v=new Array(l);for(u=0;u<l;u++)v[u]=g[p[u]];m.set(v)}for(u=0;u<l;u++)f[u]=h(p[u]);r._indexToPoints=f,t._length=l}}}},{"../lib":716,"../plots/cartesian/axes":764,"./helpers":1297}]},{},[26])(26)}).call(this,r(68))},,function(e,t,r){"use strict";var n=r(103),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:o,isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]=r}for(var n=0,a=arguments.length;n<a;n++)c(arguments[n],r);return t},deepMerge:function e(){var t={};function r(r,n){"object"==typeof t[n]&&"object"==typeof r?t[n]=e(t[n],r):t[n]="object"==typeof r?e({},r):r}for(var n=0,a=arguments.length;n<a;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,(function(t,a){e[a]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var a=(o=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),i=n.sources.map((function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"}));return[r].concat(i).concat([a]).join("\n")}var o;return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r})).join("")},t.i=function(e,r){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},a=0;a<this.length;a++){var i=this[a][0];null!=i&&(n[i]=!0)}for(a=0;a<e.length;a++){var o=e[a];null!=o[0]&&n[o[0]]||(r&&!o[2]?o[2]=r:r&&(o[2]="("+o[2]+") and ("+r+")"),t.push(o))}},t}},function(e,t,r){var n,a,i={},o=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=n.apply(this,arguments)),a}),s=function(e,t){return t?t.querySelector(e):document.querySelector(e)},l=function(e){var t={};return function(e,r){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e,r);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),c=null,u=0,d=[],p=r(313);function h(e,t){for(var r=0;r<e.length;r++){var n=e[r],a=i[n.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](n.parts[o]);for(;o<n.parts.length;o++)a.parts.push(b(n.parts[o],t))}else{var s=[];for(o=0;o<n.parts.length;o++)s.push(b(n.parts[o],t));i[n.id]={id:n.id,refs:1,parts:s}}}}function f(e,t){for(var r=[],n={},a=0;a<e.length;a++){var i=e[a],o=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[3]};n[o]?n[o].parts.push(s):r.push(n[o]={id:o,parts:[s]})}return r}function m(e,t){var r=l(e.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=d[d.length-1];if("top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),d.push(t);else if("bottom"===e.insertAt)r.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var a=l(e.insertAt.before,r);r.insertBefore(t,a)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function v(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return r.nc}();n&&(e.attrs.nonce=n)}return y(t,e.attrs),m(e,t),t}function y(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function b(e,t){var r,n,a,i;if(t.transform&&e.css){if(!(i="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=i}if(t.singleton){var o=u++;r=c||(c=v(t)),n=w.bind(null,r,o,!1),a=w.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),m(e,t),t}(t),n=M.bind(null,r,t),a=function(){g(r),r.href&&URL.revokeObjectURL(r.href)}):(r=v(t),n=k.bind(null,r),a=function(){g(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=f(e,t);return h(r,t),function(e){for(var n=[],a=0;a<r.length;a++){var o=r[a];(s=i[o.id]).refs--,n.push(s)}e&&h(f(e,t),t);for(a=0;a<n.length;a++){var s;if(0===(s=n[a]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete i[s.id]}}}};var _,x=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function w(e,t,r,n){var a=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=x(t,a);else{var i=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(i,o[t]):e.appendChild(i)}}function k(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function M(e,t,r){var n=r.css,a=r.sourceMap,i=void 0===t.convertToAbsoluteUrls&&a;(t.convertToAbsoluteUrls||i)&&(n=p(n)),a&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var o=new Blob([n],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}},function(e,t,r){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=r(287)},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(76);function a(e){if(!n.a&&"undefined"!=typeof document){var t=e;return t&&t.ownerDocument?t.ownerDocument:document}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return n}));var n,a={none:0,all:1,inputOnly:2};!function(e){e[e.vertical=0]="vertical",e[e.horizontal=1]="horizontal",e[e.bidirectional=2]="bidirectional",e[e.domOrder=3]="domOrder"}(n||(n={}))},,,function(e,t,r){"use strict";var n=r(0),a=r.n(n),i=r(72),o=r(4),s=r(10),l=r(1),c=r(8),u=r(18),d=r(379),p=r(80),h=r(274),f=r(3),m=r.n(f),g=r(74),v=r(9),y=r(14),b=r(372),_=r(381),x=r(374),w=r(384),k=r(371),M=r(15),T=r(385),C=r(373),S=r(354),L=r(2),A=r(355),E=r(71);var D,I=r(363),P=r(26),O=r(356),R=r(91),F=r(77),z=r(60);!function(e){e[e.Parent=0]="Parent",e[e.Self=1]="Self"}(D||(D={}));var N,j=Object(A.a)(),B=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onRenderContent=function(e){return n.createElement("p",{className:t._classNames.subText},e.content)},t}return Object(L.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,r=e.calloutProps,a=e.directionalHint,i=e.directionalHintForRTL,o=e.styles,s=e.id,l=e.maxWidth,c=e.onRenderContent,u=void 0===c?this._onRenderContent:c,d=e.targetElement,p=e.theme;return this._classNames=j(o,{theme:p,className:t||r&&r.className,beakWidth:r&&r.beakWidth,gapSpace:r&&r.gapSpace,maxWidth:l}),n.createElement(k.a,Object(L.a)({target:d,directionalHint:a,directionalHintForRTL:i},r,Object(z.d)(this.props,z.c,["id"]),{className:this._classNames.root}),n.createElement("div",{className:this._classNames.content,id:s,role:"tooltip",onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave},u(this.props,this._onRenderContent)))},t.defaultProps={directionalHint:M.a.topCenter,maxWidth:"364px",calloutProps:{isBeakVisible:!0,beakWidth:16,gapSpace:0,setInitialFocus:!0,doNotLayer:!1}},t}(n.Component),Y=Object(S.a)(B,(function(e){var t=e.className,r=e.beakWidth,n=void 0===r?16:r,a=e.gapSpace,i=void 0===a?0:a,o=e.maxWidth,s=e.theme,l=s.semanticColors,c=s.fonts,u=s.effects,d=-(Math.sqrt(n*n/2)+i);return{root:["ms-Tooltip",s.fonts.medium,v.a.fadeIn200,{background:l.menuBackground,boxShadow:u.elevation8,padding:"8px",maxWidth:o,selectors:{":after":{content:"''",position:"absolute",bottom:d,left:d,right:d,top:d,zIndex:0}}},t],content:["ms-Tooltip-content",c.small,{position:"relative",zIndex:1,color:l.menuItemText,wordWrap:"break-word",overflowWrap:"break-word",overflow:"hidden"}],subText:["ms-Tooltip-subtext",{fontSize:"inherit",fontWeight:"inherit",color:"inherit",margin:0}]}}),void 0,{scope:"Tooltip"});!function(e){e[e.zero=0]="zero",e[e.medium=1]="medium",e[e.long=2]="long"}(N||(N={}));var H=Object(A.a)(),V=function(e){function t(r){var a=e.call(this,r)||this;return a._tooltipHost=n.createRef(),a._defaultTooltipId=Object(E.a)("tooltip"),a.show=function(){a._toggleTooltip(!0)},a.dismiss=function(){a._hideTooltip()},a._getTargetElement=function(){if(a._tooltipHost.current){var e=a.props.overflowMode;if(void 0!==e)switch(e){case D.Parent:return a._tooltipHost.current.parentElement;case D.Self:return a._tooltipHost.current}return a._tooltipHost.current}},a._onTooltipMouseEnter=function(e){var r,n=a.props,i=n.overflowMode,o=n.delay;if(t._currentVisibleTooltip&&t._currentVisibleTooltip!==a&&t._currentVisibleTooltip.dismiss(),t._currentVisibleTooltip=a,void 0!==i){var s=a._getTargetElement();if(s&&(!function(e){return e.clientWidth<e.scrollWidth}(r=s)&&!function(e){return e.clientHeight<e.scrollHeight}(r)))return}if(!e.target||!Object(I.a)(e.target,a._getTargetElement()))if(a._clearDismissTimer(),a._clearOpenTimer(),o!==N.zero){a.setState({isAriaPlaceholderRendered:!0});var l=a._getDelayTime(o);a._openTimerId=a._async.setTimeout((function(){a._toggleTooltip(!0)}),l)}else a._toggleTooltip(!0)},a._onTooltipMouseLeave=function(e){var r=a.props.closeDelay;a._clearDismissTimer(),a._clearOpenTimer(),r?a._dismissTimerId=a._async.setTimeout((function(){a._toggleTooltip(!1)}),r):a._toggleTooltip(!1),t._currentVisibleTooltip===a&&(t._currentVisibleTooltip=void 0)},a._onTooltipKeyDown=function(e){e.which===P.a.escape&&a._hideTooltip()},a._clearDismissTimer=function(){a._async.clearTimeout(a._dismissTimerId)},a._clearOpenTimer=function(){a._async.clearTimeout(a._openTimerId)},a._hideTooltip=function(){a._clearOpenTimer(),a._clearDismissTimer(),a._toggleTooltip(!1)},a._toggleTooltip=function(e){a.state.isTooltipVisible!==e&&a.setState({isAriaPlaceholderRendered:!1,isTooltipVisible:e},(function(){return a.props.onTooltipToggle&&a.props.onTooltipToggle(e)}))},a._getDelayTime=function(e){switch(e){case N.medium:return 300;case N.long:return 500;default:return 0}},Object(O.a)(a),a.state={isAriaPlaceholderRendered:!1,isTooltipVisible:!1},a._async=new R.a(a),a}return Object(L.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.calloutProps,r=e.children,a=e.content,i=e.directionalHint,o=e.directionalHintForRTL,s=e.hostClassName,l=e.id,c=e.setAriaDescribedBy,u=void 0===c||c,d=e.tooltipProps,p=e.styles,h=e.theme;this._classNames=H(p,{theme:h,className:s});var f=this.state,m=f.isAriaPlaceholderRendered,g=f.isTooltipVisible,y=l||this._defaultTooltipId,b=!!(a||d&&d.onRenderContent&&d.onRenderContent()),_=g&&b,x=u&&g&&b?y:void 0;return n.createElement("div",Object(L.a)({className:this._classNames.root,ref:this._tooltipHost},{onFocusCapture:this._onTooltipMouseEnter},{onBlurCapture:this._hideTooltip},{onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onKeyDown:this._onTooltipKeyDown,"aria-describedby":x}),r,_&&n.createElement(Y,Object(L.a)({id:y,content:a,targetElement:this._getTargetElement(),directionalHint:i,directionalHintForRTL:o,calloutProps:Object(F.a)({},t,{onDismiss:this._hideTooltip,onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave}),onMouseEnter:this._onTooltipMouseEnter,onMouseLeave:this._onTooltipMouseLeave,onWheel:this._hideTooltip},Object(z.d)(this.props,z.c),d)),m&&n.createElement("div",{id:y,style:v.B},a))},t.prototype.componentWillUnmount=function(){t._currentVisibleTooltip&&t._currentVisibleTooltip===this&&(t._currentVisibleTooltip=void 0),this._async.dispose()},t.defaultProps={delay:N.medium},t}(n.Component),U={root:"ms-TooltipHost",ariaPlaceholder:"ms-TooltipHost-aria-placeholder"},W=Object(S.a)(V,(function(e){var t=e.className,r=e.theme;return{root:[Object(v.v)(U,r).root,{display:"inline"},t]}}),void 0,{scope:"TooltipHost"}),G=r(386),q=r(368),K=r(275),X=r(387),Z=r(369),J=r(79),$=r(272),Q=Object(A.a)(),ee="SearchBox",te=function(e){function t(t){var r=e.call(this,t)||this;return r._rootElement=n.createRef(),r._inputElement=n.createRef(),r._onClickFocus=function(){var e=r._inputElement.current;e&&(r.focus(),e.selectionStart=e.selectionEnd=0)},r._onFocusCapture=function(e){r.setState({hasFocus:!0}),r._events||(r._events=new J.a(r)),r._events.on(e.currentTarget,"blur",r._onBlur,!0),r.props.onFocus&&r.props.onFocus(e)},r._onClearClick=function(e){var t=r.props.clearButtonProps;t&&t.onClick&&t.onClick(e),e.defaultPrevented||r._onClear(e)},r._onKeyDown=function(e){switch(e.which){case P.a.escape:r.props.onEscape&&r.props.onEscape(e),e.defaultPrevented||r._onClear(e);break;case P.a.enter:if(r.props.onSearch){r.props.onSearch(r.state.value);break}return;default:if(r.props.onKeyDown&&r.props.onKeyDown(e),!e.defaultPrevented)return}e.preventDefault(),e.stopPropagation()},r._onBlur=function(e){r._events&&r._events.off(),r.setState({hasFocus:!1}),r.props.onBlur&&r.props.onBlur(e)},r._onInputChange=function(e){var t=e.target.value;t!==r._latestValue&&(r._latestValue=t,r.setState({value:t}),r._callOnChange(e,t))},Object(O.a)(r),Object($.a)(ee,t,{labelText:"placeholder",defaultValue:"value"}),r._latestValue=t.value||"",r._fallbackId=Object(E.a)(ee),r.state={value:r._latestValue,hasFocus:!1},r}return Object(L.c)(t,e),t.prototype.UNSAFE_componentWillReceiveProps=function(e){void 0!==e.value&&(this._latestValue=e.value,this.setState({value:e.value||""}))},t.prototype.componentWillUnmount=function(){this._events&&this._events.dispose()},t.prototype.render=function(){var e=this.props,t=e.ariaLabel,r=e.placeholder,a=e.className,i=e.disabled,o=e.underlined,s=e.styles,l=e.labelText,c=e.theme,u=e.clearButtonProps,d=e.disableAnimation,p=e.iconProps,h=e.id,f=void 0===h?this._fallbackId:h,m=this.state,g=m.value,v=m.hasFocus,y=void 0===l?r:l,b=Q(s,{theme:c,className:a,underlined:o,hasFocus:v,disabled:i,hasInput:g.length>0,disableAnimation:d}),x=Object(z.d)(this.props,z.g,["className","placeholder","onFocus","onBlur","value"]);return n.createElement("div",{role:"search",ref:this._rootElement,className:b.root,onFocusCapture:this._onFocusCapture},n.createElement("div",{className:b.iconContainer,onClick:this._onClickFocus,"aria-hidden":!0},n.createElement(_.a,Object(L.a)({iconName:"Search"},p,{className:b.icon}))),n.createElement("input",Object(L.a)({},x,{id:f,className:b.field,placeholder:y,onChange:this._onInputChange,onInput:this._onInputChange,onKeyDown:this._onKeyDown,value:g,disabled:i,role:"searchbox","aria-label":t,ref:this._inputElement})),g.length>0&&n.createElement("div",{className:b.clearButton},n.createElement(G.a,Object(L.a)({styles:{root:{height:"auto"},icon:{fontSize:"12px"}},iconProps:{iconName:"Clear"}},u,{onClick:this._onClearClick}))))},t.prototype.focus=function(){this._inputElement.current&&this._inputElement.current.focus()},t.prototype.hasFocus=function(){return!!this.state.hasFocus},t.prototype._onClear=function(e){this.props.onClear&&this.props.onClear(e),e.defaultPrevented||(this._latestValue="",this.setState({value:""}),this._callOnChange(void 0,""),e.stopPropagation(),e.preventDefault(),this.focus())},t.prototype._callOnChange=function(e,t){var r=this.props,n=r.onChange,a=r.onChanged;a&&a(t),n&&n(e,t)},t.defaultProps={disableAnimation:!1,clearButtonProps:{ariaLabel:"Clear text"}},t}(n.Component),re=r(276),ne={root:"ms-SearchBox",iconContainer:"ms-SearchBox-iconContainer",icon:"ms-SearchBox-icon",clearButton:"ms-SearchBox-clearButton",field:"ms-SearchBox-field"};var ae,ie,oe,se=Object(S.a)(te,(function(e){var t,r,n,a,i=e.theme,o=e.underlined,s=e.disabled,l=e.hasFocus,c=e.className,u=e.hasInput,d=e.disableAnimation,p=i.palette,h=i.fonts,f=i.semanticColors,m=i.effects,g=Object(v.v)(ne,i),y={color:f.inputPlaceholderText,opacity:1},b=p.neutralSecondary,_=p.neutralPrimary,x=p.neutralLighter,w=p.neutralLighter,k=p.neutralLighter;return{root:[g.root,h.medium,v.G,{color:f.inputText,backgroundColor:f.inputBackground,display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"stretch",padding:"1px 0 1px 4px",borderRadius:m.roundedCorner2,border:"1px solid "+f.inputBorder,height:32,selectors:(t={},t[v.f]={borderColor:"WindowText"},t[":hover"]={borderColor:f.inputBorderHovered,selectors:(r={},r[v.f]={borderColor:"Highlight"},r)},t[":hover ."+g.iconContainer]={color:f.inputIconHovered},t)},!l&&u&&{selectors:(n={},n[":hover ."+g.iconContainer]={width:4},n[":hover ."+g.icon]={opacity:0},n)},l&&["is-active",{position:"relative"},Object(v.x)(f.inputFocusBorderAlt,o?0:m.roundedCorner2,o?"borderBottom":"border")],s&&["is-disabled",{borderColor:x,backgroundColor:k,pointerEvents:"none",cursor:"default",selectors:(a={},a[v.f]={borderColor:"GrayText"},a)}],o&&["is-underlined",{borderWidth:"0 0 1px 0",borderRadius:0,padding:"1px 0 1px 8px"}],o&&s&&{backgroundColor:"transparent"},u&&"can-clear",c],iconContainer:[g.iconContainer,{display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,fontSize:16,width:32,textAlign:"center",color:f.inputIcon,cursor:"text"},l&&{width:4},s&&{color:f.inputIconDisabled},!d&&{transition:"width "+v.c.durationValue1}],icon:[g.icon,{opacity:1},l&&{opacity:0},!d&&{transition:"opacity "+v.c.durationValue1+" 0s"}],clearButton:[g.clearButton,{display:"flex",flexDirection:"row",alignItems:"stretch",cursor:"pointer",flexBasis:"32px",flexShrink:0,padding:0,margin:"-1px 0px",selectors:{"&:hover .ms-Button":{backgroundColor:w},"&:hover .ms-Button-icon":{color:_},".ms-Button":{borderRadius:Object(re.a)(i)?"1px 0 0 1px":"0 1px 1px 0"},".ms-Button-icon":{color:b}}}],field:[g.field,v.G,Object(v.y)(y),{backgroundColor:"transparent",border:"none",outline:"none",fontWeight:"inherit",fontFamily:"inherit",fontSize:"inherit",color:f.inputText,flex:"1 1 0px",minWidth:"0px",overflow:"hidden",textOverflow:"ellipsis",paddingBottom:.5,selectors:{"::-ms-clear":{display:"none"}}},s&&{color:f.disabledText}]}}),void 0,{scope:"SearchBox"}),le=r(375),ce=r(5),ue=r(12),de=r(377),pe=(ae=function(e,t){return(ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}ae(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),he=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},fe=function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},me=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n},ge=function(e){function t(t){var r=e.call(this,t)||this;r.updateSelectedOptionKeys=function(e,t){var r=(e=me(e)).indexOf(t.key);return t.selected&&r<0?e.push(t.key):e.splice(r,1),e};var n=r.buildRangeView(r.props.feature),a=r.buildRange(n);return r.state={yAxes:[],abortControllers:[],rangeView:n,xAxisArray:a},r.onCategoricalRangeChanged=r.onCategoricalRangeChanged.bind(r),r.onMinRangeChanged=r.onMinRangeChanged.bind(r),r.onMaxRangeChanged=r.onMaxRangeChanged.bind(r),r.onStepsRangeChanged=r.onStepsRangeChanged.bind(r),r.debounceFetchData=m.a.debounce(r.fetchData.bind(r),500),r}return pe(t,e),t.buildYAxis=function(e,t){return e.modelType===c.a.regression?l.a.IcePlot.prediction:l.a.IcePlot.predictedProbability+"<br>"+l.a.formatString(l.a.WhatIfTab.classLabel,e.classNames[t])},t.buildPlotlyProps=function(e,r,n,a,i,o,u,d){if(void 0!==d&&void 0!==u&&0!==d.length&&!d.some((function(e){return void 0===e})))return{config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:d.map((function(t,d){var p=Array.isArray(t[0])?y.a.transpose2DArray(t):[t],h=e.modelType===c.a.regression?l.a.IcePlot.prediction:l.a.IcePlot.predictedProbability+": "+e.classNames[n],f="%{customdata.Name}<br>"+r+": %{x}<br>"+h+": %{customdata.Yformatted}<br><extra></extra>";return{mode:o===s.g.categorical?s.e.markers:s.e.linesMarkers,type:"scatter",hovertemplate:f,hoverinfo:"all",x:u,y:p[n],marker:{color:a[d]},name:i[d],customdata:p[n].map((function(e){return{Name:i[d],Yformatted:e.toLocaleString(void 0,{maximumFractionDigits:3})}}))}})),layout:{dragmode:!1,autosize:!0,font:{size:10},margin:{t:10,b:30,r:10},hovermode:"closest",showlegend:!1,yaxis:{automargin:!0,title:t.buildYAxis(e,n)},xaxis:{title:r,automargin:!0}}}},t.prototype.componentDidMount=function(){this.fetchData()},t.prototype.componentDidUpdate=function(e){this.props.datapoints!==e.datapoints&&this.fetchData(),this.props.feature!==e.feature&&this.onFeatureSelected()},t.prototype.componentWillUnmount=function(){this.state.abortControllers.forEach((function(e){void 0!==e&&e.abort()}))},t.prototype.render=function(){if(void 0===this.props.invokeModel)return a.a.createElement(ue.e,null);var e=function(){Object(v.A)();return Object(v.E)({iceWrapper:{display:"flex",flexDirection:"column",flex:"1",justifyContent:"stretch"},controlArea:{display:"flex",padding:"10px 15px 3px 67px",justifyContent:"space-between"},parameterList:{display:"flex",flex:"1"},placeholder:{margin:"auto",padding:"40px",fontSize:"25px"},chartWrapper:{flex:"1"}})}(),r=this.state.abortControllers.some((function(e){return void 0!==e})),n=t.buildPlotlyProps(this.props.metadata,this.props.jointDataset.metaDict[this.props.feature].label,this.props.selectedClass,this.props.colors,this.props.rowNames,this.state.rangeView.type,this.state.xAxisArray,this.state.yAxes),i=void 0!==this.state.rangeView&&(void 0!==this.state.rangeView.maxErrorMessage||void 0!==this.state.rangeView.minErrorMessage||void 0!==this.state.rangeView.stepsErrorMessage);return a.a.createElement("div",{className:e.iceWrapper},void 0!==this.state.rangeView&&a.a.createElement("div",{className:e.controlArea},this.state.rangeView.type===s.g.categorical&&a.a.createElement(x.a,{multiSelect:!0,selectedKey:this.state.rangeView.selectedOptionKeys,allowFreeform:!0,autoComplete:"on",options:this.state.rangeView.categoricalOptions,onChange:this.onCategoricalRangeChanged,styles:ce.a.defaultDropdownStyle,calloutProps:ce.a.calloutProps}),this.state.rangeView.type!==s.g.categorical&&a.a.createElement("div",{className:e.parameterList},a.a.createElement(de.a,{styles:{spinButtonWrapper:{maxWidth:"68px"},labelWrapper:{alignSelf:"center"},root:{display:"inline-flex",float:"right",selectors:{"> div":{maxWidth:"78px"}}}},label:l.a.WhatIfTab.minLabel,value:this.state.rangeView.min.toString(),onIncrement:this.onMinRangeChanged.bind(this,1),onDecrement:this.onMinRangeChanged.bind(this,-1),onValidate:this.onMinRangeChanged.bind(this,0)}),a.a.createElement(de.a,{styles:{spinButtonWrapper:{maxWidth:"68px"},labelWrapper:{alignSelf:"center"},root:{display:"inline-flex",float:"right",selectors:{"> div":{maxWidth:"78px"}}}},label:l.a.WhatIfTab.maxLabel,value:this.state.rangeView.max.toString(),onIncrement:this.onMaxRangeChanged.bind(this,1),onDecrement:this.onMaxRangeChanged.bind(this,-1),onValidate:this.onMaxRangeChanged.bind(this,0)}),a.a.createElement(de.a,{styles:{spinButtonWrapper:{maxWidth:"68px"},labelWrapper:{alignSelf:"center"},root:{display:"inline-flex",float:"right",selectors:{"> div":{maxWidth:"78px"}}}},label:l.a.WhatIfTab.stepsLabel,value:this.state.rangeView.steps.toString(),onIncrement:this.onStepsRangeChanged.bind(this,1),onDecrement:this.onStepsRangeChanged.bind(this,-1),onValidate:this.onStepsRangeChanged.bind(this,0)}))),r&&a.a.createElement("div",{className:e.placeholder},a.a.createElement(b.a,null,l.a.IcePlot.loadingMessage)),this.state.errorMessage&&a.a.createElement("div",{className:e.placeholder},a.a.createElement(b.a,null,this.state.errorMessage)),void 0===n&&!r&&a.a.createElement("div",{className:e.placeholder},a.a.createElement(b.a,null,l.a.IcePlot.submitPrompt)),i&&a.a.createElement("div",{className:e.placeholder},a.a.createElement(b.a,null,l.a.IcePlot.topLevelErrorMessage)),void 0!==n&&!r&&!i&&a.a.createElement("div",{className:e.chartWrapper},a.a.createElement(s.a,{plotlyProps:n,theme:Object(v.A)()})))},t.prototype.onFeatureSelected=function(){var e=this,t=this.buildRangeView(this.props.feature),r=this.buildRange(t);this.setState({rangeView:t,xAxisArray:r},(function(){e.debounceFetchData()}))},t.prototype.onMinRangeChanged=function(e,t){var r=this,n=m.a.cloneDeep(this.state.rangeView);if(0===e){var a=+t;if(Number.isNaN(a))return n.min.toString();n.min=a}else n.min+=e;if(+n.max<=n.min)return this.state.rangeView.min.toString();var i=this.buildRange(n);this.setState({rangeView:n,xAxisArray:i,yAxes:void 0,abortControllers:[new AbortController]},(function(){r.debounceFetchData()}))},t.prototype.onMaxRangeChanged=function(e,t){var r=this,n=m.a.cloneDeep(this.state.rangeView);if(0===e){var a=+t;if(Number.isNaN(a))return n.max.toString();n.max=a}else n.max+=e;if(n.max<=n.min)return this.state.rangeView.max.toString();var i=this.buildRange(n);this.setState({rangeView:n,xAxisArray:i,yAxes:void 0,abortControllers:[new AbortController]},(function(){r.debounceFetchData()}))},t.prototype.onStepsRangeChanged=function(e,t){var r=this,n=m.a.cloneDeep(this.state.rangeView);if(0===e){var a=+t;if(!Number.isInteger(a))return n.steps.toString();n.steps=a}else n.steps+=e;if(n.steps<=0)return this.state.rangeView.steps.toString();var i=this.buildRange(n);this.setState({rangeView:n,xAxisArray:i,yAxes:void 0,abortControllers:[new AbortController]},(function(){r.debounceFetchData()}))},t.prototype.onCategoricalRangeChanged=function(e,t,r,n){var a=this,i=m.a.cloneDeep(this.state.rangeView),o=i.selectedOptionKeys||[];if(t)i.selectedOptionKeys=this.updateSelectedOptionKeys(o,t);else if(void 0!==n){var s={key:n,text:n};i.selectedOptionKeys=me(o,[s.key]),i.categoricalOptions.push(s)}var l=this.buildRange(i);this.setState({rangeView:i,xAxisArray:l},(function(){a.debounceFetchData()}))},t.prototype.fetchData=function(){var e=this;this.state.abortControllers.forEach((function(e){void 0!==e&&e.abort()}));var t=this.props.datapoints.map((function(t,r){var n=new AbortController;e.state.abortControllers[r]=n;var a=e.buildDataSpans(t,e.state.xAxisArray);return e.props.invokeModel(a,n.signal)})),r=this.props.datapoints.map((function(e){}));this.setState({yAxes:r,errorMessage:void 0},(function(){return he(e,void 0,void 0,(function(){var e,r;return fe(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,Promise.all(t)];case 1:return e=n.sent(),Array.isArray(e)&&e.every((function(e){return Array.isArray(e)}))&&this.setState({yAxes:e,abortControllers:this.props.datapoints.map((function(e){}))}),[3,3];case 2:return"AbortError"===(r=n.sent()).name?[2]:("PythonError"===r.name&&this.setState({errorMessage:l.a.formatString(l.a.IcePlot.errorPrefix,r.message)}),[3,3]);case 3:return[2]}}))}))}))},t.prototype.buildDataSpans=function(e,t){var r=this;return t.map((function(t){var n=m.a.cloneDeep(e);return n[r.state.rangeView.featureIndex]=t,n}))},t.prototype.buildRangeView=function(e){var t=this.props.jointDataset.metaDict[e];return t.treatAsCategorical?t.isCategorical?{key:e,featureIndex:t.index,selectedOptionKeys:t.sortedCategoricalValues,categoricalOptions:t.sortedCategoricalValues.map((function(e){return{key:e,text:e}})),type:s.g.categorical}:{key:e,featureIndex:t.index,selectedOptionKeys:t.sortedCategoricalValues.map((function(e){return+e})),categoricalOptions:t.sortedCategoricalValues.map((function(e){return{key:+e,text:e.toString()}})),type:s.g.categorical}:{key:e,featureIndex:t.index,min:t.featureRange.min,max:t.featureRange.max,steps:20,type:t.featureRange.rangeType}},t.prototype.buildRange=function(e){if(void 0===e||void 0!==e.minErrorMessage||void 0!==e.maxErrorMessage||void 0!==e.stepsErrorMessage)return[];var t=e.min,r=e.max,n=e.steps;if(e.type===s.g.categorical&&Array.isArray(e.selectedOptionKeys))return e.selectedOptionKeys;if(Number.isNaN(t)||Number.isNaN(r)||!Number.isInteger(n))return[];var a=n>0?(r-t)/n:r-t;return m.a.uniq(Array.from({length:n},(function(r,n){return e.type===s.g.integer?Math.round(t+n*a):t+n*a})))},t}(a.a.PureComponent),ve=r(382);!function(e){e[e.none=0]="none",e[e.single=1]="single",e[e.multiple=2]="multiple"}(ie||(ie={})),function(e){e[e.horizontal=0]="horizontal",e[e.vertical=1]="vertical"}(oe||(oe={}));var ye=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0]||{},n=r.onSelectionChanged,a=r.getKey,i=r.canSelectItem,o=void 0===i?function(){return!0}:i,s=r.selectionMode,l=void 0===s?ie.multiple:s;this.mode=l,this._getKey=a||be,this._changeEventSuppressionCount=0,this._exemptedCount=0,this._anchoredIndex=0,this._unselectableCount=0,this._onSelectionChanged=n,this._canSelectItem=o,this._isModal=!1,this.setItems([],!0),this.count=this.getSelectedCount()}return e.prototype.canSelectItem=function(e,t){return!("number"==typeof t&&t<0)&&this._canSelectItem(e,t)},e.prototype.getKey=function(e,t){var r=this._getKey(e,t);return"number"==typeof r||r?""+r:""},e.prototype.setChangeEvents=function(e,t){this._changeEventSuppressionCount+=e?-1:1,0===this._changeEventSuppressionCount&&this._hasChanged&&(this._hasChanged=!1,t||this._change())},e.prototype.isModal=function(){return this._isModal},e.prototype.setModal=function(e){this._isModal!==e&&(this.setChangeEvents(!1),this._isModal=e,e||this.setAllSelected(!1),this._change(),this.setChangeEvents(!0))},e.prototype.setItems=function(e,t){void 0===t&&(t=!0);var r={},n={},a=!1;this.setChangeEvents(!1),this._unselectableCount=0;for(var i=0;i<e.length;i++){if(u=e[i]){var o=this.getKey(u,i);o&&(r[o]=i)}n[i]=u&&!this.canSelectItem(u),n[i]&&this._unselectableCount++}(t||0===e.length)&&this._setAllSelected(!1,!0);var s={},l=0;for(var c in this._exemptedIndices)if(this._exemptedIndices.hasOwnProperty(c)){var u,d=Number(c),p=(u=this._items[d])?this.getKey(u,Number(d)):void 0,h=p?r[p]:d;void 0===h?a=!0:(s[h]=!0,l++,a=a||h!==d)}this._items&&0===this._exemptedCount&&e.length!==this._items.length&&this._isAllSelected&&(a=!0),this._exemptedIndices=s,this._exemptedCount=l,this._keyToIndexMap=r,this._unselectableIndices=n,this._items=e,this._selectedItems=null,a&&(this._updateCount(),this._change()),this.setChangeEvents(!0)},e.prototype.getItems=function(){return this._items},e.prototype.getSelection=function(){if(!this._selectedItems){this._selectedItems=[];var e=this._items;if(e)for(var t=0;t<e.length;t++)this.isIndexSelected(t)&&this._selectedItems.push(e[t])}return this._selectedItems},e.prototype.getSelectedCount=function(){return this._isAllSelected?this._items.length-this._exemptedCount-this._unselectableCount:this._exemptedCount},e.prototype.getSelectedIndices=function(){if(!this._selectedIndices){this._selectedIndices=[];var e=this._items;if(e)for(var t=0;t<e.length;t++)this.isIndexSelected(t)&&this._selectedIndices.push(t)}return this._selectedIndices},e.prototype.isRangeSelected=function(e,t){if(0===t)return!1;for(var r=e+t,n=e;n<r;n++)if(!this.isIndexSelected(n))return!1;return!0},e.prototype.isAllSelected=function(){var e=this._items.length-this._unselectableCount;return this.mode===ie.single&&(e=Math.min(e,1)),this.count>0&&this._isAllSelected&&0===this._exemptedCount||!this._isAllSelected&&this._exemptedCount===e&&e>0},e.prototype.isKeySelected=function(e){var t=this._keyToIndexMap[e];return this.isIndexSelected(t)},e.prototype.isIndexSelected=function(e){return!!(this.count>0&&this._isAllSelected&&!this._exemptedIndices[e]&&!this._unselectableIndices[e]||!this._isAllSelected&&this._exemptedIndices[e])},e.prototype.setAllSelected=function(e){if(!e||this.mode===ie.multiple){var t=this._items?this._items.length-this._unselectableCount:0;this.setChangeEvents(!1),t>0&&(this._exemptedCount>0||e!==this._isAllSelected)&&(this._exemptedIndices={},(e!==this._isAllSelected||this._exemptedCount>0)&&(this._exemptedCount=0,this._isAllSelected=e,this._change()),this._updateCount()),this.setChangeEvents(!0)}},e.prototype.setKeySelected=function(e,t,r){var n=this._keyToIndexMap[e];n>=0&&this.setIndexSelected(n,t,r)},e.prototype.setIndexSelected=function(e,t,r){if(this.mode!==ie.none&&!((e=Math.min(Math.max(0,e),this._items.length-1))<0||e>=this._items.length)){this.setChangeEvents(!1);var n=this._exemptedIndices[e];!this._unselectableIndices[e]&&(t&&this.mode===ie.single&&this._setAllSelected(!1,!0),n&&(t&&this._isAllSelected||!t&&!this._isAllSelected)&&(delete this._exemptedIndices[e],this._exemptedCount--),!n&&(t&&!this._isAllSelected||!t&&this._isAllSelected)&&(this._exemptedIndices[e]=!0,this._exemptedCount++),r&&(this._anchoredIndex=e)),this._updateCount(),this.setChangeEvents(!0)}},e.prototype.selectToKey=function(e,t){this.selectToIndex(this._keyToIndexMap[e],t)},e.prototype.selectToIndex=function(e,t){if(this.mode!==ie.none)if(this.mode!==ie.single){var r=this._anchoredIndex||0,n=Math.min(e,r),a=Math.max(e,r);for(this.setChangeEvents(!1),t&&this._setAllSelected(!1,!0);n<=a;n++)this.setIndexSelected(n,!0,!1);this.setChangeEvents(!0)}else this.setIndexSelected(e,!0,!0)},e.prototype.toggleAllSelected=function(){this.setAllSelected(!this.isAllSelected())},e.prototype.toggleKeySelected=function(e){this.setKeySelected(e,!this.isKeySelected(e),!0)},e.prototype.toggleIndexSelected=function(e){this.setIndexSelected(e,!this.isIndexSelected(e),!0)},e.prototype.toggleRangeSelected=function(e,t){if(this.mode!==ie.none){var r=this.isRangeSelected(e,t),n=e+t;if(!(this.mode===ie.single&&t>1)){this.setChangeEvents(!1);for(var a=e;a<n;a++)this.setIndexSelected(a,!r,!1);this.setChangeEvents(!0)}}},e.prototype._updateCount=function(e){void 0===e&&(e=!1);var t=this.getSelectedCount();t!==this.count&&(this.count=t,this._change()),this.count||e||this.setModal(!1)},e.prototype._setAllSelected=function(e,t){if(void 0===t&&(t=!1),!e||this.mode===ie.multiple){var r=this._items?this._items.length-this._unselectableCount:0;this.setChangeEvents(!1),r>0&&(this._exemptedCount>0||e!==this._isAllSelected)&&(this._exemptedIndices={},(e!==this._isAllSelected||this._exemptedCount>0)&&(this._exemptedCount=0,this._isAllSelected=e,this._change()),this._updateCount(t)),this.setChangeEvents(!0)}},e.prototype._change=function(){0===this._changeEventSuppressionCount?(this._selectedItems=null,this._selectedIndices=void 0,J.a.raise(this,"change"),this._onSelectionChanged&&this._onSelectionChanged()):this._hasChanged=!0},e}();function be(e,t){return e&&e.key?e.key:""+t}var _e,xe,we,ke,Me,Te=r(46),Ce=r(271),Se=r(269);!function(e){e[e.disabled=0]="disabled",e[e.clickable=1]="clickable",e[e.hasDropdown=2]="hasDropdown"}(_e||(_e={})),function(e){e[e.unconstrained=0]="unconstrained",e[e.horizontalConstrained=1]="horizontalConstrained"}(xe||(xe={})),function(e){e[e.outside=0]="outside",e[e.surface=1]="surface",e[e.header=2]="header"}(we||(we={})),function(e){e[e.fixedColumns=0]="fixedColumns",e[e.justified=1]="justified"}(ke||(ke={})),function(e){e[e.onHover=0]="onHover",e[e.always=1]="always",e[e.hidden=2]="hidden"}(Me||(Me={}));var Le,Ae=r(33),Ee=r(338),De=r(388),Ie=r(35),Pe=r(268),Oe=r(370),Re=function(e){var t=e.count,r=e.indentWidth,a=t*(void 0===r?36:r);return t>0?n.createElement("span",{className:"ms-GroupSpacer",style:{display:"inline-block",width:a}}):null};!function(e){e[e.hidden=0]="hidden",e[e.visible=1]="visible"}(Le||(Le={}));var Fe=Object(A.a)(),ze={root:"ms-Check",circle:"ms-Check-circle",check:"ms-Check-check",checkHost:"ms-Check-checkHost"},Ne=Object(S.a)((function(e){var t=e.checked,r=void 0!==t&&t,a=e.className,i=e.theme,o=e.styles,s=e.useFastIcons,l=void 0===s||s,c=Fe(o,{theme:i,className:a,checked:r}),u=l?Pe.a:_.a;return n.createElement("div",{className:c.root},n.createElement(u,{iconName:"CircleRing",className:c.circle}),n.createElement(u,{iconName:"StatusCircleCheckmark",className:c.check}))}),(function(e){var t,r,n,a,i,o=e.height,s=void 0===o?e.checkBoxHeight||"18px":o,l=e.checked,c=e.className,u=e.theme,d=u.palette,p=u.semanticColors,h=u.fonts,f=Object(re.a)(u),m=Object(v.v)(ze,u),g={fontSize:s,position:"absolute",left:0,top:0,width:s,height:s,textAlign:"center",verticalAlign:"middle"};return{root:[m.root,h.medium,{lineHeight:"1",width:s,height:s,verticalAlign:"top",position:"relative",userSelect:"none",selectors:(t={":before":{content:'""',position:"absolute",top:"1px",right:"1px",bottom:"1px",left:"1px",borderRadius:"50%",opacity:1,background:p.bodyBackground}},t["."+m.checkHost+":hover &, ."+m.checkHost+":focus &, &:hover, &:focus"]={opacity:1},t)},l&&["is-checked",{selectors:{":before":{background:d.themePrimary,opacity:1,selectors:(r={},r[v.f]={background:"Window"},r)}}}],c],circle:[m.circle,g,{color:d.neutralSecondary,selectors:(n={},n[v.f]={color:"WindowText"},n)},l&&{color:d.white}],check:[m.check,g,{opacity:0,color:d.neutralSecondary,fontSize:v.i.medium,left:f?"-0.5px":".5px",selectors:(a={":hover":{opacity:1}},a[v.f]={MsHighContrastAdjust:"none"},a)},l&&{opacity:1,color:d.white,fontWeight:900,selectors:(i={},i[v.f]={border:"none",color:"WindowText"},i)}],checkHost:m.checkHost}}),void 0,{scope:"Check"},!0),je=Object(Te.b)((function(e,t,r){return n.createElement(Ne,{theme:e,checked:t,className:r,useFastIcons:!0})})),Be=r(64),Ye={root:"ms-DetailsRow",compact:"ms-DetailsList--Compact",cell:"ms-DetailsRow-cell",cellAnimation:"ms-DetailsRow-cellAnimation",cellCheck:"ms-DetailsRow-cellCheck",check:"ms-DetailsRow-check",cellMeasurer:"ms-DetailsRow-cellMeasurer",listCellFirstChild:"ms-List-cell:first-child",isContentUnselectable:"is-contentUnselectable",isSelected:"is-selected",isCheckVisible:"is-check-visible",isRowHeader:"is-row-header",fields:"ms-DetailsRow-fields"},He={cellLeftPadding:12,cellRightPadding:8,cellExtraRightPadding:24},Ve={rowHeight:42,compactRowHeight:32},Ue=Object(L.a)(Object(L.a)({},Ve),{rowVerticalPadding:11,compactRowVerticalPadding:6}),We={tooltipHost:"ms-TooltipHost",root:"ms-DetailsHeader",cell:"ms-DetailsHeader-cell",cellIsCheck:"ms-DetailsHeader-cellIsCheck",collapseButton:"ms-DetailsHeader-collapseButton",isCollapsed:"is-collapsed",isAllSelected:"is-allSelected",isSelectAllHidden:"is-selectAllHidden",isResizingColumn:"is-resizingColumn",cellSizer:"ms-DetailsHeader-cellSizer",isResizing:"is-resizing",dropHintCircleStyle:"ms-DetailsHeader-dropHintCircleStyle",dropHintCaretStyle:"ms-DetailsHeader-dropHintCaretStyle",dropHintLineStyle:"ms-DetailsHeader-dropHintLineStyle",cellTitle:"ms-DetailsHeader-cellTitle",cellName:"ms-DetailsHeader-cellName",filterChevron:"ms-DetailsHeader-filterChevron",gripperBarVertical:"ms-DetailsColumn-gripperBarVertical",checkTooltip:"ms-DetailsHeader-checkTooltip",check:"ms-DetailsHeader-check"},Ge=function(e){var t=e.theme,r=e.cellStyleProps,n=void 0===r?He:r,a=t.semanticColors;return[Object(v.v)(We,t).cell,Object(v.u)(t),{color:a.bodyText,position:"relative",display:"inline-block",boxSizing:"border-box",padding:"0 "+n.cellRightPadding+"px 0 "+n.cellLeftPadding+"px",lineHeight:"inherit",margin:"0",height:42,verticalAlign:"top",whiteSpace:"nowrap",textOverflow:"ellipsis",textAlign:"left"}]},qe={root:"ms-DetailsRow-check",isDisabled:"ms-DetailsRow-check--isDisabled",isHeader:"ms-DetailsRow-check--isHeader"},Ke=r(367),Xe=Object(A.a)();function Ze(e){return n.createElement(Ne,{checked:e.checked})}function Je(e){return je(e.theme,e.checked)}var $e,Qe=Object(S.a)((function(e){var t=e.isVisible,r=void 0!==t&&t,a=e.canSelect,i=void 0!==a&&a,o=e.anySelected,s=void 0!==o&&o,l=e.selected,c=void 0!==l&&l,u=e.isHeader,d=void 0!==u&&u,p=e.className,h=(e.checkClassName,e.styles),f=e.theme,m=e.compact,g=e.onRenderDetailsCheckbox,v=e.useFastIcons,y=void 0===v||v,b=Object(L.d)(e,["isVisible","canSelect","anySelected","selected","isHeader","className","checkClassName","styles","theme","compact","onRenderDetailsCheckbox","useFastIcons"]),_=y?Je:Ze,x=g?Object(Ke.a)(g,_):_,w=Xe(h,{theme:f,canSelect:i,selected:c,anySelected:s,className:p,isHeader:d,isVisible:r,compact:m}),k={checked:c,theme:f};return i?n.createElement("div",Object(L.a)({},b,{role:"checkbox",className:Object(Ee.a)(w.root,w.check),"aria-checked":c,"data-selection-toggle":!0,"data-automationid":"DetailsRowCheck"}),x(k)):n.createElement("div",Object(L.a)({},b,{className:Object(Ee.a)(w.root,w.check)}))}),(function(e){var t=e.theme,r=e.className,n=e.isHeader,a=e.selected,i=e.anySelected,o=e.canSelect,s=e.compact,l=e.isVisible,c=Object(v.v)(qe,t),u=n?42:s?Ve.compactRowHeight:Ve.rowHeight,d=l||a||i;return{root:[c.root,r],check:[!o&&c.isDisabled,n&&c.isHeader,Object(v.u)(t),t.fonts.small,ze.checkHost,{display:"flex",alignItems:"center",justifyContent:"center",cursor:"default",boxSizing:"border-box",verticalAlign:"top",background:"none",backgroundColor:"transparent",border:"none",opacity:d?1:0,height:u,width:48,padding:0,margin:0}],isDisabled:[]}}),void 0,{scope:"DetailsRowCheck"},!0),et=r(34),tt=function(){function e(e){this._selection=e.selection,this._dragEnterCounts={},this._activeTargets={},this._lastId=0,this._initialized=!1}return e.prototype.dispose=function(){this._events&&this._events.dispose()},e.prototype.subscribe=function(e,t,r){var n=this;if(!this._initialized){this._events=new J.a(this);var a=Object(et.a)();a&&(this._events.on(a.body,"mouseup",this._onMouseUp.bind(this),!0),this._events.on(a,"mouseup",this._onDocumentMouseUp.bind(this),!0)),this._initialized=!0}var i,o,s,l,c,u,d,p,h,f,m=r.key,g=void 0===m?""+ ++this._lastId:m,v=[];if(r&&e){var y=r.eventMap,b=r.context,_=r.updateDropState,x={root:e,options:r,key:g};if(p=this._isDraggable(x),h=this._isDroppable(x),(p||h)&&y)for(var w=0,k=y;w<k.length;w++){var M=k[w],T={callback:M.callback.bind(null,b),eventName:M.eventName};v.push(T),this._events.on(e,T.eventName,T.callback)}h&&(o=function(e){e.isHandled||(e.isHandled=!0,n._dragEnterCounts[g]--,0===n._dragEnterCounts[g]&&_(!1,e))},s=function(e){e.preventDefault(),e.isHandled||(e.isHandled=!0,n._dragEnterCounts[g]++,1===n._dragEnterCounts[g]&&_(!0,e))},l=function(e){n._dragEnterCounts[g]=0,_(!1,e)},c=function(e){n._dragEnterCounts[g]=0,_(!1,e),r.onDrop&&r.onDrop(r.context.data,e)},u=function(e){e.preventDefault(),r.onDragOver&&r.onDragOver(r.context.data,e)},this._dragEnterCounts[g]=0,t.on(e,"dragenter",s),t.on(e,"dragleave",o),t.on(e,"dragend",l),t.on(e,"drop",c),t.on(e,"dragover",u)),p&&(d=this._onMouseDown.bind(this,x),l=this._onDragEnd.bind(this,x),i=function(t){var a=r;a&&a.onDragStart&&a.onDragStart(a.context.data,a.context.index,n._selection.getSelection(),t),n._isDragging=!0,t.dataTransfer&&t.dataTransfer.setData("id",e.id)},t.on(e,"dragstart",i),t.on(e,"mousedown",d),t.on(e,"dragend",l)),f={target:x,dispose:function(){if(n._activeTargets[g]===f&&delete n._activeTargets[g],e){for(var r=0,a=v;r<a.length;r++){var m=a[r];n._events.off(e,m.eventName,m.callback)}h&&(t.off(e,"dragenter",s),t.off(e,"dragleave",o),t.off(e,"dragend",l),t.off(e,"dragover",u),t.off(e,"drop",c)),p&&(t.off(e,"dragstart",i),t.off(e,"mousedown",d),t.off(e,"dragend",l))}}},this._activeTargets[g]=f}return{key:g,dispose:function(){f&&f.dispose()}}},e.prototype.unsubscribe=function(e,t){var r=this._activeTargets[t];r&&r.dispose()},e.prototype._onDragEnd=function(e,t){var r=e.options;r.onDragEnd&&r.onDragEnd(r.context.data,t)},e.prototype._onMouseUp=function(e){if(this._isDragging=!1,this._dragData){for(var t=0,r=Object.keys(this._activeTargets);t<r.length;t++){var n=r[t],a=this._activeTargets[n];a.target.root&&(this._events.off(a.target.root,"mousemove"),this._events.off(a.target.root,"mouseleave"))}this._dragData.dropTarget&&(J.a.raise(this._dragData.dropTarget.root,"dragleave"),J.a.raise(this._dragData.dropTarget.root,"drop"))}this._dragData=null},e.prototype._onDocumentMouseUp=function(e){var t=Object(et.a)();t&&e.target===t.documentElement&&this._onMouseUp(e)},e.prototype._onMouseMove=function(e,t){var r=t.buttons,n=void 0===r?1:r;if(this._dragData&&1!==n)this._onMouseUp(t);else{var a=e.root,i=e.key;this._isDragging&&this._isDroppable(e)&&this._dragData&&this._dragData.dropTarget&&this._dragData.dropTarget.key!==i&&!this._isChild(a,this._dragData.dropTarget.root)&&this._dragEnterCounts[this._dragData.dropTarget.key]>0&&(J.a.raise(this._dragData.dropTarget.root,"dragleave"),J.a.raise(a,"dragenter"),this._dragData.dropTarget=e)}},e.prototype._onMouseLeave=function(e,t){this._isDragging&&this._dragData&&this._dragData.dropTarget&&this._dragData.dropTarget.key===e.key&&(J.a.raise(e.root,"dragleave"),this._dragData.dropTarget=void 0)},e.prototype._onMouseDown=function(e,t){if(0===t.button)if(this._isDraggable(e)){this._dragData={clientX:t.clientX,clientY:t.clientY,eventTarget:t.target,dragTarget:e};for(var r=0,n=Object.keys(this._activeTargets);r<n.length;r++){var a=n[r],i=this._activeTargets[a];i.target.root&&(this._events.on(i.target.root,"mousemove",this._onMouseMove.bind(this,i.target)),this._events.on(i.target.root,"mouseleave",this._onMouseLeave.bind(this,i.target)))}}else this._dragData=null},e.prototype._isChild=function(e,t){for(var r=Ae.findDOMNode(e),n=Ae.findDOMNode(t);n&&n.parentElement;){if(n.parentElement===r)return!0;n=n.parentElement}return!1},e.prototype._isDraggable=function(e){var t=e.options;return!(!t.canDrag||!t.canDrag(t.context.data))},e.prototype._isDroppable=function(e){var t=e.options,r=this._dragData&&this._dragData.dragTarget?this._dragData.dragTarget.options.context:void 0;return!(!t.canDrop||!t.canDrop(t.context,r))},e}(),rt=0,nt=Object(A.a)(),at=20,it=function(e){function t(t){var r=e.call(this,t)||this;return r._root=n.createRef(),r._onRenderColumnHeaderTooltip=function(e){return n.createElement("span",{className:e.hostClassName},e.children)},r._onColumnClick=function(e){var t=r.props,n=t.onColumnClick,a=t.column;a.columnActionsMode!==_e.disabled&&(a.onColumnClick&&a.onColumnClick(e,a),n&&n(e,a))},r._onDragStart=function(e,t,n,a){var i=r._classNames;t&&(r._updateHeaderDragInfo(t),r._root.current.classList.add(i.borderWhileDragging),r._async.setTimeout((function(){r._root.current&&r._root.current.classList.add(i.noBorderWhileDragging)}),at))},r._onDragEnd=function(e,t){var n=r._classNames;t&&r._updateHeaderDragInfo(-1,t),r._root.current.classList.remove(n.borderWhileDragging),r._root.current.classList.remove(n.noBorderWhileDragging)},r._updateHeaderDragInfo=function(e,t){r.props.setDraggedItemIndex&&r.props.setDraggedItemIndex(e),r.props.updateDragInfo&&r.props.updateDragInfo({itemIndex:e},t)},r._onColumnContextMenu=function(e){var t=r.props,n=t.onColumnContextMenu,a=t.column;a.onColumnContextMenu&&(a.onColumnContextMenu(a,e),e.preventDefault()),n&&(n(a,e),e.preventDefault())},r._onRootMouseDown=function(e){r.props.isDraggable&&e.button===rt&&e.stopPropagation()},Object(O.a)(r),r._async=new R.a(r),r._events=new J.a(r),r}return Object(L.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.column,r=e.columnIndex,a=e.parentId,i=e.isDraggable,o=e.styles,s=e.theme,l=e.cellStyleProps,c=void 0===l?He:l,u=e.useFastIcons,d=void 0===u||u,p=this.props.onRenderColumnHeaderTooltip,h=void 0===p?this._onRenderColumnHeaderTooltip:p;this._classNames=nt(o,{theme:s,headerClassName:t.headerClassName,iconClassName:t.iconClassName,isActionable:t.columnActionsMode!==_e.disabled,isEmpty:!t.name,isIconVisible:t.isSorted||t.isGrouped||t.isFiltered,isPadded:t.isPadded,isIconOnly:t.isIconOnly,cellStyleProps:c,transitionDurationDrag:200,transitionDurationDrop:1500});var f=this._classNames,m=d?Pe.a:_.a;return n.createElement(n.Fragment,null,n.createElement("div",{key:t.key,ref:this._root,role:"columnheader","aria-sort":t.isSorted?t.isSortedDescending?"descending":"ascending":"none","aria-colindex":r,className:f.root,"data-is-draggable":i,draggable:i,style:{width:t.calculatedWidth+c.cellLeftPadding+c.cellRightPadding+(t.isPadded?c.cellExtraRightPadding:0)},"data-automationid":"ColumnsHeaderColumn","data-item-key":t.key},i&&n.createElement(m,{iconName:"GripperBarVertical",className:f.gripperBarVerticalStyle}),h({hostClassName:f.cellTooltip,id:a+"-"+t.key+"-tooltip",setAriaDescribedBy:!1,column:t,content:t.columnActionsMode!==_e.disabled?t.ariaLabel:"",children:n.createElement("span",{id:a+"-"+t.key,"aria-label":t.isIconOnly?t.name:void 0,"aria-labelledby":t.isIconOnly?void 0:a+"-"+t.key+"-name",className:f.cellTitle,"data-is-focusable":t.columnActionsMode!==_e.disabled,role:t.columnActionsMode===_e.disabled||void 0===t.onColumnClick&&void 0===this.props.onColumnClick?void 0:"button","aria-describedby":!this.props.onRenderColumnHeaderTooltip&&this._hasAccessibleLabel()?a+"-"+t.key+"-tooltip":void 0,onContextMenu:this._onColumnContextMenu,onClick:this._onColumnClick,"aria-haspopup":t.columnActionsMode===_e.hasDropdown,"aria-expanded":t.columnActionsMode===_e.hasDropdown?!!t.isMenuOpen:void 0},n.createElement("span",{id:a+"-"+t.key+"-name",className:f.cellName},(t.iconName||t.iconClassName)&&n.createElement(m,{className:f.iconClassName,iconName:t.iconName}),t.isIconOnly?n.createElement("span",{className:f.accessibleLabel},t.name):t.name),t.isFiltered&&n.createElement(m,{className:f.nearIcon,iconName:"Filter"}),t.isSorted&&n.createElement(m,{className:f.sortIcon,iconName:t.isSortedDescending?"SortDown":"SortUp"}),t.isGrouped&&n.createElement(m,{className:f.nearIcon,iconName:"GroupedDescending"}),t.columnActionsMode===_e.hasDropdown&&!t.isIconOnly&&n.createElement(m,{"aria-hidden":!0,className:f.filterChevron,iconName:"ChevronDown"}))},this._onRenderColumnHeaderTooltip)),this.props.onRenderColumnHeaderTooltip?null:this._renderAccessibleLabel())},t.prototype.componentDidMount=function(){var e=this;this.props.dragDropHelper&&this.props.isDraggable&&this._addDragDropHandling();var t=this._classNames;this.props.isDropped&&(this._root.current&&(this._root.current.classList.add(t.borderAfterDropping),this._async.setTimeout((function(){e._root.current&&e._root.current.classList.add(t.noBorderAfterDropping)}),at)),this._async.setTimeout((function(){e._root.current&&(e._root.current.classList.remove(t.borderAfterDropping),e._root.current.classList.remove(t.noBorderAfterDropping))}),1500+at))},t.prototype.componentWillUnmount=function(){this._dragDropSubscription&&(this._dragDropSubscription.dispose(),delete this._dragDropSubscription),this._async.dispose(),this._events.dispose()},t.prototype.componentDidUpdate=function(){!this._dragDropSubscription&&this.props.dragDropHelper&&this.props.isDraggable&&this._addDragDropHandling(),this._dragDropSubscription&&!this.props.isDraggable&&(this._dragDropSubscription.dispose(),this._events.off(this._root.current,"mousedown"),delete this._dragDropSubscription)},t.prototype._getColumnDragDropOptions=function(){var e=this,t=this.props.columnIndex;return{selectionIndex:t,context:{data:t,index:t},canDrag:function(){return e.props.isDraggable},canDrop:function(){return!1},onDragStart:this._onDragStart,updateDropState:function(){},onDrop:function(){},onDragEnd:this._onDragEnd}},t.prototype._hasAccessibleLabel=function(){var e=this.props.column;return!!(e.ariaLabel||e.filterAriaLabel||e.sortAscendingAriaLabel||e.sortDescendingAriaLabel||e.groupAriaLabel)},t.prototype._renderAccessibleLabel=function(){var e=this.props,t=e.column,r=e.parentId,a=this._classNames;return this._hasAccessibleLabel()&&!this.props.onRenderColumnHeaderTooltip?n.createElement("label",{key:t.key+"_label",id:r+"-"+t.key+"-tooltip",className:a.accessibleLabel},t.ariaLabel,t.isFiltered&&t.filterAriaLabel||null,t.isSorted&&(t.isSortedDescending?t.sortDescendingAriaLabel:t.sortAscendingAriaLabel)||null,t.isGrouped&&t.groupAriaLabel||null):null},t.prototype._addDragDropHandling=function(){this._dragDropSubscription=this.props.dragDropHelper.subscribe(this._root.current,this._events,this._getColumnDragDropOptions()),this._events.on(this._root.current,"mousedown",this._onRootMouseDown)},t}(n.Component),ot={isActionable:"is-actionable",cellIsCheck:"ms-DetailsHeader-cellIsCheck",collapseButton:"ms-DetailsHeader-collapseButton",isCollapsed:"is-collapsed",isAllSelected:"is-allSelected",isSelectAllHidden:"is-selectAllHidden",isResizingColumn:"is-resizingColumn",isEmpty:"is-empty",isIconVisible:"is-icon-visible",cellSizer:"ms-DetailsHeader-cellSizer",isResizing:"is-resizing",dropHintCircleStyle:"ms-DetailsHeader-dropHintCircleStyle",dropHintLineStyle:"ms-DetailsHeader-dropHintLineStyle",cellTitle:"ms-DetailsHeader-cellTitle",cellName:"ms-DetailsHeader-cellName",filterChevron:"ms-DetailsHeader-filterChevron",gripperBarVerticalStyle:"ms-DetailsColumn-gripperBar",nearIcon:"ms-DetailsColumn-nearIcon"},st=Object(S.a)(it,(function(e){var t,r=e.theme,n=e.headerClassName,a=e.iconClassName,i=e.isActionable,o=e.isEmpty,s=e.isIconVisible,l=e.isPadded,c=e.isIconOnly,u=e.cellStyleProps,d=void 0===u?He:u,p=e.transitionDurationDrag,h=e.transitionDurationDrop,f=r.semanticColors,m=r.palette,g=r.fonts,y=Object(v.v)(ot,r),b={iconForegroundColor:f.bodySubtext,headerForegroundColor:f.bodyText,headerBackgroundColor:f.bodyBackground,dropdownChevronForegroundColor:m.neutralTertiary,resizerColor:m.neutralTertiaryAlt},_={color:b.iconForegroundColor,opacity:1,paddingLeft:8},x={outline:"1px solid "+m.themePrimary},w={outlineColor:"transparent"};return{root:[Ge(e),g.small,i&&[y.isActionable,{selectors:{":hover":{color:f.bodyText,background:f.listHeaderBackgroundHovered},":active":{background:f.listHeaderBackgroundPressed}}}],o&&[y.isEmpty,{textOverflow:"clip"}],s&&y.isIconVisible,l&&{paddingRight:d.cellExtraRightPadding+d.cellRightPadding},{selectors:{':hover i[data-icon-name="GripperBarVertical"]':{display:"block"}}},n],gripperBarVerticalStyle:{display:"none",position:"absolute",textAlign:"left",color:m.neutralTertiary,left:1},nearIcon:[y.nearIcon,_],sortIcon:[_,{paddingLeft:4,position:"relative",top:1}],iconClassName:[{color:b.iconForegroundColor,opacity:1},a],filterChevron:[y.filterChevron,{color:b.dropdownChevronForegroundColor,paddingLeft:6,verticalAlign:"middle",fontSize:g.small.fontSize}],cellTitle:[y.cellTitle,Object(v.u)(r),Object(L.a)({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"stretch",boxSizing:"border-box",overflow:"hidden",padding:"0 "+d.cellRightPadding+"px 0 "+d.cellLeftPadding+"px"},c?{alignContent:"flex-end",maxHeight:"100%",flexWrap:"wrap-reverse"}:{})],cellName:[y.cellName,{flex:"0 1 auto",overflow:"hidden",textOverflow:"ellipsis",fontWeight:v.e.semibold,fontSize:g.medium.fontSize},c&&{selectors:(t={},t["."+y.nearIcon]={paddingLeft:0},t)}],cellTooltip:{display:"block",position:"absolute",top:0,left:0,bottom:0,right:0},accessibleLabel:v.B,borderWhileDragging:x,noBorderWhileDragging:[w,{transition:"outline "+p+"ms ease"}],borderAfterDropping:x,noBorderAfterDropping:[w,{transition:"outline  "+h+"ms ease"}]}}),void 0,{scope:"DetailsColumn"});!function(e){e[e.none=0]="none",e[e.hidden=1]="hidden",e[e.visible=2]="visible"}($e||($e={}));var lt=Object(A.a)(),ct=0,ut=1,dt=[],pt=function(e){function t(t){var r=e.call(this,t)||this;return r._rootComponent=n.createRef(),r._draggedColumnIndex=-1,r._dropHintDetails={},r._updateDroppingState=function(e,t){r._draggedColumnIndex>=0&&"drop"!==t.type&&!e&&r._resetDropHints()},r._onDragOver=function(e,t){r._draggedColumnIndex>=0&&(t.stopPropagation(),r._computeDropHintToBeShown(t.clientX))},r._onDrop=function(e,t){var n=r._getColumnReorderProps();if(r._draggedColumnIndex>=0&&t){var a=r._draggedColumnIndex>r._currentDropHintIndex?r._currentDropHintIndex:r._currentDropHintIndex-1,i=r._isValidCurrentDropHintIndex();if(t.stopPropagation(),i)if(r._onDropIndexInfo.sourceIndex=r._draggedColumnIndex,r._onDropIndexInfo.targetIndex=a,n.onColumnDrop){var o={draggedIndex:r._draggedColumnIndex,targetIndex:a};n.onColumnDrop(o)}else n.handleColumnReorder&&n.handleColumnReorder(r._draggedColumnIndex,a)}r._resetDropHints(),r._dropHintDetails={},r._draggedColumnIndex=-1},r._updateDragInfo=function(e,t){var n=r._getColumnReorderProps(),a=e.itemIndex;if(a>=0)r._draggedColumnIndex=r._isCheckboxColumnHidden()?a-1:a-2,r._getDropHintPositions(),n.onColumnDragStart&&n.onColumnDragStart(!0);else if(t&&r._draggedColumnIndex>=0&&(r._resetDropHints(),r._draggedColumnIndex=-1,r._dropHintDetails={},n.onColumnDragEnd)){var i=r._isEventOnHeader(t);n.onColumnDragEnd({dropLocation:i},t)}},r._getDropHintPositions=function(){for(var e,t=r.props.columns,n=void 0===t?dt:t,a=r._getColumnReorderProps(),i=0,o=0,s=a.frozenColumnCountFromStart||0,l=a.frozenColumnCountFromEnd||0,c=s;c<n.length-l+1;c++)if(r._rootElement){var u=r._rootElement.querySelectorAll("#columnDropHint_"+c)[0];if(u)if(c===s)i=u.offsetLeft,o=u.offsetLeft,e=u;else{var d=(u.offsetLeft+i)/2;r._dropHintDetails[c-1]={originX:i,startX:o,endX:d,dropHintElementRef:e},o=d,e=u,i=u.offsetLeft,c===n.length-l&&(r._dropHintDetails[c]={originX:i,startX:o,endX:u.offsetLeft,dropHintElementRef:e})}}},r._computeDropHintToBeShown=function(e){var t=Object(re.a)(r.props.theme);if(r._rootElement){var n=e-r._rootElement.getBoundingClientRect().left,a=r._currentDropHintIndex;if(r._isValidCurrentDropHintIndex()&&ht(t,n,r._dropHintDetails[a].startX,r._dropHintDetails[a].endX))return;var i=r.props.columns,o=void 0===i?dt:i,s=r._getColumnReorderProps(),l=s.frozenColumnCountFromStart||0,c=s.frozenColumnCountFromEnd||0,u=l,d=o.length-c,p=-1;if(ft(t,n,r._dropHintDetails[u].endX)?p=u:mt(t,n,r._dropHintDetails[d].startX)?p=d:r._isValidCurrentDropHintIndex()&&(r._dropHintDetails[a+1]&&ht(t,n,r._dropHintDetails[a+1].startX,r._dropHintDetails[a+1].endX)?p=a+1:r._dropHintDetails[a-1]&&ht(t,n,r._dropHintDetails[a-1].startX,r._dropHintDetails[a-1].endX)&&(p=a-1)),-1===p)for(var h=l,f=d;h<f;){var m=Math.ceil((f+h)/2);if(ht(t,n,r._dropHintDetails[m].startX,r._dropHintDetails[m].endX)){p=m;break}ft(t,n,r._dropHintDetails[m].originX)?f=m:mt(t,n,r._dropHintDetails[m].originX)&&(h=m)}p===r._draggedColumnIndex||p===r._draggedColumnIndex+1?r._isValidCurrentDropHintIndex()&&r._resetDropHints():a!==p&&p>=0&&(r._resetDropHints(),r._updateDropHintElement(r._dropHintDetails[p].dropHintElementRef,"inline-block"),r._currentDropHintIndex=p)}},r._renderColumnSizer=function(e){var t,a=e.columnIndex,i=r.props.columns,o=void 0===i?dt:i,s=o[a],l=r.state.columnResizeDetails,c=r._classNames;return s.isResizable?n.createElement("div",{key:s.key+"_sizer","aria-hidden":!0,role:"button","data-is-focusable":!1,onClick:gt,"data-sizer-index":a,onBlur:r._onSizerBlur,className:Object(Ee.a)(c.cellSizer,a<o.length-1?c.cellSizerStart:c.cellSizerEnd,(t={},t[c.cellIsResizing]=l&&l.columnIndex===a,t)),onDoubleClick:r._onSizerDoubleClick.bind(r,a)}):null},r._onRenderColumnHeaderTooltip=function(e){return n.createElement("span",{className:e.hostClassName},e.children)},r._onSelectAllClicked=function(){var e=r.props.selection;e&&e.toggleAllSelected()},r._onRootMouseDown=function(e){var t=e.target.getAttribute("data-sizer-index"),n=Number(t),a=r.props.columns,i=void 0===a?dt:a;null!==t&&e.button===ct&&(r.setState({columnResizeDetails:{columnIndex:n,columnMinWidth:i[n].calculatedWidth,originX:e.clientX}}),e.preventDefault(),e.stopPropagation())},r._onRootMouseMove=function(e){var t=r.state,n=t.columnResizeDetails,a=t.isSizing;n&&!a&&e.clientX!==n.originX&&r.setState({isSizing:!0})},r._onRootRef=function(e){r._rootElement=e?Object(Ae.findDOMNode)(e):void 0},r._onRootKeyDown=function(e){var t=r.state,n=t.columnResizeDetails,a=t.isSizing,i=r.props,o=i.columns,s=void 0===o?dt:o,l=i.onColumnResized,c=e.target.getAttribute("data-sizer-index");if(c&&!a){var u=Number(c);if(n){var d=void 0;e.which===P.a.enter?(r.setState({columnResizeDetails:void 0}),e.preventDefault(),e.stopPropagation()):e.which===P.a.left?d=Object(re.a)(r.props.theme)?1:-1:e.which===P.a.right&&(d=Object(re.a)(r.props.theme)?-1:1),d&&(e.shiftKey||(d*=10),r.setState({columnResizeDetails:Object(L.a)(Object(L.a)({},n),{columnMinWidth:n.columnMinWidth+d})}),l&&l(s[u],n.columnMinWidth+d,u),e.preventDefault(),e.stopPropagation())}else e.which===P.a.enter&&(r.setState({columnResizeDetails:{columnIndex:u,columnMinWidth:s[u].calculatedWidth}}),e.preventDefault(),e.stopPropagation())}},r._onSizerMouseMove=function(e){var t=e.buttons,n=r.props,a=n.onColumnIsSizingChanged,i=n.onColumnResized,o=n.columns,s=void 0===o?dt:o,l=r.state.columnResizeDetails;if(void 0===t||t===ut){if(e.clientX!==l.originX&&a&&a(s[l.columnIndex],!0),i){var c=e.clientX-l.originX;Object(re.a)(r.props.theme)&&(c=-c),i(s[l.columnIndex],l.columnMinWidth+c,l.columnIndex)}}else r._onSizerMouseUp(e)},r._onSizerBlur=function(e){r.state.columnResizeDetails&&r.setState({columnResizeDetails:void 0,isSizing:!1})},r._onSizerMouseUp=function(e){var t=r.props,n=t.columns,a=void 0===n?dt:n,i=t.onColumnIsSizingChanged,o=r.state.columnResizeDetails;r.setState({columnResizeDetails:void 0,isSizing:!1}),i&&i(a[o.columnIndex],!1)},r._onToggleCollapseAll=function(){var e=r.props.onToggleCollapseAll,t=!r.state.isAllCollapsed;r.setState({isAllCollapsed:t}),e&&e(t)},Object(O.a)(r),r._events=new J.a(r),r.state={columnResizeDetails:void 0,isAllCollapsed:r.props.isAllCollapsed,isAllSelected:!!r.props.selection&&r.props.selection.isAllSelected()},r._onDropIndexInfo={sourceIndex:-1,targetIndex:-1},r._id=Object(E.a)("header"),r._currentDropHintIndex=-1,r._dragDropHelper=new tt({selection:{getSelection:function(){}},minimumPixelsForDrag:r.props.minimumPixelsForDrag}),r}return Object(L.c)(t,e),t.prototype.componentDidMount=function(){var e=this.props.selection;this._events.on(e,"change",this._onSelectionChanged),this._events.on(this._rootElement,"mousedown",this._onRootMouseDown),this._events.on(this._rootElement,"keydown",this._onRootKeyDown),this._getColumnReorderProps()&&(this._subscriptionObject=this._dragDropHelper.subscribe(this._rootElement,this._events,this._getHeaderDragDropOptions()))},t.prototype.componentDidUpdate=function(e){if(this._getColumnReorderProps()?this._subscriptionObject||(this._subscriptionObject=this._dragDropHelper.subscribe(this._rootElement,this._events,this._getHeaderDragDropOptions())):this._subscriptionObject&&(this._subscriptionObject.dispose(),delete this._subscriptionObject),this.props!==e&&this._onDropIndexInfo.sourceIndex>=0&&this._onDropIndexInfo.targetIndex>=0){var t=e.columns,r=void 0===t?dt:t,n=this.props.columns,a=void 0===n?dt:n;r[this._onDropIndexInfo.sourceIndex].key===a[this._onDropIndexInfo.targetIndex].key&&(this._onDropIndexInfo={sourceIndex:-1,targetIndex:-1})}this.props.isAllCollapsed!==e.isAllCollapsed&&this.setState({isAllCollapsed:this.props.isAllCollapsed})},t.prototype.componentWillUnmount=function(){this._subscriptionObject&&(this._subscriptionObject.dispose(),delete this._subscriptionObject),this._dragDropHelper.dispose(),this._events.dispose()},t.prototype.render=function(){var e=this,t=this.props,r=t.columns,a=void 0===r?dt:r,i=t.ariaLabel,o=t.ariaLabelForToggleAllGroupsButton,s=t.ariaLabelForSelectAllCheckbox,l=t.selectAllVisibility,c=t.ariaLabelForSelectionColumn,u=t.indentWidth,d=t.rowWidth,p=void 0===d?0:d,h=t.onColumnClick,f=t.onColumnContextMenu,m=t.onRenderColumnHeaderTooltip,g=void 0===m?this._onRenderColumnHeaderTooltip:m,v=t.styles,y=t.selectionMode,b=t.theme,x=t.onRenderDetailsCheckbox,w=t.groupNestingDepth,k=t.useFastIcons,M=t.checkboxVisibility,T=t.className,C=this.state,S=C.isAllSelected,L=C.columnResizeDetails,A=C.isSizing,E=C.isAllCollapsed,D=l!==$e.none,I=l===$e.hidden,P=M===Me.always,O=this._getColumnReorderProps(),R=O&&O.frozenColumnCountFromStart?O.frozenColumnCountFromStart:0,F=O&&O.frozenColumnCountFromEnd?O.frozenColumnCountFromEnd:0;this._classNames=lt(v,{theme:b,isAllSelected:S,isSelectAllHidden:l===$e.hidden,isResizingColumn:!!L&&A,isSizing:A,isAllCollapsed:E,isCheckboxHidden:I,className:T});var z=this._classNames,N=k?Pe.a:_.a,j=Object(re.a)(b);return n.createElement(De.a,{role:"row","aria-label":i,className:z.root,componentRef:this._rootComponent,ref:this._onRootRef,onMouseMove:this._onRootMouseMove,"data-automationid":"DetailsHeader",style:{minWidth:p},direction:Ie.a.horizontal},D?[n.createElement("div",{key:"__checkbox",className:z.cellIsCheck,"aria-labelledby":this._id+"-check",onClick:I?void 0:this._onSelectAllClicked,"aria-colindex":1,role:"columnheader"},g({hostClassName:z.checkTooltip,id:this._id+"-checkTooltip",setAriaDescribedBy:!1,content:s,children:n.createElement(Qe,{id:this._id+"-check","aria-label":y===ie.multiple?s:c,"aria-describedby":I?c&&!this.props.onRenderColumnHeaderTooltip?this._id+"-checkTooltip":void 0:s&&!this.props.onRenderColumnHeaderTooltip?this._id+"-checkTooltip":void 0,"data-is-focusable":!I||void 0,isHeader:!0,selected:S,anySelected:!1,canSelect:!I,className:z.check,onRenderDetailsCheckbox:x,useFastIcons:k,isVisible:P})},this._onRenderColumnHeaderTooltip)),this.props.onRenderColumnHeaderTooltip?null:s&&!I?n.createElement("label",{key:"__checkboxLabel",id:this._id+"-checkTooltip",className:z.accessibleLabel,"aria-hidden":!0},s):c&&I?n.createElement("label",{key:"__checkboxLabel",id:this._id+"-checkTooltip",className:z.accessibleLabel,"aria-hidden":!0},c):null]:null,w>0&&this.props.collapseAllVisibility===Le.visible?n.createElement("div",{className:z.cellIsGroupExpander,onClick:this._onToggleCollapseAll,"data-is-focusable":!0,"aria-label":o,"aria-expanded":!E,role:o?"button":void 0},n.createElement(N,{className:z.collapseButton,iconName:j?"ChevronLeftMed":"ChevronRightMed"})):null,n.createElement(Re,{indentWidth:u,count:w-1}),a.map((function(t,r){var i=!!O&&(r>=R&&r<a.length-F);return[O&&(i||r===a.length-F)&&e._renderDropHint(r),n.createElement(st,{column:t,styles:t.styles,key:t.key,columnIndex:(D?2:1)+r,parentId:e._id,isDraggable:i,updateDragInfo:e._updateDragInfo,dragDropHelper:e._dragDropHelper,onColumnClick:h,onColumnContextMenu:f,onRenderColumnHeaderTooltip:e.props.onRenderColumnHeaderTooltip,isDropped:e._onDropIndexInfo.targetIndex===r,cellStyleProps:e.props.cellStyleProps,useFastIcons:k}),e._renderColumnDivider(r)]})),O&&0===F&&this._renderDropHint(a.length),A&&n.createElement(Oe.a,null,n.createElement("div",{className:z.sizingOverlay,onMouseMove:this._onSizerMouseMove,onMouseUp:this._onSizerMouseUp})))},t.prototype.focus=function(){return Boolean(this._rootComponent.current&&this._rootComponent.current.focus())},t.prototype._getColumnReorderProps=function(){var e=this.props,t=e.columnReorderOptions;return e.columnReorderProps||t&&Object(L.a)(Object(L.a)({},t),{onColumnDragEnd:void 0})},t.prototype._getHeaderDragDropOptions=function(){return{selectionIndex:1,context:{data:this,index:0},canDrag:function(){return!1},canDrop:function(){return!0},onDragStart:function(){},updateDropState:this._updateDroppingState,onDrop:this._onDrop,onDragEnd:function(){},onDragOver:this._onDragOver}},t.prototype._isValidCurrentDropHintIndex=function(){return this._currentDropHintIndex>=0},t.prototype._isCheckboxColumnHidden=function(){var e=this.props,t=e.selectionMode,r=e.checkboxVisibility;return t===ie.none||r===Me.hidden},t.prototype._resetDropHints=function(){this._currentDropHintIndex>=0&&(this._updateDropHintElement(this._dropHintDetails[this._currentDropHintIndex].dropHintElementRef,"none"),this._currentDropHintIndex=-1)},t.prototype._updateDropHintElement=function(e,t){e.childNodes[1].style.display=t,e.childNodes[0].style.display=t},t.prototype._isEventOnHeader=function(e){if(this._rootElement){var t=this._rootElement.getBoundingClientRect();if(e.clientX>t.left&&e.clientX<t.right&&e.clientY>t.top&&e.clientY<t.bottom)return we.header}},t.prototype._renderColumnDivider=function(e){var t=this.props.columns,r=(void 0===t?dt:t)[e],n=r.onRenderDivider;return n?n({column:r,columnIndex:e},this._renderColumnSizer):this._renderColumnSizer({column:r,columnIndex:e})},t.prototype._renderDropHint=function(e){var t=this._classNames,r=this.props.useFastIcons?Pe.a:_.a;return n.createElement("div",{key:"dropHintKey",className:t.dropHintStyle,id:"columnDropHint_"+e},n.createElement(r,{key:"dropHintCircleKey","aria-hidden":!0,"data-is-focusable":!1,"data-sizer-index":e,className:t.dropHintCaretStyle,iconName:"CircleShapeSolid"}),n.createElement("div",{key:"dropHintLineKey","aria-hidden":!0,"data-is-focusable":!1,"data-sizer-index":e,className:t.dropHintLineStyle}))},t.prototype._onSizerDoubleClick=function(e,t){var r=this.props,n=r.onColumnAutoResized,a=r.columns;n&&n((void 0===a?dt:a)[e],e)},t.prototype._onSelectionChanged=function(){var e=!!this.props.selection&&this.props.selection.isAllSelected();this.state.isAllSelected!==e&&this.setState({isAllSelected:e})},t.defaultProps={selectAllVisibility:$e.visible,collapseAllVisibility:Le.visible,useFastIcons:!0},t}(n.Component);function ht(e,t,r,n){return e?t<=r&&t>=n:t>=r&&t<=n}function ft(e,t,r){return e?t>=r:t<=r}function mt(e,t,r){return e?t<=r:t>=r}function gt(e){e.stopPropagation()}var vt=Object(S.a)(pt,(function(e){var t,r,n,a,i=e.theme,o=e.className,s=e.isAllSelected,l=e.isResizingColumn,c=e.isSizing,u=e.isAllCollapsed,d=e.cellStyleProps,p=void 0===d?He:d,h=i.semanticColors,f=i.palette,m=i.fonts,g=Object(v.v)(We,i),y={iconForegroundColor:h.bodySubtext,headerForegroundColor:h.bodyText,headerBackgroundColor:h.bodyBackground,dropdownChevronForegroundColor:f.neutralTertiary,resizerColor:f.neutralTertiaryAlt},b={opacity:1,transition:"opacity 0.3s linear"},_=Ge(e);return{root:[g.root,m.small,{display:"inline-block",background:y.headerBackgroundColor,position:"relative",minWidth:"100%",verticalAlign:"top",height:42,lineHeight:42,whiteSpace:"nowrap",boxSizing:"content-box",paddingBottom:"1px",paddingTop:"16px",borderBottom:"1px solid "+h.bodyDivider,cursor:"default",userSelect:"none",selectors:(t={},t["&:hover ."+g.check]={opacity:1},t["& ."+g.tooltipHost+" ."+g.checkTooltip]={display:"block"},t)},s&&g.isAllSelected,l&&g.isResizingColumn,o],check:[g.check,{height:42},{selectors:(r={},r["."+Be.a+" &:focus"]={opacity:1},r)}],cellWrapperPadded:{paddingRight:p.cellExtraRightPadding+p.cellRightPadding},cellIsCheck:[_,g.cellIsCheck,{position:"relative",padding:0,margin:0,display:"inline-flex",alignItems:"center",border:"none"},s&&{opacity:1}],cellIsGroupExpander:[_,{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:m.small.fontSize,padding:0,border:"none",width:36,color:f.neutralSecondary,selectors:{":hover":{backgroundColor:f.neutralLighter},":active":{backgroundColor:f.neutralLight}}}],cellIsActionable:{selectors:{":hover":{color:h.bodyText,background:h.listHeaderBackgroundHovered},":active":{background:h.listHeaderBackgroundPressed}}},cellIsEmpty:{textOverflow:"clip"},cellSizer:[g.cellSizer,Object(v.t)(),{display:"inline-block",position:"relative",cursor:"ew-resize",bottom:0,top:0,overflow:"hidden",height:"inherit",background:"transparent",zIndex:1,width:16,selectors:(n={":after":{content:'""',position:"absolute",top:0,bottom:0,width:1,background:y.resizerColor,opacity:0,left:"50%"},":focus:after":b,":hover:after":b},n["&."+g.isResizing+":after"]=[b,{boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.4)"}],n)}],cellIsResizing:g.isResizing,cellSizerStart:{margin:"0 -8px"},cellSizerEnd:{margin:0,marginLeft:-16},collapseButton:[g.collapseButton,{transformOrigin:"50% 50%",transition:"transform .1s linear"},u?[g.isCollapsed,{transform:"rotate(0deg)"}]:{transform:"rotate(90deg)"}],checkTooltip:g.checkTooltip,sizingOverlay:c&&{position:"absolute",left:0,top:0,right:0,bottom:0,cursor:"ew-resize",background:"rgba(255, 255, 255, 0)",selectors:(a={},a[v.f]={background:"transparent",MsHighContrastAdjust:"none"},a)},accessibleLabel:v.B,dropHintCircleStyle:[g.dropHintCircleStyle,{display:"inline-block",visibility:"hidden",position:"absolute",bottom:0,height:9,width:9,borderRadius:"50%",marginLeft:-5,top:34,overflow:"visible",zIndex:10,border:"1px solid "+f.themePrimary,background:f.white}],dropHintCaretStyle:[g.dropHintCaretStyle,{display:"none",position:"absolute",top:-28,left:-6.5,fontSize:m.medium.fontSize,color:f.themePrimary,overflow:"visible",zIndex:10}],dropHintLineStyle:[g.dropHintLineStyle,{display:"none",position:"absolute",bottom:0,top:0,overflow:"hidden",height:42,width:1,background:f.themePrimary,zIndex:10}],dropHintStyle:{display:"inline-block",position:"absolute"}}}),void 0,{scope:"DetailsHeader"}),yt=function(e){var t=e.columns,r=e.columnStartIndex,a=e.rowClassNames,i=e.cellStyleProps,o=void 0===i?He:i,s=e.item,l=e.itemIndex,c=e.onRenderItemColumn,u=e.getCellValueKey,d=e.cellsByColumn,p=e.enableUpdateAnimations,h=n.useRef(),f=h.current||(h.current={});return n.createElement("div",{className:a.fields,"data-automationid":"DetailsRowFields",role:"presentation"},t.map((function(e,t){var i=void 0===e.calculatedWidth?"auto":e.calculatedWidth+o.cellLeftPadding+o.cellRightPadding+(e.isPadded?o.cellExtraRightPadding:0),h=e.onRender,m=void 0===h?c:h,g=e.getValueKey,v=void 0===g?u:g,y=d&&e.key in d?d[e.key]:m?m(s,l,e):function(e,t){var r=e&&t&&t.fieldName?e[t.fieldName]:"";return null==r&&(r=""),"boolean"==typeof r?r.toString():r}(s,e),b=f[e.key],_=p&&v?v(s,l,e):void 0,x=!1;void 0!==_&&void 0!==b&&_!==b&&(x=!0),f[e.key]=_;var w=e.key+(void 0!==_?"-"+_:"");return n.createElement("div",{key:w,role:e.isRowHeader?"rowheader":"gridcell","aria-readonly":!0,"aria-colindex":t+r+1,className:Object(Ee.a)(e.className,e.isMultiline&&a.isMultiline,e.isRowHeader&&a.isRowHeader,a.cell,e.isPadded?a.cellPadded:a.cellUnpadded,x&&a.cellAnimation),style:{width:i},"data-automationid":"DetailsRowCell","data-automation-key":e.key},y)})))},bt=Object(A.a)(),_t=[],xt=function(e){function t(t){var r=e.call(this,t)||this;return r._cellMeasurer=n.createRef(),r._focusZone=n.createRef(),r._onSelectionChanged=function(){var e=r._getSelectionState(r.props);Object(F.c)(e,r.state.selectionState)||r.setState({selectionState:e})},r._onRootRef=function(e){r._root=e?Ae.findDOMNode(e):void 0},r._updateDroppingState=function(e,t){var n=r.state.isDropping,a=r.props,i=a.dragDropEvents,o=a.item;e?i.onDragEnter&&(r._droppingClassNames=i.onDragEnter(o,t)):i.onDragLeave&&i.onDragLeave(o,t),n!==e&&r.setState({isDropping:e})},Object(O.a)(r),r._events=new J.a(r),r.state={selectionState:r._getSelectionState(t),columnMeasureInfo:void 0,isDropping:!1},r._droppingClassNames="",r}return Object(L.c)(t,e),t.prototype.componentDidMount=function(){var e=this.props.dragDropHelper;e&&(this._dragDropSubscription=e.subscribe(this._root,this._events,this._getRowDragDropOptions())),this._events.on(this.props.selection,"change",this._onSelectionChanged),this.props.onDidMount&&this.props.item&&(this._onDidMountCalled=!0,this.props.onDidMount(this))},t.prototype.componentDidUpdate=function(e){var t=this.state,r=this.props,n=r.item,a=r.onDidMount,i=t.columnMeasureInfo;if(this.props.itemIndex===e.itemIndex&&this.props.item===e.item&&this.props.dragDropHelper===e.dragDropHelper||(this._dragDropSubscription&&(this._dragDropSubscription.dispose(),delete this._dragDropSubscription),this.props.dragDropHelper&&(this._dragDropSubscription=this.props.dragDropHelper.subscribe(this._root,this._events,this._getRowDragDropOptions()))),i&&i.index>=0&&this._cellMeasurer.current){var o=this._cellMeasurer.current.getBoundingClientRect().width;i.onMeasureDone(o),this.setState({columnMeasureInfo:void 0})}n&&a&&!this._onDidMountCalled&&(this._onDidMountCalled=!0,a(this))},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.item,r=e.onWillUnmount;r&&t&&r(this),this._dragDropSubscription&&(this._dragDropSubscription.dispose(),delete this._dragDropSubscription),this._events.dispose()},t.prototype.UNSAFE_componentWillReceiveProps=function(e){this.setState({selectionState:this._getSelectionState(e)})},t.prototype.shouldComponentUpdate=function(e,t){if(this.props.useReducedRowRenderer){var r=this._getSelectionState(e);return this.state.selectionState.isSelected!==r.isSelected||!Object(F.c)(this.props,e)}return!0},t.prototype.render=function(){var e=this.props,t=e.className,r=e.columns,a=void 0===r?_t:r,i=e.dragDropEvents,o=e.item,s=e.itemIndex,l=e.onRenderCheck,c=void 0===l?this._onRenderCheck:l,u=e.onRenderDetailsCheckbox,d=e.onRenderItemColumn,p=e.getCellValueKey,h=e.selectionMode,f=e.rowWidth,m=void 0===f?0:f,g=e.checkboxVisibility,v=e.getRowAriaLabel,y=e.getRowAriaDescribedBy,b=e.checkButtonAriaLabel,_=e.checkboxCellClassName,x=e.rowFieldsAs,w=void 0===x?yt:x,k=e.selection,M=e.indentWidth,T=e.enableUpdateAnimations,C=e.compact,S=e.theme,A=e.styles,E=e.cellsByColumn,D=e.groupNestingDepth,I=e.useFastIcons,P=void 0===I||I,O=this.state,R=O.columnMeasureInfo,N=O.isDropping,j=this.state.selectionState,B=j.isSelected,Y=void 0!==B&&B,H=j.isSelectionModal,V=void 0!==H&&H,U=i?!(!i.canDrag||!i.canDrag(o)):void 0,W=N?this._droppingClassNames||"is-dropping":"",G=v?v(o):void 0,q=y?y(o):void 0,K=!!k&&k.canSelectItem(o,s),X=h===ie.multiple,Z=h!==ie.none&&g!==Me.hidden,J=h===ie.none?void 0:Y;this._classNames=Object(L.a)(Object(L.a)({},this._classNames),bt(A,{theme:S,isSelected:Y,canSelect:!X,anySelected:V,checkboxCellClassName:_,droppingClassName:W,className:t,compact:C,enableUpdateAnimations:T}));var $={isMultiline:this._classNames.isMultiline,isRowHeader:this._classNames.isRowHeader,cell:this._classNames.cell,cellAnimation:this._classNames.cellAnimation,cellPadded:this._classNames.cellPadded,cellUnpadded:this._classNames.cellUnpadded,fields:this._classNames.fields};Object(F.c)(this._rowClassNames||{},$)||(this._rowClassNames=$);var Q=n.createElement(w,{rowClassNames:this._rowClassNames,cellsByColumn:E,columns:a,item:o,itemIndex:s,columnStartIndex:Z?1:0,onRenderItemColumn:d,getCellValueKey:p,enableUpdateAnimations:T});return n.createElement(De.a,Object(L.a)({"data-is-focusable":!0},Object(z.d)(this.props,z.c),"boolean"==typeof U?{"data-is-draggable":U,draggable:U}:{},{direction:Ie.a.horizontal,ref:this._onRootRef,componentRef:this._focusZone,role:"row","aria-label":G,"aria-describedby":q,className:this._classNames.root,"data-selection-index":s,"data-item-index":s,"aria-rowindex":s+1,"data-automationid":"DetailsRow",style:{minWidth:m},"aria-selected":J,allowFocusRoot:!0}),Z&&n.createElement("div",{role:"gridcell","aria-colindex":1,"data-selection-toggle":!0,className:this._classNames.checkCell},c({selected:Y,anySelected:V,"aria-label":b,canSelect:K,compact:C,className:this._classNames.check,theme:S,isVisible:g===Me.always,onRenderDetailsCheckbox:u,useFastIcons:P})),n.createElement(Re,{indentWidth:M,count:D-(this.props.collapseAllVisibility===Le.hidden?1:0)}),o&&Q,R&&n.createElement("span",{role:"presentation",className:Object(Ee.a)(this._classNames.cellMeasurer,this._classNames.cell),ref:this._cellMeasurer},n.createElement(w,{rowClassNames:this._rowClassNames,columns:[R.column],item:o,itemIndex:s,columnStartIndex:(Z?1:0)+a.length,onRenderItemColumn:d,getCellValueKey:p})),n.createElement("span",{role:"checkbox",className:this._classNames.checkCover,"aria-checked":Y,"data-selection-toggle":!0}))},t.prototype.measureCell=function(e,t){var r=this.props.columns,n=void 0===r?_t:r,a=Object(L.a)({},n[e]);a.minWidth=0,a.maxWidth=999999,delete a.calculatedWidth,this.setState({columnMeasureInfo:{index:e,column:a,onMeasureDone:t}})},t.prototype.focus=function(e){return void 0===e&&(e=!1),!!this._focusZone.current&&this._focusZone.current.focus(e)},t.prototype._onRenderCheck=function(e){return n.createElement(Qe,Object(L.a)({},e))},t.prototype._getSelectionState=function(e){var t=e.itemIndex,r=e.selection;return{isSelected:!!r&&r.isIndexSelected(t),isSelectionModal:!!r&&!!r.isModal&&r.isModal()}},t.prototype._getRowDragDropOptions=function(){var e=this.props,t=e.item,r=e.itemIndex,n=e.dragDropEvents;return{eventMap:e.eventsToRegister,selectionIndex:r,context:{data:t,index:r},canDrag:n.canDrag,canDrop:n.canDrop,onDragStart:n.onDragStart,updateDropState:this._updateDroppingState,onDrop:n.onDrop,onDragEnd:n.onDragEnd}},t}(n.Component),wt=Object(S.a)(xt,(function(e){var t,r,n,a,i,o,s,l,c,u,d,p,h=e.theme,f=e.isSelected,m=e.canSelect,g=e.droppingClassName,y=e.anySelected,b=e.isCheckVisible,_=e.checkboxCellClassName,x=e.compact,w=e.className,k=e.cellStyleProps,M=void 0===k?He:k,T=e.enableUpdateAnimations,C=h.palette,S=h.fonts,L=C.neutralPrimary,A=C.white,E=C.neutralSecondary,D=C.neutralLighter,I=C.neutralLight,P=C.neutralDark,O=C.neutralQuaternaryAlt,R=h.semanticColors.focusBorder,F=Object(v.v)(Ye,h),z={defaultHeaderText:L,defaultMetaText:E,defaultBackground:A,defaultHoverHeaderText:P,defaultHoverMetaText:L,defaultHoverBackground:D,selectedHeaderText:P,selectedMetaText:L,selectedBackground:I,selectedHoverHeaderText:P,selectedHoverMetaText:L,selectedHoverBackground:O,focusHeaderText:P,focusMetaText:L,focusBackground:I,focusHoverBackground:O},N=[Object(v.u)(h,{inset:-1,borderColor:R,outlineColor:A}),F.isSelected,{color:z.selectedMetaText,background:z.selectedBackground,borderBottom:"1px solid "+A,selectors:(t={"&:before":{position:"absolute",display:"block",top:-1,height:1,bottom:0,left:0,right:0,content:"",borderTop:"1px solid "+A},"&:hover":{background:z.selectedHoverBackground,color:z.selectedHoverMetaText,selectors:(r={},r["."+F.cell+" "+v.f]={color:"HighlightText",selectors:{"> a":{color:"HighlightText"}}},r["."+F.isRowHeader]={color:z.selectedHoverHeaderText,selectors:(n={},n[v.f]={color:"HighlightText"},n)},r[v.f]={background:"Highlight"},r)},"&:focus":{background:z.focusBackground,selectors:(a={},a["."+F.cell]={color:z.focusMetaText,selectors:(i={},i[v.f]={color:"HighlightText",selectors:{"> a":{color:"HighlightText"}}},i)},a["."+F.isRowHeader]={color:z.focusHeaderText,selectors:(o={},o[v.f]={color:"HighlightText"},o)},a[v.f]={background:"Highlight"},a)}},t[v.f]={background:"Highlight",color:"HighlightText",MsHighContrastAdjust:"none",selectors:{a:{color:"HighlightText"}}},t["&:focus:hover"]={background:z.focusHoverBackground},t)}],j=[F.isContentUnselectable,{userSelect:"none",cursor:"default"}],B={minHeight:Ue.compactRowHeight,border:0},Y={minHeight:Ue.compactRowHeight,paddingTop:Ue.compactRowVerticalPadding,paddingBottom:Ue.compactRowVerticalPadding,paddingLeft:M.cellLeftPadding+"px"},H=[Object(v.u)(h,{inset:-1}),F.cell,{display:"inline-block",position:"relative",boxSizing:"border-box",minHeight:Ue.rowHeight,verticalAlign:"top",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingTop:Ue.rowVerticalPadding,paddingBottom:Ue.rowVerticalPadding,paddingLeft:M.cellLeftPadding+"px",selectors:(s={"& > button":{maxWidth:"100%"}},s["[data-is-focusable='true']"]=Object(v.u)(h,{inset:-1,borderColor:E,outlineColor:A}),s)},f&&{selectors:(l={},l[v.f]={background:"Highlight",color:"HighlightText",MsHighContrastAdjust:"none",selectors:{a:{color:"HighlightText"}}},l)},x&&Y];return{root:[F.root,v.a.fadeIn400,g,h.fonts.small,b&&F.isCheckVisible,Object(v.u)(h,{borderColor:R,outlineColor:A}),{borderBottom:"1px solid "+D,background:z.defaultBackground,color:z.defaultMetaText,display:"inline-flex",minWidth:"100%",minHeight:Ue.rowHeight,whiteSpace:"nowrap",padding:0,boxSizing:"border-box",verticalAlign:"top",textAlign:"left",selectors:(c={},c["."+F.listCellFirstChild+" &:before"]={display:"none"},c["&:hover"]={background:z.defaultHoverBackground,color:z.defaultHoverMetaText,selectors:(u={},u["."+F.isRowHeader]={color:z.defaultHoverHeaderText},u)},c["&:hover ."+F.check]={opacity:1},c["."+Be.a+" &:focus ."+F.check]={opacity:1},c)},f&&N,!m&&j,x&&B,w],cellUnpadded:{paddingRight:M.cellRightPadding+"px"},cellPadded:{paddingRight:M.cellExtraRightPadding+M.cellRightPadding+"px",selectors:(d={},d["&."+F.cellCheck]={paddingRight:0},d)},cell:H,cellAnimation:T&&v.b.slideLeftIn40,cellMeasurer:[F.cellMeasurer,{overflow:"visible",whiteSpace:"nowrap"}],checkCell:[H,F.cellCheck,_,{padding:0,paddingTop:1,marginTop:-1,flexShrink:0}],checkCover:{position:"absolute",top:-1,left:0,bottom:0,right:0,display:y?"block":"none"},fields:[F.fields,{display:"flex",alignItems:"stretch"}],isRowHeader:[F.isRowHeader,{color:z.defaultHeaderText,fontSize:S.medium.fontSize},f&&{color:z.selectedHeaderText,fontWeight:v.e.semibold,selectors:(p={},p[v.f]={color:"HighlightText"},p)}],isMultiline:[H,{whiteSpace:"normal",wordBreak:"break-word",textOverflow:"clip"}],check:[F.check]}}),void 0,{scope:"DetailsRow"}),kt=r(56),Mt=r(17),Tt=r(359),Ct=r(340),St=r(95),Lt="data-selection-toggle",At="data-selection-invoke",Et="data-selection-all-toggle",Dt=function(e){function t(t){var r=e.call(this,t)||this;r._root=n.createRef(),r.ignoreNextFocus=function(){r._handleNextFocus(!1)},r._onSelectionChange=function(){var e=r.props.selection,t=e.isModal&&e.isModal();r.setState({isModal:t})},r._onMouseDownCapture=function(e){var t=e.target;if(document.activeElement===t||Object(Se.a)(document.activeElement,t)){if(Object(Se.a)(t,r._root.current))for(;t!==r._root.current;){if(r._hasAttribute(t,At)){r.ignoreNextFocus();break}t=Object(kt.a)(t)}}else r.ignoreNextFocus()},r._onFocus=function(e){var t=e.target,n=r.props.selection,a=r._isCtrlPressed||r._isMetaPressed,i=r._getSelectionMode();if(r._shouldHandleFocus&&i!==ie.none){var o=r._hasAttribute(t,Lt),s=r._findItemRoot(t);if(!o&&s){var l=r._getItemIndex(s);a?(n.setIndexSelected(l,n.isIndexSelected(l),!0),r.props.enterModalOnTouch&&r._isTouch&&n.setModal&&(n.setModal(!0),r._setIsTouch(!1))):r.props.isSelectedOnFocus&&r._onItemSurfaceClick(e,l)}}r._handleNextFocus(!1)},r._onMouseDown=function(e){r._updateModifiers(e);var t=e.target,n=r._findItemRoot(t);if(!r._isSelectionDisabled(t))for(;t!==r._root.current&&!r._hasAttribute(t,Et);){if(n){if(r._hasAttribute(t,Lt))break;if(r._hasAttribute(t,At))break;if(!(t!==n&&!r._shouldAutoSelect(t)||r._isShiftPressed||r._isCtrlPressed||r._isMetaPressed)){r._onInvokeMouseDown(e,r._getItemIndex(n));break}if(r.props.disableAutoSelectOnInputElements&&("A"===t.tagName||"BUTTON"===t.tagName||"INPUT"===t.tagName))return}t=Object(kt.a)(t)}},r._onTouchStartCapture=function(e){r._setIsTouch(!0)},r._onClick=function(e){r._updateModifiers(e);for(var t=e.target,n=r._findItemRoot(t),a=r._isSelectionDisabled(t);t!==r._root.current;){if(r._hasAttribute(t,Et)){a||r._onToggleAllClick(e);break}if(n){var i=r._getItemIndex(n);if(r._hasAttribute(t,Lt)){a||(r._isShiftPressed?r._onItemSurfaceClick(e,i):r._onToggleClick(e,i));break}if(r._hasAttribute(t,At)){r._onInvokeClick(e,i);break}if(t===n){a||r._onItemSurfaceClick(e,i);break}if("A"===t.tagName||"BUTTON"===t.tagName||"INPUT"===t.tagName)return}t=Object(kt.a)(t)}},r._onContextMenu=function(e){var t=e.target,n=r.props,a=n.onItemContextMenu,i=n.selection;if(a){var o=r._findItemRoot(t);if(o){var s=r._getItemIndex(o);r._onInvokeMouseDown(e,s),a(i.getItems()[s],s,e.nativeEvent)||e.preventDefault()}}},r._onDoubleClick=function(e){var t=e.target,n=r.props.onItemInvoked,a=r._findItemRoot(t);if(a&&n&&!r._isInputElement(t)){for(var i=r._getItemIndex(a);t!==r._root.current&&!r._hasAttribute(t,Lt)&&!r._hasAttribute(t,At);){if(t===a){r._onInvokeClick(e,i);break}t=Object(kt.a)(t)}t=Object(kt.a)(t)}},r._onKeyDownCapture=function(e){r._updateModifiers(e),r._handleNextFocus(!0)},r._onKeyDown=function(e){r._updateModifiers(e);var t=e.target,n=r._isSelectionDisabled(t),a=r.props.selection,i=e.which===P.a.a&&(r._isCtrlPressed||r._isMetaPressed),o=e.which===P.a.escape;if(!r._isInputElement(t)){var s=r._getSelectionMode();if(i&&s===ie.multiple&&!a.isAllSelected())return n||a.setAllSelected(!0),e.stopPropagation(),void e.preventDefault();if(o&&a.getSelectedCount()>0)return n||a.setAllSelected(!1),e.stopPropagation(),void e.preventDefault();var l=r._findItemRoot(t);if(l)for(var c=r._getItemIndex(l);t!==r._root.current&&!r._hasAttribute(t,Lt);){if(r._shouldAutoSelect(t)){n||r._onInvokeMouseDown(e,c);break}if(!(e.which!==P.a.enter&&e.which!==P.a.space||"BUTTON"!==t.tagName&&"A"!==t.tagName&&"INPUT"!==t.tagName))return!1;if(t===l){if(e.which===P.a.enter)return r._onInvokeClick(e,c),void e.preventDefault();if(e.which===P.a.space)return n||r._onToggleClick(e,c),void e.preventDefault();break}t=Object(kt.a)(t)}}};var a=r.props.selection,i=a.isModal&&a.isModal();return r.state={isModal:i},r}return Object(L.c)(t,e),t.getDerivedStateFromProps=function(e,t){var r=e.selection.isModal&&e.selection.isModal();return Object(L.a)(Object(L.a)({},t),{isModal:r})},t.prototype.componentDidMount=function(){var e=Object(Mt.a)(this._root.current);this._events.on(e,"keydown, keyup",this._updateModifiers,!0),this._events.on(document,"click",this._findScrollParentAndTryClearOnEmptyClick),this._events.on(document.body,"touchstart",this._onTouchStartCapture,!0),this._events.on(document.body,"touchend",this._onTouchStartCapture,!0),this._events.on(this.props.selection,"change",this._onSelectionChange)},t.prototype.render=function(){var e=this.state.isModal;return n.createElement("div",{className:Object(Ee.a)("ms-SelectionZone",{"ms-SelectionZone--modal":!!e}),ref:this._root,onKeyDown:this._onKeyDown,onMouseDown:this._onMouseDown,onKeyDownCapture:this._onKeyDownCapture,onClick:this._onClick,role:"presentation",onDoubleClick:this._onDoubleClick,onContextMenu:this._onContextMenu,onMouseDownCapture:this._onMouseDownCapture,onFocusCapture:this._onFocus,"data-selection-is-modal":!!e||void 0},this.props.children)},t.prototype.componentDidUpdate=function(e){var t=this.props.selection;t!==e.selection&&(this._events.off(e.selection),this._events.on(t,"change",this._onSelectionChange))},t.prototype._isSelectionDisabled=function(e){if(this._getSelectionMode()===ie.none)return!0;for(;e!==this._root.current;){if(this._hasAttribute(e,"data-selection-disabled"))return!0;e=Object(kt.a)(e)}return!1},t.prototype._onToggleAllClick=function(e){var t=this.props.selection;this._getSelectionMode()===ie.multiple&&(t.toggleAllSelected(),e.stopPropagation(),e.preventDefault())},t.prototype._onToggleClick=function(e,t){var r=this.props.selection,n=this._getSelectionMode();if(r.setChangeEvents(!1),this.props.enterModalOnTouch&&this._isTouch&&!r.isIndexSelected(t)&&r.setModal&&(r.setModal(!0),this._setIsTouch(!1)),n===ie.multiple)r.toggleIndexSelected(t);else{if(n!==ie.single)return void r.setChangeEvents(!0);var a=r.isIndexSelected(t),i=r.isModal&&r.isModal();r.setAllSelected(!1),r.setIndexSelected(t,!a,!0),i&&r.setModal&&r.setModal(!0)}r.setChangeEvents(!0),e.stopPropagation()},t.prototype._onInvokeClick=function(e,t){var r=this.props,n=r.selection,a=r.onItemInvoked;a&&(a(n.getItems()[t],t,e.nativeEvent),e.preventDefault(),e.stopPropagation())},t.prototype._onItemSurfaceClick=function(e,t){var r=this.props.selection,n=this._isCtrlPressed||this._isMetaPressed,a=this._getSelectionMode();a===ie.multiple?this._isShiftPressed&&!this._isTabPressed?r.selectToIndex(t,!n):n?r.toggleIndexSelected(t):this._clearAndSelectIndex(t):a===ie.single&&this._clearAndSelectIndex(t)},t.prototype._onInvokeMouseDown=function(e,t){this.props.selection.isIndexSelected(t)||this._clearAndSelectIndex(t)},t.prototype._findScrollParentAndTryClearOnEmptyClick=function(e){var t=Object(Tt.e)(this._root.current);this._events.off(document,"click",this._findScrollParentAndTryClearOnEmptyClick),this._events.on(t,"click",this._tryClearOnEmptyClick),(t&&e.target instanceof Node&&t.contains(e.target)||t===e.target)&&this._tryClearOnEmptyClick(e)},t.prototype._tryClearOnEmptyClick=function(e){!this.props.selectionPreservedOnEmptyClick&&this._isNonHandledClick(e.target)&&this.props.selection.setAllSelected(!1)},t.prototype._clearAndSelectIndex=function(e){var t=this.props.selection;if(!(1===t.getSelectedCount()&&t.isIndexSelected(e))){var r=t.isModal&&t.isModal();t.setChangeEvents(!1),t.setAllSelected(!1),t.setIndexSelected(e,!0,!0),(r||this.props.enterModalOnTouch&&this._isTouch)&&(t.setModal&&t.setModal(!0),this._isTouch&&this._setIsTouch(!1)),t.setChangeEvents(!0)}},t.prototype._updateModifiers=function(e){this._isShiftPressed=e.shiftKey,this._isCtrlPressed=e.ctrlKey,this._isMetaPressed=e.metaKey;var t=e.keyCode;this._isTabPressed=!!t&&t===P.a.tab},t.prototype._findItemRoot=function(e){for(var t=this.props.selection;e!==this._root.current;){var r=e.getAttribute("data-selection-index"),n=Number(r);if(null!==r&&n>=0&&n<t.getItems().length)break;e=Object(kt.a)(e)}if(e!==this._root.current)return e},t.prototype._getItemIndex=function(e){return Number(e.getAttribute("data-selection-index"))},t.prototype._shouldAutoSelect=function(e){return this._hasAttribute(e,"data-selection-select")},t.prototype._hasAttribute=function(e,t){for(var r=!1;!r&&e!==this._root.current;)r="true"===e.getAttribute(t),e=Object(kt.a)(e);return r},t.prototype._isInputElement=function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName},t.prototype._isNonHandledClick=function(e){var t=Object(et.a)();if(t&&e)for(;e&&e!==t.documentElement;){if(Object(Ct.n)(e))return!1;e=Object(kt.a)(e)}return!0},t.prototype._handleNextFocus=function(e){var t=this;this._shouldHandleFocusTimeoutId&&(this._async.clearTimeout(this._shouldHandleFocusTimeoutId),this._shouldHandleFocusTimeoutId=void 0),this._shouldHandleFocus=e,e&&this._async.setTimeout((function(){t._shouldHandleFocus=!1}),100)},t.prototype._setIsTouch=function(e){var t=this;this._isTouchTimeoutId&&(this._async.clearTimeout(this._isTouchTimeoutId),this._isTouchTimeoutId=void 0),this._isTouch=!0,e&&this._async.setTimeout((function(){t._isTouch=!1}),300)},t.prototype._getSelectionMode=function(){var e=this.props.selection,t=this.props.selectionMode;return void 0===t?e?e.mode:ie.none:t},t.defaultProps={isSelectedOnFocus:!0,selectionMode:ie.multiple},t}(St.a),It={root:"ms-GroupedList",compact:"ms-GroupedList--Compact",group:"ms-GroupedList-group",link:"ms-Link",listCell:"ms-List-cell"},Pt="cubic-bezier(0.445, 0.050, 0.550, 0.950)",Ot={root:"ms-GroupHeader",compact:"ms-GroupHeader--compact",check:"ms-GroupHeader-check",dropIcon:"ms-GroupHeader-dropIcon",expand:"ms-GroupHeader-expand",isCollapsed:"is-collapsed",title:"ms-GroupHeader-title",isSelected:"is-selected",iconTag:"ms-Icon--Tag",group:"ms-GroupedList-group",isDropping:"is-dropping"},Rt="cubic-bezier(0.075, 0.820, 0.165, 1.000)",Ft="cubic-bezier(0.390, 0.575, 0.565, 1.000)",zt="cubic-bezier(0.600, -0.280, 0.735, 0.045)",Nt=r(383),jt=Object(A.a)(),Bt=function(e){function t(t){var r=e.call(this,t)||this;return r._onToggleCollapse=function(e){var t=r.props,n=t.group,a=t.onToggleCollapse,i=t.isGroupLoading,o=!r.state.isCollapsed,s=!o&&i&&i(n);r.setState({isCollapsed:o,isLoadingVisible:s}),a&&a(n),e.stopPropagation(),e.preventDefault()},r._onToggleSelectGroupClick=function(e){var t=r.props,n=t.onToggleSelectGroup,a=t.group;n&&n(a),e.preventDefault(),e.stopPropagation()},r._onHeaderClick=function(){var e=r.props,t=e.group,n=e.onGroupHeaderClick,a=e.onToggleSelectGroup;n?n(t):a&&a(t)},r._onRenderTitle=function(e){var t=e.group;return t?n.createElement("div",{className:r._classNames.title},n.createElement("span",null,t.name),n.createElement("span",{className:r._classNames.headerCount},"(",t.count,t.hasMoreData&&"+",")")):null},r.state={isCollapsed:r.props.group&&r.props.group.isCollapsed,isLoadingVisible:!1},r}return Object(L.c)(t,e),t.prototype.UNSAFE_componentWillReceiveProps=function(e){if(e.group){var t=e.group.isCollapsed,r=e.isGroupLoading,n=!t&&r&&r(e.group);this.setState({isCollapsed:t||!1,isLoadingVisible:n||!1})}},t.prototype.render=function(){var e=this.props,t=e.group,r=e.groupLevel,a=e.viewport,i=e.selectionMode,o=e.loadingText,s=e.isSelected,l=void 0!==s&&s,c=e.selected,u=void 0!==c&&c,d=e.indentWidth,p=e.onRenderTitle,h=void 0===p?this._onRenderTitle:p,f=e.isCollapsedGroupSelectVisible,m=void 0===f||f,g=e.expandButtonProps,v=e.selectAllButtonProps,y=e.theme,b=e.styles,x=e.className,w=e.groupedListId,k=e.compact,M=this.state,T=M.isCollapsed,C=M.isLoadingVisible,S=i===ie.multiple&&(m||!(t&&t.isCollapsed)),A=l||u,E=Object(re.a)(y);return this._classNames=jt(b,{theme:y,className:x,selected:A,isCollapsed:T,compact:k}),t?n.createElement("div",{className:this._classNames.root,style:a?{minWidth:a.width}:{},onClick:this._onHeaderClick,"aria-expanded":!t.isCollapsed,"aria-label":t.ariaLabel||t.name,"aria-level":void 0!==r?r+1:void 0,"data-is-focusable":!0},n.createElement(De.a,{className:this._classNames.groupHeaderContainer,direction:Ie.a.horizontal},S?n.createElement("button",Object(L.a)({type:"button",className:this._classNames.check,role:"checkbox","aria-checked":A,"data-selection-toggle":!0,onClick:this._onToggleSelectGroupClick},v),n.createElement(Ne,{checked:A})):i!==ie.none&&n.createElement(Re,{indentWidth:d,count:1}),n.createElement(Re,{indentWidth:d,count:r}),n.createElement("div",{className:this._classNames.dropIcon},n.createElement(_.a,{iconName:"Tag"})),n.createElement("button",Object(L.a)({type:"button",className:this._classNames.expand,onClick:this._onToggleCollapse,"aria-expanded":!t.isCollapsed,"aria-controls":t&&!t.isCollapsed?w:void 0},g),n.createElement(_.a,{className:this._classNames.expandIsCollapsed,iconName:E?"ChevronLeftMed":"ChevronRightMed"})),h(this.props,this._onRenderTitle),C&&n.createElement(Nt.a,{label:o}))):null},t.defaultProps={expandButtonProps:{"aria-label":"expand collapse group"}},t}(n.Component),Yt=Object(S.a)(Bt,(function(e){var t,r,n,a,i,o=e.theme,s=e.className,l=e.selected,c=e.isCollapsed,u=e.compact,d=He.cellLeftPadding,p=u?40:48,h=o.semanticColors,f=o.palette,m=o.fonts,g=Object(v.v)(Ot,o),y=[Object(v.u)(o),{cursor:"default",background:"none",backgroundColor:"transparent",border:"none",padding:0}];return{root:[g.root,Object(v.u)(o),o.fonts.medium,{borderBottom:"1px solid "+h.listBackground,cursor:"default",userSelect:"none",selectors:(t={":hover":{background:h.listItemBackgroundHovered,color:h.actionLinkHovered}},t["&:hover ."+g.check]={opacity:1},t["."+Be.a+" &:focus ."+g.check]={opacity:1},t[":global(."+g.group+"."+g.isDropping+")"]={selectors:(r={},r["& > ."+g.root+" ."+g.dropIcon]={transition:"transform "+v.c.durationValue4+" "+Rt+" opacity "+v.c.durationValue1+" "+Ft,transitionDelay:v.c.durationValue3,opacity:1,transform:"rotate(0.2deg) scale(1);"},r["."+g.check]={opacity:0},r)},t)},l&&[g.isSelected,{background:h.listItemBackgroundChecked,selectors:(n={":hover":{background:h.listItemBackgroundCheckedHovered}},n[""+g.check]={opacity:1},n)}],u&&[g.compact,{border:"none"}],s],groupHeaderContainer:[{display:"flex",alignItems:"center",height:p}],headerCount:[{padding:"0px 4px"}],check:[g.check,y,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:1,marginTop:-1,opacity:0,width:48,height:p,selectors:(a={},a["."+Be.a+" &:focus"]={opacity:1},a)}],expand:[g.expand,y,{display:"flex",alignItems:"center",justifyContent:"center",fontSize:m.small.fontSize,width:36,height:p,color:l?f.neutralPrimary:f.neutralSecondary,selectors:{":hover":{backgroundColor:l?f.neutralQuaternary:f.neutralLight},":active":{backgroundColor:l?f.neutralTertiaryAlt:f.neutralQuaternaryAlt}}}],expandIsCollapsed:[c?[g.isCollapsed,{transform:"rotate(0deg)",transformOrigin:"50% 50%",transition:"transform .1s linear"}]:{transform:"rotate(90deg)",transformOrigin:"50% 50%",transition:"transform .1s linear"}],title:[g.title,{paddingLeft:d,fontSize:u?m.medium.fontSize:m.mediumPlus.fontSize,fontWeight:c?v.e.regular:v.e.semibold,cursor:"pointer",outline:0,whiteSpace:"nowrap",textOverflow:"ellipsis"}],dropIcon:[g.dropIcon,{position:"absolute",left:-26,fontSize:v.i.large,color:f.neutralSecondary,transition:"transform "+v.c.durationValue2+" "+zt+", opacity "+v.c.durationValue4+" "+Ft,opacity:0,transform:"rotate(0.2deg) scale(0.65)",transformOrigin:"10px 10px",selectors:(i={},i[":global(."+g.iconTag+")"]={position:"absolute"},i)}]}}),void 0,{scope:"GroupHeader"}),Ht={root:"ms-GroupShowAll",link:"ms-Link"},Vt=Object(A.a)(),Ut=Object(S.a)((function(e){var t=e.group,r=e.groupLevel,a=e.showAllLinkText,i=void 0===a?"Show All":a,o=e.styles,s=e.theme,l=e.onToggleSummarize,c=Vt(o,{theme:s}),u=Object(n.useCallback)((function(e){l(t),e.stopPropagation(),e.preventDefault()}),[l,t]);return t?n.createElement("div",{className:c.root},n.createElement(Re,{count:r}),n.createElement(T.a,{onClick:u},i)):null}),(function(e){var t,r=e.theme,n=r.fonts,a=Object(v.v)(Ht,r);return{root:[a.root,{position:"relative",padding:"10px 84px",cursor:"pointer",selectors:(t={},t["."+a.link]={fontSize:n.small.fontSize},t)}]}}),void 0,{scope:"GroupShowAll"}),Wt={root:"ms-groupFooter"},Gt=Object(A.a)(),qt=Object(S.a)((function(e){var t=e.group,r=e.groupLevel,a=e.footerText,i=e.indentWidth,o=e.styles,s=e.theme,l=Gt(o,{theme:s});return t&&a?n.createElement("div",{className:l.root},n.createElement(Re,{indentWidth:i,count:r}),a):null}),(function(e){var t=e.theme,r=e.className,n=Object(v.v)(Wt,t);return{root:[t.fonts.medium,n.root,{position:"relative",padding:"5px 38px"},r]}}),void 0,{scope:"GroupFooter"}),Kt=r(364),Xt=0,Zt=1,Jt=2,$t=3,Qt=16,er=100,tr=500,rr=200,nr=500,ar={top:-1,bottom:-1,left:-1,right:-1,width:0,height:0},ir=function(e){return e.getBoundingClientRect()},or=ir,sr=ir,lr=function(e){function t(t){var r=e.call(this,t)||this;return r._root=n.createRef(),r._surface=n.createRef(),r._onRenderPage=function(e,t){for(var a=r.props,i=a.onRenderCell,o=a.role,s=e.page,l=s.items,c=void 0===l?[]:l,u=s.startIndex,d=Object(L.d)(e,["page"]),p=void 0===o?"listitem":"presentation",h=[],f=0;f<c.length;f++){var m=u+f,g=c[f],v=r.props.getKey?r.props.getKey(g,m):g&&g.key;null==v&&(v=m),h.push(n.createElement("div",{role:p,className:"ms-List-cell",key:v,"data-list-index":m,"data-automationid":"ListCell"},i&&i(g,m,r.state.isScrolling)))}return n.createElement("div",Object(L.a)({},d),h)},Object(O.a)(r),r.state={pages:[],isScrolling:!1},r._async=new R.a(r),r._events=new J.a(r),r._estimatedPageHeight=0,r._totalEstimates=0,r._requiredWindowsAhead=0,r._requiredWindowsBehind=0,r._measureVersion=0,r._onAsyncScroll=r._async.debounce(r._onAsyncScroll,er,{leading:!1,maxWait:tr}),r._onAsyncIdle=r._async.debounce(r._onAsyncIdle,rr,{leading:!1}),r._onAsyncResize=r._async.debounce(r._onAsyncResize,Qt,{leading:!1}),r._onScrollingDone=r._async.debounce(r._onScrollingDone,nr,{leading:!1}),r._cachedPageHeights={},r._estimatedPageHeight=0,r._focusedIndex=-1,r._pageCache={},r}return Object(L.c)(t,e),t.prototype.scrollToIndex=function(e,t,r){void 0===r&&(r=Xt);for(var n=this.props.startIndex,a=n+this._getRenderCount(),i=this._allowedRect,o=0,s=1,l=n;l<a;l+=s){var c=this._getPageSpecification(l,i),u=c.height;if(s=c.itemCount,l<=e&&l+s>e){if(t&&this._scrollElement){for(var d=sr(this._scrollElement),p={top:this._scrollElement.scrollTop,bottom:this._scrollElement.scrollTop+d.height},h=e-l,f=0;f<h;++f)o+=t(l+f);var m=o+t(e);switch(r){case Zt:return void(this._scrollElement.scrollTop=o);case Jt:return void(this._scrollElement.scrollTop=m-d.height);case $t:return void(this._scrollElement.scrollTop=(o+m-d.height)/2)}if(o>=p.top&&m<=p.bottom)return;o<p.top||m>p.bottom&&(o=m-d.height)}return void(this._scrollElement.scrollTop=o)}o+=u}},t.prototype.getStartItemIndexInView=function(e){for(var t=0,r=this.state.pages||[];t<r.length;t++){var n=r[t];if(!n.isSpacer&&(this._scrollTop||0)>=n.top&&(this._scrollTop||0)<=n.top+n.height){if(!e){var a=Math.floor(n.height/n.itemCount);return n.startIndex+Math.floor((this._scrollTop-n.top)/a)}for(var i=0,o=n.startIndex;o<n.startIndex+n.itemCount;o++){a=e(o);if(n.top+i<=this._scrollTop&&this._scrollTop<n.top+i+a)return o;i+=a}}}return 0},t.prototype.componentDidMount=function(){this._updatePages(),this._measureVersion++,this._scrollElement=Object(Tt.e)(this._root.current),this._events.on(window,"resize",this._onAsyncResize),this._root.current&&this._events.on(this._root.current,"focus",this._onFocus,!0),this._scrollElement&&(this._events.on(this._scrollElement,"scroll",this._onScroll),this._events.on(this._scrollElement,"scroll",this._onAsyncScroll))},t.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},t.prototype.UNSAFE_componentWillReceiveProps=function(e){e.items===this.props.items&&e.renderCount===this.props.renderCount&&e.startIndex===this.props.startIndex&&e.version===this.props.version||(this._resetRequiredWindows(),this._requiredRect=null,this._measureVersion++,this._invalidatePageCache(),this._updatePages(e))},t.prototype.shouldComponentUpdate=function(e,t){var r=this.state.pages,n=t.pages,a=!1;if(!t.isScrolling&&this.state.isScrolling)return!0;if(e.version!==this.props.version)return!0;if(e.items===this.props.items&&r.length===n.length)for(var i=0;i<r.length;i++){var o=r[i],s=n[i];if(o.key!==s.key||o.itemCount!==s.itemCount){a=!0;break}}else a=!0;return a},t.prototype.forceUpdate=function(){this._invalidatePageCache(),this._updateRenderRects(this.props,!0),this._updatePages(),this._measureVersion++,e.prototype.forceUpdate.call(this)},t.prototype.getTotalListHeight=function(){return this._surfaceRect.height},t.prototype.render=function(){for(var e=this.props,t=e.className,r=e.role,a=void 0===r?"list":r,i=this.state.pages,o=void 0===i?[]:i,s=[],l=Object(z.d)(this.props,z.c),c=0,u=o;c<u.length;c++){var d=u[c];s.push(this._renderPage(d))}return n.createElement("div",Object(L.a)({ref:this._root},l,{role:s.length>0?a:void 0,className:Object(Ee.a)("ms-List",t)}),n.createElement("div",{ref:this._surface,className:"ms-List-surface",role:"presentation"},s))},t.prototype._shouldVirtualize=function(e){void 0===e&&(e=this.props);var t=e.onShouldVirtualize;return!t||t(e)},t.prototype._invalidatePageCache=function(){this._pageCache={}},t.prototype._renderPage=function(e){var t,r=this.props.usePageCache;if(r&&(t=this._pageCache[e.key])&&t.pageElement)return t.pageElement;var n=this._getPageStyle(e),a=this.props.onRenderPage,i=(void 0===a?this._onRenderPage:a)({page:e,className:"ms-List-page",key:e.key,ref:e.key,style:n,role:"presentation"},this._onRenderPage);return r&&0===e.startIndex&&(this._pageCache[e.key]={page:e,pageElement:i}),i},t.prototype._getPageStyle=function(e){var t=this.props.getPageStyle;return Object(L.a)(Object(L.a)({},t?t(e):{}),e.items?{}:{height:e.height})},t.prototype._onFocus=function(e){for(var t=e.target;t!==this._surface.current;){var r=t.getAttribute("data-list-index");if(r){this._focusedIndex=Number(r);break}t=Object(kt.a)(t)}},t.prototype._onScroll=function(){this.state.isScrolling||this.setState({isScrolling:!0}),this._resetRequiredWindows(),this._onScrollingDone()},t.prototype._resetRequiredWindows=function(){this._requiredWindowsAhead=0,this._requiredWindowsBehind=0},t.prototype._onAsyncScroll=function(){var e,t;this._updateRenderRects(),this._materializedRect&&(e=this._requiredRect,t=this._materializedRect,e.top>=t.top&&e.left>=t.left&&e.bottom<=t.bottom&&e.right<=t.right)||this._updatePages()},t.prototype._onAsyncIdle=function(){var e=this.props,t=e.renderedWindowsAhead,r=e.renderedWindowsBehind,n=this._requiredWindowsAhead,a=this._requiredWindowsBehind,i=Math.min(t,n+1),o=Math.min(r,a+1);i===n&&o===a||(this._requiredWindowsAhead=i,this._requiredWindowsBehind=o,this._updateRenderRects(),this._updatePages()),(t>i||r>o)&&this._onAsyncIdle()},t.prototype._onScrollingDone=function(){this.setState({isScrolling:!1})},t.prototype._onAsyncResize=function(){this.forceUpdate()},t.prototype._updatePages=function(e){var t=this;void 0===e&&(e=this.props),this._requiredRect||this._updateRenderRects(e);var r=this._buildPages(e),n=this.state.pages;this._notifyPageChanges(n,r.pages),this.setState(r,(function(){var e=t.props,r=t.state;e.getPageHeight?t._onAsyncIdle():t._updatePageMeasurements(r.pages)?(t._materializedRect=null,t._hasCompletedFirstRender?t._onAsyncScroll():(t._hasCompletedFirstRender=!0,t._updatePages(e))):t._onAsyncIdle();e.onPagesUpdated&&e.onPagesUpdated(r.pages)}))},t.prototype._notifyPageChanges=function(e,t,r){void 0===r&&(r=this.props);var n=r.onPageAdded,a=r.onPageRemoved;if(n||a){for(var i={},o=0,s=e;o<s.length;o++){(u=s[o]).items&&(i[u.startIndex]=u)}for(var l=0,c=t;l<c.length;l++){var u;(u=c[l]).items&&(i[u.startIndex]?delete i[u.startIndex]:this._onPageAdded(u))}for(var d in i)i.hasOwnProperty(d)&&this._onPageRemoved(i[d])}},t.prototype._updatePageMeasurements=function(e){var t=!1;if(!this._shouldVirtualize())return t;for(var r=0;r<e.length;r++){var n=e[r];n.items&&(t=this._measurePage(n)||t)}return t},t.prototype._measurePage=function(e){var t=!1,r=this.refs[e.key],n=this._cachedPageHeights[e.startIndex];if(r&&this._shouldVirtualize()&&(!n||n.measureVersion!==this._measureVersion)){var a={width:r.clientWidth,height:r.clientHeight};(a.height||a.width)&&(t=e.height!==a.height,e.height=a.height,this._cachedPageHeights[e.startIndex]={height:a.height,measureVersion:this._measureVersion},this._estimatedPageHeight=Math.round((this._estimatedPageHeight*this._totalEstimates+a.height)/(this._totalEstimates+1)),this._totalEstimates++)}return t},t.prototype._onPageAdded=function(e){var t=this.props.onPageAdded;t&&t(e)},t.prototype._onPageRemoved=function(e){var t=this.props.onPageRemoved;t&&t(e)},t.prototype._buildPages=function(e){var t=e.renderCount,r=e.items,n=e.startIndex,a=e.getPageHeight;t=this._getRenderCount(e);for(var i=Object(L.a)({},ar),o=[],s=1,l=0,c=null,u=this._focusedIndex,d=n+t,p=this._shouldVirtualize(e),h=0===this._estimatedPageHeight&&!a,f=this._allowedRect,m=function(e){var t=g._getPageSpecification(e,f),a=t.height,m=t.data,v=t.key;s=t.itemCount;var y,b,_=l+a-1,x=Object(Kt.d)(g.state.pages,(function(t){return!!t.items&&t.startIndex===e}))>-1,w=!f||_>=f.top&&l<=f.bottom,k=!g._requiredRect||_>=g._requiredRect.top&&l<=g._requiredRect.bottom;if(!h&&(k||w&&x)||!p||u>=e&&u<e+s||e===n){c&&(o.push(c),c=null);var M=Math.min(s,d-e),T=g._createPage(v,r.slice(e,e+M),e,void 0,void 0,m);T.top=l,T.height=a,g._visibleRect&&g._visibleRect.bottom&&(T.isVisible=_>=g._visibleRect.top&&l<=g._visibleRect.bottom),o.push(T),k&&g._allowedRect&&(y=i,b={top:l,bottom:_,height:a,left:f.left,right:f.right,width:f.width},y.top=b.top<y.top||-1===y.top?b.top:y.top,y.left=b.left<y.left||-1===y.left?b.left:y.left,y.bottom=b.bottom>y.bottom||-1===y.bottom?b.bottom:y.bottom,y.right=b.right>y.right||-1===y.right?b.right:y.right,y.width=y.right-y.left+1,y.height=y.bottom-y.top+1)}else c||(c=g._createPage("spacer-"+e,void 0,e,0,void 0,m,!0)),c.height=(c.height||0)+(_-l)+1,c.itemCount+=s;if(l+=_-l+1,h&&p)return"break"},g=this,v=n;v<d;v+=s){if("break"===m(v))break}return c&&(c.key="spacer-end",o.push(c)),this._materializedRect=i,{pages:o,measureVersion:this._measureVersion}},t.prototype._getPageSpecification=function(e,t){var r=this.props.getPageSpecification;if(r){var n=r(e,t),a=n.itemCount,i=void 0===a?this._getItemCountForPage(e,t):a,o=n.height;return{itemCount:i,height:void 0===o?this._getPageHeight(e,t,i):o,data:n.data,key:n.key}}return{itemCount:i=this._getItemCountForPage(e,t),height:this._getPageHeight(e,t,i)}},t.prototype._getPageHeight=function(e,t,r){if(this.props.getPageHeight)return this.props.getPageHeight(e,t,r);var n=this._cachedPageHeights[e];return n?n.height:this._estimatedPageHeight||30},t.prototype._getItemCountForPage=function(e,t){var r=this.props.getItemCountForPage?this.props.getItemCountForPage(e,t):10;return r||10},t.prototype._createPage=function(e,t,r,n,a,i,o){void 0===r&&(r=-1),void 0===n&&(n=t?t.length:0),void 0===a&&(a={}),e=e||"page-"+r;var s=this._pageCache[e];return s&&s.page?s.page:{key:e,startIndex:r,itemCount:n,items:t,style:a,top:0,height:0,data:i,isSpacer:o||!1}},t.prototype._getRenderCount=function(e){var t=e||this.props,r=t.items,n=t.startIndex,a=t.renderCount;return void 0===a?r?r.length-n:0:a},t.prototype._updateRenderRects=function(e,t){var r=(e=e||this.props).renderedWindowsAhead,n=e.renderedWindowsBehind,a=this.state.pages;if(this._shouldVirtualize(e)){var i=this._surfaceRect||Object(L.a)({},ar),o=this._scrollElement&&this._scrollElement.scrollHeight,s=this._scrollElement?this._scrollElement.scrollTop:0;this._surface.current&&(t||!a||!this._surfaceRect||!o||o!==this._scrollHeight||Math.abs(this._scrollTop-s)>this._estimatedPageHeight/3)&&(i=this._surfaceRect=or(this._surface.current),this._scrollTop=s),!t&&o&&o===this._scrollHeight||this._measureVersion++,this._scrollHeight=o;var l=Math.max(0,-i.top),c=Object(Mt.a)(this._root.current),u={top:l,left:i.left,bottom:l+c.innerHeight,right:i.right,width:i.width,height:c.innerHeight};this._requiredRect=cr(u,this._requiredWindowsBehind,this._requiredWindowsAhead),this._allowedRect=cr(u,n,r),this._visibleRect=u}},t.defaultProps={startIndex:0,onRenderCell:function(e,t,r){return n.createElement(n.Fragment,null,e&&e.name||"")},renderedWindowsAhead:2,renderedWindowsBehind:2},t}(n.Component);function cr(e,t,r){var n=e.top-t*e.height,a=e.height+(t+r)*e.height;return{top:n,bottom:n+a,height:a,left:e.left,right:e.right,width:e.width}}var ur=function(e){function t(r){var a=e.call(this,r)||this;a._root=n.createRef(),a._list=n.createRef(),a._onRenderGroupHeader=function(e){return n.createElement(Yt,Object(L.a)({},e))},a._onRenderGroupShowAll=function(e){return n.createElement(Ut,Object(L.a)({},e))},a._onRenderGroupFooter=function(e){return n.createElement(qt,Object(L.a)({},e))},a._renderSubGroup=function(e,r){var i=a.props,o=i.dragDropEvents,s=i.dragDropHelper,l=i.eventsToRegister,c=i.getGroupItemLimit,u=i.groupNestingDepth,d=i.groupProps,p=i.items,h=i.headerProps,f=i.showAllProps,m=i.footerProps,g=i.listProps,v=i.onRenderCell,y=i.selection,b=i.selectionMode,_=i.viewport,x=i.onRenderGroupHeader,w=i.onRenderGroupShowAll,k=i.onRenderGroupFooter,M=i.onShouldVirtualize,T=i.group,C=i.compact,S=e.level?e.level+1:u;return!e||e.count>0||d&&d.showEmptyGroups?n.createElement(t,{ref:"subGroup_"+r,key:a._getGroupKey(e,r),dragDropEvents:o,dragDropHelper:s,eventsToRegister:l,footerProps:m,getGroupItemLimit:c,group:e,groupIndex:r,groupNestingDepth:S,groupProps:d,headerProps:h,items:p,listProps:g,onRenderCell:v,selection:y,selectionMode:b,showAllProps:f,viewport:_,onRenderGroupHeader:x,onRenderGroupShowAll:w,onRenderGroupFooter:k,onShouldVirtualize:M,groups:T.children,compact:C}):null},a._getGroupDragDropOptions=function(){var e=a.props,t=e.group,r=e.groupIndex,n=e.dragDropEvents;return{eventMap:e.eventsToRegister,selectionIndex:-1,context:{data:t,index:r,isGroup:!0},canDrag:n.canDragGroups?function(){return n.canDragGroups}:function(){return!1},canDrop:n.canDrop,updateDropState:a._updateDroppingState,onDrop:n.canDragGroups?n.onDrop:void 0,onDragStart:n.canDragGroups?n.onDragStart:void 0,onDragEnter:n.canDragGroups?n.onDragEnter:void 0,onDragLeave:n.canDragGroups?n.onDragLeave:void 0,onDragEnd:n.canDragGroups?n.onDragEnd:void 0}},a._updateDroppingState=function(e,t){var r=a.state.isDropping,n=a.props.dragDropEvents;r?n&&n.onDragEnter&&n.onDragEnter(t,void 0):n&&n.onDragLeave&&n.onDragLeave(t,void 0),r!==e&&a.setState({isDropping:e})};var i=r.selection,o=r.group;return Object(O.a)(a),a._id=Object(E.a)("GroupedListSection"),a.state={isDropping:!1,isSelected:!(!i||!o)&&i.isRangeSelected(o.startIndex,o.count)},a._events=new J.a(a),a}return Object(L.c)(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.dragDropHelper,r=e.selection;t&&this._root.current&&(this._dragDropSubscription=t.subscribe(this._root.current,this._events,this._getGroupDragDropOptions())),r&&this._events.on(r,"change",this._onSelectionChange)},t.prototype.componentWillUnmount=function(){this._events.dispose(),this._dragDropSubscription&&this._dragDropSubscription.dispose()},t.prototype.componentDidUpdate=function(e){this.props.group===e.group&&this.props.groupIndex===e.groupIndex&&this.props.dragDropHelper===e.dragDropHelper||(this._dragDropSubscription&&(this._dragDropSubscription.dispose(),delete this._dragDropSubscription),this.props.dragDropHelper&&this._root.current&&(this._dragDropSubscription=this.props.dragDropHelper.subscribe(this._root.current,this._events,this._getGroupDragDropOptions())))},t.prototype.render=function(){var e=this.props,t=e.getGroupItemLimit,r=e.group,a=e.groupIndex,i=e.headerProps,o=e.showAllProps,s=e.footerProps,l=e.viewport,c=e.selectionMode,u=e.onRenderGroupHeader,d=void 0===u?this._onRenderGroupHeader:u,p=e.onRenderGroupShowAll,h=void 0===p?this._onRenderGroupShowAll:p,f=e.onRenderGroupFooter,m=void 0===f?this._onRenderGroupFooter:f,g=e.onShouldVirtualize,v=e.groupedListClassNames,y=e.groups,b=e.compact,_=e.listProps,x=void 0===_?{}:_,w=this.state.isSelected,k=r&&t?t(r):1/0,M=r&&!r.children&&!r.isCollapsed&&!r.isShowingAll&&(r.count>k||r.hasMoreData),T=r&&r.children&&r.children.length>0,C=x.version,S={group:r,groupIndex:a,groupLevel:r?r.level:0,isSelected:w,selected:w,viewport:l,selectionMode:c,groups:y,compact:b},A={groupedListId:this._id},E=Object(L.a)(Object(L.a)(Object(L.a)({},i),S),A),D=Object(L.a)(Object(L.a)({},o),S),I=Object(L.a)(Object(L.a)({},s),S);return n.createElement("div",{ref:this._root,className:Object(Ee.a)(v&&v.group,this._getDroppingClassName()),role:"presentation"},d(E,this._onRenderGroupHeader),r&&r.isCollapsed?null:T?n.createElement(lr,{role:"presentation",ref:this._list,items:r.children,onRenderCell:this._renderSubGroup,getItemCountForPage:this._returnOne,onShouldVirtualize:g,version:C,id:this._id}):this._onRenderGroup(k),r&&r.isCollapsed?null:M&&h(D,this._onRenderGroupShowAll),m(I,this._onRenderGroupFooter))},t.prototype.forceUpdate=function(){e.prototype.forceUpdate.call(this),this.forceListUpdate()},t.prototype.forceListUpdate=function(){var e=this.props.group;if(this._list.current){if(this._list.current.forceUpdate(),e&&e.children&&e.children.length>0)for(var t=e.children.length,r=0;r<t;r++){var n;(n=this._list.current.refs["subGroup_"+String(r)])&&n.forceListUpdate()}}else(n=this.refs["subGroup_"+String(0)])&&n.forceListUpdate()},t.prototype._onSelectionChange=function(){var e=this.props,t=e.group,r=e.selection.isRangeSelected(t.startIndex,t.count);r!==this.state.isSelected&&this.setState({isSelected:r})},t.prototype._onRenderGroupCell=function(e,t){return function(r,n){return e(t,r,n)}},t.prototype._onRenderGroup=function(e){var t=this.props,r=t.group,a=t.items,i=t.onRenderCell,o=t.listProps,s=t.groupNestingDepth,l=t.onShouldVirtualize,c=t.groupProps,u=r&&!r.isShowingAll?r.count:a.length,d=r?r.startIndex:0;return n.createElement(lr,Object(L.a)({role:c&&c.role?c.role:"grid",items:a,onRenderCell:this._onRenderGroupCell(i,s),ref:this._list,renderCount:Math.min(u,e),startIndex:d,onShouldVirtualize:l,id:this._id},o))},t.prototype._returnOne=function(){return 1},t.prototype._getGroupKey=function(e,t){return"group-"+(e&&e.key?e.key:String(e.level)+String(t))},t.prototype._getDroppingClassName=function(){var e=this.state.isDropping,t=this.props,r=t.group,n=t.groupedListClassNames;return e=!(!r||!e),Object(Ee.a)(e&&"is-dropping",e&&n&&n.groupIsDropping)},t}(n.Component),dr=Object(A.a)(),pr=Ve.rowHeight,hr=Ve.compactRowHeight,fr=function(e){function t(t){var r=e.call(this,t)||this;return r._list=n.createRef(),r._renderGroup=function(e,t){var a=r.props,i=a.dragDropEvents,o=a.dragDropHelper,s=a.eventsToRegister,l=a.groupProps,c=a.items,u=a.listProps,d=a.onRenderCell,p=a.selectionMode,h=a.selection,f=a.viewport,m=a.onShouldVirtualize,g=a.groups,v=a.compact,y={onToggleSelectGroup:r._onToggleSelectGroup,onToggleCollapse:r._onToggleCollapse,onToggleSummarize:r._onToggleSummarize},b=Object(L.a)(Object(L.a)({},l.headerProps),y),_=Object(L.a)(Object(L.a)({},l.showAllProps),y),x=Object(L.a)(Object(L.a)({},l.footerProps),y),w=r._getGroupNestingDepth();return!l.showEmptyGroups&&e&&0===e.count?null:n.createElement(ur,{ref:"group_"+t,key:r._getGroupKey(e,t),dragDropEvents:i,dragDropHelper:o,eventsToRegister:s,footerProps:x,getGroupItemLimit:l&&l.getGroupItemLimit,group:e,groupIndex:t,groupNestingDepth:w,groupProps:l,headerProps:b,listProps:u,items:c,onRenderCell:d,onRenderGroupHeader:l.onRenderHeader,onRenderGroupShowAll:l.onRenderShowAll,onRenderGroupFooter:l.onRenderFooter,selectionMode:p,selection:h,showAllProps:_,viewport:f,onShouldVirtualize:m,groupedListClassNames:r._classNames,groups:g,compact:v})},r._getDefaultGroupItemLimit=function(e){return e.count},r._getGroupItemLimit=function(e){var t=r.props.groupProps;return(t&&t.getGroupItemLimit?t.getGroupItemLimit:r._getDefaultGroupItemLimit)(e)},r._getGroupHeight=function(e){var t=r.props.compact?hr:pr;return t+(e.isCollapsed?0:t*r._getGroupItemLimit(e))},r._getPageHeight=function(e){var t=r.state.groups,n=r.props.getGroupHeight,a=void 0===n?r._getGroupHeight:n,i=t&&t[e];return i?a(i,e):0},r._onToggleCollapse=function(e){var t=r.props.groupProps,n=t&&t.headerProps&&t.headerProps.onToggleCollapse;e&&(n&&n(e),e.isCollapsed=!e.isCollapsed,r._updateIsSomeGroupExpanded(),r.forceUpdate())},r._onToggleSelectGroup=function(e){e&&r.props.selection.toggleRangeSelected(e.startIndex,e.count)},r._onToggleSummarize=function(e){var t=r.props.groupProps,n=t&&t.showAllProps&&t.showAllProps.onToggleSummarize;n?n(e):(e&&(e.isShowingAll=!e.isShowingAll),r.forceUpdate())},r._getPageSpecification=function(e){var t=r.state.groups,n=t&&t[e];return{key:n&&n.key}},Object(O.a)(r),Object(Ce.a)(),r._isSomeGroupExpanded=r._computeIsSomeGroupExpanded(t.groups),r.state={lastWidth:0,groups:t.groups},r}return Object(L.c)(t,e),t.prototype.scrollToIndex=function(e,t,r){this._list.current&&this._list.current.scrollToIndex(e,t,r)},t.prototype.getStartItemIndexInView=function(){return this._list.current.getStartItemIndexInView()||0},t.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=this.props,r=t.groups,n=t.selectionMode,a=t.compact,i=!1;e.groups!==r&&(this.setState({groups:e.groups}),i=!0),e.selectionMode===n&&e.compact===a||(i=!0),i&&this._forceListUpdates()},t.prototype.componentDidMount=function(){var e=this.props,t=e.groupProps,r=e.groups,n=void 0===r?[]:r;t&&t.isAllGroupsCollapsed&&this._setGroupsCollapsedState(n,t.isAllGroupsCollapsed)},t.prototype.render=function(){var e=this.props,t=e.className,r=e.usePageCache,a=e.onShouldVirtualize,i=e.theme,o=e.styles,s=e.compact,l=e.listProps,c=void 0===l?{}:l,u=this.state.groups;this._classNames=dr(o,{theme:i,className:t,compact:s});var d=c.version;return n.createElement("div",{className:this._classNames.root,"data-automationid":"GroupedList","data-is-scrollable":"false",role:"presentation"},u?n.createElement(lr,{ref:this._list,role:"presentation",items:u,onRenderCell:this._renderGroup,getItemCountForPage:this._returnOne,getPageHeight:this._getPageHeight,getPageSpecification:this._getPageSpecification,usePageCache:r,onShouldVirtualize:a,version:d}):this._renderGroup(void 0,0))},t.prototype.forceUpdate=function(){e.prototype.forceUpdate.call(this),this._forceListUpdates()},t.prototype.toggleCollapseAll=function(e){var t=this.state.groups,r=void 0===t?[]:t,n=this.props.groupProps,a=n&&n.onToggleCollapseAll;r.length>0&&(a&&a(e),this._setGroupsCollapsedState(r,e),this._updateIsSomeGroupExpanded(),this.forceUpdate())},t.prototype._setGroupsCollapsedState=function(e,t){for(var r=0;r<e.length;r++)e[r].isCollapsed=t},t.prototype._returnOne=function(){return 1},t.prototype._getGroupKey=function(e,t){return"group-"+(e&&e.key?e.key:String(t))},t.prototype._getGroupNestingDepth=function(){for(var e=0,t=this.state.groups;t&&t.length>0;)e++,t=t[0].children;return e},t.prototype._forceListUpdates=function(e){var t=(e=e||this.state.groups)?e.length:1;if(this._list.current){this._list.current.forceUpdate();for(var r=0;r<t;r++){(n=this._list.current.refs["group_"+String(r)])&&n.forceListUpdate()}}else{var n;(n=this.refs["group_"+String(0)])&&n.forceListUpdate()}},t.prototype._computeIsSomeGroupExpanded=function(e){var t=this;return!(!e||!e.some((function(e){return e.children?t._computeIsSomeGroupExpanded(e.children):!e.isCollapsed})))},t.prototype._updateIsSomeGroupExpanded=function(){var e=this.state.groups,t=this.props.onGroupExpandStateChanged,r=this._computeIsSomeGroupExpanded(e);this._isSomeGroupExpanded!==r&&(t&&t(r),this._isSomeGroupExpanded=r)},t.defaultProps={selectionMode:ie.multiple,isHeaderVisible:!0,groupProps:{},compact:!1},t}(n.Component),mr=Object(S.a)(fr,(function(e){var t,r,n=e.theme,a=e.className,i=e.compact,o=n.palette,s=Object(v.v)(It,n);return{root:[s.root,n.fonts.small,{position:"relative",selectors:(t={},t["."+s.listCell]={minHeight:38},t)},i&&[s.compact,{selectors:(r={},r["."+s.listCell]={minHeight:32},r)}],a],group:[s.group,{transition:"background-color "+v.c.durationValue2+" "+Pt}],groupIsDropping:{backgroundColor:o.neutralLight}}}),void 0,{scope:"GroupedList"}),gr=r(84);function vr(e){var t;return e&&(e===window?t={left:0,top:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:e.getBoundingClientRect&&(t=e.getBoundingClientRect())),t}var yr=500,br=3;function _r(e){return function(t){function r(e){var r=t.call(this,e)||this;return r._root=n.createRef(),r._registerResizeObserver=function(){var e=Object(Mt.a)(r._root.current);r._viewportResizeObserver=new e.ResizeObserver(r._onAsyncResize),r._viewportResizeObserver.observe(r._root.current)},r._unregisterResizeObserver=function(){r._viewportResizeObserver&&(r._viewportResizeObserver.disconnect(),r._viewportResizeObserver=null)},r._updateViewport=function(e){var t=r.state.viewport,n=r._root.current,a=vr(Object(Tt.e)(n)),i=vr(n);((i&&i.width)!==t.width||(a&&a.height)!==t.height)&&r._resizeAttempts<br&&i&&a?(r._resizeAttempts++,r.setState({viewport:{width:i.width,height:a.height}},(function(){r._updateViewport(e)}))):(r._resizeAttempts=0,e&&r._composedComponentInstance&&r._composedComponentInstance.forceUpdate())},r._resizeAttempts=0,r.state={viewport:{width:0,height:0}},r}return Object(L.c)(r,t),r.prototype.componentDidMount=function(){var e=this.props.skipViewportMeasures,t=Object(Mt.a)(this._root.current);this._onAsyncResize=this._async.debounce(this._onAsyncResize,yr,{leading:!1}),!e&&this._isResizeObserverAvailable()?this._registerResizeObserver():this._events.on(t,"resize",this._onAsyncResize),e||this._updateViewport()},r.prototype.componentDidUpdate=function(e){var t=this.props.skipViewportMeasures,r=e.skipViewportMeasures,n=Object(Mt.a)(this._root.current);t!==r&&(r?(this._unregisterResizeObserver(),this._events.on(n,"resize",this._onAsyncResize)):!r&&this._isResizeObserverAvailable()&&(this._events.off(n,"resize",this._onAsyncResize),this._registerResizeObserver())),r&&this._updateViewport()},r.prototype.componentWillUnmount=function(){this._events.dispose(),this._viewportResizeObserver&&this._viewportResizeObserver.disconnect()},r.prototype.render=function(){var t=this.state.viewport,r=t.width>0&&t.height>0?t:void 0;return n.createElement("div",{className:"ms-Viewport",ref:this._root,style:{minWidth:1,minHeight:1}},n.createElement(e,Object(L.a)({ref:this._updateComposedComponentRef,viewport:r},this.props)))},r.prototype.forceUpdate=function(){this._updateViewport(!0)},r.prototype._onAsyncResize=function(){this._updateViewport()},r.prototype._isResizeObserverAvailable=function(){var e=Object(Mt.a)(this._root.current);return e&&e.ResizeObserver},r}(gr.a)}var xr=Object(A.a)(),wr=100,kr=function(e){function t(t){var r=e.call(this,t)||this;return r._root=n.createRef(),r._header=n.createRef(),r._groupedList=n.createRef(),r._list=n.createRef(),r._focusZone=n.createRef(),r._selectionZone=n.createRef(),r._sumColumnWidths=Object(Te.b)((function(e){var t=0;return e.forEach((function(e){return t+=e.calculatedWidth||e.minWidth})),t})),r._onRenderRow=function(e,t){return n.createElement(wt,Object(L.a)({},e))},r._onRenderDetailsHeader=function(e,t){return n.createElement(vt,Object(L.a)({},e))},r._onRenderDetailsFooter=function(e,t){return null},r._onRenderListCell=function(e){return function(t,n){return r._onRenderCell(e,t,n)}},r._onRenderCell=function(e,t,n){var a=r.props,i=a.compact,o=a.dragDropEvents,s=a.rowElementEventMap,l=a.onRenderMissingItem,c=a.onRenderItemColumn,u=a.getCellValueKey,d=a.selectionMode,p=void 0===d?r._selection.mode:d,h=a.viewport,f=a.checkboxVisibility,m=a.getRowAriaLabel,g=a.getRowAriaDescribedBy,v=a.checkButtonAriaLabel,y=a.checkboxCellClassName,b=a.groupProps,_=a.useReducedRowRenderer,x=a.indentWidth,w=a.cellStyleProps,k=void 0===w?He:w,M=a.onRenderCheckbox,T=a.enableUpdateAnimations,C=a.useFastIcons,S=r.props.onRenderRow?Object(Ke.a)(r.props.onRenderRow,r._onRenderRow):r._onRenderRow,L=b&&b.collapseAllVisibility,A=r._selection,E=r._dragDropHelper,D=r.state.adjustedColumns,I={item:t,itemIndex:n,compact:i,columns:D,groupNestingDepth:e,selectionMode:p,selection:A,onDidMount:r._onRowDidMount,onWillUnmount:r._onRowWillUnmount,onRenderItemColumn:c,getCellValueKey:u,eventsToRegister:s,dragDropEvents:o,dragDropHelper:E,viewport:h,checkboxVisibility:f,collapseAllVisibility:L,getRowAriaLabel:m,getRowAriaDescribedBy:g,checkButtonAriaLabel:v,checkboxCellClassName:y,useReducedRowRenderer:_,indentWidth:x,cellStyleProps:k,onRenderDetailsCheckbox:M,enableUpdateAnimations:T,rowWidth:r._sumColumnWidths(D),useFastIcons:C};return t?S(I):l?l(n,I):null},r._onGroupExpandStateChanged=function(e){r.setState({isSomeGroupExpanded:e})},r._onColumnIsSizingChanged=function(e,t){r.setState({isSizing:t})},r._onHeaderKeyDown=function(e){e.which===P.a.down&&r._focusZone.current&&r._focusZone.current.focus()&&(0===r._selection.getSelectedIndices().length&&r._selection.setIndexSelected(0,!0,!1),e.preventDefault(),e.stopPropagation())},r._onContentKeyDown=function(e){e.which!==P.a.up||e.altKey||r._header.current&&r._header.current.focus()&&(e.preventDefault(),e.stopPropagation())},r._onRowDidMount=function(e){var t=e.props,n=t.item,a=t.itemIndex,i=r._getItemKey(n,a);r._activeRows[i]=e,r._setFocusToRowIfPending(e);var o=r.props.onRowDidMount;o&&o(n,a)},r._onRowWillUnmount=function(e){var t=r.props.onRowWillUnmount,n=e.props,a=n.item,i=n.itemIndex,o=r._getItemKey(a,i);delete r._activeRows[o],t&&t(a,i)},r._onToggleCollapse=function(e){r.setState({isCollapsed:e}),r._groupedList.current&&r._groupedList.current.toggleCollapseAll(e)},r._onColumnDragEnd=function(e,t){var n=r.props.columnReorderOptions,a=we.outside;if(n&&n.onDragEnd){if(e.dropLocation&&e.dropLocation!==we.header)a=e.dropLocation;else if(r._root.current){var i=r._root.current.getBoundingClientRect();t.clientX>i.left&&t.clientX<i.right&&t.clientY>i.top&&t.clientY<i.bottom&&(a=we.surface)}n.onDragEnd(a)}},r._onColumnResized=function(e,t,n){var a=Math.max(e.minWidth||wr,t);r.props.onColumnResize&&r.props.onColumnResize(e,a,n),r._rememberCalculatedWidth(e,a),r._adjustColumns(r.props,!0,n),r.setState({version:{}})},r._onColumnAutoResized=function(e,t){var n=0,a=0,i=Object.keys(r._activeRows).length;for(var o in r._activeRows){if(r._activeRows.hasOwnProperty(o))r._activeRows[o].measureCell(t,(function(o){n=Math.max(n,o),++a===i&&r._onColumnResized(e,n,t)}))}},r._onActiveRowChanged=function(e,t){var n=r.props,a=n.items,i=n.onActiveItemChanged;if(e&&e.getAttribute("data-item-index")){var o=Number(e.getAttribute("data-item-index"));o>=0&&(i&&i(a[o],o,t),r.setState({focusedItemIndex:o}))}},r._onBlur=function(e){r.setState({focusedItemIndex:-1})},r.isRightArrow=function(e){return e.which===Object(re.b)(P.a.right,r.props.theme)},Object(O.a)(r),Object(Ce.a)(),r._async=new R.a(r),r._activeRows={},r._columnOverrides={},r.state={focusedItemIndex:-1,lastWidth:0,adjustedColumns:r._getAdjustedColumns(t),isSizing:!1,isDropping:!1,isCollapsed:t.groupProps&&t.groupProps.isAllGroupsCollapsed,isSomeGroupExpanded:t.groupProps&&!t.groupProps.isAllGroupsCollapsed,version:{}},r._selection=t.selection||new ye({onSelectionChanged:void 0,getKey:t.getKey,selectionMode:t.selectionMode}),r.props.disableSelectionZone||r._selection.setItems(t.items,!1),r._dragDropHelper=t.dragDropEvents?new tt({selection:r._selection,minimumPixelsForDrag:t.minimumPixelsForDrag}):void 0,r._initialFocusedIndex=t.initialFocusedIndex,r}return Object(L.c)(t,e),t.prototype.scrollToIndex=function(e,t,r){this._list.current&&this._list.current.scrollToIndex(e,t,r),this._groupedList.current&&this._groupedList.current.scrollToIndex(e,t,r)},t.prototype.focusIndex=function(e,t,r,n){void 0===t&&(t=!1);var a=this.props.items[e];if(a){this.scrollToIndex(e,r,n);var i=this._getItemKey(a,e),o=this._activeRows[i];o&&this._setFocusToRow(o,t)}},t.prototype.getStartItemIndexInView=function(){return this._list&&this._list.current?this._list.current.getStartItemIndexInView():this._groupedList&&this._groupedList.current?this._groupedList.current.getStartItemIndexInView():0},t.prototype.componentWillUnmount=function(){this._dragDropHelper&&this._dragDropHelper.dispose(),this._async.dispose()},t.prototype.componentDidUpdate=function(e,t){if(void 0!==this._initialFocusedIndex&&(i=this.props.items[this._initialFocusedIndex])){var r=this._getItemKey(i,this._initialFocusedIndex);(n=this._activeRows[r])&&this._setFocusToRowIfPending(n)}if(this.props.items!==e.items&&this.props.items.length>0&&-1!==this.state.focusedItemIndex&&!Object(Se.a)(this._root.current,document.activeElement,!1)){var n,a=this.state.focusedItemIndex<this.props.items.length?this.state.focusedItemIndex:this.props.items.length-1,i=this.props.items[a];r=this._getItemKey(i,this.state.focusedItemIndex);(n=this._activeRows[r])?this._setFocusToRow(n):this._initialFocusedIndex=a}this.props.onDidUpdate&&this.props.onDidUpdate(this)},t.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=this.props,r=t.checkboxVisibility,n=t.items,a=t.setKey,i=t.selectionMode,o=void 0===i?this._selection.mode:i,s=t.columns,l=t.viewport,c=t.compact,u=t.dragDropEvents,d=(this.props.groupProps||{}).isAllGroupsCollapsed,p=void 0===d?void 0:d,h=e.viewport&&e.viewport.width||0,f=l&&l.width||0,m=e.setKey!==a||void 0===e.setKey,g=!1;e.layoutMode!==this.props.layoutMode&&(g=!0),m&&(this._initialFocusedIndex=e.initialFocusedIndex,this.setState({focusedItemIndex:void 0!==this._initialFocusedIndex?this._initialFocusedIndex:-1})),this.props.disableSelectionZone||e.items===n||this._selection.setItems(e.items,m),e.checkboxVisibility===r&&e.columns===s&&h===f&&e.compact===c||(g=!0),this._adjustColumns(e,!0),e.selectionMode!==o&&(g=!0),void 0===p&&e.groupProps&&void 0!==e.groupProps.isAllGroupsCollapsed&&this.setState({isCollapsed:e.groupProps.isAllGroupsCollapsed,isSomeGroupExpanded:!e.groupProps.isAllGroupsCollapsed}),e.dragDropEvents!==u&&(this._dragDropHelper&&this._dragDropHelper.dispose(),this._dragDropHelper=e.dragDropEvents?new tt({selection:this._selection,minimumPixelsForDrag:e.minimumPixelsForDrag}):void 0,g=!0),g&&this.setState({version:{}})},t.prototype.render=function(){var e=this.props,t=e.ariaLabelForListHeader,r=e.ariaLabelForSelectAllCheckbox,a=e.ariaLabelForSelectionColumn,i=e.className,o=e.checkboxVisibility,s=e.compact,l=e.constrainMode,c=e.dragDropEvents,u=e.groups,d=e.groupProps,p=e.indentWidth,h=e.items,f=e.isPlaceholderData,m=e.isHeaderVisible,g=e.layoutMode,v=e.onItemInvoked,y=e.onItemContextMenu,b=e.onColumnHeaderClick,_=e.onColumnHeaderContextMenu,x=e.selectionMode,w=void 0===x?this._selection.mode:x,k=e.selectionPreservedOnEmptyClick,M=e.selectionZoneProps,T=e.ariaLabel,C=e.ariaLabelForGrid,S=e.rowElementEventMap,A=e.shouldApplyApplicationRole,E=void 0!==A&&A,D=e.getKey,I=e.listProps,P=e.usePageCache,O=e.onShouldVirtualize,R=e.viewport,F=e.minimumPixelsForDrag,z=e.getGroupHeight,N=e.styles,j=e.theme,B=e.cellStyleProps,Y=void 0===B?He:B,H=e.onRenderCheckbox,V=e.useFastIcons,U=this.state,W=U.adjustedColumns,G=U.isCollapsed,q=U.isSizing,K=U.isSomeGroupExpanded,X=this._selection,Z=this._dragDropHelper,J=this._getGroupNestingDepth(),$=Object(L.a)({renderedWindowsAhead:q?0:2,renderedWindowsBehind:q?0:2,getKey:D,version:this.state.version},I),Q=$e.none;if(w===ie.single&&(Q=$e.hidden),w===ie.multiple){var ee=d&&d.headerProps&&d.headerProps.isCollapsedGroupSelectVisible;void 0===ee&&(ee=!0),Q=ee||!u||K?$e.visible:$e.hidden}o===Me.hidden&&(Q=$e.none);var te=this.props,re=te.onRenderDetailsHeader,ne=void 0===re?this._onRenderDetailsHeader:re,ae=te.onRenderDetailsFooter,oe=void 0===ae?this._onRenderDetailsFooter:ae,se=this._getDetailsFooterProps(),le=this._getColumnReorderProps(),ce=(m?1:0)+function(e){var t=0;if(e)for(var r=Object(L.e)(e),n=void 0;r&&r.length>0;)++t,(n=r.pop())&&n.children&&r.push.apply(r,n.children);return t}(u)+(h?h.length:0),ue=xr(N,{theme:j,compact:s,isFixed:g===ke.fixedColumns,isHorizontalConstrained:l===xe.horizontalConstrained,className:i}),de=u?n.createElement(mr,{componentRef:this._groupedList,groups:u,groupProps:d?this._getGroupProps(d):void 0,items:h,onRenderCell:this._onRenderCell,selection:X,selectionMode:o!==Me.hidden?w:ie.none,dragDropEvents:c,dragDropHelper:Z,eventsToRegister:S,listProps:$,onGroupExpandStateChanged:this._onGroupExpandStateChanged,usePageCache:P,onShouldVirtualize:O,getGroupHeight:z,compact:s}):n.createElement(lr,Object(L.a)({ref:this._list,role:"presentation",items:h,onRenderCell:this._onRenderListCell(0),usePageCache:P,onShouldVirtualize:O},$));return n.createElement("div",Object(L.a)({ref:this._root,className:ue.root,"data-automationid":"DetailsList","data-is-scrollable":"false","aria-label":T},E?{role:"application"}:{}),n.createElement("div",{role:"grid","aria-label":C,"aria-rowcount":f?-1:ce,"aria-colcount":(Q!==$e.none?1:0)+(W?W.length:0),"aria-readonly":"true"},n.createElement("div",{onKeyDown:this._onHeaderKeyDown,role:"presentation",className:ue.headerWrapper},m&&ne({componentRef:this._header,selectionMode:w,layoutMode:g,selection:X,columns:W,onColumnClick:b,onColumnContextMenu:_,onColumnResized:this._onColumnResized,onColumnIsSizingChanged:this._onColumnIsSizingChanged,onColumnAutoResized:this._onColumnAutoResized,groupNestingDepth:J,isAllCollapsed:G,onToggleCollapseAll:this._onToggleCollapse,ariaLabel:t,ariaLabelForSelectAllCheckbox:r,ariaLabelForSelectionColumn:a,selectAllVisibility:Q,collapseAllVisibility:d&&d.collapseAllVisibility,viewport:R,columnReorderProps:le,minimumPixelsForDrag:F,cellStyleProps:Y,checkboxVisibility:o,indentWidth:p,onRenderDetailsCheckbox:H,rowWidth:this._sumColumnWidths(this.state.adjustedColumns),useFastIcons:V},this._onRenderDetailsHeader)),n.createElement("div",{onKeyDown:this._onContentKeyDown,role:"presentation",className:ue.contentWrapper},n.createElement(De.a,{componentRef:this._focusZone,className:ue.focusZone,direction:Ie.a.vertical,isInnerZoneKeystroke:this.isRightArrow,onActiveElementChanged:this._onActiveRowChanged,onBlur:this._onBlur},this.props.disableSelectionZone?de:n.createElement(Dt,Object(L.a)({ref:this._selectionZone,selection:X,selectionPreservedOnEmptyClick:k,selectionMode:w,onItemInvoked:v,onItemContextMenu:y,enterModalOnTouch:this.props.enterModalSelectionOnTouch},M||{}),de))),oe(Object(L.a)({},se),this._onRenderDetailsFooter)))},t.prototype.forceUpdate=function(){e.prototype.forceUpdate.call(this),this._forceListUpdates()},t.prototype._getGroupNestingDepth=function(){for(var e=0,t=this.props.groups;t&&t.length>0;)e++,t=t[0].children;return e},t.prototype._setFocusToRowIfPending=function(e){var t=e.props.itemIndex;void 0!==this._initialFocusedIndex&&t===this._initialFocusedIndex&&(this._setFocusToRow(e),delete this._initialFocusedIndex)},t.prototype._setFocusToRow=function(e,t){void 0===t&&(t=!1),this._selectionZone.current&&this._selectionZone.current.ignoreNextFocus(),this._async.setTimeout((function(){e.focus(t)}),0)},t.prototype._forceListUpdates=function(){this._groupedList.current&&this._groupedList.current.forceUpdate(),this._list.current&&this._list.current.forceUpdate()},t.prototype._notifyColumnsResized=function(){this.state.adjustedColumns.forEach((function(e){e.onColumnResize&&e.onColumnResize(e.currentWidth)}))},t.prototype._adjustColumns=function(e,t,r){var n=this._getAdjustedColumns(e,t,r),a=this.props.viewport,i=a&&a.width?a.width:0;n&&this.setState({adjustedColumns:n,lastWidth:i},this._notifyColumnsResized)},t.prototype._getAdjustedColumns=function(e,t,r){var n,a=this,i=e.items,o=e.layoutMode,s=e.selectionMode,l=e.viewport,c=l&&l.width?l.width:0,u=e.columns,d=this.props?this.props.columns:[],p=this.state?this.state.lastWidth:-1,h=this.state?this.state.lastSelectionMode:void 0;return t||p!==c||h!==s||d&&u!==d?(u=u||function(e,t,r,n,a,i,o){var s=[];if(e&&e.length){var l=e[0];for(var c in l)l.hasOwnProperty(c)&&s.push({key:c,name:c,fieldName:c,minWidth:wr,maxWidth:300,isCollapsable:!!s.length,isCollapsible:!!s.length,isMultiline:void 0!==o&&o,isSorted:n===c,isSortedDescending:!!a,isRowHeader:!1,columnActionsMode:_e.clickable,isResizable:t,onColumnClick:r,isGrouped:i===c})}return s}(i,!0),o===ke.fixedColumns?(n=this._getFixedColumns(u)).forEach((function(e){a._rememberCalculatedWidth(e,e.calculatedWidth)})):(n=void 0!==r?this._getJustifiedColumnsAfterResize(u,c,e,r):this._getJustifiedColumns(u,c,e,0)).forEach((function(e){a._getColumnOverride(e.key).currentWidth=e.calculatedWidth})),n):[]},t.prototype._getFixedColumns=function(e){var t=this;return e.map((function(e){var r=Object(L.a)(Object(L.a)({},e),t._columnOverrides[e.key]);return r.calculatedWidth||(r.calculatedWidth=r.maxWidth||r.minWidth||wr),r}))},t.prototype._getJustifiedColumnsAfterResize=function(e,t,r,n){var a=this,i=e.slice(0,n);i.forEach((function(e){return e.calculatedWidth=a._getColumnOverride(e.key).currentWidth}));var o=i.reduce((function(e,t,n){return e+Mr(t,0===n,r)}),0),s=e.slice(n),l=t-o;return Object(L.e)(i,this._getJustifiedColumns(s,l,r,n))},t.prototype._getJustifiedColumns=function(e,t,r,n){for(var a=this,i=r.selectionMode,o=void 0===i?this._selection.mode:i,s=r.checkboxVisibility,l=o!==ie.none&&s!==Me.hidden?48:0,c=36*this._getGroupNestingDepth(),u=0,d=t-(l+c),p=e.map((function(e,t){var i=Object(L.a)(Object(L.a)(Object(L.a)({},e),{calculatedWidth:e.minWidth||wr}),a._columnOverrides[e.key]);return u+=Mr(i,t+n===0,r),i})),h=p.length-1;h>0&&u>d;){var f=(y=p[h]).minWidth||wr,m=u-d;if(y.calculatedWidth-f>=m||!y.isCollapsable&&!y.isCollapsible){var g=y.calculatedWidth;y.calculatedWidth=Math.max(y.calculatedWidth-m,f),u-=g-y.calculatedWidth}else u-=Mr(y,!1,r),p.splice(h,1);h--}for(var v=0;v<p.length&&u<d;v++){var y=p[v],b=v===p.length-1,_=this._columnOverrides[y.key];if(!_||!_.calculatedWidth||b){var x=d-u,w=void 0;if(b)w=x;else{var k=y.maxWidth;f=y.minWidth||k||wr;w=k?Math.min(x,k-f):x}y.calculatedWidth=y.calculatedWidth+w,u+=w}}return p},t.prototype._rememberCalculatedWidth=function(e,t){var r=this._getColumnOverride(e.key);r.calculatedWidth=t,r.currentWidth=t},t.prototype._getColumnOverride=function(e){return this._columnOverrides[e]=this._columnOverrides[e]||{}},t.prototype._getItemKey=function(e,t){var r=this.props.getKey,n=void 0;return e&&(n=e.key),r&&(n=r(e,t)),n||(n=t),n},t.prototype._getDetailsFooterProps=function(){var e=this.state.adjustedColumns,t=this.props,r=t.viewport,n=t.checkboxVisibility,a=t.indentWidth,i=t.cellStyleProps,o=void 0===i?He:i,s=t.selectionMode,l=void 0===s?this._selection.mode:s;return{columns:e,groupNestingDepth:this._getGroupNestingDepth(),selection:this._selection,selectionMode:l,viewport:r,checkboxVisibility:n,indentWidth:a,cellStyleProps:o}},t.prototype._getColumnReorderProps=function(){var e=this.props.columnReorderOptions;if(e)return Object(L.a)(Object(L.a)({},e),{onColumnDragEnd:this._onColumnDragEnd})},t.prototype._getGroupProps=function(e){var t=this,r=e.onRenderFooter,n=e.onRenderHeader,a=this.state.adjustedColumns,i=this.props,o=i.selectionMode,s=void 0===o?this._selection.mode:o,l=i.viewport,c=i.cellStyleProps,u=void 0===c?He:c,d=i.checkboxVisibility,p=i.indentWidth,h=this._getGroupNestingDepth(),f=r?function(e,n){return r(Object(L.a)(Object(L.a)({},e),{columns:a,groupNestingDepth:h,indentWidth:p,selection:t._selection,selectionMode:s,viewport:l,checkboxVisibility:d,cellStyleProps:u}),n)}:void 0,m=n?function(e,r){return n(Object(L.a)(Object(L.a)({},e),{columns:a,groupNestingDepth:h,indentWidth:p,selection:t._selection,selectionMode:s,viewport:l,checkboxVisibility:d,cellStyleProps:u}),r)}:void 0;return Object(L.a)(Object(L.a)({},e),{onRenderFooter:f,onRenderHeader:m})},t.defaultProps={layoutMode:ke.justified,selectionMode:ie.multiple,constrainMode:xe.horizontalConstrained,checkboxVisibility:Me.onHover,isHeaderVisible:!0,compact:!1,useFastIcons:!0},t=Object(L.b)([_r],t)}(n.Component);function Mr(e,t,r){var n=r.cellStyleProps,a=void 0===n?He:n;return e.calculatedWidth+a.cellLeftPadding+a.cellRightPadding+(e.isPadded?a.cellExtraRightPadding:0)}var Tr,Cr={root:"ms-DetailsList",compact:"ms-DetailsList--Compact",contentWrapper:"ms-DetailsList-contentWrapper",headerWrapper:"ms-DetailsList-headerWrapper",isFixed:"is-fixed",isHorizontalConstrained:"is-horizontalConstrained",listCell:"ms-List-cell"},Sr=Object(S.a)(kr,(function(e){var t,r,n=e.theme,a=e.className,i=e.isHorizontalConstrained,o=e.compact,s=e.isFixed,l=n.semanticColors,c=Object(v.v)(Cr,n);return{root:[c.root,n.fonts.small,{position:"relative",background:l.listBackground,color:l.listText,selectors:(t={},t["& ."+c.listCell]={minHeight:38,wordBreak:"break-word"},t)},s&&c.isFixed,o&&[c.compact,{selectors:(r={},r["."+c.listCell]={minHeight:32},r)}],i&&[c.isHorizontalConstrained,{overflowX:"auto",overflowY:"visible",WebkitOverflowScrolling:"touch"}],a],focusZone:[{display:"inline-block",minWidth:"100%",minHeight:1}],headerWrapper:c.headerWrapper,contentWrapper:c.contentWrapper}}),void 0,{scope:"DetailsList"}),Lr=r(13),Ar=r(22),Er=function(){var e=Object(v.A)();return{container:ce.a.calloutContainer,root:{},beak:{},beakCurtain:{},calloutMain:{overflowY:"visible",width:"560px",height:"fit-content",minHeight:"340px",boxShadow:e.effects.elevation64,borderRadius:"2px",display:"flex",flexDirection:"column"}}},Dr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ir=function(e){function t(r){var n=e.call(this,r)||this;return n._isInitialized=!1,n.leftItems=[Ar.a.CohortKey,o.c.IndexLabel,o.c.DataLabelRoot,o.c.PredictedYLabel,o.c.TrueYLabel,o.c.ClassificationError,o.c.RegressionError,o.c.ProbabilityYRoot,o.b.none].map((function(e){var t=n.props.jointDataset.metaDict[e];return e===o.c.DataLabelRoot&&n.props.orderedGroupTitles.includes(o.b.dataset)&&n.props.jointDataset.hasDataset?{key:e,title:l.a.Columns.dataset}:e===o.c.ProbabilityYRoot&&n.props.orderedGroupTitles.includes(o.b.outcome)&&n.props.jointDataset.hasPredictedProbabilities?{key:e,title:l.a.Columns.predictedProbabilities}:void 0!==t&&n.props.orderedGroupTitles.includes(t.category)?{key:e,title:t.abbridgedLabel}:void 0})).filter((function(e){return void 0!==e})),n.dataArray=new Array(n.props.jointDataset.datasetFeatureCount).fill(0).map((function(e,t){var r=o.c.DataLabelRoot+t.toString();return{key:r,text:n.props.jointDataset.metaDict[r].abbridgedLabel}})),n.classArray=new Array(n.props.jointDataset.predictionClassCount).fill(0).map((function(e,t){var r=o.c.ProbabilityYRoot+t.toString();return{key:r,text:n.props.jointDataset.metaDict[r].abbridgedLabel}})),n.setAsCategorical=function(e,r){n.props.jointDataset.setTreatAsCategorical(n.state.selectedColumn.property,r),n.setState({binCount:r?void 0:t.MIN_HIST_COLS}),n.forceUpdate()},n.shouldBinClicked=function(e,t){var r=n.state.selectedColumn.property;if(!1===t)n.setState({selectedColumn:{property:r,options:{bin:t}},binCount:void 0});else{var a=n._getBinCountForProperty(r);n.setState({selectedColumn:{property:r,options:{bin:t}},binCount:a})}},n.saveState=function(){n.state.binCount&&n.props.jointDataset.addBin(n.state.selectedColumn.property,n.state.binCount),n.props.onAccept(n.state.selectedColumn)},n._onRenderDetailsHeader=function(e){return a.a.createElement("div",{className:e.filterHeader},l.a.AxisConfigDialog.selectFilter)},n.ditherChecked=function(e,t){n.setState({selectedColumn:{property:n.state.selectedColumn.property,options:{dither:t}}})},n.setNumericValue=function(e,r,a){if(0===e){var i=+a;if(!Number.isInteger(i)||i>t.MAX_HIST_COLS||i<t.MIN_HIST_COLS)return n.state.binCount.toString();n.setState({binCount:i})}else{var o=n.state.binCount,s=o+e;if(s>t.MAX_HIST_COLS||s<t.MIN_HIST_COLS)return o.toString();n.setState({binCount:s})}},n._setSelection=function(){if(n._isInitialized){var e=n._leftSelection.getSelection()[0].key;e!==o.b.none?(e!==o.c.DataLabelRoot&&e!==o.c.ProbabilityYRoot||(e+="0"),n.setDefaultStateForKey(e)):n.setState({selectedColumn:{property:e,options:{dither:!1}},binCount:void 0})}},n.setSelectedProperty=function(e,t){var r=t.key;n.setDefaultStateForKey(r)},n.state={selectedColumn:m.a.cloneDeep(n.props.selectedColumn),binCount:n._getBinCountForProperty(n.props.selectedColumn.property)},n._leftSelection=new ye({selectionMode:ie.single,onSelectionChanged:n._setSelection}),n._leftSelection.setItems(n.leftItems),n._leftSelection.setKeySelected(n.extractSelectionKey(n.props.selectedColumn.property),!0,!1),n._isInitialized=!0,n}return Dr(t,e),t.prototype.render=function(){var e,r=(e=Object(v.A)(),Object(v.E)({wrapper:{flex:1,width:"100%",display:"flex",flexDirection:"row",padding:"30px 40px 25px 30px",boxSizing:"border-box"},leftHalf:{width:"213px"},rightHalf:{boxSizing:"border-box",marginLeft:"25px",padding:"20px 25px",display:"inline-flex",width:"255px",flexDirection:"column",background:e.semanticColors.bodyBackgroundChecked,borderRadius:"5px"},filterHeader:{fontWeight:v.e.semibold,fontSize:v.d.medium,color:e.semanticColors.bodyTextChecked},detailedList:{height:"100%",width:"100%",overflowX:"visible"},featureText:{color:e.semanticColors.bodySubtext},featureComboBox:{width:"180px",height:"56px",marginBottom:"10px"},treatCategorical:{width:"180px",height:"20px",marginBottom:"10px"},spinButton:{width:"55px",height:"36px"},selectButton:{marginRight:"27px",marginBottom:"15px",height:"32px",width:"70px",alignSelf:"flex-end"},statsArea:{display:"flex",padding:"3px 20px 3px 0",justifyContent:"space-between"}})),n=this.props.jointDataset.metaDict[this.state.selectedColumn.property],i=-1!==this.state.selectedColumn.property.indexOf(o.c.DataLabelRoot),c=-1!==this.state.selectedColumn.property.indexOf(o.c.ProbabilityYRoot),u=n.treatAsCategorical?0:Number.isInteger(n.featureRange.min)?n.featureRange.min:(Math.round(1e4*n.featureRange.min)/1e4).toFixed(4),d=n.treatAsCategorical?0:Number.isInteger(n.featureRange.max)?n.featureRange.max:(Math.round(1e4*n.featureRange.max)/1e4).toFixed(4);return a.a.createElement(k.a,{onDismiss:this.props.onCancel,preventDismissOnScroll:!0,doNotLayer:!0,setInitialFocus:!0,hidden:!1,styles:Er(),coverTarget:!0,target:this.props.target,isBeakVisible:!1,gapSpace:30,directionalHint:M.a.topCenter},a.a.createElement("div",{className:r.wrapper},a.a.createElement("div",{className:r.leftHalf},a.a.createElement(Sr,{className:r.detailedList,items:this.leftItems,ariaLabelForSelectionColumn:"Toggle selection",ariaLabelForSelectAllCheckbox:"Toggle selection for all items",checkButtonAriaLabel:"Row checkbox",onRenderDetailsHeader:this._onRenderDetailsHeader.bind(this,r),checkboxVisibility:Me.hidden,selection:this._leftSelection,selectionPreservedOnEmptyClick:!0,setKey:"set",columns:[{key:"col1",name:"name",minWidth:200,fieldName:"title"}]})),this.state.selectedColumn.property===Ar.a.CohortKey&&a.a.createElement("div",{className:r.rightHalf},a.a.createElement(b.a,null,l.a.AxisConfigDialog.groupByCohort)),this.state.selectedColumn.property===o.b.none&&a.a.createElement("div",{className:r.rightHalf},a.a.createElement(b.a,null,l.a.AxisConfigDialog.countHelperText)),this.state.selectedColumn.property!==Ar.a.CohortKey&&this.state.selectedColumn.property!==o.b.none&&a.a.createElement("div",{className:r.rightHalf},i&&a.a.createElement(x.a,{options:this.dataArray,styles:ce.a.limitedSizeMenuDropdown,calloutProps:ce.a.calloutProps,onChange:this.setSelectedProperty,label:l.a.AxisConfigDialog.selectFeature,className:r.featureComboBox,selectedKey:this.state.selectedColumn.property}),c&&a.a.createElement(x.a,{options:this.classArray,styles:ce.a.limitedSizeMenuDropdown,calloutProps:ce.a.calloutProps,onChange:this.setSelectedProperty,label:l.a.AxisConfigDialog.selectClass,className:r.featureComboBox,selectedKey:this.state.selectedColumn.property}),n.featureRange&&n.featureRange.rangeType===s.g.integer&&a.a.createElement(ve.a,{key:this.state.selectedColumn.property,className:r.treatCategorical,label:l.a.AxisConfigDialog.TreatAsCategorical,checked:n.treatAsCategorical,onChange:this.setAsCategorical}),n.treatAsCategorical&&a.a.createElement("div",null,a.a.createElement(b.a,{variant:"small",className:r.featureText},""+l.a.formatString(l.a.Filters.uniqueValues,n.sortedCategoricalValues.length)),this.props.canDither&&a.a.createElement(ve.a,{key:this.state.selectedColumn.property,label:l.a.AxisConfigDialog.ditherLabel,checked:this.state.selectedColumn.options.dither,onChange:this.ditherChecked})),!n.treatAsCategorical&&a.a.createElement("div",null,a.a.createElement("div",{className:r.statsArea},a.a.createElement(b.a,{variant:"small",className:r.featureText,nowrap:!0,block:!0},l.a.formatString(l.a.Filters.min,u)),a.a.createElement(b.a,{variant:"small",className:r.featureText,nowrap:!0,block:!0},l.a.formatString(l.a.Filters.max,d))),this.props.canBin&&!this.props.mustBin&&a.a.createElement(ve.a,{key:this.state.selectedColumn.property,label:l.a.AxisConfigDialog.binLabel,checked:this.state.selectedColumn.options.bin,onChange:this.shouldBinClicked}),(this.props.mustBin||this.state.selectedColumn.options.bin)&&void 0!==this.state.binCount&&a.a.createElement(de.a,{className:r.spinButton,labelPosition:Lr.a.top,label:l.a.AxisConfigDialog.numOfBins,min:t.MIN_HIST_COLS,max:t.MAX_HIST_COLS,value:this.state.binCount.toString(),onIncrement:this.setNumericValue.bind(this,1,n),onDecrement:this.setNumericValue.bind(this,-1,n),onValidate:this.setNumericValue.bind(this,0,n)}),!(this.props.mustBin||this.state.selectedColumn.options.bin)&&this.props.canDither&&a.a.createElement(ve.a,{key:this.state.selectedColumn.property,label:l.a.AxisConfigDialog.ditherLabel,checked:this.state.selectedColumn.options.dither,onChange:this.ditherChecked})))),a.a.createElement(q.a,{text:l.a.AxisConfigDialog.select,onClick:this.saveState,className:r.selectButton}))},t.prototype.extractSelectionKey=function(e){return void 0===e?o.b.none:-1!==e.indexOf(o.c.DataLabelRoot)?o.c.DataLabelRoot:-1!==e.indexOf(o.c.ProbabilityYRoot)?o.c.ProbabilityYRoot:e},t.prototype.setDefaultStateForKey=function(e){var t=this.props.canDither&&this.props.jointDataset.metaDict[e].treatAsCategorical,r=this._getBinCountForProperty(e);this.setState({selectedColumn:{property:e,options:{dither:t}},binCount:r})},t.prototype._getBinCountForProperty=function(e){var r=this.props.jointDataset.metaDict[e],n=void 0;return this.props.canBin&&!r.treatAsCategorical&&(n=void 0!==r.sortedCategoricalValues?r.sortedCategoricalValues.length:t.DEFAULT_BIN_COUNT),n},t.MIN_HIST_COLS=2,t.MAX_HIST_COLS=40,t.DEFAULT_BIN_COUNT=5,t}(a.a.PureComponent),Pr=r(57),Or=r(51),Rr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fr=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},zr=function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Nr=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n},jr=function(e){function t(r){var n=e.call(this,r)||this;return n.chartAndConfigsId="chart-and-axis-config-id",n.includedFeatureImportance=[],n.selectedFeatureImportance=[],n.validationErrors={},n.stringifedValues={},n.selectedDatapoints=[],n.customDatapoints=[],n.testableDatapoints=[],n.testableDatapointColors=ce.a.fabricColorPalette,n.testableDatapointNames=[],n.featuresOption=new Array(n.props.jointDataset.datasetFeatureCount).fill(0).map((function(e,t){var r=o.c.DataLabelRoot+t.toString(),a=n.props.jointDataset.metaDict[r],i=a.isCategorical?a.sortedCategoricalValues.map((function(e,t){return{key:t,text:e}})):void 0;return{key:r,text:a.abbridgedLabel,data:{categoricalOptions:i,fullLabel:a.label.toLowerCase()}}})),n.classOptions=n.props.metadata.classNames.map((function(e,t){return{key:t,text:e}})),n.setXOpen=function(e){e&&!1===n.state.xDialogOpen?n.setState({xDialogOpen:!0}):n.setState({xDialogOpen:!1})},n.setYOpen=function(e){e&&!1===n.state.yDialogOpen?n.setState({yDialogOpen:!0}):n.setState({yDialogOpen:!1})},n.props.jointDataset.hasDataset?(n.props.metadata.modelType===c.a.multiclass&&(n.weightOptions=n.props.weightOptions.map((function(e){return{text:n.props.weightLabels[e],key:e}}))),n.state={isPanelOpen:void 0!==n.props.invokeModel,xDialogOpen:!1,yDialogOpen:!1,selectedWhatIfRootIndex:0,editingDataCustomIndex:void 0,customPoints:[],selectedCohortIndex:0,request:void 0,filteredFeatureList:n.featuresOption,selectedPointsIndexes:[],pointIsActive:[],customPointIsActive:[],startingK:0,topK:4,sortArray:[],sortingSeriesIndex:void 0,secondaryChartChoice:t.featureImportanceKey,selectedFeatureKey:o.c.DataLabelRoot+"0",showSelectionWarning:!1,selectedICEClass:0,crossClassInfoVisible:!1,iceTooltipVisible:!1},void 0===r.chartProps&&n.generateDefaultChartAxes(),n.createCopyOfFirstRow(),n.buildRowOptions(0),n.dismissPanel=n.dismissPanel.bind(n),n.openPanel=n.openPanel.bind(n),n.onXSet=n.onXSet.bind(n),n.onYSet=n.onYSet.bind(n),n.setCustomRowProperty=n.setCustomRowProperty.bind(n),n.setCustomRowPropertyDropdown=n.setCustomRowPropertyDropdown.bind(n),n.savePoint=n.savePoint.bind(n),n.saveAsPoint=n.saveAsPoint.bind(n),n.selectPointFromChart=n.selectPointFromChart.bind(n),n.filterFeatures=n.filterFeatures.bind(n),n.setSelectedCohort=n.setSelectedCohort.bind(n),n.setStartingK=n.setStartingK.bind(n),n.setSecondaryChart=n.setSecondaryChart.bind(n),n.setSelectedIndex=n.setSelectedIndex.bind(n),n.onFeatureSelected=n.onFeatureSelected.bind(n),n.setWeightOption=n.setWeightOption.bind(n),n.setSortIndex=n.setSortIndex.bind(n),n.onICEClassSelected=n.onICEClassSelected.bind(n),n.toggleCrossClassInfo=n.toggleCrossClassInfo.bind(n),n.toggleICETooltip=n.toggleICETooltip.bind(n),n.fetchData=m.a.debounce(n.fetchData.bind(n),400),n):n}return Rr(t,e),t.prototype.componentDidUpdate=function(e,r){var n=this,a=this.state.sortingSeriesIndex,i=this.state.sortArray,s=m.a.isEqual(this.state.selectedPointsIndexes,r.selectedPointsIndexes),c=this.props.selectedWeightVector===e.selectedWeightVector,u=m.a.isEqual(this.state.pointIsActive,r.pointIsActive),d=this.state.customPoints===r.customPoints,p=m.a.isEqual(this.state.customPointIsActive,r.customPointIsActive);if(s&&c||(this.selectedFeatureImportance=this.state.selectedPointsIndexes.map((function(e,t){var r=n.props.jointDataset.getRow(e);return{colorIndex:t,id:e,name:l.a.formatString(l.a.WhatIfTab.rowLabel,e.toString()),unsortedFeatureValues:o.c.datasetSlice(r,n.props.jointDataset.metaDict,n.props.jointDataset.localExplanationFeatureCount),unsortedAggregateY:o.c.localExplanationSlice(r,n.props.jointDataset.localExplanationFeatureCount)}})),this.selectedDatapoints=this.state.selectedPointsIndexes.map((function(e){var t=n.props.jointDataset.getRow(e);return o.c.datasetSlice(t,n.props.jointDataset.metaDict,n.props.jointDataset.datasetFeatureCount)})),this.state.selectedPointsIndexes.includes(this.state.sortingSeriesIndex)?c||(i=y.a.getSortIndices(this.selectedFeatureImportance[0].unsortedAggregateY).reverse()):0!==this.state.selectedPointsIndexes.length?(a=0,i=y.a.getSortIndices(this.selectedFeatureImportance[0].unsortedAggregateY).reverse()):a=void 0),d||(this.customDatapoints=this.state.customPoints.map((function(e){return o.c.datasetSlice(e,n.props.jointDataset.metaDict,n.props.jointDataset.datasetFeatureCount)}))),!(s&&u&&d&&p&&c)){this.includedFeatureImportance=this.state.pointIsActive.map((function(e,t){if(e)return n.selectedFeatureImportance[t]})).filter((function(e){return!!e}));var h=this.includedFeatureImportance.map((function(e){return ce.a.fabricColorPalette[e.colorIndex]})),f=this.includedFeatureImportance.map((function(e){return e.name})),g=this.state.pointIsActive.map((function(e,t){if(e)return n.selectedDatapoints[t]})).filter((function(e){return!!e})),v=this.state.customPointIsActive.map((function(e,r){if(e)return h.push(ce.a.fabricColorPalette[t.MAX_SELECTION+r+1]),h.push(ce.a.fabricColorPalette[t.MAX_SELECTION+r+1]),f.push(n.state.customPoints[r][t.namePath]),n.customDatapoints[r]})).filter((function(e){return!!e}));this.testableDatapoints=Nr(g,v),this.testableDatapointColors=h,this.testableDatapointNames=f,this.forceUpdate()}this.setState({sortingSeriesIndex:a,sortArray:i})},t.prototype.render=function(){var e,r=this,n=(e=Object(v.A)(),Object(v.E)({page:{width:"100%",padding:"16px 0 0 14px",boxSizing:"border-box"},blackIcon:{color:e.semanticColors.bodyText},expandedPanel:{marginTop:"10px",width:"250px",boxShadow:"0px 4.8px 14.4px rgba(0, 0, 0, 0.18), 0px 25.6px 57.6px rgba(0, 0, 0, 0.22)",display:"flex",flexDirection:"column"},parameterList:{margin:"8px 18px 30px 22px",display:"flex",flexGrow:1,backgroundColor:e.palette.neutralLighter,padding:"6px 0 6px 12px",flexDirection:"column"},featureList:{display:"flex",paddingLeft:"10px",paddingRight:"10px",flexGrow:1,flexDirection:"column",maxHeight:"400px",overflowY:"auto"},collapsedPanel:{width:"40px",boxShadow:"0px 4.8px 14.4px rgba(0, 0, 0, 0.18), 0px 25.6px 57.6px rgba(0, 0, 0, 0.22)"},mainArea:{flex:1,display:"flex",flexDirection:"row-reverse",alignItems:"stretch",minHeight:"800px"},chartsArea:{flex:1},infoWithText:{display:"flex",flexDirection:"row",width:"100%",boxSizing:"border-box",paddingLeft:"25px"},infoIcon:{width:"23px",height:"23px",fontSize:"23px"},helperText:{paddingRight:"120px",paddingLeft:"15px"},topArea:{width:"100%",height:"400px",display:"flex",flexDirection:"row"},legendAndText:{height:"100%",width:"160px",boxSizing:"border-box",paddingLeft:"10px",paddingRight:"10px"},chartWithAxes:{display:"flex",flexGrow:"1",boxSizing:"border-box",paddingTop:"30px",flexDirection:"column"},chartWithVertical:{display:"flex",flexGrow:"1",flexDirection:"row"},verticalAxis:{position:"relative",top:"0px",height:"auto",width:"67px"},rotatedVerticalBox:{transform:"translateX(-50%) translateY(-50%) rotate(270deg)",marginLeft:"28px",position:"absolute",top:"50%",textAlign:"center",width:"max-content"},horizontalAxisWithPadding:{display:"flex",paddingBottom:"30px",flexDirection:"row"},paddingDiv:{width:"50px"},horizontalAxis:{flex:1,textAlign:"center"},cohortPickerWrapper:{paddingLeft:"63px",paddingTop:"13px",height:"32px",display:"flex",flexDirection:"row",alignItems:"center"},cohortPickerLabel:{fontWeight:"600",paddingRight:"8px"},boldText:{fontWeight:"600",paddingBottom:"5px"},featureImportanceArea:{width:"100%"},featureImportanceChartAndLegend:{height:"300px",width:"100%",display:"flex",flexDirection:"row"},featureImportanceLegend:{height:"100%",width:"160px"},sliderLabel:{fontWeight:"600",paddingRight:"10px"},startingK:{flex:1,paddingRight:"160px"},featureImportanceControls:{display:"flex",flexDirection:"row",padding:"18px 30px 4px 67px"},legendHlepWrapper:{width:"120px"},legendHelpText:{fontWeight:"300",lineHeight:"14px",width:"120px"},legendLabel:{fontWeight:"600",paddingBottom:"5px",paddingTop:"10px"},smallItalic:{fontStyle:"italic",padding:"0 0 5px 5px",color:e.semanticColors.disabledBodyText},choiceBoxArea:{paddingLeft:"67px",display:"flex",flexDirection:"row",alignItems:"baseline"},choiceGroup:{paddingLeft:"30px"},choiceGroupFlexContainer:{display:"inline-flex",width:"500px",justifyContent:"space-between"},panelIconAndLabel:{paddingTop:"10px",alignItems:"center",display:"flex"},missingParametersPlaceholder:[ce.a.missingParameterPlaceholder],missingParametersPlaceholderSpacer:[ce.a.missingParameterPlaceholderSpacer],faintText:[ce.a.faintText],predictedBlock:{paddingTop:"5px",display:"flex",flexDirection:"row",alignContent:"stretch"},upperWhatIfPanel:{paddingLeft:"32px",paddingRight:"32px"},customPredictBlock:{paddingTop:"5px"},saveButton:{margin:"0 0 10px 24px"},featureSearch:{marginRight:"10px",marginBottom:"8px"},iceFeatureSelection:{margin:"43px 10px 10px 0"},iceClassSelection:{margin:"10px 10px 10px 0"},disclaimerWrapper:{padding:"5px 15px 10px 26px"},panelPlaceholderWrapper:[ce.a.missingParameterPlaceholder,{padding:"0 16px",boxSizing:"border-box"}],errorText:{color:e.semanticColors.errorText},tooltipTable:{display:"flex",flexDirection:"row"},tooltipColumn:{display:"flex",flexDirection:"column",flex:"auto",alignItems:"flex-start",width:"max-content",minWidth:"60px",maxWidth:"200px",paddingRight:"10px",boxSizing:"border-box"},tooltipTitle:{paddingBottom:"8px"},tooltipHost:{height:"100%",marginRight:"4px",display:"inline-block"},negativeNumber:{color:e.palette.red},positiveNumber:{color:e.palette.green},tooltipWrapper:{padding:"10px 15px"},multiclassWeightLabel:{display:"inline-flex",paddingTop:"10px"},multiclassWeightLabelText:{paddingTop:"5px",fontWeight:"600"},calloutWrapper:[ce.a.calloutWrapper],calloutHeader:[ce.a.calloutHeader],calloutTitle:[ce.a.calloutTitle],calloutInner:[ce.a.calloutInner],infoButton:{width:"fit-content",margin:"5px",padding:"8px 10px"},calloutActions:{position:"relative",marginTop:20,width:"100%",whiteSpace:"nowrap"},calloutLink:[e.fonts.medium,{color:e.palette.neutralPrimary}],rightJustifiedContainer:{width:"100%",paddingRight:"160px",boxSizing:"border-box",display:"inline-flex",flexDirection:"row",justifyContent:"flex-end"}}));if(!this.props.jointDataset.hasDataset)return a.a.createElement("div",{className:n.missingParametersPlaceholder},a.a.createElement("div",{className:n.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{variant:"large",className:n.faintText},l.a.WhatIfTab.missingParameters)));if(void 0===this.props.chartProps)return a.a.createElement("div",null);var i=this.generatePlotlyProps(this.props.jointDataset,this.props.chartProps,this.props.cohorts[this.state.selectedCohortIndex]),c=this.props.cohorts[this.state.selectedCohortIndex].rowCount<kn.ROW_ERROR_SIZE||this.props.chartProps.chartType!==gn.Scatter,u=this.props.cohorts.map((function(e,t){return{key:t,text:e.name}}));return a.a.createElement("div",{className:n.page},a.a.createElement("div",{className:n.infoWithText},a.a.createElement(_.a,{iconName:"Info",className:n.infoIcon}),a.a.createElement(b.a,{variant:"medium",className:n.helperText},l.a.WhatIfTab.helperText)),a.a.createElement("div",{className:n.mainArea},a.a.createElement("div",{className:this.state.isPanelOpen?n.expandedPanel:n.collapsedPanel},this.state.isPanelOpen&&void 0===this.props.invokeModel&&a.a.createElement("div",null,a.a.createElement("div",{className:n.panelIconAndLabel},a.a.createElement(G.a,{iconProps:{iconName:"ChevronRight"},onClick:this.dismissPanel,className:n.blackIcon}),a.a.createElement(b.a,{variant:"medium",className:n.boldText},l.a.WhatIfTab.whatIfDatapoint)),a.a.createElement("div",{className:n.panelPlaceholderWrapper},a.a.createElement("div",{className:n.missingParametersPlaceholderSpacer},a.a.createElement(b.a,null,l.a.WhatIfTab.panelPlaceholder)))),this.state.isPanelOpen&&void 0!==this.props.invokeModel&&a.a.createElement("div",null,a.a.createElement("div",{className:n.panelIconAndLabel},a.a.createElement(G.a,{iconProps:{iconName:"ChevronRight"},onClick:this.dismissPanel,className:n.blackIcon}),a.a.createElement(b.a,{variant:"medium",className:n.boldText},l.a.WhatIfTab.whatIfDatapoint)),a.a.createElement("div",{className:n.upperWhatIfPanel},a.a.createElement(b.a,{variant:"small",className:n.legendHelpText},l.a.WhatIfTab.whatIfHelpText),a.a.createElement(Z.a,{label:l.a.WhatIfTab.indexLabel,options:this.rowOptions,selectedKey:this.state.selectedWhatIfRootIndex,onChange:this.setSelectedIndex}),this.buildExistingPredictionLabels(n),a.a.createElement(le.a,{label:l.a.WhatIfTab.whatIfNameLabel,value:this.temporaryPoint[t.namePath],onChange:this.setCustomRowProperty.bind(this,t.namePath,!0),styles:{fieldGroup:{width:200}}}),this.buildCustomPredictionLabels(n)),a.a.createElement("div",{className:n.parameterList},a.a.createElement(b.a,{variant:"medium",className:n.boldText},l.a.WhatIfTab.featureValues),a.a.createElement(se,{className:n.featureSearch,placeholder:l.a.WhatIf.filterFeaturePlaceholder,onChange:this.filterFeatures}),a.a.createElement("div",{className:n.featureList},this.state.filteredFeatureList.map((function(e){var t=r.props.jointDataset.metaDict[e.key];return e.data&&e.data.categoricalOptions?a.a.createElement(x.a,{key:e.key,label:t.abbridgedLabel,autoComplete:"on",allowFreeform:!0,selectedKey:r.temporaryPoint[e.key],options:e.data.categoricalOptions,onChange:r.setCustomRowPropertyDropdown.bind(r,e.key),calloutProps:ce.a.calloutProps,styles:ce.a.limitedSizeMenuDropdown}):a.a.createElement(le.a,{key:e.key,label:t.abbridgedLabel,value:r.stringifedValues[e.key],onChange:r.setCustomRowProperty.bind(r,e.key,!1),styles:{fieldGroup:{width:100}},errorMessage:r.validationErrors[e.key]})})))),void 0!==this.state.editingDataCustomIndex&&a.a.createElement(q.a,{className:n.saveButton,disabled:void 0===this.temporaryPoint[o.c.PredictedYLabel],text:l.a.WhatIfTab.saveChanges,onClick:this.savePoint}),a.a.createElement(q.a,{className:n.saveButton,disabled:void 0===this.temporaryPoint[o.c.PredictedYLabel],text:l.a.WhatIfTab.saveAsNewPoint,onClick:this.saveAsPoint}),a.a.createElement("div",{className:n.disclaimerWrapper},a.a.createElement(b.a,{variant:"xSmall"},l.a.WhatIfTab.disclaimer))),!this.state.isPanelOpen&&a.a.createElement(G.a,{iconProps:{iconName:"ChevronLeft"},onClick:this.openPanel})),a.a.createElement("div",{className:n.chartsArea},u&&a.a.createElement("div",{className:n.cohortPickerWrapper},a.a.createElement(b.a,{variant:"mediumPlus",className:n.cohortPickerLabel},l.a.WhatIfTab.cohortPickerLabel),a.a.createElement(Z.a,{styles:{dropdown:{width:150}},options:u,selectedKey:this.state.selectedCohortIndex,onChange:this.setSelectedCohort})),a.a.createElement("div",{className:n.topArea},a.a.createElement("div",{className:n.chartWithAxes,id:this.chartAndConfigsId},this.state.yDialogOpen&&a.a.createElement(Ir,{jointDataset:this.props.jointDataset,orderedGroupTitles:[o.b.index,o.b.dataset,o.b.outcome],selectedColumn:this.props.chartProps.yAxis,canBin:!1,mustBin:!1,canDither:this.props.chartProps.chartType===gn.Scatter,onAccept:this.onYSet,onCancel:this.setYOpen.bind(this,!1),target:"#"+this.chartAndConfigsId}),this.state.xDialogOpen&&a.a.createElement(Ir,{jointDataset:this.props.jointDataset,orderedGroupTitles:[o.b.index,o.b.dataset,o.b.outcome],selectedColumn:this.props.chartProps.xAxis,canBin:this.props.chartProps.chartType===gn.Histogram||this.props.chartProps.chartType===gn.Box,mustBin:this.props.chartProps.chartType===gn.Histogram||this.props.chartProps.chartType===gn.Box,canDither:this.props.chartProps.chartType===gn.Scatter,onAccept:this.onXSet,onCancel:this.setXOpen.bind(this,!1),target:"#"+this.chartAndConfigsId}),a.a.createElement("div",{className:n.chartWithVertical},a.a.createElement("div",{className:n.verticalAxis},a.a.createElement("div",{className:n.rotatedVerticalBox},a.a.createElement(b.a,{block:!0,variant:"mediumPlus",className:n.boldText},l.a.Charts.yValue),a.a.createElement(K.a,{onClick:this.setYOpen.bind(this,!0),text:this.props.jointDataset.metaDict[this.props.chartProps.yAxis.property].abbridgedLabel,title:this.props.jointDataset.metaDict[this.props.chartProps.yAxis.property].label}))),!c&&a.a.createElement("div",{className:n.missingParametersPlaceholder},a.a.createElement("div",{className:n.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{block:!0,variant:"large",className:n.faintText},l.a.ValidationErrors.datasizeError),a.a.createElement(q.a,{onClick:this.editCohort},l.a.ValidationErrors.addFilters))),c&&a.a.createElement(s.a,{plotlyProps:i,theme:Object(v.A)(),onClickHandler:this.selectPointFromChart})),a.a.createElement("div",{className:n.horizontalAxisWithPadding},a.a.createElement("div",{className:n.paddingDiv}),a.a.createElement("div",{className:n.horizontalAxis},a.a.createElement("div",null,a.a.createElement(b.a,{block:!0,variant:"mediumPlus",className:n.boldText},l.a.Charts.xValue),a.a.createElement(K.a,{onClick:this.setXOpen.bind(this,!0),text:this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].abbridgedLabel,title:this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].label}))))),a.a.createElement("div",{className:n.legendAndText},a.a.createElement("div",{className:n.legendHlepWrapper},a.a.createElement(b.a,{variant:"small",className:n.legendHelpText},l.a.WhatIfTab.scatterLegendText)),a.a.createElement(b.a,{variant:"small",block:!0,className:n.legendLabel},l.a.WhatIfTab.realPoint),this.selectedFeatureImportance.length>0&&a.a.createElement(Or.a,{items:this.selectedFeatureImportance.map((function(e,t){return{name:e.name,color:ce.a.fabricColorPalette[t],activated:r.state.pointIsActive[t],onClick:r.toggleActivation.bind(r,t),onDelete:r.toggleSelectionOfPoint.bind(r,e.id)}}))}),this.state.showSelectionWarning&&a.a.createElement(b.a,{variant:"xSmall",className:n.errorText},l.a.WhatIfTab.selectionLimit),0===this.selectedFeatureImportance.length&&a.a.createElement(b.a,{variant:"xSmall",className:n.smallItalic},l.a.WhatIfTab.noneSelectedYet),a.a.createElement(b.a,{variant:"small",block:!0,className:n.legendLabel},l.a.WhatIfTab.whatIfDatapoints),this.state.customPoints.length>0&&a.a.createElement(Or.a,{items:this.state.customPoints.map((function(e,n){return{name:e[t.namePath],color:ce.a.fabricColorPalette[n+t.MAX_SELECTION+1],activated:r.state.customPointIsActive[n],onClick:r.toggleCustomActivation.bind(r,n),onDelete:r.removeCustomPoint.bind(r,n),onEdit:r.setTemporaryPointToCustomPoint.bind(r,n)}}))}),0===this.state.customPoints.length&&a.a.createElement(b.a,{variant:"xSmall",className:n.smallItalic},l.a.WhatIfTab.noneCreatedYet))),this.buildSecondaryArea(n))))},t.prototype.editCohort=function(){this.props.editCohort(this.state.selectedCohortIndex)},t.prototype.buildSecondaryArea=function(e){var r,n=this.includedFeatureImportance.map((function(e,t){return{key:t,text:e.name}}));if(this.state.secondaryChartChoice===t.featureImportanceKey)if(this.props.jointDataset.hasLocalExplanations)if(0===this.includedFeatureImportance.length)r=a.a.createElement("div",{className:e.missingParametersPlaceholder},a.a.createElement("div",{className:e.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{variant:"large",className:e.faintText},l.a.WhatIfTab.featureImportanceGetStartedText)));else{var i=[l.a.featureImportance];this.props.metadata.modelType!==c.a.regression&&i.push(this.props.weightLabels[this.props.selectedWeightVector]);var o=Math.max(0,this.props.jointDataset.localExplanationFeatureCount-this.state.topK);r=a.a.createElement("div",{className:e.featureImportanceArea},a.a.createElement("div",{className:e.featureImportanceControls},a.a.createElement(b.a,{variant:"medium",className:e.sliderLabel},l.a.formatString(l.a.GlobalTab.topAtoB,this.state.startingK+1,this.state.startingK+this.state.topK)),a.a.createElement(w.a,{className:e.startingK,ariaLabel:l.a.AggregateImportance.topKFeatures,max:o,min:0,step:1,value:this.state.startingK,onChange:this.setStartingK,showValue:!1})),a.a.createElement("div",{className:e.featureImportanceChartAndLegend},a.a.createElement(Pr.a,{jointDataset:this.props.jointDataset,yAxisLabels:i,chartType:gn.Bar,sortArray:this.state.sortArray,startingK:this.state.startingK,unsortedX:this.props.metadata.featureNamesAbridged,unsortedSeries:this.includedFeatureImportance,topK:this.state.topK}),a.a.createElement("div",{className:e.featureImportanceLegend},a.a.createElement(b.a,{variant:"medium",className:e.cohortPickerLabel},l.a.GlobalTab.sortBy),a.a.createElement(Z.a,{styles:{dropdown:{width:150}},options:n,selectedKey:this.state.sortingSeriesIndex,onChange:this.setSortIndex}),this.props.metadata.modelType===c.a.multiclass&&a.a.createElement("div",null,a.a.createElement("div",{className:e.multiclassWeightLabel},a.a.createElement(b.a,{variant:"medium",className:e.multiclassWeightLabelText},l.a.GlobalTab.weightOptions),a.a.createElement(G.a,{id:"cross-class-weight-info",iconProps:{iconName:"Info"},title:l.a.CrossClass.info,onClick:this.toggleCrossClassInfo})),a.a.createElement(Z.a,{options:this.weightOptions,selectedKey:this.props.selectedWeightVector,onChange:this.setWeightOption}),this.state.crossClassInfoVisible&&a.a.createElement(k.a,{doNotLayer:!0,target:"#cross-class-weight-info",setInitialFocus:!0,onDismiss:this.toggleCrossClassInfo,directionalHint:M.a.leftCenter,role:"alertdialog",styles:{container:ce.a.calloutContainer}},a.a.createElement("div",{className:e.calloutWrapper},a.a.createElement("div",{className:e.calloutHeader},a.a.createElement(b.a,{className:e.calloutTitle},l.a.CrossClass.crossClassWeights)),a.a.createElement("div",{className:e.calloutInner},a.a.createElement(b.a,null,l.a.CrossClass.overviewInfo),a.a.createElement("ul",null,a.a.createElement("li",null,a.a.createElement(b.a,null,l.a.CrossClass.absoluteValInfo)),a.a.createElement("li",null,a.a.createElement(b.a,null,l.a.CrossClass.enumeratedClassInfo))))))))))}else r=a.a.createElement("div",{className:e.missingParametersPlaceholder},a.a.createElement("div",{className:e.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{variant:"large",className:e.faintText},l.a.WhatIfTab.featureImportanceLackingParameters)));else r=this.props.invokeModel?0===this.testableDatapoints.length?a.a.createElement("div",{className:e.missingParametersPlaceholder},a.a.createElement("div",{className:e.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{variant:"large",className:e.faintText},l.a.WhatIfTab.IceGetStartedText))):a.a.createElement("div",{className:e.featureImportanceArea},a.a.createElement("div",{className:e.rightJustifiedContainer},a.a.createElement(X.a,{iconProps:{iconName:"Info"},id:"explanation-info",className:e.infoButton,text:l.a.Charts.howToRead,onClick:this.toggleICETooltip}),this.state.iceTooltipVisible&&a.a.createElement(k.a,{doNotLayer:!0,target:"#explanation-info",setInitialFocus:!0,onDismiss:this.toggleICETooltip,role:"alertdialog",styles:{container:ce.a.calloutContainer}},a.a.createElement("div",{className:e.calloutWrapper},a.a.createElement("div",{className:e.calloutHeader},a.a.createElement(b.a,{className:e.calloutTitle},l.a.WhatIfTab.icePlot)),a.a.createElement("div",{className:e.calloutInner},a.a.createElement(b.a,null,l.a.WhatIfTab.icePlotHelperText),a.a.createElement("div",{className:e.calloutActions},a.a.createElement(T.a,{className:e.calloutLink,href:"https://christophm.github.io/interpretable-ml-book/ice.html#ice",target:"_blank"},l.a.ExplanationSummary.clickHere)))))),a.a.createElement("div",{className:e.featureImportanceChartAndLegend},a.a.createElement(ge,{invokeModel:this.props.invokeModel,datapoints:this.testableDatapoints,colors:this.testableDatapointColors,rowNames:this.testableDatapointNames,jointDataset:this.props.jointDataset,metadata:this.props.metadata,feature:this.state.selectedFeatureKey,selectedClass:this.state.selectedICEClass}),a.a.createElement("div",{className:e.featureImportanceLegend},a.a.createElement(x.a,{autoComplete:"on",className:e.iceFeatureSelection,options:this.featuresOption,onChange:this.onFeatureSelected,label:l.a.IcePlot.featurePickerLabel,ariaLabel:"feature picker",selectedKey:this.state.selectedFeatureKey,useComboBoxAsMenuWidth:!0,calloutProps:ce.a.calloutProps,styles:ce.a.limitedSizeMenuDropdown}),this.props.metadata.modelType===c.a.multiclass&&a.a.createElement(x.a,{autoComplete:"on",className:e.iceClassSelection,options:this.classOptions,onChange:this.onICEClassSelected,label:l.a.WhatIfTab.classPickerLabel,ariaLabel:"class picker",selectedKey:this.state.selectedICEClass,useComboBoxAsMenuWidth:!0,calloutProps:ce.a.calloutProps,styles:ce.a.limitedSizeMenuDropdown})))):a.a.createElement("div",{className:e.missingParametersPlaceholder},a.a.createElement("div",{className:e.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{variant:"large",className:e.faintText},l.a.WhatIfTab.iceLackingParameters)));return a.a.createElement("div",null,a.a.createElement("div",{className:e.choiceBoxArea},a.a.createElement(b.a,{variant:"medium",className:e.boldText},l.a.WhatIfTab.showLabel),a.a.createElement(C.a,{className:e.choiceGroup,styles:{flexContainer:e.choiceGroupFlexContainer},options:t.secondaryPlotChoices,selectedKey:this.state.secondaryChartChoice,onChange:this.setSecondaryChart})),r)},t.prototype.buildExistingPredictionLabels=function(e){var r=this;if(this.props.metadata.modelType!==c.a.regression){var n=this.props.jointDataset.getRow(this.state.selectedWhatIfRootIndex),i=this.props.jointDataset.hasTrueY?n[o.c.TrueYLabel]:void 0,s=this.props.jointDataset.hasPredictedY?n[o.c.PredictedYLabel]:void 0,u=void 0!==s?this.props.jointDataset.metaDict[o.c.PredictedYLabel].sortedCategoricalValues[s]:void 0;if(this.props.jointDataset.hasPredictedProbabilities){var d=n[o.c.ProbabilityYRoot+s.toString()],p=o.c.predictProbabilitySlice(n,this.props.metadata.classNames.length),h=y.a.getSortIndices(p).reverse().slice(0,t.MAX_CLASSES_TOOLTIP),f=h.map((function(e){var t=r.props.jointDataset.metaDict[o.c.PredictedYLabel].sortedCategoricalValues[e];return a.a.createElement(b.a,{block:!0,variant:"small",key:e},t)})),m=h.map((function(e,t){var r=p[e];return a.a.createElement(b.a,{block:!0,variant:"small",key:t},r.toLocaleString(void 0,{maximumFractionDigits:3}))})),g=p.length>t.MAX_CLASSES_TOOLTIP?l.a.WhatIfTab.tooltipTitleMany:l.a.WhatIfTab.tooltipTitleFew,v={onRenderContent:function(){return a.a.createElement("div",{className:e.tooltipWrapper},a.a.createElement("div",{className:e.tooltipTitle},a.a.createElement(b.a,{variant:"large"},g)),a.a.createElement("div",{className:e.tooltipTable},a.a.createElement("div",{className:e.tooltipColumn},a.a.createElement(b.a,{className:e.boldText},l.a.WhatIfTab.classPickerLabel),f),a.a.createElement("div",{className:e.tooltipColumn},a.a.createElement(b.a,{block:!0,className:e.boldText},l.a.WhatIfTab.probabilityLabel),m)))}};return a.a.createElement("div",{className:e.predictedBlock},a.a.createElement(W,{tooltipProps:v,delay:N.zero,id:t.basePredictionTooltipIds,directionalHint:M.a.leftCenter,styles:{root:{display:"inline-block"}}},a.a.createElement(G.a,{className:e.tooltipHost,iconProps:{iconName:"More"}})),a.a.createElement("div",null,void 0!==i&&a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.trueClass),a.a.createElement(b.a,{variant:"small"},this.props.jointDataset.metaDict[o.c.PredictedYLabel].sortedCategoricalValues[i])),a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.predictedClass),a.a.createElement(b.a,{variant:"small"},u)),a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.probability),a.a.createElement(b.a,{variant:"small"},d.toLocaleString(void 0,{maximumFractionDigits:3})))))}return a.a.createElement("div",{className:e.predictedBlock},a.a.createElement("div",null,void 0!==i&&a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.trueClass),a.a.createElement(b.a,{variant:"small"},this.props.jointDataset.metaDict[o.c.PredictedYLabel].sortedCategoricalValues[i])),void 0!==s&&a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.predictedClass),a.a.createElement(b.a,{variant:"small"},u))))}n=this.props.jointDataset.getRow(this.state.selectedWhatIfRootIndex);var _=this.props.jointDataset.hasTrueY?n[o.c.TrueYLabel]:void 0,x=this.props.jointDataset.hasPredictedY?n[o.c.PredictedYLabel]:void 0;return a.a.createElement("div",{className:e.predictedBlock},a.a.createElement("div",null,void 0!==_&&a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.trueValue),a.a.createElement(b.a,{variant:"small"},_)),void 0!==x&&a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.predictedValue),a.a.createElement(b.a,{variant:"small"},x.toLocaleString(void 0,{maximumFractionDigits:3})))))},t.prototype.buildCustomPredictionLabels=function(e){var r=this;if(this.props.metadata.modelType!==c.a.regression){var n=this.props.jointDataset.hasPredictedY?this.temporaryPoint[o.c.PredictedYLabel]:void 0,i=void 0!==n?this.props.jointDataset.metaDict[o.c.PredictedYLabel].sortedCategoricalValues[n]:void 0,s=this.props.jointDataset.hasPredictedProbabilities&&void 0!==n?this.temporaryPoint[o.c.ProbabilityYRoot+n.toString()]:void 0;if(void 0!==s){var u=o.c.predictProbabilitySlice(this.props.jointDataset.getRow(this.state.selectedWhatIfRootIndex),this.props.metadata.classNames.length),d=o.c.predictProbabilitySlice(this.temporaryPoint,this.props.metadata.classNames.length),p=y.a.getSortIndices(d).reverse().slice(0,t.MAX_CLASSES_TOOLTIP),h=p.map((function(e){var t=r.props.jointDataset.metaDict[o.c.PredictedYLabel].sortedCategoricalValues[e];return a.a.createElement(b.a,{block:!0,variant:"small",key:e},t)})),f=p.map((function(e){var t=d[e];return a.a.createElement(b.a,{block:!0,variant:"small",key:e},t.toLocaleString(void 0,{maximumFractionDigits:3}))})),m=p.map((function(t){var r=d[t]-u[t];return r<0?a.a.createElement(b.a,{className:e.negativeNumber,block:!0,variant:"small",key:t},r.toLocaleString(void 0,{maximumFractionDigits:3})):r>0?a.a.createElement(b.a,{className:e.positiveNumber,block:!0,variant:"small",key:t},"+"+r.toLocaleString(void 0,{maximumFractionDigits:3})):a.a.createElement(b.a,{block:!0,variant:"small",key:t},"0")})),g=(d.length>t.MAX_CLASSES_TOOLTIP?l.a.WhatIfTab.tooltipTitleMany:l.a.WhatIfTab.tooltipTitleFew,{onRenderContent:function(){return a.a.createElement("div",{className:e.tooltipWrapper},a.a.createElement("div",{className:e.tooltipTitle},a.a.createElement(b.a,{variant:"large"},l.a.WhatIfTab.whatIfTooltipTitle)),a.a.createElement("div",{className:e.tooltipTable},a.a.createElement("div",{className:e.tooltipColumn},a.a.createElement(b.a,{className:e.boldText},l.a.WhatIfTab.classPickerLabel),h),a.a.createElement("div",{className:e.tooltipColumn},a.a.createElement(b.a,{block:!0,className:e.boldText},l.a.WhatIfTab.probabilityLabel),f),a.a.createElement("div",{className:e.tooltipColumn},a.a.createElement(b.a,{block:!0,className:e.boldText},l.a.WhatIfTab.deltaLabel),m)))}});return a.a.createElement("div",{className:e.predictedBlock},a.a.createElement(W,{tooltipProps:g,delay:N.zero,id:t.whatIfPredictionTooltipIds,directionalHint:M.a.leftCenter,styles:{root:{display:"inline-block"}}},a.a.createElement(G.a,{className:e.tooltipHost,iconProps:{iconName:"More"}})),a.a.createElement("div",null,a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.newPredictedClass),a.a.createElement(b.a,{variant:"small"},i)),a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.newProbability),a.a.createElement(b.a,{variant:"small"},s.toLocaleString(void 0,{maximumFractionDigits:3})))))}return a.a.createElement("div",{className:e.predictedBlock},a.a.createElement("div",null,a.a.createElement(G.a,{className:e.tooltipHost,iconProps:{iconName:"More"},disabled:!0})),a.a.createElement("div",null,a.a.createElement("div",null,a.a.createElement(b.a,{variant:"small"},l.a.WhatIfTab.loading)),a.a.createElement("div",null,a.a.createElement(b.a,{variant:"small"},l.a.WhatIfTab.loading))))}var v=void 0!==this.temporaryPoint[o.c.PredictedYLabel]?this.temporaryPoint[o.c.PredictedYLabel].toLocaleString(void 0,{maximumFractionDigits:3}):l.a.WhatIfTab.loading;return a.a.createElement("div",{className:e.customPredictBlock},a.a.createElement("div",null,a.a.createElement(b.a,{className:e.boldText,variant:"small"},l.a.WhatIfTab.newPredictedValue),a.a.createElement(b.a,{variant:"small"},v)))},t.prototype.setStartingK=function(e){this.setState({startingK:e})},t.prototype.getDefaultSelectedPointIndexes=function(e){var t=e.unwrap(o.c.IndexLabel);return t.length>0?[t[0]]:[]},t.prototype.setSelectedCohort=function(e,t){this.buildRowOptions(t.key),this.setState({selectedCohortIndex:t.key,selectedPointsIndexes:[],showSelectionWarning:!1})},t.prototype.buildRowOptions=function(e){this.props.cohorts[e].sort(o.c.IndexLabel),this.rowOptions=this.props.cohorts[e].unwrap(o.c.IndexLabel).map((function(e){return{key:e,text:l.a.formatString(l.a.WhatIfTab.rowLabel,e.toString())}})).reverse()},t.prototype.onFeatureSelected=function(e,t){this.setState({selectedFeatureKey:t.key})},t.prototype.onICEClassSelected=function(e,t){this.setState({selectedICEClass:t.key})},t.prototype.setSortIndex=function(e,t){var r=t.key,n=y.a.getSortIndices(this.includedFeatureImportance[r].unsortedAggregateY).reverse();this.setState({sortingSeriesIndex:r,sortArray:n})},t.prototype.setWeightOption=function(e,t){var r=t.key;this.props.onWeightChange(r)},t.prototype.setSecondaryChart=function(e,t){this.setState({secondaryChartChoice:t.key})},t.prototype.setSelectedIndex=function(e,t){this.setTemporaryPointToCopyOfDatasetPoint(t.key)},t.prototype.toggleCrossClassInfo=function(){this.setState({crossClassInfoVisible:!this.state.crossClassInfoVisible})},t.prototype.toggleICETooltip=function(){this.setState({iceTooltipVisible:!this.state.iceTooltipVisible})},t.prototype.setTemporaryPointToCopyOfDatasetPoint=function(e){var r=this;this.temporaryPoint=this.props.jointDataset.getRow(e),this.temporaryPoint[t.namePath]=l.a.formatString(l.a.WhatIf.defaultCustomRootName,e),this.temporaryPoint[t.colorPath]=ce.a.fabricColorPalette[t.MAX_SELECTION+this.state.customPoints.length],Object.keys(this.temporaryPoint).forEach((function(e){r.stringifedValues[e]=r.temporaryPoint[e].toString(),r.validationErrors[e]=void 0})),this.setState({selectedWhatIfRootIndex:e,editingDataCustomIndex:void 0})},t.prototype.setTemporaryPointToCustomPoint=function(e){var t=this;this.temporaryPoint=m.a.cloneDeep(this.state.customPoints[e]),Object.keys(this.temporaryPoint).forEach((function(e){t.stringifedValues[e]=t.temporaryPoint[e].toString(),t.validationErrors[e]=void 0})),this.setState({selectedWhatIfRootIndex:this.temporaryPoint[o.c.IndexLabel],editingDataCustomIndex:e}),this.openPanel()},t.prototype.removeCustomPoint=function(e){this.setState((function(t){var r=Nr(t.customPoints);r.splice(e,1);var n=Nr(t.customPointIsActive);return n.splice(e,1),{customPoints:r,customPointIsActive:n}}))},t.prototype.setCustomRowProperty=function(e,t,r,n){var a=this.temporaryPoint;if(this.stringifedValues[e]=n,t)a[e]=n,this.forceUpdate();else{var i=+n,o=/^\s*$/.test(n);Number.isNaN(i)||o?(this.validationErrors[e]=l.a.WhatIfTab.nonNumericValue,this.forceUpdate()):(a[e]=i,this.validationErrors[e]=void 0,this.forceUpdate(),this.fetchData(a))}},t.prototype.setCustomRowPropertyDropdown=function(e,t,r,n,a){var i=this.temporaryPoint;if(r)i[e]=r.key;else if(void 0!==a){this.featuresOption.find((function(t){return t.key===e})).data.categoricalOptions.push({key:a,text:a}),i[e]=a}this.forceUpdate(),this.fetchData(i)},t.prototype.savePoint=function(){var e=Nr(this.state.customPoints);e[this.state.editingDataCustomIndex]=this.temporaryPoint,this.temporaryPoint=m.a.cloneDeep(this.temporaryPoint),this.setState({customPoints:e})},t.prototype.saveAsPoint=function(){var e=void 0!==this.state.editingDataCustomIndex?this.state.editingDataCustomIndex:this.state.customPoints.length,t=Nr(this.state.customPoints),r=Nr(this.state.customPointIsActive);t.push(this.temporaryPoint),r.push(!0),this.temporaryPoint=m.a.cloneDeep(this.temporaryPoint),this.setState({editingDataCustomIndex:e,customPoints:t,customPointIsActive:r})},t.prototype.createCopyOfFirstRow=function(){var e=this,r=this.getDefaultSelectedPointIndexes(this.props.cohorts[this.state.selectedCohortIndex]);0!==r.length&&(this.temporaryPoint=this.props.jointDataset.getRow(r[0]),this.temporaryPoint[t.namePath]=l.a.formatString(l.a.WhatIf.defaultCustomRootName,r[0]),this.temporaryPoint[t.colorPath]=ce.a.fabricColorPalette[t.MAX_SELECTION+this.state.customPoints.length],Object.keys(this.temporaryPoint).forEach((function(t){e.stringifedValues[t]=e.temporaryPoint[t].toString(),e.validationErrors[t]=void 0})))},t.prototype.toggleActivation=function(e){var t=Nr(this.state.pointIsActive);t[e]=!t[e],this.setState({pointIsActive:t})},t.prototype.toggleCustomActivation=function(e){var t=Nr(this.state.customPointIsActive);t[e]=!t[e],this.setState({customPointIsActive:t})},t.prototype.dismissPanel=function(){this.setState({isPanelOpen:!1}),window.dispatchEvent(new Event("resize"))},t.prototype.openPanel=function(){this.setState({isPanelOpen:!0}),window.dispatchEvent(new Event("resize"))},t.prototype.onXSet=function(e){var t=m.a.cloneDeep(this.props.chartProps);t.xAxis=e,this.props.onChange(t),this.setState({xDialogOpen:!1})},t.prototype.onYSet=function(e){var t=m.a.cloneDeep(this.props.chartProps);t.yAxis=e,this.props.onChange(t),this.setState({yDialogOpen:!1})},t.prototype.filterFeatures=function(e,t){null!=t&&/\S/.test(t)||this.setState({filteredFeatureList:this.featuresOption});var r=this.featuresOption.filter((function(e){return e.data.fullLabel.includes(t.toLowerCase())}));this.setState({filteredFeatureList:r})},t.prototype.selectPointFromChart=function(e){var t=e.points[0];if(1===t.curveNumber)this.setTemporaryPointToCustomPoint(t.pointNumber);else{var r=t.customdata[o.c.IndexLabel];this.setTemporaryPointToCopyOfDatasetPoint(r),this.toggleSelectionOfPoint(r)}},t.prototype.toggleSelectionOfPoint=function(e){var r=this.state.selectedPointsIndexes.indexOf(e),n=Nr(this.state.selectedPointsIndexes),a=Nr(this.state.pointIsActive);if(-1===r){if(this.state.selectedPointsIndexes.length>t.MAX_SELECTION)return void this.setState({showSelectionWarning:!0});n.push(e),a.push(!0)}else n.splice(r,1),a.splice(r,1);this.setState({selectedPointsIndexes:n,pointIsActive:a,showSelectionWarning:!1})},t.prototype.fetchData=function(e){var t=this;void 0!==this.state.request&&this.state.request.abort();var r=new AbortController,n=o.c.datasetSlice(e,this.props.jointDataset.metaDict,this.props.jointDataset.datasetFeatureCount);e[o.c.PredictedYLabel]=void 0;var a=this.props.invokeModel([n],r.signal);this.setState({request:r},(function(){return Fr(t,void 0,void 0,(function(){var t,r,n,i,s,c;return zr(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,a];case 1:if(t=u.sent(),Array.isArray(t[0])){for(r=t[0],n=0,i=Number.MIN_SAFE_INTEGER,s=0;s<r.length;s++)e[o.c.ProbabilityYRoot+s.toString()]=r[s],r[s]>i&&(n=s,i=r[s]);e[o.c.PredictedYLabel]=n}else e[o.c.PredictedYLabel]=t[0];return this.props.jointDataset.hasTrueY&&o.c.setErrorMetrics(e,this.props.metadata.modelType),this.setState({request:void 0}),[3,3];case 2:return"AbortError"===(c=u.sent()).name?[2]:("PythonError"===c.name&&alert(l.a.formatString(l.a.IcePlot.errorPrefix,c.message)),[3,3]);case 3:return[2]}}))}))}))},t.prototype.generatePlotlyProps=function(e,r,n){var a=this,i=m.a.cloneDeep(t.basePlotlyProperties);i.data[0].hoverinfo="all";var l=n.unwrap(o.c.IndexLabel);if(i.data[0].type=r.chartType,i.data[0].mode=s.e.markers,i.data[0].marker={symbol:l.map((function(e){return a.state.selectedPointsIndexes.includes(e)?"square":"circle"})),color:l.map((function(e){var t=a.state.selectedPointsIndexes.indexOf(e);return-1===t?ce.a.fabricColorInactiveSeries:ce.a.fabricColorPalette[t]})),size:8},i.data[1]={type:"scatter",mode:s.e.markers,marker:{symbol:"star",size:12,color:this.state.customPoints.map((function(e,r){return ce.a.fabricColorPalette[t.MAX_SELECTION+1+r]}))}},i.data[2]={type:"scatter",mode:s.e.markers,text:"Editable What-If point",hoverinfo:"text",marker:{opacity:.5,symbol:"star",size:12,color:"rgba(0,0,0,0)",line:{color:ce.a.fabricColorPalette[t.MAX_SELECTION+1+this.state.customPoints.length],width:2}}},r.xAxis&&e.metaDict[r.xAxis.property].treatAsCategorical){var c=e.metaDict[r.xAxis.property].sortedCategoricalValues,u=c.map((function(e,t){return t}));m.a.set(i,"layout.xaxis.ticktext",c),m.a.set(i,"layout.xaxis.tickvals",u)}if(r.yAxis&&e.metaDict[r.yAxis.property].treatAsCategorical){var d=e.metaDict[r.yAxis.property].sortedCategoricalValues,p=d.map((function(e,t){return t}));m.a.set(i,"layout.yaxis.ticktext",d),m.a.set(i,"layout.yaxis.tickvals",p)}return this.generateDataTrace(n.filteredData,r,i.data[0]),this.generateDataTrace(this.state.customPoints,r,i.data[1]),this.generateDataTrace([this.temporaryPoint],r,i.data[2]),i},t.prototype.generateDataTrace=function(e,t,r){var n=o.c.unwrap(e,o.c.IndexLabel).map((function(e){var t={};return t[o.c.IndexLabel]=e,t})),a="";if(t.xAxis){var i=this.props.jointDataset.metaDict[t.xAxis.property],s=o.c.unwrap(e,t.xAxis.property);if(a+=i.label+": %{customdata.X}<br>",s.map((function(e,t){i.treatAsCategorical?n[t].X=i.sortedCategoricalValues[e]:n[t].X=e.toLocaleString(void 0,{maximumSignificantDigits:5})})),t.xAxis.options.dither){var c=o.c.unwrap(e,o.c.DitherLabel);r.x=c.map((function(e,t){return s[t]+e}))}else r.x=s}if(t.yAxis){var u=this.props.jointDataset.metaDict[t.yAxis.property],d=o.c.unwrap(e,t.yAxis.property);if(a+=u.label+": %{customdata.Y}<br>",d.map((function(e,t){u.treatAsCategorical?n[t].Y=u.sortedCategoricalValues[e]:n[t].Y=e.toLocaleString(void 0,{maximumSignificantDigits:5})})),t.yAxis.options.dither){c=o.c.unwrap(e,o.c.DitherLabel2);r.y=c.map((function(e,t){return d[t]+e}))}else r.y=d}a+=l.a.Charts.rowIndex+": %{customdata.Index}<br>",a+="<extra></extra>",r.customdata=n,r.hovertemplate=a},t.prototype.generateDefaultChartAxes=function(){var e=o.c.DataLabelRoot+"0",t=this.props.jointDataset.metaDict[e].treatAsCategorical,r={chartType:gn.Scatter,xAxis:{property:this.props.jointDataset.hasPredictedProbabilities?o.c.ProbabilityYRoot+"0":o.c.IndexLabel,options:{}},yAxis:{property:e,options:{dither:t,bin:!1}}};this.props.onChange(r)},t.MAX_SELECTION=2,t.MAX_CLASSES_TOOLTIP=5,t.colorPath="Color",t.namePath="Name",t.IceKey="ice",t.featureImportanceKey="feature-importance",t.basePredictionTooltipIds="predict-tooltip",t.whatIfPredictionTooltipIds="whatif-predict-tooltip",t.secondaryPlotChoices=[{key:t.featureImportanceKey,text:l.a.WhatIfTab.featureImportancePlot},{key:t.IceKey,text:l.a.WhatIfTab.icePlot}],t.basePlotlyProperties={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[{}],layout:{dragmode:!1,autosize:!0,font:{size:10},margin:{t:10,l:10,b:20,r:0},hovermode:"closest",showlegend:!1,yaxis:{automargin:!0}}},t}(a.a.PureComponent),Br=r(81),Yr=function(e,t,r){if(r===c.a.binary){var n=e.unwrap(o.c.ClassificationError);return t.map((function(e){var t=e.map((function(e){return n[e]}));return Hr(t)}))}if(r===c.a.regression){var a=e.unwrap(o.c.TrueYLabel),i=e.unwrap(o.c.PredictedYLabel),s=e.unwrap(o.c.RegressionError);return t.map((function(e){var t=e.map((function(e){return a[e]})),r=e.map((function(e){return i[e]})),n=e.map((function(e){return s[e]}));return Vr(t,r,n)}))}return[]},Hr=function(e){var t=e.filter((function(e){return e===o.a.FalseNegative})).length,r=e.filter((function(e){return e===o.a.FalsePositive})).length,n=e.filter((function(e){return e===o.a.TrueNegative})).length,a=e.filter((function(e){return e===o.a.TruePositive})).length,i=e.length;return[{label:l.a.Statistics.accuracy,stat:(a+n)/i},{label:l.a.Statistics.precision,stat:a/(a+n)},{label:l.a.Statistics.recall,stat:a/(a+t)},{label:l.a.Statistics.fpr,stat:r/(n+r)},{label:l.a.Statistics.fnr,stat:t/(a+t)}]},Vr=function(e,t,r){var n=e.length,a=r.reduce((function(e,t){return e+t*t}),0),i=e.reduce((function(e,t){return e+t}),0)/n,o=e.reduce((function(e,t){return e+(t-i)*(t-i)}),0);return[{label:l.a.Statistics.mse,stat:a/n},{label:l.a.Statistics.rSquared,stat:1-a/o},{label:l.a.Statistics.meanPrediction,stat:t.reduce((function(e,t){return e+t}),0)/n}]},Ur=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wr=function(e){function t(t){var r=e.call(this,t)||this;return r.chartAndConfigsId="chart-and-axis-config-id",r.setXOpen=function(e){e&&!1===r.state.xDialogOpen?r.setState({xDialogOpen:!0}):r.setState({xDialogOpen:!1})},r.setYOpen=function(e){e&&!1===r.state.yDialogOpen?r.setState({yDialogOpen:!0}):r.setState({yDialogOpen:!1})},r.state={xDialogOpen:!1,yDialogOpen:!1,selectedCohortIndex:0},r.props.jointDataset.hasPredictedY?(void 0===t.chartProps&&r.generateDefaultChartAxes(),r.onXSet=r.onXSet.bind(r),r.onYSet=r.onYSet.bind(r),r.setXOpen=r.setXOpen.bind(r),r.setYOpen=r.setYOpen.bind(r),r.setSelectedCohort=r.setSelectedCohort.bind(r),r):r}return Ur(t,e),t.prototype.render=function(){var e,r=(e=Object(v.A)(),Object(v.E)({page:{width:"100%",height:"100%",padding:"16px 0 0 14px",boxSizing:"border-box",display:"flex",flexDirection:"column"},infoWithText:{display:"flex",flexDirection:"row",width:"100%",boxSizing:"border-box",paddingLeft:"25px"},infoIcon:{width:"23px",height:"23px",fontSize:"23px"},helperText:{paddingRight:"160px",paddingLeft:"15px"},chartWithAxes:{display:"flex",flexGrow:"1",boxSizing:"border-box",paddingTop:"30px",flexDirection:"column"},chartWithVertical:{display:"flex",flexGrow:"1",flexDirection:"row"},scrollableWrapper:{flexGrow:"1",maxHeight:"700px",overflowY:"auto"},scrollContent:{width:"100%",display:"flex",flexDirection:"row",alignItems:"stretch",height:"500px"},chart:{flexGrow:"1"},rightPanel:{width:"195px",height:"100%",backgroundColor:e.semanticColors.bodyBackgroundChecked,display:"flex",flexDirection:"column",justifyContent:"space-evenly",padding:"10px 15px 11px 30px",boxSizing:"border-box"},statsBox:{height:"120px",boxSizing:"border-box",padding:"0 10px 0 20px",display:"flex",flexDirection:"column",justifyContent:"center",boxShadow:e.effects.elevation4,backgroundColor:e.semanticColors.bodyBackground},verticalAxis:{position:"relative",top:"0px",height:"auto",width:"64px"},rotatedVerticalBox:{transform:"translateX(-50%) translateY(-50%) rotate(270deg)",marginLeft:"28px",position:"absolute",top:"50%",textAlign:"center",width:"max-content"},horizontalAxisWithPadding:{display:"flex",paddingBottom:"30px",flexDirection:"row"},paddingDiv:{width:"50px"},horizontalAxis:{flex:1,textAlign:"center"},cohortPickerWrapper:{paddingLeft:"63px",paddingTop:"13px",height:"32px",display:"flex",flexDirection:"row",alignItems:"center"},cohortPickerLabel:{fontWeight:"600",paddingRight:"8px"},boldText:{fontWeight:"600",paddingBottom:"5px"},missingParametersPlaceholder:[ce.a.missingParameterPlaceholder],missingParametersPlaceholderSpacer:[ce.a.missingParameterPlaceholderSpacer],missingParametersPlaceholderNeutralSpacer:[ce.a.missingParameterPlaceholderSpacer,{backgroundColor:e.semanticColors.bodyBackground}],faintText:[ce.a.faintText]}));if(!this.props.jointDataset.hasPredictedY)return a.a.createElement("div",{className:r.missingParametersPlaceholder},a.a.createElement("div",{className:r.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{variant:"large",className:r.faintText},l.a.ModelPerformance.missingParameters)));if(void 0===this.props.chartProps)return a.a.createElement("div",null);var n=t.generatePlotlyProps(this.props.jointDataset,this.props.chartProps,this.props.cohorts,this.state.selectedCohortIndex),i=this.generateMetrics().reverse(),u=Math.max(400,160*i.length)+"px",d=this.props.chartProps.yAxis.property!==Ar.a.CohortKey?this.props.cohorts.map((function(e,t){return{key:t,text:e.name}})):void 0;return a.a.createElement("div",{className:r.page},a.a.createElement("div",{className:r.infoWithText},a.a.createElement(_.a,{iconName:"Info",className:r.infoIcon}),a.a.createElement(b.a,{variant:"medium",className:r.helperText},l.a.ModelPerformance.helperText)),d&&a.a.createElement("div",{className:r.cohortPickerWrapper},a.a.createElement(b.a,{variant:"mediumPlus",className:r.cohortPickerLabel},l.a.ModelPerformance.cohortPickerLabel),a.a.createElement(Z.a,{styles:{dropdown:{width:150}},options:d,selectedKey:this.state.selectedCohortIndex,onChange:this.setSelectedCohort})),a.a.createElement("div",{className:r.chartWithAxes,id:this.chartAndConfigsId},this.state.yDialogOpen&&a.a.createElement(Ir,{jointDataset:this.props.jointDataset,orderedGroupTitles:[o.b.cohort,o.b.dataset],selectedColumn:this.props.chartProps.yAxis,canBin:this.props.chartProps.chartType===gn.Histogram||this.props.chartProps.chartType===gn.Box,mustBin:this.props.chartProps.chartType===gn.Histogram||this.props.chartProps.chartType===gn.Box,canDither:this.props.chartProps.chartType===gn.Scatter,onAccept:this.onYSet,onCancel:this.setYOpen.bind(this,!1),target:"#"+this.chartAndConfigsId}),this.state.xDialogOpen&&a.a.createElement(Ir,{jointDataset:this.props.jointDataset,orderedGroupTitles:[o.b.outcome],selectedColumn:this.props.chartProps.xAxis,canBin:!1,mustBin:!1,canDither:this.props.chartProps.chartType===gn.Scatter,onAccept:this.onXSet,onCancel:this.setXOpen.bind(this,!1),target:"#"+this.chartAndConfigsId}),a.a.createElement("div",{className:r.chartWithVertical},a.a.createElement("div",{className:r.verticalAxis},a.a.createElement("div",{className:r.rotatedVerticalBox},a.a.createElement("div",null,a.a.createElement(b.a,{block:!0,variant:"mediumPlus",className:r.boldText},l.a.Charts.yValue),a.a.createElement(K.a,{onClick:this.setYOpen.bind(this,!0),text:this.props.jointDataset.metaDict[this.props.chartProps.yAxis.property].abbridgedLabel,title:this.props.jointDataset.metaDict[this.props.chartProps.yAxis.property].label})))),a.a.createElement("div",{className:r.scrollableWrapper},a.a.createElement("div",{className:r.scrollContent,style:{height:u}},a.a.createElement("div",{className:r.chart},a.a.createElement(s.a,{plotlyProps:n,theme:Object(v.A)()})),this.props.metadata.modelType!==c.a.multiclass&&a.a.createElement("div",{className:r.rightPanel},!this.props.jointDataset.hasTrueY&&a.a.createElement("div",{className:r.missingParametersPlaceholder},a.a.createElement("div",{className:r.missingParametersPlaceholderNeutralSpacer},a.a.createElement(b.a,{variant:"large",className:r.faintText},l.a.ModelPerformance.missingTrueY))),this.props.jointDataset.hasTrueY&&i.map((function(e,t){return a.a.createElement("div",{className:r.statsBox,key:t},e.map((function(e,t){return a.a.createElement(b.a,{block:!0,key:t},l.a.formatString(e.label,e.stat.toLocaleString(void 0,{maximumFractionDigits:3})))})))})))))),a.a.createElement("div",{className:r.horizontalAxisWithPadding},a.a.createElement("div",{className:r.paddingDiv}),a.a.createElement("div",{className:r.horizontalAxis},a.a.createElement("div",null,a.a.createElement(b.a,{block:!0,variant:"mediumPlus",className:r.boldText},this.props.chartProps.chartType===gn.Histogram?l.a.Charts.numberOfDatapoints:l.a.Charts.xValue),a.a.createElement(K.a,{onClick:this.setXOpen.bind(this,!0),text:this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].abbridgedLabel,title:this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].label}))))))},t.prototype.setSelectedCohort=function(e,t){this.setState({selectedCohortIndex:t.key})},t.prototype.onXSet=function(e){var t=m.a.cloneDeep(this.props.chartProps);t.xAxis=e,t.chartType=this.props.jointDataset.metaDict[e.property].treatAsCategorical?gn.Histogram:gn.Box,this.props.onChange(t),this.setState({xDialogOpen:!1})},t.prototype.onYSet=function(e){var t=m.a.cloneDeep(this.props.chartProps);t.yAxis=e,this.props.onChange(t),this.setState({yDialogOpen:!1})},t.prototype.generateDefaultChartAxes=function(){var e;e=this.props.metadata.modelType===c.a.binary&&this.props.jointDataset.hasPredictedProbabilities?o.c.ProbabilityYRoot+"0":this.props.metadata.modelType===c.a.regression&&this.props.jointDataset.hasPredictedY&&this.props.jointDataset.hasTrueY?o.c.RegressionError:o.c.PredictedYLabel;var t={chartType:this.props.jointDataset.metaDict[e].isCategorical?gn.Histogram:gn.Box,yAxis:{property:Ar.a.CohortKey,options:{}},xAxis:{property:e,options:{bin:!1}}};this.props.onChange(t)},t.generatePlotlyProps=function(e,t,r,n){var a,i,o,s,c={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[{}],layout:{dragmode:!1,autosize:!0,margin:{l:10,t:25,b:20},hovermode:"closest",showlegend:!1,yaxis:{automargin:!0,color:ce.a.chartAxisColor,tickfont:{family:ce.a.fontFamilies,size:11},showline:!0},xaxis:{side:"bottom",mirror:!0,color:ce.a.chartAxisColor,tickfont:{family:ce.a.fontFamilies,size:11},showline:!0,showgrid:!0,gridcolor:"#e5e5e5"}}},u=e.metaDict[t.yAxis.property],d=u.label;if(t.yAxis.property===Ar.a.CohortKey)a=[],i=[],o=[],s=[],r.forEach((function(e,r){var n=e.unwrap(t.xAxis.property,t.chartType===gn.Histogram),l=new Array(n.length).fill(r);a.push.apply(a,n),i.push.apply(i,l),o.push(e.name),s.push(r)}));else{var p=r[n];i=p.unwrap(t.yAxis.property,!0),a=p.unwrap(t.xAxis.property,t.chartType===gn.Histogram),o=u.sortedCategoricalValues,s=o.map((function(e,t){return t}))}switch(o=o.map((function(e){for(var t=e.length,r=" ",n=0;n<t;n+=5)r+=" ";return r+e})),c.data[0].hoverinfo="all",c.data[0].orientation="h",t.chartType){case gn.Box:c.data[0].type="box",c.data[0].x=a,c.data[0].y=i,c.data[0].marker={color:ce.a.fabricColorPalette[0]},m.a.set(c,"layout.yaxis.ticktext",o),m.a.set(c,"layout.yaxis.tickvals",s);break;case gn.Histogram:c.data[0].type="bar";var h=new Array(i.length).fill(1);c.data[0].text=i.map((function(e){return o[e]})),c.data[0].hoverinfo="all",c.data[0].hovertemplate=" "+d+":%{y}<br> "+l.a.Charts.count+": %{x}<br>",c.data[0].y=i,c.data[0].x=h,c.data[0].marker={},m.a.set(c,"layout.yaxis.ticktext",o),m.a.set(c,"layout.yaxis.tickvals",s);var f=e.metaDict[t.xAxis.property].sortedCategoricalValues.map((function(e,t){return{target:t,value:{name:e,marker:{color:ce.a.fabricColorPalette[t]}}}})),g=[{type:"aggregate",groups:i,aggregations:[{target:"x",func:"sum"}]},{type:"groupby",groups:a,styles:f}];c.layout.showlegend=!0,c.data[0].transforms=g}return c},t.prototype.generateMetrics=function(){if(this.props.chartProps.yAxis.property===Ar.a.CohortKey){var e=this.props.cohorts.map((function(e){return e.unwrap(o.c.IndexLabel)}));return Yr(this.props.jointDataset,e,this.props.metadata.modelType)}var t=this.props.cohorts[this.state.selectedCohortIndex],r=t.unwrap(this.props.chartProps.yAxis.property,!0),n=t.unwrap(o.c.IndexLabel);e=this.props.jointDataset.metaDict[this.props.chartProps.yAxis.property].sortedCategoricalValues.map((function(e,t){return n.filter((function(e,n){return r[n]===t}))}));return Yr(this.props.jointDataset,e,this.props.metadata.modelType)},t}(a.a.PureComponent),Gr=Object(v.s)({palette:{themePrimary:"#0078d4",themeLighterAlt:"#eff6fc",themeLighter:"#deecf9",themeLight:"#c7e0f4",themeTertiary:"#71afe5",themeSecondary:"#2b88d8",themeDarkAlt:"#106ebe",themeDark:"#005a9e",themeDarker:"#004578",neutralLighterAlt:"#faf9f8",neutralLighter:"#f3f2f1",neutralLight:"#edebe9",neutralQuaternaryAlt:"#e1dfdd",neutralQuaternary:"#d0d0d0",neutralTertiaryAlt:"#c8c6c4",neutralTertiary:"#a19f9d",neutralSecondary:"#605e5c",neutralPrimaryAlt:"#3b3a39",neutralPrimary:"#323130",neutralDark:"#201f1e",black:"#000000",white:"#ffffff"}}),qr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Kr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qr(t,e),t.prototype.render=function(){var e,r,n=this,i=(e=Object(v.A)(),Object(v.E)({banner:{boxSizing:"border-box",height:"105px",paddingTop:"10px",paddingLeft:"34px",display:"flex",flexDirection:"row",width:"100%",color:e.palette.white,backgroundColor:e.palette.neutralPrimary},summaryLabel:{fontVariant:"small-caps",fontWeight:"300",marginBottom:"2px"},mediumText:{maxWidth:"200px"},summaryBox:{width:"141px"},summaryItemText:{fontSize:"11px",lineHeight:"19px"},cohortList:{},cohortBox:{width:"150px",boxSizing:"border-box",paddingRight:"10px",display:"inline-block"},cohortLabelWrapper:{maxWidth:"100%",display:"flex",flexDirection:"row"},cohortLabel:{flexGrow:1},overflowButton:{backgroundColor:e.palette.neutralPrimary,border:"none"},commandButton:{width:20,height:20,padding:"4px 0",alignSelf:"stretch",backgroundColor:"transparent"},menuIcon:{color:e.palette.white,fontSize:"20px"}}));return this.props.metadata.modelType===c.a.binary?r=l.a.CohortBanner.binaryClassifier:this.props.metadata.modelType===c.a.multiclass?r=l.a.CohortBanner.multiclassClassifier:this.props.metadata.modelType===c.a.regression&&(r=l.a.CohortBanner.regressor),a.a.createElement("div",{className:i.banner,id:t.bannerId},a.a.createElement("div",{className:i.summaryBox},a.a.createElement(b.a,{variant:"xSmall",block:!0,className:i.summaryLabel},l.a.CohortBanner.dataStatistics.toUpperCase()),a.a.createElement(b.a,{block:!0,className:i.summaryItemText},r),this.props.jointDataset.hasDataset&&a.a.createElement("div",null,a.a.createElement(b.a,{block:!0,className:i.summaryItemText},l.a.formatString(l.a.CohortBanner.datapoints,this.props.jointDataset.datasetRowCount)),a.a.createElement(b.a,{block:!0,className:i.summaryItemText},l.a.formatString(l.a.CohortBanner.features,this.props.jointDataset.datasetFeatureCount)))),a.a.createElement("div",{className:i.cohortList},a.a.createElement(b.a,{variant:"xSmall",block:!0,className:i.summaryLabel},l.a.CohortBanner.datasetCohorts.toUpperCase()),this.props.cohorts.map((function(e,t){return a.a.createElement("div",{className:i.cohortBox,key:t},a.a.createElement("div",{className:i.cohortLabelWrapper},a.a.createElement(b.a,{variant:"mediumPlus",nowrap:!0,className:i.cohortLabel},e.name),a.a.createElement(X.a,{ariaLabel:"More items",role:"menuitem",styles:{root:i.commandButton,menuIcon:i.menuIcon},disabled:0===n.props.jointDataset.dataDict.length,menuIconProps:{iconName:"More"},menuProps:{items:[{key:"item4",name:l.a.CohortBanner.editCohort,onClick:n.props.editCohort.bind(n,t)},{key:"item5",name:l.a.CohortBanner.duplicateCohort,onClick:n.props.cloneAndEdit.bind(n,t)}]}})),a.a.createElement(b.a,{block:!0,variant:"xSmall",className:i.summaryItemText},l.a.formatString(l.a.CohortBanner.datapoints,e.rowCount)),a.a.createElement(b.a,{block:!0,variant:"xSmall",className:i.summaryItemText},l.a.formatString(l.a.CohortBanner.filters,e.filters.length)))})),a.a.createElement(q.a,{disabled:0===this.props.jointDataset.dataDict.length,onClick:this.props.editCohort.bind(this,this.props.cohorts.length),text:l.a.CohortBanner.addCohort})))},t.bannerId="cohortBannerId",t}(a.a.PureComponent),Xr=r(28),Zr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jr=function(e){function t(t){var r=e.call(this,t)||this;return r.chartAndConfigsId="chart-and-axis-config-id",r._chartConfigId="chart-config-button",r.chartOptions=[{key:gn.Histogram,text:l.a.DatasetExplorer.aggregatePlots},{key:gn.Scatter,text:l.a.DatasetExplorer.individualDatapoints}],r.setXOpen=function(e){e&&!1===r.state.xDialogOpen?r.setState({xDialogOpen:!0}):r.setState({xDialogOpen:!1})},r.setColorOpen=function(e){e&&!1===r.state.colorDialogOpen?r.setState({colorDialogOpen:!0}):r.setState({colorDialogOpen:!1})},r.setYOpen=function(e){e&&!1===r.state.yDialogOpen?r.setState({yDialogOpen:!0}):r.setState({yDialogOpen:!1})},r.state={xDialogOpen:!1,yDialogOpen:!1,colorDialogOpen:!1,calloutVisible:!1,selectedCohortIndex:0},r.props.jointDataset.hasDataset?(void 0===t.chartProps&&r.generateDefaultChartAxes(),r.onXSet=r.onXSet.bind(r),r.onYSet=r.onYSet.bind(r),r.onColorSet=r.onColorSet.bind(r),r.scatterSelection=r.scatterSelection.bind(r),r.onChartTypeChange=r.onChartTypeChange.bind(r),r.setSelectedCohort=r.setSelectedCohort.bind(r),r.toggleCalloutOpen=r.toggleCalloutOpen.bind(r),r.closeCallout=r.closeCallout.bind(r),r.editCohort=r.editCohort.bind(r),r):r}return Zr(t,e),t.prototype.render=function(){var e,r=(e=Object(v.A)(),Object(v.E)({page:{width:"100%",height:"100%",padding:"16px 0 0 14px",boxSizing:"border-box",display:"flex",flexDirection:"column"},infoWithText:{display:"flex",flexDirection:"row",width:"100%",boxSizing:"border-box",paddingLeft:"25px"},infoIcon:{width:"23px",height:"23px",fontSize:"23px"},helperText:{paddingRight:"160px",paddingLeft:"15px"},chartWithAxes:{display:"flex",flexGrow:"1",boxSizing:"border-box",paddingTop:"30px",flexDirection:"column",paddingRight:"10px"},chartWithVertical:{display:"flex",flexGrow:"1",flexDirection:"row",position:"relative"},chart:{flexGrow:"1"},mainArea:{width:"100%",height:"600px",display:"flex",flexDirection:"row"},legendAndText:{width:"195px",height:"100%"},verticalAxis:{position:"relative",top:"0px",height:"auto",width:"64px"},rotatedVerticalBox:{transform:"translateX(-50%) translateY(-50%) rotate(270deg)",marginLeft:"28px",position:"absolute",top:"50%",textAlign:"center",width:"max-content"},horizontalAxisWithPadding:{display:"flex",paddingBottom:"30px",flexDirection:"row"},paddingDiv:{width:"50px"},horizontalAxis:{flex:1,textAlign:"center"},cohortPickerWrapper:{paddingLeft:"63px",paddingTop:"13px",height:"32px",display:"flex",flexDirection:"row",alignItems:"center"},cohortPickerLabel:{fontWeight:"600",paddingRight:"8px"},boldText:{fontWeight:"600",paddingBottom:"5px"},colorBox:{margin:"11px 4px 11px 8px",width:"12px",height:"12px",display:"inline-block",borderRadius:"6px",cursor:"pointer"},legendLabel:{display:"inline-block",flex:"1"},legendItem:{height:"28px",display:"flex",flexDirection:"row",alignItems:"center"},legend:{},callout:{width:"200px",boxSizing:"border-box",display:"flex",flexDirection:"column",padding:"10px 20px",backgroundColor:e.semanticColors.bodyBackground},chartEditorButton:[ce.a.chartEditorButton,{position:"absolute",zIndex:10,right:"10px"}],missingParametersPlaceholder:[ce.a.missingParameterPlaceholder],missingParametersPlaceholderSpacer:[ce.a.missingParameterPlaceholderSpacer],faintText:[ce.a.faintText],smallItalic:[ce.a.placeholderItalic]}));if(!this.props.jointDataset.hasDataset)return a.a.createElement("div",{className:r.missingParametersPlaceholder},a.a.createElement("div",{className:r.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{variant:"large",className:r.faintText},l.a.DatasetExplorer.missingParameters)));if(void 0===this.props.chartProps)return a.a.createElement("div",null);var n=t.generatePlotlyProps(this.props.jointDataset,this.props.chartProps,this.props.cohorts[this.state.selectedCohortIndex]),i=this.props.chartProps.xAxis.property!==Ar.a.CohortKey?this.props.cohorts.map((function(e,t){return{key:t,text:e.name}})):void 0,c=this.buildColorLegend(r),u=this.props.cohorts[this.state.selectedCohortIndex].rowCount<kn.ROW_ERROR_SIZE||this.props.chartProps.chartType!==gn.Scatter,d=[o.b.index,o.b.dataset,o.b.outcome];this.props.chartProps.chartType!==gn.Scatter&&d.push(o.b.none);var p=this.props.chartProps.chartType!==gn.Scatter&&(void 0===this.props.chartProps.yAxis||this.props.jointDataset.metaDict[this.props.chartProps.yAxis.property].treatAsCategorical);return a.a.createElement("div",{className:r.page},a.a.createElement("div",{className:r.infoWithText},a.a.createElement(_.a,{iconName:"Info",className:r.infoIcon}),a.a.createElement(b.a,{variant:"medium",className:r.helperText},l.a.DatasetExplorer.helperText)),a.a.createElement("div",{className:r.cohortPickerWrapper},a.a.createElement(b.a,{variant:"mediumPlus",className:r.cohortPickerLabel},l.a.ModelPerformance.cohortPickerLabel),a.a.createElement(Z.a,{styles:{dropdown:{width:150}},options:i,selectedKey:this.state.selectedCohortIndex,onChange:this.setSelectedCohort})),a.a.createElement("div",{className:r.mainArea},a.a.createElement("div",{className:r.chartWithAxes,id:this.chartAndConfigsId},this.state.yDialogOpen&&a.a.createElement(Ir,{jointDataset:this.props.jointDataset,orderedGroupTitles:d,selectedColumn:this.props.chartProps.yAxis,canBin:!1,mustBin:!1,canDither:this.props.chartProps.chartType===gn.Scatter,onAccept:this.onYSet,onCancel:this.setYOpen.bind(this,!1),target:"#"+this.chartAndConfigsId}),this.state.xDialogOpen&&a.a.createElement(Ir,{jointDataset:this.props.jointDataset,orderedGroupTitles:[o.b.index,o.b.dataset,o.b.outcome],selectedColumn:this.props.chartProps.xAxis,canBin:this.props.chartProps.chartType===gn.Histogram||this.props.chartProps.chartType===gn.Box,mustBin:this.props.chartProps.chartType===gn.Histogram||this.props.chartProps.chartType===gn.Box,canDither:this.props.chartProps.chartType===gn.Scatter,onAccept:this.onXSet,onCancel:this.setXOpen.bind(this,!1),target:"#"+this.chartAndConfigsId}),this.state.colorDialogOpen&&a.a.createElement(Ir,{jointDataset:this.props.jointDataset,orderedGroupTitles:[o.b.index,o.b.dataset,o.b.outcome],selectedColumn:this.props.chartProps.colorAxis,canBin:!0,mustBin:!1,canDither:!1,onAccept:this.onColorSet,onCancel:this.setColorOpen.bind(this,!1),target:"#"+this.chartAndConfigsId}),a.a.createElement("div",{className:r.chartWithVertical},a.a.createElement("div",{className:r.verticalAxis},a.a.createElement("div",{className:r.rotatedVerticalBox},a.a.createElement("div",null,a.a.createElement(b.a,{block:!0,variant:"mediumPlus",className:r.boldText},p?l.a.Charts.numberOfDatapoints:l.a.Charts.yValue),a.a.createElement(K.a,{onClick:this.setYOpen.bind(this,!0),text:this.props.jointDataset.metaDict[this.props.chartProps.yAxis.property].abbridgedLabel,title:this.props.jointDataset.metaDict[this.props.chartProps.yAxis.property].label})))),a.a.createElement(G.a,{className:r.chartEditorButton,onClick:this.toggleCalloutOpen,iconProps:{iconName:"Settings"},id:this._chartConfigId}),this.state.calloutVisible&&a.a.createElement(k.a,{doNotLayer:!0,className:r.callout,gapSpace:0,target:"#"+this._chartConfigId,isBeakVisible:!1,onDismiss:this.closeCallout,directionalHint:M.a.bottomRightEdge,setInitialFocus:!0,styles:{container:ce.a.calloutContainer}},a.a.createElement(b.a,{variant:"medium",className:r.boldText},l.a.DatasetExplorer.chartType),a.a.createElement(C.a,{selectedKey:this.props.chartProps.chartType,options:this.chartOptions,onChange:this.onChartTypeChange})),!u&&a.a.createElement("div",{className:r.missingParametersPlaceholder},a.a.createElement("div",{className:r.missingParametersPlaceholderSpacer},a.a.createElement(b.a,{block:!0,variant:"large",className:r.faintText},l.a.ValidationErrors.datasizeError),a.a.createElement(q.a,{onClick:this.editCohort},l.a.ValidationErrors.addFilters))),u&&a.a.createElement(s.a,{plotlyProps:n,theme:Object(v.A)()})),a.a.createElement("div",{className:r.horizontalAxisWithPadding},a.a.createElement("div",{className:r.paddingDiv}),a.a.createElement("div",{className:r.horizontalAxis},a.a.createElement("div",null,a.a.createElement(b.a,{block:!0,variant:"mediumPlus",className:r.boldText},l.a.Charts.xValue),a.a.createElement(K.a,{onClick:this.setXOpen.bind(this,!0),text:this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].abbridgedLabel,title:this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].label}))))),a.a.createElement("div",{className:r.legendAndText},a.a.createElement(b.a,{variant:"mediumPlus",block:!0,className:r.boldText},l.a.DatasetExplorer.colorValue),this.props.chartProps.chartType===gn.Scatter&&a.a.createElement(K.a,{onClick:this.setColorOpen.bind(this,!0),text:this.props.jointDataset.metaDict[this.props.chartProps.colorAxis.property].abbridgedLabel,title:this.props.jointDataset.metaDict[this.props.chartProps.colorAxis.property].label}),c)))},t.prototype.editCohort=function(){this.props.editCohort(this.state.selectedCohortIndex)},t.prototype.setSelectedCohort=function(e,t){this.setState({selectedCohortIndex:t.key})},t.prototype.onChartTypeChange=function(e,t){var r=m.a.cloneDeep(this.props.chartProps);r.chartType=t.key,r.yAxis.property===o.b.none&&(r.yAxis=this.generateDefaultYAxis()),this.props.onChange(r)},t.prototype.onXSet=function(e){var t=m.a.cloneDeep(this.props.chartProps);t.xAxis=e,this.props.onChange(t),this.setState({xDialogOpen:!1})},t.prototype.onYSet=function(e){var t=m.a.cloneDeep(this.props.chartProps);t.yAxis=e,this.props.onChange(t),this.setState({yDialogOpen:!1})},t.prototype.onColorSet=function(e){var t=m.a.cloneDeep(this.props.chartProps);t.colorAxis=e,this.props.onChange(t),this.setState({colorDialogOpen:!1})},t.prototype.toggleCalloutOpen=function(){this.setState({calloutVisible:!this.state.calloutVisible})},t.prototype.closeCallout=function(){this.setState({calloutVisible:!1})},t.prototype.buildColorLegend=function(e){var t=this,r=[];if(this.props.chartProps.chartType===gn.Scatter){var n=this.props.chartProps.colorAxis;if(!n||!n.options.bin&&!this.props.jointDataset.metaDict[n.property].treatAsCategorical)return;this.props.cohorts[this.state.selectedCohortIndex].sort(n.property);var i=m.a.uniq(this.props.cohorts[this.state.selectedCohortIndex].unwrap(n.property,!0));r=this.props.jointDataset.metaDict[n.property].sortedCategoricalValues}else{var s=this.props.chartProps.yAxis;if(this.props.jointDataset.metaDict[s.property].treatAsCategorical&&s.property!==o.b.none){this.props.cohorts[this.state.selectedCohortIndex].sort(s.property);i=m.a.uniq(this.props.cohorts[this.state.selectedCohortIndex].unwrap(s.property));r=this.props.jointDataset.metaDict[s.property].treatAsCategorical?i.map((function(e){return t.props.jointDataset.metaDict[s.property].sortedCategoricalValues[e]})):i}}return a.a.createElement("div",{className:e.legend},r.map((function(t,r){return a.a.createElement("div",{className:e.legendItem,key:r},a.a.createElement("div",{className:e.colorBox,style:{backgroundColor:ce.a.fabricColorPalette[r]}}),a.a.createElement(b.a,{nowrap:!0,variant:"medium",className:e.legendLabel},t))})),0===r.length&&a.a.createElement(b.a,{variant:"xSmall",className:e.smallItalic},l.a.DatasetExplorer.noColor))},t.generatePlotlyProps=function(e,r,n){var a=m.a.cloneDeep(t.basePlotlyProperties);switch(a.data[0].hoverinfo="all",r.chartType){case gn.Scatter:if(r.colorAxis&&(r.colorAxis.options.bin||e.metaDict[r.colorAxis.property].treatAsCategorical)&&n.sort(r.colorAxis.property),a.data[0].type=r.chartType,a.data[0].mode=s.e.markers,r.xAxis){if(e.metaDict[r.xAxis.property].treatAsCategorical){var i=e.metaDict[r.xAxis.property].sortedCategoricalValues,l=i.map((function(e,t){return t}));m.a.set(a,"layout.xaxis.ticktext",i),m.a.set(a,"layout.xaxis.tickvals",l)}var c=n.unwrap(r.xAxis.property);if(r.xAxis.options.dither){var u=n.unwrap(o.c.DitherLabel);a.data[0].x=u.map((function(e,t){return c[t]+e}))}else a.data[0].x=c}if(r.yAxis){if(e.metaDict[r.yAxis.property].treatAsCategorical){var d=e.metaDict[r.yAxis.property].sortedCategoricalValues,p=d.map((function(e,t){return t}));m.a.set(a,"layout.yaxis.ticktext",d),m.a.set(a,"layout.yaxis.tickvals",p)}var h=n.unwrap(r.yAxis.property);if(r.yAxis.options.dither){u=n.unwrap(o.c.DitherLabel2);a.data[0].y=u.map((function(e,t){return h[t]+e}))}else a.data[0].y=h}if(r.colorAxis){var f=r.colorAxis.options&&r.colorAxis.options.bin,g=n.unwrap(r.colorAxis.property,f);if(e.metaDict[r.colorAxis.property].treatAsCategorical||f){var v=e.metaDict[r.colorAxis.property].sortedCategoricalValues.map((function(e,t){return{target:t,value:{name:e,marker:{color:ce.a.fabricColorPalette[t]}}}}));a.data[0].transforms=[{type:"groupby",groups:g,styles:v}],a.layout.showlegend=!1}else a.data[0].marker={color:g,colorbar:{title:{side:"right",text:e.metaDict[r.colorAxis.property].label}},colorscale:"Bluered"}}break;case gn.Histogram:n.sort(r.yAxis.property);var y=n.unwrap(r.xAxis.property,!0),b=e.metaDict[r.xAxis.property],_=e.metaDict[r.yAxis.property],x=b.sortedCategoricalValues;l=x.map((function(e,t){return t}));if(!e.metaDict[r.yAxis.property].treatAsCategorical){a.data[0].type="box",a.layout.hovermode=!1,a.data[0].x=y,a.data[0].y=n.unwrap(r.yAxis.property,!1),a.data[0].marker={color:ce.a.fabricColorPalette[0]},m.a.set(a,"layout.xaxis.ticktext",x),m.a.set(a,"layout.xaxis.tickvals",l);break}a.data[0].type="bar";var w=new Array(y.length).fill(1);a.data[0].text=y.map((function(e){return x[e]})),a.data[0].x=y,a.data[0].y=w,m.a.set(a,"layout.xaxis.ticktext",x),m.a.set(a,"layout.xaxis.tickvals",l);var k=[{type:"aggregate",groups:y,aggregations:[{target:"y",func:"sum"}]}];if(r.yAxis&&r.yAxis.property!==o.b.none){g=n.unwrap(r.yAxis.property,!0),v=_.sortedCategoricalValues.map((function(e,t){return{target:t,value:{name:e,marker:{color:ce.a.fabricColorPalette[t]}}}}));k.push({type:"groupby",groups:g,styles:v})}a.data[0].transforms=k}return a.data[0].customdata=this.buildCustomData(e,r,n),a.data[0].hovertemplate=this.buildHoverTemplate(e,r),a},t.buildHoverTemplate=function(e,t){var r="",n=e.metaDict[t.xAxis.property].label,a=e.metaDict[t.yAxis.property].label;switch(t.chartType){case gn.Scatter:t.xAxis&&(t.xAxis.options.dither?r+=n+": %{customdata.X}<br>":r+=n+": %{x}<br>"),t.yAxis&&(t.yAxis.options.dither?r+=a+": %{customdata.Y}<br>":r+=a+": %{y}<br>"),t.colorAxis&&(r+=e.metaDict[t.colorAxis.property].label+": %{customdata.Color}<br>"),r+=l.a.Charts.rowIndex+": %{customdata.AbsoluteIndex}<br>";break;case gn.Histogram:r+=n+": %{text}<br>",t.yAxis.property!==o.b.none&&e.metaDict[t.yAxis.property].treatAsCategorical&&(r+=a+": %{customdata.Y}<br>"),r+=l.a.formatString(l.a.Charts.countTooltipPrefix,"%{y}<br>")}return r+="<extra></extra>"},t.buildCustomData=function(e,t,r){var n=r.unwrap(o.c.IndexLabel).map((function(e){var t={};return t[o.c.IndexLabel]=e,t}));if(t.chartType===gn.Scatter){var a=t.xAxis;if(a&&a.property&&a.options.dither)r.unwrap(t.xAxis.property).forEach((function(r,a){e.metaDict[t.xAxis.property].treatAsCategorical?n[a].X=e.metaDict[t.xAxis.property].sortedCategoricalValues[r]:n[a].X=r.toLocaleString(void 0,{maximumFractionDigits:3})}));var i=t.yAxis;if(i&&i.property&&i.options.dither)r.unwrap(t.yAxis.property).forEach((function(r,a){e.metaDict[t.yAxis.property].treatAsCategorical?n[a].Y=e.metaDict[t.yAxis.property].sortedCategoricalValues[r]:n[a].Y=r.toLocaleString(void 0,{maximumFractionDigits:3})}));var s=t.colorAxis;if(s&&s.property)r.unwrap(t.colorAxis.property).forEach((function(t,r){e.metaDict[s.property].treatAsCategorical?n[r].Color=e.metaDict[s.property].sortedCategoricalValues[t]:n[r].Color=t.toLocaleString(void 0,{maximumFractionDigits:3})}));r.unwrap(o.c.IndexLabel,!1).forEach((function(e,t){n[t].AbsoluteIndex=e}))}if(t.chartType===gn.Histogram&&t.yAxis.property!==o.b.none){var l=e.metaDict[t.yAxis.property];if(l.treatAsCategorical)r.unwrap(t.yAxis.property).forEach((function(e,t){n[t].Y=l.sortedCategoricalValues[e]}))}return n},t.prototype.generateDefaultChartAxes=function(){var e={chartType:gn.Histogram,xAxis:{property:o.c.IndexLabel,options:{}},yAxis:this.generateDefaultYAxis(),colorAxis:{property:this.props.jointDataset.hasPredictedY?o.c.PredictedYLabel:o.c.IndexLabel,options:{}}};this.props.onChange(e)},t.prototype.generateDefaultYAxis=function(){var e=o.c.DataLabelRoot+"0";return{property:e,options:{dither:this.props.jointDataset.metaDict[e].treatAsCategorical,bin:!1}}},t.prototype.scatterSelection=function(e,t,r){var n=0===t.length?null:r.data.map((function(e){var r=[];return e.customdata&&e.customdata.forEach((function(e,n){-1!==t.indexOf(e[o.c.IndexLabel])&&r.push(n)})),r}));Xr.restyle(e,"selectedpoints",n);var a=0===t.length?[0]:r.data.map((function(e){if(e.customdata){var r=e.customdata,n=new Array(r.length).fill(0);return r.forEach((function(e,r){-1!==t.indexOf(e)&&(n[r]=2)})),n}return[0]}));Xr.restyle(e,"marker.line.width",a)},t.basePlotlyProperties={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[{}],layout:{dragmode:!1,autosize:!0,font:{size:10},margin:{t:0,l:20,b:20,r:0},hovermode:"closest",showlegend:!1,yaxis:{automargin:!0,color:ce.a.chartAxisColor,tickfont:{family:"Roboto, Helvetica Neue, sans-serif",size:11},zeroline:!0,showgrid:!0,gridcolor:"#e5e5e5"},xaxis:{mirror:!0,color:ce.a.chartAxisColor,tickfont:{family:ce.a.fontFamilies,size:11},zeroline:!0}}},t}(a.a.PureComponent),$r=function(){function e(e,t){this.props=e,this.errorStrings=[],this.classLength=t.classNames.length,this.featureLength=t.featureNames.length,this.validateProps()}return e.prototype.validateProps=function(){this.props.trueY&&(this.rowLength=this.props.trueY.length),this.props.predictedY&&this.validatePredictedY(),this.props.probabilityY&&this.validatePredictProba(),this.props.testData&&this.validateTestData(),this.props.precomputedExplanations&&this.props.precomputedExplanations.localFeatureImportance&&this.props.precomputedExplanations.localFeatureImportance.scores&&this.validateLocalExplanation()},e.prototype.validatePredictedY=function(){var e=this.props.predictedY.length;void 0===this.rowLength&&(this.rowLength=e),e!==this.rowLength&&(this.props.predictedY=void 0,this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.predictedY,e,this.rowLength)))},e.prototype.validatePredictProba=function(){var e=this;if(!Array.isArray(this.props.probabilityY))return this.props.probabilityY=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.notArray,l.a.ValidationErrors.predictedProbability,(this.rowLength||0)+" x "+this.classLength));var t=this.props.probabilityY.length;if(void 0===this.rowLength&&(this.rowLength=t),t!==this.rowLength)return this.props.probabilityY=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.predictedProbability,t,this.rowLength));if(0===t)return this.props.probabilityY=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.notNonEmpty,l.a.ValidationErrors.predictedProbability));var r=this.props.probabilityY[0].length;return r!==this.classLength?(this.props.probabilityY=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.predictedProbability,"["+t+" x "+r+"]","["+this.rowLength+" x "+this.classLength+"]"))):this.props.probabilityY.every((function(t){return t.length===e.classLength}))?void 0:(this.props.probabilityY=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.varyingLength,l.a.ValidationErrors.predictedProbability)))},e.prototype.validateTestData=function(){var e=this;if(!Array.isArray(this.props.testData))return this.props.testData=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.notArray,l.a.ValidationErrors.evalData,(this.rowLength||0)+" x "+this.classLength));var t=this.props.testData.length;if(void 0===this.rowLength&&(this.rowLength=t),t!==this.rowLength)return this.props.testData=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.evalData,t,this.rowLength));if(0===t)return this.props.testData=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.notNonEmpty,l.a.ValidationErrors.evalData));var r=this.props.testData[0].length;return r!==this.featureLength?(this.props.testData=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.evalData,"["+t+" x "+r+"]","["+this.rowLength+" x "+this.featureLength+"]"))):this.props.testData.every((function(t){return t.length===e.featureLength}))?void 0:(this.props.testData=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.varyingLength,l.a.ValidationErrors.evalData)))},e.prototype.validateLocalExplanation=function(){var e=this,t=this.props.precomputedExplanations.localFeatureImportance.scores;if(!Array.isArray(t))return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.notArray,l.a.ValidationErrors.localFeatureImportance,(this.rowLength||0)+" x "+this.featureLength+" x "+this.classLength));var r=2;if(t.every((function(e){return e.every((function(e){return Array.isArray(e)}))}))&&(r=3),3===r){var n=t.length;if(this.classLength!==n)return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.localFeatureImportance,n,this.classLength));if(0===n)return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.notNonEmpty,l.a.ValidationErrors.localFeatureImportance));if(0===(i=t[0].length))return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.notNonEmpty,l.a.ValidationErrors.localFeatureImportance));if(void 0===this.rowLength&&(this.rowLength=i),i!==this.rowLength)return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.localFeatureImportance,n+" x "+i,this.classLength+" x "+this.rowLength));if(!t.every((function(t){return t.length===e.rowLength})))return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.varyingLength,l.a.ValidationErrors.localFeatureImportance));if((a=t[0][0].length)!==this.featureLength)return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.localFeatureImportance,n+" x "+i+" x "+a,this.classLength+" x "+this.rowLength+" x "+this.featureLength));if(!t.every((function(t){return t.every((function(t){return t.length===e.featureLength}))})))return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.varyingLength,l.a.ValidationErrors.localFeatureImportance))}else{var a,i=t.length;if(void 0===this.rowLength&&(this.rowLength=i),i!==this.rowLength)return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.localFeatureImportance,""+i,""+this.rowLength));if(0===i)return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.notNonEmpty,l.a.ValidationErrors.localFeatureImportance));if((a=t[0].length)!==this.featureLength)return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.inconsistentDimensions,l.a.ValidationErrors.localFeatureImportance,i+" x "+a,this.rowLength+" x "+this.featureLength));if(!t.every((function(t){return t.length===e.featureLength})))return this.props.precomputedExplanations.localFeatureImportance=void 0,void this.errorStrings.push(l.a.formatString(l.a.ValidationErrors.varyingLength,l.a.ValidationErrors.localFeatureImportance))}},e}(),Qr=r(357);!function(e){e[e.info=0]="info",e[e.error=1]="error",e[e.blocked=2]="blocked",e[e.severeWarning=3]="severeWarning",e[e.success=4]="success",e[e.warning=5]="warning",e[e.remove=9e4]="remove"}(Tr||(Tr={}));var en,tn=Object(A.a)(),rn=function(e){function t(t){var r,n=e.call(this,t)||this;return n.ICON_MAP=((r={})[Tr.info]="Info",r[Tr.warning]="Info",r[Tr.error]="ErrorBadge",r[Tr.blocked]="Blocked2",r[Tr.remove]="Blocked",r[Tr.severeWarning]="Warning",r[Tr.success]="Completed",r),n._getRegionProps=function(){var e=!!n._getActionsDiv()||!!n._getDismissDiv(),t={"aria-describedby":n.state.labelId,role:"region"};return e?t:{}},n._onClick=function(e){n.setState({expandSingleLine:!n.state.expandSingleLine})},n.state={labelId:Object(E.a)("MessageBar"),showContent:!1,expandSingleLine:!1},n}return Object(L.c)(t,e),t.prototype.render=function(){var e=this.props.isMultiline;return this._classNames=this._getClassNames(),e?this._renderMultiLine():this._renderSingleLine()},t.prototype._getActionsDiv=function(){return this.props.actions?n.createElement("div",{className:this._classNames.actions},this.props.actions):null},t.prototype._getDismissDiv=function(){var e=this.props,t=e.onDismiss,r=e.dismissIconProps;return t?n.createElement(G.a,{disabled:!1,className:this._classNames.dismissal,onClick:t,iconProps:r||{iconName:"Clear"},ariaLabel:this.props.dismissButtonAriaLabel}):null},t.prototype._getDismissSingleLine=function(){return this.props.onDismiss?n.createElement("div",{className:this._classNames.dismissSingleLine},this._getDismissDiv()):null},t.prototype._getExpandSingleLine=function(){return!this.props.actions&&this.props.truncated?n.createElement("div",{className:this._classNames.expandSingleLine},n.createElement(G.a,{disabled:!1,className:this._classNames.expand,onClick:this._onClick,iconProps:{iconName:this.state.expandSingleLine?"DoubleChevronUp":"DoubleChevronDown"},ariaLabel:this.props.overflowButtonAriaLabel,"aria-expanded":this.state.expandSingleLine})):null},t.prototype._getIconSpan=function(){var e=this.props.messageBarIconProps;return n.createElement("div",{className:this._classNames.iconContainer,"aria-hidden":!0},e?n.createElement(_.a,Object(L.a)({},e,{className:Object(Ee.a)(this._classNames.icon,e.className)})):n.createElement(_.a,{iconName:this.ICON_MAP[this.props.messageBarType],className:this._classNames.icon}))},t.prototype._renderMultiLine=function(){var e=this.props.theme;return n.createElement("div",{style:{background:e.semanticColors.bodyBackground}},n.createElement("div",Object(L.a)({className:this._classNames.root},this._getRegionProps()),n.createElement("div",{className:this._classNames.content},this._getIconSpan(),this._renderInnerText(),this._getDismissDiv()),this._getActionsDiv()))},t.prototype._renderSingleLine=function(){var e=this.props.theme;return n.createElement("div",{style:{background:e.semanticColors.bodyBackground}},n.createElement("div",Object(L.a)({className:this._classNames.root},this._getRegionProps()),n.createElement("div",{className:this._classNames.content},this._getIconSpan(),this._renderInnerText(),this._getExpandSingleLine(),this._getActionsDiv(),this._getDismissSingleLine())))},t.prototype._renderInnerText=function(){var e=Object(z.d)(this.props,z.e,["className"]);return n.createElement("div",{className:this._classNames.text,id:this.state.labelId,role:"status","aria-live":this._getAnnouncementPriority()},n.createElement("span",Object(L.a)({className:this._classNames.innerText},e),n.createElement(Qr.a,null,n.createElement("span",null,this.props.children))))},t.prototype._getClassNames=function(){var e=this.props,t=e.theme,r=e.className,n=e.messageBarType,a=e.onDismiss,i=e.actions,o=e.truncated,s=e.isMultiline,l=this.state.expandSingleLine;return tn(this.props.styles,{theme:t,messageBarType:n||Tr.info,onDismiss:void 0!==a,actions:void 0!==i,truncated:o,isMultiline:s,expandSingleLine:l,className:r})},t.prototype._getAnnouncementPriority=function(){switch(this.props.messageBarType){case Tr.blocked:case Tr.error:case Tr.severeWarning:return"assertive"}return"polite"},t.defaultProps={messageBarType:Tr.info,onDismiss:void 0,isMultiline:!0},t}(St.a),nn={root:"ms-MessageBar",error:"ms-MessageBar--error",blocked:"ms-MessageBar--blocked",severeWarning:"ms-MessageBar--severeWarning",success:"ms-MessageBar--success",warning:"ms-MessageBar--warning",multiline:"ms-MessageBar-multiline",singleline:"ms-MessageBar-singleline",dismissalSingleLine:"ms-MessageBar-dismissalSingleLine",expandingSingleLine:"ms-MessageBar-expandingSingleLine",content:"ms-MessageBar-content",iconContainer:"ms-MessageBar-icon",text:"ms-MessageBar-text",innerText:"ms-MessageBar-innerText",dismissSingleLine:"ms-MessageBar-dismissSingleLine",expandSingleLine:"ms-MessageBar-expandSingleLine",dismissal:"ms-MessageBar-dismissal",expand:"ms-MessageBar-expand",actions:"ms-MessageBar-actions",actionsSingleline:"ms-MessageBar-actionsSingleLine"},an=function(e,t,r){switch(e){case Tr.error:case Tr.blocked:return r.errorBackground;case Tr.severeWarning:return r.blockingBackground;case Tr.success:return r.successBackground;case Tr.warning:return r.warningBackground}return t.neutralLighter},on=function(e){switch(e){case Tr.error:case Tr.blocked:case Tr.severeWarning:return"rgba(255, 0, 0, 0.3)";case Tr.success:return"rgba(48, 241, 73, 0.3)";case Tr.warning:return"rgba(255, 254, 57, 0.3)"}return"Window"},sn=function(e,t,r){switch(e){case Tr.error:case Tr.blocked:case Tr.severeWarning:return r.errorText;case Tr.success:return t.green;case Tr.warning:return r.warningText}return t.neutralSecondary},ln=Object(S.a)(rn,(function(e){var t,r,n,a,i,o,s=e.theme,l=e.className,c=e.messageBarType,u=e.onDismiss,d=e.truncated,p=e.isMultiline,h=e.expandSingleLine,f=s.semanticColors,m=s.palette,g=s.fonts,y=Object(v.z)(0,v.k),b=Object(v.v)(nn,s),_={fontSize:v.i.xSmall,height:10,lineHeight:"10px",color:m.neutralPrimary,selectors:(t={},t[v.f]={MsHighContrastAdjust:"none",color:"WindowText"},t)},x=[Object(v.u)(s,{inset:1,highContrastStyle:{outlineOffset:"-4px",outlineColor:"Window"},borderColor:"transparent"}),{flexShrink:0,width:32,height:32,padding:"8px 12px",selectors:{"& .ms-Button-icon":_,":hover":{backgroundColor:"transparent"},":active":{backgroundColor:"transparent"}}}];return{root:[b.root,s.fonts.medium,c===Tr.error&&b.error,c===Tr.blocked&&b.blocked,c===Tr.severeWarning&&b.severeWarning,c===Tr.success&&b.success,c===Tr.warning&&b.warning,p?b.multiline:b.singleline,!p&&u&&b.dismissalSingleLine,!p&&d&&b.expandingSingleLine,{background:an(c,m,f),color:m.neutralPrimary,minHeight:32,width:"100%",display:"flex",wordBreak:"break-word",selectors:(r={"& .ms-Link":Object(L.a)(Object(L.a)({color:m.themeDark},g.small),{selectors:(n={},n[v.f]={MsHighContrastAdjust:"auto"},n)})},r[v.f]={background:on(c),border:"1px solid WindowText",color:"WindowText"},r)},p&&{flexDirection:"column"},l],content:[b.content,{display:"flex",width:"100%",lineHeight:"normal"}],iconContainer:[b.iconContainer,{fontSize:v.i.medium,minWidth:16,minHeight:16,display:"flex",flexShrink:0,margin:"8px 0 8px 12px"}],icon:{color:sn(c,m,f),selectors:(a={},a[v.f]={MsHighContrastAdjust:"none",color:"WindowText"},a)},text:[b.text,Object(L.a)(Object(L.a)({minWidth:0,display:"flex",flexGrow:1,margin:8},g.small),{selectors:(i={},i[v.f]={MsHighContrastAdjust:"none"},i)}),!u&&{marginRight:12}],innerText:[b.innerText,{lineHeight:16,selectors:{"& span a":{paddingLeft:4}}},d&&{overflow:"visible",whiteSpace:"pre-wrap"},!p&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},!p&&!d&&{selectors:(o={},o[y]={overflow:"visible",whiteSpace:"pre-wrap"},o)},h&&{overflow:"visible",whiteSpace:"pre-wrap"}],dismissSingleLine:[b.dismissSingleLine],expandSingleLine:[b.expandSingleLine],dismissal:[b.dismissal,x],expand:[b.expand,x],actions:[p?b.actions:b.actionsSingleline,{display:"flex",flexGrow:0,flexShrink:0,flexBasis:"auto",flexDirection:"row-reverse",alignItems:"center",margin:"0 12px 0 8px",selectors:{"& button:nth-child(n+2)":{marginLeft:8}}},p&&{marginBottom:8},u&&!p&&{marginRight:0}]}}),void 0,{scope:"MessageBar"}),cn=function(){var e=Object(v.A)();return Object(v.E)({cohortEditor:{overflowY:"auto",width:"560px",height:"610px",maxHeight:"610px !important",boxShadow:e.effects.elevation64,borderRadius:"2px"},wrapper:{height:"344px",display:"flex",marginTop:"7px"},leftHalf:{height:"344px",marginLeft:"40px",width:"213px"},rightHalf:{display:"flex",width:"255px",height:"344px,",flexDirection:"column",background:e.semanticColors.bodyBackgroundChecked,marginRight:"27px",marginLeft:"25px",marginTop:"0px",borderRadius:"5px"},detailedList:{marginTop:"28px",height:"160px",width:"197px",overflowX:"visible"},filterHeader:{fontWeight:v.e.semibold,fontSize:v.d.medium,color:e.semanticColors.bodyTextChecked},addFilterButton:{width:"98px",height:"32px",marginLeft:"32px",marginTop:"53px",backgroundColor:e.semanticColors.buttonBackground,border:"1px solid",borderColor:e.semanticColors.buttonBorder,boxSizing:"border-box",borderRadius:"2px",padding:"0px"},featureTextDiv:{marginTop:"3px",display:"flex",flexDirection:"column"},featureComboBox:{width:"180px",height:"56px",margin:"21px 45px 1px 30px"},operationComboBox:{width:"180px",height:"56px",margin:"9px 45px 10px 30px"},valueSpinButton:{width:"180px",height:"36px",marginLeft:"30px",marginRight:"45px"},valueSpinButtonDiv:{marginTop:"10px",display:"flex",flexDirection:"row"},minSpinBox:{width:"64px",height:"36px",paddingRight:"26px",marginLeft:"30px"},maxSpinBox:{width:"64px",height:"36px"},featureText:{width:"180px",height:"20px",marginLeft:"30px",color:e.semanticColors.bodySubtext,textAlign:"left"},treatCategorical:{width:"180px",height:"20px",margin:"9px 45px 1px 30px"},defaultText:{marginTop:"105px",marginRight:"35px",marginLeft:"35px",textAlign:"center",color:e.semanticColors.bodySubtext},existingFilter:{border:"1px solid",borderColor:e.semanticColors.link,boxSizing:"border-box",borderRadius:"3px",display:"inline-flex",flexDirection:"row",height:"25px"},filterLabel:{padding:"1px 9px 6px 11px",minWidth:"75px",maxWidth:"90px",color:e.semanticColors.link,height:"25px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},defaultFilterList:{color:e.semanticColors.bodySubtext,marginLeft:"10px"},container:{display:"flex",flexDirection:"column",width:"560px",height:"610px",overflowY:"auto"},addedFilter:{fontWeight:v.e.semibold,color:e.semanticColors.bodyText,marginLeft:"45px",height:"30px",width:"178px"},addedFilterDiv:{marginRight:"40px",marginLeft:"45px",marginTop:"5px",height:"80px",overflowY:"auto"},filterIcon:{height:"25px",width:"25px"},cohortName:{width:"180px",height:"56px",marginLeft:"37px",alignSelf:"flex-start"},saveCohort:{alignSelf:"flex-end",marginRight:"27px",width:"62px",height:"32px"},saveAndDeleteDiv:{display:"flex",flexDirection:"row",marginTop:"18px"},deleteCohort:{alignSelf:"flex-start",marginRight:"17px",marginLeft:"374px",width:"80px",height:"32px",borderColor:e.palette.red,color:e.palette.red,selectors:{":hover":{background:e.palette.red,color:e.palette.white},":active":{background:e.palette.red,color:e.palette.white}}},saveAndCancelDiv:{display:"flex",flexDirection:"row",marginTop:"53px",marginLeft:"32px"},saveFilterButton:{height:"32px",width:"68px",marginRight:"15px"},cancelFilterButton:{height:"32px",width:"68px"},closeIcon:{height:"32px",width:"40px",marginRight:"1px",alignSelf:"flex-end",color:e.semanticColors.buttonText,selectors:{":hover":{color:e.semanticColors.buttonTextHovered}}}})},un={root:{display:"block"}},dn=cn(),pn=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hn=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n},fn=function(e){function t(t){var r=e.call(this,t)||this;return r.dataArray=new Array(r.props.jointDataset.datasetFeatureCount).fill(0).map((function(e,t){var n=o.c.DataLabelRoot+t.toString();return{key:n,text:r.props.jointDataset.metaDict[n].abbridgedLabel}})),r.leftItems=[o.c.IndexLabel,o.c.DataLabelRoot,o.c.PredictedYLabel,o.c.TrueYLabel,o.c.ClassificationError,o.c.RegressionError].map((function(e){var t=r.props.jointDataset.metaDict[e];return e===o.c.DataLabelRoot?{key:e,title:"Dataset"}:void 0!==t?{key:e,title:t.abbridgedLabel}:void 0})).filter((function(e){return void 0!==e})),r.comparisonOptions=[{key:"equal",text:l.a.Filters.equalComparison},{key:"greater",text:l.a.Filters.greaterThanComparison},{key:"greater and equal",text:l.a.Filters.greaterThanEqualToComparison},{key:"less",text:l.a.Filters.lessThanComparison},{key:"less and equal",text:l.a.Filters.lessThanEqualToComparison},{key:"in the range of",text:l.a.Filters.inTheRangeOf}],r._isInitialized=!1,r.closeCallout=function(){r.props.onCancel()},r.deleteCohort=function(){r.props.onDelete()},r.setAsCategorical=function(e,t){var n=r.state.openedFilter;r.props.jointDataset.setTreatAsCategorical(n.column,t),t?r.setState({openedFilter:{arg:[],method:"includes",column:n.column}}):r.setState({openedFilter:{arg:[r.props.jointDataset.metaDict[n.column].featureRange.max],method:"less",column:n.column}})},r._getErrorMessage=function(){if(r.state.cohortName.length<=0)return l.a.CohortEditor.cohortNameError},r._setSelection=function(){if(r._isInitialized&&0!=r._leftSelection.getSelection().length){var e=r._leftSelection.getSelection()[0].key;e===o.c.DataLabelRoot&&(e+="0"),r.setDefaultStateForKey(e)}},r.setSelectedProperty=function(e,t){var n=t.key;r.setState({filterIndex:r.state.filters.length}),r.setDefaultStateForKey(n)},r.saveState=function(e){r.updateFilter(r.state.openedFilter,e),r._leftSelection.setAllSelected(!1)},r._onRenderDetailsHeader=function(e){return a.a.createElement("div",{className:e.filterHeader},l.a.CohortEditor.selectFilter)},r.setCategoricalValues=function(e,t){var n=r.state.openedFilter,a=hn(n.arg),i=a.indexOf(t.key);t.selected&&-1===i?a.push(t.key):a.splice(i,1),r.setState({openedFilter:{arg:a,method:n.method,column:n.column}})},r.setComparison=function(e,t){var n=r.state.openedFilter;if("in the range of"===t.key){var a=r.props.jointDataset.metaDict[n.column].featureRange;n.arg[0]=a.min,n.arg[1]=a.max}else n.arg=n.arg.slice(0,1);r.setState({openedFilter:{arg:n.arg,method:t.key,column:n.column}})},r.setNumericValue=function(e,t,n,a){var i=r.state.openedFilter.arg;if(0===e){var o=+a;if(!Number.isInteger(o)&&t.featureRange.rangeType===s.g.integer||o>t.featureRange.max||o<t.featureRange.min)return r.state.openedFilter.arg[n].toString();i[n]=o}else{var l=i[n],c=l+e;if(c>t.featureRange.max||c<t.featureRange.min)return l.toString();i[n]=c}i[1]<=i[0]&&(i[1]=t.featureRange.max),r.setState({openedFilter:{arg:i,method:r.state.openedFilter.method,column:r.state.openedFilter.column}})},r.cancelFilter=function(){r.setState({openedFilter:void 0})},r.state={openedFilter:void 0,filterIndex:r.props.filterList.length,filters:r.props.filterList,cohortName:r.props.cohortName},r._leftSelection=new ye({selectionMode:ie.single,onSelectionChanged:r._setSelection}),r._leftSelection.setItems(r.leftItems),r._isInitialized=!0,r.saveCohort=r.saveCohort.bind(r),r.setCohortName=r.setCohortName.bind(r),r}return pn(t,e),t.prototype.render=function(){var e=this,t=cn(),r={container:{zIndex:15},root:{top:"-22px !important"},beak:{},beakCurtain:{},calloutMain:dn.cohortEditor},n=this.state.openedFilter,i=this.state.filters.map((function(r,n){return a.a.createElement("div",{key:n,className:t.existingFilter},e.setFilterLabel(r,t),a.a.createElement(G.a,{className:t.filterIcon,iconProps:{iconName:"Edit"},onClick:e.editFilter.bind(e,n)}),a.a.createElement(G.a,{className:t.filterIcon,iconProps:{iconName:"Clear"},onClick:e.removeFilter.bind(e,n)}))}));return a.a.createElement(k.a,{setInitialFocus:!0,hidden:!1,styles:r,doNotLayer:!0,coverTarget:!0,target:"#"+Kr.bannerId,isBeakVisible:!1,gapSpace:100,directionalHint:M.a.topCenter},a.a.createElement("div",{className:t.container},a.a.createElement(G.a,{className:t.closeIcon,iconProps:{iconName:"ChromeClose"},onClick:this.closeCallout.bind(this)}),a.a.createElement(le.a,{className:t.cohortName,value:this.state.cohortName,label:l.a.CohortEditor.cohortNameLabel,placeholder:l.a.CohortEditor.cohortNamePlaceholder,onGetErrorMessage:this._getErrorMessage,validateOnLoad:!1,onChange:this.setCohortName}),a.a.createElement("div",{className:t.wrapper},a.a.createElement("div",{className:t.leftHalf},a.a.createElement(Sr,{className:t.detailedList,items:this.leftItems,ariaLabelForSelectionColumn:"Toggle selection",ariaLabelForSelectAllCheckbox:"Toggle selection for all items",checkButtonAriaLabel:"Row checkbox",checkboxVisibility:Me.hidden,onRenderDetailsHeader:this._onRenderDetailsHeader.bind(this,t),selection:this._leftSelection,selectionPreservedOnEmptyClick:!0,setKey:"set",columns:[{key:"col1",name:"name",minWidth:150,fieldName:"title"}]})),null==n?a.a.createElement("div",{className:t.rightHalf},a.a.createElement(b.a,{className:t.defaultText,variant:"medium"},l.a.CohortEditor.defaultFilterState)):this.buildRightPanel(n,t)),a.a.createElement("div",null,a.a.createElement(b.a,{variant:"medium",className:t.addedFilter},l.a.CohortEditor.addedFilters),a.a.createElement("div",{className:t.addedFilterDiv},i.length>0?a.a.createElement("div",null,i):a.a.createElement("div",null,a.a.createElement(b.a,{variant:"smallPlus",className:t.defaultFilterList},l.a.CohortEditor.noAddedFilters)))),this.props.isNewCohort?a.a.createElement(q.a,{onClick:this.saveCohort,className:t.saveCohort},l.a.CohortEditor.save):a.a.createElement("div",{className:t.saveAndDeleteDiv},a.a.createElement(K.a,{disabled:this.props.deleteIsDisabled,onClick:this.deleteCohort.bind(this),className:t.deleteCohort},l.a.CohortEditor.delete),a.a.createElement(q.a,{onClick:this.saveCohort,className:t.saveCohort},l.a.CohortEditor.save))))},t.prototype.setDefaultStateForKey=function(e){var t={column:e},r=this.props.jointDataset.metaDict[e];r.treatAsCategorical?(t.method="includes",t.arg=Array.from(Array(r.sortedCategoricalValues.length).keys())):(t.method="less",t.arg=[r.featureRange.max]),this.setState({openedFilter:t})},t.prototype.updateFilter=function(e,t){var r=hn(this.state.filters);r[t]=e,this.setState({filters:r,openedFilter:void 0,filterIndex:this.state.filters.length})},t.prototype.removeFilter=function(e){var t=hn(this.state.filters);t.splice(e,1),this.setState({filters:t})},t.prototype.editFilter=function(e){var t=this.state.filters[e];this.setState({filterIndex:e,openedFilter:m.a.cloneDeep(t)})},t.prototype.saveCohort=function(){if(this.state.cohortName.length>0){var e=new Ar.a(this.state.cohortName,this.props.jointDataset,this.state.filters);this.props.onSave(e)}else this._getErrorMessage},t.prototype.setCohortName=function(e){this.setState({cohortName:e.target.value})},t.prototype.roundDecimalValue=function(e){return e%1!=0?(Math.round(1e4*e)/1e4).toFixed(4):e},t.prototype.setFilterLabel=function(e,r){var n,i=un,o=this.props.jointDataset.metaDict[e.column],s="";if(o.isCategorical||this.props.jointDataset.metaDict[e.column].treatAsCategorical){var c=[];if(e.arg.forEach((function(e){c.push(o.sortedCategoricalValues[e])})),n=c.toString(),c.length>3){var u=c.slice(0,3).toString(),d=c.length-3;n=l.a.formatString(l.a.FilterOperations.overflowFilterArgs,u,d.toString())}}else{for(var p=0;p<e.arg.length;p++)e.arg[p]=this.roundDecimalValue(e.arg[p]);n=e.arg.toString()}return s="in the range of"===e.method?o.abbridgedLabel+" "+l.a.formatString(l.a.FilterOperations.inTheRangeOf,n):o.abbridgedLabel+" "+l.a.formatString(t.filterMethodLabels[e.method],n),a.a.createElement(W,{overflowMode:D.Self,hostClassName:r.filterLabel,content:s,onTooltipToggle:function(){return!1},styles:i},s)},t.prototype.buildRightPanel=function(e,t){var r,n,i=this.props.jointDataset.metaDict[e.column],c=i.treatAsCategorical||i.featureRange.rangeType===s.g.integer?1:(i.featureRange.max-i.featureRange.min)/10,u=-1!==e.column.indexOf(o.c.DataLabelRoot),d=[],p=this.state.filterIndex!==this.state.filters.length;return i.treatAsCategorical?d=i.sortedCategoricalValues.map((function(e,t){return{key:t,text:e}})):(r=this.roundDecimalValue(i.featureRange.min),n=this.roundDecimalValue(i.featureRange.max)),a.a.createElement("div",{className:t.rightHalf},u&&a.a.createElement(x.a,{className:t.featureComboBox,styles:ce.a.limitedSizeMenuDropdown,options:this.dataArray,onChange:this.setSelectedProperty,label:l.a.CohortEditor.selectFilter,selectedKey:e.column,calloutProps:ce.a.calloutProps}),i.featureRange&&i.featureRange.rangeType===s.g.integer&&a.a.createElement(ve.a,{key:e.column,className:t.treatCategorical,label:l.a.CohortEditor.TreatAsCategorical,checked:i.treatAsCategorical,onChange:this.setAsCategorical}),i.treatAsCategorical&&a.a.createElement("div",{className:t.featureTextDiv},a.a.createElement(b.a,{variant:"small",className:t.featureText},""+l.a.formatString(l.a.Filters.uniqueValues,i.sortedCategoricalValues.length)),a.a.createElement(x.a,{key:e.column,multiSelect:!0,label:l.a.Filters.categoricalIncludeValues,className:t.operationComboBox,selectedKey:e.arg,onChange:this.setCategoricalValues,options:d,useComboBoxAsMenuWidth:!0,calloutProps:ce.a.calloutProps,styles:ce.a.limitedSizeMenuDropdown})),!i.treatAsCategorical&&a.a.createElement("div",{className:t.featureTextDiv},a.a.createElement(b.a,{block:!0,nowrap:!0,variant:"small",className:t.featureText},l.a.formatString(l.a.Filters.min,r)+" "+l.a.formatString(l.a.Filters.max,n)),a.a.createElement(x.a,{label:l.a.Filters.numericalComparison,className:t.operationComboBox,selectedKey:e.method,onChange:this.setComparison,options:this.comparisonOptions,useComboBoxAsMenuWidth:!0,calloutProps:ce.a.calloutProps}),"in the range of"==e.method?a.a.createElement("div",{className:t.valueSpinButtonDiv},a.a.createElement(de.a,{labelPosition:Lr.a.top,className:t.minSpinBox,value:e.arg[0],label:l.a.Filters.minimum,min:i.featureRange.min,max:i.featureRange.max,onIncrement:this.setNumericValue.bind(this,c,i,0),onDecrement:this.setNumericValue.bind(this,-c,i,0),onValidate:this.setNumericValue.bind(this,0,i,0)}),a.a.createElement(de.a,{labelPosition:Lr.a.top,className:t.maxSpinBox,value:e.arg[1],label:l.a.Filters.maximum,min:i.featureRange.min,max:i.featureRange.max,onIncrement:this.setNumericValue.bind(this,c,i,1),onDecrement:this.setNumericValue.bind(this,-c,i,1),onValidate:this.setNumericValue.bind(this,0,i,1)})):a.a.createElement("div",{className:t.valueSpinButtonDiv},a.a.createElement(de.a,{labelPosition:Lr.a.top,className:t.valueSpinButton,label:l.a.Filters.numericValue,min:i.featureRange.min,max:i.featureRange.max,value:e.arg[0],onIncrement:this.setNumericValue.bind(this,c,i,0),onDecrement:this.setNumericValue.bind(this,-c,i,0),onValidate:this.setNumericValue.bind(this,0,i,0)}))),p?a.a.createElement("div",{className:t.saveAndCancelDiv},a.a.createElement(K.a,{className:t.saveFilterButton,text:l.a.CohortEditor.save,onClick:this.saveState.bind(this,this.state.filterIndex)}),a.a.createElement(K.a,{className:t.cancelFilterButton,text:l.a.CohortEditor.cancel,onClick:this.cancelFilter.bind(this)})):a.a.createElement(K.a,{className:t.addFilterButton,text:l.a.CohortEditor.addFilter,onClick:this.saveState.bind(this,this.state.filters.length)}))},t.filterMethodLabels=((en={}).equal=l.a.FilterOperations.equals,en.greater=l.a.FilterOperations.greaterThan,en["greater and equal"]=l.a.FilterOperations.greaterThanEquals,en.less=l.a.FilterOperations.lessThan,en["less and equal"]=l.a.FilterOperations.lessThanEquals,en.includes=l.a.FilterOperations.includes,en["in the range of"]=l.a.FilterOperations.inTheRangeOf,en),t}(a.a.PureComponent),mn=r(23);r.d(t,"a",(function(){return gn})),r.d(t,"b",(function(){return kn}));var gn,vn,yn=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bn=function(){return(bn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},_n=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},xn=function(e,t){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},wn=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n};!function(e){e.Scatter="scatter",e.Histogram="histogram",e.Box="box",e.Bar="bar"}(gn||(gn={})),function(e){e.modelPerformance="modelPerformance",e.dataExploration="dataExploration",e.explanationTab="explanationTab",e.whatIfTab="whatIfTab"}(vn||(vn={}));var kn=function(e){function t(r){var n,a=e.call(this,r)||this;return a.pivotItems=[],a.weightVectorOptions=[],a.weightVectorLabels={},t.initializeIcons(r),Object(v.D)(r.theme||Gr),a.onModelConfigChanged=a.onModelConfigChanged.bind(a),a.onConfigChanged=a.onConfigChanged.bind(a),a.onWhatIfConfigChanged=a.onWhatIfConfigChanged.bind(a),a.onDependenceChange=a.onDependenceChange.bind(a),a.handleGlobalTabClick=a.handleGlobalTabClick.bind(a),a.setGlobalBarSettings=a.setGlobalBarSettings.bind(a),a.setSortVector=a.setSortVector.bind(a),a.onCohortChange=a.onCohortChange.bind(a),a.deleteCohort=a.deleteCohort.bind(a),a.clearWarning=a.clearWarning.bind(a),a.openCohort=a.openCohort.bind(a),a.closeCohortEditor=a.closeCohortEditor.bind(a),a.clearSizeWarning=a.clearSizeWarning.bind(a),a.cloneAndOpenCohort=a.cloneAndOpenCohort.bind(a),a.onWeightVectorChange=a.onWeightVectorChange.bind(a),a.props.locale&&l.a.setLanguage(a.props.locale),a.state=t.buildInitialExplanationContext(m.a.cloneDeep(r)),a.validatePredictMethod(),a.weightVectorLabels=((n={})[mn.a.absAvg]=l.a.absoluteAverage,n),a.state.modelMetadata.modelType===c.a.multiclass&&a.weightVectorOptions.push(mn.a.absAvg),a.state.modelMetadata.classNames.forEach((function(e,t){a.weightVectorLabels[t]=l.a.formatString(l.a.WhatIfTab.classLabel,e),a.weightVectorOptions.push(t)})),a.pivotItems.push({headerText:l.a.modelPerformance,itemKey:vn.modelPerformance}),a.pivotItems.push({headerText:l.a.datasetExplorer,itemKey:vn.dataExploration}),a.pivotItems.push({headerText:l.a.aggregateFeatureImportance,itemKey:vn.explanationTab}),a.pivotItems.push({headerText:l.a.individualAndWhatIf,itemKey:vn.whatIfTab}),a}return yn(t,e),t.initializeIcons=function(e){!1===t.iconsInitialized&&!1!==e.shouldInitializeIcons&&(Object(Br.a)(e.iconUrl),t.iconsInitialized=!0)},t.buildModelMetadata=function(e){var r,n=t.getModelType(e),a=e.dataSummary.featureNames;if(void 0!==a)a.every((function(e){return"string"==typeof e}))||(a=a.map((function(e){return e.toString()}))),r=a.map((function(e){return e.length<=18?e:e.slice(0,18)+"..."}));else{var i=0;if(e.testData&&void 0!==e.testData[0])i=e.testData[0].length;else if(e.precomputedExplanations&&e.precomputedExplanations.globalFeatureImportance)i=e.precomputedExplanations.globalFeatureImportance.scores.length;else if(e.precomputedExplanations&&e.precomputedExplanations.localFeatureImportance){i=e.precomputedExplanations.localFeatureImportance.scores.every((function(e){return e.every((function(e){return Array.isArray(e)}))}))?e.precomputedExplanations.localFeatureImportance.scores[0][0].length:e.precomputedExplanations.localFeatureImportance.scores[0].length}else e.precomputedExplanations&&e.precomputedExplanations.ebmGlobalExplanation&&(i=e.precomputedExplanations.ebmGlobalExplanation.feature_list.length);r=a=t.buildIndexedNames(i,l.a.defaultFeatureNames)}var o=e.dataSummary.classNames,c=t.getClassLength(e);o&&o.length===c||(o=t.buildIndexedNames(c,l.a.defaultClassNames));var u=s.d.buildIsCategorical(a.length,e.testData,e.dataSummary.categoricalMap);return{featureNames:a,featureNamesAbridged:r,classNames:o,featureIsCategorical:u,featureRanges:s.d.buildFeatureRanges(e.testData,u,e.dataSummary.categoricalMap),modelType:n}},t.buildIndexedNames=function(e,t){return Array.from(Array(e).keys()).map((function(e){return l.a.formatString(t,e.toString())}))},t.getModelType=function(e){if("regressor"===e.modelInformation.method)return c.a.regression;switch(t.getClassLength(e)){case 1:return c.a.regression;case 2:return c.a.binary;default:return c.a.multiclass}},t.buildGlobalProperties=function(e){var t={};return e.precomputedExplanations&&e.precomputedExplanations.globalFeatureImportance&&e.precomputedExplanations.globalFeatureImportance.scores&&(t.isGlobalImportanceDerivedFromLocal=!1,e.precomputedExplanations.globalFeatureImportance.scores.every((function(e){return Array.isArray(e)}))?(t.globalImportance=e.precomputedExplanations.globalFeatureImportance.scores,t.globalImportanceIntercept=e.precomputedExplanations.globalFeatureImportance.intercept):(t.globalImportance=e.precomputedExplanations.globalFeatureImportance.scores.map((function(e){return[e]})),t.globalImportanceIntercept=[e.precomputedExplanations.globalFeatureImportance.intercept])),t},t.buildInitialExplanationContext=function(e){var r,n=t.buildModelMetadata(e),a=new $r(e,n);e&&e.precomputedExplanations&&e.precomputedExplanations.localFeatureImportance&&e.precomputedExplanations.localFeatureImportance.scores&&(r=e.precomputedExplanations.localFeatureImportance);var s=new o.c({dataset:e.testData,predictedY:e.predictedY,predictedProbabilities:e.probabilityY,trueY:e.trueY,localExplanations:r,metadata:n}),u=t.buildGlobalProperties(e),d=[new Ar.a(l.a.Cohort.defaultLabel,s,[])];return 0!==a.errorStrings.length&&void 0!==e.telemetryHook&&e.telemetryHook({message:"Invalid inputs",level:i.TelemetryLevels.error,context:a.errorStrings.length}),{cohorts:d,validationWarnings:a.errorStrings,activeGlobalTab:vn.modelPerformance,jointDataset:s,modelMetadata:n,modelChartConfig:void 0,dataChartConfig:void 0,whatIfChartConfig:void 0,dependenceProps:void 0,globalBarConfig:void 0,globalImportanceIntercept:u.globalImportanceIntercept,globalImportance:u.globalImportance,isGlobalImportanceDerivedFromLocal:u.isGlobalImportanceDerivedFromLocal,sortVector:void 0,showingDatasizeWarning:s.datasetRowCount>t.ROW_WARNING_SIZE,selectedWeightVector:n.modelType===c.a.multiclass?mn.a.absAvg:0}},t.prototype.render=function(){var e,r,n=this,i=this.state.cohorts.map((function(e){return e.getCohortID().toString()})),o=(e=Object(v.A)(),Object(v.E)({pivotLabelWrapper:{justifyContent:"space-between",display:"flex",flexDirection:"row",padding:"0 30px"},page:{maxHeight:"1000px",backgroundColor:e.semanticColors.bodyBackground,color:e.semanticColors.bodyText}}));return void 0!==this.state.editingCohortIndex&&(r=this.state.editingCohortIndex===this.state.cohorts.length?{cohortName:l.a.formatString(l.a.CohortEditor.placeholderName,this.state.editingCohortIndex),filterList:[]}:{cohortName:this.state.cohorts[this.state.editingCohortIndex].name,filterList:wn(this.state.cohorts[this.state.editingCohortIndex].filters)}),a.a.createElement("div",{className:o.page,style:{maxHeight:"1000px"}},this.state.showingDatasizeWarning&&a.a.createElement(ln,{onDismiss:this.clearSizeWarning,dismissButtonAriaLabel:"Close",messageBarType:Tr.warning},a.a.createElement("div",null,a.a.createElement(b.a,null,l.a.ValidationErrors.datasizeWarning),a.a.createElement(T.a,{onClick:this.openCohort.bind(this,0)},l.a.ValidationErrors.addFilters))),0!==this.state.validationWarnings.length&&a.a.createElement(ln,{onDismiss:this.clearWarning,dismissButtonAriaLabel:"Close",messageBarType:Tr.warning},a.a.createElement("div",null,a.a.createElement(b.a,{block:!0},l.a.ValidationErrors.errorHeader),this.state.validationWarnings.map((function(e){return a.a.createElement(b.a,{block:!0},e)})))),a.a.createElement(Kr,{cohorts:this.state.cohorts,jointDataset:this.state.jointDataset,metadata:this.state.modelMetadata,editCohort:this.openCohort,cloneAndEdit:this.cloneAndOpenCohort}),void 0!==r&&a.a.createElement(fn,{jointDataset:this.state.jointDataset,filterList:r.filterList,cohortName:r.cohortName,onSave:this.onCohortChange,onCancel:this.closeCohortEditor,onDelete:this.deleteCohort,isNewCohort:this.state.editingCohortIndex===this.state.cohorts.length,deleteIsDisabled:1===this.state.cohorts.length}),a.a.createElement("div",{className:t.classNames.pivotWrapper},a.a.createElement(d.a,{componentRef:function(e){n.pivotRef=e},selectedKey:this.state.activeGlobalTab,onLinkClick:this.handleGlobalTabClick,linkSize:p.b.normal,headersOnly:!0,styles:{root:o.pivotLabelWrapper}},this.pivotItems.map((function(e){return a.a.createElement(h.a,bn({key:e.itemKey},e))}))),this.state.activeGlobalTab===vn.modelPerformance&&a.a.createElement(Wr,{jointDataset:this.state.jointDataset,metadata:this.state.modelMetadata,chartProps:this.state.modelChartConfig,onChange:this.onModelConfigChanged,cohorts:this.state.cohorts}),this.state.activeGlobalTab===vn.dataExploration&&a.a.createElement(Jr,{jointDataset:this.state.jointDataset,metadata:this.state.modelMetadata,chartProps:this.state.dataChartConfig,onChange:this.onConfigChanged,cohorts:this.state.cohorts,editCohort:this.openCohort}),this.state.activeGlobalTab===vn.explanationTab&&a.a.createElement(g.a,{globalBarSettings:this.state.globalBarConfig,sortVector:this.state.sortVector,dependenceProps:this.state.dependenceProps,jointDataset:this.state.jointDataset,metadata:this.state.modelMetadata,globalImportance:this.state.globalImportance,isGlobalDerivedFromLocal:this.state.isGlobalImportanceDerivedFromLocal,onChange:this.setGlobalBarSettings,onDependenceChange:this.onDependenceChange,cohorts:this.state.cohorts,cohortIDs:i,selectedWeightVector:this.state.selectedWeightVector,weightOptions:this.weightVectorOptions,weightLabels:this.weightVectorLabels,onWeightChange:this.onWeightVectorChange,explanationMethod:this.props.explanationMethod}),this.state.activeGlobalTab===vn.whatIfTab&&a.a.createElement(jr,{jointDataset:this.state.jointDataset,metadata:this.state.modelMetadata,cohorts:this.state.cohorts,onChange:this.onWhatIfConfigChanged,chartProps:this.state.whatIfChartConfig,invokeModel:this.state.requestPredictions,editCohort:this.openCohort,selectedWeightVector:this.state.selectedWeightVector,weightOptions:this.weightVectorOptions,weightLabels:this.weightVectorLabels,onWeightChange:this.onWeightVectorChange})))},t.prototype.validatePredictMethod=function(){return _n(this,void 0,void 0,(function(){var e;return xn(this,(function(t){switch(t.label){case 0:if(!(this.props.requestPredictions&&void 0!==this.props.testData&&this.props.testData.length>0))return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),e=new AbortController,[4,this.props.requestPredictions([this.props.testData[0]],e.signal)];case 2:return void 0!==t.sent()&&this.setState({requestPredictions:this.props.requestPredictions}),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},t.prototype.onConfigChanged=function(e){this.setState({dataChartConfig:e})},t.prototype.onModelConfigChanged=function(e){this.setState({modelChartConfig:e})},t.prototype.onWhatIfConfigChanged=function(e){this.setState({whatIfChartConfig:e})},t.prototype.onDependenceChange=function(e){this.setState({dependenceProps:e})},t.prototype.handleGlobalTabClick=function(e){var t=vn[e.props.itemKey];this.setState({activeGlobalTab:t})},t.prototype.setGlobalBarSettings=function(e){this.setState({globalBarConfig:e})},t.prototype.setSortVector=function(){this.setState({sortVector:y.a.getSortIndices(this.state.cohorts[0].calculateAverageImportance()).reverse()})},t.prototype.onCohortChange=function(e){var t=wn(this.state.cohorts);t[this.state.editingCohortIndex]=e,this.setState({cohorts:t,editingCohortIndex:void 0})},t.prototype.onWeightVectorChange=function(e){this.state.jointDataset.buildLocalFlattenMatrix(e),this.state.cohorts.forEach((function(e){return e.clearCachedImportances()})),this.setState({selectedWeightVector:e})},t.prototype.deleteCohort=function(){var e=wn(this.state.cohorts);e.splice(this.state.editingCohortIndex,1),this.setState({cohorts:e})},t.prototype.clearWarning=function(){this.setState({validationWarnings:[]})},t.prototype.clearSizeWarning=function(){this.setState({showingDatasizeWarning:!1})},t.prototype.openCohort=function(e){this.setState({editingCohortIndex:e})},t.prototype.cloneAndOpenCohort=function(e){var t=this.state.cohorts[e],r=wn(this.state.cohorts);r.push(new Ar.a(t.name+l.a.CohortBanner.copy,this.state.jointDataset,wn(t.filters))),this.setState({cohorts:r,editingCohortIndex:this.state.cohorts.length})},t.prototype.closeCohortEditor=function(){this.setState({editingCohortIndex:void 0})},t.iconsInitialized=!1,t.ROW_WARNING_SIZE=6e3,t.ROW_ERROR_SIZE=1e4,t.classNames=Object(v.E)({pivotWrapper:{display:"contents"}}),t.getClassLength=u.a((function(e){if(e.precomputedExplanations&&e.precomputedExplanations.localFeatureImportance&&e.precomputedExplanations.localFeatureImportance.scores){var t=e.precomputedExplanations.localFeatureImportance.scores;return t.every((function(e){return e.every((function(e){return Array.isArray(e)}))}))?t.length:1}return e.precomputedExplanations&&e.precomputedExplanations.globalFeatureImportance&&e.precomputedExplanations.globalFeatureImportance.scores&&e.precomputedExplanations.globalFeatureImportance.scores.every((function(e){return Array.isArray(e)}))?e.precomputedExplanations.globalFeatureImportance.scores[0].length:e.probabilityY&&Array.isArray(e.probabilityY)&&Array.isArray(e.probabilityY[0])&&e.probabilityY[0].length>0?e.probabilityY[0].length:1})),t}(a.a.PureComponent)},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(2),a=r(266),i={settings:{},scopedSettings:{},inCustomizerContext:!1},o=a.a.getValue("customizations",{settings:{},scopedSettings:{},inCustomizerContext:!1}),s=[],l=function(){function e(){}return e.reset=function(){o.settings={},o.scopedSettings={}},e.applySettings=function(t){o.settings=Object(n.a)(Object(n.a)({},o.settings),t),e._raiseChange()},e.applyScopedSettings=function(t,r){o.scopedSettings[t]=Object(n.a)(Object(n.a)({},o.scopedSettings[t]),r),e._raiseChange()},e.getSettings=function(e,t,r){void 0===r&&(r=i);for(var n={},a=t&&r.scopedSettings[t]||{},s=t&&o.scopedSettings[t]||{},l=0,c=e;l<c.length;l++){var u=c[l];n[u]=a[u]||r.settings[u]||s[u]||o.settings[u]}return n},e.applyBatchedUpdates=function(t,r){e._suppressUpdates=!0;try{t()}catch(e){}e._suppressUpdates=!1,r||e._raiseChange()},e.observe=function(e){s.push(e)},e.unobserve=function(e){s=s.filter((function(t){return t!==e}))},e._raiseChange=function(){e._suppressUpdates||s.forEach((function(e){return e()}))},e}()},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e.absoluteGlobal="absoluteGlobal",e.absoluteLocal="absoluteLocal"}(n||(n={}))},function(e,t,r){"use strict";function n(e){i!==e&&(i=e)}function a(){return void 0===i&&(i="undefined"!=typeof document&&!!document.documentElement&&"rtl"===document.documentElement.getAttribute("dir")),i}r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return o}));var i=a();function o(){return{rtl:a()}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return o}));var n=r(9),a=Object(n.E)({root:{display:"inline-block"},placeholder:["ms-Icon-placeHolder",{width:"1em"}],image:["ms-Icon-imageContainer",{overflow:"hidden"}]}),i="ms-Icon",o=function(e){var t=e.className,r=e.iconClassName,n=e.isPlaceholder,i=e.isImage,o=e.styles;return{root:[n&&a.placeholder,a.root,i&&a.image,r,t,o&&o.root,o&&o.imageContainer]}}},function(e,t,r){"use strict";var n,a;r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),function(e){e[e.xSmall=0]="xSmall",e[e.small=1]="small",e[e.medium=2]="medium",e[e.large=3]="large"}(n||(n={})),function(e){e[e.normal=0]="normal",e[e.large=1]="large"}(a||(a={}))},,function(e,t,r){"use strict";var n,a=r(2),i=r(24),o={};var s={"user-select":1};function l(e,t){var r=function(){if(!n){var e="undefined"!=typeof document?document:void 0,t="undefined"!=typeof navigator?navigator:void 0,r=t?t.userAgent.toLowerCase():void 0;n=e?{isWebkit:!!(e&&"WebkitAppearance"in e.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!(!t||!/rv:11.0/i.test(t.userAgent)&&!/Edge\/\d./i.test(navigator.userAgent))}:{isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return n}(),a=e[t];if(s[a]){var i=e[t+1];s[a]&&(r.isWebkit&&e.push("-webkit-"+a,i),r.isMoz&&e.push("-moz-"+a,i),r.isMs&&e.push("-ms-"+a,i),r.isOpera&&e.push("-o-"+a,i))}}var c,u=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function d(e,t){var r=e[t],n=e[t+1];if("number"==typeof n){var a=-1===u.indexOf(r)?"px":"";e[t+1]=""+n+a}}var p="left",h="right",f="@noflip",m=((c={})[p]=h,c[h]=p,c),g={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function v(e,t,r){if(e.rtl){var n=t[r];if(!n)return;var a=t[r+1];if("string"==typeof a&&a.indexOf(f)>=0)t[r+1]=a.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(n.indexOf(p)>=0)t[r]=n.replace(p,h);else if(n.indexOf(h)>=0)t[r]=n.replace(h,p);else if(String(a).indexOf(p)>=0)t[r+1]=a.replace(p,h);else if(String(a).indexOf(h)>=0)t[r+1]=a.replace(h,p);else if(m[n])t[r]=m[n];else if(g[a])t[r+1]=g[a];else switch(n){case"margin":case"padding":t[r+1]=function(e){if("string"==typeof e){var t=e.split(" ");if(4===t.length)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}(a);break;case"box-shadow":t[r+1]=function(e,t){var r=e.split(" "),n=parseInt(r[t],10);return r[0]=r[0].replace(String(n),String(-1*n)),r.join(" ")}(a,0)}}}r.d(t,"b",(function(){return k})),r.d(t,"d",(function(){return M})),r.d(t,"a",(function(){return T})),r.d(t,"c",(function(){return C}));var y="displayName";var b=/\:global\((.+?)\)/g;function _(e){if(!b.test(e))return e;for(var t=[],r=/\:global\((.+?)\)/g,n=null;n=r.exec(e);)n[1].indexOf(",")>-1&&t.push([n.index,n.index+n[0].length,n[1].split(",").map((function(e){return":global("+e.trim()+")"})).join(", ")]);return t.reverse().reduce((function(e,t){var r=t[0],n=t[1],a=t[2];return e.slice(0,r)+a+e.slice(n)}),e)}function x(e,t){return e.indexOf(":global(")>=0?e.replace(b,"$1"):0===e.indexOf(":")?t+e:e.indexOf("&")<0?t+" "+e:e}function w(e,t,r){var n="string"==typeof r?r.split(" "):[r];e[t+"Top"]=n[0],e[t+"Right"]=n[1]||n[0],e[t+"Bottom"]=n[2]||n[0],e[t+"Left"]=n[3]||n[1]||n[0]}function k(e,t){if(!t)return"";var r,n,a,i=[];for(var s in t)t.hasOwnProperty(s)&&s!==y&&void 0!==t[s]&&i.push(s,t[s]);for(var c=0;c<i.length;c+=2)a=void 0,a=(r=i)[n=c],r[n]=o[a]=o[a]||a.replace(/([A-Z])/g,"-$1").toLowerCase(),d(i,c),v(e,i,c),l(i,c);for(c=1;c<i.length;c+=4)i.splice(c,1,":",i[c],";");return i.join("")}function M(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=function e(t,r,n){void 0===r&&(r={__order:[]}),void 0===n&&(n="&");var a=i.a.getInstance(),o=r[n];o||(o={},r[n]=o,r.__order.push(n));for(var s=0,l=t;s<l.length;s++){var c=l[s];if("string"==typeof c){var u=a.argsFromClassName(c);u&&e(u,r,n)}else if(Array.isArray(c))e(c,r,n);else for(var d in c)if("selectors"===d){var p=c.selectors,h=function(t){if(p.hasOwnProperty(t)){var a=p[t];0===t.indexOf("@")?e([a],r,t=t+"{"+n):t.indexOf(",")>-1?_(t).split(",").map((function(e){return e.trim()})).forEach((function(t){return e([a],r,x(t,n))})):e([a],r,x(t,n))}};for(var f in p)h(f)}else void 0!==c[d]&&("margin"===d||"padding"===d?w(o,d,c[d]):o[d]=c[d])}return r}(t),a=function(e,t){for(var r=[e.rtl?"rtl":"ltr"],n=!1,a=0,i=t.__order;a<i.length;a++){var o=i[a];r.push(o);var s=t[o];for(var l in s)s.hasOwnProperty(l)&&void 0!==s[l]&&(n=!0,r.push(l,s[l]))}return n?r.join(""):void 0}(e,n);if(a){var o=i.a.getInstance(),s={className:o.classNameFromKey(a),key:a,args:t};if(!s.className){s.className=o.getClassName(function(e){var t=e&&e["&"];return t?t.displayName:void 0}(n));for(var l=[],c=0,u=n.__order;c<u.length;c++){var d=u[c];l.push(d,k(e,n[d]))}s.rulesToInsert=l}return s}}function T(e){var t=i.a.getInstance(),r=e.className,n=e.key,a=e.args,o=e.rulesToInsert;if(o){for(var s=0;s<o.length;s+=2){var l=o[s+1];if(l){var c=o[s],u=(c=c.replace(/&/g,"."+e.className))+"{"+l+"}"+(0===c.indexOf("@")?"}":"");t.insertRule(u)}}t.cacheClassName(r,n,a,o)}}function C(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=M.apply(void 0,Object(a.e)([e],t));return n?(T(n),n.className):""}},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return u}));var n=r(24),a=n.a.getInstance();a&&a.onReset&&n.a.getInstance().onReset((function(){i++}));var i=0,o={empty:!0},s={},l="undefined"==typeof WeakMap?null:WeakMap;function c(e,t,r){if(void 0===t&&(t=100),void 0===r&&(r=!1),!l)return e;var n,a=0,o=i;return function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c=n;(void 0===n||o!==i||t>0&&a>t)&&(n=p(),a=0,o=i),c=n;for(var u=0;u<s.length;u++){var h=d(s[u]);c.map.has(h)||c.map.set(h,p()),c=c.map.get(h)}return c.hasOwnProperty("value")||(c.value=e.apply(void 0,s),a++),!r||null!==c.value&&void 0!==c.value||(c.value=e.apply(void 0,s)),c.value}}function u(e){if(!l)return e;var t=new l;return function(r){if(!r||"function"!=typeof r&&"object"!=typeof r)return e(r);if(t.has(r))return t.get(r);var n=e(r);return t.set(r,n),n}}function d(e){return e?"object"==typeof e||"function"==typeof e?e:(s[e]||(s[e]={val:e}),s[e]):o}function p(){return{map:l?new l:null}}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(46),a=r(9),i={outline:0},o=function(e){return{fontSize:e,margin:"0 4px",height:"16px",lineHeight:"16px",textAlign:"center",verticalAlign:"middle",flexShrink:0}},s=Object(n.b)((function(e){var t,r=e.semanticColors,n=e.effects,s=e.fonts,l=r.buttonBorder,c=r.disabledBackground,u=r.disabledText,d={left:-2,top:-2,bottom:-2,right:-2,border:"none",outlineColor:"ButtonText"};return{root:[Object(a.u)(e,{inset:1,highContrastStyle:d,borderColor:"transparent"}),e.fonts.medium,{boxSizing:"border-box",border:"1px solid "+l,userSelect:"none",display:"inline-block",textDecoration:"none",textAlign:"center",cursor:"pointer",verticalAlign:"top",padding:"0 16px",borderRadius:n.roundedCorner2,selectors:{":active > *":{position:"relative",left:0,top:0}}}],rootDisabled:[Object(a.u)(e,{inset:1,highContrastStyle:d,borderColor:"transparent"}),{backgroundColor:c,borderColor:c,color:u,cursor:"default",pointerEvents:"none",selectors:(t={":hover":i,":focus":i},t[a.f]={color:"grayText",borderColor:"grayText"},t)}],iconDisabled:{color:u},menuIconDisabled:{color:u},flexContainer:{display:"flex",height:"100%",flexWrap:"nowrap",justifyContent:"center",alignItems:"center"},description:{display:"block"},textContainer:{flexGrow:1,display:"block"},icon:o(s.mediumPlus.fontSize),menuIcon:o(s.small.fontSize),label:{margin:"0 4px",lineHeight:"100%",display:"block"},screenReaderText:a.B}}))},function(e,t,r){"use strict";var n,a=r(2),i=r(0),o=r(46),s=r(338),l=r(363),c=r(26),u=r(71),d=r(60),p=r(77),h=r(95),f=r(365),m=r(381),g=r(268),v=r(82),y=r(42),b=function(e){var t=e.className,r=e.imageProps,n=Object(d.d)(e,d.e),o=e["aria-label"]?{}:{role:"presentation","aria-hidden":!r.alt&&!r["aria-labelledby"]};return i.createElement("div",Object(a.a)({},o,n,{className:Object(s.a)(y.a,y.b.root,y.b.image,t)}),i.createElement(v.a,Object(a.a)({},r)))},_=r(15),x=r(354);!function(e){e[e.Normal=0]="Normal",e[e.Divider=1]="Divider",e[e.Header=2]="Header",e[e.Section=3]="Section"}(n||(n={}));var w=r(35),k=r(388),M=r(355),T=r(361),C=r(362),S=r(276),L=r(340),A=r(34),E=r(17);function D(e){return e.canCheck?!(!e.isChecked&&!e.checked):"boolean"==typeof e.isChecked?e.isChecked:"boolean"==typeof e.checked?e.checked:null}function I(e){return!(!e.subMenuProps&&!e.items)}function P(e){return!(!e.isDisabled&&!e.disabled)}function O(e){return null!==D(e)?"menuitemcheckbox":"menuitem"}var R=r(59),F=r(371),z=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.openSubMenu=function(){var e=t.props,r=e.item,n=e.openSubMenu,a=e.getSubmenuTarget;if(a){var i=a();I(r)&&n&&i&&n(r,i)}},t.dismissSubMenu=function(){var e=t.props,r=e.item,n=e.dismissSubMenu;I(r)&&n&&n()},t.dismissMenu=function(e){var r=t.props.dismissMenu;r&&r(void 0,e)},t}return Object(a.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.item,r=e.classNames;return i.createElement("div",{className:t.split?r.linkContentMenu:r.linkContent},function(e){var t=e.onCheckmarkClick,r=e.item,n=e.classNames,a=D(r);if(t){return i.createElement(m.a,{iconName:!1!==r.canCheck&&a?"CheckMark":"",className:n.checkmarkIcon,onClick:function(e){return t(r,e)}})}return null}(this.props),function(e){var t=e.item,r=e.hasIcons,n=e.classNames,o=t.iconProps;return r?t.onRenderIcon?t.onRenderIcon(e):i.createElement(m.a,Object(a.a)({},o,{className:n.icon})):null}(this.props),function(e){var t=e.item,r=e.classNames;return t.text||t.name?i.createElement("span",{className:r.label},t.text||t.name):null}(this.props),function(e){var t=e.item,r=e.classNames;return t.secondaryText?i.createElement("span",{className:r.secondaryText},t.secondaryText):null}(this.props),function(e){var t=e.item,r=e.classNames,n=e.theme;return I(t)?i.createElement(m.a,Object(a.a)({iconName:Object(S.a)(n)?"ChevronLeft":"ChevronRight"},t.submenuIconProps,{className:r.subMenuIcon})):null}(this.props))},t}(h.a),N=r(9),j=Object(o.b)((function(e){return Object(N.E)({wrapper:{display:"inline-flex",height:"100%",alignItems:"center"},divider:{width:1,height:"100%",backgroundColor:e.palette.neutralTertiaryAlt}})})),B=Object(N.z)(0,N.j),Y=Object(o.b)((function(){var e;return{selectors:(e={},e[N.f]={backgroundColor:"Highlight",borderColor:"Highlight",color:"HighlightText",MsHighContrastAdjust:"none"},e)}})),H=Object(o.b)((function(e){var t,r,n,i,o,s,l,c=e.semanticColors,u=e.fonts,d=e.palette,p=c.menuItemBackgroundHovered,h=c.menuItemTextHovered,f=c.menuItemBackgroundPressed,m=c.bodyDivider,g={item:[u.medium,{color:c.bodyText,position:"relative",boxSizing:"border-box"}],divider:{display:"block",height:"1px",backgroundColor:m,position:"relative"},root:[Object(N.u)(e),u.medium,{color:c.bodyText,backgroundColor:"transparent",border:"none",width:"100%",height:36,lineHeight:36,display:"block",cursor:"pointer",padding:"0px 8px 0 4px",textAlign:"left"}],rootDisabled:{color:c.disabledBodyText,cursor:"default",pointerEvents:"none",selectors:(t={},t[N.f]={color:"GrayText",opacity:1},t)},rootHovered:Object(a.a)({backgroundColor:p,color:h,selectors:{".ms-ContextualMenu-icon":{color:d.themeDarkAlt},".ms-ContextualMenu-submenuIcon":{color:d.neutralPrimary}}},Y()),rootFocused:Object(a.a)({backgroundColor:d.white},Y()),rootChecked:Object(a.a)({selectors:{".ms-ContextualMenu-checkmarkIcon":{color:d.neutralPrimary}}},Y()),rootPressed:Object(a.a)({backgroundColor:f,selectors:{".ms-ContextualMenu-icon":{color:d.themeDark},".ms-ContextualMenu-submenuIcon":{color:d.neutralPrimary}}},Y()),rootExpanded:Object(a.a)({backgroundColor:f,color:c.bodyTextChecked},Y()),linkContent:{whiteSpace:"nowrap",height:"inherit",display:"flex",alignItems:"center",maxWidth:"100%"},anchorLink:{padding:"0px 8px 0 4px",textRendering:"auto",color:"inherit",letterSpacing:"normal",wordSpacing:"normal",textTransform:"none",textIndent:"0px",textShadow:"none",textDecoration:"none",boxSizing:"border-box"},label:{margin:"0 4px",verticalAlign:"middle",display:"inline-block",flexGrow:"1",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},secondaryText:{color:e.palette.neutralSecondary,paddingLeft:"20px",textAlign:"right"},icon:{display:"inline-block",minHeight:"1px",maxHeight:36,fontSize:N.i.medium,width:N.i.medium,margin:"0 4px",verticalAlign:"middle",flexShrink:"0",selectors:(r={},r[B]={fontSize:N.i.large,width:N.i.large},r)},iconColor:{color:c.menuIcon,selectors:(n={},n[N.f]={color:"inherit"},n["$root:hover &"]={selectors:(i={},i[N.f]={color:"HighlightText"},i)},n["$root:focus &"]={selectors:(o={},o[N.f]={color:"HighlightText"},o)},n)},iconDisabled:{color:c.disabledBodyText},checkmarkIcon:{color:c.bodySubtext,selectors:(s={},s[N.f]={color:"HighlightText"},s)},subMenuIcon:{height:36,lineHeight:36,color:d.neutralSecondary,textAlign:"center",display:"inline-block",verticalAlign:"middle",flexShrink:"0",fontSize:N.i.small,selectors:(l={":hover":{color:d.neutralPrimary},":active":{color:d.neutralPrimary}},l[B]={fontSize:N.i.medium},l)},splitButtonFlexContainer:[Object(N.u)(e),{display:"flex",height:36,flexWrap:"nowrap",justifyContent:"center",alignItems:"flex-start"}]};return Object(N.r)(g)})),V=r(64),U=Object(N.z)(0,N.j),W=Object(o.b)((function(e){var t;return Object(N.E)(j(e),{wrapper:{position:"absolute",right:28,selectors:(t={},t[U]={right:32},t)},divider:{height:16,width:1}})})),G={item:"ms-ContextualMenu-item",divider:"ms-ContextualMenu-divider",root:"ms-ContextualMenu-link",isChecked:"is-checked",isExpanded:"is-expanded",isDisabled:"is-disabled",linkContent:"ms-ContextualMenu-linkContent",linkContentMenu:"ms-ContextualMenu-linkContent",icon:"ms-ContextualMenu-icon",iconColor:"ms-ContextualMenu-iconColor",checkmarkIcon:"ms-ContextualMenu-checkmarkIcon",subMenuIcon:"ms-ContextualMenu-submenuIcon",label:"ms-ContextualMenu-itemText",secondaryText:"ms-ContextualMenu-secondaryText",splitMenu:"ms-ContextualMenu-splitMenu"},q=Object(o.b)((function(e,t,r,n,a,i,o,s,l,c,u,d){var p,h,f,m,g=H(e),v=Object(N.v)(G,e);return Object(N.E)({item:[v.item,g.item,o],divider:[v.divider,g.divider,s],root:[v.root,g.root,n&&[v.isChecked,g.rootChecked],a&&g.anchorLink,r&&[v.isExpanded,g.rootExpanded],t&&[v.isDisabled,g.rootDisabled],!t&&!r&&[{selectors:(p={":hover":g.rootHovered,":active":g.rootPressed},p["."+V.a+" &:focus, ."+V.a+" &:focus:hover"]=g.rootFocused,p["."+V.a+" &:hover"]={background:"inherit;"},p)}],d],splitPrimary:[g.root,{width:"calc(100% - 28px)"},n&&["is-checked",g.rootChecked],(t||u)&&["is-disabled",g.rootDisabled],!(t||u)&&!n&&[{selectors:(h={":hover":g.rootHovered},h[":hover ~ ."+v.splitMenu]=g.rootHovered,h[":active"]=g.rootPressed,h["."+V.a+" &:focus, ."+V.a+" &:focus:hover"]=g.rootFocused,h["."+V.a+" &:hover"]={background:"inherit;"},h)}]],splitMenu:[v.splitMenu,g.root,{flexBasis:"0",padding:"0 8px",minWidth:"28px"},r&&["is-expanded",g.rootExpanded],t&&["is-disabled",g.rootDisabled],!t&&!r&&[{selectors:(f={":hover":g.rootHovered,":active":g.rootPressed},f["."+V.a+" &:focus, ."+V.a+" &:focus:hover"]=g.rootFocused,f["."+V.a+" &:hover"]={background:"inherit;"},f)}]],anchorLink:g.anchorLink,linkContent:[v.linkContent,g.linkContent],linkContentMenu:[v.linkContentMenu,g.linkContent,{justifyContent:"center"}],icon:[v.icon,i&&g.iconColor,g.icon,l,t&&[v.isDisabled,g.iconDisabled]],iconColor:g.iconColor,checkmarkIcon:[v.checkmarkIcon,i&&g.checkmarkIcon,g.icon,l],subMenuIcon:[v.subMenuIcon,g.subMenuIcon,c,r&&{color:e.palette.neutralPrimary},t&&[g.iconDisabled]],label:[v.label,g.label],secondaryText:[v.secondaryText,g.secondaryText],splitContainer:[g.splitButtonFlexContainer,!t&&!n&&[{selectors:(m={},m["."+V.a+" &:focus, ."+V.a+" &:focus:hover"]=g.rootFocused,m)}]]})})),K=function(e){var t=e.theme,r=e.disabled,n=e.expanded,a=e.checked,i=e.isAnchorLink,o=e.knownIcon,s=e.itemClassName,l=e.dividerClassName,c=e.iconClassName,u=e.subMenuClassName,d=e.primaryDisabled,p=e.className;return q(t,r,n,a,i,o,s,l,c,u,d,p)},X=Object(x.a)(z,K,void 0,{scope:"ContextualMenuItem"}),Z=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onItemMouseEnter=function(e){var r=t.props,n=r.item,a=r.onItemMouseEnter;a&&a(n,e,e.currentTarget)},t._onItemClick=function(e){var r=t.props,n=r.item,a=r.onItemClickBase;a&&a(n,e,e.currentTarget)},t._onItemMouseLeave=function(e){var r=t.props,n=r.item,a=r.onItemMouseLeave;a&&a(n,e)},t._onItemKeyDown=function(e){var r=t.props,n=r.item,a=r.onItemKeyDown;a&&a(n,e)},t._onItemMouseMove=function(e){var r=t.props,n=r.item,a=r.onItemMouseMove;a&&a(n,e,e.currentTarget)},t._getSubMenuId=function(e){var r=t.props.getSubMenuId;if(r)return r(e)},t._getSubmenuTarget=function(){},t}return Object(a.c)(t,e),t.prototype.shouldComponentUpdate=function(e){return!Object(p.c)(e,this.props)},t}(h.a),J=r(376),$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._anchor=i.createRef(),t._getMemoizedMenuButtonKeytipProps=Object(o.b)((function(e){return Object(a.a)(Object(a.a)({},e),{hasMenu:!0})})),t._getSubmenuTarget=function(){return t._anchor.current?t._anchor.current:void 0},t._onItemClick=function(e){var r=t.props,n=r.item,a=r.onItemClick;a&&a(n,e)},t}return Object(a.c)(t,e),t.prototype.render=function(){var e=this,t=this.props,r=t.item,n=t.classNames,o=t.index,s=t.focusableElementIndex,l=t.totalItemCount,c=t.hasCheckmarks,u=t.hasIcons,p=t.contextualMenuItemAs,h=void 0===p?X:p,f=t.expandedMenuItemKey,m=t.onItemClick,g=t.openSubMenu,v=t.dismissSubMenu,y=t.dismissMenu,b=r.rel;r.target&&"_blank"===r.target.toLowerCase()&&(b=b||"nofollow noopener noreferrer");var _=this._getSubMenuId(r),x=I(r),w=Object(d.d)(r,d.a),k=P(r),M=r.itemProps,T=r.keytipProps;return T&&x&&(T=this._getMemoizedMenuButtonKeytipProps(T)),i.createElement("div",null,i.createElement(J.a,{keytipProps:r.keytipProps,ariaDescribedBy:w["aria-describedby"],disabled:k},(function(t){return i.createElement("a",Object(a.a)({},w,t,{ref:e._anchor,href:r.href,target:r.target,rel:b,className:n.root,role:"menuitem","aria-owns":r.key===f?_:void 0,"aria-haspopup":x||void 0,"aria-expanded":x?r.key===f:void 0,"aria-posinset":s+1,"aria-setsize":l,"aria-disabled":P(r),style:r.style,onClick:e._onItemClick,onMouseEnter:e._onItemMouseEnter,onMouseLeave:e._onItemMouseLeave,onMouseMove:e._onItemMouseMove,onKeyDown:x?e._onItemKeyDown:void 0}),i.createElement(h,Object(a.a)({componentRef:r.componentRef,item:r,classNames:n,index:o,onCheckmarkClick:c&&m?m:void 0,hasIcons:u,openSubMenu:g,dismissSubMenu:v,dismissMenu:y,getSubmenuTarget:e._getSubmenuTarget},M)))})))},t}(Z),Q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._btn=i.createRef(),t._getMemoizedMenuButtonKeytipProps=Object(o.b)((function(e){return Object(a.a)(Object(a.a)({},e),{hasMenu:!0})})),t._getSubmenuTarget=function(){return t._btn.current?t._btn.current:void 0},t}return Object(a.c)(t,e),t.prototype.render=function(){var e=this,t=this.props,r=t.item,n=t.classNames,o=t.index,s=t.focusableElementIndex,l=t.totalItemCount,c=t.hasCheckmarks,u=t.hasIcons,p=t.contextualMenuItemAs,h=void 0===p?X:p,f=t.expandedMenuItemKey,m=t.onItemMouseDown,g=t.onItemClick,v=t.openSubMenu,y=t.dismissSubMenu,b=t.dismissMenu,_=this._getSubMenuId(r),x=D(r),w=null!==x,k=O(r),M=I(r),T=r.itemProps,C=r.ariaLabel,S=Object(d.d)(r,d.b);delete S.disabled;var L={className:n.root,onClick:this._onItemClick,onKeyDown:M?this._onItemKeyDown:void 0,onMouseEnter:this._onItemMouseEnter,onMouseLeave:this._onItemMouseLeave,onMouseDown:function(e){return m?m(r,e):void 0},onMouseMove:this._onItemMouseMove,href:r.href,title:r.title,"aria-label":C,"aria-haspopup":M||void 0,"aria-owns":r.key===f?_:void 0,"aria-expanded":M?r.key===f:void 0,"aria-checked":w?!!x:void 0,"aria-posinset":s+1,"aria-setsize":l,"aria-disabled":P(r),role:r.role||k,style:r.style},A=r.keytipProps;return A&&M&&(A=this._getMemoizedMenuButtonKeytipProps(A)),i.createElement(J.a,{keytipProps:A,ariaDescribedBy:S["aria-describedby"],disabled:P(r)},(function(t){return i.createElement("button",Object(a.a)({ref:e._btn},S,L,t),i.createElement(h,Object(a.a)({componentRef:r.componentRef,item:r,classNames:n,index:o,onCheckmarkClick:c&&g?g:void 0,hasIcons:u,openSubMenu:v,dismissSubMenu:y,dismissMenu:b,getSubmenuTarget:e._getSubmenuTarget},T)))}))},t}(Z),ee=Object(M.a)(),te=Object(x.a)((function(e){var t=e.styles,r=e.theme,n=e.getClassNames,a=e.className,o=ee(t,{theme:r,getClassNames:n,className:a});return i.createElement("span",{className:o.wrapper},i.createElement("span",{className:o.divider}))}),(function(e){var t=e.theme,r=e.getClassNames,n=e.className;if(!t)throw new Error("Theme is undefined or null.");if(r){var a=r(t);return{wrapper:[a.wrapper],divider:[a.divider]}}return{wrapper:[{display:"inline-flex",height:"100%",alignItems:"center"},n],divider:[{width:1,height:"100%",backgroundColor:t.palette.neutralTertiaryAlt}]}}),void 0,{scope:"VerticalDivider"}),re=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._getMemoizedMenuButtonKeytipProps=Object(o.b)((function(e){return Object(a.a)(Object(a.a)({},e),{hasMenu:!0})})),t._onItemKeyDown=function(e){var r=t.props,n=r.item,a=r.onItemKeyDown;e.which===c.a.enter?(t._executeItemClick(e),e.preventDefault(),e.stopPropagation()):a&&a(n,e)},t._getSubmenuTarget=function(){return t._splitButton},t._onItemMouseEnterPrimary=function(e){var r=t.props,n=r.item,i=r.onItemMouseEnter;i&&i(Object(a.a)(Object(a.a)({},n),{subMenuProps:void 0,items:void 0}),e,t._splitButton)},t._onItemMouseEnterIcon=function(e){var r=t.props,n=r.item,a=r.onItemMouseEnter;a&&a(n,e,t._splitButton)},t._onItemMouseMovePrimary=function(e){var r=t.props,n=r.item,i=r.onItemMouseMove;i&&i(Object(a.a)(Object(a.a)({},n),{subMenuProps:void 0,items:void 0}),e,t._splitButton)},t._onItemMouseMoveIcon=function(e){var r=t.props,n=r.item,a=r.onItemMouseMove;a&&a(n,e,t._splitButton)},t._onIconItemClick=function(e){var r=t.props,n=r.item,a=r.onItemClickBase;a&&a(n,e,t._splitButton?t._splitButton:e.currentTarget)},t._executeItemClick=function(e){var r=t.props,n=r.item,a=r.executeItemClick,i=r.onItemClick;if(!n.disabled&&!n.isDisabled)return t._processingTouch&&i?i(n,e):void(a&&a(n,e))},t._onTouchStart=function(e){!t._splitButton||"onpointerdown"in t._splitButton||t._handleTouchAndPointerEvent(e)},t._onPointerDown=function(e){"touch"===e.pointerType&&(t._handleTouchAndPointerEvent(e),e.preventDefault(),e.stopImmediatePropagation())},t}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){this._splitButton&&"onpointerdown"in this._splitButton&&this._events.on(this._splitButton,"pointerdown",this._onPointerDown,!0)},t.prototype.render=function(){var e=this,t=this.props,r=t.item,n=t.classNames,o=t.index,s=t.focusableElementIndex,l=t.totalItemCount,c=t.hasCheckmarks,u=t.hasIcons,d=t.onItemMouseLeave,p=t.expandedMenuItemKey,h=I(r),m=r.keytipProps;return m&&(m=this._getMemoizedMenuButtonKeytipProps(m)),i.createElement(J.a,{keytipProps:m,disabled:P(r)},(function(t){return i.createElement("div",{"data-ktp-target":t["data-ktp-target"],ref:function(t){return e._splitButton=t},role:O(r),"aria-label":r.ariaLabel,className:n.splitContainer,"aria-disabled":P(r),"aria-expanded":h?r.key===p:void 0,"aria-haspopup":!0,"aria-describedby":Object(f.a)(r.ariaDescription,t["aria-describedby"]),"aria-checked":r.isChecked||r.checked,"aria-posinset":s+1,"aria-setsize":l,onMouseEnter:e._onItemMouseEnterPrimary,onMouseLeave:d?d.bind(e,Object(a.a)(Object(a.a)({},r),{subMenuProps:null,items:null})):void 0,onMouseMove:e._onItemMouseMovePrimary,onKeyDown:e._onItemKeyDown,onClick:e._executeItemClick,onTouchStart:e._onTouchStart,tabIndex:0,"data-is-focusable":!0,"aria-roledescription":r["aria-roledescription"]},e._renderSplitPrimaryButton(r,n,o,c,u),e._renderSplitDivider(r),e._renderSplitIconButton(r,n,o,t))}))},t.prototype._renderSplitPrimaryButton=function(e,t,r,n,o){var s=this.props,l=s.contextualMenuItemAs,c=void 0===l?X:l,u=s.onItemClick,p={key:e.key,disabled:P(e)||e.primaryDisabled,name:e.name,text:e.text||e.name,className:t.splitPrimary,canCheck:e.canCheck,isChecked:e.isChecked,checked:e.checked,iconProps:e.iconProps,"data-is-focusable":!1},h=e.itemProps;return i.createElement("button",Object(a.a)({},Object(d.d)(p,d.b)),i.createElement(c,Object(a.a)({"data-is-focusable":!1,item:p,classNames:t,index:r,onCheckmarkClick:n&&u?u:void 0,hasIcons:o},h)))},t.prototype._renderSplitDivider=function(e){var t=e.getSplitButtonVerticalDividerClassNames||W;return i.createElement(te,{getClassNames:t})},t.prototype._renderSplitIconButton=function(e,t,r,n){var o=this.props,s=o.contextualMenuItemAs,l=void 0===s?X:s,c=o.onItemMouseLeave,u=o.onItemMouseDown,p=o.openSubMenu,h=o.dismissSubMenu,f=o.dismissMenu,m={onClick:this._onIconItemClick,disabled:P(e),className:t.splitMenu,subMenuProps:e.subMenuProps,submenuIconProps:e.submenuIconProps,split:!0,key:e.key},g=Object(a.a)(Object(a.a)({},Object(d.d)(m,d.b)),{onMouseEnter:this._onItemMouseEnterIcon,onMouseLeave:c?c.bind(this,e):void 0,onMouseDown:function(t){return u?u(e,t):void 0},onMouseMove:this._onItemMouseMoveIcon,"data-is-focusable":!1,"data-ktp-execute-target":n["data-ktp-execute-target"],"aria-hidden":!0}),v=e.itemProps;return i.createElement("button",Object(a.a)({},g),i.createElement(l,Object(a.a)({componentRef:e.componentRef,item:m,classNames:t,index:r,hasIcons:!1,openSubMenu:p,dismissSubMenu:h,dismissMenu:f,getSubmenuTarget:this._getSubmenuTarget},v)))},t.prototype._handleTouchAndPointerEvent=function(e){var t=this,r=this.props.onTap;r&&r(e),this._lastTouchTimeoutId&&(this._async.clearTimeout(this._lastTouchTimeoutId),this._lastTouchTimeoutId=void 0),this._processingTouch=!0,this._lastTouchTimeoutId=this._async.setTimeout((function(){t._processingTouch=!1,t._lastTouchTimeoutId=void 0}),500)},t}(Z),ne=Object(M.a)({disableCaching:!0}),ae=Object(M.a)({disableCaching:!0});function ie(e){return e.subMenuProps?e.subMenuProps.items:e.items}var oe,se=250,le=function(e){function t(t){var r=e.call(this,t)||this;return r._mounted=!1,r.dismiss=function(e,t){var n=r.props.onDismiss;n&&n(e,t)},r._onRenderMenuList=function(e,t){var a=0;return i.createElement("ul",{className:r._classNames.list,onKeyDown:r._onKeyDown,onKeyUp:r._onKeyUp,role:"menu"},e.items.map((function(t,i){var o=r._renderMenuItem(t,i,a,e.totalItemCount,e.hasCheckmarks,e.hasIcons);if(t.itemType!==n.Divider&&t.itemType!==n.Header){var s=t.customOnRenderListLength?t.customOnRenderListLength:1;a+=s}return o})))},r._onKeyDown=function(e){r._lastKeyDownWasAltOrMeta=r._isAltOrMeta(e);var t=e.which===c.a.escape&&(Object(T.a)()||Object(C.a)());return r._keyHandler(e,r._shouldHandleKeyDown,t)},r._shouldHandleKeyDown=function(e){return e.which===c.a.escape||r._shouldCloseSubMenu(e)||e.which===c.a.up&&(e.altKey||e.metaKey)},r._onMenuFocusCapture=function(e){r.props.delayUpdateFocusOnHover&&(r._shouldUpdateFocusOnMouseEvent=!0)},r._onKeyUp=function(e){return r._keyHandler(e,r._shouldHandleKeyUp,!0)},r._shouldHandleKeyUp=function(e){var t=r._lastKeyDownWasAltOrMeta&&r._isAltOrMeta(e);return r._lastKeyDownWasAltOrMeta=!1,!!t&&!(Object(C.a)()||Object(T.a)())},r._keyHandler=function(e,t,n){var a=!1;return t(e)&&(r._isFocusingPreviousElement=!0,r.dismiss(e,n),e.preventDefault(),e.stopPropagation(),a=!0),a},r._shouldCloseSubMenu=function(e){var t=Object(S.a)(r.props.theme)?c.a.right:c.a.left;return!(e.which!==t||!r.props.isSubMenu)&&(r._adjustedFocusZoneProps.direction===w.a.vertical||!!r._adjustedFocusZoneProps.checkForNoWrap&&!Object(L.o)(e.target,"data-no-horizontal-wrap"))},r._onMenuKeyDown=function(e){if(!r._onKeyDown(e)&&r._host){var t=!(!e.altKey&&!e.metaKey),n=e.which===c.a.up,a=e.which===c.a.down;if(!t&&(n||a)){var i=n?Object(L.h)(r._host,r._host.lastChild,!0):Object(L.e)(r._host,r._host.firstChild,!0);i&&(i.focus(),e.preventDefault(),e.stopPropagation())}}},r._onScroll=function(){r._isScrollIdle||void 0===r._scrollIdleTimeoutId?r._isScrollIdle=!1:(r._async.clearTimeout(r._scrollIdleTimeoutId),r._scrollIdleTimeoutId=void 0),r._scrollIdleTimeoutId=r._async.setTimeout((function(){r._isScrollIdle=!0}),se)},r._onItemMouseEnterBase=function(e,t,n){r._shouldIgnoreMouseEvent()||r._updateFocusOnMouseEvent(e,t,n)},r._onItemMouseMoveBase=function(e,t,n){var a=t.currentTarget;r._shouldUpdateFocusOnMouseEvent&&(r._gotMouseMove=!0,r._isScrollIdle&&void 0===r._enterTimerId&&a!==r._targetWindow.document.activeElement&&r._updateFocusOnMouseEvent(e,t,n))},r._onMouseItemLeave=function(e,t){if(!r._shouldIgnoreMouseEvent()&&(void 0!==r._enterTimerId&&(r._async.clearTimeout(r._enterTimerId),r._enterTimerId=void 0),void 0===r.state.expandedMenuItemKey))if(r._host.setActive)try{r._host.setActive()}catch(e){}else r._host.focus()},r._onItemMouseDown=function(e,t){e.onMouseDown&&e.onMouseDown(e,t)},r._onItemClick=function(e,t){r._onItemClickBase(e,t,t.currentTarget)},r._onItemClickBase=function(e,t,n){var a=ie(e);r._cancelSubMenuTimer(),I(e)||a&&a.length?e.key!==r.state.expandedMenuItemKey&&(r.setState({expandedByMouseClick:0!==t.nativeEvent.detail||"mouse"===t.nativeEvent.pointerType}),r._onItemSubMenuExpand(e,n)):r._executeItemClick(e,t),t.stopPropagation(),t.preventDefault()},r._onAnchorClick=function(e,t){r._executeItemClick(e,t),t.stopPropagation()},r._executeItemClick=function(e,t){if(!e.disabled&&!e.isDisabled){var n=!1;e.onClick?n=!!e.onClick(t,e):r.props.onItemClick&&(n=!!r.props.onItemClick(t,e)),(n||!t.defaultPrevented)&&r.dismiss(t,!0)}},r._onItemKeyDown=function(e,t){var n=Object(S.a)(r.props.theme)?c.a.left:c.a.right;e.disabled||t.which!==n&&t.which!==c.a.enter&&(t.which!==c.a.down||!t.altKey&&!t.metaKey)||(r.setState({expandedByMouseClick:!1}),r._onItemSubMenuExpand(e,t.currentTarget),t.preventDefault())},r._cancelSubMenuTimer=function(){void 0!==r._enterTimerId&&(r._async.clearTimeout(r._enterTimerId),r._enterTimerId=void 0)},r._onItemSubMenuExpand=function(e,t){r.state.expandedMenuItemKey!==e.key&&(r.state.expandedMenuItemKey&&r._onSubMenuDismiss(),t.focus(),r.setState({expandedMenuItemKey:e.key,submenuTarget:t}))},r._onSubMenuDismiss=function(e,t){t?r.dismiss(e,t):r._mounted&&r.setState({dismissedMenuItemKey:r.state.expandedMenuItemKey,expandedMenuItemKey:void 0,submenuTarget:void 0})},r._getSubMenuId=function(e){var t=r.state.subMenuId;return e.subMenuProps&&e.subMenuProps.id&&(t=e.subMenuProps.id),t},r._onPointerAndTouchEvent=function(e){r._cancelSubMenuTimer()},r.state={contextualMenuItems:void 0,subMenuId:Object(u.a)("ContextualMenu")},r._warnDeprecations({getMenuClassNames:"styles"}),r._id=t.id||Object(u.a)("ContextualMenu"),r._isFocusingPreviousElement=!1,r._isScrollIdle=!0,r._shouldUpdateFocusOnMouseEvent=!r.props.delayUpdateFocusOnHover,r._gotMouseMove=!1,r}return Object(a.c)(t,e),t.prototype.shouldComponentUpdate=function(e,t){return!(!e.shouldUpdateWhenHidden&&this.props.hidden&&e.hidden)&&(!Object(p.c)(this.props,e)||!Object(p.c)(this.state,t))},t.prototype.UNSAFE_componentWillUpdate=function(e){if(e.target!==this.props.target){var t=e.target;this._setTargetWindowAndElement(t)}this._isHidden(e)!==this._isHidden(this.props)&&(this._isHidden(e)?this._onMenuClosed():(this._onMenuOpened(),this._previousActiveElement=this._targetWindow?this._targetWindow.document.activeElement:null)),e.delayUpdateFocusOnHover!==this.props.delayUpdateFocusOnHover&&(this._shouldUpdateFocusOnMouseEvent=!e.delayUpdateFocusOnHover,this._gotMouseMove=this._shouldUpdateFocusOnMouseEvent&&this._gotMouseMove)},t.prototype.UNSAFE_componentWillMount=function(){var e=this.props.target;this._setTargetWindowAndElement(e),this.props.hidden||(this._previousActiveElement=this._targetWindow?this._targetWindow.document.activeElement:null)},t.prototype.componentDidMount=function(){this.props.hidden||this._onMenuOpened(),this._mounted=!0},t.prototype.componentWillUnmount=function(){this._tryFocusPreviousActiveElement(),this.props.onMenuDismissed&&this.props.onMenuDismissed(this.props),this._events.dispose(),this._async.dispose(),this._mounted=!1},t.prototype.render=function(){var e=this,t=this.props.isBeakVisible,r=this.props,o=r.items,l=r.labelElementId,c=r.id,u=r.className,d=r.beakWidth,p=r.directionalHint,h=r.directionalHintForRTL,f=r.alignTargetEdge,m=r.gapSpace,g=r.coverTarget,v=r.ariaLabel,y=r.doNotLayer,b=r.target,_=r.bounds,x=r.useTargetWidth,M=r.useTargetAsMinWidth,T=r.directionalHintFixed,C=r.shouldFocusOnMount,S=r.shouldFocusOnContainer,L=r.title,A=r.styles,E=r.theme,D=r.calloutProps,I=r.onRenderSubMenu,P=void 0===I?this._onRenderSubMenu:I,O=r.onRenderMenuList,z=void 0===O?this._onRenderMenuList:O,N=r.focusZoneProps,j=r.getMenuClassNames;this._classNames=j?j(E,u):ne(A,{theme:E,className:u});var B=function e(t){for(var r=0,a=t;r<a.length;r++){var i=a[r];if(i.iconProps)return!0;if(i.itemType===n.Section&&i.sectionProps&&e(i.sectionProps.items))return!0}return!1}(o);this._adjustedFocusZoneProps=Object(a.a)(Object(a.a)({},N),{direction:this._getFocusZoneDirection()});var Y,H=function(e){return e.some((function(e){return!!e.canCheck||!(!e.sectionProps||!e.sectionProps.items.some((function(e){return!0===e.canCheck})))}))}(o),V=this.state.expandedMenuItemKey&&!0!==this.props.hidden?this._getSubmenuProps():null;t=void 0===t?this.props.responsiveMode<=R.a.medium:t;var U=this._target;if((x||M)&&U&&U.offsetWidth){var W=U.getBoundingClientRect().width-2;x?Y={width:W}:M&&(Y={minWidth:W})}if(o&&o.length>0){for(var G=0,q=0,K=o;q<K.length;q++){var X=K[q];if(X.itemType!==n.Divider&&X.itemType!==n.Header)G+=X.customOnRenderListLength?X.customOnRenderListLength:1}var Z=this._classNames.subComponentStyles?this._classNames.subComponentStyles.callout:void 0;return i.createElement(F.a,Object(a.a)({styles:Z},D,{target:b,isBeakVisible:t,beakWidth:d,directionalHint:p,directionalHintForRTL:h,gapSpace:m,coverTarget:g,doNotLayer:y,className:Object(s.a)("ms-ContextualMenu-Callout",D&&D.className),setInitialFocus:C,onDismiss:this.props.onDismiss,onScroll:this._onScroll,bounds:_,directionalHintFixed:T,alignTargetEdge:f,hidden:this.props.hidden}),i.createElement("div",{"aria-label":v,"aria-labelledby":l,style:Y,ref:function(t){return e._host=t},id:c,className:this._classNames.container,tabIndex:S?0:-1,onKeyDown:this._onMenuKeyDown,onKeyUp:this._onKeyUp,onFocusCapture:this._onMenuFocusCapture},L&&i.createElement("div",{className:this._classNames.title}," ",L," "),o&&o.length?i.createElement(k.a,Object(a.a)({},this._adjustedFocusZoneProps,{className:this._classNames.root,isCircularNavigation:!0,handleTabKey:w.b.all}),z({items:o,totalItemCount:G,hasCheckmarks:H,hasIcons:B},this._onRenderMenuList)):null,V&&P(V,this._onRenderSubMenu)))}return null},t.prototype._isHidden=function(e){return!!e.hidden},t.prototype._onMenuOpened=function(){this._events.on(this._targetWindow,"resize",this.dismiss),this._shouldUpdateFocusOnMouseEvent=!this.props.delayUpdateFocusOnHover,this._gotMouseMove=!1,this.props.onMenuOpened&&this.props.onMenuOpened(this.props)},t.prototype._onMenuClosed=function(){this._events.off(this._targetWindow,"resize",this.dismiss),this._tryFocusPreviousActiveElement(),this.props.onMenuDismissed&&this.props.onMenuDismissed(this.props),this._shouldUpdateFocusOnMouseEvent=!this.props.delayUpdateFocusOnHover,this.setState({expandedByMouseClick:void 0,dismissedMenuItemKey:void 0,expandedMenuItemKey:void 0,submenuTarget:void 0})},t.prototype._tryFocusPreviousActiveElement=function(){var e=this;this._isFocusingPreviousElement&&this._previousActiveElement&&setTimeout((function(){e._previousActiveElement&&e._previousActiveElement.focus()}),0)},t.prototype._getFocusZoneDirection=function(){var e=this.props.focusZoneProps;return e&&void 0!==e.direction?e.direction:w.a.vertical},t.prototype._onRenderSubMenu=function(e,t){throw Error("ContextualMenuBase: onRenderSubMenu callback is null or undefined. Please ensure to set `onRenderSubMenu` property either manually or with `styled` helper.")},t.prototype._renderMenuItem=function(e,t,r,a,i,o){var s,l=[],c=e.iconProps||{iconName:"None"},u=e.getItemClassNames,d=e.itemProps,p=d?d.styles:void 0,h=e.itemType===n.Divider?e.className:void 0,f=e.submenuIconProps?e.submenuIconProps.className:"";if(u)s=u(this.props.theme,P(e),this.state.expandedMenuItemKey===e.key,!!D(e),!!e.href,"None"!==c.iconName,e.className,h,c.className,f,e.primaryDisabled);else{var m={theme:this.props.theme,disabled:P(e),expanded:this.state.expandedMenuItemKey===e.key,checked:!!D(e),isAnchorLink:!!e.href,knownIcon:"None"!==c.iconName,itemClassName:e.className,dividerClassName:h,iconClassName:c.className,subMenuClassName:f,primaryDisabled:e.primaryDisabled},g=this._classNames.subComponentStyles?this._classNames.subComponentStyles.menuItem:void 0;s=Object(N.E)(ae(K,m),ae(g,m),ae(p,m))}switch("-"!==e.text&&"-"!==e.name||(e.itemType=n.Divider),e.itemType){case n.Divider:l.push(this._renderSeparator(t,s));break;case n.Header:l.push(this._renderSeparator(t,s));var v=this._renderHeaderMenuItem(e,s,t,i,o);l.push(this._renderListItem(v,e.key||t,s,e.title));break;case n.Section:l.push(this._renderSectionItem(e,s,t,i,o));break;default:var y=this._renderNormalItem(e,s,t,r,a,i,o);l.push(this._renderListItem(y,e.key||t,s,e.title))}return l},t.prototype._renderSectionItem=function(e,t,r,o,s){var l=this,c=e.sectionProps;if(c){var u,d;if(c.title){var p=this._id+c.title,h={key:"section-"+c.title+"-title",itemType:n.Header,text:c.title,id:p};d={role:"group","aria-labelledby":p},u=this._renderHeaderMenuItem(h,t,r,o,s)}return c.items&&c.items.length>0?i.createElement("li",{role:"presentation",key:c.key||e.key||"section-"+r},i.createElement("div",Object(a.a)({},d),i.createElement("ul",{className:this._classNames.list},c.topDivider&&this._renderSeparator(r,t,!0,!0),u&&this._renderListItem(u,e.key||r,t,e.title),c.items.map((function(e,t){return l._renderMenuItem(e,t,t,c.items.length,o,s)})),c.bottomDivider&&this._renderSeparator(r,t,!1,!0)))):void 0}},t.prototype._renderListItem=function(e,t,r,n){return i.createElement("li",{role:"presentation",title:n,key:t,className:r.item},e)},t.prototype._renderSeparator=function(e,t,r,n){return n||e>0?i.createElement("li",{role:"separator",key:"separator-"+e+(void 0===r?"":r?"-top":"-bottom"),className:t.divider,"aria-hidden":"true"}):null},t.prototype._renderNormalItem=function(e,t,r,n,i,o,s){return e.onRender?e.onRender(Object(a.a)({"aria-posinset":n+1,"aria-setsize":i},e),this.dismiss):e.href?this._renderAnchorMenuItem(e,t,r,n,i,o,s):e.split&&I(e)?this._renderSplitButton(e,t,r,n,i,o,s):this._renderButtonItem(e,t,r,n,i,o,s)},t.prototype._renderHeaderMenuItem=function(e,t,r,n,o){var s=this.props.contextualMenuItemAs,l=void 0===s?X:s,c=e.itemProps,u=e.id,p=c&&Object(d.d)(c,d.c);return i.createElement("div",Object(a.a)({id:u,className:this._classNames.header},p,{style:e.style}),i.createElement(l,Object(a.a)({item:e,classNames:t,index:r,onCheckmarkClick:n?this._onItemClick:void 0,hasIcons:o},c)))},t.prototype._renderAnchorMenuItem=function(e,t,r,n,a,o,s){var l=this.props.contextualMenuItemAs,c=this.state.expandedMenuItemKey;return i.createElement($,{item:e,classNames:t,index:r,focusableElementIndex:n,totalItemCount:a,hasCheckmarks:o,hasIcons:s,contextualMenuItemAs:l,onItemMouseEnter:this._onItemMouseEnterBase,onItemMouseLeave:this._onMouseItemLeave,onItemMouseMove:this._onItemMouseMoveBase,onItemMouseDown:this._onItemMouseDown,executeItemClick:this._executeItemClick,onItemClick:this._onAnchorClick,onItemKeyDown:this._onItemKeyDown,getSubMenuId:this._getSubMenuId,expandedMenuItemKey:c,openSubMenu:this._onItemSubMenuExpand,dismissSubMenu:this._onSubMenuDismiss,dismissMenu:this.dismiss})},t.prototype._renderButtonItem=function(e,t,r,n,a,o,s){var l=this.props.contextualMenuItemAs,c=this.state.expandedMenuItemKey;return i.createElement(Q,{item:e,classNames:t,index:r,focusableElementIndex:n,totalItemCount:a,hasCheckmarks:o,hasIcons:s,contextualMenuItemAs:l,onItemMouseEnter:this._onItemMouseEnterBase,onItemMouseLeave:this._onMouseItemLeave,onItemMouseMove:this._onItemMouseMoveBase,onItemMouseDown:this._onItemMouseDown,executeItemClick:this._executeItemClick,onItemClick:this._onItemClick,onItemClickBase:this._onItemClickBase,onItemKeyDown:this._onItemKeyDown,getSubMenuId:this._getSubMenuId,expandedMenuItemKey:c,openSubMenu:this._onItemSubMenuExpand,dismissSubMenu:this._onSubMenuDismiss,dismissMenu:this.dismiss})},t.prototype._renderSplitButton=function(e,t,r,n,a,o,s){var l=this.props.contextualMenuItemAs,c=this.state.expandedMenuItemKey;return i.createElement(re,{item:e,classNames:t,index:r,focusableElementIndex:n,totalItemCount:a,hasCheckmarks:o,hasIcons:s,contextualMenuItemAs:l,onItemMouseEnter:this._onItemMouseEnterBase,onItemMouseLeave:this._onMouseItemLeave,onItemMouseMove:this._onItemMouseMoveBase,onItemMouseDown:this._onItemMouseDown,executeItemClick:this._executeItemClick,onItemClick:this._onItemClick,onItemClickBase:this._onItemClickBase,onItemKeyDown:this._onItemKeyDown,openSubMenu:this._onItemSubMenuExpand,dismissSubMenu:this._onSubMenuDismiss,dismissMenu:this.dismiss,expandedMenuItemKey:c,onTap:this._onPointerAndTouchEvent})},t.prototype._isAltOrMeta=function(e){return e.which===c.a.alt||"Meta"===e.key},t.prototype._shouldIgnoreMouseEvent=function(){return!this._isScrollIdle||!this._gotMouseMove},t.prototype._updateFocusOnMouseEvent=function(e,t,r){var n=this,a=r||t.currentTarget,i=this.props.subMenuHoverDelay,o=void 0===i?se:i;e.key!==this.state.expandedMenuItemKey&&(void 0!==this._enterTimerId&&(this._async.clearTimeout(this._enterTimerId),this._enterTimerId=void 0),void 0===this.state.expandedMenuItemKey&&a.focus(),I(e)?(t.stopPropagation(),this._enterTimerId=this._async.setTimeout((function(){a.focus(),n.setState({expandedByMouseClick:!0}),n._onItemSubMenuExpand(e,a),n._enterTimerId=void 0}),o)):this._enterTimerId=this._async.setTimeout((function(){n._onSubMenuDismiss(t),a.focus(),n._enterTimerId=void 0}),o))},t.prototype._getSubmenuProps=function(){var e=this.state,t=e.submenuTarget,r=e.expandedMenuItemKey,n=this._findItemByKey(r),a=null;return n&&(a={items:ie(n),target:t,onDismiss:this._onSubMenuDismiss,isSubMenu:!0,id:this.state.subMenuId,shouldFocusOnMount:!0,shouldFocusOnContainer:this.state.expandedByMouseClick,directionalHint:Object(S.a)(this.props.theme)?_.a.leftTopEdge:_.a.rightTopEdge,className:this.props.className,gapSpace:0,isBeakVisible:!1},n.subMenuProps&&Object(p.a)(a,n.subMenuProps)),a},t.prototype._findItemByKey=function(e){var t=this.props.items;return this._findItemByKeyFromItems(e,t)},t.prototype._findItemByKeyFromItems=function(e,t){for(var r=0,a=t;r<a.length;r++){var i=a[r];if(i.itemType===n.Section&&i.sectionProps){var o=this._findItemByKeyFromItems(e,i.sectionProps.items);if(o)return o}else if(i.key&&i.key===e)return i}},t.prototype._setTargetWindowAndElement=function(e){var t=this._host;if(e)if("string"==typeof e){var r=Object(A.a)(t);this._target=r?r.querySelector(e):null,this._targetWindow=Object(E.a)(t)}else if(e.stopPropagation)this._targetWindow=Object(E.a)(e.target),this._target=e;else if(void 0!==e.x&&void 0!==e.y)this._targetWindow=Object(E.a)(t),this._target=e;else if(void 0!==e.current)this._target=e.current,this._targetWindow=Object(E.a)(this._target);else{var n=e;this._targetWindow=Object(E.a)(n),this._target=e}else this._targetWindow=Object(E.a)(t)},t.defaultProps={items:[],shouldFocusOnMount:!0,gapSpace:0,directionalHint:_.a.bottomAutoEdge,beakWidth:16},t=Object(a.b)([R.b],t)}(h.a),ce={root:"ms-ContextualMenu",container:"ms-ContextualMenu-container",list:"ms-ContextualMenu-list",header:"ms-ContextualMenu-header",title:"ms-ContextualMenu-title",isopen:"is-open"};function ue(e){return i.createElement(oe,Object(a.a)({},e))}var de=oe=Object(x.a)(le,(function(e){var t=e.className,r=e.theme,n=Object(N.v)(ce,r),a=r.fonts,i=r.semanticColors,o=r.effects;return{root:[r.fonts.medium,n.root,n.isopen,{backgroundColor:i.menuBackground,minWidth:"180px"},t],container:[n.container,{selectors:{":focus":{outline:0}}}],list:[n.list,n.isopen,{listStyleType:"none",margin:"0",padding:"0"}],header:[n.header,a.small,{fontWeight:N.e.semibold,color:i.menuHeader,background:"none",backgroundColor:"transparent",border:"none",height:36,lineHeight:36,cursor:"default",padding:"0px 6px",userSelect:"none",textAlign:"left"}],title:[n.title,{fontSize:a.mediumPlus.fontSize,paddingRight:"14px",paddingLeft:"14px",paddingBottom:"5px",paddingTop:"5px",backgroundColor:i.menuItemBackgroundPressed}],subComponentStyles:{callout:{root:{boxShadow:o.elevation8}},menuItem:{}}}}),(function(){return{onRenderSubMenu:ue}}),{scope:"ContextualMenu"}),pe=r(27),he=Object(o.b)((function(e,t,r,n,a){return{root:Object(N.F)(e.splitButtonMenuButton,r&&[e.splitButtonMenuButtonExpanded],t&&[e.splitButtonMenuButtonDisabled],n&&!t&&[e.splitButtonMenuButtonChecked]),splitButtonContainer:Object(N.F)(e.splitButtonContainer,!t&&n&&[e.splitButtonContainerChecked,{selectors:{":hover":e.splitButtonContainerCheckedHovered}}],!t&&!n&&[{selectors:{":hover":e.splitButtonContainerHovered,":focus":e.splitButtonContainerFocused}}],t&&e.splitButtonContainerDisabled),icon:Object(N.F)(e.splitButtonMenuIcon,t&&e.splitButtonMenuIconDisabled,!t&&a&&e.splitButtonMenuIcon),flexContainer:Object(N.F)(e.splitButtonFlexContainer),divider:Object(N.F)(e.splitButtonDivider,(a||t)&&e.splitButtonDividerDisabled)}}));r.d(t,"a",(function(){return fe}));var fe=function(e){function t(t,r){var n=e.call(this,t)||this;return n._buttonElement=i.createRef(),n._splitButtonContainer=i.createRef(),n._renderedVisibleMenu=!1,n._getMemoizedMenuButtonKeytipProps=Object(o.b)((function(e){return Object(a.a)(Object(a.a)({},e),{hasMenu:!0})})),n._onRenderIcon=function(e,t){var r=n.props.iconProps;if(r&&(void 0!==r.iconName||r.imageProps)){var o=r.className,l=r.imageProps,c=Object(a.d)(r,["className","imageProps"]);if(r.styles)return i.createElement(m.a,Object(a.a)({className:Object(s.a)(n._classNames.icon,o),imageProps:l},c));if(r.iconName)return i.createElement(g.a,Object(a.a)({className:Object(s.a)(n._classNames.icon,o)},c));if(l)return i.createElement(b,Object(a.a)({className:Object(s.a)(n._classNames.icon,o),imageProps:l},c))}return null},n._onRenderTextContents=function(){var e=n.props,t=e.text,r=e.children,a=e.secondaryText,o=void 0===a?n.props.description:a,s=e.onRenderText,l=void 0===s?n._onRenderText:s,c=e.onRenderDescription,u=void 0===c?n._onRenderDescription:c;return t||"string"==typeof r||o?i.createElement("span",{className:n._classNames.textContainer},l(n.props,n._onRenderText),u(n.props,n._onRenderDescription)):[l(n.props,n._onRenderText),u(n.props,n._onRenderDescription)]},n._onRenderText=function(){var e=n.props.text,t=n.props.children;return void 0===e&&"string"==typeof t&&(e=t),n._hasText()?i.createElement("span",{key:n._labelId,className:n._classNames.label,id:n._labelId},e):null},n._onRenderChildren=function(){var e=n.props.children;return"string"==typeof e?null:e},n._onRenderDescription=function(e){var t=e.secondaryText,r=void 0===t?n.props.description:t;return r?i.createElement("span",{key:n._descriptionId,className:n._classNames.description,id:n._descriptionId},r):null},n._onRenderAriaDescription=function(){var e=n.props.ariaDescription;return e?i.createElement("span",{className:n._classNames.screenReaderText,id:n._ariaDescriptionId},e):null},n._onRenderMenuIcon=function(e){var t=n.props.menuIconProps;return i.createElement(g.a,Object(a.a)({iconName:"ChevronDown"},t,{className:n._classNames.menuIcon}))},n._onRenderMenu=function(e){var t=n.props.persistMenu,r=n.state.menuHidden,o=n.props.menuAs||de;return e.ariaLabel||e.labelElementId||!n._hasText()||(e=Object(a.a)(Object(a.a)({},e),{labelElementId:n._labelId})),i.createElement(o,Object(a.a)({id:n._labelId+"-menu",directionalHint:_.a.bottomLeftEdge},e,{shouldFocusOnContainer:n._menuShouldFocusOnContainer,shouldFocusOnMount:n._menuShouldFocusOnMount,hidden:t?r:void 0,className:Object(s.a)("ms-BaseButton-menuhost",e.className),target:n._isSplitButton?n._splitButtonContainer.current:n._buttonElement.current,onDismiss:n._onDismissMenu}))},n._onDismissMenu=function(e){var t=n.props.menuProps;t&&t.onDismiss&&t.onDismiss(e),e&&e.defaultPrevented||n._dismissMenu()},n._dismissMenu=function(){n._menuShouldFocusOnMount=void 0,n._menuShouldFocusOnContainer=void 0,n.setState({menuHidden:!0})},n._openMenu=function(e,t){void 0===t&&(t=!0),n.props.menuProps&&(n._menuShouldFocusOnContainer=e,n._menuShouldFocusOnMount=t,n._renderedVisibleMenu=!0,n.setState({menuHidden:!1}))},n._onToggleMenu=function(e){var t=!0;n.props.menuProps&&!1===n.props.menuProps.shouldFocusOnMount&&(t=!1),n.state.menuHidden?n._openMenu(e,t):n._dismissMenu()},n._onSplitContainerFocusCapture=function(e){var t=n._splitButtonContainer.current;!t||e.target&&Object(l.a)(e.target,t)||t.focus()},n._onSplitButtonPrimaryClick=function(e){n.state.menuHidden||n._dismissMenu(),!n._processingTouch&&n.props.onClick?n.props.onClick(e):n._processingTouch&&n._onMenuClick(e)},n._onKeyDown=function(e){!n.props.disabled||e.which!==c.a.enter&&e.which!==c.a.space?n.props.disabled||(n.props.menuProps?n._onMenuKeyDown(e):void 0!==n.props.onKeyDown&&n.props.onKeyDown(e)):(e.preventDefault(),e.stopPropagation())},n._onKeyUp=function(e){n.props.disabled||void 0===n.props.onKeyUp||n.props.onKeyUp(e)},n._onKeyPress=function(e){n.props.disabled||void 0===n.props.onKeyPress||n.props.onKeyPress(e)},n._onMouseUp=function(e){n.props.disabled||void 0===n.props.onMouseUp||n.props.onMouseUp(e)},n._onMouseDown=function(e){n.props.disabled||void 0===n.props.onMouseDown||n.props.onMouseDown(e)},n._onClick=function(e){n.props.disabled||(n.props.menuProps?n._onMenuClick(e):void 0!==n.props.onClick&&n.props.onClick(e))},n._onSplitButtonContainerKeyDown=function(e){e.which===c.a.enter||e.which===c.a.space?n._buttonElement.current&&(n._buttonElement.current.click(),e.preventDefault(),e.stopPropagation()):n._onMenuKeyDown(e)},n._onMenuKeyDown=function(e){if(!n.props.disabled){n.props.onKeyDown&&n.props.onKeyDown(e);var t=e.which===c.a.up,r=e.which===c.a.down;if(!e.defaultPrevented&&n._isValidMenuOpenKey(e)){var a=n.props.onMenuClick;a&&a(e,n),n._onToggleMenu(!1),e.preventDefault(),e.stopPropagation()}if(!e.altKey&&!e.metaKey&&(t||r))if(!n.state.menuHidden&&n.props.menuProps)(void 0!==n._menuShouldFocusOnMount?n._menuShouldFocusOnMount:n.props.menuProps.shouldFocusOnMount)||(e.preventDefault(),e.stopPropagation(),n._menuShouldFocusOnMount=!0,n.forceUpdate())}},n._onTouchStart=function(){!n._isSplitButton||!n._splitButtonContainer.current||"onpointerdown"in n._splitButtonContainer.current||n._handleTouchAndPointerEvent()},n._onMenuClick=function(e){var t=n.props.onMenuClick;if(t&&t(e,n),!e.defaultPrevented){var r=0!==e.nativeEvent.detail||"mouse"===e.nativeEvent.pointerType;n._onToggleMenu(r),e.preventDefault(),e.stopPropagation()}},n._warnConditionallyRequiredProps(["menuProps","onClick"],"split",n.props.split),n._warnDeprecations({rootProps:void 0,description:"secondaryText",toggled:"checked"}),n._labelId=Object(u.a)(),n._descriptionId=Object(u.a)(),n._ariaDescriptionId=Object(u.a)(),n.state={menuHidden:!0},n}return Object(a.c)(t,e),Object.defineProperty(t.prototype,"_isSplitButton",{get:function(){return!!this.props.menuProps&&!!this.props.onClick&&!0===this.props.split},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e,t=this.props,r=t.ariaDescription,n=t.ariaLabel,a=t.ariaHidden,i=t.className,o=t.disabled,s=t.allowDisabledFocus,l=t.primaryDisabled,c=t.secondaryText,u=void 0===c?this.props.description:c,f=t.href,m=t.iconProps,g=t.menuIconProps,v=t.styles,y=t.checked,b=t.variantClassName,_=t.theme,x=t.toggle,w=t.getClassNames,k=t.role,M=this.state.menuHidden,T=o||l;this._classNames=w?w(_,i,b,m&&m.className,g&&g.className,T,y,!M,!!this.props.menuProps,this.props.split,!!s):Object(pe.b)(_,v,i,b,m&&m.className,g&&g.className,T,!!this.props.menuProps,y,!M,this.props.split);var C=this._ariaDescriptionId,S=this._labelId,L=this._descriptionId,A=!T&&!!f,E=A?"a":"button",D=Object(d.d)(Object(p.a)(A?{}:{type:"button"},this.props.rootProps,this.props),A?d.a:d.b,["disabled"]),I=n||D["aria-label"],P=void 0;r?P=C:u&&this.props.onRenderDescription!==h.b?P=L:D["aria-describedby"]&&(P=D["aria-describedby"]);var O=void 0;I||(D["aria-labelledby"]?O=D["aria-labelledby"]:P&&(O=this._hasText()?S:void 0));var R=!(!1===this.props["data-is-focusable"]||o&&!s||this._isSplitButton),F="menuitemcheckbox"===k||"checkbox"===k,z=F?!!y:!0===x?!!y:void 0,N=Object(p.a)(D,((e={className:this._classNames.root,ref:this._buttonElement,disabled:T&&!s,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onMouseDown:this._onMouseDown,onMouseUp:this._onMouseUp,onClick:this._onClick,"aria-label":I,"aria-labelledby":O,"aria-describedby":P,"aria-disabled":T,"data-is-focusable":R})[F?"aria-checked":"aria-pressed"]=z,e));return a&&(N["aria-hidden"]=!0),this._isSplitButton?this._onRenderSplitButtonContent(E,N):(this.props.menuProps&&Object(p.a)(N,{"aria-expanded":!M,"aria-owns":M?null:this._labelId+"-menu","aria-haspopup":!0}),this._onRenderContent(E,N))},t.prototype.componentDidMount=function(){this._isSplitButton&&this._splitButtonContainer.current&&("onpointerdown"in this._splitButtonContainer.current&&this._events.on(this._splitButtonContainer.current,"pointerdown",this._onPointerDown,!0),"onpointerup"in this._splitButtonContainer.current&&this.props.onPointerUp&&this._events.on(this._splitButtonContainer.current,"pointerup",this.props.onPointerUp,!0))},t.prototype.componentDidUpdate=function(e,t){this.props.onAfterMenuDismiss&&!t.menuHidden&&this.state.menuHidden&&this.props.onAfterMenuDismiss()},t.prototype.focus=function(){this._isSplitButton&&this._splitButtonContainer.current?this._splitButtonContainer.current.focus():this._buttonElement.current&&this._buttonElement.current.focus()},t.prototype.dismissMenu=function(){this._dismissMenu()},t.prototype.openMenu=function(e,t){this._openMenu(e,t)},t.prototype._onRenderContent=function(e,t){var r=this,n=this.props,o=e,s=n.menuIconProps,l=n.menuProps,c=n.onRenderIcon,u=void 0===c?this._onRenderIcon:c,d=n.onRenderAriaDescription,p=void 0===d?this._onRenderAriaDescription:d,h=n.onRenderChildren,f=void 0===h?this._onRenderChildren:h,m=n.onRenderMenu,g=void 0===m?this._onRenderMenu:m,v=n.onRenderMenuIcon,y=void 0===v?this._onRenderMenuIcon:v,b=n.disabled,_=n.keytipProps;_&&l&&(_=this._getMemoizedMenuButtonKeytipProps(_));var x=function(e){return i.createElement(o,Object(a.a)({},t,e),i.createElement("span",{className:r._classNames.flexContainer,"data-automationid":"splitbuttonprimary"},u(n,r._onRenderIcon),r._onRenderTextContents(),p(n,r._onRenderAriaDescription),f(n,r._onRenderChildren),!r._isSplitButton&&(l||s||r.props.onRenderMenuIcon)&&y(r.props,r._onRenderMenuIcon),l&&!l.doNotLayer&&r._shouldRenderMenu()&&g(l,r._onRenderMenu)))},w=_?i.createElement(J.a,{keytipProps:this._isSplitButton?void 0:_,ariaDescribedBy:t["aria-describedby"],disabled:b},(function(e){return x(e)})):x();return l&&l.doNotLayer?i.createElement("span",{style:{display:"inline-block"}},w,this._shouldRenderMenu()&&g(l,this._onRenderMenu)):w},t.prototype._shouldRenderMenu=function(){var e=this.state.menuHidden,t=this.props,r=t.persistMenu,n=t.renderPersistedMenuHiddenOnMount;return!e||!(!r||!this._renderedVisibleMenu&&!n)},t.prototype._hasText=function(){return null!==this.props.text&&(void 0!==this.props.text||"string"==typeof this.props.children)},t.prototype._onRenderSplitButtonContent=function(e,t){var r=this,n=this.props,o=n.styles,s=void 0===o?{}:o,l=n.disabled,c=n.allowDisabledFocus,u=n.checked,h=n.getSplitButtonClassNames,m=n.primaryDisabled,g=n.menuProps,v=n.toggle,y=n.role,b=n.primaryActionButtonProps,_=this.props.keytipProps,x=this.state.menuHidden,w=h?h(!!l,!x,!!u,!!c):s&&he(s,!!l,!x,!!u,!!m);Object(p.a)(t,{onClick:void 0,onPointerDown:void 0,onPointerUp:void 0,tabIndex:-1,"data-is-focusable":!1});var k=t.ariaDescription;_&&g&&(_=this._getMemoizedMenuButtonKeytipProps(_));var M=Object(d.d)(t,[],["disabled"]);b&&Object(p.a)(t,b);var T=function(n){return i.createElement("div",Object(a.a)({},M,{"data-ktp-target":n?n["data-ktp-target"]:void 0,role:y||"button","aria-disabled":l,"aria-haspopup":!0,"aria-expanded":!x,"aria-pressed":v?!!u:void 0,"aria-describedby":Object(f.a)(k,n?n["aria-describedby"]:void 0),className:w&&w.splitButtonContainer,onKeyDown:r._onSplitButtonContainerKeyDown,onTouchStart:r._onTouchStart,ref:r._splitButtonContainer,"data-is-focusable":!0,onClick:l||m?void 0:r._onSplitButtonPrimaryClick,tabIndex:!l||c?0:void 0,"aria-roledescription":t["aria-roledescription"],onFocusCapture:r._onSplitContainerFocusCapture}),i.createElement("span",{style:{display:"flex"}},r._onRenderContent(e,t),r._onRenderSplitButtonMenuButton(w,n),r._onRenderSplitButtonDivider(w)))};return _?i.createElement(J.a,{keytipProps:_,disabled:l},(function(e){return T(e)})):T()},t.prototype._onRenderSplitButtonDivider=function(e){return e&&e.divider?i.createElement("span",{className:e.divider,"aria-hidden":!0}):null},t.prototype._onRenderSplitButtonMenuButton=function(e,r){var n=this.props,o=n.allowDisabledFocus,s=n.checked,l=n.disabled,c=n.splitButtonMenuProps,u=n.splitButtonAriaLabel,d=this.state.menuHidden,p=this.props.menuIconProps;void 0===p&&(p={iconName:"ChevronDown"});var h=Object(a.a)(Object(a.a)({},c),{styles:e,checked:s,disabled:l,allowDisabledFocus:o,onClick:this._onMenuClick,menuProps:void 0,iconProps:Object(a.a)(Object(a.a)({},p),{className:this._classNames.menuIcon}),ariaLabel:u,"aria-haspopup":!0,"aria-expanded":!d,"data-is-focusable":!1});return i.createElement(t,Object(a.a)({},h,{"data-ktp-execute-target":r?r["data-ktp-execute-target"]:r,onMouseDown:this._onMouseDown,tabIndex:-1}))},t.prototype._onPointerDown=function(e){var t=this.props.onPointerDown;t&&t(e),"touch"===e.pointerType&&(this._handleTouchAndPointerEvent(),e.preventDefault(),e.stopImmediatePropagation())},t.prototype._handleTouchAndPointerEvent=function(){var e=this;void 0!==this._lastTouchTimeoutId&&(this._async.clearTimeout(this._lastTouchTimeoutId),this._lastTouchTimeoutId=void 0),this._processingTouch=!0,this._lastTouchTimeoutId=this._async.setTimeout((function(){e._processingTouch=!1,e._lastTouchTimeoutId=void 0}),500)},t.prototype._isValidMenuOpenKey=function(e){return this.props.menuTriggerKeyCode?e.which===this.props.menuTriggerKeyCode:!!this.props.menuProps&&(e.which===c.a.down&&(e.altKey||e.metaKey))},t.defaultProps={baseClassName:"ms-Button",styles:{},split:!1},t}(h.a)},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(2);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e&&1===e.length&&e[0]&&!e[0].subComponentStyles)return e[0];for(var r={},i={},o=0,s=e;o<s.length;o++){var l=s[o];if(l)for(var c in l)if(l.hasOwnProperty(c)){if("subComponentStyles"===c&&void 0!==l.subComponentStyles){var u=l.subComponentStyles;for(var d in u)u.hasOwnProperty(d)&&(i.hasOwnProperty(d)?i[d].push(u[d]):i[d]=[u[d]]);continue}var p=r[c],h=l[c];r[c]=void 0===p?h:Object(n.e)(Array.isArray(p)?p:[p],Array.isArray(h)?h:[h])}}if(Object.keys(i).length>0){r.subComponentStyles={};var f=r.subComponentStyles,m=function(e){if(i.hasOwnProperty(e)){var t=i[e];f[e]=function(e){return a.apply(void 0,t.map((function(t){return"function"==typeof t?t(e):t})))}}};for(var d in i)m(d)}return r}},function(e,t,r){"use strict";var n,a,i=r(0),o=r.n(i),s=r(9),l=function(){var e=Object(s.A)();return Object(s.E)({root:{paddingTop:"8px",paddingBottom:"8px"},item:{height:"34px",display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"1px"},disabledItem:{height:"34px",backgroundColor:e.semanticColors.disabledBackground,display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"1px"},inactiveItem:{height:"34px",color:e.semanticColors.primaryButtonTextDisabled,display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"1px"},colorBox:{margin:"11px 4px 11px 8px",width:"12px",height:"12px",display:"inline-block",borderRadius:"6px",cursor:"pointer"},inactiveColorBox:{margin:"11px 4px 11px 8px",width:"12px",height:"12px",display:"inline-block",borderRadius:"6px",opacity:.4,cursor:"pointer"},label:{display:"inline-block",flex:"1",cursor:"pointer"},editButton:{width:"16px",display:"inline-block",color:e.semanticColors.buttonText},deleteButton:{width:"16px",display:"inline-block",color:e.semanticColors.errorText},clickTarget:{display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",flex:"1"}})},c=r(372),u=r(386),d=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});!function(e){e.ascending="ascending",e.descending="descending",e.none="none"}(a||(a={}));var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.classes=l(),t}return d(t,e),t.prototype.render=function(){var e=this;return o.a.createElement("div",{className:this.classes.root},this.props.items.map((function(t,r){return e.buildRowElement(t,r)})))},t.prototype.buildRowElement=function(e,t){if(e.disabled)return o.a.createElement("div",{className:this.classes.disabledItem,title:e.disabledMessage||"",key:t},o.a.createElement("div",{className:this.classes.inactiveColorBox}),o.a.createElement(c.a,{nowrap:!0,variant:"medium",className:this.classes.label},e.name),void 0!==e.onEdit&&o.a.createElement(u.a,{className:this.classes.editButton,iconProps:{iconName:"Edit"},onClick:e.onEdit}),void 0!==e.onDelete&&o.a.createElement(u.a,{className:this.classes.deleteButton,iconProps:{iconName:"Clear"},onClick:e.onDelete}));var r=!1===e.activated?this.classes.inactiveItem:this.classes.item;return o.a.createElement("div",{className:r,key:t},o.a.createElement("div",{className:this.classes.clickTarget,onClick:e.onClick},o.a.createElement("div",{className:!1===e.activated?this.classes.inactiveColorBox:this.classes.colorBox,style:{backgroundColor:e.color}}),o.a.createElement(c.a,{nowrap:!0,variant:"medium",className:this.classes.label},e.name)),void 0!==e.onEdit&&o.a.createElement(u.a,{className:this.classes.editButton,iconProps:{iconName:"Edit",style:{fontSize:"10px"}},onClick:e.onEdit}),void 0!==e.onDelete&&o.a.createElement(u.a,{className:this.classes.deleteButton,iconProps:{iconName:"Clear",style:{fontSize:"10px"}},onClick:e.onDelete}))},t}(o.a.PureComponent);r.d(t,"a",(function(){return p}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),a=n.createContext({customizations:{inCustomizerContext:!1,settings:{},scopedSettings:{}}})},,function(e,t,r){var n=r(308),a=r(309);e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(2),a=r(9),i=r(46),o=Object(i.b)((function(e,t){var r,i,o,s,l,c,u,d,p,h,f=e.effects,m=e.palette,g=e.semanticColors,v={position:"absolute",width:1,right:31,top:8,bottom:8},y={splitButtonContainer:[Object(a.u)(e,{highContrastStyle:{left:-2,top:-2,bottom:-2,right:-2,border:"none"},inset:2}),{display:"inline-flex",selectors:{".ms-Button--default":{borderTopRightRadius:"0",borderBottomRightRadius:"0",borderRight:"none"},".ms-Button--primary":{borderTopRightRadius:"0",borderBottomRightRadius:"0",border:"none",selectors:(r={},r[a.f]={color:"Window",backgroundColor:"WindowText",MsHighContrastAdjust:"none"},r)},".ms-Button--primary + .ms-Button":{border:"none"}}}],splitButtonContainerHovered:{selectors:{".ms-Button--primary":{selectors:(i={},i[a.f]={color:"Window",backgroundColor:"Highlight"},i)},".ms-Button.is-disabled":{color:g.buttonTextDisabled,selectors:(o={},o[a.f]={color:"GrayText",borderColor:"GrayText",backgroundColor:"Window"},o)}}},splitButtonContainerChecked:{selectors:{".ms-Button--primary":{selectors:(s={},s[a.f]={color:"Window",backgroundColor:"WindowText",MsHighContrastAdjust:"none"},s)}}},splitButtonContainerCheckedHovered:{selectors:{".ms-Button--primary":{selectors:(l={},l[a.f]={color:"Window",backgroundColor:"WindowText",MsHighContrastAdjust:"none"},l)}}},splitButtonContainerFocused:{outline:"none!important"},splitButtonMenuButton:{padding:6,height:"auto",boxSizing:"border-box",borderRadius:0,borderTopRightRadius:f.roundedCorner2,borderBottomRightRadius:f.roundedCorner2,border:"1px solid "+m.neutralSecondaryAlt,borderLeft:"none",outline:"transparent",userSelect:"none",display:"inline-block",textDecoration:"none",textAlign:"center",cursor:"pointer",verticalAlign:"top",width:32,marginLeft:-1,marginTop:0,marginRight:0,marginBottom:0},splitButtonDivider:Object(n.a)(Object(n.a)({},v),{selectors:(c={},c[a.f]={backgroundColor:"WindowText"},c)}),splitButtonDividerDisabled:Object(n.a)(Object(n.a)({},v),{selectors:(u={},u[a.f]={backgroundColor:"GrayText"},u)}),splitButtonMenuButtonDisabled:{pointerEvents:"none",border:"none",selectors:(d={":hover":{cursor:"default"},".ms-Button--primary":{selectors:(p={},p[a.f]={color:"GrayText",borderColor:"GrayText",backgroundColor:"Window"},p)}},d[a.f]={border:"1px solid GrayText",color:"GrayText",backgroundColor:"Window"},d)},splitButtonFlexContainer:{display:"flex",height:"100%",flexWrap:"nowrap",justifyContent:"center",alignItems:"center"},splitButtonContainerDisabled:{outline:"none",border:"none",selectors:(h={},h[a.f]={color:"GrayText",borderColor:"GrayText",backgroundColor:"Window"},h)}};return Object(a.r)(y,t)}))},function(e,t,r){"use strict";function n(e,t){return void 0===t&&(t=!0),e&&(t&&function(e){var t,r;return e&&((r=e)&&r._virtual)&&(t=e._virtual.parent),t}(e)||e.parentNode&&e.parentNode)}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(0),a=r.n(n),i=r(3),o=r.n(i),s=r(1),l=r(9),c=r(10),u=r(12),d=r(5),p=r(372),h=r(38);r.d(t,"a",(function(){return g}));var f,m=(f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),g=function(e){function t(t){var r=e.call(this,t)||this;return r.state={plotlyProps:void 0},r.selectPointFromChart=r.selectPointFromChart.bind(r),r}return m(t,e),t.prototype.componentDidUpdate=function(e){this.props.unsortedSeries===e.unsortedSeries&&this.props.sortArray===e.sortArray&&this.props.chartType===e.chartType||this.setState({plotlyProps:void 0})},t.prototype.render=function(){var e=function(){Object(l.A)();return Object(l.E)({chartWithVertical:{display:"flex",flexGrow:"1",flexDirection:"row"},noData:{flex:"1",margin:"100px auto 0 auto"},verticalAxis:{position:"relative",top:"0px",height:"auto",width:"64px"},rotatedVerticalBox:{transform:"translateX(-50%) translateY(-50%) rotate(270deg)",marginLeft:"28px",position:"absolute",top:"50%",textAlign:"center",width:"max-content"},boldText:{fontWeight:"600"}})}(),t={"xaxis.range":[this.props.startingK-.5,this.props.startingK+this.props.topK-.5]},r=this.state.plotlyProps;return o.a.set(r,"layout.xaxis.range",[this.props.startingK-.5,this.props.startingK+this.props.topK-.5]),this.props.unsortedSeries&&0!==this.props.unsortedSeries.length&&this.props.sortArray&&0!==this.props.sortArray.length?void 0===this.state.plotlyProps?(this.loadProps(),a.a.createElement(u.d,null)):a.a.createElement("div",{className:e.chartWithVertical},a.a.createElement("div",{className:e.verticalAxis},a.a.createElement("div",{className:e.rotatedVerticalBox},a.a.createElement("div",null,this.props.yAxisLabels.map((function(t,r){return a.a.createElement(p.a,{block:!0,variant:"medium",className:e.boldText,key:r},t)}))))),a.a.createElement(c.a,{plotlyProps:r,theme:Object(l.A)(),relayoutArg:t,onClickHandler:this.selectPointFromChart})):a.a.createElement("div",{className:e.noData},a.a.createElement(p.a,{variant:"xxLarge"},"No data"))},t.prototype.loadProps=function(){var e=this;setTimeout((function(){var t=e.buildBarPlotlyProps();e.setState({plotlyProps:t})}),1)},t.prototype.buildBarPlotlyProps=function(){var e=this,t=this.props.sortArray,r={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[],layout:{autosize:!0,dragmode:!1,margin:{t:10,r:10,b:30,l:0},hovermode:"closest",xaxis:{automargin:!0,color:d.a.chartAxisColor,tickfont:{family:"Roboto, Helvetica Neue, sans-serif",size:11,color:d.a.chartAxisColor},showgrid:!1},yaxis:{automargin:!0,color:d.a.chartAxisColor,tickfont:{family:"Roboto, Helvetica Neue, sans-serif",size:11,color:d.a.chartAxisColor},zeroline:!0,showgrid:!0,gridcolor:"#e5e5e5"},showlegend:!1}},n=t.map((function(t){return e.props.unsortedX[t]}));if(this.props.chartType===h.a.Bar){r.layout.barmode="group";var a=this.props.unsortedSeries[0].unsortedFeatureValues?"%{text}: %{customdata.Yvalue}<br>":s.a.Charts.featurePrefix+": %{text}<br>";a+=s.a.Charts.importancePrefix+": %{customdata.Yformatted}<br>",a+="%{customdata.Name}<br>",a+="<extra></extra>";var i=t.map((function(e,t){return t}));this.props.unsortedSeries.forEach((function(o,s){r.data.push({hoverinfo:"all",orientation:"v",type:"bar",name:o.name,customdata:t.map((function(e){return{Name:o.name,Yformatted:o.unsortedAggregateY[e].toLocaleString(void 0,{maximumFractionDigits:3}),Yvalue:o.unsortedFeatureValues?o.unsortedFeatureValues[e]:void 0}})),text:n,x:i,y:t.map((function(e){return o.unsortedAggregateY[e]})),marker:{color:t.map((function(t){return t===e.props.selectedFeatureIndex&&e.props.selectedSeriesIndex,d.a.fabricColorPalette[o.colorIndex]}))},hovertemplate:a})}))}else if(this.props.chartType===h.a.Box){r.layout.boxmode="group";new Array(this.props.jointDataset.datasetFeatureCount).fill(0).map((function(t,r){return new Array(e.props.jointDataset.datasetRowCount).fill(r)})).reduce((function(e,t){return e.push.apply(e,t),e}),[]);this.props.unsortedSeries.forEach((function(e,n){r.data.push({type:"box",boxmean:!0,name:e.name,x:t.map((function(t,r){return e.unsortedIndividualY[t].map((function(e){return r}))})).reduce((function(e,t){return e.push.apply(e,t),e}),[]),y:t.map((function(t){return e.unsortedIndividualY[t]})).reduce((function(e,t){return e.push.apply(e,t),e}),[]),marker:{color:d.a.fabricColorPalette[e.colorIndex]}})}))}var l=t.map((function(e,t){return t}));return o.a.set(r,"layout.xaxis.ticktext",n),o.a.set(r,"layout.xaxis.tickvals",l),r},t.prototype.selectPointFromChart=function(e){if(void 0!==this.props.onFeatureSelection){var t=e.points[0],r=this.props.sortArray[t.x];this.props.onFeatureSelection(t.curveNumber,r)}},t}(a.a.PureComponent)},function(e,t,r){"use strict";var n={},a=void 0;try{a=window}catch(e){}function i(e,t){if(void 0!==a){var r=a.__packages__=a.__packages__||{};if(!r[e]||!n[e])n[e]=t,(r[e]=r[e]||[]).push(t)}}r.d(t,"a",(function(){return i})),i("@uifabric/set-version","6.0.0")},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return h}));var n,a=r(2),i=r(0),o=r(33),s=r(84),l=r(17),c=r(93);!function(e){e[e.small=0]="small",e[e.medium=1]="medium",e[e.large=2]="large",e[e.xLarge=3]="xLarge",e[e.xxLarge=4]="xxLarge",e[e.xxxLarge=5]="xxxLarge",e[e.unknown=999]="unknown"}(n||(n={}));var u,d,p=[479,639,1023,1365,1919,99999999];function h(e){var t=function(t){function r(e){var r=t.call(this,e)||this;return r._onResize=function(){var e=r._getResponsiveMode();e!==r.state.responsiveMode&&r.setState({responsiveMode:e})},r._updateComposedComponentRef=r._updateComposedComponentRef.bind(r),r.state={responsiveMode:u||d||n.large},r}return Object(a.c)(r,t),r.prototype.componentDidMount=function(){this._events.on(window,"resize",this._onResize),this._onResize()},r.prototype.componentWillUnmount=function(){this._events.dispose()},r.prototype.render=function(){var t=this.state.responsiveMode;return t===n.unknown?null:i.createElement(e,Object(a.a)({ref:this._updateComposedComponentRef,responsiveMode:t},this.props))},r.prototype._getResponsiveMode=function(){var e=n.small,t=Object(o.findDOMNode)(this),r=Object(l.a)(t);if(void 0!==r){try{for(;r.innerWidth>p[e];)e++}catch(t){e=u||d||n.large}d=e}else{if(void 0===u)throw new Error("Content was rendered in a server environment without providing a default responsive mode. Call setResponsiveMode to define what the responsive mode is.");e=u}return e},r}(s.a);return Object(c.a)(e,t)}},function(e,t,r){"use strict";r.d(t,"e",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"g",(function(){return s})),r.d(t,"h",(function(){return l})),r.d(t,"f",(function(){return c})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return d}));var n=r(77),a=["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","role","style","tabIndex","title","translate","spellCheck","name"].concat(["onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),i=(a.concat(["form"]),a.concat(["height","loop","muted","preload","src","width"]).concat(["poster"]),a.concat(["start"]),a.concat(["value"]),a.concat(["download","href","hrefLang","media","rel","target","type"])),o=a.concat(["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"]),s=o.concat(["accept","alt","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),l=o.concat(["cols","dirname","form","maxLength","placeholder","readOnly","required","rows","wrap"]),c=(o.concat(["form","multiple","required"]),a.concat(["selected","value"]),a.concat(["cellPadding","cellSpacing"]),a.concat(["rowSpan","scope"]),a.concat(["colSpan","headers","rowSpan","scope"]),a.concat(["span"]),a.concat(["span"]),a.concat(["acceptCharset","action","encType","encType","method","noValidate","target"]),a.concat(["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),a.concat(["alt","crossOrigin","height","src","srcSet","useMap","width"])),u=a;function d(e,t,r){return Object(n.b)((function(e){return(!r||r.indexOf(e)<0)&&(0===e.indexOf("data-")||0===e.indexOf("aria-")||t.indexOf(e)>=0)}),{},e)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));function n(e){console&&console.warn&&console.warn(e)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o}));var n=r(17),a="ms-Fabric--isFocusVisible",i="ms-Fabric--isFocusHidden";function o(e,t){var r=t?Object(n.a)(t):Object(n.a)();if(r){var o=r.document.body.classList;o.add(e?a:i),o.remove(e?i:a)}}},,,,function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(75),a=r(41),i=r(45);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(e,t){var r=e instanceof Array?e:[e],a=Object(n.a)(r),o=a.classes,s=a.objects;s.length&&o.push(Object(i.c)(t||{},s));return o.join(" ")}(e,Object(a.a)())}},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return l}));var n=r(50),a=r(75),i=r(41),o=r(45);function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return l(e,Object(i.a)())}function l(e,t){var r={subComponentStyles:{}};if(!e[0]&&e.length<=1)return{subComponentStyles:{}};var i=n.a.apply(void 0,e),s=[];for(var l in i)if(i.hasOwnProperty(l)){if("subComponentStyles"===l){r.subComponentStyles=i.subComponentStyles||{};continue}var c=i[l],u=Object(a.a)(c),d=u.classes,p=u.objects,h=Object(o.d)(t||{},{displayName:l},p);s.push(h),h&&(r[l]=d.concat([h.className]).join(" "))}for(var f=0,m=s;f<m.length;f++){(h=m[f])&&Object(o.a)(h)}return r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(17),a="__currentId__",i="id__",o=Object(n.a)()||{};function s(e){var t=o[a]++;return(e||i)+t}function l(e){void 0===e&&(e=0),o[a]=e}void 0===o[a]&&(o[a]=0)},function(e,t,r){"use strict";var n=r(243);r.o(n,"NewExplanationDashboard")&&r.d(t,"NewExplanationDashboard",(function(){return n.NewExplanationDashboard})),r.o(n,"TelemetryLevels")&&r.d(t,"TelemetryLevels",(function(){return n.TelemetryLevels}));r(244);var a=r(73);r.d(t,"TelemetryLevels",(function(){return a.a}))},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e.error="Error",e.warning="Warning",e.info="Info",e.trace="Trace"}(n||(n={}))},function(e,t,r){"use strict";var n,a=r(0),i=r.n(a),o=r(4),s=r(8),l=r(1),c=r(28),u=r(10),d=r(9),p=r(3),h=r.n(p),f=r(372),m=r(5),g=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t.prototype.render=function(){var e=Object(d.E)({DependencePlot:{display:"flex",flexGrow:"1",flexDirection:"row"},chartWithAxes:{display:"flex",flex:"1",padding:"5px 20px 0 20px",flexDirection:"column"},chart:{height:"100%",flex:1},chartWithVertical:{height:"400px",width:"100%",display:"flex",flexDirection:"row"},verticalAxis:{position:"relative",top:"0px",height:"auto",width:"50px"},rotatedVerticalBox:{transform:"translateX(-50%) translateY(-50%) rotate(270deg)",marginLeft:"15px",position:"absolute",top:"50%",textAlign:"center",width:"max-content"},horizontalAxisWithPadding:{display:"flex",flexDirection:"row"},paddingDiv:{width:"50px"},horizontalAxis:{flex:1,textAlign:"center"},placeholderWrapper:{margin:"100px auto 0 auto"},placeholder:{maxWidth:"70%"},secondaryChartPlacolderBox:{height:"400px",flex:1},secondaryChartPlacolderSpacer:{margin:"25px auto 0 auto",padding:"23px",width:"fit-content",boxShadow:"0px 0px 6px rgba(0, 0, 0, 0.2)"},faintText:{fontWeight:"350"}});if(void 0===this.props.chartProps)return i.a.createElement("div",{className:e.secondaryChartPlacolderBox},i.a.createElement("div",{className:e.secondaryChartPlacolderSpacer},i.a.createElement(f.a,{variant:"large",className:e.faintText},l.a.DependencePlot.placeholder)));var t=this.generatePlotlyProps(),r=this.props.metadata.modelType===s.a.regression?this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].label:this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].label+" : "+this.props.selectedWeightLabel;return i.a.createElement("div",{className:e.DependencePlot},i.a.createElement("div",{className:e.chartWithAxes},i.a.createElement("div",{className:e.chartWithVertical},i.a.createElement("div",{className:e.verticalAxis},i.a.createElement("div",{className:e.rotatedVerticalBox},i.a.createElement(f.a,{variant:"medium",block:!0},l.a.DependencePlot.featureImportanceOf),i.a.createElement(f.a,{variant:"medium"},r))),i.a.createElement("div",{className:e.chart},i.a.createElement(u.a,{plotlyProps:t,theme:Object(d.A)()}))),i.a.createElement("div",{className:e.horizontalAxisWithPadding},i.a.createElement("div",{className:e.paddingDiv}),i.a.createElement("div",{className:e.horizontalAxis},i.a.createElement(f.a,{variant:"medium"},this.props.jointDataset.metaDict[this.props.chartProps.xAxis.property].label)))))},t.prototype.onXSet=function(e){var t=h.a.cloneDeep(this.props.chartProps);t.xAxis=e;var r=this.props.jointDataset.metaDict[e.property];t.yAxis={property:o.c.ReducedLocalImportanceRoot+r.index,options:{}},this.props.onChange(t),this.setState({xDialogOpen:!1})},t.prototype.onColorSet=function(e){var t=h.a.cloneDeep(this.props.chartProps);t.colorAxis=e,this.props.onChange(t),this.setState({colorDialogOpen:!1})},t.prototype.generatePlotlyProps=function(){var e=this,r=h.a.cloneDeep(t.basePlotlyProperties),n=this.props.jointDataset,a=this.props.cohort;r.data[0].hoverinfo="all";var i="";this.props.chartProps.colorAxis&&(this.props.chartProps.colorAxis.options.bin||n.metaDict[this.props.chartProps.colorAxis.property].treatAsCategorical)&&a.sort(this.props.chartProps.colorAxis.property);var s=a.unwrap(o.c.IndexLabel).map((function(e){var t={};return t[o.c.IndexLabel]=e,t}));if(r.data[0].type=this.props.chartProps.chartType,r.data[0].mode=u.e.markers,r.data[0].marker={color:m.a.fabricColorPalette[this.props.cohortIndex]},this.props.chartProps.xAxis){if(n.metaDict[this.props.chartProps.xAxis.property].treatAsCategorical){var c=n.metaDict[this.props.chartProps.xAxis.property].sortedCategoricalValues,d=c.map((function(e,t){return t}));h.a.set(r,"layout.xaxis.ticktext",c),h.a.set(r,"layout.xaxis.tickvals",d)}var p=a.unwrap(this.props.chartProps.xAxis.property),f=n.metaDict[this.props.chartProps.xAxis.property].label;if(this.props.chartProps.xAxis.options.dither){var g=a.unwrap(o.c.DitherLabel);r.data[0].x=g.map((function(e,t){return p[t]+e})),i+=f+": %{customdata.X}<br>",p.forEach((function(t,r){n.metaDict[e.props.chartProps.xAxis.property].treatAsCategorical?s[r].X=n.metaDict[e.props.chartProps.xAxis.property].sortedCategoricalValues[t]:s[r].X=t}))}else r.data[0].x=p,i+=f+": %{x}<br>"}if(this.props.chartProps.yAxis){if(n.metaDict[this.props.chartProps.yAxis.property].treatAsCategorical){var v=n.metaDict[this.props.chartProps.yAxis.property].sortedCategoricalValues,y=v.map((function(e,t){return t}));h.a.set(r,"layout.yaxis.ticktext",v),h.a.set(r,"layout.yaxis.tickvals",y)}var b=a.unwrap(this.props.chartProps.yAxis.property),_=l.a.Charts.featureImportance;r.data[0].y=b,b.forEach((function(e,t){s[t].Yformatted=e.toLocaleString(void 0,{maximumFractionDigits:3})})),i+=_+": %{customdata.Yformatted}<br>"}return a.unwrap(o.c.IndexLabel,!1).forEach((function(e,t){s[t].AbsoluteIndex=e})),i+=l.a.Charts.rowIndex+": %{customdata.AbsoluteIndex}<br>",i+="<extra></extra>",r.data[0].customdata=s,r.data[0].hovertemplate=i,r},t.prototype.scatterSelection=function(e,t,r){var n=0===t.length?null:r.data.map((function(e){var r=[];return e.customdata&&e.customdata.forEach((function(e,n){-1!==t.indexOf(e[o.c.IndexLabel])&&r.push(n)})),r}));c.restyle(e,"selectedpoints",n);var a=0===t.length?[0]:r.data.map((function(e){if(e.customdata){var r=e.customdata,n=new Array(r.length).fill(0);return r.forEach((function(e,r){-1!==t.indexOf(e)&&(n[r]=2)})),n}return[0]}));c.restyle(e,"marker.line.width",a)},t.basePlotlyProperties={config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:[{}],layout:{dragmode:!1,autosize:!0,font:{size:10},margin:{t:10,l:10,b:20,r:10},hovermode:"closest",showlegend:!1,yaxis:{automargin:!0,color:m.a.chartAxisColor,tickfont:{family:"Roboto, Helvetica Neue, sans-serif",size:11},zeroline:!0,showgrid:!0,gridcolor:"#e5e5e5"},xaxis:{automargin:!0,color:m.a.chartAxisColor,tickfont:{family:"Roboto, Helvetica Neue, sans-serif",size:11},zeroline:!0,showgrid:!0,gridcolor:"#e5e5e5"}}},t}(i.a.PureComponent),y=r(38),b=r(377),_=r(384),x=r(14),w=r(374),k=r(369),M=r(57),T=function(){var e=Object(d.A)();return Object(d.E)({page:{width:"100%",height:"100%",padding:"16px 40px 0 14px",boxSizing:"border-box",display:"flex",flexDirection:"column"},infoWithText:{display:"flex",flexDirection:"row",width:"100%",boxSizing:"border-box",paddingLeft:"25px"},infoIcon:{width:"23px",height:"23px",fontSize:"23px"},helperText:{paddingRight:"120px",paddingLeft:"15px"},globalChartControls:{display:"flex",flexDirection:"row",padding:"18px 300px 4px 67px"},sliderLabel:{fontWeight:"600",paddingRight:"10px"},topK:{maxWidth:"200px"},startingK:{flex:1},chartTypeDropdown:{margin:"0 5px 0 0"},globalChartWithLegend:{height:"400px",width:"100%",display:"flex",flexDirection:"row",position:"relative"},secondaryChartAndLegend:{height:"300px",width:"100%",display:"flex",flexDirection:"row"},legendAndSort:{width:"200px",height:"100%"},cohortLegend:{fontWeight:"600",paddingBottom:"10px"},legendHelpText:{fontWeight:"300"},missingParametersPlaceholder:[m.a.missingParameterPlaceholder],missingParametersPlaceholderSpacer:[m.a.missingParameterPlaceholderSpacer],faintText:[m.a.faintText],chartEditorButton:[m.a.chartEditorButton,{margin:"5px"}],callout:{width:"200px",boxSizing:"border-box",display:"flex",flexDirection:"column",padding:"10px 20px",backgroundColor:e.semanticColors.bodyBackground},boldText:{fontWeight:"600",paddingBottom:"5px"},calloutWrapper:[m.a.calloutWrapper],calloutHeader:[m.a.calloutHeader],calloutTitle:[m.a.calloutTitle],calloutInner:[m.a.calloutInner],infoButton:{width:"fit-content",margin:"5px",padding:"8px 10px"},multiclassWeightLabel:{display:"inline-flex",paddingTop:"10px"},multiclassWeightLabelText:{paddingTop:"5px",fontWeight:"600"},cohortLegendWithTop:{fontWeight:"600",paddingBottom:"10px",paddingTop:"10px"},calloutActions:{position:"relative",marginTop:20,width:"100%",whiteSpace:"nowrap"},calloutLink:[e.fonts.medium,{color:e.palette.neutralPrimary}],rightJustifiedContainer:{width:"100%",paddingRight:"200px",boxSizing:"border-box",display:"inline-flex",flexDirection:"row",justifyContent:"flex-end"}})},C=r(51),S=r(381),L=r(387),A=r(371),E=r(385),D=r(386),I=r(15),P=r(373),O=r(12),R=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),F=function(e){function t(t){var r=e.call(this,t)||this;return r.featureDimension=r.props.metadata.featureNames.length,r.perClassExplanationDimension=r.props.globalImportance&&r.props.globalImportance[0]?r.props.globalImportance[0].length:0,r.minK=Math.min(4,r.featureDimension),r.maxK=Math.min(30,r.featureDimension),r.globalSeries=1===r.perClassExplanationDimension?[{name:l.a.BarChart.absoluteGlobal,unsortedAggregateY:r.props.globalImportance.map((function(e){return e[0]})),colorIndex:0}]:r.props.metadata.classNames.map((function(e,t){return{name:e,unsortedAggregateY:r.props.globalImportance.map((function(e){return e[t]})),colorIndex:t}})),r.classOptions=r.props.metadata.classNames.map((function(e,t){return{key:t,text:e}})),r.classOptions.unshift({key:O.c.absoluteGlobal,text:l.a.BarChart.absoluteGlobal}),r.state={startingK:0,topK:r.minK,sortingSeriesKey:O.c.absoluteGlobal,sortArray:x.a.buildSortedVector(r.props.globalImportance).reverse()},r.setSortIndex=r.setSortIndex.bind(r),r.setStartingK=r.setStartingK.bind(r),r}return R(t,e),t.prototype.render=function(){var e=T(),t=Math.max(0,this.featureDimension-this.state.topK);return i.a.createElement("div",{className:e.page},i.a.createElement("div",{className:e.infoWithText},i.a.createElement(S.a,{iconName:"Info",className:e.infoIcon}),i.a.createElement(f.a,{variant:"medium",className:e.helperText},l.a.GlobalOnlyChart.helperText)),i.a.createElement("div",{className:e.globalChartControls},i.a.createElement(f.a,{variant:"medium",className:e.sliderLabel},l.a.formatString(l.a.GlobalTab.topAtoB,this.state.startingK+1,this.state.startingK+this.state.topK)),i.a.createElement(_.a,{className:e.startingK,ariaLabel:l.a.AggregateImportance.topKFeatures,max:t,min:0,step:1,value:this.state.startingK,onChange:this.setStartingK,showValue:!1})),i.a.createElement("div",{className:e.globalChartWithLegend},i.a.createElement(M.a,{jointDataset:void 0,yAxisLabels:[l.a.GlobalTab.aggregateFeatureImportance],sortArray:this.state.sortArray,chartType:y.a.Bar,startingK:this.state.startingK,unsortedX:this.props.metadata.featureNamesAbridged,unsortedSeries:this.globalSeries,topK:this.state.topK})))},t.prototype.setStartingK=function(e){this.setState({startingK:e})},t.prototype.setSortIndex=function(e,t){var r=t.key,n=this.getSortVector(r).reverse();this.setState({sortingSeriesKey:r,sortArray:n})},t.prototype.getSortVector=function(e){return e===O.c.absoluteGlobal?x.a.buildSortedVector(this.props.globalImportance):x.a.buildSortedVector(this.props.globalImportance,e)},t}(i.a.PureComponent),z={title:l.a.ExplanationSummary.shapTitle,description:l.a.ExplanationSummary.shapDescription,linkUrl:"https://github.com/slundberg/shap"},N={title:l.a.ExplanationSummary.limeTitle,description:l.a.ExplanationSummary.limeDescription,linkUrl:"https://github.com/marcotcr/lime"},j={title:l.a.ExplanationSummary.mimicTitle,description:l.a.ExplanationSummary.mimicDescription,linkUrl:"https://christophm.github.io/interpretable-ml-book/global.html"},B={shap_deep:z,shap_tree:z,shap_kernel:z,shap:z,lime:N,"mimic.lightgbm":j,mimic:j,"mimic.sgd":j,"mimic.linear":j,pfi:{title:l.a.ExplanationSummary.pfiTitle,description:l.a.ExplanationSummary.pfiDescription,linkUrl:"https://christophm.github.io/interpretable-ml-book/feature-importance.html"}};r.d(t,"a",(function(){return V}));var Y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),H=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),a=0;for(t=0;t<r;t++)for(var i=arguments[t],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n},V=function(e){function t(t){var r=e.call(this,t)||this;return r.chartOptions=[{key:y.a.Bar,text:l.a.FeatureImportanceWrapper.barText},{key:y.a.Box,text:l.a.FeatureImportanceWrapper.boxText}],r.minK=Math.min(4,r.props.jointDataset.localExplanationFeatureCount),r.maxK=Math.min(30,r.props.jointDataset.localExplanationFeatureCount),r.hasDataset=r.props.jointDataset.hasDataset,r.explainerCalloutInfo=r.props.explanationMethod&&B[r.props.explanationMethod],r._chartConfigId="chart-connfig-button",r.setNumericValue=function(e,t,n,a){if(0===e){var i=+a;if(!Number.isInteger(i)||i>t||i<n)return r.state.topK.toString();r.setTopK(i)}else{var o=r.state.topK,s=o+e;if(s>t||s<n)return o.toString();r.setTopK(s)}},r.props.jointDataset.hasLocalExplanations?(r.state={startingK:0,topK:r.minK,selectedCohortIndex:0,sortingSeriesIndex:0,sortArray:x.a.getSortIndices(r.props.cohorts[0].calculateAverageImportance()).reverse(),seriesIsActive:t.cohorts.map((function(e){return!0})),calloutVisible:!1,dependenceTooltipVisible:!1,crossClassInfoVisible:!1,explanationTooltipVisible:!1,chartType:y.a.Bar},void 0===r.props.globalBarSettings&&r.setDefaultSettings(t),r.props.metadata.modelType===s.a.multiclass&&(r.weightOptions=r.props.weightOptions.map((function(e){return{text:r.props.weightLabels[e],key:e}}))),r.buildGlobalSeries(),r.buildActiveCohortSeries(r.state.sortArray),r.handleFeatureSelection=r.handleFeatureSelection.bind(r),r.setStartingK=r.setStartingK.bind(r),r.setSelectedCohort=r.setSelectedCohort.bind(r),r.setSortIndex=r.setSortIndex.bind(r),r.onXSet=r.onXSet.bind(r),r.toggleCalloutOpen=r.toggleCalloutOpen.bind(r),r.closeCallout=r.closeCallout.bind(r),r.onChartTypeChange=r.onChartTypeChange.bind(r),r.setWeightOption=r.setWeightOption.bind(r),r.toggleDependencePlotTooltip=r.toggleDependencePlotTooltip.bind(r),r.toggleCrossClassInfo=r.toggleCrossClassInfo.bind(r),r.toggleExplanationTooltip=r.toggleExplanationTooltip.bind(r),r):r}return Y(t,e),t.prototype.componentDidUpdate=function(e){this.props.cohorts===e.cohorts&&this.props.selectedWeightVector===e.selectedWeightVector||this.updateIncludedCohortsOnCohortEdit()},t.prototype.render=function(){var e=this,t=T();if(!this.props.jointDataset.hasLocalExplanations)return void 0!==this.props.globalImportance?i.a.createElement(F,{metadata:this.props.metadata,globalImportance:this.props.globalImportance}):i.a.createElement("div",{className:t.missingParametersPlaceholder},i.a.createElement("div",{className:t.missingParametersPlaceholderSpacer},i.a.createElement(f.a,{variant:"large",className:t.faintText},l.a.GlobalTab.missingParameters)));var r=Math.max(0,this.props.jointDataset.localExplanationFeatureCount-this.state.topK);if(void 0===this.props.globalBarSettings)return i.a.createElement("div",null);for(var n=this.props.cohorts.map((function(e,t){return{key:t,text:e.name}})),a=[],c=0;c<this.props.jointDataset.datasetFeatureCount;c++){var u=o.c.DataLabelRoot+c.toString();a.push({key:u,text:this.props.jointDataset.metaDict[u].label})}return i.a.createElement("div",{className:t.page},i.a.createElement("div",{className:t.infoWithText},i.a.createElement(S.a,{iconName:"Info",className:t.infoIcon}),i.a.createElement(f.a,{variant:"medium",className:t.helperText},l.a.GlobalTab.helperText)),i.a.createElement("div",{className:t.globalChartControls},i.a.createElement(f.a,{variant:"medium",className:t.sliderLabel},l.a.formatString(l.a.GlobalTab.topAtoB,this.state.startingK+1,this.state.startingK+this.state.topK)),i.a.createElement(_.a,{className:t.startingK,ariaLabel:l.a.AggregateImportance.topKFeatures,max:r,min:0,step:1,value:this.state.startingK,onChange:this.setStartingK,showValue:!1})),i.a.createElement("div",{className:t.rightJustifiedContainer},this.explainerCalloutInfo&&i.a.createElement(L.a,{iconProps:{iconName:"Info"},id:"explanation-info",className:t.infoButton,text:l.a.ExplanationSummary.whatDoExplanationsMean,onClick:this.toggleExplanationTooltip}),this.state.explanationTooltipVisible&&i.a.createElement(A.a,{doNotLayer:!0,target:"#explanation-info",setInitialFocus:!0,onDismiss:this.toggleExplanationTooltip,role:"alertdialog",styles:{container:m.a.calloutContainer}},i.a.createElement("div",{className:t.calloutWrapper},i.a.createElement("div",{className:t.calloutHeader},i.a.createElement(f.a,{className:t.calloutTitle},this.explainerCalloutInfo.title)),i.a.createElement("div",{className:t.calloutInner},i.a.createElement(f.a,null,this.explainerCalloutInfo.description),this.explainerCalloutInfo.linkUrl&&i.a.createElement("div",{className:t.calloutActions},i.a.createElement(E.a,{className:t.calloutLink,href:this.explainerCalloutInfo.linkUrl,target:"_blank"},l.a.ExplanationSummary.clickHere))))),i.a.createElement(D.a,{className:t.chartEditorButton,onClick:this.toggleCalloutOpen,iconProps:{iconName:"Settings"},id:this._chartConfigId}),this.state.calloutVisible&&i.a.createElement(A.a,{doNotLayer:!0,className:t.callout,gapSpace:0,target:"#"+this._chartConfigId,isBeakVisible:!1,onDismiss:this.closeCallout,directionalHint:I.a.bottomRightEdge,setInitialFocus:!0,styles:{container:m.a.calloutContainer}},i.a.createElement(f.a,{variant:"medium",className:t.boldText},l.a.DatasetExplorer.chartType),i.a.createElement(P.a,{selectedKey:this.state.chartType,options:this.chartOptions,onChange:this.onChartTypeChange}),i.a.createElement(b.a,{className:t.topK,styles:{spinButtonWrapper:{maxWidth:"100px"},labelWrapper:{alignSelf:"center"},root:{float:"right",selectors:{"> div":{maxWidth:"110px"}}}},label:l.a.AggregateImportance.topKFeatures,min:this.minK,max:this.maxK,value:this.state.topK.toString(),onIncrement:this.setNumericValue.bind(this,1,this.maxK,this.minK),onDecrement:this.setNumericValue.bind(this,-1,this.maxK,this.minK),onValidate:this.setNumericValue.bind(this,0,this.maxK,this.minK)}))),i.a.createElement("div",{className:t.globalChartWithLegend},i.a.createElement(M.a,{jointDataset:this.props.jointDataset,yAxisLabels:[l.a.GlobalTab.aggregateFeatureImportance],sortArray:this.state.sortArray,chartType:this.state.chartType,startingK:this.state.startingK,unsortedX:this.props.metadata.featureNamesAbridged,unsortedSeries:this.activeSeries,topK:this.state.topK,onFeatureSelection:this.handleFeatureSelection,selectedFeatureIndex:this.state.selectedFeatureIndex}),i.a.createElement("div",{className:t.legendAndSort},i.a.createElement(f.a,{variant:"mediumPlus",block:!0,className:t.cohortLegend},l.a.GlobalTab.datasetCohorts),i.a.createElement(f.a,{variant:"small",className:t.legendHelpText},l.a.GlobalTab.legendHelpText),i.a.createElement(C.a,{items:this.cohortSeries.map((function(t,r){return{name:t.name,color:m.a.fabricColorPalette[t.colorIndex],activated:e.state.seriesIsActive[r],onClick:e.toggleActivation.bind(e,r)}}))}),i.a.createElement(f.a,{variant:"medium",className:t.cohortLegend},l.a.GlobalTab.sortBy),i.a.createElement(k.a,{options:n,selectedKey:this.state.sortingSeriesIndex,onChange:this.setSortIndex}),this.props.metadata.modelType===s.a.multiclass&&i.a.createElement("div",null,i.a.createElement("div",{className:t.multiclassWeightLabel},i.a.createElement(f.a,{variant:"medium",className:t.multiclassWeightLabelText},l.a.GlobalTab.weightOptions),i.a.createElement(D.a,{id:"cross-class-weight-info",iconProps:{iconName:"Info"},title:l.a.CrossClass.info,onClick:this.toggleCrossClassInfo})),i.a.createElement(k.a,{options:this.weightOptions,selectedKey:this.props.selectedWeightVector,onChange:this.setWeightOption}),this.state.crossClassInfoVisible&&i.a.createElement(A.a,{doNotLayer:!0,target:"#cross-class-weight-info",setInitialFocus:!0,onDismiss:this.toggleCrossClassInfo,directionalHint:I.a.leftCenter,role:"alertdialog",styles:{container:m.a.calloutContainer}},i.a.createElement("div",{className:t.calloutWrapper},i.a.createElement("div",{className:t.calloutHeader},i.a.createElement(f.a,{className:t.calloutTitle},l.a.CrossClass.crossClassWeights)),i.a.createElement("div",{className:t.calloutInner},i.a.createElement(f.a,null,l.a.CrossClass.overviewInfo),i.a.createElement("ul",null,i.a.createElement("li",null,i.a.createElement(f.a,null,l.a.CrossClass.absoluteValInfo)),i.a.createElement("li",null,i.a.createElement(f.a,null,l.a.CrossClass.enumeratedClassInfo))))))))),!this.hasDataset&&i.a.createElement("div",{className:t.missingParametersPlaceholder},i.a.createElement("div",{className:t.missingParametersPlaceholderSpacer},i.a.createElement(f.a,{variant:"large",className:t.faintText},l.a.GlobalTab.datasetRequired))),this.hasDataset&&i.a.createElement("div",null,i.a.createElement("div",{className:t.rightJustifiedContainer},i.a.createElement(L.a,{iconProps:{iconName:"Info"},id:"dependence-plot-info",className:t.infoButton,text:l.a.Charts.howToRead,onClick:this.toggleDependencePlotTooltip}),this.state.dependenceTooltipVisible&&i.a.createElement(A.a,{doNotLayer:!0,target:"#dependence-plot-info",setInitialFocus:!0,onDismiss:this.toggleDependencePlotTooltip,role:"alertdialog",styles:{container:m.a.calloutContainer}},i.a.createElement("div",{className:t.calloutWrapper},i.a.createElement("div",{className:t.calloutHeader},i.a.createElement(f.a,{className:t.calloutTitle},l.a.GlobalTab.dependencePlotTitle)),i.a.createElement("div",{className:t.calloutInner},i.a.createElement(f.a,null,l.a.GlobalTab.dependencePlotHelperText))))),i.a.createElement("div",{className:t.secondaryChartAndLegend},i.a.createElement(v,{chartProps:this.props.dependenceProps,cohortIndex:this.state.selectedCohortIndex,cohort:this.props.cohorts[this.state.selectedCohortIndex],jointDataset:this.props.jointDataset,metadata:this.props.metadata,onChange:this.props.onDependenceChange,selectedWeight:this.props.selectedWeightVector,selectedWeightLabel:this.props.weightLabels[this.props.selectedWeightVector]}),i.a.createElement("div",{className:t.legendAndSort},i.a.createElement(f.a,{variant:"medium",block:!0,className:t.cohortLegend},l.a.GlobalTab.viewDependencePlotFor),a&&i.a.createElement(w.a,{useComboBoxAsMenuWidth:!0,options:a,allowFreeform:!1,autoComplete:"on",placeholder:l.a.GlobalTab.dependencePlotFeatureSelectPlaceholder,selectedKey:this.props.dependenceProps?this.props.dependenceProps.xAxis.property:void 0,onChange:this.onXSet,calloutProps:m.a.calloutProps,styles:m.a.defaultDropdownStyle}),i.a.createElement(f.a,{variant:"medium",block:!0,className:t.cohortLegendWithTop},l.a.GlobalTab.datasetCohortSelector),n&&i.a.createElement(k.a,{options:n,selectedKey:this.state.selectedCohortIndex,onChange:this.setSelectedCohort})))))},t.prototype.setSelectedCohort=function(e,t){this.setState({selectedCohortIndex:t.key})},t.prototype.setStartingK=function(e){this.setState({startingK:e})},t.prototype.setTopK=function(e){this.setState({topK:e})},t.prototype.toggleCalloutOpen=function(){this.setState({calloutVisible:!this.state.calloutVisible})},t.prototype.toggleDependencePlotTooltip=function(){this.setState({dependenceTooltipVisible:!this.state.dependenceTooltipVisible})},t.prototype.toggleCrossClassInfo=function(){this.setState({crossClassInfoVisible:!this.state.crossClassInfoVisible})},t.prototype.toggleExplanationTooltip=function(){this.setState({explanationTooltipVisible:!this.state.explanationTooltipVisible})},t.prototype.closeCallout=function(){this.setState({calloutVisible:!1})},t.prototype.onChartTypeChange=function(e,t){this.setState({chartType:t.key})},t.prototype.toggleActivation=function(e){var t=H(this.state.seriesIsActive);t[e]=!t[e],this.buildActiveCohortSeries(t),this.setState({seriesIsActive:t})},t.prototype.buildGlobalSeries=function(){this.cohortSeries=this.props.cohorts.map((function(e,t){return{name:e.name,unsortedIndividualY:e.transposedLocalFeatureImportances(),unsortedAggregateY:e.calculateAverageImportance(),colorIndex:t}}))},t.prototype.buildActiveCohortSeries=function(e){var t=this;this.activeSeries=e.map((function(e,r){if(e)return t.cohortSeries[r]})).filter((function(e){return!!e}))},t.prototype.updateIncludedCohortsOnCohortEdit=function(){var e=this.state.selectedCohortIndex;e>=this.props.cohorts.length&&(e=0);var t=this.props.cohorts.map((function(e){return!0}));this.buildGlobalSeries(),this.buildActiveCohortSeries(t),this.setState({selectedCohortIndex:e,seriesIsActive:t})},t.prototype.setDefaultSettings=function(e){var t={};t.topK=Math.min(this.props.jointDataset.localExplanationFeatureCount,4),t.startingK=0,t.sortOption="global",t.includeOverallGlobal=!this.props.isGlobalDerivedFromLocal,this.props.onChange(t)},t.prototype.setSortIndex=function(e,t){var r=t.key,n=x.a.getSortIndices(this.cohortSeries[r].unsortedAggregateY).reverse();this.setState({sortingSeriesIndex:r,sortArray:n})},t.prototype.setWeightOption=function(e,t){var r=t.key;this.props.onWeightChange(r)},t.prototype.onXSet=function(e,t){var r=t.key,n=this.props.jointDataset.metaDict[r].index;this.handleFeatureSelection(this.state.selectedCohortIndex,n)},t.prototype.handleFeatureSelection=function(e,t){var r=o.c.DataLabelRoot+t.toString(),n=this.props.jointDataset.metaDict[r].treatAsCategorical,a=o.c.ReducedLocalImportanceRoot+t.toString(),i={chartType:y.a.Scatter,xAxis:{property:r,options:{dither:n,bin:!1}},yAxis:{property:a,options:{}}};this.props.onDependenceChange(i),this.setState({selectedCohortIndex:e,selectedFeatureIndex:t})},t}(i.a.PureComponent)},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(24);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=[],a=[],i=n.a.getInstance();return function e(t){for(var n=0,o=t;n<o.length;n++){var s=o[n];if(s)if("string"==typeof s)if(s.indexOf(" ")>=0)e(s.split(" "));else{var l=i.argsFromClassName(s);l?e(l):-1===r.indexOf(s)&&r.push(s)}else Array.isArray(s)?e(s):"object"==typeof s&&a.push(s)}}(e),{classes:r,objects:a}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=!1},function(e,t,r){"use strict";r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(24),a=r(71);function i(e,t){for(var r in e)if(e.hasOwnProperty(r)&&(!t.hasOwnProperty(r)||t[r]!==e[r]))return!1;return!0}function o(e,t){return i(e,t)&&i(t,e)}function s(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return l.apply(this,[null,e].concat(t))}function l(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];t=t||{};for(var a=0,i=r;a<i.length;a++){var o=i[a];if(o)for(var s in o)!o.hasOwnProperty(s)||e&&!e(s)||(t[s]=o[s])}return t}var c=n.a.getInstance();c&&c.onReset&&c.onReset(a.b)},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(56);function a(e,t){return e&&e!==document.body?t(e)?e:a(Object(n.a)(e),t):null}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(77),a=function(){function e(t){this._id=e._uniqueId++,this._parent=t,this._eventRecords=[]}return e.raise=function(t,r,a,i){var o;if(e._isElement(t)){if("undefined"!=typeof document&&document.createEvent){var s=document.createEvent("HTMLEvents");s.initEvent(r,i||!1,!0),Object(n.a)(s,a),o=t.dispatchEvent(s)}else if("undefined"!=typeof document&&document.createEventObject){var l=document.createEventObject(a);t.fireEvent("on"+r,l)}}else for(;t&&!1!==o;){var c=t.__events__,u=c?c[r]:null;if(u)for(var d in u)if(u.hasOwnProperty(d))for(var p=u[d],h=0;!1!==o&&h<p.length;h++){var f=p[h];f.objectCallback&&(o=f.objectCallback.call(f.parent,a))}t=i?t.parent:null}return o},e.isObserved=function(e,t){var r=e&&e.__events__;return!!r&&!!r[t]},e.isDeclared=function(e,t){var r=e&&e.__declaredEvents;return!!r&&!!r[t]},e.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},e._isElement=function(e){return!!e&&(!!e.addEventListener||"undefined"!=typeof HTMLElement&&e instanceof HTMLElement)},e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.off(),this._parent=null)},e.prototype.onAll=function(e,t,r){for(var n in t)t.hasOwnProperty(n)&&this.on(e,n,t[n],r)},e.prototype.on=function(t,r,n,a){var i=this;if(r.indexOf(",")>-1)for(var o=r.split(/[ ,]+/),s=0;s<o.length;s++)this.on(t,o[s],n,a);else{var l=this._parent,c={target:t,eventName:r,parent:l,callback:n,options:a};if((o=t.__events__=t.__events__||{})[r]=o[r]||{count:0},o[r][this._id]=o[r][this._id]||[],o[r][this._id].push(c),o[r].count++,e._isElement(t)){var u=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!i._isDisposed){var r;try{if(!1===(r=n.apply(l,e))&&e[0]){var a=e[0];a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0}}catch(a){}return r}};c.elementCallback=u,t.addEventListener?t.addEventListener(r,u,a):t.attachEvent&&t.attachEvent("on"+r,u)}else{c.objectCallback=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!i._isDisposed)return n.apply(l,e)}}this._eventRecords.push(c)}},e.prototype.off=function(e,t,r,n){for(var a=0;a<this._eventRecords.length;a++){var i=this._eventRecords[a];if(!(e&&e!==i.target||t&&t!==i.eventName||r&&r!==i.callback||"boolean"==typeof n&&n!==i.options)){var o=i.target.__events__,s=o[i.eventName],l=s?s[this._id]:null;l&&(1!==l.length&&r?(s.count--,l.splice(l.indexOf(i),1)):(s.count-=l.length,delete o[i.eventName][this._id]),s.count||delete o[i.eventName]),i.elementCallback&&(i.target.removeEventListener?i.target.removeEventListener(i.eventName,i.elementCallback,i.options):i.target.detachEvent&&i.target.detachEvent("on"+i.eventName,i.elementCallback)),this._eventRecords.splice(a--,1)}}},e.prototype.raise=function(t,r,n){return e.raise(this._parent,t,r,n)},e.prototype.declare=function(e){var t=this._parent.__declaredEvents=this._parent.__declaredEvents||{};if("string"==typeof e)t[e]=!0;else for(var r=0;r<e.length;r++)t[e[r]]=!0},e._uniqueId=0,e}()},function(e,t,r){"use strict";var n,a;r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),function(e){e[e.links=0]="links",e[e.tabs=1]="tabs"}(n||(n={})),function(e){e[e.normal=0]="normal",e[e.large=1]="large"}(a||(a={}))},function(e,t,r){"use strict";var n=r(9);function a(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons"',src:"url('"+e+"fabric-icons-a13498cf.woff') format('woff')"},icons:{GlobalNavButton:"",ChevronDown:"",ChevronUp:"",Edit:"",Add:"",Cancel:"",More:"",Settings:"",Mail:"",Filter:"",Search:"",Share:"",BlockedSite:"",FavoriteStar:"",FavoriteStarFill:"",CheckMark:"",Delete:"",ChevronLeft:"",ChevronRight:"",Calendar:"",Megaphone:"",Undo:"",Flag:"",Page:"",Pinned:"",View:"",Clear:"",Download:"",Upload:"",Folder:"",Sort:"",AlignRight:"",AlignLeft:"",Tag:"",AddFriend:"",Info:"",SortLines:"",List:"",CircleRing:"",Heart:"",HeartFill:"",Tiles:"",Embed:"",Glimmer:"",Ascending:"",Descending:"",SortUp:"",SortDown:"",SyncToPC:"",LargeGrid:"",SkypeCheck:"",SkypeClock:"",SkypeMinus:"",ClearFilter:"",Flow:"",StatusCircleCheckmark:"",MoreVertical:""}};Object(n.I)(r,t)}function i(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-0"',src:"url('"+e+"fabric-icons-0-467ee27f.woff') format('woff')"},icons:{PageLink:"",CommentSolid:"",ChangeEntitlements:"",Installation:"",WebAppBuilderModule:"",WebAppBuilderFragment:"",WebAppBuilderSlot:"",BullseyeTargetEdit:"",WebAppBuilderFragmentCreate:"",PageData:"",PageHeaderEdit:"",ProductList:"",UnpublishContent:"",DependencyAdd:"",DependencyRemove:"",EntitlementPolicy:"",EntitlementRedemption:"",SchoolDataSyncLogo:"",PinSolid12:"",PinSolidOff12:"",AddLink:"",SharepointAppIcon16:"",DataflowsLink:"",TimePicker:"",UserWarning:"",ComplianceAudit:"",InternetSharing:"",Brightness:"",MapPin:"",Airplane:"",Tablet:"",QuickNote:"",Video:"",People:"",Phone:"",Pin:"",Shop:"",Stop:"",Link:"",AllApps:"",Zoom:"",ZoomOut:"",Microphone:"",Camera:"",Attach:"",Send:"",FavoriteList:"",PageSolid:"",Forward:"",Back:"",Refresh:"",Lock:"",ReportHacked:"",EMI:"",MiniLink:"",Blocked:"",ReadingMode:"",Favicon:"",Remove:"",Checkbox:"",CheckboxComposite:"",CheckboxFill:"",CheckboxIndeterminate:"",CheckboxCompositeReversed:"",BackToWindow:"",FullScreen:"",Print:"",Up:"",Down:"",OEM:"",Save:"",ReturnKey:"",Cloud:"",Flashlight:"",CommandPrompt:"",Sad:"",RealEstate:"",SIPMove:"",EraseTool:"",GripperTool:"",Dialpad:"",PageLeft:"",PageRight:"",MultiSelect:"",KeyboardClassic:"",Play:"",Pause:"",InkingTool:"",Emoji2:"",GripperBarHorizontal:"",System:"",Personalize:"",SearchAndApps:"",Globe:"",EaseOfAccess:"",ContactInfo:"",Unpin:"",Contact:"",Memo:"",IncomingCall:""}};Object(n.I)(r,t)}function o(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-1"',src:"url('"+e+"fabric-icons-1-4d521695.woff') format('woff')"},icons:{Paste:"",WindowsLogo:"",Error:"",GripperBarVertical:"",Unlock:"",Slideshow:"",Trim:"",AutoEnhanceOn:"",AutoEnhanceOff:"",Color:"",SaveAs:"",Light:"",Filters:"",AspectRatio:"",Contrast:"",Redo:"",Crop:"",PhotoCollection:"",Album:"",Rotate:"",PanoIndicator:"",Translate:"",RedEye:"",ViewOriginal:"",ThumbnailView:"",Package:"",Telemarketer:"",Warning:"",Financial:"",Education:"",ShoppingCart:"",Train:"",Move:"",TouchPointer:"",Merge:"",TurnRight:"",Ferry:"",Highlight:"",PowerButton:"",Tab:"",Admin:"",TVMonitor:"",Speakers:"",Game:"",HorizontalTabKey:"",UnstackSelected:"",StackIndicator:"",Nav2DMapView:"",StreetsideSplitMinimize:"",Car:"",Bus:"",EatDrink:"",SeeDo:"",LocationCircle:"",Home:"",SwitcherStartEnd:"",ParkingLocation:"",IncidentTriangle:"",Touch:"",MapDirections:"",CaretHollow:"",CaretSolid:"",History:"",Location:"",MapLayers:"",SearchNearby:"",Work:"",Recent:"",Hotel:"",Bank:"",LocationDot:"",Dictionary:"",ChromeBack:"",FolderOpen:"",PinnedFill:"",RevToggleKey:"",USB:"",Previous:"",Next:"",Sync:"",Help:"",Emoji:"",MailForward:"",ClosePane:"",OpenPane:"",PreviewLink:"",ZoomIn:"",Bookmarks:"",Document:"",ProtectedDocument:"",OpenInNewWindow:"",MailFill:"",ViewAll:"",Switch:"",Rename:"",Go:"",Remote:"",SelectAll:"",Orientation:"",Import:""}};Object(n.I)(r,t)}function s(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-2"',src:"url('"+e+"fabric-icons-2-63c99abf.woff') format('woff')"},icons:{Picture:"",ChromeClose:"",ShowResults:"",Message:"",CalendarDay:"",CalendarWeek:"",MailReplyAll:"",Read:"",Cut:"",PaymentCard:"",Copy:"",Important:"",MailReply:"",GotoToday:"",Font:"",FontColor:"",FolderFill:"",Permissions:"",DisableUpdates:"",Unfavorite:"",Italic:"",Underline:"",Bold:"",MoveToFolder:"",Dislike:"",Like:"",AlignCenter:"",OpenFile:"",ClearSelection:"",FontDecrease:"",FontIncrease:"",FontSize:"",CellPhone:"",RepeatOne:"",RepeatAll:"",Calculator:"",Library:"",PostUpdate:"",NewFolder:"",CalendarReply:"",UnsyncFolder:"",SyncFolder:"",BlockContact:"",Accept:"",BulletedList:"",Preview:"",News:"",Chat:"",Group:"",World:"",Comment:"",DockLeft:"",DockRight:"",Repair:"",Accounts:"",Street:"",RadioBullet:"",Stopwatch:"",Clock:"",WorldClock:"",AlarmClock:"",Photo:"",ActionCenter:"",Hospital:"",Timer:"",FullCircleMask:"",LocationFill:"",ChromeMinimize:"",ChromeRestore:"",Annotation:"",Fingerprint:"",Handwriting:"",ChromeFullScreen:"",Completed:"",Label:"",FlickDown:"",FlickUp:"",FlickLeft:"",FlickRight:"",MiniExpand:"",MiniContract:"",Streaming:"",MusicInCollection:"",OneDriveLogo:"",CompassNW:"",Code:"",LightningBolt:"",CalculatorMultiply:"",CalculatorAddition:"",CalculatorSubtract:"",CalculatorPercentage:"",CalculatorEqualTo:"",PrintfaxPrinterFile:"",StorageOptical:"",Communications:"",Headset:"",Health:"",Webcam2:"",FrontCamera:"",ChevronUpSmall:""}};Object(n.I)(r,t)}function l(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-3"',src:"url('"+e+"fabric-icons-3-089e217a.woff') format('woff')"},icons:{ChevronDownSmall:"",ChevronLeftSmall:"",ChevronRightSmall:"",ChevronUpMed:"",ChevronDownMed:"",ChevronLeftMed:"",ChevronRightMed:"",Devices2:"",PC1:"",PresenceChickletVideo:"",Reply:"",HalfAlpha:"",ConstructionCone:"",DoubleChevronLeftMed:"",Volume0:"",Volume1:"",Volume2:"",Volume3:"",Chart:"",Robot:"",Manufacturing:"",LockSolid:"",FitPage:"",FitWidth:"",BidiLtr:"",BidiRtl:"",RightDoubleQuote:"",Sunny:"",CloudWeather:"",Cloudy:"",PartlyCloudyDay:"",PartlyCloudyNight:"",ClearNight:"",RainShowersDay:"",Rain:"",Thunderstorms:"",RainSnow:"",Snow:"",BlowingSnow:"",Frigid:"",Fog:"",Squalls:"",Duststorm:"",Unknown:"",Precipitation:"",Ribbon:"",AreaChart:"",Assign:"",FlowChart:"",CheckList:"",Diagnostic:"",Generate:"",LineChart:"",Equalizer:"",BarChartHorizontal:"",BarChartVertical:"",Freezing:"",FunnelChart:"",Processing:"",Quantity:"",ReportDocument:"",StackColumnChart:"",SnowShowerDay:"",HailDay:"",WorkFlow:"",HourGlass:"",StoreLogoMed20:"",TimeSheet:"",TriangleSolid:"",UpgradeAnalysis:"",VideoSolid:"",RainShowersNight:"",SnowShowerNight:"",Teamwork:"",HailNight:"",PeopleAdd:"",Glasses:"",DateTime2:"",Shield:"",Header1:"",PageAdd:"",NumberedList:"",PowerBILogo:"",Info2:"",MusicInCollectionFill:"",Asterisk:"",ErrorBadge:"",CircleFill:"",Record2:"",AllAppsMirrored:"",BookmarksMirrored:"",BulletedListMirrored:"",CaretHollowMirrored:"",CaretSolidMirrored:"",ChromeBackMirrored:"",ClearSelectionMirrored:"",ClosePaneMirrored:"",DockLeftMirrored:"",DoubleChevronLeftMedMirrored:"",GoMirrored:""}};Object(n.I)(r,t)}function c(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-4"',src:"url('"+e+"fabric-icons-4-a656cc0a.woff') format('woff')"},icons:{HelpMirrored:"",ImportMirrored:"",ImportAllMirrored:"",ListMirrored:"",MailForwardMirrored:"",MailReplyMirrored:"",MailReplyAllMirrored:"",MiniContractMirrored:"",MiniExpandMirrored:"",OpenPaneMirrored:"",ParkingLocationMirrored:"",SendMirrored:"",ShowResultsMirrored:"",ThumbnailViewMirrored:"",Media:"",Devices3:"",Focus:"",VideoLightOff:"",Lightbulb:"",StatusTriangle:"",VolumeDisabled:"",Puzzle:"",EmojiNeutral:"",EmojiDisappointed:"",HomeSolid:"",Ringer:"",PDF:"",HeartBroken:"",StoreLogo16:"",MultiSelectMirrored:"",Broom:"",AddToShoppingList:"",Cocktails:"",Wines:"",Articles:"",Cycling:"",DietPlanNotebook:"",Pill:"",ExerciseTracker:"",HandsFree:"",Medical:"",Running:"",Weights:"",Trackers:"",AddNotes:"",AllCurrency:"",BarChart4:"",CirclePlus:"",Coffee:"",Cotton:"",Market:"",Money:"",PieDouble:"",PieSingle:"",RemoveFilter:"",Savings:"",Sell:"",StockDown:"",StockUp:"",Lamp:"",Source:"",MSNVideos:"",Cricket:"",Golf:"",Baseball:"",Soccer:"",MoreSports:"",AutoRacing:"",CollegeHoops:"",CollegeFootball:"",ProFootball:"",ProHockey:"",Rugby:"",SubstitutionsIn:"",Tennis:"",Arrivals:"",Design:"",Website:"",Drop:"",HistoricalWeather:"",SkiResorts:"",Snowflake:"",BusSolid:"",FerrySolid:"",AirplaneSolid:"",TrainSolid:"",Ticket:"",WifiWarning4:"",Devices4:"",AzureLogo:"",BingLogo:"",MSNLogo:"",OutlookLogoInverse:"",OfficeLogo:"",SkypeLogo:"",Door:"",EditMirrored:"",GiftCard:"",DoubleBookmark:"",StatusErrorFull:""}};Object(n.I)(r,t)}function u(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-5"',src:"url('"+e+"fabric-icons-5-f95ba260.woff') format('woff')"},icons:{Certificate:"",FastForward:"",Rewind:"",Photo2:"",OpenSource:"",Movers:"",CloudDownload:"",Family:"",WindDirection:"",Bug:"",SiteScan:"",BrowserScreenShot:"",F12DevTools:"",CSS:"",JS:"",DeliveryTruck:"",ReminderPerson:"",ReminderGroup:"",ReminderTime:"",TabletMode:"",Umbrella:"",NetworkTower:"",CityNext:"",CityNext2:"",Section:"",OneNoteLogoInverse:"",ToggleFilled:"",ToggleBorder:"",SliderThumb:"",ToggleThumb:"",Documentation:"",Badge:"",Giftbox:"",VisualStudioLogo:"",HomeGroup:"",ExcelLogoInverse:"",WordLogoInverse:"",PowerPointLogoInverse:"",Cafe:"",SpeedHigh:"",Commitments:"",ThisPC:"",MusicNote:"",MicOff:"",PlaybackRate1x:"",EdgeLogo:"",CompletedSolid:"",AlbumRemove:"",MessageFill:"",TabletSelected:"",MobileSelected:"",LaptopSelected:"",TVMonitorSelected:"",DeveloperTools:"",Shapes:"",InsertTextBox:"",LowerBrightness:"",WebComponents:"",OfflineStorage:"",DOM:"",CloudUpload:"",ScrollUpDown:"",DateTime:"",Event:"",Cake:"",Org:"",PartyLeader:"",DRM:"",CloudAdd:"",AppIconDefault:"",Photo2Add:"",Photo2Remove:"",Calories:"",POI:"",AddTo:"",RadioBtnOff:"",RadioBtnOn:"",ExploreContent:"",Product:"",ProgressLoopInner:"",ProgressLoopOuter:"",Blocked2:"",FangBody:"",Toolbox:"",PageHeader:"",ChatInviteFriend:"",Brush:"",Shirt:"",Crown:"",Diamond:"",ScaleUp:"",QRCode:"",Feedback:"",SharepointLogoInverse:"",YammerLogo:"",Hide:"",Uneditable:"",ReturnToSession:"",OpenFolderHorizontal:"",CalendarMirrored:""}};Object(n.I)(r,t)}function d(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-6"',src:"url('"+e+"fabric-icons-6-ef6fd590.woff') format('woff')"},icons:{SwayLogoInverse:"",OutOfOffice:"",Trophy:"",ReopenPages:"",EmojiTabSymbols:"",AADLogo:"",AccessLogo:"",AdminALogoInverse32:"",AdminCLogoInverse32:"",AdminDLogoInverse32:"",AdminELogoInverse32:"",AdminLLogoInverse32:"",AdminMLogoInverse32:"",AdminOLogoInverse32:"",AdminPLogoInverse32:"",AdminSLogoInverse32:"",AdminYLogoInverse32:"",DelveLogoInverse:"",ExchangeLogoInverse:"",LyncLogo:"",OfficeVideoLogoInverse:"",SocialListeningLogo:"",VisioLogoInverse:"",Balloons:"",Cat:"",MailAlert:"",MailCheck:"",MailLowImportance:"",MailPause:"",MailRepeat:"",SecurityGroup:"",Table:"",VoicemailForward:"",VoicemailReply:"",Waffle:"",RemoveEvent:"",EventInfo:"",ForwardEvent:"",WipePhone:"",AddOnlineMeeting:"",JoinOnlineMeeting:"",RemoveLink:"",PeopleBlock:"",PeopleRepeat:"",PeopleAlert:"",PeoplePause:"",TransferCall:"",AddPhone:"",UnknownCall:"",NoteReply:"",NoteForward:"",NotePinned:"",RemoveOccurrence:"",Timeline:"",EditNote:"",CircleHalfFull:"",Room:"",Unsubscribe:"",Subscribe:"",HardDrive:"",RecurringTask:"",TaskManager:"",TaskManagerMirrored:"",Combine:"",Split:"",DoubleChevronUp:"",DoubleChevronLeft:"",DoubleChevronRight:"",TextBox:"",TextField:"",NumberField:"",Dropdown:"",PenWorkspace:"",BookingsLogo:"",ClassNotebookLogoInverse:"",DelveAnalyticsLogo:"",DocsLogoInverse:"",Dynamics365Logo:"",DynamicSMBLogo:"",OfficeAssistantLogo:"",OfficeStoreLogo:"",OneNoteEduLogoInverse:"",PlannerLogo:"",PowerApps:"",Suitcase:"",ProjectLogoInverse:"",CaretLeft8:"",CaretRight8:"",CaretUp8:"",CaretDown8:"",CaretLeftSolid8:"",CaretRightSolid8:"",CaretUpSolid8:"",CaretDownSolid8:"",ClearFormatting:"",Superscript:"",Subscript:"",Strikethrough:"",Export:"",ExportMirrored:""}};Object(n.I)(r,t)}function p(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-7"',src:"url('"+e+"fabric-icons-7-2b97bb99.woff') format('woff')"},icons:{SingleBookmark:"",SingleBookmarkSolid:"",DoubleChevronDown:"",FollowUser:"",ReplyAll:"",WorkforceManagement:"",RecruitmentManagement:"",Questionnaire:"",ManagerSelfService:"",ProductionFloorManagement:"",ProductRelease:"",ProductVariant:"",ReplyMirrored:"",ReplyAllMirrored:"",Medal:"",AddGroup:"",QuestionnaireMirrored:"",CloudImportExport:"",TemporaryUser:"",CaretSolid16:"",GroupedDescending:"",GroupedAscending:"",AwayStatus:"",MyMoviesTV:"",GenericScan:"",AustralianRules:"",WifiEthernet:"",TrackersMirrored:"",DateTimeMirrored:"",StopSolid:"",DoubleChevronUp12:"",DoubleChevronDown12:"",DoubleChevronLeft12:"",DoubleChevronRight12:"",CalendarAgenda:"",ConnectVirtualMachine:"",AddEvent:"",AssetLibrary:"",DataConnectionLibrary:"",DocLibrary:"",FormLibrary:"",FormLibraryMirrored:"",ReportLibrary:"",ReportLibraryMirrored:"",ContactCard:"",CustomList:"",CustomListMirrored:"",IssueTracking:"",IssueTrackingMirrored:"",PictureLibrary:"",OfficeAddinsLogo:"",OfflineOneDriveParachute:"",OfflineOneDriveParachuteDisabled:"",TriangleSolidUp12:"",TriangleSolidDown12:"",TriangleSolidLeft12:"",TriangleSolidRight12:"",TriangleUp12:"",TriangleDown12:"",TriangleLeft12:"",TriangleRight12:"",ArrowUpRight8:"",ArrowDownRight8:"",DocumentSet:"",GoToDashboard:"",DelveAnalytics:"",ArrowUpRightMirrored8:"",ArrowDownRightMirrored8:"",CompanyDirectory:"",OpenEnrollment:"",CompanyDirectoryMirrored:"",OneDriveAdd:"",ProfileSearch:"",Header2:"",Header3:"",Header4:"",RingerSolid:"",Eyedropper:"",MarketDown:"",CalendarWorkWeek:"",SidePanel:"",GlobeFavorite:"",CaretTopLeftSolid8:"",CaretTopRightSolid8:"",ViewAll2:"",DocumentReply:"",PlayerSettings:"",ReceiptForward:"",ReceiptReply:"",ReceiptCheck:"",Fax:"",RecurringEvent:"",ReplyAlt:"",ReplyAllAlt:"",EditStyle:"",EditMail:"",Lifesaver:"",LifesaverLock:"",InboxCheck:"",FolderSearch:""}};Object(n.I)(r,t)}function h(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-8"',src:"url('"+e+"fabric-icons-8-6fdf1528.woff') format('woff')"},icons:{CollapseMenu:"",ExpandMenu:"",Boards:"",SunAdd:"",SunQuestionMark:"",LandscapeOrientation:"",DocumentSearch:"",PublicCalendar:"",PublicContactCard:"",PublicEmail:"",PublicFolder:"",WordDocument:"",PowerPointDocument:"",ExcelDocument:"",GroupedList:"",ClassroomLogo:"",Sections:"",EditPhoto:"",Starburst:"",ShareiOS:"",AirTickets:"",PencilReply:"",Tiles2:"",SkypeCircleCheck:"",SkypeCircleClock:"",SkypeCircleMinus:"",SkypeMessage:"",ClosedCaption:"",ATPLogo:"",OfficeFormsLogoInverse:"",RecycleBin:"",EmptyRecycleBin:"",Hide2:"",Breadcrumb:"",BirthdayCake:"",TimeEntry:"",CRMProcesses:"",PageEdit:"",PageArrowRight:"",PageRemove:"",Database:"",DataManagementSettings:"",CRMServices:"",EditContact:"",ConnectContacts:"",AppIconDefaultAdd:"",AppIconDefaultList:"",ActivateOrders:"",DeactivateOrders:"",ProductCatalog:"",ScatterChart:"",AccountActivity:"",DocumentManagement:"",CRMReport:"",KnowledgeArticle:"",Relationship:"",HomeVerify:"",ZipFolder:"",SurveyQuestions:"",TextDocument:"",TextDocumentShared:"",PageCheckedOut:"",PageShared:"",SaveAndClose:"",Script:"",Archive:"",ActivityFeed:"",Compare:"",EventDate:"",ArrowUpRight:"",CaretRight:"",SetAction:"",ChatBot:"",CaretSolidLeft:"",CaretSolidDown:"",CaretSolidRight:"",CaretSolidUp:"",PowerAppsLogo:"",PowerApps2Logo:"",SearchIssue:"",SearchIssueMirrored:"",FabricAssetLibrary:"",FabricDataConnectionLibrary:"",FabricDocLibrary:"",FabricFormLibrary:"",FabricFormLibraryMirrored:"",FabricReportLibrary:"",FabricReportLibraryMirrored:"",FabricPublicFolder:"",FabricFolderSearch:"",FabricMovetoFolder:"",FabricUnsyncFolder:"",FabricSyncFolder:"",FabricOpenFolderHorizontal:"",FabricFolder:"",FabricFolderFill:"",FabricNewFolder:"",FabricPictureLibrary:"",PhotoVideoMedia:"",AddFavorite:""}};Object(n.I)(r,t)}function f(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-9"',src:"url('"+e+"fabric-icons-9-c6162b42.woff') format('woff')"},icons:{AddFavoriteFill:"",BufferTimeBefore:"",BufferTimeAfter:"",BufferTimeBoth:"",PublishContent:"",ClipboardList:"",ClipboardListMirrored:"",CannedChat:"",SkypeForBusinessLogo:"",TabCenter:"",PageCheckedin:"",PageList:"",ReadOutLoud:"",CaretBottomLeftSolid8:"",CaretBottomRightSolid8:"",FolderHorizontal:"",MicrosoftStaffhubLogo:"",GiftboxOpen:"",StatusCircleOuter:"",StatusCircleInner:"",StatusCircleRing:"",StatusTriangleOuter:"",StatusTriangleInner:"",StatusTriangleExclamation:"",StatusCircleExclamation:"",StatusCircleErrorX:"",StatusCircleInfo:"",StatusCircleBlock:"",StatusCircleBlock2:"",StatusCircleQuestionMark:"",StatusCircleSync:"",Toll:"",ExploreContentSingle:"",CollapseContent:"",CollapseContentSingle:"",InfoSolid:"",GroupList:"",ProgressRingDots:"",CaloriesAdd:"",BranchFork:"",MuteChat:"",AddHome:"",AddWork:"",MobileReport:"",ScaleVolume:"",HardDriveGroup:"",FastMode:"",ToggleLeft:"",ToggleRight:"",TriangleShape:"",RectangleShape:"",CubeShape:"",Trophy2:"",BucketColor:"",BucketColorFill:"",Taskboard:"",SingleColumn:"",DoubleColumn:"",TripleColumn:"",ColumnLeftTwoThirds:"",ColumnRightTwoThirds:"",AccessLogoFill:"",AnalyticsLogo:"",AnalyticsQuery:"",NewAnalyticsQuery:"",AnalyticsReport:"",WordLogo:"",WordLogoFill:"",ExcelLogo:"",ExcelLogoFill:"",OneNoteLogo:"",OneNoteLogoFill:"",OutlookLogo:"",OutlookLogoFill:"",PowerPointLogo:"",PowerPointLogoFill:"",PublisherLogo:"",PublisherLogoFill:"",ScheduleEventAction:"",FlameSolid:"",ServerProcesses:"",Server:"",SaveAll:"",LinkedInLogo:"",Decimals:"",SidePanelMirrored:"",ProtectRestrict:"",Blog:"",UnknownMirrored:"",PublicContactCardMirrored:"",GridViewSmall:"",GridViewMedium:"",GridViewLarge:"",Step:"",StepInsert:"",StepShared:"",StepSharedAdd:"",StepSharedInsert:"",ViewDashboard:"",ViewList:""}};Object(n.I)(r,t)}function m(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-10"',src:"url('"+e+"fabric-icons-10-c4ded8e4.woff') format('woff')"},icons:{ViewListGroup:"",ViewListTree:"",TriggerAuto:"",TriggerUser:"",PivotChart:"",StackedBarChart:"",StackedLineChart:"",BuildQueue:"",BuildQueueNew:"",UserFollowed:"",ContactLink:"",Stack:"",Bullseye:"",VennDiagram:"",FiveTileGrid:"",FocalPoint:"",Insert:"",RingerRemove:"",TeamsLogoInverse:"",TeamsLogo:"",TeamsLogoFill:"",SkypeForBusinessLogoFill:"",SharepointLogo:"",SharepointLogoFill:"",DelveLogo:"",DelveLogoFill:"",OfficeVideoLogo:"",OfficeVideoLogoFill:"",ExchangeLogo:"",ExchangeLogoFill:"",Signin:"",DocumentApproval:"",CloneToDesktop:"",InstallToDrive:"",Blur:"",Build:"",ProcessMetaTask:"",BranchFork2:"",BranchLocked:"",BranchCommit:"",BranchCompare:"",BranchMerge:"",BranchPullRequest:"",BranchSearch:"",BranchShelveset:"",RawSource:"",MergeDuplicate:"",RowsGroup:"",RowsChild:"",Deploy:"",Redeploy:"",ServerEnviroment:"",VisioDiagram:"",HighlightMappedShapes:"",TextCallout:"",IconSetsFlag:"",VisioLogo:"",VisioLogoFill:"",VisioDocument:"",TimelineProgress:"",TimelineDelivery:"",Backlog:"",TeamFavorite:"",TaskGroup:"",TaskGroupMirrored:"",ScopeTemplate:"",AssessmentGroupTemplate:"",NewTeamProject:"",CommentAdd:"",CommentNext:"",CommentPrevious:"",ShopServer:"",LocaleLanguage:"",QueryList:"",UserSync:"",UserPause:"",StreamingOff:"",ArrowTallUpLeft:"",ArrowTallUpRight:"",ArrowTallDownLeft:"",ArrowTallDownRight:"",FieldEmpty:"",FieldFilled:"",FieldChanged:"",FieldNotChanged:"",RingerOff:"",PlayResume:"",BulletedList2:"",BulletedList2Mirrored:"",ImageCrosshair:"",GitGraph:"",Repo:"",RepoSolid:"",FolderQuery:"",FolderList:"",FolderListMirrored:"",LocationOutline:"",POISolid:"",CalculatorNotEqualTo:"",BoxSubtractSolid:""}};Object(n.I)(r,t)}function g(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-11"',src:"url('"+e+"fabric-icons-11-2a8393d6.woff') format('woff')"},icons:{BoxAdditionSolid:"",BoxMultiplySolid:"",BoxPlaySolid:"",BoxCheckmarkSolid:"",CirclePauseSolid:"",CirclePause:"",MSNVideosSolid:"",CircleStopSolid:"",CircleStop:"",NavigateBack:"",NavigateBackMirrored:"",NavigateForward:"",NavigateForwardMirrored:"",UnknownSolid:"",UnknownMirroredSolid:"",CircleAddition:"",CircleAdditionSolid:"",FilePDB:"",FileTemplate:"",FileSQL:"",FileJAVA:"",FileASPX:"",FileCSS:"",FileSass:"",FileLess:"",FileHTML:"",JavaScriptLanguage:"",CSharpLanguage:"",CSharp:"",VisualBasicLanguage:"",VB:"",CPlusPlusLanguage:"",CPlusPlus:"",FSharpLanguage:"",FSharp:"",TypeScriptLanguage:"",PythonLanguage:"",PY:"",CoffeeScript:"",MarkDownLanguage:"",FullWidth:"",FullWidthEdit:"",Plug:"",PlugSolid:"",PlugConnected:"",PlugDisconnected:"",UnlockSolid:"",Variable:"",Parameter:"",CommentUrgent:"",Storyboard:"",DiffInline:"",DiffSideBySide:"",ImageDiff:"",ImagePixel:"",FileBug:"",FileCode:"",FileComment:"",BusinessHoursSign:"",FileImage:"",FileSymlink:"",AutoFillTemplate:"",WorkItem:"",WorkItemBug:"",LogRemove:"",ColumnOptions:"",Packages:"",BuildIssue:"",AssessmentGroup:"",VariableGroup:"",FullHistory:"",Wheelchair:"",SingleColumnEdit:"",DoubleColumnEdit:"",TripleColumnEdit:"",ColumnLeftTwoThirdsEdit:"",ColumnRightTwoThirdsEdit:"",StreamLogo:"",PassiveAuthentication:"",AlertSolid:"",MegaphoneSolid:"",TaskSolid:"",ConfigurationSolid:"",BugSolid:"",CrownSolid:"",Trophy2Solid:"",QuickNoteSolid:"",ConstructionConeSolid:"",PageListSolid:"",PageListMirroredSolid:"",StarburstSolid:"",ReadingModeSolid:"",SadSolid:"",HealthSolid:"",ShieldSolid:"",GiftBoxSolid:"",ShoppingCartSolid:"",MailSolid:"",ChatSolid:"",RibbonSolid:""}};Object(n.I)(r,t)}function v(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-12"',src:"url('"+e+"fabric-icons-12-7e945a1e.woff') format('woff')"},icons:{FinancialSolid:"",FinancialMirroredSolid:"",HeadsetSolid:"",PermissionsSolid:"",ParkingSolid:"",ParkingMirroredSolid:"",DiamondSolid:"",AsteriskSolid:"",OfflineStorageSolid:"",BankSolid:"",DecisionSolid:"",Parachute:"",ParachuteSolid:"",FiltersSolid:"",ColorSolid:"",ReviewSolid:"",ReviewRequestSolid:"",ReviewRequestMirroredSolid:"",ReviewResponseSolid:"",FeedbackRequestSolid:"",FeedbackRequestMirroredSolid:"",FeedbackResponseSolid:"",WorkItemBar:"",WorkItemBarSolid:"",Separator:"",NavigateExternalInline:"",PlanView:"",TimelineMatrixView:"",EngineeringGroup:"",ProjectCollection:"",CaretBottomRightCenter8:"",CaretBottomLeftCenter8:"",CaretTopRightCenter8:"",CaretTopLeftCenter8:"",DonutChart:"",ChevronUnfold10:"",ChevronFold10:"",DoubleChevronDown8:"",DoubleChevronUp8:"",DoubleChevronLeft8:"",DoubleChevronRight8:"",ChevronDownEnd6:"",ChevronUpEnd6:"",ChevronLeftEnd6:"",ChevronRightEnd6:"",ContextMenu:"",AzureAPIManagement:"",AzureServiceEndpoint:"",VSTSLogo:"",VSTSAltLogo1:"",VSTSAltLogo2:"",FileTypeSolution:"",WordLogoInverse16:"",WordLogo16:"",WordLogoFill16:"",PowerPointLogoInverse16:"",PowerPointLogo16:"",PowerPointLogoFill16:"",ExcelLogoInverse16:"",ExcelLogo16:"",ExcelLogoFill16:"",OneNoteLogoInverse16:"",OneNoteLogo16:"",OneNoteLogoFill16:"",OutlookLogoInverse16:"",OutlookLogo16:"",OutlookLogoFill16:"",PublisherLogoInverse16:"",PublisherLogo16:"",PublisherLogoFill16:"",VisioLogoInverse16:"",VisioLogo16:"",VisioLogoFill16:"",TestBeaker:"",TestBeakerSolid:"",TestExploreSolid:"",TestAutoSolid:"",TestUserSolid:"",TestImpactSolid:"",TestPlan:"",TestStep:"",TestParameter:"",TestSuite:"",TestCase:"",Sprint:"",SignOut:"",TriggerApproval:"",Rocket:"",AzureKeyVault:"",Onboarding:"",Transition:"",LikeSolid:"",DislikeSolid:"",CRMCustomerInsightsApp:"",EditCreate:"",PlayReverseResume:"",PlayReverse:"",SearchData:"",UnSetColor:"",DeclineCall:""}};Object(n.I)(r,t)}function y(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-13"',src:"url('"+e+"fabric-icons-13-c3989a02.woff') format('woff')"},icons:{RectangularClipping:"",TeamsLogo16:"",TeamsLogoFill16:"",Spacer:"",SkypeLogo16:"",SkypeForBusinessLogo16:"",SkypeForBusinessLogoFill16:"",FilterSolid:"",MailUndelivered:"",MailTentative:"",MailTentativeMirrored:"",MailReminder:"",ReceiptUndelivered:"",ReceiptTentative:"",ReceiptTentativeMirrored:"",Inbox:"",IRMReply:"",IRMReplyMirrored:"",IRMForward:"",IRMForwardMirrored:"",VoicemailIRM:"",EventAccepted:"",EventTentative:"",EventTentativeMirrored:"",EventDeclined:"",IDBadge:"",BackgroundColor:"",OfficeFormsLogoInverse16:"",OfficeFormsLogo:"",OfficeFormsLogoFill:"",OfficeFormsLogo16:"",OfficeFormsLogoFill16:"",OfficeFormsLogoInverse24:"",OfficeFormsLogo24:"",OfficeFormsLogoFill24:"",PageLock:"",NotExecuted:"",NotImpactedSolid:"",FieldReadOnly:"",FieldRequired:"",BacklogBoard:"",ExternalBuild:"",ExternalTFVC:"",ExternalXAML:"",IssueSolid:"",DefectSolid:"",LadybugSolid:"",NugetLogo:"",TFVCLogo:"",ProjectLogo32:"",ProjectLogoFill32:"",ProjectLogo16:"",ProjectLogoFill16:"",SwayLogo32:"",SwayLogoFill32:"",SwayLogo16:"",SwayLogoFill16:"",ClassNotebookLogo32:"",ClassNotebookLogoFill32:"",ClassNotebookLogo16:"",ClassNotebookLogoFill16:"",ClassNotebookLogoInverse32:"",ClassNotebookLogoInverse16:"",StaffNotebookLogo32:"",StaffNotebookLogoFill32:"",StaffNotebookLogo16:"",StaffNotebookLogoFill16:"",StaffNotebookLogoInverted32:"",StaffNotebookLogoInverted16:"",KaizalaLogo:"",TaskLogo:"",ProtectionCenterLogo32:"",GallatinLogo:"",Globe2:"",Guitar:"",Breakfast:"",Brunch:"",BeerMug:"",Vacation:"",Teeth:"",Taxi:"",Chopsticks:"",SyncOccurence:"",UnsyncOccurence:"",GIF:"",PrimaryCalendar:"",SearchCalendar:"",VideoOff:"",MicrosoftFlowLogo:"",BusinessCenterLogo:"",ToDoLogoBottom:"",ToDoLogoTop:"",EditSolid12:"",EditSolidMirrored12:"",UneditableSolid12:"",UneditableSolidMirrored12:"",UneditableMirrored:"",AdminALogo32:"",AdminALogoFill32:"",ToDoLogoInverse:""}};Object(n.I)(r,t)}function b(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-14"',src:"url('"+e+"fabric-icons-14-5cf58db8.woff') format('woff')"},icons:{Snooze:"",WaffleOffice365:"",ImageSearch:"",NewsSearch:"",VideoSearch:"",R:"",FontColorA:"",FontColorSwatch:"",LightWeight:"",NormalWeight:"",SemiboldWeight:"",GroupObject:"",UngroupObject:"",AlignHorizontalLeft:"",AlignHorizontalCenter:"",AlignHorizontalRight:"",AlignVerticalTop:"",AlignVerticalCenter:"",AlignVerticalBottom:"",HorizontalDistributeCenter:"",VerticalDistributeCenter:"",Ellipse:"",Line:"",Octagon:"",Hexagon:"",Pentagon:"",RightTriangle:"",HalfCircle:"",QuarterCircle:"",ThreeQuarterCircle:"","6PointStar":"","12PointStar":"",ArrangeBringToFront:"",ArrangeSendToBack:"",ArrangeSendBackward:"",ArrangeBringForward:"",BorderDash:"",BorderDot:"",LineStyle:"",LineThickness:"",WindowEdit:"",HintText:"",MediaAdd:"",AnchorLock:"",AutoHeight:"",ChartSeries:"",ChartXAngle:"",ChartYAngle:"",Combobox:"",LineSpacing:"",Padding:"",PaddingTop:"",PaddingBottom:"",PaddingLeft:"",PaddingRight:"",NavigationFlipper:"",AlignJustify:"",TextOverflow:"",VisualsFolder:"",VisualsStore:"",PictureCenter:"",PictureFill:"",PicturePosition:"",PictureStretch:"",PictureTile:"",Slider:"",SliderHandleSize:"",DefaultRatio:"",NumberSequence:"",GUID:"",ReportAdd:"",DashboardAdd:"",MapPinSolid:"",WebPublish:"",PieSingleSolid:"",BlockedSolid:"",DrillDown:"",DrillDownSolid:"",DrillExpand:"",DrillShow:"",SpecialEvent:"",OneDriveFolder16:"",FunctionalManagerDashboard:"",BIDashboard:"",CodeEdit:"",RenewalCurrent:"",RenewalFuture:"",SplitObject:"",BulkUpload:"",DownloadDocument:"",GreetingCard:"",Flower:"",WaitlistConfirm:"",WaitlistConfirmMirrored:"",LaptopSecure:"",DragObject:"",EntryView:"",EntryDecline:"",ContactCardSettings:"",ContactCardSettingsMirrored:""}};Object(n.I)(r,t)}function _(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-15"',src:"url('"+e+"fabric-icons-15-3807251b.woff') format('woff')"},icons:{CalendarSettings:"",CalendarSettingsMirrored:"",HardDriveLock:"",HardDriveUnlock:"",AccountManagement:"",ReportWarning:"",TransitionPop:"",TransitionPush:"",TransitionEffect:"",LookupEntities:"",ExploreData:"",AddBookmark:"",SearchBookmark:"",DrillThrough:"",MasterDatabase:"",CertifiedDatabase:"",MaximumValue:"",MinimumValue:"",VisualStudioIDELogo32:"",PasteAsText:"",PasteAsCode:"",BrowserTab:"",BrowserTabScreenshot:"",DesktopScreenshot:"",FileYML:"",ClipboardSolid:"",FabricUserFolder:"",FabricNetworkFolder:"",BullseyeTarget:"",AnalyticsView:"",Video360Generic:"",Untag:"",Leave:"",Trending12:"",Blocked12:"",Warning12:"",CheckedOutByOther12:"",CheckedOutByYou12:"",CircleShapeSolid:"",SquareShapeSolid:"",TriangleShapeSolid:"",DropShapeSolid:"",RectangleShapeSolid:"",ZoomToFit:"",InsertColumnsLeft:"",InsertColumnsRight:"",InsertRowsAbove:"",InsertRowsBelow:"",DeleteColumns:"",DeleteRows:"",DeleteRowsMirrored:"",DeleteTable:"",AccountBrowser:"",VersionControlPush:"",StackedColumnChart2:"",TripleColumnWide:"",QuadColumn:"",WhiteBoardApp16:"",WhiteBoardApp32:"",PinnedSolid:"",InsertSignatureLine:"",ArrangeByFrom:"",Phishing:"",CreateMailRule:"",PublishCourse:"",DictionaryRemove:"",UserRemove:"",UserEvent:"",Encryption:"",PasswordField:"",OpenInNewTab:"",Hide3:"",VerifiedBrandSolid:"",MarkAsProtected:"",AuthenticatorApp:"",WebTemplate:"",DefenderTVM:"",MedalSolid:"",D365TalentLearn:"",D365TalentInsight:"",D365TalentHRCore:"",BacklogList:"",ButtonControl:"",TableGroup:"",MountainClimbing:"",TagUnknown:"",TagUnknownMirror:"",TagUnknown12:"",TagUnknown12Mirror:"",Link12:"",Presentation:"",Presentation12:"",Lock12:"",BuildDefinition:"",ReleaseDefinition:"",SaveTemplate:"",UserGauge:"",BlockedSiteSolid12:"",TagSolid:"",OfficeChat:""}};Object(n.I)(r,t)}function x(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-16"',src:"url('"+e+"fabric-icons-16-9cf93f3b.woff') format('woff')"},icons:{OfficeChatSolid:"",MailSchedule:"",WarningSolid:"",Blocked2Solid:"",SkypeCircleArrow:"",SkypeArrow:"",SyncStatus:"",SyncStatusSolid:"",ProjectDocument:"",ToDoLogoOutline:"",VisioOnlineLogoFill32:"",VisioOnlineLogo32:"",VisioOnlineLogoCloud32:"",VisioDiagramSync:"",Event12:"",EventDateMissed12:"",UserOptional:"",ResponsesMenu:"",DoubleDownArrow:"",DistributeDown:"",BookmarkReport:"",FilterSettings:"",GripperDotsVertical:"",MailAttached:"",AddIn:"",LinkedDatabase:"",TableLink:"",PromotedDatabase:"",BarChartVerticalFilter:"",BarChartVerticalFilterSolid:"",MicOff2:"",MicrosoftTranslatorLogo:"",ShowTimeAs:"",FileRequest:"",WorkItemAlert:"",PowerBILogo16:"",PowerBILogoBackplate16:"",BulletedListText:"",BulletedListBullet:"",BulletedListTextMirrored:"",BulletedListBulletMirrored:"",NumberedListText:"",NumberedListNumber:"",NumberedListTextMirrored:"",NumberedListNumberMirrored:"",RemoveLinkChain:"",RemoveLinkX:"",FabricTextHighlight:"",ClearFormattingA:"",ClearFormattingEraser:"",Photo2Fill:"",IncreaseIndentText:"",IncreaseIndentArrow:"",DecreaseIndentText:"",DecreaseIndentArrow:"",IncreaseIndentTextMirrored:"",IncreaseIndentArrowMirrored:"",DecreaseIndentTextMirrored:"",DecreaseIndentArrowMirrored:"",CheckListText:"",CheckListCheck:"",CheckListTextMirrored:"",CheckListCheckMirrored:"",NumberSymbol:"",Coupon:"",VerifiedBrand:"",ReleaseGate:"",ReleaseGateCheck:"",ReleaseGateError:"",M365InvoicingLogo:"",RemoveFromShoppingList:"",ShieldAlert:"",FabricTextHighlightComposite:"",Dataflows:"",GenericScanFilled:"",DiagnosticDataBarTooltip:"",SaveToMobile:"",Orientation2:"",ScreenCast:"",ShowGrid:"",SnapToGrid:"",ContactList:"",NewMail:"",EyeShadow:"",FabricFolderConfirm:"",InformationBarriers:"",CommentActive:"",ColumnVerticalSectionEdit:"",WavingHand:"",ShakeDevice:"",SmartGlassRemote:"",Rotate90Clockwise:"",Rotate90CounterClockwise:"",CampaignTemplate:"",ChartTemplate:"",PageListFilter:"",SecondaryNav:"",ColumnVerticalSection:"",SkypeCircleSlash:"",SkypeSlash:""}};Object(n.I)(r,t)}function w(e,t){void 0===e&&(e="");var r={style:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",fontStyle:"normal",fontWeight:"normal",speak:"none"},fontFace:{fontFamily:'"FabricMDL2Icons-17"',src:"url('"+e+"fabric-icons-17-0c4ed701.woff') format('woff')"},icons:{CustomizeToolbar:"",DuplicateRow:"",RemoveFromTrash:"",MailOptions:"",Childof:"",Footer:"",Header:"",BarChartVerticalFill:"",StackedColumnChart2Fill:"",PlainText:"",AccessibiltyChecker:"",DatabaseSync:"",ReservationOrders:"",TabOneColumn:"",TabTwoColumn:"",TabThreeColumn:"",BulletedTreeList:"",MicrosoftTranslatorLogoGreen:"",MicrosoftTranslatorLogoBlue:"",InternalInvestigation:"",AddReaction:"",ContactHeart:"",VisuallyImpaired:"",EventToDoLogo:"",Variable2:"",ModelingView:"",DisconnectVirtualMachine:"",ReportLock:"",Uneditable2:"",Uneditable2Mirrored:"",BarChartVerticalEdit:"",GlobalNavButtonActive:"",PollResults:"",Rerun:"",QandA:"",QandAMirror:"",BookAnswers:"",AlertSettings:"",TrimStart:"",TrimEnd:"",TableComputed:"",DecreaseIndentLegacy:"",IncreaseIndentLegacy:"",SizeLegacy:""}};Object(n.I)(r,t)}var k=function(){Object(n.H)("trash","delete"),Object(n.H)("onedrive","onedrivelogo"),Object(n.H)("alertsolid12","eventdatemissed12"),Object(n.H)("sixpointstar","6pointstar"),Object(n.H)("twelvepointstar","12pointstar"),Object(n.H)("toggleon","toggleleft"),Object(n.H)("toggleoff","toggleright")},M=r(58);Object(M.a)("@uifabric/icons","7.3.4"),r.d(t,"a",(function(){return C}));var T="https://spoprod-a.akamaihd.net/files/fabric/assets/icons/";function C(e,t){void 0===e&&(e=T),[a,i,o,s,l,c,u,d,p,h,f,m,g,v,y,b,_,x,w].forEach((function(r){return r(e,t)})),k()}},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(355),s=r(60),l=r(16),c=Object(o.a)(),u=function(e){function t(t){var r=e.call(this,t)||this;return r._coverStyle=l.a.portrait,r._imageElement=i.createRef(),r._frameElement=i.createRef(),r._onImageLoaded=function(e){var t=r.props,n=t.src,a=t.onLoad;a&&a(e),r._computeCoverStyle(r.props),n&&r.setState({loadState:l.c.loaded})},r._onImageError=function(e){r.props.onError&&r.props.onError(e),r.setState({loadState:l.c.error})},r.state={loadState:l.c.notLoaded},r}return Object(a.c)(t,e),t.prototype.UNSAFE_componentWillReceiveProps=function(e){e.src!==this.props.src?this.setState({loadState:l.c.notLoaded}):this.state.loadState===l.c.loaded&&this._computeCoverStyle(e)},t.prototype.componentDidUpdate=function(e,t){this._checkImageLoaded(),this.props.onLoadingStateChange&&t.loadState!==this.state.loadState&&this.props.onLoadingStateChange(this.state.loadState)},t.prototype.render=function(){var e=Object(s.d)(this.props,s.f,["width","height"]),t=this.props,r=t.src,n=t.alt,o=t.width,u=t.height,d=t.shouldFadeIn,p=t.shouldStartVisible,h=t.className,f=t.imageFit,m=t.role,g=t.maximizeFrame,v=t.styles,y=t.theme,b=this.state.loadState,_=void 0!==this.props.coverStyle?this.props.coverStyle:this._coverStyle,x=c(v,{theme:y,className:h,width:o,height:u,maximizeFrame:g,shouldFadeIn:d,shouldStartVisible:p,isLoaded:b===l.c.loaded||b===l.c.notLoaded&&this.props.shouldStartVisible,isLandscape:_===l.a.landscape,isCenter:f===l.b.center,isCenterContain:f===l.b.centerContain,isCenterCover:f===l.b.centerCover,isContain:f===l.b.contain,isCover:f===l.b.cover,isNone:f===l.b.none,isError:b===l.c.error,isNotImageFit:void 0===f});return i.createElement("div",{className:x.root,style:{width:o,height:u},ref:this._frameElement},i.createElement("img",Object(a.a)({},e,{onLoad:this._onImageLoaded,onError:this._onImageError,key:"fabricImage"+this.props.src||"",className:x.image,ref:this._imageElement,src:r,alt:n,role:m})))},t.prototype._checkImageLoaded=function(){var e=this.props.src;this.state.loadState===l.c.notLoaded&&(!!this._imageElement.current&&(e&&this._imageElement.current.naturalWidth>0&&this._imageElement.current.naturalHeight>0||this._imageElement.current.complete&&t._svgRegex.test(e))&&(this._computeCoverStyle(this.props),this.setState({loadState:l.c.loaded})))},t.prototype._computeCoverStyle=function(e){var t=e.imageFit,r=e.width,n=e.height;if((t===l.b.cover||t===l.b.contain||t===l.b.centerContain||t===l.b.centerCover)&&void 0===this.props.coverStyle&&this._imageElement.current&&this._frameElement.current){var a=void 0;a=r&&n&&t!==l.b.centerContain&&t!==l.b.centerCover?r/n:this._frameElement.current.clientWidth/this._frameElement.current.clientHeight;var i=this._imageElement.current.naturalWidth/this._imageElement.current.naturalHeight;this._coverStyle=i>a?l.a.landscape:l.a.portrait}},t.defaultProps={shouldFadeIn:!0},t._svgRegex=/\.svg$/i,t}(i.Component),d=r(9),p=r(17),h={root:"ms-Image",rootMaximizeFrame:"ms-Image--maximizeFrame",image:"ms-Image-image",imageCenter:"ms-Image-image--center",imageContain:"ms-Image-image--contain",imageCover:"ms-Image-image--cover",imageCenterContain:"ms-Image-image--centerContain",imageCenterCover:"ms-Image-image--centerCover",imageNone:"ms-Image-image--none",imageLandscape:"ms-Image-image--landscape",imagePortrait:"ms-Image-image--portrait"};r.d(t,"a",(function(){return f}));var f=Object(n.a)(u,(function(e){var t=e.className,r=e.width,n=e.height,a=e.maximizeFrame,i=e.isLoaded,o=e.shouldFadeIn,s=e.shouldStartVisible,l=e.isLandscape,c=e.isCenter,u=e.isContain,f=e.isCover,m=e.isCenterContain,g=e.isCenterCover,v=e.isNone,y=e.isError,b=e.isNotImageFit,_=e.theme,x=Object(d.v)(h,_),w={position:"absolute",left:"50% /* @noflip */",top:"50%",transform:"translate(-50%,-50%)"},k=Object(p.a)(),M=void 0!==k&&void 0===k.navigator.msMaxTouchPoints,T=u&&l||f&&!l?{width:"100%",height:"auto"}:{width:"auto",height:"100%"};return{root:[x.root,_.fonts.medium,{overflow:"hidden"},a&&[x.rootMaximizeFrame,{height:"100%",width:"100%"}],i&&o&&!s&&d.a.fadeIn400,(c||u||f||m||g)&&{position:"relative"},t],image:[x.image,{display:"block",opacity:0},i&&["is-loaded",{opacity:1}],c&&[x.imageCenter,w],u&&[x.imageContain,M&&{width:"100%",height:"100%",objectFit:"contain"},!M&&T,w],f&&[x.imageCover,M&&{width:"100%",height:"100%",objectFit:"cover"},!M&&T,w],m&&[x.imageCenterContain,l&&{maxWidth:"100%"},!l&&{maxHeight:"100%"},w],g&&[x.imageCenterCover,l&&{maxHeight:"100%"},!l&&{maxWidth:"100%"},w],v&&[x.imageNone,{width:"auto",height:"auto"}],b&&[!!r&&!n&&{height:"auto",width:"100%"},!r&&!!n&&{height:"100%",width:"auto"},!!r&&!!n&&{height:"100%",width:"100%"}],l&&x.imageLandscape,!l&&x.imagePortrait,!i&&"is-notLoaded",o&&"is-fadeIn",y&&"is-error"]}}),void 0,{scope:"Image"},!0)},function(e,t,r){"use strict";function n(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.length<2?t[0]:function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];t.forEach((function(t){return t&&t.apply(e,r)}))}}function a(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=n(e,e[r],t[r]))}r.d(t,"a",(function(){return a}))},function(e,t,r){"use strict";var n=r(2),a=["setState","render","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","getSnapshotBeforeUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount"];var i=r(95);r.d(t,"a",(function(){return o}));var o=function(e){function t(t){var r=e.call(this,t)||this;return r._skipComponentRefResolution=!0,r._updateComposedComponentRef=r._updateComposedComponentRef.bind(r),r}return Object(n.c)(t,e),t.prototype._updateComposedComponentRef=function(e){var t;this._composedComponentInstance=e,e?this._hoisted=function(e,t,r){void 0===r&&(r=a);var n=[],i=function(a){"function"!=typeof t[a]||void 0!==e[a]||r&&-1!==r.indexOf(a)||(n.push(a),e[a]=function(){t[a].apply(t,arguments)})};for(var o in t)i(o);return n}(this,e):this._hoisted&&(t=this,this._hoisted.forEach((function(e){return delete t[e]})))},t}(i.a)},,,function(e,t,r){"use strict";var n=r(111);r.o(n,"NewExplanationDashboard")&&r.d(t,"NewExplanationDashboard",(function(){return n.NewExplanationDashboard}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(50);function a(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var a=[],i=0,o=t;i<o.length;i++){var s=o[i];s&&a.push("function"==typeof s?s(e):s)}return 1===a.length?a[0]:a.length?n.a.apply(void 0,a):{}}},function(e,t,r){e.exports=r(290)},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(2);function a(e,t){return void 0===e&&(e={}),(o(t)?t:function(e){return function(t){return e?Object(n.a)(Object(n.a)({},t),e):t}}(t))(e)}function i(e,t){return void 0===e&&(e={}),(o(t)?t:function(e){void 0===e&&(e={});return function(t){var r=Object(n.a)({},t);for(var a in e)e.hasOwnProperty(a)&&(r[a]=Object(n.a)(Object(n.a)({},t[a]),e[a]));return r}}(t))(e)}function o(e){return"function"==typeof e}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(17),a=function(){function e(e,t){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=e||null,this._onErrorHandler=t,this._noop=function(){}}return e.prototype.dispose=function(){var e;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(e in this._timeoutIds)this._timeoutIds.hasOwnProperty(e)&&this.clearTimeout(parseInt(e,10));this._timeoutIds=null}if(this._immediateIds){for(e in this._immediateIds)this._immediateIds.hasOwnProperty(e)&&this.clearImmediate(parseInt(e,10));this._immediateIds=null}if(this._intervalIds){for(e in this._intervalIds)this._intervalIds.hasOwnProperty(e)&&this.clearInterval(parseInt(e,10));this._intervalIds=null}if(this._animationFrameIds){for(e in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(e)&&this.cancelAnimationFrame(parseInt(e,10));this._animationFrameIds=null}},e.prototype.setTimeout=function(e,t){var r=this,n=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),n=setTimeout((function(){try{r._timeoutIds&&delete r._timeoutIds[n],e.apply(r._parent)}catch(e){r._onErrorHandler&&r._onErrorHandler(e)}}),t),this._timeoutIds[n]=!0),n},e.prototype.clearTimeout=function(e){this._timeoutIds&&this._timeoutIds[e]&&(clearTimeout(e),delete this._timeoutIds[e])},e.prototype.setImmediate=function(e,t){var r=this,a=0,i=Object(n.a)(t);if(!this._isDisposed){this._immediateIds||(this._immediateIds={});a=i.setTimeout((function(){try{r._immediateIds&&delete r._immediateIds[a],e.apply(r._parent)}catch(e){r._logError(e)}}),0),this._immediateIds[a]=!0}return a},e.prototype.clearImmediate=function(e,t){var r=Object(n.a)(t);this._immediateIds&&this._immediateIds[e]&&(r.clearTimeout(e),delete this._immediateIds[e])},e.prototype.setInterval=function(e,t){var r=this,n=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),n=setInterval((function(){try{e.apply(r._parent)}catch(e){r._logError(e)}}),t),this._intervalIds[n]=!0),n},e.prototype.clearInterval=function(e){this._intervalIds&&this._intervalIds[e]&&(clearInterval(e),delete this._intervalIds[e])},e.prototype.throttle=function(e,t,r){var n=this;if(this._isDisposed)return this._noop;var a,i,o=t||0,s=!0,l=!0,c=0,u=null;r&&"boolean"==typeof r.leading&&(s=r.leading),r&&"boolean"==typeof r.trailing&&(l=r.trailing);var d=function(t){var r=(new Date).getTime(),p=r-c,h=s?o-p:o;return p>=o&&(!t||s)?(c=r,u&&(n.clearTimeout(u),u=null),a=e.apply(n._parent,i)):null===u&&l&&(u=n.setTimeout(d,h)),a};return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i=e,d(!0)}},e.prototype.debounce=function(e,t,r){var n=this;if(this._isDisposed){var a=function(){};return a.cancel=function(){},a.flush=function(){return null},a.pending=function(){return!1},a}var i,o,s=t||0,l=!1,c=!0,u=null,d=0,p=(new Date).getTime(),h=null;r&&"boolean"==typeof r.leading&&(l=r.leading),r&&"boolean"==typeof r.trailing&&(c=r.trailing),r&&"number"==typeof r.maxWait&&!isNaN(r.maxWait)&&(u=r.maxWait);var f=function(e){h&&(n.clearTimeout(h),h=null),p=e},m=function(t){f(t),i=e.apply(n._parent,o)},g=function(e){var t=(new Date).getTime(),r=!1;e&&(l&&t-d>=s&&(r=!0),d=t);var a=t-d,o=s-a,f=t-p,v=!1;return null!==u&&(f>=u&&h?v=!0:o=Math.min(o,u-f)),a>=s||v||r?m(t):null!==h&&e||!c||(h=n.setTimeout(g,o)),i},v=function(){return!!h},y=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o=e,g(!0)};return y.cancel=function(){v()&&f((new Date).getTime())},y.flush=function(){return v()&&m((new Date).getTime()),i},y.pending=v,y},e.prototype.requestAnimationFrame=function(e,t){var r=this,a=0,i=Object(n.a)(t);if(!this._isDisposed){this._animationFrameIds||(this._animationFrameIds={});var o=function(){try{r._animationFrameIds&&delete r._animationFrameIds[a],e.apply(r._parent)}catch(e){r._logError(e)}};a=i.requestAnimationFrame?i.requestAnimationFrame(o):i.setTimeout(o,0),this._animationFrameIds[a]=!0}return a},e.prototype.cancelAnimationFrame=function(e,t){var r=Object(n.a)(t);this._animationFrameIds&&this._animationFrameIds[e]&&(r.cancelAnimationFrame?r.cancelAnimationFrame(e):r.clearTimeout(e),delete this._animationFrameIds[e])},e.prototype._logError=function(e){this._onErrorHandler&&this._onErrorHandler(e)},e}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));var n="data-portal-element";function a(e){e.setAttribute(n,"true")}},function(e,t,r){"use strict";function n(e,t){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e,t,r,n){return e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r,n)}}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(91),o=r(79);r(63);var s=r(273),l=r(272),c=r(271),u=r(17);r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return h}));var d=function(e){function t(r,n){var a=e.call(this,r,n)||this;return Object(c.a)(),function(e){var t=e||Object(u.a)();if(t&&!t.__hasInitializedDir__){t.__hasInitializedDir__=!0;var r=t.document.documentElement;r.hasAttribute("dir")||r.setAttribute("dir","ltr")}}(),function(e,t,r){for(var n=0,a=r.length;n<a;n++)p(e,t,r[n])}(a,t.prototype,["componentDidMount","shouldComponentUpdate","getSnapshotBeforeUpdate","render","componentDidUpdate","componentWillUnmount"]),a}return Object(n.c)(t,e),t.prototype.componentDidUpdate=function(e,t){this._updateComponentRef(e,this.props)},t.prototype.componentDidMount=function(){this._setComponentRef(this.props.componentRef,this)},t.prototype.componentWillUnmount=function(){if(this._setComponentRef(this.props.componentRef,null),this.__disposables){for(var e=0,t=this._disposables.length;e<t;e++){var r=this.__disposables[e];r.dispose&&r.dispose()}this.__disposables=null}},Object.defineProperty(t.prototype,"className",{get:function(){if(!this.__className){var e=/function (.{1,})\(/.exec(this.constructor.toString());this.__className=e&&e.length>1?e[1]:""}return this.__className},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_disposables",{get:function(){return this.__disposables||(this.__disposables=[]),this.__disposables},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_async",{get:function(){return this.__async||(this.__async=new i.a(this),this._disposables.push(this.__async)),this.__async},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_events",{get:function(){return this.__events||(this.__events=new o.a(this),this._disposables.push(this.__events)),this.__events},enumerable:!0,configurable:!0}),t.prototype._resolveRef=function(e){var t=this;return this.__resolves||(this.__resolves={}),this.__resolves[e]||(this.__resolves[e]=function(r){return t[e]=r}),this.__resolves[e]},t.prototype._updateComponentRef=function(e,t){void 0===t&&(t={}),e&&t&&e.componentRef!==t.componentRef&&(this._setComponentRef(e.componentRef,null),this._setComponentRef(t.componentRef,this))},t.prototype._warnDeprecations=function(e){Object(l.a)(this.className,this.props,e)},t.prototype._warnMutuallyExclusive=function(e){Object(s.a)(this.className,this.props,e)},t.prototype._warnConditionallyRequiredProps=function(e,t,r){this.className,this.props},t.prototype._setComponentRef=function(e,t){!this._skipComponentRefResolution&&e&&("function"==typeof e&&e(t),"object"==typeof e&&(e.current=t))},t}(a.Component);function p(e,t,r){var n=e[r],a=t[r];(n||a)&&(e[r]=function(){var e;return a&&(e=a.apply(this,arguments)),n!==a&&(e=n.apply(this,arguments)),e})}function h(){return null}},,,,,,,function(e,t,r){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,s,l=o(e),c=1;c<arguments.length;c++){for(var u in r=Object(arguments[c]))a.call(r,u)&&(l[u]=r[u]);if(n){s=n(r);for(var d=0;d<s.length;d++)i.call(r,s[d])&&(l[s[d]]=r[s[d]])}}return l}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(30);function a(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var o=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(a(t)+"="+a(e))})))})),i=o.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";(function(t){var n=r(30),a=r(296),i={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,l={adapter:("undefined"!=typeof XMLHttpRequest?s=r(107):void 0!==t&&"[object process]"===Object.prototype.toString.call(t)&&(s=r(107)),s),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};l.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){l.headers[e]=n.merge(i)})),e.exports=l}).call(this,r(295))},function(e,t,r){"use strict";var n=r(30),a=r(297),i=r(104),o=r(299),s=r(302),l=r(303),c=r(108);e.exports=function(e){return new Promise((function(t,u){var d=e.data,p=e.headers;n.isFormData(d)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",m=e.auth.password||"";p.Authorization="Basic "+btoa(f+":"+m)}var g=o(e.baseURL,e.url);if(h.open(e.method.toUpperCase(),i(g,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?s(h.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};a(t,u,n),h=null}},h.onabort=function(){h&&(u(c("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){u(c("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),u(c(t,e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var v=r(304),y=(e.withCredentials||l(g))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in h&&n.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),u(e),h=null)})),void 0===d&&(d=null),h.send(d)}))}},function(e,t,r){"use strict";var n=r(298);e.exports=function(e,t,r,a,i){var o=new Error(e);return n(o,t,r,a,i)}},function(e,t,r){"use strict";var n=r(30);e.exports=function(e,t){t=t||{};var r={},a=["url","method","params","data"],i=["headers","auth","proxy"],o=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(a,(function(e){void 0!==t[e]&&(r[e]=t[e])})),n.forEach(i,(function(a){n.isObject(t[a])?r[a]=n.deepMerge(e[a],t[a]):void 0!==t[a]?r[a]=t[a]:n.isObject(e[a])?r[a]=n.deepMerge(e[a]):void 0!==e[a]&&(r[a]=e[a])})),n.forEach(o,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])}));var s=a.concat(i).concat(o),l=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return n.forEach(l,(function(n){void 0!==t[n]?r[n]=t[n]:void 0!==e[n]&&(r[n]=e[n])})),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";r(245);var n=r(72);r.o(n,"NewExplanationDashboard")&&r.d(t,"NewExplanationDashboard",(function(){return n.NewExplanationDashboard}));r(20);var a=r(38);r.d(t,"NewExplanationDashboard",(function(){return a.b}))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){!function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,r){return e<12?r?"vm":"VM":r?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},r={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},a={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,r,i,o){var s=n(t),l=a[e][n(t)];return 2===s&&(l=l[r?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return r[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,a,i,o){var s=r(t),l=n[e][r(t)];return 2===s&&(l=l[a?0:1]),l.replace(/%d/i,t)}},i=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},r={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,r){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return r[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,r){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var r=e%10;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n,a;return"m"===r?t?"хвіліна":"хвіліну":"h"===r?t?"гадзіна":"гадзіну":e+" "+(n=+e,a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[r].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,r=e%100;return 0===e?e+"-ев":0===r?e+"-ен":r>10&&r<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},r={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,r){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},r={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,r){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[r],e)}e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n=e+" ";switch(r){case"ss":return n+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var r=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(r="a"),e+r},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),r="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),n=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],a=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function i(e){return e>1&&e<5&&1!=~~(e/10)}function o(e,t,r,n){var a=e+" ";switch(r){case"s":return t||n?"pár sekund":"pár sekundami";case"ss":return t||n?a+(i(e)?"sekundy":"sekund"):a+"sekundami";case"m":return t?"minuta":n?"minutu":"minutou";case"mm":return t||n?a+(i(e)?"minuty":"minut"):a+"minutami";case"h":return t?"hodina":n?"hodinu":"hodinou";case"hh":return t||n?a+(i(e)?"hodiny":"hodin"):a+"hodinami";case"d":return t||n?"den":"dnem";case"dd":return t||n?a+(i(e)?"dny":"dní"):a+"dny";case"M":return t||n?"měsíc":"měsícem";case"MM":return t||n?a+(i(e)?"měsíce":"měsíců"):a+"měsíci";case"y":return t||n?"rok":"rokem";case"yy":return t||n?a+(i(e)?"roky":"let"):a+"lety"}}e.defineLocale("cs",{months:t,monthsShort:r,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[r][0]:a[r][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[r][0]:a[r][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[r][0]:a[r][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],r=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:r,weekdaysShort:r,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,r){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,r){return e>11?r?"μμ":"ΜΜ":r?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var r,n=this._calendarEl[e],a=t&&t.hours();return((r=n)instanceof Function||"[object Function]"===Object.prototype.toString.call(r))&&(n=n.apply(t)),n.replace("{}",a%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-SG",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,r){return e>11?r?"p.t.m.":"P.T.M.":r?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",ss:"%d sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),r="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),r="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),r="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?a[r][2]?a[r][2]:a[r][1]:n?a[r][0]:a[r][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},r={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,r){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return r[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),r=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function n(e,n,a,i){var o="";switch(a){case"s":return i?"muutaman sekunnin":"muutama sekunti";case"ss":return i?"sekunnin":"sekuntia";case"m":return i?"minuutin":"minuutti";case"mm":o=i?"minuutin":"minuuttia";break;case"h":return i?"tunnin":"tunti";case"hh":o=i?"tunnin":"tuntia";break;case"d":return i?"päivän":"päivä";case"dd":o=i?"päivän":"päivää";break;case"M":return i?"kuukauden":"kuukausi";case"MM":o=i?"kuukauden":"kuukautta";break;case"y":return i?"vuoden":"vuosi";case"yy":o=i?"vuoden":"vuotta"}return o=function(e,n){return e<10?n?r[e]:t[e]:e}(e,i)+" "+o}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),r="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Méitheamh","Iúil","Lúnasa","Meán Fómhair","Deaireadh Fómhair","Samhain","Nollaig"],monthsShort:["Eaná","Feab","Márt","Aibr","Beal","Méit","Iúil","Lúna","Meán","Deai","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Satharn"],weekdaysShort:["Dom","Lua","Mái","Céa","Déa","hAo","Sat"],weekdaysMin:["Do","Lu","Má","Ce","Dé","hA","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné aig] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={s:["thodde secondanim","thodde second"],ss:[e+" secondanim",e+" second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voranim",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?a[r][0]:a[r][1]}e.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},r={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,r){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?r?'לפנה"צ':"לפני הצהריים":e<18?r?'אחה"צ':"אחרי הצהריים":"בערב"}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n=e+" ";switch(r){case"ss":return n+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function r(e,t,r,n){var a=e;switch(r){case"s":return n||t?"néhány másodperc":"néhány másodperce";case"ss":return a+(n||t)?" másodperc":" másodperce";case"m":return"egy"+(n||t?" perc":" perce");case"mm":return a+(n||t?" perc":" perce");case"h":return"egy"+(n||t?" óra":" órája");case"hh":return a+(n||t?" óra":" órája");case"d":return"egy"+(n||t?" nap":" napja");case"dd":return a+(n||t?" nap":" napja");case"M":return"egy"+(n||t?" hónap":" hónapja");case"MM":return a+(n||t?" hónap":" hónapja");case"y":return"egy"+(n||t?" év":" éve");case"yy":return a+(n||t?" év":" éve")}return""}function n(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,r){return e<12?!0===r?"de":"DE":!0===r?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return n.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return n.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function r(e,r,n,a){var i=e+" ";switch(n){case"s":return r||a?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?i+(r||a?"sekúndur":"sekúndum"):i+"sekúnda";case"m":return r?"mínúta":"mínútu";case"mm":return t(e)?i+(r||a?"mínútur":"mínútum"):r?i+"mínúta":i+"mínútu";case"hh":return t(e)?i+(r||a?"klukkustundir":"klukkustundum"):i+"klukkustund";case"d":return r?"dagur":a?"dag":"degi";case"dd":return t(e)?r?i+"dagar":i+(a?"daga":"dögum"):r?i+"dagur":i+(a?"dag":"degi");case"M":return r?"mánuður":a?"mánuð":"mánuði";case"MM":return t(e)?r?i+"mánuðir":i+(a?"mánuði":"mánuðum"):r?i+"mánuður":i+(a?"mánuð":"mánuði");case"y":return r||a?"ár":"ári";case"yy":return t(e)?i+(r||a?"ár":"árum"):i+(r||a?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:r,ss:r,m:r,mm:r,h:"klukkustund",hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,r){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()<this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()<e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},r={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,r){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},r={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,r){return e<12?"오전":"오후"}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},r={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:n,monthsShort:n,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,r){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return r[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?a[r][0]:a[r][1]}function r(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return r(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return r(e)}return r(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return r(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return r(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,r){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function r(e,t,r,n){return t?a(r)[0]:n?a(r)[1]:a(r)[2]}function n(e){return e%10==0||e>10&&e<20}function a(e){return t[e].split("_")}function i(e,t,i,o){var s=e+" ";return 1===e?s+r(0,t,i[0],o):t?s+(n(e)?a(i)[1]:a(i)[0]):o?s+a(i)[1]:s+(n(e)?a(i)[1]:a(i)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,r,n){return t?"kelios sekundės":n?"kelių sekundžių":"kelias sekundes"},ss:i,m:r,mm:i,h:r,hh:i,d:r,dd:i,M:r,MM:i,y:r,yy:i},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function r(e,t,r){return r?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function n(e,n,a){return e+" "+r(t[a],e,n)}function a(e,n,a){return r(t[a],e,n)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:n,m:a,mm:n,h:a,hh:n,d:a,dd:n,M:a,MM:n,y:a,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,r,n){var a=t.words[n];return 1===n.length?r?a[0]:a[1]:e+" "+t.correctGrammaticalCase(e,a)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,r=e%100;return 0===e?e+"-ев":0===r?e+"-ен":r>10&&r<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,r){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){switch(r){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,r){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function n(e,t,r,n){var a="";if(t)switch(r){case"s":a="काही सेकंद";break;case"ss":a="%d सेकंद";break;case"m":a="एक मिनिट";break;case"mm":a="%d मिनिटे";break;case"h":a="एक तास";break;case"hh":a="%d तास";break;case"d":a="एक दिवस";break;case"dd":a="%d दिवस";break;case"M":a="एक महिना";break;case"MM":a="%d महिने";break;case"y":a="एक वर्ष";break;case"yy":a="%d वर्षे"}else switch(r){case"s":a="काही सेकंदां";break;case"ss":a="%d सेकंदां";break;case"m":a="एका मिनिटा";break;case"mm":a="%d मिनिटां";break;case"h":a="एका तासा";break;case"hh":a="%d तासां";break;case"d":a="एका दिवसा";break;case"dd":a="%d दिवसां";break;case"M":a="एका महिन्या";break;case"MM":a="%d महिन्यां";break;case"y":a="एका वर्षा";break;case"yy":a="%d वर्षां"}return a.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,r){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},r={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,r){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),r="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),r="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?r[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},r={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),r="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function n(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function a(e,t,r){var a=e+" ";switch(r){case"ss":return a+(n(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return a+(n(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return a+(n(e)?"godziny":"godzin");case"MM":return a+(n(e)?"miesiące":"miesięcy");case"yy":return a+(n(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,n){return e?""===n?"("+r[e.month()]+"|"+t[e.month()]+")":/D MMMM/.test(n)?r[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:a,m:a,mm:a,h:a,hh:a,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:a,y:"rok",yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n=" ";return(e%100>=20||e>=100&&e%100==0)&&(n=" de "),e+n+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[r]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n,a;return"m"===r?t?"минута":"минуту":e+" "+(n=+e,a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[r].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],r=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:r,weekdaysShort:r,weekdaysMin:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,r){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,r){return e>11?r?"ප.ව.":"පස් වරු":r?"පෙ.ව.":"පෙර වරු"}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),r="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function n(e){return e>1&&e<5}function a(e,t,r,a){var i=e+" ";switch(r){case"s":return t||a?"pár sekúnd":"pár sekundami";case"ss":return t||a?i+(n(e)?"sekundy":"sekúnd"):i+"sekundami";case"m":return t?"minúta":a?"minútu":"minútou";case"mm":return t||a?i+(n(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":return t||a?i+(n(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||a?"deň":"dňom";case"dd":return t||a?i+(n(e)?"dni":"dní"):i+"dňami";case"M":return t||a?"mesiac":"mesiacom";case"MM":return t||a?i+(n(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||a?"rok":"rokom";case"yy":return t||a?i+(n(e)?"roky":"rokov"):i+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:r,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a=e+" ";switch(r){case"s":return t||n?"nekaj sekund":"nekaj sekundami";case"ss":return a+=1===e?t?"sekundo":"sekundi":2===e?t||n?"sekundi":"sekundah":e<5?t||n?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return a+=1===e?t?"minuta":"minuto":2===e?t||n?"minuti":"minutama":e<5?t||n?"minute":"minutami":t||n?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return a+=1===e?t?"ura":"uro":2===e?t||n?"uri":"urama":e<5?t||n?"ure":"urami":t||n?"ur":"urami";case"d":return t||n?"en dan":"enim dnem";case"dd":return a+=1===e?t||n?"dan":"dnem":2===e?t||n?"dni":"dnevoma":t||n?"dni":"dnevi";case"M":return t||n?"en mesec":"enim mesecem";case"MM":return a+=1===e?t||n?"mesec":"mesecem":2===e?t||n?"meseca":"mesecema":e<5?t||n?"mesece":"meseci":t||n?"mesecev":"meseci";case"y":return t||n?"eno leto":"enim letom";case"yy":return a+=1===e?t||n?"leto":"letom":2===e?t||n?"leti":"letoma":e<5?t||n?"leta":"leti":t||n?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,r){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,r,n){var a=t.words[n];return 1===n.length?r?a[0]:a[1]:e+" "+t.correctGrammaticalCase(e,a)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,r,n){var a=t.words[n];return 1===n.length?r?a[0]:a[1]:e+" "+t.correctGrammaticalCase(e,a)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,r){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},r={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return r[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,r){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",ss:"minutu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Пагоҳ соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,r){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,r){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function r(e,r,n,a){var i=function(e){var r=Math.floor(e%1e3/100),n=Math.floor(e%100/10),a=e%10,i="";return r>0&&(i+=t[r]+"vatlh"),n>0&&(i+=(""!==i?" ":"")+t[n]+"maH"),a>0&&(i+=(""!==i?" ":"")+t[a]),""===i?"pagh":i}(e);switch(n){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:r,m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,r){switch(r){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r,n){var a={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return n?a[r][0]:t?a[r][0]:a[r][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,r){return e>11?r?"d'o":"D'O":r?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,r){var n=100*e+t;return n<600?"يېرىم كېچە":n<900?"سەھەر":n<1130?"چۈشتىن بۇرۇن":n<1230?"چۈش":n<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";function t(e,t,r){var n,a;return"m"===r?t?"хвилина":"хвилину":"h"===r?t?"година":"годину":e+" "+(n=+e,a={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[r].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}function r(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var r={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?r.nominative.slice(1,7).concat(r.nominative.slice(0,1)):e?r[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:r.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:r("[Сьогодні "),nextDay:r("[Завтра "),lastDay:r("[Вчора "),nextWeek:r("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return r("[Минулої] dddd [").call(this);case 1:case 2:case 4:return r("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,r){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],r=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:r,weekdaysShort:r,weekdaysMin:r,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,r){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,r){return e<12?r?"sa":"SA":r?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(7))},function(e,t,r){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(7))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(41),a=r(24),i=r(45);function o(e){var t=a.a.getInstance(),r=t.getClassName(),o=[];for(var s in e)e.hasOwnProperty(s)&&o.push(s,"{",Object(i.b)(Object(n.a)(),e[s]),"}");var l=o.join("");return t.insertRule("@keyframes "+r+"{"+l+"}",!0),t.cacheClassName(r,l,[],["keyframes",l]),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(41),a=r(24),i=r(45);function o(e){a.a.getInstance().insertRule("@font-face{"+Object(i.b)(Object(n.a)(),e)+"}",!0)}},function(e,t,r){var n=r(327);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t){},function(e,t,r){"use strict";var n;!function(e){e.LocalExpAndTestReq="LocalExpAndTestReq",e.LocalOrGlobalAndTestReq="LocalOrGlobalAndTestReq",e.TestReq="TestReq",e.PredictorReq="PredictorReq"}(n||(n={}))},function(e,t,r){"use strict";var n,a=r(81),i=r(3),o=r.n(i),s=r(18),l=r(368),c=r(379),u=r(80),d=r(274),p=r(0),h=r.n(p),f=r(1),m=r(10),g=r(5),v=r(20),y=r(8),b=r(23),_=r(14),x=r(374),w=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),k=function(e){function t(t){var r=e.call(this,t)||this;return r.featureOptions=t.explanationContext.modelMetadata.featureNames.map((function(e,t){return{key:t,text:e}})),r.state={selectedFeature:0},r.onFeatureSelect=r.onFeatureSelect.bind(r),r}return w(t,e),t.prototype.render=function(){var e=t.buildPlotlyProps(this.state.selectedFeature,this.props.explanationContext);return h.a.createElement("div",{className:"aggregate-chart"},h.a.createElement("div",{className:"top-controls"},h.a.createElement(x.a,{label:f.a.feature,className:"pathSelector",selectedKey:this.state.selectedFeature,onChange:this.onFeatureSelect,options:this.featureOptions,ariaLabel:"feature picker",useComboBoxAsMenuWidth:!0,styles:g.a.smallDropdownStyle})),h.a.createElement(m.a,{plotlyProps:e,theme:this.props.theme}))},t.prototype.onFeatureSelect=function(e,t){this.setState({selectedFeature:t.key})},t.buildCategoricalSeries=s.a((function(e,t){return e.scores.map((function(t,r){g.a.plotlyColorPalette[r%g.a.plotlyColorPalette.length];return{orientation:"v",type:"bar",x:e.names,y:t,error_y:{type:"data",symmetric:!1,array:void 0!==e.upperBounds?e.upperBounds[r].map((function(e,r){return e-t[r]})):void 0,arrayminus:e.lowerBounds?e.lowerBounds[r].map((function(e,r){return t[r]-e})):void 0}}}))})),t.buildContinuousSeries=s.a((function(e,t){return e.scores.map((function(r,n){var a=g.a.plotlyColorPalette[n%g.a.plotlyColorPalette.length];return[{mode:m.e.lines,type:"scatter",line:{shape:"hv",color:"transparent"},name:t[n],x:e.names,y:e.lowerBounds[n]},{mode:m.e.lines,type:"scatter",fill:"tonexty",fillcolor:"rgba("+a.r+", "+a.g+", "+a.b+", 0.3)",line:{shape:"hv",color:"rgb("+a.r+", "+a.g+", "+a.b+")"},name:t[n],legendgroup:t[n],x:e.names,y:r},{mode:m.e.lines,type:"scatter",fill:"tonexty",fillcolor:"rgba("+a.r+", "+a.g+", "+a.b+", 0.3)",line:{shape:"hv",color:"transparent"},name:t[n],legendgroup:t[n],showlegend:!1,x:e.names,y:e.upperBounds[n]}]})).reduce((function(e,t){return e.concat.apply(e,t)}),[])})),t.buildPlotlyProps=s.a((function(e,r){var n=r.ebmExplanation,a=n.featureList[e],i=r.modelMetadata.featureNames[e];return{config:{displaylogo:!1,responsive:!0,displayModeBar:!1},data:r.modelMetadata.featureIsCategorical&&r.modelMetadata.featureIsCategorical[e]||a.names.some((function(e){return"string"==typeof e}))?t.buildCategoricalSeries(n.featureList[e],r.modelMetadata.classNames):t.buildContinuousSeries(n.featureList[e],r.modelMetadata.classNames),layout:{dragmode:!1,autosize:!0,font:{size:10},margin:{t:10,b:30},hovermode:"closest",showlegend:!1,yaxis:{automargin:!0,title:n.displayParameters&&n.displayParameters.yAxisLabel?n.displayParameters.yAxisLabel:f.a.IcePlot.predictedProbability},xaxis:{title:i,automargin:!0}}}}),o.a.isEqual),t}(h.a.PureComponent),M=r(4),T=r(73),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),S=function(){return(S=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},L=(r(336),"rowIndex");!function(e){function t(r){var n,a=e.call(this,r)||this;a.selectionContext=new m.h(L,1),t.initializeIcons(r),a.props.locale&&f.a.setLanguage(a.props.locale);var i=t.buildInitialExplanationContext(r),o=Math.min(8,i.modelMetadata.featureNames.length);return a.onClassSelect=a.onClassSelect.bind(a),a.onConfigChanged=a.onConfigChanged.bind(a),a.onClearSelection=a.onClearSelection.bind(a),a.handleGlobalTabClick=a.handleGlobalTabClick.bind(a),a.handleLocalTabClick=a.handleLocalTabClick.bind(a),a.pivotItems=[],void 0!==i.testDataset.dataset&&a.pivotItems.push({headerText:f.a.dataExploration,itemKey:t.globalTabKeys[0]}),void 0!==i.globalExplanation&&a.pivotItems.push({headerText:f.a.globalImportance,itemKey:t.globalTabKeys[1]}),void 0!==i.localExplanation&&void 0!==i.testDataset.dataset&&a.pivotItems.push({headerText:f.a.explanationExploration,itemKey:t.globalTabKeys[2]}),void 0!==i.localExplanation&&a.pivotItems.push({headerText:f.a.summaryImportance,itemKey:t.globalTabKeys[3]}),void 0!==i.ebmExplanation&&a.pivotItems.push({headerText:f.a.summaryImportance,itemKey:t.globalTabKeys[4]}),void 0!==i.customVis&&a.pivotItems.push({headerText:f.a.summaryImportance,itemKey:t.globalTabKeys[5]}),a.state={dashboardContext:{weightContext:{selectedKey:r.predictedY?b.a.predicted:b.a.absAvg,onSelection:a.onClassSelect,options:t.buildWeightDropdownOptions(i)},explanationContext:i},activeGlobalTab:a.pivotItems.length>0?t.globalTabKeys.indexOf(a.pivotItems[0].itemKey):0,activeLocalTab:void 0===i.localExplanation&&a.props.requestPredictions?1:0,configs:(n={},n[v.a]={displayMode:v.g.bar,topK:o,id:v.a},n[v.i]={displayMode:v.g.beehive,topK:o,id:v.i},n[v.k]={topK:o},n),selectedRow:void 0},a}C(t,e),t.initializeIcons=function(e){!1===t.iconsInitialized&&!1!==e.shouldInitializeIcons&&(Object(a.a)(e.iconUrl),t.iconsInitialized=!0)},t.buildInitialExplanationContext=function(e){var r={requestPredictions:e.requestPredictions,requestLocalFeatureExplanations:e.requestLocalFeatureExplanations},n=t.buildModelMetadata(e),a=t.validateInputs(e,n);if(void 0!==a)return void 0!==e.telemetryHook&&e.telemetryHook({message:"Invalid inputs",level:T.a.error,context:a}),{modelMetadata:n,explanationGenerators:r,localExplanation:void 0,testDataset:{},jointDataset:void 0,globalExplanation:void 0,isGlobalDerived:!1,ebmExplanation:void 0,customVis:void 0,inputError:a};var i,o,s={dataset:e.testData,predictedY:e.predictedY,probabilityY:e.probabilityY,trueY:e.trueY};if(e.precomputedExplanations&&void 0!==e.precomputedExplanations.localFeatureImportance&&void 0!==e.precomputedExplanations.localFeatureImportance.scores&&s){var l=e.predictedY?b.a.predicted:b.a.absAvg,c=t.buildLocalFeatureMatrix(e.precomputedExplanations.localFeatureImportance.scores,n.modelType);i={values:c,flattenedValues:t.buildLocalFlattenMatrix(c,n.modelType,s,l),intercepts:p=void 0}}var u,d=!1;if(e.precomputedExplanations&&void 0!==e.precomputedExplanations.globalFeatureImportance&&void 0!==e.precomputedExplanations.globalFeatureImportance.scores){var p=void 0;e.precomputedExplanations.globalFeatureImportance.scores.every((function(e){return Array.isArray(e)}))?((o={}).perClassFeatureImportances=e.precomputedExplanations.globalFeatureImportance.scores,o.flattenedFeatureImportances=o.perClassFeatureImportances.map((function(e){return e.reduce((function(e,t){return e+t}))}),0),o.intercepts=p):void 0===i&&((o={}).flattenedFeatureImportances=e.precomputedExplanations.globalFeatureImportance.scores,o.intercepts=p)}return void 0===o&&void 0!==i&&(o=t.buildGlobalExplanationFromLocal(i),d=!0),e.precomputedExplanations&&void 0!==e.precomputedExplanations.ebmGlobalExplanation&&(u={featureList:e.precomputedExplanations.ebmGlobalExplanation.feature_list.map((function(e){if("univariate"===e.type)return e.scores&&e.scores.every((function(e){return Array.isArray(e)}))?{type:"univariate",scores:e.scores,names:e.names,lowerBounds:e.lower_bounds?e.lower_bounds:void 0,upperBounds:e.upper_bounds?e.upper_bounds:void 0}:{type:"univariate",scores:[e.scores],names:e.names,lowerBounds:e.lower_bounds?[e.lower_bounds]:void 0,upperBounds:e.upper_bounds?[e.upper_bounds]:void 0}})).filter((function(e){return void 0!==e})),displayParameters:{interpolation:"vh"}}),{modelMetadata:n,jointDataset:new M.c({dataset:e.testData,predictedY:e.predictedY,trueY:e.trueY,metadata:n}),explanationGenerators:r,localExplanation:i,testDataset:s,globalExplanation:o,isGlobalDerived:d,ebmExplanation:u,customVis:e.precomputedExplanations&&e.precomputedExplanations.customVis?e.precomputedExplanations.customVis:void 0}},t.validateInputs=function(e,t){var r,n=t.classNames.length,a=t.featureNames.length;if(e.trueY&&(r=e.trueY.length),e.predictedY){var i=e.predictedY.length;if(void 0===r&&(r=i),i!==r)return"Inconsistent dimensions. Predicted y has dimension ["+i+"], expected ["+r+"]"}if(e.probabilityY){if(!Array.isArray(e.probabilityY))return"Predicted probability not an array. Expected array of dimension ["+r+" x "+n+"]";var o=e.probabilityY.length;if(void 0===r&&(r=o),o!==r)return"Inconsistent dimensions. Predicted y has length ["+o+"], expected ["+r+"]";if(0===o)return"Predicted probability input not a non-empty array";if((u=e.probabilityY[0].length)!==n)return"Inconsistent dimensions. Predicted probability has dimensions ["+o+" x "+u+"], expected ["+r+" x "+n+"]";if(!e.probabilityY.every((function(e){return e.length===n})))return"Inconsistent dimensions. Predicted probability has rows of varying length"}if(e.testData){if(!Array.isArray(e.testData))return"Eval dataset not an array. Expected array of dimension ["+r+" x "+a+"]";var s=e.testData.length;if(void 0===r&&(r=s),s!==r)return"Inconsistent dimensions. Eval dataset has length ["+s+"], expected ["+r+"]";if(0===s)return"Eval dataset not a non-empty array";if((p=e.testData[0].length)!==a)return"Inconsistent dimensions. Eval dataset has dimensions ["+s+" x "+p+"], expected ["+r+" x "+a+"]";if(!e.testData.every((function(e){return e.length===a})))return"Inconsistent dimensions. Eval dataset has rows of varying length"}if(e.precomputedExplanations&&e.precomputedExplanations.localFeatureImportance&&e.precomputedExplanations.localFeatureImportance.scores){var l=e.precomputedExplanations.localFeatureImportance.scores;if(!Array.isArray(l))return"Local explanation not an array. Expected array of dimension ["+n+" x "+r+" x "+a+"]";var c=2;if(l.every((function(e){return e.every((function(e){return Array.isArray(e)}))}))&&(c=3),3===c){var u=l.length;if(n!==u)return"Inconsistent dimensions. Local Explanation has class length ["+u+"], expected ["+n+"]";if(0===u)return"Local explanation not a non-empty array";var d=l[0].length;if(0===d)return"Local explanation not a non-empty array";if(void 0===r&&(r=d),d!==r)return"Inconsistent dimensions. Local explanations has dimensions ["+u+" x "+d+"], expected ["+n+" x "+r+"]";if(!l.every((function(e){return e.length===r})))return"Inconsistent dimensions. Local explanation has rows of varying length";if((p=l[0][0].length)!==a)return"Inconsistent dimensions. Local explanations has dimensions ["+u+" x "+d+" x "+p+"], expected ["+n+" x "+r+" x "+a+"]";if(!l.every((function(e){return e.every((function(e){return e.length===a}))})))return"Inconsistent dimensions. Local explanation has rows of varying length"}else{var p,h=l.length;if(void 0===r&&(r=h),h!==r)return"Inconsistent dimensions. Local Explanation has row length ["+h+"], expected ["+r+"]";if(0===h)return"Local explanation not a non-empty array";if((p=l[0].length)!==a)return"Inconsistent dimensions. Local explanations has dimensions ["+h+" x "+p+"], expected ["+r+" x "+a+"]";if(!l.every((function(e){return e.length===a})))return"Inconsistent dimensions. Local explanation has rows of varying length"}}},t.buildLocalFeatureMatrix=function(e,r){switch(r){case y.a.regression:return e.map((function(e){return e.map((function(e){return[e]}))}));case y.a.binary:return t.transposeLocalImportanceMatrix(e).map((function(e){return e.map((function(e){return e.slice(0,1)}))}));case y.a.multiclass:return t.transposeLocalImportanceMatrix(e)}},t.buildLocalFlattenMatrix=function(e,t,r,n){switch(t){case y.a.regression:case y.a.binary:return e.map((function(e,t){return e.map((function(e){return e[0]}))}));case y.a.multiclass:return e.map((function(e,t){return e.map((function(e){switch(n){case b.a.equal:return e.reduce((function(e,t){return e+t}))/e.length;case b.a.predicted:return e[r.predictedY[t]];case b.a.absAvg:return e.reduce((function(e,t){return e+Math.abs(t)}),0)/e.length;default:return e[n]}}))}))}},t.buildGlobalExplanationFromLocal=function(e){return{perClassFeatureImportances:_.a.absoluteAverageTensor(e.values)}},t.buildModelMetadata=function(e){var r,n=t.getModelType(e),a=e.dataSummary.featureNames;if(void 0!==a)a.every((function(e){return"string"==typeof e}))||(a=a.map((function(e){return e.toString()}))),r=a.map((function(e){return e.length<=18?e:e.slice(0,18)+"..."}));else{var i=0;if(e.testData&&void 0!==e.testData[0])i=e.testData[0].length;else if(e.precomputedExplanations&&e.precomputedExplanations.globalFeatureImportance&&e.precomputedExplanations.globalFeatureImportance.scores)i=e.precomputedExplanations.globalFeatureImportance.scores.length;else if(e.precomputedExplanations&&e.precomputedExplanations.localFeatureImportance&&e.precomputedExplanations.localFeatureImportance.scores){i=e.precomputedExplanations.localFeatureImportance.scores.every((function(e){return e.every((function(e){return Array.isArray(e)}))}))?e.precomputedExplanations.localFeatureImportance.scores[0][0].length:e.precomputedExplanations.localFeatureImportance.scores[0].length}else e.precomputedExplanations&&e.precomputedExplanations.ebmGlobalExplanation&&(i=e.precomputedExplanations.ebmGlobalExplanation.feature_list.length);r=a=t.buildIndexedNames(i,f.a.defaultFeatureNames)}var o=e.dataSummary.classNames,s=t.getClassLength(e);o&&o.length===s||(o=t.buildIndexedNames(s,f.a.defaultClassNames));var l=m.d.buildIsCategorical(a.length,e.testData,e.dataSummary.categoricalMap);return{featureNames:a,featureNamesAbridged:r,classNames:o,featureIsCategorical:l,featureRanges:m.d.buildFeatureRanges(e.testData,l,e.dataSummary.categoricalMap),modelType:n}},t.buildIndexedNames=function(e,t){return Array.from(Array(e).keys()).map((function(e){return f.a.formatString(t,e.toString())}))},t.getModelType=function(e){if("regressor"===e.modelInformation.method)return y.a.regression;switch(t.getClassLength(e)){case 1:return y.a.regression;case 2:return y.a.binary;default:return y.a.multiclass}},t.prototype.componentDidMount=function(){var e=this;this.selectionSubscription=this.selectionContext.subscribe({selectionCallback:function(t){var r;if(t&&t.length>0){var n=Number.parseInt(t[0]);isNaN(n)||(r=n)}e.setState({selectedRow:r})}}),this.fetchExplanations()},t.prototype.componentDidUpdate=function(e){if(!i.isEqual(e,this.props)){var r=i.cloneDeep(this.state);r.dashboardContext.explanationContext=t.buildInitialExplanationContext(this.props),r.dashboardContext.explanationContext.localExplanation&&(r.configs[v.i].displayMode=v.g.box),this.setState(r),this.fetchExplanations()}},t.prototype.componentWillUnmount=function(){this.selectionSubscription&&this.selectionContext.unsubscribe(this.selectionSubscription)},t.prototype.render=function(){return this.state.dashboardContext.explanationContext.inputError?p.createElement("div",null,this.state.dashboardContext.explanationContext.inputError):0===this.pivotItems.length?p.createElement("div",null,"No valid views. Incomplete data."):p.createElement(p.Fragment,null,p.createElement("div",{className:"explainerDashboard"},p.createElement("div",{className:"charts-wrapper"},p.createElement("div",{className:"global-charts-wrapper"},p.createElement(c.a,{id:"globalPivot",selectedKey:t.globalTabKeys[this.state.activeGlobalTab],onLinkClick:this.handleGlobalTabClick,linkFormat:u.a.tabs,linkSize:u.b.normal,headersOnly:!0,styles:g.a.verticalTabsStyle},this.pivotItems.map((function(e){return p.createElement(d.a,S({key:e.itemKey},e))}))),0===this.state.activeGlobalTab&&p.createElement(v.b,{dashboardContext:this.state.dashboardContext,theme:this.props.theme,selectionContext:this.selectionContext,selectedRow:this.state.selectedRow,plotlyProps:this.state.configs[v.c],onChange:this.onConfigChanged,messages:this.props.stringParams?this.props.stringParams.contextualHelp:void 0}),1===this.state.activeGlobalTab&&p.createElement(v.f,{dashboardContext:this.state.dashboardContext,theme:this.props.theme,selectionContext:this.selectionContext,selectedRow:this.state.selectedRow,config:this.state.configs[v.a],onChange:this.onConfigChanged,messages:this.props.stringParams?this.props.stringParams.contextualHelp:void 0}),2===this.state.activeGlobalTab&&p.createElement(v.d,{dashboardContext:this.state.dashboardContext,theme:this.props.theme,selectionContext:this.selectionContext,selectedRow:this.state.selectedRow,plotlyProps:this.state.configs[v.e],onChange:this.onConfigChanged,messages:this.props.stringParams?this.props.stringParams.contextualHelp:void 0}),3===this.state.activeGlobalTab&&p.createElement(v.h,{dashboardContext:this.state.dashboardContext,theme:this.props.theme,selectionContext:this.selectionContext,selectedRow:this.state.selectedRow,config:this.state.configs[v.i],onChange:this.onConfigChanged,messages:this.props.stringParams?this.props.stringParams.contextualHelp:void 0}),4===this.state.activeGlobalTab&&p.createElement(k,{explanationContext:this.state.dashboardContext.explanationContext,theme:this.props.theme}),5===this.state.activeGlobalTab&&p.createElement("iframe",{srcDoc:this.state.dashboardContext.explanationContext.customVis})),this.state.dashboardContext.explanationContext.localExplanation&&p.createElement("div",{className:"local-charts-wrapper"},void 0===this.state.selectedRow&&p.createElement("div",{className:"local-placeholder"},p.createElement("div",{className:"placeholder-text"},f.a.selectPoint)),void 0!==this.state.selectedRow&&p.createElement("div",{className:"tabbed-viewer"},p.createElement(c.a,{selectedKey:t.localTabKeys[this.state.activeLocalTab],onLinkClick:this.handleLocalTabClick,linkFormat:u.a.tabs,linkSize:u.b.normal,headersOnly:!0,styles:g.a.verticalTabsStyle},p.createElement(d.a,{headerText:f.a.localFeatureImportance,itemKey:t.localTabKeys[0]}),void 0!==this.props.requestPredictions&&this.state.dashboardContext.explanationContext.testDataset.dataset&&p.createElement(d.a,{headerText:f.a.perturbationExploration,itemKey:t.localTabKeys[1]})," ",void 0!==this.props.requestPredictions&&this.state.dashboardContext.explanationContext.testDataset.dataset&&p.createElement(d.a,{headerText:f.a.ice,itemKey:t.localTabKeys[2]})),p.createElement("div",{className:"view-panel"},p.createElement("div",{className:"local-commands"},p.createElement(l.a,{className:"clear-button",onClick:this.onClearSelection,text:f.a.clearSelection})),0===this.state.activeLocalTab&&p.createElement(v.m,{explanationContext:this.state.dashboardContext.explanationContext,selectedRow:this.state.selectedRow,config:this.state.configs[v.k],onChange:this.onConfigChanged,messages:this.props.stringParams?this.props.stringParams.contextualHelp:void 0,theme:this.props.theme}),1===this.state.activeLocalTab&&p.createElement(v.l,{explanationContext:this.state.dashboardContext.explanationContext,invokeModel:this.props.requestPredictions,datapointIndex:+this.selectionContext.selectedIds[0],theme:this.props.theme,messages:this.props.stringParams?this.props.stringParams.contextualHelp:void 0}),2===this.state.activeLocalTab&&p.createElement(v.j,{explanationContext:this.state.dashboardContext.explanationContext,invokeModel:this.props.requestPredictions,datapointIndex:+this.selectionContext.selectedIds[0],theme:this.props.theme,messages:this.props.stringParams?this.props.stringParams.contextualHelp:void 0})))))))},t.prototype.fetchExplanations=function(){var e=this,r=this.state.dashboardContext.explanationContext,n=r.testDataset,a=r.modelMetadata;void 0===r.explanationGenerators.requestLocalFeatureExplanations||void 0===n||void 0===n.dataset||void 0!==r.localExplanation&&void 0!==r.localExplanation.values||this.setState((function(e){var t=i.cloneDeep(e);return t.dashboardContext.explanationContext.localExplanation={percentComplete:10},t}),(function(){e.state.dashboardContext.explanationContext.explanationGenerators.requestLocalFeatureExplanations(n.dataset,(new AbortController).signal).then((function(r){r&&e.setState((function(e){var o=e.dashboardContext.weightContext.selectedKey,s=t.buildLocalFeatureMatrix(r,a.modelType),l=t.buildLocalFlattenMatrix(s,a.modelType,n,o),c=i.cloneDeep(e);return c.dashboardContext.explanationContext.localExplanation={values:s,flattenedValues:l,percentComplete:void 0},void 0===e.dashboardContext.explanationContext.globalExplanation&&(c.dashboardContext.explanationContext.globalExplanation=t.buildGlobalExplanationFromLocal(c.dashboardContext.explanationContext.localExplanation),c.dashboardContext.explanationContext.isGlobalDerived=!0),c}))}))}))},t.prototype.onClassSelect=function(e,r){this.setState((function(e){var n=i.cloneDeep(e.dashboardContext.weightContext);n.selectedKey=r.key;var a=t.buildLocalFlattenMatrix(e.dashboardContext.explanationContext.localExplanation.values,e.dashboardContext.explanationContext.modelMetadata.modelType,e.dashboardContext.explanationContext.testDataset,r.key);return{dashboardContext:{explanationContext:{modelMetadata:e.dashboardContext.explanationContext.modelMetadata,testDataset:e.dashboardContext.explanationContext.testDataset,localExplanation:{flattenedValues:a,intercepts:e.dashboardContext.explanationContext.localExplanation.intercepts,values:e.dashboardContext.explanationContext.localExplanation.values},globalExplanation:e.dashboardContext.explanationContext.globalExplanation,explanationGenerators:e.dashboardContext.explanationContext.explanationGenerators,isGlobalDerived:e.dashboardContext.explanationContext.isGlobalDerived,jointDataset:e.dashboardContext.explanationContext.jointDataset},weightContext:n}}}))},t.prototype.onConfigChanged=function(e,t){this.setState((function(r){var n=i.cloneDeep(r.configs);return n[t]=e,{configs:n}}))},t.prototype.handleGlobalTabClick=function(e){var r=t.globalTabKeys.indexOf(e.props.itemKey);-1===r&&(r=0),this.setState({activeGlobalTab:r})},t.prototype.handleLocalTabClick=function(e){var r=t.localTabKeys.indexOf(e.props.itemKey);-1===r&&(r=0),this.setState({activeLocalTab:r})},t.prototype.onClearSelection=function(){this.selectionContext.onSelect([]),this.setState({activeLocalTab:0}),document.querySelector("#globalPivot button").focus()},t.iconsInitialized=!1,t.globalTabKeys=["dataExploration","globalImportance","explanationExploration","summaryImportance","modelExplanation","customVisualization"],t.localTabKeys=["featureImportance","perturbationExploration","ICE"],t.transposeLocalImportanceMatrix=s.a((function(e){var t=e.length,r=e[0].length,n=e[0][0].length,a=Array(r).fill(0).map((function(e){return Array(n).fill(0).map((function(e){return Array(t).fill(0)}))}));return e.forEach((function(e,t){e.forEach((function(e,r){e.forEach((function(e,n){a[r][n][t]=e}))}))})),a})),t.buildWeightDropdownOptions=s.a((function(e){var t=[{key:b.a.absAvg,text:f.a.absoluteAverage}];return e.testDataset.predictedY&&t.push({key:b.a.predicted,text:f.a.predictedClass}),e.modelMetadata.classNames.forEach((function(e,r){t.push({key:r,text:e})})),t})),t.getClassLength=s.a((function(e){if(e.precomputedExplanations&&e.precomputedExplanations.localFeatureImportance&&e.precomputedExplanations.localFeatureImportance.scores){var t=e.precomputedExplanations.localFeatureImportance.scores;return t.every((function(e){return e.every((function(e){return Array.isArray(e)}))}))?t.length:1}return e.precomputedExplanations&&e.precomputedExplanations.globalFeatureImportance&&e.precomputedExplanations.globalFeatureImportance.scores&&e.precomputedExplanations.globalFeatureImportance.scores.every((function(e){return Array.isArray(e)}))?e.precomputedExplanations.globalFeatureImportance.scores[0].length:e.probabilityY&&Array.isArray(e.probabilityY)&&Array.isArray(e.probabilityY[0])&&e.probabilityY[0].length>0?e.probabilityY[0].length:1}))}(p.Component)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(a)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(307));var l=/(\{[\d|\w]+\})/,c=/(\$ref\{[\w|.]+\})/,u=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"function"==typeof r&&(r={customLanguageInterface:r}),this._opts=i({},{customLanguageInterface:s.getInterfaceLanguage,pseudo:!1,pseudoMultipleLanguages:!1,logsEnabled:!0},r),this._interfaceLanguage=this._opts.customLanguageInterface(),this._language=this._interfaceLanguage,this.setContent(t)}return o(e,[{key:"setContent",value:function(e){var t=this,r=Object.keys(e),n=a(r,1)[0];this._defaultLanguage=n,this._defaultLanguageFirstLevelKeys=[],this._props=e,s.validateTranslationKeys(Object.keys(e[this._defaultLanguage])),Object.keys(this._props[this._defaultLanguage]).forEach((function(e){"string"==typeof t._props[t._defaultLanguage][e]&&t._defaultLanguageFirstLevelKeys.push(e)})),this.setLanguage(this._interfaceLanguage),this._opts.pseudo&&this._pseudoAllValues(this._props)}},{key:"_pseudoAllValues",value:function(e){var t=this;Object.keys(e).forEach((function(r){if("object"===n(e[r]))t._pseudoAllValues(e[r]);else if("string"==typeof e[r]){if(0===e[r].indexOf("[")&&e[r].lastIndexOf("]")===e[r].length-1)return;for(var a=e[r].split(" "),i=0;i<a.length;i+=1)if(a[i].match(l));else if(a[i].match(c));else{var o=a[i].length;t._opts.pseudoMultipleLanguages&&(o=parseInt(1.4*o,10)),a[i]=s.randomPseudo(o)}e[r]="["+a.join(" ")+"]"}}))}},{key:"setLanguage",value:function(e){var t=this,r=s.getBestMatchingLanguage(e,this._props),n=Object.keys(this._props)[0];if(this._language=r,this._props[r]){for(var a=0;a<this._defaultLanguageFirstLevelKeys.length;a+=1)delete this[this._defaultLanguageFirstLevelKeys[a]];var o=i({},this._props[this._language]);Object.keys(o).forEach((function(e){t[e]=o[e]})),n!==this._language&&(o=this._props[n],this._fallbackValues(o,this))}}},{key:"_fallbackValues",value:function(e,t){var r=this;Object.keys(e).forEach((function(n){Object.prototype.hasOwnProperty.call(e,n)&&!t[n]&&""!==t[n]?(t[n]=e[n],r._opts.logsEnabled&&console.log("🚧 👷 key '"+n+"' not found in localizedStrings for language "+r._language+" 🚧")):"string"!=typeof t[n]&&r._fallbackValues(e[n],t[n])}))}},{key:"getLanguage",value:function(){return this._language}},{key:"getInterfaceLanguage",value:function(){return this._interfaceLanguage}},{key:"getAvailableLanguages",value:function(){var e=this;return this._availableLanguages||(this._availableLanguages=[],Object.keys(this._props).forEach((function(t){e._availableLanguages.push(t)}))),this._availableLanguages}},{key:"formatString",value:function(e){for(var t=this,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var i=e||"";"string"==typeof i&&(i=this.getString(e,null,!0)||i);var o=i.split(c).filter((function(e){return!!e})).map((function(r){if(r.match(c)){var n=r.slice(5,-1),a=t.getString(n);return a||(t._opts.logsEnabled&&console.log("No Localization ref found for '"+r+"' in string '"+e+"'"),"$ref(id:"+n+")")}return r})).join("");return o.split(l).filter((function(e){return!!e})).map((function(e){if(e.match(l)){var t=e.slice(1,-1),r=n[t];if(void 0===r){var a=n[0][t];if(void 0===a)return r;r=a}return r}return e})).join("")}},{key:"getString",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{for(var n=this._props[t||this._language],a=e.split("."),i=0;i<a.length;i+=1){if(void 0===n[a[i]])throw Error(a[i]);n=n[a[i]]}return n}catch(n){!r&&this._opts.logsEnabled&&console.log("No localization found for key '"+e+"' and language '"+t+"', failed on "+n.message)}return null}},{key:"getContent",value:function(){return this._props}}]),e}();t.default=u},function(e){e.exports={selectPoint:"Pokud si chcete zobrazit místní vysvětlení určitého bodu, vyberte daný bod.",defaultClassNames:"Třída {0}",defaultFeatureNames:"Příznak {0}",absoluteAverage:"Průměr absolutní hodnoty",predictedClass:"Predikovaná třída",dataExploration:"Průzkum dat",globalImportance:"Globální důležitost",explanationExploration:"Průzkum vysvětlení",summaryImportance:"Důležitost souhrnu",featureImportance:"Významnost atributu",perturbationExploration:"Průzkum perturbace",localFeatureImportance:"Významnost místního atributu",ice:"ICE",clearSelection:"Vymazat výběr",feature:"Funkce:",intercept:"Zachycení",ExplanationScatter:{dataLabel:"Data: {0}",importanceLabel:"Důležitost: {0}",predictedY:"PredictedY",index:"Index",dataGroupLabel:"Data",output:"Výstup",probabilityLabel:"Pravděpodobnost: {0}",trueY:"Skutečné Y",class:"třída: ",xValue:"Hodnota X:",yValue:"Hodnota Y:",colorValue:"Barva:"},CrossClass:{label:"Vážení mezi třídami:",info:"Informace o výpočtu mezi třídami",overviewInfo:"Modely s více třídami generují pro každou třídu vektor významností nezávislých atributů. Vektor významností atributů jednotlivých tříd ukazuje, kvůli kterým příznakům je určitá třída pravděpodobnější nebo méně pravděpodobná. Můžete vybrat, jak se váhy vektorů významností atributů pro jednotlivé třídy shrnují do jedné hodnoty:",absoluteValInfo:"Průměr absolutní hodnoty: Udává součet důležitosti příznaku ve všech možných třídách vydělený počtem tříd.",predictedClassInfo:"Predikovaná třída: Udává hodnotu významnosti atributu pro predikovanou třídu daného bodu.",enumeratedClassInfo:"Výčet názvů tříd: Udává jen významnost atributu zadané třídy ve všech datových bodech.",close:"Zavřít"},AggregateImportance:{scaledFeatureValue:"Škálovaná hodnota příznaku",low:"Nízká",high:"Vysoká",featureLabel:"Příznak: {0}",valueLabel:"Hodnota příznaku: {0}",importanceLabel:"Důležitost: {0}",predictedClassTooltip:"Predikovaná třída: {0}",trueClassTooltip:"Skutečná třída: {0}",predictedOutputTooltip:"Predikovaný výstup: {0}",trueOutputTooltip:"Skutečný výstup: {0}",topKFeatures:"Hlavních K příznaků:",topKInfo:"Jak se počítá prvních k",predictedValue:"Předpokládaná hodnota",predictedClass:"Predikovaná třída",trueValue:"Pravdivá hodnota",trueClass:"Skutečná třída",noColor:"Žádné",tooManyRows:"Poskytnutá datová sada je větší, než jakou tento graf podporuje."},BarChart:{classLabel:"Třída: {0}",sortBy:"Řadit podle",noData:"Žádná data",absoluteGlobal:"Absolutní globální",absoluteLocal:"Absolutní lokální",calculatingExplanation:"Počítá se vysvětlení."},IcePlot:{numericError:"Musí to být číslo.",integerError:"Musí to být celé číslo.",prediction:"Predikce",predictedProbability:"Predikovaná pravděpodobnost",predictionLabel:"Predikce: {0}",probabilityLabel:"Pravděpodobnost: {0}",noModelError:"Pokud chcete prozkoumat predikce v grafech ICE, poskytněte prosím zprovozněný model.",featurePickerLabel:"Funkce:",minimumInputLabel:"Minimum:",maximumInputLabel:"Maximum:",stepInputLabel:"Kroky:",loadingMessage:"Načítají se data...",submitPrompt:"Pokud si chcete zobrazit graf ICE, odešlete rozsah.",topLevelErrorMessage:"Chyba v parametru",errorPrefix:"Došlo k chybě: {0}"},PerturbationExploration:{loadingMessage:"Načítání...",perturbationLabel:"Perturbace:"},PredictionLabel:{predictedValueLabel:"Predikovaná hodnota: {0}",predictedClassLabel:"Predikovaná třída: {0}"},Violin:{groupNone:"Bez seskupení",groupPredicted:"Predikované Y",groupTrue:"Skutečné Y",groupBy:"Seskupit podle"},FeatureImportanceWrapper:{chartType:"Typ grafu:",violinText:"Houslový",barText:"Pruhový",boxText:"Pole",beehiveText:"Swarm",globalImportanceExplanation:"Globální významnost atributu se počítá jako průměr absolutní hodnoty významnosti atributu ve všech bodech (normalizace L1). ",multiclassImportanceAddendum:"Do výpočtu důležitosti příznaku pro všechny třídy se zahrnují všechny body, nepoužívá se žádné rozdílové vážení. Proto příznak, který má velkou zápornou důležitost pro mnoho bodů, pro které se predikovalo, že nejsou třída A, výrazně zvýší důležitost třídy A daného příznaku."}}},function(e){e.exports={selectPoint:"Wählen Sie einen Punkt aus, um seine lokale Erklärung anzuzeigen.",defaultClassNames:'Klasse \\"{0}\\"',defaultFeatureNames:'Feature "{0}"',absoluteAverage:"Durchschnitt des absoluten Werts",predictedClass:"Vorhergesagte Klasse",dataExploration:"Durchsuchen von Daten",globalImportance:"Globale Relevanz",explanationExploration:"Durchsuchen der Erklärung",summaryImportance:"Zusammenfassung – Relevanz",featureImportance:"Featurerelevanz",perturbationExploration:"Durchsuchen des Störeinflusses",localFeatureImportance:"Lokale Featurerelevanz",ice:"ICE",clearSelection:"Auswahl löschen",feature:"Feature:",intercept:"Abfangen",ExplanationScatter:{dataLabel:"Daten : {0}",importanceLabel:"Relevanz : {0}",predictedY:"PredictedY",index:"Index",dataGroupLabel:"Daten",output:"Ausgabe",probabilityLabel:"Wahrscheinlichkeit : {0}",trueY:"TRUE Y",class:"Klasse: ",xValue:"X-Wert:",yValue:"Y-Wert:",colorValue:"Farbe:"},CrossClass:{label:"Klassenübergreifende Gewichtung:",info:"Informationen zur klassenübergreifenden Berechnung",overviewInfo:"Multiklassenmodelle generieren für jede Klasse einen unabhängigen Featurerelevanzvektor. Der Featurerelevanzvektor der einzelnen Klassen zeigt, welche Features eine Klasse wahrscheinlicher oder unwahrscheinlicher werden ließen. Sie können auswählen, wie die Gewichtungen der Featurerelevanzvektoren pro Klasse zu einem einzigen Wert zusammengefasst werden:",absoluteValInfo:"Durchschnitt des absoluten Werts: Zeigt die Summe der Relevanz des Features für alle möglichen Klassen, geteilt durch die Klassenanzahl.",predictedClassInfo:"Vorhergesagte Klasse: Zeigt den Wert der Featurerelevanz für die vorhergesagte Klasse eines bestimmten Punkts an.",enumeratedClassInfo:"Aufgelistete Klassennamen: Zeigt nur die Featurerelevanz der angegebenen Klasse für alle Datenpunkte an.",close:"Schließen"},AggregateImportance:{scaledFeatureValue:"Featurewert auf Farbskala",low:"Niedrig",high:"Hoch",featureLabel:"Feature: {0}",valueLabel:"Featurewert: {0}",importanceLabel:"Relevanz: {0}",predictedClassTooltip:"Vorhergesagte Klasse: {0}",trueClassTooltip:"TRUE-Klasse: {0}",predictedOutputTooltip:"Vorhergesagte Ausgabe: {0}",trueOutputTooltip:"TRUE-Ausgabe: {0}",topKFeatures:"Wichtigste K Features:",topKInfo:"Wie erfolgt die Top-K-Berechnung?",predictedValue:"Vorhergesagter Wert",predictedClass:"Vorhergesagte Klasse",trueValue:"True-Wert",trueClass:"TRUE-Klasse",noColor:"Keine",tooManyRows:"Das angegebene Dataset ist größer als von diesem Diagramm unterstützt wird."},BarChart:{classLabel:"Klasse: {0}",sortBy:"Sortieren nach",noData:"Keine Daten",absoluteGlobal:"Absolut global",absoluteLocal:"Absolut lokal",calculatingExplanation:"Erklärung wird berechnet."},IcePlot:{numericError:"Muss numerisch sein.",integerError:"Muss eine ganze Zahl sein.",prediction:"Vorhersage",predictedProbability:"Vorhergesagte Wahrscheinlichkeit",predictionLabel:"Vorhersage: {0}",probabilityLabel:"Wahrscheinlichkeit: {0}",noModelError:"Geben Sie ein operationalisiertes Modell an, um Vorhersagen in ICE-Plots zu untersuchen.",featurePickerLabel:"Feature:",minimumInputLabel:"Minimum:",maximumInputLabel:"Maximum:",stepInputLabel:"Schritte:",loadingMessage:"Daten werden geladen...",submitPrompt:"Übermitteln Sie einen Bereich, um einen ICE-Plot anzuzeigen.",topLevelErrorMessage:"Fehler in Parameter.",errorPrefix:"Fehler erkannt: {0} "},PerturbationExploration:{loadingMessage:"Wird geladen...",perturbationLabel:"Störeinfluss:"},PredictionLabel:{predictedValueLabel:"Vorhergesagter Wert : {0}",predictedClassLabel:"Vorhergesagte Klasse : {0}"},Violin:{groupNone:"Keine Gruppierung",groupPredicted:"Vorhersage für Y",groupTrue:"TRUE Y",groupBy:"Gruppieren nach"},FeatureImportanceWrapper:{chartType:"Diagrammtyp:",violinText:"Violine",barText:"Balken",boxText:"Feld",beehiveText:"Swarm",globalImportanceExplanation:"Die globale Featurerelevanz wird berechnet, indem der Durchschnitt des absoluten Werts der Featurerelevanz aller Punkte ermittelt wird (L1-Normalisierung). ",multiclassImportanceAddendum:'Bei der Berechnung der Featurerelevanz für alle Klassen werden alle Punkte berücksichtigt, es wird keine differenzielle Gewichtung verwendet. Ein Feature mit hoher negativer Relevanz, bei dem viele Punkte in der Vorhersage nicht der "Klasse A" zugeordnet werden, führt daher zu einer erheblich erhöhten Featurerelevanz der "Klasse A".'}}},function(e){e.exports={selectPoint:"Select a point to see its local explanation","_selectPoint.comment":"Prompts the user to select a point",defaultClassNames:"Class {0}","_defaultClassNames.comment":" models that output classes have this as the default class names",defaultFeatureNames:"Feature {0}","_defaultFeatureNames.comment":"the default column names",absoluteAverage:"Average of absolute value","_absoluteAverage.comment":"https://en.wikipedia.org/wiki/Norm_(mathematics) Absolute value norm",predictedClass:"Predicted class","_predictedClass.comment":"Norm based on the predicted class rather than absolute value as above",datasetExplorer:"Dataset Explorer",dataExploration:"Dataset Exploration","_dataExploration.comment":"Label for tab showing scatterplot of dataset and predictions",aggregateFeatureImportance:"Aggregate Feature Importance","_aggregateFeatureImportance.comment":"tab label for view of aggregated (summed and averaged) feature importances",globalImportance:"Global Importance","_globalImportance.comment":"Label for tab showing bar chart of importance of features at a global level",explanationExploration:"Explanation Exploration",individualAndWhatIf:"Individual Feature Importance & What-If","_individualAndWhatIf.comment":"tab label for feature importances of single rows, and 'what if?' which allows seeing hypothetical results","_explanationExploration.comment":"Label for tab showing scatter plot of dataset and importance of features data",summaryImportance:"Summary Importance","_summmaryImportance.comment":"Label showing all importance of feature datapoints in scatter plot",featureImportance:"Feature Importance","_featureImportance.comment":"Label for feature importance ",featureImportanceOf:"Feature importance of {0}",perturbationExploration:"Perturbation Exploration","_perturbationExploration.comment":"Label for local tab allowing the user to change parameters on a selected point",localFeatureImportance:"Local Feature Importance","_localFeatureImportance.comment":"Label for local tab showing feature importance of selected point",ice:"ICE","_ice.comment":"Label for tab showing https://christophm.github.io/interpretable-ml-book/ice.html",clearSelection:"Clear selection",feature:"Feature:",intercept:"Intercept","_intercept.comment":"The label for the linear intercept, the bias value",modelPerformance:"Model Performance","_modelPerformance.comment":"tab label to see how well a model predicted values when compared to true",ExplanationScatter:{dataLabel:"Data : {0}","_dataLabel.comment":"prepend in front of column names",importanceLabel:"Importance : {0}","_importanceLabel.comment":"prepend in front of feature importance of column name",predictedY:"Predicted Y","_predictedY.comment":"predicted output",index:"Index","_index.comment":"the index value (an integer of the row number)",dataGroupLabel:"Data",output:"Output",probabilityLabel:"Probability : {0}","_probabilityLabel.comment":"Probability prefix for all classes in a multiclass problem",trueY:"True Y","_trueY.comment":"The true value to be predicted",class:"class: ","_class.comment":"label for predicted class",xValue:"X value:","_xValue.comment":"label for x value dropdown",yValue:"Y value:","_yValue.comment":"label for y value dropdown",colorValue:"Color:","_colorValue.comment":"label for selecting color value",count:"Count","_count.comment":"the default axis is the count of items"},CrossClass:{label:"Cross-class weighting:","_label.comment":"label for dropdown allowing user to select how importance across multiple output classes is aggregated",info:"Information on cross-class calculation","_info.comment":"tooltip on hover",overviewInfo:"Multiclass models generate an independent feature importance vector for each class. Each class's feature importance vector demonstrates which features made a class more likely or less likely. You can select how the weights of the per-class feature importance vectors are summarized into a single value:","_overview.comment":"explains absolute value weights",absoluteValInfo:"Average of absolute value: Shows the sum of the feature's importance across all possible classes, divided by number of classes",predictedClassInfo:"Predicted class: Shows the feature importance value for a given point's predicted class","_predictedClassInfo.comment":"explains predicted class weight",enumeratedClassInfo:"Enumerated class names: Shows only the specified class's feature importance values across all data points.","_enumeratedClassInfo.comment":"explains the weights for selecting a single class",close:"Close",crossClassWeights:"Cross class weights"},AggregateImportance:{scaledFeatureValue:"Scaled Feature Value","_scaledFeatureValue.comment":"The chart shows all data in a color scale (normalized to 0 - 1). This is the label for the color bar",low:"Low","_low.comment":"The low end of the color bar",high:"High","_high.comment":"label for the high end of the color bar",featureLabel:"Feature: {0}","_featureLabel.comment":"Prefix to the feature name",valueLabel:"Feature value: {0}","_valueLabel.comment":"prefix to the feature value",importanceLabel:"Importance: {0}","_importanceLabel.comment":"prefix to the feature importance",predictedClassTooltip:"Predicted Class: {0}","_predictedClassTooltip.comment":"prefixed in front of the output class names predicted by the model",trueClassTooltip:"True Class: {0}","_trueClassTooltip.comment":"prefixed in front of the true class labels",predictedOutputTooltip:"Predicted Output: {0}","_predictedOutputTooltip.comment":"prefixed in front of the output in a regression model (numeric, no classes)",trueOutputTooltip:"True Output: {0}","_trueOutputTooltip.comment":"prefixed in front of the true value in a regression model (numeric, no classes)",topKFeatures:"Top K Features:","_topKFeatures.comment":"Label for slider to show only the top (k) most important features, where the slider is used to set the value of k",topKInfo:"How top k is calculated",predictedValue:"Predicted Value","_predictedValue.comment":"Label for dropdown option, group data by the predicted value from the model (numeric values)",predictedClass:"Predicted Class","_predictedClass.comment":"Label for dropdown option, group data by predicted class from model",trueValue:"True Value","_trueValue.comment":"label for dropdown option, group data by true value (numeric)",trueClass:"True Class","_trueClass.comment":"label for dropdown, group data by true class",noColor:"None","_noColor.comment":"label for dropdown, do not apply any grouping",tooManyRows:"The provided dataset is larger than this chart can support","_tooManyRows.comment":"error message if the dataset is too large to visualize"},BarChart:{classLabel:"Class: {0}","_classLabel.comment":"Prefix for class",sortBy:"Sort by","_sortBy.comment":"prompt for setting how values are sorted",noData:"No Data","_noData.comment":"Error message for no applicable data",absoluteGlobal:"Absolute global","_absoluteGlobal.comment":"sorting option, sort by the absolute value of the importance of all datapoints",absoluteLocal:"Absolute local","_absoluteLocal.comment":"sorting option, sort by the absolute value of the importance for the single selected point",calculatingExplanation:"Calculating explanation","_calculatingExplanation.comment":"loading message"},IcePlot:{numericError:"Must be numeric","_numericError.comment":"error message if non-numeric characters typed",integerError:"Must be an integer","_integerError.comment":"error message if non-integer values typed by user",prediction:"Prediction","_prediction.comment":"Prediction label for y-axis",predictedProbability:"Predicted probability","_predictedProbability.comment":"predicted probability label for y-axis",predictionLabel:"Prediction: {0}","_predictionLabel.comment":"prediction hover prefix",probabilityLabel:"Probability: {0}","_probabilityLabel.comment":"probability hover prefix",noModelError:"Please provide an operationalized model to explore predictions in ICE plots.","_noModelError.comment":"error message for no model present",featurePickerLabel:"Feature:","_featurePicker.comment":"feature dropdown label",minimumInputLabel:"Minimum:","_minimumInputLabel.comment":"Set minimum bounds label",maximumInputLabel:"Maximum:","_maximumInputLabel.comment":"set maximum bounds label",stepInputLabel:"Steps:","_stepInputLabel.comment":"number of samples to include between minimum and maximum (integer)",loadingMessage:"Loading data...","_loadingMessage.comment":"loading message",submitPrompt:"Submit a range to view an ICE plot","_submitPrompt.comment":"prompt to user giving instructions to enter a numeric range",topLevelErrorMessage:"Error in parameter","_topLevelErrorMessage.comment":"error message for any parameter issue",errorPrefix:"Error encountered: {0}","_errorPrefix.comment":"prefix in front of external error"},PerturbationExploration:{loadingMessage:"Loading...",perturbationLabel:"Perturbation:","_perturbationLabel.comment":"Perturbation (ie. the user has made a set of small changes to the original data -- a perturbation. This is the label for the resulting prediction)"},PredictionLabel:{predictedValueLabel:"Predicted value : {0}","_predictionValueLabel.comment":"label for prediction of numeric values",predictedClassLabel:"Predicted class : {0}","_predictedClassLabel.comment":"label for prediction of class value"},Violin:{groupNone:"No grouping","_groupName.comment":"Do not group data option",groupPredicted:"Predicted Y","_groupPredicted.comment":"option to group data by predicted class",groupTrue:"True Y","_groupTrue.comment":"option to group data by true class",groupBy:"Group by","_groupBy.comment":"Group by prompt for dropdown to select how data should be grouped"},FeatureImportanceWrapper:{chartType:"Chart type:","_chartType.comment":"label for dropdown to select chart format",violinText:"Violin","_violinText.comment":"a violin plot https://en.wikipedia.org/wiki/Violin_plot",barText:"Bar","_barText.comment":"a bar plot ",boxText:"Box","_boxText.comment":"a box plot https://en.wikipedia.org/wiki/Box_plot",beehiveText:"Swarm","_beehiveText.comment":"A swarm plot (its like a scatter plot with categorical x axis with dithering, see examples https://seaborn.pydata.org/generated/seaborn.swarmplot.html)",globalImportanceExplanation:"Global feature importance is calculated by averaging the absolute value of the feature importance of all points (L1 normalization). ","_globalImportanceExplanation.comment":"explains how global feature importance is calculated ",multiclassImportanceAddendum:"All points are included in calculating a feature's importance for all classes, no differential weighting is used. So a feature that has large negative importance for many points predicted to not be of 'Class A' will greatly increase that feature's 'Class A'  importance.","_multiclassImportanceAddendum.comment":"explains how global importance is calculated for each class in a multiclass case."},Filters:{equalComparison:"Equal to","_equalComparison.comment":"filter for rows that are exactly equal",greaterThanComparison:"Greater than","_greaterThanComparison.comment":"filter for rows that are greater than a value",greaterThanEqualToComparison:"Greater than or equal to","_greaterThanEqualToComparison.comment":"filter for rows that are greater than or equal to a value",lessThanComparison:"Less than","_lessThanComparison.comment":"filter for rows that are less than a value",lessThanEqualToComparison:"Less than or equal to","_lessThanEqualToComparison.comment":"filter for rows that are less than or equal to a value",inTheRangeOf:"In the range of","_inTheRangeOf.comment":"filter for rows that are between two values",categoricalIncludeValues:"Included values:","_categoricalIncludeValues.comment":"filter to selected categories",numericValue:"Value","_numericValue.comment":"the value to compare to in greater/less than or equal to filter",numericalComparison:"Operation","_numericalComparison.comment":"label for dropdown containing [greater than, less than, equal to]",minimum:"Minimum",maximum:"Maximum",min:"Min: {0}",max:"Max: {0}",uniqueValues:"# of unique values: {0}","_uniqueValues.comment":"the number of unique values for a selected categorical filter"},Columns:{regressionError:"Regression error","_regressionError.comment":"true value minus predicted value is regression error",error:"Error",classificationOutcome:"Classification outcome","_classificationOutcome.comment":"Whether the prediction from the model matched the true value",truePositive:"True positive",trueNegative:"True negative",falsePositive:"False positive",falseNegative:"False negative",dataset:"Dataset",predictedProbabilities:"Prediction probabilities",none:"Count","_none.comment":"option to not have data on this axis, instead just counts number of points"},WhatIf:{closeAriaLabel:"Close",defaultCustomRootName:"Copy of row {0}","_defaultCustomRootName.comment":"default prefix for a hypothetical point made by copying another point",filterFeaturePlaceholder:"Search features","_filterFeaturePlaceholder.comment":"placeholder in search box for searching for features by name"},Cohort:{cohort:"Cohort","_cohort.comment":"a subset of the data is called a cohort",defaultLabel:"All data"},GlobalTab:{"_helperText.comment":"paragraph summarizing the view on this page and available actions",helperText:"Explore the top-k important features that impact your overall model predictions (a.k.a. global explanation). Use the slider to show descending feature importance values. Select up to three cohorts to see their feature importance values side by side. Click on any of the feature bars in the graph to see how values of the selected feature impact model prediction.",topAtoB:"Top {0}-{1} features","_topAtoB.comment":"label on a slider, will tell user the index of the features they are currently seeing, like Top 5-10 features",datasetCohorts:"Dataset cohorts","_datasetCohorts.comment":"label for dropdown allowing users to select what cohorts to view",legendHelpText:"Toggle cohorts on and off in the plot by clicking on the legend items.","_legendHelperText.comment":"explanatory text on what actions can be done on a list of cohorts",sortBy:"Sort by","_sortBy.comment":"prompt for setting how values are sorted",viewDependencePlotFor:"View dependence plot for:","_viewDependencePlotFor.comment":"label for dropdown to select feature to be shown in a dependence plot (a kind of graph)",datasetCohortSelector:"Select a dataset cohort","_datasetCohortSelector.comment":"label for selecting single cohort",aggregateFeatureImportance:"Aggregate Feature Importance","_aggregateFeatureImportance.comment":"graph label for aggregated (summed and averaged) feature importances",missingParameters:"This tab requires the local feature importance parameter be supplied.","_missingParameters.comment":"Show a message if the required feature importance parameter is not provided",weightOptions:"Class importance weights","_weightOptions.comment":"Weight how importance values are averaged https://en.wikipedia.org/wiki/Weighted_arithmetic_mean",dependencePlotTitle:"Dependence Plots",dependencePlotHelperText:"This dependence plot shows the relationship between the value of a feature to the corresponding importance of the feature across a cohort.",dependencePlotFeatureSelectPlaceholder:"Select feature",datasetRequired:"Dependence plots require the evaluation dataset and local feature importance array."},CohortBanner:{dataStatistics:"Data Statistics","_dataStatistics.comment":"label for section containing statistics about the dataset",datapoints:"{0} datapoints","_datapoints.comment":"formatted string of the number of datapoints in the dataset",features:"{0} features","_features.comment":"formatted string of the number of features (columns) in a dataset",filters:"{0} filters","_filters.comment":"the number of filters that define a cohort",binaryClassifier:"Binary Classifier","_binaryClassifier.comment":"a model that predicts true or false is a binary classifier, this is the label",regressor:"Regressor","_regressor.comment":"a class of models that output a numeric score, name is derived from statistical regression",multiclassClassifier:"Multiclass Classifier","_multiclassClassifier.comment":"models that output a category, with more than two categories",datasetCohorts:"Dataset Cohorts","_datasetCohorts.comment":"a subset of the original data, defined by filtering the data. This is the label for presenting all cohorts the user created",editCohort:"Edit Cohort","_editCohort.comment":"button text to edit the filters defining an existing cohort",duplicateCohort:"Duplicate Cohort","_duplicateCohort.comment":"button text to copy an existing cohort",addCohort:"Add Cohort","_addCohort.comment":"button text to create a new cohort",copy:" copy","_copy.comment":"suffix attached to name of cohort created by copying other cohort, by default."},ModelPerformance:{helperText:"Evaluate the performance of your model by exploring the distribution of your prediction values and the values of your model performance metrics. You can further investigate your model by looking at a comparative analysis of its performance across different cohorts or subgroups of your dataset. Select filters along y-value and x-value to cut across different dimensions. Select the gear in the graph to change graph type.","_helperText.comment":"explains the view on this page and what actions can be taken",modelStatistics:"Model Statistics","_modelStatistics.comment":"label for area listing statistics about model prediction",cohortPickerLabel:"Select a dataset cohort to explore","_cohortPickerLabel.comment":"label for single-select dropdown to pick a cohort to view",missingParameters:"This tab requires the array of predicted values from the model be supplied.","_missingPArameters.comment":"Show a message if the required prediction array not provided",missingTrueY:"Model performance statistics require the true outcomes be provided in addition to the predicted outcomes","_missingTrueY.comment":"Show message if true Y values are not provided, since statistics require the true value"},Charts:{yValue:"Y-value","_yValue.comment":"label for y value button on chart",numberOfDatapoints:"Number of datapoints","_numberOfDatapoints.comment":"some charts will always show the count of the number of rows in a group, this is the axis label on the chart",xValue:"X-value","_xValue.comment":"label for x value button on chart",rowIndex:"Row index","_rowIndex.comment":"the index of a row in a dataset",featureImportance:"Feature importance",countTooltipPrefix:"Count: {0}","_countTooltipPrefix.comment":"on hover, show the prefix followed by the total number of points",count:"Count",featurePrefix:"Feature","_featurePrefix.comment":"label shown before feature name in tooltip",importancePrefix:"Importance","_importance.comment":"label shown before importance value in tooltip",cohort:"Cohort",howToRead:"How to read this chart"},DatasetExplorer:{helperText:"Explore your dataset statistics by selecting different filters along the X, Y, and color axis to slice your data along different dimensions. Create dataset cohorts above to analyze dataset statistics with filters such as predicted outcome, dataset features and error groups. Use the gear icon in the upper right-hand corner of the graph to change graph types.","_helperText.comment":"paragraph summarizing the view on this page and what actions the user can take",colorValue:"Color value","_colorValue.comment":"label on button to set how data is mapped to color in chart",individualDatapoints:"Individual datapoints","_individualDatapoints.comment":"configuration option to view chart with each individual point, opposed to chart summing/averaging points",aggregatePlots:"Aggregate plots","_aggregatePlots.comment":"configuration option to view plots that sum or average points, opposed to sowing each point on its own",chartType:"Chart type","_chartType.comment":"label for dropdown to select chart format",missingParameters:"This tab requires an evaluation dataset be supplied.","_missingPArameters.comment":"Show a message if the required dataset parameter is not provided",noColor:"None","_noColor.comment":"placeholder text when no color axis picked"},DependencePlot:{featureImportanceOf:"Feature importance of","_featureImportanceOf.comment":"axis label on chart showing the importance of a selected feature (column)",placeholder:"Click on a feature on the bar chart above to show its dependence plot","_placeholder.comment":"placeholder text explaining how to activate this chart, by clicking on a neighboring chart."},WhatIfTab:{helperText:'You can select a datapoint by clicking on the scatterplot to view its local feature importance values (local explanation) and individual conditional expectation (ICE) plot below. Create a hypothetical what-if datapoint by using the panel on the right to perturb features of a known datapoint. Feature importance values are based on many approximations and are not the "cause" of predictions. Without strict mathematical robustness of causal inference, we do not advise users to make real-life decisions based on this tool.',"_helperText.comment":"explains what is shown in this tab and what actions are available",panelPlaceholder:"A model is required to make predictions for new data points.","_panelPlaceholder.comment":"message shown to user when they did not give a model as inputs",cohortPickerLabel:"Select a dataset cohort to explore","_cohortPickerLabel.comment":"label for single-select dropdown to pick a cohort to view",scatterLegendText:"Toggle datapoints on and off in the plot by clicking on the legend items.","_scatterLegendText.comment":"describes actions possible on the legend items in the chart",realPoint:"Real datapoints","_realPoint.comment":"label above the list of points from the dataset",noneSelectedYet:"None selected yet","_noneSelectedYet.comment":"placeholder if no points are selected, where list of points would go",whatIfDatapoints:"What-If datapoints","_whatIfDatapoints.comment":"label above the list of what if (hypothetical) points",noneCreatedYet:"None created yet","_noneCreatedYet.comment":"placeholder if no hypothetical points have been created, goes where list of points would be",showLabel:"Show:","_showLabel.comment":"label on button to pick what additional chart to show",featureImportancePlot:"Feature importance plot","_featureImportancePlot.comment":"name of a plot type showing the importance of each feature in making a decision",icePlot:"Individual conditional expectation (ICE) plot","_icePlot.comment":"name of a plot type named Individual Conditional Expectation (ICE)",featureImportanceLackingParameters:"Provide local feature importances to see how each feature impacts individual predictions.","_featureImportanceLackingParameters.comment":"placeholder if no local feature importances passed in",featureImportanceGetStartedText:"Select a point to view feature importance","_featureImportanceGetStartedText.comment":"placeholder to prompt user to click point in neighboring chart to view this chart",iceLackingParameters:"ICE plots require an operationalized model to make predictions for hypothetical datapoints.","_iceLackingParameters.comment":"placeholder text if a required parameter is not passed in, cannot show ICE plot if no model passed in",IceGetStartedText:"Select a point or create a What-If point to view ICE plots","_IceGetStartedText.comment":"placeholder to prompt user to click point in neighboring chart to see this chart",whatIfDatapoint:"What-If datapoint","_whatIfDatapoint.comment":"header text for area where user writes a hypothetical point's values",whatIfHelpText:"Select a point on the plot or manually enter a known datapoint index to perturb and save as a new What-If point.","_whatIfHelpText.comment":"describe how to create a what-if hypothetical row",indexLabel:"Data index to perturb","_indexLabel.comment":"label for dropdown for selecting a row by index value",rowLabel:"Row {0}","_rowLabel.comment":"the label for a selected row, with its index number appended",whatIfNameLabel:"What-If datapoint name","_whatIfNameLabel.comment":"label above text field where user can name their what-if hypothetical point",featureValues:"Feature values","_featureValues.comment":"header above the list of feature names (column names)",predictedClass:"Predicted class: ","_predictedClass.comment":"the predicted class for a row",predictedValue:"Predicted value: ","_predictedValue.comment":"the predicted value for a row",probability:"Probability: ","_probability.comment":"the probability that the predicted class is correct",trueClass:"True class: ","_trueClass.comment":"prefix to actual label",trueValue:"True value: ","trueValue.comment":"prefix to actual label for regression",newPredictedClass:"New predicted class: ","_newPredictedClass.comment":"the prediction after the user changed features",newPredictedValue:"New predicted value: ","_newPredictedValue.comment":"the prediction after the user changed features",newProbability:"New probability: ","_newProbability.comment":"the probability for the new prediction",saveAsNewPoint:"Save as new point","_saveAsNewPoint.comment":"button to save hypothetical point",saveChanges:"Save changes","_saveChanges.comment":"button text to save changes made to a row",loading:"Loading...","_loading.comment":"loading message while prediction is made",classLabel:"Class: {0}","_classLabel.comment":"Prefix for class",minLabel:"Min","_minLabel.comment":"minimum (small space available)",maxLabel:"Max","_maxLabel.comment":"maximum (small space available)",stepsLabel:"Steps","_stepsLabel.comment":"number of increments to use between minimum and maximum",disclaimer:'Disclaimer: These are explanations based on many approximations and are not the "cause" of predictions. Without strict mathematical robustness of causal inference, we do not advise users to make real-life decisions based on this tool.',"_disclaimer.comment":"the tool should not be liable for any bad predictions",missingParameters:"This tab requires an evaluation dataset be supplied.","_missingParameters.comment":"Show a message if the required dataset parameter is not provided",selectionLimit:"Maximum of 3 selected points","_selectionLimit.comment":"A user can only select 3 points from a chart at a time, this message is displayed if they click a 4th",classPickerLabel:"Class",tooltipTitleMany:"Top {0} predicted classes","_tooltipTitleMany.comment":"placeholder is the number of classes shown",whatIfTooltipTitle:"What-If predicted classes",tooltipTitleFew:"Predicted classes",probabilityLabel:"Probability",deltaLabel:"Delta","_deltaLabel.comment":"represents the change in a value",nonNumericValue:"Value should be numeric",icePlotHelperText:"ICE plots demonstrate how the selected datapoint's prediction values change along a range of feature values between a minimum and maximum value."},CohortEditor:{selectFilter:"Select Filter","_selectFilter.comment":"prompt to select an attribute to filter on",TreatAsCategorical:"Treat as categorical","_TreatAsCategorical.comment":"a checkbox label to treat integers as categories instead of as numbers",addFilter:"Add Filter","_addFilter.comment":"button text to add the current settings as a new filter",addedFilters:"Added Filters","_addedFilters.comment":"header above the list of filters that have been saved",noAddedFilters:"No filters added yet","_noAddedFilters.comment":"placeholder text when no filters are included",defaultFilterState:"Select a filter to add parameters to your dataset cohort.","_defaultFilterState.comment":"placeholder text prompting user to start making a filter",cohortNameLabel:"Dataset cohort name","_cohortNameLabel.comment":"label for text filed where user adds name of a cohort (subset)",cohortNamePlaceholder:"Name your cohort","_cohortNamePlaceholder.comment":"placeholder for cohort name",save:"Save",delete:"Delete",cancel:"Cancel",cohortNameError:"Missing cohort name","_cohortNameError.comment":"error message if required name is missing",placeholderName:"Cohort {0}","_placeholderName.comment":"starting name for a new cohort"},AxisConfigDialog:{select:"Select","_select.comment":"label above dropdown to promp user to pick a feature",ditherLabel:"Should dither","_ditherLabel.comment":"checkbox label for if small random changes should be added to numbers to more easily see large clusters",selectFilter:"Select your axis value","_selectFilter.comment":"label on dropdown to pick value for charting",selectFeature:"Select Feature","_selectFeature.comment":"dropdown label to select feature (column) for charting",binLabel:"Apply binning to data","_binLabel.comment":"group all values into a fixed number of groups (bins)",TreatAsCategorical:"Treat as categorical","_TreatAsCategorical.comment":"a checkbox label to treat integers as categories instead of as numbers",numOfBins:"Number of bins","_numberOfBins.comment":"the number of groups (bins) to place all values into",groupByCohort:"Group by cohort","_groupByCohort.comment":"if user selects to group by cohort, no further parameters to set, just show a message to fill space",selectClass:"Select class","_selectClass.comment":"label for dropdown listing all classes",countHelperText:"A histogram of the number of points"},ValidationErrors:{predictedProbability:"Predicted probability",predictedY:"Predicted Y",evalData:"Evaluation dataset",localFeatureImportance:"Local feature importance",inconsistentDimensions:"Inconsistent dimensions. {0} has dimensions {1}, expected {2}","_inconsistentDimensions.comment":"Raise warning if arguments passed in have different sizes, listing dimensions of both mismatching pieces.",notNonEmpty:"{0} input not a non-empty array",varyingLength:"Inconsistent dimensions. {0} has elements of varying length",notArray:"{0} not an array. Expected array of dimension {1}",errorHeader:"Some input parameters were inconsistent and will not be used: ",datasizeWarning:"The evaluation dataset is too large to be effectively displayed in some charts, please add filters to decrease the size of the cohort. ",datasizeError:"The selected cohort is too large, please add filters to decrease the size of the cohort.",addFilters:"Add filters"},FilterOperations:{equals:" = {0}",lessThan:" < {0}",greaterThan:" > {0}",lessThanEquals:" <= {0}",greaterThanEquals:" >= {0}",includes:" includes {0} ","_includes.comment":"tooltip label for a filter with included values",inTheRangeOf:"[ {0} ]",overflowFilterArgs:"{0} and {1} others","_overflowFilterArgs.comment":"first placeholder is the first one or two items in a long list, the second placeholder is the count of remaining items"},Statistics:{mse:"MSE: {0}","_mse.comment":"the mean squared error, see https://en.wikipedia.org/wiki/Mean_squared_error",rSquared:"R-squared: {0}","_rSquared.comment":"the coefficient of determination, see https://en.wikipedia.org/wiki/Coefficient_of_determination",meanPrediction:"Mean prediction {0}","_meanPrediction.comment":"the average of all the predictions",accuracy:"Accuracy: {0}","_accuracy.comment":"computed accuracy of model on a subgroup, see https://en.wikipedia.org/wiki/Evaluation_of_binary_classifiers",precision:"Precision: {0}","_precision.comment":"computed precision of model, see https://en.wikipedia.org/wiki/Evaluation_of_binary_classifiers",recall:"Recall: {0}","_recall.comment":"computed recall of model, see https://en.wikipedia.org/wiki/Evaluation_of_binary_classifiers",fpr:"FPR: {0}","_fpr.comment":"False positive rate, see https://en.wikipedia.org/wiki/Evaluation_of_binary_classifiers",fnr:"FNR: {0}","_fnr.comment":"False negative rate, see https://en.wikipedia.org/wiki/Evaluation_of_binary_classifiers"},GlobalOnlyChart:{helperText:"Explore the top k important features that impact your overall model predictions. Use the slider to show descending feature importances."},ExplanationSummary:{whatDoExplanationsMean:"What do these explanations mean?",clickHere:"Learn more",shapTitle:"Shapley values",shapDescription:'This explainer uses SHAP, which is a game theoretic approach to explaining models, where the importance of features sets is measured by "hiding" those features from the model through marginalization. Click the link below to learn more.',limeTitle:"LIME (Local Interpretable Model-Agnostic Explanations)",limeDescription:"This explainer uses LIME, which provides a linear approximation of the model. To get an explanation, we do the following: perturb the instance, get model predictions, and use these predictions as labels to learn a sparse linear model that is locally faithful. The weights of this linear model are used as 'feature importances'. Click the link below to learn more.",mimicTitle:"Mimic (Global Surrogate Explanations)",mimicDescription:"This explainer is based on the idea of training global surrogate models to mimic blackbox models. A global surrogate model is an intrinsically interpretable model that is trained to approximate the predictions of any black box model as accurately as possible. Feature importance values are model-based feature importance values of your underlying surrogate model (LightGBM, or Linear Regression, or Stochastic Gradient Descent, or Decision Tree)",pfiTitle:"Permutation Feature Importance (PFI)",pfiDescription:"This explainer randomly shuffles data one feature at a time for the entire dataset and calculates how much the performance metric of interest changes (default performance metrics: F1 for binary classification, F1 Score with micro average for multiclass classification and mean absolute error for regression). The larger the change, the more important that feature is. This explainer can only explain the overall behavior of the underlying model but does not explain individual predictions. Feature importance value of a feature represents the delta in the performance of the model by perturbing that particular feature."}}},function(e){e.exports={selectPoint:"Seleccione un punto para ver su explicación local.",defaultClassNames:"Clase {0}",defaultFeatureNames:"{0} de la característica",absoluteAverage:"Promedio del valor absoluto",predictedClass:"Clase predicha",dataExploration:"Exploración de datos",globalImportance:"Importancia global",explanationExploration:"Exploración de explicación",summaryImportance:"Importancia resumida",featureImportance:"Importancia de la característica",perturbationExploration:"Exploración de la perturbación",localFeatureImportance:"Importancia de la característica local",ice:"ICE",clearSelection:"Borrar selección",feature:"Característica:",intercept:"Interceptar",ExplanationScatter:{dataLabel:"Datos: {0}",importanceLabel:"Importancia: {0}",predictedY:"PredictedY",index:"Índice",dataGroupLabel:"Datos",output:"Salida",probabilityLabel:"Probabilidad: {0}",trueY:"Y verdadero",class:"clase: ",xValue:"Valor de X:",yValue:"Valor de Y:",colorValue:"Color:"},CrossClass:{label:"Ponderación entre clases:",info:"Información sobre el cálculo entre clases",overviewInfo:"Los modelos multiclase generan un vector de importancia de característica independiente para cada clase. El vector de importancia de la característica de cada clase muestra qué características han hecho que una clase sea más o menos probable. Puede seleccionar el modo en que la ponderación de los vectores de importancia de la característica por clase se resume en un único valor:",absoluteValInfo:"Promedio del valor absoluto: muestra la suma de la importancia de la característica en todas las clases posibles, dividida entre el número de clases.",predictedClassInfo:"Clase predicha: muestra el valor de importancia de la característica para una clase predicha de un punto determinado.",enumeratedClassInfo:"Nombres de la clase enumerada: solo muestra los valores de importancia de la característica de la clase especificada en todos los puntos de datos.",close:"Cerrar"},AggregateImportance:{scaledFeatureValue:"Valor de característica escalado",low:"Baja",high:"Alta",featureLabel:"Característica: {0}",valueLabel:"Valor de la característica: {0}",importanceLabel:"Importancia: {0}",predictedClassTooltip:"Clase predicha: {0}",trueClassTooltip:"Clase verdadera: {0}",predictedOutputTooltip:"Resultado predicho: {0}",trueOutputTooltip:"Resultado verdadero: {0}",topKFeatures:"Características principales de K:",topKInfo:"Procedimiento para calcular el valor Top K",predictedValue:"Valor de predicción",predictedClass:"Clase predicha",trueValue:"Valor verdadero",trueClass:"Clase verdadera",noColor:"Ninguno",tooManyRows:"El conjunto de datos proporcionado es mayor de lo que admite este gráfico."},BarChart:{classLabel:"Clase: {0}",sortBy:"Ordenar por",noData:"Sin datos",absoluteGlobal:"Global absoluto",absoluteLocal:"Local absoluto",calculatingExplanation:"Calculando explicación"},IcePlot:{numericError:"Debe ser un valor numérico.",integerError:"Debe ser un entero.",prediction:"Predicción",predictedProbability:"Probabilidad predicha",predictionLabel:"Predicción: {0}",probabilityLabel:"Probabilidad: {0}",noModelError:"Proporcione un modelo de en el que se hayan ejecutado operaciones para explorar las predicciones en los trazados de ICE.",featurePickerLabel:"Característica:",minimumInputLabel:"Mínimo:",maximumInputLabel:"Máximo:",stepInputLabel:"Pasos:",loadingMessage:"Cargando datos...",submitPrompt:"Envíe un rango para ver un trazado de ICE.",topLevelErrorMessage:"Error en el parámetro",errorPrefix:"Se detectó un error: {0}"},PerturbationExploration:{loadingMessage:"Cargando...",perturbationLabel:"Perturbación:"},PredictionLabel:{predictedValueLabel:"Valor predicho: {0}",predictedClassLabel:"Clase predicha: {0}"},Violin:{groupNone:"Sin agrupar",groupPredicted:"Y predicho",groupTrue:"Y verdadero",groupBy:"Agrupar por"},FeatureImportanceWrapper:{chartType:"Tipo de gráfico:",violinText:"Violín",barText:"Barra",boxText:"Cuadro",beehiveText:"Swarm",globalImportanceExplanation:"La importancia de la característica global se calcula mediante el promedio del valor absoluto de la importancia de la característica de todos los puntos (normalización L1). ",multiclassImportanceAddendum:'Para el cálculo de la importancia de una característica para todas las clases se incluyen todos los puntos y no se utiliza ninguna ponderación diferencial. Por tanto, una característica con una gran importancia negativa para muchos puntos con una predicción de que no será de "clase A" aumentará considerablemente la importancia de la "clase A" de la característica.'}}},function(e){e.exports={selectPoint:"Sélectionner un point pour voir son explication locale",defaultClassNames:"Classe {0}",defaultFeatureNames:"{0} de la caractéristique",absoluteAverage:"Moyenne de la valeur absolue",predictedClass:"Classe prédite",dataExploration:"Exploration de données",globalImportance:"Importance globale",explanationExploration:"Exploration de l'explication",summaryImportance:"Importance combinée",featureImportance:"Importance de la caractéristique",perturbationExploration:"Exploration de la perturbation",localFeatureImportance:"Importance de la caractéristique locale",ice:"ICE",clearSelection:"Effacer la sélection",feature:"Fonctionnalité :",intercept:"Intercepter",ExplanationScatter:{dataLabel:"Données : {0}",importanceLabel:"Importance : {0}",predictedY:"PredictedY",index:"Index",dataGroupLabel:"Données",output:"Sortie",probabilityLabel:"Probabilité : {0}",trueY:"Y réel",class:"classe : ",xValue:"Valeur X :",yValue:"Valeur Y :",colorValue:"Couleur :"},CrossClass:{label:"Pondération interclasse :",info:"Informations sur le calcul interclasse",overviewInfo:"Les modèles multiclasses génèrent, pour chaque classe, un vecteur d'importance de caractéristique indépendant qui montre les caractéristiques affectant le degré de probabilité d'une classe. Vous pouvez sélectionner la façon dont les poids des vecteurs d'importance de caractéristique par classe sont combinés en une seule valeur :",absoluteValInfo:"Moyenne de la valeur absolue : montre la somme des valeurs d'importance de la caractéristique dans toutes les classes possibles, divisée par le nombre de classes",predictedClassInfo:"Classe prédite : montre la valeur d'importance de la caractéristique pour la classe prédite d'un point donné",enumeratedClassInfo:"Noms de classe énumérés : montre uniquement les valeurs d'importance de la caractéristique pour la classe spécifiée sur tous les points de données.",close:"Fermer"},AggregateImportance:{scaledFeatureValue:"Valeur de caractéristique mise à l'échelle",low:"Basse",high:"Élevée",featureLabel:"Caractéristique : {0}",valueLabel:"Valeur de caractéristique : {0}",importanceLabel:"Importance : {0}",predictedClassTooltip:"Classe prédite : {0}",trueClassTooltip:"Classe réelle : {0}",predictedOutputTooltip:"Sortie prédite : {0}",trueOutputTooltip:"Sortie réelle : {0}",topKFeatures:"Top K des caractéristiques :",topKInfo:"Mode de calcul du top k",predictedValue:"Valeur prédite",predictedClass:"Classe prédite",trueValue:"Valeur vraie",trueClass:"Classe réelle",noColor:"Aucun",tooManyRows:"Ce graphique ne peut pas prendre en charge le jeu de données fourni en raison de sa taille trop importante"},BarChart:{classLabel:"Classe : {0}",sortBy:"Trier par",noData:"Aucune donnée",absoluteGlobal:"Valeur absolue globale",absoluteLocal:"Valeur absolue locale",calculatingExplanation:"Calcul de l'explication"},IcePlot:{numericError:"Doit être numérique",integerError:"Doit être un entier",prediction:"Prédiction",predictedProbability:"Probabilité prédite",predictionLabel:"Prédiction : {0}",probabilityLabel:"Probabilité : {0}",noModelError:"Indiquez un modèle opérationnalisé pour explorer les prédictions dans les tracés ICE.",featurePickerLabel:"Fonctionnalité :",minimumInputLabel:"Minimum :",maximumInputLabel:"Maximum :",stepInputLabel:"Étapes :",loadingMessage:"Chargement des données...",submitPrompt:"Envoyer une plage pour voir un tracé ICE",topLevelErrorMessage:"Erreur dans le paramètre",errorPrefix:"Erreur rencontrée : {0}"},PerturbationExploration:{loadingMessage:"Chargement...",perturbationLabel:"Perturbation :"},PredictionLabel:{predictedValueLabel:"Valeur prédite : {0}",predictedClassLabel:"Classe prédite : {0}"},Violin:{groupNone:"Aucun regroupement",groupPredicted:"Y prédit",groupTrue:"Y réel",groupBy:"Regrouper par"},FeatureImportanceWrapper:{chartType:"Type de graphique :",violinText:"Violon",barText:"Barre",boxText:"Zone",beehiveText:"Swarm",globalImportanceExplanation:"L'importance d'une caractéristique globale est déterminée en calculant la moyenne de la valeur absolue de l'importance de la caractéristique sur tous les points (normalisation L1). ",multiclassImportanceAddendum:"Tous les points sont inclus dans le calcul de l'importance d'une caractéristique pour toutes les classes, sans aucune pondération différentielle. Ainsi, une caractéristique avec une grande importance négative pour de nombreux points qui, par prédiction, ne sont pas de « Classe A », augmente considérablement l'importance de cette classe."}}},function(e){e.exports={selectPoint:"A helyi magyarázat megjelenítéséhez válassza ki a kívánt pontot",defaultClassNames:"{0} osztály",defaultFeatureNames:"{0} funkció",absoluteAverage:"Abszolút érték átlaga",predictedClass:"Előre jelzett osztály",dataExploration:"Adatvizsgálat",globalImportance:"Globális fontosság",explanationExploration:"Magyarázatvizsgálat",summaryImportance:"Összegzés fontossága",featureImportance:"Jellemzőfontosság",perturbationExploration:"Perturbációvizsgálat",localFeatureImportance:"Helyi jellemzőfontosság",ice:"ICE",clearSelection:"Kijelölés törlése",feature:"Funkciófrissítés:",intercept:"Metszéspont",ExplanationScatter:{dataLabel:"Adatok: {0}",importanceLabel:"Fontosság: {0}",predictedY:"Előre jelzett Y",index:"Index",dataGroupLabel:"Adatok",output:"Kimenet",probabilityLabel:"Valószínűség: {0}",trueY:"Igaz Y",class:"osztály: ",xValue:"X érték",yValue:"Y érték",colorValue:"Szín:"},CrossClass:{label:"Többosztályos súlyozás:",info:"Az osztályok közötti számítással kapcsolatos információk",overviewInfo:"A többosztályos modellek minden osztály esetében létrehoznak egy független jellemzőfontossági vektort. Az egyes osztályok jellemzőfontossági vektora azt mutatja, hogy mely jellemzők növelték vagy csökkentették egy adott osztály valószínűségét. Megadhatja, hogy az osztályonkénti jellemzőfontossági vektorok súlyai miként legyenek összegezve egyetlen értékbe:",absoluteValInfo:"Az abszolút érték átlaga: a funkció fontosságának összege az összes lehetséges osztályra vonatkoztatva, osztva az osztályok számával",predictedClassInfo:"Előre jelzett osztály: a jellemzőfontossági érték megjelenítése egy adott pont előre jelzett osztálya esetében",enumeratedClassInfo:"Enumerált osztálynevek: csak a megadott osztály jellemzőfontossági értékeinek megjelenítése az összes adatpontra vonatkozóan.",close:"Bezárás"},AggregateImportance:{scaledFeatureValue:"Skálázott funkció értéke",low:"Kicsi",high:"Magas",featureLabel:"Funkció: {0}",valueLabel:"Funkció értéke: {0}",importanceLabel:"Fontosság: {0}",predictedClassTooltip:"Előre jelzett osztály: {0}",trueClassTooltip:"Igaz osztály: {0}",predictedOutputTooltip:"Előre jelzett kimenet: {0}",trueOutputTooltip:"Igaz kimenet: {0}",topKFeatures:"Első K funkció:",topKInfo:"A top k kiszámítása",predictedValue:"Előre jelzett érték",predictedClass:"Előre jelzett osztály",trueValue:"Igaz érték",trueClass:"Igaz osztály",noColor:"Nincs",tooManyRows:"A megadott adathalmaz nagyobb a diagram által támogatott méretnél"},BarChart:{classLabel:"Osztály: {0}",sortBy:"Rendezési szempont",noData:"Nincs adat",absoluteGlobal:"Abszolút globális",absoluteLocal:"Abszolút helyi",calculatingExplanation:"Magyarázat kiszámítása"},IcePlot:{numericError:"Numerikus karakternek kell lennie",integerError:"Egész számnak kell lennie",prediction:"Előrejelzés",predictedProbability:"Előre jelzett valószínűség",predictionLabel:"Előrejelzés: {0}",probabilityLabel:"Valószínűség: {0}",noModelError:"Adjon meg egy üzembe helyezett modellt az ICE-diagramokban lévő előrejelzések vizsgálatához.",featurePickerLabel:"Funkciófrissítés:",minimumInputLabel:"Minimum:",maximumInputLabel:"Maximum:",stepInputLabel:"Lépések:",loadingMessage:"Adatok betöltése...",submitPrompt:"Adja meg az ICE-diagramon megtekinteni kívánt tartományt",topLevelErrorMessage:"Hiba a paraméterben",errorPrefix:"Hiba történt: {0}"},PerturbationExploration:{loadingMessage:"Betöltés...",perturbationLabel:"Perturbáció:"},PredictionLabel:{predictedValueLabel:"Előre jelzett érték: {0}",predictedClassLabel:"Előre jelzett osztály: {0}"},Violin:{groupNone:"Nincs csoportosítás",groupPredicted:"Előre jelzett Y",groupTrue:"Igaz Y",groupBy:"Csoportosítási szempont"},FeatureImportanceWrapper:{chartType:"Diagram típusa:",violinText:"Hegedű",barText:"Sáv",boxText:"Doboz",beehiveText:"Swarm",globalImportanceExplanation:"A globális jellemzőfontosság az összes pont (L1 normalizálás) abszolút jellemzőfontossági értékének átlagolásával számítható ki. ",multiclassImportanceAddendum:"A funkciófontosság összes osztályra vonatkozóan történő kiszámítása minden pontot magában foglal, tehát nem használ különbségi súlyozást. Így egy olyan funkció, amelynek nagy negatív fontossága van számos nem „A osztályúként” előrejelzett pont esetében, nagy mértékben növelni fogja a funkció „A osztályú” fontosságát."}}},function(e){e.exports={selectPoint:"Selezionare un punto per visualizzarne la spiegazione locale",defaultClassNames:"Classe {0}",defaultFeatureNames:"Funzionalità {0}",absoluteAverage:"Media del valore assoluto",predictedClass:"Classe stimata",dataExploration:"Esplorazione dati",globalImportance:"Importanza globale",explanationExploration:"Esplorazione spiegazioni",summaryImportance:"Riepilogo importanza",featureImportance:"Importanza della caratteristica",perturbationExploration:"Esplorazione perturbazioni",localFeatureImportance:"Importanza della caratteristica locale",ice:"ICE",clearSelection:"Cancella selezione",feature:"Aggiornamento delle funzionalità:",intercept:"Intercetta",ExplanationScatter:{dataLabel:"Dati: {0}",importanceLabel:"Importanza: {0}",predictedY:"PredictedY",index:"Indice",dataGroupLabel:"Dati",output:"Output",probabilityLabel:"Probabilità: {0}",trueY:"True Y",class:"classe: ",xValue:"Valore X:",yValue:"Valore Y:",colorValue:"Colore:"},CrossClass:{label:"Ponderazione tra classi:",info:"Informazioni sul calcolo tra classi",overviewInfo:"I modelli multiclasse generano un vettore di importanza della caratteristica indipendente per ogni classe. Il vettore di importanza della caratteristica di ogni classe mostra le caratteristiche che hanno reso una classe più probabile o meno probabile. È possibile selezionare il modo in cui i pesi dei vettori di importanza della caratteristica per classe vengono riepilogati in un singolo valore:",absoluteValInfo:"Media del valore assoluto: mostra la somma dell'importanza della funzionalità in tutte le classi possibili, divisa per numero di classi",predictedClassInfo:"Classe stimata: mostra il valore di importanza della caratteristica per la classe stimata di un determinato punto",enumeratedClassInfo:"Nomi di classi enumerate: mostra solo i valori di importanza della caratteristica della classe specificata in tutti i punti dati.",close:"Chiudi"},AggregateImportance:{scaledFeatureValue:"Valore della funzionalità in scala",low:"Minimo",high:"Massimo",featureLabel:"Funzionalità: {0}",valueLabel:"Valore della funzionalità: {0}",importanceLabel:"Importanza: {0}",predictedClassTooltip:"Classe stimata: {0}",trueClassTooltip:"Classe true: {0}",predictedOutputTooltip:"Output stimato: {0}",trueOutputTooltip:"Output true: {0}",topKFeatures:"Prime K funzionalità:",topKInfo:"Come viene calcolato top k",predictedValue:"Valore stimato",predictedClass:"Classe stimata",trueValue:"Valore True",trueClass:"Classe true",noColor:"Nessuno",tooManyRows:"Il set di dati fornito è più grande di quello che questo grafico può supportare"},BarChart:{classLabel:"Classe: {0}",sortBy:"Ordina per",noData:"Dati non disponibili",absoluteGlobal:"Assoluto globale",absoluteLocal:"Assoluto locale",calculatingExplanation:"Calcolo della spiegazione"},IcePlot:{numericError:"Deve essere un carattere numerico",integerError:"Deve essere un numero intero",prediction:"Stima",predictedProbability:"Probabilità stimata",predictionLabel:"Stima: {0}",probabilityLabel:"Probabilità: {0}",noModelError:"Fornire un modello operativo per esplorare le stime nei tracciati ICE.",featurePickerLabel:"Aggiornamento delle funzionalità:",minimumInputLabel:"Minimo:",maximumInputLabel:"Massimo:",stepInputLabel:"Passi:",loadingMessage:"Caricamento dei dati...",submitPrompt:"Inviare un intervallo per visualizzare un tracciato ICE",topLevelErrorMessage:"Errore nel parametro",errorPrefix:"Errore riscontrato: {0}"},PerturbationExploration:{loadingMessage:"Caricamento...",perturbationLabel:"Perturbazione:"},PredictionLabel:{predictedValueLabel:"Valore stimato: {0}",predictedClassLabel:"Classe stimata: {0}"},Violin:{groupNone:"Nessun raggruppamento",groupPredicted:"Y stimato",groupTrue:"True Y",groupBy:"Raggruppa per"},FeatureImportanceWrapper:{chartType:"Tipo di grafico:",violinText:"Violino",barText:"Barre",boxText:"Casella",beehiveText:"Swarm",globalImportanceExplanation:"L'importanza della caratteristica globale viene calcolata facendo la media del valore assoluto dell'importanza della caratteristica di tutti i punti (normalizzazione L1). ",multiclassImportanceAddendum:"Tutti i punti sono inclusi nel calcolo dell'importanza di una funzionalità per tutte le classi, non viene usata alcuna ponderazione differenziale. Quindi, una funzionalità con grande importanza negativa per molti punti che si prevede non siano di 'Classe A' aumenterà notevolmente l'importanza 'Classe A' di tale funzionalità."}}},function(e){e.exports={selectPoint:"ローカルの説明を表示する点を選択します",defaultClassNames:"クラス {0}",defaultFeatureNames:"機能 {0}",absoluteAverage:"絶対値の平均",predictedClass:"予測クラス",dataExploration:"データの探索",globalImportance:"グローバルの重要度",explanationExploration:"説明の探索",summaryImportance:"概要の重要度",featureImportance:"特徴量の重要度",perturbationExploration:"補正の探索",localFeatureImportance:"ローカル特徴量の重要度",ice:"ICE",clearSelection:"選択範囲のクリア",feature:"機能:",intercept:"切片",ExplanationScatter:{dataLabel:"データ: {0}",importanceLabel:"重要度: {0}",predictedY:"PredictedY",index:"インデックス",dataGroupLabel:"データ",output:"出力",probabilityLabel:"確率: {0}",trueY:"True Y",class:"クラス:",xValue:"X 値:",yValue:"Y 値:",colorValue:"色:"},CrossClass:{label:"クロスクラスの重み付け:",info:"クラス間の計算に関する情報",overviewInfo:"マルチクラス モデルにより、クラスごとに独立した特徴量の重要度ベクターが生成されます。各クラスの特徴量の重要度ベクターは、クラスの可能性を高めたか低くした機能を示しています。クラスごとの特徴量の重要度ベクターの重みを 1 つの値に集計する方法を選択できます。",absoluteValInfo:"絶対値の平均: 指定できるすべてのクラスにおける機能の重要性の合計をクラスの数で割ったものを表示します。",predictedClassInfo:"予測クラス: 指定した点の予測クラスについて特徴量の重要度の値を表示します",enumeratedClassInfo:"列挙クラス名: 指定されたクラスの特徴量の重要度の値のみをすべてのデータ ポイントに表示します。",close:"閉じる"},AggregateImportance:{scaledFeatureValue:"スケーリングされた機能の値",low:"安値",high:"高値",featureLabel:"機能: {0}",valueLabel:"機能の値: {0}",importanceLabel:"重要度: {0}",predictedClassTooltip:"予測クラス: {0}",trueClassTooltip:"真のクラス: {0}",predictedOutputTooltip:"予測出力: {0}",trueOutputTooltip:"真の出力: {0}",topKFeatures:"上位の K 個の機能:",topKInfo:"上位 k 個を計算する方法",predictedValue:"予測された値",predictedClass:"予測クラス",trueValue:"真の値",trueClass:"真のクラス",noColor:"なし",tooManyRows:"指定されたデータセットは、このグラフでサポートできるサイズを超えています"},BarChart:{classLabel:"クラス: {0}",sortBy:"並べ替え",noData:"データなし",absoluteGlobal:"絶対グローバル",absoluteLocal:"絶対ローカル",calculatingExplanation:"説明を計算しています"},IcePlot:{numericError:"数値を指定する必要があります",integerError:"整数にする必要があります",prediction:"予測",predictedProbability:"予測確率",predictionLabel:"予測: {0}",probabilityLabel:"確率: {0}",noModelError:"ICE プロットで予測を調べるには、操作可能なモデルを指定してください。",featurePickerLabel:"機能:",minimumInputLabel:"最小:",maximumInputLabel:"最大:",stepInputLabel:"ステップ:",loadingMessage:"データを読み込んでいます...",submitPrompt:"ICE プロットを表示するには範囲を送信します",topLevelErrorMessage:"パラメーターでエラーが発生しました",errorPrefix:"エラーが発生しました: {0}"},PerturbationExploration:{loadingMessage:"読み込んでいます...",perturbationLabel:"摂動:"},PredictionLabel:{predictedValueLabel:"予測値: {0}",predictedClassLabel:"予測クラス: {0}"},Violin:{groupNone:"グループ化なし",groupPredicted:"予測 Y",groupTrue:"True Y",groupBy:"グループ化"},FeatureImportanceWrapper:{chartType:"グラフの種類:",violinText:"バイオリン",barText:"横棒",boxText:"ボックス",beehiveText:"Swarm",globalImportanceExplanation:"すべての点の特徴量の重要度の絶対値を平均化 (L1 正規化) して、グローバル特徴量の重要度を計算します。",multiclassImportanceAddendum:"すべてのクラスについて機能の重要度を計算するときにすべての点が含まれます。差分の重み付けは使用されません。したがって、'クラス A' ではないと予測される多くの点に対して大きな負の重要度をもつ機能は、その機能の 'クラス A' の重要度を大幅に増加させます。"}}},function(e){e.exports={selectPoint:"로컬 설명을 보려면 요소를 선택하세요.",defaultClassNames:"클래스 {0}",defaultFeatureNames:"기능 {0}",absoluteAverage:"절대값의 평균",predictedClass:"예측 클래스",dataExploration:"데이터 탐색",globalImportance:"글로벌 중요도",explanationExploration:"설명 탐색",summaryImportance:"요약 중요도",featureImportance:"기능 중요도",perturbationExploration:"작은 변경 탐색",localFeatureImportance:"로컬 기능 중요도",ice:"ICE",clearSelection:"선택 영역 지우기",feature:"기능:",intercept:"가로채기",ExplanationScatter:{dataLabel:"데이터: {0}",importanceLabel:"중요도: {0}",predictedY:"PredictedY",index:"인덱스",dataGroupLabel:"데이터",output:"출력",probabilityLabel:"가능성: {0}",trueY:"True Y",class:"클래스: ",xValue:"X 값:",yValue:"Y 값:",colorValue:"색:"},CrossClass:{label:"클래스 간 가중치:",info:"클래스 간 계산에 대한 정보",overviewInfo:"다중 클래스 모델은 각 클래스의 독립 기능 중요도 벡터를 생성합니다. 각 클래스의 기능 중요도 벡터는 클래스의 가능성을 높인 기능 또는 그 반대에 해당하는 기능을 보여 줍니다. 클래스별 기능 중요도 벡터의 가중치가 단일 값으로 요약되는 방법을 선택할 수 있습니다.",absoluteValInfo:"절대값의 평균: 가능한 모든 클래스에서 기능의 중요도 합계를 클래스 수로 나눈 값을 표시합니다.",predictedClassInfo:"예측 클래스: 지정된 요소의 예측 클래스에 해당하는 기능 중요도 값을 보여 줍니다.",enumeratedClassInfo:"열거된 클래스 이름: 모든 데이터 요소에서 지정된 클래스의 기능 중요도 값만 표시합니다.",close:"닫기"},AggregateImportance:{scaledFeatureValue:"확장된 기능 값",low:"저가",high:"고가",featureLabel:"기능: {0}",valueLabel:"기능 값: {0}",importanceLabel:"중요도: {0}",predictedClassTooltip:"예측 클래스: {0}",trueClassTooltip:"True 클래스: {0}",predictedOutputTooltip:"예측 출력: {0}",trueOutputTooltip:"True 출력: {0}",topKFeatures:"상위 K개 기능:",topKInfo:"상위 k개를 계산하는 방법",predictedValue:"예측 값",predictedClass:"예측 클래스",trueValue:"True 값",trueClass:"True 클래스",noColor:"없음",tooManyRows:"제공된 데이터 세트가 이 차트에서 지원되는 크기보다 큽니다."},BarChart:{classLabel:"클래스: {0}",sortBy:"정렬 기준",noData:"데이터 없음",absoluteGlobal:"절대 글로벌",absoluteLocal:"절대 로컬",calculatingExplanation:"설명을 계산하는 중"},IcePlot:{numericError:"숫자여야 합니다.",integerError:"정수여야 합니다.",prediction:"예측",predictedProbability:"예측 가능성",predictionLabel:"예측: {0}",probabilityLabel:"가능성: {0}",noModelError:"ICE 플롯에서 예측을 탐색하려면 조작 가능한 모델을 제공하세요.",featurePickerLabel:"기능:",minimumInputLabel:"최소:",maximumInputLabel:"최대:",stepInputLabel:"단계:",loadingMessage:"데이터 로드 중...",submitPrompt:"ICE 플롯을 보려면 범위를 제출하세요.",topLevelErrorMessage:"매개 변수 오류",errorPrefix:"오류 발생: {0}"},PerturbationExploration:{loadingMessage:"로드 중...",perturbationLabel:"작은 변경:"},PredictionLabel:{predictedValueLabel:"예상 값: {0}",predictedClassLabel:"예측 클래스: {0}"},Violin:{groupNone:"그룹화 안 함",groupPredicted:"예상 Y",groupTrue:"True Y",groupBy:"그룹화 방법"},FeatureImportanceWrapper:{chartType:"차트 종류:",violinText:"바이올린",barText:"가로 막대형",boxText:"상자",beehiveText:"Swarm",globalImportanceExplanation:"글로벌 기능 중요도는 모든 요소의 기능 중요도 절대값을 평균하여 계산됩니다(L1 정규화). ",multiclassImportanceAddendum:"모든 요소는 모든 클래스의 기능 중요도를 계산하는 데 포함되며 차등 가중치가 사용되지 않습니다. 따라서 '클래스 A'가 아닌 것으로 예측된 많은 요소의 큰 음수 중요도가 있는 기능은 해당 기능의 '클래스 A' 중요도를 크게 높입니다."}}},function(e){e.exports={selectPoint:"Selecteer een punt om de lokale uitleg ervan weer te geven",defaultClassNames:"Klasse {0}",defaultFeatureNames:"Functie {0}",absoluteAverage:"Gemiddelde van absolute waarde",predictedClass:"Voorspelde klasse",dataExploration:"Gegevensverkenning",globalImportance:"Algemene urgentie",explanationExploration:"Uitlegverkenning",summaryImportance:"Urgentiesamenvatting",featureImportance:"Functie-urgentie",perturbationExploration:"Storingsverkenning",localFeatureImportance:"Lokale functie-urgentie",ice:"ICE",clearSelection:"Selectie wissen",feature:"Functie:",intercept:"Snijpunt",ExplanationScatter:{dataLabel:"Gegevens: {0}",importanceLabel:"Urgentie: {0}",predictedY:"PredictedY",index:"Index",dataGroupLabel:"Gegevens",output:"Uitvoer",probabilityLabel:"Waarschijnlijkheid: {0}",trueY:"Ware Y",class:"klasse: ",xValue:"X-waarde:",yValue:"Y-waarde:",colorValue:"Kleur:"},CrossClass:{label:"Weging voor alle klassen:",info:"Informatie over de berekening van meerdere klassen",overviewInfo:"Modellen met meerdere klassen genereren een onafhankelijke functie-urgentievector voor elke klasse. De functie-urgentievector van elke klasse geeft aan welke functies een klasse waarschijnlijk of minder waarschijnlijk hebben gemaakt. U kunt selecteren hoe de wegingen van de functie-urgentievector per klasse wordt samengevat in één waarde:",absoluteValInfo:"Gemiddelde van absolute waarde: hiermee wordt de som van de urgentie van de functie weergegeven voor alle mogelijke klassen, gedeeld door het aantal klassen",predictedClassInfo:"Voorspelde klasse: hiermee wordt de functie-urgentiewaarde weergegeven voor de voorspelde klasse van een bepaald punt",enumeratedClassInfo:"Geïnventariseerde klassenamen: hiermee worden alleen de functie-urgentiewaarden van de opgegeven klasse weergegeven voor alle gegevenspunten.",close:"Sluiten"},AggregateImportance:{scaledFeatureValue:"Geschaalde functiewaarde",low:"Laag",high:"Hoog",featureLabel:"Functie: {0}",valueLabel:"Functiewaarde: {0}",importanceLabel:"Urgentie: {0}",predictedClassTooltip:"Voorspelde klasse: {0}",trueClassTooltip:"Ware klasse: {0}",predictedOutputTooltip:"Voorspelde uitvoer: {0}",trueOutputTooltip:"Ware uitvoer: {0}",topKFeatures:"Belangrijkste K-functies:",topKInfo:"Hoe wordt TOP k berekend",predictedValue:"Voorspelde waarde",predictedClass:"Voorspelde klasse",trueValue:"Ware waarde",trueClass:"Ware klasse",noColor:"Geen",tooManyRows:"De opgegeven gegevensset is groter dan door deze grafiek wordt ondersteund"},BarChart:{classLabel:"Klasse: {0}",sortBy:"Sorteren op",noData:"Geen gegevens",absoluteGlobal:"Absoluut algemeen",absoluteLocal:"Absoluut lokaal",calculatingExplanation:"Berekeningsuitleg"},IcePlot:{numericError:"Moet numeriek zijn",integerError:"Moet een geheel getal zijn",prediction:"Voorspelling",predictedProbability:"Voorspelde waarschijnlijkheid",predictionLabel:"Voorspelling: {0}",probabilityLabel:"Waarschijnlijkheid: {0}",noModelError:"Geef een operationeel model op om voorspellingen te verkennen in ICE-tekeningen.",featurePickerLabel:"Functie:",minimumInputLabel:"Minimum:",maximumInputLabel:"Maximum:",stepInputLabel:"Stappen:",loadingMessage:"Gegevens laden...",submitPrompt:"Een bereik verzenden om een ICE-tekening weer te geven",topLevelErrorMessage:"Fout in parameter",errorPrefix:"Fout aangetroffen: {0}"},PerturbationExploration:{loadingMessage:"Laden...",perturbationLabel:"Storing:"},PredictionLabel:{predictedValueLabel:"Voorspelde waarde: {0}",predictedClassLabel:"Voorspelde klasse: {0}"},Violin:{groupNone:"Geen groepering",groupPredicted:"Voorspelde Y",groupTrue:"Ware Y",groupBy:"Groeperen op"},FeatureImportanceWrapper:{chartType:"Grafiektype:",violinText:"Violin",barText:"Staaf",boxText:"Vak",beehiveText:"Swarm",globalImportanceExplanation:"De algemene functie-urgentie wordt berekend door het gemiddelde te berekenen van de absolute waarde van de functie-urgentie van alle punten (L1-normalisatie). ",multiclassImportanceAddendum:"Alle punten worden opgenomen in de berekening van de urgentie van een functie voor alle klassen. Er wordt geen differentiële weging gebruikt. Een functie met een grote negatieve urgentie voor veel punten die volgens de voorspelling niet van klasse A zijn, verhoogt het belang van de klasse A-urgentie van die functie aanzienlijk."}}},function(e){e.exports={selectPoint:"Wybierz punkt, aby zobaczyć jego lokalne wyjaśnienie",defaultClassNames:"Klasa {0}",defaultFeatureNames:"Cecha {0}",absoluteAverage:"Średnia wartości bezwzględnej",predictedClass:"Przewidywana klasa",dataExploration:"Eksploracja danych",globalImportance:"Ważność globalna",explanationExploration:"Eksploracja wyjaśnienia",summaryImportance:"Ważność podsumowania",featureImportance:"Istotność funkcji",perturbationExploration:"Eksploracja perturbacji",localFeatureImportance:"Lokalna istotność funkcji",ice:"ICE",clearSelection:"Wyczyść zaznaczenie",feature:"Funkcja:",intercept:"Przecięcie",ExplanationScatter:{dataLabel:"Dane: {0}",importanceLabel:"Ważność: {0}",predictedY:"PredictedY",index:"Indeks",dataGroupLabel:"Dane",output:"Wyjściowe",probabilityLabel:"Prawdopodobieństwo: {0}",trueY:"Prawda Y",class:"klasa:",xValue:"Wartość X:",yValue:"Wartość Y:",colorValue:"Kolor:"},CrossClass:{label:"Waga wieloklasowa:",info:"Informacje o obliczeniach obejmujących wiele klas",overviewInfo:"Modele wieloklasowe generują dla każdej klasy niezależny wektor istotności funkcji. Wektor istotności funkcji każdej klasy wskazuje, które funkcje powodują, że klasa jest mniej lub bardziej prawdopodobna. Możesz wybrać, w jaki sposób wagi wektorów istotności funkcji każdej klasy są podsumowywane do pojedynczej wartości:",absoluteValInfo:"Średnia wartości bezwzględnej: pokazuje sumę ważności cechy dla wszystkich możliwych klas podzieloną przez liczbę klas",predictedClassInfo:"Przewidywana klasa: pokazuje wartość istotności funkcji dla przewidywanej klasy danego punktu",enumeratedClassInfo:"Wyliczane nazwy klas: pokazuje tylko określone wartości istotności funkcji klasy dla wszystkich punktów danych.",close:"Zamknij"},AggregateImportance:{scaledFeatureValue:"Skalowana wartości cechy",low:"Niskie",high:"Wysoki",featureLabel:"Cecha: {0}",valueLabel:"Wartość cechy: {0}",importanceLabel:"Ważność: {0}",predictedClassTooltip:"Przewidywana klasa: {0}",trueClassTooltip:"Prawdziwa klasa: {0}",predictedOutputTooltip:"Przewidywane dane wyjściowe: {0}",trueOutputTooltip:"Prawdziwe dane wyjściowe: {0}",topKFeatures:"Cechy Top K:",topKInfo:"Jak jest obliczana wartość „top k”",predictedValue:"Wartość prognozowana",predictedClass:"Przewidywana klasa",trueValue:"Wartość Prawda",trueClass:"Prawdziwa klasa",noColor:"Brak",tooManyRows:"Podany zestaw danych jest większy niż ten wykres może obsłużyć"},BarChart:{classLabel:"Klasa: {0}",sortBy:"Sortuj według",noData:"Brak danych",absoluteGlobal:"Bezwzględne globalnie",absoluteLocal:"Bezwzględne lokalnie",calculatingExplanation:"Obliczanie wyjaśnienia"},IcePlot:{numericError:"Musi być liczbą",integerError:"Musi być liczbą całkowitą",prediction:"Przewidywanie",predictedProbability:"Przewidywane prawdopodobieństwo",predictionLabel:"Przewidywanie: {0}",probabilityLabel:"Prawdopodobieństwo: {0}",noModelError:"Podaj funkcjonujący model, aby eksplorować przewidywania na wykresach ICE.",featurePickerLabel:"Funkcja:",minimumInputLabel:"Minimum:",maximumInputLabel:"Maksimum:",stepInputLabel:"Kroki:",loadingMessage:"Trwa ładowanie danych...",submitPrompt:"Prześlij zakres, aby wyświetlić wykres ICE",topLevelErrorMessage:"Błąd w parametrze",errorPrefix:"Wystąpił błąd: {0}"},PerturbationExploration:{loadingMessage:"Trwa ładowanie...",perturbationLabel:"Perturbacja:"},PredictionLabel:{predictedValueLabel:"Przewidywana wartość: {0}",predictedClassLabel:"Przewidywana klasa: {0}"},Violin:{groupNone:"Brak grupowania",groupPredicted:"Przewidywane Y",groupTrue:"Prawda Y",groupBy:"Grupuj według"},FeatureImportanceWrapper:{chartType:"Typ wykresu:",violinText:"Violin",barText:"Słupkowy",boxText:"Pole",beehiveText:"Swarm",globalImportanceExplanation:"Globalna istotność funkcji jest obliczana przez wyliczenie średniej wartości bezwzględnej istotności funkcji we wszystkich punktach (normalizacja L1). ",multiclassImportanceAddendum:"Wszystkie punkty są uwzględniane przy obliczaniu ważności cechy dla wszystkich klas, nie są używane żadne wagi różnicujące. W ten sposób cecha, która ma duże negatywne znaczenie dla wielu punktów przewidywanych jako nienależące do klasy „Klasa A”, znacznie zwiększy znaczenie tej cechy w obrębie klasy „Klasa A”."}}},function(e){e.exports={selectPoint:"Selecione um ponto para ver sua explicação local",defaultClassNames:"Classe {0}",defaultFeatureNames:"Recurso {0}",absoluteAverage:"Média do valor absoluto",predictedClass:"Classe prevista",dataExploration:"Exploração de Dados",globalImportance:"Importância Global",explanationExploration:"Exploração de Explicação",summaryImportance:"Importância do Resumo",featureImportance:"Importância do Recurso",perturbationExploration:"Exploração de Perturbação",localFeatureImportance:"Importância do Recurso Local",ice:"ICE",clearSelection:"Limpar seleção",feature:"Recurso:",intercept:"Interceptação",ExplanationScatter:{dataLabel:"Dados: {0}",importanceLabel:"Importância: {0}",predictedY:"YPrevisto",index:"Índice",dataGroupLabel:"Dados",output:"Saída",probabilityLabel:"Probabilidade: {0}",trueY:"Y verdadeiro",class:"classe: ",xValue:"Valor X:",yValue:"Valor Y:",colorValue:"Cor:"},CrossClass:{label:"Ponderação entre classes:",info:"Informações sobre o cálculo entre classes",overviewInfo:"Os modelos de multiclasse geram um vetor de importância do recurso independente para cada classe. O vetor de importância do recurso de cada classe demonstra quais recursos fizeram uma classe mais ou menos provável. Você pode selecionar como os pesos dos vetores de importância do recurso por classe são resumidos em um único valor:",absoluteValInfo:"Média do valor absoluto: mostra a soma da importância do recurso em todas as classes possíveis, dividida pelo número de classes",predictedClassInfo:"Classe prevista: mostra o valor de importância do recurso para a classe prevista de um determinado ponto",enumeratedClassInfo:"Nomes de classe enumerados: mostra somente os valores de importância do recurso da classe especificada em todos os pontos de dados.",close:"Fechar"},AggregateImportance:{scaledFeatureValue:"Valor de Recurso Dimensionado",low:"Baixa",high:"Alta",featureLabel:"Recurso: {0}",valueLabel:"Valor do recurso: {0}",importanceLabel:"Importância: {0}",predictedClassTooltip:"Classe Prevista: {0}",trueClassTooltip:"Classe Verdadeira: {0}",predictedOutputTooltip:"Saída Prevista: {0}",trueOutputTooltip:"Saída Verdadeira: {0}",topKFeatures:"K Principais Recursos:",topKInfo:"Como o k principal é calculado",predictedValue:"Valor Previsto",predictedClass:"Classe Prevista",trueValue:"Valor Verdadeiro",trueClass:"Classe Verdadeira",noColor:"Nenhuma",tooManyRows:"O conjunto de dados fornecido é maior do que este gráfico pode dar suporte"},BarChart:{classLabel:"Classe: {0}",sortBy:"Classificar por",noData:"Nenhum Dado",absoluteGlobal:"Global absoluto",absoluteLocal:"Local absoluto",calculatingExplanation:"Calculando a explicação"},IcePlot:{numericError:"Deve ser numérico",integerError:"Precisa ser um número inteiro",prediction:"Previsão",predictedProbability:"Probabilidade prevista",predictionLabel:"Previsão: {0}",probabilityLabel:"Probabilidade: {0}",noModelError:"Forneça um modelo operacionalizado para explorar previsões em gráficos da ICE.",featurePickerLabel:"Recurso:",minimumInputLabel:"Mínimo:",maximumInputLabel:"Máximo:",stepInputLabel:"Etapas:",loadingMessage:"Carregando dados...",submitPrompt:"Enviar um intervalo para exibir um gráfico da ICE",topLevelErrorMessage:"Erro no parâmetro",errorPrefix:"Erro encontrado: {0}"},PerturbationExploration:{loadingMessage:"Carregando...",perturbationLabel:"Perturbação:"},PredictionLabel:{predictedValueLabel:"Valor previsto: {0}",predictedClassLabel:"Classe prevista: {0}"},Violin:{groupNone:"Nenhum agrupamento",groupPredicted:"Y Previsto",groupTrue:"Y verdadeiro",groupBy:"Agrupar por"},FeatureImportanceWrapper:{chartType:"Tipo de gráfico:",violinText:"Violino",barText:"Barra",boxText:"Quadrado",beehiveText:"Por nuvem",globalImportanceExplanation:"A importância do recurso global é calculada pela média do valor absoluto da importância do recurso de todos os pontos (normalização de L1). ",multiclassImportanceAddendum:"Todos os pontos são incluídos no cálculo da importância de um recurso para todas as classes, nenhum peso diferencial é usado. Portanto, um recurso que tenha grande importância negativa para muitos pontos que estimaram que não seja da 'Classe A' aumentará muito a importância de 'Classe A' do recurso."}}},function(e){e.exports={selectPoint:"Selecione um ponto para ver a explicação local",defaultClassNames:"Classe {0}",defaultFeatureNames:"Funcionalidade {0}",absoluteAverage:"Média do valor absoluto",predictedClass:"Classe prevista",dataExploration:"Exploração de Dados",globalImportance:"Importância Global",explanationExploration:"Exploração de Explicação",summaryImportance:"Importância do Resumo",featureImportance:"Importância da Funcionalidade",perturbationExploration:"Exploração de Perturbação",localFeatureImportance:"Importância da Funcionalidade Local",ice:"ICE",clearSelection:"Limpar seleção",feature:"Funcionalidade:",intercept:"Intercetar",ExplanationScatter:{dataLabel:"Dados: {0}",importanceLabel:"Importância: {0}",predictedY:"PredictedY",index:"Índice",dataGroupLabel:"Dados",output:"Saída",probabilityLabel:"Probabilidade: {0}",trueY:"Y Verdadeiro",class:"classe: ",xValue:"Valor X:",yValue:"Valor Y:",colorValue:"Cor:"},CrossClass:{label:"Ponderação entre classes:",info:"Informações sobre o cálculo entre classes",overviewInfo:"Os modelos de multiclasse geram um vetor de importância de funcionalidade independente para cada classe. O vetor de importância de funcionalidade de cada classe demonstra que funcionalidades tornaram uma classe mais provável ou menos provável. Pode selecionar a forma como os pesos dos vetores de importância da funcionalidade por classe são resumidos num valor único:",absoluteValInfo:"Média do valor absoluto: mostra a soma da importância do recurso em todas as classes possíveis, dividida pelo número de classes",predictedClassInfo:"Classe prevista: mostra o valor de importância da funcionalidade para a classe prevista de um determinado ponto",enumeratedClassInfo:"Nomes de classe enumerados: mostra apenas os valores de importância da funcionalidade da classe especificada em todos os pontos de dados.",close:"Fechar"},AggregateImportance:{scaledFeatureValue:"Valor de Funcionalidade Dimensionado",low:"Baixa",high:"Elevado",featureLabel:"Funcionalidade: {0}",valueLabel:"Valor da funcionalidade: {0}",importanceLabel:"Importância: {0}",predictedClassTooltip:"Classe Prevista: {0}",trueClassTooltip:"Classe Verdadeira: {0}",predictedOutputTooltip:"Saída Prevista: {0}",trueOutputTooltip:"Saída Verdadeira: {0}",topKFeatures:"Principais Funcionalidades de K:",topKInfo:"Como é calculado o top k",predictedValue:"Valor Previsto",predictedClass:"Classe Prevista",trueValue:"Valor Verdadeiro",trueClass:"Classe Verdadeira",noColor:"Nenhum",tooManyRows:"O conjunto de dados fornecido é maior do que este gráfico pode suportar"},BarChart:{classLabel:"Classe: {0}",sortBy:"Ordenar por",noData:"Sem Dados",absoluteGlobal:"Global absoluto",absoluteLocal:"Local absoluto",calculatingExplanation:"A calcular explicação"},IcePlot:{numericError:"Tem de ser numérico",integerError:"Tem de ser um número inteiro",prediction:"Previsão",predictedProbability:"Probabilidade prevista",predictionLabel:"Predição: {0}",probabilityLabel:"Probabilidade: {0}",noModelError:"Forneça um modelo operacionalizado para explorar previsões em gráficos ICE.",featurePickerLabel:"Funcionalidade:",minimumInputLabel:"Mínimo:",maximumInputLabel:"Máximo:",stepInputLabel:"Passos:",loadingMessage:"A carregar dados...",submitPrompt:"Submeter um intervalo para ver um gráfico ICE",topLevelErrorMessage:"Erro no parâmetro",errorPrefix:"Erro encontrado: {0}"},PerturbationExploration:{loadingMessage:"A carregar...",perturbationLabel:"Perturbação:"},PredictionLabel:{predictedValueLabel:"Valor previsto: {0}",predictedClassLabel:"Classe prevista: {0}"},Violin:{groupNone:"Sem agrupamento",groupPredicted:"Y Previsto",groupTrue:"Y Verdadeiro",groupBy:"Agrupar por"},FeatureImportanceWrapper:{chartType:"Tipo de gráfico:",violinText:"Violino",barText:"Barras",boxText:"Caixa",beehiveText:"Swarm",globalImportanceExplanation:"A importância global da funcionalidade é calculada através da média do valor absoluto da importância da funcionalidade de todos os pontos (normalização de L1). ",multiclassImportanceAddendum:'Todos os pontos estão incluídos no cálculo da importância de uma funcionalidade para todas as classes, não é utilizada nenhuma ponderação diferencial. Portanto, uma funcionalidade com importância negativa grande para muitos pontos prevista como não sendo de "Classe A" aumentará imensamente a importância "Classe A" da funcionalidade.'}}},function(e){e.exports={selectPoint:"Выберите точку, чтобы просмотреть объяснение ее локальной важности.",defaultClassNames:"Класс {0}",defaultFeatureNames:"Функция {0}",absoluteAverage:"Среднее абсолютного значения",predictedClass:"Прогнозируемый класс",dataExploration:"Исследование данных",globalImportance:"Глобальный уровень важности",explanationExploration:"Изучение объяснения",summaryImportance:"Суммарная важность",featureImportance:"Важность признака",perturbationExploration:"Исследование изменений",localFeatureImportance:"Локальная важность признака",ice:"ICE",clearSelection:"Очистить выделение",feature:"Компонент:",intercept:"Отсекаемый отрезок",ExplanationScatter:{dataLabel:"Данные: {0}",importanceLabel:"Важность: {0}",predictedY:"PredictedY",index:"Индекс",dataGroupLabel:"Данные",output:"Вывод",probabilityLabel:"Вероятность: {0}",trueY:"Истинное значение Y",class:"класс: ",xValue:"Значение X:",yValue:"Значение Y:",colorValue:"Цвет:"},CrossClass:{label:"Взвешивание между классами:",info:"Сведения о многоклассовых вычислениях",overviewInfo:"Многоклассовые модели создают независимый вектор важности признаков для каждого класса. Этот вектор показывает, какие из признаков делают класс более или менее вероятным. Вы можете выбрать, каким образом веса векторов важности признаков для каждого класса сводятся к одному значению:",absoluteValInfo:"Среднее абсолютного значения: отображает сумму значений важности функции во всех возможных классах, разделенную на число классов.",predictedClassInfo:"Прогнозируемый класс: отображает значение важности признака для прогнозируемого класса заданной точки.",enumeratedClassInfo:"Имена перечислимых классов: отображает только значения важности признаков указанного класса во всех точках данных.",close:"Закрыть"},AggregateImportance:{scaledFeatureValue:"Масштабированное значение функции",low:"Низкий",high:"Высокий",featureLabel:"Функция: {0}",valueLabel:"Значение функции: {0}",importanceLabel:"Важность: {0}",predictedClassTooltip:"Прогнозируемый класс: {0}",trueClassTooltip:"Истинный класс: {0}",predictedOutputTooltip:"Прогнозируемые выходные данные: {0}",trueOutputTooltip:"Истинные выходные данные: {0}",topKFeatures:"K самых важных функций:",topKInfo:"Как вычисляются первые k позиций",predictedValue:"Предсказанное значение",predictedClass:"Прогнозируемый класс",trueValue:"Истина",trueClass:"Истинный класс",noColor:"Нет",tooManyRows:"Размер указанного набора данных превышает значение, поддерживаемое этой диаграммой."},BarChart:{classLabel:"Класс: {0}",sortBy:"Сортировать по",noData:"Нет данных",absoluteGlobal:"Абсолютное значение глобальной важности",absoluteLocal:"Абсолютное значение локальной важности",calculatingExplanation:"Объяснение расчета"},IcePlot:{numericError:"Значение должно быть числовым.",integerError:"Требуется целое число.",prediction:"Прогноз",predictedProbability:"Прогнозируемая вероятность",predictionLabel:"Прогноз: {0}",probabilityLabel:"Вероятность: {0}",noModelError:"Укажите модель, генерирующую прогнозы на основе введенных данных, для исследования прогнозов на графиках ICE.",featurePickerLabel:"Компонент:",minimumInputLabel:"Минимум:",maximumInputLabel:"Максимум:",stepInputLabel:"Этапы:",loadingMessage:"Идет загрузка данных...",submitPrompt:"Отправьте диапазон для просмотра графика ICE",topLevelErrorMessage:"Ошибка в параметре",errorPrefix:"Возникла ошибка: {0}"},PerturbationExploration:{loadingMessage:"Загрузка...",perturbationLabel:"Изменение:"},PredictionLabel:{predictedValueLabel:"Прогнозируемое значение: {0}",predictedClassLabel:"Прогнозируемый класс: {0}"},Violin:{groupNone:"Без группирования",groupPredicted:"Прогнозируемое значение Y",groupTrue:"Истинное значение Y",groupBy:"Группировать по"},FeatureImportanceWrapper:{chartType:"Тип диаграммы:",violinText:"Скрипка",barText:"Линейчатая",boxText:"Рамка",beehiveText:"Swarm",globalImportanceExplanation:"Глобальная важность признака вычисляется путем усреднения абсолютного значения важности признака по всем точкам (нормализация L1). ",multiclassImportanceAddendum:"В вычисление важности функции для всех классов включены все точки, поэтому разностное взвешивание не используется. Таким образом, функция, имеющая большее отрицательное значение важности для многих точек и предсказанная как не являющаяся функцией класса А, значительно увеличит уровень важности функции класса А."}}},function(e){e.exports={selectPoint:"Välj en punkt om du vill se dess lokala förklaring",defaultClassNames:"Klass {0}",defaultFeatureNames:"Funktionen {0}",absoluteAverage:"Genomsnittligt absolutvärde",predictedClass:"Förutsagd klass",dataExploration:"Datautforskning",globalImportance:"Global betydelse",explanationExploration:"Förklaringsutforskning",summaryImportance:"Sammanfattningsbetydelse",featureImportance:"Funktionsrelevans",perturbationExploration:"Störningsutforskning",localFeatureImportance:"Lokal funktionsrelevans",ice:"ICE",clearSelection:"Rensa val",feature:"Funktion:",intercept:"Skärningspunkt",ExplanationScatter:{dataLabel:"Data: {0}",importanceLabel:"Relevans: {0}",predictedY:"PredictedY",index:"Index",dataGroupLabel:"Data",output:"Utdata",probabilityLabel:"Sannolikhet: {0}",trueY:"Sant Y",class:"klass: ",xValue:"X-värde:",yValue:"Y-värde:",colorValue:"Färg:"},CrossClass:{label:"Klassomfattande vägning:",info:"Information om korsklassberäkning",overviewInfo:"Multiklassmodeller skapar en oberoende funktionsrelevansvektor för varje klass. Varje klass funktionsrelevansvektor visar vilka funktioner som gör klassen mer eller mindre sannolik. Du kan välja hur vikterna i funktionsrelevansvektorerna per klass ska summeras till ett enda värde:",absoluteValInfo:"Genomsnittligt absolutvärde: Visar summan av funktionens betydelse i alla möjliga klasser, delat med antalet klasser",predictedClassInfo:"Förutsagd klass: Visar funktionsrelevansvärdet för en angiven punkts förutsagda klass",enumeratedClassInfo:"Uppräknade klassnamn: Visar endast funktionsrelevansen för alla datapunkter för den angivna klassens funktion.",close:"Stäng"},AggregateImportance:{scaledFeatureValue:"Skalat funktionsvärde",low:"Låg",high:"Hög",featureLabel:"Funktion: {0}",valueLabel:"Funktionsvärde: {0}",importanceLabel:"Relevans: {0}",predictedClassTooltip:"Förutsagd klass: {0}",trueClassTooltip:"Sann klass: {0}",predictedOutputTooltip:"Förutsagda utdata: {0}",trueOutputTooltip:"Sanna utdata: {0}",topKFeatures:"K-toppfunktioner:",topKInfo:"Hur beräknas högsta K",predictedValue:"Förutsagt värde",predictedClass:"Förutsagd klass",trueValue:"Sant värde",trueClass:"Sann klass",noColor:"Inget",tooManyRows:"Den tillhandhållna datamängden är större än vad det här diagrammet kan stödja"},BarChart:{classLabel:"Klass: {0}",sortBy:"Sortera efter",noData:"Inga data",absoluteGlobal:"Absolut global",absoluteLocal:"Absolut lokal",calculatingExplanation:"Beräkna förklaring"},IcePlot:{numericError:"Måste vara numeriskt",integerError:"Måste vara ett heltal",prediction:"Förutsägelse",predictedProbability:"Förutsagd sannolikhet",predictionLabel:"Förutsägelse: {0}",probabilityLabel:"Sannolikhet: {0}",noModelError:"Ange en driftsmodell för att utforska förutsägelser i ICE-kurvor.",featurePickerLabel:"Funktion:",minimumInputLabel:"Minimum:",maximumInputLabel:"Maximum:",stepInputLabel:"Steg:",loadingMessage:"Läser in data …",submitPrompt:"Skicka ett intervall så att du kan visa en ICE-rityta",topLevelErrorMessage:"Fel i parametern",errorPrefix:"Ett fel påträffades: {0}"},PerturbationExploration:{loadingMessage:"Läser in...",perturbationLabel:"Störning:"},PredictionLabel:{predictedValueLabel:"Förutsagt värde: {0}",predictedClassLabel:"Förutsagd klass: {0}"},Violin:{groupNone:"Ingen gruppering",groupPredicted:"Förutsagt Y",groupTrue:"Sant Y",groupBy:"Gruppera efter"},FeatureImportanceWrapper:{chartType:"Diagramtyp:",violinText:"Violin",barText:"Liggande",boxText:"Ruta",beehiveText:"Swarm",globalImportanceExplanation:"Den globala funktionsrelevansen beräknas genom att det absoluta värdet för funktionsrelevansen för alla punkter (L1-normalisering) beräknas. ",multiclassImportanceAddendum:"Alla punkter tas med vid beräkning av en funktions betydelse för alla klasser. Ingen differentiell vägning används. Så en funktion som har stor negativ betydelse för många punkter, och som förutsägs inte tillhöra klass A, ökar t.ex. relevansen för funktionens klass A."}}},function(e){e.exports={selectPoint:"Yerel açıklamasını görmek için bir nokta seçin",defaultClassNames:"{0} sınıfı",defaultFeatureNames:"Özellik {0}",absoluteAverage:"Mutlak değer ortalaması",predictedClass:"Tahmin edilen sınıf",dataExploration:"Veri Araştırması",globalImportance:"Genel Önem Derecesi",explanationExploration:"Açıklama Araştırması",summaryImportance:"Özet Önem Derecesi",featureImportance:"Özellik Önem Derecesi",perturbationExploration:"Sapma Araştırması",localFeatureImportance:"Yerel Özellik Önem Derecesi",ice:"ICE",clearSelection:"Seçimi temizle",feature:"Özellik:",intercept:"kesim noktası",ExplanationScatter:{dataLabel:"Veri: {0}",importanceLabel:"Önem derecesi: {0}",predictedY:"Tahmin edilen Y",index:"Dizin",dataGroupLabel:"Veri",output:"Çıktı",probabilityLabel:"Olasılık: {0}",trueY:"Doğru Y",class:"sınıf: ",xValue:"X değeri:",yValue:"Y değeri:",colorValue:"Renk:"},CrossClass:{label:"Sınıflar arası ağırlık:",info:"Sınıflar arası hesaplama hakkında bilgiler",overviewInfo:"Çok sınıflı modeller, her sınıf için bağımsız bir özellik önem derecesi vektörü oluşturur. Her sınıfın özellik önem derecesi vektörü, sınıfı hangi özelliklerin daha olası veya daha az olası yaptığını gösterir. Sınıf başına özellik önem derecesi vektörlerinin ağırlığının tek bir değerde nasıl özetleneceğini seçebilirsiniz:",absoluteValInfo:"Mutlak değer ortalaması: Özelliğin tüm olası sınıflardaki önem derecesi toplamının sınıf sayısına bölümünü gösterir",predictedClassInfo:"Tahmin edilen sınıf: Belirli bir noktanın tahmin edilen sınıfı için özellik önem derecesi değerini gösterir",enumeratedClassInfo:"Listelenen sınıf adları: Tüm veri noktalarında yalnızca belirtilen sınıfın özellik önem derecesi değerlerini gösterir.",close:"Kapat"},AggregateImportance:{scaledFeatureValue:"Ölçeklendirilmiş Özellik Değeri",low:"Düşük",high:"Yüksek",featureLabel:"Özellik: {0}",valueLabel:"Özellik değeri: {0}",importanceLabel:"Önem derecesi: {0}",predictedClassTooltip:"Tahmin Edilen Sınıf: {0}",trueClassTooltip:"Doğru Sınıf: {0}",predictedOutputTooltip:"Tahmin Edilen Çıkış: {0}",trueOutputTooltip:"Doğru Çıkış: {0}",topKFeatures:"En Yüksek K Özellikleri:",topKInfo:"Üst k nasıl hesaplanır?",predictedValue:"Tahmin Edilen Değer",predictedClass:"Tahmin Edilen Sınıf",trueValue:"Gerçek Değer",trueClass:"Doğru Sınıf",noColor:"Yok",tooManyRows:"Sağlanan veri kümesi, bu grafiğin destekleyebileceğinden daha büyük"},BarChart:{classLabel:"Sınıf: {0}",sortBy:"Sıralama Ölçütü",noData:"Veri Yok",absoluteGlobal:"Mutlak genel",absoluteLocal:"Mutlak yerel",calculatingExplanation:"Açıklama hesaplanıyor"},IcePlot:{numericError:"Sayısal bir değer olmalıdır",integerError:"Bir tamsayı olmalıdır",prediction:"Tahmin",predictedProbability:"Tahmin edilen olasılık",predictionLabel:"Tahmin: {0}",probabilityLabel:"Olasılık: {0}",noModelError:"ICE çizimlerindeki tahminleri keşfetmek için lütfen işlevselleştirilmiş bir model belirtin.",featurePickerLabel:"Özellik:",minimumInputLabel:"Minimum:",maximumInputLabel:"Maksimum:",stepInputLabel:"Adımlar:",loadingMessage:"Veriler yükleniyor...",submitPrompt:"ICE çizimini görüntülemek için bir aralık gönderin",topLevelErrorMessage:"Parametrede hata",errorPrefix:"Hatayla karşılaşıldı: {0}"},PerturbationExploration:{loadingMessage:"Yükleniyor...",perturbationLabel:"Sapma:"},PredictionLabel:{predictedValueLabel:"Tahmin edilen değer: {0}",predictedClassLabel:"Tahmin edilen sınıf: {0}"},Violin:{groupNone:"Gruplandırma yok",groupPredicted:"Tahmin edilen Y",groupTrue:"Doğru Y",groupBy:"Gruplandır"},FeatureImportanceWrapper:{chartType:"Grafik türü:",violinText:"Keman",barText:"Çubuk",boxText:"Kutu",beehiveText:"Swarm",globalImportanceExplanation:"Genel özellik önem derecesi, tüm noktaların özellik önem derecelerine ait mutlak değerinin ortalaması alınarak hesaplanır (L1 normalleştirme). ",multiclassImportanceAddendum:"Tüm sınıflar için özelliğin önem derecesi hesaplanırken tüm noktalar dahil edilir ve fark ağırlığı kullanılmaz Bu nedenle, 'A Sınıfı' olmadığı tahmin edilen çok sayıda nokta için büyük negatif önem derecesine sahip bir özellik, bu özelliğin 'A Sınıfı' önem derecesini büyük ölçüde artırır."}}},function(e){e.exports={selectPoint:"选择一个点以查看其本地说明",defaultClassNames:"类 {0}",defaultFeatureNames:"特征 {0}",absoluteAverage:"绝对值的平均值",predictedClass:"预测类",dataExploration:"数据浏览",globalImportance:"全局重要性",explanationExploration:"解释探索",summaryImportance:"摘要重要性",featureImportance:"特征重要性",perturbationExploration:"小改动探索",localFeatureImportance:"本地特征重要性",ice:"ICE",clearSelection:"清除选定内容",feature:"功能:",intercept:"截获",ExplanationScatter:{dataLabel:"数据: {0}",importanceLabel:"重要性: {0}",predictedY:"PredictedY",index:"索引",dataGroupLabel:"数据",output:"输出",probabilityLabel:"概率: {0}",trueY:"真实 Y",class:"类:",xValue:"X 值:",yValue:"Y 值:",colorValue:"颜色:"},CrossClass:{label:"交叉类权重:",info:"有关跨类计算的信息",overviewInfo:"多类分类模型为每个类生成一个独立的特征重要性向量。每个类的特征重要性向量说明了哪些特征使类的可能性更高或更低。可以选择如何将每个类特征重要性向量的权重汇总为单个值:",absoluteValInfo:"绝对值的平均值: 显示所有可能类中特征重要性的总和，除以类的数量",predictedClassInfo:"预测类: 显示给定点的预测类的特征重要性值",enumeratedClassInfo:"枚举的类名: 仅显示所有数据点中指定的类的特征重要性值。",close:"关闭"},AggregateImportance:{scaledFeatureValue:"缩放的特征值",low:"低",high:"高",featureLabel:"特征: {0}",valueLabel:"特征值: {0}",importanceLabel:"重要性: {0}",predictedClassTooltip:"预测类: {0}",trueClassTooltip:"真实类: {0}",predictedOutputTooltip:"预测输出: {0}",trueOutputTooltip:"真实输出: {0}",topKFeatures:"前 K 个特征:",topKInfo:"如何计算 top k",predictedValue:"预测值",predictedClass:"预测类",trueValue:"True 值",trueClass:"真实类",noColor:"无",tooManyRows:"提供的数据集大于此图表可支持的数据集"},BarChart:{classLabel:"类: {0}",sortBy:"排序依据",noData:"无数据",absoluteGlobal:"绝对全局",absoluteLocal:"绝对本地",calculatingExplanation:"正在计算解释"},IcePlot:{numericError:"必须为数值",integerError:"必须为整数",prediction:"预测",predictedProbability:"预测概率",predictionLabel:"预测: {0}",probabilityLabel:"概率: {0}",noModelError:"请提供 operationalized 模型以在 ICE 绘图中浏览预测。",featurePickerLabel:"功能:",minimumInputLabel:"最小值:",maximumInputLabel:"最大值:",stepInputLabel:"步骤:",loadingMessage:"正在加载数据...",submitPrompt:"提交一个范围以查看 ICE 绘图",topLevelErrorMessage:"参数错误",errorPrefix:"出现错误: {0}"},PerturbationExploration:{loadingMessage:"正在加载...",perturbationLabel:"小改动:"},PredictionLabel:{predictedValueLabel:"预测值: {0}",predictedClassLabel:"预测类: {0}"},Violin:{groupNone:"不进行分组",groupPredicted:"预测 Y",groupTrue:"真实 Y",groupBy:"分组依据"},FeatureImportanceWrapper:{chartType:"图表类型:",violinText:"小提琴",barText:"条形图",boxText:"框",beehiveText:"Swarm",globalImportanceExplanation:"全局特征重要性是通过对所有点的特征重要性的绝对值求平均值(L1 规范化)计算出来的。",multiclassImportanceAddendum:"计算所有类的特征重要性时，所有点都包括在内，不使用任何差异权重。因此，对许多预测为非“A 类”的点具有较大负面重要性的特征将大大提高该特征的“A 类”重要性。"}}},function(e){e.exports={selectPoint:"選取點以查看其區域解釋",defaultClassNames:"類別 {0}",defaultFeatureNames:"特徵 {0}",absoluteAverage:"絕對值的平均值",predictedClass:"預測的類別",dataExploration:"資料探索",globalImportance:"全域重要性",explanationExploration:"解釋探索",summaryImportance:"彙總重要性",featureImportance:"特徵重要度",perturbationExploration:"更動探索",localFeatureImportance:"區域特徵重要度",ice:"ICE",clearSelection:"清除選取",feature:"功能:",intercept:"攔截",ExplanationScatter:{dataLabel:"資料: {0}",importanceLabel:"重要性: {0}",predictedY:"PredictedY",index:"索引",dataGroupLabel:"資料",output:"輸出",probabilityLabel:"機率: {0}",trueY:"實際的 Y",class:"類別: ",xValue:"X 值:",yValue:"Y 值:",colorValue:"色彩:"},CrossClass:{label:"跨類別加權:",info:"跨類別計算的資訊",overviewInfo:"多類別模型會為每個類別產生獨立的特徵重要度向量。每個類別的特徵重要度向量會呈現出哪些特徵較有可能或較不可能構成某個類別。您可以選取如何將每個類別特徵重要度向量的權重加總成單一值:",absoluteValInfo:"絕對值的平均值: 顯示所有可能類別的特徵重要性總和除以類別數目",predictedClassInfo:"預測的類別: 為指定點的預測類別顯示特徵重要度值",enumeratedClassInfo:"列舉的類別名稱: 只顯示所有資料點中指定類別的特徵重要度值。",close:"關閉"},AggregateImportance:{scaledFeatureValue:"縮放的特徵值",low:"低",high:"高",featureLabel:"特徵: {0}",valueLabel:"特徵值: {0}",importanceLabel:"重要性: {0}",predictedClassTooltip:"預測的類別: {0}",trueClassTooltip:"實際的類別: {0}",predictedOutputTooltip:"預測的輸出: {0}",trueOutputTooltip:"實際的輸出: {0}",topKFeatures:"前 K 個特徵:",topKInfo:"如何算出前 K 大的數",predictedValue:"預測值",predictedClass:"預測的類別",trueValue:"True 值",trueClass:"實際的類別",noColor:"無",tooManyRows:"提供的資料集超過這個圖表可支援的大小"},BarChart:{classLabel:"類別: {0}",sortBy:"排序依據",noData:"沒有資料",absoluteGlobal:"絕對全域",absoluteLocal:"絕對區域",calculatingExplanation:"正在計算解釋"},IcePlot:{numericError:"必須為數值",integerError:"必須為整數",prediction:"預測",predictedProbability:"預測的機率",predictionLabel:"預測: {0}",probabilityLabel:"機率: {0}",noModelError:"請提供經操作化的模型，以在 ICE 繪圖中探索預測。",featurePickerLabel:"功能:",minimumInputLabel:"最小值:",maximumInputLabel:"最大值:",stepInputLabel:"步驟:",loadingMessage:"正在載入資料...",submitPrompt:"提交範圍以檢視 ICE 繪圖",topLevelErrorMessage:"參數有誤",errorPrefix:"發生的錯誤: {0}"},PerturbationExploration:{loadingMessage:"正在載入...",perturbationLabel:"更動:"},PredictionLabel:{predictedValueLabel:"預測的值: {0}",predictedClassLabel:"預測的類別: {0}"},Violin:{groupNone:"未分組",groupPredicted:"預測的 Y",groupTrue:"實際的 Y",groupBy:"群組依據"},FeatureImportanceWrapper:{chartType:"圖表類型:",violinText:"小提琴",barText:"橫條圖",boxText:"方塊",beehiveText:"群集",globalImportanceExplanation:"全域特徵重要度的計算方法，是先算出所有點之特徵重要性的絕對值，再計算該絕對值的平均值 (L1 正規化)。 ",multiclassImportanceAddendum:"計算特徵對所有類別的重要性時，所有點皆會予以計入，而不會使用差異加權。因此，若特徵對於許多預測不屬於「A 類別」的點具有重大負面重要性，將會大幅增加該特徵的「A 類別」重要性。"}}},function(e,t,r){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,a){if(e===a)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(a))return!1;if(!0===t(e)){if(e.length!==a.length)return!1;for(var i=0;i<e.length;i++)if(!1===n(e[i],a[i]))return!1;return!0}if(!0===r(e)){var o={};for(var s in e)if(hasOwnProperty.call(e,s)){if(!1===n(e[s],a[s]))return!1;o[s]=!0}for(var l in a)if(hasOwnProperty.call(a,l)&&!0!==o[l])return!1;return!0}return!1}function a(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(r(e)){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}return!1}var i;i="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var o=0,s=1,l=2,c=3,u=4,d=6,p=8,h=9,f={".":"Dot","*":"Star",",":"Comma",":":"Colon","{":"Lbrace","}":"Rbrace","]":"Rbracket","(":"Lparen",")":"Rparen","@":"Current"},m={"<":!0,">":!0,"=":!0,"!":!0},g={" ":!0,"\t":!0,"\n":!0};function v(e){return e>="0"&&e<="9"||"-"===e}function y(){}y.prototype={tokenize:function(e){var t,r,n,a,i=[];for(this._current=0;this._current<e.length;)if((a=e[this._current])>="a"&&a<="z"||a>="A"&&a<="Z"||"_"===a)t=this._current,r=this._consumeUnquotedIdentifier(e),i.push({type:"UnquotedIdentifier",value:r,start:t});else if(void 0!==f[e[this._current]])i.push({type:f[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(v(e[this._current]))n=this._consumeNumber(e),i.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),i.push(n);else if('"'===e[this._current])t=this._current,r=this._consumeQuotedIdentifier(e),i.push({type:"QuotedIdentifier",value:r,start:t});else if("'"===e[this._current])t=this._current,r=this._consumeRawStringLiteral(e),i.push({type:"Literal",value:r,start:t});else if("`"===e[this._current]){t=this._current;var o=this._consumeLiteral(e);i.push({type:"Literal",value:o,start:t})}else if(void 0!==m[e[this._current]])i.push(this._consumeOperator(e));else if(void 0!==g[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,i.push({type:"And",value:"&&",start:t})):i.push({type:"Expref",value:"&",start:t});else{if("|"!==e[this._current]){var s=new Error("Unknown character:"+e[this._current]);throw s.name="LexerError",s}t=this._current,this._current++,"|"===e[this._current]?(this._current++,i.push({type:"Or",value:"||",start:t})):i.push({type:"Pipe",value:"|",start:t})}return i},_consumeUnquotedIdentifier:function(e){var t,r=this._current;for(this._current++;this._current<e.length&&((t=e[this._current])>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(r,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var r=e.length;'"'!==e[this._current]&&this._current<r;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&'"'!==e[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var r=e.length;"'"!==e[this._current]&&this._current<r;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"'"!==e[n+1]?n++:n+=2,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var r=e.length;v(e[this._current])&&this._current<r;)this._current++;return{type:"Number",value:parseInt(e.slice(t,this._current)),start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:"Filter",value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:"Flatten",value:"[]",start:t}):{type:"Lbracket",value:"[",start:t}},_consumeOperator:function(e){var t=this._current,r=e[t];return this._current++,"!"===r?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===r?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===r?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===r&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,r=this._current,n=e.length;"`"!==e[this._current]&&this._current<n;){var a=this._current;"\\"!==e[a]||"\\"!==e[a+1]&&"`"!==e[a+1]?a++:a+=2,this._current=a}var o=i(e.slice(r,this._current));return o=o.replace("\\`","`"),t=this._looksLikeJSON(o)?JSON.parse(o):JSON.parse('"'+o+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if('[{"'.indexOf(e[0])>=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var b={};function _(){}function x(e){this.runtime=e}function w(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[o]}]},avg:{_func:this._functionAvg,_signature:[{types:[p]}]},ceil:{_func:this._functionCeil,_signature:[{types:[o]}]},contains:{_func:this._functionContains,_signature:[{types:[l,c]},{types:[s]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[l]},{types:[l]}]},floor:{_func:this._functionFloor,_signature:[{types:[o]}]},length:{_func:this._functionLength,_signature:[{types:[l,c,u]}]},map:{_func:this._functionMap,_signature:[{types:[d]},{types:[c]}]},max:{_func:this._functionMax,_signature:[{types:[p,h]}]},merge:{_func:this._functionMerge,_signature:[{types:[u],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[c]},{types:[d]}]},sum:{_func:this._functionSum,_signature:[{types:[p]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[l]},{types:[l]}]},min:{_func:this._functionMin,_signature:[{types:[p,h]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[c]},{types:[d]}]},type:{_func:this._functionType,_signature:[{types:[s]}]},keys:{_func:this._functionKeys,_signature:[{types:[u]}]},values:{_func:this._functionValues,_signature:[{types:[u]}]},sort:{_func:this._functionSort,_signature:[{types:[h,p]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[c]},{types:[d]}]},join:{_func:this._functionJoin,_signature:[{types:[l]},{types:[h]}]},reverse:{_func:this._functionReverse,_signature:[{types:[l,c]}]},to_array:{_func:this._functionToArray,_signature:[{types:[s]}]},to_string:{_func:this._functionToString,_signature:[{types:[s]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[s]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[s],variadic:!0}]}}}b.EOF=0,b.UnquotedIdentifier=0,b.QuotedIdentifier=0,b.Rbracket=0,b.Rparen=0,b.Comma=0,b.Rbrace=0,b.Number=0,b.Current=0,b.Expref=0,b.Pipe=1,b.Or=2,b.And=3,b.EQ=5,b.GT=5,b.LT=5,b.GTE=5,b.LTE=5,b.NE=5,b.Flatten=9,b.Star=20,b.Filter=21,b.Dot=40,b.Not=45,b.Lbrace=50,b.Lbracket=55,b.Lparen=60,_.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Unexpected token type: "+r.type+", value: "+r.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=(new y).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var r=this.nud(t),n=this._lookahead(0);e<b[n];)this._advance(),r=this.led(n,r),n=this._lookahead(0);return r},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,r;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":var n={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(b.Not)]};case"Star":return t=null,{type:"ValueProjection",children:[{type:"Identity"},t="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(b.Star)]};case"Filter":return this.led(e.type,{type:"Identity"});case"Lbrace":return this._parseMultiselectHash();case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[{type:"Identity"}]},t=this._parseProjectionRHS(b.Flatten)]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(b.Star)]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":return{type:"ExpressionReference",children:[r=this.expression(b.Expref)]};case"Lparen":for(var a=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(r={type:"Current"},this._advance()):r=this.expression(0),a.push(r);return this._match("Rparen"),a[0];default:this._errorToken(e)}},led:function(e,t){var r;switch(e){case"Dot":var n=b.Dot;return"Star"!==this._lookahead(0)?{type:"Subexpression",children:[t,r=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[t,r=this._parseProjectionRHS(n)]});case"Pipe":return{type:"Pipe",children:[t,r=this.expression(b.Pipe)]};case"Or":return{type:"OrExpression",children:[t,r=this.expression(b.Or)]};case"And":return{type:"AndExpression",children:[t,r=this.expression(b.And)]};case"Lparen":for(var a,i=t.name,o=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(a={type:"Current"},this._advance()):a=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),o.push(a);return this._match("Rparen"),{type:"Function",name:i,children:o};case"Filter":var s=this.expression(0);return this._match("Rbracket"),{type:"FilterProjection",children:[t,r="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(b.Filter),s]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(b.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case"Lbracket":var l=this._lookaheadToken(0);return"Number"===l.type||"Colon"===l.type?(r=this._parseIndexExpression(),this._projectIfSlice(t,r)):(this._match("Star"),this._match("Rbracket"),{type:"Projection",children:[t,r=this._parseProjectionRHS(b.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),r=new Error("Expected "+e+", got: "+t.type);throw r.name="ParserError",r}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if("Colon"===this._lookahead(0)||"Colon"===this._lookahead(1))return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match("Rbracket"),e},_projectIfSlice:function(e,t){var r={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[r,this._parseProjectionRHS(b.Star)]}:r},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,r=this._lookahead(0);"Rbracket"!==r&&t<3;){if("Colon"===r)t++,this._advance();else{if("Number"!==r){var n=this._lookahead(0),a=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw a.name="Parsererror",a}e[t]=this._lookaheadToken(0).value,this._advance()}r=this._lookahead(0)}return this._match("Rbracket"),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(b[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return["UnquotedIdentifier","QuotedIdentifier","Star"].indexOf(t)>=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(b[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+r.value+"("+r.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n=[],a=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),a.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),r={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(r),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:n}}},x.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,i){var o,s,l,c,u,d,p,h,f;switch(e.type){case"Field":return null===i?null:r(i)?void 0===(d=i[e.name])?null:d:null;case"Subexpression":for(l=this.visit(e.children[0],i),f=1;f<e.children.length;f++)if(null===(l=this.visit(e.children[1],l)))return null;return l;case"IndexExpression":return p=this.visit(e.children[0],i),this.visit(e.children[1],p);case"Index":if(!t(i))return null;var m=e.value;return m<0&&(m=i.length+m),void 0===(l=i[m])&&(l=null),l;case"Slice":if(!t(i))return null;var g=e.children.slice(0),v=this.computeSliceParams(i.length,g),y=v[0],b=v[1],_=v[2];if(l=[],_>0)for(f=y;f<b;f+=_)l.push(i[f]);else for(f=y;f>b;f+=_)l.push(i[f]);return l;case"Projection":var x=this.visit(e.children[0],i);if(!t(x))return null;for(h=[],f=0;f<x.length;f++)null!==(s=this.visit(e.children[1],x[f]))&&h.push(s);return h;case"ValueProjection":if(!r(x=this.visit(e.children[0],i)))return null;h=[];var w=function(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;n++)r.push(e[t[n]]);return r}(x);for(f=0;f<w.length;f++)null!==(s=this.visit(e.children[1],w[f]))&&h.push(s);return h;case"FilterProjection":if(!t(x=this.visit(e.children[0],i)))return null;var k=[],M=[];for(f=0;f<x.length;f++)a(o=this.visit(e.children[2],x[f]))||k.push(x[f]);for(var T=0;T<k.length;T++)null!==(s=this.visit(e.children[1],k[T]))&&M.push(s);return M;case"Comparator":switch(c=this.visit(e.children[0],i),u=this.visit(e.children[1],i),e.name){case"EQ":l=n(c,u);break;case"NE":l=!n(c,u);break;case"GT":l=c>u;break;case"GTE":l=c>=u;break;case"LT":l=c<u;break;case"LTE":l=c<=u;break;default:throw new Error("Unknown comparator: "+e.name)}return l;case"Flatten":var C=this.visit(e.children[0],i);if(!t(C))return null;var S=[];for(f=0;f<C.length;f++)t(s=C[f])?S.push.apply(S,s):S.push(s);return S;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(h=[],f=0;f<e.children.length;f++)h.push(this.visit(e.children[f],i));return h;case"MultiSelectHash":if(null===i)return null;var L;for(h={},f=0;f<e.children.length;f++)h[(L=e.children[f]).name]=this.visit(L.value,i);return h;case"OrExpression":return a(o=this.visit(e.children[0],i))&&(o=this.visit(e.children[1],i)),o;case"AndExpression":return!0===a(c=this.visit(e.children[0],i))?c:this.visit(e.children[1],i);case"NotExpression":return a(c=this.visit(e.children[0],i));case"Literal":return e.value;case"Pipe":return p=this.visit(e.children[0],i),this.visit(e.children[1],p);case"Current":return i;case"Function":var A=[];for(f=0;f<e.children.length;f++)A.push(this.visit(e.children[f],i));return this.runtime.callFunction(e.name,A);case"ExpressionReference":var E=e.children[0];return E.jmespathType="Expref",E;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var r=t[0],n=t[1],a=t[2],i=[null,null,null];if(null===a)a=1;else if(0===a){var o=new Error("Invalid slice, step cannot be 0");throw o.name="RuntimeError",o}var s=a<0;return r=null===r?s?e-1:0:this.capSliceRange(e,r,a),n=null===n?s?-1:e:this.capSliceRange(e,n,a),i[0]=r,i[1]=n,i[2]=a,i},capSliceRange:function(e,t,r){return t<0?(t+=e)<0&&(t=r<0?-1:0):t>=e&&(t=r<0?e-1:e),t}},w.prototype={callFunction:function(e,t){var r=this.functionTable[e];if(void 0===r)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,r._signature),r._func.call(this,t)},_validateArgs:function(e,t,r){var n,a,i,o;if(r[r.length-1].variadic){if(t.length<r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+r.length+n+" but received "+t.length)}else if(t.length!==r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+r.length+n+" but received "+t.length);for(var s=0;s<r.length;s++){o=!1,a=r[s].types,i=this._getTypeName(t[s]);for(var l=0;l<a.length;l++)if(this._typeMatches(i,a[l],t[s])){o=!0;break}if(!o)throw new Error("TypeError: "+e+"() expected argument "+(s+1)+" to be type "+a+" but received type "+i+" instead.")}},_typeMatches:function(e,t,r){if(t===s)return!0;if(t!==h&&t!==p&&t!==c)return e===t;if(t===c)return e===c;if(e===c){var n;t===p?n=o:t===h&&(n=l);for(var a=0;a<r.length;a++)if(!this._typeMatches(this._getTypeName(r[a]),n,r[a]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return l;case"[object Number]":return o;case"[object Array]":return c;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return"Expref"===e.jmespathType?d:u}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],r=e[1];return-1!==t.indexOf(r,t.length-r.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===l){for(var t=e[0],r="",n=t.length-1;n>=0;n--)r+=t[n];return r}var a=e[0].slice(0);return a.reverse(),a},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t/r.length},_functionContains:function(e){return e[0].indexOf(e[1])>=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return r(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],r=this._interpreter,n=e[0],a=e[1],i=0;i<a.length;i++)t.push(r.visit(n,a[i]));return t},_functionMerge:function(e){for(var t={},r=0;r<e.length;r++){var n=e[r];for(var a in n)t[a]=n[a]}return t},_functionMax:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===o)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)r.localeCompare(t[n])<0&&(r=t[n]);return r}return null},_functionMin:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===o)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)t[n].localeCompare(r)<0&&(r=t[n]);return r}return null},_functionSum:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case o:return"number";case l:return"string";case c:return"array";case u:return"object";case 5:return"boolean";case d:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],r=Object.keys(t),n=[],a=0;a<r.length;a++)n.push(t[r[a]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return this._getTypeName(e[0])===c?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===l?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,r=this._getTypeName(e[0]);return r===o?e[0]:r!==l||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var r=this._interpreter,n=e[1],a=this._getTypeName(r.visit(n,t[0]));if([o,l].indexOf(a)<0)throw new Error("TypeError");for(var i=this,s=[],c=0;c<t.length;c++)s.push([c,t[c]]);s.sort((function(e,t){var o=r.visit(n,e[1]),s=r.visit(n,t[1]);if(i._getTypeName(o)!==a)throw new Error("TypeError: expected "+a+", received "+i._getTypeName(o));if(i._getTypeName(s)!==a)throw new Error("TypeError: expected "+a+", received "+i._getTypeName(s));return o>s?1:o<s?-1:e[0]-t[0]}));for(var u=0;u<s.length;u++)t[u]=s[u][1];return t},_functionMaxBy:function(e){for(var t,r,n=e[1],a=e[0],i=this.createKeyFunction(n,[o,l]),s=-1/0,c=0;c<a.length;c++)(r=i(a[c]))>s&&(s=r,t=a[c]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],a=e[0],i=this.createKeyFunction(n,[o,l]),s=1/0,c=0;c<a.length;c++)(r=i(a[c]))<s&&(s=r,t=a[c]);return t},createKeyFunction:function(e,t){var r=this,n=this._interpreter;return function(a){var i=n.visit(e,a);if(t.indexOf(r._getTypeName(i))<0){var o="TypeError: expected one of "+t+", received "+r._getTypeName(i);throw new Error(o)}return i}}},e.tokenize=function(e){return(new y).tokenize(e)},e.compile=function(e){return(new _).parse(e)},e.search=function(e,t){var r=new _,n=new w,a=new x(n);n._interpreter=a;var i=r.parse(t);return a.search(i,e)},e.strictDeepEqual=n}(t)},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(17),a="__globalSettings__",i="__callbacks__",o=0,s=function(){function e(){}return e.getValue=function(e,t){var r=l();return void 0===r[e]&&(r[e]="function"==typeof t?t():t),r[e]},e.setValue=function(e,t){var r=l(),n=r[i],a=r[e];if(t!==a){r[e]=t;var o={oldValue:a,value:t,key:e};for(var s in n)n.hasOwnProperty(s)&&n[s](o)}return t},e.addChangeListener=function(e){var t=e.__id__,r=c();t||(t=e.__id__=String(o++)),r[t]=e},e.removeChangeListener=function(e){delete c()[e.__id__]},e}();function l(){var e,t=Object(n.a)()||{};return t[a]||(t[a]=((e={})[i]={},e)),t[a]}function c(){return l()[i]}},function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return l}));var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a="undefined"==typeof window?e:window,i=a&&a.CSPSettings&&a.CSPSettings.nonce,o=function(){var e=a.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]};e.runState||(e=n({},e,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}}));e.registeredThemableStyles||(e=n({},e,{registeredThemableStyles:[]}));return a.__themeState__=e,e}();function s(e,t){o.loadStyles?o.loadStyles(u(e).styleString,e):function(e){if("undefined"==typeof document)return;var t=document.getElementsByTagName("head")[0],r=document.createElement("style"),n=u(e),a=n.styleString,s=n.themable;r.setAttribute("data-load-themed-styles","true"),i&&r.setAttribute("nonce",i);r.appendChild(document.createTextNode(a)),o.perf.count++,t.appendChild(r);var l=document.createEvent("HTMLEvents");l.initEvent("styleinsert",!0,!1),l.args={newStyle:r},document.dispatchEvent(l);var c={styleElement:r,themableStyle:e};s?o.registeredThemableStyles.push(c):o.registeredStyles.push(c)}(e)}function l(e){o.theme=e,function(){if(o.theme){for(var e=[],t=0,r=o.registeredThemableStyles;t<r.length;t++){var n=r[t];e.push(n.themableStyle)}e.length>0&&(!function(e){void 0===e&&(e=3);3!==e&&2!==e||(c(o.registeredStyles),o.registeredStyles=[]);3!==e&&1!==e||(c(o.registeredThemableStyles),o.registeredThemableStyles=[])}(1),s([].concat.apply([],e)))}}()}function c(e){e.forEach((function(e){var t=e&&e.styleElement;t&&t.parentElement&&t.parentElement.removeChild(t)}))}function u(e){var t=o.theme,r=!1;return{styleString:(e||[]).map((function(e){var n=e.theme;if(n){r=!0;var a=t?t[n]:void 0,i=e.defaultValue||"inherit";return!t||a||!console||n in t||"undefined"==typeof DEBUG||!DEBUG||console.warn('Theming value not provided for "'+n+'". Falling back to "'+i+'".'),a||i}return e.rawString})).join(""),themable:r}}}).call(this,r(68))},function(e,t,r){"use strict";r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return d}));var n=r(2),a=r(0),i=r(42),o=r(46),s=r(60),l=r(338),c=r(9),u=Object(o.b)((function(e){var t=Object(c.w)(e)||{subset:{},code:void 0},r=t.code,n=t.subset;return r?{children:r,iconClassName:n.className,fontFamily:n.fontFace&&n.fontFace.fontFamily}:null}),void 0,!0),d=function(e){var t=e.iconName,r=e.className,o=e.style,c=void 0===o?{}:o,d=u(t)||{},p=d.iconClassName,h=d.children,f=d.fontFamily,m=Object(s.d)(e,s.e),g=e["aria-label"]?{}:{role:"presentation","aria-hidden":!0};return a.createElement("i",Object(n.a)({"data-icon-name":t},g,m,{className:Object(l.a)(i.a,i.b.root,p,!t&&i.b.placeholder,r),style:Object(n.a)({fontFamily:f},c)}),h)};Object(o.b)((function(e,t,r){return d({iconName:e,className:t,"aria-label":r})}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(56);function a(e,t,r){void 0===r&&(r=!0);var a=!1;if(e&&t)if(r)for(a=!1;t;){var i=Object(n.a)(t);if(i===e){a=!0;break}t=i}else e.contains&&(a=e.contains(t));return a}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n,a=r(26),i=((n={})[a.a.up]=1,n[a.a.down]=1,n[a.a.left]=1,n[a.a.right]=1,n[a.a.home]=1,n[a.a.end]=1,n[a.a.tab]=1,n[a.a.pageUp]=1,n[a.a.pageDown]=1,n);function o(e){return!!i[e]}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(17),a=r(270),i=r(64);function o(e){var t=e||Object(n.a)();t&&!t.__hasInitializeFocusRects__&&(t.__hasInitializeFocusRects__=!0,t.addEventListener("mousedown",s,!0),t.addEventListener("keydown",l,!0))}function s(e){Object(i.b)(!1,e.target)}function l(e){Object(a.a)(e.which)&&Object(i.b)(!0,e.target)}},function(e,t,r){"use strict";function n(e,t,r){}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e,t,r){}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(2),a=r(0),i=r(60),o=function(e){function t(t){var r=e.call(this,t)||this;return r._warnDeprecations({linkText:"headerText"}),r}return Object(n.c)(t,e),t.prototype.render=function(){return a.createElement("div",Object(n.a)({},Object(i.d)(this.props,i.c)),this.props.children)},t}(r(95).a)},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(49),o=r(95),s=r(339),l=r(9),c=r(46),u=r(48),d=r(55),p=r(64),h=function(){return{position:"absolute",width:1,right:31,top:8,bottom:8}};var f=Object(c.b)((function(e,t,r){var a=Object(u.a)(e),i=Object(d.a)(e),o={root:{minWidth:"80px",height:"32px"},label:{fontWeight:l.e.semibold}};return Object(l.r)(a,o,r?function(e){var t,r,a,i,o,s,c,u,d,f=e.palette,m=e.semanticColors;return{root:{backgroundColor:m.primaryButtonBackground,border:"1px solid "+m.primaryButtonBackground,color:m.primaryButtonText,selectors:(t={},t[l.f]={color:"Window",backgroundColor:"WindowText",borderColor:"WindowText",MsHighContrastAdjust:"none"},t["."+p.a+" &:focus"]={selectors:{":after":{border:"none",outlineColor:f.white}}},t)},rootHovered:{backgroundColor:m.primaryButtonBackgroundHovered,border:"1px solid "+m.primaryButtonBackgroundHovered,color:m.primaryButtonTextHovered,selectors:(r={},r[l.f]={color:"Window",backgroundColor:"Highlight",borderColor:"Highlight"},r)},rootPressed:{backgroundColor:m.primaryButtonBackgroundPressed,border:"1px solid "+m.primaryButtonBackgroundPressed,color:m.primaryButtonTextPressed,selectors:(a={},a[l.f]={color:"Window",backgroundColor:"WindowText",borderColor:"WindowText",MsHighContrastAdjust:"none"},a)},rootExpanded:{backgroundColor:m.primaryButtonBackgroundPressed,color:m.primaryButtonTextPressed},rootChecked:{backgroundColor:m.primaryButtonBackgroundPressed,color:m.primaryButtonTextPressed},rootCheckedHovered:{backgroundColor:m.primaryButtonBackgroundPressed,color:m.primaryButtonTextPressed},rootDisabled:{selectors:(i={},i[l.f]={color:"GrayText",borderColor:"GrayText",backgroundColor:"Window"},i)},splitButtonContainer:{selectors:(o={},o[l.f]={border:"none"},o)},splitButtonDivider:Object(n.a)(Object(n.a)({},h()),{backgroundColor:f.white,selectors:(s={},s[l.f]={backgroundColor:"Window"},s)}),splitButtonMenuButton:{backgroundColor:m.primaryButtonBackground,color:m.primaryButtonText,selectors:(c={},c[l.f]={backgroundColor:"WindowText"},c[":hover"]={backgroundColor:m.primaryButtonBackgroundHovered,selectors:(u={},u[l.f]={color:"Highlight"},u)},c)},splitButtonMenuButtonDisabled:{backgroundColor:m.primaryButtonBackgroundDisabled,selectors:{":hover":{backgroundColor:m.primaryButtonBackgroundDisabled}}},splitButtonMenuButtonChecked:{backgroundColor:m.primaryButtonBackgroundPressed,selectors:{":hover":{backgroundColor:m.primaryButtonBackgroundPressed}}},splitButtonMenuButtonExpanded:{backgroundColor:m.primaryButtonBackgroundPressed,selectors:{":hover":{backgroundColor:m.primaryButtonBackgroundPressed}}},splitButtonMenuIcon:{color:m.primaryButtonText},splitButtonMenuIconDisabled:{color:f.neutralTertiary,selectors:(d={},d[l.f]={color:"GrayText"},d)}}}(e):function(e){var t,r,a,i,o,s=e.semanticColors,c=e.palette,u=s.buttonBackground,d=s.buttonBackgroundPressed,p=s.buttonBackgroundHovered,f=s.buttonText,m=s.buttonTextHovered,g=s.buttonTextChecked,v=s.buttonTextCheckedHovered;return{root:{backgroundColor:u,color:f},rootHovered:{backgroundColor:p,color:m,selectors:(t={},t[l.f]={borderColor:"Highlight",color:"Highlight"},t)},rootPressed:{backgroundColor:d,color:g},rootExpanded:{backgroundColor:d,color:g},rootChecked:{backgroundColor:d,color:g},rootCheckedHovered:{backgroundColor:d,color:v},rootDisabled:{selectors:(r={},r[l.f]={color:"GrayText",borderColor:"GrayText",backgroundColor:"Window"},r)},splitButtonContainer:{selectors:(a={},a[l.f]={border:"none"},a)},splitButtonMenuButton:{color:c.white,backgroundColor:"transparent",selectors:{":hover":{backgroundColor:c.neutralLight,selectors:(i={},i[l.f]={color:"Highlight"},i)}}},splitButtonMenuButtonDisabled:{backgroundColor:s.buttonBackgroundDisabled,selectors:{":hover":{backgroundColor:s.buttonBackgroundDisabled}}},splitButtonDivider:Object(n.a)(Object(n.a)({},h()),{backgroundColor:c.neutralTertiaryAlt,selectors:(o={},o[l.f]={backgroundColor:"WindowText"},o)}),splitButtonDividerDisabled:{backgroundColor:e.palette.neutralTertiaryAlt},splitButtonMenuButtonChecked:{backgroundColor:c.neutralQuaternaryAlt,selectors:{":hover":{backgroundColor:c.neutralQuaternaryAlt}}},splitButtonMenuButtonExpanded:{backgroundColor:c.neutralQuaternaryAlt,selectors:{":hover":{backgroundColor:c.neutralQuaternaryAlt}}},splitButtonMenuIcon:{color:s.buttonText},splitButtonMenuIconDisabled:{color:s.buttonTextDisabled}}}(e),i,t)}));r.d(t,"a",(function(){return m}));var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._skipComponentRefResolution=!0,t}return Object(n.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.primary,r=void 0!==t&&t,s=e.styles,l=e.theme;return a.createElement(i.a,Object(n.a)({},this.props,{variantClassName:r?"ms-Button--primary":"ms-Button--default",styles:f(l,s,r),onRenderDescription:o.b}))},t=Object(n.b)([Object(s.a)("DefaultButton",["theme","styles"],!0)],t)}(o.a)},function(e,t,r){"use strict";var n=r(26),a=r(34);var i=r(41);r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return c}));var o,s="isRTL";function l(e){if(void 0===e&&(e={}),void 0!==e.rtl)return e.rtl;if(void 0===o){var t=function(e){var t=null;try{t=window.sessionStorage.getItem(e)}catch(e){}return t}(s);null!==t&&function(e,t){void 0===t&&(t=!1);var r=Object(a.a)();r&&r.documentElement.setAttribute("dir",e?"rtl":"ltr");t&&function(e,t){try{window.sessionStorage.setItem(e,t)}catch(e){}}(s,e?"1":"0");o=e,Object(i.b)(o)}(o="1"===t);var r=Object(a.a)();void 0===o&&r&&(o="rtl"===(r.body&&r.body.getAttribute("dir")||r.documentElement.getAttribute("dir")),Object(i.b)(o))}return!!o}function c(e,t){return void 0===t&&(t={}),l(t)&&(e===n.a.left?e=n.a.right:e===n.a.right&&(e=n.a.left)),e}},function(e,t,r){"use strict";r.r(t),r.d(t,"RenderDashboard",(function(){return u}));var n=r(0),a=r.n(n),i=r(33),o=r.n(i),s=r(89),l=r.n(s),c=r(87);r.d(t,"NewExplanationDashboard",(function(){return c.NewExplanationDashboard}));var u=function(e,t){o.a.render(a.a.createElement(c.NewExplanationDashboard,{modelInformation:{modelClass:"blackbox"},dataSummary:{featureNames:t.featureNames,classNames:t.classNames},testData:t.trainingData,predictedY:t.predictedY,probabilityY:t.probabilityY,trueY:t.trueY,precomputedExplanations:{localFeatureImportance:t.localExplanations,globalFeatureImportance:t.globalExplanation,ebmGlobalExplanation:t.ebmData},requestPredictions:void 0!==t.predictionUrl?function(e){if(t.withCredentials){l.a.defaults.withCredentials=!0;var r={headers:{Accept:"application/json,text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","Content-Type":"application/json"},withCredentials:!0};return l.a.post(t.predictionUrl,JSON.stringify(e),r).then((function(e){return e.data.data})).catch((function(e){throw new Error(e)}))}return fetch(t.predictionUrl,{method:"post",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then((function(e){return e.status>=200&&e.status<300?e.json():Promise.reject(new Error(e.statusText))})).then((function(e){if(void 0!==e.error)throw new Error(e.error);return Promise.resolve(e.data)}))}:void 0,locale:t.locale,explanationMethod:t.explanation_method,key:new Date}),document.getElementById(e))}},,,,,,,,,function(e,t,r){"use strict";
/** @license React v16.8.6
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n=r(102),a="function"==typeof Symbol&&Symbol.for,i=a?Symbol.for("react.element"):60103,o=a?Symbol.for("react.portal"):60106,s=a?Symbol.for("react.fragment"):60107,l=a?Symbol.for("react.strict_mode"):60108,c=a?Symbol.for("react.profiler"):60114,u=a?Symbol.for("react.provider"):60109,d=a?Symbol.for("react.context"):60110,p=a?Symbol.for("react.concurrent_mode"):60111,h=a?Symbol.for("react.forward_ref"):60112,f=a?Symbol.for("react.suspense"):60113,m=a?Symbol.for("react.memo"):60115,g=a?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t=arguments.length-1,r="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=0;n<t;n++)r+="&args[]="+encodeURIComponent(arguments[n+1]);!function(e,t,r,n,a,i,o,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,a,i,o,s],c=0;(e=Error(t.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",r)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_={};function x(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||b}function w(){}function k(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||b}x.prototype.isReactComponent={},x.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&y("85"),this.updater.enqueueSetState(this,e,t,"setState")},x.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=x.prototype;var M=k.prototype=new w;M.constructor=k,n(M,x.prototype),M.isPureReactComponent=!0;var T={current:null},C={current:null},S=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,r){var n=void 0,a={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)S.call(t,n)&&!L.hasOwnProperty(n)&&(a[n]=t[n]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===a[n]&&(a[n]=l[n]);return{$$typeof:i,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var D=/\/+/g,I=[];function P(e,t,r,n){if(I.length){var a=I.pop();return a.result=e,a.keyPrefix=t,a.func=r,a.context=n,a.count=0,a}return{result:e,keyPrefix:t,func:r,context:n,count:0}}function O(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>I.length&&I.push(e)}function R(e,t,r){return null==e?0:function e(t,r,n,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case o:l=!0}}if(l)return n(a,t,""===r?"."+F(t,0):r),1;if(l=0,r=""===r?".":r+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=r+F(s=t[c],c);l+=e(s,u,n,a)}else if(null===t||"object"!=typeof t?u=null:u="function"==typeof(u=v&&t[v]||t["@@iterator"])?u:null,"function"==typeof u)for(t=u.call(t),c=0;!(s=t.next()).done;)l+=e(s=s.value,u=r+F(s,c++),n,a);else"object"===s&&y("31","[object Object]"===(n=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":n,"");return l}(e,"",t,r)}function F(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function z(e,t){e.func.call(e.context,t,e.count++)}function N(e,t,r){var n=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?j(e,n,r,(function(e){return e})):null!=e&&(E(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+r)),n.push(e))}function j(e,t,r,n,a){var i="";null!=r&&(i=(""+r).replace(D,"$&/")+"/"),R(e,N,t=P(t,i,n,a)),O(t)}function B(){var e=T.current;return null===e&&y("321"),e}var Y={Children:{map:function(e,t,r){if(null==e)return e;var n=[];return j(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;R(e,z,t=P(null,null,t,r)),O(t)},count:function(e){return R(e,(function(){return null}),null)},toArray:function(e){var t=[];return j(e,t,null,(function(e){return e})),t},only:function(e){return E(e)||y("143"),e}},createRef:function(){return{current:null}},Component:x,PureComponent:k,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:h,render:e}},lazy:function(e){return{$$typeof:g,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return B().useCallback(e,t)},useContext:function(e,t){return B().useContext(e,t)},useEffect:function(e,t){return B().useEffect(e,t)},useImperativeHandle:function(e,t,r){return B().useImperativeHandle(e,t,r)},useDebugValue:function(){},useLayoutEffect:function(e,t){return B().useLayoutEffect(e,t)},useMemo:function(e,t){return B().useMemo(e,t)},useReducer:function(e,t,r){return B().useReducer(e,t,r)},useRef:function(e){return B().useRef(e)},useState:function(e){return B().useState(e)},Fragment:s,StrictMode:l,Suspense:f,createElement:A,cloneElement:function(e,t,r){null==e&&y("267",e);var a=void 0,o=n({},e.props),s=e.key,l=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,c=C.current),void 0!==t.key&&(s=""+t.key);var u=void 0;for(a in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)S.call(t,a)&&!L.hasOwnProperty(a)&&(o[a]=void 0===t[a]&&void 0!==u?u[a]:t[a])}if(1===(a=arguments.length-2))o.children=r;else if(1<a){u=Array(a);for(var d=0;d<a;d++)u[d]=arguments[d+2];o.children=u}return{$$typeof:i,type:e.type,key:s,ref:l,props:o,_owner:c}},createFactory:function(e){var t=A.bind(null,e);return t.type=e,t},isValidElement:E,version:"16.8.6",unstable_ConcurrentMode:p,unstable_Profiler:c,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:T,ReactCurrentOwner:C,assign:n}},H={default:Y},V=H&&Y||H;e.exports=V.default||V},function(e,t,r){"use strict";
/** @license React v16.8.6
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n=r(0),a=r(102),i=r(288);function o(e){for(var t=arguments.length-1,r="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=0;n<t;n++)r+="&args[]="+encodeURIComponent(arguments[n+1]);!function(e,t,r,n,a,i,o,s){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,a,i,o,s],c=0;(e=Error(t.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",r)}function s(e,t,r,n,a,i,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(e){this.onError(e)}}n||o("227");var l=!1,c=null,u=!1,d=null,p={onError:function(e){l=!0,c=e}};function h(e,t,r,n,a,i,o,u,d){l=!1,c=null,s.apply(p,arguments)}var f=null,m={};function g(){if(f)for(var e in m){var t=m[e],r=f.indexOf(e);if(-1<r||o("96",e),!y[r])for(var n in t.extractEvents||o("97",e),y[r]=t,r=t.eventTypes){var a=void 0,i=r[n],s=t,l=n;b.hasOwnProperty(l)&&o("99",l),b[l]=i;var c=i.phasedRegistrationNames;if(c){for(a in c)c.hasOwnProperty(a)&&v(c[a],s,l);a=!0}else i.registrationName?(v(i.registrationName,s,l),a=!0):a=!1;a||o("98",n,e)}}}function v(e,t,r){_[e]&&o("100",e),_[e]=t,x[e]=t.eventTypes[r].dependencies}var y=[],b={},_={},x={},w=null,k=null,M=null;function T(e,t,r){var n=e.type||"unknown-event";e.currentTarget=M(r),function(e,t,r,n,a,i,s,p,f){if(h.apply(this,arguments),l){if(l){var m=c;l=!1,c=null}else o("198"),m=void 0;u||(u=!0,d=m)}}(n,t,void 0,e),e.currentTarget=null}function C(e,t){return null==t&&o("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function S(e,t,r){Array.isArray(e)?e.forEach(t,r):e&&t.call(r,e)}var L=null;function A(e){if(e){var t=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(t))for(var n=0;n<t.length&&!e.isPropagationStopped();n++)T(e,t[n],r[n]);else t&&T(e,t,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}var E={injectEventPluginOrder:function(e){f&&o("101"),f=Array.prototype.slice.call(e),g()},injectEventPluginsByName:function(e){var t,r=!1;for(t in e)if(e.hasOwnProperty(t)){var n=e[t];m.hasOwnProperty(t)&&m[t]===n||(m[t]&&o("102",t),m[t]=n,r=!0)}r&&g()}};function D(e,t){var r=e.stateNode;if(!r)return null;var n=w(r);if(!n)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(n=!n.disabled)||(n=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!n;break e;default:e=!1}return e?null:(r&&"function"!=typeof r&&o("231",t,typeof r),r)}function I(e){if(null!==e&&(L=C(L,e)),e=L,L=null,e&&(S(e,A),L&&o("95"),u))throw e=d,u=!1,d=null,e}var P=Math.random().toString(36).slice(2),O="__reactInternalInstance$"+P,R="__reactEventHandlers$"+P;function F(e){if(e[O])return e[O];for(;!e[O];){if(!e.parentNode)return null;e=e.parentNode}return 5===(e=e[O]).tag||6===e.tag?e:null}function z(e){return!(e=e[O])||5!==e.tag&&6!==e.tag?null:e}function N(e){if(5===e.tag||6===e.tag)return e.stateNode;o("33")}function j(e){return e[R]||null}function B(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Y(e,t,r){(t=D(e,r.dispatchConfig.phasedRegistrationNames[t]))&&(r._dispatchListeners=C(r._dispatchListeners,t),r._dispatchInstances=C(r._dispatchInstances,e))}function H(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,r=[];t;)r.push(t),t=B(t);for(t=r.length;0<t--;)Y(r[t],"captured",e);for(t=0;t<r.length;t++)Y(r[t],"bubbled",e)}}function V(e,t,r){e&&r&&r.dispatchConfig.registrationName&&(t=D(e,r.dispatchConfig.registrationName))&&(r._dispatchListeners=C(r._dispatchListeners,t),r._dispatchInstances=C(r._dispatchInstances,e))}function U(e){e&&e.dispatchConfig.registrationName&&V(e._targetInst,null,e)}function W(e){S(e,H)}var G=!("undefined"==typeof window||!window.document||!window.document.createElement);function q(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var K={animationend:q("Animation","AnimationEnd"),animationiteration:q("Animation","AnimationIteration"),animationstart:q("Animation","AnimationStart"),transitionend:q("Transition","TransitionEnd")},X={},Z={};function J(e){if(X[e])return X[e];if(!K[e])return e;var t,r=K[e];for(t in r)if(r.hasOwnProperty(t)&&t in Z)return X[e]=r[t];return e}G&&(Z=document.createElement("div").style,"AnimationEvent"in window||(delete K.animationend.animation,delete K.animationiteration.animation,delete K.animationstart.animation),"TransitionEvent"in window||delete K.transitionend.transition);var $=J("animationend"),Q=J("animationiteration"),ee=J("animationstart"),te=J("transitionend"),re="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ne=null,ae=null,ie=null;function oe(){if(ie)return ie;var e,t,r=ae,n=r.length,a="value"in ne?ne.value:ne.textContent,i=a.length;for(e=0;e<n&&r[e]===a[e];e++);var o=n-e;for(t=1;t<=o&&r[n-t]===a[i-t];t++);return ie=a.slice(e,1<t?1-t:void 0)}function se(){return!0}function le(){return!1}function ce(e,t,r,n){for(var a in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=r,e=this.constructor.Interface)e.hasOwnProperty(a)&&((t=e[a])?this[a]=t(r):"target"===a?this.target=n:this[a]=r[a]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?se:le,this.isPropagationStopped=le,this}function ue(e,t,r,n){if(this.eventPool.length){var a=this.eventPool.pop();return this.call(a,e,t,r,n),a}return new this(e,t,r,n)}function de(e){e instanceof this||o("279"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function pe(e){e.eventPool=[],e.getPooled=ue,e.release=de}a(ce.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=se)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=se)},persist:function(){this.isPersistent=se},isPersistent:le,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=le,this._dispatchInstances=this._dispatchListeners=null}}),ce.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ce.extend=function(e){function t(){}function r(){return n.apply(this,arguments)}var n=this;t.prototype=n.prototype;var i=new t;return a(i,r.prototype),r.prototype=i,r.prototype.constructor=r,r.Interface=a({},n.Interface,e),r.extend=n.extend,pe(r),r},pe(ce);var he=ce.extend({data:null}),fe=ce.extend({data:null}),me=[9,13,27,32],ge=G&&"CompositionEvent"in window,ve=null;G&&"documentMode"in document&&(ve=document.documentMode);var ye=G&&"TextEvent"in window&&!ve,be=G&&(!ge||ve&&8<ve&&11>=ve),_e=String.fromCharCode(32),xe={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},we=!1;function ke(e,t){switch(e){case"keyup":return-1!==me.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Me(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Te=!1;var Ce={eventTypes:xe,extractEvents:function(e,t,r,n){var a=void 0,i=void 0;if(ge)e:{switch(e){case"compositionstart":a=xe.compositionStart;break e;case"compositionend":a=xe.compositionEnd;break e;case"compositionupdate":a=xe.compositionUpdate;break e}a=void 0}else Te?ke(e,r)&&(a=xe.compositionEnd):"keydown"===e&&229===r.keyCode&&(a=xe.compositionStart);return a?(be&&"ko"!==r.locale&&(Te||a!==xe.compositionStart?a===xe.compositionEnd&&Te&&(i=oe()):(ae="value"in(ne=n)?ne.value:ne.textContent,Te=!0)),a=he.getPooled(a,t,r,n),i?a.data=i:null!==(i=Me(r))&&(a.data=i),W(a),i=a):i=null,(e=ye?function(e,t){switch(e){case"compositionend":return Me(t);case"keypress":return 32!==t.which?null:(we=!0,_e);case"textInput":return(e=t.data)===_e&&we?null:e;default:return null}}(e,r):function(e,t){if(Te)return"compositionend"===e||!ge&&ke(e,t)?(e=oe(),ie=ae=ne=null,Te=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return be&&"ko"!==t.locale?null:t.data;default:return null}}(e,r))?((t=fe.getPooled(xe.beforeInput,t,r,n)).data=e,W(t)):t=null,null===i?t:null===t?i:[i,t]}},Se=null,Le=null,Ae=null;function Ee(e){if(e=k(e)){"function"!=typeof Se&&o("280");var t=w(e.stateNode);Se(e.stateNode,e.type,t)}}function De(e){Le?Ae?Ae.push(e):Ae=[e]:Le=e}function Ie(){if(Le){var e=Le,t=Ae;if(Ae=Le=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Pe(e,t){return e(t)}function Oe(e,t,r){return e(t,r)}function Re(){}var Fe=!1;function ze(e,t){if(Fe)return e(t);Fe=!0;try{return Pe(e,t)}finally{Fe=!1,(null!==Le||null!==Ae)&&(Re(),Ie())}}var Ne={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function je(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ne[e.type]:"textarea"===t}function Be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function Ye(e){if(!G)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}function He(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ve(e){e._valueTracker||(e._valueTracker=function(e){var t=He(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ue(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=He(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}var We=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;We.hasOwnProperty("ReactCurrentDispatcher")||(We.ReactCurrentDispatcher={current:null});var Ge=/^(.*)[\\\/]/,qe="function"==typeof Symbol&&Symbol.for,Ke=qe?Symbol.for("react.element"):60103,Xe=qe?Symbol.for("react.portal"):60106,Ze=qe?Symbol.for("react.fragment"):60107,Je=qe?Symbol.for("react.strict_mode"):60108,$e=qe?Symbol.for("react.profiler"):60114,Qe=qe?Symbol.for("react.provider"):60109,et=qe?Symbol.for("react.context"):60110,tt=qe?Symbol.for("react.concurrent_mode"):60111,rt=qe?Symbol.for("react.forward_ref"):60112,nt=qe?Symbol.for("react.suspense"):60113,at=qe?Symbol.for("react.memo"):60115,it=qe?Symbol.for("react.lazy"):60116,ot="function"==typeof Symbol&&Symbol.iterator;function st(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=ot&&e[ot]||e["@@iterator"])?e:null}function lt(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case tt:return"ConcurrentMode";case Ze:return"Fragment";case Xe:return"Portal";case $e:return"Profiler";case Je:return"StrictMode";case nt:return"Suspense"}if("object"==typeof e)switch(e.$$typeof){case et:return"Context.Consumer";case Qe:return"Context.Provider";case rt:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case at:return lt(e.type);case it:if(e=1===e._status?e._result:null)return lt(e)}return null}function ct(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var r="";break e;default:var n=e._debugOwner,a=e._debugSource,i=lt(e.type);r=null,n&&(r=lt(n.type)),n=i,i="",a?i=" (at "+a.fileName.replace(Ge,"")+":"+a.lineNumber+")":r&&(i=" (created by "+r+")"),r="\n    in "+(n||"Unknown")+i}t+=r,e=e.return}while(e);return t}var ut=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,dt=Object.prototype.hasOwnProperty,pt={},ht={};function ft(e,t,r,n,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t}var mt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){mt[e]=new ft(e,0,!1,e,null)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];mt[t]=new ft(t,1,!1,e[1],null)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){mt[e]=new ft(e,2,!1,e.toLowerCase(),null)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){mt[e]=new ft(e,2,!1,e,null)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){mt[e]=new ft(e,3,!1,e.toLowerCase(),null)})),["checked","multiple","muted","selected"].forEach((function(e){mt[e]=new ft(e,3,!0,e,null)})),["capture","download"].forEach((function(e){mt[e]=new ft(e,4,!1,e,null)})),["cols","rows","size","span"].forEach((function(e){mt[e]=new ft(e,6,!1,e,null)})),["rowSpan","start"].forEach((function(e){mt[e]=new ft(e,5,!1,e.toLowerCase(),null)}));var gt=/[\-:]([a-z])/g;function vt(e){return e[1].toUpperCase()}function yt(e,t,r,n){var a=mt.hasOwnProperty(t)?mt[t]:null;(null!==a?0===a.type:!n&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,r,n){if(null==t||function(e,t,r,n){if(null!==r&&0===r.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==r?!r.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,r,a,n)&&(r=null),n||null===a?function(e){return!!dt.call(ht,e)||!dt.call(pt,e)&&(ut.test(e)?ht[e]=!0:(pt[e]=!0,!1))}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=null===r?3!==a.type&&"":r:(t=a.attributeName,n=a.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(a=a.type)||4===a&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}function bt(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function _t(e,t){var r=t.checked;return a({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function xt(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=bt(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function wt(e,t){null!=(t=t.checked)&&yt(e,"checked",t,!1)}function kt(e,t){wt(e,t);var r=bt(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?Tt(e,t.type,r):t.hasOwnProperty("defaultValue")&&Tt(e,t.type,bt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Mt(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function Tt(e,t,r){"number"===t&&e.ownerDocument.activeElement===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(gt,vt);mt[t]=new ft(t,1,!1,e,null)})),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(gt,vt);mt[t]=new ft(t,1,!1,e,"http://www.w3.org/1999/xlink")})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(gt,vt);mt[t]=new ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")})),["tabIndex","crossOrigin"].forEach((function(e){mt[e]=new ft(e,1,!1,e.toLowerCase(),null)}));var Ct={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function St(e,t,r){return(e=ce.getPooled(Ct.change,e,t,r)).type="change",De(r),W(e),e}var Lt=null,At=null;function Et(e){I(e)}function Dt(e){if(Ue(N(e)))return e}function It(e,t){if("change"===e)return t}var Pt=!1;function Ot(){Lt&&(Lt.detachEvent("onpropertychange",Rt),At=Lt=null)}function Rt(e){"value"===e.propertyName&&Dt(At)&&ze(Et,e=St(At,e,Be(e)))}function Ft(e,t,r){"focus"===e?(Ot(),At=r,(Lt=t).attachEvent("onpropertychange",Rt)):"blur"===e&&Ot()}function zt(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Dt(At)}function Nt(e,t){if("click"===e)return Dt(t)}function jt(e,t){if("input"===e||"change"===e)return Dt(t)}G&&(Pt=Ye("input")&&(!document.documentMode||9<document.documentMode));var Bt={eventTypes:Ct,_isInputEventSupported:Pt,extractEvents:function(e,t,r,n){var a=t?N(t):window,i=void 0,o=void 0,s=a.nodeName&&a.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===a.type?i=It:je(a)?Pt?i=jt:(i=zt,o=Ft):(s=a.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(i=Nt),i&&(i=i(e,t)))return St(i,r,n);o&&o(e,a,t),"blur"===e&&(e=a._wrapperState)&&e.controlled&&"number"===a.type&&Tt(a,"number",a.value)}},Yt=ce.extend({view:null,detail:null}),Ht={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vt(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ht[e])&&!!t[e]}function Ut(){return Vt}var Wt=0,Gt=0,qt=!1,Kt=!1,Xt=Yt.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Ut,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Wt;return Wt=e.screenX,qt?"mousemove"===e.type?e.screenX-t:0:(qt=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Gt;return Gt=e.screenY,Kt?"mousemove"===e.type?e.screenY-t:0:(Kt=!0,0)}}),Zt=Xt.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Jt={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},$t={eventTypes:Jt,extractEvents:function(e,t,r,n){var a="mouseover"===e||"pointerover"===e,i="mouseout"===e||"pointerout"===e;if(a&&(r.relatedTarget||r.fromElement)||!i&&!a)return null;if(a=n.window===n?n:(a=n.ownerDocument)?a.defaultView||a.parentWindow:window,i?(i=t,t=(t=r.relatedTarget||r.toElement)?F(t):null):i=null,i===t)return null;var o=void 0,s=void 0,l=void 0,c=void 0;"mouseout"===e||"mouseover"===e?(o=Xt,s=Jt.mouseLeave,l=Jt.mouseEnter,c="mouse"):"pointerout"!==e&&"pointerover"!==e||(o=Zt,s=Jt.pointerLeave,l=Jt.pointerEnter,c="pointer");var u=null==i?a:N(i);if(a=null==t?a:N(t),(e=o.getPooled(s,i,r,n)).type=c+"leave",e.target=u,e.relatedTarget=a,(r=o.getPooled(l,t,r,n)).type=c+"enter",r.target=a,r.relatedTarget=u,n=t,i&&n)e:{for(a=n,c=0,o=t=i;o;o=B(o))c++;for(o=0,l=a;l;l=B(l))o++;for(;0<c-o;)t=B(t),c--;for(;0<o-c;)a=B(a),o--;for(;c--;){if(t===a||t===a.alternate)break e;t=B(t),a=B(a)}t=null}else t=null;for(a=t,t=[];i&&i!==a&&(null===(c=i.alternate)||c!==a);)t.push(i),i=B(i);for(i=[];n&&n!==a&&(null===(c=n.alternate)||c!==a);)i.push(n),n=B(n);for(n=0;n<t.length;n++)V(t[n],"bubbled",e);for(n=i.length;0<n--;)V(i[n],"captured",r);return[e,r]}};function Qt(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var er=Object.prototype.hasOwnProperty;function tr(e,t){if(Qt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++)if(!er.call(t,r[n])||!Qt(e[r[n]],t[r[n]]))return!1;return!0}function rr(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(0!=(2&(t=t.return).effectTag))return 1}return 3===t.tag?2:3}function nr(e){2!==rr(e)&&o("188")}function ar(e){if(!(e=function(e){var t=e.alternate;if(!t)return 3===(t=rr(e))&&o("188"),1===t?null:e;for(var r=e,n=t;;){var a=r.return,i=a?a.alternate:null;if(!a||!i)break;if(a.child===i.child){for(var s=a.child;s;){if(s===r)return nr(a),e;if(s===n)return nr(a),t;s=s.sibling}o("188")}if(r.return!==n.return)r=a,n=i;else{s=!1;for(var l=a.child;l;){if(l===r){s=!0,r=a,n=i;break}if(l===n){s=!0,n=a,r=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===r){s=!0,r=i,n=a;break}if(l===n){s=!0,n=i,r=a;break}l=l.sibling}s||o("189")}}r.alternate!==n&&o("190")}return 3!==r.tag&&o("188"),r.stateNode.current===r?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}var ir=ce.extend({animationName:null,elapsedTime:null,pseudoElement:null}),or=ce.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sr=Yt.extend({relatedTarget:null});function lr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var cr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ur={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},dr=Yt.extend({key:function(e){if(e.key){var t=cr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=lr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ur[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Ut,charCode:function(e){return"keypress"===e.type?lr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?lr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),pr=Xt.extend({dataTransfer:null}),hr=Yt.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Ut}),fr=ce.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),mr=Xt.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),gr=[["abort","abort"],[$,"animationEnd"],[Q,"animationIteration"],[ee,"animationStart"],["canplay","canPlay"],["canplaythrough","canPlayThrough"],["drag","drag"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["gotpointercapture","gotPointerCapture"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["loadstart","loadStart"],["lostpointercapture","lostPointerCapture"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["playing","playing"],["pointermove","pointerMove"],["pointerout","pointerOut"],["pointerover","pointerOver"],["progress","progress"],["scroll","scroll"],["seeking","seeking"],["stalled","stalled"],["suspend","suspend"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchmove","touchMove"],[te,"transitionEnd"],["waiting","waiting"],["wheel","wheel"]],vr={},yr={};function br(e,t){var r=e[0],n="on"+((e=e[1])[0].toUpperCase()+e.slice(1));t={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r],isInteractive:t},vr[e]=t,yr[r]=t}[["blur","blur"],["cancel","cancel"],["click","click"],["close","close"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["auxclick","auxClick"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragstart","dragStart"],["drop","drop"],["focus","focus"],["input","input"],["invalid","invalid"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["mousedown","mouseDown"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["pointercancel","pointerCancel"],["pointerdown","pointerDown"],["pointerup","pointerUp"],["ratechange","rateChange"],["reset","reset"],["seeked","seeked"],["submit","submit"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchstart","touchStart"],["volumechange","volumeChange"]].forEach((function(e){br(e,!0)})),gr.forEach((function(e){br(e,!1)}));var _r={eventTypes:vr,isInteractiveTopLevelEventType:function(e){return void 0!==(e=yr[e])&&!0===e.isInteractive},extractEvents:function(e,t,r,n){var a=yr[e];if(!a)return null;switch(e){case"keypress":if(0===lr(r))return null;case"keydown":case"keyup":e=dr;break;case"blur":case"focus":e=sr;break;case"click":if(2===r.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Xt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=pr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=hr;break;case $:case Q:case ee:e=ir;break;case te:e=fr;break;case"scroll":e=Yt;break;case"wheel":e=mr;break;case"copy":case"cut":case"paste":e=or;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Zt;break;default:e=ce}return W(t=e.getPooled(a,t,r,n)),t}},xr=_r.isInteractiveTopLevelEventType,wr=[];function kr(e){var t=e.targetInst,r=t;do{if(!r){e.ancestors.push(r);break}var n;for(n=r;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(r),r=F(n)}while(r);for(r=0;r<e.ancestors.length;r++){t=e.ancestors[r];var a=Be(e.nativeEvent);n=e.topLevelType;for(var i=e.nativeEvent,o=null,s=0;s<y.length;s++){var l=y[s];l&&(l=l.extractEvents(n,t,i,a))&&(o=C(o,l))}I(o)}}var Mr=!0;function Tr(e,t){if(!t)return null;var r=(xr(e)?Sr:Lr).bind(null,e);t.addEventListener(e,r,!1)}function Cr(e,t){if(!t)return null;var r=(xr(e)?Sr:Lr).bind(null,e);t.addEventListener(e,r,!0)}function Sr(e,t){Oe(Lr,e,t)}function Lr(e,t){if(Mr){var r=Be(t);if(null===(r=F(r))||"number"!=typeof r.tag||2===rr(r)||(r=null),wr.length){var n=wr.pop();n.topLevelType=e,n.nativeEvent=t,n.targetInst=r,e=n}else e={topLevelType:e,nativeEvent:t,targetInst:r,ancestors:[]};try{ze(kr,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>wr.length&&wr.push(e)}}}var Ar={},Er=0,Dr="_reactListenersID"+(""+Math.random()).slice(2);function Ir(e){return Object.prototype.hasOwnProperty.call(e,Dr)||(e[Dr]=Er++,Ar[e[Dr]]={}),Ar[e[Dr]]}function Pr(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var r,n=Or(e);for(e=0;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Or(n)}}function Fr(){for(var e=window,t=Pr();t instanceof e.HTMLIFrameElement;){try{var r="string"==typeof t.contentWindow.location.href}catch(e){r=!1}if(!r)break;t=Pr((e=t.contentWindow).document)}return t}function zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Nr(e){var t=Fr(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&function e(t,r){return!(!t||!r)&&(t===r||(!t||3!==t.nodeType)&&(r&&3===r.nodeType?e(t,r.parentNode):"contains"in t?t.contains(r):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(r))))}(r.ownerDocument.documentElement,r)){if(null!==n&&zr(r))if(t=n.start,void 0===(e=n.end)&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if((e=(t=r.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=void 0===n.end?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=Rr(r,i);var o=Rr(r,n);a&&o&&(1!==e.rangeCount||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=r;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof r.focus&&r.focus(),r=0;r<t.length;r++)(e=t[r]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var jr=G&&"documentMode"in document&&11>=document.documentMode,Br={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Yr=null,Hr=null,Vr=null,Ur=!1;function Wr(e,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Ur||null==Yr||Yr!==Pr(r)?null:("selectionStart"in(r=Yr)&&zr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Vr&&tr(Vr,r)?null:(Vr=r,(e=ce.getPooled(Br.select,Hr,e,t)).type="select",e.target=Yr,W(e),e))}var Gr={eventTypes:Br,extractEvents:function(e,t,r,n){var a,i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;if(!(a=!i)){e:{i=Ir(i),a=x.onSelect;for(var o=0;o<a.length;o++){var s=a[o];if(!i.hasOwnProperty(s)||!i[s]){i=!1;break e}}i=!0}a=!i}if(a)return null;switch(i=t?N(t):window,e){case"focus":(je(i)||"true"===i.contentEditable)&&(Yr=i,Hr=t,Vr=null);break;case"blur":Vr=Hr=Yr=null;break;case"mousedown":Ur=!0;break;case"contextmenu":case"mouseup":case"dragend":return Ur=!1,Wr(r,n);case"selectionchange":if(jr)break;case"keydown":case"keyup":return Wr(r,n)}return null}};function qr(e,t){return e=a({children:void 0},t),(t=function(e){var t="";return n.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Kr(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+bt(r),t=null,a=0;a<e.length;a++){if(e[a].value===r)return e[a].selected=!0,void(n&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function Xr(e,t){return null!=t.dangerouslySetInnerHTML&&o("91"),a({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Zr(e,t){var r=t.value;null==r&&(r=t.defaultValue,null!=(t=t.children)&&(null!=r&&o("92"),Array.isArray(t)&&(1>=t.length||o("93"),t=t[0]),r=t),null==r&&(r="")),e._wrapperState={initialValue:bt(r)}}function Jr(e,t){var r=bt(t.value),n=bt(t.defaultValue);null!=r&&((r=""+r)!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r)),null!=n&&(e.defaultValue=""+n)}function $r(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}E.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w=j,k=z,M=N,E.injectEventPluginsByName({SimpleEventPlugin:_r,EnterLeaveEventPlugin:$t,ChangeEventPlugin:Bt,SelectEventPlugin:Gr,BeforeInputEventPlugin:Ce});var Qr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function en(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function tn(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?en(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var rn=void 0,nn=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction((function(){return e(t,r)}))}:e}((function(e,t){if(e.namespaceURI!==Qr.svg||"innerHTML"in e)e.innerHTML=t;else{for((rn=rn||document.createElement("div")).innerHTML="<svg>"+t+"</svg>",t=rn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function an(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var on={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sn=["Webkit","ms","Moz","O"];function ln(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||on.hasOwnProperty(e)&&on[e]?(""+t).trim():t+"px"}function cn(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),a=ln(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}Object.keys(on).forEach((function(e){sn.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),on[t]=on[e]}))}));var un=a({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function dn(e,t){t&&(un[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&o("137",e,""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&o("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||o("61")),null!=t.style&&"object"!=typeof t.style&&o("62",""))}function pn(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function hn(e,t){var r=Ir(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=x[t];for(var n=0;n<t.length;n++){var a=t[n];if(!r.hasOwnProperty(a)||!r[a]){switch(a){case"scroll":Cr("scroll",e);break;case"focus":case"blur":Cr("focus",e),Cr("blur",e),r.blur=!0,r.focus=!0;break;case"cancel":case"close":Ye(a)&&Cr(a,e);break;case"invalid":case"submit":case"reset":break;default:-1===re.indexOf(a)&&Tr(a,e)}r[a]=!0}}}function fn(){}var mn=null,gn=null;function vn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function yn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"==typeof setTimeout?setTimeout:void 0,_n="function"==typeof clearTimeout?clearTimeout:void 0,xn=i.unstable_scheduleCallback,wn=i.unstable_cancelCallback;function kn(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}function Mn(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e}new Set;var Tn=[],Cn=-1;function Sn(e){0>Cn||(e.current=Tn[Cn],Tn[Cn]=null,Cn--)}function Ln(e,t){Cn++,Tn[Cn]=e.current,e.current=t}var An={},En={current:An},Dn={current:!1},In=An;function Pn(e,t){var r=e.type.contextTypes;if(!r)return An;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a,i={};for(a in r)i[a]=t[a];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function On(e){return null!=(e=e.childContextTypes)}function Rn(e){Sn(Dn),Sn(En)}function Fn(e){Sn(Dn),Sn(En)}function zn(e,t,r){En.current!==An&&o("168"),Ln(En,t),Ln(Dn,r)}function Nn(e,t,r){var n=e.stateNode;if(e=t.childContextTypes,"function"!=typeof n.getChildContext)return r;for(var i in n=n.getChildContext())i in e||o("108",lt(t)||"Unknown",i);return a({},r,n)}function jn(e){var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||An,In=En.current,Ln(En,t),Ln(Dn,Dn.current),!0}function Bn(e,t,r){var n=e.stateNode;n||o("169"),r?(t=Nn(e,t,In),n.__reactInternalMemoizedMergedChildContext=t,Sn(Dn),Sn(En),Ln(En,t)):Sn(Dn),Ln(Dn,r)}var Yn=null,Hn=null;function Vn(e){return function(t){try{return e(t)}catch(e){}}}function Un(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.contextDependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Wn(e,t,r,n){return new Un(e,t,r,n)}function Gn(e){return!(!(e=e.prototype)||!e.isReactComponent)}function qn(e,t){var r=e.alternate;return null===r?((r=Wn(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.childExpirationTime=e.childExpirationTime,r.expirationTime=e.expirationTime,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.contextDependencies=e.contextDependencies,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Kn(e,t,r,n,a,i){var s=2;if(n=e,"function"==typeof e)Gn(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case Ze:return Xn(r.children,a,i,t);case tt:return Zn(r,3|a,i,t);case Je:return Zn(r,2|a,i,t);case $e:return(e=Wn(12,r,t,4|a)).elementType=$e,e.type=$e,e.expirationTime=i,e;case nt:return(e=Wn(13,r,t,a)).elementType=nt,e.type=nt,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Qe:s=10;break e;case et:s=9;break e;case rt:s=11;break e;case at:s=14;break e;case it:s=16,n=null;break e}o("130",null==e?e:typeof e,"")}return(t=Wn(s,r,t,a)).elementType=e,t.type=n,t.expirationTime=i,t}function Xn(e,t,r,n){return(e=Wn(7,e,n,t)).expirationTime=r,e}function Zn(e,t,r,n){return e=Wn(8,e,n,t),t=0==(1&t)?Je:tt,e.elementType=t,e.type=t,e.expirationTime=r,e}function Jn(e,t,r){return(e=Wn(6,e,null,t)).expirationTime=r,e}function $n(e,t,r){return(t=Wn(4,null!==e.children?e.children:[],e.key,t)).expirationTime=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qn(e,t){e.didError=!1;var r=e.earliestPendingTime;0===r?e.earliestPendingTime=e.latestPendingTime=t:r<t?e.earliestPendingTime=t:e.latestPendingTime>t&&(e.latestPendingTime=t),ra(t,e)}function ea(e,t){e.didError=!1,e.latestPingedTime>=t&&(e.latestPingedTime=0);var r=e.earliestPendingTime,n=e.latestPendingTime;r===t?e.earliestPendingTime=n===t?e.latestPendingTime=0:n:n===t&&(e.latestPendingTime=r),r=e.earliestSuspendedTime,n=e.latestSuspendedTime,0===r?e.earliestSuspendedTime=e.latestSuspendedTime=t:r<t?e.earliestSuspendedTime=t:n>t&&(e.latestSuspendedTime=t),ra(t,e)}function ta(e,t){var r=e.earliestPendingTime;return r>t&&(t=r),(e=e.earliestSuspendedTime)>t&&(t=e),t}function ra(e,t){var r=t.earliestSuspendedTime,n=t.latestSuspendedTime,a=t.earliestPendingTime,i=t.latestPingedTime;0===(a=0!==a?a:i)&&(0===e||n<e)&&(a=n),0!==(e=a)&&r>e&&(e=r),t.nextExpirationTimeToWorkOn=a,t.expirationTime=e}function na(e,t){if(e&&e.defaultProps)for(var r in t=a({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t}var aa=(new n.Component).refs;function ia(e,t,r,n){r=null==(r=r(n,t=e.memoizedState))?t:a({},t,r),e.memoizedState=r,null!==(n=e.updateQueue)&&0===e.expirationTime&&(n.baseState=r)}var oa={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===rr(e)},enqueueSetState:function(e,t,r){e=e._reactInternalFiber;var n=Ts(),a=Xi(n=Zo(n,e));a.payload=t,null!=r&&(a.callback=r),Uo(),Ji(e,a),es(e,n)},enqueueReplaceState:function(e,t,r){e=e._reactInternalFiber;var n=Ts(),a=Xi(n=Zo(n,e));a.tag=Vi,a.payload=t,null!=r&&(a.callback=r),Uo(),Ji(e,a),es(e,n)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var r=Ts(),n=Xi(r=Zo(r,e));n.tag=Ui,null!=t&&(n.callback=t),Uo(),Ji(e,n),es(e,r)}};function sa(e,t,r,n,a,i,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,i,o):!t.prototype||!t.prototype.isPureReactComponent||(!tr(r,n)||!tr(a,i))}function la(e,t,r){var n=!1,a=An,i=t.contextType;return"object"==typeof i&&null!==i?i=Yi(i):(a=On(t)?In:En.current,i=(n=null!=(n=t.contextTypes))?Pn(e,a):An),t=new t(r,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=oa,e.stateNode=t,t._reactInternalFiber=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function ca(e,t,r,n){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&oa.enqueueReplaceState(t,t.state,null)}function ua(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs=aa;var i=t.contextType;"object"==typeof i&&null!==i?a.context=Yi(i):(i=On(t)?In:En.current,a.context=Pn(e,i)),null!==(i=e.updateQueue)&&(to(e,i,r,a,n),a.state=e.memoizedState),"function"==typeof(i=t.getDerivedStateFromProps)&&(ia(e,t,i,r),a.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(t=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),t!==a.state&&oa.enqueueReplaceState(a,a.state,null),null!==(i=e.updateQueue)&&(to(e,i,r,a,n),a.state=e.memoizedState)),"function"==typeof a.componentDidMount&&(e.effectTag|=4)}var da=Array.isArray;function pa(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){r=r._owner;var n=void 0;r&&(1!==r.tag&&o("309"),n=r.stateNode),n||o("147",e);var a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=n.refs;t===aa&&(t=n.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}"string"!=typeof e&&o("284"),r._owner||o("290",e)}return e}function ha(e,t){"textarea"!==e.type&&o("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function fa(e){function t(t,r){if(e){var n=t.lastEffect;null!==n?(n.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r,r.nextEffect=null,r.effectTag=8}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null}function n(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t,r){return(e=qn(e,t)).index=0,e.sibling=null,e}function i(t,r,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<r?(t.effectTag=2,r):n:(t.effectTag=2,r):r}function s(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,r,n){return null===t||6!==t.tag?((t=Jn(r,e.mode,n)).return=e,t):((t=a(t,r)).return=e,t)}function c(e,t,r,n){return null!==t&&t.elementType===r.type?((n=a(t,r.props)).ref=pa(e,t,r),n.return=e,n):((n=Kn(r.type,r.key,r.props,null,e.mode,n)).ref=pa(e,t,r),n.return=e,n)}function u(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?((t=$n(r,e.mode,n)).return=e,t):((t=a(t,r.children||[])).return=e,t)}function d(e,t,r,n,i){return null===t||7!==t.tag?((t=Xn(r,e.mode,n,i)).return=e,t):((t=a(t,r)).return=e,t)}function p(e,t,r){if("string"==typeof t||"number"==typeof t)return(t=Jn(""+t,e.mode,r)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Ke:return(r=Kn(t.type,t.key,t.props,null,e.mode,r)).ref=pa(e,null,t),r.return=e,r;case Xe:return(t=$n(t,e.mode,r)).return=e,t}if(da(t)||st(t))return(t=Xn(t,e.mode,r,null)).return=e,t;ha(e,t)}return null}function h(e,t,r,n){var a=null!==t?t.key:null;if("string"==typeof r||"number"==typeof r)return null!==a?null:l(e,t,""+r,n);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Ke:return r.key===a?r.type===Ze?d(e,t,r.props.children,n,a):c(e,t,r,n):null;case Xe:return r.key===a?u(e,t,r,n):null}if(da(r)||st(r))return null!==a?null:d(e,t,r,n,null);ha(e,r)}return null}function f(e,t,r,n,a){if("string"==typeof n||"number"==typeof n)return l(t,e=e.get(r)||null,""+n,a);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Ke:return e=e.get(null===n.key?r:n.key)||null,n.type===Ze?d(t,e,n.props.children,a,n.key):c(t,e,n,a);case Xe:return u(t,e=e.get(null===n.key?r:n.key)||null,n,a)}if(da(n)||st(n))return d(t,e=e.get(r)||null,n,a,null);ha(t,n)}return null}function m(a,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=h(a,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(a,d),o=i(v,o,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return r(a,d),c;if(null===d){for(;m<s.length;m++)(d=p(a,s[m],l))&&(o=i(d,o,m),null===u?c=d:u.sibling=d,u=d);return c}for(d=n(a,d);m<s.length;m++)(g=f(d,a,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=i(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(a,e)})),c}function g(a,s,l,c){var u=st(l);"function"!=typeof u&&o("150"),null==(l=u.call(l))&&o("151");for(var d=u=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=h(a,m,y.value,c);if(null===b){m||(m=v);break}e&&m&&null===b.alternate&&t(a,m),s=i(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return r(a,m),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=p(a,y.value,c))&&(s=i(y,s,g),null===d?u=y:d.sibling=y,d=y);return u}for(m=n(a,m);!y.done;g++,y=l.next())null!==(y=f(m,a,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=i(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(a,e)})),u}return function(e,n,i,l){var c="object"==typeof i&&null!==i&&i.type===Ze&&null===i.key;c&&(i=i.props.children);var u="object"==typeof i&&null!==i;if(u)switch(i.$$typeof){case Ke:e:{for(u=i.key,c=n;null!==c;){if(c.key===u){if(7===c.tag?i.type===Ze:c.elementType===i.type){r(e,c.sibling),(n=a(c,i.type===Ze?i.props.children:i.props)).ref=pa(e,c,i),n.return=e,e=n;break e}r(e,c);break}t(e,c),c=c.sibling}i.type===Ze?((n=Xn(i.props.children,e.mode,l,i.key)).return=e,e=n):((l=Kn(i.type,i.key,i.props,null,e.mode,l)).ref=pa(e,n,i),l.return=e,e=l)}return s(e);case Xe:e:{for(c=i.key;null!==n;){if(n.key===c){if(4===n.tag&&n.stateNode.containerInfo===i.containerInfo&&n.stateNode.implementation===i.implementation){r(e,n.sibling),(n=a(n,i.children||[])).return=e,e=n;break e}r(e,n);break}t(e,n),n=n.sibling}(n=$n(i,e.mode,l)).return=e,e=n}return s(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==n&&6===n.tag?(r(e,n.sibling),(n=a(n,i)).return=e,e=n):(r(e,n),(n=Jn(i,e.mode,l)).return=e,e=n),s(e);if(da(i))return m(e,n,i,l);if(st(i))return g(e,n,i,l);if(u&&ha(e,i),void 0===i&&!c)switch(e.tag){case 1:case 0:o("152",(l=e.type).displayName||l.name||"Component")}return r(e,n)}}var ma=fa(!0),ga=fa(!1),va={},ya={current:va},ba={current:va},_a={current:va};function xa(e){return e===va&&o("174"),e}function wa(e,t){Ln(_a,t),Ln(ba,e),Ln(ya,va);var r=t.nodeType;switch(r){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:tn(null,"");break;default:t=tn(t=(r=8===r?t.parentNode:t).namespaceURI||null,r=r.tagName)}Sn(ya),Ln(ya,t)}function ka(e){Sn(ya),Sn(ba),Sn(_a)}function Ma(e){xa(_a.current);var t=xa(ya.current),r=tn(t,e.type);t!==r&&(Ln(ba,e),Ln(ya,r))}function Ta(e){ba.current===e&&(Sn(ya),Sn(ba))}var Ca=0,Sa=2,La=4,Aa=8,Ea=16,Da=32,Ia=64,Pa=128,Oa=We.ReactCurrentDispatcher,Ra=0,Fa=null,za=null,Na=null,ja=null,Ba=null,Ya=null,Ha=0,Va=null,Ua=0,Wa=!1,Ga=null,qa=0;function Ka(){o("321")}function Xa(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Qt(e[r],t[r]))return!1;return!0}function Za(e,t,r,n,a,i){if(Ra=i,Fa=t,Na=null!==e?e.memoizedState:null,Oa.current=null===Na?ci:ui,t=r(n,a),Wa){do{Wa=!1,qa+=1,Na=null!==e?e.memoizedState:null,Ya=ja,Va=Ba=za=null,Oa.current=ui,t=r(n,a)}while(Wa);Ga=null,qa=0}return Oa.current=li,(e=Fa).memoizedState=ja,e.expirationTime=Ha,e.updateQueue=Va,e.effectTag|=Ua,e=null!==za&&null!==za.next,Ra=0,Ya=Ba=ja=Na=za=Fa=null,Ha=0,Va=null,Ua=0,e&&o("300"),t}function Ja(){Oa.current=li,Ra=0,Ya=Ba=ja=Na=za=Fa=null,Ha=0,Va=null,Ua=0,Wa=!1,Ga=null,qa=0}function $a(){var e={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};return null===Ba?ja=Ba=e:Ba=Ba.next=e,Ba}function Qa(){if(null!==Ya)Ya=(Ba=Ya).next,Na=null!==(za=Na)?za.next:null;else{null===Na&&o("310");var e={memoizedState:(za=Na).memoizedState,baseState:za.baseState,queue:za.queue,baseUpdate:za.baseUpdate,next:null};Ba=null===Ba?ja=e:Ba.next=e,Na=za.next}return Ba}function ei(e,t){return"function"==typeof t?t(e):t}function ti(e){var t=Qa(),r=t.queue;if(null===r&&o("311"),r.lastRenderedReducer=e,0<qa){var n=r.dispatch;if(null!==Ga){var a=Ga.get(r);if(void 0!==a){Ga.delete(r);var i=t.memoizedState;do{i=e(i,a.action),a=a.next}while(null!==a);return Qt(i,t.memoizedState)||(xi=!0),t.memoizedState=i,t.baseUpdate===r.last&&(t.baseState=i),r.lastRenderedState=i,[i,n]}}return[t.memoizedState,n]}n=r.last;var s=t.baseUpdate;if(i=t.baseState,null!==s?(null!==n&&(n.next=null),n=s.next):n=null!==n?n.next:null,null!==n){var l=a=null,c=n,u=!1;do{var d=c.expirationTime;d<Ra?(u||(u=!0,l=s,a=i),d>Ha&&(Ha=d)):i=c.eagerReducer===e?c.eagerState:e(i,c.action),s=c,c=c.next}while(null!==c&&c!==n);u||(l=s,a=i),Qt(i,t.memoizedState)||(xi=!0),t.memoizedState=i,t.baseUpdate=l,t.baseState=a,r.lastRenderedState=i}return[t.memoizedState,r.dispatch]}function ri(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},null===Va?(Va={lastEffect:null}).lastEffect=e.next=e:null===(t=Va.lastEffect)?Va.lastEffect=e.next=e:(r=t.next,t.next=e,e.next=r,Va.lastEffect=e),e}function ni(e,t,r,n){var a=$a();Ua|=e,a.memoizedState=ri(t,r,void 0,void 0===n?null:n)}function ai(e,t,r,n){var a=Qa();n=void 0===n?null:n;var i=void 0;if(null!==za){var o=za.memoizedState;if(i=o.destroy,null!==n&&Xa(n,o.deps))return void ri(Ca,r,i,n)}Ua|=e,a.memoizedState=ri(t,r,i,n)}function ii(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function oi(){}function si(e,t,r){25>qa||o("301");var n=e.alternate;if(e===Fa||null!==n&&n===Fa)if(Wa=!0,e={expirationTime:Ra,action:r,eagerReducer:null,eagerState:null,next:null},null===Ga&&(Ga=new Map),void 0===(r=Ga.get(t)))Ga.set(t,e);else{for(t=r;null!==t.next;)t=t.next;t.next=e}else{Uo();var a=Ts(),i={expirationTime:a=Zo(a,e),action:r,eagerReducer:null,eagerState:null,next:null},s=t.last;if(null===s)i.next=i;else{var l=s.next;null!==l&&(i.next=l),s.next=i}if(t.last=i,0===e.expirationTime&&(null===n||0===n.expirationTime)&&null!==(n=t.lastRenderedReducer))try{var c=t.lastRenderedState,u=n(c,r);if(i.eagerReducer=n,i.eagerState=u,Qt(u,c))return}catch(e){}es(e,a)}}var li={readContext:Yi,useCallback:Ka,useContext:Ka,useEffect:Ka,useImperativeHandle:Ka,useLayoutEffect:Ka,useMemo:Ka,useReducer:Ka,useRef:Ka,useState:Ka,useDebugValue:Ka},ci={readContext:Yi,useCallback:function(e,t){return $a().memoizedState=[e,void 0===t?null:t],e},useContext:Yi,useEffect:function(e,t){return ni(516,Pa|Ia,e,t)},useImperativeHandle:function(e,t,r){return r=null!=r?r.concat([e]):null,ni(4,La|Da,ii.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ni(4,La|Da,e,t)},useMemo:function(e,t){var r=$a();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=$a();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e=(e=n.queue={last:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=si.bind(null,Fa,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},$a().memoizedState=e},useState:function(e){var t=$a();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={last:null,dispatch:null,lastRenderedReducer:ei,lastRenderedState:e}).dispatch=si.bind(null,Fa,e),[t.memoizedState,e]},useDebugValue:oi},ui={readContext:Yi,useCallback:function(e,t){var r=Qa();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&Xa(t,n[1])?n[0]:(r.memoizedState=[e,t],e)},useContext:Yi,useEffect:function(e,t){return ai(516,Pa|Ia,e,t)},useImperativeHandle:function(e,t,r){return r=null!=r?r.concat([e]):null,ai(4,La|Da,ii.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ai(4,La|Da,e,t)},useMemo:function(e,t){var r=Qa();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&Xa(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)},useReducer:ti,useRef:function(){return Qa().memoizedState},useState:function(e){return ti(ei)},useDebugValue:oi},di=null,pi=null,hi=!1;function fi(e,t){var r=Wn(5,null,null,0);r.elementType="DELETED",r.type="DELETED",r.stateNode=t,r.return=e,r.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function mi(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function gi(e){if(hi){var t=pi;if(t){var r=t;if(!mi(e,t)){if(!(t=kn(r))||!mi(e,t))return e.effectTag|=2,hi=!1,void(di=e);fi(di,r)}di=e,pi=Mn(t)}else e.effectTag|=2,hi=!1,di=e}}function vi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&18!==e.tag;)e=e.return;di=e}function yi(e){if(e!==di)return!1;if(!hi)return vi(e),hi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!yn(t,e.memoizedProps))for(t=pi;t;)fi(e,t),t=kn(t);return vi(e),pi=di?kn(e.stateNode):null,!0}function bi(){pi=di=null,hi=!1}var _i=We.ReactCurrentOwner,xi=!1;function wi(e,t,r,n){t.child=null===e?ga(t,null,r,n):ma(t,e.child,r,n)}function ki(e,t,r,n,a){r=r.render;var i=t.ref;return Bi(t,a),n=Za(e,t,r,n,i,a),null===e||xi?(t.effectTag|=1,wi(e,t,n,a),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=a&&(e.expirationTime=0),Ii(e,t,a))}function Mi(e,t,r,n,a,i){if(null===e){var o=r.type;return"function"!=typeof o||Gn(o)||void 0!==o.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Kn(r.type,null,n,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ti(e,t,o,n,a,i))}return o=e.child,a<i&&(a=o.memoizedProps,(r=null!==(r=r.compare)?r:tr)(a,n)&&e.ref===t.ref)?Ii(e,t,i):(t.effectTag|=1,(e=qn(o,n)).ref=t.ref,e.return=t,t.child=e)}function Ti(e,t,r,n,a,i){return null!==e&&tr(e.memoizedProps,n)&&e.ref===t.ref&&(xi=!1,a<i)?Ii(e,t,i):Si(e,t,r,n,i)}function Ci(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.effectTag|=128)}function Si(e,t,r,n,a){var i=On(r)?In:En.current;return i=Pn(t,i),Bi(t,a),r=Za(e,t,r,n,i,a),null===e||xi?(t.effectTag|=1,wi(e,t,r,a),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=a&&(e.expirationTime=0),Ii(e,t,a))}function Li(e,t,r,n,a){if(On(r)){var i=!0;jn(t)}else i=!1;if(Bi(t,a),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),la(t,r,n),ua(t,r,n,a),n=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=r.contextType;"object"==typeof c&&null!==c?c=Yi(c):c=Pn(t,c=On(r)?In:En.current);var u=r.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==n||l!==c)&&ca(t,o,n,c),Gi=!1;var p=t.memoizedState;l=o.state=p;var h=t.updateQueue;null!==h&&(to(t,h,n,o,a),l=t.memoizedState),s!==n||p!==l||Dn.current||Gi?("function"==typeof u&&(ia(t,r,u,n),l=t.memoizedState),(s=Gi||sa(t,r,s,n,p,l,c))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.effectTag|=4)):("function"==typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=n,t.memoizedState=l),o.props=n,o.state=l,o.context=c,n=s):("function"==typeof o.componentDidMount&&(t.effectTag|=4),n=!1)}else o=t.stateNode,s=t.memoizedProps,o.props=t.type===t.elementType?s:na(t.type,s),l=o.context,"object"==typeof(c=r.contextType)&&null!==c?c=Yi(c):c=Pn(t,c=On(r)?In:En.current),(d="function"==typeof(u=r.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==n||l!==c)&&ca(t,o,n,c),Gi=!1,l=t.memoizedState,p=o.state=l,null!==(h=t.updateQueue)&&(to(t,h,n,o,a),p=t.memoizedState),s!==n||l!==p||Dn.current||Gi?("function"==typeof u&&(ia(t,r,u,n),p=t.memoizedState),(u=Gi||sa(t,r,s,n,l,p,c))?(d||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(n,p,c),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(n,p,c)),"function"==typeof o.componentDidUpdate&&(t.effectTag|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=n,t.memoizedState=p),o.props=n,o.state=p,o.context=c,n=u):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),n=!1);return Ai(e,t,r,n,i,a)}function Ai(e,t,r,n,a,i){Ci(e,t);var o=0!=(64&t.effectTag);if(!n&&!o)return a&&Bn(t,r,!1),Ii(e,t,i);n=t.stateNode,_i.current=t;var s=o&&"function"!=typeof r.getDerivedStateFromError?null:n.render();return t.effectTag|=1,null!==e&&o?(t.child=ma(t,e.child,null,i),t.child=ma(t,null,s,i)):wi(e,t,s,i),t.memoizedState=n.state,a&&Bn(t,r,!0),t.child}function Ei(e){var t=e.stateNode;t.pendingContext?zn(0,t.pendingContext,t.pendingContext!==t.context):t.context&&zn(0,t.context,!1),wa(e,t.containerInfo)}function Di(e,t,r){var n=t.mode,a=t.pendingProps,i=t.memoizedState;if(0==(64&t.effectTag)){i=null;var o=!1}else i={timedOutAt:null!==i?i.timedOutAt:0},o=!0,t.effectTag&=-65;if(null===e)if(o){var s=a.fallback;e=Xn(null,n,0,null),0==(1&t.mode)&&(e.child=null!==t.memoizedState?t.child.child:t.child),n=Xn(s,n,r,null),e.sibling=n,(r=e).return=n.return=t}else r=n=ga(t,null,a.children,r);else null!==e.memoizedState?(s=(n=e.child).sibling,o?(r=a.fallback,a=qn(n,n.pendingProps),0==(1&t.mode)&&((o=null!==t.memoizedState?t.child.child:t.child)!==n.child&&(a.child=o)),n=a.sibling=qn(s,r,s.expirationTime),r=a,a.childExpirationTime=0,r.return=n.return=t):r=n=ma(t,n.child,a.children,r)):(s=e.child,o?(o=a.fallback,(a=Xn(null,n,0,null)).child=s,0==(1&t.mode)&&(a.child=null!==t.memoizedState?t.child.child:t.child),(n=a.sibling=Xn(o,n,r,null)).effectTag|=2,r=a,a.childExpirationTime=0,r.return=n.return=t):n=r=ma(t,s,a.children,r)),t.stateNode=e.stateNode;return t.memoizedState=i,t.child=r,n}function Ii(e,t,r){if(null!==e&&(t.contextDependencies=e.contextDependencies),t.childExpirationTime<r)return null;if(null!==e&&t.child!==e.child&&o("153"),null!==t.child){for(r=qn(e=t.child,e.pendingProps,e.expirationTime),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=qn(e,e.pendingProps,e.expirationTime)).return=t;r.sibling=null}return t.child}function Pi(e,t,r){var n=t.expirationTime;if(null!==e){if(e.memoizedProps!==t.pendingProps||Dn.current)xi=!0;else if(n<r){switch(xi=!1,t.tag){case 3:Ei(t),bi();break;case 5:Ma(t);break;case 1:On(t.type)&&jn(t);break;case 4:wa(t,t.stateNode.containerInfo);break;case 10:Ni(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!==(n=t.child.childExpirationTime)&&n>=r?Di(e,t,r):null!==(t=Ii(e,t,r))?t.sibling:null}return Ii(e,t,r)}}else xi=!1;switch(t.expirationTime=0,t.tag){case 2:n=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps;var a=Pn(t,En.current);if(Bi(t,r),a=Za(null,t,n,e,a,r),t.effectTag|=1,"object"==typeof a&&null!==a&&"function"==typeof a.render&&void 0===a.$$typeof){if(t.tag=1,Ja(),On(n)){var i=!0;jn(t)}else i=!1;t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null;var s=n.getDerivedStateFromProps;"function"==typeof s&&ia(t,n,s,e),a.updater=oa,t.stateNode=a,a._reactInternalFiber=t,ua(t,n,e,r),t=Ai(null,t,n,!0,i,r)}else t.tag=0,wi(null,t,a,r),t=t.child;return t;case 16:switch(a=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),i=t.pendingProps,e=function(e){var t=e._result;switch(e._status){case 1:return t;case 2:case 0:throw t;default:switch(e._status=0,(t=(t=e._ctor)()).then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)})),e._status){case 1:return e._result;case 2:throw e._result}throw e._result=t,t}}(a),t.type=e,a=t.tag=function(e){if("function"==typeof e)return Gn(e)?1:0;if(null!=e){if((e=e.$$typeof)===rt)return 11;if(e===at)return 14}return 2}(e),i=na(e,i),s=void 0,a){case 0:s=Si(null,t,e,i,r);break;case 1:s=Li(null,t,e,i,r);break;case 11:s=ki(null,t,e,i,r);break;case 14:s=Mi(null,t,e,na(e.type,i),n,r);break;default:o("306",e,"")}return s;case 0:return n=t.type,a=t.pendingProps,Si(e,t,n,a=t.elementType===n?a:na(n,a),r);case 1:return n=t.type,a=t.pendingProps,Li(e,t,n,a=t.elementType===n?a:na(n,a),r);case 3:return Ei(t),null===(n=t.updateQueue)&&o("282"),a=null!==(a=t.memoizedState)?a.element:null,to(t,n,t.pendingProps,null,r),(n=t.memoizedState.element)===a?(bi(),t=Ii(e,t,r)):(a=t.stateNode,(a=(null===e||null===e.child)&&a.hydrate)&&(pi=Mn(t.stateNode.containerInfo),di=t,a=hi=!0),a?(t.effectTag|=2,t.child=ga(t,null,n,r)):(wi(e,t,n,r),bi()),t=t.child),t;case 5:return Ma(t),null===e&&gi(t),n=t.type,a=t.pendingProps,i=null!==e?e.memoizedProps:null,s=a.children,yn(n,a)?s=null:null!==i&&yn(n,i)&&(t.effectTag|=16),Ci(e,t),1!==r&&1&t.mode&&a.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(wi(e,t,s,r),t=t.child),t;case 6:return null===e&&gi(t),null;case 13:return Di(e,t,r);case 4:return wa(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=ma(t,null,n,r):wi(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,ki(e,t,n,a=t.elementType===n?a:na(n,a),r);case 7:return wi(e,t,t.pendingProps,r),t.child;case 8:case 12:return wi(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,s=t.memoizedProps,Ni(t,i=a.value),null!==s){var l=s.value;if(0===(i=Qt(l,i)?0:0|("function"==typeof n._calculateChangedBits?n._calculateChangedBits(l,i):1073741823))){if(s.children===a.children&&!Dn.current){t=Ii(e,t,r);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.contextDependencies;if(null!==c){s=l.child;for(var u=c.first;null!==u;){if(u.context===n&&0!=(u.observedBits&i)){1===l.tag&&((u=Xi(r)).tag=Ui,Ji(l,u)),l.expirationTime<r&&(l.expirationTime=r),null!==(u=l.alternate)&&u.expirationTime<r&&(u.expirationTime=r),u=r;for(var d=l.return;null!==d;){var p=d.alternate;if(d.childExpirationTime<u)d.childExpirationTime=u,null!==p&&p.childExpirationTime<u&&(p.childExpirationTime=u);else{if(!(null!==p&&p.childExpirationTime<u))break;p.childExpirationTime=u}d=d.return}c.expirationTime<r&&(c.expirationTime=r);break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}}wi(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=(i=t.pendingProps).children,Bi(t,r),n=n(a=Yi(a,i.unstable_observedBits)),t.effectTag|=1,wi(e,t,n,r),t.child;case 14:return i=na(a=t.type,t.pendingProps),Mi(e,t,a,i=na(a.type,i),n,r);case 15:return Ti(e,t,t.type,t.pendingProps,n,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:na(n,a),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,On(n)?(e=!0,jn(t)):e=!1,Bi(t,r),la(t,n,a),ua(t,n,a,r),Ai(null,t,n,!0,e,r)}o("156")}var Oi={current:null},Ri=null,Fi=null,zi=null;function Ni(e,t){var r=e.type._context;Ln(Oi,r._currentValue),r._currentValue=t}function ji(e){var t=Oi.current;Sn(Oi),e.type._context._currentValue=t}function Bi(e,t){Ri=e,zi=Fi=null;var r=e.contextDependencies;null!==r&&r.expirationTime>=t&&(xi=!0),e.contextDependencies=null}function Yi(e,t){return zi!==e&&!1!==t&&0!==t&&("number"==typeof t&&1073741823!==t||(zi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Fi?(null===Ri&&o("308"),Fi=t,Ri.contextDependencies={first:t,expirationTime:0}):Fi=Fi.next=t),e._currentValue}var Hi=0,Vi=1,Ui=2,Wi=3,Gi=!1;function qi(e){return{baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ki(e){return{baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Xi(e){return{expirationTime:e,tag:Hi,payload:null,callback:null,next:null,nextEffect:null}}function Zi(e,t){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t)}function Ji(e,t){var r=e.alternate;if(null===r){var n=e.updateQueue,a=null;null===n&&(n=e.updateQueue=qi(e.memoizedState))}else n=e.updateQueue,a=r.updateQueue,null===n?null===a?(n=e.updateQueue=qi(e.memoizedState),a=r.updateQueue=qi(r.memoizedState)):n=e.updateQueue=Ki(a):null===a&&(a=r.updateQueue=Ki(n));null===a||n===a?Zi(n,t):null===n.lastUpdate||null===a.lastUpdate?(Zi(n,t),Zi(a,t)):(Zi(n,t),a.lastUpdate=t)}function $i(e,t){var r=e.updateQueue;null===(r=null===r?e.updateQueue=qi(e.memoizedState):Qi(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t)}function Qi(e,t){var r=e.alternate;return null!==r&&t===r.updateQueue&&(t=e.updateQueue=Ki(t)),t}function eo(e,t,r,n,i,o){switch(r.tag){case Vi:return"function"==typeof(e=r.payload)?e.call(o,n,i):e;case Wi:e.effectTag=-2049&e.effectTag|64;case Hi:if(null==(i="function"==typeof(e=r.payload)?e.call(o,n,i):e))break;return a({},n,i);case Ui:Gi=!0}return n}function to(e,t,r,n,a){Gi=!1;for(var i=(t=Qi(e,t)).baseState,o=null,s=0,l=t.firstUpdate,c=i;null!==l;){var u=l.expirationTime;u<a?(null===o&&(o=l,i=c),s<u&&(s=u)):(c=eo(e,0,l,c,r,n),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(u=null,l=t.firstCapturedUpdate;null!==l;){var d=l.expirationTime;d<a?(null===u&&(u=l,null===o&&(i=c)),s<d&&(s=d)):(c=eo(e,0,l,c,r,n),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===o&&(t.lastUpdate=null),null===u?t.lastCapturedUpdate=null:e.effectTag|=32,null===o&&null===u&&(i=c),t.baseState=i,t.firstUpdate=o,t.firstCapturedUpdate=u,e.expirationTime=s,e.memoizedState=c}function ro(e,t,r){null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),no(t.firstEffect,r),t.firstEffect=t.lastEffect=null,no(t.firstCapturedEffect,r),t.firstCapturedEffect=t.lastCapturedEffect=null}function no(e,t){for(;null!==e;){var r=e.callback;if(null!==r){e.callback=null;var n=t;"function"!=typeof r&&o("191",r),r.call(n)}e=e.nextEffect}}function ao(e,t){return{value:e,source:t,stack:ct(t)}}function io(e){e.effectTag|=4}var oo=void 0,so=void 0,lo=void 0,co=void 0;oo=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},so=function(){},lo=function(e,t,r,n,i){var o=e.memoizedProps;if(o!==n){var s=t.stateNode;switch(xa(ya.current),e=null,r){case"input":o=_t(s,o),n=_t(s,n),e=[];break;case"option":o=qr(s,o),n=qr(s,n),e=[];break;case"select":o=a({},o,{value:void 0}),n=a({},n,{value:void 0}),e=[];break;case"textarea":o=Xr(s,o),n=Xr(s,n),e=[];break;default:"function"!=typeof o.onClick&&"function"==typeof n.onClick&&(s.onclick=fn)}dn(r,n),s=r=void 0;var l=null;for(r in o)if(!n.hasOwnProperty(r)&&o.hasOwnProperty(r)&&null!=o[r])if("style"===r){var c=o[r];for(s in c)c.hasOwnProperty(s)&&(l||(l={}),l[s]="")}else"dangerouslySetInnerHTML"!==r&&"children"!==r&&"suppressContentEditableWarning"!==r&&"suppressHydrationWarning"!==r&&"autoFocus"!==r&&(_.hasOwnProperty(r)?e||(e=[]):(e=e||[]).push(r,null));for(r in n){var u=n[r];if(c=null!=o?o[r]:void 0,n.hasOwnProperty(r)&&u!==c&&(null!=u||null!=c))if("style"===r)if(c){for(s in c)!c.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(l||(l={}),l[s]="");for(s in u)u.hasOwnProperty(s)&&c[s]!==u[s]&&(l||(l={}),l[s]=u[s])}else l||(e||(e=[]),e.push(r,l)),l=u;else"dangerouslySetInnerHTML"===r?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(e=e||[]).push(r,""+u)):"children"===r?c===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(r,""+u):"suppressContentEditableWarning"!==r&&"suppressHydrationWarning"!==r&&(_.hasOwnProperty(r)?(null!=u&&hn(i,r),e||c===u||(e=[])):(e=e||[]).push(r,u))}l&&(e=e||[]).push("style",l),i=e,(t.updateQueue=i)&&io(t)}},co=function(e,t,r,n){r!==n&&io(t)};var uo="function"==typeof WeakSet?WeakSet:Set;function po(e,t){var r=t.source,n=t.stack;null===n&&null!==r&&(n=ct(r)),null!==r&&lt(r.type),t=t.value,null!==e&&1===e.tag&&lt(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function ho(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Xo(e,t)}else t.current=null}function fo(e,t,r){if(null!==(r=null!==(r=r.updateQueue)?r.lastEffect:null)){var n=r=r.next;do{if((n.tag&e)!==Ca){var a=n.destroy;n.destroy=void 0,void 0!==a&&a()}(n.tag&t)!==Ca&&(a=n.create,n.destroy=a()),n=n.next}while(n!==r)}}function mo(e){switch("function"==typeof Hn&&Hn(e),e.tag){case 0:case 11:case 14:case 15:var t=e.updateQueue;if(null!==t&&null!==(t=t.lastEffect)){var r=t=t.next;do{var n=r.destroy;if(void 0!==n){var a=e;try{n()}catch(e){Xo(a,e)}}r=r.next}while(r!==t)}break;case 1:if(ho(e),"function"==typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Xo(e,t)}break;case 5:ho(e);break;case 4:yo(e)}}function go(e){return 5===e.tag||3===e.tag||4===e.tag}function vo(e){e:{for(var t=e.return;null!==t;){if(go(t)){var r=t;break e}t=t.return}o("160"),r=void 0}var n=t=void 0;switch(r.tag){case 5:t=r.stateNode,n=!1;break;case 3:case 4:t=r.stateNode.containerInfo,n=!0;break;default:o("161")}16&r.effectTag&&(an(t,""),r.effectTag&=-17);e:t:for(r=e;;){for(;null===r.sibling;){if(null===r.return||go(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;5!==r.tag&&6!==r.tag&&18!==r.tag;){if(2&r.effectTag)continue t;if(null===r.child||4===r.tag)continue t;r.child.return=r,r=r.child}if(!(2&r.effectTag)){r=r.stateNode;break e}}for(var a=e;;){if(5===a.tag||6===a.tag)if(r)if(n){var i=t,s=a.stateNode,l=r;8===i.nodeType?i.parentNode.insertBefore(s,l):i.insertBefore(s,l)}else t.insertBefore(a.stateNode,r);else n?(s=t,l=a.stateNode,8===s.nodeType?(i=s.parentNode).insertBefore(l,s):(i=s).appendChild(l),null!=(s=s._reactRootContainer)||null!==i.onclick||(i.onclick=fn)):t.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)break;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}}function yo(e){for(var t=e,r=!1,n=void 0,a=void 0;;){if(!r){r=t.return;e:for(;;){switch(null===r&&o("160"),r.tag){case 5:n=r.stateNode,a=!1;break e;case 3:case 4:n=r.stateNode.containerInfo,a=!0;break e}r=r.return}r=!0}if(5===t.tag||6===t.tag){e:for(var i=t,s=i;;)if(mo(s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===i)break;for(;null===s.sibling;){if(null===s.return||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}a?(i=n,s=t.stateNode,8===i.nodeType?i.parentNode.removeChild(s):i.removeChild(s)):n.removeChild(t.stateNode)}else if(4===t.tag){if(null!==t.child){n=t.stateNode.containerInfo,a=!0,t.child.return=t,t=t.child;continue}}else if(mo(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(r=!1)}t.sibling.return=t.return,t=t.sibling}}function bo(e,t){switch(t.tag){case 0:case 11:case 14:case 15:fo(La,Aa,t);break;case 1:break;case 5:var r=t.stateNode;if(null!=r){var n=t.memoizedProps;e=null!==e?e.memoizedProps:n;var a=t.type,i=t.updateQueue;t.updateQueue=null,null!==i&&function(e,t,r,n,a){e[R]=a,"input"===r&&"radio"===a.type&&null!=a.name&&wt(e,a),pn(r,n),n=pn(r,a);for(var i=0;i<t.length;i+=2){var o=t[i],s=t[i+1];"style"===o?cn(e,s):"dangerouslySetInnerHTML"===o?nn(e,s):"children"===o?an(e,s):yt(e,o,s,n)}switch(r){case"input":kt(e,a);break;case"textarea":Jr(e,a);break;case"select":t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!a.multiple,null!=(r=a.value)?Kr(e,!!a.multiple,r,!1):t!==!!a.multiple&&(null!=a.defaultValue?Kr(e,!!a.multiple,a.defaultValue,!0):Kr(e,!!a.multiple,a.multiple?[]:"",!1))}}(r,i,a,e,n)}break;case 6:null===t.stateNode&&o("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 12:break;case 13:if(r=t.memoizedState,n=void 0,e=t,null===r?n=!1:(n=!0,e=t.child,0===r.timedOutAt&&(r.timedOutAt=Ts())),null!==e&&function(e,t){for(var r=e;;){if(5===r.tag){var n=r.stateNode;if(t)n.style.display="none";else{n=r.stateNode;var a=r.memoizedProps.style;a=null!=a&&a.hasOwnProperty("display")?a.display:null,n.style.display=ln("display",a)}}else if(6===r.tag)r.stateNode.nodeValue=t?"":r.memoizedProps;else{if(13===r.tag&&null!==r.memoizedState){(n=r.child.sibling).return=r,r=n;continue}if(null!==r.child){r.child.return=r,r=r.child;continue}}if(r===e)break;for(;null===r.sibling;){if(null===r.return||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}(e,n),null!==(r=t.updateQueue)){t.updateQueue=null;var s=t.stateNode;null===s&&(s=t.stateNode=new uo),r.forEach((function(e){var r=$o.bind(null,t,e);s.has(e)||(s.add(e),e.then(r,r))}))}break;case 17:break;default:o("163")}}var _o="function"==typeof WeakMap?WeakMap:Map;function xo(e,t,r){(r=Xi(r)).tag=Wi,r.payload={element:null};var n=t.value;return r.callback=function(){Rs(n),po(e,t)},r}function wo(e,t,r){(r=Xi(r)).tag=Wi;var n=e.type.getDerivedStateFromError;if("function"==typeof n){var a=t.value;r.payload=function(){return n(a)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(r.callback=function(){"function"!=typeof n&&(null===No?No=new Set([this]):No.add(this));var r=t.value,a=t.stack;po(e,t),this.componentDidCatch(r,{componentStack:null!==a?a:""})}),r}function ko(e){switch(e.tag){case 1:On(e.type)&&Rn();var t=e.effectTag;return 2048&t?(e.effectTag=-2049&t|64,e):null;case 3:return ka(),Fn(),0!=(64&(t=e.effectTag))&&o("285"),e.effectTag=-2049&t|64,e;case 5:return Ta(e),null;case 13:return 2048&(t=e.effectTag)?(e.effectTag=-2049&t|64,e):null;case 18:return null;case 4:return ka(),null;case 10:return ji(e),null;default:return null}}var Mo=We.ReactCurrentDispatcher,To=We.ReactCurrentOwner,Co=1073741822,So=!1,Lo=null,Ao=null,Eo=0,Do=-1,Io=!1,Po=null,Oo=!1,Ro=null,Fo=null,zo=null,No=null;function jo(){if(null!==Lo)for(var e=Lo.return;null!==e;){var t=e;switch(t.tag){case 1:var r=t.type.childContextTypes;null!=r&&Rn();break;case 3:ka(),Fn();break;case 5:Ta(t);break;case 4:ka();break;case 10:ji(t)}e=e.return}Ao=null,Eo=0,Do=-1,Io=!1,Lo=null}function Bo(){for(;null!==Po;){var e=Po.effectTag;if(16&e&&an(Po.stateNode,""),128&e){var t=Po.alternate;null!==t&&(null!==(t=t.ref)&&("function"==typeof t?t(null):t.current=null))}switch(14&e){case 2:vo(Po),Po.effectTag&=-3;break;case 6:vo(Po),Po.effectTag&=-3,bo(Po.alternate,Po);break;case 4:bo(Po.alternate,Po);break;case 8:yo(e=Po),e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,null!==(e=e.alternate)&&(e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null)}Po=Po.nextEffect}}function Yo(){for(;null!==Po;){if(256&Po.effectTag)e:{var e=Po.alternate,t=Po;switch(t.tag){case 0:case 11:case 15:fo(Sa,Ca,t);break e;case 1:if(256&t.effectTag&&null!==e){var r=e.memoizedProps,n=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?r:na(t.type,r),n),e.__reactInternalSnapshotBeforeUpdate=t}break e;case 3:case 5:case 6:case 4:case 17:break e;default:o("163")}}Po=Po.nextEffect}}function Ho(e,t){for(;null!==Po;){var r=Po.effectTag;if(36&r){var n=Po.alternate,a=Po,i=t;switch(a.tag){case 0:case 11:case 15:fo(Ea,Da,a);break;case 1:var s=a.stateNode;if(4&a.effectTag)if(null===n)s.componentDidMount();else{var l=a.elementType===a.type?n.memoizedProps:na(a.type,n.memoizedProps);s.componentDidUpdate(l,n.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}null!==(n=a.updateQueue)&&ro(0,n,s);break;case 3:if(null!==(n=a.updateQueue)){if(s=null,null!==a.child)switch(a.child.tag){case 5:s=a.child.stateNode;break;case 1:s=a.child.stateNode}ro(0,n,s)}break;case 5:i=a.stateNode,null===n&&4&a.effectTag&&vn(a.type,a.memoizedProps)&&i.focus();break;case 6:case 4:case 12:case 13:case 17:break;default:o("163")}}128&r&&(null!==(a=Po.ref)&&(i=Po.stateNode,"function"==typeof a?a(i):a.current=i)),512&r&&(Ro=e),Po=Po.nextEffect}}function Vo(e,t){zo=Fo=Ro=null;var r=os;os=!0;do{if(512&t.effectTag){var n=!1,a=void 0;try{var i=t;fo(Pa,Ca,i),fo(Ca,Ia,i)}catch(e){n=!0,a=e}n&&Xo(t,a)}t=t.nextEffect}while(null!==t);os=r,0!==(r=e.expirationTime)&&Cs(e,r),ps||os||Ds(1073741823,!1)}function Uo(){null!==Fo&&wn(Fo),null!==zo&&zo()}function Wo(e,t){Oo=So=!0,e.current===t&&o("177");var r=e.pendingCommitExpirationTime;0===r&&o("261"),e.pendingCommitExpirationTime=0;var n=t.expirationTime,a=t.childExpirationTime;for(function(e,t){if(e.didError=!1,0===t)e.earliestPendingTime=0,e.latestPendingTime=0,e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0;else{t<e.latestPingedTime&&(e.latestPingedTime=0);var r=e.latestPendingTime;0!==r&&(r>t?e.earliestPendingTime=e.latestPendingTime=0:e.earliestPendingTime>t&&(e.earliestPendingTime=e.latestPendingTime)),0===(r=e.earliestSuspendedTime)?Qn(e,t):t<e.latestSuspendedTime?(e.earliestSuspendedTime=0,e.latestSuspendedTime=0,e.latestPingedTime=0,Qn(e,t)):t>r&&Qn(e,t)}ra(0,e)}(e,a>n?a:n),To.current=null,n=void 0,1<t.effectTag?null!==t.lastEffect?(t.lastEffect.nextEffect=t,n=t.firstEffect):n=t:n=t.firstEffect,mn=Mr,gn=function(){var e=Fr();if(zr(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection();if(r&&0!==r.rangeCount){t=r.anchorNode;var n=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{t.nodeType,a.nodeType}catch(e){t=null;break e}var i=0,o=-1,s=-1,l=0,c=0,u=e,d=null;t:for(;;){for(var p;u!==t||0!==n&&3!==u.nodeType||(o=i+n),u!==a||0!==r&&3!==u.nodeType||(s=i+r),3===u.nodeType&&(i+=u.nodeValue.length),null!==(p=u.firstChild);)d=u,u=p;for(;;){if(u===e)break t;if(d===t&&++l===n&&(o=i),d===a&&++c===r&&(s=i),null!==(p=u.nextSibling))break;d=(u=d).parentNode}u=p}t=-1===o||-1===s?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;return{focusedElem:e,selectionRange:t}}(),Mr=!1,Po=n;null!==Po;){a=!1;var s=void 0;try{Yo()}catch(e){a=!0,s=e}a&&(null===Po&&o("178"),Xo(Po,s),null!==Po&&(Po=Po.nextEffect))}for(Po=n;null!==Po;){a=!1,s=void 0;try{Bo()}catch(e){a=!0,s=e}a&&(null===Po&&o("178"),Xo(Po,s),null!==Po&&(Po=Po.nextEffect))}for(Nr(gn),gn=null,Mr=!!mn,mn=null,e.current=t,Po=n;null!==Po;){a=!1,s=void 0;try{Ho(e,r)}catch(e){a=!0,s=e}a&&(null===Po&&o("178"),Xo(Po,s),null!==Po&&(Po=Po.nextEffect))}if(null!==n&&null!==Ro){var l=Vo.bind(null,e,n);Fo=i.unstable_runWithPriority(i.unstable_NormalPriority,(function(){return xn(l)})),zo=l}So=Oo=!1,"function"==typeof Yn&&Yn(t.stateNode),r=t.expirationTime,0===(t=(t=t.childExpirationTime)>r?t:r)&&(No=null),function(e,t){e.expirationTime=t,e.finishedWork=null}(e,t)}function Go(e){for(;;){var t=e.alternate,r=e.return,n=e.sibling;if(0==(1024&e.effectTag)){Lo=e;e:{var i=t,s=Eo,l=(t=e).pendingProps;switch(t.tag){case 2:case 16:break;case 15:case 0:break;case 1:On(t.type)&&Rn();break;case 3:ka(),Fn(),(l=t.stateNode).pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==i&&null!==i.child||(yi(t),t.effectTag&=-3),so(t);break;case 5:Ta(t);var c=xa(_a.current);if(s=t.type,null!==i&&null!=t.stateNode)lo(i,t,s,l,c),i.ref!==t.ref&&(t.effectTag|=128);else if(l){var u=xa(ya.current);if(yi(t)){i=(l=t).stateNode;var d=l.type,p=l.memoizedProps,h=c;switch(i[O]=l,i[R]=p,s=void 0,c=d){case"iframe":case"object":Tr("load",i);break;case"video":case"audio":for(d=0;d<re.length;d++)Tr(re[d],i);break;case"source":Tr("error",i);break;case"img":case"image":case"link":Tr("error",i),Tr("load",i);break;case"form":Tr("reset",i),Tr("submit",i);break;case"details":Tr("toggle",i);break;case"input":xt(i,p),Tr("invalid",i),hn(h,"onChange");break;case"select":i._wrapperState={wasMultiple:!!p.multiple},Tr("invalid",i),hn(h,"onChange");break;case"textarea":Zr(i,p),Tr("invalid",i),hn(h,"onChange")}for(s in dn(c,p),d=null,p)p.hasOwnProperty(s)&&(u=p[s],"children"===s?"string"==typeof u?i.textContent!==u&&(d=["children",u]):"number"==typeof u&&i.textContent!==""+u&&(d=["children",""+u]):_.hasOwnProperty(s)&&null!=u&&hn(h,s));switch(c){case"input":Ve(i),Mt(i,p,!0);break;case"textarea":Ve(i),$r(i);break;case"select":case"option":break;default:"function"==typeof p.onClick&&(i.onclick=fn)}s=d,l.updateQueue=s,(l=null!==s)&&io(t)}else{p=t,h=s,i=l,d=9===c.nodeType?c:c.ownerDocument,u===Qr.html&&(u=en(h)),u===Qr.html?"script"===h?((i=d.createElement("div")).innerHTML="<script><\/script>",d=i.removeChild(i.firstChild)):"string"==typeof i.is?d=d.createElement(h,{is:i.is}):(d=d.createElement(h),"select"===h&&(h=d,i.multiple?h.multiple=!0:i.size&&(h.size=i.size))):d=d.createElementNS(u,h),(i=d)[O]=p,i[R]=l,oo(i,t,!1,!1),h=i;var f=c,m=pn(d=s,p=l);switch(d){case"iframe":case"object":Tr("load",h),c=p;break;case"video":case"audio":for(c=0;c<re.length;c++)Tr(re[c],h);c=p;break;case"source":Tr("error",h),c=p;break;case"img":case"image":case"link":Tr("error",h),Tr("load",h),c=p;break;case"form":Tr("reset",h),Tr("submit",h),c=p;break;case"details":Tr("toggle",h),c=p;break;case"input":xt(h,p),c=_t(h,p),Tr("invalid",h),hn(f,"onChange");break;case"option":c=qr(h,p);break;case"select":h._wrapperState={wasMultiple:!!p.multiple},c=a({},p,{value:void 0}),Tr("invalid",h),hn(f,"onChange");break;case"textarea":Zr(h,p),c=Xr(h,p),Tr("invalid",h),hn(f,"onChange");break;default:c=p}dn(d,c),u=void 0;var g=d,v=h,y=c;for(u in y)if(y.hasOwnProperty(u)){var b=y[u];"style"===u?cn(v,b):"dangerouslySetInnerHTML"===u?null!=(b=b?b.__html:void 0)&&nn(v,b):"children"===u?"string"==typeof b?("textarea"!==g||""!==b)&&an(v,b):"number"==typeof b&&an(v,""+b):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(_.hasOwnProperty(u)?null!=b&&hn(f,u):null!=b&&yt(v,u,b,m))}switch(d){case"input":Ve(h),Mt(h,p,!1);break;case"textarea":Ve(h),$r(h);break;case"option":null!=p.value&&h.setAttribute("value",""+bt(p.value));break;case"select":(c=h).multiple=!!p.multiple,null!=(h=p.value)?Kr(c,!!p.multiple,h,!1):null!=p.defaultValue&&Kr(c,!!p.multiple,p.defaultValue,!0);break;default:"function"==typeof c.onClick&&(h.onclick=fn)}(l=vn(s,l))&&io(t),t.stateNode=i}null!==t.ref&&(t.effectTag|=128)}else null===t.stateNode&&o("166");break;case 6:i&&null!=t.stateNode?co(i,t,i.memoizedProps,l):("string"!=typeof l&&(null===t.stateNode&&o("166")),i=xa(_a.current),xa(ya.current),yi(t)?(s=(l=t).stateNode,i=l.memoizedProps,s[O]=l,(l=s.nodeValue!==i)&&io(t)):(s=t,(l=(9===i.nodeType?i:i.ownerDocument).createTextNode(l))[O]=t,s.stateNode=l));break;case 11:break;case 13:if(l=t.memoizedState,0!=(64&t.effectTag)){t.expirationTime=s,Lo=t;break e}l=null!==l,s=null!==i&&null!==i.memoizedState,null!==i&&!l&&s&&(null!==(i=i.child.sibling)&&(null!==(c=t.firstEffect)?(t.firstEffect=i,i.nextEffect=c):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),(l||s)&&(t.effectTag|=4);break;case 7:case 8:case 12:break;case 4:ka(),so(t);break;case 10:ji(t);break;case 9:case 14:break;case 17:On(t.type)&&Rn();break;case 18:break;default:o("156")}Lo=null}if(t=e,1===Eo||1!==t.childExpirationTime){for(l=0,s=t.child;null!==s;)(i=s.expirationTime)>l&&(l=i),(c=s.childExpirationTime)>l&&(l=c),s=s.sibling;t.childExpirationTime=l}if(null!==Lo)return Lo;null!==r&&0==(1024&r.effectTag)&&(null===r.firstEffect&&(r.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==r.lastEffect&&(r.lastEffect.nextEffect=e.firstEffect),r.lastEffect=e.lastEffect),1<e.effectTag&&(null!==r.lastEffect?r.lastEffect.nextEffect=e:r.firstEffect=e,r.lastEffect=e))}else{if(null!==(e=ko(e)))return e.effectTag&=1023,e;null!==r&&(r.firstEffect=r.lastEffect=null,r.effectTag|=1024)}if(null!==n)return n;if(null===r)break;e=r}return null}function qo(e){var t=Pi(e.alternate,e,Eo);return e.memoizedProps=e.pendingProps,null===t&&(t=Go(e)),To.current=null,t}function Ko(e,t){So&&o("243"),Uo(),So=!0;var r=Mo.current;Mo.current=li;var n=e.nextExpirationTimeToWorkOn;n===Eo&&e===Ao&&null!==Lo||(jo(),Eo=n,Lo=qn((Ao=e).current,null),e.pendingCommitExpirationTime=0);for(var a=!1;;){try{if(t)for(;null!==Lo&&!As();)Lo=qo(Lo);else for(;null!==Lo;)Lo=qo(Lo)}catch(t){if(zi=Fi=Ri=null,Ja(),null===Lo)a=!0,Rs(t);else{null===Lo&&o("271");var i=Lo,s=i.return;if(null!==s){e:{var l=e,c=s,u=i,d=t;if(s=Eo,u.effectTag|=1024,u.firstEffect=u.lastEffect=null,null!==d&&"object"==typeof d&&"function"==typeof d.then){var p=d;d=c;var h=-1,f=-1;do{if(13===d.tag){var m=d.alternate;if(null!==m&&null!==(m=m.memoizedState)){f=10*(1073741822-m.timedOutAt);break}"number"==typeof(m=d.pendingProps.maxDuration)&&(0>=m?h=0:(-1===h||m<h)&&(h=m))}d=d.return}while(null!==d);d=c;do{if((m=13===d.tag)&&(m=void 0!==d.memoizedProps.fallback&&null===d.memoizedState),m){if(null===(c=d.updateQueue)?((c=new Set).add(p),d.updateQueue=c):c.add(p),0==(1&d.mode)){d.effectTag|=64,u.effectTag&=-1957,1===u.tag&&(null===u.alternate?u.tag=17:((s=Xi(1073741823)).tag=Ui,Ji(u,s))),u.expirationTime=1073741823;break e}c=s;var g=(u=l).pingCache;null===g?(g=u.pingCache=new _o,m=new Set,g.set(p,m)):void 0===(m=g.get(p))&&(m=new Set,g.set(p,m)),m.has(c)||(m.add(c),u=Jo.bind(null,u,p,c),p.then(u,u)),-1===h?l=1073741823:(-1===f&&(f=10*(1073741822-ta(l,s))-5e3),l=f+h),0<=l&&Do<l&&(Do=l),d.effectTag|=2048,d.expirationTime=s;break e}d=d.return}while(null!==d);d=Error((lt(u.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ct(u))}Io=!0,d=ao(d,u),l=c;do{switch(l.tag){case 3:l.effectTag|=2048,l.expirationTime=s,$i(l,s=xo(l,d,s));break e;case 1:if(h=d,f=l.type,u=l.stateNode,0==(64&l.effectTag)&&("function"==typeof f.getDerivedStateFromError||null!==u&&"function"==typeof u.componentDidCatch&&(null===No||!No.has(u)))){l.effectTag|=2048,l.expirationTime=s,$i(l,s=wo(l,h,s));break e}}l=l.return}while(null!==l)}Lo=Go(i);continue}a=!0,Rs(t)}}break}if(So=!1,Mo.current=r,zi=Fi=Ri=null,Ja(),a)Ao=null,e.finishedWork=null;else if(null!==Lo)e.finishedWork=null;else{if(null===(r=e.current.alternate)&&o("281"),Ao=null,Io){if(a=e.latestPendingTime,i=e.latestSuspendedTime,s=e.latestPingedTime,0!==a&&a<n||0!==i&&i<n||0!==s&&s<n)return ea(e,n),void ks(e,r,n,e.expirationTime,-1);if(!e.didError&&t)return e.didError=!0,n=e.nextExpirationTimeToWorkOn=n,t=e.expirationTime=1073741823,void ks(e,r,n,t,-1)}t&&-1!==Do?(ea(e,n),(t=10*(1073741822-ta(e,n)))<Do&&(Do=t),t=10*(1073741822-Ts()),t=Do-t,ks(e,r,n,e.expirationTime,0>t?0:t)):(e.pendingCommitExpirationTime=n,e.finishedWork=r)}}function Xo(e,t){for(var r=e.return;null!==r;){switch(r.tag){case 1:var n=r.stateNode;if("function"==typeof r.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===No||!No.has(n)))return Ji(r,e=wo(r,e=ao(t,e),1073741823)),void es(r,1073741823);break;case 3:return Ji(r,e=xo(r,e=ao(t,e),1073741823)),void es(r,1073741823)}r=r.return}3===e.tag&&(Ji(e,r=xo(e,r=ao(t,e),1073741823)),es(e,1073741823))}function Zo(e,t){var r=i.unstable_getCurrentPriorityLevel(),n=void 0;if(0==(1&t.mode))n=1073741823;else if(So&&!Oo)n=Eo;else{switch(r){case i.unstable_ImmediatePriority:n=1073741823;break;case i.unstable_UserBlockingPriority:n=1073741822-10*(1+((1073741822-e+15)/10|0));break;case i.unstable_NormalPriority:n=1073741822-25*(1+((1073741822-e+500)/25|0));break;case i.unstable_LowPriority:case i.unstable_IdlePriority:n=1;break;default:o("313")}null!==Ao&&n===Eo&&--n}return r===i.unstable_UserBlockingPriority&&(0===cs||n<cs)&&(cs=n),n}function Jo(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),null!==Ao&&Eo===r?Ao=null:(t=e.earliestSuspendedTime,n=e.latestSuspendedTime,0!==t&&r<=t&&r>=n&&(e.didError=!1,(0===(t=e.latestPingedTime)||t>r)&&(e.latestPingedTime=r),ra(r,e),0!==(r=e.expirationTime)&&Cs(e,r)))}function $o(e,t){var r=e.stateNode;null!==r&&r.delete(t),null!==(e=Qo(e,t=Zo(t=Ts(),e)))&&(Qn(e,t),0!==(t=e.expirationTime)&&Cs(e,t))}function Qo(e,t){e.expirationTime<t&&(e.expirationTime=t);var r=e.alternate;null!==r&&r.expirationTime<t&&(r.expirationTime=t);var n=e.return,a=null;if(null===n&&3===e.tag)a=e.stateNode;else for(;null!==n;){if(r=n.alternate,n.childExpirationTime<t&&(n.childExpirationTime=t),null!==r&&r.childExpirationTime<t&&(r.childExpirationTime=t),null===n.return&&3===n.tag){a=n.stateNode;break}n=n.return}return a}function es(e,t){null!==(e=Qo(e,t))&&(!So&&0!==Eo&&t>Eo&&jo(),Qn(e,t),So&&!Oo&&Ao===e||Cs(e,e.expirationTime),bs>ys&&(bs=0,o("185")))}function ts(e,t,r,n,a){return i.unstable_runWithPriority(i.unstable_ImmediatePriority,(function(){return e(t,r,n,a)}))}var rs=null,ns=null,as=0,is=void 0,os=!1,ss=null,ls=0,cs=0,us=!1,ds=null,ps=!1,hs=!1,fs=null,ms=i.unstable_now(),gs=1073741822-(ms/10|0),vs=gs,ys=50,bs=0,_s=null;function xs(){gs=1073741822-((i.unstable_now()-ms)/10|0)}function ws(e,t){if(0!==as){if(t<as)return;null!==is&&i.unstable_cancelCallback(is)}as=t,e=i.unstable_now()-ms,is=i.unstable_scheduleCallback(Es,{timeout:10*(1073741822-t)-e})}function ks(e,t,r,n,a){e.expirationTime=n,0!==a||As()?0<a&&(e.timeoutHandle=bn(Ms.bind(null,e,t,r),a)):(e.pendingCommitExpirationTime=r,e.finishedWork=t)}function Ms(e,t,r){e.pendingCommitExpirationTime=r,e.finishedWork=t,xs(),vs=gs,Is(e,r)}function Ts(){return os?vs:(Ss(),0!==ls&&1!==ls||(xs(),vs=gs),vs)}function Cs(e,t){null===e.nextScheduledRoot?(e.expirationTime=t,null===ns?(rs=ns=e,e.nextScheduledRoot=e):(ns=ns.nextScheduledRoot=e).nextScheduledRoot=rs):t>e.expirationTime&&(e.expirationTime=t),os||(ps?hs&&(ss=e,ls=1073741823,Ps(e,1073741823,!1)):1073741823===t?Ds(1073741823,!1):ws(e,t))}function Ss(){var e=0,t=null;if(null!==ns)for(var r=ns,n=rs;null!==n;){var a=n.expirationTime;if(0===a){if((null===r||null===ns)&&o("244"),n===n.nextScheduledRoot){rs=ns=n.nextScheduledRoot=null;break}if(n===rs)rs=a=n.nextScheduledRoot,ns.nextScheduledRoot=a,n.nextScheduledRoot=null;else{if(n===ns){(ns=r).nextScheduledRoot=rs,n.nextScheduledRoot=null;break}r.nextScheduledRoot=n.nextScheduledRoot,n.nextScheduledRoot=null}n=r.nextScheduledRoot}else{if(a>e&&(e=a,t=n),n===ns)break;if(1073741823===e)break;r=n,n=n.nextScheduledRoot}}ss=t,ls=e}var Ls=!1;function As(){return!!Ls||!!i.unstable_shouldYield()&&(Ls=!0)}function Es(){try{if(!As()&&null!==rs){xs();var e=rs;do{var t=e.expirationTime;0!==t&&gs<=t&&(e.nextExpirationTimeToWorkOn=gs),e=e.nextScheduledRoot}while(e!==rs)}Ds(0,!0)}finally{Ls=!1}}function Ds(e,t){if(Ss(),t)for(xs(),vs=gs;null!==ss&&0!==ls&&e<=ls&&!(Ls&&gs>ls);)Ps(ss,ls,gs>ls),Ss(),xs(),vs=gs;else for(;null!==ss&&0!==ls&&e<=ls;)Ps(ss,ls,!1),Ss();if(t&&(as=0,is=null),0!==ls&&ws(ss,ls),bs=0,_s=null,null!==fs)for(e=fs,fs=null,t=0;t<e.length;t++){var r=e[t];try{r._onComplete()}catch(e){us||(us=!0,ds=e)}}if(us)throw e=ds,ds=null,us=!1,e}function Is(e,t){os&&o("253"),ss=e,ls=t,Ps(e,t,!1),Ds(1073741823,!1)}function Ps(e,t,r){if(os&&o("245"),os=!0,r){var n=e.finishedWork;null!==n?Os(e,n,t):(e.finishedWork=null,-1!==(n=e.timeoutHandle)&&(e.timeoutHandle=-1,_n(n)),Ko(e,r),null!==(n=e.finishedWork)&&(As()?e.finishedWork=n:Os(e,n,t)))}else null!==(n=e.finishedWork)?Os(e,n,t):(e.finishedWork=null,-1!==(n=e.timeoutHandle)&&(e.timeoutHandle=-1,_n(n)),Ko(e,r),null!==(n=e.finishedWork)&&Os(e,n,t));os=!1}function Os(e,t,r){var n=e.firstBatch;if(null!==n&&n._expirationTime>=r&&(null===fs?fs=[n]:fs.push(n),n._defer))return e.finishedWork=t,void(e.expirationTime=0);e.finishedWork=null,e===_s?bs++:(_s=e,bs=0),i.unstable_runWithPriority(i.unstable_ImmediatePriority,(function(){Wo(e,t)}))}function Rs(e){null===ss&&o("246"),ss.expirationTime=0,us||(us=!0,ds=e)}function Fs(e,t){var r=ps;ps=!0;try{return e(t)}finally{(ps=r)||os||Ds(1073741823,!1)}}function zs(e,t){if(ps&&!hs){hs=!0;try{return e(t)}finally{hs=!1}}return e(t)}function Ns(e,t,r){ps||os||0===cs||(Ds(cs,!1),cs=0);var n=ps;ps=!0;try{return i.unstable_runWithPriority(i.unstable_UserBlockingPriority,(function(){return e(t,r)}))}finally{(ps=n)||os||Ds(1073741823,!1)}}function js(e,t,r,n,a){var i=t.current;e:if(r){t:{2===rr(r=r._reactInternalFiber)&&1===r.tag||o("170");var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break t;case 1:if(On(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break t}}s=s.return}while(null!==s);o("171"),s=void 0}if(1===r.tag){var l=r.type;if(On(l)){r=Nn(r,l,s);break e}}r=s}else r=An;return null===t.context?t.context=r:t.pendingContext=r,t=a,(a=Xi(n)).payload={element:e},null!==(t=void 0===t?null:t)&&(a.callback=t),Uo(),Ji(i,a),es(i,n),n}function Bs(e,t,r,n){var a=t.current;return js(e,t,r,a=Zo(Ts(),a),n)}function Ys(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Hs(e){var t=1073741822-25*(1+((1073741822-Ts()+500)/25|0));t>=Co&&(t=Co-1),this._expirationTime=Co=t,this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function Vs(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function Us(e,t,r){e={current:t=Wn(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,pingCache:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,didError:!1,pendingCommitExpirationTime:0,finishedWork:null,timeoutHandle:-1,context:null,pendingContext:null,hydrate:r,nextExpirationTimeToWorkOn:0,expirationTime:0,firstBatch:null,nextScheduledRoot:null},this._internalRoot=t.stateNode=e}function Ws(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Gs(e,t,r,n,a){var i=r._reactRootContainer;if(i){if("function"==typeof a){var o=a;a=function(){var e=Ys(i._internalRoot);o.call(e)}}null!=e?i.legacy_renderSubtreeIntoContainer(e,t,a):i.render(t,a)}else{if(i=r._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var r;r=e.lastChild;)e.removeChild(r);return new Us(e,!1,t)}(r,n),"function"==typeof a){var s=a;a=function(){var e=Ys(i._internalRoot);s.call(e)}}zs((function(){null!=e?i.legacy_renderSubtreeIntoContainer(e,t,a):i.render(t,a)}))}return Ys(i._internalRoot)}function qs(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return Ws(t)||o("200"),function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Xe,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)}Se=function(e,t,r){switch(t){case"input":if(kt(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=j(n);a||o("90"),Ue(n),kt(n,a)}}}break;case"textarea":Jr(e,r);break;case"select":null!=(t=r.value)&&Kr(e,!!r.multiple,t,!1)}},Hs.prototype.render=function(e){this._defer||o("250"),this._hasChildren=!0,this._children=e;var t=this._root._internalRoot,r=this._expirationTime,n=new Vs;return js(e,t,null,r,n._onCommit),n},Hs.prototype.then=function(e){if(this._didComplete)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Hs.prototype.commit=function(){var e=this._root._internalRoot,t=e.firstBatch;if(this._defer&&null!==t||o("251"),this._hasChildren){var r=this._expirationTime;if(t!==this){this._hasChildren&&(r=this._expirationTime=t._expirationTime,this.render(this._children));for(var n=null,a=t;a!==this;)n=a,a=a._next;null===n&&o("251"),n._next=a._next,this._next=t,e.firstBatch=this}this._defer=!1,Is(e,r),t=this._next,this._next=null,null!==(t=e.firstBatch=t)&&t._hasChildren&&t.render(t._children)}else this._next=null,this._defer=!1},Hs.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++)(0,e[t])()}},Vs.prototype.then=function(e){if(this._didCommit)e();else{var t=this._callbacks;null===t&&(t=this._callbacks=[]),t.push(e)}},Vs.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var e=this._callbacks;if(null!==e)for(var t=0;t<e.length;t++){var r=e[t];"function"!=typeof r&&o("191",r),r()}}},Us.prototype.render=function(e,t){var r=this._internalRoot,n=new Vs;return null!==(t=void 0===t?null:t)&&n.then(t),Bs(e,r,null,n._onCommit),n},Us.prototype.unmount=function(e){var t=this._internalRoot,r=new Vs;return null!==(e=void 0===e?null:e)&&r.then(e),Bs(null,t,null,r._onCommit),r},Us.prototype.legacy_renderSubtreeIntoContainer=function(e,t,r){var n=this._internalRoot,a=new Vs;return null!==(r=void 0===r?null:r)&&a.then(r),Bs(t,n,e,a._onCommit),a},Us.prototype.createBatch=function(){var e=new Hs(this),t=e._expirationTime,r=this._internalRoot,n=r.firstBatch;if(null===n)r.firstBatch=e,e._next=null;else{for(r=null;null!==n&&n._expirationTime>=t;)r=n,n=n._next;e._next=n,null!==r&&(r._next=e)}return e},Pe=Fs,Oe=Ns,Re=function(){os||0===cs||(Ds(cs,!1),cs=0)};var Ks,Xs,Zs={createPortal:qs,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?o("188"):o("268",Object.keys(e))),e=null===(e=ar(t))?null:e.stateNode},hydrate:function(e,t,r){return Ws(t)||o("200"),Gs(null,e,t,!0,r)},render:function(e,t,r){return Ws(t)||o("200"),Gs(null,e,t,!1,r)},unstable_renderSubtreeIntoContainer:function(e,t,r,n){return Ws(r)||o("200"),(null==e||void 0===e._reactInternalFiber)&&o("38"),Gs(e,t,r,!1,n)},unmountComponentAtNode:function(e){return Ws(e)||o("40"),!!e._reactRootContainer&&(zs((function(){Gs(null,null,e,!1,(function(){e._reactRootContainer=null}))})),!0)},unstable_createPortal:function(){return qs.apply(void 0,arguments)},unstable_batchedUpdates:Fs,unstable_interactiveUpdates:Ns,flushSync:function(e,t){os&&o("187");var r=ps;ps=!0;try{return ts(e,t)}finally{ps=r,Ds(1073741823,!1)}},unstable_createRoot:function(e,t){return Ws(e)||o("299","unstable_createRoot"),new Us(e,!0,null!=t&&!0===t.hydrate)},unstable_flushControlled:function(e){var t=ps;ps=!0;try{ts(e)}finally{(ps=t)||os||Ds(1073741823,!1)}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[z,N,j,E.injectEventPluginsByName,b,W,function(e){S(e,U)},De,Ie,Lr,I]}};Xs=(Ks={findFiberByHostInstance:F,bundleType:0,version:"16.8.6",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var r=t.inject(e);Yn=Vn((function(e){return t.onCommitFiberRoot(r,e)})),Hn=Vn((function(e){return t.onCommitFiberUnmount(r,e)}))}catch(e){}}(a({},Ks,{overrideProps:null,currentDispatcherRef:We.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=ar(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Xs?Xs(e):null}}));var Js={default:Zs},$s=Js&&Zs||Js;e.exports=$s.default||$s},function(e,t,r){"use strict";e.exports=r(289)},function(e,t,r){"use strict";(function(e){
/** @license React v0.13.6
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
Object.defineProperty(t,"__esModule",{value:!0});var r=null,n=!1,a=3,i=-1,o=-1,s=!1,l=!1;function c(){if(!s){var e=r.expirationTime;l?k():l=!0,w(p,e)}}function u(){var e=r,t=r.next;if(r===t)r=null;else{var n=r.previous;r=n.next=t,t.previous=n}e.next=e.previous=null,n=e.callback,t=e.expirationTime,e=e.priorityLevel;var i=a,s=o;a=e,o=t;try{var l=n()}finally{a=i,o=s}if("function"==typeof l)if(l={callback:l,priorityLevel:e,expirationTime:t,next:null,previous:null},null===r)r=l.next=l.previous=l;else{n=null,e=r;do{if(e.expirationTime>=t){n=e;break}e=e.next}while(e!==r);null===n?n=r:n===r&&(r=l,c()),(t=n.previous).next=n.previous=l,l.next=n,l.previous=t}}function d(){if(-1===i&&null!==r&&1===r.priorityLevel){s=!0;try{do{u()}while(null!==r&&1===r.priorityLevel)}finally{s=!1,null!==r?c():l=!1}}}function p(e){s=!0;var a=n;n=e;try{if(e)for(;null!==r;){var i=t.unstable_now();if(!(r.expirationTime<=i))break;do{u()}while(null!==r&&r.expirationTime<=i)}else if(null!==r)do{u()}while(null!==r&&!M())}finally{s=!1,n=a,null!==r?c():l=!1,d()}}var h,f,m=Date,g="function"==typeof setTimeout?setTimeout:void 0,v="function"==typeof clearTimeout?clearTimeout:void 0,y="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,b="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function _(e){h=y((function(t){v(f),e(t)})),f=g((function(){b(h),e(t.unstable_now())}),100)}if("object"==typeof performance&&"function"==typeof performance.now){var x=performance;t.unstable_now=function(){return x.now()}}else t.unstable_now=function(){return m.now()};var w,k,M,T=null;if("undefined"!=typeof window?T=window:void 0!==e&&(T=e),T&&T._schedMock){var C=T._schedMock;w=C[0],k=C[1],M=C[2],t.unstable_now=C[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var S=null,L=function(e){if(null!==S)try{S(e)}finally{S=null}};w=function(e){null!==S?setTimeout(w,0,e):(S=e,setTimeout(L,0,!1))},k=function(){S=null},M=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var A=null,E=!1,D=-1,I=!1,P=!1,O=0,R=33,F=33;M=function(){return O<=t.unstable_now()};var z=new MessageChannel,N=z.port2;z.port1.onmessage=function(){E=!1;var e=A,r=D;A=null,D=-1;var n=t.unstable_now(),a=!1;if(0>=O-n){if(!(-1!==r&&r<=n))return I||(I=!0,_(j)),A=e,void(D=r);a=!0}if(null!==e){P=!0;try{e(a)}finally{P=!1}}};var j=function(e){if(null!==A){_(j);var t=e-O+F;t<F&&R<F?(8>t&&(t=8),F=t<R?R:t):R=t,O=e+F,E||(E=!0,N.postMessage(void 0))}else I=!1};w=function(e,t){A=e,D=t,P||0>t?N.postMessage(void 0):I||(I=!0,_(j))},k=function(){A=null,E=!1,D=-1}}t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,r){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=a,o=i;a=e,i=t.unstable_now();try{return r()}finally{a=n,i=o,d()}},t.unstable_next=function(e){switch(a){case 1:case 2:case 3:var r=3;break;default:r=a}var n=a,o=i;a=r,i=t.unstable_now();try{return e()}finally{a=n,i=o,d()}},t.unstable_scheduleCallback=function(e,n){var o=-1!==i?i:t.unstable_now();if("object"==typeof n&&null!==n&&"number"==typeof n.timeout)n=o+n.timeout;else switch(a){case 1:n=o+-1;break;case 2:n=o+250;break;case 5:n=o+1073741823;break;case 4:n=o+1e4;break;default:n=o+5e3}if(e={callback:e,priorityLevel:a,expirationTime:n,next:null,previous:null},null===r)r=e.next=e.previous=e,c();else{o=null;var s=r;do{if(s.expirationTime>n){o=s;break}s=s.next}while(s!==r);null===o?o=r:o===r&&(r=e,c()),(n=o.previous).next=o.previous=e,e.next=o,e.previous=n}return e},t.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(t===e)r=null;else{e===r&&(r=t);var n=e.previous;n.next=t,t.previous=n}e.next=e.previous=null}},t.unstable_wrapCallback=function(e){var r=a;return function(){var n=a,o=i;a=r,i=t.unstable_now();try{return e.apply(this,arguments)}finally{a=n,i=o,d()}}},t.unstable_getCurrentPriorityLevel=function(){return a},t.unstable_shouldYield=function(){return!n&&(null!==r&&r.expirationTime<o||M())},t.unstable_continueExecution=function(){null!==r&&c()},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return r}}).call(this,r(68))},function(e,t,r){"use strict";var n=r(30),a=r(103),i=r(291),o=r(109);function s(e){var t=new i(e),r=a(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var l=s(r(106));l.Axios=i,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=r(110),l.CancelToken=r(305),l.isCancel=r(105),l.all=function(e){return Promise.all(e)},l.spread=r(306),e.exports=l,e.exports.default=l},function(e,t,r){"use strict";var n=r(30),a=r(104),i=r(292),o=r(293),s=r(109);function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[o,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},l.prototype.getUri=function(e){return e=s(this.defaults,e),a(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,a){return this.request(n.merge(a||{},{method:e,url:t,data:r}))}})),e.exports=l},function(e,t,r){"use strict";var n=r(30);function a(){this.handlers=[]}a.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},function(e,t,r){"use strict";var n=r(30),a=r(294),i=r(105),o=r(106);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=a(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=a(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(s(e),t&&t.response&&(t.response.data=a(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(30);e.exports=function(e,t,r){return n.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t){var r,n,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l,c=[],u=!1,d=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&h())}function h(){if(!u){var e=s(p);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||u||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,r){"use strict";var n=r(30);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(108);e.exports=function(e,t,r){var a=r.config.validateStatus;!a||a(r.status)?e(r):t(n("Request failed with status code "+r.status,r.config,null,r.request,r))}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,a){return e.config=t,r&&(e.code=r),e.request=n,e.response=a,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,r){"use strict";var n=r(300),a=r(301);e.exports=function(e,t){return e&&!n(t)?a(e,t):t}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(30),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,o={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(o[t]&&a.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o}},function(e,t,r){"use strict";var n=r(30);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function a(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=a(window.location.href),function(t){var r=n.isString(t)?a(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(30);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,a,i,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(a)&&s.push("path="+a),n.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(110);function a(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInterfaceLanguage=function(){if("undefined"==typeof navigator)return"en-US";var e=navigator;if(e){if(e.language)return e.language;if(e.languages&&e.languages[0])return e.languages[0];if(e.userLanguage)return e.userLanguage;if(e.browserLanguage)return e.browserLanguage}return"en-US"},t.getBestMatchingLanguage=function(e,t){if(t[e])return e;var r=e.indexOf("-"),n=r>=0?e.substring(0,r):e;return t[n]?n:Object.keys(t)[0]},t.validateTranslationKeys=function(e){var t=["_interfaceLanguage","_language","_defaultLanguage","_defaultLanguageFirstLevelKeys","_props"];e.forEach((function(e){if(-1!==t.indexOf(e))throw new Error(e+" cannot be used as a key. It is a reserved word.")}))},t.randomPseudo=function(e){for(var t="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=0;n<e;n+=1)t+=r.charAt(Math.floor(Math.random()*r.length));return t}},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var a=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),a[t]=e>>>((3&t)<<3)&255;return a}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,a=r;return[a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],"-",a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]],a[e[n++]]].join("")}},function(e,t,r){var n={"./af":113,"./af.js":113,"./ar":114,"./ar-dz":115,"./ar-dz.js":115,"./ar-kw":116,"./ar-kw.js":116,"./ar-ly":117,"./ar-ly.js":117,"./ar-ma":118,"./ar-ma.js":118,"./ar-sa":119,"./ar-sa.js":119,"./ar-tn":120,"./ar-tn.js":120,"./ar.js":114,"./az":121,"./az.js":121,"./be":122,"./be.js":122,"./bg":123,"./bg.js":123,"./bm":124,"./bm.js":124,"./bn":125,"./bn.js":125,"./bo":126,"./bo.js":126,"./br":127,"./br.js":127,"./bs":128,"./bs.js":128,"./ca":129,"./ca.js":129,"./cs":130,"./cs.js":130,"./cv":131,"./cv.js":131,"./cy":132,"./cy.js":132,"./da":133,"./da.js":133,"./de":134,"./de-at":135,"./de-at.js":135,"./de-ch":136,"./de-ch.js":136,"./de.js":134,"./dv":137,"./dv.js":137,"./el":138,"./el.js":138,"./en-SG":139,"./en-SG.js":139,"./en-au":140,"./en-au.js":140,"./en-ca":141,"./en-ca.js":141,"./en-gb":142,"./en-gb.js":142,"./en-ie":143,"./en-ie.js":143,"./en-il":144,"./en-il.js":144,"./en-nz":145,"./en-nz.js":145,"./eo":146,"./eo.js":146,"./es":147,"./es-do":148,"./es-do.js":148,"./es-us":149,"./es-us.js":149,"./es.js":147,"./et":150,"./et.js":150,"./eu":151,"./eu.js":151,"./fa":152,"./fa.js":152,"./fi":153,"./fi.js":153,"./fo":154,"./fo.js":154,"./fr":155,"./fr-ca":156,"./fr-ca.js":156,"./fr-ch":157,"./fr-ch.js":157,"./fr.js":155,"./fy":158,"./fy.js":158,"./ga":159,"./ga.js":159,"./gd":160,"./gd.js":160,"./gl":161,"./gl.js":161,"./gom-latn":162,"./gom-latn.js":162,"./gu":163,"./gu.js":163,"./he":164,"./he.js":164,"./hi":165,"./hi.js":165,"./hr":166,"./hr.js":166,"./hu":167,"./hu.js":167,"./hy-am":168,"./hy-am.js":168,"./id":169,"./id.js":169,"./is":170,"./is.js":170,"./it":171,"./it-ch":172,"./it-ch.js":172,"./it.js":171,"./ja":173,"./ja.js":173,"./jv":174,"./jv.js":174,"./ka":175,"./ka.js":175,"./kk":176,"./kk.js":176,"./km":177,"./km.js":177,"./kn":178,"./kn.js":178,"./ko":179,"./ko.js":179,"./ku":180,"./ku.js":180,"./ky":181,"./ky.js":181,"./lb":182,"./lb.js":182,"./lo":183,"./lo.js":183,"./lt":184,"./lt.js":184,"./lv":185,"./lv.js":185,"./me":186,"./me.js":186,"./mi":187,"./mi.js":187,"./mk":188,"./mk.js":188,"./ml":189,"./ml.js":189,"./mn":190,"./mn.js":190,"./mr":191,"./mr.js":191,"./ms":192,"./ms-my":193,"./ms-my.js":193,"./ms.js":192,"./mt":194,"./mt.js":194,"./my":195,"./my.js":195,"./nb":196,"./nb.js":196,"./ne":197,"./ne.js":197,"./nl":198,"./nl-be":199,"./nl-be.js":199,"./nl.js":198,"./nn":200,"./nn.js":200,"./pa-in":201,"./pa-in.js":201,"./pl":202,"./pl.js":202,"./pt":203,"./pt-br":204,"./pt-br.js":204,"./pt.js":203,"./ro":205,"./ro.js":205,"./ru":206,"./ru.js":206,"./sd":207,"./sd.js":207,"./se":208,"./se.js":208,"./si":209,"./si.js":209,"./sk":210,"./sk.js":210,"./sl":211,"./sl.js":211,"./sq":212,"./sq.js":212,"./sr":213,"./sr-cyrl":214,"./sr-cyrl.js":214,"./sr.js":213,"./ss":215,"./ss.js":215,"./sv":216,"./sv.js":216,"./sw":217,"./sw.js":217,"./ta":218,"./ta.js":218,"./te":219,"./te.js":219,"./tet":220,"./tet.js":220,"./tg":221,"./tg.js":221,"./th":222,"./th.js":222,"./tl-ph":223,"./tl-ph.js":223,"./tlh":224,"./tlh.js":224,"./tr":225,"./tr.js":225,"./tzl":226,"./tzl.js":226,"./tzm":227,"./tzm-latn":228,"./tzm-latn.js":228,"./tzm.js":227,"./ug-cn":229,"./ug-cn.js":229,"./uk":230,"./uk.js":230,"./ur":231,"./ur.js":231,"./uz":232,"./uz-latn":233,"./uz-latn.js":233,"./uz.js":232,"./vi":234,"./vi.js":234,"./x-pseudo":235,"./x-pseudo.js":235,"./yo":236,"./yo.js":236,"./zh-cn":237,"./zh-cn.js":237,"./zh-hk":238,"./zh-hk.js":238,"./zh-tw":239,"./zh-tw.js":239};function a(e){var t=i(e);return r(t)}function i(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}a.keys=function(){return Object.keys(n)},a.resolve=i,e.exports=a,a.id=310},function(e,t,r){var n=r(312);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,".GridChart {\n  height: 100%;\n  width: 100%; }\n\n.centered {\n  text-align: center; }\n\n.hidden {\n  display: none; }\n\n.visible-to-only-screen-reader {\n  border: 0;\n  clip: rect(0 0 0 0);\n  display: block;\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px; }\n\n.LoadingScreen {\n  top: 50%;\n  left: 50%;\n  -webkit-transform: translateX(-50%) translateY(-50%);\n  transform: translateX(-50%) translateY(-50%); }\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var r=t.protocol+"//"+t.host,n=r+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,i=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(a=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}},function(e,t,r){var n=r(315);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.tile {\n  background-color: whitesmoke;\n  margin: 15px;\n  width: 200px;\n  min-height: 120px;\n  box-sizing: border-box;\n  box-shadow: 0 0 15px -2px #ccc;\n  padding: 5px;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between; }\n  .tile .tile-label {\n    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;\n    overflow-wrap: break-word;\n    font-size: 20px;\n    padding: 3px 4px 15px 4px; }\n  .tile.edited {\n    border: 2px solid #0078D4;\n    padding: 3px;\n    border-radius: 5px; }\n  .tile.error {\n    border: 2px solid #A80000;\n    padding: 3px;\n    border-radius: 5px; }\n',""])},function(e,t,r){"use strict";function n(e,t){return void 0!==e[t]&&null!==e[t]}r.d(t,"a",(function(){return n}))},function(e,t,r){var n=r(318);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.explanation-spinner {\n  margin: auto;\n  font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;\n  padding: 40px; }\n',""])},function(e,t,r){var n=r(320);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.centered {\n  margin: auto;\n  font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;\n  padding: 40px; }\n  .centered .primary-message {\n    font-size: 20px; }\n  .centered .secondary-message {\n    font-size: 16px; }\n',""])},function(e,t,r){var n=r(322);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.prediction-area {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  font-size: 20px; }\n  .prediction-area .prediction-label, .prediction-area .probability-label {\n    margin: auto;\n    padding: 5px;\n    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n',""])},function(e,t,r){var n=r(324);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.feature-bar-explanation-chart {\n  width: 100%;\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  height: 100%; }\n  .feature-bar-explanation-chart .top-controls {\n    display: flex;\n    padding: 3px 15px; }\n    .feature-bar-explanation-chart .top-controls .slider-control {\n      flex: 1;\n      padding: 0 4px; }\n      .feature-bar-explanation-chart .top-controls .slider-control .slider-label {\n        display: flex;\n        flex-direction: row; }\n        .feature-bar-explanation-chart .top-controls .slider-control .slider-label .label-text {\n          line-height: 14px;\n          margin: 7px 0 0 4px;\n          font-size: 14px;\n          font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n    .feature-bar-explanation-chart .top-controls .feature-slider {\n      flex: 1; }\n  .feature-bar-explanation-chart .feature-importance-bar-chart {\n    width: 100%;\n    flex: 1; }\n',""])},function(e,t,r){var n=r(326);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.aggregate-chart {\n  width: 100%;\n  height: 100%;\n  display: flex;\n  flex-direction: column; }\n  .aggregate-chart .top-controls {\n    display: flex;\n    padding: 3px 15px; }\n    .aggregate-chart .top-controls .feature-slider {\n      flex: 1; }\n    .aggregate-chart .top-controls .path-selector {\n      margin: 0 5px 0 0; }\n    .aggregate-chart .top-controls .selector-label {\n      display: flex;\n      flex-direction: row; }\n      .aggregate-chart .top-controls .selector-label span {\n        padding-top: 5px;\n        font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n    .aggregate-chart .top-controls .slider-control {\n      flex: 1;\n      padding: 0 4px; }\n      .aggregate-chart .top-controls .slider-control .slider-label {\n        display: flex;\n        flex-direction: row; }\n        .aggregate-chart .top-controls .slider-control .slider-label .label-text {\n          line-height: 14px;\n          margin: 7px 0 0 4px;\n          font-size: 14px;\n          font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n\n.callout-info {\n  display: flex;\n  flex-direction: column;\n  max-width: 300px;\n  padding: 30px;\n  font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n  .callout-info button {\n    max-width: 100px; }\n',""])},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.explanation-chart {\n  width: 100%;\n  height: 100%;\n  flex: 1;\n  display: flex;\n  flex-direction: column; }\n  .explanation-chart .top-controls {\n    display: flex;\n    padding: 3px 15px;\n    justify-content: space-between; }\n    .explanation-chart .top-controls .selector {\n      display: flex; }\n      .explanation-chart .top-controls .selector .selector-label {\n        display: flex;\n        flex-direction: row; }\n        .explanation-chart .top-controls .selector .selector-label .label-text {\n          max-width: 84px;\n          line-height: 14px;\n          margin-right: -16px;\n          font-size: 14px;\n          font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n      .explanation-chart .top-controls .selector .ms-ComboBox-container {\n        max-width: 208px; }\n\n.callout-info {\n  display: flex;\n  flex-direction: column;\n  max-width: 300px;\n  padding: 30px;\n  font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n  .callout-info button {\n    max-width: 100px; }\n',""])},function(e,t,r){var n=r(329);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.aggregate-chart {\n  width: 100%;\n  height: 100%;\n  display: flex;\n  flex-direction: column; }\n  .aggregate-chart .top-controls {\n    display: flex;\n    padding: 3px 15px; }\n    .aggregate-chart .top-controls .feature-slider {\n      flex: 1; }\n    .aggregate-chart .top-controls .path-selector {\n      margin: 0 5px 0 0; }\n    .aggregate-chart .top-controls .selector-label {\n      display: flex;\n      flex-direction: row; }\n      .aggregate-chart .top-controls .selector-label span {\n        padding-top: 5px;\n        font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n    .aggregate-chart .top-controls .slider-control {\n      flex: 1;\n      padding: 0 4px; }\n      .aggregate-chart .top-controls .slider-control .slider-label {\n        display: flex;\n        flex-direction: row; }\n        .aggregate-chart .top-controls .slider-control .slider-label .label-text {\n          line-height: 14px;\n          margin: 7px 0 0 4px;\n          font-size: 14px;\n          font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n\n.callout-info {\n  display: flex;\n  flex-direction: column;\n  max-width: 300px;\n  padding: 30px;\n  font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; }\n  .callout-info button {\n    max-width: 100px; }\n',""])},function(e,t,r){var n=r(331);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.ICE-wrapper {\n  display: flex;\n  flex-direction: column;\n  flex: 1; }\n  .ICE-wrapper .unavailable, .ICE-wrapper .charting-prompt, .ICE-wrapper .loading {\n    margin: auto;\n    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;\n    padding: 40px;\n    font-size: 25px; }\n  .ICE-wrapper .feature-picker {\n    display: flex;\n    padding: 3px 15px;\n    justify-content: space-between;\n    border-bottom: 1px solid grey; }\n  .ICE-wrapper .rangeview {\n    display: flex;\n    justify-content: flex-end; }\n    .ICE-wrapper .rangeview .parameter-set {\n      display: flex; }\n  .ICE-wrapper .second-wrapper {\n    width: 100%;\n    flex: 1; }\n  .ICE-wrapper .chart-wrapper {\n    height: 100%; }\n',""])},function(e,t,r){var n=r(333);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.flex-wrapper {\n  display: flex;\n  flex-direction: column;\n  overflow: hidden; }\n  .flex-wrapper .loading-message {\n    display: flex;\n    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;\n    font-size: 20px;\n    border-bottom: 1px solid;\n    padding: 5px 10px; }\n  .flex-wrapper .label-group {\n    display: flex;\n    font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;\n    font-size: 20px;\n    border-bottom: 1px solid; }\n    .flex-wrapper .label-group .label-group-label {\n      width: 150px;\n      align-self: center;\n      padding-left: 10px; }\n    .flex-wrapper .label-group .flex-full {\n      flex: 1; }\n  .flex-wrapper .tile-scroller {\n    flex: 1;\n    overflow-y: auto;\n    display: flex;\n    flex-direction: row;\n    flex-wrap: wrap; }\n',""])},function(e,t,r){var n=r(335);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,".feature-bar-explanation-chart {\n  width: 100%;\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  height: 100%; }\n  .feature-bar-explanation-chart .top-controls {\n    display: flex;\n    padding: 3px 15px; }\n    .feature-bar-explanation-chart .top-controls .feature-slider {\n      flex: 1; }\n  .feature-bar-explanation-chart .feature-importance-bar-chart {\n    width: 100%;\n    flex: 1; }\n",""])},function(e,t,r){var n=r(337);"string"==typeof n&&(n=[[e.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r(32)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,r){(e.exports=r(31)(!1)).push([e.i,'.explainerDashboard {\n  width: 100%;\n  height: 100%; }\n  .explainerDashboard .charts-wrapper {\n    flex-grow: 1;\n    display: flex;\n    overflow: hidden;\n    width: 100%;\n    height: 100%;\n    flex-direction: column; }\n    .explainerDashboard .charts-wrapper .global-charts-wrapper {\n      width: 100%;\n      height: 55%;\n      display: flex;\n      flex-direction: row; }\n      .explainerDashboard .charts-wrapper .global-charts-wrapper .ms-FocusZone {\n        height: 100%; }\n      .explainerDashboard .charts-wrapper .global-charts-wrapper .chart {\n        flex: 1;\n        height: 100%; }\n    .explainerDashboard .charts-wrapper .local-charts-wrapper {\n      width: 100%;\n      border-top: 2px solid;\n      box-sizing: border-box;\n      height: 45%; }\n      .explainerDashboard .charts-wrapper .local-charts-wrapper .local-placeholder {\n        height: 100px;\n        display: flex;\n        align-items: center;\n        font-size: 25px; }\n        .explainerDashboard .charts-wrapper .local-charts-wrapper .local-placeholder .placeholder-text {\n          margin: auto;\n          font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;\n          padding: 40px;\n          line-height: 35px; }\n      .explainerDashboard .charts-wrapper .local-charts-wrapper .tabbed-viewer {\n        display: flex;\n        flex-direction: row;\n        height: 100%; }\n        .explainerDashboard .charts-wrapper .local-charts-wrapper .tabbed-viewer .ms-FocusZone {\n          height: 100%; }\n        .explainerDashboard .charts-wrapper .local-charts-wrapper .tabbed-viewer .view-panel {\n          display: flex;\n          flex-direction: column;\n          width: 100%; }\n          .explainerDashboard .charts-wrapper .local-charts-wrapper .tabbed-viewer .view-panel .local-commands {\n            display: flex;\n            width: 100%;\n            flex-direction: row;\n            border-bottom: 1px solid; }\n            .explainerDashboard .charts-wrapper .local-charts-wrapper .tabbed-viewer .view-panel .local-commands .clear-buton {\n              flex: 1; }\n          .explainerDashboard .charts-wrapper .local-charts-wrapper .tabbed-viewer .view-panel .local-summary {\n            width: 100%;\n            display: flex;\n            flex-direction: column;\n            flex: 1; }\n            .explainerDashboard .charts-wrapper .local-charts-wrapper .tabbed-viewer .view-panel .local-summary .local-chart-wrapper {\n              flex: 1;\n              width: 100%;\n              display: flex;\n              flex-direction: column;\n              border-top: 1px solid; }\n',""])},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=[],n=0,a=e;n<a.length;n++){var i=a[n];if(i)if("string"==typeof i)r.push(i);else if(i.hasOwnProperty("toString")&&"function"==typeof i.toString)r.push(i.toString());else for(var o in i)i[o]&&r.push(o)}return r.join(" ")}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(2),a=r(0),i=r(39),o=r(93),s=r(52),l=r(50);function c(e,t,r){return function(c){var u,d=((u=function(o){function u(e){var t=o.call(this,e)||this;return t._onSettingChanged=t._onSettingChanged.bind(t),t}return Object(n.c)(u,o),u.prototype.componentDidMount=function(){i.a.observe(this._onSettingChanged)},u.prototype.componentWillUnmount=function(){i.a.unobserve(this._onSettingChanged)},u.prototype.render=function(){var o=this;return a.createElement(s.a.Consumer,null,(function(s){var u=i.a.getSettings(t,e,s.customizations),d=o.props;if(u.styles&&"function"==typeof u.styles&&(u.styles=u.styles(Object(n.a)(Object(n.a)({},u),d))),r&&(u.styles||d.styles)){var p=Object(l.a)(u.styles,d.styles);return a.createElement(c,Object(n.a)({},u,d,{styles:p}))}return a.createElement(c,Object(n.a)({},u,d))}))},u.prototype._onSettingChanged=function(){this.forceUpdate()},u}(a.Component)).displayName="Customized"+e,u);return Object(o.a)(c,d)}}},function(e,t,r){"use strict";var n=r(78);var a=r(269),i=r(56),o=r(17),s=r(34);r.d(t,"e",(function(){return p})),r.d(t,"h",(function(){return h})),r.d(t,"f",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"c",(function(){return g})),r.d(t,"k",(function(){return v})),r.d(t,"j",(function(){return y})),r.d(t,"n",(function(){return _})),r.d(t,"m",(function(){return x})),r.d(t,"l",(function(){return w})),r.d(t,"a",(function(){return k})),r.d(t,"o",(function(){return M})),r.d(t,"b",(function(){return C})),r.d(t,"g",(function(){return S})),r.d(t,"d",(function(){return L}));var l="data-is-focusable",c="data-is-visible",u="data-focuszone-id",d="data-is-sub-focuszone";function p(e,t,r){return y(e,t,!0,!1,!1,r)}function h(e,t,r){return v(e,t,!0,!1,!0,r)}function f(e,t,r,n){return void 0===n&&(n=!0),y(e,t,n,!1,!1,r,!1,!0)}function m(e,t,r,n){return void 0===n&&(n=!0),v(e,t,n,!1,!0,r,!1,!0)}function g(e){var t=y(e,e,!0,!1,!1,!0);return!!t&&(C(t),!0)}function v(e,t,r,n,a,i,o,s){if(!t||!o&&t===e)return null;var l=b(t);if(a&&l&&(i||!x(t)&&!w(t))){var c=v(e,t.lastElementChild,!0,!0,!0,i,o,s);if(c){if(s&&_(c,!0)||!s)return c;var u=v(e,c.previousElementSibling,!0,!0,!0,i,o,s);if(u)return u;for(var d=c.parentElement;d&&d!==t;){var p=v(e,d.previousElementSibling,!0,!0,!0,i,o,s);if(p)return p;d=d.parentElement}}}if(r&&l&&_(t,s))return t;var h=v(e,t.previousElementSibling,!0,!0,!0,i,o,s);return h||(n?null:v(e,t.parentElement,!0,!1,!1,i,o,s))}function y(e,t,r,n,a,i,o,s){if(!t||t===e&&a&&!o)return null;var l=b(t);if(r&&l&&_(t,s))return t;if(!a&&l&&(i||!x(t)&&!w(t))){var c=y(e,t.firstElementChild,!0,!0,!1,i,o,s);if(c)return c}if(t===e)return null;var u=y(e,t.nextElementSibling,!0,!0,!1,i,o,s);return u||(n?null:y(e,t.parentElement,!1,!1,!0,i,o,s))}function b(e){if(!e||!e.getAttribute)return!1;var t=e.getAttribute(c);return null!=t?"true"===t:0!==e.offsetHeight||null!==e.offsetParent||!0===e.isVisible}function _(e,t){if(!e||e.disabled)return!1;var r=0,n=null;e&&e.getAttribute&&(n=e.getAttribute("tabIndex"))&&(r=parseInt(n,10));var a=e.getAttribute?e.getAttribute(l):null,i=null!==n&&r>=0,o=!!e&&"false"!==a&&("A"===e.tagName||"BUTTON"===e.tagName||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||"true"===a||i);return t?-1!==r&&o:o}function x(e){return!!(e&&e.getAttribute&&e.getAttribute(u))}function w(e){return!(!e||!e.getAttribute||"true"!==e.getAttribute(d))}function k(e){var t=Object(s.a)(e),r=t&&t.activeElement;return!(!r||!Object(a.a)(e,r))}function M(e,t){return"true"!==function(e,t){var r=Object(n.a)(e,(function(e){return e.hasAttribute(t)}));return r&&r.getAttribute(t)}(e,t)}var T=void 0;function C(e){if(e){if(T)return void(T=e);T=e;var t=Object(o.a)(e);t&&t.requestAnimationFrame((function(){T&&T.focus(),T=void 0}))}}function S(e,t){for(var r=e,n=0,a=t;n<a.length;n++){var i=a[n],o=r.children[Math.min(i,r.children.length-1)];if(!o)break;r=o}return r=_(r)&&b(r)?r:y(e,r,!0)||v(e,r)}function L(e,t){for(var r=[];t&&e&&t!==e;){var n=Object(i.a)(t,!0);if(null===n)return[];r.unshift(Array.prototype.indexOf.call(n.children,t)),t=n}return r}},,,,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(2),a=r(0),i=r(88),o=r(39),s=r(52),l=["theme","styles"];function c(e,t,r,c,u){var d=(c=c||{scope:"",fields:void 0}).scope,p=c.fields,h=void 0===p?l:p;return function(l){function c(){var t=null!==l&&l.apply(this,arguments)||this;return t._inCustomizerContext=!1,t._renderContent=function(i){t._inCustomizerContext=!!i.customizations.inCustomizerContext;var s=o.a.getSettings(h,d,i.customizations),l=s.styles,c=(s.dir,Object(n.d)(s,["styles","dir"])),u=r?r(t.props):void 0;return t._updateStyles(l),a.createElement(e,Object(n.a)({},c,u,t.props,{styles:t._styles}))},t._onSettingsChanged=function(){return t.forceUpdate()},t}return Object(n.c)(c,l),c.prototype.render=function(){return a.createElement(s.a.Consumer,null,this._renderContent)},c.prototype.componentDidMount=function(){this._inCustomizerContext||o.a.observe(this._onSettingsChanged)},c.prototype.componentWillUnmount=function(){this._inCustomizerContext||o.a.unobserve(this._onSettingsChanged)},c.prototype._updateStyles=function(e){var r=this;this._styles&&e===this._styles.__cachedInputs__[1]&&!this.props.styles||(this._styles=function(n){return Object(i.a)(n,t,e,r.props.styles)},this._styles.__cachedInputs__=[t,e,this.props.styles])},c.displayName="Styled"+(e.displayName||e.name),c}(u?a.PureComponent:a.Component)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(24),a=r(70),i=r(276),o=50,s=0,l=n.a.getInstance();l&&l.onReset&&l.onReset((function(){return s++}));var c="__retval__";function u(e){void 0===e&&(e={});var t=new Map,r=0,n=s;return function(l,u){void 0===u&&(u={});var d=t,h=u.theme,f=h&&void 0!==h.rtl?h.rtl:Object(i.a)(),m=e.disableCaching;return n!==s&&(n=s,t=new Map,r=0),e.disableCaching||(d=p(t,l),d=p(d,u)),!m&&d[c]||(d[c]=void 0===l?{}:Object(a.a)(["function"==typeof l?l(u):l],{rtl:!!f}),m||r++),r>o&&(t.clear(),r=0,e.disableCaching=!0),d[c]}}function d(e,t){return t=function(e){switch(e){case void 0:return"__undefined__";case null:return"__null__";default:return e}}(t),e.has(t)||e.set(t,new Map),e.get(t)}function p(e,t){if("function"==typeof t&&t.__cachedInputs__)for(var r=0,n=t.__cachedInputs__;r<n.length;r++){e=d(e,n[r])}else if("object"==typeof t)for(var a in t)t.hasOwnProperty(a)&&(e=d(e,t[a]));return e}},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(83);function a(e){Object(n.a)(e,{componentDidMount:i,componentDidUpdate:o,componentWillUnmount:s})}function i(){l(this.props.componentRef,this)}function o(e){e.componentRef!==this.props.componentRef&&(l(e.componentRef,null),l(this.props.componentRef,this))}function s(){l(this.props.componentRef,null)}function l(e,t){e&&("object"==typeof e?e.current=t:"function"==typeof e&&e(t))}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(2),a=r(0),i=function(e){function t(t){var r=e.call(this,t)||this;return r.state={isRendered:!1},r}return Object(n.c)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.delay;this._timeoutId=setTimeout((function(){e.setState({isRendered:!0})}),t)},t.prototype.componentWillUnmount=function(){this._timeoutId&&clearTimeout(this._timeoutId)},t.prototype.render=function(){return this.state.isRendered?a.Children.only(this.props.children):null},t.defaultProps={delay:0},t}(a.Component)},function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(2),a=r(0),i=r(26),o=r(91),s=r(34),l=r(94),c=r(17),u=r(340),d=r(60),p=function(e){function t(t){var r=e.call(this,t)||this;return r._root=a.createRef(),r._disposables=[],r._onKeyDown=function(e){switch(e.which){case i.a.escape:r.props.onDismiss&&(r.props.onDismiss(e),e.preventDefault(),e.stopPropagation())}},r._onFocus=function(){r._containsFocus=!0},r._onBlur=function(e){r._root.current&&e.relatedTarget&&!r._root.current.contains(e.relatedTarget)&&(r._containsFocus=!1)},r._async=new o.a(r),r.state={needsVerticalScrollBar:!1},r}return Object(n.c)(t,e),t.prototype.UNSAFE_componentWillMount=function(){this._originalFocusedElement=Object(s.a)().activeElement},t.prototype.componentDidMount=function(){if(this._root.current){this._disposables.push(Object(l.a)(this._root.current,"focus",this._onFocus,!0),Object(l.a)(this._root.current,"blur",this._onBlur,!0));var e=Object(c.a)(this._root.current);e&&this._disposables.push(Object(l.a)(e,"keydown",this._onKeyDown)),Object(u.a)(this._root.current)&&(this._containsFocus=!0)}this._updateScrollBarAsync()},t.prototype.componentDidUpdate=function(){this._updateScrollBarAsync(),this._async.dispose()},t.prototype.componentWillUnmount=function(){this._disposables.forEach((function(e){return e()})),this.props.shouldRestoreFocus&&this._originalFocusedElement&&this._containsFocus&&this._originalFocusedElement!==window&&this._originalFocusedElement&&this._originalFocusedElement.focus(),delete this._originalFocusedElement},t.prototype.render=function(){var e=this.props,t=e.role,r=e.className,i=e.ariaLabel,o=e.ariaLabelledBy,s=e.ariaDescribedBy,l=e.style;return a.createElement("div",Object(n.a)({ref:this._root},Object(d.d)(this.props,d.c),{className:r,role:t,"aria-label":i,"aria-labelledby":o,"aria-describedby":s,onKeyDown:this._onKeyDown,style:Object(n.a)({overflowY:this.state.needsVerticalScrollBar?"scroll":void 0,outline:"none"},l)}),this.props.children)},t.prototype._updateScrollBarAsync=function(){var e=this;this._async.requestAnimationFrame((function(){e._getScrollBar()}))},t.prototype._getScrollBar=function(){if(!this.props.style||!this.props.style.overflowY){var e=!1;if(this._root&&this._root.current&&this._root.current.firstElementChild){var t=this._root.current.clientHeight,r=this._root.current.firstElementChild.clientHeight;t>0&&r>t&&(e=r-t>1)}this.state.needsVerticalScrollBar!==e&&this.setState({needsVerticalScrollBar:e})}},t.defaultProps={shouldRestoreFocus:!0},t}(a.Component)},function(e,t,r){"use strict";r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m})),r.d(t,"c",(function(){return v})),r.d(t,"d",(function(){return y})),r.d(t,"f",(function(){return b})),r.d(t,"e",(function(){return _}));var n,a,i,o,s,l=r(34),c=r(69),u=r(17),d=0,p=Object(c.a)({overflow:"hidden !important"}),h="data-is-scrollable",f=(a=0,i=null,o=function(e){1===e.targetTouches.length&&(a=e.targetTouches[0].clientY)},s=function(e){if(1===e.targetTouches.length&&(e.stopPropagation(),i)){var t=e.targetTouches[0].clientY-a,r=_(e.target);r&&(i=r),0===i.scrollTop&&t>0&&e.preventDefault(),i.scrollHeight-i.scrollTop<=i.clientHeight&&t<0&&e.preventDefault()}},function(e,t){e&&(t.on(e,"touchstart",o,{passive:!1}),t.on(e,"touchmove",s,{passive:!1}),i=e)}),m=function(e,t){if(e){t.on(e,"touchmove",(function(e){e.stopPropagation()}),{passive:!1})}},g=function(e){e.preventDefault()};function v(){var e=Object(l.a)();e&&e.body&&!d&&(e.body.classList.add(p),e.body.addEventListener("touchmove",g,{passive:!1,capture:!1})),d++}function y(){if(d>0){var e=Object(l.a)();e&&e.body&&1===d&&(e.body.classList.remove(p),e.body.removeEventListener("touchmove",g)),d--}}function b(){if(void 0===n){var e=document.createElement("div");e.style.setProperty("width","100px"),e.style.setProperty("height","100px"),e.style.setProperty("overflow","scroll"),e.style.setProperty("position","absolute"),e.style.setProperty("top","-9999px"),document.body.appendChild(e),n=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return n}function _(e){for(var t=e,r=Object(l.a)(e);t&&t!==r.body;){if("true"===t.getAttribute(h))return t;t=t.parentElement}for(t=e;t&&t!==r.body;){if("false"!==t.getAttribute(h)){var n=getComputedStyle(t),a=n?n.getPropertyValue("overflow-y"):"";if(a&&("scroll"===a||"auto"===a))return t}t=t.parentElement}return t&&t!==r.body||(t=Object(u.a)(e)),t}},function(e,t,r){"use strict";var n;r.d(t,"a",(function(){return n})),function(e){e[e.Normal=0]="Normal",e[e.Divider=1]="Divider",e[e.Header=2]="Header"}(n||(n={}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n,a=r(17);function i(e){if(void 0===n||e){var t=Object(a.a)(),r=t&&t.navigator.userAgent;n=!!r&&-1!==r.indexOf("Macintosh")}return!!n}},function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(){return!!(window&&window.navigator&&window.navigator.userAgent)&&/iPad|iPhone|iPod/i.test(window.navigator.userAgent)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(78),a=r(92);function i(e,t){var r=Object(n.a)(e,(function(e){return t===e||e.hasAttribute(a.a)}));return null!==r&&r.hasAttribute(a.a)}},function(e,t,r){"use strict";function n(e,t){for(var r=-1,n=0;e&&n<e.length;n++)if(t(e[n],n)){r=n;break}return r}function a(e,t){var r=n(e,t);if(!(r<0))return e[r]}function i(e,t,r){var n=e.slice();return n[r]=t,n}function o(e,t,r){var n=e.slice();return n.splice(t,0,r),n}function s(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r.d(t,"d",(function(){return n})),r.d(t,"c",(function(){return a})),r.d(t,"e",(function(){return i})),r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}))},function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter((function(e){return e})).join(" ").trim();return""===r?void 0:r}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";function n(e,t){for(var r=[],n=0,a=t;n<a.length;n++){var i=e[a[n]];i&&r.push(i)}return r}r.d(t,"a",(function(){return n}))},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(46);var a=Object(n.a)((function(e){return Object(n.a)((function(t){var r=Object(n.a)((function(e){return function(r){return t(r,e)}}));return function(n,a){return e(n,a?r(a):t)}}))}));function i(e,t){return a(e)(t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(2),a=r(0),i=r(95),o=r(339),s=r(275),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._skipComponentRefResolution=!0,t}return Object(n.c)(t,e),t.prototype.render=function(){return a.createElement(s.a,Object(n.a)({},this.props,{primary:!0,onRenderDescription:i.b}))},t=Object(n.b)([Object(o.a)("PrimaryButton",["theme","styles"],!0)],t)}(i.a)},function(e,t,r){"use strict";var n,a=r(354),i=r(2),o=r(0),s=r(355),l=r(83),c=function(e){var t;return function(r){t||(t=new Set,Object(l.a)(e,{componentWillUnmount:function(){t.forEach((function(e){return cancelAnimationFrame(e)}))}}));var n=requestAnimationFrame((function(){t.delete(n),r()}));t.add(n)}},u=r(34),d=r(26),p=r(340),h=r(356),f=r(71),m=r(60),g=r(365),v=r(364),y=r(361),b=r(362),_=r(371),x=r(382),w=r(378),k=r(15),M=r(360),T=function(){function e(){this._size=0}return e.prototype.updateOptions=function(e){for(var t=[],r=0,n=0;n<e.length;n++)e[n].itemType===M.a.Divider||e[n].itemType===M.a.Header?t.push(n):e[n].hidden||r++;this._size=r,this._displayOnlyOptionsCache=t},Object.defineProperty(e.prototype,"optionSetSize",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.positionInSet=function(e){if(void 0!==e){for(var t=0;e>this._displayOnlyOptionsCache[t];)t++;if(this._displayOnlyOptionsCache[t]===e)throw new Error("Unexpected: Option at index "+e+" is not a selectable element.");return e-t+1}},e}(),C=r(388),S=r(35),L=r(381),A=r(380),E=r(376),D=r(386),I=r(370),P=r(359),O=r(95),R=Object(s.a)(),F=function(e){function t(t){var r=e.call(this,t)||this,n=r.props.allowTouchBodyScroll,a=void 0!==n&&n;return r._allowTouchBodyScroll=a,r}return Object(i.c)(t,e),t.prototype.componentDidMount=function(){!this._allowTouchBodyScroll&&Object(P.c)()},t.prototype.componentWillUnmount=function(){!this._allowTouchBodyScroll&&Object(P.d)()},t.prototype.render=function(){var e=this.props,t=e.isDarkThemed,r=e.className,n=e.theme,a=e.styles,s=Object(m.d)(this.props,m.c),l=R(a,{theme:n,className:r,isDark:t});return o.createElement("div",Object(i.a)({},s,{className:l.root}))},t}(O.a),z=r(9),N={root:"ms-Overlay",rootDark:"ms-Overlay--dark"},j=Object(a.a)(F,(function(e){var t,r=e.className,n=e.theme,a=e.isNone,i=e.isDark,o=n.palette,s=Object(z.v)(N,n);return{root:[s.root,n.fonts.medium,{backgroundColor:o.whiteTranslucent40,top:0,right:0,bottom:0,left:0,position:"absolute",selectors:(t={},t[z.f]={border:"1px solid WindowText",opacity:0},t)},a&&{visibility:"hidden"},i&&[s.rootDark,{backgroundColor:o.blackTranslucent40}],r]}}),void 0,{scope:"Overlay"}),B=r(358),Y=r(338),H=r(276),V=r(269),U=r(94),W=function(e){function t(r){var n=e.call(this,r)||this;return n._root=o.createRef(),n._firstBumper=o.createRef(),n._lastBumper=o.createRef(),n._hasFocus=!1,n._onRootFocus=function(e){n.props.onFocus&&n.props.onFocus(e),n._hasFocus=!0},n._onRootBlur=function(e){n.props.onBlur&&n.props.onBlur(e);var t=e.relatedTarget;null===e.relatedTarget&&(t=n._getDocument().activeElement),Object(V.a)(n._root.current,t)||(n._hasFocus=!1)},n._onFirstBumperFocus=function(){n._onBumperFocus(!0)},n._onLastBumperFocus=function(){n._onBumperFocus(!1)},n._onBumperFocus=function(e){if(!n.props.disabled){var t=e===n._hasFocus?n._lastBumper.current:n._firstBumper.current;if(n._root.current){var r=e===n._hasFocus?Object(p.i)(n._root.current,t,!0,!1):Object(p.f)(n._root.current,t,!0,!1);r&&(n._isBumper(r)?n.focus():r.focus())}}},n._onFocusCapture=function(e){n.props.onFocusCapture&&n.props.onFocusCapture(e),e.target===e.currentTarget||n._isBumper(e.target)||(n._previouslyFocusedElementInTrapZone=e.target)},n._forceFocusInTrap=function(e){if(!n.props.disabled&&t._focusStack.length&&n===t._focusStack[t._focusStack.length-1]){var r=n._getDocument().activeElement;Object(V.a)(n._root.current,r)||(n.focus(),n._hasFocus=!0,e.preventDefault(),e.stopPropagation())}},n._forceClickInTrap=function(e){if(!n.props.disabled&&t._focusStack.length&&n===t._focusStack[t._focusStack.length-1]){var r=e.target;r&&!Object(V.a)(n._root.current,r)&&(n.focus(),n._hasFocus=!0,e.preventDefault(),e.stopPropagation())}},Object(h.a)(n),n}return Object(i.c)(t,e),t.prototype.componentDidMount=function(){this._bringFocusIntoZone(),this._updateEventHandlers(this.props)},t.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=e.elementToFocusOnDismiss;t&&this._previouslyFocusedElementOutsideTrapZone!==t&&(this._previouslyFocusedElementOutsideTrapZone=t),this._updateEventHandlers(e)},t.prototype.componentDidUpdate=function(e){var t=void 0===e.forceFocusInsideTrap||e.forceFocusInsideTrap,r=void 0===this.props.forceFocusInsideTrap||this.props.forceFocusInsideTrap,n=void 0!==e.disabled&&e.disabled,a=void 0!==this.props.disabled&&this.props.disabled;!t&&r||n&&!a?this._bringFocusIntoZone():(t&&!r||!n&&a)&&this._returnFocusToInitiator()},t.prototype.componentWillUnmount=function(){this.props.disabled&&!this.props.forceFocusInsideTrap&&Object(V.a)(this._root.current,this._getDocument().activeElement)||this._returnFocusToInitiator(),this._disposeClickHandler&&(this._disposeClickHandler(),this._disposeClickHandler=void 0),this._disposeFocusHandler&&(this._disposeFocusHandler(),this._disposeFocusHandler=void 0),delete this._previouslyFocusedElementInTrapZone,delete this._previouslyFocusedElementOutsideTrapZone},t.prototype.render=function(){var e=this.props,t=e.className,r=e.disabled,n=void 0!==r&&r,a=e.ariaLabelledBy,s=Object(m.d)(this.props,m.c),l={style:{pointerEvents:"none",position:"fixed"},tabIndex:n?-1:0,"data-is-visible":!0};return o.createElement("div",Object(i.a)({},s,{className:t,ref:this._root,"aria-labelledby":a,onFocusCapture:this._onFocusCapture,onFocus:this._onRootFocus,onBlur:this._onRootBlur}),o.createElement("div",Object(i.a)({},l,{ref:this._firstBumper,onFocus:this._onFirstBumperFocus})),this.props.children,o.createElement("div",Object(i.a)({},l,{ref:this._lastBumper,onFocus:this._onLastBumperFocus})))},t.prototype.focus=function(){var e=this.props,t=e.focusPreviouslyFocusedInnerElement,r=e.firstFocusableSelector;if(t&&this._previouslyFocusedElementInTrapZone&&Object(V.a)(this._root.current,this._previouslyFocusedElementInTrapZone))this._focusAsync(this._previouslyFocusedElementInTrapZone);else{var n="string"==typeof r?r:r&&r(),a=null;this._root.current&&(n&&(a=this._root.current.querySelector("."+n)),a||(a=Object(p.j)(this._root.current,this._root.current.firstChild,!1,!1,!1,!0))),a&&this._focusAsync(a)}},t.prototype._focusAsync=function(e){this._isBumper(e)||Object(p.b)(e)},t.prototype._bringFocusIntoZone=function(){var e=this.props,r=e.elementToFocusOnDismiss,n=e.disabled,a=void 0!==n&&n,i=e.disableFirstFocus,o=void 0!==i&&i;a||(t._focusStack.push(this),this._previouslyFocusedElementOutsideTrapZone=r||this._getDocument().activeElement,o||Object(V.a)(this._root.current,this._previouslyFocusedElementOutsideTrapZone)||this.focus())},t.prototype._returnFocusToInitiator=function(){var e=this,r=this.props.ignoreExternalFocusing;t._focusStack=t._focusStack.filter((function(t){return e!==t}));var n=this._getDocument(),a=n.activeElement;r||!this._previouslyFocusedElementOutsideTrapZone||"function"!=typeof this._previouslyFocusedElementOutsideTrapZone.focus||!Object(V.a)(this._root.current,a)&&a!==n.body||this._focusAsync(this._previouslyFocusedElementOutsideTrapZone)},t.prototype._updateEventHandlers=function(e){var t=e.isClickableOutsideFocusTrap,r=void 0!==t&&t,n=e.forceFocusInsideTrap,a=void 0===n||n;a&&!this._disposeFocusHandler?this._disposeFocusHandler=Object(U.a)(window,"focus",this._forceFocusInTrap,!0):!a&&this._disposeFocusHandler&&(this._disposeFocusHandler(),this._disposeFocusHandler=void 0),r||this._disposeClickHandler?r&&this._disposeClickHandler&&(this._disposeClickHandler(),this._disposeClickHandler=void 0):this._disposeClickHandler=Object(U.a)(window,"click",this._forceClickInTrap,!0)},t.prototype._isBumper=function(e){return e===this._firstBumper.current||e===this._lastBumper.current},t.prototype._getDocument=function(){return Object(u.a)(this._root.current)},t._focusStack=[],t}(o.Component);!function(e){e[e.smallFluid=0]="smallFluid",e[e.smallFixedFar=1]="smallFixedFar",e[e.smallFixedNear=2]="smallFixedNear",e[e.medium=3]="medium",e[e.large=4]="large",e[e.largeFixed=5]="largeFixed",e[e.extraLarge=6]="extraLarge",e[e.custom=7]="custom",e[e.customNear=8]="customNear"}(n||(n={}));var G,q=Object(s.a)();!function(e){e[e.closed=0]="closed",e[e.animatingOpen=1]="animatingOpen",e[e.open=2]="open",e[e.animatingClosed=3]="animatingClosed"}(G||(G={}));var K,X,Z,J,$,Q,ee,te,re=function(e){function t(t){var r=e.call(this,t)||this;r._panel=o.createRef(),r._animationCallback=null,r._hasCustomNavigation=!(!r.props.onRenderNavigation&&!r.props.onRenderNavigationContent),r.dismiss=function(e){r.props.onDismiss&&r.props.onDismiss(e),(!e||e&&!e.defaultPrevented)&&r.close()},r._allowScrollOnPanel=function(e){e?r._allowTouchBodyScroll?Object(P.a)(e,r._events):Object(P.b)(e,r._events):r._events.off(r._scrollableContent),r._scrollableContent=e},r._onRenderNavigation=function(e){if(!r.props.onRenderNavigationContent&&!r.props.onRenderNavigation&&!r.props.hasCloseButton)return null;var t=r.props.onRenderNavigationContent,n=void 0===t?r._onRenderNavigationContent:t;return o.createElement("div",{className:r._classNames.navigation},n(e,r._onRenderNavigationContent))},r._onRenderNavigationContent=function(e){var t=e.closeButtonAriaLabel,n=e.hasCloseButton,a=e.onRenderHeader,i=void 0===a?r._onRenderHeader:a,s=Object(z.A)();return n?o.createElement(o.Fragment,null,!r._hasCustomNavigation&&i(r.props,r._onRenderHeader,r._headerTextId),o.createElement(D.a,{styles:{root:[r._hasCustomNavigation&&{height:"auto",width:"44px"},{color:s.palette.neutralSecondary,fontSize:z.i.large}],rootHovered:{color:s.palette.neutralPrimary}},className:r._classNames.closeButton,onClick:r._onPanelClick,ariaLabel:t,title:t,"data-is-visible":!0,iconProps:{iconName:"Cancel"}})):null},r._onRenderHeader=function(e,t,n){var a=e.headerText,s=e.headerTextProps,l=void 0===s?{}:s;return a?o.createElement("div",{className:r._classNames.header},o.createElement("div",Object(i.a)({id:n,role:"heading","aria-level":2},l,{className:Object(Y.a)(r._classNames.headerText,l.className)}),a)):null},r._onRenderBody=function(e){return o.createElement("div",{className:r._classNames.content},e.children)},r._onRenderFooter=function(e){var t=r.props.onRenderFooterContent,n=void 0===t?null:t;return n?o.createElement("div",{className:r._classNames.footer},o.createElement("div",{className:r._classNames.footerInner},n())):null},r._animateTo=function(e){e===G.open&&r.props.onOpen&&r.props.onOpen(),r._animationCallback=r._async.setTimeout((function(){r.setState({visibility:e}),r._onTransitionComplete()}),200)},r._clearExistingAnimationTimer=function(){null!==r._animationCallback&&r._async.clearTimeout(r._animationCallback)},r._onPanelClick=function(e){r.dismiss(e)},r._onTransitionComplete=function(){r._updateFooterPosition(),r.state.visibility===G.open&&r.props.onOpened&&r.props.onOpened(),r.state.visibility===G.closed&&r.props.onDismissed&&r.props.onDismissed()};var n=r.props.allowTouchBodyScroll,a=void 0!==n&&n;return r._allowTouchBodyScroll=a,r._warnDeprecations({ignoreExternalFocusing:"focusTrapZoneProps",forceFocusInsideTrap:"focusTrapZoneProps",firstFocusableSelector:"focusTrapZoneProps"}),r.state={isFooterSticky:!1,visibility:G.closed,id:Object(f.a)("Panel")},r}return Object(i.c)(t,e),t.getDerivedStateFromProps=function(e,t){return void 0===e.isOpen?null:!e.isOpen||t.visibility!==G.closed&&t.visibility!==G.animatingClosed?e.isOpen||t.visibility!==G.open&&t.visibility!==G.animatingOpen?null:{visibility:G.animatingClosed}:{visibility:G.animatingOpen}},t.prototype.componentDidMount=function(){this._events.on(window,"resize",this._updateFooterPosition),this._shouldListenForOuterClick(this.props)&&this._events.on(document.body,"mousedown",this._dismissOnOuterClick,!0),this.props.isOpen&&this.setState({visibility:G.animatingOpen})},t.prototype.componentDidUpdate=function(e,t){var r=this._shouldListenForOuterClick(this.props),n=this._shouldListenForOuterClick(e);this.state.visibility!==t.visibility&&(this._clearExistingAnimationTimer(),this.state.visibility===G.animatingOpen?this._animateTo(G.open):this.state.visibility===G.animatingClosed&&this._animateTo(G.closed)),r&&!n?this._events.on(document.body,"mousedown",this._dismissOnOuterClick,!0):!r&&n&&this._events.off(document.body,"mousedown",this._dismissOnOuterClick,!0)},t.prototype.render=function(){var e=this.props,t=e.className,r=void 0===t?"":t,a=e.elementToFocusOnDismiss,s=e.firstFocusableSelector,l=e.focusTrapZoneProps,c=e.forceFocusInsideTrap,u=e.hasCloseButton,d=e.headerText,p=e.headerClassName,h=void 0===p?"":p,f=e.ignoreExternalFocusing,g=e.isBlocking,v=e.isFooterAtBottom,y=e.isLightDismiss,b=e.isHiddenOnDismiss,_=e.layerProps,x=e.overlayProps,w=e.type,k=e.styles,M=e.theme,T=e.customWidth,C=e.onLightDismissClick,S=void 0===C?this._onPanelClick:C,L=e.onRenderNavigation,A=void 0===L?this._onRenderNavigation:L,E=e.onRenderHeader,D=void 0===E?this._onRenderHeader:E,P=e.onRenderBody,O=void 0===P?this._onRenderBody:P,R=e.onRenderFooter,F=void 0===R?this._onRenderFooter:R,z=this.state,N=z.isFooterSticky,Y=z.visibility,V=z.id,U=w===n.smallFixedNear||w===n.customNear,K=Object(H.a)(M)?U:!U,X=w===n.custom||w===n.customNear?{width:T}:{},Z=Object(m.d)(this.props,m.c),J=this.isActive,$=Y===G.animatingClosed||Y===G.animatingOpen;if(this._headerTextId=d&&V+"-headerText",!J&&!$&&!b)return null;this._classNames=q(k,{theme:M,className:r,focusTrapZoneClassName:l?l.className:void 0,hasCloseButton:u,headerClassName:h,isAnimating:$,isFooterSticky:N,isFooterAtBottom:v,isOnRightSide:K,isOpen:J,isHiddenOnDismiss:b,type:w,hasCustomNavigation:this._hasCustomNavigation});var Q,ee=this._classNames,te=this._allowTouchBodyScroll;return g&&J&&(Q=o.createElement(j,Object(i.a)({className:ee.overlay,isDarkThemed:!1,onClick:y?S:void 0,allowTouchBodyScroll:te},x))),o.createElement(I.a,Object(i.a)({},_),o.createElement(B.a,{role:"dialog","aria-modal":"true",ariaLabelledBy:this._headerTextId?this._headerTextId:void 0,onDismiss:this.dismiss,className:ee.hiddenPanel},o.createElement("div",Object(i.a)({"aria-hidden":!J&&$},Z,{ref:this._panel,className:ee.root}),Q,o.createElement(W,Object(i.a)({ignoreExternalFocusing:f,forceFocusInsideTrap:!(!g||b&&!J)&&c,firstFocusableSelector:s,isClickableOutsideFocusTrap:!0},l,{className:ee.main,style:X,elementToFocusOnDismiss:a}),o.createElement("div",{className:ee.commands,"data-is-visible":!0},A(this.props,this._onRenderNavigation)),o.createElement("div",{className:ee.contentInner},(this._hasCustomNavigation||!u)&&D(this.props,this._onRenderHeader,this._headerTextId),o.createElement("div",{ref:this._allowScrollOnPanel,className:ee.scrollableContent,"data-is-scrollable":!0},O(this.props,this._onRenderBody)),F(this.props,this._onRenderFooter))))))},t.prototype.open=function(){void 0===this.props.isOpen&&(this.isActive||this.setState({visibility:G.animatingOpen}))},t.prototype.close=function(){void 0===this.props.isOpen&&this.isActive&&this.setState({visibility:G.animatingClosed})},Object.defineProperty(t.prototype,"isActive",{get:function(){return this.state.visibility===G.open||this.state.visibility===G.animatingOpen},enumerable:!0,configurable:!0}),t.prototype._shouldListenForOuterClick=function(e){return!!e.isBlocking&&!!e.isOpen},t.prototype._updateFooterPosition=function(){var e=this._scrollableContent;if(e){var t=e.clientHeight,r=e.scrollHeight;this.setState({isFooterSticky:t<r})}},t.prototype._dismissOnOuterClick=function(e){var t=this._panel.current;this.isActive&&t&&!e.defaultPrevented()&&(Object(V.a)(t,e.target)||(this.props.onOuterClick?(this.props.onOuterClick(),e.preventDefault()):this.dismiss()))},t.defaultProps={isHiddenOnDismiss:!1,isOpen:void 0,isBlocking:!0,hasCloseButton:!0,type:n.smallFixedFar},t}(O.a),ne={root:"ms-Panel",main:"ms-Panel-main",commands:"ms-Panel-commands",contentInner:"ms-Panel-contentInner",scrollableContent:"ms-Panel-scrollableContent",navigation:"ms-Panel-navigation",closeButton:"ms-Panel-closeButton ms-PanelAction-close",header:"ms-Panel-header",headerText:"ms-Panel-headerText",content:"ms-Panel-content",footer:"ms-Panel-footer",footerInner:"ms-Panel-footerInner",isOpen:"is-open",hasCloseButton:"ms-Panel--hasCloseButton",smallFluid:"ms-Panel--smFluid",smallFixedNear:"ms-Panel--smLeft",smallFixedFar:"ms-Panel--sm",medium:"ms-Panel--md",large:"ms-Panel--lg",largeFixed:"ms-Panel--fixed",extraLarge:"ms-Panel--xl",custom:"ms-Panel--custom",customNear:"ms-Panel--customLeft"},ae="100%",ie="auto",oe=272,se=340,le=592,ce=644,ue=940,de="auto",pe=0,he=48,fe=428,me=176,ge=((K={})["@media (min-width: "+z.m+"px)"]={width:se},K),ve=((X={})["@media (min-width: "+z.l+"px)"]={width:le},X["@media (min-width: "+z.o+"px)"]={width:ce},X),ye=((Z={})["@media (min-width: "+z.n+"px)"]={left:he,width:ie},Z["@media (min-width: "+z.p+"px)"]={left:fe},Z),be=((J={})["@media (min-width: "+z.p+"px)"]={left:de,width:ue},J),_e=(($={})["@media (min-width: "+z.p+"px)"]={left:me},$),xe=function(e){var t;switch(e){case n.smallFixedFar:t=Object(i.a)({},ge);break;case n.medium:t=Object(i.a)(Object(i.a)({},ge),ve);break;case n.large:t=Object(i.a)(Object(i.a)(Object(i.a)({},ge),ve),ye);break;case n.largeFixed:t=Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},ge),ve),ye),be);break;case n.extraLarge:t=Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},ge),ve),ye),_e)}return t},we={paddingLeft:"24px",paddingRight:"24px"},ke=Object(a.a)(re,(function(e){var t,r=e.className,a=e.focusTrapZoneClassName,o=e.hasCloseButton,s=e.headerClassName,l=e.isAnimating,c=e.isFooterSticky,u=e.isFooterAtBottom,d=e.isOnRightSide,p=e.isOpen,h=e.isHiddenOnDismiss,f=e.hasCustomNavigation,m=e.theme,g=e.type,v=void 0===g?n.smallFixedFar:g,y=m.effects,b=m.fonts,_=m.semanticColors,x=Object(z.v)(ne,m),w=v===n.custom||v===n.customNear;return{root:[x.root,m.fonts.medium,p&&x.isOpen,o&&x.hasCloseButton,{pointerEvents:"none",position:"absolute",top:0,left:0,right:0,bottom:0},w&&d&&x.custom,w&&!d&&x.customNear,r],overlay:[{pointerEvents:"auto",cursor:"pointer"},p&&l&&z.a.fadeIn100,!p&&l&&z.a.fadeOut100],hiddenPanel:[!p&&!l&&h&&{visibility:"hidden"}],main:[x.main,{backgroundColor:_.bodyBackground,boxShadow:y.elevation64,pointerEvents:"auto",position:"absolute",display:"flex",flexDirection:"column",overflowX:"hidden",overflowY:"auto",WebkitOverflowScrolling:"touch",bottom:0,top:0,left:de,right:pe,width:ae,selectors:Object(i.a)((t={},t[z.f]={borderLeft:"3px solid "+_.variantBorder,borderRight:"3px solid "+_.variantBorder},t),xe(v))},v===n.smallFluid&&{left:pe},v===n.smallFixedNear&&{left:pe,right:de,width:oe},v===n.customNear&&{right:"auto",left:0},w&&{maxWidth:"100vw"},p&&l&&!d&&z.a.slideRightIn40,p&&l&&d&&z.a.slideLeftIn40,!p&&l&&!d&&z.a.slideLeftOut40,!p&&l&&d&&z.a.slideRightOut40,a],commands:[x.commands,{marginTop:18},f&&{marginTop:"inherit"}],navigation:[x.navigation,{display:"flex",justifyContent:"flex-end"},f&&{height:"44px"}],closeButton:[x.closeButton,{marginRight:14},f&&{marginRight:0}],contentInner:[x.contentInner,{display:"flex",flexDirection:"column",flexGrow:1,overflowY:"hidden"}],header:[x.header,we,{flexShrink:1,marginRight:"auto"},f&&{flexShrink:0,marginRight:0}],headerText:[x.headerText,b.xLarge,{color:_.bodyText,lineHeight:"27px",margin:0,overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word",hyphens:"auto"},s],scrollableContent:[x.scrollableContent,{overflowY:"auto"},u&&{flexGrow:1}],content:[x.content,we,{marginBottom:0,paddingBottom:20}],footer:[x.footer,{flexShrink:0,borderTop:"1px solid transparent",transition:"opacity "+z.c.durationValue3+" "+z.c.easeFunction2},c&&{background:_.bodyBackground,borderTopColor:_.variantBorder}],footerInner:[x.footerInner,we,{paddingBottom:16,paddingTop:16}]}}),void 0,{scope:"Panel"}),Me=r(59),Te=r(366),Ce=Object(s.a)(),Se=function(e){function t(t){var r,n=e.call(this,t)||this;if(n._host=o.createRef(),n._focusZone=o.createRef(),n._dropDown=o.createRef(),n._scrollIdleDelay=250,n._sizePosCache=new T,n._requestAnimationFrame=c(n),n._onChange=function(e,t,r,a,o){var s=n.props,l=s.onChange,c=s.onChanged;if(l||c){var u=o?Object(i.a)(Object(i.a)({},t[r]),{selected:!a}):t[r];l&&l(Object(i.a)(Object(i.a)({},e),{target:n._dropDown.current}),u,r),c&&c(u,r)}},n._onRenderTitle=function(e){var t=n.props.multiSelectDelimiter,r=void 0===t?", ":t,a=e.map((function(e){return e.text})).join(r);return o.createElement(o.Fragment,null,a)},n._onRenderPlaceholder=function(e){return n._placeholder?o.createElement(o.Fragment,null,n._placeholder):null},n._onRenderContainer=function(e){var t=e.calloutProps,r=e.panelProps,a=n.props,s=a.responsiveMode,l=a.dropdownWidth,c=s<=Me.a.medium,u=n._classNames.subComponentStyles?n._classNames.subComponentStyles.panel:void 0;return c?o.createElement(ke,Object(i.a)({isOpen:!0,isLightDismiss:!0,onDismiss:n._onDismiss,hasCloseButton:!1,styles:u},r),n._renderFocusableList(e)):o.createElement(_.a,Object(i.a)({isBeakVisible:!1,gapSpace:0,doNotLayer:!1,directionalHintFixed:!1,directionalHint:k.a.bottomLeftEdge},t,{className:n._classNames.callout,target:n._dropDown.current,onDismiss:n._onDismiss,onScroll:n._onScroll,onPositioned:n._onPositioned,calloutWidth:l||(n._dropDown.current?n._dropDown.current.clientWidth:0)}),n._renderFocusableList(e))},n._onRenderCaretDown=function(e){return o.createElement(L.a,{className:n._classNames.caretDown,iconName:"ChevronDown","aria-hidden":!0})},n._onRenderList=function(e){var t=e.onRenderItem,r=void 0===t?n._onRenderItem:t,a={items:[]},s=[],l=function(){var e=a.id?[o.createElement("div",{role:"group",key:a.id,"aria-labelledby":a.id},a.items)]:a.items;s=Object(i.e)(s,e),a={items:[]}};return e.options.forEach((function(e,t){!function(e,t){switch(e.itemType){case M.a.Header:a.items.length>0&&l();var o=n._id+e.key;a.items.push(r(Object(i.a)(Object(i.a)({id:o},e),{index:t}),n._onRenderItem)),a.id=o;break;case M.a.Divider:t>0&&a.items.push(r(Object(i.a)(Object(i.a)({},e),{index:t}),n._onRenderItem)),a.items.length>0&&l();break;default:a.items.push(r(Object(i.a)(Object(i.a)({},e),{index:t}),n._onRenderItem))}}(e,t)})),a.items.length>0&&l(),o.createElement(o.Fragment,null,s)},n._onRenderItem=function(e){switch(e.itemType){case M.a.Divider:return n._renderSeparator(e);case M.a.Header:return n._renderHeader(e);default:return n._renderOption(e)}},n._renderOption=function(e){var t=n.props.onRenderOption,r=void 0===t?n._onRenderOption:t,a=n.state.selectedIndices,i=void 0===a?[]:a,s=!(void 0===e.index||!i)&&i.indexOf(e.index)>-1,l=e.hidden?n._classNames.dropdownItemHidden:s&&!0===e.disabled?n._classNames.dropdownItemSelectedAndDisabled:s?n._classNames.dropdownItemSelected:!0===e.disabled?n._classNames.dropdownItemDisabled:n._classNames.dropdownItem,c=e.title,u=void 0===c?e.text:c,d=n._classNames.subComponentStyles?n._classNames.subComponentStyles.multiSelectItem:void 0;return n.props.multiSelect?o.createElement(x.a,{id:n._listId+e.index,key:e.key,"data-index":e.index,"data-is-focusable":!e.disabled,disabled:e.disabled,onChange:n._onItemClick(e),inputProps:{onMouseEnter:n._onItemMouseEnter.bind(n,e),onMouseLeave:n._onMouseItemLeave.bind(n,e),onMouseMove:n._onItemMouseMove.bind(n,e)},label:e.text,title:u,onRenderLabel:n._onRenderItemLabel.bind(n,e),className:l,role:"option","aria-selected":s?"true":"false",checked:s,styles:d,ariaPositionInSet:n._sizePosCache.positionInSet(e.index),ariaSetSize:n._sizePosCache.optionSetSize}):o.createElement(w.a,{id:n._listId+e.index,key:e.key,"data-index":e.index,"data-is-focusable":!e.disabled,disabled:e.disabled,className:l,onClick:n._onItemClick(e),onMouseEnter:n._onItemMouseEnter.bind(n,e),onMouseLeave:n._onMouseItemLeave.bind(n,e),onMouseMove:n._onItemMouseMove.bind(n,e),role:"option","aria-selected":s?"true":"false",ariaLabel:e.ariaLabel,title:u,"aria-posinset":n._sizePosCache.positionInSet(e.index),"aria-setsize":n._sizePosCache.optionSetSize},r(e,n._onRenderOption))},n._onRenderOption=function(e){return o.createElement("span",{className:n._classNames.dropdownOptionText},e.text)},n._onRenderItemLabel=function(e){var t=n.props.onRenderOption;return(void 0===t?n._onRenderOption:t)(e,n._onRenderOption)},n._onPositioned=function(e){n._focusZone.current&&n._requestAnimationFrame((function(){var e=n.state.selectedIndices;if(n._focusZone.current)if(e&&e[0]&&!n.props.options[e[0]].disabled){var t=Object(u.a)().querySelector("#"+n._id+"-list"+e[0]);n._focusZone.current.focusElement(t)}else n._focusZone.current.focus()})),n.state.calloutRenderEdge&&n.state.calloutRenderEdge===e.targetEdge||n.setState({calloutRenderEdge:e.targetEdge})},n._onItemClick=function(e){return function(t){e.disabled||(n.setSelectedIndex(t,e.index),n.props.multiSelect||n.setState({isOpen:!1}))}},n._onScroll=function(){n._isScrollIdle||void 0===n._scrollIdleTimeoutId?n._isScrollIdle=!1:(clearTimeout(n._scrollIdleTimeoutId),n._scrollIdleTimeoutId=void 0),n._scrollIdleTimeoutId=setTimeout((function(){n._isScrollIdle=!0}),n._scrollIdleDelay)},n._onMouseItemLeave=function(e,t){if(!n._shouldIgnoreMouseEvent()&&n._host.current)if(n._host.current.setActive)try{n._host.current.setActive()}catch(e){}else n._host.current.focus()},n._onDismiss=function(){n.setState({isOpen:!1}),n._dropDown.current&&n._dropDown.current.focus()},n._onDropdownBlur=function(e){n._isDisabled()||(n.setState({hasFocus:!1}),n.state.isOpen||n.props.onBlur&&n.props.onBlur(e))},n._onDropdownKeyDown=function(e){if(!n._isDisabled()&&(n._lastKeyDownWasAltOrMeta=n._isAltOrMeta(e),!n.props.onKeyDown||(n.props.onKeyDown(e),!e.defaultPrevented))){var t,r=n.state.selectedIndices.length?n.state.selectedIndices[0]:-1,a=e.altKey||e.metaKey,i=n.state.isOpen;switch(e.which){case d.a.enter:n.setState({isOpen:!i});break;case d.a.escape:if(!i)return;n.setState({isOpen:!1});break;case d.a.up:if(a){if(i){n.setState({isOpen:!1});break}return}n.props.multiSelect?n.setState({isOpen:!0}):n._isDisabled()||(t=n._moveIndex(e,-1,r-1,r));break;case d.a.down:a&&(e.stopPropagation(),e.preventDefault()),a&&!i||n.props.multiSelect?n.setState({isOpen:!0}):n._isDisabled()||(t=n._moveIndex(e,1,r+1,r));break;case d.a.home:n.props.multiSelect||(t=n._moveIndex(e,1,0,r));break;case d.a.end:n.props.multiSelect||(t=n._moveIndex(e,-1,n.props.options.length-1,r));break;case d.a.space:break;default:return}t!==r&&(e.stopPropagation(),e.preventDefault())}},n._onDropdownKeyUp=function(e){if(!n._isDisabled()){var t=n._shouldHandleKeyUp(e),r=n.state.isOpen;if(!n.props.onKeyUp||(n.props.onKeyUp(e),!e.defaultPrevented)){switch(e.which){case d.a.space:n.setState({isOpen:!r});break;default:return void(t&&r&&n.setState({isOpen:!1}))}e.stopPropagation(),e.preventDefault()}}},n._onZoneKeyDown=function(e){var t;n._lastKeyDownWasAltOrMeta=n._isAltOrMeta(e);var r=e.altKey||e.metaKey;switch(e.which){case d.a.up:r?n.setState({isOpen:!1}):n._host.current&&(t=Object(p.h)(n._host.current,n._host.current.lastChild,!0));break;case d.a.home:case d.a.end:case d.a.pageUp:case d.a.pageDown:break;case d.a.down:!r&&n._host.current&&(t=Object(p.e)(n._host.current,n._host.current.firstChild,!0));break;case d.a.escape:n.setState({isOpen:!1});break;case d.a.tab:return void n.setState({isOpen:!1});default:return}t&&t.focus(),e.stopPropagation(),e.preventDefault()},n._onZoneKeyUp=function(e){n._shouldHandleKeyUp(e)&&n.state.isOpen&&(n.setState({isOpen:!1}),e.preventDefault())},n._onDropdownClick=function(e){if(!n.props.onClick||(n.props.onClick(e),!e.defaultPrevented)){var t=n.state.isOpen;n._isDisabled()||n._shouldOpenOnFocus()||n.setState({isOpen:!t}),n._isFocusedByClick=!1}},n._onDropdownMouseDown=function(){n._isFocusedByClick=!0},n._onFocus=function(e){var t=n.state,r=t.isOpen,a=t.selectedIndices,i=n.props.multiSelect;if(!n._isDisabled()){n._isFocusedByClick||r||0!==a.length||i||n._moveIndex(e,1,0,-1),n.props.onFocus&&n.props.onFocus(e);var o={hasFocus:!0};n._shouldOpenOnFocus()&&(o.isOpen=!0),n.setState(o)}},n._isDisabled=function(){var e=n.props.disabled,t=n.props.isDisabled;return void 0!==t&&(e=t),e},n._onRenderLabel=function(e){var t=e.label,r=e.required,a=e.disabled,i=n._classNames.subComponentStyles?n._classNames.subComponentStyles.label:void 0;return t?o.createElement(A.a,{className:n._classNames.label,id:n._labelId,required:r,styles:i,disabled:a},t):null},Object(h.a)(n),n._id=t.id||Object(f.a)("Dropdown"),n._labelId=n._id+"-label",n._listId=n._id+"-list",n._optionId=n._id+"-option",n._isScrollIdle=!0,n.props.multiSelect){var a=void 0!==t.defaultSelectedKeys?t.defaultSelectedKeys:t.selectedKeys;r=n._getSelectedIndexes(t.options,a)}else{var s=void 0!==t.defaultSelectedKey?t.defaultSelectedKey:t.selectedKey;r=n._getSelectedIndexes(t.options,s)}return n._sizePosCache.updateOptions(t.options),n.state={isOpen:!1,selectedIndices:r,hasFocus:!1,calloutRenderEdge:void 0},n}return Object(i.c)(t,e),Object.defineProperty(t.prototype,"selectedOptions",{get:function(){var e=this.props.options,t=this.state.selectedIndices;return Object(Te.a)(e,t)},enumerable:!0,configurable:!0}),t.prototype.componentWillUnmount=function(){clearTimeout(this._scrollIdleTimeoutId)},t.prototype.UNSAFE_componentWillReceiveProps=function(e){var t,r=e.options!==this.props.options;void 0===e[t=e.multiSelect?r&&void 0!==e.defaultSelectedKeys?"defaultSelectedKeys":"selectedKeys":r&&void 0!==e.defaultSelectedKey?"defaultSelectedKey":"selectedKey"]||e[t]===this.props[t]&&!r||this.setState({selectedIndices:this._getSelectedIndexes(e.options,e[t])}),e.options!==this.props.options&&this._sizePosCache.updateOptions(e.options)},t.prototype.componentDidUpdate=function(e,t){!0===t.isOpen&&!1===this.state.isOpen&&(this._gotMouseMove=!1,this._dropDown.current&&this._dropDown.current.focus(),this.props.onDismiss&&this.props.onDismiss())},t.prototype.render=function(){var e=this,t=this._id,r=this.props,n=r.className,a=r.label,s=r.options,l=r.ariaLabel,c=r.required,u=r.errorMessage,d=r.keytipProps,p=r.styles,h=r.theme,f=r.panelProps,v=r.calloutProps,y=r.multiSelect,b=r.onRenderTitle,_=void 0===b?this._onRenderTitle:b,x=r.onRenderContainer,w=void 0===x?this._onRenderContainer:x,k=r.onRenderCaretDown,M=void 0===k?this._onRenderCaretDown:k,T=r.onRenderLabel,C=void 0===T?this._onRenderLabel:T,S=this.state,L=S.isOpen,A=S.selectedIndices,D=S.calloutRenderEdge,I=r.onRenderPlaceholder||r.onRenderPlaceHolder||this._onRenderPlaceholder,P=Object(Te.a)(s,A),O=Object(m.d)(r,m.c),R=this._isDisabled(),F=t+"-errorMessage",z=R?void 0:L&&1===A.length&&A[0]>=0?this._listId+A[0]:void 0,N=y?{role:"button"}:{role:"listbox",childRole:"option",ariaSetSize:this._sizePosCache.optionSetSize,ariaPosInSet:this._sizePosCache.positionInSet(A[0]),ariaSelected:void 0!==A[0]||void 0};this._classNames=Ce(p,{theme:h,className:n,hasError:!!(u&&u.length>0),hasLabel:!!a,isOpen:L,required:c,disabled:R,isRenderingPlaceholder:!P.length,panelClassName:f?f.className:void 0,calloutClassName:v?v.className:void 0,calloutRenderEdge:D});var j=!!u&&u.length>0;return o.createElement("div",{className:this._classNames.root},C(this.props,this._onRenderLabel),o.createElement(E.a,{keytipProps:d,disabled:R},(function(n){return o.createElement("div",Object(i.a)({},n,{"data-is-focusable":!R,ref:e._dropDown,id:t,tabIndex:R?-1:0,role:N.role,"aria-haspopup":"listbox","aria-expanded":L?"true":"false","aria-label":l,"aria-labelledby":a&&!l?Object(g.a)(e._labelId,e._optionId):void 0,"aria-describedby":Object(g.a)(n["aria-describedby"],j?e._id+"-errorMessage":void 0),"aria-activedescendant":z,"aria-required":c,"aria-disabled":R,"aria-owns":L?e._listId:void 0},O,{className:e._classNames.dropdown,onBlur:e._onDropdownBlur,onKeyDown:e._onDropdownKeyDown,onKeyUp:e._onDropdownKeyUp,onClick:e._onDropdownClick,onMouseDown:e._onDropdownMouseDown,onFocus:e._onFocus}),o.createElement("span",{id:e._optionId,className:e._classNames.title,"aria-live":"polite","aria-atomic":!0,"aria-invalid":j,role:N.childRole,"aria-setsize":N.ariaSetSize,"aria-posinset":N.ariaPosInSet,"aria-selected":N.ariaSelected},P.length?_(P,e._onRenderTitle):I(r,e._onRenderPlaceholder)),o.createElement("span",{className:e._classNames.caretDownWrapper},M(r,e._onRenderCaretDown)))})),L&&w(Object(i.a)(Object(i.a)({},r),{onDismiss:this._onDismiss}),this._onRenderContainer),j&&o.createElement("div",{role:"alert",id:F,className:this._classNames.errorMessage},u))},t.prototype.focus=function(e){this._dropDown.current&&(this._dropDown.current.focus(),e&&this.setState({isOpen:!0}))},t.prototype.setSelectedIndex=function(e,t){var r=this,n=this.props,a=n.options,i=n.selectedKey,o=n.selectedKeys,s=n.multiSelect,l=n.notifyOnReselect,c=this.state.selectedIndices,u=void 0===c?[]:c,d=!!u&&u.indexOf(t)>-1,p=[];if(t=Math.max(0,Math.min(a.length-1,t)),void 0===i&&void 0===o){if(s||l||t!==u[0]){if(s)if(p=u?this._copyArray(u):[],d){var h=p.indexOf(t);h>-1&&p.splice(h,1)}else p.push(t);else p=[t];e.persist(),this.setState({selectedIndices:p},(function(){r._onChange(e,a,t,d,s)}))}}else this._onChange(e,a,t,d,s)},Object.defineProperty(t.prototype,"_placeholder",{get:function(){return this.props.placeholder||this.props.placeHolder},enumerable:!0,configurable:!0}),t.prototype._copyArray=function(e){for(var t=[],r=0,n=e;r<n.length;r++){var a=n[r];t.push(a)}return t},t.prototype._moveIndex=function(e,t,r,n){var a=this.props.options;if(n===r||0===a.length)return n;r>=a.length?r=0:r<0&&(r=a.length-1);for(var i=0;a[r].itemType===M.a.Header||a[r].itemType===M.a.Divider||a[r].disabled;){if(i>=a.length)return n;r+t<0?r=a.length:r+t>=a.length&&(r=-1),r+=t,i++}return this.setSelectedIndex(e,r),r},t.prototype._renderFocusableList=function(e){var t=e.onRenderList,r=void 0===t?this._onRenderList:t,n=e.label,a=e.ariaLabel,i=e.multiSelect;return o.createElement("div",{className:this._classNames.dropdownItemsWrapper,onKeyDown:this._onZoneKeyDown,onKeyUp:this._onZoneKeyUp,ref:this._host,tabIndex:0},o.createElement(C.a,{ref:this._focusZone,direction:S.a.vertical,id:this._listId,className:this._classNames.dropdownItems,role:"listbox","aria-label":a,"aria-labelledby":n&&!a?this._labelId:void 0,"aria-multiselectable":i},r(e,this._onRenderList)))},t.prototype._renderSeparator=function(e){var t=e.index,r=e.key;return t>0?o.createElement("div",{role:"separator",key:r,className:this._classNames.dropdownDivider}):null},t.prototype._renderHeader=function(e){var t=this.props.onRenderOption,r=void 0===t?this._onRenderOption:t,n=e.key,a=e.id;return o.createElement("div",{id:a,key:n,className:this._classNames.dropdownItemHeader},r(e,this._onRenderOption))},t.prototype._onItemMouseEnter=function(e,t){this._shouldIgnoreMouseEvent()||t.currentTarget.focus()},t.prototype._onItemMouseMove=function(e,t){var r=t.currentTarget;this._gotMouseMove=!0,this._isScrollIdle&&document.activeElement!==r&&r.focus()},t.prototype._shouldIgnoreMouseEvent=function(){return!this._isScrollIdle||!this._gotMouseMove},t.prototype._getSelectedIndexes=function(e,t){if(void 0===t)return this.props.multiSelect?this._getAllSelectedIndices(e):-1!==(i=this._getSelectedIndex(e,null))?[i]:[];if(!Array.isArray(t))return-1!==(i=this._getSelectedIndex(e,t))?[i]:[];for(var r=[],n=0,a=t;n<a.length;n++){var i,o=a[n];-1!==(i=this._getSelectedIndex(e,o))&&r.push(i)}return r},t.prototype._getAllSelectedIndices=function(e){return e.map((function(e,t){return e.selected?t:-1})).filter((function(e){return-1!==e}))},t.prototype._getSelectedIndex=function(e,t){return Object(v.d)(e,(function(e){return null!=t?e.key===t:!!e.isSelected||!!e.selected}))},t.prototype._isAltOrMeta=function(e){return e.which===d.a.alt||"Meta"===e.key},t.prototype._shouldHandleKeyUp=function(e){var t=this._lastKeyDownWasAltOrMeta&&this._isAltOrMeta(e);return this._lastKeyDownWasAltOrMeta=!1,!!t&&!(Object(y.a)()||Object(b.a)())},t.prototype._shouldOpenOnFocus=function(){var e=this.state.hasFocus,t=this.props.openOnKeyboardFocus;return!this._isFocusedByClick&&!0===t&&!e},t.defaultProps={options:[]},t=Object(i.b)([Me.b],t)}(o.Component),Le=r(64),Ae=r(13),Ee={root:"ms-Dropdown-container",label:"ms-Dropdown-label",dropdown:"ms-Dropdown",title:"ms-Dropdown-title",caretDownWrapper:"ms-Dropdown-caretDownWrapper",caretDown:"ms-Dropdown-caretDown",callout:"ms-Dropdown-callout",panel:"ms-Dropdown-panel",dropdownItems:"ms-Dropdown-items",dropdownItem:"ms-Dropdown-item",dropdownDivider:"ms-Dropdown-divider",dropdownOptionText:"ms-Dropdown-optionText",dropdownItemHeader:"ms-Dropdown-header",titleIsPlaceHolder:"ms-Dropdown-titleIsPlaceHolder",titleHasError:"ms-Dropdown-title--hasError"},De=((Q={})[z.f+", "+z.h.replace("@media ","")]={MsHighContrastAdjust:"none"},Q),Ie={selectors:Object(i.a)((ee={},ee[z.f]={backgroundColor:"Highlight",borderColor:"Highlight",color:"HighlightText"},ee),De)},Pe={selectors:(te={},te[z.f]={borderColor:"Highlight"},te)},Oe=Object(z.z)(0,z.m);r.d(t,"a",(function(){return Re}));var Re=Object(a.a)(Se,(function(e){var t,r,n,a,o,s,l,c,u,d,p=e.theme,h=e.hasError,f=e.hasLabel,m=e.className,g=e.isOpen,v=e.disabled,y=e.required,b=e.isRenderingPlaceholder,_=e.panelClassName,x=e.calloutClassName,w=e.calloutRenderEdge;if(!p)throw new Error("theme is undefined or null in base Dropdown getStyles function.");var k=Object(z.v)(Ee,p),M=p.palette,T=p.semanticColors,C=p.effects,S=p.fonts,L={color:T.menuItemTextHovered},A={color:T.menuItemText},E={borderColor:T.errorText},D=[k.dropdownItem,{backgroundColor:"transparent",boxSizing:"border-box",cursor:"pointer",display:"flex",alignItems:"center",padding:"0 8px",width:"100%",minHeight:36,lineHeight:20,height:0,position:"relative",border:"1px solid transparent",borderRadius:0,wordWrap:"break-word",overflowWrap:"break-word",textAlign:"left"}],I=function(e){var t;return void 0===e&&(e=!1),{selectors:(t={"&:hover:focus":[{color:T.menuItemTextHovered,backgroundColor:e?T.menuItemBackgroundHovered:T.menuBackground},Ie],"&:focus":[{backgroundColor:e?T.menuItemBackgroundHovered:"transparent"},Ie],"&:active":[{color:T.menuItemTextHovered,backgroundColor:e?T.menuItemBackgroundHovered:T.menuBackground},Ie]},t[z.f]={borderColor:"Window"},t["."+Le.a+" &:focus:after"]={left:0,top:0,bottom:0,right:0},t)}},P=Object(i.e)(D,[{backgroundColor:T.menuItemBackgroundPressed,color:T.menuItemTextHovered},I(!0),Ie]),O=Object(i.e)(D,[{color:T.disabledText,cursor:"default",selectors:(t={},t[z.f]={color:"GrayText"},t)}]),R=w===Ae.b.bottom?C.roundedCorner2+" "+C.roundedCorner2+" 0 0":"0 0 "+C.roundedCorner2+" "+C.roundedCorner2,F=w===Ae.b.bottom?"0 0 "+C.roundedCorner2+" "+C.roundedCorner2:C.roundedCorner2+" "+C.roundedCorner2+" 0 0";return{root:[k.root,m],label:k.label,dropdown:[k.dropdown,z.G,S.medium,{color:T.menuItemText,borderColor:T.focusBorder,position:"relative",outline:0,userSelect:"none",selectors:(r={},r["&:hover ."+k.title]=[!v&&L,{borderColor:g?M.neutralSecondary:M.neutralPrimary},Pe],r["&:focus ."+k.title]=[!v&&L,{selectors:(n={},n[z.f]={color:"Highlight"},n)}],r["&:focus:after"]=[{pointerEvents:"none",content:"''",position:"absolute",boxSizing:"border-box",top:"0px",left:"0px",width:"100%",height:"100%",border:v?"none":"2px solid "+M.themePrimary,borderRadius:"2px",selectors:(a={},a[z.f]={borderColor:"Highlight",color:"Highlight"},a)}],r["&:active ."+k.title]=[!v&&L,{borderColor:M.themePrimary},Pe],r["&:hover ."+k.caretDown]=!v&&A,r["&:focus ."+k.caretDown]=[!v&&A,{selectors:(o={},o[z.f]={color:"Highlight"},o)}],r["&:active ."+k.caretDown]=!v&&A,r["&:hover ."+k.titleIsPlaceHolder]=!v&&A,r["&:focus ."+k.titleIsPlaceHolder]=!v&&A,r["&:active ."+k.titleIsPlaceHolder]=!v&&A,r["&:hover ."+k.titleHasError]=E,r["&:active ."+k.titleHasError]=E,r)},g&&"is-open",v&&"is-disabled",y&&"is-required",y&&!f&&{selectors:(s={":before":{content:"'*'",color:T.errorText,position:"absolute",top:-5,right:-10}},s[z.f]={selectors:{":after":{right:-14}}},s)}],title:[k.title,z.G,{backgroundColor:T.inputBackground,borderWidth:1,borderStyle:"solid",borderColor:T.inputBorder,borderRadius:g?R:C.roundedCorner2,cursor:"pointer",display:"block",height:32,lineHeight:30,padding:"0 28px 0 8px",position:"relative",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},b&&[k.titleIsPlaceHolder,{color:T.inputPlaceholderText}],h&&[k.titleHasError,E],v&&{backgroundColor:T.disabledBackground,border:"none",color:T.disabledText,cursor:"default",selectors:(l={},l[z.f]={border:"1px solid GrayText",color:"GrayText"},l)}],caretDownWrapper:[k.caretDownWrapper,{position:"absolute",top:1,right:8,height:32,lineHeight:30},!v&&{cursor:"pointer"}],caretDown:[k.caretDown,{color:M.neutralSecondary,fontSize:S.small.fontSize,pointerEvents:"none"},v&&{color:T.disabledText,selectors:(c={},c[z.f]={color:"GrayText"},c)}],errorMessage:Object(i.a)(Object(i.a)({color:T.errorText},p.fonts.small),{paddingTop:5}),callout:[k.callout,{boxShadow:C.elevation8,borderRadius:F,selectors:(u={},u[".ms-Callout-main"]={borderRadius:F},u)},x],dropdownItemsWrapper:{selectors:{"&:focus":{outline:0}}},dropdownItems:[k.dropdownItems,{display:"block"}],dropdownItem:Object(i.e)(D,[I()]),dropdownItemSelected:P,dropdownItemDisabled:O,dropdownItemSelectedAndDisabled:[P,O,{backgroundColor:"transparent"}],dropdownItemHidden:Object(i.e)(D,[{display:"none"}]),dropdownDivider:[k.dropdownDivider,{height:1,backgroundColor:T.bodyDivider}],dropdownOptionText:[k.dropdownOptionText,{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",minWidth:0,maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",margin:"1px"}],dropdownItemHeader:[k.dropdownItemHeader,Object(i.a)(Object(i.a)({},S.medium),{fontWeight:z.e.semibold,color:T.menuHeader,background:"none",backgroundColor:"transparent",border:"none",height:36,lineHeight:36,cursor:"default",padding:"0 8px",userSelect:"none",textAlign:"left"})],subComponentStyles:{label:{root:{display:"inline-block"}},multiSelectItem:{root:{padding:0},label:{alignSelf:"stretch",padding:"0 8px",width:"100%"}},panel:{root:[_],main:{selectors:(d={},d[Oe]={width:272},d)},contentInner:{padding:"0 0 20px"}}}}}),void 0,{scope:"Dropdown"})},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(33),s=r(355),l=r(46),c=r(276),u=r(270),d=r(60),p=r(39),h=r(52),f=r(90);var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onCustomizationChange=function(){return t.forceUpdate()},t}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){p.a.observe(this._onCustomizationChange)},t.prototype.componentWillUnmount=function(){p.a.unobserve(this._onCustomizationChange)},t.prototype.render=function(){var e=this,t=this.props.contextTransform;return i.createElement(h.a.Consumer,null,(function(r){var n=function(e,t){var r=(t||{}).customizations,n=void 0===r?{settings:{},scopedSettings:{}}:r;return{customizations:{settings:Object(f.b)(n.settings,e.settings),scopedSettings:Object(f.a)(n.scopedSettings,e.scopedSettings),inCustomizerContext:!0}}}(e.props,r);return t&&(n=t(n)),i.createElement(h.a.Provider,{value:n},e.props.children)}))},t}(i.Component),g=r(17),v=r(94),y=r(34),b=r(9),_={fontFamily:"inherit"},x={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},w=function(e){var t=e.theme,r=e.className,n=e.isFocusVisible,a=e.applyTheme,i=n?"Visible":"Hidden";return{root:[Object(b.v)(x,t).root,"is-focus"+i+" ms-Fabric--isFocus"+i,t.fonts.medium,{color:t.palette.neutralPrimary,selectors:{"& button":_,"& input":_,"& textarea":_}},a&&{color:t.semanticColors.bodyText,backgroundColor:t.semanticColors.bodyBackground},r],bodyThemed:[{backgroundColor:t.semanticColors.bodyBackground}]}},k=Object(s.a)(),M=Object(l.b)((function(e,t){return Object(b.s)(Object(a.a)(Object(a.a)({},e),{rtl:t}))})),T=Object(l.b)((function(e,t){return t||(e&&void 0!==e.rtl?e.rtl?"rtl":"ltr":Object(c.a)()?"rtl":"ltr")})),C=function(e){function t(t){var r=e.call(this,t)||this;return r._rootElement=i.createRef(),r._disposables=[],r._removeClassNameFromBody=void 0,r._onMouseDown=function(e){r.setState({isFocusVisible:!1})},r._onKeyDown=function(e){Object(u.a)(e.which)&&r.setState({isFocusVisible:!0})},r.state={isFocusVisible:!1},r}return Object(a.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.as,r=void 0===t?"div":t,n=e.theme,o=e.dir,s=this._getClassNames(),l=Object(d.d)(this.props,d.c,["dir"]),c=T(n,o),u=T(n),p=i.createElement(r,Object(a.a)({dir:c},l,{className:s.root,ref:this._rootElement}));return c!==u&&(p=i.createElement(m,{settings:{theme:M(n,"rtl"===o)}},p)),p},t.prototype.componentDidMount=function(){var e=Object(g.a)(this._rootElement.current);e&&this._disposables.push(Object(v.a)(e,"mousedown",this._onMouseDown,!0),Object(v.a)(e,"keydown",this._onKeyDown,!0)),this._addClassNameToBody()},t.prototype.componentWillUnmount=function(){this._disposables.forEach((function(e){return e()})),this._removeClassNameFromBody&&this._removeClassNameFromBody()},t.prototype._getClassNames=function(){var e=this.props,t=e.className,r=e.theme,n=e.applyTheme;return k(w,{theme:r,applyTheme:n,className:t,isFocusVisible:this.state.isFocusVisible})},t.prototype._addClassNameToBody=function(){if(this.props.applyThemeToBody){var e=this._getClassNames(),t=Object(y.a)(this._rootElement.current);t&&(t.body.classList.add(e.bodyThemed),this._removeClassNameFromBody=function(){t.body.classList.remove(e.bodyThemed)})}},t}(i.Component),S=Object(n.a)(C,w,void 0,{scope:"Fabric"}),L=r(92);var A,E=r(339),D={};var I,P=Object(s.a)(),O=function(e){function t(t){var r=e.call(this,t)||this;return r._rootRef=i.createRef(),r._createLayerElement=function(){var e=r.props.hostId,t=Object(y.a)(r._rootRef.current),n=r._getHost();if(t&&n){r._removeLayerElement();var a=t.createElement("div"),i=r._getClassNames();a.className=i.root,Object(L.b)(a),function(e,t){var r=e,n=t;r._virtual||(r._virtual={children:[]});var a=r._virtual.parent;if(a&&a!==t){var i=a._virtual.children.indexOf(r);i>-1&&a._virtual.children.splice(i,1)}r._virtual.parent=n||void 0,n&&(n._virtual||(n._virtual={children:[]}),n._virtual.children.push(r))}(a,r._rootRef.current),r.props.insertFirst?n.insertBefore(a,n.firstChild):n.appendChild(a),r.setState({hostId:e,layerElement:a},(function(){var e=r.props,t=e.onLayerDidMount,n=e.onLayerMounted;n&&n(),t&&t()}))}},r.state={},r}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){var e=this.props.hostId;this._createLayerElement(),e&&function(e,t){D[e]||(D[e]=[]),D[e].push(t)}(e,this._createLayerElement)},t.prototype.render=function(){var e=this.state.layerElement,t=this._getClassNames(),r=this.props.eventBubblingEnabled;return i.createElement("span",{className:"ms-layer",ref:this._rootRef},e&&o.createPortal(i.createElement(S,Object(a.a)({},!r&&function(){I||(I={},["onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","onTouchMove","onTouchStart","onTouchCancel","onTouchEnd","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onInvalid","onSubmit"].forEach((function(e){return I[e]=R})));return I}(),{className:t.content}),this.props.children),e))},t.prototype.componentDidUpdate=function(){this.props.hostId!==this.state.hostId&&this._createLayerElement()},t.prototype.componentWillUnmount=function(){var e=this.props.hostId;this._removeLayerElement(),e&&function(e,t){if(D[e]){var r=D[e].indexOf(t);r>=0&&(D[e].splice(r,1),0===D[e].length&&delete D[e])}}(e,this._createLayerElement)},t.prototype._removeLayerElement=function(){var e=this.props.onLayerWillUnmount,t=this.state.layerElement;if(e&&e(),t&&t.parentNode){var r=t.parentNode;r&&r.removeChild(t)}},t.prototype._getClassNames=function(){var e=this.props,t=e.className,r=e.styles,n=e.theme;return P(r,{theme:n,className:t,isNotHost:!this.props.hostId})},t.prototype._getHost=function(){var e=this.props.hostId,t=Object(y.a)(this._rootRef.current);if(t){if(e)return t.getElementById(e);var r=A;return r?t.querySelector(r):t.body}},t.defaultProps={onLayerDidMount:function(){},onLayerWillUnmount:function(){}},t=Object(a.b)([Object(E.a)("Layer",["theme","hostId"])],t)}(i.Component),R=function(e){e.eventPhase===Event.BUBBLING_PHASE&&"mouseenter"!==e.type&&"mouseleave"!==e.type&&"touchstart"!==e.type&&"touchend"!==e.type&&e.stopPropagation()};var F={root:"ms-Layer",rootNoHost:"ms-Layer--fixed",content:"ms-Layer-content"};r.d(t,"a",(function(){return z}));var z=Object(n.a)(O,(function(e){var t=e.className,r=e.isNotHost,n=e.theme,a=Object(b.v)(F,n);return{root:[a.root,n.fonts.medium,r&&[a.rootNoHost,{position:"fixed",zIndex:b.q.Layer,top:0,left:0,bottom:0,right:0,visibility:"hidden"}],t],content:[a.content,{visibility:"visible"}]}}),void 0,{scope:"Layer",fields:["hostId","theme","styles"]})},function(e,t,r){"use strict";var n,a=r(2),i=r(0),o=r(354),s=r(15),l=r(340),c=r(91),u=r(77),d=r(60),p=r(338),h=r(269),f=r(94),m=r(34),g=r(17),v=r(13),y=function(){function e(e,t,r,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),this.top=r,this.bottom=n,this.left=e,this.right=t}return Object.defineProperty(e.prototype,"width",{get:function(){return this.right-this.left},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return parseFloat(this.top.toFixed(4))===parseFloat(e.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(e.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(e.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(e.right.toFixed(4))},e}(),b=r(276),_=r(359),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t}(y);function w(e,t,r){return{targetEdge:e,alignmentEdge:t,isAuto:r}}var k=((n={})[s.a.topLeftEdge]=w(v.b.top,v.b.left),n[s.a.topCenter]=w(v.b.top),n[s.a.topRightEdge]=w(v.b.top,v.b.right),n[s.a.topAutoEdge]=w(v.b.top,void 0,!0),n[s.a.bottomLeftEdge]=w(v.b.bottom,v.b.left),n[s.a.bottomCenter]=w(v.b.bottom),n[s.a.bottomRightEdge]=w(v.b.bottom,v.b.right),n[s.a.bottomAutoEdge]=w(v.b.bottom,void 0,!0),n[s.a.leftTopEdge]=w(v.b.left,v.b.top),n[s.a.leftCenter]=w(v.b.left),n[s.a.leftBottomEdge]=w(v.b.left,v.b.bottom),n[s.a.rightTopEdge]=w(v.b.right,v.b.top),n[s.a.rightCenter]=w(v.b.right),n[s.a.rightBottomEdge]=w(v.b.right,v.b.bottom),n);function M(e,t){return!(e.top<t.top)&&(!(e.bottom>t.bottom)&&(!(e.left<t.left)&&!(e.right>t.right)))}function T(e,t){var r=new Array;return e.top<t.top&&r.push(v.b.top),e.bottom>t.bottom&&r.push(v.b.bottom),e.left<t.left&&r.push(v.b.left),e.right>t.right&&r.push(v.b.right),r}function C(e,t){return e[v.b[t]]}function S(e,t,r){return e[v.b[t]]=r,e}function L(e,t){var r=j(t);return(C(e,r.positiveEdge)+C(e,r.negativeEdge))/2}function A(e,t){return e>0?t:-1*t}function E(e,t){return A(e,C(t,e))}function D(e,t,r){return A(r,C(e,r)-C(t,r))}function I(e,t,r){var n=C(e,t)-r;return e=S(e,t,r),e=S(e,-1*t,C(e,-1*t)-n)}function P(e,t,r,n){return void 0===n&&(n=0),I(e,r,C(t,r)+A(r,n))}function O(e,t,r){return E(r,e)>E(r,t)}function R(e,t,r,n,a,i,o){void 0===a&&(a=0);var s=n.alignmentEdge,l=n.alignTargetEdge,c={elementRectangle:e,targetEdge:n.targetEdge,alignmentEdge:s};i||o||(c=function(e,t,r,n,a){void 0===a&&(a=0);var i=[v.b.left,v.b.right,v.b.bottom,v.b.top];Object(b.a)()&&(i[0]*=-1,i[1]*=-1);for(var o=e,s=n.targetEdge,l=n.alignmentEdge,c=0;c<4;c++){if(O(o,r,s))return{elementRectangle:o,targetEdge:s,alignmentEdge:l};i.splice(i.indexOf(s),1),i.length>0&&(i.indexOf(-1*s)>-1?s*=-1:(l=s,s=i.slice(-1)[0]),o=N(e,t,{targetEdge:s,alignmentEdge:l},a))}return{elementRectangle:e,targetEdge:n.targetEdge,alignmentEdge:l}}(e,t,r,n,a));var u=T(e,r);if(l){if(c.alignmentEdge&&u.indexOf(-1*c.alignmentEdge)>-1){var d=function(e,t,r,n){var a=e.alignmentEdge,i=e.targetEdge,o=-1*a;return{elementRectangle:N(e.elementRectangle,t,{targetEdge:i,alignmentEdge:o},r,n),targetEdge:i,alignmentEdge:o}}(c,t,a,o);if(M(d.elementRectangle,r))return d;c=F(T(d.elementRectangle,r),c,r)}}else c=F(u,c,r);return c}function F(e,t,r){for(var n=0,a=e;n<a.length;n++){var i=a[n];t.elementRectangle=P(t.elementRectangle,r,i)}return t}function z(e,t,r){var n=j(t).positiveEdge;return I(e,n,r-(L(e,t)-C(e,n)))}function N(e,t,r,n,a){var i;void 0===n&&(n=0);var o=r.alignmentEdge,s=r.targetEdge,l=a?s:-1*s;(i=a?P(e,t,s,n):function(e,t,r,n){void 0===n&&(n=0);var a=A(-1*r,n);return I(e,-1*r,C(t,r)+a)}(e,t,s,n),o)?i=P(i,t,o):i=z(i,l,L(t,s));return i}function j(e){return e===v.b.top||e===v.b.bottom?{positiveEdge:v.b.left,negativeEdge:v.b.right}:{positiveEdge:v.b.top,negativeEdge:v.b.bottom}}function B(e,t,r){return r&&Math.abs(D(e,r,t))>Math.abs(D(e,r,-1*t))?-1*t:t}function Y(e){return Math.sqrt(e*e*2)}function H(e,t,r){if(void 0===e&&(e=s.a.bottomAutoEdge),r)return{alignmentEdge:r.alignmentEdge,isAuto:r.isAuto,targetEdge:r.targetEdge};var n=Object(a.a)({},k[e]);return Object(b.a)()?(n.alignmentEdge&&n.alignmentEdge%2==0&&(n.alignmentEdge=-1*n.alignmentEdge),void 0!==t?k[t]:n):n}function V(e,t,r){var n=L(t,e),a=L(r,e),i=j(e),o=i.positiveEdge,s=i.negativeEdge;return n<=a?o:s}function U(e,t,r,n,a,i,o){var s=N(e,t,n,a,o);return M(s,r)?{elementRectangle:s,targetEdge:n.targetEdge,alignmentEdge:n.alignmentEdge}:R(e,t,r,n,a,i,o)}function W(e,t,r){var n=-1*e.targetEdge,i=new x(0,e.elementRectangle.width,0,e.elementRectangle.height),o={},s=B(e.elementRectangle,e.alignmentEdge?e.alignmentEdge:j(n).positiveEdge,r);return o[v.b[n]]=C(t,n),o[v.b[s]]=D(t,i,s),{elementPosition:Object(a.a)({},o),closestEdge:V(e.targetEdge,t,i),targetEdge:n}}function G(e,t){var r=t.targetRectangle,n=j(t.targetEdge),a=n.positiveEdge,i=n.negativeEdge,o=L(r,t.targetEdge),s=new x(e/2,t.elementRectangle.width-e/2,e/2,t.elementRectangle.height-e/2),l=new x(0,e,0,e);return O(l=z(l=I(l,-1*t.targetEdge,-e/2),-1*t.targetEdge,o-E(a,t.elementRectangle)),s,a)?O(l,s,i)||(l=P(l,s,i)):l=P(l,s,a),l}function q(e){var t=e.getBoundingClientRect();return new x(t.left,t.right,t.top,t.bottom)}function K(e){return new x(e.left,e.right,e.top,e.bottom)}function X(e,t,r,n,a){var i=0,o=k[t],s=a?-1*o.targetEdge:o.targetEdge;return(i=s===v.b.top?C(e,o.targetEdge)-n.top-r:s===v.b.bottom?n.bottom-C(e,o.targetEdge)-r:n.bottom-e.top-r)>0?i:n.height}function Z(e,t,r,n){var i=e.gapSpace?e.gapSpace:0,o=function(e,t){var r;if(t){if(t.preventDefault){var n=t;r=new x(n.clientX,n.clientX,n.clientY,n.clientY)}else if(t.getBoundingClientRect)r=q(t);else{var a=t;r=new x(a.x,a.x,a.y,a.y)}if(!M(r,e))for(var i=0,o=T(r,e);i<o.length;i++){var s=o[i];r[v.b[s]]=e[v.b[s]]}}else r=new x(0,0,0,0);return r}(r,e.target),s=function(e,t,r,n,a){return e.isAuto&&(e.alignmentEdge=V(e.targetEdge,t,r)),e.alignTargetEdge=a,e}(H(e.directionalHint,e.directionalHintForRTL,n),o,r,e.coverTarget,e.alignTargetEdge),l=U(q(t),o,r,s,i,e.directionalHintFixed,e.coverTarget);return Object(a.a)(Object(a.a)({},l),{targetRectangle:o})}function J(e,t,r,n,a){return{elementPosition:function(e,t,r,n,a,i,o){var s={},l=q(t),c=i?r:-1*r,u=v.b[c],d=a||j(r).positiveEdge;return o||(d=B(e,d,n)),s[u]=D(e,l,c),s[v.b[d]]=D(e,l,d),s}(e.elementRectangle,t,e.targetEdge,r,e.alignmentEdge,n,a),targetEdge:e.targetEdge,alignmentEdge:e.alignmentEdge}}function $(e,t,r,n,i){var o=e.isBeakVisible&&e.beakWidth||0,s=Y(o)/2+(e.gapSpace?e.gapSpace:0),l=e;l.gapSpace=s;var c=e.bounds?K(e.bounds):new x(0,window.innerWidth-Object(_.f)(),0,window.innerHeight),u=Z(l,r,c,n),d=W(u,G(o,u),c);return Object(a.a)(Object(a.a)({},J(u,t,c,e.coverTarget,i)),{beakPosition:d})}function Q(e,t,r,n){return function(e,t,r,n){return $(e,t,r,n,!0)}(e,t,r,n)}var ee,te=r(358),re=r(355),ne=r(9),ae=((ee={})[v.b.top]=ne.a.slideUpIn10,ee[v.b.bottom]=ne.a.slideDownIn10,ee[v.b.left]=ne.a.slideLeftIn10,ee[v.b.right]=ne.a.slideRightIn10,ee),ie=Object(re.a)({disableCaching:!0}),oe=0,se=0,le={opacity:0,filter:"opacity(0)"},ce=["role","aria-roledescription"],ue=function(e){function t(t){var r=e.call(this,t)||this;return r._hostElement=i.createRef(),r._calloutElement=i.createRef(),r._hasListeners=!1,r._disposables=[],r.dismiss=function(e){var t=r.props.onDismiss;t&&t(e)},r._dismissOnScroll=function(e){var t=r.props.preventDismissOnScroll;r.state.positions&&!t&&r._dismissOnClickOrScroll(e)},r._dismissOnResize=function(e){r.props.preventDismissOnResize||r.dismiss(e)},r._dismissOnLostFocus=function(e){r.props.preventDismissOnLostFocus||r._dismissOnClickOrScroll(e)},r._setInitialFocus=function(){r.props.setInitialFocus&&!r._didSetInitialFocus&&r.state.positions&&r._calloutElement.current&&(r._didSetInitialFocus=!0,r._async.requestAnimationFrame((function(){return Object(l.c)(r._calloutElement.current)}),r._calloutElement.current))},r._onComponentDidMount=function(){r._addListeners(),r.props.onLayerMounted&&r.props.onLayerMounted(),r._updateAsyncPosition(),r._setHeightOffsetEveryFrame()},r._mouseDownOnPopup=function(){r._isMouseDownOnPopup=!0},r._mouseUpOnPopup=function(){r._isMouseDownOnPopup=!1},r._async=new c.a(r),r._didSetInitialFocus=!1,r.state={positions:void 0,slideDirectionalClassName:void 0,calloutElementRect:void 0,heightOffset:0},r._positionAttempts=0,r}return Object(a.c)(t,e),t.prototype.componentDidUpdate=function(){this.props.hidden?this._hasListeners&&this._removeListeners():(this._setInitialFocus(),this._hasListeners||this._addListeners(),this._updateAsyncPosition())},t.prototype.shouldComponentUpdate=function(e,t){return!(!e.shouldUpdateWhenHidden&&this.props.hidden&&e.hidden)&&(!Object(u.c)(this.props,e)||!Object(u.c)(this.state,t))},t.prototype.UNSAFE_componentWillMount=function(){this._setTargetWindowAndElement(this._getTarget())},t.prototype.componentWillUnmount=function(){this._async.dispose(),this._disposables.forEach((function(e){return e()}))},t.prototype.UNSAFE_componentWillUpdate=function(e){var t=this._getTarget(e);(t!==this._getTarget()||"string"==typeof t||t instanceof String)&&!this._blockResetHeight&&(this._maxHeight=void 0,this._setTargetWindowAndElement(t)),e.gapSpace===this.props.gapSpace&&this.props.beakWidth===e.beakWidth||(this._maxHeight=void 0),e.finalHeight!==this.props.finalHeight&&this._setHeightOffsetEveryFrame(),this._didPositionPropsChange(e,this.props)&&(this._maxHeight=void 0,this._setTargetWindowAndElement(t),this.setState({positions:void 0}),this._didSetInitialFocus=!1,this._bounds=void 0),this._blockResetHeight=!1},t.prototype.componentDidMount=function(){this.props.hidden||this._onComponentDidMount()},t.prototype.render=function(){if(!this._targetWindow)return null;var e=this.props.target,t=this.props,r=t.styles,n=t.style,o=t.ariaLabel,s=t.ariaDescribedBy,l=t.ariaLabelledBy,c=t.className,u=t.isBeakVisible,h=t.children,f=t.beakWidth,m=t.calloutWidth,g=t.calloutMaxWidth,v=t.finalHeight,y=t.hideOverflow,b=void 0===y?!!v:y,_=t.backgroundColor,x=t.calloutMaxHeight,w=t.onScroll,k=t.shouldRestoreFocus,M=void 0===k||k;e=this._getTarget();var T=this.state.positions,C=this._getMaxHeight()?this._getMaxHeight()+this.state.heightOffset:void 0,S=x&&C&&x<C?x:C,L=b,A=u&&!!e;this._classNames=ie(r,{theme:this.props.theme,className:c,overflowYHidden:L,calloutWidth:m,positions:T,beakWidth:f,backgroundColor:_,calloutMaxWidth:g});var E=Object(a.a)(Object(a.a)(Object(a.a)({},n),{maxHeight:S}),L&&{overflowY:"hidden"}),D=this.props.hidden?{visibility:"hidden"}:void 0;return i.createElement("div",{ref:this._hostElement,className:this._classNames.container,style:D},i.createElement("div",Object(a.a)({},Object(d.d)(this.props,d.c,ce),{className:Object(p.a)(this._classNames.root,T&&T.targetEdge&&ae[T.targetEdge]),style:T?T.elementPosition:le,tabIndex:-1,ref:this._calloutElement}),A&&i.createElement("div",{className:this._classNames.beak,style:this._getBeakPosition()}),A&&i.createElement("div",{className:this._classNames.beakCurtain}),i.createElement(te.a,Object(a.a)({},Object(d.d)(this.props,ce),{ariaLabel:o,ariaDescribedBy:s,ariaLabelledBy:l,className:this._classNames.calloutMain,onDismiss:this.dismiss,onScroll:w,shouldRestoreFocus:M,style:E,onMouseDown:this._mouseDownOnPopup,onMouseUp:this._mouseUpOnPopup}),h)))},t.prototype._dismissOnClickOrScroll=function(e){var t=e.target,r=this._hostElement.current&&!Object(h.a)(this._hostElement.current,t);r&&this._isMouseDownOnPopup?this._isMouseDownOnPopup=!1:(!this._target&&r||e.target!==this._targetWindow&&r&&(this._target.stopPropagation||!this._target||t!==this._target&&!Object(h.a)(this._target,t)))&&this.dismiss(e)},t.prototype._addListeners=function(){var e=this;this._async.setTimeout((function(){e._disposables.push(Object(f.a)(e._targetWindow,"scroll",e._dismissOnScroll,!0),Object(f.a)(e._targetWindow,"resize",e._dismissOnResize,!0),Object(f.a)(e._targetWindow.document.documentElement,"focus",e._dismissOnLostFocus,!0),Object(f.a)(e._targetWindow.document.documentElement,"click",e._dismissOnLostFocus,!0)),e._hasListeners=!0}),0)},t.prototype._removeListeners=function(){this._disposables.forEach((function(e){return e()})),this._disposables=[],this._hasListeners=!1},t.prototype._updateAsyncPosition=function(){var e=this;this._async.requestAnimationFrame((function(){return e._updatePosition()}),this._calloutElement.current)},t.prototype._getBeakPosition=function(){var e=this.state.positions,t=Object(a.a)({},e&&e.beakPosition?e.beakPosition.elementPosition:null);return t.top||t.bottom||t.left||t.right||(t.left=se,t.top=oe),t},t.prototype._updatePosition=function(){this._setTargetWindowAndElement(this._getTarget());var e=this.state.positions,t=this._hostElement.current,r=this._calloutElement.current,n=!!this.props.target;if(t&&r&&(!n||this._target)){var a=void 0;(a=Object(u.a)(a,this.props)).bounds=this._getBounds(),a.target=this._target;var i=this.props.finalHeight?Q(a,t,r,e):function(e,t,r,n){return $(e,t,r,n)}(a,t,r,e);!e&&i||e&&i&&!this._arePositionsEqual(e,i)&&this._positionAttempts<5?(this._positionAttempts++,this.setState({positions:i})):this._positionAttempts>0&&(this._positionAttempts=0,this.props.onPositioned&&this.props.onPositioned(this.state.positions))}},t.prototype._getBounds=function(){if(!this._bounds){var e=this.props.bounds,t="function"==typeof e?e(this.props.target,this._targetWindow):e;t||(t={top:0+this.props.minPagePadding,left:0+this.props.minPagePadding,right:this._targetWindow.innerWidth-this.props.minPagePadding,bottom:this._targetWindow.innerHeight-this.props.minPagePadding,width:this._targetWindow.innerWidth-2*this.props.minPagePadding,height:this._targetWindow.innerHeight-2*this.props.minPagePadding}),this._bounds=t}return this._bounds},t.prototype._getMaxHeight=function(){var e=this;if(!this._maxHeight)if(this.props.directionalHintFixed&&this._target){var t=this.props.isBeakVisible?this.props.beakWidth:0,r=(this.props.gapSpace?this.props.gapSpace:0)+t;this._async.requestAnimationFrame((function(){e._target&&(e._maxHeight=function(e,t,r,n,a){void 0===r&&(r=0);var i=e,o=e,s=e,l=n?K(n):new x(0,window.innerWidth-Object(_.f)(),0,window.innerHeight);return X(i.stopPropagation?new x(i.clientX,i.clientX,i.clientY,i.clientY):void 0!==s.x&&void 0!==s.y?new x(s.x,s.x,s.y,s.y):q(o),t,r,l,a)}(e._target,e.props.directionalHint,r,e._getBounds(),e.props.coverTarget),e._blockResetHeight=!0,e.forceUpdate())}),this._target)}else this._maxHeight=this._getBounds().height;return this._maxHeight},t.prototype._arePositionsEqual=function(e,t){return this._comparePositions(e.elementPosition,t.elementPosition)&&this._comparePositions(e.beakPosition.elementPosition,t.beakPosition.elementPosition)},t.prototype._comparePositions=function(e,t){for(var r in t)if(t.hasOwnProperty(r)){var n=e[r],a=t[r];if(void 0===n||void 0===a)return!1;if(n.toFixed(2)!==a.toFixed(2))return!1}return!0},t.prototype._setTargetWindowAndElement=function(e){var t=this._calloutElement.current;if(e)if("string"==typeof e){var r=Object(m.a)(t);this._target=r?r.querySelector(e):null,this._targetWindow=Object(g.a)(t)}else if(e.stopPropagation)this._targetWindow=Object(g.a)(e.target),this._target=e;else if(e.getBoundingClientRect){var n=e;this._targetWindow=Object(g.a)(n),this._target=e}else void 0!==e.current?(this._target=e.current,this._targetWindow=Object(g.a)(this._target)):(this._targetWindow=Object(g.a)(t),this._target=e);else this._targetWindow=Object(g.a)(t)},t.prototype._setHeightOffsetEveryFrame=function(){var e=this;this._calloutElement.current&&this.props.finalHeight&&(this._setHeightOffsetTimer=this._async.requestAnimationFrame((function(){var t=e._calloutElement.current&&e._calloutElement.current.lastChild;if(t){var r=t.scrollHeight-t.offsetHeight;e.setState({heightOffset:e.state.heightOffset+r}),t.offsetHeight<e.props.finalHeight?e._setHeightOffsetEveryFrame():e._async.cancelAnimationFrame(e._setHeightOffsetTimer,e._calloutElement.current)}}),this._calloutElement.current))},t.prototype._didPositionPropsChange=function(e,t){return!e.hidden&&e.hidden!==t.hidden||e.directionalHint!==t.directionalHint},t.prototype._getTarget=function(e){return void 0===e&&(e=this.props),e.target},t.defaultProps={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:s.a.bottomAutoEdge},t}(i.Component);function de(e){return{height:e,width:e}}var pe={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},he=Object(o.a)(ue,(function(e){var t,r=e.theme,n=e.className,a=e.overflowYHidden,i=e.calloutWidth,o=e.beakWidth,s=e.backgroundColor,l=e.calloutMaxWidth,c=Object(ne.v)(pe,r),u=r.semanticColors,d=r.effects;return{container:[c.container,{position:"relative"}],root:[c.root,r.fonts.medium,{position:"absolute",boxSizing:"border-box",borderRadius:d.roundedCorner2,boxShadow:d.elevation16,selectors:(t={},t[ne.f]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},t)},Object(ne.t)(),n,!!i&&{width:i},!!l&&{maxWidth:l}],beak:[c.beak,{position:"absolute",backgroundColor:u.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},de(o),s&&{backgroundColor:s}],beakCurtain:[c.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:u.menuBackground,borderRadius:d.roundedCorner2}],calloutMain:[c.calloutMain,{backgroundColor:u.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",borderRadius:d.roundedCorner2},a&&{overflowY:"hidden"},s&&{backgroundColor:s}]}}),void 0,{scope:"CalloutContent"}),fe=r(370);r.d(t,"a",(function(){return me}));var me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.layerProps,r=Object(a.d)(e,["layerProps"]),n=i.createElement(he,Object(a.a)({},r));return this.props.doNotLayer?n:i.createElement(fe.a,Object(a.a)({},t),n)},t}(i.Component)},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(9),o=r(52),s=r(39),l=r(46),c=n.a;function u(e,t){void 0===t&&(t={});var r=t.defaultProp,o=void 0===r?"children":r;return function(t,r,s,l){if(a.isValidElement(r))return r;var u=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n={},a=[],o=0,s=t;o<s.length;o++){var l=s[o];a.push(l&&l.className),c(n,l)}return n.className=Object(i.F)(e,a),n}(l,t,function(e,t){var r,n;"string"==typeof t||"number"==typeof t||"boolean"==typeof t?((r={})[e]=t,n=r):n=t;return n}(o,r));if(s){if(s.component){var d=s.component;return a.createElement(d,Object(n.a)({},u))}if(s.render)return s.render(u,e)}return a.createElement(e,Object(n.a)({},u))}}var d=Object(l.b)((function(e){return u(e)}));function p(e,t,r,n,a){return void 0!==e.create?e.create(t,r,n,a):d(e)(t,r,n,a)}var h=r(60);r.d(t,"a",(function(){return f}));var f=function(e,t){void 0===t&&(t={});var r=t.factoryOptions,l=(void 0===r?{}:r).defaultProp,d=function(r){var l,u,d,p=(l=t.displayName,u=a.useContext(o.a),d=t.fields,s.a.getSettings(d||["theme","styles","tokens"],l,u.customizations)),h=t.state;h&&(r=Object(n.a)(Object(n.a)({},r),h(r)));var f=r.theme||p.theme,m=function e(t,r){for(var a=[],i=2;i<arguments.length;i++)a[i-2]=arguments[i];for(var o={},s=0,l=a;s<l.length;s++){var u=l[s];u&&(u="function"==typeof u?u(t,r):u,Array.isArray(u)&&(u=e.apply(void 0,Object(n.e)([t,r],u))),c(o,u))}return o}(r,f,t.tokens,p.tokens,r.tokens),g=function(e,t,r){for(var n=[],a=3;a<arguments.length;a++)n[a-3]=arguments[a];return i.r.apply(void 0,n.map((function(n){return"function"==typeof n?n(e,t,r):n})))}(r,f,m,t.styles,p.styles,r.styles),v=Object(n.a)(Object(n.a)({},r),{styles:g,tokens:m,_defaultStyles:g});return e(v)};return d.displayName=t.displayName||e.name,l&&(d.create=u(d,{defaultProp:l})),c(d,t.statics),d}((function(e){if(0===a.Children.count(e.children))return null;e.block,e.className;var t=e.as,r=void 0===t?"span":t,i=(e.variant,e.nowrap,Object(n.d)(e,["block","className","as","variant","nowrap"]));return function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o=e;return o.isSlot?0===a.Children.count(r)?o(t):(r=a.Children.toArray(r),o(Object(n.a)(Object(n.a)({},t),{children:r}))):a.createElement.apply(a,Object(n.e)([e,t],r))}(function(e,t){var r={},n=e,a=function(e){if(t.hasOwnProperty(e)){var a=function(r){for(var a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];if(a.length>0)throw new Error("Any module using getSlots must use withSlots. Please see withSlots javadoc for more info.");return p(t[e],r,n[e],n.slots&&n.slots[e],n._defaultStyles&&n._defaultStyles[e])};a.isSlot=!0,r[e]=a}};for(var i in t)a(i);return r}(e,{root:r}).root,Object(n.a)({},Object(h.d)(i,h.e)))}),{displayName:"Text",styles:function(e,t){var r=e.as,n=e.className,a=e.block,i=e.nowrap,o=e.variant,s=t.fonts[o||"medium"];return{root:[t.fonts.medium,{display:a?"td"===r?"table-cell":"block":"inline",fontFamily:s&&s.fontFamily||"inherit",fontSize:s&&s.fontSize||"inherit",fontWeight:s&&s.fontWeight||"inherit",color:s&&s.color||"inherit",mozOsxFontSmoothing:s&&s.MozOsxFontSmoothing,webkitFontSmoothing:s&&s.WebkitFontSmoothing},i&&{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},n]}}})},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(380),s=r(355),l=r(356),c=r(71),u=r(364),d=r(60),p=r(316),h=r(82),f=r(381),m=r(338),g=r(367),v=Object(s.a)(),y=function(e){function t(t){var r=e.call(this,t)||this;return r._onChange=function(e){var t=r.props.onChange;t&&t(e,r.props)},r._onBlur=function(e){var t=r.props.onBlur;t&&t(e,r.props)},r._onFocus=function(e){var t=r.props.onFocus;t&&t(e,r.props)},r._onRenderField=function(e){var t=e.id,n=e.imageSrc,o=e.imageAlt,s=void 0===o?"":o,l=e.selectedImageSrc,c=e.iconProps,u=e.imageSize?e.imageSize:{width:32,height:32},d=(e.onRenderLabel?Object(g.a)(e.onRenderLabel,r._onRenderLabel):r._onRenderLabel)(e);return i.createElement("label",{htmlFor:t,className:r._classNames.field},n&&i.createElement("div",{className:r._classNames.innerField},i.createElement("div",{className:r._classNames.imageWrapper},i.createElement(h.a,{src:n,alt:s,width:u.width,height:u.height})),i.createElement("div",{className:r._classNames.selectedImageWrapper},i.createElement(h.a,{src:l,alt:s,width:u.width,height:u.height}))),c&&i.createElement("div",{className:r._classNames.innerField},i.createElement("div",{className:r._classNames.iconWrapper},i.createElement(f.a,Object(a.a)({},c)))),n||c?i.createElement("div",{className:r._classNames.labelWrapper},d):d)},r._onRenderLabel=function(e){return i.createElement("span",{id:e.labelId,className:"ms-ChoiceFieldLabel"},e.text)},Object(l.a)(r),r}return Object(a.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.ariaLabel,r=e.focused,n=e.required,o=e.theme,s=e.iconProps,l=e.imageSrc,c=e.imageSize,u=void 0===c?{width:32,height:32}:c,p=e.disabled,h=e.checked,f=e.id,g=e.styles,y=e.name,b=e.onRenderField,_=void 0===b?this._onRenderField:b,x=Object(a.d)(e,["ariaLabel","focused","required","theme","iconProps","imageSrc","imageSize","disabled","checked","id","styles","name","onRenderField"]);this._classNames=v(g,{theme:o,hasIcon:!!s,hasImage:!!l,checked:h,disabled:p,imageIsLarge:!!l&&(u.width>71||u.height>71),imageSize:u,focused:r});var w=Object(d.d)(x,d.g),k=w.className,M=Object(a.d)(w,["className"]);return i.createElement("div",{className:this._classNames.root},i.createElement("div",{className:this._classNames.choiceFieldWrapper},i.createElement("input",Object(a.a)({"aria-label":t,id:f,className:Object(m.a)(this._classNames.input,k),type:"radio",name:y,disabled:p,checked:h,required:n},M,{onChange:this._onChange,onFocus:this._onFocus,onBlur:this._onBlur})),_(this.props,this._onRenderField)))},t}(i.Component),b=r(9),_=r(64),x={root:"ms-ChoiceField",choiceFieldWrapper:"ms-ChoiceField-wrapper",input:"ms-ChoiceField-input",field:"ms-ChoiceField-field",innerField:"ms-ChoiceField-innerField",imageWrapper:"ms-ChoiceField-imageWrapper",iconWrapper:"ms-ChoiceField-iconWrapper",labelWrapper:"ms-ChoiceField-labelWrapper",checked:"is-checked"},w="200ms";function k(e,t){var r,n;return["is-inFocus",{selectors:(r={},r["."+_.a+" &"]={position:"relative",outline:"transparent",selectors:{"::-moz-focus-inner":{border:0},":after":{content:'""',top:-2,right:-2,bottom:-2,left:-2,pointerEvents:"none",border:"1px solid "+e,position:"absolute",selectors:(n={},n[b.f]={borderColor:"WindowText",borderWidth:t?1:2},n)}}},r)}]}function M(e,t,r){return[t,{paddingBottom:2,transitionProperty:"opacity",transitionDuration:w,transitionTimingFunction:"ease",selectors:{".ms-Image":{display:"inline-block",borderStyle:"none"}}},(r?!e:e)&&["is-hidden",{position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden",opacity:0}]]}var T=Object(n.a)(y,(function(e){var t,r,n,a,i,o=e.theme,s=e.hasIcon,l=e.hasImage,c=e.checked,u=e.disabled,d=e.imageIsLarge,p=e.focused,h=e.imageSize,f=o.palette,m=o.semanticColors,g=o.fonts,v=Object(b.v)(x,o),y=f.neutralPrimary,_=m.inputBorderHovered,T=m.inputBackgroundChecked,C=f.themeDark,S=m.disabledBodySubtext,L=m.bodyBackground,A=f.neutralSecondary,E=m.inputBackgroundChecked,D=f.themeDark,I=m.disabledBodySubtext,P=f.neutralDark,O=m.focusBorder,R=m.inputBorderHovered,F=m.inputBackgroundChecked,z=f.themeDark,N=f.neutralLighter,j={selectors:{".ms-ChoiceFieldLabel":{color:P},":before":{borderColor:c?C:_},":after":[!s&&!l&&!c&&{content:'""',transitionProperty:"background-color",left:5,top:5,width:10,height:10,backgroundColor:A},c&&{borderColor:D}]}},B={borderColor:c?z:R,selectors:{":before":{opacity:1,borderColor:c?C:_}}},Y=[{content:'""',display:"inline-block",backgroundColor:L,borderWidth:1,borderStyle:"solid",borderColor:y,width:20,height:20,fontWeight:"normal",position:"absolute",top:0,left:0,boxSizing:"border-box",transitionProperty:"border-color",transitionDuration:w,transitionTimingFunction:"cubic-bezier(.4, 0, .23, 1)",borderRadius:"50%"},u&&{borderColor:S,selectors:(t={},t[b.f]={color:"GrayText"},t)},c&&{borderColor:u?S:T,selectors:(r={},r[b.f]={borderColor:"Highlight"},r)},(s||l)&&{top:3,right:3,left:"auto",opacity:c?1:0}],H=[{content:'""',width:0,height:0,borderRadius:"50%",position:"absolute",left:10,right:0,transitionProperty:"border-width",transitionDuration:w,transitionTimingFunction:"cubic-bezier(.4, 0, .23, 1)",boxSizing:"border-box"},c&&{borderWidth:5,borderStyle:"solid",borderColor:u?I:E,left:5,top:5,width:10,height:10,selectors:(n={},n[b.f]={borderColor:"Highlight"},n)},c&&(s||l)&&{top:8,right:8,left:"auto"}];return{root:[v.root,o.fonts.medium,{display:"flex",alignItems:"center",boxSizing:"border-box",color:m.bodyText,minHeight:26,border:"none",position:"relative",marginTop:8,selectors:{".ms-ChoiceFieldLabel":{display:"inline-block"}}},!s&&!l&&{selectors:{".ms-ChoiceFieldLabel":{paddingLeft:"26px"}}},l&&"ms-ChoiceField--image",s&&"ms-ChoiceField--icon",(s||l)&&{display:"inline-flex",fontSize:0,margin:"0 4px 4px 0",paddingLeft:0,backgroundColor:N,height:"100%"}],choiceFieldWrapper:[v.choiceFieldWrapper,p&&k(O,s||l)],input:[v.input,{position:"absolute",opacity:0,top:0,right:0,width:"100%",height:"100%",margin:0},u&&"is-disabled"],field:[v.field,c&&v.checked,{display:"inline-block",cursor:"pointer",marginTop:0,position:"relative",verticalAlign:"top",userSelect:"none",minHeight:20,selectors:{":hover":!u&&j,":focus":!u&&j,":before":Y,":after":H}},s&&"ms-ChoiceField--icon",l&&"ms-ChoiceField-field--image",(s||l)&&{boxSizing:"content-box",cursor:"pointer",paddingTop:22,margin:0,textAlign:"center",transitionProperty:"all",transitionDuration:w,transitionTimingFunction:"ease",border:"1px solid transparent",justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column"},c&&{borderColor:F},(s||l)&&!u&&{selectors:{":hover":B,":focus":B}},u&&{cursor:"default",selectors:(a={".ms-ChoiceFieldLabel":{color:m.disabledBodyText}},a[b.f]={color:"GrayText"},a)},c&&u&&{borderColor:N}],innerField:[v.innerField,l&&{height:h.height,width:h.width},(s||l)&&{position:"relative",display:"inline-block",paddingLeft:30,paddingRight:30},(s||l)&&d&&{paddingLeft:24,paddingRight:24},(s||l)&&u&&{opacity:.25,selectors:(i={},i[b.f]={color:"GrayText",opacity:1},i)}],imageWrapper:M(!1,v.imageWrapper,c),selectedImageWrapper:M(!0,v.imageWrapper,c),iconWrapper:[v.iconWrapper,{fontSize:32,lineHeight:32,height:32}],labelWrapper:[v.labelWrapper,g.medium,(s||l)&&{display:"block",position:"relative",margin:"4px 8px",height:30,lineHeight:15,maxWidth:2*h.width,overflow:"hidden",whiteSpace:"pre-wrap",textOverflow:"ellipsis"}]}}),void 0,{scope:"ChoiceGroupOption"}),C=Object(s.a)(),S=function(e){function t(t){var r=e.call(this,t)||this;r._focusCallbacks={},r._changeCallbacks={},r._onBlur=function(e,t){r.setState({keyFocused:void 0})},Object(l.a)(r);var n=t.defaultSelectedKey,a=t.options,i=void 0===a?[]:a,o=!L(t)&&void 0!==n&&i.some((function(e){return e.key===n}));return r.state={keyChecked:o?n:r._getKeyChecked(t)},r._id=Object(c.a)("ChoiceGroup"),r._labelId=Object(c.a)("ChoiceGroupLabel"),r}return Object(a.c)(t,e),Object.defineProperty(t.prototype,"checkedOption",{get:function(){var e=this,t=this.props.options,r=void 0===t?[]:t;return Object(u.c)(r,(function(t){return t.key===e.state.keyChecked}))},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){if(e!==this.props){var r=this._getKeyChecked(this.props);r!==this._getKeyChecked(e)&&this.setState({keyChecked:r})}},t.prototype.render=function(){var e=this,t=this.props,r=t.className,n=t.theme,s=t.styles,l=t.options,c=void 0===l?[]:l,u=t.label,p=t.required,h=t.disabled,f=t.name,m=this.state,g=m.keyChecked,v=m.keyFocused,y=Object(d.d)(this.props,d.c,["onChange","className","required"]),b=C(s,{theme:n,className:r,optionsContainIconOrImage:c.some((function(e){return!(!e.iconProps&&!e.imageSrc)}))}),_=this._id+"-label",x=this.props.ariaLabelledBy||(u?_:this.props["aria-labelledby"]);return i.createElement("div",Object(a.a)({className:b.applicationRole},y),i.createElement("div",Object(a.a)({className:b.root,role:"radiogroup"},x&&{"aria-labelledby":x}),u&&i.createElement(o.a,{className:b.label,required:p,id:_,disabled:h},u),i.createElement("div",{className:b.flexContainer},c.map((function(t){var r=Object(a.a)(Object(a.a)({},t),{focused:t.key===v,checked:t.key===g,disabled:t.disabled||h,id:e._getOptionId(t),labelId:e._labelId+"-"+t.key,name:f||e._id,required:p});return i.createElement(T,Object(a.a)({key:t.key,onBlur:e._onBlur,onFocus:e._onFocus(t.key),onChange:e._onChange(t.key)},r))})))))},t.prototype.focus=function(){var e=this.props.options,t=void 0===e?[]:e,r=this.checkedOption||t.filter((function(e){return!e.disabled}))[0],n=r&&document.getElementById(this._getOptionId(r));n&&n.focus()},t.prototype._onFocus=function(e){var t=this;return this._focusCallbacks[e]||(this._focusCallbacks[e]=function(r,n){t.setState({keyFocused:e})}),this._focusCallbacks[e]},t.prototype._onChange=function(e){var t=this;return this._changeCallbacks[e]||(this._changeCallbacks[e]=function(r,n){var a=t.props,i=a.onChanged,o=a.onChange;L(t.props)||t.setState({keyChecked:e});var s=Object(u.c)(t.props.options||[],(function(t){return t.key===e}));o?o(r,s):i&&i(s,r)}),this._changeCallbacks[e]},t.prototype._getKeyChecked=function(e){if(void 0!==e.selectedKey)return e.selectedKey;var t=e.options,r=(void 0===t?[]:t).filter((function(e){return e.checked}));return r[0]&&r[0].key},t.prototype._getOptionId=function(e){return this._id+"-"+e.key},t}(i.Component);function L(e){return Object(p.a)(e,"selectedKey")}var A={root:"ms-ChoiceFieldGroup",flexContainer:"ms-ChoiceFieldGroup-flexContainer"};r.d(t,"a",(function(){return E}));var E=Object(n.a)(S,(function(e){var t=e.className,r=e.optionsContainIconOrImage,n=e.theme,a=Object(b.v)(A,n);return{applicationRole:t,root:[a.root,n.fonts.medium,{display:"block"}],flexContainer:[a.flexContainer,r&&{display:"flex",flexDirection:"row",flexWrap:"wrap"}]}}),void 0,{scope:"ChoiceGroup"})},function(e,t,r){"use strict";var n,a,i,o,s=r(2),l=r(0),c=function(){return!("undefined"==typeof window||!window.navigator||!window.navigator.userAgent)&&window.navigator.userAgent.indexOf("rv:11.0")>-1},u=r(26),d=r(60),p=r(95),h=function(e){function t(t){var r=e.call(this,t)||this;return r._inputElement=l.createRef(),r._autoFillEnabled=!0,r._isComposing=!1,r._onCompositionStart=function(e){r._isComposing=!0,r._autoFillEnabled=!1},r._onCompositionUpdate=function(){c()&&r._updateValue(r._getCurrentInputValue(),!0)},r._onCompositionEnd=function(e){var t=r._getCurrentInputValue();r._tryEnableAutofill(t,r.value,!1,!0),r._isComposing=!1,r._async.setTimeout((function(){r._updateValue(r._getCurrentInputValue(),!1)}),0)},r._onClick=function(){r._value&&""!==r._value&&r._autoFillEnabled&&(r._autoFillEnabled=!1)},r._onKeyDown=function(e){if(r.props.onKeyDown&&r.props.onKeyDown(e),!e.nativeEvent.isComposing)switch(e.which){case u.a.backspace:r._autoFillEnabled=!1;break;case u.a.left:case u.a.right:r._autoFillEnabled&&(r._value=r.state.displayValue,r._autoFillEnabled=!1);break;default:r._autoFillEnabled||-1!==r.props.enableAutofillOnKeyPress.indexOf(e.which)&&(r._autoFillEnabled=!0)}},r._onInputChanged=function(e){var t=r._getCurrentInputValue(e);if(r._isComposing||r._tryEnableAutofill(t,r._value,e.nativeEvent.isComposing),!c()||!r._isComposing){var n=e.nativeEvent.isComposing,a=void 0===n?r._isComposing:n;r._updateValue(t,a)}},r._onChanged=function(){},r._updateValue=function(e,t){(e||e!==r._value)&&(r._value=r.props.onInputChange?r.props.onInputChange(e,t):e,r.setState({displayValue:r._getDisplayValue(r._value,r.props.suggestedDisplayValue)},(function(){return r._notifyInputChange(r._value,t)})))},r._value=t.defaultVisibleValue||"",r.state={displayValue:t.defaultVisibleValue||""},r}return Object(s.c)(t,e),Object.defineProperty(t.prototype,"cursorLocation",{get:function(){if(this._inputElement.current){var e=this._inputElement.current;return"forward"!==e.selectionDirection?e.selectionEnd:e.selectionStart}return-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValueSelected",{get:function(){return Boolean(this.inputElement&&this.inputElement.selectionStart!==this.inputElement.selectionEnd)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectionStart",{get:function(){return this._inputElement.current?this._inputElement.current.selectionStart:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectionEnd",{get:function(){return this._inputElement.current?this._inputElement.current.selectionEnd:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputElement",{get:function(){return this._inputElement.current},enumerable:!0,configurable:!0}),t.prototype.UNSAFE_componentWillReceiveProps=function(e){if(this.props.updateValueInWillReceiveProps){var t=this.props.updateValueInWillReceiveProps();null!==t&&t!==this._value&&(this._value=t)}var r=this._getDisplayValue(this._value,e.suggestedDisplayValue);"string"==typeof r&&this.setState({displayValue:r})},t.prototype.componentDidUpdate=function(){var e=this._value,t=this.props,r=t.suggestedDisplayValue,n=t.shouldSelectFullInputValueInComponentDidUpdate,a=0;if(!t.preventValueSelection&&this._autoFillEnabled&&e&&r&&this._doesTextStartWith(r,e)){var i=!1;if(n&&(i=n()),i&&this._inputElement.current)this._inputElement.current.setSelectionRange(0,r.length,"backward");else{for(;a<e.length&&e[a].toLocaleLowerCase()===r[a].toLocaleLowerCase();)a++;a>0&&this._inputElement.current&&this._inputElement.current.setSelectionRange(a,r.length,"backward")}}},t.prototype.render=function(){var e=this.state.displayValue,t=Object(d.d)(this.props,d.g);return l.createElement("input",Object(s.a)({autoCapitalize:"off",autoComplete:"off","aria-autocomplete":"both"},t,{ref:this._inputElement,value:e,onCompositionStart:this._onCompositionStart,onCompositionUpdate:this._onCompositionUpdate,onCompositionEnd:this._onCompositionEnd,onChange:this._onChanged,onInput:this._onInputChanged,onKeyDown:this._onKeyDown,onClick:this.props.onClick?this.props.onClick:this._onClick,"data-lpignore":!0}))},t.prototype.focus=function(){this._inputElement.current&&this._inputElement.current.focus()},t.prototype.clear=function(){this._autoFillEnabled=!0,this._updateValue("",!1),this._inputElement.current&&this._inputElement.current.setSelectionRange(0,0)},t.prototype._getCurrentInputValue=function(e){return e&&e.target&&e.target.value?e.target.value:this.inputElement&&this.inputElement.value?this.inputElement.value:""},t.prototype._tryEnableAutofill=function(e,t,r,n){!r&&e&&this._inputElement.current&&this._inputElement.current.selectionStart===e.length&&!this._autoFillEnabled&&(e.length>t.length||n)&&(this._autoFillEnabled=!0)},t.prototype._notifyInputChange=function(e,t){this.props.onInputValueChange&&this.props.onInputValueChange(e,t)},t.prototype._getDisplayValue=function(e,t){var r=e;return t&&e&&this._doesTextStartWith(t,r)&&this._autoFillEnabled&&(r=t),r},t.prototype._doesTextStartWith=function(e,t){return!(!e||!t)&&0===e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())},t.defaultProps={enableAutofillOnKeyPress:[u.a.down,u.a.up]},t}(p.a),f=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(s.c)(t,e)}(h),r(77)),m=r(340),g=r(78),v=r(338),y=r(361),b=r(362),_=r(71),x=r(365),w=r(364),k=r(339),M=r(371),T=r(382),C=r(378),S=r(386),L=r(15),A=r(9),E=r(46),D=Object(E.b)((function(e){var t,r=e.semanticColors;return{backgroundColor:r.disabledBackground,color:r.disabledText,cursor:"default",selectors:(t={":after":{borderColor:r.disabledBackground}},t[A.f]={color:"GrayText",selectors:{":after":{borderColor:"GrayText"}}},t)}})),I={selectors:(n={},n[A.f]={backgroundColor:"Highlight",borderColor:"Highlight",color:"HighlightText",MsHighContrastAdjust:"none"},n)},P={selectors:(a={},a[A.f]={color:"WindowText",backgroundColor:"Window",MsHighContrastAdjust:"none"},a)},O=Object(E.b)((function(e,t,r,n,a){var i,o=e.palette,s=e.semanticColors,l={textHoveredColor:s.menuItemTextHovered,textSelectedColor:o.neutralDark,textDisabledColor:s.disabledText,backgroundHoveredColor:s.menuItemBackgroundHovered,backgroundPressedColor:s.menuItemBackgroundPressed},c={root:[e.fonts.medium,{backgroundColor:n?l.backgroundHoveredColor:"transparent",boxSizing:"border-box",cursor:"pointer",display:a?"none":"block",width:"100%",height:"auto",minHeight:36,lineHeight:"20px",padding:"0 8px",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:"transparent",borderRadius:0,wordWrap:"break-word",overflowWrap:"break-word",textAlign:"left",selectors:(i={},i[A.f]={borderColor:"Background"},i["&.ms-Checkbox"]={display:"flex",alignItems:"center"},i["&.ms-Button--command:hover:active"]={backgroundColor:l.backgroundPressedColor},i[".ms-Checkbox-label"]={width:"100%"},i)}],rootHovered:{backgroundColor:l.backgroundHoveredColor,color:l.textHoveredColor},rootFocused:{backgroundColor:l.backgroundHoveredColor},rootChecked:[{backgroundColor:"transparent",color:l.textSelectedColor,selectors:{":hover":[{backgroundColor:l.backgroundHoveredColor},I]}},Object(A.u)(e,{inset:-1,isFocusedOnly:!1}),I],rootDisabled:{color:l.textDisabledColor,cursor:"default"},optionText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",minWidth:"0px",maxWidth:"100%",wordWrap:"break-word",overflowWrap:"break-word",display:"inline-block"},optionTextWrapper:{maxWidth:"100%",display:"flex",alignItems:"center"}};return Object(A.r)(c,t,r)})),R=Object(E.b)((function(e,t){var r,n,a=e.semanticColors,i=e.fonts,o={buttonTextColor:a.bodySubtext,buttonTextHoveredCheckedColor:a.buttonTextChecked,buttonBackgroundHoveredColor:a.listItemBackgroundHovered,buttonBackgroundCheckedColor:a.listItemBackgroundChecked,buttonBackgroundCheckedHoveredColor:a.listItemBackgroundCheckedHovered},s={selectors:(r={},r[A.f]={backgroundColor:"Highlight",borderColor:"Highlight",color:"HighlightText",MsHighContrastAdjust:"none"},r)},l={root:{color:o.buttonTextColor,fontSize:i.small.fontSize,position:"absolute",top:0,height:"100%",lineHeight:30,width:32,textAlign:"center",cursor:"default",selectors:(n={},n[A.f]={backgroundColor:"ButtonFace",borderColor:"ButtonText",color:"ButtonText",MsHighContrastAdjust:"none"},n)},icon:{fontSize:i.small.fontSize},rootHovered:[{backgroundColor:o.buttonBackgroundHoveredColor,color:o.buttonTextHoveredCheckedColor,cursor:"pointer"},s],rootPressed:[{backgroundColor:o.buttonBackgroundCheckedColor,color:o.buttonTextHoveredCheckedColor},s],rootChecked:[{backgroundColor:o.buttonBackgroundCheckedColor,color:o.buttonTextHoveredCheckedColor},s],rootCheckedHovered:[{backgroundColor:o.buttonBackgroundCheckedHoveredColor,color:o.buttonTextHoveredCheckedColor},s],rootDisabled:[D(e),{position:"absolute"}]};return Object(A.r)(l,t)})),F=Object(E.b)((function(e,t,r){var n,a,i,o,s,l=e.semanticColors,c=e.fonts,u=e.effects,d={textColor:l.inputText,borderColor:l.inputBorder,borderHoveredColor:l.inputBorderHovered,borderPressedColor:l.inputFocusBorderAlt,borderFocusedColor:l.inputFocusBorderAlt,backgroundColor:l.inputBackground,erroredColor:l.errorText},p={headerTextColor:l.menuHeader,dividerBorderColor:l.bodyDivider},h={selectors:(n={},n[A.f]={color:"GrayText"},n)},f=[{color:l.inputPlaceholderText},h],m=[{color:l.inputTextHovered},h],g=[{color:l.disabledText},h],v={color:"HighlightText",backgroundColor:"Window",MsHighContrastAdjust:"none",selectors:{":after":{borderColor:"Highlight"}}},y=Object(A.x)(d.borderPressedColor,u.roundedCorner2,"border",0),b={container:{},label:{},labelDisabled:{},root:[e.fonts.medium,{boxShadow:"none",marginLeft:"0",paddingRight:32,paddingLeft:9,color:d.textColor,position:"relative",outline:"0",userSelect:"none",backgroundColor:d.backgroundColor,cursor:"text",display:"block",height:32,whiteSpace:"nowrap",textOverflow:"ellipsis",boxSizing:"border-box",selectors:{".ms-Label":{display:"inline-block",marginBottom:"8px"},"&.is-open":{selectors:(a={},a[A.f]=v,a)},":after":{pointerEvents:"none",content:"''",position:"absolute",left:0,top:0,bottom:0,right:0,borderWidth:"1px",borderStyle:"solid",borderColor:d.borderColor,borderRadius:u.roundedCorner2}}}],rootHovered:{selectors:(i={":after":{borderColor:d.borderHoveredColor},".ms-ComboBox-Input":[{color:l.inputTextHovered},Object(A.y)(m),P]},i[A.f]={color:"HighlightText",backgroundColor:"Window",MsHighContrastAdjust:"none",selectors:{":after":{borderColor:"Highlight"}}},i)},rootPressed:[{position:"relative",selectors:(o={},o[A.f]=v,o)}],rootFocused:[{selectors:(s={".ms-ComboBox-Input":[{color:l.inputTextHovered},P]},s[A.f]=v,s)},y],rootDisabled:D(e),rootError:{borderColor:d.erroredColor,selectors:{":hover":{borderColor:l.inputBorderHovered}}},rootDisallowFreeForm:{},input:[Object(A.y)(f),{backgroundColor:d.backgroundColor,color:d.textColor,boxSizing:"border-box",width:"100%",height:"100%",borderStyle:"none",outline:"none",font:"inherit",textOverflow:"ellipsis",padding:"0",selectors:{"::-ms-clear":{display:"none"}}},P],inputDisabled:[D(e),Object(A.y)(g)],errorMessage:[e.fonts.small,{color:d.erroredColor,marginTop:"5px"}],callout:{boxShadow:u.elevation8},optionsContainerWrapper:{width:r},optionsContainer:{display:"block"},screenReaderText:A.B,header:[c.medium,{fontWeight:A.e.semibold,color:p.headerTextColor,backgroundColor:"none",borderStyle:"none",height:36,lineHeight:36,cursor:"default",padding:"0 8px",userSelect:"none",textAlign:"left"}],divider:{height:1,backgroundColor:p.dividerBorderColor}};return Object(A.r)(b,t)})),z=Object(E.b)((function(e,t,r,n,a,i,o,s){return{container:Object(A.F)("ms-ComboBox-container",t,e.container),label:Object(A.F)(e.label,n&&e.labelDisabled),root:Object(A.F)("ms-ComboBox",s?e.rootError:r&&"is-open",a&&"is-required",e.root,!o&&e.rootDisallowFreeForm,s?e.rootError:!n&&i&&e.rootFocused,!n&&{selectors:{":hover":s?e.rootError:!r&&!i&&e.rootHovered,":active":s?e.rootError:e.rootPressed,":focus":s?e.rootError:e.rootFocused}},n&&["is-disabled",e.rootDisabled]),input:Object(A.F)("ms-ComboBox-Input",e.input,n&&e.inputDisabled),errorMessage:Object(A.F)(e.errorMessage),callout:Object(A.F)("ms-ComboBox-callout",e.callout),optionsContainerWrapper:Object(A.F)("ms-ComboBox-optionsContainerWrapper",e.optionsContainerWrapper),optionsContainer:Object(A.F)("ms-ComboBox-optionsContainer",e.optionsContainer),header:Object(A.F)("ms-ComboBox-header",e.header),divider:Object(A.F)("ms-ComboBox-divider",e.divider),screenReaderText:Object(A.F)(e.screenReaderText)}})),N=Object(E.b)((function(e){return{optionText:Object(A.F)("ms-ComboBox-optionText",e.optionText),root:Object(A.F)("ms-ComboBox-option",e.root,{selectors:{":hover":e.rootHovered,":focus":e.rootFocused,":active":e.rootPressed}}),optionTextWrapper:Object(A.F)(e.optionTextWrapper)}})),j=r(376),B=r(380),Y=r(360),H=r(366);r.d(t,"a",(function(){return W})),function(e){e[e.backward=-1]="backward",e[e.none=0]="none",e[e.forward=1]="forward"}(i||(i={})),function(e){e[e.clearAll=-2]="clearAll",e[e.default=-1]="default"}(o||(o={}));var V=250,U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(s.c)(t,e),t.prototype.render=function(){return this.props.render()},t.prototype.shouldComponentUpdate=function(e){return!Object(f.c)(Object(s.a)(Object(s.a)({},this.props),{render:void 0}),Object(s.a)(Object(s.a)({},e),{render:void 0}))},t}(l.Component),W=function(e){function t(t){var r=e.call(this,t)||this;r._root=l.createRef(),r._autofill=l.createRef(),r._comboBoxWrapper=l.createRef(),r._comboBoxMenu=l.createRef(),r._selectedElement=l.createRef(),r.focus=function(e,t){r._autofill.current&&(t?Object(m.b)(r._autofill.current):r._autofill.current.focus(),e&&r.setState({isOpen:!0}))},r.dismissMenu=function(){r.state.isOpen&&r.setState({isOpen:!1})},r._onUpdateValueInAutofillWillReceiveProps=function(){var e=r._autofill.current;if(!e)return null;if(null===e.value||void 0===e.value)return null;var t=r._normalizeToString(r._currentVisibleValue);return e.value!==t?t||"":e.value},r._onShouldSelectFullInputValueInAutofillComponentDidUpdate=function(){return r._currentVisibleValue===r.state.suggestedDisplayValue},r._getVisibleValue=function(){var e=r.props,t=e.text,n=e.allowFreeform,a=e.autoComplete,i=r.state,o=i.selectedIndices,s=i.currentPendingValueValidIndex,l=i.currentOptions,c=i.currentPendingValue,u=i.suggestedDisplayValue,d=i.isOpen,p=i.focused,h=r._indexWithinBounds(l,s);if((!d||!h)&&t&&null==c)return t;if(r.props.multiSelect){if(p){var f=-1;return"on"===a&&h&&(f=s),r._getPendingString(c,l,f)}return r._getMultiselectDisplayString(o,l,u)}f=r._getFirstSelectedIndex();return n?("on"===a&&h&&(f=s),r._getPendingString(c,l,f)):h&&"on"===a?(f=s,r._normalizeToString(c)):!r.state.isOpen&&c?r._indexWithinBounds(l,f)?c:r._normalizeToString(u):r._indexWithinBounds(l,f)?l[f].text:r._normalizeToString(u)},r._onInputChange=function(e){r.props.disabled?r._handleInputWhenDisabled(null):r.props.allowFreeform?r._processInputChangeWithFreeform(e):r._processInputChangeWithoutFreeform(e)},r._select=function(){if(r._autofill.current&&r._autofill.current.inputElement&&r._autofill.current.inputElement.select(),!r.state.focused){var e={focused:!0};!r.props.openOnKeyboardFocus||r.state.isOpen||r.props.disabled||(e.isOpen=!0),r.setState(e)}},r._onResolveOptions=function(){if(r.props.onResolveOptions){var e=r.props.onResolveOptions(Object(s.e)(r.state.currentOptions));if(Array.isArray(e))r.setState({currentOptions:e});else if(e&&e.then){var t=r._currentPromise=e;t.then((function(e){t===r._currentPromise&&r.setState({currentOptions:e})}))}}},r._onBlur=function(e){var t=e.relatedTarget;if(null===e.relatedTarget&&(t=document.activeElement),t&&(r._root.current&&r._root.current.contains(t)||r._comboBoxMenu.current&&(r._comboBoxMenu.current.contains(t)||Object(g.a)(r._comboBoxMenu.current,(function(e){return e===t})))))return e.preventDefault(),void e.stopPropagation();r.state.focused&&(r.setState({focused:!1}),r.props.multiSelect&&!r.props.allowFreeform||r._submitPendingValue(e))},r._onRenderContainer=function(e){var t=e.onRenderList,n=e.calloutProps,a=e.dropdownWidth,i=e.dropdownMaxWidth,o=e.onRenderUpperContent,c=void 0===o?r._onRenderUpperContent:o,u=e.onRenderLowerContent,d=void 0===u?r._onRenderLowerContent:u,p=e.useComboBoxAsMenuWidth,h=e.persistMenu,f=e.shouldRestoreFocus,m=void 0===f||f,g=r.state.isOpen,y=p&&r._comboBoxWrapper.current?r._comboBoxWrapper.current.clientWidth+2:void 0;return l.createElement(M.a,Object(s.a)({isBeakVisible:!1,gapSpace:0,doNotLayer:!1,directionalHint:L.a.bottomLeftEdge,directionalHintFixed:!1},n,{onLayerMounted:r._onLayerMounted,className:Object(v.a)(r._classNames.callout,n?n.className:void 0),target:r._comboBoxWrapper.current,onDismiss:r._onDismiss,onMouseDown:r._onCalloutMouseDown,onScroll:r._onScroll,setInitialFocus:!1,calloutWidth:p&&r._comboBoxWrapper.current?y&&y:a,calloutMaxWidth:i||y,hidden:h?!g:void 0,shouldRestoreFocus:m}),c(r.props,r._onRenderUpperContent),l.createElement("div",{className:r._classNames.optionsContainerWrapper,ref:r._comboBoxMenu},t(Object(s.a)({},e),r._onRenderList)),d(r.props,r._onRenderLowerContent))},r._onLayerMounted=function(){r._onCalloutLayerMounted(),r.props.calloutProps&&r.props.calloutProps.onLayerMounted&&r.props.calloutProps.onLayerMounted()},r._onRenderLabel=function(e){var t=e.props,n=t.label,a=t.disabled,i=t.required;return n?l.createElement(B.a,{id:r._id+"-label",disabled:a,required:i,className:r._classNames.label},n,e.multiselectAccessibleText&&l.createElement("span",{className:r._classNames.screenReaderText},e.multiselectAccessibleText)):null},r._onRenderList=function(e){var t=e.onRenderItem,n=e.options,a=r._id;return l.createElement("div",{id:a+"-list",className:r._classNames.optionsContainer,"aria-labelledby":a+"-label",role:"listbox"},n.map((function(e){return t(e,r._onRenderItem)})))},r._onRenderItem=function(e){switch(e.itemType){case Y.a.Divider:return r._renderSeparator(e);case Y.a.Header:return r._renderHeader(e);default:return r._renderOption(e)}},r._onRenderLowerContent=function(){return null},r._onRenderUpperContent=function(){return null},r._renderOption=function(e){var t=r.props.onRenderOption,n=void 0===t?r._onRenderOptionContent:t,a=r._id,i=r._isOptionSelected(e.index),o=r._isOptionChecked(e.index),s=r._getCurrentOptionStyles(e),c=N(r._getCurrentOptionStyles(e)),u=r._getPreviewText(e),d=function(){return n(e,r._onRenderOptionContent)};return l.createElement(U,{key:e.key,index:e.index,disabled:e.disabled,isSelected:i,isChecked:o,text:e.text,render:function(){return r.props.multiSelect?l.createElement(T.a,{id:a+"-list"+e.index,ariaLabel:r._getPreviewText(e),key:e.key,"data-index":e.index,styles:s,className:"ms-ComboBox-option","data-is-focusable":!0,onChange:r._onItemClick(e),label:e.text,role:"option",checked:o,title:u,disabled:e.disabled,onRenderLabel:d,inputProps:{"aria-selected":i?"true":"false"}}):l.createElement(C.a,{id:a+"-list"+e.index,key:e.key,"data-index":e.index,styles:s,checked:i,className:"ms-ComboBox-option",onClick:r._onItemClick(e),onMouseEnter:r._onOptionMouseEnter.bind(r,e.index),onMouseMove:r._onOptionMouseMove.bind(r,e.index),onMouseLeave:r._onOptionMouseLeave,role:"option","aria-selected":i?"true":"false",ariaLabel:r._getPreviewText(e),disabled:e.disabled,title:u},l.createElement("span",{className:c.optionTextWrapper,ref:i?r._selectedElement:void 0},n(e,r._onRenderOptionContent)))},data:e.data})},r._onCalloutMouseDown=function(e){e.preventDefault()},r._onScroll=function(){r._isScrollIdle||void 0===r._scrollIdleTimeoutId?r._isScrollIdle=!1:(r._async.clearTimeout(r._scrollIdleTimeoutId),r._scrollIdleTimeoutId=void 0),r._scrollIdleTimeoutId=r._async.setTimeout((function(){r._isScrollIdle=!0}),V)},r._onRenderOptionContent=function(e){var t=N(r._getCurrentOptionStyles(e));return l.createElement("span",{className:t.optionText},e.text)},r._onDismiss=function(){var e=r.props.onMenuDismiss;e&&e(),r.props.persistMenu&&r._onCalloutLayerMounted(),r._setOpenStateAndFocusOnClose(!1,!1),r._resetSelectedIndex()},r._onAfterClearPendingInfo=function(){r._processingClearPendingInfo=!1},r._onInputKeyDown=function(e){var t=r.props,n=t.disabled,a=t.allowFreeform,s=t.autoComplete,l=r.state,c=l.isOpen,d=l.currentOptions,p=l.currentPendingValueValidIndexOnHover;if(r._lastKeyDownWasAltOrMeta=r._isAltOrMeta(e),n)r._handleInputWhenDisabled(e);else{var h=r._getPendingSelectedIndex(!1);switch(e.which){case u.a.enter:r._autofill.current&&r._autofill.current.inputElement&&r._autofill.current.inputElement.select(),r._submitPendingValue(e),r.props.multiSelect&&c?r.setState({currentPendingValueValidIndex:h}):(c||(!a||void 0===r.state.currentPendingValue||null===r.state.currentPendingValue||r.state.currentPendingValue.length<=0)&&r.state.currentPendingValueValidIndex<0)&&r.setState({isOpen:!c});break;case u.a.tab:return r.props.multiSelect||r._submitPendingValue(e),void(c&&r._setOpenStateAndFocusOnClose(!c,!1));case u.a.escape:if(r._resetSelectedIndex(),!c)return;r.setState({isOpen:!1});break;case u.a.up:if(p===o.clearAll&&(h=r.state.currentOptions.length),e.altKey||e.metaKey){if(c){r._setOpenStateAndFocusOnClose(!c,!0);break}return}r._setPendingInfoFromIndexAndDirection(h,i.backward);break;case u.a.down:e.altKey||e.metaKey?r._setOpenStateAndFocusOnClose(!0,!0):(p===o.clearAll&&(h=-1),r._setPendingInfoFromIndexAndDirection(h,i.forward));break;case u.a.home:case u.a.end:if(a)return;h=-1;var f=i.forward;e.which===u.a.end&&(h=d.length,f=i.backward),r._setPendingInfoFromIndexAndDirection(h,f);break;case u.a.space:if(!a&&"off"===s)break;default:if(e.which>=112&&e.which<=123)return;if(e.keyCode===u.a.alt||"Meta"===e.key)return;if(!a&&"on"===s){r._onInputChange(e.key);break}return}e.stopPropagation(),e.preventDefault()}},r._onInputKeyUp=function(e){var t=r.props,n=t.disabled,a=t.allowFreeform,i=t.autoComplete,o=r.state.isOpen,s=r._lastKeyDownWasAltOrMeta&&r._isAltOrMeta(e);r._lastKeyDownWasAltOrMeta=!1;var l=s&&!(Object(y.a)()||Object(b.a)());if(n)r._handleInputWhenDisabled(e);else switch(e.which){case u.a.space:return void(a||"off"!==i||r._setOpenStateAndFocusOnClose(!o,!!o));default:return void(l&&o&&r._setOpenStateAndFocusOnClose(!o,!0))}},r._onOptionMouseLeave=function(){r._shouldIgnoreMouseEvent()||r.props.persistMenu&&!r.state.isOpen||r.setState({currentPendingValueValidIndexOnHover:o.clearAll})},r._onComboBoxClick=function(){var e=r.props.disabled,t=r.state.isOpen;e||(r._setOpenStateAndFocusOnClose(!t,!1),r.setState({focused:!0}))},r._onAutofillClick=function(){var e=r.props,t=e.disabled;e.allowFreeform&&!t?r.focus(r.state.isOpen||r._processingTouch):r._onComboBoxClick()},r._onTouchStart=function(){!r._comboBoxWrapper.current||"onpointerdown"in r._comboBoxWrapper||r._handleTouchAndPointerEvent()},r._onPointerDown=function(e){"touch"===e.pointerType&&(r._handleTouchAndPointerEvent(),e.preventDefault(),e.stopImmediatePropagation())},r._warnMutuallyExclusive({defaultSelectedKey:"selectedKey",text:"defaultSelectedKey",selectedKey:"value",dropdownWidth:"useComboBoxAsMenuWidth"}),r._id=t.id||Object(_.a)("ComboBox");var n=r._buildDefaultSelectedKeys(t.defaultSelectedKey,t.selectedKey);r._isScrollIdle=!0,r._processingTouch=!1,r._gotMouseMove=!1,r._processingClearPendingInfo=!1;var a=r._getSelectedIndices(t.options,n);return r.state={isOpen:!1,selectedIndices:a,focused:!1,suggestedDisplayValue:void 0,currentOptions:r.props.options,currentPendingValueValidIndex:-1,currentPendingValue:void 0,currentPendingValueValidIndexOnHover:o.default},r}return Object(s.c)(t,e),Object.defineProperty(t.prototype,"selectedOptions",{get:function(){var e=this.state,t=e.currentOptions,r=e.selectedIndices;return Object(H.a)(t,r)},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this._comboBoxWrapper.current&&(this._events.on(this._comboBoxWrapper.current,"focus",this._onResolveOptions,!0),"onpointerdown"in this._comboBoxWrapper.current&&this._events.on(this._comboBoxWrapper.current,"pointerdown",this._onPointerDown,!0))},t.prototype.UNSAFE_componentWillReceiveProps=function(e){if(e.selectedKey!==this.props.selectedKey||e.text!==this.props.text||e.options!==this.props.options){var t=this._buildSelectedKeys(e.selectedKey),r=this._getSelectedIndices(e.options,t);this.setState({selectedIndices:r,currentOptions:e.options}),null===e.selectedKey&&this.setState({suggestedDisplayValue:void 0})}},t.prototype.componentDidUpdate=function(e,t){var r=this,n=this.props,a=n.allowFreeform,i=n.text,o=n.onMenuOpen,s=n.onMenuDismissed,l=this.state,c=l.isOpen,u=l.focused,d=l.selectedIndices,p=l.currentPendingValueValidIndex;!c||t.isOpen&&t.currentPendingValueValidIndex===p||this._async.setTimeout((function(){return r._scrollIntoView()}),0),u&&(c||t.isOpen&&!c&&this._focusInputAfterClose&&this._autofill.current&&document.activeElement!==this._autofill.current.inputElement)&&this.focus(void 0,!0),this._focusInputAfterClose&&(t.isOpen&&!c||u&&(!c&&!this.props.multiSelect&&t.selectedIndices&&d&&t.selectedIndices[0]!==d[0]||!a||i!==e.text))&&this._select(),this._notifyPendingValueChanged(t),c&&!t.isOpen&&o&&o(),!c&&t.isOpen&&s&&s()},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this._events.off(this._comboBoxWrapper.current)},t.prototype.render=function(){var e=this,t=this._id,r=t+"-error",n=this.props,a=n.className,i=n.label,o=n.disabled,c=n.ariaLabel,u=n.ariaDescribedBy,p=n.required,f=n.errorMessage,m=n.onRenderContainer,g=void 0===m?this._onRenderContainer:m,v=n.onRenderLabel,y=void 0===v?this._onRenderLabel:v,b=n.onRenderList,_=void 0===b?this._onRenderList:b,w=n.onRenderItem,k=void 0===w?this._onRenderItem:w,M=n.onRenderOption,T=void 0===M?this._onRenderOptionContent:M,C=n.allowFreeform,L=n.buttonIconProps,A=n.isButtonAriaHidden,E=void 0===A||A,D=n.styles,I=n.theme,P=n.title,O=n.keytipProps,R=n.placeholder,N=n.tabIndex,B=n.autofill,Y=n.persistMenu,H=n.iconButtonProps,V=n.multiSelect,U=this.state,W=U.isOpen,G=U.focused,q=U.suggestedDisplayValue;this._currentVisibleValue=this._getVisibleValue();var K=V?this._getMultiselectDisplayString(this.state.selectedIndices,this.state.currentOptions,q):void 0,X=Object(d.d)(this.props,d.c,["onChange","value"]),Z=!!(f&&f.length>0),J=G&&this.props.multiSelect&&K?K:R;return this._classNames=this.props.getClassNames?this.props.getClassNames(I,!!W,!!o,!!p,!!G,!!C,!!Z,a):z(F(I,D),a,!!W,!!o,!!p,!!G,!!C,!!Z),l.createElement("div",Object(s.a)({},X,{ref:this._root,className:this._classNames.container}),y({props:this.props,multiselectAccessibleText:K},this._onRenderLabel),l.createElement(j.a,{keytipProps:O,disabled:o},(function(n){return l.createElement("div",{"data-ktp-target":n["data-ktp-target"],ref:e._comboBoxWrapper,id:t+"wrapper",className:e._classNames.root},l.createElement(h,Object(s.a)({"data-ktp-execute-target":n["data-ktp-execute-target"],"data-is-interactable":!o,componentRef:e._autofill,id:t+"-input",className:e._classNames.input,type:"text",onFocus:e._select,onBlur:e._onBlur,onKeyDown:e._onInputKeyDown,onKeyUp:e._onInputKeyUp,onClick:e._onAutofillClick,onTouchStart:e._onTouchStart,onInputValueChange:e._onInputChange,"aria-expanded":W,"aria-autocomplete":e._getAriaAutoCompleteValue(),role:"combobox",readOnly:o||!C,"aria-labelledby":i&&t+"-label","aria-label":c&&!i?c:void 0,"aria-describedby":void 0!==f?Object(x.a)(u,n["aria-describedby"],r):Object(x.a)(u,n["aria-describedby"]),"aria-activedescendant":e._getAriaActiveDescentValue(),"aria-required":p,"aria-disabled":o,"aria-owns":W?t+"-list":void 0,spellCheck:!1,defaultVisibleValue:e._currentVisibleValue,suggestedDisplayValue:q,updateValueInWillReceiveProps:e._onUpdateValueInAutofillWillReceiveProps,shouldSelectFullInputValueInComponentDidUpdate:e._onShouldSelectFullInputValueInAutofillComponentDidUpdate,title:P,preventValueSelection:!G,placeholder:J,tabIndex:N},B)),l.createElement(S.a,Object(s.a)({className:"ms-ComboBox-CaretDown-button",styles:e._getCaretButtonStyles(),role:"presentation","aria-hidden":E,"data-is-focusable":!1,tabIndex:-1,onClick:e._onComboBoxClick,onBlur:e._onBlur,iconProps:L,disabled:o,checked:W},H)))})),(Y||W)&&g(Object(s.a)(Object(s.a)({},this.props),{onRenderList:_,onRenderItem:k,onRenderOption:T,options:this.state.currentOptions.map((function(e,t){return Object(s.a)(Object(s.a)({},e),{index:t})})),onDismiss:this._onDismiss}),this._onRenderContainer),l.createElement("div",{role:"region","aria-live":"polite","aria-atomic":"true",id:r,className:Z?this._classNames.errorMessage:""},void 0!==f?f:""))},t.prototype._getPendingString=function(e,t,r){return null!=e?e:this._indexWithinBounds(t,r)?t[r].text:""},t.prototype._getMultiselectDisplayString=function(e,t,r){for(var n=[],a=0;e&&a<e.length;a++){var i=e[a];n.push(this._indexWithinBounds(t,i)?t[i].text:this._normalizeToString(r))}var o="";for(a=0;a<n.length;a++)a>0&&(o+=", "),o+=n[a];return o},t.prototype._indexWithinBounds=function(e,t){return!!e&&(t>=0&&t<e.length)},t.prototype._processInputChangeWithFreeform=function(e){var t=this,r=this.state.currentOptions,n=-1;if(""===e)return 1===(i=r.map((function(e,t){return Object(s.a)(Object(s.a)({},e),{index:t})})).filter((function(e){return e.itemType!==Y.a.Header&&e.itemType!==Y.a.Divider})).filter((function(r){return t._getPreviewText(r)===e}))).length&&(n=i[0].index),void this._setPendingInfo(e,n,e);var a=e;e=e.toLocaleLowerCase();var i,o="";if("on"===this.props.autoComplete){if((i=r.map((function(e,t){return Object(s.a)(Object(s.a)({},e),{index:t})})).filter((function(e){return e.itemType!==Y.a.Header&&e.itemType!==Y.a.Divider})).filter((function(r){return 0===t._getPreviewText(r).toLocaleLowerCase().indexOf(e)}))).length>0){var l=this._getPreviewText(i[0]);o=l.toLocaleLowerCase()!==e?l:"",n=i[0].index}}else 1===(i=r.map((function(e,t){return Object(s.a)(Object(s.a)({},e),{index:t})})).filter((function(e){return e.itemType!==Y.a.Header&&e.itemType!==Y.a.Divider})).filter((function(r){return t._getPreviewText(r).toLocaleLowerCase()===e}))).length&&(n=i[0].index);this._setPendingInfo(a,n,o)},t.prototype._processInputChangeWithoutFreeform=function(e){var t=this,r=this.state,n=r.currentPendingValue,a=r.currentPendingValueValidIndex,i=r.currentOptions;if("on"===this.props.autoComplete&&""!==e){void 0!==this._lastReadOnlyAutoCompleteChangeTimeoutId&&(this._async.clearTimeout(this._lastReadOnlyAutoCompleteChangeTimeoutId),this._lastReadOnlyAutoCompleteChangeTimeoutId=void 0,e=this._normalizeToString(n)+e);var o=e;e=e.toLocaleLowerCase();var l=i.map((function(e,t){return Object(s.a)(Object(s.a)({},e),{index:t})})).filter((function(e){return e.itemType!==Y.a.Header&&e.itemType!==Y.a.Divider})).filter((function(t){return 0===t.text.toLocaleLowerCase().indexOf(e)}));return l.length>0&&this._setPendingInfo(o,l[0].index,this._getPreviewText(l[0])),void(this._lastReadOnlyAutoCompleteChangeTimeoutId=this._async.setTimeout((function(){t._lastReadOnlyAutoCompleteChangeTimeoutId=void 0}),1e3))}var c=a>=0?a:this._getFirstSelectedIndex();this._setPendingInfoFromIndex(c)},t.prototype._getFirstSelectedIndex=function(){return this.state.selectedIndices&&this.state.selectedIndices.length>0?this.state.selectedIndices[0]:-1},t.prototype._getNextSelectableIndex=function(e,t){var r=this.state.currentOptions,n=e+t;if(n=Math.max(0,Math.min(r.length-1,n)),!this._indexWithinBounds(r,n))return-1;var a=r[n];if(a.itemType===Y.a.Header||a.itemType===Y.a.Divider||!0===a.hidden){if(t===i.none||!(n>0&&t<i.none||n>=0&&n<r.length&&t>i.none))return e;n=this._getNextSelectableIndex(n,t)}return n},t.prototype._setSelectedIndex=function(e,t,r){var n=this;void 0===r&&(r=i.none);var a=this.props,o=a.onChange,l=a.onPendingValueChanged,c=this.state.currentOptions,u=this.state.selectedIndices,d=u?u.slice():[];if(e=this._getNextSelectableIndex(e,r),this._indexWithinBounds(c,e)){if(this.props.multiSelect||d.length<1||1===d.length&&d[0]!==e){var p=Object(s.a)({},c[e]);if(!p||p.disabled)return;if(this.props.multiSelect?(p.selected=void 0!==p.selected?!p.selected:d.indexOf(e)<0,p.selected&&d.indexOf(e)<0?d.push(e):!p.selected&&d.indexOf(e)>=0&&(d=d.filter((function(t){return t!==e})))):d[0]=e,t.persist(),this.props.selectedKey||null===this.props.selectedKey)this._hasPendingValue&&l&&(l(),this._hasPendingValue=!1),o&&o(t,p,e,void 0);else{var h=c.slice();h[e]=p,this.setState({selectedIndices:d,currentOptions:h},(function(){n._hasPendingValue&&l&&(l(),n._hasPendingValue=!1),o&&o(t,p,e,void 0)}))}}this.props.multiSelect&&this.state.isOpen||this._clearPendingInfo()}},t.prototype._submitPendingValue=function(e){var t=this.props,r=t.onChange,n=t.allowFreeform,a=t.autoComplete,i=this.state,o=i.currentPendingValue,s=i.currentPendingValueValidIndex,l=i.currentOptions,c=i.currentPendingValueValidIndexOnHover,u=this.state.selectedIndices;if(!this._processingClearPendingInfo){if(n){if(null==o)return void(c>=0&&(this._setSelectedIndex(c,e),this._clearPendingInfo()));if(this._indexWithinBounds(l,s)){var d=this._getPreviewText(l[s]).toLocaleLowerCase();if(o.toLocaleLowerCase()===d||a&&0===d.indexOf(o.toLocaleLowerCase())&&this._autofill.current&&this._autofill.current.isValueSelected&&o.length+(this._autofill.current.selectionEnd-this._autofill.current.selectionStart)===d.length||this._autofill.current&&this._autofill.current.inputElement&&this._autofill.current.inputElement.value.toLocaleLowerCase()===d){if(this._setSelectedIndex(s,e),this.props.multiSelect&&this.state.isOpen)return;return void this._clearPendingInfo()}}if(r)r&&r(e,void 0,void 0,o);else{var p={key:o||Object(_.a)(),text:this._normalizeToString(o)};this.props.multiSelect&&(p.selected=!0);var h=l.concat([p]);u&&(this.props.multiSelect||(u=[]),u.push(h.length-1)),this.setState({currentOptions:h,selectedIndices:u})}}else s>=0?this._setSelectedIndex(s,e):c>=0&&this._setSelectedIndex(c,e);this._clearPendingInfo()}},t.prototype._onCalloutLayerMounted=function(){this._gotMouseMove=!1},t.prototype._renderSeparator=function(e){var t=e.index,r=e.key;return t&&t>0?l.createElement("div",{role:"separator",key:r,className:this._classNames.divider}):null},t.prototype._renderHeader=function(e){var t=this.props.onRenderOption,r=void 0===t?this._onRenderOptionContent:t;return l.createElement("div",{key:e.key,className:this._classNames.header},r(e,this._onRenderOptionContent))},t.prototype._isOptionSelected=function(e){return this.state.currentPendingValueValidIndexOnHover!==o.clearAll&&this._getPendingSelectedIndex(!0)===e},t.prototype._isOptionChecked=function(e){if(this.props.multiSelect&&void 0!==e&&this.state.selectedIndices){return this.state.selectedIndices.indexOf(e)>=0}return!1},t.prototype._getPendingSelectedIndex=function(e){var t=this.state,r=t.currentPendingValueValidIndexOnHover,n=t.currentPendingValueValidIndex,a=t.currentPendingValue;return r>=0?r:n>=0||e&&null!=a?n:this.props.multiSelect?0:this._getFirstSelectedIndex()},t.prototype._scrollIntoView=function(){var e=this.props,t=e.onScrollToItem,r=e.scrollSelectedToTop,n=this.state,a=n.currentPendingValueValidIndex,i=n.currentPendingValue;if(t)t(a>=0||""!==i?a:this._getFirstSelectedIndex());else if(this._selectedElement.current&&this._selectedElement.current.offsetParent)if(r)this._selectedElement.current.offsetParent.scrollIntoView(!0);else{var o=!0;if(this._comboBoxMenu.current&&this._comboBoxMenu.current.offsetParent){var s=this._comboBoxMenu.current.offsetParent.getBoundingClientRect(),l=this._selectedElement.current.offsetParent.getBoundingClientRect();if(s.top<=l.top&&s.top+s.height>=l.top+l.height)return;s.top+s.height<=l.top+l.height&&(o=!1)}this._selectedElement.current.offsetParent.scrollIntoView(o)}},t.prototype._onItemClick=function(e){var t=this,r=this.props.onItemClick,n=e.index;return function(a){r&&r(a,e,n),t._setSelectedIndex(n,a),t.props.multiSelect||(t._autofill.current&&t._autofill.current.focus(),t.setState({isOpen:!1}))}},t.prototype._getSelectedIndices=function(e,t){if(!e||!t)return[];var r={};e.forEach((function(e,t){e.selected&&(r[t]=!0)}));for(var n=function(t){var n=Object(w.d)(e,(function(e){return e.key===t}));n>-1&&(r[n]=!0)},a=0,i=t;a<i.length;a++){n(i[a])}return Object.keys(r).map(Number).sort()},t.prototype._resetSelectedIndex=function(){var e=this.state.currentOptions;this._clearPendingInfo();var t=this._getFirstSelectedIndex();t>0&&t<e.length?this.setState({suggestedDisplayValue:e[t].text}):this.props.text&&this.setState({suggestedDisplayValue:this.props.text})},t.prototype._clearPendingInfo=function(){this._processingClearPendingInfo=!0,this.setState({currentPendingValue:void 0,currentPendingValueValidIndex:-1,suggestedDisplayValue:void 0,currentPendingValueValidIndexOnHover:o.default},this._onAfterClearPendingInfo)},t.prototype._setPendingInfo=function(e,t,r){void 0===t&&(t=-1),this._processingClearPendingInfo||this.setState({currentPendingValue:this._normalizeToString(e),currentPendingValueValidIndex:t,suggestedDisplayValue:r,currentPendingValueValidIndexOnHover:o.default})},t.prototype._setPendingInfoFromIndex=function(e){var t=this.state.currentOptions;if(e>=0&&e<t.length){var r=t[e];this._setPendingInfo(this._getPreviewText(r),e,this._getPreviewText(r))}else this._clearPendingInfo()},t.prototype._setPendingInfoFromIndexAndDirection=function(e,t){var r=this.state.currentOptions;t===i.forward&&e>=r.length-1?e=-1:t===i.backward&&e<=0&&(e=r.length);var n=this._getNextSelectableIndex(e,t);e===n?t===i.forward?e=this._getNextSelectableIndex(-1,t):t===i.backward&&(e=this._getNextSelectableIndex(r.length,t)):e=n,this._indexWithinBounds(r,e)&&this._setPendingInfoFromIndex(e)},t.prototype._notifyPendingValueChanged=function(e){var t=this.props.onPendingValueChanged;if(t){var r=this.state,n=r.currentPendingValue,a=r.currentOptions,i=r.currentPendingValueValidIndex,o=r.currentPendingValueValidIndexOnHover,s=void 0,l=void 0;o!==e.currentPendingValueValidIndexOnHover&&this._indexWithinBounds(a,o)?s=o:i!==e.currentPendingValueValidIndex&&this._indexWithinBounds(a,i)?s=i:n!==e.currentPendingValue&&(l=n),(void 0!==s||void 0!==l||this._hasPendingValue)&&(t(void 0!==s?a[s]:void 0,s,l),this._hasPendingValue=void 0!==s||void 0!==l)}},t.prototype._setOpenStateAndFocusOnClose=function(e,t){this._focusInputAfterClose=t,this.setState({isOpen:e})},t.prototype._isAltOrMeta=function(e){return e.which===u.a.alt||"Meta"===e.key},t.prototype._onOptionMouseEnter=function(e){this._shouldIgnoreMouseEvent()||this.setState({currentPendingValueValidIndexOnHover:e})},t.prototype._onOptionMouseMove=function(e){this._gotMouseMove=!0,this._isScrollIdle&&this.state.currentPendingValueValidIndexOnHover!==e&&this.setState({currentPendingValueValidIndexOnHover:e})},t.prototype._shouldIgnoreMouseEvent=function(){return!this._isScrollIdle||!this._gotMouseMove},t.prototype._handleInputWhenDisabled=function(e){this.props.disabled&&(this.state.isOpen&&this.setState({isOpen:!1}),null!==e&&e.which!==u.a.tab&&e.which!==u.a.escape&&(e.which<112||e.which>123)&&(e.stopPropagation(),e.preventDefault()))},t.prototype._handleTouchAndPointerEvent=function(){var e=this;void 0!==this._lastTouchTimeoutId&&(this._async.clearTimeout(this._lastTouchTimeoutId),this._lastTouchTimeoutId=void 0),this._processingTouch=!0,this._lastTouchTimeoutId=this._async.setTimeout((function(){e._processingTouch=!1,e._lastTouchTimeoutId=void 0}),500)},t.prototype._getCaretButtonStyles=function(){var e=this.props.caretDownButtonStyles;return R(this.props.theme,e)},t.prototype._getCurrentOptionStyles=function(e){var t=this.props.comboBoxOptionStyles,r=e.styles;return O(this.props.theme,t,r,this._isPendingOption(e),e.hidden)},t.prototype._getAriaActiveDescentValue=function(){var e=this.state.isOpen&&this.state.selectedIndices&&this.state.selectedIndices.length>=0?this._id+"-list"+this.state.selectedIndices[0]:void 0;return this.state.isOpen&&this.state.focused&&-1!==this.state.currentPendingValueValidIndex&&(e=this._id+"-list"+this.state.currentPendingValueValidIndex),e},t.prototype._getAriaAutoCompleteValue=function(){return!this.props.disabled&&"on"===this.props.autoComplete?this.props.allowFreeform?"inline":"both":"none"},t.prototype._isPendingOption=function(e){return e&&e.index===this.state.currentPendingValueValidIndex},t.prototype._buildDefaultSelectedKeys=function(e,t){var r=this._buildSelectedKeys(e);return r.length?r:this._buildSelectedKeys(t)},t.prototype._buildSelectedKeys=function(e){return void 0===e?[]:e instanceof Array?e:[e]},t.prototype._getPreviewText=function(e){return e.useAriaLabelAsText&&e.ariaLabel?e.ariaLabel:e.text},t.prototype._normalizeToString=function(e){return e||""},t.defaultProps={options:[],allowFreeform:!1,autoComplete:"on",buttonIconProps:{iconName:"ChevronDown"}},t=Object(s.b)([Object(k.a)("ComboBox",["theme","styles"],!0)],t)}(p.a)},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(380),s=r(381),l=r(355),c=r(356),u=r(91),d=r(71),p=r(357);var h=r(63),f=r(316),m=r(60),g=Object(l.a)(),v="",y="TextField",b=function(e){function t(t){var r=e.call(this,t)||this;r._textElement=i.createRef(),r._onFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({isFocused:!0},(function(){r.props.validateOnFocusIn&&r._validate(r.value)}))},r._onBlur=function(e){r.props.onBlur&&r.props.onBlur(e),r.setState({isFocused:!1},(function(){r.props.validateOnFocusOut&&r._validate(r.value)}))},r._onRenderLabel=function(e){var t=e.label,n=e.required,a=r._classNames.subComponentStyles?r._classNames.subComponentStyles.label:void 0;return t?i.createElement(o.a,{required:n,htmlFor:r._id,styles:a,disabled:e.disabled,id:r._labelId},e.label):null},r._onRenderDescription=function(e){return e.description?i.createElement("span",{className:r._classNames.description},e.description):null},r._onInputChange=function(e){var t,n=e.target.value;void 0!==n&&n!==r._lastChangeValue&&(r._lastChangeValue=n,e.persist(),r.setState((function(e,a){var i=_(a,e)||"";return(t=n===i)?null:r._isControlled?null:{uncontrolledValue:n}}),(function(){var a=r.props.onChange;!t&&a&&a(e,n)})))},Object(c.a)(r),r._async=new u.a(r),r._fallbackId=Object(d.a)(y),r._descriptionId=Object(d.a)(y+"Description"),r._labelId=Object(d.a)(y+"Label"),r._warnControlledUsage();var n=t.defaultValue,a=void 0===n?v:n;return"number"==typeof a&&(a=String(a)),r.state={uncontrolledValue:r._isControlled?void 0:a,isFocused:!1,errorMessage:""},r._delayedValidate=r._async.debounce(r._validate,r.props.deferredValidationTime),r._lastValidation=0,r}return Object(a.c)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return _(this.props,this.state)},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this._adjustInputHeight(),this.props.validateOnLoad&&this._validate(this.value)},t.prototype.componentWillUnmount=function(){this._async.dispose()},t.prototype.getSnapshotBeforeUpdate=function(e,t){return{selection:[this.selectionStart,this.selectionEnd]}},t.prototype.componentDidUpdate=function(e,t,r){var n=this.props,a=(r||{}).selection,i=void 0===a?[null,null]:a,o=i[0],s=i[1];!!e.multiline!=!!n.multiline&&t.isFocused&&(this.focus(),null!==o&&null!==s&&o>=0&&s>=0&&this.setSelectionRange(o,s));var l=_(e,t),c=this.value;l!==c&&(this._warnControlledUsage(e),this.state.errorMessage&&!n.errorMessage&&this.setState({errorMessage:""}),this._adjustInputHeight(),this._lastChangeValue=void 0,x(n)&&this._delayedValidate(c))},t.prototype.render=function(){var e=this.props,t=e.borderless,r=e.className,n=e.disabled,o=e.iconProps,l=e.inputClassName,c=e.label,u=e.multiline,d=e.required,h=e.underlined,f=e.prefix,m=e.resizable,v=e.suffix,y=e.theme,b=e.styles,_=e.autoAdjustHeight,x=e.onRenderPrefix,w=void 0===x?this._onRenderPrefix:x,k=e.onRenderSuffix,M=void 0===k?this._onRenderSuffix:k,T=e.onRenderLabel,C=void 0===T?this._onRenderLabel:T,S=e.onRenderDescription,L=void 0===S?this._onRenderDescription:S,A=this.state.isFocused,E=this._errorMessage;return this._classNames=g(b,{theme:y,className:r,disabled:n,focused:A,required:d,multiline:u,hasLabel:!!c,hasErrorMessage:!!E,borderless:t,resizable:m,hasIcon:!!o,underlined:h,inputClassName:l,autoAdjustHeight:_}),i.createElement("div",{className:this._classNames.root},i.createElement("div",{className:this._classNames.wrapper},C(this.props,this._onRenderLabel),i.createElement("div",{className:this._classNames.fieldGroup},(void 0!==f||this.props.onRenderPrefix)&&i.createElement("div",{className:this._classNames.prefix},w(this.props,this._onRenderPrefix)),u?this._renderTextArea():this._renderInput(),o&&i.createElement(s.a,Object(a.a)({className:this._classNames.icon},o)),(void 0!==v||this.props.onRenderSuffix)&&i.createElement("div",{className:this._classNames.suffix},M(this.props,this._onRenderSuffix)))),this._isDescriptionAvailable&&i.createElement("span",{id:this._descriptionId},L(this.props,this._onRenderDescription),E&&i.createElement("div",{role:"alert"},i.createElement(p.a,null,i.createElement("p",{className:this._classNames.errorMessage},i.createElement("span",{"data-automation-id":"error-message"},E))))))},t.prototype.focus=function(){this._textElement.current&&this._textElement.current.focus()},t.prototype.blur=function(){this._textElement.current&&this._textElement.current.blur()},t.prototype.select=function(){this._textElement.current&&this._textElement.current.select()},t.prototype.setSelectionStart=function(e){this._textElement.current&&(this._textElement.current.selectionStart=e)},t.prototype.setSelectionEnd=function(e){this._textElement.current&&(this._textElement.current.selectionEnd=e)},Object.defineProperty(t.prototype,"selectionStart",{get:function(){return this._textElement.current?this._textElement.current.selectionStart:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectionEnd",{get:function(){return this._textElement.current?this._textElement.current.selectionEnd:-1},enumerable:!0,configurable:!0}),t.prototype.setSelectionRange=function(e,t){this._textElement.current&&this._textElement.current.setSelectionRange(e,t)},t.prototype._warnControlledUsage=function(e){this._id,this.props,null!==this.props.value||this._hasWarnedNullValue||(this._hasWarnedNullValue=!0,Object(h.a)("Warning: 'value' prop on '"+y+"' should not be null. Consider using an empty string to clear the component or undefined to indicate an uncontrolled component."))},Object.defineProperty(t.prototype,"_id",{get:function(){return this.props.id||this._fallbackId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isControlled",{get:function(){return Object(f.a)(this.props,"value")},enumerable:!0,configurable:!0}),t.prototype._onRenderPrefix=function(e){var t=e.prefix;return i.createElement("span",{style:{paddingBottom:"1px"}},t)},t.prototype._onRenderSuffix=function(e){var t=e.suffix;return i.createElement("span",{style:{paddingBottom:"1px"}},t)},Object.defineProperty(t.prototype,"_errorMessage",{get:function(){var e=this.props.errorMessage;return(void 0===e?this.state.errorMessage:e)||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isDescriptionAvailable",{get:function(){var e=this.props;return!!(e.onRenderDescription||e.description||this._errorMessage)},enumerable:!0,configurable:!0}),t.prototype._renderTextArea=function(){var e=Object(m.d)(this.props,m.h,["defaultValue"]),t=this.props["aria-labelledby"]||(this.props.label?this._labelId:void 0);return i.createElement("textarea",Object(a.a)({id:this._id},e,{ref:this._textElement,value:this.value||"",onInput:this._onInputChange,onChange:this._onInputChange,className:this._classNames.field,"aria-labelledby":t,"aria-describedby":this._isDescriptionAvailable?this._descriptionId:this.props["aria-describedby"],"aria-invalid":!!this._errorMessage,"aria-label":this.props.ariaLabel,readOnly:this.props.readOnly,onFocus:this._onFocus,onBlur:this._onBlur}))},t.prototype._renderInput=function(){var e=Object(m.d)(this.props,m.g,["defaultValue"]),t=this.props["aria-labelledby"]||(this.props.label?this._labelId:void 0);return i.createElement("input",Object(a.a)({type:"text",id:this._id,"aria-labelledby":t},e,{ref:this._textElement,value:this.value||"",onInput:this._onInputChange,onChange:this._onInputChange,className:this._classNames.field,"aria-label":this.props.ariaLabel,"aria-describedby":this._isDescriptionAvailable?this._descriptionId:this.props["aria-describedby"],"aria-invalid":!!this._errorMessage,readOnly:this.props.readOnly,onFocus:this._onFocus,onBlur:this._onBlur}))},t.prototype._validate=function(e){var t=this;if(this._latestValidateValue!==e||!x(this.props)){this._latestValidateValue=e;var r=this.props.onGetErrorMessage,n=r&&r(e||"");if(void 0!==n)if("string"!=typeof n&&"then"in n){var a=++this._lastValidation;n.then((function(r){a===t._lastValidation&&t.setState({errorMessage:r}),t._notifyAfterValidate(e,r)}))}else this.setState({errorMessage:n}),this._notifyAfterValidate(e,n);else this._notifyAfterValidate(e,"")}},t.prototype._notifyAfterValidate=function(e,t){e===this.value&&this.props.onNotifyValidationResult&&this.props.onNotifyValidationResult(t,e)},t.prototype._adjustInputHeight=function(){if(this._textElement.current&&this.props.autoAdjustHeight&&this.props.multiline){var e=this._textElement.current;e.style.height="",e.style.height=e.scrollHeight+"px"}},t.defaultProps={resizable:!0,deferredValidationTime:200,validateOnLoad:!0},t}(i.Component);function _(e,t){var r=e.value,n=void 0===r?t.uncontrolledValue:r;return"number"==typeof n?String(n):n}function x(e){return!(e.validateOnFocusIn||e.validateOnFocusOut)}var w=r(9),k={root:"ms-TextField",description:"ms-TextField-description",errorMessage:"ms-TextField-errorMessage",field:"ms-TextField-field",fieldGroup:"ms-TextField-fieldGroup",prefix:"ms-TextField-prefix",suffix:"ms-TextField-suffix",wrapper:"ms-TextField-wrapper",multiline:"ms-TextField--multiline",borderless:"ms-TextField--borderless",underlined:"ms-TextField--underlined",unresizable:"ms-TextField--unresizable",required:"is-required",disabled:"is-disabled",active:"is-active"};function M(e){var t=e.underlined,r=e.disabled,n=e.focused,a=e.theme,i=a.palette,o=a.fonts;return function(){var e;return{root:[t&&r&&{color:i.neutralTertiary},t&&{fontSize:o.medium.fontSize,marginRight:8,paddingLeft:12,paddingRight:0,lineHeight:"22px",height:32},t&&n&&{selectors:(e={},e[w.f]={height:31},e)}]}}}r.d(t,"a",(function(){return T}));var T=Object(n.a)(b,(function(e){var t,r,n,a,i,o,s,l=e.theme,c=e.className,u=e.disabled,d=e.focused,p=e.required,h=e.multiline,f=e.hasLabel,m=e.borderless,g=e.underlined,v=e.hasIcon,y=e.resizable,b=e.hasErrorMessage,_=e.inputClassName,x=e.autoAdjustHeight,T=l.semanticColors,C=l.effects,S=l.fonts,L=Object(w.v)(k,l),A={background:T.disabledBackground,color:u?T.disabledText:T.inputPlaceholderText,display:"flex",alignItems:"center",padding:"0 10px",lineHeight:1,whiteSpace:"nowrap",flexShrink:0},E=[S.medium,{color:T.inputPlaceholderText,opacity:1}],D={color:T.disabledText};return{root:[L.root,S.medium,p&&L.required,u&&L.disabled,d&&L.active,h&&L.multiline,m&&L.borderless,g&&L.underlined,w.G,{position:"relative"},c],wrapper:[L.wrapper,g&&[{display:"flex",borderBottom:"1px solid "+(b?T.errorText:T.inputBorder),width:"100%"},u&&{borderBottomColor:T.disabledBackground,selectors:(t={},t[w.f]={borderColor:"GrayText"},t)},!u&&{selectors:{":hover":{borderBottomColor:b?T.errorText:T.inputBorderHovered,selectors:(r={},r[w.f]={borderBottomColor:"Highlight"},r)}}},d&&[{position:"relative"},Object(w.x)(b?T.errorText:T.inputFocusBorderAlt,0,"borderBottom")]]],fieldGroup:[L.fieldGroup,w.G,{border:"1px solid "+T.inputBorder,borderRadius:C.roundedCorner2,background:T.inputBackground,cursor:"text",height:32,display:"flex",flexDirection:"row",alignItems:"stretch",position:"relative"},h&&{minHeight:"60px",height:"auto",display:"flex"},!d&&!u&&{selectors:{":hover":{borderColor:T.inputBorderHovered,selectors:(n={},n[w.f]={borderColor:"Highlight"},n)}}},d&&!g&&Object(w.x)(b?T.errorText:T.inputFocusBorderAlt,C.roundedCorner2),u&&{borderColor:T.disabledBackground,selectors:(a={},a[w.f]={borderColor:"GrayText"},a),cursor:"default"},m&&{border:"none"},m&&d&&{border:"none",selectors:{":after":{border:"none"}}},g&&{flex:"1 1 0px",border:"none",textAlign:"left"},g&&u&&{backgroundColor:"transparent"},b&&!g&&{borderColor:T.errorText,selectors:{"&:hover":{borderColor:T.errorText}}},!f&&p&&{selectors:(i={":before":{content:"'*'",color:T.errorText,position:"absolute",top:-5,right:-10}},i[w.f]={selectors:{":before":{right:-14}}},i)}],field:[S.medium,L.field,w.G,{borderRadius:0,border:"none",background:"none",backgroundColor:"transparent",color:T.inputText,padding:"0 8px",width:"100%",minWidth:0,textOverflow:"ellipsis",outline:0,selectors:{"&:active, &:focus, &:hover":{outline:0},"::-ms-clear":{display:"none"}}},Object(w.y)(E),h&&!y&&[L.unresizable,{resize:"none"}],h&&{minHeight:"inherit",lineHeight:17,flexGrow:1,paddingTop:6,paddingBottom:6,overflow:"auto",width:"100%"},h&&x&&{overflow:"hidden"},v&&{paddingRight:24},h&&v&&{paddingRight:40},u&&[{backgroundColor:T.disabledBackground,color:T.disabledText,borderColor:T.disabledBackground},Object(w.y)(D)],g&&{textAlign:"left"},d&&!m&&{selectors:(o={},o[w.f]={paddingLeft:11,paddingRight:11},o)},d&&h&&!m&&{selectors:(s={},s[w.f]={paddingTop:4},s)},_],icon:[h&&{paddingRight:24,alignItems:"flex-end"},{pointerEvents:"none",position:"absolute",bottom:6,right:8,top:"auto",fontSize:w.i.medium,lineHeight:18},u&&{color:T.disabledText}],description:[L.description,{color:T.bodySubtext,fontSize:S.xSmall.fontSize}],errorMessage:[L.errorMessage,w.a.slideDownIn20,S.small,{color:T.errorText,margin:0,paddingTop:5,display:"flex",alignItems:"center"}],prefix:[L.prefix,A],suffix:[L.suffix,A],subComponentStyles:{label:M(e)}}}),void 0,{scope:"TextField"})},function(e,t,r){"use strict";var n,a=r(2),i=r(0),o=r(365),s=r(79),l=r(364),c=r(71),u="ktp",d="-",p="ktp-layer-id";!function(e){e.KEYTIP_ADDED="keytipAdded",e.KEYTIP_REMOVED="keytipRemoved",e.KEYTIP_UPDATED="keytipUpdated",e.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",e.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",e.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",e.ENTER_KEYTIP_MODE="enterKeytipMode",e.EXIT_KEYTIP_MODE="exitKeytipMode"}(n||(n={}));var h=function(){function e(){this.keytips=[],this.persistedKeytips=[],this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0}return e.getInstance=function(){return this._instance},e.prototype.register=function(e,t){void 0===t&&(t=!1);var r=e;t||(r=this.addParentOverflow(e));var a=this._getUniqueKtp(r);t?this.persistedKeytips.push(a):this.keytips.push(a);var i=t?n.PERSISTED_KEYTIP_ADDED:n.KEYTIP_ADDED;return s.a.raise(this,i,{keytip:r,uniqueID:a.uniqueID}),a.uniqueID},e.prototype.update=function(e,t){var r=this.addParentOverflow(e),a=this._getUniqueKtp(r,t),i=Object(l.d)(this.keytips,(function(e){return e.uniqueID===t}));i>=0&&(a.keytip.visible=this.keytips[i].keytip.visible,this.keytips=Object(l.e)(this.keytips,a,i),s.a.raise(this,n.KEYTIP_UPDATED,{keytip:a.keytip,uniqueID:a.uniqueID}))},e.prototype.unregister=function(e,t,r){void 0===r&&(r=!1),r?this.persistedKeytips=this.persistedKeytips.filter((function(e){return e.uniqueID!==t})):this.keytips=this.keytips.filter((function(e){return e.uniqueID!==t}));var a=r?n.PERSISTED_KEYTIP_REMOVED:n.KEYTIP_REMOVED;s.a.raise(this,a,{keytip:e,uniqueID:t})},e.prototype.enterKeytipMode=function(){s.a.raise(this,n.ENTER_KEYTIP_MODE)},e.prototype.exitKeytipMode=function(){s.a.raise(this,n.EXIT_KEYTIP_MODE)},e.prototype.getKeytips=function(){return this.keytips.map((function(e){return e.keytip}))},e.prototype.addParentOverflow=function(e){var t=Object(a.e)(e.keySequences);if(t.pop(),0!==t.length){var r=Object(l.c)(this.getKeytips(),(function(e){return Object(l.b)(t,e.keySequences)}));if(r&&r.overflowSetSequence)return Object(a.a)(Object(a.a)({},e),{overflowSetSequence:r.overflowSetSequence})}return e},e.prototype.menuExecute=function(e,t){s.a.raise(this,n.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:e,keytipSequences:t})},e.prototype._getUniqueKtp=function(e,t){return void 0===t&&(t=Object(c.a)()),{keytip:Object(a.a)({},e),uniqueID:t}},e._instance=new e,e}();function f(e){return e.reduce((function(e,t){return e+d+t.split("").join(d)}),u)}r.d(t,"a",(function(){return m}));var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._keytipManager=h.getInstance(),t}return Object(a.c)(t,e),t.prototype.componentDidMount=function(){this.props.keytipProps&&(this._uniqueId=this._keytipManager.register(this._getKtpProps()))},t.prototype.componentWillUnmount=function(){this.props.keytipProps&&this._keytipManager.unregister(this._getKtpProps(),this._uniqueId)},t.prototype.componentDidUpdate=function(e){e.keytipProps===this.props.keytipProps&&e.disabled===this.props.disabled||this.props.keytipProps&&this._keytipManager.update(this._getKtpProps(),this._uniqueId)},t.prototype.render=function(){var e=this.props,t=e.children,r=e.keytipProps,n=e.ariaDescribedBy,a={};return r&&(a=this._getKtpAttrs(r,n)),t(a)},t.prototype._getKtpProps=function(){return Object(a.a)({disabled:this.props.disabled},this.props.keytipProps)},t.prototype._getKtpAttrs=function(e,t){if(e){var r=this._keytipManager.addParentOverflow(e),n=function(e){var t=" "+p;return e.length?t+" "+f(e):t}(r.keySequences),i=Object(a.e)(r.keySequences);r.overflowSetSequence&&(i=function(e,t){var r=t.length,n=Object(a.e)(t).pop(),i=Object(a.e)(e);return Object(l.a)(i,r-1,n)}(i,r.overflowSetSequence));var s=f(i);return{"aria-describedby":Object(o.a)(t,n),"data-ktp-target":s,"data-ktp-execute-target":s}}},t}(i.Component)},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(386),o=r(380),s=r(381);function l(e,t,r){void 0===r&&(r=10);var n=Math.pow(r,t);return Math.round(e*n)/n}var c=r(26),u=r(356),d=r(271),p=r(273),h=r(91),f=r(71),m=r(60),g=r(365),v=r(339),y=r(13),b=r(9),_=r(46),x=Object(_.b)((function(e){var t,r=e.semanticColors,n=r.disabledText,a=r.disabledBackground;return{backgroundColor:a,borderColor:a,pointerEvents:"none",cursor:"default",color:n,selectors:(t={},t[b.f]={color:"GrayText"},t)}})),w=Object(_.b)((function(e,t,r){var n,a,i,o=e.palette,s=e.semanticColors,l=e.effects,c=o.neutralSecondary,u=s.buttonText,d=s.buttonText,p=s.buttonBackgroundHovered,h=s.buttonBackgroundPressed,f={root:{outline:"none",display:"block",height:"50%",width:23,padding:0,backgroundColor:"transparent",textAlign:"center",cursor:"default",color:c,selectors:{"&.ms-DownButton":{borderRadius:"0 0 "+l.roundedCorner2+" 0"},"&.ms-UpButton":{borderRadius:"0 "+l.roundedCorner2+" 0 0"}}},rootHovered:{backgroundColor:p,color:u},rootChecked:{backgroundColor:h,color:d,selectors:(n={},n[b.f]={backgroundColor:"Highlight",color:"HighlightText"},n)},rootPressed:{backgroundColor:h,color:d,selectors:(a={},a[b.f]={backgroundColor:"Highlight",color:"HighlightText"},a)},rootDisabled:{opacity:.5,selectors:(i={},i[b.f]={color:"GrayText",opacity:1},i)},icon:{fontSize:8,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}};return Object(b.r)(f,{},r)})),k=Object(_.b)((function(e,t){var r,n,a,i=e.palette,o=e.semanticColors,s=e.effects,l=e.fonts,c=o.inputBorder,u=o.inputBackground,d=o.inputBorderHovered,p=o.inputFocusBorderAlt,h=o.inputText,f=i.white,m=o.inputBackgroundChecked,g=o.disabledText,v={root:{outline:"none",fontSize:l.medium.fontSize,width:"100%",minWidth:86},labelWrapper:{display:"inline-flex",alignItems:"center"},labelWrapperStart:{height:32,float:"left",marginRight:10},labelWrapperEnd:{height:32,float:"right",marginLeft:10},labelWrapperTop:{marginBottom:-1},labelWrapperBottom:{},icon:{padding:"0 5px",fontSize:b.i.large},iconDisabled:{color:g},label:{pointerEvents:"none",lineHeight:b.i.large},labelDisabled:{},spinButtonWrapper:{display:"flex",position:"relative",boxSizing:"border-box",height:32,minWidth:86,border:"1px solid "+c,borderRadius:s.roundedCorner2},spinButtonWrapperTopBottom:{width:"100%"},spinButtonWrapperHovered:{borderColor:d,selectors:(r={},r[b.f]={borderColor:"Highlight"},r)},spinButtonWrapperFocused:{selectors:(n={},n[b.f]={borderColor:"Highlight"},n[":after"]={pointerEvents:"none",content:"''",position:"absolute",left:-1,top:-1,bottom:-1,right:-1,border:"2px solid "+p,borderRadius:s.roundedCorner2},n)},spinButtonWrapperDisabled:x(e),input:{boxSizing:"border-box",boxShadow:"none",borderStyle:"none",flex:1,margin:0,fontSize:l.medium.fontSize,color:h,backgroundColor:u,height:"100%",padding:"0 8px",outline:0,display:"block",minWidth:61,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",cursor:"text",userSelect:"text",borderRadius:s.roundedCorner2+" 0 0 "+s.roundedCorner2},inputTextSelected:{backgroundColor:m,color:f,selectors:(a={},a[b.f]={backgroundColor:"Highlight",borderColor:"Highlight",color:"HighlightText"},a)},inputDisabled:x(e),arrowButtonsContainer:{display:"block",height:"100%",cursor:"default"},arrowButtonsContainerDisabled:x(e)};return Object(b.r)(v,t)})),M=Object(_.b)((function(e,t,r,n,a,i){return void 0===a&&(a=y.a.start),void 0===i&&(i=void 0),{root:Object(b.F)(e.root,i),labelWrapper:Object(b.F)(e.labelWrapper,T(a,e)),icon:Object(b.F)(e.icon,t&&e.iconDisabled),label:Object(b.F)(e.label),spinButtonWrapper:Object(b.F)(e.spinButtonWrapper,C(a,e),!t&&[{selectors:{":hover":e.spinButtonWrapperHovered}},r&&{selectors:{"&&":e.spinButtonWrapperFocused}}],t&&e.spinButtonWrapperDisabled),input:Object(b.F)("ms-spinButton-input",e.input,!t&&{selectors:{"::selection":e.inputTextSelected}},t&&e.inputDisabled),arrowBox:Object(b.F)(e.arrowButtonsContainer,t&&e.arrowButtonsContainerDisabled)}}));function T(e,t){switch(e){case y.a.start:return t.labelWrapperStart;case y.a.end:return t.labelWrapperEnd;case y.a.top:return t.labelWrapperTop;case y.a.bottom:return t.labelWrapperBottom}}function C(e,t){switch(e){case y.a.top:case y.a.bottom:return t.spinButtonWrapperTopBottom;default:return{}}}var S,L=r(376);r.d(t,"a",(function(){return A})),function(e){e[e.down=-1]="down",e[e.notSpinning=0]="notSpinning",e[e.up=1]="up"}(S||(S={}));var A=function(e){function t(t){var r=e.call(this,t)||this;r._input=a.createRef(),r._initialStepDelay=400,r._stepDelay=75,r._onFocus=function(e){r._input.current&&((r._spinningByMouse||r.state.keyboardSpinDirection!==S.notSpinning)&&r._stop(),r._input.current.select(),r.setState({isFocused:!0}),r.props.onFocus&&r.props.onFocus(e))},r._onBlur=function(e){r._validate(e),r.setState({isFocused:!1}),r.props.onBlur&&r.props.onBlur(e)},r._onValidate=function(e,t){return r.props.onValidate?r.props.onValidate(e,t):r._defaultOnValidate(e)},r._calculatePrecision=function(e){var t=e.precision;return void 0===t?Math.max(function(e){var t=/[1-9]([0]+$)|\.([0-9]*)/.exec(String(e));return t?t[1]?-t[1].length:t[2]?t[2].length:0:0}(e.step),0):t},r._defaultOnValidate=function(e){if(null===e||0===e.trim().length||isNaN(Number(e)))return r._lastValidValue;var t=Math.min(r.props.max,Math.max(r.props.min,Number(e)));return String(t)},r._onIncrement=function(e){return r.props.onIncrement?r.props.onIncrement(e):r._defaultOnIncrement(e)},r._defaultOnIncrement=function(e){var t=r.props,n=t.max,a=t.step,i=Math.min(Number(e)+Number(a),n);return i=l(i,r._precision),String(i)},r._onDecrement=function(e){return r.props.onDecrement?r.props.onDecrement(e):r._defaultOnDecrement(e)},r._defaultOnDecrement=function(e){var t=r.props,n=t.min,a=t.step,i=Math.max(Number(e)-Number(a),n);return i=l(i,r._precision),String(i)},r._validate=function(e){if(void 0!==r.state.value&&void 0!==r._valueToValidate&&r._valueToValidate!==r._lastValidValue){var t=r._onValidate(r._valueToValidate,e);t&&(r._lastValidValue=t,r._valueToValidate=void 0,r.setState({value:t}))}},r._onInputChange=function(e){var t=e.target.value;r._valueToValidate=t,r.setState({value:t})},r._updateValue=function(e,t,n){var a=n(r.state.value);a&&(r._lastValidValue=a,r.setState({value:a})),r._spinningByMouse!==e&&(r._spinningByMouse=e),e&&(r._currentStepFunctionHandle=r._async.setTimeout((function(){r._updateValue(e,r._stepDelay,n)}),t))},r._stop=function(){r._currentStepFunctionHandle>=0&&(r._async.clearTimeout(r._currentStepFunctionHandle),r._currentStepFunctionHandle=-1),(r._spinningByMouse||r.state.keyboardSpinDirection!==S.notSpinning)&&(r._spinningByMouse=!1,r.setState({keyboardSpinDirection:S.notSpinning}))},r._handleKeyDown=function(e){if(e.which!==c.a.up&&e.which!==c.a.down&&e.which!==c.a.enter||(e.preventDefault(),e.stopPropagation()),r.props.disabled)r._stop();else{var t=S.notSpinning;switch(e.which){case c.a.up:t=S.up,r._updateValue(!1,r._initialStepDelay,r._onIncrement);break;case c.a.down:t=S.down,r._updateValue(!1,r._initialStepDelay,r._onDecrement);break;case c.a.enter:case c.a.tab:r._validate(e);break;case c.a.escape:r.state.value!==r._lastValidValue&&r.setState({value:r._lastValidValue})}r.state.keyboardSpinDirection!==t&&r.setState({keyboardSpinDirection:t})}},r._handleKeyUp=function(e){(r.props.disabled||e.which===c.a.up||e.which===c.a.down)&&r._stop()},r._onIncrementMouseDown=function(){r._updateValue(!0,r._initialStepDelay,r._onIncrement)},r._onDecrementMouseDown=function(){r._updateValue(!0,r._initialStepDelay,r._onDecrement)},Object(u.a)(r),Object(d.a)(),Object(p.a)("SpinButton",t,{value:"defaultValue"});var n=t.value||t.defaultValue||String(t.min)||"0";return r._lastValidValue=n,r._precision=r._calculatePrecision(r.props),r.state={isFocused:!1,value:n,keyboardSpinDirection:S.notSpinning},r._async=new h.a(r),r._currentStepFunctionHandle=-1,r._labelId=Object(f.a)("Label"),r._inputId=Object(f.a)("input"),r._spinningByMouse=!1,r._valueToValidate=void 0,r}return Object(n.c)(t,e),t.prototype.componentWillUnmount=function(){this._async.dispose()},t.prototype.UNSAFE_componentWillReceiveProps=function(e){this._lastValidValue=this.state.value;var t=void 0!==e.value?e.value:String(e.min);e.defaultValue&&(t=String(Math.max(e.min,Math.min(e.max,Number(e.defaultValue))))),void 0!==e.value&&this.setState({value:t}),this._precision=this._calculatePrecision(e)},t.prototype.render=function(){var e=this,t=this.props,r=t.disabled,l=t.label,c=t.min,u=t.max,d=t.labelPosition,p=t.iconProps,h=t.incrementButtonIcon,f=t.incrementButtonAriaLabel,v=t.decrementButtonIcon,b=t.decrementButtonAriaLabel,_=t.ariaLabel,x=t.ariaDescribedBy,T=t.styles,C=t.upArrowButtonStyles,A=t.downArrowButtonStyles,E=t.theme,D=t.ariaPositionInSet,I=t.ariaSetSize,P=t.ariaValueNow,O=t.ariaValueText,R=t.keytipProps,F=t.className,z=t.inputProps,N=t.iconButtonProps,j=this.state,B=j.isFocused,Y=j.value,H=j.keyboardSpinDirection,V=this.props.getClassNames?this.props.getClassNames(E,r,B,H,d,F):M(k(E,T),r,B,H,d,F),U=Object(m.d)(this.props,m.c,["onBlur","onFocus","className"]);return a.createElement("div",{className:V.root},d!==y.a.bottom&&(p||l)&&a.createElement("div",{className:V.labelWrapper},p&&a.createElement(s.a,Object(n.a)({},p,{className:V.icon,"aria-hidden":"true"})),l&&a.createElement(o.a,{id:this._labelId,htmlFor:this._inputId,className:V.label,disabled:r},l)),a.createElement(L.a,{keytipProps:R,disabled:r},(function(t){return a.createElement("div",Object(n.a)({},U,{className:V.spinButtonWrapper,"aria-label":_&&_,"aria-posinset":D,"aria-setsize":I,"data-ktp-target":t["data-ktp-target"]}),a.createElement("input",Object(n.a)({value:Y,id:e._inputId,onChange:e._onChange,onInput:e._onInputChange,className:V.input,type:"text",autoComplete:"off",role:"spinbutton","aria-labelledby":l&&e._labelId,"aria-valuenow":isNaN(Number(P))?isNaN(Number(Y))?void 0:Number(Y):P,"aria-valuetext":O||(isNaN(Number(Y))?Y:void 0),"aria-valuemin":c,"aria-valuemax":u,"aria-describedby":Object(g.a)(x,t["aria-describedby"]),onBlur:e._onBlur,ref:e._input,onFocus:e._onFocus,onKeyDown:e._handleKeyDown,onKeyUp:e._handleKeyUp,disabled:r,"aria-disabled":r,"data-lpignore":!0,"data-ktp-execute-target":t["data-ktp-execute-target"]},z)),a.createElement("span",{className:V.arrowBox},a.createElement(i.a,Object(n.a)({styles:w(E,!0,C),className:"ms-UpButton",checked:H===S.up,disabled:r,iconProps:h,onMouseDown:e._onIncrementMouseDown,onMouseLeave:e._stop,onMouseUp:e._stop,tabIndex:-1,ariaLabel:f,"data-is-focusable":!1},N)),a.createElement(i.a,Object(n.a)({styles:w(E,!1,A),className:"ms-DownButton",checked:H===S.down,disabled:r,iconProps:v,onMouseDown:e._onDecrementMouseDown,onMouseLeave:e._stop,onMouseUp:e._stop,tabIndex:-1,ariaLabel:b,"data-is-focusable":!1},N))))})),d===y.a.bottom&&(p||l)&&a.createElement("div",{className:V.labelWrapper},p&&a.createElement(s.a,{iconName:p.iconName,className:V.icon,"aria-hidden":"true"}),l&&a.createElement(o.a,{id:this._labelId,htmlFor:this._inputId,className:V.label,disabled:r},l)))},t.prototype.focus=function(){this._input.current&&this._input.current.focus()},Object.defineProperty(t.prototype,"value",{get:function(){return void 0===this.props.value?this.state.value:this.props.value},enumerable:!0,configurable:!0}),t.prototype._onChange=function(){},t.defaultProps={step:1,min:0,max:100,disabled:!1,labelPosition:y.a.start,label:"",incrementButtonIcon:{iconName:"ChevronUpSmall"},decrementButtonIcon:{iconName:"ChevronDownSmall"}},t=Object(n.b)([Object(v.a)("SpinButton",["theme","styles"],!0)],t)}(a.Component)},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(49),o=r(95),s=r(339),l=r(9),c=r(46),u=r(48),d=Object(c.b)((function(e,t){var r,n=Object(u.a)(e),a={root:{padding:"0 4px",height:"40px",color:e.palette.neutralPrimary,backgroundColor:"transparent",border:"1px solid transparent"},rootHovered:{color:e.palette.themePrimary,selectors:(r={},r[l.f]={borderColor:"Highlight",color:"Highlight"},r)},iconHovered:{color:e.palette.themePrimary},rootPressed:{color:e.palette.black},rootExpanded:{color:e.palette.themePrimary},iconPressed:{color:e.palette.themeDarker},rootDisabled:{color:e.palette.neutralTertiary,backgroundColor:"transparent",borderColor:"transparent"},rootChecked:{color:e.palette.black},iconChecked:{color:e.palette.themeDarker},flexContainer:{justifyContent:"flex-start"},icon:{color:e.palette.themeDarkAlt},iconDisabled:{color:"inherit"},menuIcon:{color:e.palette.neutralSecondary},textContainer:{flexGrow:0}};return Object(l.r)(n,a,t)})),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._skipComponentRefResolution=!0,t}return Object(n.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.styles,r=e.theme;return a.createElement(i.a,Object(n.a)({},this.props,{variantClassName:"ms-Button--action ms-Button--command",styles:d(r,t),onRenderDescription:o.b}))},t=Object(n.b)([Object(s.a)("ActionButton",["theme","styles"],!0)],t)}(o.a);r.d(t,"a",(function(){return h}));var h=p},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(355),s=r(71),l=r(60),c=r(63),u=r(26),d=r(378),p=r(388),h=r(35),f=r(274),m=r(80),g=r(381),v=Object(o.a)(),y="Pivot",b=function(e){function t(t){var r=e.call(this,t)||this;r._focusZone=i.createRef(),r._renderPivotLink=function(e,t,n){var o,s=t.itemKey,l=t.headerButtonProps,c=e.keyToTabIdMapping[s],u=t.onRenderItemLink,p=n===s;o=u?u(t,r._renderLinkContent):r._renderLinkContent(t);var h=t.headerText||"";return h+=t.itemCount?" ("+t.itemCount+")":"",h+=t.itemIcon?" xx":"",i.createElement(d.a,Object(a.a)({},l,{id:c,key:s,className:p?r._classNames.linkIsSelected:r._classNames.link,onClick:r._onLinkClick.bind(r,s),onKeyPress:r._onKeyPress.bind(r,s),ariaLabel:t.ariaLabel,role:"tab","aria-selected":p,name:t.headerText,keytipProps:t.keytipProps,"data-content":h}),o)},r._renderLinkContent=function(e){var t=e.itemCount,n=e.itemIcon,a=e.headerText,o=r._classNames;return i.createElement("span",{className:o.linkContent},void 0!==n&&i.createElement("span",{className:o.icon},i.createElement(g.a,{iconName:n})),void 0!==a&&i.createElement("span",{className:o.text}," ",e.headerText),void 0!==t&&i.createElement("span",{className:o.count}," (",t,")"))},r._pivotId=Object(s.a)(y);var n,o=r._getPivotLinks(t).links,l=t.defaultSelectedKey,c=void 0===l?t.initialSelectedKey:l,u=t.defaultSelectedIndex,p=void 0===u?t.initialSelectedIndex:u;return c?n=c:"number"==typeof p?n=o[p].itemKey:o.length&&(n=o[0].itemKey),r.state={selectedKey:n},r}return Object(a.c)(t,e),t.prototype.focus=function(){this._focusZone.current&&this._focusZone.current.focus()},t.prototype.render=function(){var e=this._getPivotLinks(this.props),t=this._getSelectedKey(e),r=Object(l.d)(this.props,l.c);return this._classNames=this._getClassNames(this.props),i.createElement("div",Object(a.a)({role:"toolbar"},r),this._renderPivotLinks(e,t),t&&this._renderPivotItem(e,t))},t.prototype._getSelectedKey=function(e){var t=this.props.selectedKey;if(this._isKeyValid(e,t)||null===t)return t;var r=this.state.selectedKey;return this._isKeyValid(e,r)?r:e.links.length?e.links[0].itemKey:void 0},t.prototype._renderPivotLinks=function(e,t){var r=this,n=e.links.map((function(n){return r._renderPivotLink(e,n,t)}));return i.createElement(p.a,{componentRef:this._focusZone,direction:h.a.horizontal},i.createElement("div",{className:this._classNames.root,role:"tablist"},n))},t.prototype._renderPivotItem=function(e,t){if(this.props.headersOnly||!t)return null;var r=e.keyToIndexMapping[t],n=e.keyToTabIdMapping[t];return i.createElement("div",{role:"tabpanel","aria-labelledby":n,className:this._classNames.itemContainer},i.Children.toArray(this.props.children)[r])},t.prototype._getPivotLinks=function(e){var t=this,r={links:[],keyToIndexMapping:{},keyToTabIdMapping:{}};return i.Children.map(i.Children.toArray(e.children),(function(e,n){if(_(e)){var i=e,o=i.props,s=o.linkText,l=Object(a.d)(o,["linkText"]),u=i.props.itemKey||n.toString();r.links.push(Object(a.a)(Object(a.a)({headerText:s},l),{itemKey:u})),r.keyToIndexMapping[u]=n,r.keyToTabIdMapping[u]=t._getTabId(u,n)}else Object(c.a)("The children of a Pivot component must be of type PivotItem to be rendered.")})),r},t.prototype._getTabId=function(e,t){return this.props.getTabId?this.props.getTabId(e,t):this._pivotId+"-Tab"+t},t.prototype._isKeyValid=function(e,t){return null!=t&&void 0!==e.keyToIndexMapping[t]},t.prototype._onLinkClick=function(e,t){t.preventDefault(),this._updateSelectedItem(e,t)},t.prototype._onKeyPress=function(e,t){t.which===u.a.enter&&(t.preventDefault(),this._updateSelectedItem(e))},t.prototype._updateSelectedItem=function(e,t){this.setState({selectedKey:e});var r=this._getPivotLinks(this.props);if(this.props.onLinkClick&&r.keyToIndexMapping[e]>=0){var n=r.keyToIndexMapping[e],a=i.Children.toArray(this.props.children)[n];_(a)&&this.props.onLinkClick(a,t)}},t.prototype._getClassNames=function(e){var t=e.theme,r=e.linkSize===m.b.large,n=e.linkFormat===m.a.tabs;return v(e.styles,{theme:t,rootIsLarge:r,rootIsTabs:n})},t}(i.Component);function _(e){return!!e&&"object"==typeof e&&!!e.type&&e.type.name===f.a.name}var x=r(9),w=r(64),k={count:"ms-Pivot-count",icon:"ms-Pivot-icon",linkIsSelected:"is-selected",link:"ms-Pivot-link",linkContent:"ms-Pivot-linkContent",root:"ms-Pivot",rootIsLarge:"ms-Pivot--large",rootIsTabs:"ms-Pivot--tabs",text:"ms-Pivot-text"},M=function(e){var t,r,n=e.rootIsLarge,a=e.rootIsTabs,i=e.theme,o=i.semanticColors,s=i.fonts;return[s.medium,{color:o.actionLink,display:"inline-block",lineHeight:44,height:44,marginRight:8,padding:"0 8px",textAlign:"center",position:"relative",backgroundColor:"transparent",border:0,borderRadius:0,selectors:(t={":before":{backgroundColor:"transparent",bottom:0,content:'""',height:2,left:8,position:"absolute",right:8,transition:"left "+x.c.durationValue2+" "+x.c.easeFunction2+",\n                      right "+x.c.durationValue2+" "+x.c.easeFunction2},":after":{color:"transparent",content:"attr(data-content)",display:"block",fontWeight:x.e.bold,height:1,overflow:"hidden",visibility:"hidden"},":hover":{backgroundColor:o.buttonBackgroundHovered,color:o.buttonTextHovered,cursor:"pointer"},":active":{backgroundColor:o.buttonBackgroundPressed,color:o.buttonTextHovered},":focus":{outline:"none"}},t["."+w.a+" &:focus"]={outline:"1px solid "+o.focusBorder},t["."+w.a+" &:focus:after"]={content:"attr(data-content)",position:"relative",border:0},t)},n&&{fontSize:s.large.fontSize},a&&[{marginRight:0,height:44,lineHeight:44,backgroundColor:o.buttonBackground,padding:"0 10px",verticalAlign:"top",selectors:(r={":focus":{outlineOffset:"-1px"}},r["."+w.a+" &:focus::before"]={height:"auto",background:"transparent",transition:"none"},r)}]]};r.d(t,"a",(function(){return T}));var T=Object(n.a)(b,(function(e){var t,r,n,i=e.className,o=e.rootIsLarge,s=e.rootIsTabs,l=e.theme,c=l.semanticColors,u=l.fonts,d=Object(x.v)(k,l);return{root:[d.root,u.medium,x.G,{position:"relative",color:c.link,whiteSpace:"nowrap"},o&&d.rootIsLarge,s&&d.rootIsTabs,i],link:Object(a.e)([d.link],M(e),[s&&{selectors:{"&:hover, &:focus":{color:c.buttonTextCheckedHovered},"&:active, &:hover":{color:c.primaryButtonText,backgroundColor:c.primaryButtonBackground}}}]),linkIsSelected:Object(a.e)([d.link,d.linkIsSelected],M(e),[{fontWeight:x.e.semibold,selectors:(t={":before":{backgroundColor:c.inputBackgroundChecked,selectors:(r={},r[x.f]={backgroundColor:"Highlight"},r)},":hover::before":{left:0,right:0}},t[x.f]={color:"Highlight"},t)},s&&{backgroundColor:c.primaryButtonBackground,color:c.primaryButtonText,fontWeight:x.e.regular,selectors:(n={":before":{backgroundColor:"transparent",transition:"none",position:"absolute",top:0,left:0,right:0,bottom:0,content:'""',height:"auto"},":hover":{backgroundColor:c.primaryButtonBackgroundHovered,color:c.primaryButtonText},"&:active":{backgroundColor:c.primaryButtonBackgroundPressed,color:c.primaryButtonText}},n[x.f]={fontWeight:x.e.semibold,color:"HighlightText",background:"Highlight",MsHighContrastAdjust:"none"},n)}]),linkContent:[d.linkContent,{flex:"0 1 100%",selectors:{"& > * ":{marginLeft:4},"& > *:first-child":{marginLeft:0}}}],text:[d.text,{display:"inline-block",verticalAlign:"top"}],count:[d.count,{display:"inline-block",verticalAlign:"top"}],icon:d.icon}}),void 0,{scope:"Pivot"})},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(60),s=r(355),l=Object(s.a)({disableCaching:!0}),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.as,r=void 0===t?"label":t,n=e.children,s=e.className,c=e.disabled,u=e.styles,d=e.required,p=e.theme,h=l(u,{className:s,disabled:c,required:d,theme:p});return i.createElement(r,Object(a.a)({},Object(o.d)(this.props,o.c),{className:h.root}),n)},t}(i.Component),u=r(9);r.d(t,"a",(function(){return d}));var d=Object(n.a)(c,(function(e){var t,r=e.theme,n=e.className,a=e.disabled,i=e.required,o=r.semanticColors,s=u.e.semibold,l=o.bodyText,c=o.disabledBodyText,d=o.errorText;return{root:["ms-Label",r.fonts.medium,{fontWeight:s,color:l,boxSizing:"border-box",boxShadow:"none",margin:0,display:"block",padding:"5px 0",wordWrap:"break-word",overflowWrap:"break-word"},a&&{color:c,selectors:(t={},t[u.f]={color:"GrayText"},t)},i&&{selectors:{"::after":{content:"' *'",color:d,paddingRight:12}}},n]}}),void 0,{scope:"Label"})},function(e,t,r){"use strict";var n,a=r(354),i=r(2),o=r(0);!function(e){e[e.default=0]="default",e[e.image=1]="image",e[e.Default=1e5]="Default",e[e.Image=100001]="Image"}(n||(n={}));var s=r(82),l=r(16),c=r(355),u=r(60),d=r(268),p=Object(c.a)({disableCaching:!0}),h=function(e){function t(t){var r=e.call(this,t)||this;return r.onImageLoadingStateChange=function(e){r.props.imageProps&&r.props.imageProps.onLoadingStateChange&&r.props.imageProps.onLoadingStateChange(e),e===l.c.error&&r.setState({imageLoadError:!0})},r.state={imageLoadError:!1},r}return Object(i.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,r=e.styles,a=e.iconName,l=e.imageErrorAs,c=e.theme,h="string"==typeof a&&0===a.length,f=this.props.iconType===n.image||this.props.iconType===n.Image||!!this.props.imageProps,m=Object(d.b)(a)||{},g=m.iconClassName,v=m.children,y=p(r,{theme:c,className:t,iconClassName:g,isImage:f,isPlaceholder:h}),b=f?"span":"i",_=Object(u.d)(this.props,u.e,["aria-label"]),x=this.state.imageLoadError,w=Object(i.a)(Object(i.a)({},this.props.imageProps),{onLoadingStateChange:this.onImageLoadingStateChange}),k=x&&l||s.a,M=this.props.ariaLabel||this.props["aria-label"],T=M?{"aria-label":M}:{"aria-hidden":!this.props["aria-labelledby"]&&!w["aria-labelledby"]};return o.createElement(b,Object(i.a)({"data-icon-name":a},T,_,{className:y.root}),f?o.createElement(k,Object(i.a)({},w)):v)},t}(o.Component),f=r(42);r.d(t,"a",(function(){return m}));var m=Object(a.a)(h,f.c,void 0,{scope:"Icon"},!0)},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(355),s=r(356),l=r(71),c=r(271),u=r(365),d=r(381),p=r(376),h=Object(o.a)(),f=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n._checkBox=i.createRef(),n._onFocus=function(e){var t=n.props.inputProps;t&&t.onFocus&&t.onFocus(e)},n._onBlur=function(e){var t=n.props.inputProps;t&&t.onBlur&&t.onBlur(e)},n._onChange=function(e){var t=n.props.onChange,r=n.state,a=r.isChecked;r.isIndeterminate?(t&&t(e,a),void 0===n.props.indeterminate&&n.setState({isIndeterminate:!1})):(t&&t(e,!a),void 0===n.props.checked&&n.setState({isChecked:!a}))},n._onRenderLabel=function(e){var t=e.label,r=e.title;return t?i.createElement("span",{"aria-hidden":"true",className:n._classNames.text,title:r},t):null},Object(s.a)(n),n._id=n.props.id||Object(l.a)("checkbox-"),n.state={isChecked:!!(void 0!==t.checked?t.checked:t.defaultChecked),isIndeterminate:!!(void 0!==t.indeterminate?t.indeterminate:t.defaultIndeterminate)},Object(c.a)(),n}return Object(a.c)(t,e),t.getDerivedStateFromProps=function(e,t){var r={};return void 0!==e.indeterminate&&(r.isIndeterminate=!!e.indeterminate),void 0!==e.checked&&(r.isChecked=!!e.checked),Object.keys(r).length?r:null},t.prototype.render=function(){var e=this,t=this.props,r=t.className,n=t.disabled,o=t.inputProps,s=t.name,l=t.boxSide,c=t.theme,f=t.ariaLabel,m=t.ariaLabelledBy,g=t.ariaDescribedBy,v=t.styles,y=t.onRenderLabel,b=void 0===y?this._onRenderLabel:y,_=t.checkmarkIconProps,x=t.ariaPositionInSet,w=t.ariaSetSize,k=t.keytipProps,M=t.title,T=t.label,C=this.state,S=C.isChecked,L=C.isIndeterminate;return this._classNames=h(v,{theme:c,className:r,disabled:n,indeterminate:L,checked:S,reversed:"start"!==l,isUsingCustomLabelRender:b!==this._onRenderLabel}),i.createElement(p.a,{keytipProps:k,disabled:n},(function(t){return i.createElement("div",{className:e._classNames.root,title:M},i.createElement("input",Object(a.a)({type:"checkbox"},o,{"data-ktp-execute-target":t["data-ktp-execute-target"],checked:S,disabled:n,className:e._classNames.input,ref:e._checkBox,name:s,id:e._id,title:M,onChange:e._onChange,onFocus:e._onFocus,onBlur:e._onBlur,"aria-disabled":n,"aria-label":f||T,"aria-labelledby":m,"aria-describedby":Object(u.a)(g,t["aria-describedby"]),"aria-posinset":x,"aria-setsize":w,"aria-checked":L?"mixed":S?"true":"false"})),i.createElement("label",{className:e._classNames.label,htmlFor:e._id},i.createElement("div",{className:e._classNames.checkbox,"data-ktp-target":t["data-ktp-target"]},i.createElement(d.a,Object(a.a)({iconName:"CheckMark"},_,{className:e._classNames.checkmark}))),b(e.props,e._onRenderLabel)))}))},Object.defineProperty(t.prototype,"indeterminate",{get:function(){return!!this.state.isIndeterminate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return!!this.state.isChecked},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this._checkBox.current&&this._checkBox.current.focus()},t.defaultProps={boxSide:"start"},t}(i.Component),m=r(9),g=r(64),v={root:"ms-Checkbox",label:"ms-Checkbox-label",checkbox:"ms-Checkbox-checkbox",checkmark:"ms-Checkbox-checkmark",text:"ms-Checkbox-text"};r.d(t,"a",(function(){return y}));var y=Object(n.a)(f,(function(e){var t,r,n,a,i,o,s,l,c,u,d,p,h,f=e.className,y=e.theme,b=e.reversed,_=e.checked,x=e.disabled,w=e.isUsingCustomLabelRender,k=e.indeterminate,M=y.semanticColors,T=y.effects,C=y.palette,S=y.fonts,L=Object(m.v)(v,y),A=M.inputForegroundChecked,E=C.neutralSecondary,D=C.neutralPrimary,I=M.inputBackgroundChecked,P=M.inputBackgroundChecked,O=M.disabledBodySubtext,R=M.inputBorderHovered,F=M.inputBackgroundCheckedHovered,z=M.inputBackgroundChecked,N=M.inputBackgroundCheckedHovered,j=M.inputBackgroundCheckedHovered,B=M.inputTextHovered,Y=M.disabledBodySubtext,H=M.bodyText,V=M.disabledText,U=[{content:'""',borderRadius:T.roundedCorner2,position:"absolute",width:10,height:10,top:4,left:4,boxSizing:"border-box",borderWidth:5,borderStyle:"solid",borderColor:x?O:I,transitionProperty:"border-width, border, border-color",transitionDuration:"200ms",transitionTimingFunction:"cubic-bezier(.4, 0, .23, 1)"}];return{root:[L.root,{position:"relative",display:"flex"},b&&"reversed",_&&"is-checked",!x&&"is-enabled",x&&"is-disabled",!x&&[!_&&{selectors:(t={},t[":hover ."+L.checkbox]={borderColor:R,selectors:(r={},r[m.f]={borderColor:"Highlight"},r)},t[":focus ."+L.checkbox]={borderColor:R},t[":hover ."+L.checkmark]={color:E,opacity:"1",selectors:(n={},n[m.f]={color:"Highlight"},n)},t)},_&&!k&&{selectors:(a={},a[":hover ."+L.checkbox]={background:N,borderColor:j},a[":focus ."+L.checkbox]={background:N,borderColor:j},a["."+L.checkbox]={background:P,borderColor:P},a[m.f]={selectors:(i={},i[":hover ."+L.checkbox]={background:"Window",borderColor:"Highlight"},i[":focus ."+L.checkbox]={background:"Highlight"},i[":focus:hover ."+L.checkbox]={background:"Highlight"},i[":focus:hover ."+L.checkmark]={color:"Window"},i[":hover ."+L.checkmark]={color:"Highlight"},i)},a)},k&&{selectors:(o={},o[":hover ."+L.checkbox+", :hover ."+L.checkbox+":after"]={borderColor:F},o[":focus ."+L.checkbox]={borderColor:F},o[":hover ."+L.checkmark]={opacity:"0"},o)},{selectors:(s={},s[":hover ."+L.text]={color:B},s[":focus ."+L.text]={color:B},s)}],f],input:{position:"absolute",background:"none",opacity:0,selectors:(l={},l["."+g.a+" &:focus + label::before"]={outline:"1px solid "+y.palette.neutralSecondary,outlineOffset:"2px",selectors:(c={},c[m.f]={outline:"1px solid ActiveBorder"},c)},l)},label:[L.label,y.fonts.medium,{display:"flex",alignItems:w?"center":"flex-start",cursor:x?"default":"pointer",position:"relative",userSelect:"none",textAlign:"left"},b&&{flexDirection:"row-reverse",justifyContent:"flex-end"},{selectors:{"&::before":{position:"absolute",left:0,right:0,top:0,bottom:0,content:'""',pointerEvents:"none"}}}],checkbox:[L.checkbox,{position:"relative",display:"flex",flexShrink:0,alignItems:"center",justifyContent:"center",height:"20px",width:"20px",border:"1px solid "+D,borderRadius:T.roundedCorner2,boxSizing:"border-box",transitionProperty:"background, border, border-color",transitionDuration:"200ms",transitionTimingFunction:"cubic-bezier(.4, 0, .23, 1)",overflow:"hidden",selectors:{":after":k?U:null}},k&&{borderColor:I},b?{marginLeft:4}:{marginRight:4},!x&&!k&&_&&{background:z,borderColor:P,selectors:(u={},u[m.f]={background:"Highlight",borderColor:"Highlight"},u)},x&&{borderColor:O,selectors:(d={},d[m.f]={borderColor:"InactiveBorder"},d)},_&&x&&{background:Y,borderColor:O}],checkmark:[L.checkmark,{opacity:_?"1":"0",color:A,selectors:(p={},p[m.f]={color:x?"InactiveBorder":"Window",MsHighContrastAdjust:"none"},p)}],text:[L.text,{color:x?V:H,fontSize:S.medium.fontSize,lineHeight:"20px"},b?{marginRight:4}:{marginLeft:4},x&&{selectors:(h={},h[m.f]={color:"InactiveBorder"},h)}]}}),void 0,{scope:"Checkbox"})},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(43),s=r(355),l=r(60),c=r(357),u=Object(s.a)(),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.type,r=e.size,n=e.ariaLabel,s=e.ariaLive,d=e.styles,p=e.label,h=e.theme,f=e.className,m=e.labelPosition,g=n,v=Object(l.d)(this.props,l.c,["size"]),y=r;void 0===y&&void 0!==t&&(y=t===o.b.large?o.a.large:o.a.medium);var b=u(d,{theme:h,size:y,className:f,labelPosition:m});return i.createElement("div",Object(a.a)({},v,{className:b.root}),i.createElement("div",{className:b.circle}),p&&i.createElement("div",{className:b.label},p),g&&i.createElement("div",{role:"status","aria-live":s},i.createElement(c.a,null,i.createElement("div",{className:b.screenReaderText},g))))},t.defaultProps={size:o.a.medium,ariaLive:"polite",labelPosition:"bottom"},t}(i.Component),p=r(9),h={root:"ms-Spinner",circle:"ms-Spinner-circle",label:"ms-Spinner-label"},f=Object(p.C)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}});r.d(t,"a",(function(){return m}));var m=Object(n.a)(d,(function(e){var t,r=e.theme,n=e.size,a=e.className,i=e.labelPosition,s=r.palette,l=Object(p.v)(h,r);return{root:[l.root,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},"top"===i&&{flexDirection:"column-reverse"},"right"===i&&{flexDirection:"row"},"left"===i&&{flexDirection:"row-reverse"},a],circle:[l.circle,{boxSizing:"border-box",borderRadius:"50%",border:"1.5px solid "+s.themeLight,borderTopColor:s.themePrimary,animationName:f,animationDuration:"1.3s",animationIterationCount:"infinite",animationTimingFunction:"cubic-bezier(.53,.21,.29,.67)",selectors:(t={},t[p.f]={borderTopColor:"Highlight"},t)},n===o.a.xSmall&&["ms-Spinner--xSmall",{width:12,height:12}],n===o.a.small&&["ms-Spinner--small",{width:16,height:16}],n===o.a.medium&&["ms-Spinner--medium",{width:20,height:20}],n===o.a.large&&["ms-Spinner--large",{width:28,height:28}]],label:[l.label,r.fonts.small,{color:s.themePrimary,margin:"8px 0 0",textAlign:"center"},"top"===i&&{margin:"0 0 8px"},"right"===i&&{margin:"0 0 0 8px"},"left"===i&&{margin:"0 8px 0 0"}],screenReaderText:p.B}}),void 0,{scope:"Spinner"})},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(276),s=r(26),l=r(71),c=r(338),u=r(95),d=r(355),p=r(60),h=r(380),f=Object(d.a)(),m=1e3,g=function(e){function t(t){var r=e.call(this,t)||this;r._sliderLine=i.createRef(),r._thumb=i.createRef(),r._onKeyDownTimer=-1,r._getAriaValueText=function(e){var t=r.props.ariaValueText;if(void 0!==e)return t?t(e):e.toString()},r._onMouseDownOrTouchStart=function(e){"mousedown"===e.type?(r._events.on(window,"mousemove",r._onMouseMoveOrTouchMove,!0),r._events.on(window,"mouseup",r._onMouseUpOrTouchEnd,!0)):"touchstart"===e.type&&(r._events.on(window,"touchmove",r._onMouseMoveOrTouchMove,!0),r._events.on(window,"touchend",r._onMouseUpOrTouchEnd,!0)),r._onMouseMoveOrTouchMove(e,!0)},r._onMouseMoveOrTouchMove=function(e,t){if(r._sliderLine.current){var n,a,i,s=r.props,l=s.max,c=s.min,u=s.step,d=(l-c)/u,p=r._sliderLine.current.getBoundingClientRect(),h=(r.props.vertical?p.height:p.width)/d;if(r.props.vertical){var f=r._getPosition(e,r.props.vertical);n=(p.bottom-f)/h}else{var m=r._getPosition(e,r.props.vertical);n=(Object(o.a)(r.props.theme)?p.right-m:m-p.left)/h}n>Math.floor(d)?i=a=l:n<0?i=a=c:(i=c+u*n,a=c+u*Math.round(n)),r._updateValue(a,i),t||(e.preventDefault(),e.stopPropagation())}},r._onMouseUpOrTouchEnd=function(e){r.setState({renderedValue:void 0}),r.props.onChanged&&r.props.onChanged(e,r.state.value),r._events.off()},r._onKeyDown=function(e){var t=r.state.value,n=r.props,a=n.max,i=n.min,l=n.step,c=0;switch(e.which){case Object(o.b)(s.a.left,r.props.theme):case s.a.down:c=-l,r._clearOnKeyDownTimer(),r._setOnKeyDownTimer(e);break;case Object(o.b)(s.a.right,r.props.theme):case s.a.up:c=l,r._clearOnKeyDownTimer(),r._setOnKeyDownTimer(e);break;case s.a.home:t=i;break;case s.a.end:t=a;break;default:return}var u=Math.min(a,Math.max(i,t+c));r._updateValue(u,u),e.preventDefault(),e.stopPropagation()},r._clearOnKeyDownTimer=function(){r._async.clearTimeout(r._onKeyDownTimer)},r._setOnKeyDownTimer=function(e){r._onKeyDownTimer=r._async.setTimeout((function(){r.props.onChanged&&r.props.onChanged(e,r.state.value)}),m)},r._warnMutuallyExclusive({value:"defaultValue"}),r._id=Object(l.a)("Slider");var n=void 0!==t.value?t.value:void 0!==t.defaultValue?t.defaultValue:t.min;return r.state={value:n,renderedValue:void 0},r}return Object(a.c)(t,e),t.prototype.render=function(){var e,t,r,n,o,s=this.props,l=s.ariaLabel,u=s.className,d=s.disabled,m=s.label,g=s.max,v=s.min,y=s.showValue,b=s.buttonProps,_=s.vertical,x=s.valueFormat,w=s.styles,k=s.theme,M=s.originFromZero,T=this.value,C=this.renderedValue,S=v===g?0:(C-v)/(g-v)*100,L=v>=0?0:-v/(g-v)*100,A=_?"height":"width",E=d?{}:{onMouseDown:this._onMouseDownOrTouchStart},D=d?{}:{onTouchStart:this._onMouseDownOrTouchStart},I=d?{}:{onKeyDown:this._onKeyDown},P=f(w,{className:u,disabled:d,vertical:_,showTransitions:C===T,showValue:y,theme:k}),O=b?Object(p.d)(b,p.c):void 0;return i.createElement("div",{className:P.root},m&&i.createElement(h.a,Object(a.a)({className:P.titleLabel},l?{}:{htmlFor:this._id},{disabled:d}),m),i.createElement("div",{className:P.container},i.createElement("div",Object(a.a)({"aria-valuenow":T,"aria-valuemin":v,"aria-valuemax":g,"aria-valuetext":this._getAriaValueText(T),"aria-label":l||m,"aria-disabled":d},E,D,I,O,{className:Object(c.a)(P.slideBox,b.className),id:this._id,role:"slider",tabIndex:d?void 0:0,"data-is-focusable":!d}),i.createElement("div",{ref:this._sliderLine,className:P.line},M&&i.createElement("span",{className:Object(c.a)(P.zeroTick),style:this._getStyleUsingOffsetPercent(_,L)}),i.createElement("span",{ref:this._thumb,className:P.thumb,style:this._getStyleUsingOffsetPercent(_,S)}),M?i.createElement(i.Fragment,null,i.createElement("span",{className:Object(c.a)(P.lineContainer,P.inactiveSection),style:(e={},e[A]=Math.min(S,L)+"%",e)}),i.createElement("span",{className:Object(c.a)(P.lineContainer,P.activeSection),style:(t={},t[A]=Math.abs(L-S)+"%",t)}),i.createElement("span",{className:Object(c.a)(P.lineContainer,P.inactiveSection),style:(r={},r[A]=Math.min(100-S,100-L)+"%",r)})):i.createElement(i.Fragment,null,i.createElement("span",{className:Object(c.a)(P.lineContainer,P.activeSection),style:(n={},n[A]=S+"%",n)}),i.createElement("span",{className:Object(c.a)(P.lineContainer,P.inactiveSection),style:(o={},o[A]=100-S+"%",o)})))),y&&i.createElement(h.a,{className:P.valueLabel,disabled:d},x?x(T):T)))},t.prototype.focus=function(){this._thumb.current&&this._thumb.current.focus()},Object.defineProperty(t.prototype,"value",{get:function(){var e=this.props.value,t=void 0===e?this.state.value:e;return void 0===this.props.min||void 0===this.props.max||void 0===t?void 0:Math.max(this.props.min,Math.min(this.props.max,t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderedValue",{get:function(){var e=this.state.renderedValue;return void 0===e?this.value:e},enumerable:!0,configurable:!0}),t.prototype._getStyleUsingOffsetPercent=function(e,t){var r;return(r={})[e?"bottom":Object(o.a)(this.props.theme)?"right":"left"]=t+"%",r},t.prototype._getPosition=function(e,t){var r;switch(e.type){case"mousedown":case"mousemove":r=t?e.clientY:e.clientX;break;case"touchstart":case"touchmove":r=t?e.touches[0].clientY:e.touches[0].clientX}return r},t.prototype._updateValue=function(e,t){var r=this,n=this.props,a=n.step,i=n.snapToStep,o=0;if(isFinite(a))for(;Math.round(a*Math.pow(10,o))/Math.pow(10,o)!==a;)o++;var s=parseFloat(e.toFixed(o)),l=s!==this.state.value;i&&(t=s),this.setState({value:s,renderedValue:t},(function(){l&&r.props.onChange&&r.props.onChange(r.state.value)}))},t.defaultProps={step:1,min:0,max:10,showValue:!0,disabled:!1,vertical:!1,buttonProps:{},originFromZero:!1},t}(u.a),v=r(9),y={root:"ms-Slider",enabled:"ms-Slider-enabled",disabled:"ms-Slider-disabled",row:"ms-Slider-row",column:"ms-Slider-column",container:"ms-Slider-container",slideBox:"ms-Slider-slideBox",line:"ms-Slider-line",thumb:"ms-Slider-thumb",activeSection:"ms-Slider-active",inactiveSection:"ms-Slider-inactive",valueLabel:"ms-Slider-value",showValue:"ms-Slider-showValue",showTransitions:"ms-Slider-showTransitions",zeroTick:"ms-Slider-zeroTick"};r.d(t,"a",(function(){return b}));var b=Object(n.a)(g,(function(e){var t,r,n,i,s,l,c,u,d,p,h,f,m,g=e.className,b=e.titleLabelClassName,_=e.theme,x=e.vertical,w=e.disabled,k=e.showTransitions,M=e.showValue,T=_.semanticColors,C=Object(v.v)(y,_),S=T.inputBackgroundCheckedHovered,L=T.inputBackgroundChecked,A=T.inputPlaceholderBackgroundChecked,E=T.smallInputBorder,D=T.disabledBorder,I=T.disabledText,P=T.disabledBackground,O=T.inputBackground,R=T.smallInputBorder,F=T.disabledBorder,z=!w&&{backgroundColor:S,selectors:(t={},t[v.f]={backgroundColor:"Highlight"},t)},N=!w&&{backgroundColor:A,selectors:(r={},r[v.f]={borderColor:"Highlight"},r)},j=!w&&{backgroundColor:L,selectors:(n={},n[v.f]={backgroundColor:"Highlight"},n)},B=!w&&{border:"2px solid "+S,selectors:(i={},i[v.f]={borderColor:"Highlight"},i)},Y=!e.disabled&&{backgroundColor:T.inputPlaceholderBackgroundChecked,selectors:(s={},s[v.f]={backgroundColor:"Highlight"},s)};return{root:Object(a.e)([C.root,_.fonts.medium,{userSelect:"none"},x&&{marginRight:8}],[w?void 0:C.enabled],[w?C.disabled:void 0],[x?void 0:C.row],[x?C.column:void 0],[g]),titleLabel:[{padding:0},b],container:[C.container,{display:"flex",flexWrap:"nowrap",alignItems:"center"},x&&{flexDirection:"column",height:"100%",textAlign:"center",margin:"8px 0"}],slideBox:Object(a.e)([C.slideBox,Object(v.u)(_),{background:"transparent",border:"none",flexGrow:1,lineHeight:28,display:"flex",alignItems:"center",selectors:(l={},l[":active ."+C.activeSection]=z,l[":hover ."+C.activeSection]=j,l[":active ."+C.inactiveSection]=N,l[":hover ."+C.inactiveSection]=N,l[":active ."+C.thumb]=B,l[":hover ."+C.thumb]=B,l[":active ."+C.zeroTick]=Y,l[":hover ."+C.zeroTick]=Y,l)},x?{height:"100%",width:28,padding:"8px 0"}:{height:28,width:"auto",padding:"0 8px"}],[M?C.showValue:void 0],[k?C.showTransitions:void 0]),thumb:[C.thumb,{borderWidth:2,borderStyle:"solid",borderColor:R,borderRadius:10,boxSizing:"border-box",background:O,display:"block",width:16,height:16,position:"absolute"},x?{left:-6,margin:"0 auto",transform:"translateY(8px)"}:{top:-6,transform:Object(o.a)(_)?"translateX(50%)":"translateX(-50%)"},k&&{transition:"left "+v.c.durationValue3+" "+v.c.easeFunction1},w&&{borderColor:F,selectors:(c={},c[v.f]={borderColor:"GrayText"},c)}],line:[C.line,{display:"flex",position:"relative"},x?{height:"100%",width:4,margin:"0 auto",flexDirection:"column-reverse"}:{width:"100%"}],lineContainer:[{borderRadius:4,boxSizing:"border-box"},x?{width:4,height:"100%"}:{height:4,width:"100%"}],activeSection:[C.activeSection,{background:E,selectors:(u={},u[v.f]={backgroundColor:"WindowText"},u)},k&&{transition:"width "+v.c.durationValue3+" "+v.c.easeFunction1},w&&{background:I,selectors:(d={},d[v.f]={backgroundColor:"GrayText",borderColor:"GrayText"},d)}],inactiveSection:[C.inactiveSection,{background:D,selectors:(p={},p[v.f]={border:"1px solid WindowText"},p)},k&&{transition:"width "+v.c.durationValue3+" "+v.c.easeFunction1},w&&{background:P,selectors:(h={},h[v.f]={borderColor:"GrayText"},h)}],zeroTick:[C.zeroTick,{position:"absolute",background:T.disabledBorder,selectors:(f={},f[v.f]={backgroundColor:"WindowText"},f)},e.disabled&&{background:T.disabledBackground,selectors:(m={},m[v.f]={backgroundColor:"GrayText"},m)},e.vertical?{width:"16px",height:"1px",transform:Object(o.a)(_)?"translateX(6px)":"translateX(-6px)"}:{width:"1px",height:"16px",transform:"translateY(-6px)"}],valueLabel:[C.valueLabel,{flexShrink:1,width:30,lineHeight:"1"},x?{margin:"0 auto",whiteSpace:"nowrap",width:40}:{margin:"0 8px",whiteSpace:"nowrap",width:40}]}}),void 0,{scope:"Slider"})},function(e,t,r){"use strict";var n=r(354),a=r(2),i=r(0),o=r(355),s=r(95),l=r(376),c=Object(o.a)(),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._link=i.createRef(),t._onClick=function(e){var r=t.props,n=r.onClick;r.disabled?e.preventDefault():n&&n(e)},t}return Object(a.c)(t,e),t.prototype.render=function(){var e=this,t=this.props,r=t.disabled,n=t.children,o=t.className,s=t.href,u=t.theme,d=t.styles,p=t.keytipProps,h=c(d,{className:o,isButton:!s,isDisabled:r,theme:u}),f=this._getRootType(this.props);return i.createElement(l.a,{keytipProps:p,ariaDescribedBy:this.props["aria-describedby"],disabled:r},(function(t){return i.createElement(f,Object(a.a)({},t,e._adjustPropsForRootType(f,e.props),{className:h.root,onClick:e._onClick,ref:e._link,"aria-disabled":r}),n)}))},t.prototype.focus=function(){var e=this._link.current;e&&e.focus&&e.focus()},t.prototype._adjustPropsForRootType=function(e,t){t.children,t.as;var r=t.disabled,n=t.target,i=t.href,o=(t.theme,t.getStyles,t.styles,t.componentRef,Object(a.d)(t,["children","as","disabled","target","href","theme","getStyles","styles","componentRef"]));return"string"==typeof e?"a"===e?Object(a.a)({target:n,href:r?void 0:i},o):"button"===e?Object(a.a)({type:"button",disabled:r},o):Object(a.a)(Object(a.a)({},o),{disabled:r}):Object(a.a)({target:n,href:i,disabled:r},o)},t.prototype._getRootType=function(e){return e.as?e.as:e.href?"a":"button"},t}(s.a),d=r(9),p={root:"ms-Link"};r.d(t,"a",(function(){return h}));var h=Object(n.a)(u,(function(e){var t,r,n,a=e.className,i=e.isButton,o=e.isDisabled,s=e.theme,l=s.semanticColors,c=l.link,u=l.linkHovered,h=l.disabledText,f=l.focusBorder,m=Object(d.v)(p,s);return{root:[m.root,s.fonts.medium,{color:c,outline:"none",fontSize:"inherit",fontWeight:"inherit",selectors:(t={".ms-Fabric--isFocusVisible &:focus":{boxShadow:"0 0 0 1px "+f+" inset",selectors:(r={},r[d.f]={outline:"1px solid WindowText"},r)}},t[d.f]={borderBottom:"none"},t)},i&&{background:"none",backgroundColor:"transparent",border:"none",cursor:"pointer",display:"inline",margin:0,overflow:"inherit",padding:0,textAlign:"left",textOverflow:"inherit",userSelect:"text",borderBottom:"1px solid transparent",selectors:(n={},n[d.g]={color:"#FFFF00"},n[d.h]={color:"#00009F"},n)},!i&&{textDecoration:"none"},o&&["is-disabled",{color:h,cursor:"default"},{selectors:{"&:link, &:visited":{pointerEvents:"none"}}}],!o&&{selectors:{"&:active, &:hover, &:active:hover":{color:u,textDecoration:"underline"},"&:focus":{color:c}}},m.root,a]}}),void 0,{scope:"Link"})},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(49),o=r(95),s=r(339),l=r(9),c=r(46),u=r(48),d=r(55),p=Object(c.b)((function(e,t){var r,n=Object(u.a)(e),a=Object(d.a)(e),i=e.palette,o={root:{padding:"0 4px",width:"32px",height:"32px",backgroundColor:"transparent",border:"none",color:e.semanticColors.link},rootHovered:{color:i.themeDarkAlt,backgroundColor:i.neutralLighter,selectors:(r={},r[l.f]={borderColor:"Highlight",color:"Highlight"},r)},rootHasMenu:{width:"auto"},rootPressed:{color:i.themeDark,backgroundColor:i.neutralLight},rootExpanded:{color:i.themeDark,backgroundColor:i.neutralLight},rootChecked:{color:i.themeDark,backgroundColor:i.neutralLight},rootCheckedHovered:{color:i.themeDark,backgroundColor:i.neutralQuaternaryAlt},rootDisabled:{color:i.neutralTertiaryAlt}};return Object(l.r)(n,o,a,t)}));r.d(t,"a",(function(){return h}));var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._skipComponentRefResolution=!0,t}return Object(n.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.styles,r=e.theme;return a.createElement(i.a,Object(n.a)({},this.props,{variantClassName:"ms-Button--icon",styles:p(r,t),onRenderText:o.b,onRenderDescription:o.b}))},t=Object(n.b)([Object(s.a)("IconButton",["theme","styles"],!0)],t)}(o.a)},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(49),o=r(95),s=r(339),l=r(9),c=r(46),u=r(48),d=r(55),p=r(27),h=Object(c.b)((function(e,t,r,n){var a,i,o,s,c,h,f,m,g,v,y=Object(u.a)(e),b=Object(d.a)(e),_=e.palette,x=e.semanticColors,w={root:[Object(l.u)(e,{inset:2,highContrastStyle:{left:4,top:4,bottom:4,right:4,border:"none"},borderColor:"transparent"}),e.fonts.medium,{minWidth:"40px",backgroundColor:_.white,color:_.neutralPrimary,padding:"0 4px",border:"none",borderRadius:0,selectors:(a={},a[l.f]={border:"none"},a)}],rootHovered:{backgroundColor:_.neutralLighter,color:_.neutralDark,selectors:(i={},i[l.f]={color:"Highlight"},i["."+p.a.msButtonIcon]={color:_.themeDarkAlt},i["."+p.a.msButtonMenuIcon]={color:_.neutralPrimary},i)},rootPressed:{backgroundColor:_.neutralLight,color:_.neutralDark,selectors:(o={},o["."+p.a.msButtonIcon]={color:_.themeDark},o["."+p.a.msButtonMenuIcon]={color:_.neutralPrimary},o)},rootChecked:{backgroundColor:_.neutralLight,color:_.neutralDark,selectors:(s={},s["."+p.a.msButtonIcon]={color:_.themeDark},s["."+p.a.msButtonMenuIcon]={color:_.neutralPrimary},s)},rootCheckedHovered:{backgroundColor:_.neutralQuaternaryAlt,selectors:(c={},c["."+p.a.msButtonIcon]={color:_.themeDark},c["."+p.a.msButtonMenuIcon]={color:_.neutralPrimary},c)},rootExpanded:{backgroundColor:_.neutralLight,color:_.neutralDark,selectors:(h={},h["."+p.a.msButtonIcon]={color:_.themeDark},h["."+p.a.msButtonMenuIcon]={color:_.neutralPrimary},h)},rootExpandedHovered:{backgroundColor:_.neutralQuaternaryAlt},rootDisabled:{backgroundColor:_.white,selectors:(f={},f["."+p.a.msButtonIcon]={color:x.disabledBodySubtext},f)},splitButtonContainer:{height:"100%",selectors:(m={},m[l.f]={border:"none"},m)},splitButtonDivider:{backgroundColor:_.neutralTertiaryAlt},splitButtonMenuButton:{backgroundColor:_.white,border:"none",borderTopRightRadius:"0",borderBottomRightRadius:"0",color:_.neutralSecondary,selectors:{":hover":{backgroundColor:_.neutralLighter,color:_.neutralDark,selectors:(g={},g[l.f]={color:"Highlight"},g["."+p.a.msButtonIcon]={color:_.neutralPrimary},g)},":active":{backgroundColor:_.neutralLight,selectors:(v={},v["."+p.a.msButtonIcon]={color:_.neutralPrimary},v)}}},splitButtonMenuButtonDisabled:{backgroundColor:_.white},splitButtonMenuButtonChecked:{backgroundColor:_.neutralLight,color:_.neutralDark,selectors:{":hover":{backgroundColor:_.neutralQuaternaryAlt}}},splitButtonMenuButtonExpanded:{backgroundColor:_.neutralLight,color:_.black,selectors:{":hover":{backgroundColor:_.neutralQuaternaryAlt}}},splitButtonMenuIcon:{color:_.neutralPrimary},splitButtonMenuIconDisabled:{color:_.neutralTertiary},label:{fontWeight:"normal"},icon:{color:_.themePrimary},menuIcon:{color:_.neutralSecondary}};return Object(l.r)(y,b,w,t)}));r.d(t,"a",(function(){return f}));var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._skipComponentRefResolution=!0,t}return Object(n.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.styles,r=e.theme;return a.createElement(i.a,Object(n.a)({},this.props,{variantClassName:"ms-Button--commandBar",styles:h(r,t),onRenderDescription:o.b}))},t=Object(n.b)([Object(s.a)("CommandBarButton",["theme","styles"],!0)],t)}(o.a)},function(e,t,r){"use strict";var n=r(2),a=r(0),i=r(35),o=r(340),s=r(56),l=r(26),c=r(276),u=r(356),d=r(71),p=r(17),h=r(94),f=r(60),m=r(338),g=r(269);function v(e){var t=function(e){var t;"function"==typeof Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0);return t}("MouseEvents");t.initEvent("click",!0,!0),e.dispatchEvent(t)}var y=r(359),b=r(363),_=r(34),x=r(69);r.d(t,"a",(function(){return P}));var w,k="data-no-vertical-wrap",M="data-no-horizontal-wrap",T=999999999,C=-999999999,S="ms-FocusZone";var L,A={},E=new Set,D=["text","number","password","email","tel","url","search"],I=!1,P=function(e){function t(t){var r=e.call(this,t)||this;return r._disposables=[],r._root=a.createRef(),r._onFocus=function(e){if(!r._portalContainsElement(e.target)){var t,n=r.props,a=n.onActiveElementChanged,i=n.doNotAllowFocusEventToPropagate,l=n.onFocusNotification,c=r._isImmediateDescendantOfZone(e.target);if(l&&l(),c)t=e.target;else for(var u=e.target;u&&u!==r._root.current;){if(Object(o.n)(u)&&r._isImmediateDescendantOfZone(u)){t=u;break}u=Object(s.a)(u,I)}var d=!r._activeElement;t&&t!==r._activeElement&&((c||d)&&r._setFocusAlignment(t,!0,!0),r._activeElement=t,d&&r._updateTabIndexes()),a&&a(r._activeElement,e),i&&e.stopPropagation()}},r._onBlur=function(){r._setParkedFocus(!1)},r._onKeyDownCapture=function(e){e.which===l.a.tab&&E.forEach((function(e){return e._updateTabIndexes()}))},r._onMouseDown=function(e){if(!r._portalContainsElement(e.target)&&!r.props.disabled){for(var t=e.target,n=[];t&&t!==r._root.current;)n.push(t),t=Object(s.a)(t,I);for(;n.length&&((t=n.pop())&&Object(o.n)(t)&&r._setActiveElement(t,!0),!Object(o.m)(t)););}},r._onKeyDown=function(e){if(!r._portalContainsElement(e.target)){var t=r.props,n=t.direction,a=t.disabled,s=t.isInnerZoneKeystroke;if(!(a||(r.props.onKeyDown&&r.props.onKeyDown(e),e.isDefaultPrevented()||r._getDocument().activeElement===r._root.current&&r._isInnerZone))){if(s&&s(e)&&r._isImmediateDescendantOfZone(e.target)){var u=r._getFirstInnerZone();if(u){if(!u.focus(!0))return}else{if(!Object(o.l)(e.target))return;if(!r.focusElement(Object(o.j)(e.target,e.target.firstChild,!0)))return}}else{if(e.altKey)return;switch(e.which){case l.a.space:if(r._tryInvokeClickForFocusable(e.target))break;return;case l.a.left:if(n!==i.a.vertical&&r._moveFocusLeft())break;return;case l.a.right:if(n!==i.a.vertical&&r._moveFocusRight())break;return;case l.a.up:if(n!==i.a.horizontal&&r._moveFocusUp())break;return;case l.a.down:if(n!==i.a.horizontal&&r._moveFocusDown())break;return;case l.a.pageDown:if(r._moveFocusPaging(!0))break;return;case l.a.pageUp:if(r._moveFocusPaging(!1))break;return;case l.a.tab:if(r.props.allowTabKey||r.props.handleTabKey===i.b.all||r.props.handleTabKey===i.b.inputOnly&&r._isElementInput(e.target)){var d=!1;if(r._processingTabKey=!0,n!==i.a.vertical&&r._shouldWrapFocus(r._activeElement,M))d=(Object(c.a)()?!e.shiftKey:e.shiftKey)?r._moveFocusLeft():r._moveFocusRight();else d=e.shiftKey?r._moveFocusUp():r._moveFocusDown();if(r._processingTabKey=!1,d)break}return;case l.a.home:if(r._isElementInput(e.target)&&!r._shouldInputLoseFocus(e.target,!1))return!1;var p=r._root.current&&r._root.current.firstChild;if(r._root.current&&p&&r.focusElement(Object(o.j)(r._root.current,p,!0)))break;return;case l.a.end:if(r._isElementInput(e.target)&&!r._shouldInputLoseFocus(e.target,!0))return!1;var h=r._root.current&&r._root.current.lastChild;if(r._root.current&&r.focusElement(Object(o.k)(r._root.current,h,!0,!0,!0)))break;return;case l.a.enter:if(r._tryInvokeClickForFocusable(e.target))break;return;default:return}}e.preventDefault(),e.stopPropagation()}}},r._getHorizontalDistanceFromCenter=function(e,t,n){var a=r._focusAlignment.x,i=Math.floor(n.top),o=Math.floor(t.bottom),s=Math.floor(n.bottom),l=Math.floor(t.top);return e&&i>o||!e&&s<l?a>=n.left&&a<=n.left+n.width?0:Math.abs(n.left+n.width/2-a):r._shouldWrapFocus(r._activeElement,k)?T:C},Object(u.a)(r),r._id=Object(d.a)("FocusZone"),r._focusAlignment={x:0,y:0},r._processingTabKey=!1,r}return Object(n.c)(t,e),t.getOuterZones=function(){return E.size},t.prototype.componentDidMount=function(){var e=this._root.current;if(A[this._id]=this,e){for(var t=Object(p.a)(e),r=Object(s.a)(e,I);r&&r!==this._getDocument().body&&1===r.nodeType;){if(Object(o.m)(r)){this._isInnerZone=!0;break}r=Object(s.a)(r,I)}this._isInnerZone||(E.add(this),t&&1===E.size&&(L=Object(h.a)(t,"keydown",this._onKeyDownCapture,!0))),this._disposables.push(Object(h.a)(e,"blur",this._onBlur,!0)),this._updateTabIndexes(),this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement),this.focus())}},t.prototype.componentDidUpdate=function(){var e=this._root.current,t=this._getDocument();if(t&&this._lastIndexPath&&(t.activeElement===t.body||t.activeElement===e)){var r=Object(o.g)(e,this._lastIndexPath);r?(this._setActiveElement(r,!0),r.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},t.prototype.componentWillUnmount=function(){delete A[this._id],this._isInnerZone||(E.delete(this),0===E.size&&L&&L()),this._disposables.forEach((function(e){return e()})),delete this._disposables},t.prototype.render=function(){var e=this.props,t=e.rootProps,r=e.ariaDescribedBy,i=e.ariaLabelledBy,o=e.className,s=Object(f.d)(this.props,f.e),l=this.props.as||this.props.elementType||"div";return this._evaluateFocusBeforeRender(),a.createElement(l,Object(n.a)({"aria-labelledby":i,"aria-describedby":r},s,t,{className:Object(m.a)((w||(w=Object(x.a)({selectors:{":focus":{outline:"none"}}},S)),w),o),ref:this._root,"data-focuszone-id":this._id,onKeyDown:this._onKeyDown,onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},t.prototype.focus=function(e){if(void 0===e&&(e=!1),this._root.current){if(!e&&"true"===this._root.current.getAttribute("data-is-focusable")&&this._isInnerZone){var t=this._getOwnerZone(this._root.current);if(t!==this._root.current){var r=A[t.getAttribute("data-focuszone-id")];return!!r&&r.focusElement(this._root.current)}return!1}if(!e&&this._activeElement&&Object(g.a)(this._root.current,this._activeElement)&&Object(o.n)(this._activeElement))return this._activeElement.focus(),!0;var n=this._root.current.firstChild;return this.focusElement(Object(o.j)(this._root.current,n,!0))}return!1},t.prototype.focusElement=function(e){var t=this.props.onBeforeFocus;return!(t&&!t(e))&&(!!e&&(this._setActiveElement(e),this._activeElement&&this._activeElement.focus(),!0))},t.prototype.setFocusAlignment=function(e){this._focusAlignment=e},t.prototype._evaluateFocusBeforeRender=function(){var e=this._root.current,t=this._getDocument();if(t){var r=t.activeElement;if(r!==e){var n=Object(g.a)(e,r,!1);this._lastIndexPath=n?Object(o.d)(e,r):void 0}}},t.prototype._setParkedFocus=function(e){var t=this._root.current;t&&this._isParked!==e&&(this._isParked=e,e?(this.props.allowFocusRoot||(this._parkedTabIndex=t.getAttribute("tabindex"),t.setAttribute("tabindex","-1")),t.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(t.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):t.removeAttribute("tabindex")))},t.prototype._setActiveElement=function(e,t){var r=this._activeElement;this._activeElement=e,r&&(Object(o.m)(r)&&this._updateTabIndexes(r),r.tabIndex=-1),this._activeElement&&(this._focusAlignment&&!t||this._setFocusAlignment(e,!0,!0),this._activeElement.tabIndex=0)},t.prototype._tryInvokeClickForFocusable=function(e){if(e===this._root.current)return!1;do{if("BUTTON"===e.tagName||"A"===e.tagName||"INPUT"===e.tagName||"TEXTAREA"===e.tagName)return!1;if(this._isImmediateDescendantOfZone(e)&&"true"===e.getAttribute("data-is-focusable")&&"true"!==e.getAttribute("data-disable-click-on-enter"))return v(e),!0;e=Object(s.a)(e,I)}while(e!==this._root.current);return!1},t.prototype._getFirstInnerZone=function(e){if(!(e=e||this._activeElement||this._root.current))return null;if(Object(o.m)(e))return A[e.getAttribute("data-focuszone-id")];for(var t=e.firstElementChild;t;){if(Object(o.m)(t))return A[t.getAttribute("data-focuszone-id")];var r=this._getFirstInnerZone(t);if(r)return r;t=t.nextElementSibling}return null},t.prototype._moveFocus=function(e,t,r,n){void 0===n&&(n=!0);var a=this._activeElement,s=-1,l=void 0,c=!1,u=this.props.direction===i.a.bidirectional;if(!a||!this._root.current)return!1;if(this._isElementInput(a)&&!this._shouldInputLoseFocus(a,e))return!1;var d=u?a.getBoundingClientRect():null;do{if(a=e?Object(o.j)(this._root.current,a):Object(o.k)(this._root.current,a),!u){l=a;break}if(a){var p=t(d,a.getBoundingClientRect());if(-1===p&&-1===s){l=a;break}if(p>-1&&(-1===s||p<s)&&(s=p,l=a),s>=0&&p<0)break}}while(a);if(l&&l!==this._activeElement)c=!0,this.focusElement(l);else if(this.props.isCircularNavigation&&n)return e?this.focusElement(Object(o.j)(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(Object(o.k)(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return c},t.prototype._moveFocusDown=function(){var e=this,t=-1,r=this._focusAlignment.x;return!!this._moveFocus(!0,(function(n,a){var i=-1,o=Math.floor(a.top),s=Math.floor(n.bottom);return o<s?e._shouldWrapFocus(e._activeElement,k)?T:C:((-1===t&&o>=s||o===t)&&(t=o,i=r>=a.left&&r<=a.left+a.width?0:Math.abs(a.left+a.width/2-r)),i)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},t.prototype._moveFocusUp=function(){var e=this,t=-1,r=this._focusAlignment.x;return!!this._moveFocus(!1,(function(n,a){var i=-1,o=Math.floor(a.bottom),s=Math.floor(a.top),l=Math.floor(n.top);return o>l?e._shouldWrapFocus(e._activeElement,k)?T:C:((-1===t&&o<=l||s===t)&&(t=s,i=r>=a.left&&r<=a.left+a.width?0:Math.abs(a.left+a.width/2-r)),i)}))&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},t.prototype._moveFocusLeft=function(){var e=this,t=this._shouldWrapFocus(this._activeElement,M);return!!this._moveFocus(Object(c.a)(),(function(r,n){var a=-1;return(Object(c.a)()?parseFloat(n.top.toFixed(3))<parseFloat(r.bottom.toFixed(3)):parseFloat(n.bottom.toFixed(3))>parseFloat(r.top.toFixed(3)))&&n.right<=r.right&&e.props.direction!==i.a.vertical?a=r.right-n.right:t||(a=C),a}),void 0,t)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},t.prototype._moveFocusRight=function(){var e=this,t=this._shouldWrapFocus(this._activeElement,M);return!!this._moveFocus(!Object(c.a)(),(function(r,n){var a=-1;return(Object(c.a)()?parseFloat(n.bottom.toFixed(3))>parseFloat(r.top.toFixed(3)):parseFloat(n.top.toFixed(3))<parseFloat(r.bottom.toFixed(3)))&&n.left>=r.left&&e.props.direction!==i.a.vertical?a=n.left-r.left:t||(a=C),a}),void 0,t)&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},t.prototype._moveFocusPaging=function(e,t){void 0===t&&(t=!0),void 0===t&&(t=!0);var r=this._activeElement;if(!r||!this._root.current)return!1;if(this._isElementInput(r)&&!this._shouldInputLoseFocus(r,e))return!1;var n=Object(y.e)(r);if(!n)return!1;var a=-1,i=void 0,s=-1,l=-1,c=n.clientHeight,u=r.getBoundingClientRect();do{if(r=e?Object(o.j)(this._root.current,r):Object(o.k)(this._root.current,r)){var d=r.getBoundingClientRect(),p=Math.floor(d.top),h=Math.floor(u.bottom),f=Math.floor(d.bottom),m=Math.floor(u.top),g=this._getHorizontalDistanceFromCenter(e,u,d);if(e&&p>h+c||!e&&f<m-c)break;g>-1&&(e&&p>s?(s=p,a=g,i=r):!e&&f<l?(l=f,a=g,i=r):(-1===a||g<=a)&&(a=g,i=r))}}while(r);var v=!1;if(i&&i!==this._activeElement)v=!0,this.focusElement(i),this._setFocusAlignment(i,!1,!0);else if(this.props.isCircularNavigation&&t)return e?this.focusElement(Object(o.j)(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(Object(o.k)(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return v},t.prototype._setFocusAlignment=function(e,t,r){if(this.props.direction===i.a.bidirectional&&(!this._focusAlignment||t||r)){var n=e.getBoundingClientRect(),a=n.left+n.width/2,o=n.top+n.height/2;this._focusAlignment||(this._focusAlignment={x:a,y:o}),t&&(this._focusAlignment.x=a),r&&(this._focusAlignment.y=o)}},t.prototype._isImmediateDescendantOfZone=function(e){return this._getOwnerZone(e)===this._root.current},t.prototype._getOwnerZone=function(e){for(var t=Object(s.a)(e,I);t&&t!==this._root.current&&t!==this._getDocument().body;){if(Object(o.m)(t))return t;t=Object(s.a)(t,I)}return t},t.prototype._updateTabIndexes=function(e){!e&&this._root.current&&(this._defaultFocusElement=null,e=this._root.current,this._activeElement&&!Object(g.a)(e,this._activeElement)&&(this._activeElement=null)),this._activeElement&&!Object(o.n)(this._activeElement)&&(this._activeElement=null);for(var t=e&&e.children,r=0;t&&r<t.length;r++){var n=t[r];Object(o.m)(n)?"true"===n.getAttribute("data-is-focusable")&&(this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==n?"-1"!==n.getAttribute("tabindex")&&n.setAttribute("tabindex","-1"):(this._defaultFocusElement=n,"0"!==n.getAttribute("tabindex")&&n.setAttribute("tabindex","0"))):(n.getAttribute&&"false"===n.getAttribute("data-is-focusable")&&n.setAttribute("tabindex","-1"),Object(o.n)(n)?this.props.disabled?n.setAttribute("tabindex","-1"):this._isInnerZone||(this._activeElement||this._defaultFocusElement)&&this._activeElement!==n?"-1"!==n.getAttribute("tabindex")&&n.setAttribute("tabindex","-1"):(this._defaultFocusElement=n,"0"!==n.getAttribute("tabindex")&&n.setAttribute("tabindex","0")):"svg"===n.tagName&&"false"!==n.getAttribute("focusable")&&n.setAttribute("focusable","false")),this._updateTabIndexes(n)}},t.prototype._isElementInput=function(e){return!(!e||!e.tagName||"input"!==e.tagName.toLowerCase()&&"textarea"!==e.tagName.toLowerCase())},t.prototype._shouldInputLoseFocus=function(e,t){if(!this._processingTabKey&&e&&e.type&&D.indexOf(e.type.toLowerCase())>-1){var r=e.selectionStart,n=r!==e.selectionEnd,a=e.value,i=e.readOnly;if(n||r>0&&!t&&!i||r!==a.length&&t&&!i||this.props.handleTabKey&&(!this.props.shouldInputLoseFocusOnArrowKey||!this.props.shouldInputLoseFocusOnArrowKey(e)))return!1}return!0},t.prototype._shouldWrapFocus=function(e,t){return!this.props.checkForNoWrap||Object(o.o)(e,t)},t.prototype._portalContainsElement=function(e){return e&&!!this._root.current&&Object(b.a)(e,this._root.current)},t.prototype._getDocument=function(){return Object(_.a)(this._root.current)},t.defaultProps={isCircularNavigation:!1,direction:i.a.bidirectional},t}(a.Component)}])}));
//# sourceMappingURL=index.js.map