From dd96a33881812103baee6a9ffc8bca159312c37f Mon Sep 17 00:00:00 2001 From: Xavier Ogay Date: Sat, 1 Jun 2024 15:03:07 +0200 Subject: [PATCH] Updates --- asset-manifest.json | 12 ++++++------ index.html | 2 +- static/css/main.14f7c3ff.css.map | 1 - static/css/{main.14f7c3ff.css => main.63d78cbc.css} | 4 ++-- static/css/main.63d78cbc.css.map | 1 + static/js/{main.a26b0326.js => main.38cbab50.js} | 6 +++--- ...6.js.LICENSE.txt => main.38cbab50.js.LICENSE.txt} | 0 static/js/main.38cbab50.js.map | 1 + static/js/main.a26b0326.js.map | 1 - 9 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 static/css/main.14f7c3ff.css.map rename static/css/{main.14f7c3ff.css => main.63d78cbc.css} (93%) create mode 100644 static/css/main.63d78cbc.css.map rename static/js/{main.a26b0326.js => main.38cbab50.js} (99%) rename static/js/{main.a26b0326.js.LICENSE.txt => main.38cbab50.js.LICENSE.txt} (100%) create mode 100644 static/js/main.38cbab50.js.map delete mode 100644 static/js/main.a26b0326.js.map diff --git a/asset-manifest.json b/asset-manifest.json index f9e7737..02e218c 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { - "main.css": "/pitstop-plotters/static/css/main.14f7c3ff.css", - "main.js": "/pitstop-plotters/static/js/main.a26b0326.js", + "main.css": "/pitstop-plotters/static/css/main.63d78cbc.css", + "main.js": "/pitstop-plotters/static/js/main.38cbab50.js", "static/js/654.1947166c.chunk.js": "/pitstop-plotters/static/js/654.1947166c.chunk.js", "static/js/131.389ac623.chunk.js": "/pitstop-plotters/static/js/131.389ac623.chunk.js", "static/js/621.4684249a.chunk.js": "/pitstop-plotters/static/js/621.4684249a.chunk.js", @@ -82,12 +82,12 @@ "static/media/green.png": "/pitstop-plotters/static/media/green.ad8c436c42b21471d405.png", "static/media/red4.png": "/pitstop-plotters/static/media/red4.11013d93522b942af0a8.png", "index.html": "/pitstop-plotters/index.html", - "main.14f7c3ff.css.map": "/pitstop-plotters/static/css/main.14f7c3ff.css.map", - "main.a26b0326.js.map": "/pitstop-plotters/static/js/main.a26b0326.js.map", + "main.63d78cbc.css.map": "/pitstop-plotters/static/css/main.63d78cbc.css.map", + "main.38cbab50.js.map": "/pitstop-plotters/static/js/main.38cbab50.js.map", "453.b03e3c98.chunk.js.map": "/pitstop-plotters/static/js/453.b03e3c98.chunk.js.map" }, "entrypoints": [ - "static/css/main.14f7c3ff.css", - "static/js/main.a26b0326.js" + "static/css/main.63d78cbc.css", + "static/js/main.38cbab50.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index ba79975..eedba8d 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Intro to F1
\ No newline at end of file +Intro to F1
\ No newline at end of file diff --git a/static/css/main.14f7c3ff.css.map b/static/css/main.14f7c3ff.css.map deleted file mode 100644 index 232eb16..0000000 --- a/static/css/main.14f7c3ff.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.14f7c3ff.css","mappings":"uHAAA,WACE,wBAA2B,CAG3B,iBAAkB,CADlB,eAAmB,CADnB,8FAGF,CAEA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAKF,CAEA,KACE,uEAEF,CAEA,GAEE,UAAY,CACZ,mCAAqC,CACrC,aAAc,CAHd,iBAIF,CCzBA,WACI,kBAAqB,CAGrB,iBAAkB,CADlB,eAAmB,CADnB,qLAGJ,CACA,KACI,uCAA6C,CAE7C,eACJ,CAEA,GAII,aAAc,CACd,eACJ,CAEA,MAPI,2CAAiD,CACjD,iBAAkB,CAClB,eAYJ,CAPA,GAII,cAAe,CACf,gBAAiB,CACjB,YACJ,CAEA,EAMI,UAAW,CALX,uCAA6C,CAE7C,eAAgB,CAEhB,gBAEJ,CAEA,SALI,cAAe,CAFf,iBAcJ,CAPA,OACI,4BAAiC,CAEjC,eAAgB,CAEhB,gBAAiB,CACjB,wBACJ,CAEA,EACI,oBACJ,CAEA,yBAII,YAAa,CAHb,iBAAkB,CAClB,4BAA6B,CAC7B,WAEJ,CAEA,uBACI,WAAY,CAEZ,uBAAwB,CADxB,UAEJ,CC/DA,WACI,4BAA+B,CAG/B,iBAAkB,CADlB,eAAmB,CADnB,8FAGJ,CACA,wBAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKJ,CAEA,uBACI,YAAa,CAEb,WAAY,CADZ,6BAEJ,CAEA,wBAGI,kBAAmB,CADnB,WAAa,CAEb,eAAgB,CAHhB,iBAIJ,CAEA,mBAUI,oBAAqB,CADrB,kBAAmB,CAHnB,YAAa,CACb,qBAAsB,CACtB,sBAAuB,CAJvB,QAAS,CAHT,aAAc,CAUd,WAAa,CATb,iBAAkB,CAClB,KAAM,CAEN,SAAU,CAOV,SACJ,CAEA,sBAMI,gBAAiB,CACjB,SACJ,CAEA,8CALI,WAAY,CAFZ,MAAO,CAFP,iBAAkB,CAClB,KAAM,CAEN,UAcJ,CARA,wBAMI,0BAAiC,CACjC,SACJ,CAEA,wBAEI,UAAY,CAMZ,6BAA+B,CAF/B,eAAgB,CAChB,gBAAiB,CAHjB,cAAe,CACf,UAAY,CAJZ,iBAAkB,CAElB,iBAMJ,CAEA,0BACI,QACJ,CAEA,+BAOI,0BAAiC,CACjC,WAAY,CACZ,iBAAkB,CAPlB,WAAY,CAIZ,UAAW,CAIX,cAAe,CALf,cAAe,CADf,iBAAkB,CAHlB,cAAe,CAEf,UAAW,CAQX,YACJ,CC9FA,8BAIE,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKF,CACA,8BACE,QACF,CACA,2BACE,YAAa,CAEb,WAAY,CADZ,6BAEF,CAEA,gCACE,iBAAkB,CAClB,yBACF,CAEA,oCACE,kBAAmB,CAEnB,gBAAkB,CADlB,2DAEF,CAEA,6BACE,UAAY,CACZ,oCAAwC,CAExC,eAAiB,CACjB,cAAe,CACf,eAAgB,CAHhB,wBAIF,CAEA,qCAGE,oCAAwC,CADxC,eAAiB,CAEjB,kBACF,CAEA,wCAKE,oCAAwC,CADxC,eAAiB,CAFjB,kBAAmB,CACnB,gBAAiB,CAGjB,UACF,CAEA,kCACE,YAAa,CACb,WACF,CAEA,+BACE,YAAa,CACb,kBAAmB,CACnB,iBAAkB,CAClB,yBAAkB,CAAlB,sBAAkB,CAAlB,iBACF,CAEA,4BACE,SACF,CAEA,4BAKE,kBAAmB,CAJnB,YAAa,CACb,qBAAsB,CACtB,6BAA8B,CAC9B,iBAAkB,CAGlB,gBAAiB,CADjB,UAEF,CAEA,2BAIE,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CAKnB,WAAY,CADZ,WAAY,CAHZ,sBAAuB,CAEvB,UAGF,CAEA,gCAEE,UAAW,CACX,WAAa,CACb,kBAAmB,CACnB,iBAAkB,CAJlB,UAKF,CCnGA,wBAGI,kBAAmB,CAFnB,YAAa,CAGb,QAAS,CAFT,sBAGJ,CAGA,yBAEI,kBAAmB,CAEnB,UAAW,CAHX,YAAa,CAEb,uBAEJ,CAEA,+BACI,qBACJ,CAEA,yBACI,oCAAwC,CACxC,eACJ,CAEA,kBASI,uBAAwB,CACxB,eAAgB,CAQhB,eAAgB,CANhB,cAAe,CAKf,WAAY,CAJZ,YAAa,CAVb,WAAY,CAQZ,UALJ,CAgBA,iDAEI,eAAgB,CAChB,kBAAmB,CAFnB,WAGJ,CAEA,oCAEI,eAAgB,CAChB,kBAAmB,CAFnB,WAGJ,CAEA,wCACI,uBAAwB,CACxB,eAAgB,CAGhB,0FAAsD,CACtD,uBAAwB,CACxB,WAAY,CACZ,cAAe,CALf,YAAa,CACb,WAKJ,CAEA,oCAGI,0FAAsD,CACtD,uBAAwB,CACxB,WAAY,CAKZ,gCAAoC,CAJpC,cAAe,CALf,YAAa,CACb,WAKJ,CAMA,kBAEI,kBAAmB,CADnB,eAEJ,CCrFA,4BAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKJ,CAEA,0BACI,YAAa,CAEb,WAAY,CADZ,6BAEJ,CAEA,2BAGI,kBAAmB,CACnB,eAAgB,CAHhB,iBAIJ,CAEA,6BACI,QACJ,CAEA,2BACI,YAAa,CACb,WAAY,CACZ,WACJ,CAEA,4BAEI,qBAKJ,CAEA,yDAJI,kBAAmB,CAJnB,YAAa,CAGb,WAAY,CAEZ,sBAAuB,CAHvB,SAcJ,CARA,6BAII,6BAIJ,CAEA,+BACI,QAAO,CAEP,qBAIJ,CAEA,2DALI,kBAAmB,CAFnB,YAAa,CAGb,sBAAuB,CACvB,UAUJ,CAPA,4BACI,QAAO,CAKP,QACJ,CAEA,+BAMI,WAAY,CAHZ,QAAS,CAKT,WAAa,CAPb,iBAAkB,CAClB,OAAQ,CAER,8BAAgC,CAGhC,UAAW,CAFX,UAIJ,CAEA,iCAGI,aAAc,CADd,WAAY,CAEZ,UAAY,CAEZ,iBAAkB,CALlB,UAMJ,CAEA,kCAMI,UAAY,CAHZ,cAAe,CAIf,eAAiB,CALjB,kBAAoB,CAMpB,gBAAkB,CAHlB,cAAe,CAJf,iBAAkB,CAGlB,UAKJ,CAEA,wBAEI,UAAc,CADd,cAAgB,CAMhB,kBAAmB,CAFnB,WAAY,CAFZ,iBAKJ,CChHA,qCAGI,oBAAqB,CAFrB,YAAa,CAOb,WAAY,CANZ,6BAA8B,CAE9B,eAAgB,CAEhB,wBAAyB,CACzB,UAEJ,CAEA,IAEI,cAAe,CACf,aAAc,CAFd,8BAGJ,CCfA,+BAKI,iBAAkB,CAJlB,YAAa,CACb,cAAe,CAOf,qCAAyC,CANzC,4BAA6B,CAI7B,oBAAsB,CADtB,gBAAiB,CAEjB,gBAAiB,CAJjB,YAMJ,CAEA,4BASI,sBAAuB,CAJvB,iBAAkB,CAElB,YAAa,CANb,aAAc,CAOd,6BAA8B,CAN9B,UAAW,CACX,kBAAmB,CAOnB,eACJ,CAEA,+BACI,aAAc,CAMd,eAAiB,CACjB,SAAU,CAJV,sBAAuB,CAMvB,oBAAoB,CALpB,WAAY,CAHZ,iBAAkB,CAOlB,yBAA0B,CAH1B,UAKJ,CACA,4BAII,YAAa,CAFb,QAAS,CACT,WAAY,CAFZ,UAIJ,CAEA,6BAEI,cAAgB,CADhB,eAAiB,CAKjB,UAAW,CAHX,UAAe,CAEf,UAEJ,CAEA,6BAOI,UAAc,CANd,oCAAwC,CACxC,cAAgB,CAIhB,mBAAoB,CADpB,UAAW,CAFX,cAAe,CACf,SAIJ,CAEA,EACI,UACJ,CCjEA,KACI,qBACJ,CAEA,oBACI,cAAe,CACf,gBAAiB,CACjB,SACJ,CAEA,OACI,cAAe,CACf,gBAAiB,CACjB,UACJ,CAEA,QACI,cAAe,CACf,gBAAiB,CACjB,YAAY,CACZ,eACJ,CAGA,KAII,WAAY,CACZ,SAAY,CACZ,yBAA0B,CAL1B,qBAAwB,CACxB,cAAc,CACd,eAIJ,CAIA,kCACI,gBAAiB,CACjB,UACJ,CCtCA,0BAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKJ,CAEA,wBACI,YAAa,CAEb,WAAY,CADZ,6BAEJ,CAEA,yBAKI,kBAAmB,CAHnB,YAAa,CACb,qBAAsB,CACtB,WAAa,CAGb,WAAY,CADZ,eAAgB,CALhB,iBAOJ,CAEA,qBACE,QAAO,CACP,WACF,CAEA,wBACE,QAAO,CACP,WACF,CAEA,2BACI,QACJ,CAOA,KACE,QACF,CAEA,6BAGE,aAAc,CADd,WAAY,CAEZ,UAAY,CAHZ,UAIF,CCzDA,iCAEI,qBAAuB,CADvB,iBAGJ,CCJA,4BAOI,sBAAuB,CAJvB,iBAAkB,CAClB,8BAAwC,CAExC,qBAAsB,CALtB,YAAa,CAOb,WAAY,CANZ,iBAAkB,CAGlB,UAIJ,CAEA,kCACI,YAAa,CAEb,QAAO,CADP,cAAe,CAIf,WAAY,CADZ,kBAAmB,CADnB,iBAGJ,CAEA,+BACI,YAAa,CAEb,QAAO,CADP,qBAAsB,CAEtB,eAAgB,CAChB,kBACJ,CAEA,0BAKI,aAAc,CAJd,eAAgB,CAChB,eAAiB,CACjB,eAAgB,CAChB,YAAa,CAEb,UACJ,CAEA,yBAEI,UAAc,CADd,gBAAkB,CAElB,SACJ,CAEA,oCAEI,aAAc,CADd,cAAe,CAEf,SACJ,CAEA,mCAGI,kBAAmB,CADnB,YAAa,CADb,QAAO,CAGP,sBAEJ,CAEA,iCAGI,aAAc,CADd,UAEJ,CAEA,gCAEI,WAAY,CAKZ,UAAY,CADZ,eAAgB,CAHhB,iBAAkB,CAClB,OAAQ,CACR,KAAM,CAJN,UAOJ,CCvEA,yCAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKF,CAEA,uCAME,kBAAmB,CAHnB,qBAAsB,CACtB,YAAa,CACb,qBAAsB,CAHtB,WAAY,CAKZ,sBAAuB,CANvB,UAOF,CAEA,gCACE,YAAa,CAEb,WAAY,CADZ,6BAA8B,CAE9B,UACF,CAEA,iCAGE,kBAAmB,CAFnB,YAAa,CAGb,eAAgB,CAFhB,iBAGF,CAEA,8BACE,QAAO,CACP,gBACF,CAEA,+BACE,QAAO,CACP,eACF,CAEA,mCACE,QACF,CAEA,EACE,UAAY,CACZ,eAAgB,CAChB,mBACF,CAEA,sCAQE,UAAY,CALZ,QAAS,CAFT,iBAAkB,CAMlB,iBAAkB,CALlB,QAAS,CAET,0BAA2B,CAE3B,UAAW,CADX,SAIF,CAEA,yCAEE,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CACvB,eAAgB,CAChB,UACF,CAEA,gCAGE,uBAAwB,CACxB,eAAgB,CAEhB,eAAiB,CADjB,WAAY,CAHZ,iBAAkB,CAMlB,UAAY,CADZ,YAAa,CAEb,mCAAoC,CARpC,SASF,CAEA,sDACE,uBAAwB,CACxB,eAAgB,CAGhB,eAAiB,CACjB,cAAe,CAFf,WAAY,CADZ,UAIF,CAEA,kDAGE,eAAiB,CACjB,cAAe,CAFf,WAAY,CADZ,UAIF,CAEA,mCAGE,UAAY,CAFZ,cAAe,CACf,eAEF,CC3GF,qCAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKJ,CAGA,+CAEI,qBACJ,CAEA,mCACI,YAAa,CAEb,WAAY,CADZ,6BAEJ,CAEA,oCAKI,kBAAmB,CAJnB,YAAa,CACb,qBAAsB,CAEtB,WAAa,CAEb,eAAgB,CAHhB,iBAIJ,CAEA,uCAEI,UAAW,CADX,cAAe,CAGf,kBAAmB,CADnB,gBAAiB,CAEjB,SACJ,CAEA,sCACI,QACJ,CAGA,yCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,yCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,yCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,8CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,gDACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,uCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,4CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,2CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,wCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,6CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,wCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,qCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,4CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,8CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,8CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,4CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,gDACI,YAAa,CACb,cAAe,CACf,UACJ,CAGA,iCACI,iBACJ,CAGA,2CACI,aACJ,CAEA,0CACI,aACJ,CAEA,yCACI,aACJ,CAEA,yCACI,aACJ,CAEA,8CACI,aACJ,CAEA,gDACI,aACJ,CAEA,wCACI,aACJ,CAEA,0CACI,aACJ,CAEA,0CACI,aACJ,CAEA,4CACI,aACJ,CAEA,0CACI,aACJ,CAEA,wCACI,aACJ,CAEA,0CACI,aACJ,CAEA,6CACI,aACJ,CAEA,wCACI,aACJ,CAEA,0CACI,aACJ,CAEA,qCACI,aACJ,CAEA,4CACI,aACJ,CAEA,8CACI,aACJ,CAEA,8CACI,aACJ,CAEA,4CACI,aACJ,CAEA,gDACI,aACJ,CAGA,sCAKI,oBAAoC,CAEpC,sBAA0C,CAI1C,yBAA0B,CAH1B,6BAAuC,CACvC,UAAY,CANZ,MAAO,CAOP,YAAa,CAGb,mBAAoB,CAZpB,iBAAkB,CAClB,OAAQ,CAER,0BAA2B,CAQ3B,UAEJ,CAEA,yCACI,eACJ,CAEA,yCAII,aAAyB,CAHzB,eAAgB,CAEhB,QAAS,CADT,SAGJ,CAEA,yCACI,iBACJ,CChTA,sBAMI,wBAAyB,CAMzB,yBAA0B,CAL1B,8BAAwC,CAFxC,UAAW,CAFX,MAAO,CAQP,UAAY,CADZ,eAAgB,CAThB,iBAAkB,CAClB,KAAM,CAON,yBAA2B,CAL3B,UAAW,CAIX,YAKJ,CAEA,4BAEI,SAAU,CADV,WAEJ,CAEA,yBAKI,YAAa,CACb,qBAAsB,CAFtB,WAAY,CAGZ,sBAAuB,CANvB,eAAgB,CAEhB,QAAS,CADT,SAMJ,CAEA,yBAEI,4BAA8B,CAC9B,UAAY,CACZ,cAAe,CAEf,SAAU,CALV,YAAa,CAMb,+BAAkC,CAFlC,kBAGJ,CAEA,+BACI,SACJ,CAGA,iBAUI,kBAAmB,CAJnB,qBAAuB,CAEvB,yBAA0B,CAI1B,SAAU,CAEV,cAAe,CALf,YAAa,CAIb,eAAiB,CARjB,WAAY,CAMZ,sBAAuB,CAVvB,iBAAkB,CAElB,OAAQ,CADR,OAAQ,CAKR,0BAA2B,CAH3B,UAWJ","sources":["index.css","Styles.module.css","Welcome/Welcome.module.css","Leaderboard/Leaderboard.module.css","Leaderboard/ProgressBar/ProgressBar.module.css","HallOfFame/HallOfFame.module.css","HallOfFame/HallOfFameSelection.module.css","HallOfFame/HallOfFameInfo.module.css","HallOfFame/HallOfFameSpider.module.css","Circuits/Circuits.module.css","Circuits/CircuitsMap/CircuitsMap.module.css","Circuits/CircuitInfo/CircuitInfo.module.css","SeasonsEvolution/SeasonsEvolution.module.css","DriverTeamRelations/DriverTeamRelations.module.css","Menu/Menu.module.css"],"sourcesContent":["@font-face {\n font-family: 'MyCustomFont';\n src: url('../public/fonts/Formula1-Italic.ttf') format('ttf');\n font-weight: normal;\n font-style: normal;\n}\n\nbody {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\nh1 {\n text-align: center;\n color: white;\n font-family: MyCustomFont, sans-serif;\n font-size: 10%;\n}\n","@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans&display=swap');\n@font-face {\n font-family: 'f1Font';\n src: url('https://rawcdn.githack.com/com-480-data-visualization/pitstop-plotters/e387d68fc4919d6f938e748e9a867d4ab25e767a/website/src/fonts/Formula1-Regular_web_0.woff') format('woff');\n font-weight: normal;\n font-style: normal;\n}\nbody {\n font-family: 'f1Font','Noto Sans', sans-serif;\n margin: 0;\n overflow: hidden;\n}\n\nh1 {\n font-family: \"f1Font\",\"IBM Plex Sans\", sans-serif;\n font-style: normal;\n font-weight: 700;\n font-size: 7vw;\n line-height: 7vw;\n}\n\nh2 {\n font-family: \"f1Font\",'IBM Plex Sans', sans-serif;\n font-style: normal;\n font-weight: 700;\n font-size: 60px;\n line-height: 78px;\n margin-top: 0;\n}\n\np {\n font-family: \"f1Font\",'Noto Sans', sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 22px;\n color: #333;\n}\n\nbutton {\n font-family: \"f1Font\",'Noto Sans';\n font-style: normal;\n font-weight: 700;\n font-size: 16px;\n line-height: 100%;\n text-transform: uppercase;\n}\n\na {\n text-decoration: none;\n}\n\n.container {\n overflow-y: scroll;\n scroll-snap-type: y mandatory;\n width: 100vw;\n height: 100vh;\n}\n\n.section {\n height: 100%;\n width: 100%;\n scroll-snap-align: start;\n}","@font-face {\n font-family: 'Formula1-Regular';\n src: url('../../public/fonts/Formula1-Italic.ttf') format('ttf');\n font-weight: normal;\n font-style: normal;\n}\n.welcome {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.content {\n position: relative;\n flex-grow : 1;\n align-items: center;\n overflow: hidden;\n}\n\n.f1 {\n margin-top: 3%;\n position: absolute;\n top: 0;\n left: 15%; /* Centering f1, adjust this value based on your layout */\n width: 70%; /* Adjust width as necessary */\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n align-content: center;\n opacity: 0.75; /* Maintain opacity setting */\n z-index: 3; /* Higher z-index to be on top */\n}\n\n.video {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 1;\n}\n\n.overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0,0,0,0.5); /* Add a semi-transparent overlay */\n z-index: 2;\n}\n\n.text_w {\n position: absolute;\n color: #ffff;\n text-align: center;\n margin-top: 35%;\n opacity: 0.7;\n margin-left: 10%;\n margin-right: 10%;\n font-family: f1Font, sans-serif;\n}\n\n.boder_img {\n width: 5%;\n}\n\n.floatingButton {\n position: fixed;\n bottom: 20px;\n right: 20px;\n padding: 10px 20px;\n font-size: 16px;\n color: #fff;\n background-color: rgba(0,0,0,0.5);\n border: none;\n border-radius: 5px;\n cursor: pointer;\n z-index: 1000;\n}",".template {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n.boder_img {\n width: 5%;\n}\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.leaderboard {\n position: relative;\n transform: translate(25px);\n}\n\n.leaderboardItem {\n border-radius: 10px;\n transition: width 0.5s ease-out, background-color 0.3s ease-out;\n margin-top: -0.3em;\n}\n\n.itemName {\n color: white;\n font-family: \"IBM Plex Sans\", sans-serif;\n text-transform: uppercase;\n font-weight: bold;\n margin-block: 0;\n margin-left: 8px;\n}\n\n.leaderboardScore {\n margin: 0;\n font-weight: bold;\n font-family: \"IBM Plex Sans\", sans-serif;\n margin-left: -45px;\n}\n\n.leaderboardPosition {\n margin: 0;\n margin-left: -0.5em;\n text-align: right;\n font-weight: bold;\n font-family: \"IBM Plex Sans\", sans-serif;\n width: 35px;\n}\n\n.itemContainer {\n display: flex;\n margin: auto;\n}\n\n.container {\n display: flex;\n flex-direction: row;\n position: relative;\n width: fit-content;\n}\n\n.halfDiv {\n width: 60%;\n}\n\n.content{\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-bottom: 1em;\n align-items: center;\n width: 100%;\n max-width: 1200px;\n}\n\n.leader{\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n}\n\n.centerImage {\n width: 33px;\n height: 95%;\n opacity: 0.75;\n padding-left: -70em;\n padding-right: 4em;\n}\n\n",".bar {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 12px;\n}\n\n\n.play {\n display: flex;\n align-items: center;\n transition: all 0.3s ease;\n color: #ccc;\n}\n\n.play:hover {\n transform: scale(1.15);\n}\n\n.year {\n font-family: \"IBM Plex Sans\", sans-serif;\n font-weight: 700;\n}\n\ninput[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 200px;\n cursor: pointer;\n outline: none;\n}\n\ninput[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%; /* Updated to fill available space */\n cursor: pointer;\n outline: none;\n}\n\ninput[type=\"range\"] {\n height: 15px;\n background: #ccc;\n border-radius: 16px;\n}\n\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n height: 15px;\n background: #ccc;\n border-radius: 16px;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n height: 15px;\n background: #ccc;\n border-radius: 16px;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n height: 100px; /* Adjust height as needed */\n width: 100px; /* Adjust width as needed */\n background: url('../../img/f1_t.png') no-repeat center;\n background-size: contain; /* Ensure the image fits within the thumb */\n border: none; /* Remove border to avoid cropping */\n cursor: pointer;\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n height: 100px; /* Adjust height as needed */\n width: 100px; /* Adjust width as needed */\n background: url('../../img/f1_t.png') no-repeat center;\n background-size: contain; /* Ensure the image fits within the thumb */\n border: none; /* Remove border to avoid cropping */\n cursor: pointer;\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n box-shadow: -800px 0 0 800px #AAAAAA;\n}\n\ninput[type=\"range\"] {\n overflow: hidden;\n border-radius: 16px;\n}",".template {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.content {\n position: relative;\n flex-grow : 1;\n align-items: center;\n overflow: hidden;\n}\n\n.boder_img {\n width: 5%;\n}\n\n.content {\n display: flex;\n flex-grow: 1;\n height: 100%;\n}\n\n.leftSide {\n display: flex;\n flex-direction: column;\n width: 50%;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.rightSide {\n width: 50%;\n height: 100%;\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n justify-content: center;\n\n}\n\n.rightBottom {\n flex: 6; /* Takes 60% of the vertical space */\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%; /* Ensures full width within the parent container */\n}\n\n.rightTop {\n flex: 4; /* Takes 40% of the vertical space */\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%; /* Ensures full width within the parent container */\n margin: 0;\n}\n\n.centerImage {\n position: absolute;\n top: 50%; /* Adjust these to center the image */\n left: 50%;\n transform: translate(-50%, -50%); /* Centers the image exactly between the divs */\n z-index: 10; /* Ensures the image is above other elements */\n height: 100%;\n width: 34px;\n opacity: 0.75;\n}\n\n.centerDivider {\n width: 100%;\n height: 33px; /* Adjust based on your image's aspect ratio */\n display: block; /* Ensures it doesn't have extra space around it */\n opacity: 0.8;\n /* padding on left*/\n padding-left: 33px;\n}\n\n.titleContainer {\n text-align: center;\n margin-bottom: 0.1em;\n font-size: 28px;\n width: 100%;\n padding-top: 5%;\n color: white;\n font-weight: bold;\n margin-top: -0.5em;\n}\n\n.desc{\n font-size: 0.6em;\n color: #CCCCCC;\n text-align: center;\n margin: 0;\n padding: 5em;\n margin-top: -3em;\n margin-bottom: -6em;\n}\n",".imageRow {\n display: flex;\n justify-content: space-between; /* Distributes space evenly between images */\n align-items: flex-end; /* Keeps images aligned at the bottom */\n overflow-x: auto; /* Adds horizontal scrolling if needed */\n /* Adds padding around the images */\n padding: 20px 10px 0 20px;\n width: 100%;\n height: 100%;\n}\n\nimg {\n transition: all 0.3s ease-in-out; /* Smooth transition for size and spacing */\n cursor: pointer; /* Indicates that the images are clickable */\n flex-shrink: 0; /* Prevents images from shrinking */\n}\n",".divInfo {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-around;\n padding: 10px;\n border-radius: 8px;\n margin-left: 5rem;\n margin-bottom: -0.5rem;\n margin-top: -5rem;\n font-size: calc(0.5vw + 0.5vh + 0.25vmin);\n}\n\n.item {\n flex: 1 1 auto;\n margin: 5px;\n padding-inline: 5px;\n /*border: 1px solid #eee;*/\n border-radius: 5px;\n /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n text-align: left;\n}\n\n.name h1 {\n font-size: 2em; /* Adjust heading size relatively larger */\n text-align: center; /* Center the title text */\n margin: 1px 1px;\n justify-content: center;\n padding: 1px;\n width: 100%;\n font-weight: bold;\n height: 5%;\n text-decoration: underline;\n margin-bottom: -40px;\n}\n.name {\n width: 100%;\n margin: 0;\n padding: 1px;\n display: flex;\n}\n\n.label {\n font-weight: bold;\n font-size: 0.6em; /* Relative to container's base font size */\n margin: 1px 1px;\n /*Make text fill width of container */\n width: 100%;\n height: 10%;\n}\n\n.value {\n font-family: 'IBM Plex Sans', sans-serif;\n font-size: 0.5em; /* Smaller and relative to container's base font size */\n margin: 1px 5px;\n width: 10%;\n height: 10%;\n font-weight: lighter;\n color: #CCCCCC;\n}\n\np{\n margin: 1px;\n}\n\n\n","body {\n background-color: #222;\n}\n\ncircle, line, polygon {\n stroke: #E3E3E3;\n stroke-width: 3px;\n fill:none;\n}\n\ncircle {\n stroke: #E3E3E3;\n stroke-width: 1px;\n opacity: 0.5;\n}\n\npolygon {\n stroke: #FF1A2D;\n stroke-width: 2px;\n fill:#EF1A2D;\n fill-opacity:.3;\n}\n\n\ntext {\n font-family: 'Helvetica';\n font-size:12px;\n font-weight: bold;\n stroke: none;\n fill:#CCCCCC;\n alignment-baseline: middle;\n}\n\n\n\nline.axis {\n stroke-width: 1px;\n opacity: .5;\n}",".circuits {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.content {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-grow : 1;\n align-items: center;\n overflow: hidden;\n height: 100%;\n}\n\n.top {\n flex: 3;\n flex-grow: 1;\n}\n\n.bottom {\n flex: 1;\n flex-grow: 1;\n}\n\n.boder_img {\n width: 5%;\n}\n\n/* html {\n font-family: system-ui, sans-serif;\n font-size: 1.25rem;\n} */\n\nbody {\n margin: 0;\n}\n\n.centerImage {\n width: 100%;\n height: 33px;\n display: block; /* Ensures it doesn't have extra space around it */\n opacity: 0.8;\n}",".mapContainer {\n position: relative;\n border: 1px solid white;\n /* background: #f5f5f5; */\n}",".infobox {\n display: flex;\n padding-left: 20px;\n border-radius: 8px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n width: 100%;\n box-sizing: border-box;\n align-items: flex-start;\n height: 100%;\n}\n\n.infoContainer {\n display: flex;\n flex-wrap: wrap;\n flex: 4;\n position: relative; /* Add this line */\n padding-right: 33px;\n height: 100%;\n}\n\n.infoColumn {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 200px; /* Ensure a minimum width for responsiveness */\n padding-right: 10px;\n}\n\n.title {\n font-size: 1.8em;\n font-weight: bold;\n margin-bottom: 0;\n margin-top: 0;\n color: #F0F0F0;\n width: 100%; /* Make sure title takes full width */\n}\n\n.info {\n font-size: 0.85rem;\n color: #CCCCCC;\n padding: 0;\n}\n\n.infoDescription {\n font-size: 1rem;\n color: #F0F0F0;\n padding: 0;\n}\n\n.imageContainer {\n flex: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n /* margin-left: 20px; */\n}\n\n.circuitImage {\n /* max-width: 100%; */\n width: auto;\n height: 11.8em;\n}\n\n.centerImage {\n width: 33px; /* Set strict width */\n height: 100%; /* Make height 100% of parent */\n position: absolute; /* Position it absolutely within the parent */\n right: 0; /* Align to the left */\n top: 0; /* Align to the top */\n overflow: hidden; /* Hide overflow */\n opacity: 0.8;\n}\n",".seasonevolution {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n }\n \n .plotContainer {\n width: 100%;\n height: 80vh; /* Adjust height as necessary */\n box-sizing: border-box; /* Ensures border is included in element's dimensions */\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n \n .border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n width: 100%;\n }\n \n .content {\n display: flex;\n position: relative;\n align-items: center;\n overflow: hidden;\n }\n \n .left {\n flex: 3;\n margin-top: 100px;\n }\n \n .right {\n flex: 2;\n margin-top: 20px;\n }\n \n .boder_img {\n width: 5%;\n }\n \n p {\n color: white;\n font-size: 1.5em;\n padding-right: 100px;\n }\n \n .titleWrapper {\n position: absolute;\n top: 10px; /* Adjust this value as needed */\n left: 50%;\n transform: translateX(-50%);\n z-index: 1; /* Ensure it is on top */\n width: 100%;\n text-align: center;\n color: white;\n }\n \n .sliderContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 20px;\n width: 100%; /* Ensures the slider container takes the full width */\n }\n \n .slider {\n width: 90%; /* Adjust width to take nearly full width, providing some margin */\n margin-right: 10px;\n -webkit-appearance: none; /* Override default appearance */\n appearance: none; /* Override default appearance */\n height: 10px; /* Adjust the height */\n background: white; /* White background */\n outline: none; /* Remove outline */\n opacity: 0.7; /* Set transparency */\n transition: opacity .15s ease-in-out; /* Transition effect */\n }\n \n .slider::-webkit-slider-thumb {\n -webkit-appearance: none; /* Override default appearance */\n appearance: none; /* Override default appearance */\n width: 25px; /* Adjust the width */\n height: 25px; /* Adjust the height */\n background: white; /* White thumb */\n cursor: pointer; /* Pointer cursor on hover */\n }\n \n .slider::-moz-range-thumb {\n width: 25px; /* Adjust the width */\n height: 25px; /* Adjust the height */\n background: white; /* White thumb */\n cursor: pointer; /* Pointer cursor on hover */\n }\n \n .yearLabel {\n font-size: 18px;\n font-weight: bold;\n color: white; /* White text color */\n }\n ","/* Template styling */\n.template {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n\n/* Example CSS */\n#driverteamrelation {\n /* Add necessary styles */\n border: 1px solid black;\n}\n\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.content {\n display: flex;\n flex-direction: column;\n position: relative;\n flex-grow : 1;\n align-items: center;\n overflow: hidden;\n}\n\n.content h1 {\n font-size: 2rem;\n color: #fff;\n margin-top: -1rem;\n margin-bottom: -2em;\n padding: 0;\n}\n\n.boder_img {\n width: 5%;\n}\n\n/* Define classes for each team with their respective colors */\n.team-McLaren {\n fill: #FF8700;\n stroke: #FF8700;\n opacity: 0.8;\n}\n\n.team-Mercedes {\n fill: #00D2BE;\n stroke: #00D2BE;\n opacity: 0.8;\n}\n\n.team-Renault {\n fill: #FFF500;\n stroke: #FFF500;\n opacity: 0.8;\n}\n\n.team-Ferrari {\n fill: #DC0000;\n stroke: #DC0000;\n opacity: 0.8;\n}\n\n.team-Aston-Martin {\n fill: #006F62;\n stroke: #006F62;\n opacity: 0.8;\n}\n\n.team-Alpine-F1-Team {\n fill: #0090FF;\n stroke: #0090FF;\n opacity: 0.8;\n}\n\n.team-Lotus {\n fill: #FFB800;\n stroke: #FFB800;\n opacity: 0.8;\n}\n\n.team-Caterham {\n fill: #00352F;\n stroke: #00352F;\n opacity: 0.8;\n}\n\n.team-Lotus-F1 {\n fill: #FFB800;\n stroke: #FFB800;\n opacity: 0.8;\n}\n\n.team-Alfa-Romeo {\n fill: #900000;\n stroke: #900000;\n opacity: 0.8;\n}\n\n.team-Williams {\n fill: #005AFF;\n stroke: #005AFF;\n opacity: 0.8;\n}\n\n.team-Virgin {\n fill: #E31837;\n stroke: #E31837;\n opacity: 0.8;\n}\n\n.team-Marussia {\n fill: #D40000;\n stroke: #D40000;\n opacity: 0.8;\n}\n\n.team-Force-India {\n fill: #FF8700;\n stroke: #FF8700;\n opacity: 0.8;\n}\n\n.team-Sauber {\n fill: #006EFF;\n stroke: #006EFF;\n opacity: 0.8;\n}\n\n.team-Red-Bull {\n fill: #1E41FF;\n stroke: #1E41FF;\n opacity: 0.8;\n}\n\n.team-HRT {\n fill: #BEBEBE;\n stroke: #BEBEBE;\n opacity: 0.8;\n}\n\n.team-Toro-Rosso {\n fill: #0032FF;\n stroke: #0032FF;\n opacity: 0.8;\n}\n\n.team-Haas-F1-Team {\n fill: #787878;\n stroke: #787878;\n opacity: 0.8;\n}\n\n.team-Racing-Point {\n fill: #F596C8;\n stroke: #F596C8;\n opacity: 0.8;\n}\n\n.team-AlphaTauri {\n fill: #2B4562;\n stroke: #2B4562;\n opacity: 0.8;\n}\n\n.team-Manor-Marussia {\n fill: #E40000;\n stroke: #E40000;\n opacity: 0.8;\n}\n\n/* Links opacity */\n.link {\n stroke-opacity: 0.4;\n}\n\n/* Text color */\n.text-McLaren {\n color: #FF8700;\n}\n\n.text-Mercedes {\n color: #00D2BE;\n}\n\n.text-Renault {\n color: #FFF500;\n}\n\n.text-Ferrari {\n color: #DC0000;\n}\n\n.text-Aston-Martin {\n color: #006F62;\n}\n\n.text-Alpine-F1-Team {\n color: #0090FF;\n}\n\n.text-Lotus {\n color: #FFB800;\n}\n\n.text-Caterham {\n color: #00352F;\n}\n\n.text-Lotus-F1 {\n color: #FFB800;\n}\n\n.text-Alfa-Romeo {\n color: #900000;\n}\n\n.text-Williams {\n color: #005AFF;\n}\n\n.text-Virgin {\n color: #E31837;\n}\n\n.text-Marussia {\n color: #D40000;\n}\n\n.text-Force-India {\n color: #FF8700;\n}\n\n.text-Sauber {\n color: #006EFF;\n}\n\n.text-Red-Bull {\n color: #1E41FF;\n}\n\n.text-HRT {\n color: #BEBEBE;\n}\n\n.text-Toro-Rosso {\n color: #0032FF;\n}\n\n.text-Haas-F1-Team {\n color: #787878;\n}\n\n.text-Racing-Point {\n color: #F596C8;\n}\n\n.text-AlphaTauri {\n color: #2B4562;\n}\n\n.text-Manor-Marussia {\n color: #E40000;\n}\n\n/* Team info overlay */\n.teamInfo {\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n background: rgba(255, 255, 255, 0.1);\n /*add border and shador*/\n border: 1px solid rgba(255, 255, 255, 0.2);\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);\n color: white;\n padding: 10px;\n border-radius: 0 5px 5px 0;\n z-index: 10;\n pointer-events: none;\n}\n\n.teamInfo h2 {\n margin: 0 0 10px 0;\n}\n\n.teamInfo ul {\n list-style: none;\n padding: 0;\n margin: 0;\n color: rgb(240, 240, 240);\n}\n\n.teamInfo li {\n margin-bottom: 5px;\n}\n",".sideMenu {\n position: absolute;\n top: 0;\n left: 0;\n width: 2.5%; /* Reduced initial width */\n height: 35%;\n background-color: #312829;\n box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);\n z-index: 1000;\n transition: width 0.3s ease;\n overflow: hidden;\n opacity: 0.5;\n border-radius: 0 5px 5px 0;\n}\n\n.sideMenu:hover {\n width: 250px; /* Expand width on hover */\n color: red;\n}\n\n.sideMenu ul {\n list-style: none;\n padding: 0;\n margin: 0;\n height: 100%;\n display: flex;\n flex-direction: column; /* Align items vertically */\n justify-content: center; /* Center items vertically */\n}\n\n.sideMenu li {\n padding: 10px;\n border-bottom: 1px solid white;\n color: white;\n cursor: pointer;\n white-space: nowrap; /* Ensure text doesn't wrap */\n opacity: 0; /* Make text invisible initially */\n transition: opacity 0.3s ease 0.3s; /* Delay text appearance until expansion */\n}\n\n.sideMenu:hover li {\n opacity: 1; /* Make text visible when hovered */\n}\n\n/* Styling for a small tab to grab attention when retracted */\n.tab {\n position: absolute;\n top: 40%;\n right: 0; /* Position it just outside the main menu */\n width: 40px;\n height: 40px;\n background-color: white;\n transform: translateY(-50%);\n border-radius: 0 5px 5px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: red;\n font-weight: bold;\n cursor: pointer;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/css/main.14f7c3ff.css b/static/css/main.63d78cbc.css similarity index 93% rename from static/css/main.14f7c3ff.css rename to static/css/main.63d78cbc.css index 278d428..cb37787 100644 --- a/static/css/main.14f7c3ff.css +++ b/static/css/main.63d78cbc.css @@ -1,2 +1,2 @@ -@import url(https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans&display=swap);@font-face{font-family:MyCustomFont;font-style:normal;font-weight:400;src:url(/pitstop-plotters/static/media/Formula1-Italic.a210ce579c0907d1456c.ttf) format("ttf")}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}h1{color:#fff;font-family:MyCustomFont,sans-serif;font-size:10%;text-align:center}@font-face{font-family:f1Font;font-style:normal;font-weight:400;src:url(https://rawcdn.githack.com/com-480-data-visualization/pitstop-plotters/e387d68fc4919d6f938e748e9a867d4ab25e767a/website/src/fonts/Formula1-Regular_web_0.woff) format("woff")}body{font-family:f1Font,Noto Sans,sans-serif;overflow:hidden}h1{font-size:7vw;line-height:7vw}h1,h2{font-family:f1Font,IBM Plex Sans,sans-serif;font-style:normal;font-weight:700}h2{font-size:60px;line-height:78px;margin-top:0}p{color:#333;font-family:f1Font,Noto Sans,sans-serif;font-weight:400;line-height:22px}button,p{font-size:16px;font-style:normal}button{font-family:f1Font,Noto Sans;font-weight:700;line-height:100%;text-transform:uppercase}a{text-decoration:none}.Styles_container__tCg83{height:100vh;overflow-y:scroll;scroll-snap-type:y mandatory;width:100vw}.Styles_section__aHrHC{height:100%;scroll-snap-align:start;width:100%}@font-face{font-family:Formula1-Regular;font-style:normal;font-weight:400;src:url(/pitstop-plotters/static/media/Formula1-Italic.a210ce579c0907d1456c.ttf) format("ttf")}.Welcome_welcome__IiO2h{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.Welcome_border__035TM{display:flex;height:100%;justify-content:space-between}.Welcome_content__lwKwk{align-items:center;flex-grow:1;overflow:hidden;position:relative}.Welcome_f1__dk7pR{align-content:center;align-items:center;display:flex;flex-direction:column;justify-content:center;left:15%;margin-top:3%;opacity:.75;position:absolute;top:0;width:70%;z-index:3}.Welcome_video__bAEiu{object-fit:cover;z-index:1}.Welcome_overlay__dlTiE,.Welcome_video__bAEiu{height:100%;left:0;position:absolute;top:0;width:100%}.Welcome_overlay__dlTiE{background-color:#00000080;z-index:2}.Welcome_text_w__emWB\+{color:#fff;font-family:f1Font,sans-serif;margin-left:10%;margin-right:10%;margin-top:35%;opacity:.7;position:absolute;text-align:center}.Welcome_boder_img__14hvG{width:5%}.Welcome_floatingButton__Y2cxV{background-color:#00000080;border:none;border-radius:5px;bottom:20px;color:#fff;cursor:pointer;font-size:16px;padding:10px 20px;position:fixed;right:20px;z-index:1000}.Leaderboard_template__QQzc\+{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.Leaderboard_boder_img__n62Nr{width:5%}.Leaderboard_border__OPCPq{display:flex;height:100%;justify-content:space-between}.Leaderboard_leaderboard__-nBOA{position:relative;transform:translate(25px)}.Leaderboard_leaderboardItem__Vbp3C{border-radius:10px;margin-top:-.3em;transition:width .5s ease-out,background-color .3s ease-out}.Leaderboard_itemName__c6Hue{color:#fff;font-family:IBM Plex Sans,sans-serif;font-weight:700;margin-block:0;margin-left:8px;text-transform:uppercase}.Leaderboard_leaderboardScore__dtDLQ{font-family:IBM Plex Sans,sans-serif;font-weight:700;margin:0 0 0 -45px}.Leaderboard_leaderboardPosition__btjsn{font-family:IBM Plex Sans,sans-serif;font-weight:700;margin:0 0 0 -.5em;text-align:right;width:35px}.Leaderboard_itemContainer__6IINA{display:flex;margin:auto}.Leaderboard_container__\+inhA{display:flex;flex-direction:row;position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.Leaderboard_halfDiv__GYHoI{width:60%}.Leaderboard_content__i6rN9{align-items:center;display:flex;flex-direction:column;justify-content:space-between;margin-bottom:1em;max-width:1200px;width:100%}.Leaderboard_leader__jItFr{align-items:center;display:flex;flex-direction:row;flex-grow:1;height:100%;justify-content:center;width:100%}.Leaderboard_centerImage__iEvHD{height:95%;opacity:.75;padding-left:-70em;padding-right:4em;width:33px}.ProgressBar_bar__EnPVm{align-items:center;display:flex;gap:12px;justify-content:center}.ProgressBar_play__EWPAw{align-items:center;color:#ccc;display:flex;transition:all .3s ease}.ProgressBar_play__EWPAw:hover{transform:scale(1.15)}.ProgressBar_year__Jp6rO{font-family:IBM Plex Sans,sans-serif;font-weight:700}input[type=range]{-webkit-appearance:none;appearance:none;background:#ccc;cursor:pointer;height:15px;outline:none;width:200px;width:100%}input[type=range]::-webkit-slider-runnable-track{background:#ccc;border-radius:16px;height:15px}input[type=range]::-moz-range-track{background:#ccc;border-radius:16px;height:15px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:url(/pitstop-plotters/static/media/f1_t.3ccfda1d7ec47c133e70.png) no-repeat 50%;background-size:contain;border:none;cursor:pointer;height:100px;width:100px}input[type=range]::-moz-range-thumb{background:url(/pitstop-plotters/static/media/f1_t.3ccfda1d7ec47c133e70.png) no-repeat 50%;background-size:contain;border:none;box-shadow:-800px 0 0 800px #aaa;cursor:pointer;height:100px;width:100px}input[type=range]{border-radius:16px;overflow:hidden}.HallOfFame_template__W9Jhb{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.HallOfFame_border__YVW5d{display:flex;height:100%;justify-content:space-between}.HallOfFame_content__UaZlF{align-items:center;overflow:hidden;position:relative}.HallOfFame_boder_img__-hEL6{width:5%}.HallOfFame_content__UaZlF{display:flex;flex-grow:1;height:100%}.HallOfFame_leftSide__uZA2Y{flex-direction:column}.HallOfFame_leftSide__uZA2Y,.HallOfFame_rightSide__OEWEJ{align-items:center;display:flex;height:100%;justify-content:center;width:50%}.HallOfFame_rightSide__OEWEJ{flex-direction:column-reverse}.HallOfFame_rightBottom__Vu0EI{flex:6 1;flex-direction:column}.HallOfFame_rightBottom__Vu0EI,.HallOfFame_rightTop__xF7Me{align-items:center;display:flex;justify-content:center;width:100%}.HallOfFame_rightTop__xF7Me{flex:4 1;margin:0}.HallOfFame_centerImage__9hT-v{height:100%;left:50%;opacity:.75;position:absolute;top:50%;transform:translate(-50%,-50%);width:34px;z-index:10}.HallOfFame_centerDivider__arOCj{display:block;height:33px;opacity:.8;padding-left:33px;width:100%}.HallOfFame_titleContainer__WmFBn{color:#fff;font-size:28px;font-weight:700;margin-bottom:.1em;margin-top:-.5em;padding-top:5%;text-align:center;width:100%}.HallOfFame_desc__CZeuv{color:#ccc;font-size:.6em;margin:-3em 0 -6em;padding:5em;text-align:center}.HallOfFameSelection_imageRow__c4fjP{align-items:flex-end;display:flex;height:100%;justify-content:space-between;overflow-x:auto;padding:20px 10px 0 20px;width:100%}img{cursor:pointer;flex-shrink:0;transition:all .3s ease-in-out}.HallOfFameInfo_divInfo__SgIB1{border-radius:8px;display:flex;flex-wrap:wrap;font-size:calc(.5vw + .5vh + .25vmin);justify-content:space-around;margin-bottom:-.5rem;margin-left:5rem;margin-top:-5rem;padding:10px}.HallOfFameInfo_item__yu17K{align-items:flex-start;border-radius:5px;display:flex;flex:1 1 auto;justify-content:space-between;margin:5px;padding-inline:5px;text-align:left}.HallOfFameInfo_name__SqYpD h1{font-size:2em;font-weight:700;height:5%;justify-content:center;margin:1px 1px -40px;padding:1px;text-align:center;text-decoration:underline;width:100%}.HallOfFameInfo_name__SqYpD{display:flex;margin:0;padding:1px;width:100%}.HallOfFameInfo_label__uBaBf{font-size:.6em;font-weight:700;height:10%;margin:1px;width:100%}.HallOfFameInfo_value__E7ylY{color:#ccc;font-family:IBM Plex Sans,sans-serif;font-size:.5em;font-weight:lighter;height:10%;margin:1px 5px;width:10%}p{margin:1px}body{background-color:#222}circle,line,polygon{stroke:#e3e3e3;stroke-width:3px;fill:none}circle{stroke:#e3e3e3;stroke-width:1px;opacity:.5}polygon{stroke:#ff1a2d;stroke-width:2px;fill:#ef1a2d;fill-opacity:.3}text{stroke:none;fill:#ccc;alignment-baseline:middle;font-family:Helvetica;font-size:12px;font-weight:700}line.HallOfFameSpider_axis__JUeQp{stroke-width:1px;opacity:.5}.Circuits_circuits__XOPK5{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.Circuits_border__Q94XG{display:flex;height:100%;justify-content:space-between}.Circuits_content__xz9ZT{align-items:center;display:flex;flex-direction:column;flex-grow:1;height:100%;overflow:hidden;position:relative}.Circuits_top__4DOqZ{flex:3 1;flex-grow:1}.Circuits_bottom__mAbW2{flex:1 1;flex-grow:1}.Circuits_boder_img__zcgiK{width:5%}body{margin:0}.Circuits_centerImage__qzCjH{display:block;height:33px;opacity:.8;width:100%}.CircuitsMap_mapContainer__tYwZD{border:1px solid #fff;position:relative}.CircuitInfo_infobox__ABsH-{align-items:flex-start;border-radius:8px;box-shadow:0 4px 8px #0000001a;box-sizing:border-box;display:flex;height:100%;padding-left:20px;width:100%}.CircuitInfo_infoContainer__dYjxl{display:flex;flex:4 1;flex-wrap:wrap;height:100%;padding-right:33px;position:relative}.CircuitInfo_infoColumn__RAr6a{display:flex;flex:1 1;flex-direction:column;min-width:200px;padding-right:10px}.CircuitInfo_title__e5oD2{color:#f0f0f0;font-size:1.8em;font-weight:700;margin-bottom:0;margin-top:0;width:100%}.CircuitInfo_info__-UzhH{color:#ccc;font-size:.85rem;padding:0}.CircuitInfo_infoDescription__9Jh9I{color:#f0f0f0;font-size:1rem;padding:0}.CircuitInfo_imageContainer__UIY8Q{align-items:center;display:flex;flex:2 1;justify-content:center}.CircuitInfo_circuitImage__x-6aJ{height:11.8em;width:auto}.CircuitInfo_centerImage__su5iV{height:100%;opacity:.8;overflow:hidden;position:absolute;right:0;top:0;width:33px}.SeasonsEvolution_seasonevolution__8UsoX{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.SeasonsEvolution_plotContainer__o76a-{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;height:80vh;justify-content:center;width:100%}.SeasonsEvolution_border__jRxfk{display:flex;height:100%;justify-content:space-between;width:100%}.SeasonsEvolution_content__qJkP0{align-items:center;display:flex;overflow:hidden;position:relative}.SeasonsEvolution_left__UYGnK{flex:3 1;margin-top:100px}.SeasonsEvolution_right__DkeO3{flex:2 1;margin-top:20px}.SeasonsEvolution_boder_img__qFxu4{width:5%}p{color:#fff;font-size:1.5em;padding-right:100px}.SeasonsEvolution_titleWrapper__QfF6N{color:#fff;left:50%;position:absolute;text-align:center;top:10px;transform:translateX(-50%);width:100%;z-index:1}.SeasonsEvolution_sliderContainer__nAENa{align-items:center;display:flex;justify-content:center;margin-top:20px;width:100%}.SeasonsEvolution_slider__RZSof{-webkit-appearance:none;appearance:none;background:#fff;height:10px;margin-right:10px;opacity:.7;outline:none;transition:opacity .15s ease-in-out;width:90%}.SeasonsEvolution_slider__RZSof::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:#fff;cursor:pointer;height:25px;width:25px}.SeasonsEvolution_slider__RZSof::-moz-range-thumb{background:#fff;cursor:pointer;height:25px;width:25px}.SeasonsEvolution_yearLabel__mD7Yb{color:#fff;font-size:18px;font-weight:700}.DriverTeamRelations_template__RvmVC{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}#DriverTeamRelations_driverteamrelation__mx-NL{border:1px solid #000}.DriverTeamRelations_border__6VQOL{display:flex;height:100%;justify-content:space-between}.DriverTeamRelations_content__VSAwL{align-items:center;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative}.DriverTeamRelations_content__VSAwL h1{color:#fff;font-size:2rem;margin-bottom:-2em;margin-top:-1rem;padding:0}.DriverTeamRelations_boder_img__7qmtw{width:5%}.DriverTeamRelations_team-McLaren__jk6U5{fill:#ff8700;stroke:#ff8700;opacity:.8}.DriverTeamRelations_team-Mercedes__32J3I{fill:#00d2be;stroke:#00d2be;opacity:.8}.DriverTeamRelations_team-Renault__sE5Sy{fill:#fff500;stroke:#fff500;opacity:.8}.DriverTeamRelations_team-Ferrari__2M3Gd{fill:#dc0000;stroke:#dc0000;opacity:.8}.DriverTeamRelations_team-Aston-Martin__zesHn{fill:#006f62;stroke:#006f62;opacity:.8}.DriverTeamRelations_team-Alpine-F1-Team__xEeDd{fill:#0090ff;stroke:#0090ff;opacity:.8}.DriverTeamRelations_team-Lotus__j-qyv{fill:#ffb800;stroke:#ffb800;opacity:.8}.DriverTeamRelations_team-Caterham__6FQ0a{fill:#00352f;stroke:#00352f;opacity:.8}.DriverTeamRelations_team-Lotus-F1__VhMG7{fill:#ffb800;stroke:#ffb800;opacity:.8}.DriverTeamRelations_team-Alfa-Romeo__olkaa{fill:#900000;stroke:#900000;opacity:.8}.DriverTeamRelations_team-Williams__V\+x4y{fill:#005aff;stroke:#005aff;opacity:.8}.DriverTeamRelations_team-Virgin__uBq2T{fill:#e31837;stroke:#e31837;opacity:.8}.DriverTeamRelations_team-Marussia__fdoHi{fill:#d40000;stroke:#d40000;opacity:.8}.DriverTeamRelations_team-Force-India__sSjqE{fill:#ff8700;stroke:#ff8700;opacity:.8}.DriverTeamRelations_team-Sauber__idPxN{fill:#006eff;stroke:#006eff;opacity:.8}.DriverTeamRelations_team-Red-Bull__4kjKN{fill:#1e41ff;stroke:#1e41ff;opacity:.8}.DriverTeamRelations_team-HRT__aSBii{fill:#bebebe;stroke:#bebebe;opacity:.8}.DriverTeamRelations_team-Toro-Rosso__ppnJl{fill:#0032ff;stroke:#0032ff;opacity:.8}.DriverTeamRelations_team-Haas-F1-Team__coHiO{fill:#787878;stroke:#787878;opacity:.8}.DriverTeamRelations_team-Racing-Point__QVHRe{fill:#f596c8;stroke:#f596c8;opacity:.8}.DriverTeamRelations_team-AlphaTauri__Gd5iW{fill:#2b4562;stroke:#2b4562;opacity:.8}.DriverTeamRelations_team-Manor-Marussia__ra00E{fill:#e40000;stroke:#e40000;opacity:.8}.DriverTeamRelations_link__dxeui{stroke-opacity:.4}.DriverTeamRelations_text-McLaren__8\+wD\+{color:#ff8700}.DriverTeamRelations_text-Mercedes__ue4hg{color:#00d2be}.DriverTeamRelations_text-Renault__Z6wJm{color:#fff500}.DriverTeamRelations_text-Ferrari__akuLs{color:#dc0000}.DriverTeamRelations_text-Aston-Martin__y-4cN{color:#006f62}.DriverTeamRelations_text-Alpine-F1-Team__GeccS{color:#0090ff}.DriverTeamRelations_text-Lotus__Op\+9f{color:#ffb800}.DriverTeamRelations_text-Caterham__OBEhY{color:#00352f}.DriverTeamRelations_text-Lotus-F1__h6ADQ{color:#ffb800}.DriverTeamRelations_text-Alfa-Romeo__fiYvm{color:#900000}.DriverTeamRelations_text-Williams__J3Vdt{color:#005aff}.DriverTeamRelations_text-Virgin__Q1IVL{color:#e31837}.DriverTeamRelations_text-Marussia__2tQJu{color:#d40000}.DriverTeamRelations_text-Force-India__gMEXs{color:#ff8700}.DriverTeamRelations_text-Sauber__tcbtg{color:#006eff}.DriverTeamRelations_text-Red-Bull__A8rkg{color:#1e41ff}.DriverTeamRelations_text-HRT__gwqYw{color:#bebebe}.DriverTeamRelations_text-Toro-Rosso__W9FaM{color:#0032ff}.DriverTeamRelations_text-Haas-F1-Team__9kyOx{color:#787878}.DriverTeamRelations_text-Racing-Point__Xx428{color:#f596c8}.DriverTeamRelations_text-AlphaTauri__XoslZ{color:#2b4562}.DriverTeamRelations_text-Manor-Marussia__OIo8P{color:#e40000}.DriverTeamRelations_teamInfo__\+4fZp{background:#ffffff1a;border:1px solid #fff3;border-radius:0 5px 5px 0;box-shadow:0 0 10px #00000080;color:#fff;left:0;padding:10px;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);z-index:10}.DriverTeamRelations_teamInfo__\+4fZp h2{margin:0 0 10px}.DriverTeamRelations_teamInfo__\+4fZp ul{color:#f0f0f0;list-style:none;margin:0;padding:0}.DriverTeamRelations_teamInfo__\+4fZp li{margin-bottom:5px}.Menu_sideMenu__5rh0H{background-color:#312829;border-radius:0 5px 5px 0;box-shadow:2px 0 5px #00000080;height:35%;left:0;opacity:.5;overflow:hidden;position:absolute;top:0;transition:width .3s ease;width:2.5%;z-index:1000}.Menu_sideMenu__5rh0H:hover{color:red;width:250px}.Menu_sideMenu__5rh0H ul{display:flex;flex-direction:column;height:100%;justify-content:center;list-style:none;margin:0;padding:0}.Menu_sideMenu__5rh0H li{border-bottom:1px solid #fff;color:#fff;cursor:pointer;opacity:0;padding:10px;transition:opacity .3s ease .3s;white-space:nowrap}.Menu_sideMenu__5rh0H:hover li{opacity:1}.Menu_tab__scSOe{align-items:center;background-color:#fff;border-radius:0 5px 5px 0;color:red;cursor:pointer;display:flex;font-weight:700;height:40px;justify-content:center;position:absolute;right:0;top:40%;transform:translateY(-50%);width:40px} -/*# sourceMappingURL=main.14f7c3ff.css.map*/ \ No newline at end of file +@import url(https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans&display=swap);@font-face{font-family:MyCustomFont;font-style:normal;font-weight:400;src:url(/pitstop-plotters/static/media/Formula1-Italic.a210ce579c0907d1456c.ttf) format("ttf")}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}h1{color:#fff;font-family:MyCustomFont,sans-serif;font-size:10%;text-align:center}@font-face{font-family:f1Font;font-style:normal;font-weight:400;src:url(https://rawcdn.githack.com/com-480-data-visualization/pitstop-plotters/e387d68fc4919d6f938e748e9a867d4ab25e767a/website/src/fonts/Formula1-Regular_web_0.woff) format("woff")}body{font-family:f1Font,Noto Sans,sans-serif;overflow:hidden}h1{font-size:7vw;line-height:7vw}h1,h2{font-family:f1Font,IBM Plex Sans,sans-serif;font-style:normal;font-weight:700}h2{font-size:60px;line-height:78px;margin-top:0}p{color:#333;font-family:f1Font,Noto Sans,sans-serif;font-weight:400;line-height:22px}button,p{font-size:16px;font-style:normal}button{font-family:f1Font,Noto Sans;font-weight:700;line-height:100%;text-transform:uppercase}a{text-decoration:none}.Styles_container__tCg83{height:100vh;overflow-y:scroll;scroll-snap-type:y mandatory;width:100vw}.Styles_section__aHrHC{height:100%;scroll-snap-align:start;width:100%}@font-face{font-family:Formula1-Regular;font-style:normal;font-weight:400;src:url(/pitstop-plotters/static/media/Formula1-Italic.a210ce579c0907d1456c.ttf) format("ttf")}.Welcome_welcome__IiO2h{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.Welcome_border__035TM{display:flex;height:100%;justify-content:space-between}.Welcome_content__lwKwk{align-items:center;flex-grow:1;overflow:hidden;position:relative}.Welcome_f1__dk7pR{align-content:center;align-items:center;display:flex;flex-direction:column;justify-content:center;left:15%;margin-top:3%;opacity:.75;position:absolute;top:0;width:70%;z-index:3}.Welcome_video__bAEiu{object-fit:cover;z-index:1}.Welcome_overlay__dlTiE,.Welcome_video__bAEiu{height:100%;left:0;position:absolute;top:0;width:100%}.Welcome_overlay__dlTiE{background-color:#00000080;z-index:2}.Welcome_text_w__emWB\+{color:#fff;font-family:f1Font,sans-serif;margin-left:10%;margin-right:10%;margin-top:35%;opacity:.7;position:absolute;text-align:center}.Welcome_boder_img__14hvG{width:5%}.Welcome_floatingButton__Y2cxV{background-color:#00000080;border:none;border-radius:5px;bottom:20px;color:#fff;cursor:pointer;font-size:16px;padding:10px 20px;position:fixed;right:20px;z-index:1000}.Leaderboard_template__QQzc\+{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.Leaderboard_boder_img__n62Nr{width:5%}.Leaderboard_border__OPCPq{display:flex;height:100%;justify-content:space-between}.Leaderboard_leaderboard__-nBOA{position:relative;transform:translate(25px)}.Leaderboard_leaderboardItem__Vbp3C{border-radius:10px;margin-top:-.3em;transition:width .5s ease-out,background-color .3s ease-out}.Leaderboard_itemName__c6Hue{color:#fff;font-family:IBM Plex Sans,sans-serif;font-weight:700;margin-block:0;margin-left:8px;text-transform:uppercase}.Leaderboard_leaderboardScore__dtDLQ{font-family:IBM Plex Sans,sans-serif;font-weight:700;margin:0 0 0 -45px}.Leaderboard_leaderboardPosition__btjsn{font-family:IBM Plex Sans,sans-serif;font-weight:700;margin:0 0 0 -.5em;text-align:right;width:35px}.Leaderboard_itemContainer__6IINA{display:flex;margin:auto}.Leaderboard_container__\+inhA{display:flex;flex-direction:row;position:relative;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.Leaderboard_halfDiv__GYHoI{width:60%}.Leaderboard_content__i6rN9{align-items:center;display:flex;flex-direction:column;justify-content:space-between;margin-bottom:1em;max-width:1200px;width:100%}.Leaderboard_leader__jItFr{align-items:center;display:flex;flex-direction:row;flex-grow:1;height:100%;justify-content:center;width:100%}.Leaderboard_centerImage__iEvHD{height:95%;opacity:.75;padding-left:-70em;padding-right:4em;width:33px}.ProgressBar_bar__EnPVm{align-items:center;display:flex;gap:12px;justify-content:center}.ProgressBar_play__EWPAw{align-items:center;color:#ccc;display:flex;transition:all .3s ease}.ProgressBar_play__EWPAw:hover{transform:scale(1.15)}.ProgressBar_year__Jp6rO{font-family:IBM Plex Sans,sans-serif;font-weight:700}input[type=range]{-webkit-appearance:none;appearance:none;background:#ccc;cursor:pointer;height:15px;outline:none;width:200px;width:100%}input[type=range]::-webkit-slider-runnable-track{background:#ccc;border-radius:16px;height:15px}input[type=range]::-moz-range-track{background:#ccc;border-radius:16px;height:15px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:url(/pitstop-plotters/static/media/f1_t.3ccfda1d7ec47c133e70.png) no-repeat 50%;background-size:contain;border:none;cursor:pointer;height:100px;width:100px}input[type=range]::-moz-range-thumb{background:url(/pitstop-plotters/static/media/f1_t.3ccfda1d7ec47c133e70.png) no-repeat 50%;background-size:contain;border:none;box-shadow:-800px 0 0 800px #aaa;cursor:pointer;height:100px;width:100px}input[type=range]{border-radius:16px;overflow:hidden}.HallOfFame_template__W9Jhb{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.HallOfFame_border__YVW5d{display:flex;height:100%;justify-content:space-between}.HallOfFame_content__UaZlF{align-items:center;overflow:hidden;position:relative}.HallOfFame_boder_img__-hEL6{width:5%}.HallOfFame_content__UaZlF{display:flex;flex-grow:1;height:100%}.HallOfFame_leftSide__uZA2Y{flex-direction:column}.HallOfFame_leftSide__uZA2Y,.HallOfFame_rightSide__OEWEJ{align-items:center;display:flex;height:100%;justify-content:center;width:50%}.HallOfFame_rightSide__OEWEJ{flex-direction:column-reverse}.HallOfFame_rightBottom__Vu0EI{flex:6 1;flex-direction:column}.HallOfFame_rightBottom__Vu0EI,.HallOfFame_rightTop__xF7Me{align-items:center;display:flex;justify-content:center;width:100%}.HallOfFame_rightTop__xF7Me{flex:4 1;margin:0}.HallOfFame_centerImage__9hT-v{height:100%;left:50%;opacity:.75;position:absolute;top:50%;transform:translate(-50%,-50%);width:34px;z-index:10}.HallOfFame_centerDivider__arOCj{display:block;height:33px;opacity:.8;padding-left:33px;width:100%}.HallOfFame_titleContainer__WmFBn{color:#fff;font-size:28px;font-weight:700;margin-bottom:.1em;margin-top:-.5em;padding-top:5%;text-align:center;width:100%}.HallOfFame_desc__CZeuv{color:#ccc;font-size:.6em;margin:-3em 0 -6em;padding:5em;text-align:center}.HallOfFameSelection_imageRow__c4fjP{align-items:flex-end;display:flex;height:100%;justify-content:space-between;overflow-x:auto;padding:20px 10px 0 20px;width:100%}img{cursor:pointer;flex-shrink:0;transition:all .3s ease-in-out}.HallOfFameInfo_divInfo__SgIB1{border-radius:8px;display:flex;flex-wrap:wrap;font-size:calc(.5vw + .5vh + .25vmin);justify-content:space-around;margin-bottom:-.5rem;margin-left:5rem;margin-top:-5rem;padding:10px}.HallOfFameInfo_item__yu17K{align-items:flex-start;border-radius:5px;display:flex;flex:1 1 auto;justify-content:space-between;margin:5px;padding-inline:5px;text-align:left}.HallOfFameInfo_name__SqYpD h1{font-size:2em;font-weight:700;height:5%;justify-content:center;margin:1px 1px -40px;padding:1px;text-align:center;text-decoration:underline;width:100%}.HallOfFameInfo_name__SqYpD{display:flex;margin:0;padding:1px;width:100%}.HallOfFameInfo_label__uBaBf{font-size:.6em;font-weight:700;height:10%;margin:1px;width:100%}.HallOfFameInfo_value__E7ylY{color:#ccc;font-family:IBM Plex Sans,sans-serif;font-size:.5em;font-weight:lighter;height:10%;margin:1px 5px;width:10%}p{margin:1px}body{background-color:#222}circle,line,polygon{stroke:#e3e3e3;stroke-width:3px;fill:none}circle{stroke:#e3e3e3;stroke-width:1px;opacity:.5}polygon{stroke:#ff1a2d;stroke-width:2px;fill:#ef1a2d;fill-opacity:.3}text{stroke:none;fill:#ccc;alignment-baseline:middle;font-family:Helvetica;font-size:12px;font-weight:700}line.HallOfFameSpider_axis__JUeQp{stroke-width:1px;opacity:.5}.Circuits_circuits__XOPK5{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.Circuits_border__Q94XG{display:flex;height:100%;justify-content:space-between}.Circuits_content__xz9ZT{align-items:center;display:flex;flex-direction:column;flex-grow:1;height:100%;overflow:hidden;position:relative}.Circuits_top__4DOqZ{flex:3 1;flex-grow:1}.Circuits_bottom__mAbW2{flex:1 1;flex-grow:1}.Circuits_boder_img__zcgiK{width:5%}body{margin:0}.Circuits_centerImage__qzCjH{display:block;height:33px;opacity:.8;width:100%}.CircuitsMap_mapContainer__tYwZD{border:1px solid #fff;position:relative}.CircuitInfo_infobox__ABsH-{align-items:flex-start;border-radius:8px;box-shadow:0 4px 8px #0000001a;box-sizing:border-box;display:flex;height:100%;padding-left:20px;width:100%}.CircuitInfo_infoContainer__dYjxl{display:flex;flex:4 1;flex-wrap:wrap;height:100%;padding-right:33px;position:relative}.CircuitInfo_infoColumn__RAr6a{display:flex;flex:1 1;flex-direction:column;min-width:200px;padding-right:10px}.CircuitInfo_title__e5oD2{color:#f0f0f0;font-size:1.8em;font-weight:700;margin-bottom:0;margin-top:0;width:100%}.CircuitInfo_info__-UzhH{color:#ccc;font-size:.85rem;padding:0}.CircuitInfo_infoDescription__9Jh9I{color:#f0f0f0;font-size:1rem;padding:0}.CircuitInfo_imageContainer__UIY8Q{align-items:center;display:flex;flex:2 1;justify-content:center}.CircuitInfo_circuitImage__x-6aJ{height:11.8em;width:auto}.CircuitInfo_centerImage__su5iV{height:100%;opacity:.8;overflow:hidden;position:absolute;right:0;top:0;width:33px}.SeasonsEvolution_seasonevolution__8UsoX{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}.SeasonsEvolution_plotContainer__o76a-{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;height:80vh;justify-content:center;width:100%}.SeasonsEvolution_border__jRxfk{display:flex;height:100%;justify-content:space-between;width:100%}.SeasonsEvolution_content__qJkP0{align-items:center;display:flex;overflow:hidden;position:relative}.SeasonsEvolution_left__UYGnK{flex:3 1;margin-top:100px}.SeasonsEvolution_right__DkeO3{flex:2 1;margin-top:20px}.SeasonsEvolution_boder_img__qFxu4{width:5%}p{color:#fff;font-size:1.5em;padding-right:100px}.SeasonsEvolution_titleWrapper__QfF6N{color:#fff;left:50%;position:absolute;text-align:center;top:10px;transform:translateX(-50%);width:100%;z-index:1}.SeasonsEvolution_sliderContainer__nAENa{align-items:center;display:flex;justify-content:center;margin-top:20px;width:100%}.SeasonsEvolution_slider__RZSof{-webkit-appearance:none;appearance:none;background:#fff;height:10px;margin-right:10px;opacity:.7;outline:none;transition:opacity .15s ease-in-out;width:90%}.SeasonsEvolution_slider__RZSof::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:#fff;cursor:pointer;height:25px;width:25px}.SeasonsEvolution_slider__RZSof::-moz-range-thumb{background:#fff;cursor:pointer;height:25px;width:25px}.SeasonsEvolution_yearLabel__mD7Yb{color:#fff;font-size:18px;font-weight:700}.DriverTeamRelations_template__RvmVC{align-items:center;background-image:url(/pitstop-plotters/static/media/background_road.c8740f58d528afc0ff5d.png);background-position:50%;background-repeat:repeat;background-size:cover;height:100%;justify-content:center;min-height:100vh;overflow-wrap:break-word;width:100%}#DriverTeamRelations_driverteamrelation__mx-NL{border:1px solid #000}.DriverTeamRelations_border__6VQOL{display:flex;height:100%;justify-content:space-between}.DriverTeamRelations_content__VSAwL{align-items:center;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative}.DriverTeamRelations_content__VSAwL h1{color:#fff;font-size:2rem;margin-bottom:-2em;margin-top:-1rem;padding:0}.DriverTeamRelations_boder_img__7qmtw{width:5%}.DriverTeamRelations_team-McLaren__jk6U5{fill:#ff8700;stroke:#ff8700;opacity:.8}.DriverTeamRelations_team-Mercedes__32J3I{fill:#00d2be;stroke:#00d2be;opacity:.8}.DriverTeamRelations_team-Renault__sE5Sy{fill:#fff500;stroke:#fff500;opacity:.8}.DriverTeamRelations_team-Ferrari__2M3Gd{fill:#dc0000;stroke:#dc0000;opacity:.8}.DriverTeamRelations_team-Aston-Martin__zesHn{fill:#006f62;stroke:#006f62;opacity:.8}.DriverTeamRelations_team-Alpine-F1-Team__xEeDd{fill:#0090ff;stroke:#0090ff;opacity:.8}.DriverTeamRelations_team-Lotus__j-qyv{fill:#ffb800;stroke:#ffb800;opacity:.8}.DriverTeamRelations_team-Caterham__6FQ0a{fill:#00352f;stroke:#00352f;opacity:.8}.DriverTeamRelations_team-Lotus-F1__VhMG7{fill:#ffb800;stroke:#ffb800;opacity:.8}.DriverTeamRelations_team-Alfa-Romeo__olkaa{fill:#900000;stroke:#900000;opacity:.8}.DriverTeamRelations_team-Williams__V\+x4y{fill:#005aff;stroke:#005aff;opacity:.8}.DriverTeamRelations_team-Virgin__uBq2T{fill:#e31837;stroke:#e31837;opacity:.8}.DriverTeamRelations_team-Marussia__fdoHi{fill:#d40000;stroke:#d40000;opacity:.8}.DriverTeamRelations_team-Force-India__sSjqE{fill:#ff8700;stroke:#ff8700;opacity:.8}.DriverTeamRelations_team-Sauber__idPxN{fill:#006eff;stroke:#006eff;opacity:.8}.DriverTeamRelations_team-Red-Bull__4kjKN{fill:#1e41ff;stroke:#1e41ff;opacity:.8}.DriverTeamRelations_team-HRT__aSBii{fill:#bebebe;stroke:#bebebe;opacity:.8}.DriverTeamRelations_team-Toro-Rosso__ppnJl{fill:#0032ff;stroke:#0032ff;opacity:.8}.DriverTeamRelations_team-Haas-F1-Team__coHiO{fill:#787878;stroke:#787878;opacity:.8}.DriverTeamRelations_team-Racing-Point__QVHRe{fill:#f596c8;stroke:#f596c8;opacity:.8}.DriverTeamRelations_team-AlphaTauri__Gd5iW{fill:#2b4562;stroke:#2b4562;opacity:.8}.DriverTeamRelations_team-Manor-Marussia__ra00E{fill:#e40000;stroke:#e40000;opacity:.8}.DriverTeamRelations_link__dxeui{stroke-opacity:.4}.DriverTeamRelations_text-McLaren__8\+wD\+{color:#ff8700}.DriverTeamRelations_text-Mercedes__ue4hg{color:#00d2be}.DriverTeamRelations_text-Renault__Z6wJm{color:#fff500}.DriverTeamRelations_text-Ferrari__akuLs{color:#dc0000}.DriverTeamRelations_text-Aston-Martin__y-4cN{color:#006f62}.DriverTeamRelations_text-Alpine-F1-Team__GeccS{color:#0090ff}.DriverTeamRelations_text-Lotus__Op\+9f{color:#ffb800}.DriverTeamRelations_text-Caterham__OBEhY{color:#00352f}.DriverTeamRelations_text-Lotus-F1__h6ADQ{color:#ffb800}.DriverTeamRelations_text-Alfa-Romeo__fiYvm{color:#900000}.DriverTeamRelations_text-Williams__J3Vdt{color:#005aff}.DriverTeamRelations_text-Virgin__Q1IVL{color:#e31837}.DriverTeamRelations_text-Marussia__2tQJu{color:#d40000}.DriverTeamRelations_text-Force-India__gMEXs{color:#ff8700}.DriverTeamRelations_text-Sauber__tcbtg{color:#006eff}.DriverTeamRelations_text-Red-Bull__A8rkg{color:#1e41ff}.DriverTeamRelations_text-HRT__gwqYw{color:#bebebe}.DriverTeamRelations_text-Toro-Rosso__W9FaM{color:#0032ff}.DriverTeamRelations_text-Haas-F1-Team__9kyOx{color:#787878}.DriverTeamRelations_text-Racing-Point__Xx428{color:#f596c8}.DriverTeamRelations_text-AlphaTauri__XoslZ{color:#2b4562}.DriverTeamRelations_text-Manor-Marussia__OIo8P{color:#e40000}.DriverTeamRelations_teamInfo__\+4fZp{background:#ffffff0a;border:1px solid #fff3;border-radius:0 5px 5px 0;box-shadow:0 0 10px #00000080;color:#fff;left:0;padding:10px;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);z-index:10}.DriverTeamRelations_teamInfo__\+4fZp h2{font-size:2.2rem;margin:0 0 10px}.DriverTeamRelations_teamInfo__\+4fZp ul{color:#f0f0f0;list-style:none;margin:0;padding:0}.DriverTeamRelations_teamInfo__\+4fZp li{margin-bottom:5px}.Menu_sideMenu__5rh0H{background-color:#312829;border-radius:0 5px 5px 0;box-shadow:2px 0 5px #00000080;height:35%;left:0;opacity:.5;overflow:hidden;position:absolute;top:0;transition:width .3s ease;width:2.5%;z-index:1000}.Menu_sideMenu__5rh0H:hover{color:red;width:250px}.Menu_sideMenu__5rh0H ul{display:flex;flex-direction:column;height:100%;justify-content:center;list-style:none;margin:0;padding:0}.Menu_sideMenu__5rh0H li{border-bottom:1px solid #fff;color:#fff;cursor:pointer;opacity:0;padding:10px;transition:opacity .3s ease .3s;white-space:nowrap}.Menu_sideMenu__5rh0H:hover li{opacity:1}.Menu_tab__scSOe{align-items:center;background-color:#fff;border-radius:0 5px 5px 0;color:red;cursor:pointer;display:flex;font-weight:700;height:40px;justify-content:center;position:absolute;right:0;top:40%;transform:translateY(-50%);width:40px} +/*# sourceMappingURL=main.63d78cbc.css.map*/ \ No newline at end of file diff --git a/static/css/main.63d78cbc.css.map b/static/css/main.63d78cbc.css.map new file mode 100644 index 0000000..6cb6cd2 --- /dev/null +++ b/static/css/main.63d78cbc.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.63d78cbc.css","mappings":"uHAAA,WACE,wBAA2B,CAG3B,iBAAkB,CADlB,eAAmB,CADnB,8FAGF,CAEA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAKF,CAEA,KACE,uEAEF,CAEA,GAEE,UAAY,CACZ,mCAAqC,CACrC,aAAc,CAHd,iBAIF,CCzBA,WACI,kBAAqB,CAGrB,iBAAkB,CADlB,eAAmB,CADnB,qLAGJ,CACA,KACI,uCAA6C,CAE7C,eACJ,CAEA,GAII,aAAc,CACd,eACJ,CAEA,MAPI,2CAAiD,CACjD,iBAAkB,CAClB,eAYJ,CAPA,GAII,cAAe,CACf,gBAAiB,CACjB,YACJ,CAEA,EAMI,UAAW,CALX,uCAA6C,CAE7C,eAAgB,CAEhB,gBAEJ,CAEA,SALI,cAAe,CAFf,iBAcJ,CAPA,OACI,4BAAiC,CAEjC,eAAgB,CAEhB,gBAAiB,CACjB,wBACJ,CAEA,EACI,oBACJ,CAEA,yBAII,YAAa,CAHb,iBAAkB,CAClB,4BAA6B,CAC7B,WAEJ,CAEA,uBACI,WAAY,CAEZ,uBAAwB,CADxB,UAEJ,CC/DA,WACI,4BAA+B,CAG/B,iBAAkB,CADlB,eAAmB,CADnB,8FAGJ,CACA,wBAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKJ,CAEA,uBACI,YAAa,CAEb,WAAY,CADZ,6BAEJ,CAEA,wBAGI,kBAAmB,CADnB,WAAa,CAEb,eAAgB,CAHhB,iBAIJ,CAEA,mBAUI,oBAAqB,CADrB,kBAAmB,CAHnB,YAAa,CACb,qBAAsB,CACtB,sBAAuB,CAJvB,QAAS,CAHT,aAAc,CAUd,WAAa,CATb,iBAAkB,CAClB,KAAM,CAEN,SAAU,CAOV,SACJ,CAEA,sBAMI,gBAAiB,CACjB,SACJ,CAEA,8CALI,WAAY,CAFZ,MAAO,CAFP,iBAAkB,CAClB,KAAM,CAEN,UAcJ,CARA,wBAMI,0BAAiC,CACjC,SACJ,CAEA,wBAEI,UAAY,CAMZ,6BAA+B,CAF/B,eAAgB,CAChB,gBAAiB,CAHjB,cAAe,CACf,UAAY,CAJZ,iBAAkB,CAElB,iBAMJ,CAEA,0BACI,QACJ,CAEA,+BAOI,0BAAiC,CACjC,WAAY,CACZ,iBAAkB,CAPlB,WAAY,CAIZ,UAAW,CAIX,cAAe,CALf,cAAe,CADf,iBAAkB,CAHlB,cAAe,CAEf,UAAW,CAQX,YACJ,CC9FA,8BAIE,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKF,CACA,8BACE,QACF,CACA,2BACE,YAAa,CAEb,WAAY,CADZ,6BAEF,CAEA,gCACE,iBAAkB,CAClB,yBACF,CAEA,oCACE,kBAAmB,CAEnB,gBAAkB,CADlB,2DAEF,CAEA,6BACE,UAAY,CACZ,oCAAwC,CAExC,eAAiB,CACjB,cAAe,CACf,eAAgB,CAHhB,wBAIF,CAEA,qCAGE,oCAAwC,CADxC,eAAiB,CAEjB,kBACF,CAEA,wCAKE,oCAAwC,CADxC,eAAiB,CAFjB,kBAAmB,CACnB,gBAAiB,CAGjB,UACF,CAEA,kCACE,YAAa,CACb,WACF,CAEA,+BACE,YAAa,CACb,kBAAmB,CACnB,iBAAkB,CAClB,yBAAkB,CAAlB,sBAAkB,CAAlB,iBACF,CAEA,4BACE,SACF,CAEA,4BAKE,kBAAmB,CAJnB,YAAa,CACb,qBAAsB,CACtB,6BAA8B,CAC9B,iBAAkB,CAGlB,gBAAiB,CADjB,UAEF,CAEA,2BAIE,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CAKnB,WAAY,CADZ,WAAY,CAHZ,sBAAuB,CAEvB,UAGF,CAEA,gCAEE,UAAW,CACX,WAAa,CACb,kBAAmB,CACnB,iBAAkB,CAJlB,UAKF,CCnGA,wBAGI,kBAAmB,CAFnB,YAAa,CAGb,QAAS,CAFT,sBAGJ,CAGA,yBAEI,kBAAmB,CAEnB,UAAW,CAHX,YAAa,CAEb,uBAEJ,CAEA,+BACI,qBACJ,CAEA,yBACI,oCAAwC,CACxC,eACJ,CAEA,kBASI,uBAAwB,CACxB,eAAgB,CAQhB,eAAgB,CANhB,cAAe,CAKf,WAAY,CAJZ,YAAa,CAVb,WAAY,CAQZ,UALJ,CAgBA,iDAEI,eAAgB,CAChB,kBAAmB,CAFnB,WAGJ,CAEA,oCAEI,eAAgB,CAChB,kBAAmB,CAFnB,WAGJ,CAEA,wCACI,uBAAwB,CACxB,eAAgB,CAGhB,0FAAsD,CACtD,uBAAwB,CACxB,WAAY,CACZ,cAAe,CALf,YAAa,CACb,WAKJ,CAEA,oCAGI,0FAAsD,CACtD,uBAAwB,CACxB,WAAY,CAKZ,gCAAoC,CAJpC,cAAe,CALf,YAAa,CACb,WAKJ,CAMA,kBAEI,kBAAmB,CADnB,eAEJ,CCrFA,4BAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKJ,CAEA,0BACI,YAAa,CAEb,WAAY,CADZ,6BAEJ,CAEA,2BAGI,kBAAmB,CACnB,eAAgB,CAHhB,iBAIJ,CAEA,6BACI,QACJ,CAEA,2BACI,YAAa,CACb,WAAY,CACZ,WACJ,CAEA,4BAEI,qBAKJ,CAEA,yDAJI,kBAAmB,CAJnB,YAAa,CAGb,WAAY,CAEZ,sBAAuB,CAHvB,SAcJ,CARA,6BAII,6BAIJ,CAEA,+BACI,QAAO,CAEP,qBAIJ,CAEA,2DALI,kBAAmB,CAFnB,YAAa,CAGb,sBAAuB,CACvB,UAUJ,CAPA,4BACI,QAAO,CAKP,QACJ,CAEA,+BAMI,WAAY,CAHZ,QAAS,CAKT,WAAa,CAPb,iBAAkB,CAClB,OAAQ,CAER,8BAAgC,CAGhC,UAAW,CAFX,UAIJ,CAEA,iCAGI,aAAc,CADd,WAAY,CAEZ,UAAY,CAEZ,iBAAkB,CALlB,UAMJ,CAEA,kCAMI,UAAY,CAHZ,cAAe,CAIf,eAAiB,CALjB,kBAAoB,CAMpB,gBAAkB,CAHlB,cAAe,CAJf,iBAAkB,CAGlB,UAKJ,CAEA,wBAEI,UAAc,CADd,cAAgB,CAMhB,kBAAmB,CAFnB,WAAY,CAFZ,iBAKJ,CChHA,qCAGI,oBAAqB,CAFrB,YAAa,CAOb,WAAY,CANZ,6BAA8B,CAE9B,eAAgB,CAEhB,wBAAyB,CACzB,UAEJ,CAEA,IAEI,cAAe,CACf,aAAc,CAFd,8BAGJ,CCfA,+BAKI,iBAAkB,CAJlB,YAAa,CACb,cAAe,CAOf,qCAAyC,CANzC,4BAA6B,CAI7B,oBAAsB,CADtB,gBAAiB,CAEjB,gBAAiB,CAJjB,YAMJ,CAEA,4BASI,sBAAuB,CAJvB,iBAAkB,CAElB,YAAa,CANb,aAAc,CAOd,6BAA8B,CAN9B,UAAW,CACX,kBAAmB,CAOnB,eACJ,CAEA,+BACI,aAAc,CAMd,eAAiB,CACjB,SAAU,CAJV,sBAAuB,CAMvB,oBAAoB,CALpB,WAAY,CAHZ,iBAAkB,CAOlB,yBAA0B,CAH1B,UAKJ,CACA,4BAII,YAAa,CAFb,QAAS,CACT,WAAY,CAFZ,UAIJ,CAEA,6BAEI,cAAgB,CADhB,eAAiB,CAKjB,UAAW,CAHX,UAAe,CAEf,UAEJ,CAEA,6BAOI,UAAc,CANd,oCAAwC,CACxC,cAAgB,CAIhB,mBAAoB,CADpB,UAAW,CAFX,cAAe,CACf,SAIJ,CAEA,EACI,UACJ,CCjEA,KACI,qBACJ,CAEA,oBACI,cAAe,CACf,gBAAiB,CACjB,SACJ,CAEA,OACI,cAAe,CACf,gBAAiB,CACjB,UACJ,CAEA,QACI,cAAe,CACf,gBAAiB,CACjB,YAAY,CACZ,eACJ,CAGA,KAII,WAAY,CACZ,SAAY,CACZ,yBAA0B,CAL1B,qBAAwB,CACxB,cAAc,CACd,eAIJ,CAIA,kCACI,gBAAiB,CACjB,UACJ,CCtCA,0BAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKJ,CAEA,wBACI,YAAa,CAEb,WAAY,CADZ,6BAEJ,CAEA,yBAKI,kBAAmB,CAHnB,YAAa,CACb,qBAAsB,CACtB,WAAa,CAGb,WAAY,CADZ,eAAgB,CALhB,iBAOJ,CAEA,qBACE,QAAO,CACP,WACF,CAEA,wBACE,QAAO,CACP,WACF,CAEA,2BACI,QACJ,CAOA,KACE,QACF,CAEA,6BAGE,aAAc,CADd,WAAY,CAEZ,UAAY,CAHZ,UAIF,CCzDA,iCAEI,qBAAuB,CADvB,iBAGJ,CCJA,4BAOI,sBAAuB,CAJvB,iBAAkB,CAClB,8BAAwC,CAExC,qBAAsB,CALtB,YAAa,CAOb,WAAY,CANZ,iBAAkB,CAGlB,UAIJ,CAEA,kCACI,YAAa,CAEb,QAAO,CADP,cAAe,CAIf,WAAY,CADZ,kBAAmB,CADnB,iBAGJ,CAEA,+BACI,YAAa,CAEb,QAAO,CADP,qBAAsB,CAEtB,eAAgB,CAChB,kBACJ,CAEA,0BAKI,aAAc,CAJd,eAAgB,CAChB,eAAiB,CACjB,eAAgB,CAChB,YAAa,CAEb,UACJ,CAEA,yBAEI,UAAc,CADd,gBAAkB,CAElB,SACJ,CAEA,oCAEI,aAAc,CADd,cAAe,CAEf,SACJ,CAEA,mCAGI,kBAAmB,CADnB,YAAa,CADb,QAAO,CAGP,sBAEJ,CAEA,iCAGI,aAAc,CADd,UAEJ,CAEA,gCAEI,WAAY,CAKZ,UAAY,CADZ,eAAgB,CAHhB,iBAAkB,CAClB,OAAQ,CACR,KAAM,CAJN,UAOJ,CCvEA,yCAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKF,CAEA,uCAME,kBAAmB,CAHnB,qBAAsB,CACtB,YAAa,CACb,qBAAsB,CAHtB,WAAY,CAKZ,sBAAuB,CANvB,UAOF,CAEA,gCACE,YAAa,CAEb,WAAY,CADZ,6BAA8B,CAE9B,UACF,CAEA,iCAGE,kBAAmB,CAFnB,YAAa,CAGb,eAAgB,CAFhB,iBAGF,CAEA,8BACE,QAAO,CACP,gBACF,CAEA,+BACE,QAAO,CACP,eACF,CAEA,mCACE,QACF,CAEA,EACE,UAAY,CACZ,eAAgB,CAChB,mBACF,CAEA,sCAQE,UAAY,CALZ,QAAS,CAFT,iBAAkB,CAMlB,iBAAkB,CALlB,QAAS,CAET,0BAA2B,CAE3B,UAAW,CADX,SAIF,CAEA,yCAEE,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CACvB,eAAgB,CAChB,UACF,CAEA,gCAGE,uBAAwB,CACxB,eAAgB,CAEhB,eAAiB,CADjB,WAAY,CAHZ,iBAAkB,CAMlB,UAAY,CADZ,YAAa,CAEb,mCAAoC,CARpC,SASF,CAEA,sDACE,uBAAwB,CACxB,eAAgB,CAGhB,eAAiB,CACjB,cAAe,CAFf,WAAY,CADZ,UAIF,CAEA,kDAGE,eAAiB,CACjB,cAAe,CAFf,WAAY,CADZ,UAIF,CAEA,mCAGE,UAAY,CAFZ,cAAe,CACf,eAEF,CC3GF,qCAII,kBAAmB,CAGnB,6FAAmD,CAEnD,uBAA2B,CAC3B,wBAAyB,CAFzB,qBAAsB,CAPtB,WAAY,CAIZ,sBAAuB,CAFvB,gBAAiB,CADjB,wBAAyB,CAIzB,UAKJ,CAGA,+CAEI,qBACJ,CAEA,mCACI,YAAa,CAEb,WAAY,CADZ,6BAEJ,CAEA,oCAKI,kBAAmB,CAJnB,YAAa,CACb,qBAAsB,CAEtB,WAAa,CAEb,eAAgB,CAHhB,iBAIJ,CAEA,uCAEI,UAAW,CADX,cAAe,CAGf,kBAAmB,CADnB,gBAAiB,CAEjB,SACJ,CAEA,sCACI,QACJ,CAGA,yCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,yCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,yCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,8CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,gDACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,uCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,4CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,2CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,wCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,6CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,wCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,0CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,qCACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,4CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,8CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,8CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,4CACI,YAAa,CACb,cAAe,CACf,UACJ,CAEA,gDACI,YAAa,CACb,cAAe,CACf,UACJ,CAGA,iCACI,iBACJ,CAGA,2CACI,aACJ,CAEA,0CACI,aACJ,CAEA,yCACI,aACJ,CAEA,yCACI,aACJ,CAEA,8CACI,aACJ,CAEA,gDACI,aACJ,CAEA,wCACI,aACJ,CAEA,0CACI,aACJ,CAEA,0CACI,aACJ,CAEA,4CACI,aACJ,CAEA,0CACI,aACJ,CAEA,wCACI,aACJ,CAEA,0CACI,aACJ,CAEA,6CACI,aACJ,CAEA,wCACI,aACJ,CAEA,0CACI,aACJ,CAEA,qCACI,aACJ,CAEA,4CACI,aACJ,CAEA,8CACI,aACJ,CAEA,8CACI,aACJ,CAEA,4CACI,aACJ,CAEA,gDACI,aACJ,CAGA,sCAKI,oBAAqC,CAErC,sBAA0C,CAI1C,yBAA0B,CAH1B,6BAAuC,CACvC,UAAY,CANZ,MAAO,CAOP,YAAa,CAGb,mBAAoB,CAZpB,iBAAkB,CAClB,OAAQ,CAER,0BAA2B,CAQ3B,UAEJ,CAEA,yCAEI,gBAAiB,CADjB,eAEJ,CAEA,yCAII,aAAyB,CAHzB,eAAgB,CAEhB,QAAS,CADT,SAGJ,CAEA,yCACI,iBACJ,CCjTA,sBAMI,wBAAyB,CAMzB,yBAA0B,CAL1B,8BAAwC,CAFxC,UAAW,CAFX,MAAO,CAQP,UAAY,CADZ,eAAgB,CAThB,iBAAkB,CAClB,KAAM,CAON,yBAA2B,CAL3B,UAAW,CAIX,YAKJ,CAEA,4BAEI,SAAU,CADV,WAEJ,CAEA,yBAKI,YAAa,CACb,qBAAsB,CAFtB,WAAY,CAGZ,sBAAuB,CANvB,eAAgB,CAEhB,QAAS,CADT,SAMJ,CAEA,yBAEI,4BAA8B,CAC9B,UAAY,CACZ,cAAe,CAEf,SAAU,CALV,YAAa,CAMb,+BAAkC,CAFlC,kBAGJ,CAEA,+BACI,SACJ,CAGA,iBAUI,kBAAmB,CAJnB,qBAAuB,CAEvB,yBAA0B,CAI1B,SAAU,CAEV,cAAe,CALf,YAAa,CAIb,eAAiB,CARjB,WAAY,CAMZ,sBAAuB,CAVvB,iBAAkB,CAElB,OAAQ,CADR,OAAQ,CAKR,0BAA2B,CAH3B,UAWJ","sources":["index.css","Styles.module.css","Welcome/Welcome.module.css","Leaderboard/Leaderboard.module.css","Leaderboard/ProgressBar/ProgressBar.module.css","HallOfFame/HallOfFame.module.css","HallOfFame/HallOfFameSelection.module.css","HallOfFame/HallOfFameInfo.module.css","HallOfFame/HallOfFameSpider.module.css","Circuits/Circuits.module.css","Circuits/CircuitsMap/CircuitsMap.module.css","Circuits/CircuitInfo/CircuitInfo.module.css","SeasonsEvolution/SeasonsEvolution.module.css","DriverTeamRelations/DriverTeamRelations.module.css","Menu/Menu.module.css"],"sourcesContent":["@font-face {\n font-family: 'MyCustomFont';\n src: url('../public/fonts/Formula1-Italic.ttf') format('ttf');\n font-weight: normal;\n font-style: normal;\n}\n\nbody {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n\nh1 {\n text-align: center;\n color: white;\n font-family: MyCustomFont, sans-serif;\n font-size: 10%;\n}\n","@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans&display=swap');\n@font-face {\n font-family: 'f1Font';\n src: url('https://rawcdn.githack.com/com-480-data-visualization/pitstop-plotters/e387d68fc4919d6f938e748e9a867d4ab25e767a/website/src/fonts/Formula1-Regular_web_0.woff') format('woff');\n font-weight: normal;\n font-style: normal;\n}\nbody {\n font-family: 'f1Font','Noto Sans', sans-serif;\n margin: 0;\n overflow: hidden;\n}\n\nh1 {\n font-family: \"f1Font\",\"IBM Plex Sans\", sans-serif;\n font-style: normal;\n font-weight: 700;\n font-size: 7vw;\n line-height: 7vw;\n}\n\nh2 {\n font-family: \"f1Font\",'IBM Plex Sans', sans-serif;\n font-style: normal;\n font-weight: 700;\n font-size: 60px;\n line-height: 78px;\n margin-top: 0;\n}\n\np {\n font-family: \"f1Font\",'Noto Sans', sans-serif;\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 22px;\n color: #333;\n}\n\nbutton {\n font-family: \"f1Font\",'Noto Sans';\n font-style: normal;\n font-weight: 700;\n font-size: 16px;\n line-height: 100%;\n text-transform: uppercase;\n}\n\na {\n text-decoration: none;\n}\n\n.container {\n overflow-y: scroll;\n scroll-snap-type: y mandatory;\n width: 100vw;\n height: 100vh;\n}\n\n.section {\n height: 100%;\n width: 100%;\n scroll-snap-align: start;\n}","@font-face {\n font-family: 'Formula1-Regular';\n src: url('../../public/fonts/Formula1-Italic.ttf') format('ttf');\n font-weight: normal;\n font-style: normal;\n}\n.welcome {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.content {\n position: relative;\n flex-grow : 1;\n align-items: center;\n overflow: hidden;\n}\n\n.f1 {\n margin-top: 3%;\n position: absolute;\n top: 0;\n left: 15%; /* Centering f1, adjust this value based on your layout */\n width: 70%; /* Adjust width as necessary */\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n align-content: center;\n opacity: 0.75; /* Maintain opacity setting */\n z-index: 3; /* Higher z-index to be on top */\n}\n\n.video {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 1;\n}\n\n.overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0,0,0,0.5); /* Add a semi-transparent overlay */\n z-index: 2;\n}\n\n.text_w {\n position: absolute;\n color: #ffff;\n text-align: center;\n margin-top: 35%;\n opacity: 0.7;\n margin-left: 10%;\n margin-right: 10%;\n font-family: f1Font, sans-serif;\n}\n\n.boder_img {\n width: 5%;\n}\n\n.floatingButton {\n position: fixed;\n bottom: 20px;\n right: 20px;\n padding: 10px 20px;\n font-size: 16px;\n color: #fff;\n background-color: rgba(0,0,0,0.5);\n border: none;\n border-radius: 5px;\n cursor: pointer;\n z-index: 1000;\n}",".template {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n.boder_img {\n width: 5%;\n}\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.leaderboard {\n position: relative;\n transform: translate(25px);\n}\n\n.leaderboardItem {\n border-radius: 10px;\n transition: width 0.5s ease-out, background-color 0.3s ease-out;\n margin-top: -0.3em;\n}\n\n.itemName {\n color: white;\n font-family: \"IBM Plex Sans\", sans-serif;\n text-transform: uppercase;\n font-weight: bold;\n margin-block: 0;\n margin-left: 8px;\n}\n\n.leaderboardScore {\n margin: 0;\n font-weight: bold;\n font-family: \"IBM Plex Sans\", sans-serif;\n margin-left: -45px;\n}\n\n.leaderboardPosition {\n margin: 0;\n margin-left: -0.5em;\n text-align: right;\n font-weight: bold;\n font-family: \"IBM Plex Sans\", sans-serif;\n width: 35px;\n}\n\n.itemContainer {\n display: flex;\n margin: auto;\n}\n\n.container {\n display: flex;\n flex-direction: row;\n position: relative;\n width: fit-content;\n}\n\n.halfDiv {\n width: 60%;\n}\n\n.content{\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-bottom: 1em;\n align-items: center;\n width: 100%;\n max-width: 1200px;\n}\n\n.leader{\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n}\n\n.centerImage {\n width: 33px;\n height: 95%;\n opacity: 0.75;\n padding-left: -70em;\n padding-right: 4em;\n}\n\n",".bar {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 12px;\n}\n\n\n.play {\n display: flex;\n align-items: center;\n transition: all 0.3s ease;\n color: #ccc;\n}\n\n.play:hover {\n transform: scale(1.15);\n}\n\n.year {\n font-family: \"IBM Plex Sans\", sans-serif;\n font-weight: 700;\n}\n\ninput[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 200px;\n cursor: pointer;\n outline: none;\n}\n\ninput[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%; /* Updated to fill available space */\n cursor: pointer;\n outline: none;\n}\n\ninput[type=\"range\"] {\n height: 15px;\n background: #ccc;\n border-radius: 16px;\n}\n\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n height: 15px;\n background: #ccc;\n border-radius: 16px;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n height: 15px;\n background: #ccc;\n border-radius: 16px;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n height: 100px; /* Adjust height as needed */\n width: 100px; /* Adjust width as needed */\n background: url('../../img/f1_t.png') no-repeat center;\n background-size: contain; /* Ensure the image fits within the thumb */\n border: none; /* Remove border to avoid cropping */\n cursor: pointer;\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n height: 100px; /* Adjust height as needed */\n width: 100px; /* Adjust width as needed */\n background: url('../../img/f1_t.png') no-repeat center;\n background-size: contain; /* Ensure the image fits within the thumb */\n border: none; /* Remove border to avoid cropping */\n cursor: pointer;\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n box-shadow: -800px 0 0 800px #AAAAAA;\n}\n\ninput[type=\"range\"] {\n overflow: hidden;\n border-radius: 16px;\n}",".template {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.content {\n position: relative;\n flex-grow : 1;\n align-items: center;\n overflow: hidden;\n}\n\n.boder_img {\n width: 5%;\n}\n\n.content {\n display: flex;\n flex-grow: 1;\n height: 100%;\n}\n\n.leftSide {\n display: flex;\n flex-direction: column;\n width: 50%;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n\n.rightSide {\n width: 50%;\n height: 100%;\n display: flex;\n flex-direction: column-reverse;\n align-items: center;\n justify-content: center;\n\n}\n\n.rightBottom {\n flex: 6; /* Takes 60% of the vertical space */\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%; /* Ensures full width within the parent container */\n}\n\n.rightTop {\n flex: 4; /* Takes 40% of the vertical space */\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%; /* Ensures full width within the parent container */\n margin: 0;\n}\n\n.centerImage {\n position: absolute;\n top: 50%; /* Adjust these to center the image */\n left: 50%;\n transform: translate(-50%, -50%); /* Centers the image exactly between the divs */\n z-index: 10; /* Ensures the image is above other elements */\n height: 100%;\n width: 34px;\n opacity: 0.75;\n}\n\n.centerDivider {\n width: 100%;\n height: 33px; /* Adjust based on your image's aspect ratio */\n display: block; /* Ensures it doesn't have extra space around it */\n opacity: 0.8;\n /* padding on left*/\n padding-left: 33px;\n}\n\n.titleContainer {\n text-align: center;\n margin-bottom: 0.1em;\n font-size: 28px;\n width: 100%;\n padding-top: 5%;\n color: white;\n font-weight: bold;\n margin-top: -0.5em;\n}\n\n.desc{\n font-size: 0.6em;\n color: #CCCCCC;\n text-align: center;\n margin: 0;\n padding: 5em;\n margin-top: -3em;\n margin-bottom: -6em;\n}\n",".imageRow {\n display: flex;\n justify-content: space-between; /* Distributes space evenly between images */\n align-items: flex-end; /* Keeps images aligned at the bottom */\n overflow-x: auto; /* Adds horizontal scrolling if needed */\n /* Adds padding around the images */\n padding: 20px 10px 0 20px;\n width: 100%;\n height: 100%;\n}\n\nimg {\n transition: all 0.3s ease-in-out; /* Smooth transition for size and spacing */\n cursor: pointer; /* Indicates that the images are clickable */\n flex-shrink: 0; /* Prevents images from shrinking */\n}\n",".divInfo {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-around;\n padding: 10px;\n border-radius: 8px;\n margin-left: 5rem;\n margin-bottom: -0.5rem;\n margin-top: -5rem;\n font-size: calc(0.5vw + 0.5vh + 0.25vmin);\n}\n\n.item {\n flex: 1 1 auto;\n margin: 5px;\n padding-inline: 5px;\n /*border: 1px solid #eee;*/\n border-radius: 5px;\n /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n text-align: left;\n}\n\n.name h1 {\n font-size: 2em; /* Adjust heading size relatively larger */\n text-align: center; /* Center the title text */\n margin: 1px 1px;\n justify-content: center;\n padding: 1px;\n width: 100%;\n font-weight: bold;\n height: 5%;\n text-decoration: underline;\n margin-bottom: -40px;\n}\n.name {\n width: 100%;\n margin: 0;\n padding: 1px;\n display: flex;\n}\n\n.label {\n font-weight: bold;\n font-size: 0.6em; /* Relative to container's base font size */\n margin: 1px 1px;\n /*Make text fill width of container */\n width: 100%;\n height: 10%;\n}\n\n.value {\n font-family: 'IBM Plex Sans', sans-serif;\n font-size: 0.5em; /* Smaller and relative to container's base font size */\n margin: 1px 5px;\n width: 10%;\n height: 10%;\n font-weight: lighter;\n color: #CCCCCC;\n}\n\np{\n margin: 1px;\n}\n\n\n","body {\n background-color: #222;\n}\n\ncircle, line, polygon {\n stroke: #E3E3E3;\n stroke-width: 3px;\n fill:none;\n}\n\ncircle {\n stroke: #E3E3E3;\n stroke-width: 1px;\n opacity: 0.5;\n}\n\npolygon {\n stroke: #FF1A2D;\n stroke-width: 2px;\n fill:#EF1A2D;\n fill-opacity:.3;\n}\n\n\ntext {\n font-family: 'Helvetica';\n font-size:12px;\n font-weight: bold;\n stroke: none;\n fill:#CCCCCC;\n alignment-baseline: middle;\n}\n\n\n\nline.axis {\n stroke-width: 1px;\n opacity: .5;\n}",".circuits {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.content {\n position: relative;\n display: flex;\n flex-direction: column;\n flex-grow : 1;\n align-items: center;\n overflow: hidden;\n height: 100%;\n}\n\n.top {\n flex: 3;\n flex-grow: 1;\n}\n\n.bottom {\n flex: 1;\n flex-grow: 1;\n}\n\n.boder_img {\n width: 5%;\n}\n\n/* html {\n font-family: system-ui, sans-serif;\n font-size: 1.25rem;\n} */\n\nbody {\n margin: 0;\n}\n\n.centerImage {\n width: 100%;\n height: 33px;\n display: block; /* Ensures it doesn't have extra space around it */\n opacity: 0.8;\n}",".mapContainer {\n position: relative;\n border: 1px solid white;\n /* background: #f5f5f5; */\n}",".infobox {\n display: flex;\n padding-left: 20px;\n border-radius: 8px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n width: 100%;\n box-sizing: border-box;\n align-items: flex-start;\n height: 100%;\n}\n\n.infoContainer {\n display: flex;\n flex-wrap: wrap;\n flex: 4;\n position: relative; /* Add this line */\n padding-right: 33px;\n height: 100%;\n}\n\n.infoColumn {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 200px; /* Ensure a minimum width for responsiveness */\n padding-right: 10px;\n}\n\n.title {\n font-size: 1.8em;\n font-weight: bold;\n margin-bottom: 0;\n margin-top: 0;\n color: #F0F0F0;\n width: 100%; /* Make sure title takes full width */\n}\n\n.info {\n font-size: 0.85rem;\n color: #CCCCCC;\n padding: 0;\n}\n\n.infoDescription {\n font-size: 1rem;\n color: #F0F0F0;\n padding: 0;\n}\n\n.imageContainer {\n flex: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n /* margin-left: 20px; */\n}\n\n.circuitImage {\n /* max-width: 100%; */\n width: auto;\n height: 11.8em;\n}\n\n.centerImage {\n width: 33px; /* Set strict width */\n height: 100%; /* Make height 100% of parent */\n position: absolute; /* Position it absolutely within the parent */\n right: 0; /* Align to the left */\n top: 0; /* Align to the top */\n overflow: hidden; /* Hide overflow */\n opacity: 0.8;\n}\n",".seasonevolution {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n }\n \n .plotContainer {\n width: 100%;\n height: 80vh; /* Adjust height as necessary */\n box-sizing: border-box; /* Ensures border is included in element's dimensions */\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n \n .border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n width: 100%;\n }\n \n .content {\n display: flex;\n position: relative;\n align-items: center;\n overflow: hidden;\n }\n \n .left {\n flex: 3;\n margin-top: 100px;\n }\n \n .right {\n flex: 2;\n margin-top: 20px;\n }\n \n .boder_img {\n width: 5%;\n }\n \n p {\n color: white;\n font-size: 1.5em;\n padding-right: 100px;\n }\n \n .titleWrapper {\n position: absolute;\n top: 10px; /* Adjust this value as needed */\n left: 50%;\n transform: translateX(-50%);\n z-index: 1; /* Ensure it is on top */\n width: 100%;\n text-align: center;\n color: white;\n }\n \n .sliderContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 20px;\n width: 100%; /* Ensures the slider container takes the full width */\n }\n \n .slider {\n width: 90%; /* Adjust width to take nearly full width, providing some margin */\n margin-right: 10px;\n -webkit-appearance: none; /* Override default appearance */\n appearance: none; /* Override default appearance */\n height: 10px; /* Adjust the height */\n background: white; /* White background */\n outline: none; /* Remove outline */\n opacity: 0.7; /* Set transparency */\n transition: opacity .15s ease-in-out; /* Transition effect */\n }\n \n .slider::-webkit-slider-thumb {\n -webkit-appearance: none; /* Override default appearance */\n appearance: none; /* Override default appearance */\n width: 25px; /* Adjust the width */\n height: 25px; /* Adjust the height */\n background: white; /* White thumb */\n cursor: pointer; /* Pointer cursor on hover */\n }\n \n .slider::-moz-range-thumb {\n width: 25px; /* Adjust the width */\n height: 25px; /* Adjust the height */\n background: white; /* White thumb */\n cursor: pointer; /* Pointer cursor on hover */\n }\n \n .yearLabel {\n font-size: 18px;\n font-weight: bold;\n color: white; /* White text color */\n }\n ","/* Template styling */\n.template {\n height: 100%;\n overflow-wrap: break-word;\n min-height: 100vh;\n align-items: center;\n justify-content: center;\n width: 100%;\n background-image: url('../img/background_road.png');\n background-size: cover;\n background-position: center;\n background-repeat: repeat;\n}\n\n/* Example CSS */\n#driverteamrelation {\n /* Add necessary styles */\n border: 1px solid black;\n}\n\n.border {\n display: flex;\n justify-content: space-between;\n height: 100%;\n}\n\n.content {\n display: flex;\n flex-direction: column;\n position: relative;\n flex-grow : 1;\n align-items: center;\n overflow: hidden;\n}\n\n.content h1 {\n font-size: 2rem;\n color: #fff;\n margin-top: -1rem;\n margin-bottom: -2em;\n padding: 0;\n}\n\n.boder_img {\n width: 5%;\n}\n\n/* Define classes for each team with their respective colors */\n.team-McLaren {\n fill: #FF8700;\n stroke: #FF8700;\n opacity: 0.8;\n}\n\n.team-Mercedes {\n fill: #00D2BE;\n stroke: #00D2BE;\n opacity: 0.8;\n}\n\n.team-Renault {\n fill: #FFF500;\n stroke: #FFF500;\n opacity: 0.8;\n}\n\n.team-Ferrari {\n fill: #DC0000;\n stroke: #DC0000;\n opacity: 0.8;\n}\n\n.team-Aston-Martin {\n fill: #006F62;\n stroke: #006F62;\n opacity: 0.8;\n}\n\n.team-Alpine-F1-Team {\n fill: #0090FF;\n stroke: #0090FF;\n opacity: 0.8;\n}\n\n.team-Lotus {\n fill: #FFB800;\n stroke: #FFB800;\n opacity: 0.8;\n}\n\n.team-Caterham {\n fill: #00352F;\n stroke: #00352F;\n opacity: 0.8;\n}\n\n.team-Lotus-F1 {\n fill: #FFB800;\n stroke: #FFB800;\n opacity: 0.8;\n}\n\n.team-Alfa-Romeo {\n fill: #900000;\n stroke: #900000;\n opacity: 0.8;\n}\n\n.team-Williams {\n fill: #005AFF;\n stroke: #005AFF;\n opacity: 0.8;\n}\n\n.team-Virgin {\n fill: #E31837;\n stroke: #E31837;\n opacity: 0.8;\n}\n\n.team-Marussia {\n fill: #D40000;\n stroke: #D40000;\n opacity: 0.8;\n}\n\n.team-Force-India {\n fill: #FF8700;\n stroke: #FF8700;\n opacity: 0.8;\n}\n\n.team-Sauber {\n fill: #006EFF;\n stroke: #006EFF;\n opacity: 0.8;\n}\n\n.team-Red-Bull {\n fill: #1E41FF;\n stroke: #1E41FF;\n opacity: 0.8;\n}\n\n.team-HRT {\n fill: #BEBEBE;\n stroke: #BEBEBE;\n opacity: 0.8;\n}\n\n.team-Toro-Rosso {\n fill: #0032FF;\n stroke: #0032FF;\n opacity: 0.8;\n}\n\n.team-Haas-F1-Team {\n fill: #787878;\n stroke: #787878;\n opacity: 0.8;\n}\n\n.team-Racing-Point {\n fill: #F596C8;\n stroke: #F596C8;\n opacity: 0.8;\n}\n\n.team-AlphaTauri {\n fill: #2B4562;\n stroke: #2B4562;\n opacity: 0.8;\n}\n\n.team-Manor-Marussia {\n fill: #E40000;\n stroke: #E40000;\n opacity: 0.8;\n}\n\n/* Links opacity */\n.link {\n stroke-opacity: 0.4;\n}\n\n/* Text color */\n.text-McLaren {\n color: #FF8700;\n}\n\n.text-Mercedes {\n color: #00D2BE;\n}\n\n.text-Renault {\n color: #FFF500;\n}\n\n.text-Ferrari {\n color: #DC0000;\n}\n\n.text-Aston-Martin {\n color: #006F62;\n}\n\n.text-Alpine-F1-Team {\n color: #0090FF;\n}\n\n.text-Lotus {\n color: #FFB800;\n}\n\n.text-Caterham {\n color: #00352F;\n}\n\n.text-Lotus-F1 {\n color: #FFB800;\n}\n\n.text-Alfa-Romeo {\n color: #900000;\n}\n\n.text-Williams {\n color: #005AFF;\n}\n\n.text-Virgin {\n color: #E31837;\n}\n\n.text-Marussia {\n color: #D40000;\n}\n\n.text-Force-India {\n color: #FF8700;\n}\n\n.text-Sauber {\n color: #006EFF;\n}\n\n.text-Red-Bull {\n color: #1E41FF;\n}\n\n.text-HRT {\n color: #BEBEBE;\n}\n\n.text-Toro-Rosso {\n color: #0032FF;\n}\n\n.text-Haas-F1-Team {\n color: #787878;\n}\n\n.text-Racing-Point {\n color: #F596C8;\n}\n\n.text-AlphaTauri {\n color: #2B4562;\n}\n\n.text-Manor-Marussia {\n color: #E40000;\n}\n\n/* Team info overlay */\n.teamInfo {\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n background: rgba(255, 255, 255, 0.04);\n /*add border and shador*/\n border: 1px solid rgba(255, 255, 255, 0.2);\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);\n color: white;\n padding: 10px;\n border-radius: 0 5px 5px 0;\n z-index: 10;\n pointer-events: none;\n}\n\n.teamInfo h2 {\n margin: 0 0 10px 0;\n font-size: 2.2rem;\n}\n\n.teamInfo ul {\n list-style: none;\n padding: 0;\n margin: 0;\n color: rgb(240, 240, 240);\n}\n\n.teamInfo li {\n margin-bottom: 5px;\n}\n",".sideMenu {\n position: absolute;\n top: 0;\n left: 0;\n width: 2.5%; /* Reduced initial width */\n height: 35%;\n background-color: #312829;\n box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);\n z-index: 1000;\n transition: width 0.3s ease;\n overflow: hidden;\n opacity: 0.5;\n border-radius: 0 5px 5px 0;\n}\n\n.sideMenu:hover {\n width: 250px; /* Expand width on hover */\n color: red;\n}\n\n.sideMenu ul {\n list-style: none;\n padding: 0;\n margin: 0;\n height: 100%;\n display: flex;\n flex-direction: column; /* Align items vertically */\n justify-content: center; /* Center items vertically */\n}\n\n.sideMenu li {\n padding: 10px;\n border-bottom: 1px solid white;\n color: white;\n cursor: pointer;\n white-space: nowrap; /* Ensure text doesn't wrap */\n opacity: 0; /* Make text invisible initially */\n transition: opacity 0.3s ease 0.3s; /* Delay text appearance until expansion */\n}\n\n.sideMenu:hover li {\n opacity: 1; /* Make text visible when hovered */\n}\n\n/* Styling for a small tab to grab attention when retracted */\n.tab {\n position: absolute;\n top: 40%;\n right: 0; /* Position it just outside the main menu */\n width: 40px;\n height: 40px;\n background-color: white;\n transform: translateY(-50%);\n border-radius: 0 5px 5px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: red;\n font-weight: bold;\n cursor: pointer;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.a26b0326.js b/static/js/main.38cbab50.js similarity index 99% rename from static/js/main.a26b0326.js rename to static/js/main.38cbab50.js index 847e6e5..95e8405 100644 --- a/static/js/main.a26b0326.js +++ b/static/js/main.38cbab50.js @@ -1,3 +1,3 @@ -/*! For license information please see main.a26b0326.js.LICENSE.txt */ -(()=>{var r={8096:r=>{var e;self,e=function(){return function(){var r={79288:function(r,e,n){"use strict";var i=n(3400),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 .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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 t in a){var o=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");i.addStyleRule(o,a[t])}},86712:function(r,e,n){"use strict";r.exports=n(84224)},37240:function(r,e,n){"use strict";r.exports=n(51132)},29744:function(r,e,n){"use strict";r.exports=n(94456)},29352:function(r,e,n){"use strict";r.exports=n(67244)},96144:function(r,e,n){"use strict";r.exports=n(97776)},53219:function(r,e,n){"use strict";r.exports=n(61712)},4624:function(r,e,n){"use strict";r.exports=n(95856)},54543:function(r,e,n){"use strict";r.exports=n(54272)},45e3:function(r,e,n){"use strict";r.exports=n(85404)},62300:function(r,e,n){"use strict";r.exports=n(26048)},6920:function(r,e,n){"use strict";r.exports=n(66240)},10264:function(r,e,n){"use strict";r.exports=n(40448)},32016:function(r,e,n){"use strict";r.exports=n(64884)},27528:function(r,e,n){"use strict";r.exports=n(15088)},75556:function(r,e,n){"use strict";r.exports=n(76744)},39204:function(r,e,n){"use strict";r.exports=n(94704)},73996:function(r,e,n){"use strict";r.exports=n(62396)},16489:function(r,e,n){"use strict";r.exports=n(32028)},5e3:function(r,e,n){"use strict";r.exports=n(81932)},77280:function(r,e,n){"use strict";r.exports=n(45536)},33992:function(r,e,n){"use strict";r.exports=n(42600)},17600:function(r,e,n){"use strict";r.exports=n(21536)},49116:function(r,e,n){"use strict";r.exports=n(65664)},46808:function(r,e,n){"use strict";r.exports=n(29044)},36168:function(r,e,n){"use strict";r.exports=n(48928)},13792:function(r,e,n){"use strict";var i=n(32016);i.register([n(37240),n(29352),n(5e3),n(33992),n(17600),n(49116),n(6920),n(67484),n(79440),n(39204),n(83096),n(36168),n(20260),n(63560),n(65832),n(46808),n(73996),n(48824),n(89904),n(25120),n(13752),n(4340),n(62300),n(29800),n(8363),n(54543),n(86636),n(42192),n(32140),n(77280),n(89296),n(56816),n(70192),n(45e3),n(27528),n(84764),n(3920),n(50248),n(4624),n(69967),n(10264),n(86152),n(53219),n(81604),n(63796),n(29744),n(89336),n(86712),n(75556),n(16489),n(97312),n(96144)]),r.exports=i},3920:function(r,e,n){"use strict";r.exports=n(43480)},25120:function(r,e,n){"use strict";r.exports=n(6296)},4340:function(r,e,n){"use strict";r.exports=n(7404)},86152:function(r,e,n){"use strict";r.exports=n(65456)},56816:function(r,e,n){"use strict";r.exports=n(22020)},89296:function(r,e,n){"use strict";r.exports=n(29928)},20260:function(r,e,n){"use strict";r.exports=n(75792)},32140:function(r,e,n){"use strict";r.exports=n(156)},84764:function(r,e,n){"use strict";r.exports=n(45499)},48824:function(r,e,n){"use strict";r.exports=n(3296)},69967:function(r,e,n){"use strict";r.exports=n(4184)},8363:function(r,e,n){"use strict";r.exports=n(36952)},86636:function(r,e,n){"use strict";r.exports=n(38983)},70192:function(r,e,n){"use strict";r.exports=n(11572)},81604:function(r,e,n){"use strict";r.exports=n(76924)},63796:function(r,e,n){"use strict";r.exports=n(62944)},89336:function(r,e,n){"use strict";r.exports=n(95443)},67484:function(r,e,n){"use strict";r.exports=n(34864)},97312:function(r,e,n){"use strict";r.exports=n(76272)},42192:function(r,e,n){"use strict";r.exports=n(97924)},29800:function(r,e,n){"use strict";r.exports=n(15436)},63560:function(r,e,n){"use strict";r.exports=n(5621)},89904:function(r,e,n){"use strict";r.exports=n(91304)},50248:function(r,e,n){"use strict";r.exports=n(41724)},65832:function(r,e,n){"use strict";r.exports=n(31991)},79440:function(r,e,n){"use strict";r.exports=n(22869)},13752:function(r,e,n){"use strict";r.exports=n(67776)},83096:function(r,e,n){"use strict";r.exports=n(95952)},72196:function(r){"use strict";r.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}]},13916:function(r,e,n){"use strict";var i=n(72196),a=n(25376),t=n(33816),o=n(31780).templatedArray;n(36208),r.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:i.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:i.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",t.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",t.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",t.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",t.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"}}})},90272:function(r,e,n){"use strict";var i=n(3400),a=n(54460),t=n(23816).draw;function o(r){var e=r._fullLayout;i.filterVisible(e.annotations).forEach((function(e){var n=a.getFromId(r,e.xref),i=a.getFromId(r,e.yref),t=a.getRefType(e.xref),o=a.getRefType(e.yref);e._extremes={},"range"===t&&c(e,n),"range"===o&&c(e,i)}))}function c(r,e){var n,i=e._id,t=i.charAt(0),o=r[t],c=r["a"+t],u=r[t+"ref"],d=r["a"+t+"ref"],s=r["_"+t+"padplus"],l=r["_"+t+"padminus"],m={x:1,y:-1}[t]*r[t+"shift"],p=3*r.arrowsize*r.arrowwidth||0,I=p+m,y=p-m,f=3*r.startarrowsize*r.arrowwidth||0,g=f+m,_=f-m;if(d===u){var h=a.findExtremes(e,[e.r2c(o)],{ppadplus:I,ppadminus:y}),v=a.findExtremes(e,[e.r2c(c)],{ppadplus:Math.max(s,g),ppadminus:Math.max(l,_)});n={min:[h.min[0],v.min[0]],max:[h.max[0],v.max[0]]}}else g=c?g+c:g,_=c?_-c:_,n=a.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(s,I,g),ppadminus:Math.max(l,y,_)});r._extremes[i]=n}r.exports=function(r){var e=r._fullLayout;if(i.filterVisible(e.annotations).length&&r._fullData.length)return i.syncOrAsync([t,o],r)}},42300:function(r,e,n){"use strict";var i=n(3400),a=n(24040),t=n(31780).arrayEditor;function o(r,e){var n,i,a,t,o,u,d,s=r._fullLayout.annotations,l=[],m=[],p=[],I=(e||[]).length;for(n=0;n0||n.explicitOff.length>0},onClick:function(r,e){var n,c,u=o(r,e),d=u.on,s=u.off.concat(u.explicitOff),l={},m=r._fullLayout.annotations;if(d.length||s.length){for(n=0;n2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,Z=["x","y"],q=0;q1)&&(ir===nr?((pr=ar.r2fraction(e["a"+er]))<0||pr>1)&&(W=!0):W=!0),Y=ar._offset+ar.r2p(e[er]),$=.5}else{var Ir="domain"===mr;"x"===er?(Q=e[er],Y=Ir?ar._offset+ar._length*Q:Y=G.l+G.w*Q):(Q=1-e[er],Y=Ir?ar._offset+ar._length*Q:Y=G.t+G.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){lr.head=Y;var yr=e["a"+er];if(rr=or*K(.5,e.xanchor)-cr*K(.5,e.yanchor),ir===nr){var fr=u.getRefType(ir);"domain"===fr?("y"===er&&(yr=1-yr),lr.tail=ar._offset+ar._length*yr):"paper"===fr?"y"===er?(yr=1-yr,lr.tail=G.t+G.h*yr):lr.tail=G.l+G.w*yr:lr.tail=ar._offset+ar.r2p(yr),X=rr}else lr.tail=Y+yr,X=rr+yr;lr.text=lr.tail+rr;var gr=P["x"===er?"width":"height"];if("paper"===nr&&(lr.head=o.constrain(lr.head,1,gr-1)),"pixel"===ir){var _r=-Math.max(lr.tail-3,lr.text),hr=Math.min(lr.tail+3,lr.text)-gr;_r>0?(lr.tail+=_r,lr.text+=_r):hr>0&&(lr.tail-=hr,lr.text-=hr)}lr.tail+=sr,lr.head+=sr}else X=rr=ur*K($,dr),lr.text=Y+rr;lr.text+=sr,rr+=sr,X+=sr,e["_"+er+"padplus"]=ur/2+X,e["_"+er+"padminus"]=ur/2-X,e["_"+er+"size"]=ur,e["_"+er+"shift"]=rr}if(W)N.remove();else{var vr=0,xr=0;if("left"!==e.align&&(vr=(S-v)*("center"===e.align?.5:1)),"top"!==e.valign&&(xr=(E-x)*("middle"===e.valign?.5:1)),l)i.select("svg").attr({x:J+vr-1,y:J+xr}).call(s.setClipUrl,H?B:null,r);else{var Pr=J+xr-y.top,Gr=J+vr-y.left;V.call(m.positionText,Gr,Pr).call(s.setClipUrl,H?B:null,r)}L.select("rect").call(s.setRect,J,J,S,E),U.call(s.setRect,T/2,T/2,D-T,O-T),N.call(s.setTranslate,Math.round(k.x.text-D/2),Math.round(k.y.text-O/2)),w.attr({transform:"rotate("+F+","+k.x.text+","+k.y.text+")"});var Cr,Sr=function(n,i){z.selectAll(".annotation-arrow-g").remove();var u=k.x.head,l=k.y.head,m=k.x.tail+n,p=k.y.tail+i,y=k.x.text+n,v=k.y.text+i,x=o.rotationXYMatrix(F,y,v),P=o.apply2DTransform(x),S=o.apply2DTransform2(x),B=+U.attr("width"),R=+U.attr("height"),E=y-.5*B,T=E+B,D=v-.5*R,J=D+R,H=[[E,D,E,J],[E,J,T,J],[T,J,T,D],[T,D,E,D]].map(S);if(!H.reduce((function(r,e){return r^!!o.segmentsIntersect(u,l,u+1e6,l+1e6,e[0],e[1],e[2],e[3])}),!1)){H.forEach((function(r){var e=o.segmentsIntersect(m,p,u,l,r[0],r[1],r[2],r[3]);e&&(m=e.x,p=e.y)}));var L=e.arrowwidth,O=e.arrowcolor,K=e.arrowside,V=z.append("g").style({opacity:d.opacity(O)}).classed("annotation-arrow-g",!0),j=V.append("path").attr("d","M"+m+","+p+"L"+u+","+l).style("stroke-width",L+"px").call(d.stroke,d.rgb(O));if(f(j,K,e),C.annotationPosition&&j.node().parentNode&&!t){var W=u,Z=l;if(e.standoff){var q=Math.sqrt(Math.pow(u-m,2)+Math.pow(l-p,2));W+=e.standoff*(m-u)/q,Z+=e.standoff*(p-l)/q}var Y,X,Q=V.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(m-W)+","+(p-Z),transform:c(W,Z)}).style("stroke-width",L+6+"px").call(d.stroke,"rgba(0,0,0,0)").call(d.fill,"rgba(0,0,0,0)");I.init({element:Q.node(),gd:r,prepFn:function(){var r=s.getTranslate(N);Y=r.x,X=r.y,g&&g.autorange&&A(g._name+".autorange",!0),h&&h.autorange&&A(h._name+".autorange",!0)},moveFn:function(r,n){var i=P(Y,X),a=i[0]+r,t=i[1]+n;N.call(s.setTranslate,a,t),b("x",_(g,r,"x",G,e)),b("y",_(h,n,"y",G,e)),e.axref===e.xref&&b("ax",_(g,r,"ax",G,e)),e.ayref===e.yref&&b("ay",_(h,n,"ay",G,e)),V.attr("transform",c(r,n)),w.attr({transform:"rotate("+F+","+a+","+t+")"})},doneFn:function(){a.call("_guiRelayout",r,M());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&Sr(0,0),R&&I.init({element:N.node(),gd:r,prepFn:function(){Cr=w.attr("transform")},moveFn:function(r,n){var i="pointer";if(e.showarrow)e.axref===e.xref?b("ax",_(g,r,"ax",G,e)):b("ax",e.ax+r),e.ayref===e.yref?b("ay",_(h,n,"ay",G.w,e)):b("ay",e.ay+n),Sr(r,n);else{if(t)return;var a,o;if(g)a=_(g,r,"x",G,e);else{var u=e._xsize/G.w,d=e.x+(e._xshift-e.xshift)/G.w-u/2;a=I.align(d+r/G.w,u,0,1,e.xanchor)}if(h)o=_(h,n,"y",G,e);else{var s=e._ysize/G.h,l=e.y-(e._yshift+e.yshift)/G.h-s/2;o=I.align(l-n/G.h,s,0,1,e.yanchor)}b("x",a),b("y",o),g&&h||(i=I.getCursor(g?.5:a,h?.5:o,e.xanchor,e.yanchor))}w.attr({transform:c(r,n)+Cr}),p(N,i)},clickFn:function(n,i){e.captureevents&&r.emit("plotly_clickannotation",j(i))},doneFn:function(){p(N),a.call("_guiRelayout",r,M());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}r.exports={draw:function(r){var e=r._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var n=0;n=0,h=e.indexOf("end")>=0,v=I.backoff*f+n.standoff,x=y.backoff*g+n.startstandoff;if("line"===p.nodeName){o={x:+r.attr("x1"),y:+r.attr("y1")},s={x:+r.attr("x2"),y:+r.attr("y2")};var P=o.x-s.x,G=o.y-s.y;if(m=(l=Math.atan2(G,P))+Math.PI,v&&x&&v+x>Math.sqrt(P*P+G*G))return void R();if(v){if(v*v>P*P+G*G)return void R();var C=v*Math.cos(l),S=v*Math.sin(l);s.x+=C,s.y+=S,r.attr({x2:s.x,y2:s.y})}if(x){if(x*x>P*P+G*G)return void R();var A=x*Math.cos(l),b=x*Math.sin(l);o.x-=A,o.y-=b,r.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var M=p.getTotalLength(),B="";if(M1){d=!0;break}}d?r.fullLayout._infolayer.select(".annotation-"+r.id+'[data-index="'+c+'"]').remove():(u._pdata=a(r.glplot.cameraParams,[e.xaxis.r2l(u.x)*n[0],e.yaxis.r2l(u.y)*n[1],e.zaxis.r2l(u.z)*n[2]]),i(r.graphDiv,u,c,r.id,u._xa,u._ya))}}},56864:function(r,e,n){"use strict";var i=n(24040),a=n(3400);r.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:n(45899)}}},layoutAttributes:n(45899),handleDefaults:n(52808),includeBasePlot:function(r,e){var n=i.subplotsRegistry.gl3d;if(n)for(var t=n.attrRegex,o=Object.keys(r),c=0;c=0))return r;if(3===o)i[o]>1&&(i[o]=1);else if(i[o]>=1)return r}var c=Math.round(255*i[0])+", "+Math.round(255*i[1])+", "+Math.round(255*i[2]);return t?"rgba("+c+", "+i[3]+")":"rgb("+c+")"}o.tinyRGB=function(r){var e=r.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(r){return o.tinyRGB(i(r))},o.opacity=function(r){return r?i(r).getAlpha():0},o.addOpacity=function(r,e){var n=i(r).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+e+")"},o.combine=function(r,e){var n=i(r).toRgb();if(1===n.a)return i(r).toRgbString();var a=i(e||d).toRgb(),t=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:t.r*(1-n.a)+n.r*n.a,g:t.g*(1-n.a)+n.g*n.a,b:t.b*(1-n.a)+n.b*n.a};return i(o).toRgbString()},o.interpolate=function(r,e,n){var a=i(r).toRgb(),t=i(e).toRgb(),o={r:n*a.r+(1-n)*t.r,g:n*a.g+(1-n)*t.g,b:n*a.b+(1-n)*t.b};return i(o).toRgbString()},o.contrast=function(r,e,n){var a=i(r);return 1!==a.getAlpha()&&(a=i(o.combine(r,d))),(a.isDark()?e?a.lighten(e):d:n?a.darken(n):u).toString()},o.stroke=function(r,e){var n=i(e);r.style({stroke:o.tinyRGB(n),"stroke-opacity":n.getAlpha()})},o.fill=function(r,e){var n=i(e);r.style({fill:o.tinyRGB(n),"fill-opacity":n.getAlpha()})},o.clean=function(r){if(r&&"object"===typeof r){var e,n,i,a,c=Object.keys(r);for(e=0;e0?i>=u:i<=u));a++)i>s&&i0?i>=u:i<=u));a++)i>n[0]&&i1){var pr=Math.pow(10,Math.floor(Math.log(mr)/Math.LN10));sr*=pr*d.roundUp(mr/pr,[2,5,10]),(Math.abs(j.start)/j.size+1e-6)%1<2e-6&&(ur.tick0=0)}ur.dtick=sr}ur.domain=o?[or+z/D.h,or+$-z/D.h]:[or+F/D.w,or+$-F/D.w],ur.setScale(),r.attr("transform",s(Math.round(D.l),Math.round(D.t)));var Ir,yr=r.select("."+S.cbtitleunshift).attr("transform",s(-Math.round(D.l),-Math.round(D.t))),fr=ur.ticklabelposition,gr=ur.title.font.size,_r=r.select("."+S.cbaxis),hr=0,vr=0;function xr(i,a){var t={propContainer:ur,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:T._dfltTitle.colorbar,containerGroup:r.select("."+S.cbtitle)},o="h"===i.charAt(0)?i.substr(1):"h"+i;r.selectAll("."+o+",."+o+"-math-group").remove(),y.draw(n,i,l(t,a||{}))}function Pr(){var r,e;(o&&dr||!o&&!dr)&&("top"===L&&(r=F+D.l+rr*w,e=z+D.t+er*(1-or-$)+3+.75*gr),"bottom"===L&&(r=F+D.l+rr*w,e=z+D.t+er*(1-or)-3-.25*gr),"right"===L&&(e=z+D.t+er*R+3+.75*gr,r=F+D.l+rr*or),xr(ur._id+"title",{attributes:{x:r,y:e,"text-anchor":o?"start":"middle"}}))}function Gr(){if(o&&!dr||!o&&dr){var r,a,t=ur.position||0,c=ur._offset+ur._length/2;if("right"===L)a=c,r=D.l+rr*t+10+gr*(ur.showticklabels?1:.5);else if(r=c,"bottom"===L&&(a=D.t+er*t+10+(-1===fr.indexOf("inside")?ur.tickfont.size:0)+("intside"!==ur.ticks&&e.ticklen||0)),"top"===L){var u=H.text.split("
").length;a=D.t+er*t+10-Y-P*gr*u}xr((o?"h":"v")+ur._id+"title",{avoid:{selection:i.select(n).selectAll("g."+ur._id+"tick"),side:L,offsetTop:o?0:D.t,offsetLeft:o?D.l:0,maxShift:o?T.width:T.height},attributes:{x:r,y:a,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}}function Cr(){if(!o&&!dr||o&&dr){var t,u=r.select("."+S.cbtitle),l=u.select("text"),m=[-A/2,A/2],I=u.select(".h"+ur._id+"title-math-group").node(),y=15.6;if(l.node()&&(y=parseInt(l.node().style.fontSize,10)*P),I?(t=p.bBox(I),vr=t.width,(hr=t.height)>y&&(m[1]-=(hr-y)/2)):l.node()&&!l.classed(S.jsPlaceholder)&&(t=p.bBox(l.node()),vr=t.width,hr=t.height),o){if(hr){if(hr+=5,"top"===L)ur.domain[1]-=hr/D.h,m[1]*=-1;else{ur.domain[0]+=hr/D.h;var g=f.lineCount(l);m[1]+=(1-g)*y}u.attr("transform",s(m[0],m[1])),ur.setScale()}}else vr&&("right"===L&&(ur.domain[0]+=(vr+gr/2)/D.w),u.attr("transform",s(m[0],m[1])),ur.setScale())}r.selectAll("."+S.cbfills+",."+S.cblines).attr("transform",o?s(0,Math.round(D.h*(1-ur.domain[1]))):s(Math.round(D.w*ur.domain[0]),0)),_r.attr("transform",o?s(0,Math.round(-D.t)):s(Math.round(-D.l),0));var _=r.select("."+S.cbfills).selectAll("rect."+S.cbfill).attr("style","").data(Z);_.enter().append("rect").classed(S.cbfill,!0).attr("style",""),_.exit().remove();var h=O.map(ur.c2p).map(Math.round).sort((function(r,e){return r-e}));_.each((function(r,t){var c=[0===t?O[0]:(Z[t]+Z[t-1])/2,t===Z.length-1?O[1]:(Z[t]+Z[t+1])/2].map(ur.c2p).map(Math.round);o&&(c[1]=d.constrain(c[1]+(c[1]>c[0])?1:-1,h[0],h[1]));var u=i.select(this).attr(o?"x":"y",nr).attr(o?"y":"x",i.min(c)).attr(o?"width":"height",Math.max(Y,2)).attr(o?"height":"width",Math.max(i.max(c)-i.min(c),2));if(e._fillgradient)p.gradient(u,n,e._id,o?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var s=V(r).replace("e-","");u.attr("fill",a(s).toHexString())}}));var v=r.select("."+S.cblines).selectAll("path."+S.cbline).data(U.color&&U.width?q:[]);v.enter().append("path").classed(S.cbline,!0),v.exit().remove(),v.each((function(r){var e=nr,n=Math.round(ur.c2p(r))+U.width/2%1;i.select(this).attr("d","M"+(o?e+","+n:n+","+e)+(o?"h":"v")+Y).call(p.lineGroupStyle,U.width,K(r),U.dash)})),_r.selectAll("g."+ur._id+"tick,path").remove();var x=nr+Y+(A||0)/2-("outside"===e.ticks?1:0),G=c.calcTicks(ur),C=c.getTickSigns(ur)[2];return c.drawTicks(n,ur,{vals:"inside"===ur.ticks?c.clipEnds(ur,G):G,layer:_r,path:c.makeTickPath(ur,x,C),transFn:c.makeTransTickFn(ur)}),c.drawLabels(n,ur,{vals:G,layer:_r,transFn:c.makeTransTickLabelFn(ur),labelFns:c.makeLabelFns(ur,x)})}function Sr(){var i,c=Y+A/2;-1===fr.indexOf("inside")&&(i=p.bBox(_r.node()),c+=o?i.width:i.height),Ir=yr.select("text");var d=0,l=o&&"top"===L,y=!o&&"right"===L,f=0;if(Ir.node()&&!Ir.classed(S.jsPlaceholder)){var _,h=yr.select(".h"+ur._id+"title-math-group").node();h&&(o&&dr||!o&&!dr)?(d=(i=p.bBox(h)).width,_=i.height):(d=(i=p.bBox(yr.node())).right-D.l-(o?nr:cr),_=i.bottom-D.t-(o?cr:nr),o||"top"!==L||(c+=i.height,f=i.height)),y&&(Ir.attr("transform",s(d/2+gr/2,0)),d*=2),c=Math.max(c,o?d:_)}var v=2*(o?F:z)+c+b+A/2,P=0;!o&&H.text&&"bottom"===k&&R<=0&&(v+=P=v/2,f+=P),T._hColorbarMoveTitle=P,T._hColorbarMoveCBTitle=f;var J=b+A,U=(o?nr:cr)-J/2-(o?F:0),O=(o?cr:nr)-(o?Q:z+f-P);r.select("."+S.cbbg).attr("x",U).attr("y",O).attr(o?"width":"height",Math.max(v-P,2)).attr(o?"height":"width",Math.max(Q+J,2)).call(I.fill,M).call(I.stroke,e.bordercolor).style("stroke-width",b);var K=y?Math.max(d-10,0):0;r.selectAll("."+S.cboutline).attr("x",(o?nr:cr+F)+K).attr("y",(o?cr+z-Q:nr)+(l?hr:0)).attr(o?"width":"height",Math.max(Y,2)).attr(o?"height":"width",Math.max(Q-(o?2*z+hr:2*F+K),2)).call(I.stroke,e.outlinecolor).style({fill:"none","stroke-width":A});var V=o?ir*v:0,j=o?0:(1-ar)*v-f;if(V=N?D.l-V:-V,j=E?D.t-j:-j,r.attr("transform",s(V,j)),!o&&(b||a(M).getAlpha()&&!a.equals(T.paper_bgcolor,M))){var W=_r.selectAll("text"),Z=W[0].length,q=r.select("."+S.cbbg).node(),X=p.bBox(q),$=p.getTranslate(r),rr=2;W.each((function(r,e){var n=0,i=Z-1;if(e===n||e===i){var a,t=p.bBox(this),o=p.getTranslate(this);if(e===i){var c=t.right+o.x;(a=X.right+$.x+cr-b-rr+w-c)>0&&(a=0)}else if(e===n){var u=t.left+o.x;(a=X.left+$.x+cr+b+rr-u)<0&&(a=0)}a&&(Z<3?this.setAttribute("transform","translate("+a+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var er={},tr=G[B],or=C[B],sr=G[k],lr=C[k],mr=v-Y;o?("pixels"===m?(er.y=R,er.t=Q*sr,er.b=Q*lr):(er.t=er.b=0,er.yt=R+u*sr,er.yb=R-u*lr),"pixels"===x?(er.x=w,er.l=v*tr,er.r=v*or):(er.l=mr*tr,er.r=mr*or,er.xl=w-g*tr,er.xr=w+g*or)):("pixels"===m?(er.x=w,er.l=Q*tr,er.r=Q*or):(er.l=er.r=0,er.xl=w+u*tr,er.xr=w-u*or),"pixels"===x?(er.y=1-R,er.t=v*sr,er.b=v*lr):(er.t=mr*sr,er.b=mr*lr,er.yt=R-g*sr,er.yb=R+g*lr));var pr=e.y<.5?"b":"t",vr=e.x<.5?"l":"r";n._fullLayout._reservedMargin[e._id]={};var xr={r:T.width-U-V,l:U+er.r,b:T.height-O-j,t:O+er.b};N&&E?t.autoMargin(n,e._id,er):N?n._fullLayout._reservedMargin[e._id][pr]=xr[pr]:E||o?n._fullLayout._reservedMargin[e._id][vr]=xr[vr]:n._fullLayout._reservedMargin[e._id][pr]=xr[pr]}return d.syncOrAsync([t.previousPromises,Pr,Cr,Gr,t.previousPromises,Sr],n)}(n,e,r);g&&g.then&&(r._promises||[]).push(g),r._context.edits.colorbarPosition&&function(r,e,n){var i,a,t,c="v"===e.orientation,d=n._fullLayout,l=d._size;u.init({element:r.node(),gd:n,prepFn:function(){i=r.attr("transform"),m(r)},moveFn:function(n,o){r.attr("transform",i+s(n,o)),a=u.align((c?e._uFrac:e._vFrac)+n/l.w,c?e._thickFrac:e._lenFrac,0,1,e.xanchor),t=u.align((c?e._vFrac:1-e._uFrac)-o/l.h,c?e._lenFrac:e._thickFrac,0,1,e.yanchor);var d=u.getCursor(a,t,e.xanchor,e.yanchor);m(r,d)},doneFn:function(){if(m(r),void 0!==a&&void 0!==t){var i={};i[e._propPrefix+"x"]=a,i[e._propPrefix+"y"]=t,void 0!==e._traceIndex?o.call("_guiRestyle",n,i,e._traceIndex):o.call("_guiRelayout",n,i)}}})}(n,e,r)})),e.exit().each((function(e){t.autoMargin(r,e._id)})).remove(),e.order()}}},90553:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r){return i.isPlainObject(r.colorbar)}},55080:function(r,e,n){"use strict";r.exports={moduleType:"component",name:"colorbar",attributes:n(42996),supplyDefaults:n(64013),draw:n(37848).draw,hasColorbar:n(90553)}},49084:function(r,e,n){"use strict";var i=n(42996),a=n(53756).counter,t=n(95376),o=n(88304).scales;function c(r){return"`"+r+"`"}t(o),r.exports=function(r,e){r=r||"";var n,t=(e=e||{}).cLetter||"c",u=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(r),"noScale"in e?e.noScale:"marker.line"===r),d="showScaleDflt"in e?e.showScaleDflt:"z"===t,s="string"===typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,l=e.editTypeOverride||"",m=r?r+".":"";"colorAttr"in e?(n=e.colorAttr,e.colorAttr):c(m+(n={z:"z",c:"color"}[t]));var p=t+"auto",I=t+"min",y=t+"max",f=t+"mid",g=(c(m+p),c(m+I),c(m+y),{});g[I]=g[y]=void 0;var _={};_[p]=!1;var h={};return"color"===n&&(h.color={valType:"color",arrayOk:!0,editType:l||"style"},e.anim&&(h.color.anim=!0)),h[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},h[I]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},h[y]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:_},h[f]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},h.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},h.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},h.reversescale={valType:"boolean",dflt:!1,editType:"plot"},u||(h.showscale={valType:"boolean",dflt:d,editType:"calc"},h.colorbar=i),e.noColorAxis||(h.coloraxis={valType:"subplotid",regex:a("coloraxis"),dflt:null,editType:"calc"}),h}},47128:function(r,e,n){"use strict";var i=n(38248),a=n(3400),t=n(94288).extractOpts;r.exports=function(r,e,n){var o,c=r._fullLayout,u=n.vals,d=n.containerStr,s=d?a.nestedProperty(e,d).get():e,l=t(s),m=!1!==l.auto,p=l.min,I=l.max,y=l.mid,f=function(){return a.aggNums(Math.min,null,u)},g=function(){return a.aggNums(Math.max,null,u)};void 0===p?p=f():m&&(p=s._colorAx&&i(p)?Math.min(p,f()):f()),void 0===I?I=g():m&&(I=s._colorAx&&i(I)?Math.max(I,g()):g()),m&&void 0!==y&&(I-y>y-p?p=y-(I-y):I-y=0?c.colorscale.sequential:c.colorscale.sequentialminus,l._sync("colorscale",o))}},95504:function(r,e,n){"use strict";var i=n(3400),a=n(94288).hasColorscale,t=n(94288).extractOpts;r.exports=function(r,e){function n(r,e){var n=r["_"+e];void 0!==n&&(r[e]=n)}function o(r,a){var o=a.container?i.nestedProperty(r,a.container).get():r;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var c=t(o),u=c.auto;(u||void 0===c.min)&&n(o,a.min),(u||void 0===c.max)&&n(o,a.max),c.autocolorscale&&n(o,"colorscale")}}for(var c=0;c=0;i--,a++){var t=r[i];n[a]=[1-t[0],t[1]]}return n}function I(r,e){e=e||{};for(var n=r.domain,o=r.range,u=o.length,d=new Array(u),s=0;s4/3-c?o:c}},67416:function(r,e,n){"use strict";var i=n(3400),a=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];r.exports=function(r,e,n,t){return r="left"===n?0:"center"===n?1:"right"===n?2:i.constrain(Math.floor(3*r),0,2),e="bottom"===t?0:"middle"===t?1:"top"===t?2:i.constrain(Math.floor(3*e),0,2),a[e][r]}},72760:function(r,e){"use strict";e.selectMode=function(r){return"lasso"===r||"select"===r},e.drawMode=function(r){return"drawclosedpath"===r||"drawopenpath"===r||"drawline"===r||"drawrect"===r||"drawcircle"===r},e.openMode=function(r){return"drawline"===r||"drawopenpath"===r},e.rectMode=function(r){return"select"===r||"drawline"===r||"drawrect"===r||"drawcircle"===r},e.freeMode=function(r){return"lasso"===r||"drawclosedpath"===r||"drawopenpath"===r},e.selectingOrDrawing=function(r){return e.freeMode(r)||e.rectMode(r)}},86476:function(r,e,n){"use strict";var i=n(29128),a=n(52264),t=n(89184),o=n(3400).removeElement,c=n(33816),u=r.exports={};u.align=n(78316),u.getCursor=n(67416);var d=n(2616);function s(){var r=document.createElement("div");r.className="dragcover";var e=r.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(r),r}function l(r){return i(r.changedTouches?r.changedTouches[0]:r,document.body)}u.unhover=d.wrapped,u.unhoverRaw=d.raw,u.init=function(r){var e,n,i,d,m,p,I,y,f=r.gd,g=1,_=f._context.doubleClickDelay,h=r.element;f._mouseDownTime||(f._mouseDownTime=0),h.style.pointerEvents="all",h.onmousedown=x,t?(h._ontouchstart&&h.removeEventListener("touchstart",h._ontouchstart),h._ontouchstart=x,h.addEventListener("touchstart",x,{passive:!1})):h.ontouchstart=x;var v=r.clampFn||function(r,e,n){return Math.abs(r)_&&(g=Math.max(g-1,1)),f._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(g,p),!y){var n;try{n=new MouseEvent("click",e)}catch(t){var i=l(e);(n=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,i[0],i[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}I.dispatchEvent(n)}f._dragging=!1,f._dragged=!1}else f._dragged=!1}},u.coverSlip=s},2616:function(r,e,n){"use strict";var i=n(95924),a=n(91200),t=n(52200).getGraphDiv,o=n(92456),c=r.exports={};c.wrapped=function(r,e,n){(r=t(r))._fullLayout&&a.clear(r._fullLayout._uid+o.HOVERID),c.raw(r,e,n)},c.raw=function(r,e){var n=r._fullLayout,a=r._hoverdata;e||(e={}),e.target&&!r._dragged&&!1===i.triggerHandler(r,"plotly_beforehover",e)||(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),r._hoverdata=void 0,e.target&&a&&r.emit("plotly_unhover",{event:e,points:a}))}},98192:function(r,e){"use strict";e.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},43616:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=a.numberFormat,o=n(38248),c=n(49760),u=n(24040),d=n(76308),s=n(8932),l=a.strTranslate,m=n(72736),p=n(9616),I=n(84284).LINE_SPACING,y=n(13448).DESELECTDIM,f=n(43028),g=n(7152),_=n(10624).appendArrayPointValue,h=r.exports={};function v(r){return"none"===r?void 0:r}h.font=function(r,e){var n=e.variant,i=e.style,a=e.weight,t=e.color,o=e.size,c=e.family,u=e.shadow,s=e.lineposition,l=e.textcase;c&&r.style("font-family",c),o+1&&r.style("font-size",o+"px"),t&&r.call(d.fill,t),a&&r.style("font-weight",a),i&&r.style("font-style",i),n&&r.style("font-variant",n),l&&r.style("text-transform",v(function(r){return x[r]}(l))),u&&r.style("text-shadow","auto"===u?m.makeTextShadow(d.contrast(t)):v(u)),s&&r.style("text-decoration-line",v(function(r){return r.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}(s)))};var x={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function P(r,e,n,i){var a=e.fillpattern,t=e.fillgradient,o=a&&h.getPatternAttr(a.shape,0,"");if(o){var c=h.getPatternAttr(a.bgcolor,0,null),u=h.getPatternAttr(a.fgcolor,0,null),s=a.fgopacity,l=h.getPatternAttr(a.size,0,8),m=h.getPatternAttr(a.solidity,0,.3),p=e.uid;h.pattern(r,"point",n,p,o,l,m,void 0,a.fillmode,c,u,s)}else if(t&&"none"!==t.type){var I,y,f=t.type,g="scatterfill-"+e.uid;i&&(g="legendfill-"+e.uid),i||void 0===t.start&&void 0===t.stop?("horizontal"===f&&(f+="reversed"),r.call(h.gradient,n,g,f,t.colorscale,"fill")):("horizontal"===f?(I={x:t.start,y:0},y={x:t.stop,y:0}):"vertical"===f&&(I={x:0,y:t.start},y={x:0,y:t.stop}),I.x=e._xA.c2p(void 0===I.x?e._extremes.x.min[0].val:I.x,!0),I.y=e._yA.c2p(void 0===I.y?e._extremes.y.min[0].val:I.y,!0),y.x=e._xA.c2p(void 0===y.x?e._extremes.x.max[0].val:y.x,!0),y.y=e._yA.c2p(void 0===y.y?e._extremes.y.max[0].val:y.y,!0),r.call(M,n,g,"linear",t.colorscale,"fill",I,y,!0,!1))}else e.fillcolor&&r.call(d.fill,e.fillcolor)}h.setPosition=function(r,e,n){r.attr("x",e).attr("y",n)},h.setSize=function(r,e,n){r.attr("width",e).attr("height",n)},h.setRect=function(r,e,n,i,a){r.call(h.setPosition,e,n).call(h.setSize,i,a)},h.translatePoint=function(r,e,n,i){var a=n.c2p(r.x),t=i.c2p(r.y);return!!(o(a)&&o(t)&&e.node())&&("text"===e.node().nodeName?e.attr("x",a).attr("y",t):e.attr("transform",l(a,t)),!0)},h.translatePoints=function(r,e,n){r.each((function(r){var a=i.select(this);h.translatePoint(r,a,e,n)}))},h.hideOutsideRangePoint=function(r,e,n,i,a,t){e.attr("display",n.isPtWithinRange(r,a)&&i.isPtWithinRange(r,t)?null:"none")},h.hideOutsideRangePoints=function(r,e){if(e._hasClipOnAxisFalse){var n=e.xaxis,a=e.yaxis;r.each((function(e){var t=e[0].trace,o=t.xcalendar,c=t.ycalendar,d=u.traceIs(t,"bar-like")?".bartext":".point,.textpoint";r.selectAll(d).each((function(r){h.hideOutsideRangePoint(r,i.select(this),n,a,o,c)}))}))}},h.crispRound=function(r,e,n){return e&&o(e)?r._context.staticPlot?e:e<1?1:Math.round(e):n||0},h.singleLineStyle=function(r,e,n,i,a){e.style("fill","none");var t=(((r||[])[0]||{}).trace||{}).line||{},o=n||t.width||0,c=a||t.dash||"";d.stroke(e,i||t.color),h.dashLine(e,c,o)},h.lineGroupStyle=function(r,e,n,a){r.style("fill","none").each((function(r){var t=(((r||[])[0]||{}).trace||{}).line||{},o=e||t.width||0,c=a||t.dash||"";i.select(this).call(d.stroke,n||t.color).call(h.dashLine,c,o)}))},h.dashLine=function(r,e,n){n=+n||0,e=h.dashStyle(e,n),r.style({"stroke-dasharray":e,"stroke-width":n+"px"})},h.dashStyle=function(r,e){e=+e||1;var n=Math.max(e,3);return"solid"===r?r="":"dot"===r?r=n+"px,"+n+"px":"dash"===r?r=3*n+"px,"+3*n+"px":"longdash"===r?r=5*n+"px,"+5*n+"px":"dashdot"===r?r=3*n+"px,"+n+"px,"+n+"px,"+n+"px":"longdashdot"===r&&(r=5*n+"px,"+2*n+"px,"+n+"px,"+2*n+"px"),r},h.singleFillStyle=function(r,e){var n=i.select(r.node());P(r,((n.data()[0]||[])[0]||{}).trace||{},e,!1)},h.fillGroupStyle=function(r,e,n){r.style("stroke-width",0).each((function(r){var a=i.select(this);r[0].trace&&P(a,r[0].trace,e,n)}))};var G=n(71984);h.symbolNames=[],h.symbolFuncs=[],h.symbolBackOffs=[],h.symbolNeedLines={},h.symbolNoDot={},h.symbolNoFill={},h.symbolList=[],Object.keys(G).forEach((function(r){var e=G[r],n=e.n;h.symbolList.push(n,String(n),r,n+100,String(n+100),r+"-open"),h.symbolNames[n]=r,h.symbolFuncs[n]=e.f,h.symbolBackOffs[n]=e.backoff||0,e.needLine&&(h.symbolNeedLines[n]=!0),e.noDot?h.symbolNoDot[n]=!0:h.symbolList.push(n+200,String(n+200),r+"-dot",n+300,String(n+300),r+"-open-dot"),e.noFill&&(h.symbolNoFill[n]=!0)}));var C=h.symbolNames.length;function S(r,e,n,i){var a=r%100;return h.symbolFuncs[a](e,n,i)+(r>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}h.symbolNumber=function(r){if(o(r))r=+r;else if("string"===typeof r){var e=0;r.indexOf("-open")>0&&(e=100,r=r.replace("-open","")),r.indexOf("-dot")>0&&(e+=200,r=r.replace("-dot","")),(r=h.symbolNames.indexOf(r))>=0&&(r+=e)}return r%100>=C||r>=400?0:Math.floor(Math.max(r,0))};var A=t("~f"),b={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function M(r,e,n,t,o,u,s,l,m,p){var I,y=o.length;"linear"===t?I={node:"linearGradient",attrs:{x1:s.x,y1:s.y,x2:l.x,y2:l.y,gradientUnits:m?"userSpaceOnUse":"objectBoundingBox"},reversed:p}:"radial"===t&&(I={node:"radialGradient",reversed:p});for(var f=new Array(y),g=0;g=0&&void 0===r.i&&(r.i=o.i),e.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(r):void 0===r.mo?c.opacity:r.mo),i.ms2mrc){var s;s="various"===r.ms||"various"===c.size?3:i.ms2mrc(r.ms),r.mrc=s,i.selectedSizeFn&&(s=r.mrc=i.selectedSizeFn(r));var l=h.symbolNumber(r.mx||c.symbol)||0;r.om=l%200>=100;var m=ir(r,n),p=j(r,n);e.attr("d",S(l,s,m,p))}var I,y,f,g=!1;if(r.so)f=u.outlierwidth,y=u.outliercolor,I=c.outliercolor;else{var _=(u||{}).width;f=(r.mlw+1||_+1||(r.trace?(r.trace.marker.line||{}).width:0)+1)-1||0,y="mlc"in r?r.mlcc=i.lineScale(r.mlc):a.isArrayOrTypedArray(u.color)?d.defaultLine:u.color,a.isArrayOrTypedArray(c.color)&&(I=d.defaultLine,g=!0),I="mc"in r?r.mcc=i.markerScale(r.mc):c.color||c.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(I=i.selectedColorFn(r))}if(r.om)e.call(d.stroke,I).style({"stroke-width":(f||1)+"px",fill:"none"});else{e.style("stroke-width",(r.isBlank?0:f)+"px");var v=c.gradient,x=r.mgt;x?g=!0:x=v&&v.type,a.isArrayOrTypedArray(x)&&(x=x[0],b[x]||(x=0));var P=c.pattern,G=P&&h.getPatternAttr(P.shape,r.i,"");if(x&&"none"!==x){var C=r.mgc;C?g=!0:C=v.color;var A=n.uid;g&&(A+="-"+r.i),h.gradient(e,t,A,x,[[0,C],[1,I]],"fill")}else if(G){var M=!1,B=P.fgcolor;!B&&o&&o.color&&(B=o.color,M=!0);var k=h.getPatternAttr(B,r.i,o&&o.color||null),F=h.getPatternAttr(P.bgcolor,r.i,null),z=P.fgopacity,w=h.getPatternAttr(P.size,r.i,8),R=h.getPatternAttr(P.solidity,r.i,.3);M=M||r.mcc||a.isArrayOrTypedArray(P.shape)||a.isArrayOrTypedArray(P.bgcolor)||a.isArrayOrTypedArray(P.fgcolor)||a.isArrayOrTypedArray(P.size)||a.isArrayOrTypedArray(P.solidity);var E=n.uid;M&&(E+="-"+r.i),h.pattern(e,"point",t,E,G,w,R,r.mcc,P.fillmode,F,k,z)}else a.isArrayOrTypedArray(I)?d.fill(e,I[r.i]):d.fill(e,I);f&&d.stroke(e,y)}},h.makePointStyleFns=function(r){var e={},n=r.marker;return e.markerScale=h.tryColorscale(n,""),e.lineScale=h.tryColorscale(n,"line"),u.traceIs(r,"symbols")&&(e.ms2mrc=f.isBubble(r)?g(r):function(){return(n.size||6)/2}),r.selectedpoints&&a.extendFlat(e,h.makeSelectedPointStyleFns(r)),e},h.makeSelectedPointStyleFns=function(r){var e={},n=r.selected||{},i=r.unselected||{},t=r.marker||{},o=n.marker||{},c=i.marker||{},d=t.opacity,s=o.opacity,l=c.opacity,m=void 0!==s,p=void 0!==l;(a.isArrayOrTypedArray(d)||m||p)&&(e.selectedOpacityFn=function(r){var e=void 0===r.mo?t.opacity:r.mo;return r.selected?m?s:e:p?l:y*e});var I=t.color,f=o.color,g=c.color;(f||g)&&(e.selectedColorFn=function(r){var e=r.mcc||I;return r.selected?f||e:g||e});var _=t.size,h=o.size,v=c.size,x=void 0!==h,P=void 0!==v;return u.traceIs(r,"symbols")&&(x||P)&&(e.selectedSizeFn=function(r){var e=r.mrc||_/2;return r.selected?x?h/2:e:P?v/2:e}),e},h.makeSelectedTextStyleFns=function(r){var e={},n=r.selected||{},i=r.unselected||{},a=r.textfont||{},t=n.textfont||{},o=i.textfont||{},c=a.color,u=t.color,s=o.color;return e.selectedTextColorFn=function(r){var e=r.tc||c;return r.selected?u||e:s||(u?e:d.addOpacity(e,y))},e},h.selectedPointStyle=function(r,e){if(r.size()&&e.selectedpoints){var n=h.makeSelectedPointStyleFns(e),a=e.marker||{},t=[];n.selectedOpacityFn&&t.push((function(r,e){r.style("opacity",n.selectedOpacityFn(e))})),n.selectedColorFn&&t.push((function(r,e){d.fill(r,n.selectedColorFn(e))})),n.selectedSizeFn&&t.push((function(r,i){var t=i.mx||a.symbol||0,o=n.selectedSizeFn(i);r.attr("d",S(h.symbolNumber(t),o,ir(i,e),j(i,e))),i.mrc2=o})),t.length&&r.each((function(r){for(var e=i.select(this),n=0;n0?n:0}function R(r,e,n){return n&&(r=U(r)),e?N(r[1]):E(r[0])}function E(r){var e=i.round(r,2);return B=e,e}function N(r){var e=i.round(r,2);return k=e,e}function T(r,e,n,i){var a=r[0]-e[0],t=r[1]-e[1],o=n[0]-e[0],c=n[1]-e[1],u=Math.pow(a*a+t*t,.25),d=Math.pow(o*o+c*c,.25),s=(d*d*a-u*u*o)*i,l=(d*d*t-u*u*c)*i,m=3*d*(u+d),p=3*u*(u+d);return[[E(e[0]+(m&&s/m)),N(e[1]+(m&&l/m))],[E(e[0]-(p&&s/p)),N(e[1]-(p&&l/p))]]}h.textPointStyle=function(r,e,n){if(r.size()){var t;if(e.selectedpoints){var o=h.makeSelectedTextStyleFns(e);t=o.selectedTextColorFn}var c=e.texttemplate,u=n._fullLayout;r.each((function(r){var o=i.select(this),d=c?a.extractOption(r,e,"txt","texttemplate"):a.extractOption(r,e,"tx","text");if(d||0===d){if(c){var s=e._module.formatLabels,l=s?s(r,e,u):{},p={};_(p,e,r.i);var I=e._meta||{};d=a.texttemplateString(d,l,u._d3locale,p,r,I)}var y=r.tp||e.textposition,f=w(r,e),g=t?t(r):r.tc||e.textfont.color;o.call(h.font,{family:r.tf||e.textfont.family,weight:r.tw||e.textfont.weight,style:r.ty||e.textfont.style,variant:r.tv||e.textfont.variant,textcase:r.tC||e.textfont.textcase,lineposition:r.tE||e.textfont.lineposition,shadow:r.tS||e.textfont.shadow,size:f,color:g}).text(d).call(m.convertToTspans,n).call(z,y,f,r.mrc)}else o.remove()}))}},h.selectedTextStyle=function(r,e){if(r.size()&&e.selectedpoints){var n=h.makeSelectedTextStyleFns(e);r.each((function(r){var a=i.select(this),t=n.selectedTextColorFn(r),o=r.tp||e.textposition,c=w(r,e);d.fill(a,t);var s=u.traceIs(e,"bar-like");z(a,o,c,r.mrc2||r.mrc,s)}))}},h.smoothopen=function(r,e){if(r.length<3)return"M"+r.join("L");var n,i="M"+r[0],a=[];for(n=1;n=d||P>=l&&P<=d)&&(G<=m&&G>=s||G>=m&&G<=s)&&(r=[P,G])}return r}h.steps=function(r){var e=D[r]||J;return function(r){for(var n="M"+E(r[0][0])+","+N(r[0][1]),i=r.length,a=1;a=1e4&&(h.savedBBoxes={},H=0),n&&(h.savedBBoxes[n]=f),H++,a.extendFlat({},f)},h.setClipUrl=function(r,e,n){r.attr("clip-path",O(e,n))},h.getTranslate=function(r){var e=(r[r.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(r,e,n){return[e,n].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},h.setTranslate=function(r,e,n){var i=r.attr?"attr":"getAttribute",a=r.attr?"attr":"setAttribute",t=r[i]("transform")||"";return e=e||0,n=n||0,t=t.replace(/(\btranslate\(.*?\);?)/,"").trim(),t=(t+=l(e,n)).trim(),r[a]("transform",t),t},h.getScale=function(r){var e=(r[r.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(r,e,n){return[e,n].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},h.setScale=function(r,e,n){var i=r.attr?"attr":"getAttribute",a=r.attr?"attr":"setAttribute",t=r[i]("transform")||"";return e=e||1,n=n||1,t=t.replace(/(\bscale\(.*?\);?)/,"").trim(),t=(t+="scale("+e+","+n+")").trim(),r[a]("transform",t),t};var K=/\s*sc.*/;h.setPointGroupScale=function(r,e,n){if(e=e||1,n=n||1,r){var i=1===e&&1===n?"":"scale("+e+","+n+")";r.each((function(){var r=(this.getAttribute("transform")||"").replace(K,"");r=(r+=i).trim(),this.setAttribute("transform",r)}))}};var V=/translate\([^)]*\)\s*$/;function j(r,e){var n;return r&&(n=r.mf),void 0===n&&(n=e.marker&&e.marker.standoff||0),e._geo||e._xA?n:-n}h.setTextPointsScale=function(r,e,n){r&&r.each((function(){var r,a=i.select(this),t=a.select("text");if(t.node()){var o=parseFloat(t.attr("x")||0),c=parseFloat(t.attr("y")||0),u=(a.attr("transform")||"").match(V);r=1===e&&1===n?[]:[l(o,c),"scale("+e+","+n+")",l(-o,-c)],u&&r.push(u),a.attr("transform",r.join(""))}}))},h.getMarkerStandoff=j;var W,Z,q,Y,X,Q,$=Math.atan2,rr=Math.cos,er=Math.sin;function nr(r,e){var n=e[0],i=e[1];return[n*rr(r)-i*er(r),n*er(r)+i*rr(r)]}function ir(r,e){var n,i,t=r.ma;void 0===t&&((t=e.marker.angle)&&!a.isArrayOrTypedArray(t)||(t=0));var c=e.marker.angleref;if("previous"===c||"north"===c){if(e._geo){var u=e._geo.project(r.lonlat);n=u[0],i=u[1]}else{var d=e._xA,s=e._yA;if(!d||!s)return 90;n=d.c2p(r.x),i=s.c2p(r.y)}if(e._geo){var l,m=r.lonlat[0],p=r.lonlat[1],I=e._geo.project([m,p+1e-5]),y=e._geo.project([m+1e-5,p]),f=$(y[1]-i,y[0]-n),g=$(I[1]-i,I[0]-n);if("north"===c)l=t/180*Math.PI;else if("previous"===c){var _=m/180*Math.PI,h=p/180*Math.PI,v=W/180*Math.PI,x=Z/180*Math.PI,P=v-_,G=rr(x)*er(P),C=er(x)*rr(h)-rr(x)*er(h)*rr(P);l=-$(G,C)-Math.PI,W=m,Z=p}var S=nr(f,[rr(l),0]),A=nr(g,[er(l),0]);t=$(S[1]+A[1],S[0]+A[0])/Math.PI*180,"previous"!==c||Q===e.uid&&r.i===X+1||(t=null)}if("previous"===c&&!e._geo)if(Q===e.uid&&r.i===X+1&&o(n)&&o(i)){var b=n-q,M=i-Y,B=e.line&&e.line.shape||"",k=B.slice(B.length-1);"h"===k&&(M=0),"v"===k&&(b=0),t+=$(M,b)/Math.PI*180+90}else t=null}return q=n,Y=i,X=r.i,Q=e.uid,t}h.getMarkerAngle=ir},71984:function(r,e,n){"use strict";var i,a,t,o,c=n(21984),u=n(33428).round,d="M0,0Z",s=Math.sqrt(2),l=Math.sqrt(3),m=Math.PI,p=Math.cos,I=Math.sin;function y(r){return null===r}function f(r,e,n){if((!r||r%360===0)&&!e)return n;if(t===r&&o===e&&i===n)return a;function u(r,n){var i=p(r),a=I(r),t=n[0],o=n[1]+(e||0);return[t*i-o*a,t*a+o*i]}t=r,o=e,i=n;for(var d=r/180*m,s=0,l=0,y=c(n),f="",g=0;g0,l=r._context.staticPlot;e.each((function(e){var m,p=e[0].trace,I=p.error_x||{},y=p.error_y||{};p.ids&&(m=function(r){return r.id});var f=o.hasMarkers(p)&&p.marker.maxdisplayed>0;y.visible||I.visible||(e=[]);var g=i.select(this).selectAll("g.errorbar").data(e,m);if(g.exit().remove(),e.length){I.visible||g.selectAll("path.xerror").remove(),y.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var _=g.enter().append("g").classed("errorbar",!0);s&&_.style("opacity",0).transition().duration(c.duration).style("opacity",1),t.setClipUrl(g,n.layerClipId,r),g.each((function(r){var e=i.select(this),n=function(r,e,n){var i={x:e.c2p(r.x),y:n.c2p(r.y)};return void 0!==r.yh&&(i.yh=n.c2p(r.yh),i.ys=n.c2p(r.ys),a(i.ys)||(i.noYS=!0,i.ys=n.c2p(r.ys,!0))),void 0!==r.xh&&(i.xh=e.c2p(r.xh),i.xs=e.c2p(r.xs),a(i.xs)||(i.noXS=!0,i.xs=e.c2p(r.xs,!0))),i}(r,u,d);if(!f||r.vis){var t,o=e.select("path.yerror");if(y.visible&&a(n.x)&&a(n.yh)&&a(n.ys)){var m=y.width;t="M"+(n.x-m)+","+n.yh+"h"+2*m+"m-"+m+",0V"+n.ys,n.noYS||(t+="m-"+m+",0h"+2*m),o.size()?s&&(o=o.transition().duration(c.duration).ease(c.easing)):o=e.append("path").style("vector-effect",l?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",t)}else o.remove();var p=e.select("path.xerror");if(I.visible&&a(n.y)&&a(n.xh)&&a(n.xs)){var g=(I.copy_ystyle?y:I).width;t="M"+n.xh+","+(n.y-g)+"v"+2*g+"m0,-"+g+"H"+n.xs,n.noXS||(t+="m0,-"+g+"v"+2*g),p.size()?s&&(p=p.transition().duration(c.duration).ease(c.easing)):p=e.append("path").style("vector-effect",l?"none":"non-scaling-stroke").classed("xerror",!0),p.attr("d",t)}else p.remove()}}))}}))}},92036:function(r,e,n){"use strict";var i=n(33428),a=n(76308);r.exports=function(r){r.each((function(r){var e=r[0].trace,n=e.error_y||{},t=e.error_x||{},o=i.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(a.stroke,n.color),t.copy_ystyle&&(t=n),o.selectAll("path.xerror").style("stroke-width",t.thickness+"px").call(a.stroke,t.color)}))}},55756:function(r,e,n){"use strict";var i=n(25376),a=n(65460).hoverlabel,t=n(92880).extendFlat;r.exports={hoverlabel:{bgcolor:t({},a.bgcolor,{arrayOk:!0}),bordercolor:t({},a.bordercolor,{arrayOk:!0}),font:i({arrayOk:!0,editType:"none"}),align:t({},a.align,{arrayOk:!0}),namelength:t({},a.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(r,e,n){"use strict";var i=n(3400),a=n(24040);function t(r,e,n,a){a=a||i.identity,Array.isArray(r)&&(e[0][n]=a(r))}r.exports=function(r){var e=r.calcdata,n=r._fullLayout;function o(r){return function(e){return i.coerceHoverinfo({hoverinfo:e},{_module:r._module},n)}}for(var c=0;c=0&&n.indexq[0]._length||vr<0||vr>Y[0]._length)return y.unhoverRaw(r,e)}else hr="xpx"in e?e.xpx:q[0]._length/2,vr="ypx"in e?e.ypx:Y[0]._length/2;if(e.pointerX=hr+q[0]._offset,e.pointerY=vr+Y[0]._offset,nr="xval"in e?_.flat(h,e.xval):_.p2c(q,hr),ir="yval"in e?_.flat(h,e.yval):_.p2c(Y,vr),!a(nr[0])||!a(ir[0]))return o.warn("Fx.hover failed",e,r),y.unhoverRaw(r,e)}var Cr=1/0;function Sr(n,i){for(tr=0;trIr&&(yr.splice(0,Ir),Cr=yr[0].distance),S&&0!==er&&0===yr.length){pr.distance=er,pr.index=!1;var s=cr._module.hoverPoints(pr,lr,mr,"closest",{hoverLayer:v._hoverlayer});if(s&&(s=s.filter((function(r){return r.spikeDistance<=er}))),s&&s.length){var l,m=s.filter((function(r){return r.xa.showspikes&&"hovered data"!==r.xa.spikesnap}));if(m.length){var p=m[0];a(p.x0)&&a(p.y0)&&(l=br(p),(!gr.vLinePoint||gr.vLinePoint.spikeDistance>l.spikeDistance)&&(gr.vLinePoint=l))}var y=s.filter((function(r){return r.ya.showspikes&&"hovered data"!==r.ya.spikesnap}));if(y.length){var f=y[0];a(f.x0)&&a(f.y0)&&(l=br(f),(!gr.hLinePoint||gr.hLinePoint.spikeDistance>l.spikeDistance)&&(gr.hLinePoint=l))}}}}}function Ar(r,e,n){for(var i,a=null,t=1/0,o=0;o0&&Math.abs(r.distance)Dr-1;Jr--)Or(yr[Jr]);yr=Ur,Fr()}var Kr=r._hoverdata,Vr=[],jr=O(r),Wr=K(r);for(ar=0;ar1||yr.length>1)||"closest"===A&&_r&&yr.length>1,oe=I.combine(v.plot_bgcolor||I.background,v.paper_bgcolor),ce=R(yr,{gd:r,hovermode:A,rotateLabels:te,bgColor:oe,container:v._hoverlayer,outerContainer:v._paper.node(),commonLabelOpts:v.hoverlabel,hoverdistance:v.hoverdistance}),ue=ce.hoverLabels;if(_.isUnifiedHover(A)||(function(r,e,n,i){var a,t,o,c,u,d,s,l=e?"xa":"ya",m=e?"ya":"xa",p=0,I=1,y=r.size(),f=new Array(y),g=0,_=i.minX,h=i.maxX,v=i.minY,x=i.maxY,P=function(r){return r*n._invScaleX},G=function(r){return r*n._invScaleY};function S(r){var e=r[0],n=r[r.length-1];if(t=e.pmin-e.pos-e.dp+e.size,o=n.pos+n.dp+n.size-e.pmax,t>.01){for(u=r.length-1;u>=0;u--)r[u].dp+=t;a=!1}if(!(o<.01)){if(t<-.01){for(u=r.length-1;u>=0;u--)r[u].dp-=o;a=!1}if(a){var i=0;for(c=0;ce.pmax&&i++;for(c=r.length-1;c>=0&&!(i<=0);c--)(d=r[c]).pos>e.pmax-1&&(d.del=!0,i--);for(c=0;c=0;u--)r[u].dp-=o;for(c=r.length-1;c>=0&&!(i<=0);c--)(d=r[c]).pos+d.dp+d.size>e.pmax&&(d.del=!0,i--)}}}for(r.each((function(r){var i=r[l],a=r[m],t="x"===i._id.charAt(0),o=i.range;0===g&&o&&o[0]>o[1]!==t&&(I=-1);var c=0,u=t?n.width:n.height;if("x"===n.hovermode||"y"===n.hovermode){var d,s,p=N(r,e),y=r.anchor,S="end"===y?-1:1;if("middle"===y)s=(d=r.crossPos+(t?G(p.y-r.by/2):P(r.bx/2+r.tx2width/2)))+(t?G(r.by):P(r.bx));else if(t)s=(d=r.crossPos+G(b+p.y)-G(r.by/2-b))+G(r.by);else{var A=P(S*b+p.x),M=A+P(S*r.bx);d=r.crossPos+Math.min(A,M),s=r.crossPos+Math.max(A,M)}t?void 0!==v&&void 0!==x&&Math.min(s,x)-Math.max(d,v)>1&&("left"===a.side?(c=a._mainLinePosition,u=n.width):u=a._mainLinePosition):void 0!==_&&void 0!==h&&Math.min(s,h)-Math.max(d,_)>1&&("top"===a.side?(c=a._mainLinePosition,u=n.height):u=a._mainLinePosition)}f[g++]=[{datum:r,traceIndex:r.trace.index,dp:0,pos:r.pos,posref:r.posref,size:r.by*(t?C:1)/2,pmin:c,pmax:u}]})),f.sort((function(r,e){return r[0].posref-e[0].posref||I*(e[0].traceIndex-r[0].traceIndex)}));!a&&p<=y;){for(p++,a=!0,c=0;c.01&&B.pmin===k.pmin&&B.pmax===k.pmax){for(u=M.length-1;u>=0;u--)M[u].dp+=t;for(A.push.apply(A,M),f.splice(c+1,1),s=0,u=A.length-1;u>=0;u--)s+=A[u].dp;for(o=s/A.length,u=A.length-1;u>=0;u--)A[u].dp-=o;a=!1}else c++}f.forEach(S)}for(c=f.length-1;c>=0;c--){var F=f[c];for(u=F.length-1;u>=0;u--){var z=F[u],w=z.datum;w.offset=z.dp,w.del=z.del}}}(ue,te,v,ce.commonLabelBoundingBox),T(ue,te,v._invScaleX,v._invScaleY)),u&&u.tagName){var de=g.getComponentMethod("annotations","hasClickToShow")(r,Vr);m(i.select(u),de?"pointer":"")}u&&!t&&function(r,e,n){if(!n||n.length!==r._hoverdata.length)return!0;for(var i=n.length-1;i>=0;i--){var a=n[i],t=r._hoverdata[i];if(a.curveNumber!==t.curveNumber||String(a.pointNumber)!==String(t.pointNumber)||String(a.pointNumbers)!==String(t.pointNumbers))return!0}return!1}(r,0,Kr)&&(Kr&&r.emit("plotly_unhover",{event:e,points:Kr}),r.emit("plotly_hover",{event:e,points:r._hoverdata,xaxes:q,yaxes:Y,xvals:nr,yvals:ir}))}(r,e,n,t,u)}))},e.loneHover=function(r,e){var n=!0;Array.isArray(r)||(n=!1,r=[r]);var a=e.gd,t=O(a),o=K(a),c=!1,u=R(r.map((function(r){var n=r._x0||r.x0||r.x||0,i=r._x1||r.x1||r.x||0,c=r._y0||r.y0||r.y||0,u=r._y1||r.y1||r.y||0,d=r.eventData;if(d){var s=Math.min(n,i),l=Math.max(n,i),m=Math.min(c,u),p=Math.max(c,u),y=r.trace;if(g.traceIs(y,"gl3d")){var f=a._fullLayout[y.scene]._scene.container,_=f.offsetLeft,h=f.offsetTop;s+=_,l+=_,m+=h,p+=h}d.bbox={x0:s+o,x1:l+o,y0:m+t,y1:p+t},e.inOut_bbox&&e.inOut_bbox.push(d.bbox)}else d=!1;return{color:r.color||I.defaultLine,x0:r.x0||r.x||0,x1:r.x1||r.x||0,y0:r.y0||r.y||0,y1:r.y1||r.y||0,xLabel:r.xLabel,yLabel:r.yLabel,zLabel:r.zLabel,text:r.text,name:r.name,idealAlign:r.idealAlign,borderColor:r.borderColor,fontFamily:r.fontFamily,fontSize:r.fontSize,fontColor:r.fontColor,fontWeight:r.fontWeight,fontStyle:r.fontStyle,fontVariant:r.fontVariant,nameLength:r.nameLength,textAlign:r.textAlign,trace:r.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:r.hovertemplate||!1,hovertemplateLabels:r.hovertemplateLabels||!1,eventData:d}})),{gd:a,hovermode:"closest",rotateLabels:c,bgColor:e.bgColor||I.background,container:i.select(e.container),outerContainer:e.outerContainer||e.container}).hoverLabels,d=0,s=0;return u.sort((function(r,e){return r.y0-e.y0})).each((function(r,n){var i=r.y0-r.by/2;r.offset=i-5([\s\S]*)<\/extra>/;function R(r,e){var n=e.gd,a=n._fullLayout,t=e.hovermode,c=e.rotateLabels,s=e.bgColor,m=e.container,y=e.outerContainer,f=e.commonLabelOpts||{};if(0===r.length)return[[]];var G=e.fontFamily||h.HOVERFONT,C=e.fontSize||h.HOVERFONTSIZE,S=e.fontWeight||a.font.weight,A=e.fontStyle||a.font.style,B=e.fontVariant||a.font.variant,k=e.fontTextcase||a.font.textcase,F=e.fontLineposition||a.font.lineposition,w=e.fontShadow||a.font.shadow,R=r[0],N=R.xa,T=R.ya,D=t.charAt(0),J=D+"Label",U=R[J];if(void 0===U&&"multicategory"===N.type)for(var H=0;Ha.width-P&&(z=a.width-P),e.attr("d","M"+(_-z)+",0L"+(_-z+b)+","+x+b+"H"+P+"v"+x+(2*M+v.height)+"H"+-P+"V"+x+b+"H"+(_-z-b)+"Z"),_=z,$.minX=_-P,$.maxX=_+P,"top"===N.side?($.minY=h-(2*M+v.height),$.maxY=h-M):($.minY=h+M,$.maxY=h+(2*M+v.height))}else{var E,D,J;"right"===T.side?(E="start",D=1,J="",_=N._offset+N._length):(E="end",D=-1,J="-",_=N._offset),h=T._offset+(R.y0+R.y1)/2,c.attr("text-anchor",E),e.attr("d","M0,0L"+J+b+","+b+"V"+(M+v.height/2)+"h"+J+(2*M+v.width)+"V-"+(M+v.height/2)+"H"+J+b+"V-"+b+"Z"),$.minY=h-(M+v.height/2),$.maxY=h+(M+v.height/2),"right"===T.side?($.minX=_+b,$.maxX=_+b+(2*M+v.width)):($.minX=_-b-(2*M+v.width),$.maxX=_-b);var H,L=v.height/2,K=O-v.top-L,j="clip"+a._uid+"commonlabel"+T._id;if(_=0?Ir:yr+_r=0?yr:Ar+_r=0?mr:pr+hr=0?pr:br+hr=0,"top"!==r.idealAlign&&X||!Q?X?(J+=L/2,r.anchor="start"):r.anchor="middle":(J-=L/2,r.anchor="end"),r.crossPos=J;else{if(r.pos=J,X=D+H/2+$<=K,Q=D-H/2-$>=0,"left"!==r.idealAlign&&X||!Q)if(X)D+=H/2,r.anchor="start";else{r.anchor="middle";var rr=$/2,er=D+rr-K,nr=D-rr;er>0&&(D-=er),nr<0&&(D+=-nr)}else D-=H/2,r.anchor="end";r.crossPos=D}x.attr("text-anchor",r.anchor),R&&z.attr("text-anchor",r.anchor),e.attr("transform",u(D,J)+(c?d(P):""))})),{hoverLabels:Mr,commonLabelBoundingBox:$}}function E(r,e,n,i,a,t){var c="",u="";void 0!==r.nameOverride&&(r.name=r.nameOverride),r.name&&(r.trace._meta&&(r.name=o.templateString(r.name,r.trace._meta)),c=H(r.name,r.nameLength));var d=n.charAt(0),s="x"===d?"y":"x";void 0!==r.zLabel?(void 0!==r.xLabel&&(u+="x: "+r.xLabel+"
"),void 0!==r.yLabel&&(u+="y: "+r.yLabel+"
"),"choropleth"!==r.trace.type&&"choroplethmapbox"!==r.trace.type&&(u+=(u?"z: ":"")+r.zLabel)):e&&r[d+"Label"]===a?u=r[s+"Label"]||"":void 0===r.xLabel?void 0!==r.yLabel&&"scattercarpet"!==r.trace.type&&(u=r.yLabel):u=void 0===r.yLabel?r.xLabel:"("+r.xLabel+", "+r.yLabel+")",!r.text&&0!==r.text||Array.isArray(r.text)||(u+=(u?"
":"")+r.text),void 0!==r.extraText&&(u+=(u?"
":"")+r.extraText),t&&""===u&&!r.hovertemplate&&(""===c&&t.remove(),u=c);var l=r.hovertemplate||!1;if(l){var m=r.hovertemplateLabels||r;r[d+"Label"]!==a&&(m[d+"other"]=m[d+"Val"],m[d+"otherLabel"]=m[d+"Label"]),u=(u=o.hovertemplateString(l,m,i._d3locale,r.eventData[0]||{},r.trace._meta)).replace(w,(function(e,n){return c=H(n,r.nameLength),""}))}return[u,c]}function N(r,e){var n=0,i=r.offset;return e&&(i*=-A,n=r.offset*S),{x:n,y:i}}function T(r,e,n,a){var t=function(r){return r*n},o=function(r){return r*a};r.each((function(r){var n=i.select(this);if(r.del)return n.remove();var a=n.select("text.nums"),c=r.anchor,u="end"===c?-1:1,d=function(r){var e={start:1,end:-1,middle:0}[r.anchor],n=e*(b+M),i=n+e*(r.txwidth+M);return"middle"===r.anchor&&(n-=r.tx2width/2,i+=r.txwidth/2+M),{alignShift:e,textShiftX:n,text2ShiftX:i}}(r),s=N(r,e),m=s.x,I=s.y,y="middle"===c;n.select("path").attr("d",y?"M-"+t(r.bx/2+r.tx2width/2)+","+o(I-r.by/2)+"h"+t(r.bx)+"v"+o(r.by)+"h-"+t(r.bx)+"Z":"M0,0L"+t(u*b+m)+","+o(b+I)+"v"+o(r.by/2-b)+"h"+t(u*r.bx)+"v-"+o(r.by)+"H"+t(u*b+m)+"V"+o(I-b)+"Z");var f=m+d.textShiftX,g=I+r.ty0-r.by/2+M,_=r.textAlign||"auto";"auto"!==_&&("left"===_&&"start"!==c?(a.attr("text-anchor","start"),f=y?-r.bx/2-r.tx2width/2+M:-r.bx-M):"right"===_&&"end"!==c&&(a.attr("text-anchor","end"),f=y?r.bx/2-r.tx2width/2-M:r.bx+M)),a.call(l.positionText,t(f),o(g)),r.tx2width&&(n.select("text.name").call(l.positionText,t(d.text2ShiftX+d.alignShift*M+m),o(I+r.ty0-r.by/2+M)),n.select("rect").call(p.setRect,t(d.text2ShiftX+(d.alignShift-1)*r.tx2width/2+m),o(I-r.by/2-1),t(r.tx2width),o(r.by+2)))}))}function D(r,e){var n=r.index,i=r.trace||{},t=r.cd[0],c=r.cd[n]||{};function u(r){return r||a(r)&&0===r}var d=Array.isArray(n)?function(r,e){var a=o.castOption(t,n,r);return u(a)?a:o.extractOption({},i,"",e)}:function(r,e){return o.extractOption(c,i,r,e)};function s(e,n,i){var a=d(n,i);u(a)&&(r[e]=a)}if(s("hoverinfo","hi","hoverinfo"),s("bgcolor","hbg","hoverlabel.bgcolor"),s("borderColor","hbc","hoverlabel.bordercolor"),s("fontFamily","htf","hoverlabel.font.family"),s("fontSize","hts","hoverlabel.font.size"),s("fontColor","htc","hoverlabel.font.color"),s("fontWeight","htw","hoverlabel.font.weight"),s("fontStyle","hty","hoverlabel.font.style"),s("fontVariant","htv","hoverlabel.font.variant"),s("nameLength","hnl","hoverlabel.namelength"),s("textAlign","hta","hoverlabel.align"),r.posref="y"===e||"closest"===e&&"h"===i.orientation?r.xa._offset+(r.x0+r.x1)/2:r.ya._offset+(r.y0+r.y1)/2,r.x0=o.constrain(r.x0,0,r.xa._length),r.x1=o.constrain(r.x1,0,r.xa._length),r.y0=o.constrain(r.y0,0,r.ya._length),r.y1=o.constrain(r.y1,0,r.ya._length),void 0!==r.xLabelVal&&(r.xLabel="xLabel"in r?r.xLabel:f.hoverLabelText(r.xa,r.xLabelVal,i.xhoverformat),r.xVal=r.xa.c2d(r.xLabelVal)),void 0!==r.yLabelVal&&(r.yLabel="yLabel"in r?r.yLabel:f.hoverLabelText(r.ya,r.yLabelVal,i.yhoverformat),r.yVal=r.ya.c2d(r.yLabelVal)),void 0!==r.zLabelVal&&void 0===r.zLabel&&(r.zLabel=String(r.zLabelVal)),!isNaN(r.xerr)&&!("log"===r.xa.type&&r.xerr<=0)){var l=f.tickText(r.xa,r.xa.c2l(r.xerr),"hover").text;void 0!==r.xerrneg?r.xLabel+=" +"+l+" / -"+f.tickText(r.xa,r.xa.c2l(r.xerrneg),"hover").text:r.xLabel+=" \xb1 "+l,"x"===e&&(r.distance+=1)}if(!isNaN(r.yerr)&&!("log"===r.ya.type&&r.yerr<=0)){var m=f.tickText(r.ya,r.ya.c2l(r.yerr),"hover").text;void 0!==r.yerrneg?r.yLabel+=" +"+m+" / -"+f.tickText(r.ya,r.ya.c2l(r.yerrneg),"hover").text:r.yLabel+=" \xb1 "+m,"y"===e&&(r.distance+=1)}var p=r.hoverinfo||r.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(r.xLabel=void 0),-1===p.indexOf("y")&&(r.yLabel=void 0),-1===p.indexOf("z")&&(r.zLabel=void 0),-1===p.indexOf("text")&&(r.text=void 0),-1===p.indexOf("name")&&(r.name=void 0)),r}function J(r,e,n){var i,a,o=n.container,c=n.fullLayout,u=c._size,d=n.event,s=!!e.hLinePoint,l=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),l||s){var m=I.combine(c.plot_bgcolor,c.paper_bgcolor);if(s){var y,g,_=e.hLinePoint;i=_&&_.xa,"cursor"===(a=_&&_.ya).spikesnap?(y=d.pointerX,g=d.pointerY):(y=i._offset+_.x,g=a._offset+_.y);var h,v,x=t.readability(_.color,m)<1.5?I.contrast(m):_.color,P=a.spikemode,G=a.spikethickness,C=a.spikecolor||x,S=f.getPxPosition(r,a);if(-1!==P.indexOf("toaxis")||-1!==P.indexOf("across")){if(-1!==P.indexOf("toaxis")&&(h=S,v=y),-1!==P.indexOf("across")){var A=a._counterDomainMin,b=a._counterDomainMax;"free"===a.anchor&&(A=Math.min(A,a.position),b=Math.max(b,a.position)),h=u.l+A*u.w,v=u.l+b*u.w}o.insert("line",":first-child").attr({x1:h,x2:v,y1:g,y2:g,"stroke-width":G,stroke:C,"stroke-dasharray":p.dashStyle(a.spikedash,G)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:h,x2:v,y1:g,y2:g,"stroke-width":G+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==P.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:S+("right"!==a.side?G:-G),cy:g,r:G,fill:C}).classed("spikeline",!0)}if(l){var M,B,k=e.vLinePoint;i=k&&k.xa,a=k&&k.ya,"cursor"===i.spikesnap?(M=d.pointerX,B=d.pointerY):(M=i._offset+k.x,B=a._offset+k.y);var F,z,w=t.readability(k.color,m)<1.5?I.contrast(m):k.color,R=i.spikemode,E=i.spikethickness,N=i.spikecolor||w,T=f.getPxPosition(r,i);if(-1!==R.indexOf("toaxis")||-1!==R.indexOf("across")){if(-1!==R.indexOf("toaxis")&&(F=T,z=B),-1!==R.indexOf("across")){var D=i._counterDomainMin,J=i._counterDomainMax;"free"===i.anchor&&(D=Math.min(D,i.position),J=Math.max(J,i.position)),F=u.t+(1-J)*u.h,z=u.t+(1-D)*u.h}o.insert("line",":first-child").attr({x1:M,x2:M,y1:F,y2:z,"stroke-width":E,stroke:N,"stroke-dasharray":p.dashStyle(i.spikedash,E)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:M,x2:M,y1:F,y2:z,"stroke-width":E+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==R.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:M,cy:T-("top"!==i.side?E:-E),r:E,fill:N}).classed("spikeline",!0)}}}function U(r,e){return!e||e.vLinePoint!==r._spikepoints.vLinePoint||e.hLinePoint!==r._spikepoints.hLinePoint}function H(r,e){return l.plainText(r||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function L(r,e,n){var i=e[r+"a"],a=e[r+"Val"],t=e.cd[0];if("category"===i.type||"multicategory"===i.type)a=i._categoriesMap[a];else if("date"===i.type){var o=e.trace[r+"periodalignment"];if(o){var c=e.cd[e.index],u=c[r+"Start"];void 0===u&&(u=c[r]);var d=c[r+"End"];void 0===d&&(d=c[r]);var s=d-u;"end"===o?a+=s:"middle"===o&&(a+=s/2)}a=i.d2c(a)}return t&&t.t&&t.t.posLetter===i._id&&("group"!==n.boxmode&&"group"!==n.violinmode||(a+=t.t.dPos)),a}function O(r){return r.offsetTop+r.clientTop}function K(r){return r.offsetLeft+r.clientLeft}function V(r,e){var n=r._fullLayout,i=e.getBoundingClientRect(),a=i.left,t=i.top,c=a+i.width,u=t+i.height,d=o.apply3DTransform(n._invTransform)(a,t),s=o.apply3DTransform(n._invTransform)(c,u),l=d[0],m=d[1],p=s[0],I=s[1];return{x:l,y:m,width:p-l,height:I-m,top:Math.min(m,I),left:Math.min(l,p),right:Math.max(l,p),bottom:Math.max(m,I)}}},16132:function(r,e,n){"use strict";var i=n(3400),a=n(76308),t=n(10624).isUnifiedHover;r.exports=function(r,e,n,o){o=o||{};var c=e.legend;function u(r){o.font[r]||(o.font[r]=c?e.legend.font[r]:e.font[r])}e&&t(e.hovermode)&&(o.font||(o.font={}),u("size"),u("family"),u("color"),u("weight"),u("style"),u("variant"),c?(o.bgcolor||(o.bgcolor=a.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),n("hoverlabel.bgcolor",o.bgcolor),n("hoverlabel.bordercolor",o.bordercolor),n("hoverlabel.namelength",o.namelength),i.coerceFont(n,"hoverlabel.font",o.font),n("hoverlabel.align",o.align)}},41008:function(r,e,n){"use strict";var i=n(3400),a=n(65460);r.exports=function(r,e){function n(n,t){return void 0!==e[n]?e[n]:i.coerce(r,e,a,n,t)}return n("clickmode"),n("hoversubplots"),n("hovermode")}},93024:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(86476),o=n(10624),c=n(65460),u=n(83292);r.exports={moduleType:"component",name:"fx",constants:n(92456),schema:{layout:c},attributes:n(55756),layoutAttributes:c,supplyLayoutGlobalDefaults:n(81976),supplyDefaults:n(95448),supplyLayoutDefaults:n(88336),calc:n(55056),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(r,e,n){return a.castOption(r,e,"hoverlabel."+n)},castHoverinfo:function(r,e,n){return a.castOption(r,n,"hoverinfo",(function(n){return a.coerceHoverinfo({hoverinfo:n},{_module:r._module},e)}))},hover:u.hover,unhover:t.unhover,loneHover:u.loneHover,loneUnhover:function(r){var e=a.isD3Selection(r)?r:i.select(r);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:n(62376)}},65460:function(r,e,n){"use strict";var i=n(92456),a=n(25376),t=a({editType:"none"});t.family.dflt=i.HOVERFONT,t.size.dflt=i.HOVERFONTSIZE,r.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:t,grouptitlefont:a({editType:"none"}),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"}}},88336:function(r,e,n){"use strict";var i=n(3400),a=n(65460),t=n(41008),o=n(16132);r.exports=function(r,e){function n(n,t){return i.coerce(r,e,a,n,t)}t(r,e)&&(n("hoverdistance"),n("spikedistance")),"select"===n("dragmode")&&n("selectdirection");var c=e._has("mapbox"),u=e._has("geo"),d=e._basePlotModules.length;"zoom"===e.dragmode&&((c||u)&&1===d||c&&u&&2===d)&&(e.dragmode="pan"),o(r,e,n),i.coerceFont(n,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},81976:function(r,e,n){"use strict";var i=n(3400),a=n(16132),t=n(65460);r.exports=function(r,e){a(r,e,(function(n,a){return i.coerce(r,e,t,n,a)}))}},12704:function(r,e,n){"use strict";var i=n(3400),a=n(53756).counter,t=n(86968).u,o=n(33816).idRegex,c=n(31780),u={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:t({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 d(r,e,n){var i=e[n+"axes"],a=Object.keys((r._splomAxes||{})[n]||{});return Array.isArray(i)?i:a.length?a:void 0}function s(r,e,n,i,a,t){var o=e(r+"gap",n),c=e("domain."+r);e(r+"side",i);for(var u=new Array(a),d=c[0],s=(c[1]-d)/(a-o),l=s*(1-o),m=0;m1){m||p||I||"independent"===C("pattern")&&(m=!0),f._hasSubplotGrid=m;var h,v,x="top to bottom"===C("roworder"),P=m?.2:.1,G=m?.3:.1;y&&e._splomGridDflt&&(h=e._splomGridDflt.xside,v=e._splomGridDflt.yside),f._domains={x:s("x",C,P,h,_),y:s("y",C,G,v,g,x)}}else delete e.grid}function C(r,e){return i.coerce(n,f,u,r,e)}},contentDefaults:function(r,e){var n=e.grid;if(n&&n._domains){var i,a,t,o,c,u,s,m=r.grid||{},p=e._subplots,I=n._hasSubplotGrid,y=n.rows,f=n.columns,g="independent"===n.pattern,_=n._axisMap={};if(I){var h=m.subplots||[];u=n.subplots=new Array(y);var v=1;for(i=0;i("legend"===r?1:0));if(!1===A&&(n[r]=void 0),(!1!==A||l.uirevision)&&(p("uirevision",n.uirevision),!1!==A)){p("borderwidth");var b,M,B,k="h"===p("orientation"),F="paper"===p("yref"),z="paper"===p("xref"),w="left";if(k?(b=0,i.getComponentMethod("rangeslider","isVisible")(e.xaxis)?F?(M=1.1,B="bottom"):(M=1,B="top"):F?(M=-.1,B="top"):(M=0,B="bottom")):(M=1,B="auto",z?b=1.02:(b=1,w="right")),a.coerce(l,m,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:b}},"x"),a.coerce(l,m,{y:{valType:"number",editType:"legend",min:F?-2:0,max:F?3:1,dflt:M}},"y"),p("traceorder",x),d.isGrouped(n[r])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",w),p("yanchor",B),p("valign"),a.noneOrAll(l,m,["x","y"]),p("title.text")){p("title.side",k?"left":"top");var R=a.extendFlat({},I,{size:a.bigFont(I.size)});a.coerceFont(p,"title.font",R)}}}}r.exports=function(r,e,n){var i,t=n.slice(),o=e.shapes;if(o)for(i=0;i1)}var D=I.hiddenlabels||[];if(!G&&(!I.showlegend||!b.length))return c.selectAll("."+P).remove(),I._topdefs.select("#"+n).remove(),t.autoMargin(r,P);var J=a.ensureSingle(c,"g",P,(function(r){G||r.attr("pointer-events","all")})),U=a.ensureSingleById(I._topdefs,"clipPath",n,(function(r){r.append("rect")})),H=a.ensureSingle(J,"rect","bg",(function(r){r.attr("shape-rendering","crispEdges")}));H.call(s.stroke,m.bordercolor).call(s.fill,m.bgcolor).style("stroke-width",m.borderwidth+"px");var L,O=a.ensureSingle(J,"g","scrollbox"),K=m.title;m._titleWidth=0,m._titleHeight=0,K.text?((L=a.ensureSingle(O,"text",P+"titletext")).attr("text-anchor","start").call(d.font,K.font).text(K.text),B(L,O,r,m,x)):O.selectAll("."+P+"titletext").remove();var V=a.ensureSingle(J,"rect","scrollbar",(function(r){r.attr(p.scrollBarEnterAttrs).call(s.fill,p.scrollBarColor)})),j=O.selectAll("g.groups").data(b);j.enter().append("g").attr("class","groups"),j.exit().remove();var W=j.selectAll("g.traces").data(a.identity);W.enter().append("g").attr("class","traces"),W.exit().remove(),W.style("opacity",(function(r){var e=r[0].trace;return o.traceIs(e,"pie-like")?-1!==D.indexOf(r[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){i.select(this).call(A,r,m)})).call(h,r,m).each((function(){G||i.select(this).call(M,r,P)})),a.syncOrAsync([t.previousPromises,function(){return function(r,e,n,a){var t=r._fullLayout,o=z(a);a||(a=t[o]);var c=t._size,u=v.isVertical(a),s=v.isGrouped(a),l="fraction"===a.entrywidthmode,m=a.borderwidth,I=2*m,y=p.itemGap,f=a.indentation+a.itemwidth+2*y,g=2*(m+y),_=F(a),h=a.y<0||0===a.y&&"top"===_,x=a.y>1||1===a.y&&"bottom"===_,P=a.tracegroupgap,G={};a._maxHeight=Math.max(h||x?t.height/2:c.h,30);var S=0;a._width=0,a._height=0;var A=function(r){var e=0,n=0,i=r.title.side;return i&&(-1!==i.indexOf("left")&&(e=r._titleWidth),-1!==i.indexOf("top")&&(n=r._titleHeight)),[e,n]}(a);if(u)n.each((function(r){var e=r[0].height;d.setTranslate(this,m+A[0],m+A[1]+a._height+e/2+y),a._height+=e,a._width=Math.max(a._width,r[0].width)})),S=f+a._width,a._width+=y+f+I,a._height+=g,s&&(e.each((function(r,e){d.setTranslate(this,0,e*a.tracegroupgap)})),a._height+=(a._lgroupsLength-1)*a.tracegroupgap);else{var b=k(a),M=a.x<0||0===a.x&&"right"===b,B=a.x>1||1===a.x&&"left"===b,w=x||h,R=t.width/2;a._maxWidth=Math.max(M?w&&"left"===b?c.l+c.w:R:B?w&&"right"===b?c.r+c.w:R:c.w,2*f);var E=0,N=0;n.each((function(r){var e=C(r,a,f);E=Math.max(E,e),N+=e})),S=null;var T=0;if(s){var D=0,J=0,U=0;e.each((function(){var r=0,e=0;i.select(this).selectAll("g.traces").each((function(n){var i=C(n,a,f),t=n[0].height;d.setTranslate(this,A[0],A[1]+m+y+t/2+e),e+=t,r=Math.max(r,i),G[n[0].trace.legendgroup]=r}));var n=r+y;J>0&&n+m+J>a._maxWidth?(T=Math.max(T,J),J=0,U+=D+P,D=e):D=Math.max(D,e),d.setTranslate(this,J,U),J+=n})),a._width=Math.max(T,J)+m,a._height=U+D+g}else{var H=n.size(),L=N+I+(H-1)*y=a._maxWidth&&(T=Math.max(T,j),K=0,V+=O,a._height+=O,O=0),d.setTranslate(this,A[0]+m+K,A[1]+m+V+e/2+y),j=K+n+y,K+=i,O=Math.max(O,e)})),L?(a._width=K+I,a._height=O+g):(a._width=Math.max(T,j)+I,a._height+=O+g)}}a._width=Math.ceil(Math.max(a._width+A[0],a._titleWidth+2*(m+p.titlePad))),a._height=Math.ceil(Math.max(a._height+A[1],a._titleHeight+2*(m+p.itemGap))),a._effHeight=Math.min(a._height,a._maxHeight);var W=r._context.edits,Z=W.legendText||W.legendPosition;n.each((function(r){var e=i.select(this).select("."+o+"toggle"),n=r[0].height,t=r[0].trace.legendgroup,c=C(r,a,f);s&&""!==t&&(c=G[t]);var m=Z?f:S||c;u||l||(m+=y/2),d.setRect(e,0,-n/2,m,n)}))}(r,j,W,m)},function(){var e,s,_,h,v=I._size,x=m.borderwidth,C="paper"===m.xref,A="paper"===m.yref;if(K.text&&function(r,e,n){if("top center"===e.title.side||"top right"===e.title.side){var i=e.title.font.size*y,a=0,t=r.node(),o=d.bBox(t).width;"top center"===e.title.side?a=.5*(e._width-2*n-2*p.titlePad-o):"top right"===e.title.side&&(a=e._width-2*n-2*p.titlePad-o),l.positionText(r,n+p.titlePad+a,n+i)}}(L,m,x),!G){var b,M;b=C?v.l+v.w*m.x-f[k(m)]*m._width:I.width*m.x-f[k(m)]*m._width,M=A?v.t+v.h*(1-m.y)-f[F(m)]*m._effHeight:I.height*(1-m.y)-f[F(m)]*m._effHeight;var B=function(r,e,n,i){var a=r._fullLayout,o=a[e],c=k(o),u=F(o),d="paper"===o.xref,s="paper"===o.yref;r._fullLayout._reservedMargin[e]={};var l=o.y<.5?"b":"t",m=o.x<.5?"l":"r",p={r:a.width-n,l:n+o._width,b:a.height-i,t:i+o._effHeight};if(d&&s)return t.autoMargin(r,e,{x:o.x,y:o.y,l:o._width*f[c],r:o._width*g[c],b:o._effHeight*g[u],t:o._effHeight*f[u]});d?r._fullLayout._reservedMargin[e][l]=p[l]:s||"v"===o.orientation?r._fullLayout._reservedMargin[e][m]=p[m]:r._fullLayout._reservedMargin[e][l]=p[l]}(r,P,b,M);if(B)return;if(I.margin.autoexpand){var z=b,w=M;b=C?a.constrain(b,0,I.width-m._width):z,M=A?a.constrain(M,0,I.height-m._effHeight):w,b!==z&&a.log("Constrain "+P+".x to make legend fit inside graph"),M!==w&&a.log("Constrain "+P+".y to make legend fit inside graph")}d.setTranslate(J,b,M)}if(V.on(".drag",null),J.on("wheel",null),G||m._height<=m._maxHeight||r._context.staticPlot){var R=m._effHeight;G&&(R=m._height),H.attr({width:m._width-x,height:R-x,x:x/2,y:x/2}),d.setTranslate(O,0,0),U.select("rect").attr({width:m._width-2*x,height:R-2*x,x:x,y:x}),d.setClipUrl(O,n,r),d.setRect(V,0,0,0,0),delete m._scrollY}else{var E,N,T,D=Math.max(p.scrollBarMinHeight,m._effHeight*m._effHeight/m._height),j=m._effHeight-D-2*p.scrollBarMargin,W=m._height-m._effHeight,Z=j/W,q=Math.min(m._scrollY||0,W);H.attr({width:m._width-2*x+p.scrollBarWidth+p.scrollBarMargin,height:m._effHeight-x,x:x/2,y:x/2}),U.select("rect").attr({width:m._width-2*x+p.scrollBarWidth+p.scrollBarMargin,height:m._effHeight-2*x,x:x,y:x+q}),d.setClipUrl(O,n,r),Q(q,D,Z),J.on("wheel",(function(){Q(q=a.constrain(m._scrollY+i.event.deltaY/j*W,0,W),D,Z),0!==q&&q!==W&&i.event.preventDefault()}));var Y=i.behavior.drag().on("dragstart",(function(){var r=i.event.sourceEvent;E="touchstart"===r.type?r.changedTouches[0].clientY:r.clientY,T=q})).on("drag",(function(){var r=i.event.sourceEvent;2===r.buttons||r.ctrlKey||(N="touchmove"===r.type?r.changedTouches[0].clientY:r.clientY,q=function(r,e,n){var i=(n-e)/Z+r;return a.constrain(i,0,W)}(T,E,N),Q(q,D,Z))}));V.call(Y);var X=i.behavior.drag().on("dragstart",(function(){var r=i.event.sourceEvent;"touchstart"===r.type&&(E=r.changedTouches[0].clientY,T=q)})).on("drag",(function(){var r=i.event.sourceEvent;"touchmove"===r.type&&(N=r.changedTouches[0].clientY,q=function(r,e,n){var i=(e-n)/Z+r;return a.constrain(i,0,W)}(T,E,N),Q(q,D,Z))}));O.call(X)}function Q(e,n,i){m._scrollY=r._fullLayout[P]._scrollY=e,d.setTranslate(O,0,-e),d.setRect(V,m._width,p.scrollBarMargin+e*i,p.scrollBarWidth,n),U.select("rect").attr("y",x+e)}r._context.edits.legendPosition&&(J.classed("cursor-move",!0),u.init({element:J.node(),gd:r,prepFn:function(r){if(r.target!==V.node()){var e=d.getTranslate(J);_=e.x,h=e.y}},moveFn:function(r,n){if(void 0!==_&&void 0!==h){var i=_+r,a=h+n;d.setTranslate(J,i,a),e=u.align(i,m._width,v.l,v.l+v.w,m.xanchor),s=u.align(a+m._height,-m._height,v.t+v.h,v.t,m.yanchor)}},doneFn:function(){if(void 0!==e&&void 0!==s){var n={};n[P+".x"]=e,n[P+".y"]=s,o.call("_guiRelayout",r,n)}},clickFn:function(e,n){var i=c.selectAll("g.traces").filter((function(){var r=this.getBoundingClientRect();return n.clientX>=r.left&&n.clientX<=r.right&&n.clientY>=r.top&&n.clientY<=r.bottom}));i.size()>0&&S(r,J,i,e,n)}}))}],r)}}function C(r,e,n){var i=r[0],a=i.width,t=e.entrywidthmode,o=i.trace.legendwidth||e.entrywidth;return"fraction"===t?e._maxWidth*o:n+(o||a)}function S(r,e,n,i,a){var t=n.data()[0][0].trace,u={event:a,node:n.node(),curveNumber:t.index,expandedIndex:t._expandedIndex,data:r.data,layout:r.layout,frames:r._transitionData._frames,config:r._context,fullData:r._fullData,fullLayout:r._fullLayout};t._group&&(u.group=t._group),o.traceIs(t,"pie-like")&&(u.label=n.datum()[0].label);var d=c.triggerHandler(r,"plotly_legendclick",u);if(1===i){if(!1===d)return;e._clickTimeout=setTimeout((function(){r._fullLayout&&m(n,r,i)}),r._context.doubleClickDelay)}else 2===i&&(e._clickTimeout&&clearTimeout(e._clickTimeout),r._legendMouseDownTime=0,!1!==c.triggerHandler(r,"plotly_legenddoubleclick",u)&&!1!==d&&m(n,r,i))}function A(r,e,n){var i,t,c=z(n),u=r.data()[0][0],s=u.trace,m=o.traceIs(s,"pie-like"),I=!n._inHover&&e._context.edits.legendText&&!m,y=n._maxNameLength;u.groupTitle?(i=u.groupTitle.text,t=u.groupTitle.font):(t=n.font,n.entries?i=u.text:(i=m?u.label:s.name,s._meta&&(i=a.templateString(i,s._meta))));var f=a.ensureSingle(r,"text",c+"text");f.attr("text-anchor","start").call(d.font,t).text(I?b(i,y):i);var g=n.indentation+n.itemwidth+2*p.itemGap;l.positionText(f,g,0),I?f.call(l.makeEditable,{gd:e,text:i}).call(B,r,e,n).on("edit",(function(i){this.text(b(i,y)).call(B,r,e,n);var t=u.trace._fullInput||{},c={};if(o.hasTransform(t,"groupby")){var d=o.getTransformIndices(t,"groupby"),l=d[d.length-1],m=a.keyedContainer(t,"transforms["+l+"].styles","target","value.name");m.set(u.trace._group,i),c=m.constructUpdate()}else c.name=i;return t._isShape?o.call("_guiRelayout",e,"shapes["+s.index+"].name",c.name):o.call("_guiRestyle",e,c,s.index)})):B(f,r,e,n)}function b(r,e){var n=Math.max(4,e);if(r&&r.trim().length>=n/2)return r;for(var i=n-(r=r||"").length;i>0;i--)r+=" ";return r}function M(r,e,n){var t,o=e._context.doubleClickDelay,c=1,u=a.ensureSingle(r,"rect",n+"toggle",(function(r){e._context.staticPlot||r.style("cursor","pointer").attr("pointer-events","all"),r.call(s.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(u.on("mousedown",(function(){(t=(new Date).getTime())-e._legendMouseDownTimeo&&(c=Math.max(c-1,1)),S(e,a,r,c,i.event)}})))}function B(r,e,n,i,a){i._inHover&&r.attr("data-notex",!0),l.convertToTspans(r,n,(function(){!function(r,e,n,i){var a=r.data()[0][0];if(n._inHover||!a||a.trace.showlegend){var t=r.select("g[class*=math-group]"),o=t.node(),c=z(n);n||(n=e._fullLayout[c]);var u,s,m=n.borderwidth,I=(i===x?n.title.font:a.groupTitle?a.groupTitle.font:n.font).size*y;if(o){var f=d.bBox(o);u=f.height,s=f.width,i===x?d.setTranslate(t,m,m+.75*u):d.setTranslate(t,0,.25*u)}else{var g="."+c+(i===x?"title":"")+"text",_=r.select(g),h=l.lineCount(_),v=_.node();if(u=I*h,s=v?d.bBox(v).width:0,i===x)"left"===n.title.side&&(s+=2*p.itemGap),l.positionText(_,m+p.titlePad,m+I);else{var P=2*p.itemGap+n.indentation+n.itemwidth;a.groupTitle&&(P=p.itemGap,s-=n.indentation+n.itemwidth),l.positionText(_,P,-I*((h-1)/2-.3))}}i===x?(n._titleWidth=s,n._titleHeight=u):(a.lineHeight=I,a.height=Math.max(u,16)+3,a.width=s)}else r.remove()}(e,n,i,a)}))}function k(r){return a.isRightAnchor(r)?"right":a.isCenterAnchor(r)?"center":"left"}function F(r){return a.isBottomAnchor(r)?"bottom":a.isMiddleAnchor(r)?"middle":"top"}function z(r){return r._id||"legend"}r.exports=function(r,e){if(e)G(r,e);else{var n=r._fullLayout,a=n._legends;n._infolayer.selectAll('[class^="legend"]').each((function(){var r=i.select(this),e=r.attr("class").split(" ")[0];e.match(P)&&-1===a.indexOf(e)&&r.remove()}));for(var t=0;tb&&(A=b)}C[t][0]._groupMinRank=A,C[t][0]._preGroupSort=t}var M=function(r,e){return r.trace.legendrank-e.trace.legendrank||r._preSort-e._preSort};for(C.forEach((function(r,e){r[0]._preGroupSort=e})),C.sort((function(r,e){return r[0]._groupMinRank-e[0]._groupMinRank||r[0]._preGroupSort-e[0]._preGroupSort})),t=0;tn?n:r}r.exports=function(r,e,n){var g=e._fullLayout;n||(n=g.legend);var _="constant"===n.itemsizing,h=n.itemwidth,v=(h+2*p.itemGap)/2,x=o(v,0),P=function(r,e,n,i){var a;if(r+1)a=r;else{if(!(e&&e.width>0))return 0;a=e.width}return _?i:Math.min(a,n)};function G(r,t,o){var s=r[0].trace,l=s.marker||{},m=l.line||{},p=l.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",I=o?s.visible&&s.type===o:a.traceIs(s,"bar"),y=i.select(t).select("g.legendpoints").selectAll("path.legend"+o).data(I?[r]:[]);y.enter().append("path").classed("legend"+o,!0).attr("d",p).attr("transform",x),y.exit().remove(),y.each((function(r){var a=i.select(this),t=r[0],o=P(t.mlw,l.line,5,2);a.style("stroke-width",o+"px");var p=t.mcc;if(!n._inHover&&"mc"in t){var I=d(l),y=I.mid;void 0===y&&(y=(I.max+I.min)/2),p=c.tryColorscale(l,"")(y)}var g=p||t.mc||l.color,_=l.pattern,h=_&&c.getPatternAttr(_.shape,0,"");if(h){var v=c.getPatternAttr(_.bgcolor,0,null),x=c.getPatternAttr(_.fgcolor,0,null),G=_.fgopacity,C=f(_.size,8,10),S=f(_.solidity,.5,1),A="legend-"+s.uid;a.call(c.pattern,"legend",e,A,h,C,S,p,_.fillmode,v,x,G)}else a.call(u.fill,g);o&&u.stroke(a,t.mlc||m.color)}))}function C(r,n,o){var c=r[0],u=c.trace,d=o?u.visible&&u.type===o:a.traceIs(u,o),s=i.select(n).select("g.legendpoints").selectAll("path.legend"+o).data(d?[r]:[]);if(s.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),s.exit().remove(),s.size()){var p=u.marker||{},I=P(m(p.line.width,c.pts),p.line,5,2),y="pieLike",f=t.minExtend(u,{marker:{line:{width:I}}},y),g=t.minExtend(c,{trace:f},y);l(s,g,f,e)}}r.each((function(r){var e=i.select(this),a=t.ensureSingle(e,"g","layers");a.style("opacity",r[0].trace.opacity);var c=n.indentation,u=n.valign,d=r[0].lineHeight,s=r[0].height;if("middle"===u&&0===c||!d||!s)a.attr("transform",null);else{var l={top:1,bottom:-1}[u]*(.5*(d-s+3))||0,m=n.indentation;a.attr("transform",o(m,l))}a.selectAll("g.legendfill").data([r]).enter().append("g").classed("legendfill",!0),a.selectAll("g.legendlines").data([r]).enter().append("g").classed("legendlines",!0);var p=a.selectAll("g.legendsymbols").data([r]);p.enter().append("g").classed("legendsymbols",!0),p.selectAll("g.legendpoints").data([r]).enter().append("g").classed("legendpoints",!0)})).each((function(r){var n,a=r[0].trace,o=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],n=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],n=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],n="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],n=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],n=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],n=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],n=!1}var s=i.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);s.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),s.exit().remove(),s.each((function(r,o){var s,l=i.select(this),m=d(a),p=m.colorscale,y=m.reversescale;if(p){if(!n){var f=p.length;s=0===o?p[y?f-1:0][1]:1===o?p[y?0:f-1][1]:p[Math.floor((f-1)/2)][1]}}else{var g=a.vertexcolor||a.facecolor||a.color;s=t.isArrayOrTypedArray(g)?g[o]||g[0]:g}l.attr("d",r[0]),s?l.call(u.fill,s):l.call((function(r){if(r.size()){var i="legendfill-"+a.uid;c.gradient(r,e,i,I(y,"radial"===n),p,"fill")}}))}))})).each((function(r){var e=r[0].trace,n="waterfall"===e.type;if(r[0]._distinct&&n){var a=r[0].trace[r[0].dir].marker;return r[0].mc=a.color,r[0].mlw=a.line.width,r[0].mlc=a.line.color,G(r,this,"waterfall")}var t=[];e.visible&&n&&(t=r[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 o=i.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(t);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(r){var n=i.select(this),a=e[r[0]].marker,t=P(void 0,a.line,5,2);n.attr("d",r[1]).style("stroke-width",t+"px").call(u.fill,a.color),t&&n.call(u.stroke,a.line.color)}))})).each((function(r){G(r,this,"funnel")})).each((function(r){G(r,this)})).each((function(r){var n=r[0].trace,o=i.select(this).select("g.legendpoints").selectAll("path.legendbox").data(n.visible&&a.traceIs(n,"box-violin")?[r]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),o.exit().remove(),o.each((function(){var r=i.select(this);if("all"!==n.boxpoints&&"all"!==n.points||0!==u.opacity(n.fillcolor)||0!==u.opacity((n.line||{}).color)){var a=P(void 0,n.line,5,2);r.style("stroke-width",a+"px").call(u.fill,n.fillcolor),a&&u.stroke(r,n.line.color)}else{var d=t.minExtend(n,{marker:{size:_?12:t.constrain(n.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(c.pointStyle,d,e)}}))})).each((function(r){C(r,this,"funnelarea")})).each((function(r){C(r,this,"pie")})).each((function(r){var n,a,o=y(r),u=o.showFill,l=o.showLine,m=o.showGradientLine,p=o.showGradientFill,f=o.anyFill,g=o.anyLine,_=r[0],v=_.trace,x=d(v),G=x.colorscale,C=x.reversescale,S=s.hasMarkers(v)||!f?"M5,0":g?"M5,-2":"M5,-3",A=i.select(this),b=A.select(".legendfill").selectAll("path").data(u||p?[r]:[]);if(b.enter().append("path").classed("js-fill",!0),b.exit().remove(),b.attr("d",S+"h"+h+"v6h-"+h+"z").call((function(r){if(r.size())if(u)c.fillGroupStyle(r,e,!0);else{var n="legendfill-"+v.uid;c.gradient(r,e,n,I(C),G,"fill")}})),l||m){var M=P(void 0,v.line,10,5);a=t.minExtend(v,{line:{width:M}}),n=[t.minExtend(_,{trace:a})]}var B=A.select(".legendlines").selectAll("path").data(l||m?[n]:[]);B.enter().append("path").classed("js-line",!0),B.exit().remove(),B.attr("d",S+(m?"l"+h+",0.0001":"h"+h)).call(l?c.lineGroupStyle:function(r){if(r.size()){var n="legendline-"+v.uid;c.lineGroupStyle(r),c.gradient(r,e,n,I(C),G,"stroke")}})})).each((function(r){var n,a,o=y(r),u=o.anyFill,d=o.anyLine,l=o.showLine,m=o.showMarker,p=r[0],I=p.trace,f=!m&&!d&&!u&&s.hasText(I);function g(r,e,n,i){var a=t.nestedProperty(I,r).get(),o=t.isArrayOrTypedArray(a)&&e?e(a):a;if(_&&o&&void 0!==i&&(o=i),n){if(on[1])return n[1]}return o}function h(r){return p._distinct&&p.index&&r[p.index]?r[p.index]:r[0]}if(m||f||l){var v={},P={};if(m){v.mc=g("marker.color",h),v.mx=g("marker.symbol",h),v.mo=g("marker.opacity",t.mean,[.2,1]),v.mlc=g("marker.line.color",h),v.mlw=g("marker.line.width",t.mean,[0,5],2),P.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var G=g("marker.size",t.mean,[2,16],12);v.ms=G,P.marker.size=G}l&&(P.line={width:g("line.width",h,[0,10],5)}),f&&(v.tx="Aa",v.tp=g("textposition",h),v.ts=10,v.tc=g("textfont.color",h),v.tf=g("textfont.family",h),v.tw=g("textfont.weight",h),v.ty=g("textfont.style",h),v.tv=g("textfont.variant",h),v.tC=g("textfont.textcase",h),v.tE=g("textfont.lineposition",h),v.tS=g("textfont.shadow",h)),n=[t.minExtend(p,v)],(a=t.minExtend(I,P)).selectedpoints=null,a.texttemplate=null}var C=i.select(this).select("g.legendpoints"),S=C.selectAll("path.scatterpts").data(m?n:[]);S.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),S.exit().remove(),S.call(c.pointStyle,a,e),m&&(n[0].mrc=3);var A=C.selectAll("g.pointtext").data(f?n:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),A.exit().remove(),A.selectAll("text").call(c.textPointStyle,a,e)})).each((function(r){var e=r[0].trace,n=i.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[r,r]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",(function(r,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",x).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(r,n){var a=i.select(this),t=e[n?"increasing":"decreasing"],o=P(void 0,t.line,5,2);a.style("stroke-width",o+"px").call(u.fill,t.fillcolor),o&&u.stroke(a,t.line.color)}))})).each((function(r){var e=r[0].trace,n=i.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[r,r]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",(function(r,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",x).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(r,n){var a=i.select(this),t=e[n?"increasing":"decreasing"],o=P(void 0,t.line,5,2);a.style("fill","none").call(c.dashLine,t.line.dash,o),o&&u.stroke(a,t.line.color)}))}))}},66540:function(r,e,n){"use strict";n(76052),r.exports={editType:"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"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},44248:function(r,e,n){"use strict";var i=n(24040),a=n(7316),t=n(79811),o=n(9224),c=n(4016).eraseActiveShape,u=n(3400),d=u._,s=r.exports={};function l(r,e){var n,a,o=e.currentTarget,c=o.getAttribute("data-attr"),u=o.getAttribute("data-val")||!0,d=r._fullLayout,s={},l=t.list(r,null,!0),m=d._cartesianSpikesEnabled;if("zoom"===c){var p,I="in"===u?.5:2,y=(1+I)/2,f=(1-I)/2;for(a=0;a1?(z=["toggleHover"],w=["resetViews"]):g?(F=["zoomInGeo","zoomOutGeo"],z=["hoverClosestGeo"],w=["resetGeo"]):f?(z=["hoverClosest3d"],w=["resetCameraDefault3d","resetCameraLastSave3d"]):P?(F=["zoomInMapbox","zoomOutMapbox"],z=["toggleHover"],w=["resetViewMapbox"]):v?z=["hoverClosestGl2d"]:_?z=["hoverClosestPie"]:S?(z=["hoverClosestCartesian","hoverCompareCartesian"],w=["resetViewSankey"]):z=["toggleHover"],y&&(z=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(r){for(var e=0;e0)){var y=function(r,e,n){for(var i=n.filter((function(n){return e[n].anchor===r._id})),a=0,t=0;t0?r.touches[0].clientX:0}function g(r,e,n,i){var a=o.ensureSingle(r,"rect",y.bgClassName,(function(r){r.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),t=i.borderwidth%2===0?i.borderwidth:i.borderwidth-1,s=-i._offsetShift,l=u.crispRound(e,i.borderwidth);a.attr({width:i._width+t,height:i._height+t,transform:c(s,s),"stroke-width":l}).call(d.stroke,i.bordercolor).call(d.fill,i.bgcolor)}function _(r,e,n,i){var a=e._fullLayout;o.ensureSingleById(a._topdefs,"clipPath",i._clipId,(function(r){r.append("rect").attr({x:0,y:0})})).select("rect").attr({width:i._width,height:i._height})}function h(r,e,n,a){var c,d=e.calcdata,s=r.selectAll("g."+y.rangePlotClassName).data(n._subplotsWith,o.identity);s.enter().append("g").attr("class",(function(r){return y.rangePlotClassName+" "+r})).call(u.setClipUrl,a._clipId,e),s.order(),s.exit().remove(),s.each((function(r,o){var u=i.select(this),s=0===o,p=m.getFromId(e,r,"y"),I=p._name,y=a[I],f={data:[],layout:{xaxis:{type:n.type,domain:[0,1],range:a.range.slice(),calendar:n.calendar},width:a._width,height:a._height,margin:{t:0,b:0,l:0,r:0}},_context:e._context};n.rangebreaks&&(f.layout.xaxis.rangebreaks=n.rangebreaks),f.layout[I]={type:p.type,domain:[0,1],range:"match"!==y.rangemode?y.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(f.layout[I].rangebreaks=p.rangebreaks),t.supplyDefaults(f);var g=f._fullLayout.xaxis,_=f._fullLayout[I];g.clearCalc(),g.setScale(),_.clearCalc(),_.setScale();var h={id:r,plotgroup:u,xaxis:g,yaxis:_,isRangePlot:!0};s?c=h:(h.mainplot="xy",h.mainplotinfo=c),l.rangePlot(e,h,function(r,e){for(var n=[],i=0;i=i.max)e=D[n+1];else if(r=i.pmax)e=D[n+1];else if(rn._length||_+x<0)return;s=g+x,p=_+x;break;case u:if(v="col-resize",g+x>n._length)return;s=g+x,p=_;break;case d:if(v="col-resize",_+x<0)return;s=g,p=_+x;break;default:v="ew-resize",s=y,p=y+x}if(p=0;C--){var S=n.append("path").attr(f).style("opacity",C?.1:g).call(o.stroke,h).call(o.fill,_).call(c.dashLine,C?"solid":x,C?4+v:v);if(I(S,r,t),P){var A=u(r.layout,"selections",t);S.style({cursor:"move"});var b={element:S.node(),plotinfo:p,gd:r,editHelpers:A,isActiveSelection:!0},M=i(d,r);a(M,S,b)}else S.style("pointer-events",C?"all":"none");G[C]=S}var B=G[0];G[1].node().addEventListener("click",(function(){return function(r,e){if(m(r)){var n=e.node(),i=+n.getAttribute("data-index");if(i>=0){if(i===r._fullLayout._activeSelectionIndex)return void y(r);r._fullLayout._activeSelectionIndex=i,r._fullLayout._deactivateSelection=y,l(r)}}}(r,B)}))}(r._fullLayout._selectionLayer)}function I(r,e,n){var i=n.xref+n.yref;c.setClipUrl(r,"clip"+e._fullLayout._uid+i,e)}function y(r){m(r)&&r._fullLayout._activeSelectionIndex>=0&&(t(r),delete r._fullLayout._activeSelectionIndex,l(r))}r.exports={draw:l,drawOne:p,activateLastSelection:function(r){if(m(r)){var e=r._fullLayout.selections.length-1;r._fullLayout._activeSelectionIndex=e,r._fullLayout._deactivateSelection=y,l(r)}}}},34200:function(r,e,n){"use strict";var i=n(98192).u,a=n(92880).extendFlat;r.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:a({},i,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(r){"use strict";r.exports=function(r,e,n){n("newselection.mode"),n("newselection.line.width")&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}},5968:function(r,e,n){"use strict";var i=n(72760).selectMode,a=n(1936).clearOutline,t=n(9856),o=t.readPaths,c=t.writePaths,u=t.fixDatesForPaths;r.exports=function(r,e){if(r.length){var n=r[0][0];if(n){var t=n.getAttribute("d"),d=e.gd,s=d._fullLayout.newselection,l=e.plotinfo,m=l.xaxis,p=l.yaxis,I=e.isActiveSelection,y=e.dragmode,f=(d.layout||{}).selections||[];if(!i(y)&&void 0!==I){var g=d._fullLayout._activeSelectionIndex;if(g-1,v=[];if(function(r){return r&&Array.isArray(r)&&!0!==r[0].hoverOnBox}(g)){j(r,e,t);var x=function(r,e){var n,i,a=r[0],t=-1,o=[];for(i=0;i0?function(r,e){var n,i,a,t=[];for(a=0;a0&&t.push(n);if(1===t.length&&t[0]===e.searchInfo&&(i=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(a=0;a1)return!1;if((i+=e.selectedpoints.length)>1)return!1}return 1===i}(c)&&(m=X(x))){for(o&&o.remove(),f=0;f=0})(a)&&a._fullLayout._deactivateShape(a),function(r){return r._fullLayout._activeSelectionIndex>=0}(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,c=p(n),u=y(n);if(c||u){var d,s,l=o.selectAll(".select-outline-"+i.id);l&&a._fullLayout._outlining&&(c&&(d=G(l,r)),d&&t.call("_guiRelayout",a,{shapes:d}),u&&!H(r)&&(s=C(l,r)),s&&(a._fullLayout._noEmitSelectedAtStart=!0,t.call("_guiRelayout",a,{selections:s}).then((function(){e&&S(a)}))),a._fullLayout._outlining=!1)}i.selection={},i.selection.selectionDefs=r.selectionDefs=[],i.selection.mergedPolygons=r.mergedPolygons=[]}function Z(r){return r._id}function q(r,e,n,i){if(!r.calcdata)return[];var a,t,o,c=[],u=e.map(Z),d=n.map(Z);for(o=0;o0?i[0]:n;return!!e.selectedpoints&&e.selectedpoints.indexOf(a)>-1}function Q(r,e,n){var i,a;for(i=0;i-1&&e;if(!t&&e){var er=or(r,!0);if(er.length){var ir=er[0].xref,pr=er[0].yref;if(ir&&pr){var Ir=dr(er);sr([k(r,ir,"x"),k(r,pr,"y")])($,Ir)}}r._fullLayout._noEmitSelectedAtStart?r._fullLayout._noEmitSelectedAtStart=!1:rr&&lr(r,$),m._reselect=!1}if(!t&&m._deselect){var yr=m._deselect;(function(r,e,n){for(var i=0;i=0)C._fullLayout._deactivateShape(C);else if(!h){var n=S.clickmode;B.done(Ar).then((function(){if(B.clear(Ar),2===r){for(vr.remove(),X=0;X-1&&L(e,C,i.xaxes,i.yaxes,i.subplot,i,vr),"event"===n&&lr(C,void 0);u.click(C,e,F.id)})).catch(A.error)}},i.doneFn=function(){Cr.remove(),B.done(Ar).then((function(){B.clear(Ar),!b&&Y&&i.selectionDefs&&(Y.subtract=hr,i.selectionDefs.push(Y),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,Z)),(b||h)&&W(i,b),i.doneFnCompleted&&i.doneFnCompleted(br),v&&lr(C,tr)})).catch(A.error)}},clearOutline:h,clearSelectionsCache:W,selectOnClick:L}},46056:function(r,e,n){"use strict";var i=n(13916),a=n(25376),t=n(52904).line,o=n(98192).u,c=n(92880).extendFlat,u=n(31780).templatedArray,d=(n(36208),n(45464)),s=n(21776).ye,l=n(97728);r.exports=u("shape",{visible:c({},d.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:c({},d.legend,{editType:"calc+arraydraw"}),legendgroup:c({},d.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:c({},d.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:a({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:c({},d.legendrank,{editType:"calc+arraydraw"}),legendwidth:c({},d.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:c({},i.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:c({},i.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:c({},t.color,{editType:"arraydraw"}),width:c({},t.width,{editType:"calc+arraydraw"}),dash:c({},o,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:s({},{keys:Object.keys(l)}),font:a({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},96084:function(r,e,n){"use strict";var i=n(3400),a=n(54460),t=n(85448),o=n(65152);function c(r){return d(r.line.width,r.xsizemode,r.x0,r.x1,r.path,!1)}function u(r){return d(r.line.width,r.ysizemode,r.y0,r.y1,r.path,!0)}function d(r,e,n,a,c,u){var d=r/2,s=u;if("pixel"===e){var l=c?o.extractPathCoords(c,u?t.paramIsY:t.paramIsX):[n,a],m=i.aggNums(Math.max,null,l),p=i.aggNums(Math.min,null,l),I=p<0?Math.abs(p)+d:d,y=m>0?m+d:d;return{ppad:d,ppadplus:s?I:y,ppadminus:s?y:I}}return{ppad:d}}function s(r,e,n,i,a){var c="category"===r.type||"multicategory"===r.type?r.r2c:r.d2c;if(void 0!==e)return[c(e),c(n)];if(i){var u,d,s,l,m=1/0,p=-1/0,I=i.match(t.segmentRE);for("date"===r.type&&(c=o.decodeDate(c)),u=0;up&&(p=l)));return p>=m?[m,p]:void 0}}r.exports=function(r){var e=r._fullLayout,n=i.filterVisible(e.shapes);if(n.length&&r._fullData.length)for(var o=0;o=r?e-i:i-e,-180/Math.PI*Math.atan2(a,t)}(h,x,v,P):0),S.call((function(e){return e.call(o.font,C).attr({}),t.convertToTspans(e,r),e}));var H=function(r,e,n,i,a,t,o){var c,u,d,s,m=a.label.textposition,p=a.label.textangle,I=a.label.padding,y=a.type,f=Math.PI/180*t,g=Math.sin(f),_=Math.cos(f),h=a.label.xanchor,v=a.label.yanchor;if("line"===y){"start"===m?(c=r,u=e):"end"===m?(c=n,u=i):(c=(r+n)/2,u=(e+i)/2),"auto"===h&&(h="start"===m?"auto"===p?n>r?"left":nr?"right":nr?"right":nr?"left":n1&&(2!==r.length||"Z"!==r[1][0])&&(0===k&&(r[0][0]="M"),e[B]=r,S(),A())}}()}}function L(r,n){!function(r,n){if(e.length)for(var i=0;iN&&t>T&&!n.shiftKey?I.getCursor(o/a,1-c/t):"move";y(e,u),E=u.split("-")[0]}}function ir(i){v(r)||(D&&(P=Z(n.xanchor)),J&&(S=q(n.yanchor)),"path"===n.type?R=n.path:(l=D?n.x0:Z(n.x0),p=J?n.y0:q(n.y0),h=D?n.x1:Z(n.x1),x=J?n.y1:q(n.y1)),lx?(A=p,k="y0",b=x,F="y1"):(A=x,k="y1",b=p,F="y0"),nr(i),ur(u,n),sr(e,n,r),$.moveFn="move"===E?or:cr,$.altKey=i.altKey)}function ar(){v(r)||(y(e),dr(u),G(e,r,n),a.call("_guiRelayout",r,s.getUpdateObj()))}function tr(){v(r)||dr(u)}function or(i,a){if("path"===n.type){var t=function(r){return r},o=t,s=t;D?L("xanchor",n.xanchor=Y(P+i)):(o=function(r){return Y(Z(r)+i)},K&&"date"===K.type&&(o=g.encodeDate(o))),J?L("yanchor",n.yanchor=X(S+a)):(s=function(r){return X(q(r)+a)},j&&"date"===j.type&&(s=g.encodeDate(s))),L("path",n.path=C(R,o,s))}else D?L("xanchor",n.xanchor=Y(P+i)):(L("x0",n.x0=Y(l+i)),L("x1",n.x1=Y(h+i))),J?L("yanchor",n.yanchor=X(S+a)):(L("y0",n.y0=X(p+a)),L("y1",n.y1=X(x+a)));e.attr("d",_(r,n)),ur(u,n),d(r,c,n,O)}function cr(i,a){if(H){var t=function(r){return r},o=t,s=t;D?L("xanchor",n.xanchor=Y(P+i)):(o=function(r){return Y(Z(r)+i)},K&&"date"===K.type&&(o=g.encodeDate(o))),J?L("yanchor",n.yanchor=X(S+a)):(s=function(r){return X(q(r)+a)},j&&"date"===j.type&&(s=g.encodeDate(s))),L("path",n.path=C(R,o,s))}else if(U){if("resize-over-start-point"===E){var m=l+i,I=J?p-a:p+a;L("x0",n.x0=D?m:Y(m)),L("y0",n.y0=J?I:X(I))}else if("resize-over-end-point"===E){var y=h+i,f=J?x-a:x+a;L("x1",n.x1=D?y:Y(y)),L("y1",n.y1=J?f:X(f))}}else{var v=function(r){return-1!==E.indexOf(r)},G=v("n"),V=v("s"),W=v("w"),Q=v("e"),$=G?A+a:A,rr=V?b+a:b,er=W?M+i:M,nr=Q?B+i:B;J&&(G&&($=A-a),V&&(rr=b-a)),(!J&&rr-$>T||J&&$-rr>T)&&(L(k,n[k]=J?$:X($)),L(F,n[F]=J?rr:X(rr))),nr-er>N&&(L(z,n[z]=D?er:Y(er)),L(w,n[w]=D?nr:Y(nr)))}e.attr("d",_(r,n)),ur(u,n),d(r,c,n,O)}function ur(r,e){function n(){var n="path"!==e.type,i=r.selectAll(".visual-cue").data([0]),a=1;i.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":a}).classed("visual-cue",!0);var o=Z(D?e.xanchor:t.midRange(n?[e.x0,e.x1]:g.extractPathCoords(e.path,f.paramIsX))),c=q(J?e.yanchor:t.midRange(n?[e.y0,e.y1]:g.extractPathCoords(e.path,f.paramIsY)));if(o=g.roundPositionForSharpStrokeRendering(o,a),c=g.roundPositionForSharpStrokeRendering(c,a),D&&J){var u="M"+(o-1-a)+","+(c-1-a)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";i.attr("d",u)}else if(D){var d="M"+(o-1-a)+","+(c-9-a)+"v18 h2 v-18 Z";i.attr("d",d)}else{var s="M"+(o-9-a)+","+(c-1-a)+"h18 v2 h-18 Z";i.attr("d",s)}}(D||J)&&n()}function dr(r){r.selectAll(".visual-cue").remove()}function sr(r,e,n){var i=e.xref,a=e.yref,t=o.getFromId(n,i),c=o.getFromId(n,a),u="";"paper"===i||t.autorange||(u+=i),"paper"===a||c.autorange||(u+=a),m.setClipUrl(r,u?"clip"+n._fullLayout._uid+u:null,n)}I.init($),Q.node().onmousemove=nr}(r,T,s,e,n,E):!0===s.editable&&T.style("pointer-events",w||l.opacity(B)*M<=.5?"stroke":"all");T.node().addEventListener("click",(function(){return function(r,e){if(x(r)){var n=e.node(),i=+n.getAttribute("data-index");if(i>=0){if(i===r._fullLayout._activeShapeIndex)return void S(r);r._fullLayout._activeShapeIndex=i,r._fullLayout._deactivateShape=S,h(r)}}}(r,T)}))}s._input&&!0===s.visible&&("above"===s.layer?A(r._fullLayout._shapeUpperLayer):"paper"===s.xref||"paper"===s.yref?A(r._fullLayout._shapeLowerLayer):"between"===s.layer?A(P.shapelayerBetween):P._hadPlotinfo?A((P.mainplotinfo||P).shapelayer):A(r._fullLayout._shapeLowerLayer))}function G(r,e,n){var i=(n.xref+n.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");m.setClipUrl(r,i?"clip"+e._fullLayout._uid+i:null,e)}function C(r,e,n){return r.replace(f.segmentRE,(function(r){var i=0,a=r.charAt(0),t=f.paramIsX[a],o=f.paramIsY[a],c=f.numParams[a];return a+r.substr(1).replace(f.paramRE,(function(r){return i>=c||(t[i]?r=e(r):o[i]&&(r=n(r)),i++),r}))}))}function S(r){x(r)&&r._fullLayout._activeShapeIndex>=0&&(s(r),delete r._fullLayout._activeShapeIndex,h(r))}r.exports={draw:h,drawOne:P,eraseActiveShape:function(r){if(x(r)){s(r);var e=r._fullLayout._activeShapeIndex,n=(r.layout||{}).shapes||[];if(e0&&up&&(r="X"),r}));return t>p&&(I=I.replace(/[\s,]*X.*/,""),a.log("Ignoring extra params in segment "+r)),s+I}))}(n,c,d);if("pixel"===n.xsizemode){var v=c(n.xanchor);s=v+n.x0,l=v+n.x1}else s=c(n.x0),l=c(n.x1);if("pixel"===n.ysizemode){var x=d(n.yanchor);m=x-n.y0,p=x-n.y1}else m=d(n.y0),p=d(n.y1);if("line"===I)return"M"+s+","+m+"L"+l+","+p;if("rect"===I)return"M"+s+","+m+"H"+l+"V"+p+"H"+s+"Z";var P=(s+l)/2,G=(m+p)/2,C=Math.abs(P-s),S=Math.abs(G-m),A="A"+C+","+S,b=P+C+","+G;return"M"+b+A+" 0 1,1 "+P+","+(G-S)+A+" 0 0,1 "+b+"Z"}},41592:function(r,e,n){"use strict";var i=n(4016);r.exports={moduleType:"component",name:"shapes",layoutAttributes:n(46056),supplyLayoutDefaults:n(43712),supplyDrawNewShapeDefaults:n(65144),includeBasePlot:n(36632)("shapes"),calcAutorange:n(96084),draw:i.draw,drawOne:i.drawOne}},97728:function(r){"use strict";function e(r,e){return e?e.d2l(r):r}function n(r,e){return e?e.l2d(r):r}function i(r,n){return e(r.x1,n)-e(r.x0,n)}function a(r,n,i){return e(r.y1,i)-e(r.y0,i)}r.exports={x0:function(r){return r.x0},x1:function(r){return r.x1},y0:function(r){return r.y0},y1:function(r){return r.y1},slope:function(r,e,n){return"line"!==r.type?void 0:a(r,0,n)/i(r,e)},dx:i,dy:a,width:function(r,e){return Math.abs(i(r,e))},height:function(r,e,n){return Math.abs(a(r,0,n))},length:function(r,e,n){return"line"!==r.type?void 0:Math.sqrt(Math.pow(i(r,e),2)+Math.pow(a(r,0,n),2))},xcenter:function(r,i){return n((e(r.x1,i)+e(r.x0,i))/2,i)},ycenter:function(r,i,a){return n((e(r.y1,a)+e(r.y0,a))/2,a)}}},89861:function(r,e,n){"use strict";var i=n(25376),a=n(66741),t=n(92880).extendDeepAll,o=n(67824).overrideAll,c=n(85656),u=n(31780).templatedArray,d=n(60876),s=u("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}});r.exports=o(u("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:s,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:t(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:c.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:i({})},font:i({}),activebgcolor:{valType:"color",dflt:d.gripBgActiveColor},bgcolor:{valType:"color",dflt:d.railBgColor},bordercolor:{valType:"color",dflt:d.railBorderColor},borderwidth:{valType:"number",min:0,dflt:d.railBorderWidth},ticklen:{valType:"number",min:0,dflt:d.tickLength},tickcolor:{valType:"color",dflt:d.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:d.minorTickLength}}),"arraydraw","from-root")},60876:function(r){"use strict";r.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}},8132:function(r,e,n){"use strict";var i=n(3400),a=n(51272),t=n(89861),o=n(60876).name,c=t.steps;function u(r,e,n){function o(n,a){return i.coerce(r,e,t,n,a)}for(var c=a(r,e,{name:"steps",handleItemDefaults:d}),u=0,s=0;s0&&(c=c.transition().duration(e.transition.duration).ease(e.transition.easing)),c.attr("transform",u(o-.5*l.gripWidth,e._dims.currentValueTotalHeight))}}function M(r,e){var n=r._dims;return n.inputAreaStart+l.stepInset+(n.inputAreaLength-2*l.stepInset)*Math.min(1,Math.max(0,e))}function B(r,e){var n=r._dims;return Math.min(1,Math.max(0,(e-l.stepInset-n.inputAreaStart)/(n.inputAreaLength-2*l.stepInset-2*n.inputAreaStart)))}function k(r,e,n){var i=n._dims,a=c.ensureSingle(r,"rect",l.railTouchRectClass,(function(i){i.call(S,e,r,n).style("pointer-events","all")}));a.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,l.tickOffset+n.ticklen+i.labelHeight)}).call(t.fill,n.bgcolor).attr("opacity",0),o.setTranslate(a,0,i.currentValueTotalHeight)}function F(r,e){var n=e._dims,i=n.inputAreaLength-2*l.railInset,a=c.ensureSingle(r,"rect",l.railRectClass);a.attr({width:i,height:l.railWidth,rx:l.railRadius,ry:l.railRadius,"shape-rendering":"crispEdges"}).call(t.stroke,e.bordercolor).call(t.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(a,l.railInset,.5*(n.inputAreaWidth-l.railWidth)+n.currentValueTotalHeight)}r.exports=function(r){var e=r._context.staticPlot,n=r._fullLayout,t=function(r,e){for(var n=r[l.name],i=[],a=0;a0?[0]:[]);function u(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),a.autoMargin(r,f(e))}if(c.enter().append("g").classed(l.containerClassName,!0).style("cursor",e?null:"ew-resize"),c.exit().each((function(){i.select(this).selectAll("g."+l.groupClassName).each(u)})).remove(),0!==t.length){var d=c.selectAll("g."+l.groupClassName).data(t,g);d.enter().append("g").classed(l.groupClassName,!0),d.exit().each(u).remove();for(var s=0;s0||x<0){var A={left:[-P,0],right:[P,0],top:[0,-P],bottom:[0,P]}[v.side];n.attr("transform",u(A[0],A[1]))}}}return L.call(O),J&&(M?L.on(".opacity",null):(S=0,A=!0,L.text(_).on("mouseover.opacity",(function(){i.select(this).transition().duration(m.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){i.select(this).transition().duration(m.HIDE_PLACEHOLDER).style("opacity",0)}))),L.call(l.makeEditable,{gd:r}).on("edit",(function(e){void 0!==h?o.call("_guiRestyle",r,g,e,h):o.call("_guiRelayout",r,g,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(O)})).on("input",(function(r){this.text(r||" ").call(l.positionText,x.x,x.y)}))),L.classed("js-placeholder",A),G}}},88444:function(r,e,n){"use strict";var i=n(25376),a=n(22548),t=n(92880).extendFlat,o=n(67824).overrideAll,c=n(66741),u=n(31780).templatedArray,d=u("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}});r.exports=o(u("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:d,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:t(c({editType:"arraydraw"}),{}),font:i({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:a.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(r){"use strict";r.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:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},91384:function(r,e,n){"use strict";var i=n(3400),a=n(51272),t=n(88444),o=n(73712).name,c=t.buttons;function u(r,e,n){function o(n,a){return i.coerce(r,e,t,n,a)}o("visible",a(r,e,{name:"buttons",handleItemDefaults:d}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),i.noneOrAll(r,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),i.coerceFont(o,"font",n.font),o("bgcolor",n.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function d(r,e){function n(n,a){return i.coerce(r,e,c,n,a)}n("visible","skip"===r.method||Array.isArray(r.args))&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}r.exports=function(r,e){a(r,e,{name:o,handleItemDefaults:u})}},14420:function(r,e,n){"use strict";var i=n(33428),a=n(7316),t=n(76308),o=n(43616),c=n(3400),u=n(72736),d=n(31780).arrayEditor,s=n(84284).LINE_SPACING,l=n(73712),m=n(37400);function p(r){return r._index}function I(r,e){return+r.attr(l.menuIndexAttrName)===e._index}function y(r,e,n,i,a,t,o,c){e.active=o,d(r.layout,l.name,e).applyUpdate("active",o),"buttons"===e.type?g(r,i,null,null,e):"dropdown"===e.type&&(a.attr(l.menuIndexAttrName,"-1"),f(r,i,a,t,e),c||g(r,i,a,t,e))}function f(r,e,n,i,a){var t=c.ensureSingle(e,"g",l.headerClassName,(function(r){r.style("pointer-events","all")})),u=a._dims,d=a.active,s=a.buttons[d]||l.blankHeaderOpts,m={y:a.pad.t,yPad:0,x:a.pad.l,xPad:0,index:0},p={width:u.headerWidth,height:u.headerHeight};t.call(_,a,s,r).call(A,a,m,p),c.ensureSingle(e,"text",l.headerArrowClassName,(function(r){r.attr("text-anchor","end").call(o.font,a.font).text(l.arrowSymbol[a.direction])})).attr({x:u.headerWidth-l.arrowOffsetX+a.pad.l,y:u.headerHeight/2+l.textOffsetY+a.pad.t}),t.on("click",(function(){n.call(b,String(I(n,a)?-1:a._index)),g(r,e,n,i,a)})),t.on("mouseover",(function(){t.call(P)})),t.on("mouseout",(function(){t.call(G,a)})),o.setTranslate(e,u.lx,u.ly)}function g(r,e,n,t,o){n||(n=e).attr("pointer-events","all");var u=function(r){return-1===+r.attr(l.menuIndexAttrName)}(n)&&"buttons"!==o.type?[]:o.buttons,d="dropdown"===o.type?l.dropdownButtonClassName:l.buttonClassName,s=n.selectAll("g."+d).data(c.filterVisible(u)),m=s.enter().append("g").classed(d,!0),p=s.exit();"dropdown"===o.type?(m.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var I=0,f=0,g=o._dims,h=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(h?f=g.headerHeight+l.gapButtonHeader:I=g.headerWidth+l.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(f=-l.gapButtonHeader+l.gapButton-g.openHeight),"dropdown"===o.type&&"left"===o.direction&&(I=-l.gapButtonHeader+l.gapButton-g.openWidth);var v={x:g.lx+I+o.pad.l,y:g.ly+f+o.pad.t,yPad:l.gapButton,xPad:l.gapButton,index:0},C={l:v.x+o.borderwidth,t:v.y+o.borderwidth};s.each((function(c,u){var d=i.select(this);d.call(_,o,c,r).call(A,o,v),d.on("click",(function(){i.event.defaultPrevented||(c.execute&&(c.args2&&o.active===u?(y(r,o,0,e,n,t,-1),a.executeAPICommand(r,c.method,c.args2)):(y(r,o,0,e,n,t,u),a.executeAPICommand(r,c.method,c.args))),r.emit("plotly_buttonclicked",{menu:o,button:c,active:o.active}))})),d.on("mouseover",(function(){d.call(P)})),d.on("mouseout",(function(){d.call(G,o),s.call(x,o)}))})),s.call(x,o),h?(C.w=Math.max(g.openWidth,g.headerWidth),C.h=v.y-C.t):(C.w=v.x-C.l,C.h=Math.max(g.openHeight,g.headerHeight)),C.direction=o.direction,t&&(s.size()?function(r,e,n,i,a,t){var o,c,u,d=a.direction,s="up"===d||"down"===d,m=a._dims,p=a.active;if(s)for(c=0,u=0;u0?[0]:[]);if(o.enter().append("g").classed(l.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){i.select(this).selectAll("g."+l.headerGroupClassName).each(t)})).remove(),0!==n.length){var u=o.selectAll("g."+l.headerGroupClassName).data(n,p);u.enter().append("g").classed(l.headerGroupClassName,!0);for(var d=c.ensureSingle(o,"g",l.dropdownButtonGroupClassName,(function(r){r.style("pointer-events","all")})),s=0;sP,S=c.barLength+2*c.barPad,A=c.barWidth+2*c.barPad,b=I,M=f+g;M+A>d&&(M=d-A);var B=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);B.exit().on(".drag",null).remove(),B.enter().append("rect").classed("scrollbar-horizontal",!0).call(a.fill,c.barColor),C?(this.hbar=B.attr({rx:c.barRadius,ry:c.barRadius,x:b,y:M,width:S,height:A}),this._hbarXMin=b+S/2,this._hbarTranslateMax=P-S):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var k=g>G,F=c.barWidth+2*c.barPad,z=c.barLength+2*c.barPad,w=I+y,R=f;w+F>u&&(w=u-F);var E=this.container.selectAll("rect.scrollbar-vertical").data(k?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-vertical",!0).call(a.fill,c.barColor),k?(this.vbar=E.attr({rx:c.barRadius,ry:c.barRadius,x:w,y:R,width:F,height:z}),this._vbarYMin=R+z/2,this._vbarTranslateMax=G-z):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var N=this.id,T=s-.5,D=k?l+F+.5:l+.5,J=m-.5,U=C?p+A+.5:p+.5,H=o._topdefs.selectAll("#"+N).data(C||k?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",N).append("rect"),C||k?(this._clipRect=H.select("rect").attr({x:Math.floor(T),y:Math.floor(J),width:Math.ceil(D)-Math.floor(T),height:Math.ceil(U)-Math.floor(J)}),this.container.call(t.setClipUrl,N,this.gd),this.bg.attr({x:I,y:f,width:y,height:g})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(t.setClipUrl,null),delete this._clipRect),C||k){var L=i.behavior.drag().on("dragstart",(function(){i.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(L);var O=i.behavior.drag().on("dragstart",(function(){i.event.sourceEvent.preventDefault(),i.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(O),k&&this.vbar.on(".drag",null).call(O)}this.setTranslate(e,n)},c.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(t.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)},c.prototype._onBoxDrag=function(){var r=this.translateX,e=this.translateY;this.hbar&&(r-=i.event.dx),this.vbar&&(e-=i.event.dy),this.setTranslate(r,e)},c.prototype._onBoxWheel=function(){var r=this.translateX,e=this.translateY;this.hbar&&(r+=i.event.deltaY),this.vbar&&(e+=i.event.deltaY),this.setTranslate(r,e)},c.prototype._onBarDrag=function(){var r=this.translateX,e=this.translateY;if(this.hbar){var n=r+this._hbarXMin,a=n+this._hbarTranslateMax;r=(o.constrain(i.event.x,n,a)-n)/(a-n)*(this.position.w-this._box.w)}if(this.vbar){var t=e+this._vbarYMin,c=t+this._vbarTranslateMax;e=(o.constrain(i.event.y,t,c)-t)/(c-t)*(this.position.h-this._box.h)}this.setTranslate(r,e)},c.prototype.setTranslate=function(r,e){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(r=o.constrain(r||0,0,n),e=o.constrain(e||0,0,i),this.translateX=r,this.translateY=e,this.container.call(t.setTranslate,this._box.l-this.position.l-r,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+r-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var a=r/n;this.hbar.call(t.setTranslate,r+a*this._hbarTranslateMax,e)}if(this.vbar){var c=e/i;this.vbar.call(t.setTranslate,r,e+c*this._vbarTranslateMax)}}},84284:function(r){"use strict";r.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"}}},36208:function(r){"use strict";r.exports={axisRefDescription:function(r,e,n){return["If set to a",r,"axis id (e.g. *"+r+"* or","*"+r+"2*), the `"+r+"` position refers to a",r,"coordinate. If set to *paper*, the `"+r+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+n+"). If set to a",r,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+r+"2 domain* refers to the domain of the second",r," axis and a",r,"position of 0.5 refers to the","point between the",e,"and the",n,"of the domain of the","second",r,"axis."].join(" ")}}},48164:function(r){"use strict";r.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},26880:function(r){"use strict";r.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},69104:function(r){"use strict";r.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(r){"use strict";r.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]}},87792:function(r){"use strict";r.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},13448:function(r){"use strict";r.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(r){"use strict";r.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},2264:function(r,e){"use strict";e.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],e.STYLE=e.CSS_DECLARATIONS.map((function(r){return r.join(": ")+"; "})).join("")},9616:function(r,e){"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},64884:function(r,e,n){"use strict";e.version=n(25788).version,n(88324),n(79288);for(var i=n(24040),a=e.register=i.register,t=n(22448),o=Object.keys(t),c=0;c",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},98308:function(r,e){"use strict";e.isLeftAnchor=function(r){return"left"===r.xanchor||"auto"===r.xanchor&&r.x<=1/3},e.isCenterAnchor=function(r){return"center"===r.xanchor||"auto"===r.xanchor&&r.x>1/3&&r.x<2/3},e.isRightAnchor=function(r){return"right"===r.xanchor||"auto"===r.xanchor&&r.x>=2/3},e.isTopAnchor=function(r){return"top"===r.yanchor||"auto"===r.yanchor&&r.y>=2/3},e.isMiddleAnchor=function(r){return"middle"===r.yanchor||"auto"===r.yanchor&&r.y>1/3&&r.y<2/3},e.isBottomAnchor=function(r){return"bottom"===r.yanchor||"auto"===r.yanchor&&r.y<=1/3}},11864:function(r,e,n){"use strict";var i=n(20435),a=i.mod,t=i.modHalf,o=Math.PI,c=2*o;function u(r){return Math.abs(r[1]-r[0])>c-1e-14}function d(r,e){return t(e-r,c)}function s(r,e){if(u(e))return!0;var n,i;e[0](i=a(i,c))&&(i+=c);var t=a(r,c),o=t+c;return t>=n&&t<=i||o>=n&&o<=i}function l(r,e,n,i,a,t,d){a=a||0,t=t||0;var s,l,m,p,I,y=u([n,i]);function f(r,e){return[r*Math.cos(e)+a,t-r*Math.sin(e)]}y?(s=0,l=o,m=c):n=a&&r<=t);var a,t},pathArc:function(r,e,n,i,a){return l(null,r,e,n,i,a,0)},pathSector:function(r,e,n,i,a){return l(null,r,e,n,i,a,1)},pathAnnulus:function(r,e,n,i,a,t){return l(r,e,n,i,a,t,1)}}},38116:function(r,e,n){"use strict";var i=n(83160).decode,a=n(63620),t=Array.isArray,o=ArrayBuffer,c=DataView;function u(r){return o.isView(r)&&!(r instanceof c)}function d(r){return t(r)||u(r)}e.isTypedArray=u,e.isArrayOrTypedArray=d,e.isArray1D=function(r){return!d(r[0])},e.ensureArray=function(r,e){return t(r)||(r=[]),r.length=e,r};var s={u1c:"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,i1:"undefined"===typeof Int8Array?void 0:Int8Array,u1:"undefined"===typeof Uint8Array?void 0:Uint8Array,i2:"undefined"===typeof Int16Array?void 0:Int16Array,u2:"undefined"===typeof Uint16Array?void 0:Uint16Array,i4:"undefined"===typeof Int32Array?void 0:Int32Array,u4:"undefined"===typeof Uint32Array?void 0:Uint32Array,f4:"undefined"===typeof Float32Array?void 0:Float32Array,f8:"undefined"===typeof Float64Array?void 0:Float64Array};function l(r){return r.constructor===ArrayBuffer}function m(r,e,n){if(d(r)){if(d(r[0])){for(var i=n,a=0;aa.max?e.set(n):e.set(+r)}},integer:{coerceFunction:function(r,e,n,a){-1===(a.extras||[]).indexOf(r)?(I(r)&&(r=y(r)),r%1||!i(r)||void 0!==a.min&&ra.max?e.set(n):e.set(+r)):e.set(r)}},string:{coerceFunction:function(r,e,n,i){if("string"!==typeof r){var a="number"===typeof r;!0!==i.strict&&a?e.set(String(r)):e.set(n)}else i.noBlank&&!r?e.set(n):e.set(r)}},color:{coerceFunction:function(r,e,n){I(r)&&(r=y(r)),a(r).isValid()?e.set(r):e.set(n)}},colorlist:{coerceFunction:function(r,e,n){Array.isArray(r)&&r.length&&r.every((function(r){return a(r).isValid()}))?e.set(r):e.set(n)}},colorscale:{coerceFunction:function(r,e,n){e.set(c.get(r,n))}},angle:{coerceFunction:function(r,e,n){I(r)&&(r=y(r)),"auto"===r?e.set("auto"):i(r)?e.set(m(+r,360)):e.set(n)}},subplotid:{coerceFunction:function(r,e,n,i){var a=i.regex||l(n);"string"===typeof r&&a.test(r)?e.set(r):e.set(n)},validateFunction:function(r,e){var n=e.dflt;return r===n||"string"===typeof r&&!!l(n).test(r)}},flaglist:{coerceFunction:function(r,e,n,i){if(-1===(i.extras||[]).indexOf(r))if("string"===typeof r){for(var a=r.split("+"),t=0;t=i&&r<=a?r:s}if("string"!==typeof r&&"number"!==typeof r)return s;r=String(r);var d=x(n),g=r.charAt(0);!d||"G"!==g&&"g"!==g||(r=r.substr(1),n="");var P=d&&"chinese"===n.substr(0,7),G=r.match(P?h:_);if(!G)return s;var C=G[1],S=G[3]||"1",A=Number(G[5]||1),b=Number(G[7]||0),M=Number(G[9]||0),B=Number(G[11]||0);if(d){if(2===C.length)return s;var k;C=Number(C);try{var F=f.getComponentMethod("calendars","getCal")(n);if(P){var z="i"===S.charAt(S.length-1);S=parseInt(S,10),k=F.newDate(C,F.toMonthIndex(C,S,z),A)}else k=F.newDate(C,Number(S),A)}catch(R){return s}return k?(k.toJD()-y)*l+b*m+M*p+B*I:s}C=2===C.length?(Number(C)+2e3-v)%100+v:Number(C),S-=1;var w=new Date(Date.UTC(2e3,S,A,b,M));return w.setUTCFullYear(C),w.getUTCMonth()!==S||w.getUTCDate()!==A?s:w.getTime()+B*I},i=e.MIN_MS=e.dateTime2ms("-9999"),a=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(r,n){return e.dateTime2ms(r,n)!==s};var G=90*l,C=3*m,S=5*p;function A(r,e,n,i,a){if((e||n||i||a)&&(r+=" "+P(e,2)+":"+P(n,2),(i||a)&&(r+=":"+P(i,2),a))){for(var t=4;a%10===0;)t-=1,a/=10;r+="."+P(a,t)}return r}e.ms2DateTime=function(r,e,n){if("number"!==typeof r||!(r>=i&&r<=a))return s;e||(e=0);var t,o,c,d,_,h,v=Math.floor(10*u(r+.05,1)),P=Math.round(r-v/10);if(x(n)){var b=Math.floor(P/l)+y,M=Math.floor(u(r,l));try{t=f.getComponentMethod("calendars","getCal")(n).fromJD(b).formatDate("yyyy-mm-dd")}catch(B){t=g("G%Y-%m-%d")(new Date(P))}if("-"===t.charAt(0))for(;t.length<11;)t="-0"+t.substr(1);else for(;t.length<10;)t="0"+t;o=e=i+l&&r<=a-l))return s;var e=Math.floor(10*u(r+.05,1)),n=new Date(Math.round(r-e/10));return A(t("%Y-%m-%d")(n),n.getHours(),n.getMinutes(),n.getSeconds(),10*n.getUTCMilliseconds()+e)},e.cleanDate=function(r,n,i){if(r===s)return n;if(e.isJSDate(r)||"number"===typeof r&&isFinite(r)){if(x(i))return c.error("JS Dates and milliseconds are incompatible with world calendars",r),n;if(!(r=e.ms2DateTimeLocal(+r))&&void 0!==n)return n}else if(!e.isDateTime(r,i))return c.error("unrecognized date",r),n;return r};var b=/%\d?f/g,M=/%h/g,B={1:"1",2:"1",3:"2",4:"2"};function k(r,e,n,i){r=r.replace(b,(function(r){var n=Math.min(+r.charAt(1)||6,6);return(e/1e3%1+2).toFixed(n).substr(2).replace(/0+$/,"")||"0"}));var a=new Date(Math.floor(e+.05));if(r=r.replace(M,(function(){return B[n("%q")(a)]})),x(i))try{r=f.getComponentMethod("calendars","worldCalFmt")(r,e,i)}catch(t){return"Invalid"}return n(r)(a)}var F=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(r,e,n,i,a,t){if(a=x(a)&&a,!e)if("y"===n)e=t.year;else if("m"===n)e=t.month;else{if("d"!==n)return function(r,e){var n=u(r+.05,l),i=P(Math.floor(n/m),2)+":"+P(u(Math.floor(n/p),60),2);if("M"!==e){o(e)||(e=0);var a=(100+Math.min(u(r/I,60),F[e])).toFixed(e).substr(1);e>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+a}return i}(r,n)+"\n"+k(t.dayMonthYear,r,i,a);e=t.dayMonth+"\n"+t.year}return k(e,r,i,a)};var z=3*l;e.incrementMonth=function(r,e,n){n=x(n)&&n;var i=u(r,l);if(r=Math.round(r-i),n)try{var a=Math.round(r/l)+y,t=f.getComponentMethod("calendars","getCal")(n),o=t.fromJD(a);return e%12?t.add(o,e,"m"):t.add(o,e/12,"y"),(o.toJD()-y)*l+i}catch(s){c.error("invalid ms "+r+" in calendar "+n)}var d=new Date(r+z);return d.setUTCMonth(d.getUTCMonth()+e)+i-z},e.findExactDates=function(r,e){for(var n,i,a=0,t=0,c=0,u=0,d=x(e)&&f.getComponentMethod("calendars","getCal")(e),s=0;s0&&r[e+1][0]<0)return e;return null}switch(e="RUS"===c||"FJI"===c?function(r){var e;if(null===d(r))e=r;else for(e=new Array(r.length),a=0;ae?n[i++]=[r[a][0]+360,r[a][1]]:a===e?(n[i++]=r[a],n[i++]=[r[a][0],-90]):n[i++]=r[a];var t=m.tester(n);t.pts.pop(),u.push(t)}:function(r){u.push(m.tester(r))},t.type){case"MultiPolygon":for(n=0;na&&(a=d,e=u)}else e=n;return o.default(e).geometry.coordinates}(s),i.fIn=r,i.fOut=s,c.push(s)}else d.log(["Location",i.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete a[n]}switch(n.type){case"FeatureCollection":var m=n.features;for(i=0;i100?(clearInterval(t),i("Unexpected error while fetching from "+r)):void a++}),50)}))}for(var o=0;o0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n},e.makeLine=function(r){return 1===r.length?{type:"LineString",coordinates:r[0]}:{type:"MultiLineString",coordinates:r}},e.makePolygon=function(r){if(1===r.length)return{type:"Polygon",coordinates:r};for(var e=new Array(r.length),n=0;n1||y<0||y>1?null:{x:r+u*y,y:e+l*y}}function u(r,e,n,i,a){var t=i*r+a*e;if(t<0)return i*i+a*a;if(t>n){var o=i-r,c=a-e;return o*o+c*c}var u=i*e-a*r;return u*u/n}e.segmentsIntersect=c,e.segmentDistance=function(r,e,n,i,a,t,o,d){if(c(r,e,n,i,a,t,o,d))return 0;var s=n-r,l=i-e,m=o-a,p=d-t,I=s*s+l*l,y=m*m+p*p,f=Math.min(u(s,l,I,a-r,t-e),u(s,l,I,o-r,d-e),u(m,p,y,r-a,e-t),u(m,p,y,n-a,i-t));return Math.sqrt(f)},e.getTextLocation=function(r,e,n,c){if(r===a&&c===t||(i={},a=r,t=c),i[n])return i[n];var u=r.getPointAtLength(o(n-c/2,e)),d=r.getPointAtLength(o(n+c/2,e)),s=Math.atan((d.y-u.y)/(d.x-u.x)),l=r.getPointAtLength(o(n,e)),m={x:(4*l.x+u.x+d.x)/6,y:(4*l.y+u.y+d.y)/6,theta:s};return i[n]=m,m},e.clearLocationCache=function(){a=null},e.getVisibleSegment=function(r,e,n){var i,a,t=e.left,o=e.right,c=e.top,u=e.bottom,d=0,s=r.getTotalLength(),l=s;function m(e){var n=r.getPointAtLength(e);0===e?i=n:e===s&&(a=n);var d=n.xo?n.x-o:0,l=n.yu?n.y-u:0;return Math.sqrt(d*d+l*l)}for(var p=m(d);p;){if((d+=p+n)>l)return;p=m(d)}for(p=m(l);p;){if(d>(l-=p+n))return;p=m(l)}return{min:d,max:l,len:l-d,total:s,isClosed:0===d&&l===s&&Math.abs(i.x-a.x)<.1&&Math.abs(i.y-a.y)<.1}},e.findPointOnPath=function(r,e,n,i){for(var a,t,o,c=(i=i||{}).pathLength||r.getTotalLength(),u=i.tolerance||.001,d=i.iterationLimit||30,s=r.getPointAtLength(0)[n]>r.getPointAtLength(c)[n]?-1:1,l=0,m=0,p=c;l0?p=a:m=a,l++}return t}},33040:function(r,e,n){"use strict";var i=n(38248),a=n(49760),t=n(72160),o=n(8932),c=n(22548).defaultLine,u=n(38116).isArrayOrTypedArray,d=t(c),s=1;function l(r,e){var n=r;return n[3]*=e,n}function m(r){if(i(r))return d;var e=t(r);return e.length?e:d}function p(r){return i(r)?r:s}r.exports={formatColor:function(r,e,n){var i=r.color;i&&i._inputArray&&(i=i._inputArray);var a,c,I,y,f,g=u(i),_=u(e),h=o.extractOpts(r),v=[];if(a=void 0!==h.colorscale?o.makeColorScaleFuncFromTrace(r):m,c=g?function(r,e){return void 0===r[e]?d:t(a(r[e]))}:m,I=_?function(r,e){return void 0===r[e]?s:p(r[e])}:p,g||_)for(var x=0;x1?(n*r+n*e)/n:r+e,a=String(i).length;if(a>16){var t=String(e).length;if(a>=String(r).length+t){var o=parseFloat(i).toPrecision(12);-1===o.indexOf("e+")&&(i=+o)}}return i}},3400:function(r,e,n){"use strict";var i=n(33428),a=n(94336).E9,t=n(57624).E9,o=n(38248),c=n(39032),u=c.FP_SAFE,d=-u,s=c.BADNUM,l=r.exports={};l.adjustFormat=function(r){return!r||/^\d[.]\df/.test(r)||/[.]\d%/.test(r)?r:"0.f"===r?"~f":/^\d%/.test(r)?"~%":/^\ds/.test(r)?"~s":!/^[~,.0$]/.test(r)&&/[&fps]/.test(r)?"~"+r:r};var m={};l.warnBadFormat=function(r){var e=String(r);m[e]||(m[e]=1,l.warn('encountered bad format: "'+e+'"'))},l.noFormat=function(r){return String(r)},l.numberFormat=function(r){var e;try{e=t(l.adjustFormat(r))}catch(n){return l.warnBadFormat(r),l.noFormat}return e},l.nestedProperty=n(22296),l.keyedContainer=n(37804),l.relativeAttr=n(23193),l.isPlainObject=n(63620),l.toLogRange=n(36896),l.relinkPrivateKeys=n(51528);var p=n(38116);l.isArrayBuffer=p.isArrayBuffer,l.isTypedArray=p.isTypedArray,l.isArrayOrTypedArray=p.isArrayOrTypedArray,l.isArray1D=p.isArray1D,l.ensureArray=p.ensureArray,l.concat=p.concat,l.maxRowLength=p.maxRowLength,l.minRowLength=p.minRowLength;var I=n(20435);l.mod=I.mod,l.modHalf=I.modHalf;var y=n(63064);l.valObjectMeta=y.valObjectMeta,l.coerce=y.coerce,l.coerce2=y.coerce2,l.coerceFont=y.coerceFont,l.coercePattern=y.coercePattern,l.coerceHoverinfo=y.coerceHoverinfo,l.coerceSelectionMarkerOpacity=y.coerceSelectionMarkerOpacity,l.validate=y.validate;var f=n(67555);l.dateTime2ms=f.dateTime2ms,l.isDateTime=f.isDateTime,l.ms2DateTime=f.ms2DateTime,l.ms2DateTimeLocal=f.ms2DateTimeLocal,l.cleanDate=f.cleanDate,l.isJSDate=f.isJSDate,l.formatDate=f.formatDate,l.incrementMonth=f.incrementMonth,l.dateTick0=f.dateTick0,l.dfltRange=f.dfltRange,l.findExactDates=f.findExactDates,l.MIN_MS=f.MIN_MS,l.MAX_MS=f.MAX_MS;var g=n(14952);l.findBin=g.findBin,l.sorterAsc=g.sorterAsc,l.sorterDes=g.sorterDes,l.distinctVals=g.distinctVals,l.roundUp=g.roundUp,l.sort=g.sort,l.findIndexOfMin=g.findIndexOfMin,l.sortObjectKeys=n(95376);var _=n(63084);l.aggNums=_.aggNums,l.len=_.len,l.mean=_.mean,l.median=_.median,l.midRange=_.midRange,l.variance=_.variance,l.stdev=_.stdev,l.interp=_.interp;var h=n(52248);l.init2dArray=h.init2dArray,l.transposeRagged=h.transposeRagged,l.dot=h.dot,l.translationMatrix=h.translationMatrix,l.rotationMatrix=h.rotationMatrix,l.rotationXYMatrix=h.rotationXYMatrix,l.apply3DTransform=h.apply3DTransform,l.apply2DTransform=h.apply2DTransform,l.apply2DTransform2=h.apply2DTransform2,l.convertCssMatrix=h.convertCssMatrix,l.inverseTransformMatrix=h.inverseTransformMatrix;var v=n(11864);l.deg2rad=v.deg2rad,l.rad2deg=v.rad2deg,l.angleDelta=v.angleDelta,l.angleDist=v.angleDist,l.isFullCircle=v.isFullCircle,l.isAngleInsideSector=v.isAngleInsideSector,l.isPtInsideSector=v.isPtInsideSector,l.pathArc=v.pathArc,l.pathSector=v.pathSector,l.pathAnnulus=v.pathAnnulus;var x=n(98308);l.isLeftAnchor=x.isLeftAnchor,l.isCenterAnchor=x.isCenterAnchor,l.isRightAnchor=x.isRightAnchor,l.isTopAnchor=x.isTopAnchor,l.isMiddleAnchor=x.isMiddleAnchor,l.isBottomAnchor=x.isBottomAnchor;var P=n(92348);l.segmentsIntersect=P.segmentsIntersect,l.segmentDistance=P.segmentDistance,l.getTextLocation=P.getTextLocation,l.clearLocationCache=P.clearLocationCache,l.getVisibleSegment=P.getVisibleSegment,l.findPointOnPath=P.findPointOnPath;var G=n(92880);l.extendFlat=G.extendFlat,l.extendDeep=G.extendDeep,l.extendDeepAll=G.extendDeepAll,l.extendDeepNoArrays=G.extendDeepNoArrays;var C=n(24248);l.log=C.log,l.warn=C.warn,l.error=C.error;var S=n(53756);l.counterRegex=S.counter;var A=n(91200);l.throttle=A.throttle,l.throttleDone=A.done,l.clearThrottle=A.clear;var b=n(52200);function M(r){var e={};for(var n in r)for(var i=r[n],a=0;au||r=e)&&o(r)&&r>=0&&r%1===0},l.noop=n(16628),l.identity=n(35536),l.repeat=function(r,e){for(var n=new Array(e),i=0;in?Math.max(n,Math.min(e,r)):Math.max(e,Math.min(n,r))},l.bBoxIntersect=function(r,e,n){return n=n||0,r.left<=e.right+n&&e.left<=r.right+n&&r.top<=e.bottom+n&&e.top<=r.bottom+n},l.simpleMap=function(r,e,n,i,a){for(var t=r.length,o=new Array(t),c=0;c=Math.pow(2,n)?a>10?(l.warn("randstr failed uniqueness"),u):r(e,n,i,(a||0)+1):u},l.OptionControl=function(r,e){r||(r={}),e||(e="opt");var n={optionList:[],_newoption:function(i){i[e]=r,n[i.name]=i,n.optionList.push(i)}};return n["_"+e]=r,n},l.smooth=function(r,e){if((e=Math.round(e)||0)<2)return r;var n,i,a,t,o=r.length,c=2*o,u=2*e-1,d=new Array(u),s=new Array(o);for(n=0;n=c&&(a-=c*Math.floor(a/c)),a<0?a=-1-a:a>=o&&(a=c-1-a),t+=r[a]*d[i];s[n]=t}return s},l.syncOrAsync=function(r,e,n){var i;function a(){return l.syncOrAsync(r,e,n)}for(;r.length;)if((i=(0,r.splice(0,1)[0])(e))&&i.then)return i.then(a);return n&&n(e)},l.stripTrailingSlash=function(r){return"/"===r.substr(-1)?r.substr(0,r.length-1):r},l.noneOrAll=function(r,e,n){if(r){var i,a,t=!1,o=!0;for(i=0;i0?e:0}))},l.fillArray=function(r,e,n,i){if(i=i||l.identity,l.isArrayOrTypedArray(r))for(var a=0;a1?a+o[1]:"";if(t&&(o.length>1||c.length>4||n))for(;i.test(c);)c=c.replace(i,"$1"+t+"$2");return c+u},l.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var E=/^\w*$/;l.templateString=function(r,e){var n={};return r.replace(l.TEMPLATE_STRING_REGEX,(function(r,i){var a;return E.test(i)?a=e[i]:(n[i]=n[i]||l.nestedProperty(e,i).get,a=n[i]()),l.isValidTextValue(a)?a:""}))};var N={max:10,count:0,name:"hovertemplate"};l.hovertemplateString=function(){return H.apply(N,arguments)};var T={max:10,count:0,name:"texttemplate"};l.texttemplateString=function(){return H.apply(T,arguments)};var D=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,J={max:10,count:0,name:"texttemplate",parseMultDiv:!0};l.texttemplateStringForShapes=function(){return H.apply(J,arguments)};var U=/^[:|\|]/;function H(r,e,n){var i=this,t=arguments;e||(e={});var o={};return r.replace(l.TEMPLATE_STRING_REGEX,(function(r,c,u){var d="_xother"===c||"_yother"===c,s="_xother_"===c||"_yother_"===c,m="xother_"===c||"yother_"===c,p="xother"===c||"yother"===c||d||m||s,I=c;(d||s)&&(I=I.substring(1)),(m||s)&&(I=I.substring(0,I.length-1));var y,f,g,_=null,h=null;if(i.parseMultDiv){var v=function(r){var e=r.match(D);return e?{key:e[1],op:e[2],number:Number(e[3])}:{key:r,op:null,number:null}}(I);I=v.key,_=v.op,h=v.number}if(p){if(void 0===(y=e[I]))return""}else for(g=3;g=48&&o<=57,d=c>=48&&c<=57;if(u&&(i=10*i+o-48),d&&(a=10*a+c-48),!u||!d){if(i!==a)return i-a;if(o!==c)return o-c}}return a-i};var L=2e9;l.seedPseudoRandom=function(){L=2e9},l.pseudoRandom=function(){var r=L;return L=(69069*L+1)%4294967296,Math.abs(L-r)<429496729?l.pseudoRandom():L/4294967296},l.fillText=function(r,e,n){var i=Array.isArray(n)?function(r){n.push(r)}:function(r){n.text=r},a=l.extractOption(r,e,"htx","hovertext");if(l.isValidTextValue(a))return i(a);var t=l.extractOption(r,e,"tx","text");return l.isValidTextValue(t)?i(t):void 0},l.isValidTextValue=function(r){return r||0===r},l.formatPercent=function(r,e){e=e||0;for(var n=(Math.round(100*r*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",i=0;i1&&(d=1):d=0,l.strTranslate(a-d*(n+o),t-d*(i+c))+l.strScale(d)+(u?"rotate("+u+(e?"":" "+n+" "+i)+")":"")},l.setTransormAndDisplay=function(r,e){r.attr("transform",l.getTextTransform(e)),r.style("display",e.scale?null:"none")},l.ensureUniformFontSize=function(r,e){var n=l.extendFlat({},e);return n.size=Math.max(e.size,r._fullLayout.uniformtext.minsize||0),n},l.join2=function(r,e,n){var i=r.length;return i>1?r.slice(0,-1).join(e)+n+r[i-1]:r.join(e)},l.bigFont=function(r){return Math.round(1.2*r)};var O=l.getFirefoxVersion(),K=null!==O&&O<86;l.getPositionFromD3Event=function(){return K?[i.event.layerX,i.event.layerY]:[i.event.offsetX,i.event.offsetY]}},63620:function(r){"use strict";r.exports=function(r){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(r):"[object Object]"===Object.prototype.toString.call(r)&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}},37804:function(r,e,n){"use strict";var i=n(22296),a=/^\w*$/;r.exports=function(r,e,n,t){var o,c,u;n=n||"name",t=t||"value";var d={};e&&e.length?(u=i(r,e),c=u.get()):c=r,e=e||"";var s={};if(c)for(o=0;o2)return d[e]=2|d[e],m.set(r,null);if(l){for(o=e;o1){var e=["LOG:"];for(r=0;r1){var n=[];for(r=0;r"),"long")}},t.warn=function(){var r;if(i.logging>0){var e=["WARN:"];for(r=0;r0){var n=[];for(r=0;r"),"stick")}},t.error=function(){var r;if(i.logging>0){var e=["ERROR:"];for(r=0;r0){var n=[];for(r=0;r"),"stick")}}},30988:function(r,e,n){"use strict";var i=n(33428);r.exports=function(r,e,n){var a=r.selectAll("g."+n.replace(/\s/g,".")).data(e,(function(r){return r[0].trace.uid}));a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var t=r.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each((function(r){r[0][t]=i.select(this)})),a}},52248:function(r,e,n){"use strict";var i=n(36524);e.init2dArray=function(r,e){for(var n=new Array(r),i=0;ie/2?r-Math.round(r/e)*e:r}}},22296:function(r,e,n){"use strict";var i=n(38248),a=n(38116).isArrayOrTypedArray;function t(r,e){return function(){var n,i,o,c,u,d=r;for(c=0;c/g),u=0;ut||d===a||dc)&&(!e||!u(r))}:function(r,e){var u=r[0],d=r[1];if(u===a||ut||d===a||dc)return!1;var s,l,m,p,I,y=n.length,f=n[0][0],g=n[0][1],_=0;for(s=1;sMath.max(l,f)||d>Math.max(m,g)))if(ds||Math.abs(i(o,m))>a)return!0;return!1},t.filter=function(r,e){var n=[r[0]],i=0,a=0;function o(o){r.push(o);var c=n.length,u=i;n.splice(a+1);for(var d=u+1;d1&&o(r.pop()),{addPt:o,raw:r,filtered:n}}},5048:function(r,e,n){"use strict";var i=n(16576),a=n(28624);r.exports=function(r,e,t){var o=r._fullLayout,c=!0;return o._glcanvas.each((function(i){if(i.regl)i.regl.preloadCachedCode(t);else if(!i.pick||o._has("parcoords")){try{i.regl=a({canvas:this,attributes:{antialias:!i.pick,preserveDrawingBuffer:!0},pixelRatio:r._context.plotGlPixelRatio||n.g.devicePixelRatio,extensions:e||[],cachedCode:t||{}})}catch(u){c=!1}i.regl||(c=!1),c&&this.addEventListener("webglcontextlost",(function(e){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:e,layer:i.key})}),!1)}})),c||i({container:o._glcontainer.node()}),c}},34296:function(r,e,n){"use strict";var i=n(38248),a=n(25928);r.exports=function(r){var e;if("string"!==typeof(e=r&&r.hasOwnProperty("userAgent")?r.userAgent:function(){var r;return"undefined"!==typeof navigator&&(r=navigator.userAgent),r&&r.headers&&"string"===typeof r.headers["user-agent"]&&(r=r.headers["user-agent"]),r}()))return!0;var n=a({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!n)for(var t=e.split(" "),o=1;o-1;c--){var u=t[c];if("Version/"===u.substr(0,8)){var d=u.substr(8).split(".")[0];if(i(d)&&(d=+d),d>=13)return!0}}return n}},52416:function(r){"use strict";r.exports=function(r,e){if(e instanceof RegExp){for(var n=e.toString(),i=0;ia.queueLength&&(r.undoQueue.queue.shift(),r.undoQueue.index--))},startSequence:function(r){r.undoQueue=r.undoQueue||{index:0,queue:[],sequence:!1},r.undoQueue.sequence=!0,r.undoQueue.beginSequence=!0},stopSequence:function(r){r.undoQueue=r.undoQueue||{index:0,queue:[],sequence:!1},r.undoQueue.sequence=!1,r.undoQueue.beginSequence=!1},undo:function(r){var e,n;if(!(void 0===r.undoQueue||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,e=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;n=r.undoQueue.queue.length)){for(e=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,n=0;ne}function l(r,e){return r>=e}e.findBin=function(r,e,n){if(i(e.start))return n?Math.ceil((r-e.start)/e.size-c)-1:Math.floor((r-e.start)/e.size+c);var t,o,m=0,p=e.length,I=0,y=p>1?(e[p-1]-e[0])/(p-1):1;for(o=y>=0?n?u:d:n?l:s,r+=y*c*(n?-1:1)*(y>=0?1:-1);m90&&a.log("Long binary search..."),m-1},e.sorterAsc=function(r,e){return r-e},e.sorterDes=function(r,e){return e-r},e.distinctVals=function(r){var n,i=r.slice();for(i.sort(e.sorterAsc),n=i.length-1;n>-1&&i[n]===o;n--);for(var a,t=i[n]-i[0]||1,c=t/(n||1)/1e4,u=[],d=0;d<=n;d++){var s=i[d],l=s-a;void 0===a?(u.push(s),a=s):l>c&&(t=Math.min(t,l),u.push(s),a=s)}return{vals:u,minDiff:t}},e.roundUp=function(r,e,n){for(var i,a=0,t=e.length-1,o=0,c=n?0:1,u=n?1:0,d=n?Math.ceil:Math.floor;a0&&(i=1),n&&i)return r.sort(e)}return i?r:r.reverse()},e.findIndexOfMin=function(r,e){e=e||t;for(var n,i=1/0,a=0;at.length)&&(o=t.length),i(n)||(n=!1),a(t[0])){for(u=new Array(o),c=0;cr.length-1)return r[r.length-1];var n=e%1;return n*r[Math.ceil(e)]+(1-n)*r[Math.floor(e)]}},43080:function(r,e,n){"use strict";var i=n(72160);r.exports=function(r){return r?i(r):[0,0,0,1]}},9188:function(r,e,n){"use strict";var i=n(2264),a=n(43616),t=n(3400),o=null;r.exports=function(){if(null!==o)return o;o=!1;var r=t.isIE()||t.isSafari()||t.isIOS();if(window.navigator.userAgent&&!r){var e=Array.from(i.CSS_DECLARATIONS).reverse(),n=window.CSS&&window.CSS.supports||window.supportsCSS;if("function"===typeof n)o=e.some((function(r){return n.apply(null,r)}));else{var c=a.tester.append("image").attr("style",i.STYLE),u=window.getComputedStyle(c.node()).imageRendering;o=e.some((function(r){var e=r[1];return u===e||u===e.toLowerCase()})),c.remove()}}return o}},72736:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=a.strTranslate,o=n(9616),c=n(84284).LINE_SPACING,u=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(r,n,f){var b=r.text(),M=!r.attr("data-notex")&&n&&n._context.typesetMath&&"undefined"!==typeof MathJax&&b.match(u),F=i.select(r.node().parentNode);if(!F.empty()){var z=r.attr("class")?r.attr("class").split(" ")[0]:"text";return z+="-math",F.selectAll("svg."+z).remove(),F.selectAll("g."+z+"-group").remove(),r.style("display",null).attr({"data-unformatted":b,"data-math":"N"}),M?(n&&n._promises||[]).push(new Promise((function(e){r.style("display","none");var n=parseInt(r.node().style.fontSize,10),o={fontSize:n};!function(r,e,n){var t,o,c,u,m=parseInt((MathJax.version||"").split(".")[0]);if(2===m||3===m){var p=function(){return o=a.extendDeepAll({},MathJax.Hub.config),c=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:l},displayAlign:"left"})},I=function(){o=a.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=l},y=function(){if("SVG"!==(t=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},f=function(){"svg"!==(t=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg")},g=function(){var n="math-output-"+a.randstr({},64),t=(u=i.select("body").append("div").attr({id:n}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(r.replace(d,"\\lt ").replace(s,"\\gt "))).node();return 2===m?MathJax.Hub.Typeset(t):MathJax.typeset([t])},_=function(){var e=u.select(2===m?".MathJax_SVG":".MathJax"),t=!e.empty()&&u.select("svg").node();if(t){var o,c=t.getBoundingClientRect();o=2===m?i.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),n(e,o,c)}else a.log("There was an error in the tex syntax.",r),n();u.remove()},h=function(){if("SVG"!==t)return MathJax.Hub.setRenderer(t)},v=function(){"svg"!==t&&(MathJax.config.startup.output=t)},x=function(){return void 0!==c&&(MathJax.Hub.processSectionDelay=c),MathJax.Hub.Config(o)},P=function(){MathJax.config=o};2===m?MathJax.Hub.Queue(p,y,g,_,h,x):3===m&&(I(),f(),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){g(),_(),v(),P()})))}else a.warn("No MathJax version:",MathJax.version)}(M[2],o,(function(i,a,o){F.selectAll("svg."+z).remove(),F.selectAll("g."+z+"-group").remove();var c=i&&i.select("svg");if(!c||!c.node())return w(),void e();var u=F.append("g").classed(z+"-group",!0).attr({"pointer-events":"none","data-unformatted":b,"data-math":"Y"});u.node().appendChild(c.node()),a&&a.node()&&c.node().insertBefore(a.node().cloneNode(!0),c.node().firstChild);var d=o.width,s=o.height;c.attr({class:z,height:s,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var l=r.node().style.fill||"black",m=c.select("g");m.attr({fill:l,stroke:l});var p=m.node().getBoundingClientRect(),I=p.width,y=p.height;(I>d||y>s)&&(c.style("overflow","hidden"),I=(p=c.node().getBoundingClientRect()).width,y=p.height);var g=+r.attr("x"),_=+r.attr("y"),h=-(n||r.node().getBoundingClientRect().height)/4;if("y"===z[0])u.attr({transform:"rotate("+[-90,g,_]+")"+t(-I/2,h-y/2)});else if("l"===z[0])_=h-y/2;else if("a"===z[0]&&0!==z.indexOf("atitle"))g=0,_=h;else{var v=r.attr("text-anchor");g-=I*("middle"===v?.5:"end"===v?1:0),_=_+h-y/2}c.attr({x:g,y:_}),f&&f.call(r,u),e(u)}))}))):w(),r}function w(){F.empty()||(z=r.attr("class")+"-math",F.select("svg."+z).remove()),r.text("").style("white-space","pre");var n=function(r,e){e=e.replace(g," ");var n,t=!1,u=[],d=-1;function s(){d++;var e=document.createElementNS(o.svg,"tspan");i.select(e).attr({class:"line",dy:d*c+"em"}),r.appendChild(e),n=e;var a=u;if(u=[{node:e}],a.length>1)for(var t=1;t doesnt match end tag <"+r+">. Pretending it did match.",e),n=u[u.length-1].node}else a.log("Ignoring unexpected end tag .",e)}var M=v.test(e);M?s():(n=r,u=[{node:r}]);for(var F=e.split(_),z=0;z|>|>)/g,l=[["$","$"],["\\(","\\)"]],m={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"},I={sub:"-0.21em",sup:"0.42em"},y="\u200b",f=["http:","https:","mailto:","",void 0,":"],g=e.NEWLINES=/(\r\n?|\n)/g,_=/(<[^<>]*>)/,h=/<(\/?)([^ >]*)(\s+(.*))?>/i,v=//i;e.BR_TAG_ALL=//gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,P=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,G=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,C=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(r,e){if(!r)return null;var n=r.match(e),i=n&&(n[3]||n[4]);return i&&B(i)}var A=/(^|;)\s*color:/;e.plainText=function(r,e){for(var n=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,i=void 0!==e.allowedTags?e.allowedTags:["br"],a=r.split(_),t=[],o="",c=0,u=0;u3?t.push(d.substr(0,p-3)+"..."):t.push(d.substr(0,p));break}o=""}}return t.join("")};var b={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},M=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(r){return r.replace(M,(function(r,e){return("#"===e.charAt(0)?function(r){if(!(r>1114111)){var e=String.fromCodePoint;if(e)return e(r);var n=String.fromCharCode;return r<=65535?n(r):n(55232+(r>>10),r%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):b[e])||r}))}function k(r){var e=encodeURI(decodeURI(r)),n=document.createElement("a"),i=document.createElement("a");n.href=r,i.href=e;var a=n.protocol,t=i.protocol;return-1!==f.indexOf(a)&&-1!==f.indexOf(t)?e:""}function F(r,e,n){var i,t,o,c=n.horizontalAlign,u=n.verticalAlign||"top",d=r.node().getBoundingClientRect(),s=e.node().getBoundingClientRect();return t="bottom"===u?function(){return d.bottom-i.height}:"middle"===u?function(){return d.top+(d.height-i.height)/2}:function(){return d.top},o="right"===c?function(){return d.right-i.width}:"center"===c?function(){return d.left+(d.width-i.width)/2}:function(){return d.left},function(){i=this.node().getBoundingClientRect();var r=o()-s.left,e=t()-s.top,c=n.gd||{};if(n.gd){c._fullLayout._calcInverseTransform(c);var u=a.apply3DTransform(c._fullLayout._invTransform)(r,e);r=u[0],e=u[1]}return this.style({top:e+"px",left:r+"px","z-index":1e3}),this}}e.convertEntities=B,e.sanitizeHTML=function(r){r=r.replace(g," ");for(var e=document.createElement("p"),n=e,a=[],t=r.split(_),o=0;ot.ts+e?u():t.timer=setTimeout((function(){u(),t.timer=null}),e)},e.done=function(r){var e=n[r];return e&&e.timer?new Promise((function(r){var n=e.onDone;e.onDone=function(){n&&n(),r(),e.onDone=null}})):Promise.resolve()},e.clear=function(r){if(r)i(n[r]),delete n[r];else for(var a in n)e.clear(a)}},36896:function(r,e,n){"use strict";var i=n(38248);r.exports=function(r,e){if(r>0)return Math.log(r)/Math.LN10;var n=Math.log(Math.min(e[0],e[1]))/Math.LN10;return i(n)||(n=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),n}},59972:function(r,e,n){"use strict";var i=r.exports={},a=n(79552).locationmodeToLayer,t=n(55712).NO;i.getTopojsonName=function(r){return[r.scope.replace(/ /g,"-"),"_",r.resolution.toString(),"m"].join("")},i.getTopojsonPath=function(r,e){return r+e+".json"},i.getTopojsonFeatures=function(r,e){var n=a[r.locationmode],i=e.objects[n];return t(e,i).features}},11680:function(r){"use strict";r.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(r){"use strict";r.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"}}},69820:function(r,e,n){"use strict";var i=n(24040);r.exports=function(r){for(var e,n,a=i.layoutArrayContainers,t=i.layoutArrayRegexes,o=r.split("[")[0],c=0;c0&&o.log("Clearing previous rejected promises from queue."),r._promises=[]},e.cleanLayout=function(r){var n,i;r||(r={}),r.xaxis1&&(r.xaxis||(r.xaxis=r.xaxis1),delete r.xaxis1),r.yaxis1&&(r.yaxis||(r.yaxis=r.yaxis1),delete r.yaxis1),r.scene1&&(r.scene||(r.scene=r.scene1),delete r.scene1);var t=(c.subplotsRegistry.cartesian||{}).attrRegex,u=(c.subplotsRegistry.polar||{}).attrRegex,l=(c.subplotsRegistry.ternary||{}).attrRegex,m=(c.subplotsRegistry.gl3d||{}).attrRegex,y=Object.keys(r);for(n=0;n3?(w.x=1.02,w.xanchor="left"):w.x<-2&&(w.x=-.02,w.xanchor="right"),w.y>3?(w.y=1.02,w.yanchor="bottom"):w.y<-2&&(w.y=-.02,w.yanchor="top")),I(r),"rotate"===r.dragmode&&(r.dragmode="orbit"),d.clean(r),r.template&&r.template.layout&&e.cleanLayout(r.template.layout),r},e.cleanData=function(r){for(var n=0;n0)return r.substr(0,e)}e.hasParent=function(r,e){for(var n=v(e);n;){if(n in r)return!0;n=v(n)}return!1};var x=["x","y","z"];e.clearAxisTypes=function(r,e,n){for(var i=0;i1&&t.warn("Full array edits are incompatible with other edits",l);var _=n[""][""];if(d(_))e.set(null);else{if(!Array.isArray(_))return t.warn("Unrecognized full array edit value",l,_),!0;e.set(_)}return!y&&(m(f,g),p(r),!0)}var h,v,x,P,G,C,S,A,b=Object.keys(n).map(Number).sort(o),M=e.get(),B=M||[],k=s(g,l).get(),F=[],z=-1,w=B.length;for(h=0;hB.length-(S?0:1))t.warn("index out of range",l,x);else if(void 0!==C)G.length>1&&t.warn("Insertion & removal are incompatible with edits to the same index.",l,x),d(C)?F.push(x):S?("add"===C&&(C={}),B.splice(x,0,C),k&&k.splice(x,0,{})):t.warn("Unrecognized full object edit value",l,x,C),-1===z&&(z=x);else for(v=0;v=0;h--)B.splice(F[h],1),k&&k.splice(F[h],1);if(B.length?M||e.set(B):e.set(null),y)return!1;if(m(f,g),I!==a){var R;if(-1===z)R=b;else{for(w=Math.max(B.length,w),R=[],h=0;h=z);h++)R.push(x);for(h=z;h=r.data.length||a<-r.data.length)throw new Error(n+" must be valid indices for gd.data.");if(e.indexOf(a,i+1)>-1||a>=0&&e.indexOf(-r.data.length+a)>-1||a<0&&e.indexOf(r.data.length+a)>-1)throw new Error("each index in "+n+" must be unique.")}}function R(r,e,n){if(!Array.isArray(r.data))throw new Error("gd.data must be an array.");if("undefined"===typeof e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),w(r,e,"currentIndices"),"undefined"===typeof n||Array.isArray(n)||(n=[n]),"undefined"!==typeof n&&w(r,n,"newIndices"),"undefined"!==typeof n&&e.length!==n.length)throw new Error("current and new indices must be of equal length.")}function E(r,e,n,i,t){!function(r,e,n,i){var a=o.isPlainObject(i);if(!Array.isArray(r.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if("undefined"===typeof n)throw new Error("indices must be an integer or array of integers");for(var t in w(r,n,"indices"),e){if(!Array.isArray(e[t])||e[t].length!==n.length)throw new Error("attribute "+t+" must be an array of length equal to indices array length");if(a&&(!(t in i)||!Array.isArray(i[t])||i[t].length!==e[t].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")}}(r,e,n,i);for(var u=function(r,e,n,i){var t,u,d,s,l,m=o.isPlainObject(i),p=[];for(var I in Array.isArray(n)||(n=[n]),n=z(n,r.data.length-1),e)for(var y=0;y-1&&-1===n.indexOf("grouptitlefont")?u(n,n.replace("titlefont","title.font")):n.indexOf("titleposition")>-1?u(n,n.replace("titleposition","title.position")):n.indexOf("titleside")>-1?u(n,n.replace("titleside","title.side")):n.indexOf("titleoffset")>-1&&u(n,n.replace("titleoffset","title.offset")):u(n,n.replace("title","title.text"));function u(e,n){r[n]=r[e],delete r[e]}}function O(r,e,n){r=o.getGraphDiv(r),G.clearPromiseQueue(r);var i={};if("string"===typeof e)i[e]=n;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,n),Promise.reject();i=o.extendFlat({},e)}Object.keys(i).length&&(r.changed=!0);var a=q(r,i),t=a.flags;t.calc&&(r.calcdata=void 0);var c=[m.previousPromises];t.layoutReplot?c.push(C.layoutReplot):Object.keys(i).length&&(K(r,t,a)||m.supplyDefaults(r),t.legend&&c.push(C.doLegend),t.layoutstyle&&c.push(C.layoutStyles),t.axrange&&V(c,a.rangesAltered),t.ticks&&c.push(C.doTicksRelayout),t.modebar&&c.push(C.doModeBar),t.camera&&c.push(C.doCamera),t.colorbars&&c.push(C.doColorBars),c.push(M)),c.push(m.rehover,m.redrag,m.reselect),d.add(r,O,[r,a.undoit],O,[r,a.redoit]);var u=o.syncOrAsync(c,r);return u&&u.then||(u=Promise.resolve(r)),u.then((function(){return r.emit("plotly_relayout",a.eventData),r}))}function K(r,e,n){var i,a,t=r._fullLayout;if(!e.axrange)return!1;for(var c in e)if("axrange"!==c&&e[c])return!1;var u=function(r,e){return o.coerce(i,a,y,r,e)},d={};for(var s in n.rangesAltered){var l=p.id2name(s);if(i=r.layout[l],a=t[l],I(i,a,u,d),a._matchGroup)for(var m in a._matchGroup)if(m!==s){var f=t[p.id2name(m)];f.autorange=a.autorange,f.range=a.range.slice(),f._input.range=a.range.slice()}}return!0}function V(r,e){var n=e?function(r){var n=[];for(var i in e){var a=p.getFromId(r,i);if(n.push(i),-1!==(a.ticklabelposition||"").indexOf("inside")&&a._anchorAxis&&n.push(a._anchorAxis._id),a._matchGroup)for(var t in a._matchGroup)e[t]||n.push(t)}return p.draw(r,n,{skipTitle:!0})}:function(r){return p.draw(r,"redraw")};r.push(v,C.doAutoRangeAndConstraints,n,C.drawData,C.finalDraw)}var j=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,W=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function q(r,e){var n,i,a,t=r.layout,u=r._fullLayout,d=u._guiEditing,m=J(u._preGUI,d),I=Object.keys(e),y=p.list(r),f=o.extendDeepAll({},e),g={};for(L(e),I=Object.keys(e),i=0;i0&&"string"!==typeof w.parts[E];)E--;var N=w.parts[E],T=w.parts[E-1]+"."+N,U=w.parts.slice(0,E).join("."),H=c(r.layout,U).get(),O=c(u,U).get(),K=w.get();if(void 0!==R){C[z]=R,b[z]="reverse"===N?R:D(K);var V=l.getLayoutValObject(u,w.parts);if(V&&V.impliedEdits&&null!==R)for(var q in V.impliedEdits)M(o.relativeAttr(z,q),V.impliedEdits[q]);if(-1!==["width","height"].indexOf(z))if(R){M("autosize",null);var X="height"===z?"width":"height";M(X,u[X])}else u[z]=r._initialAutoSize[z];else if("autosize"===z)M("width",R?null:u.width),M("height",R?null:u.height);else if(T.match(j))F(T),c(u,U+"._inputRange").set(null);else if(T.match(W)){F(T),c(u,U+"._inputRange").set(null);var Q=c(u,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else T.match(Z)&&c(u,U+"._inputDomain").set(null);if("type"===N){B=H;var $="linear"===O.type&&"log"===R,rr="log"===O.type&&"linear"===R;if($||rr){if(B&&B.range)if(O.autorange)$&&(B.range=B.range[1]>B.range[0]?[1,2]:[2,1]);else{var er=B.range[0],nr=B.range[1];$?(er<=0&&nr<=0&&M(U+".autorange",!0),er<=0?er=nr/1e6:nr<=0&&(nr=er/1e6),M(U+".range[0]",Math.log(er)/Math.LN10),M(U+".range[1]",Math.log(nr)/Math.LN10)):(M(U+".range[0]",Math.pow(10,er)),M(U+".range[1]",Math.pow(10,nr)))}else M(U+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[w.parts[0]]&&"radialaxis"===w.parts[1]&&delete u[w.parts[0]]._subplot.viewInitial["radialaxis.range"],s.getComponentMethod("annotations","convertCoords")(r,O,R,M),s.getComponentMethod("images","convertCoords")(r,O,R,M)}else M(U+".autorange",!0),M(U+".range",null);c(u,U+"._inputRange").set(null)}else if(N.match(A)){var ir=c(u,z).get(),ar=(R||{}).type;ar&&"-"!==ar||(ar="linear"),s.getComponentMethod("annotations","convertCoords")(r,ir,ar,M),s.getComponentMethod("images","convertCoords")(r,ir,ar,M)}var tr=P.containerArrayMatch(z);if(tr){n=tr.array,i=tr.index;var or=tr.property,cr=V||{editType:"calc"};""!==i&&""===or&&(P.isAddVal(R)?b[z]=null:P.isRemoveVal(R)?b[z]=(c(t,n).get()||[])[i]:o.warn("unrecognized full object value",e)),S.update(x,cr),g[n]||(g[n]={});var ur=g[n][i];ur||(ur=g[n][i]={}),ur[or]=R,delete e[z]}else"reverse"===N?(H.range?H.range.reverse():(M(U+".autorange",!0),H.range=[1,0]),O.autorange?x.calc=!0:x.plot=!0):("dragmode"===z&&(!1===R&&!1!==K||!1!==R&&!1===K)||u._has("scatter-like")&&u._has("regl")&&"dragmode"===z&&("lasso"===R||"select"===R)&&"lasso"!==K&&"select"!==K||u._has("gl2d")?x.plot=!0:V?S.update(x,V):x.calc=!0,w.set(R))}}for(n in g)P.applyContainerArrayChanges(r,m(t,n),g[n],x,m)||(x.plot=!0);for(var dr in k){var sr=(B=p.getFromId(r,dr))&&B._constraintGroup;if(sr)for(var lr in x.calc=!0,sr)k[lr]||(p.getFromId(r,lr)._constraintShrinkable=!0)}(Y(r)||e.height||e.width)&&(x.plot=!0);var mr=u.shapes;for(i=0;i1;)if(i.pop(),void 0!==(n=c(e,i.join(".")+".uirevision").get()))return n;return e.uirevision}function ir(r,e){for(var n=0;n=a.length?a[0]:a[r]:a}function u(r){return Array.isArray(t)?r>=t.length?t[0]:t[r]:t}function d(r,e){var n=0;return function(){if(r&&++n===e)return r()}}return void 0===i._frameWaitingCnt&&(i._frameWaitingCnt=0),new Promise((function(t,s){function l(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var e=i._currentFrame=i._frameQueue.shift();if(e){var n=e.name?e.name.toString():null;r._fullLayout._currentFrame=n,i._lastFrameAt=Date.now(),i._timeToNext=e.frameOpts.duration,m.transition(r,e.frame.data,e.frame.layout,G.coerceTraceIndices(r,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),r.emit("plotly_animatingframe",{name:n,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else r.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}function p(){r.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null;var e=function(){i._animationRaf=window.requestAnimationFrame(e),Date.now()-i._lastFrameAt>i._timeToNext&&l()};e()}var I,y,f=0;function g(r){return Array.isArray(a)?f>=a.length?r.transitionOpts=a[f]:r.transitionOpts=a[0]:r.transitionOpts=a,f++,r}var _=[],h=void 0===e||null===e,v=Array.isArray(e);if(h||v||!o.isPlainObject(e)){if(h||-1!==["string","number"].indexOf(typeof e))for(I=0;I0&&C<_.length-1){var S=[];for(I=0;I<_.length;I++)y=_[I],("byname"!==_[I].type||I>C)&&S.push(y);_=S}}_.length>0?function(e){if(0!==e.length){for(var a=0;a=0;i--)if(o.isPlainObject(e[i])){var y=e[i].name,f=(s[y]||I[y]||{}).name,g=e[i].name,_=s[f]||I[f];f&&g&&"number"===typeof g&&_&&b<5&&(b++,o.warn('addFrames: overwriting frame "'+(s[f]||I[f]).name+'" with a frame whose name of type "number" also equates to "'+f+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===b&&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.")),I[y]={name:y},p.push({frame:m.supplyFrameDefaults(e[i]),index:n&&void 0!==n[i]&&null!==n[i]?n[i]:l+i})}p.sort((function(r,e){return r.index>e.index?-1:r.index=0;i--){if("number"===typeof(a=p[i].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;s[a.name="frame "+r._transitionData._counter++];);if(s[a.name]){for(t=0;t=0;n--)i=e[n],t.push({type:"delete",index:i}),c.unshift({type:"insert",index:i,value:a[i]});var u=m.modifyFrames,s=m.modifyFrames,l=[r,c],p=[r,t];return d&&d.add(r,u,l,s,p),m.modifyFrames(r,t)},e.addTraces=function r(n,i,a){n=o.getGraphDiv(n);var t,c,u=[],s=e.deleteTraces,l=r,m=[n,u],p=[n,i];for(function(r,e,n){var i,a;if(!Array.isArray(r.data))throw new Error("gd.data must be an array.");if("undefined"===typeof e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),i=0;i=0&&n=0&&n=t.length)return!1;if(2===r.dimensions){if(n++,e.length===n)return r;var o=e[n];if(!x(o))return!1;r=t[a][o]}else r=t[a]}else r=t}}return r}function x(r){return r===Math.round(r)&&r>=0}function P(){var r,e,n={};for(r in l(n,o),i.subplotsRegistry)if((e=i.subplotsRegistry[r]).layoutAttributes)if(Array.isArray(e.attr))for(var a=0;a=u.length)return!1;a=(n=(i.transformsRegistry[u[d].type]||{}).attributes)&&n[e[2]],c=3}else{var s=r._module;if(s||(s=(i.modules[r.type||t.type.dflt]||{})._module),!s)return!1;if(!(a=(n=s.attributes)&&n[o])){var l=s.basePlotModule;l&&l.attributes&&(a=l.attributes[o])}a||(a=t[o])}return v(a,e,c)},e.getLayoutValObject=function(r,e){var n=function(r,e){var n,a,t,c,u=r._basePlotModules;if(u){var d;for(n=0;n=a&&(n._input||{})._templateitemname;c&&(o=a);var u,d=e+"["+o+"]";function s(){u={},c&&(u[d]={},u[d][t]=c)}function l(r,e){c?i.nestedProperty(u[d],r).set(e):u[d+"."+r]=e}function m(){var r=u;return s(),r}return s(),{modifyBase:function(r,e){u[r]=e},modifyItem:l,getUpdateObj:m,applyUpdate:function(e,n){e&&l(e,n);var a=m();for(var t in a)i.nestedProperty(r,t).set(a[t])}}}},39172:function(r,e,n){"use strict";var i=n(33428),a=n(24040),t=n(7316),o=n(3400),c=n(72736),u=n(73696),d=n(76308),s=n(43616),l=n(81668),m=n(45460),p=n(54460),I=n(84284),y=n(71888),f=y.enforce,g=y.clean,_=n(19280).doAutoRange,h="start",v="middle",x="end";function P(r,e,n){for(var i=0;i=r[1]||a[1]<=r[0])&&t[0]e[0])return!0}return!1}function G(r){var n,a,c,u,l,y,f=r._fullLayout,g=f._size,_=g.p,h=p.list(r,"",!0);if(f._paperdiv.style({width:r._context.responsive&&f.autosize&&!r._context._hasZeroWidth&&!r.layout.width?"100%":f.width+"px",height:r._context.responsive&&f.autosize&&!r._context._hasZeroHeight&&!r.layout.height?"100%":f.height+"px"}).selectAll(".main-svg").call(s.setSize,f.width,f.height),r._context.setBackground(r,f.paper_bgcolor),e.drawMainTitle(r),m.manage(r),!f._has("cartesian"))return t.previousPromises(r);function v(r,e,n){var i=r._lw/2;return"x"===r._id.charAt(0)?e?"top"===n?e._offset-_-i:e._offset+e._length+_+i:g.t+g.h*(1-(r.position||0))+i%1:e?"right"===n?e._offset+e._length+_+i:e._offset-_-i:g.l+g.w*(r.position||0)+i%1}for(n=0;n.5?"t":"b",o=r._fullLayout.margin[t],c=0;return"paper"===e.yref?c=n+e.pad.t+e.pad.b:"container"===e.yref&&(c=function(r,e,n,i,a){var t=0;return"middle"===n&&(t+=a/2),"t"===r?("top"===n&&(t+=a),t+=i-e*i):("bottom"===n&&(t+=a),t+=e*i),t}(t,i,a,r._fullLayout.height,n)+e.pad.t+e.pad.b),c>o?c:0}(r,n,f);if(g>0){!function(r,e,n,i){var a="title.automargin",c=r._fullLayout.title,u=c.y>.5?"t":"b",d={x:c.x,y:c.y,t:0,b:0},s={};"paper"===c.yref&&function(r,e,n,i,a){var t="paper"===e.yref?r._fullLayout._size.h:r._fullLayout.height,c=o.isTopAnchor(e)?i:i-a,u="b"===n?t-c:c;return!(o.isTopAnchor(e)&&"t"===n||o.isBottomAnchor(e)&&"b"===n)&&uG?s.push({code:"unused",traceType:_,templateCount:P,dataCount:G}):G>P&&s.push({code:"reused",traceType:_,templateCount:P,dataCount:G})}}else s.push({code:"data"});if(function r(e,n){for(var i in e)if("_"!==i.charAt(0)){var t=e[i],o=y(e,i,n);a(t)?(Array.isArray(e)&&!1===t._template&&t.templateitemname&&s.push({code:"missing",path:o,templateitemname:t.templateitemname}),r(t,o)):Array.isArray(t)&&f(t)&&r(t,o)}}({data:p,layout:m},""),s.length)return s.map(g)}},67024:function(r,e,n){"use strict";var i=n(38248),a=n(36424),t=n(7316),o=n(3400),c=n(81792),u=n(37164),d=n(63268),s=n(25788).version,l={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],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}};r.exports=function(r,e){var n,m,p,I;function y(r){return!(r in e)||o.validate(e[r],l[r])}if(e=e||{},o.isPlainObject(r)?(n=r.data||[],m=r.layout||{},p=r.config||{},I={}):(r=o.getGraphDiv(r),n=o.extendDeep([],r.data),m=o.extendDeep({},r.layout),p=r._context,I=r._fullLayout||{}),!y("width")&&null!==e.width||!y("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!y("format"))throw new Error("Export format is not "+o.join2(l.format.values,", "," or ")+".");var f={};function g(r,n){return o.coerce(e,f,l,r,n)}var _=g("format"),h=g("width"),v=g("height"),x=g("scale"),P=g("setBackground"),G=g("imageDataOnly"),C=document.createElement("div");C.style.position="absolute",C.style.left="-5000px",document.body.appendChild(C);var S=o.extendFlat({},m);h?S.width=h:null===e.width&&i(I.width)&&(S.width=I.width),v?S.height=v:null===e.height&&i(I.height)&&(S.height=I.height);var A=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:P}),b=c.getRedrawFunc(C);function M(){return new Promise((function(r){setTimeout(r,c.getDelay(C._fullLayout))}))}function B(){return new Promise((function(r,e){var n=u(C,_,x),i=C._fullLayout.width,l=C._fullLayout.height;function m(){a.purge(C),document.body.removeChild(C)}if("full-json"===_){var p=t.graphJson(C,!1,"keepdata","object",!0,!0);return p.version=s,p=JSON.stringify(p),m(),r(G?p:c.encodeJSON(p))}if(m(),"svg"===_)return r(G?n:c.encodeSVG(n));var I=document.createElement("canvas");I.id=o.randstr(),d({format:_,width:i,height:l,scale:x,canvas:I,svg:n,promise:!0}).then(r).catch(e)}))}return new Promise((function(r,e){a.newPlot(C,n,S,A).then(b).then(M).then(B).then((function(e){r(function(r){return G?r.replace(c.IMAGE_URL_PREFIX,""):r}(e))})).catch((function(r){e(r)}))}))}},21480:function(r,e,n){"use strict";var i=n(3400),a=n(7316),t=n(73060),o=n(20556).dfltConfig,c=i.isPlainObject,u=Array.isArray,d=i.isArrayOrTypedArray;function s(r,e,n,a,t,o){o=o||[];for(var l=Object.keys(r),m=0;mh.length&&a.push(p("unused",t,g.concat(h.length)));var S,A,b,M,B,k=h.length,F=Array.isArray(C);if(F&&(k=Math.min(k,C.length)),2===v.dimensions)for(A=0;Ah[A].length&&a.push(p("unused",t,g.concat(A,h[A].length)));var z=h[A].length;for(S=0;S<(F?Math.min(z,C[A].length):z);S++)b=F?C[A][S]:C,M=_[A][S],B=h[A][S],i.validate(M,b)?B!==M&&B!==+M&&a.push(p("dynamic",t,g.concat(A,S),M,B)):a.push(p("value",t,g.concat(A,S),M))}else a.push(p("array",t,g.concat(A),_[A]));else for(A=0;A1&&m.push(p("object","layout"))),a.supplyDefaults(I);for(var y=I._fullData,f=n.length,g=0;g0&&Math.round(l)===l))return{vals:a};d=l}for(var m=e.calendar,p="start"===u,I="end"===u,y=r[n+"period0"],f=t(y,m)||0,g=[],_=[],h=[],v=a.length,x=0;xS;)C=o(C,-d,m);for(;C<=S;)C=o(C,d,m);G=o(C,-d,m)}else{for(C=f+(P=Math.round((S-f)/s))*s;C>S;)C-=s;for(;C<=S;)C+=s;G=C-s}g[x]=p?G:I?C:(G+C)/2,_[x]=G,h[x]=C}return{vals:g,starts:_,ends:h}}},26720:function(r){"use strict";r.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(r,e,n){"use strict";var i=n(33428),a=n(38248),t=n(3400),o=n(39032).FP_SAFE,c=n(24040),u=n(43616),d=n(79811),s=d.getFromId,l=d.isLinked;function m(r,e){var n,i,a=[],o=r._fullLayout,c=I(o,e,0),u=I(o,e,1),d=f(r,e),s=d.min,l=d.max;if(0===s.length||0===l.length)return t.simpleMap(e.range,e.r2l);var m=s[0].val,y=l[0].val;for(n=1;n0&&((S=k-c(v)-u(x))>F?A/S>z&&(P=v,G=x,z=A/S):A/k>z&&(P={val:v.val,nopad:1},G={val:x.val,nopad:1},z=A/k));if(m===y){var w=m-1,R=m+1;if(M)if(0===m)a=[0,1];else{var E=(m>0?l:s).reduce((function(r,e){return Math.max(r,u(e))}),0),N=m/(1-Math.min(.5,E/k));a=m>0?[0,N]:[N,0]}else a=B?[Math.max(0,w),Math.max(1,R)]:[w,R]}else M?(P.val>=0&&(P={val:0,nopad:1}),G.val<=0&&(G={val:0,nopad:1})):B&&(P.val-z*c(P)<0&&(P={val:0,nopad:1}),G.val<=0&&(G={val:1,nopad:1})),z=(G.val-P.val-p(e,v.val,x.val))/(k-c(P)-u(G)),a=[P.val-z*c(P),G.val+z*u(G)];return a=C(a,e),e.limitRange&&e.limitRange(),_&&a.reverse(),t.simpleMap(a,e.l2r||Number)}function p(r,e,n){var i=0;if(r.rangebreaks)for(var a=r.locateBreaks(e,n),t=0;t0?n.ppadplus:n.ppadminus)||n.ppad||0),b=S((r._m>0?n.ppadminus:n.ppadplus)||n.ppad||0),M=S(n.vpadplus||n.vpad),B=S(n.vpadminus||n.vpad);if(!G){if(m=1/0,p=-1/0,P)for(i=0;i0&&(m=t),t>p&&t-o&&(m=t),t>p&&t=z;i--)F(i);return{min:I,max:y,opts:n}},concatExtremes:f};var y=3;function f(r,e,n){var i,a,t,o=e._id,c=r._fullData,u=r._fullLayout,d=[],l=[];function m(r,e){for(i=0;i=n&&(d.extrapad||!o)){c=!1;break}a(e,d.val)&&d.pad<=n&&(o||!d.extrapad)&&(r.splice(u,1),u--)}if(c){var s=t&&0===e;r.push({val:e,pad:s?0:n,extrapad:!s&&o})}}function v(r){return a(r)&&Math.abs(r)=e}function G(r,e,n){return void 0===e||void 0===n||(e=r.d2l(e))<(n=r.d2l(n))}function C(r,e){if(!e||!e.autorangeoptions)return r;var n=r[0],i=r[1],a=e.autorangeoptions.include;if(void 0!==a){var o=e.d2l(n),c=e.d2l(i);t.isArrayOrTypedArray(a)||(a=[a]);for(var u=0;u=d&&(o=d,n=d),c<=d&&(c=d,i=d)}}return n=function(r,e){var n=e.autorangeoptions;return n&&void 0!==n.minallowed&&G(e,n.minallowed,n.maxallowed)?n.minallowed:n&&void 0!==n.clipmin&&G(e,n.clipmin,n.clipmax)?Math.max(r,e.d2l(n.clipmin)):r}(n,e),i=function(r,e){var n=e.autorangeoptions;return n&&void 0!==n.maxallowed&&G(e,n.minallowed,n.maxallowed)?n.maxallowed:n&&void 0!==n.clipmax&&G(e,n.clipmin,n.clipmax)?Math.min(r,e.d2l(n.clipmax)):r}(i,e),[n,i]}},76808:function(r){"use strict";r.exports=function(r,e,n){var i,a;if(n){var t="reversed"===e||"min reversed"===e||"max reversed"===e;i=n[t?1:0],a=n[t?0:1]}var o=r("autorangeoptions.minallowed",null===a?i:void 0),c=r("autorangeoptions.maxallowed",null===i?a:void 0);void 0===o&&r("autorangeoptions.clipmin"),void 0===c&&r("autorangeoptions.clipmax"),r("autorangeoptions.include")}},54460:function(r,e,n){"use strict";var i=n(33428),a=n(38248),t=n(7316),o=n(24040),c=n(3400),u=c.strTranslate,d=n(72736),s=n(81668),l=n(76308),m=n(43616),p=n(94724),I=n(98728),y=n(39032),f=y.ONEMAXYEAR,g=y.ONEAVGYEAR,_=y.ONEMINYEAR,h=y.ONEMAXQUARTER,v=y.ONEAVGQUARTER,x=y.ONEMINQUARTER,P=y.ONEMAXMONTH,G=y.ONEAVGMONTH,C=y.ONEMINMONTH,S=y.ONEWEEK,A=y.ONEDAY,b=A/2,M=y.ONEHOUR,B=y.ONEMIN,k=y.ONESEC,F=y.MINUS_SIGN,z=y.BADNUM,w={K:"zeroline"},R={K:"gridline",L:"path"},E={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},T={K:"tick",L:"text"},D={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},J=n(84284),U=J.MID_SHIFT,H=J.CAP_SHIFT,L=J.LINE_SPACING,O=J.OPPOSITE_SIDE,K=r.exports={};K.setConvert=n(78344);var V=n(52976),j=n(79811),W=j.idSort,Z=j.isLinked;K.id2name=j.id2name,K.name2id=j.name2id,K.cleanId=j.cleanId,K.list=j.list,K.listIds=j.listIds,K.getFromId=j.getFromId,K.getFromTrace=j.getFromTrace;var q=n(19280);K.getAutoRange=q.getAutoRange,K.findExtremes=q.findExtremes;var Y=1e-4;function X(r){var e=(r[1]-r[0])*Y;return[r[0]-e,r[1]+e]}K.coerceRef=function(r,e,n,i,a,t){var o=i.charAt(i.length-1),u=n._fullLayout._subplots[o+"axis"],d=i+"ref",s={};return a||(a=u[0]||("string"===typeof t?t:t[0])),t||(t=a),u=u.concat(u.map((function(r){return r+" domain"}))),s[d]={valType:"enumerated",values:u.concat(t?"string"===typeof t?[t]:t:[]),dflt:a},c.coerce(r,e,s,d)},K.getRefType=function(r){return void 0===r?r:"paper"===r?"paper":"pixel"===r?"pixel":/( domain)$/.test(r)?"domain":"range"},K.coercePosition=function(r,e,n,i,a,t){var o,u;if("range"!==K.getRefType(i))o=c.ensureNumber,u=n(a,t);else{var d=K.getFromId(e,i);u=n(a,t=d.fraction2r(t)),o=d.cleanPos}r[a]=o(u)},K.cleanPosition=function(r,e,n){return("paper"===n||"pixel"===n?c.ensureNumber:K.getFromId(e,n).cleanPos)(r)},K.redrawComponents=function(r,e){e=e||K.listIds(r);var n=r._fullLayout;function i(i,a,t,c){for(var u=o.getComponentMethod(i,a),d={},s=0;si&&m2e-6||((n-r._forceTick0)/r._minDtick%1+1.000001)%1>2e-6)&&(r._minDtick=0)):r._minDtick=0},K.saveRangeInitial=function(r,e){for(var n=K.list(r,"",!0),i=!1,a=0;a.3*m||s(i)||s(t))){var p=n.dtick/2;r+=r+po){var u=Number(n.substr(1));t.exactYears>o&&u%12===0?r=K.tickIncrement(r,"M6","reverse")+1.5*A:t.exactMonths>o?r=K.tickIncrement(r,"M1","reverse")+15.5*A:r-=b;var d=K.tickIncrement(r,n);if(d<=i)return d}return r}(_,r,g,d,t)),f=_;f<=s;)f=K.tickIncrement(f,g,!1,t);return{start:e.c2r(_,0,t),end:e.c2r(f,0,t),size:g,_dataSpan:s-d}},K.prepMinorTicks=function(r,e,n){if(!e.minor.dtick){delete r.dtick;var i,t=e.dtick&&a(e._tmin);if(t){var o=K.tickIncrement(e._tmin,e.dtick,!0);i=[e._tmin,.99*o+.01*e._tmin]}else{var u=c.simpleMap(e.range,e.r2l);i=[u[0],.8*u[0]+.2*u[1]]}if(r.range=c.simpleMap(i,e.l2r),r._isMinor=!0,K.prepTicks(r,n),t){var d=a(e.dtick),s=a(r.dtick),l=d?e.dtick:+e.dtick.substring(1),m=s?r.dtick:+r.dtick.substring(1);d&&s?er(l,m)?l===2*S&&m===2*A&&(r.dtick=S):l===2*S&&m===3*A?r.dtick=S:l!==S||(e._input.minor||{}).nticks?nr(l/m,2.5)?r.dtick=l/2:r.dtick=l:r.dtick=A:"M"===String(e.dtick).charAt(0)?s?r.dtick="M1":er(l,m)?l>=12&&2===m&&(r.dtick="M3"):r.dtick=e.dtick:"L"===String(r.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?er(l,m)||(r.dtick=nr(l/m,2.5)?e.dtick/2:e.dtick):r.dtick="D1":"D2"===r.dtick&&+e.dtick>1&&(r.dtick=1)}r.range=e.range}void 0===e.minor._tick0Init&&(r.tick0=e.tick0)},K.prepTicks=function(r,e){var n=c.simpleMap(r.range,r.r2l,void 0,void 0,e);if("auto"===r.tickmode||!r.dtick){var i,t=r.nticks;t||("category"===r.type||"multicategory"===r.type?(i=r.tickfont?c.bigFont(r.tickfont.size||12):15,t=r._length/i):(i="y"===r._id.charAt(0)?40:80,t=c.constrain(r._length/i,4,9)+1),"radialaxis"===r._name&&(t*=2)),r.minor&&"array"!==r.minor.tickmode||"array"===r.tickmode&&(t*=100),r._roughDTick=Math.abs(n[1]-n[0])/t,K.autoTicks(r,r._roughDTick),r._minDtick>0&&r.dtick<2*r._minDtick&&(r.dtick=r._minDtick,r.tick0=r.l2r(r._forceTick0))}"period"===r.ticklabelmode&&function(r){var e;function n(){return!(a(r.dtick)||"M"!==r.dtick.charAt(0))}var i=n(),t=K.getTickFormat(r);if(t){var o=r._dtickInit!==r.dtick;/%[fLQsSMX]/.test(t)||(/%[HI]/.test(t)?(e=M,o&&!i&&r.dtick=(w?0:1);R--){var E=!R;R?(r._dtickInit=r.dtick,r._tick0Init=r.tick0):(r.minor._dtickInit=r.minor.dtick,r.minor._tick0Init=r.minor.tick0);var N=R?r:c.extendFlat({},r,r.minor);if(E?K.prepMinorTicks(N,r,e):K.prepTicks(N,e),"array"!==N.tickmode)if("sync"!==N.tickmode){var T=X(s),D=T[0],J=T[1],U=a(N.dtick),H="log"===t&&!(U||"L"===N.dtick.charAt(0)),L=K.tickFirst(N,e);if(R){if(r._tmin=L,L=J:W<=J;W=K.tickIncrement(W,Z,l,o)){if(R&&O++,N.rangebreaks&&!l){if(W=p)break}if(k.length>I||W===j)break;j=W;var q={value:W};R?(H&&W!==(0|W)&&(q.simpleLabel=!0),u>1&&O%u&&(q.skipLabel=!0),k.push(q)):(q.minor=!0,F.push(q))}}else k=[],y=tr(r);else R?(k=[],y=or(r,!E)):(F=[],B=or(r,!E))}if(w&&!("inside"===r.minor.ticks&&"outside"===r.ticks||"outside"===r.minor.ticks&&"inside"===r.ticks)){for(var Y=k.map((function(r){return r.value})),Q=[],$=0;$0?(t=i-1,o=i):(t=i,o=i);var c,u=r[t].value,d=r[o].value,s=Math.abs(d-u),l=n||s,m=0;l>=_?m=s>=_&&s<=f?s:g:n===v&&l>=x?m=s>=x&&s<=h?s:v:l>=C?m=s>=C&&s<=P?s:G:n===S&&l>=S?m=S:l>=A?m=A:n===b&&l>=b?m=b:n===M&&l>=M&&(m=M),m>=s&&(m=s,c=!0);var p=a+m;if(e.rangebreaks&&m>0){for(var I=0,y=0;y<84;y++){var B=(y+.5)/84;e.maskBreaks(a*(1-B)+B*p)!==z&&I++}(m*=I/84)||(r[i].drop=!0),c&&s>S&&(m=s)}(m>0||0===i)&&(r[i].periodX=a+m/2)}}(k,r,r._definedDelta),r.rangebreaks){var ar="y"===r._id.charAt(0),cr=1;"auto"===r.tickmode&&(cr=r.tickfont?r.tickfont.size:12);var ur=NaN;for(n=k.length-1;n>-1;n--)if(k[n].drop)k.splice(n,1);else{k[n].value=Er(k[n].value,r);var dr=r.c2p(k[n].value);(ar?ur>dr-cr:urp||lrp&&(sr.periodX=p),lr10||"01-01"!==i.substr(5)?r._tickround="d":r._tickround=+e.substr(1)%12===0?"y":"m";else if(e>=A&&t<=10||e>=15*A)r._tickround="d";else if(e>=B&&t<=16||e>=M)r._tickround="M";else if(e>=k&&t<=19||e>=B)r._tickround="S";else{var o=r.l2r(n+e).replace(/^-/,"").length;r._tickround=Math.max(t,o)-20,r._tickround<0&&(r._tickround=4)}}else if(a(e)||"L"===e.charAt(0)){var c=r.range.map(r.r2d||Number);a(e)||(e=Number(e.substr(1))),r._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var u=Math.max(Math.abs(c[0]),Math.abs(c[1])),d=Math.floor(Math.log(u)/Math.LN10+.01),s=void 0===r.minexponent?3:r.minexponent;Math.abs(d)>s&&(_r(r.exponentformat)&&!hr(d)?r._tickexponent=3*Math.round((d-1)/3):r._tickexponent=d)}else r._tickround=null}function fr(r,e,n){var i=r.tickfont||{};return{x:e,dx:0,dy:0,text:n||"",fontSize:i.size,font:i.family,fontWeight:i.weight,fontStyle:i.style,fontVariant:i.variant,fontTextcase:i.textcase,fontLineposition:i.lineposition,fontShadow:i.shadow,fontColor:i.color}}K.autoTicks=function(r,e,n){var i;function t(r){return Math.pow(r,Math.floor(Math.log(e)/Math.LN10))}if("date"===r.type){r.tick0=c.dateTick0(r.calendar,0);var o=2*e;if(o>g)e/=g,i=t(10),r.dtick="M"+12*Ir(e,i,cr);else if(o>G)e/=G,r.dtick="M"+Ir(e,1,ur);else if(o>A){if(r.dtick=Ir(e,A,r._hasDayOfWeekBreaks?[1,2,7,14]:sr),!n){var u=K.getTickFormat(r),d="period"===r.ticklabelmode;d&&(r._rawTick0=r.tick0),/%[uVW]/.test(u)?r.tick0=c.dateTick0(r.calendar,2):r.tick0=c.dateTick0(r.calendar,1),d&&(r._dowTick0=r.tick0)}}else o>M?r.dtick=Ir(e,M,ur):o>B?r.dtick=Ir(e,B,dr):o>k?r.dtick=Ir(e,k,dr):(i=t(10),r.dtick=Ir(e,i,cr))}else if("log"===r.type){r.tick0=0;var s=c.simpleMap(r.range,r.r2l);if(r._isMinor&&(e*=1.5),e>.7)r.dtick=Math.ceil(e);else if(Math.abs(s[1]-s[0])<1){var l=1.5*Math.abs((s[1]-s[0])/e);e=Math.abs(Math.pow(10,s[1])-Math.pow(10,s[0]))/l,i=t(10),r.dtick="L"+Ir(e,i,cr)}else r.dtick=e>.3?"D2":"D1"}else"category"===r.type||"multicategory"===r.type?(r.tick0=0,r.dtick=Math.ceil(Math.max(e,1))):Rr(r)?(r.tick0=0,i=1,r.dtick=Ir(e,i,pr)):(r.tick0=0,i=t(10),r.dtick=Ir(e,i,cr));if(0===r.dtick&&(r.dtick=1),!a(r.dtick)&&"string"!==typeof r.dtick){var m=r.dtick;throw r.dtick=1,"ax.dtick error: "+String(m)}},K.tickIncrement=function(r,e,n,t){var o=n?-1:1;if(a(e))return c.increment(r,o*e);var u=e.charAt(0),d=o*Number(e.substr(1));if("M"===u)return c.incrementMonth(r,d,t);if("L"===u)return Math.log(Math.pow(10,r)+d)/Math.LN10;if("D"===u){var s="D2"===e?mr:lr,l=r+.01*o,m=c.roundUp(c.mod(l,1),s,n);return Math.floor(l)+Math.log(i.round(Math.pow(10,m),1))/Math.LN10}throw"unrecognized dtick "+String(e)},K.tickFirst=function(r,e){var n=r.r2l||Number,t=c.simpleMap(r.range,n,void 0,void 0,e),o=t[1]=0&&n<=r._length?e:null};if(u&&c.isArrayOrTypedArray(r.ticktext)){var p=c.simpleMap(r.range,r.r2l),I=(Math.abs(p[1]-p[0])-(r._lBreaks||0))/1e4;for(t=0;t ")}else r._prevDateHead=u,d+="
"+u;e.text=d}(r,o,n,d):"log"===s?function(r,e,n,i,t){var o=r.dtick,u=e.x,d=r.tickformat,s="string"===typeof o&&o.charAt(0);if("never"===t&&(t=""),i&&"L"!==s&&(o="L3",s="L"),d||"L"===s)e.text=vr(Math.pow(10,u),r,t,i);else if(a(o)||"D"===s&&c.mod(u+.01,1)<.1){var l=Math.round(u),m=Math.abs(l),p=r.exponentformat;"power"===p||_r(p)&&hr(l)?(e.text=0===l?1:1===l?"10":"10"+(l>1?"":F)+m+"",e.fontSize*=1.25):("e"===p||"E"===p)&&m>2?e.text="1"+p+(l>0?"+":F)+m:(e.text=vr(Math.pow(10,u),r,"","fakehover"),"D1"===o&&"y"===r._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==s)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,c.mod(u,1)))),e.fontSize*=.75}if("D1"===r.dtick){var I=String(e.text).charAt(0);"0"!==I&&"1"!==I||("y"===r._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(r.range[1]>r.range[0]?1:-1)*e.fontSize*(u<0?.5:.25)))}}(r,o,0,d,f):"category"===s?function(r,e){var n=r._categories[Math.round(e.x)];void 0===n&&(n=""),e.text=String(n)}(r,o):"multicategory"===s?function(r,e,n){var i=Math.round(e.x),a=r._categories[i]||[],t=void 0===a[1]?"":String(a[1]),o=void 0===a[0]?"":String(a[0]);n?e.text=o+" - "+t:(e.text=t,e.text2=o)}(r,o,n):Rr(r)?function(r,e,n,i,a){if("radians"!==r.thetaunit||n)e.text=vr(e.x,r,a,i);else{var t=e.x/180;if(0===t)e.text="0";else{var o=function(r){function e(r,e){return Math.abs(r-e)<=1e-6}function n(r,i){return e(i,0)?r:n(i,r%i)}function i(r){for(var n=1;!e(Math.round(r*n)/n,r);)n*=10;return n}var a=i(r),t=r*a,o=Math.abs(n(t,a));return[Math.round(t/o),Math.round(a/o)]}(t);if(o[1]>=100)e.text=vr(c.deg2rad(e.x),r,a,i);else{var u=e.x<0;1===o[1]?1===o[0]?e.text="\u03c0":e.text=o[0]+"\u03c0":e.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),u&&(e.text=F+e.text)}}}}(r,o,n,d,f):function(r,e,n,i,a){"never"===a?a="":"all"===r.showexponent&&Math.abs(e.x/r.dtick)<1e-6&&(a="hide"),e.text=vr(e.x,r,a,i)}(r,o,0,d,f),i||(r.tickprefix&&!y(r.showtickprefix)&&(o.text=r.tickprefix+o.text),r.ticksuffix&&!y(r.showticksuffix)&&(o.text+=r.ticksuffix)),r.labelalias&&r.labelalias.hasOwnProperty(o.text)){var g=r.labelalias[o.text];"string"===typeof g&&(o.text=g)}return("boundaries"===r.tickson||r.showdividers)&&(o.xbnd=[m(o.x-.5),m(o.x+r.dtick-.5)]),o},K.hoverLabelText=function(r,e,n){n&&(r=c.extendFlat({},r,{hoverformat:n}));var i=c.isArrayOrTypedArray(e)?e[0]:e,a=c.isArrayOrTypedArray(e)?e[1]:void 0;if(void 0!==a&&a!==i)return K.hoverLabelText(r,i,n)+" - "+K.hoverLabelText(r,a,n);var t="log"===r.type&&i<=0,o=K.tickText(r,r.c2l(t?-i:i),"hover").text;return t?0===i?"0":F+o:o};var gr=["f","p","n","\u03bc","m","","k","M","G","T"];function _r(r){return"SI"===r||"B"===r}function hr(r){return r>14||r<-15}function vr(r,e,n,i){var t=r<0,o=e._tickround,u=n||e.exponentformat||"B",d=e._tickexponent,s=K.getTickFormat(e),l=e.separatethousands;if(i){var m={exponentformat:u,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:a(r)&&Math.abs(r)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,r||1]};yr(m),o=(Number(m._tickround)||0)+4,d=m._tickexponent,e.hoverformat&&(s=e.hoverformat)}if(s)return e._numFormat(s)(r).replace(/-/g,F);var p,I=Math.pow(10,-o)/2;if("none"===u&&(d=0),(r=Math.abs(r))"+p+"":"B"===u&&9===d?r+="B":_r(u)&&(r+=gr[d/3+5])),t?F+r:r}function xr(r,e){if(r){var n=Object.keys(D).reduce((function(r,n){return-1!==e.indexOf(n)&&D[n].forEach((function(e){r[e]=1})),r}),{});Object.keys(r).forEach((function(e){n[e]||(1===e.length?r[e]=0:delete r[e])}))}}function Pr(r,e){for(var n=[],i={},a=0;a1&&n=a.min&&r=i(r))}function c(r,e){var n=null===e[0],i=null===e[1],a=t(r,e[0])>=0,o=t(r,e[1])<=0;return(n||a)&&(i||o)}if(r.tickformatstops&&r.tickformatstops.length>0)switch(r.type){case"date":case"linear":for(e=0;e=0&&a.unshift(a.splice(i,1).shift())}}));var o={false:{left:0,right:0}};return c.syncOrAsync(a.map((function(e){return function(){if(e){var i=K.getFromId(r,e);n||(n={}),n.axShifts=o,n.overlayingShiftedAx=t;var a=K.drawOne(r,i,n);return i._shiftPusher&&Dr(i,i._fullDepth||0,o,!0),i._r=i.range.slice(),i._rl=c.simpleMap(i._r,i.r2l),a}}})))},K.drawOne=function(r,e,n){var i,a,u,p=(n=n||{}).axShifts||{},I=n.overlayingShiftedAx||[];e.setScale();var y=r._fullLayout,f=e._id,g=f.charAt(0),_=K.counterLetter(f),h=y._plots[e._mainSubplot];if(h){if(e._shiftPusher=e.autoshift||-1!==I.indexOf(e._id)||-1!==I.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var v=e.linewidth/2||0;"inside"===e.ticks&&(v+=e.ticklen),Dr(e,v,p,!0),Dr(e,e.shift||0,p,!1)}!0===n.skipTitle&&void 0!==e._shift||(e._shift=function(r,e){return r.autoshift?e[r.overlaying][r.side]:r.shift||0}(e,p));var x=h[g+"axislayer"],P=e._mainLinePosition,G=P+=e._shift,C=e._mainMirrorPosition,S=e._vals=K.calcTicks(e),A=[e.mirror,G,C].join("_");for(i=0;i0?n.bottom-s:0,l))));var m=0,p=0;if(e._shiftPusher&&(m=Math.max(l,n.height>0?"l"===u?s-n.left:n.right-s:0),e.title.text!==y._dfltTitle[g]&&(p=(e._titleStandoff||0)+(e._titleScoot||0),"l"===u&&(p+=Sr(e))),e._fullDepth=Math.max(m,p)),e.automargin){i={x:0,y:0,r:0,l:0,t:0,b:0};var I=[0,1],f="number"===typeof e._shift?e._shift:0;if("x"===g){if("b"===u?i[u]=e._depth:(i[u]=e._depth=Math.max(n.width>0?s-n.top:0,l),I.reverse()),n.width>0){var h=n.right-(e._offset+e._length);h>0&&(i.xr=1,i.r=h);var v=e._offset-n.left;v>0&&(i.xl=0,i.l=v)}}else if("l"===u?(e._depth=Math.max(n.height>0?s-n.left:0,l),i[u]=e._depth-f):(e._depth=Math.max(n.height>0?n.right-s:0,l),i[u]=e._depth+f,I.reverse()),n.height>0){var x=n.bottom-(e._offset+e._length);x>0&&(i.yb=0,i.b=x);var P=e._offset-n.top;P>0&&(i.yt=1,i.t=P)}i[_]="free"===e.anchor?e.position:e._anchorAxis.domain[I[0]],e.title.text!==y._dfltTitle[g]&&(i[u]+=Sr(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((a={x:0,y:0,r:0,l:0,t:0,b:0})[d]=e.linewidth,e.mirror&&!0!==e.mirror&&(a[d]+=l),!0===e.mirror||"ticks"===e.mirror?a[_]=e._anchorAxis.domain[I[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(a[_]=[e._counterDomainMin,e._counterDomainMax][I[1]]))}lr&&(c=o.getComponentMethod("rangeslider","autoMarginOpts")(r,e)),"string"===typeof e.automargin&&(xr(i,e.automargin),xr(a,e.automargin)),t.autoMargin(r,Mr(e),i),t.autoMargin(r,Br(e),a),t.autoMargin(r,kr(e),c)})),c.syncOrAsync(dr)}}function mr(r){var n=f+(r||"tick");return b[n]||(b[n]=function(r,e,n){var i,a,t,o;if(r._selections[e].size())i=1/0,a=-1/0,t=1/0,o=-1/0,r._selections[e].each((function(){var r=br(this),e=m.bBox(r.node().parentNode);i=Math.min(i,e.top),a=Math.max(a,e.bottom),t=Math.min(t,e.left),o=Math.max(o,e.right)}));else{var c=K.makeLabelFns(r,n);i=a=c.yFn({dx:0,dy:0,fontSize:0}),t=o=c.xFn({dx:0,dy:0,fontSize:0})}return{top:i,bottom:a,left:t,right:o,height:a-i,width:o-t}}(e,n,G)),b[n]}},K.getTickSigns=function(r,e){var n=r._id.charAt(0),i={x:"top",y:"right"}[n],a=r.side===i?1:-1,t=[-1,1,a,-a];return"inside"!==(e?(r.minor||{}).ticks:r.ticks)===("x"===n)&&(t=t.map((function(r){return-r}))),r.side&&t.push({l:-1,t:-1,r:1,b:1}[r.side.charAt(0)]),t},K.makeTransTickFn=function(r){return"x"===r._id.charAt(0)?function(e){return u(r._offset+r.l2p(e.x),0)}:function(e){return u(0,r._offset+r.l2p(e.x))}},K.makeTransTickLabelFn=function(r){var e=function(r){var e=r.ticklabelposition||"",n=function(r){return-1!==e.indexOf(r)},i=n("top"),a=n("left"),t=n("right"),o=n("bottom"),c=n("inside"),u=o||a||i||t;if(!u&&!c)return[0,0];var d=r.side,s=u?(r.tickwidth||0)/2:0,l=3,m=r.tickfont?r.tickfont.size:12;return(o||i)&&(s+=m*H,l+=(r.linewidth||0)/2),(a||t)&&(s+=(r.linewidth||0)/2,l+=3),c&&"top"===d&&(l-=m*(1-H)),(a||i)&&(s=-s),"bottom"!==d&&"right"!==d||(l=-l),[u?s:0,c?l:0]}(r),n=e[0],i=e[1];return"x"===r._id.charAt(0)?function(e){return u(n+r._offset+r.l2p(Gr(e)),i)}:function(e){return u(i,n+r._offset+r.l2p(Gr(e)))}},K.makeTickPath=function(r,e,n,i){i||(i={});var a=i.minor;if(a&&!r.minor)return"";var t=void 0!==i.len?i.len:a?r.minor.ticklen:r.ticklen,o=r._id.charAt(0),c=(r.linewidth||1)/2;return"x"===o?"M0,"+(e+c*n)+"v"+t*n:"M"+(e+c*n)+",0h"+t*n},K.makeLabelFns=function(r,e,n){var i=r.ticklabelposition||"",t=function(r){return-1!==i.indexOf(r)},o=t("top"),u=t("left"),d=t("right"),s=t("bottom")||u||o||d,l=t("inside"),m="inside"===i&&"inside"===r.ticks||!l&&"outside"===r.ticks&&"boundaries"!==r.tickson,p=0,I=0,y=m?r.ticklen:0;if(l?y*=-1:s&&(y=0),m&&(p+=y,n)){var f=c.deg2rad(n);p=y*Math.cos(f)+1,I=y*Math.sin(f)}r.showticklabels&&(m||r.showline)&&(p+=.2*r.tickfont.size);var g,_,h,v,x,P={labelStandoff:p+=(r.linewidth||1)/2*(l?-1:1),labelShift:I},G=0,C=r.side,S=r._id.charAt(0),A=r.tickangle;if("x"===S)v=(x=!l&&"bottom"===C||l&&"top"===C)?1:-1,l&&(v*=-1),g=I*v,_=e+p*v,h=x?1:-.2,90===Math.abs(A)&&(l?h+=U:h=-90===A&&"bottom"===C?H:90===A&&"top"===C?U:.5,G=U/2*(A/90)),P.xFn=function(r){return r.dx+g+G*r.fontSize},P.yFn=function(r){return r.dy+_+r.fontSize*h},P.anchorFn=function(r,e){if(s){if(u)return"end";if(d)return"start"}return a(e)&&0!==e&&180!==e?e*v<0!==l?"end":"start":"middle"},P.heightFn=function(e,n,i){return n<-60||n>60?-.5*i:"top"===r.side!==l?-i:0};else if("y"===S){if(v=(x=!l&&"left"===C||l&&"right"===C)?1:-1,l&&(v*=-1),g=p,_=I*v,h=0,l||90!==Math.abs(A)||(h=-90===A&&"left"===C||90===A&&"right"===C?H:.5),l){var b=a(A)?+A:0;if(0!==b){var M=c.deg2rad(b);G=Math.abs(Math.sin(M))*H*v,h=0}}P.xFn=function(r){return r.dx+e-(g+r.fontSize*h)*v+G*r.fontSize},P.yFn=function(r){return r.dy+_+r.fontSize*U},P.anchorFn=function(r,e){return a(e)&&90===Math.abs(e)?"middle":x?"end":"start"},P.heightFn=function(e,n,i){return"right"===r.side&&(n*=-1),n<-30?-i:n<30?-.5*i:0}}return P},K.drawTicks=function(r,e,n){n=n||{};var a=e._id+"tick",t=[].concat(e.minor&&e.minor.ticks?n.vals.filter((function(r){return r.minor&&!r.noTick})):[]).concat(e.ticks?n.vals.filter((function(r){return!r.minor&&!r.noTick})):[]),o=n.layer.selectAll("path."+a).data(t,Cr);o.exit().remove(),o.enter().append("path").classed(a,1).classed("ticks",1).classed("crisp",!1!==n.crisp).each((function(r){return l.stroke(i.select(this),r.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(n){return m.crispRound(r,n.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",n.path).style("display",null),Tr(e,[N]),o.attr("transform",n.transFn)},K.drawGrid=function(r,e,n){if(n=n||{},"sync"!==e.tickmode){var a=e._id+"grid",t=e.minor&&e.minor.showgrid,o=t?n.vals.filter((function(r){return r.minor})):[],c=e.showgrid?n.vals.filter((function(r){return!r.minor})):[],u=n.counterAxis;if(u&&K.shouldShowZeroLine(r,e,u))for(var d="array"===e.tickmode,s=0;s=0;g--){var _=g?y:f;if(_){var h=_.selectAll("path."+a).data(g?c:o,Cr);h.exit().remove(),h.enter().append("path").classed(a,1).classed("crisp",!1!==n.crisp),h.attr("transform",n.transFn).attr("d",n.path).each((function(r){return l.stroke(i.select(this),r.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(r){return m.dashStyle(r.minor?e.minor.griddash:e.griddash,r.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(r){return(r.minor?I:e._gw)+"px"})).style("display",null),"function"===typeof n.path&&h.attr("d",n.path)}}Tr(e,[R,E])}},K.drawZeroLine=function(r,e,n){n=n||n;var i=e._id+"zl",a=K.shouldShowZeroLine(r,e,n.counterAxis),t=n.layer.selectAll("path."+i).data(a?[{x:0,id:e._id}]:[]);t.exit().remove(),t.enter().append("path").classed(i,1).classed("zl",1).classed("crisp",!1!==n.crisp).each((function(){n.layer.selectAll("path").sort((function(r,e){return W(r.id,e.id)}))})),t.attr("transform",n.transFn).attr("d",n.path).call(l.stroke,e.zerolinecolor||l.defaultLine).style("stroke-width",m.crispRound(r,e.zerolinewidth,e._gw||1)+"px").style("display",null),Tr(e,[w])},K.drawLabels=function(r,e,n){n=n||{};var t=r._fullLayout,o=e._id,s=n.cls||o+"tick",l=n.vals.filter((function(r){return r.text})),p=n.labelFns,I=n.secondary?0:e.tickangle,y=(e._prevTickAngles||{})[s],f=n.layer.selectAll("g."+s).data(e.showticklabels?l:[],Cr),g=[];function _(r,t){r.each((function(r){var o=i.select(this),c=o.select(".text-math-group"),s=p.anchorFn(r,t),l=n.transFn.call(o.node(),r)+(a(t)&&0!==+t?" rotate("+t+","+p.xFn(r)+","+(p.yFn(r)-r.fontSize/2)+")":""),I=d.lineCount(o),y=L*r.fontSize,f=p.heightFn(r,a(t)?+t:0,(I-1)*y);if(f&&(l+=u(0,f)),c.empty()){var g=o.select("text");g.attr({transform:l,"text-anchor":s}),g.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var _=m.bBox(c.node()).width*{end:-.5,start:.5}[s];c.attr("transform",l+u(_,0))}}))}f.enter().append("g").classed(s,1).append("text").attr("text-anchor","middle").each((function(e){var n=i.select(this),a=r._promises.length;n.call(d.positionText,p.xFn(e),p.yFn(e)).call(m.font,{family:e.font,size:e.fontSize,color:e.fontColor,weight:e.fontWeight,style:e.fontStyle,variant:e.fontVariant,textcase:e.fontTextcase,lineposition:e.fontLineposition,shadow:e.fontShadow}).text(e.text).call(d.convertToTspans,r),r._promises[a]?g.push(r._promises.pop().then((function(){_(n,I)}))):_(n,I)})),Tr(e,[T]),f.exit().remove(),n.repositionOnUpdate&&f.each((function(r){i.select(this).select("text").call(d.positionText,p.xFn(r),p.yFn(r))})),e._adjustTickLabelsOverflow=function(){var n=e.ticklabeloverflow;if(n&&"allow"!==n){var a=-1!==n.indexOf("hide"),o="x"===e._id.charAt(0),u=0,d=o?r._fullLayout.width:r._fullLayout.height;if(-1!==n.indexOf("domain")){var s=c.simpleMap(e.range,e.r2l);u=e.l2p(s[0])+e._offset,d=e.l2p(s[1])+e._offset}var l=Math.min(u,d),p=Math.max(u,d),I=e.side,y=1/0,g=-1/0;for(var _ in f.each((function(r){var n=i.select(this);if(n.select(".text-math-group").empty()){var t=m.bBox(n.node()),c=0;o?(t.right>p||t.leftp||t.top+(e.tickangle?0:r.fontSize/4)e["_visibleLabelMin_"+n._id]?u.style("display","none"):"tick"!==r.K||a||u.style("display",null)}))}))}))}))},_(f,y+1?y:I);var h=null;e._selections&&(e._selections[s]=f);var v=[function(){return g.length&&Promise.all(g)}];e.automargin&&t._redrawFromAutoMarginCount&&90===y?(h=y,v.push((function(){_(f,y)}))):v.push((function(){if(_(f,I),l.length&&e.autotickangles&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){h=e.autotickangles[0];var r,i=0,a=[],t=1;f.each((function(r){i=Math.max(i,r.fontSize);var n=e.l2p(r.x),o=br(this),c=m.bBox(o.node());t=Math.max(t,d.lineCount(o)),a.push({top:0,bottom:10,height:10,left:n-c.width/2,right:n+c.width/2+2,width:c.width+2})}));var o=("boundaries"===e.tickson||e.showdividers)&&!n.secondary,u=l.length,s=Math.abs((l[u-1].x-l[0].x)*e._m)/(u-1),p=o?s/2:s,y=o?e.ticklen:1.25*i*t,g=p/Math.sqrt(Math.pow(p,2)+Math.pow(y,2)),v=e.autotickangles.map((function(r){return r*Math.PI/180})),x=v.find((function(r){return Math.abs(Math.cos(r))<=g}));void 0===x&&(x=v.reduce((function(r,e){return Math.abs(Math.cos(r))U*J&&(F=J,M[b]=B[b]=z[b])}var H=Math.abs(F-k);H-C>0?C*=1+C/(H-=C):C=0,"y"!==e._id.charAt(0)&&(C=-C),M[A]=P.p2r(P.r2p(B[A])+S*C),"min"===P.autorange||"max reversed"===P.autorange?(M[0]=null,P._rangeInitial0=void 0,P._rangeInitial1=void 0):"max"!==P.autorange&&"min reversed"!==P.autorange||(M[1]=null,P._rangeInitial0=void 0,P._rangeInitial1=void 0),t._insideTickLabelsUpdaterange[P._name+".range"]=M}var O=c.syncOrAsync(v);return O&&O.then&&r._promises.push(O),O},K.getPxPosition=function(r,e){var n,i=r._fullLayout._size,a=e._id.charAt(0),t=e.side;return"free"!==e.anchor?n=e._anchorAxis:"x"===a?n={_offset:i.t+(1-(e.position||0))*i.h,_length:0}:"y"===a&&(n={_offset:i.l+(e.position||0)*i.w+e._shift,_length:0}),"top"===t||"left"===t?n._offset:"bottom"===t||"right"===t?n._offset+n._length:void 0},K.shouldShowZeroLine=function(r,e,n){var i=c.simpleMap(e.range,e.r2l);return i[0]*i[1]<=0&&e.zeroline&&("linear"===e.type||"-"===e.type)&&!(e.rangebreaks&&e.maskBreaks(0)===z)&&(Ar(e,0)||!function(r,e,n,i){var a=n._mainAxis;if(a){var t=r._fullLayout,o=e._id.charAt(0),c=K.counterLetter(e._id),u=e._offset+(Math.abs(i[0])1)for(i=1;i2*o}(a,e))return"date";var f="strict"!==n.autotypenumbers;return function(r,e){for(var n=r.length,i=l(n),a=0,o=0,c={},s=0;s2*a}(a,f)?"category":function(r,e){for(var n=r.length,i=0;i=2){var c,d,s="";if(2===o.length)for(c=0;c<2;c++)if(d=x(o[c])){s=g;break}var l=a("pattern",s);if(l===g)for(c=0;c<2;c++)(d=x(o[c]))&&(e.bounds[c]=o[c]=d-1);if(l)for(c=0;c<2;c++)switch(d=o[c],l){case g:if(!i(d))return void(e.enabled=!1);if((d=+d)!==Math.floor(d)||d<0||d>=7)return void(e.enabled=!1);e.bounds[c]=o[c]=d;break;case _:if(!i(d))return void(e.enabled=!1);if((d=+d)<0||d>24)return void(e.enabled=!1);e.bounds[c]=o[c]=d}if(!1===n.autorange){var m=n.range;if(m[0]m[1])return void(e.enabled=!1)}else if(o[0]>m[0]&&o[1]i?1:-1:+(r.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(r){return!!/^[xyz]/.test(r)&&r.split(" ")[0]},e.isLinked=function(r,e){return t(e,r._axisMatchGroups)||t(e,r._axisConstraintGroups)}},22416:function(r,e,n){"use strict";var i=n(38116).isTypedArraySpec;r.exports=function(r,e,n,a){if("category"===e.type){var t,o=r.categoryarray,c=Array.isArray(o)&&o.length>0||i(o);c&&(t="array");var u,d=n("categoryorder",t);"array"===d&&(u=n("categoryarray")),c||"array"!==d||(d=e.categoryorder="trace"),"trace"===d?e._initialCategories=[]:"array"===d?e._initialCategories=u.slice():(u=function(r,e){var n,i,a,t=e.dataAttr||r._id.charAt(0),o={};if(e.axData)n=e.axData;else for(n=[],i=0;ii?a.substr(i):t.substr(n))+o:a+t+r*e:o}function f(r,e){for(var n=e._size,i=n.h/n.w,a={},t=Object.keys(r),o=0;od*h)||G)for(n=0;nw&&TF&&(F=T);m/=(F-k)/(2*z),k=u.l2r(k),F=u.l2r(F),u.range=u._input.range=b=0?Math.min(r,.9):1/(1/Math.max(r,-.3)+3.222))}function J(r,e,n,i,a){return r.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",d(n,i)).attr("d",a+"Z")}function U(r,e,n){return r.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("transform",d(e,n)).attr("d","M0,0Z")}function H(r,e,n,i,a,t){r.attr("d",i+"M"+n.l+","+n.t+"v"+n.h+"h"+n.w+"v-"+n.h+"h-"+n.w+"Z"),L(r,e,a,t)}function L(r,e,n,i){n||(r.transition().style("fill",i>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function O(r){i.select(r).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function K(r){z&&r.data&&r._context.showTips&&(a.notifier(a._(r,"Double-click to zoom back out"),"long"),z=!1)}function V(r){var e=Math.floor(Math.min(r.b-r.t,r.r-r.l,F)/2);return"M"+(r.l-3.5)+","+(r.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(r.r+3.5)+","+(r.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(r.r+3.5)+","+(r.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(r.l-3.5)+","+(r.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function j(r,e,n,i,t){for(var o,c,u,d,s=!1,l={},m={},p=(t||{}).xaHash,I=(t||{}).yaHash,y=0;y=0)a._fullLayout._deactivateShape(a);else{var o=a._fullLayout.clickmode;if(O(a),2!==r||gr||Kr(),fr)o.indexOf("select")>-1&&b(n,a,Y,X,e.id,Fr),o.indexOf("event")>-1&&p.click(a,n,e.id);else if(1===r&&gr){var c=y?w:z,d="s"===y||"w"===g?0:1,l=c._name+".range["+d+"]",m=function(r,e){var n,i=r.range[e],a=Math.abs(i-r.range[1-e]);return"date"===r.type?i:"log"===r.type?(n=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,t("."+n+"g")(Math.pow(10,i))):(n=Math.floor(Math.log(Math.abs(i))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,t("."+String(n)+"g")(i))}(c,d),I="left",f="middle";if(c.fixedrange)return;y?(f="n"===y?"top":"bottom","right"===c.side&&(I="right")):"e"===g&&(I="right"),a._context.showAxisRangeEntryBoxes&&i.select(vr).call(s.makeEditable,{gd:a,immediate:!0,background:a._fullLayout.paper_bgcolor,text:String(m),fill:c.tickfont?c.tickfont.color:"#444",horizontalAlign:I,verticalAlign:f}).on("edit",(function(r){var e=c.d2r(r);void 0!==e&&u.call("_guiRelayout",a,l,e)}))}}}function Rr(e,n){if(r._transitioningWithDuration)return!1;var i=Math.max(0,Math.min(rr,pr*e+xr)),a=Math.max(0,Math.min(er,Ir*n+Pr)),t=Math.abs(i-xr),o=Math.abs(a-Pr);function c(){br="",Gr.r=Gr.l,Gr.t=Gr.b,Br.attr("d","M0,0Z")}if(Gr.l=Math.min(xr,i),Gr.r=Math.max(xr,i),Gr.t=Math.min(Pr,a),Gr.b=Math.max(Pr,a),nr.isSubplotConstrained)t>F||o>F?(br="xy",t/rr>o/er?(o=t*er/rr,Pr>a?Gr.t=Pr-o:Gr.b=Pr+o):(t=o*rr/er,xr>i?Gr.l=xr-t:Gr.r=xr+t),Br.attr("d",V(Gr))):c();else if(ir.isSubplotConstrained)if(t>F||o>F){br="xy";var u=Math.min(Gr.l/rr,(er-Gr.b)/er),d=Math.max(Gr.r/rr,(er-Gr.t)/er);Gr.l=u*rr,Gr.r=d*rr,Gr.b=(1-u)*er,Gr.t=(1-d)*er,Br.attr("d",V(Gr))}else c();else!tr||o0){var s;if(ir.isSubplotConstrained||!ar&&1===tr.length){for(s=0;s1&&(void 0!==t.maxallowed&&cr===(t.range[0]1&&(void 0!==o.maxallowed&&ur===(o.range[0]v[1]-1/4096&&(e.domain=c),a.noneOrAll(r.domain,e.domain,c),"sync"===e.tickmode&&(e.tickmode="auto")}return n("layer"),e}},42568:function(r,e,n){"use strict";var i=n(85024);r.exports=function(r,e,n,a,t){t||(t={});var o=t.tickSuffixDflt,c=i(r);n("tickprefix")&&n("showtickprefix",c),n("ticksuffix",o)&&n("showticksuffix",c)}},96312:function(r,e,n){"use strict";var i=n(76808);r.exports=function(r,e,n,a){var t=e._template||{},o=e.type||t.type||"-";n("minallowed"),n("maxallowed");var c,u=n("range");u||a.noInsiderange||"log"===o||(!(c=n("insiderange"))||null!==c[0]&&null!==c[1]||(e.insiderange=!1,c=void 0),c&&(u=n("range",c)));var d,s=e.getAutorangeDflt(u,a),l=n("autorange",s);!u||(null!==u[0]||null!==u[1])&&(null!==u[0]&&null!==u[1]||"reversed"!==l&&!0!==l)&&(null===u[0]||"min"!==l&&"max reversed"!==l)&&(null===u[1]||"max"!==l&&"min reversed"!==l)||(u=void 0,delete e.range,e.autorange=!0,d=!0),d||(l=n("autorange",s=e.getAutorangeDflt(u,a))),l&&(i(n,l,u),"linear"!==o&&"-"!==o||n("rangemode")),e.cleanRange()}},21160:function(r,e,n){"use strict";var i=n(84284).FROM_BL;r.exports=function(r,e,n){void 0===n&&(n=i[r.constraintoward||"center"]);var a=[r.r2l(r.range[0]),r.r2l(r.range[1])],t=a[0]+(a[1]-a[0])*n;r.range=r._input.range=[r.l2r(t+(a[0]-t)*e),r.l2r(t+(a[1]-t)*e)],r.setScale()}},78344:function(r,e,n){"use strict";var i=n(33428),a=n(94336).E9,t=n(3400),o=t.numberFormat,c=n(38248),u=t.cleanNumber,d=t.ms2DateTime,s=t.dateTime2ms,l=t.ensureNumber,m=t.isArrayOrTypedArray,p=n(39032),I=p.FP_SAFE,y=p.BADNUM,f=p.LOG_CLIP,g=p.ONEWEEK,_=p.ONEDAY,h=p.ONEHOUR,v=p.ONEMIN,x=p.ONESEC,P=n(79811),G=n(33816),C=G.HOUR_PATTERN,S=G.WEEKDAY_PATTERN;function A(r){return Math.pow(10,r)}function b(r){return null!==r&&void 0!==r}r.exports=function(r,e){e=e||{};var n=r._id||"x",p=n.charAt(0);function M(e,n){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&n&&r.range&&2===r.range.length){var i=r.range[0],a=r.range[1];return.5*(i+a-2*f*Math.abs(i-a))}return y}function B(e,n,i,a){if((a||{}).msUTC&&c(e))return+e;var o=s(e,i||r.calendar);if(o===y){if(!c(e))return y;e=+e;var u=Math.floor(10*t.mod(e+.05,1)),d=Math.round(e-u/10);o=s(new Date(d))+u/10}return o}function k(e,n,i){return d(e,n,i||r.calendar)}function F(e){return r._categories[Math.round(e)]}function z(e){if(b(e)){if(void 0===r._categoriesMap&&(r._categoriesMap={}),void 0!==r._categoriesMap[e])return r._categoriesMap[e];r._categories.push("number"===typeof e?String(e):e);var n=r._categories.length-1;return r._categoriesMap[e]=n,n}return y}function w(e){if(r._categoriesMap)return r._categoriesMap[e]}function R(r){var e=w(r);return void 0!==e?e:c(r)?+r:void 0}function E(r){return c(r)?+r:w(r)}function N(r,e,n){return i.round(n+e*r,2)}function T(r,e,n){return(r-n)/e}var D=function(e){return c(e)?N(e,r._m,r._b):y},J=function(e){return T(e,r._m,r._b)};if(r.rangebreaks){var U="y"===p;D=function(e){if(!c(e))return y;var n=r._rangebreaks.length;if(!n)return N(e,r._m,r._b);var i=U;r.range[0]>r.range[1]&&(i=!i);for(var a=i?-1:1,t=a*e,o=0,u=0;us)){o=t<(d+s)/2?u:u+1;break}o=u+1}var l=r._B[o]||0;return isFinite(l)?N(e,r._m2,l):0},J=function(e){var n=r._rangebreaks.length;if(!n)return T(e,r._m,r._b);for(var i=0,a=0;ar._rangebreaks[a].pmax&&(i=a+1);return T(e,r._m2,r._B[i])}}r.c2l="log"===r.type?M:l,r.l2c="log"===r.type?A:l,r.l2p=D,r.p2l=J,r.c2p="log"===r.type?function(r,e){return D(M(r,e))}:D,r.p2c="log"===r.type?function(r){return A(J(r))}:J,-1!==["linear","-"].indexOf(r.type)?(r.d2r=r.r2d=r.d2c=r.r2c=r.d2l=r.r2l=u,r.c2d=r.c2r=r.l2d=r.l2r=l,r.d2p=r.r2p=function(e){return r.l2p(u(e))},r.p2d=r.p2r=J,r.cleanPos=l):"log"===r.type?(r.d2r=r.d2l=function(r,e){return M(u(r),e)},r.r2d=r.r2c=function(r){return A(u(r))},r.d2c=r.r2l=u,r.c2d=r.l2r=l,r.c2r=M,r.l2d=A,r.d2p=function(e,n){return r.l2p(r.d2r(e,n))},r.p2d=function(r){return A(J(r))},r.r2p=function(e){return r.l2p(u(e))},r.p2r=J,r.cleanPos=l):"date"===r.type?(r.d2r=r.r2d=t.identity,r.d2c=r.r2c=r.d2l=r.r2l=B,r.c2d=r.c2r=r.l2d=r.l2r=k,r.d2p=r.r2p=function(e,n,i){return r.l2p(B(e,0,i))},r.p2d=r.p2r=function(r,e,n){return k(J(r),e,n)},r.cleanPos=function(e){return t.cleanDate(e,y,r.calendar)}):"category"===r.type?(r.d2c=r.d2l=z,r.r2d=r.c2d=r.l2d=F,r.d2r=r.d2l_noadd=R,r.r2c=function(e){var n=E(e);return void 0!==n?n:r.fraction2r(.5)},r.l2r=r.c2r=l,r.r2l=E,r.d2p=function(e){return r.l2p(r.r2c(e))},r.p2d=function(r){return F(J(r))},r.r2p=r.d2p,r.p2r=J,r.cleanPos=function(r){return"string"===typeof r&&""!==r?r:l(r)}):"multicategory"===r.type&&(r.r2d=r.c2d=r.l2d=F,r.d2r=r.d2l_noadd=R,r.r2c=function(e){var n=R(e);return void 0!==n?n:r.fraction2r(.5)},r.r2c_just_indices=w,r.l2r=r.c2r=l,r.r2l=R,r.d2p=function(e){return r.l2p(r.r2c(e))},r.p2d=function(r){return F(J(r))},r.r2p=r.d2p,r.p2r=J,r.cleanPos=function(r){return Array.isArray(r)||"string"===typeof r&&""!==r?r:l(r)},r.setupMultiCategory=function(i){var a,o,c=r._traceIndices,u=r._matchGroup;if(u&&0===r._categories.length)for(var d in u)if(d!==n){var s=e[P.id2name(d)];c=c.concat(s._traceIndices)}var l=[[0,{}],[0,{}]],I=[];for(a=0;au[1]&&(a[c?0:1]=i),a[0]===a[1]){var d=r.l2r(n),s=r.l2r(i);if(void 0!==n){var l=d+1;void 0!==i&&(l=Math.min(l,s)),a[c?1:0]=l}if(void 0!==i){var m=s+1;void 0!==n&&(m=Math.max(m,d)),a[c?0:1]=m}}}},r.cleanRange=function(e,n){r._cleanRange(e,n),r.limitRange(e)},r._cleanRange=function(e,n){n||(n={}),e||(e="range");var i,a,o=t.nestedProperty(r,e).get();if(a=(a="date"===r.type?t.dfltRange(r.calendar):"y"===p?G.DFLTRANGEY:"realaxis"===r._name?[0,1]:n.dfltRange||G.DFLTRANGEX).slice(),"tozero"!==r.rangemode&&"nonnegative"!==r.rangemode||(a[0]=0),o&&2===o.length){var u=null===o[0],d=null===o[1];for("date"!==r.type||r.autorange||(o[0]=t.cleanDate(o[0],y,r.calendar),o[1]=t.cleanDate(o[1],y,r.calendar)),i=0;i<2;i++)if("date"===r.type){if(!t.isDateTime(o[i],r.calendar)){r[e]=a;break}if(r.r2l(o[0])===r.r2l(o[1])){var s=t.constrain(r.r2l(o[0]),t.MIN_MS+1e3,t.MAX_MS-1e3);o[0]=r.l2r(s-1e3),o[1]=r.l2r(s+1e3);break}}else{if(!c(o[i])){if(u||d||!c(o[1-i])){r[e]=a;break}o[i]=o[1-i]*(i?10:.1)}if(o[i]<-I?o[i]=-I:o[i]>I&&(o[i]=I),o[0]===o[1]){var l=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=l,o[1]+=l}}}else t.nestedProperty(r,e).set(a)},r.setScale=function(n){var i=e._size;if(r.overlaying){var a=P.getFromId({_fullLayout:e},r.overlaying);r.domain=a.domain}var t=n&&r._r?"_r":"range",o=r.calendar;r.cleanRange(t);var c,u,d=r.r2l(r[t][0],o),s=r.r2l(r[t][1],o),l="y"===p;if(l?(r._offset=i.t+(1-r.domain[1])*i.h,r._length=i.h*(r.domain[1]-r.domain[0]),r._m=r._length/(d-s),r._b=-r._m*s):(r._offset=i.l+r.domain[0]*i.w,r._length=i.w*(r.domain[1]-r.domain[0]),r._m=r._length/(s-d),r._b=-r._m*d),r._rangebreaks=[],r._lBreaks=0,r._m2=0,r._B=[],r.rangebreaks&&(r._rangebreaks=r.locateBreaks(Math.min(d,s),Math.max(d,s)),r._rangebreaks.length)){for(c=0;cs&&(m=!m),m&&r._rangebreaks.reverse();var I=m?-1:1;for(r._m2=I*r._length/(Math.abs(s-d)-r._lBreaks),r._B.push(-r._m2*(l?s:d)),c=0;ca&&(a+=7,oa&&(a+=24,o=i&&o=i&&e=c.min&&(rc.max&&(c.max=i),a=!1)}a&&d.push({min:r,max:i})}};for(i=0;in.duration?(function(){for(var n={},i=0;i rect").call(o.setTranslate,0,0).call(o.setScale,1,1),r.plot.call(o.setTranslate,e._offset,n._offset).call(o.setScale,1,1);var i=r.plot.selectAll(".scatterlayer .trace");i.selectAll(".point").call(o.setPointGroupScale,1,1),i.selectAll(".textpoint").call(o.setTextPointsScale,1,1),i.call(o.hideOutsideRangePoints,r)}function f(e,n){var i=e.plotinfo,a=i.xaxis,u=i.yaxis,d=a._length,s=u._length,l=!!e.xr1,m=!!e.yr1,p=[];if(l){var I=t.simpleMap(e.xr0,a.r2l),y=t.simpleMap(e.xr1,a.r2l),f=I[1]-I[0],g=y[1]-y[0];p[0]=(I[0]*(1-n)+n*y[0]-I[0])/(I[1]-I[0])*d,p[2]=d*(1-n+n*g/f),a.range[0]=a.l2r(I[0]*(1-n)+n*y[0]),a.range[1]=a.l2r(I[1]*(1-n)+n*y[1])}else p[0]=0,p[2]=d;if(m){var _=t.simpleMap(e.yr0,u.r2l),h=t.simpleMap(e.yr1,u.r2l),v=_[1]-_[0],x=h[1]-h[0];p[1]=(_[1]*(1-n)+n*h[1]-_[1])/(_[0]-_[1])*s,p[3]=s*(1-n+n*x/v),u.range[0]=a.l2r(_[0]*(1-n)+n*h[0]),u.range[1]=u.l2r(_[1]*(1-n)+n*h[1])}else p[1]=0,p[3]=s;c.drawOne(r,a,{skipTitle:!0}),c.drawOne(r,u,{skipTitle:!0}),c.redrawComponents(r,[a._id,u._id]);var P=l?d/p[2]:1,G=m?s/p[3]:1,C=l?p[0]:0,S=m?p[1]:0,A=l?p[0]/p[2]*d:0,b=m?p[1]/p[3]*s:0,M=a._offset-A,B=u._offset-b;i.clipRect.call(o.setTranslate,C,S).call(o.setScale,1/P,1/G),i.plot.call(o.setTranslate,M,B).call(o.setScale,P,G),o.setPointGroupScale(i.zoomScalePts,1/P,1/G),o.setTextPointsScale(i.zoomScaleTxt,1/P,1/G)}c.redrawComponents(r)}},14944:function(r,e,n){"use strict";var i=n(24040).traceIs,a=n(52976);function t(r){return{v:"x",h:"y"}[r.orientation||"v"]}function o(r,e){var n=t(r),a=i(r,"box-violin"),o=i(r._fullInput||{},"candlestick");return a&&!o&&e===n&&void 0===r[n]&&void 0===r[n+"0"]}r.exports=function(r,e,n,c){n("autotypenumbers",c.autotypenumbersDflt),"-"===n("type",(c.splomStash||{}).type)&&(function(r,e){if("-"===r.type){var n,c=r._id,u=c.charAt(0);-1!==c.indexOf("scene")&&(c=u);var d=function(r,e,n){for(var i=0;i0&&(a["_"+n+"axes"]||{})[e])return a;if((a[n+"axis"]||n)===e){if(o(a,n))return a;if((a[n]||[]).length||a[n+"0"])return a}}}(e,c,u);if(d)if("histogram"!==d.type||u!=={v:"y",h:"x"}[d.orientation||"v"]){var s=u+"calendar",l=d[s],m={noMultiCategory:!i(d,"cartesian")||i(d,"noMultiCategory")};if("box"===d.type&&d._hasPreCompStats&&u==={h:"x",v:"y"}[d.orientation||"v"]&&(m.noMultiCategory=!0),m.autotypenumbers=r.autotypenumbers,o(d,u)){var p=t(d),I=[];for(n=0;n0?".":"")+t;a.isPlainObject(o)?u(o,e,c,i+1):e(c,t,o)}}))}e.manageCommandObserver=function(r,n,i,o){var c={},u=!0;n&&n._commandObserver&&(c=n._commandObserver),c.cache||(c.cache={}),c.lookupTable={};var d=e.hasSimpleAPICommandBindings(r,i,c.lookupTable);if(n&&n._commandObserver){if(d)return c;if(n._commandObserver.remove)return n._commandObserver.remove(),n._commandObserver=null,c}if(d){t(r,d,c.cache),c.check=function(){if(u){var e=t(r,d,c.cache);return e.changed&&o&&void 0!==c.lookupTable[e.value]&&(c.disable(),Promise.resolve(o({value:e.value,type:d.type,prop:d.prop,traces:d.traces,index:c.lookupTable[e.value]})).then(c.enable,c.enable)),e.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0&&a<0&&(a+=360);var c=(a-i)/4;return{type:"Polygon",coordinates:[[[i,t],[i,o],[i+c,o],[i+2*c,o],[i+3*c,o],[a,o],[a,t],[a-c,t],[a-2*c,t],[a-3*c,t],[i,t]]]}}r.exports=function(r){return new A(r)},b.plot=function(r,e,n,i){var a=this;if(i)return a.update(r,e,!0);a._geoCalcData=r,a._fullLayout=e;var t=e[this.id],o=[],c=!1;for(var u in P.layerNameToAdjective)if("frame"!==u&&t["show"+u]){c=!0;break}for(var d=!1,s=0;s0&&o._module.calcGeoJSON(t,e)}if(!n){if(this.updateProjection(r,e))return;this.viewInitial&&this.scope===i.scope||this.saveViewInitial(i)}this.scope=i.scope,this.updateBaseLayers(e,i),this.updateDims(e,i),this.updateFx(e,i),I.generalUpdatePerTraceModule(this.graphDiv,this,r,i);var c=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=c.selectAll(".point"),this.dataPoints.text=c.selectAll("text"),this.dataPaths.line=c.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()},b.updateProjection=function(r,e){var n=this.graphDiv,i=e[this.id],u=e._size,s=i.domain,l=i.projection,m=i.lonaxis,p=i.lataxis,I=m._ax,y=p._ax,g=this.projection=function(r){var e=r.projection,n=e.type,i=P.projNames[n];i="geo"+d.titleCase(i);for(var u=(a[i]||c[i])(),s=r._isSatellite?180*Math.acos(1/e.distance)/Math.PI:r._isClipped?P.lonaxisSpan[n]/2:null,l=["center","rotate","parallels","clipExtent"],m=function(r){return r?u:[]},p=0;ps*Math.PI/180}return!1},u.getPath=function(){return t().projection(u)},u.getBounds=function(r){return u.getPath().bounds(r)},u.precision(P.precision),r._isSatellite&&u.tilt(e.tilt).distance(e.distance),s&&u.clipAngle(s-P.clipPad),u}(i),_=[[u.l+u.w*s.x[0],u.t+u.h*(1-s.y[1])],[u.l+u.w*s.x[1],u.t+u.h*(1-s.y[0])]],h=i.center||{},v=l.rotation||{},x=m.range||[],G=p.range||[];if(i.fitbounds){I._length=_[1][0]-_[0][0],y._length=_[1][1]-_[0][1],I.range=f(n,I),y.range=f(n,y);var C=(I.range[0]+I.range[1])/2,S=(y.range[0]+y.range[1])/2;if(i._isScoped)h={lon:C,lat:S};else if(i._isClipped){h={lon:C,lat:S},v={lon:C,lat:S,roll:v.roll};var A=l.type,b=P.lonaxisSpan[A]/2||180,B=P.lataxisSpan[A]/2||90;x=[C-b,C+b],G=[S-B,S+B]}else h={lon:C,lat:S},v={lon:C,lat:v.lat,roll:v.roll}}g.center([h.lon-v.lon,h.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(l.parallels);var k=M(x,G);g.fitExtent(_,k);var F=this.bounds=g.getBounds(k),z=this.fitScale=g.scale(),w=g.translate();if(i.fitbounds){var R=g.getBounds(M(I.range,y.range)),E=Math.min((F[1][0]-F[0][0])/(R[1][0]-R[0][0]),(F[1][1]-F[0][1])/(R[1][1]-R[0][1]));isFinite(E)?g.scale(E*z):d.warn("Something went wrong during"+this.id+"fitbounds computations.")}else g.scale(l.scale*z);var N=this.midPt=[(F[0][0]+F[1][0])/2,(F[0][1]+F[1][1])/2];if(g.translate([w[0]+(N[0]-w[0]),w[1]+(N[1]-w[1])]).clipExtent(F),i._isAlbersUsa){var T=g([h.lon,h.lat]),D=g.translate();g.translate([D[0]-(T[0]-D[0]),D[1]-(T[1]-D[1])])}},b.updateBaseLayers=function(r,e){var n=this,a=n.topojson,t=n.layers,o=n.basePaths;function c(r){return"lonaxis"===r||"lataxis"===r}function u(r){return Boolean(P.lineLayers[r])}function d(r){return Boolean(P.fillLayers[r])}var s=(this.hasChoropleth?P.layersForChoropleth:P.layers).filter((function(r){return u(r)||d(r)?e["show"+r]:!c(r)||e[r].showgrid})),p=n.framework.selectAll(".layer").data(s,String);p.exit().each((function(r){delete t[r],delete o[r],i.select(this).remove()})),p.enter().append("g").attr("class",(function(r){return"layer "+r})).each((function(r){var e=t[r]=i.select(this);"bg"===r?n.bgRect=e.append("rect").style("pointer-events","all"):c(r)?o[r]=e.append("path").style("fill","none"):"backplot"===r?e.append("g").classed("choroplethlayer",!0):"frontplot"===r?e.append("g").classed("scatterlayer",!0):u(r)?o[r]=e.append("path").style("fill","none").style("stroke-miterlimit",2):d(r)&&(o[r]=e.append("path").style("stroke","none"))})),p.order(),p.each((function(n){var i=o[n],t=P.layerNameToAdjective[n];"frame"===n?i.datum(P.sphereSVG):u(n)||d(n)?i.datum(S(a,a.objects[n])):c(n)&&i.datum(function(r,e,n){var i,a,t,o=1e-6,c=2.5,u=e[r],d=P.scopeDefaults[e.scope];"lonaxis"===r?(i=d.lonaxisRange,a=d.lataxisRange,t=function(r,e){return[r,e]}):"lataxis"===r&&(i=d.lataxisRange,a=d.lonaxisRange,t=function(r,e){return[e,r]});var s={type:"linear",range:[i[0],i[1]-o],tick0:u.tick0,dtick:u.dtick};y.setConvert(s,n);var l=y.calcTicks(s);e.isScoped||"lonaxis"!==r||l.pop();for(var m=l.length,p=new Array(m),I=0;I-1&&v(i.event,a,[n.xaxis],[n.yaxis],n.id,s),c.indexOf("event")>-1&&p.click(a,i.event))}))}function l(r){return n.projection.invert([r[0]+n.xaxis._offset,r[1]+n.yaxis._offset])}},b.makeFramework=function(){var r=this,e=r.graphDiv,n=e._fullLayout,a="clip"+n._uid+r.id;r.clipDef=n._clips.append("clipPath").attr("id",a),r.clipRect=r.clipDef.append("rect"),r.framework=i.select(r.container).append("g").attr("class","geo "+r.id).call(m.setClipUrl,a,e),r.project=function(e){var n=r.projection(e);return n?[n[0]-r.xaxis._offset,n[1]-r.yaxis._offset]:[null,null]},r.xaxis={_id:"x",c2p:function(e){return r.project(e)[0]}},r.yaxis={_id:"y",c2p:function(e){return r.project(e)[1]}},r.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},y.setConvert(r.mockAxis,n)},b.saveViewInitial=function(r){var e,n=r.center||{},i=r.projection,a=i.rotation||{};this.viewInitial={fitbounds:r.fitbounds,"projection.scale":i.scale},e=r._isScoped?{"center.lon":n.lon,"center.lat":n.lat}:r._isClipped?{"projection.rotation.lon":a.lon,"projection.rotation.lat":a.lat}:{"center.lon":n.lon,"center.lat":n.lat,"projection.rotation.lon":a.lon},d.extendFlat(this.viewInitial,e)},b.render=function(r){this._hasMarkerAngles&&r?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},b._render=function(){var r,e=this.projection,n=e.getPath();function i(r){var n=e(r.lonlat);return n?s(n[0],n[1]):null}function a(r){return e.isLonLatOverEdges(r.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",n);for(r in this.dataPaths)this.dataPaths[r].attr("d",(function(r){return n(r.geojson)}));for(r in this.dataPoints)this.dataPoints[r].attr("display",a).attr("transform",i)}},10816:function(r,e,n){"use strict";var i=n(84888).KY,a=n(3400).counterRegex,t=n(43520),o="geo",c=a(o),u={};u[o]={valType:"subplotid",dflt:o,editType:"calc"},r.exports={attr:o,name:o,idRoot:o,idRegex:c,attrRegex:c,attributes:u,layoutAttributes:n(40384),supplyLayoutDefaults:n(86920),plot:function(r){for(var e=r._fullLayout,n=r.calcdata,a=e._subplots[o],c=0;c0&&F<0&&(F+=360);var z,w,R,E=(k+F)/2;if(!p){var N=I?l.projRotate:[E,0,0];z=n("projection.rotation.lon",N[0]),n("projection.rotation.lat",N[1]),n("projection.rotation.roll",N[2]),n("showcoastlines",!I&&h)&&(n("coastlinecolor"),n("coastlinewidth")),n("showocean",!!h&&void 0)&&n("oceancolor")}p?(w=-96.6,R=38.7):(w=I?E:z,R=(B[0]+B[1])/2),n("center.lon",w),n("center.lat",R),y&&(n("projection.tilt"),n("projection.distance")),f&&n("projection.parallels",l.projParallels||[0,60]),n("projection.scale"),n("showland",!!h&&void 0)&&n("landcolor"),n("showlakes",!!h&&void 0)&&n("lakecolor"),n("showrivers",!!h&&void 0)&&(n("rivercolor"),n("riverwidth")),n("showcountries",I&&"usa"!==s&&h)&&(n("countrycolor"),n("countrywidth")),("usa"===s||"north america"===s&&50===d)&&(n("showsubunits",h),n("subunitcolor"),n("subunitwidth")),I||n("showframe",h)&&(n("framecolor"),n("framewidth")),n("bgcolor"),n("fitbounds")&&(delete e.projection.scale,I?(delete e.center.lon,delete e.center.lat):g?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}r.exports=function(r,e,n){a(r,e,n,{type:"geo",attributes:c,handleDefaults:d,fullData:n,partition:"y"})}},79248:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(24040),o=Math.PI/180,c=180/Math.PI,u={cursor:"pointer"},d={cursor:"auto"};function s(r,e){return i.behavior.zoom().translate(e.translate()).scale(e.scale())}function l(r,e,n){var i=r.id,o=r.graphDiv,c=o.layout,u=c[i],d=o._fullLayout,s=d[i],l={},m={};function p(r,e){l[i+"."+r]=a.nestedProperty(u,r).get(),t.call("_storeDirectGUIEdit",c,d._preGUI,l);var n=a.nestedProperty(s,r);n.get()!==e&&(n.set(e),a.nestedProperty(u,r).set(e),m[i+"."+r]=e)}n(p),p("projection.scale",e.scale()/r.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",m)}function m(r,e){var n=s(0,e);function a(n){var i=e.invert(r.midPt);n("center.lon",i[0]),n("center.lat",i[1])}return n.on("zoomstart",(function(){i.select(this).style(u)})).on("zoom",(function(){e.scale(i.event.scale).translate(i.event.translate),r.render(!0);var n=e.invert(r.midPt);r.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/r.fitScale,"geo.center.lon":n[0],"geo.center.lat":n[1]})})).on("zoomend",(function(){i.select(this).style(d),l(r,e,a)})),n}function p(r,e){var n,a,t,o,c,m,p,I,y,f=s(0,e),g=2;function _(r){return e.invert(r)}function h(n){var i=e.rotate(),a=e.invert(r.midPt);n("projection.rotation.lon",-i[0]),n("center.lon",a[0]),n("center.lat",a[1])}return f.on("zoomstart",(function(){i.select(this).style(u),n=i.mouse(this),a=e.rotate(),t=e.translate(),o=a,c=_(n)})).on("zoom",(function(){if(m=i.mouse(this),function(r){var n=_(r);if(!n)return!0;var i=e(n);return Math.abs(i[0]-r[0])>g||Math.abs(i[1]-r[1])>g}(n))return f.scale(e.scale()),void f.translate(e.translate());e.scale(i.event.scale),e.translate([t[0],i.event.translate[1]]),c?_(m)&&(I=_(m),p=[o[0]+(I[0]-c[0]),a[1],a[2]],e.rotate(p),o=p):c=_(n=m),y=!0,r.render(!0);var u=e.rotate(),d=e.invert(r.midPt);r.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/r.fitScale,"geo.center.lon":d[0],"geo.center.lat":d[1],"geo.projection.rotation.lon":-u[0]})})).on("zoomend",(function(){i.select(this).style(d),y&&l(r,e,h)})),f}function I(r,e){var n,a={r:e.rotate(),k:e.scale()},t=s(0,e),m=function(r){for(var e=0,n=arguments.length,a=[];++eI?(t=(l>0?90:-90)-p,a=0):(t=Math.asin(l/I)*c-p,a=Math.sqrt(I*I-l*l));var y=180-t-2*p,g=(Math.atan2(m,s)-Math.atan2(d,a))*c,h=(Math.atan2(m,s)-Math.atan2(d,-a))*c,v=f(n[0],n[1],t,g),x=f(n[0],n[1],y,h);return v<=x?[t,g,n[2]]:[y,h,n[2]]}(p,n,s);isFinite(I[0])&&isFinite(I[1])&&isFinite(I[2])||(I=s),e.rotate(I),s=I}}else n=y(e,r=t);!function(r){r({type:"zoom"})}(m.of(this,arguments))})),function(r){p++||r({type:"zoomstart"})}(m.of(this,arguments))})).on("zoomend",(function(){i.select(this).style(d),I.call(t,"zoom",null),function(r){--p||r({type:"zoomend"})}(m.of(this,arguments)),l(r,e,g)})).on("zoom.redraw",(function(){r.render(!0);var n=e.rotate();r.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/r.fitScale,"geo.projection.rotation.lon":-n[0],"geo.projection.rotation.lat":-n[1]})})),i.rebind(t,m,"on")}function y(r,e){var n=r.invert(e);return n&&isFinite(n[0])&&isFinite(n[1])&&function(r){var e=r[0]*o,n=r[1]*o,i=Math.cos(n);return[i*Math.cos(e),i*Math.sin(e),Math.sin(n)]}(n)}function f(r,e,n,i){var a=g(n-r),t=g(i-e);return Math.sqrt(a*a+t*t)}function g(r){return(r%360+540)%360-180}function _(r,e,n){var i=n*o,a=r.slice(),t=0===e?1:0,c=2===e?1:2,u=Math.cos(i),d=Math.sin(i);return a[t]=r[t]*u-r[c]*d,a[c]=r[c]*u+r[t]*d,a}function h(r,e){for(var n=0,i=0,a=r.length;iMath.abs(c)?(d.boxEnd[1]=d.boxStart[1]+Math.abs(t)*x*(c>=0?1:-1),d.boxEnd[1]u[3]&&(d.boxEnd[1]=u[3],d.boxEnd[0]=d.boxStart[0]+(u[3]-d.boxStart[1])/Math.abs(x))):(d.boxEnd[0]=d.boxStart[0]+Math.abs(c)/x*(t>=0?1:-1),d.boxEnd[0]u[2]&&(d.boxEnd[0]=u[2],d.boxEnd[1]=d.boxStart[1]+(u[2]-d.boxStart[0])*Math.abs(x)))}}else d.boxEnabled?(t=d.boxStart[0]!==d.boxEnd[0],c=d.boxStart[1]!==d.boxEnd[1],t||c?(t&&(f(0,d.boxStart[0],d.boxEnd[0]),r.xaxis.autorange=!1),c&&(f(1,d.boxStart[1],d.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),d.boxEnabled=!1,d.boxInited=!1):d.boxInited&&(d.boxInited=!1);break;case"pan":d.boxEnabled=!1,d.boxInited=!1,e?(d.panning||(d.dragStart[0]=i,d.dragStart[1]=a),Math.abs(d.dragStart[0]-i).999&&(f="turntable"):f="turntable")}else f="turntable";n("dragmode",f),n("hovermode",i.getDfltFromLayout("hovermode"))}r.exports=function(r,e,n){var a=e._basePlotModules.length>1;o(r,e,n,{type:s,attributes:u,handleDefaults:l,fullLayout:e,font:e.font,fullData:n,getDfltFromLayout:function(e){if(!a)return i.validate(r[e],u[e])?r[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},346:function(r,e,n){"use strict";var i=n(86140),a=n(86968).u,t=n(92880).extendFlat,o=n(3400).counterRegex;function c(r,e,n){return{x:{valType:"number",dflt:r,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}r.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:t(c(0,0,1),{}),center:t(c(0,0,0),{}),eye:t(c(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:i,yaxis:i,zaxis:i,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"}}}},9020:function(r,e,n){"use strict";var i=n(43080),a=["xaxis","yaxis","zaxis"];function t(){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]}t.prototype.merge=function(r){for(var e=0;e<3;++e){var n=r[a[e]];n.visible?(this.enabled[e]=n.showspikes,this.colors[e]=i(n.spikecolor),this.drawSides[e]=n.spikesides,this.lineWidth[e]=n.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},r.exports=function(r){var e=new t;return e.merge(r),e}},87152:function(r,e,n){"use strict";r.exports=function(r){for(var e=r.axesOptions,n=r.glplot.axesPixels,c=r.fullSceneLayout,u=[[],[],[]],d=0;d<3;++d){var s=c[t[d]];if(s._length=(n[d].hi-n[d].lo)*n[d].pixelsPerDataUnit/r.dataScale[d],Math.abs(s._length)===1/0||isNaN(s._length))u[d]=[];else{s._input_range=s.range.slice(),s.range[0]=n[d].lo/r.dataScale[d],s.range[1]=n[d].hi/r.dataScale[d],s._m=1/(r.dataScale[d]*n[d].pixelsPerDataUnit),s.range[0]===s.range[1]&&(s.range[0]-=1,s.range[1]+=1);var l=s.tickmode;if("auto"===s.tickmode){s.tickmode="linear";var m=s.nticks||a.constrain(s._length/40,4,9);i.autoTicks(s,Math.abs(s.range[1]-s.range[0])/m)}for(var p=i.calcTicks(s,{msUTC:!0}),I=0;I/g," "));u[d]=p,s.tickmode=l}}for(e.ticks=u,d=0;d<3;++d)for(o[d]=.5*(r.glplot.bounds[0][d]+r.glplot.bounds[1][d]),I=0;I<2;++I)e.bounds[I][d]=r.glplot.bounds[I][d];r.contourLevels=function(r){for(var e=new Array(3),n=0;n<3;++n){for(var i=r[n],a=new Array(i.length),t=0;tn.deltaY?1.1:1/1.1,t=r.glplot.getAspectratio();r.glplot.setAspectratio({x:i*t.x,y:i*t.y,z:i*t.z})}a(r)}}),!!d&&{passive:!1}),r.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==r.fullSceneLayout.dragmode&&0!==r.camera.mouseListener.buttons){var e=i();r.graphDiv.emit("plotly_relayouting",e)}})),r.staticMode||r.glplot.canvas.addEventListener("webglcontextlost",(function(n){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:n,layer:r.id})}),!1)),r.glplot.oncontextloss=function(){r.recoverContext()},r.glplot.onrender=function(){r.render()},!0},C.render=function(){var r,e=this,n=e.graphDiv,i=e.svgContainer,a=e.container.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var t=n._fullLayout._invScaleX,o=n._fullLayout._invScaleY,c=a.width*t,u=a.height*o;i.setAttributeNS(null,"viewBox","0 0 "+c+" "+u),i.setAttributeNS(null,"width",c),i.setAttributeNS(null,"height",u),v(e),e.glplot.axes.update(e.axesOptions);for(var d=Object.keys(e.traces),s=null,m=e.glplot.selection,y=0;y")):"isosurface"===r.type||"volume"===r.type?(C.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(m.traceCoordinate[3]),r.valuehoverformat),M.push("value: "+C.valueLabel),m.textLabel&&M.push(m.textLabel),h=M.join("
")):h=m.textLabel;var B={x:m.traceCoordinate[0],y:m.traceCoordinate[1],z:m.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:G};I.appendArrayPointValue(B,x,G),r._module.eventData&&(B=x._module.eventData(B,m,x,{},G));var k={points:[B]};if(e.fullSceneLayout.hovermode){var F=[];I.loneHover({trace:x,x:(.5+.5*_[0]/_[3])*c,y:(.5-.5*_[1]/_[3])*u,xLabel:C.xLabel,yLabel:C.yLabel,zLabel:C.zLabel,text:h,name:s.name,color:I.castHoverOption(x,G,"bgcolor")||s.color,borderColor:I.castHoverOption(x,G,"bordercolor"),fontFamily:I.castHoverOption(x,G,"font.family"),fontSize:I.castHoverOption(x,G,"font.size"),fontColor:I.castHoverOption(x,G,"font.color"),nameLength:I.castHoverOption(x,G,"namelength"),textAlign:I.castHoverOption(x,G,"align"),hovertemplate:l.castOption(x,G,"hovertemplate"),hovertemplateLabels:l.extendFlat({},B,C),eventData:[B]},{container:i,gd:n,inOut_bbox:F}),B.bbox=F[0]}m.distance<5&&(m.buttons||P)?n.emit("plotly_click",k):n.emit("plotly_hover",k),this.oldEventData=k}else I.loneUnhover(i),this.oldEventData&&n.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},C.recoverContext=function(){var r=this;r.glplot.dispose();var e=function(){r.glplot.gl.isContextLost()?requestAnimationFrame(e):r.initializeGLPlot()?r.plot.apply(r,r.plotArgs):l.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var A=["xaxis","yaxis","zaxis"];function b(r,e,n){for(var i=r.fullSceneLayout,a=0;a<3;a++){var t=A[a],o=t.charAt(0),c=i[t],u=e[o],d=e[o+"calendar"],s=e["_"+o+"length"];if(l.isArrayOrTypedArray(u))for(var m,p=0;p<(s||u.length);p++)if(l.isArrayOrTypedArray(u[p]))for(var I=0;Ig[1][o])g[0][o]=-1,g[1][o]=1;else{var z=g[1][o]-g[0][o];g[0][o]-=z/32,g[1][o]+=z/32}if(v=[g[0][o],g[1][o]],v=x(v,u),g[0][o]=v[0],g[1][o]=v[1],u.isReversed()){var w=g[0][o];g[0][o]=g[1][o],g[1][o]=w}}else v=u.range,g[0][o]=u.r2l(v[0]),g[1][o]=u.r2l(v[1]);g[0][o]===g[1][o]&&(g[0][o]-=1,g[1][o]+=1),_[o]=g[1][o]-g[0][o],u.range=[g[0][o],g[1][o]],u.limitRange(),i.glplot.setBounds(o,{min:u.range[0]*p[o],max:u.range[1]*p[o]})}var R=s.aspectmode;if("cube"===R)f=[1,1,1];else if("manual"===R){var E=s.aspectratio;f=[E.x,E.y,E.z]}else{if("auto"!==R&&"data"!==R)throw new Error("scene.js aspectRatio was not one of the enumerated types");var N=[1,1,1];for(o=0;o<3;++o){var T=h[d=(u=s[A[o]]).type];N[o]=Math.pow(T.acc,1/T.count)/p[o]}f="data"===R||Math.max.apply(null,N)/Math.min.apply(null,N)<=4?N:[1,1,1]}s.aspectratio.x=l.aspectratio.x=f[0],s.aspectratio.y=l.aspectratio.y=f[1],s.aspectratio.z=l.aspectratio.z=f[2],i.glplot.setAspectratio(s.aspectratio),i.viewInitial.aspectratio||(i.viewInitial.aspectratio={x:s.aspectratio.x,y:s.aspectratio.y,z:s.aspectratio.z}),i.viewInitial.aspectmode||(i.viewInitial.aspectmode=s.aspectmode);var D=s.domain||null,J=e._size||null;if(D&&J){var U=i.container.style;U.position="absolute",U.left=J.l+D.x[0]*J.w+"px",U.top=J.t+(1-D.y[1])*J.h+"px",U.width=J.w*(D.x[1]-D.x[0])+"px",U.height=J.h*(D.y[1]-D.y[0])+"px"}i.glplot.redraw()}},C.destroy=function(){var r=this;r.glplot&&(r.camera.mouseListener.enabled=!1,r.container.removeEventListener("wheel",r.camera.wheelListener),r.camera=null,r.glplot.dispose(),r.container.parentNode.removeChild(r.container),r.glplot=null)},C.getCamera=function(){var r,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(r=e.camera).up[0],y:r.up[1],z:r.up[2]},center:{x:r.center[0],y:r.center[1],z:r.center[2]},eye:{x:r.eye[0],y:r.eye[1],z:r.eye[2]},projection:{type:!0===r._ortho?"orthographic":"perspective"}}},C.setViewport=function(r){var e,n=this,i=r.camera;n.camera.lookAt.apply(this,[[(e=i).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),n.glplot.setAspectratio(r.aspectratio),"orthographic"===i.projection.type!==n.camera._ortho&&(n.glplot.redraw(),n.glplot.clearRGBA(),n.glplot.dispose(),n.initializeGLPlot())},C.isCameraChanged=function(r){var e=this.getCamera(),n=l.nestedProperty(r,this.id+".camera").get();function i(r,e,n,i){var a=["up","center","eye"],t=["x","y","z"];return e[a[n]]&&r[a[n]][t[i]]===e[a[n]][t[i]]}var a=!1;if(void 0===n)a=!0;else{for(var t=0;t<3;t++)for(var o=0;o<3;o++)if(!i(e,n,t,o)){a=!0;break}(!n.projection||e.projection&&e.projection.type!==n.projection.type)&&(a=!0)}return a},C.isAspectChanged=function(r){var e=this.glplot.getAspectratio(),n=l.nestedProperty(r,this.id+".aspectratio").get();return void 0===n||n.x!==e.x||n.y!==e.y||n.z!==e.z},C.saveLayout=function(r){var e,n,i,a,t,o,c=this,u=c.fullLayout,d=c.isCameraChanged(r),m=c.isAspectChanged(r),p=d||m;if(p){var I={};d&&(e=c.getCamera(),i=(n=l.nestedProperty(r,c.id+".camera")).get(),I[c.id+".camera"]=i),m&&(a=c.glplot.getAspectratio(),o=(t=l.nestedProperty(r,c.id+".aspectratio")).get(),I[c.id+".aspectratio"]=o),s.call("_storeDirectGUIEdit",r,u._preGUI,I),d&&(n.set(e),l.nestedProperty(u,c.id+".camera").set(e)),m&&(t.set(a),l.nestedProperty(u,c.id+".aspectratio").set(a),c.glplot.redraw())}return p},C.updateFx=function(r,e){var n=this,i=n.camera;if(i)if("orbit"===r)i.mode="orbit",i.keyBindingMode="rotate";else if("turntable"===r){i.up=[0,0,1],i.mode="turntable",i.keyBindingMode="rotate";var a=n.graphDiv,t=a._fullLayout,o=n.fullSceneLayout.camera,c=o.up.x,u=o.up.y,d=o.up.z;if(d/Math.sqrt(c*c+u*u+d*d)<.999){var m=n.id+".camera.up",p={x:0,y:0,z:1},I={};I[m]=p;var y=a.layout;s.call("_storeDirectGUIEdit",y,t._preGUI,I),o.up=p,l.nestedProperty(y,m).set(p)}}else i.keyBindingMode=r;n.fullSceneLayout.hovermode=e},C.toImage=function(r){var e=this;r||(r="png"),e.staticMode&&e.container.appendChild(i),e.glplot.redraw();var n=e.glplot.gl,a=n.drawingBufferWidth,t=n.drawingBufferHeight;n.bindFramebuffer(n.FRAMEBUFFER,null);var o=new Uint8Array(a*t*4);n.readPixels(0,0,a,t,n.RGBA,n.UNSIGNED_BYTE,o),function(r,e,n){for(var i=0,a=n-1;i0)for(var c=255/o,u=0;u<3;++u)r[t+u]=Math.min(c*r[t+u],255)}}(o,a,t);var c=document.createElement("canvas");c.width=a,c.height=t;var u,d=c.getContext("2d",{willReadFrequently:!0}),s=d.createImageData(a,t);switch(s.data.set(o),d.putImageData(s,0,0),r){case"jpeg":u=c.toDataURL("image/jpeg");break;case"webp":u=c.toDataURL("image/webp");break;default:u=c.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(i),u},C.setConvert=function(){for(var r=0;r<3;r++){var e=this.fullSceneLayout[A[r]];p.setConvert(e,this.fullLayout),e.setScale=l.noop}},C.make4thDimension=function(){var r=this,e=r.graphDiv._fullLayout;r._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(r._mockAxis,e)},r.exports=G},52094:function(r){"use strict";r.exports=function(r,e,n,i){i=i||r.length;for(var a=new Array(i),t=0;tOpenStreetMap contributors',o=['\xa9 Carto',t].join(" "),c=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),u={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:t,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:o,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:o,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:c,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:c,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},d=i(u);r.exports={requiredVersion:a,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:u,styleValuesNonMapbox:d,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+a+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(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:",d.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\')'}}},89032:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e){var n=r.split(" "),a=n[0],t=n[1],o=i.isArrayOrTypedArray(e)?i.mean(e):e,c=.5+o/100,u=1.5+o/100,d=["",""],s=[0,0];switch(a){case"top":d[0]="top",s[1]=-u;break;case"bottom":d[0]="bottom",s[1]=u}switch(t){case"left":d[1]="right",s[0]=-c;break;case"right":d[1]="left",s[0]=c}return{anchor:d[0]&&d[1]?d.join("-"):d[0]?d[0]:d[1]?d[1]:"center",offset:s}}},33688:function(r,e,n){"use strict";var i=n(3480),a=n(3400),t=a.strTranslate,o=a.strScale,c=n(84888).KY,u=n(9616),d=n(33428),s=n(43616),l=n(72736),m=n(14440),p="mapbox",I=e.constants=n(47552);function y(r){return"string"===typeof r&&(-1!==I.styleValuesMapbox.indexOf(r)||0===r.indexOf("mapbox://")||0===r.indexOf("stamen"))}e.name=p,e.attr="subplot",e.idRoot=p,e.idRegex=e.attrRegex=a.counterRegex(p),e.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},e.layoutAttributes=n(5232),e.supplyLayoutDefaults=n(5976),e.plot=function(r){var e=r._fullLayout,n=r.calcdata,t=e._subplots[p];if(i.version!==I.requiredVersion)throw new Error(I.wrongVersionErrorMsg);var o=function(r,e){var n=r._fullLayout,i=r._context;if(""===i.mapboxAccessToken)return"";for(var t=[],o=[],c=!1,u=!1,d=0;d1&&a.warn(I.multipleTokensErrorMsg),t[0]):(o.length&&a.log(["Listed mapbox access token(s)",o.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(r,t);i.accessToken=o;for(var u=0;uP/2){var G=_.split("|").join("
");v.text(G).attr("data-unformatted",G).call(l.convertToTspans,r),x=s.bBox(v.node())}v.attr("transform",t(-3,8-x.height)),h.insert("rect",".static-attribution").attr({x:-x.width-6,y:-x.height-3,width:x.width+6,height:x.height+3,fill:"rgba(255, 255, 255, 0.75)"});var C=1;x.width+6>P&&(C=P/(x.width+6));var S=[i.l+i.w*m.x[1],i.t+i.h*(1-m.y[0])];h.attr("transform",t(S[0],S[1])+o(C))}},e.updateFx=function(r){for(var e=r._fullLayout,n=e._subplots[p],i=0;i0){for(var n=0;n0}function s(r){var e={},n={};switch(r.type){case"circle":i.extendFlat(n,{"circle-radius":r.circle.radius,"circle-color":r.color,"circle-opacity":r.opacity});break;case"line":i.extendFlat(n,{"line-width":r.line.width,"line-color":r.color,"line-opacity":r.opacity,"line-dasharray":r.line.dash});break;case"fill":i.extendFlat(n,{"fill-color":r.color,"fill-outline-color":r.fill.outlinecolor,"fill-opacity":r.opacity});break;case"symbol":var a=r.symbol,o=t(a.textposition,a.iconsize);i.extendFlat(e,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),i.extendFlat(n,{"icon-color":r.color,"text-color":a.textfont.color,"text-opacity":r.opacity});break;case"raster":i.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":r.opacity})}return{layout:e,paint:n}}u.update=function(r){this.visible?this.needsNewImage(r)?this.updateImage(r):this.needsNewSource(r)?(this.removeLayer(),this.updateSource(r),this.updateLayer(r)):this.needsNewLayer(r)?this.updateLayer(r):this.updateStyle(r):(this.updateSource(r),this.updateLayer(r)),this.visible=d(r)},u.needsNewImage=function(r){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===r.sourcetype&&(this.source!==r.source||JSON.stringify(this.coordinates)!==JSON.stringify(r.coordinates))},u.needsNewSource=function(r){return this.sourceType!==r.sourcetype||JSON.stringify(this.source)!==JSON.stringify(r.source)||this.layerType!==r.type},u.needsNewLayer=function(r){return this.layerType!==r.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},u.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},u.updateImage=function(r){this.subplot.map.getSource(this.idSource).updateImage({url:r.source,coordinates:r.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},u.updateSource=function(r){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=r.sourcetype,this.source=r.source,d(r)){var n=function(r){var e,n=r.sourcetype,i=r.source,t={type:n};return"geojson"===n?e="data":"vector"===n?e="string"===typeof i?"url":"tiles":"raster"===n?(e="tiles",t.tileSize=256):"image"===n&&(e="url",t.coordinates=r.coordinates),t[e]=i,r.sourceattribution&&(t.attribution=a(r.sourceattribution)),t}(r);e.addSource(this.idSource,n)}},u.findFollowingMapboxLayerId=function(r){if("traces"===r)for(var e=this.subplot.getMapLayers(),n=0;n1)for(n=0;n-1&&f(e.originalEvent,i,[n.xaxis],[n.yaxis],n.id,r),a.indexOf("event")>-1&&d.click(i,e.originalEvent)}}},v.updateFx=function(r){var e=this,n=e.map,i=e.gd;if(!e.isStatic){var t,o=r.dragmode;t=function(r,n){n.isRect?(r.range={})[e.id]=[d([n.xmin,n.ymin]),d([n.xmax,n.ymax])]:(r.lassoPoints={})[e.id]=n.map(d)};var c=e.dragOptions;e.dragOptions=a.extendDeep(c||{},{dragmode:r.dragmode,element:e.div,gd:i,plotinfo:{id:e.id,domain:r[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:t},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),n.off("click",e.onClickInPanHandler),m(o)||l(o)?(n.dragPan.disable(),n.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(r,n,i){p(r,n,i,e.dragOptions,o)},u.init(e.dragOptions)):(n.dragPan.enable(),n.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),n.on("click",e.onClickInPanHandler))}function d(r){var n=e.map.unproject(r);return[n.lng,n.lat]}},v.updateFramework=function(r){var e=r[this.id].domain,n=r._size,i=this.div.style;i.width=n.w*(e.x[1]-e.x[0])+"px",i.height=n.h*(e.y[1]-e.y[0])+"px",i.left=n.l+e.x[0]*n.w+"px",i.top=n.t+(1-e.y[1])*n.h+"px",this.xaxis._offset=n.l+e.x[0]*n.w,this.xaxis._length=n.w*(e.x[1]-e.x[0]),this.yaxis._offset=n.t+(1-e.y[1])*n.h,this.yaxis._length=n.h*(e.y[1]-e.y[0])},v.updateLayers=function(r){var e,n=r[this.id].layers,i=this.layerList;if(n.length!==i.length){for(e=0;e=e.width-20?(t["text-anchor"]="start",t.x=5):(t["text-anchor"]="end",t.x=e._paper.attr("width")-7),n.attr(t);var o=n.select(".js-link-to-tool"),c=n.select(".js-link-spacer"),u=n.select(".js-sourcelinks");r._context.showSources&&r._context.showSources(r),r._context.showLink&&function(r,e){e.text("");var n=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(r._context.linkText+" "+String.fromCharCode(187));if(r._context.sendData)n.on("click",(function(){P.sendDataToCloud(r)}));else{var i=window.location.pathname.split("/"),a=window.location.search;n.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+i[2].split(".")[0]+"/"+i[1]+a})}}(r,o),c.text(o.text()&&u.text()?" - ":"")}},P.sendDataToCloud=function(r){var e=(window.PLOTLYENV||{}).BASE_URL||r._context.plotlyServerURL;if(e){r.emit("plotly_beforeexport");var n=i.select(r).append("div").attr("id","hiddenform").style("display","none"),a=n.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=P.graphJson(r,!1,"keepdata"),a.node().submit(),n.remove(),r.emit("plotly_afterexport"),!1}};var S=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function b(r,e){var n=r._context.locale;n||(n="en-US");var i=!1,a={};function t(r){for(var n=!0,t=0;t1&&R.length>1){for(u.getComponentMethod("grid","sizeDefaults")(d,c),o=0;o15&&R.length>15&&0===c.shapes.length&&0===c.images.length,P.linkSubplots(m,c,s,i),P.cleanPlot(m,c,s,i);var J=!(!i._has||!i._has("gl2d")),U=!(!c._has||!c._has("gl2d")),H=!(!i._has||!i._has("cartesian"))||J,L=!(!c._has||!c._has("cartesian"))||U;H&&!L?i._bgLayer.remove():L&&!H&&(c._shouldCreateBgLayer=!0),i._zoomlayer&&!r._dragging&&y({_fullLayout:i}),function(r,e){var n,i=[];e.meta&&(n=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var a=0;a0){var s=1-2*c;i=Math.round(s*i),a=Math.round(s*a)}}var m=P.layoutAttributes.width.min,p=P.layoutAttributes.height.min;i1,y=!e.height&&Math.abs(n.height-a)>1;(y||I)&&(I&&(n.width=i),y&&(n.height=a)),r._initialAutoSize||(r._initialAutoSize={width:i,height:a}),P.sanitizeMargins(n)},P.supplyLayoutModuleDefaults=function(r,e,n,i){var a,t,o,c=u.componentsRegistry,d=e._basePlotModules,s=u.subplotsRegistry.cartesian;for(a in c)(o=c[a]).includeBasePlot&&o.includeBasePlot(r,e);for(var m in d.length||d.push(s),e._has("cartesian")&&(u.getComponentMethod("grid","contentDefaults")(r,e),s.finalizeSubplots(r,e)),e._subplots)e._subplots[m].sort(l.subplotSort);for(t=0;t1&&(n.l/=g,n.r/=g)}if(p){var _=(n.t+n.b)/p;_>1&&(n.t/=_,n.b/=_)}var h=void 0!==n.xl?n.xl:n.x,v=void 0!==n.xr?n.xr:n.x,x=void 0!==n.yt?n.yt:n.y,G=void 0!==n.yb?n.yb:n.y;I[e]={l:{val:h,size:n.l+f},r:{val:v,size:n.r+f},b:{val:G,size:n.b+f},t:{val:x,size:n.t+f}},y[e]=1}else delete I[e],delete y[e];if(!i._replotting)return P.doAutoMargin(r)}},P.doAutoMargin=function(r){var e=r._fullLayout,n=e.width,i=e.height;e._size||(e._size={}),z(e);var a=e._size,t=e.margin,c={t:0,b:0,l:0,r:0},d=l.extendFlat({},a),s=t.l,m=t.r,p=t.t,y=t.b,f=e._pushmargin,g=e._pushmarginIds,_=e.minreducedwidth,h=e.minreducedheight;if(!1!==t.autoexpand){for(var v in f)g[v]||delete f[v];var x=r._fullLayout._reservedMargin;for(var G in x)for(var C in x[G]){var S=x[G][C];c[C]=Math.max(c[C],S)}for(var A in f.base={l:{val:0,size:s},r:{val:1,size:m},t:{val:1,size:p},b:{val:0,size:y}},c){var b=0;for(var M in f)"base"!==M&&o(f[M][A].size)&&(b=f[M][A].size>b?f[M][A].size:b);var B=Math.max(0,t[A]-b);c[A]=Math.max(0,c[A]-B)}for(var k in f){var F=f[k].l||{},w=f[k].b||{},R=F.val,E=F.size,N=w.val,T=w.size,D=n-c.r-c.l,J=i-c.t-c.b;for(var U in f){if(o(E)&&f[U].r){var H=f[U].r.val,L=f[U].r.size;if(H>R){var O=(E*H+(L-D)*R)/(H-R),K=(L*(1-R)+(E-D)*(1-H))/(H-R);O+K>s+m&&(s=O,m=K)}}if(o(T)&&f[U].t){var V=f[U].t.val,j=f[U].t.size;if(V>N){var W=(T*V+(j-J)*N)/(V-N),Z=(j*(1-N)+(T-J)*(1-V))/(V-N);W+Z>y+p&&(y=W,p=Z)}}}}}var q=l.constrain(n-t.l-t.r,2,_),Y=l.constrain(i-t.t-t.b,2,h),X=Math.max(0,n-q),Q=Math.max(0,i-Y);if(X){var $=(s+m)/X;$>1&&(s/=$,m/=$)}if(Q){var rr=(y+p)/Q;rr>1&&(y/=rr,p/=rr)}if(a.l=Math.round(s)+c.l,a.r=Math.round(m)+c.r,a.t=Math.round(p)+c.t,a.b=Math.round(y)+c.b,a.p=Math.round(t.pad),a.w=Math.round(n)-a.l-a.r,a.h=Math.round(i)-a.t-a.b,!e._replotting&&(P.didMarginChange(d,a)||function(r){if("_redrawFromAutoMarginCount"in r._fullLayout)return!1;var e=I.list(r,"",!0);for(var n in e)if(e[n].autoshift||e[n].shift)return!0;return!1}(r))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var er=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(r._transitioningWithDuration=!0),r._transitionData._interruptCallbacks.push((function(){i=!0})),n.redraw&&r._transitionData._interruptCallbacks.push((function(){return u.call("redraw",r)})),r._transitionData._interruptCallbacks.push((function(){r.emit("plotly_transitioninterrupted",[])}));var t=0,o=0;function c(){return t++,function(){var e;o++,i||o!==t||(e=a,r._transitionData&&(function(r){if(r)for(;r.length;)r.shift()}(r._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(n.redraw)return u.call("redraw",r)})).then((function(){r._transitioning=!1,r._transitioningWithDuration=!1,r.emit("plotly_transitioned",[])})).then(e)))}}n.runFn(c),setTimeout(c())}))}],t=l.syncOrAsync(a,r);return t&&t.then||(t=Promise.resolve()),t.then((function(){return r}))}P.didMarginChange=function(r,e){for(var n=0;n1)return!0}return!1},P.graphJson=function(r,e,n,i,a,t){(a&&e&&!r._fullData||a&&!e&&!r._fullLayout)&&P.supplyDefaults(r);var o=a?r._fullData:r.data,u=a?r._fullLayout:r.layout,d=(r._transitionData||{})._frames;function s(r,e){if("function"===typeof r)return e?"_function_":null;if(l.isPlainObject(r)){var i,a={};return Object.keys(r).sort().forEach((function(t){if(-1===["_","["].indexOf(t.charAt(0)))if("function"!==typeof r[t]){if("keepdata"===n){if("src"===t.substr(t.length-3))return}else if("keepstream"===n){if("string"===typeof(i=r[t+"src"])&&i.indexOf(":")>0&&!l.isPlainObject(r.stream))return}else if("keepall"!==n&&"string"===typeof(i=r[t+"src"])&&i.indexOf(":")>0)return;a[t]=s(r[t],e)}else e&&(a[t]="_function")})),a}var t=Array.isArray(r),o=l.isTypedArray(r);if((t||o)&&r.dtype&&r.shape){var u=r.bdata;return s({dtype:r.dtype,shape:r.shape,bdata:l.isArrayBuffer(u)?c.encode(u):u},e)}return t?r.map((function(r){return s(r,e)})):o?l.simpleMap(r,l.identity):l.isJSDate(r)?l.ms2DateTimeLocal(+r):r}var m={data:(o||[]).map((function(r){var n=s(r);return e&&delete n.fit,n}))};if(!e&&(m.layout=s(u),a)){var p=u._size;m.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return d&&(m.frames=s(d)),t&&(m.config=s(r._context,!0)),"object"===i?m:JSON.stringify(m)},P.modifyFrames=function(r,e){var n,i,a,t=r._transitionData._frames,o=r._transitionData._frameHash;for(n=0;n=0;t--)if(u[t].enabled){n._indexToPoints=u[t]._indexToPoints;break}i&&i.calc&&(o=i.calc(r,n))}Array.isArray(o)&&o[0]||(o=[{x:p,y:p}]),o[0].t||(o[0].t={}),o[0].trace=n,m[e]=o}}for(N(o,c,s),a=0;a1e-10?r:0}function m(r,e,n){e=e||0,n=n||0;for(var i=r.length,a=new Array(i),t=0;t0?n:1/0})),a=i.mod(n+1,e.length);return[e[n],e[a]]},findIntersectionXY:d,findXYatLength:function(r,e,n,i){var a=-e*n,t=e*e+1,o=2*(e*a-n),c=a*a+n*n-r*r,u=Math.sqrt(o*o-4*t*c),d=(-o+u)/(2*t),s=(-o-u)/(2*t);return[[d,e*d+a+i],[s,e*s+a+i]]},clampTiny:l,pathPolygon:function(r,e,n,i,a,t){return"M"+m(s(r,e,n,i),a,t).join("L")},pathPolygonAnnulus:function(r,e,n,i,a,t,o){var c,u;r=90||u>90&&d>=450?1:l<=0&&p<=0?0:Math.max(l,p),e=u<=180&&d>=180||u>180&&d>=540?-1:s>=0&&m>=0?0:Math.min(s,m),n=u<=270&&d>=270||u>270&&d>=630?-1:l>=0&&p>=0?0:Math.min(l,p),i=d>=360?1:s<=0&&m<=0?0:Math.max(s,m),[e,n,i,a]}(I),x=v[2]-v[0],P=v[3]-v[1],G=p/m,C=Math.abs(P/x);G>C?(y=m,h=(p-(f=m*C))/a.h/2,g=[c[0],c[1]],_=[l[0]+h,l[1]-h]):(f=p,h=(m-(y=p/C))/a.w/2,g=[c[0]+h,c[1]-h],_=[l[0],l[1]]),n.xLength2=y,n.yLength2=f,n.xDomain2=g,n.yDomain2=_;var S,A=n.xOffset2=a.l+a.w*g[0],b=n.yOffset2=a.t+a.h*(1-_[1]),M=n.radius=y/x,B=n.innerRadius=n.getHole(e)*M,k=n.cx=A-M*v[0],F=n.cy=b+M*v[3],z=n.cxx=k-A,w=n.cyy=F-b,R=t.side;"counterclockwise"===R?(S=R,R="top"):"clockwise"===R&&(S=R,R="bottom"),n.radialAxis=n.mockAxis(r,e,t,{_id:"x",side:R,_trueSide:S,domain:[B/a.w,M/a.w]}),n.angularAxis=n.mockAxis(r,e,o,{side:"right",domain:[0,Math.PI],autorange:!1}),n.doAutoRange(r,e),n.updateAngularAxis(r,e),n.updateRadialAxis(r,e),n.updateRadialAxisTitle(r,e),n.xaxis=n.mockCartesianAxis(r,e,{_id:"x",domain:g}),n.yaxis=n.mockCartesianAxis(r,e,{_id:"y",domain:_});var T=n.pathSubplot();n.clipPaths.forTraces.select("path").attr("d",T).attr("transform",u(z,w)),i.frontplot.attr("transform",u(A,b)).call(s.setClipUrl,n._hasClipOnAxisFalse?null:n.clipIds.forTraces,n.gd),i.bg.attr("d",T).attr("transform",u(k,F)).call(d.fill,e.bgcolor)},J.mockAxis=function(r,e,n,i){var a=o.extendFlat({},n,i);return I(a,e,r),a},J.mockCartesianAxis=function(r,e,n){var i=this,a=i.isSmith,t=n._id,c=o.extendFlat({type:"linear"},n);p(c,r);var u={x:[0,2],y:[1,3]};return c.setRange=function(){var r=i.sectorBBox,n=u[t],a=i.radialAxis._rl,o=(a[1]-a[0])/(1-i.getHole(e));c.range=[r[n[0]]*o,r[n[1]]*o]},c.isPtWithinRange="x"!==t||a?function(){return!0}:function(r){return i.isPtInside(r)},c.setRange(),c.setScale(),c},J.doAutoRange=function(r,e){var n=this,i=n.gd,a=n.radialAxis,t=n.getRadial(e);y(i,a);var o=a.range;if(t.range=o.slice(),t._input.range=o.slice(),a._rl=[a.r2l(o[0],null,"gregorian"),a.r2l(o[1],null,"gregorian")],void 0!==a.minallowed){var c=a.r2l(a.minallowed);a._rl[0]>a._rl[1]?a._rl[1]=Math.max(a._rl[1],c):a._rl[0]=Math.max(a._rl[0],c)}if(void 0!==a.maxallowed){var u=a.r2l(a.maxallowed);a._rl[0]90&&y<=270&&(f.tickangle=180);var h=_?function(r){var e=w(n,k([r.x,0]));return u(e[0]-l,e[1]-p)}:function(r){return u(f.l2p(r.x)+s,0)},v=_?function(r){return z(n,r.x,-1/0,1/0)}:function(r){return n.pathArc(f.r2p(r.x)+s)},x=U(I);if(n.radialTickLayout!==x&&(a["radial-axis"].selectAll(".xtick").remove(),n.radialTickLayout=x),g){f.setScale();var P=0,G=_?(f.tickvals||[]).filter((function(r){return r>=0})).map((function(r){return m.tickText(f,r,!0,!1)})):m.calcTicks(f),C=_?G:m.clipEnds(f,G),S=m.getTickSigns(f)[2];_&&(("top"===f.ticks&&"bottom"===f.side||"bottom"===f.ticks&&"top"===f.side)&&(S=-S),"top"===f.ticks&&"top"===f.side&&(P=-f.ticklen),"bottom"===f.ticks&&"bottom"===f.side&&(P=f.ticklen)),m.drawTicks(i,f,{vals:G,layer:a["radial-axis"],path:m.makeTickPath(f,0,S),transFn:h,crisp:!1}),m.drawGrid(i,f,{vals:C,layer:a["radial-grid"],path:v,transFn:o.noop,crisp:!1}),m.drawLabels(i,f,{vals:G,layer:a["radial-axis"],transFn:h,labelFns:m.makeLabelFns(f,P)})}var A=n.radialAxisAngle=n.vangles?T(H(N(I.angle),n.vangles)):I.angle,b=u(l,p),M=b+c(-A);L(a["radial-axis"],g&&(I.showticklabels||I.ticks),{transform:M}),L(a["radial-grid"],g&&I.showgrid,{transform:_?"":b}),L(a["radial-line"].select("line"),g&&I.showline,{x1:_?-t:s,y1:0,x2:t,y2:0,transform:M}).attr("stroke-width",I.linewidth).call(d.stroke,I.linecolor)},J.updateRadialAxisTitle=function(r,e,n){if(!this.isSmith){var i=this,a=i.gd,t=i.radius,o=i.cx,c=i.cy,u=i.getRadial(e),d=i.id+"title",l=0;if(u.title){var m=s.bBox(i.layers["radial-axis"].node()).height,p=u.title.font.size,I=u.side;l="top"===I?p:"counterclockwise"===I?-(m+.4*p):m+.8*p}var y=void 0!==n?n:i.radialAxisAngle,f=N(y),g=Math.cos(f),_=Math.sin(f),v=o+t/2*g+l*_,x=c-t/2*_+l*g;i.layers["radial-axis-title"]=h.draw(a,d,{propContainer:u,propName:i.id+".radialaxis.title",placeholder:R(a,"Click to enter radial axis title"),attributes:{x:v,y:x,"text-anchor":"middle"},transform:{rotate:-y}})}},J.updateAngularAxis=function(r,e){var n=this,i=n.gd,a=n.layers,t=n.radius,s=n.innerRadius,l=n.cx,p=n.cy,I=n.getAngular(e),y=n.angularAxis,f=n.isSmith;f||(n.fillViewInitialKey("angularaxis.rotation",I.rotation),y.setGeometry(),y.setScale());var g=f?function(r){var e=w(n,k([0,r.x]));return Math.atan2(e[0]-l,e[1]-p)-Math.PI/2}:function(r){return y.t2g(r.x)};"linear"===y.type&&"radians"===y.thetaunit&&(y.tick0=T(y.tick0),y.dtick=T(y.dtick));var _=function(r){return u(l+t*Math.cos(r),p-t*Math.sin(r))},h=f?function(r){var e=w(n,k([0,r.x]));return u(e[0],e[1])}:function(r){return _(g(r))},v=f?function(r){var e=w(n,k([0,r.x])),i=Math.atan2(e[0]-l,e[1]-p)-Math.PI/2;return u(e[0],e[1])+c(-T(i))}:function(r){var e=g(r);return _(e)+c(-T(e))},x=f?function(r){return F(n,r.x,0,1/0)}:function(r){var e=g(r),n=Math.cos(e),i=Math.sin(e);return"M"+[l+s*n,p-s*i]+"L"+[l+t*n,p-t*i]},P=m.makeLabelFns(y,0).labelStandoff,G={xFn:function(r){var e=g(r);return Math.cos(e)*P},yFn:function(r){var e=g(r),n=Math.sin(e)>0?.2:1;return-Math.sin(e)*(P+r.fontSize*n)+Math.abs(Math.cos(e))*(r.fontSize*A)},anchorFn:function(r){var e=g(r),n=Math.cos(e);return Math.abs(n)<.1?"middle":n>0?"start":"end"},heightFn:function(r,e,n){var i=g(r);return-.5*(1+Math.sin(i))*n}},C=U(I);n.angularTickLayout!==C&&(a["angular-axis"].selectAll("."+y._id+"tick").remove(),n.angularTickLayout=C);var S,b=f?[1/0].concat(y.tickvals||[]).map((function(r){return m.tickText(y,r,!0,!1)})):m.calcTicks(y);if(f&&(b[0].text="\u221e",b[0].fontSize*=1.75),"linear"===e.gridshape?(S=b.map(g),o.angleDelta(S[0],S[1])<0&&(S=S.slice().reverse())):S=null,n.vangles=S,"category"===y.type&&(b=b.filter((function(r){return o.isAngleInsideSector(g(r),n.sectorInRad)}))),y.visible){var M="inside"===y.ticks?-1:1,B=(y.linewidth||1)/2;m.drawTicks(i,y,{vals:b,layer:a["angular-axis"],path:"M"+M*B+",0h"+M*y.ticklen,transFn:v,crisp:!1}),m.drawGrid(i,y,{vals:b,layer:a["angular-grid"],path:x,transFn:o.noop,crisp:!1}),m.drawLabels(i,y,{vals:b,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:h,labelFns:G})}L(a["angular-line"].select("path"),I.showline,{d:n.pathSubplot(),transform:u(l,p)}).attr("stroke-width",I.linewidth).call(d.stroke,I.linecolor)},J.updateFx=function(r,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(r),this.updateRadialDrag(r,e,0),this.updateRadialDrag(r,e,1)),this.updateHoverAndMainDrag(r))},J.updateHoverAndMainDrag=function(r){var e,n,c=this,d=c.isSmith,s=c.gd,l=c.layers,m=r._zoomlayer,p=b.MINZOOM,I=b.OFFEDGE,y=c.radius,h=c.innerRadius,G=c.cx,C=c.cy,S=c.cxx,A=c.cyy,B=c.sectorInRad,k=c.vangles,F=c.radialAxis,z=M.clampTiny,w=M.findXYatLength,R=M.findEnclosingVertexAngles,E=b.cornerHalfWidth,N=b.cornerLen/2,T=f.makeDragger(l,"path","maindrag",!1===r.dragmode?"none":"crosshair");i.select(T).attr("d",c.pathSubplot()).attr("transform",u(G,C)),T.onmousemove=function(r){_.hover(s,r,c.id),s._fullLayout._lasthover=T,s._fullLayout._hoversubplot=c.id},T.onmouseout=function(r){s._dragging||g.unhover(s,r)};var D,J,U,H,L,O,K,V,j,W={element:T,gd:s,subplot:c.id,plotinfo:{id:c.id,xaxis:c.xaxis,yaxis:c.yaxis},xaxes:[c.xaxis],yaxes:[c.yaxis]};function Z(r,e){return Math.sqrt(r*r+e*e)}function q(r,e){return Z(r-S,e-A)}function Y(r,e){return Math.atan2(A-e,r-S)}function X(r,e){return[r*Math.cos(e),r*Math.sin(-e)]}function Q(r,e){if(0===r)return c.pathSector(2*E);var n=N/r,i=e-n,a=e+n,t=Math.max(0,Math.min(r,y)),o=t-E,u=t+E;return"M"+X(o,i)+"A"+[o,o]+" 0,0,0 "+X(o,a)+"L"+X(u,a)+"A"+[u,u]+" 0,0,1 "+X(u,i)+"Z"}function $(r,e,n){if(0===r)return c.pathSector(2*E);var i,a,t=X(r,e),o=X(r,n),u=z((t[0]+o[0])/2),d=z((t[1]+o[1])/2);if(u&&d){var s=d/u,l=-1/s,m=w(E,s,u,d);i=w(N,l,m[0][0],m[0][1]),a=w(N,l,m[1][0],m[1][1])}else{var p,I;d?(p=N,I=E):(p=E,I=N),i=[[u-p,d-I],[u+p,d-I]],a=[[u-p,d+I],[u+p,d+I]]}return"M"+i.join("L")+"L"+a.reverse().join("L")+"Z"}function rr(r,e){return e=Math.max(Math.min(e,y),h),rp?(r-1&&1===r&&x(e,s,[c.xaxis],[c.yaxis],c.id,W),n.indexOf("event")>-1&&_.click(s,e,c.id)}W.prepFn=function(r,i,t){var u=s._fullLayout.dragmode,l=T.getBoundingClientRect();s._fullLayout._calcInverseTransform(s);var p=s._fullLayout._invTransform;e=s._fullLayout._invScaleX,n=s._fullLayout._invScaleY;var I=o.apply3DTransform(p)(i-l.left,t-l.top);if(D=I[0],J=I[1],k){var g=M.findPolygonOffset(y,B[0],B[1],k);D+=S+g[0],J+=A+g[1]}switch(u){case"zoom":W.clickFn=cr,d||(W.moveFn=k?ar:nr,W.doneFn=tr,function(){U=null,H=null,L=c.pathSubplot(),O=!1;var r=s._fullLayout[c.id];K=a(r.bgcolor).getLuminance(),(V=f.makeZoombox(m,K,G,C,L)).attr("fill-rule","evenodd"),j=f.makeCorners(m,G,C),P(s)}());break;case"select":case"lasso":v(r,i,t,W,u)}},g.init(W)},J.updateRadialDrag=function(r,e,n){var a=this,d=a.gd,s=a.layers,l=a.radius,m=a.innerRadius,p=a.cx,I=a.cy,y=a.radialAxis,_=b.radialDragBoxSize,h=_/2;if(y.visible){var v,x,G,A=N(a.radialAxisAngle),M=y._rl,B=M[0],k=M[1],F=M[n],z=.75*(M[1]-M[0])/(1-a.getHole(e))/l;n?(v=p+(l+h)*Math.cos(A),x=I-(l+h)*Math.sin(A),G="radialdrag"):(v=p+(m-h)*Math.cos(A),x=I-(m-h)*Math.sin(A),G="radialdrag-inner");var w,R,E,D=f.makeRectDragger(s,G,"crosshair",-h,-h,_,_),J={element:D,gd:d};!1===r.dragmode&&(J.dragmode=!1),L(i.select(D),y.visible&&m0===(n?E>B:Ei?function(r){return r<=0}:function(r){return r>=0};r.c2g=function(n){var i=r.c2l(n)-e;return(c(i)?i:0)+o},r.g2c=function(n){return r.l2c(n+e-o)},r.g2p=function(r){return r*t},r.c2p=function(e){return r.g2p(r.c2g(e))}}}(r,e);break;case"angularaxis":!function(r,e){var n=r.type;if("linear"===n){var a=r.d2c,c=r.c2d;r.d2c=function(r,e){return function(r,e){return"degrees"===e?t(r):r}(a(r),e)},r.c2d=function(r,e){return c(function(r,e){return"degrees"===e?o(r):r}(r,e))}}r.makeCalcdata=function(e,n){var i,a,t=e[n],o=e._length,c=function(n){return r.d2c(n,e.thetaunit)};if(t)for(i=new Array(o),a=0;a0?1:0}function n(r){var e=r[0],n=r[1];if(!isFinite(e)||!isFinite(n))return[1,0];var i=(e+1)*(e+1)+n*n;return[(e*e+n*n-1)/i,2*n/i]}function i(r,e){var n=e[0],i=e[1];return[n*r.radius+r.cx,-i*r.radius+r.cy]}function a(r,e){return e*r.radius}r.exports={smith:n,reactanceArc:function(r,e,t,o){var c=i(r,n([t,e])),u=c[0],d=c[1],s=i(r,n([o,e])),l=s[0],m=s[1];if(0===e)return["M"+u+","+d,"L"+l+","+m].join(" ");var p=a(r,1/Math.abs(e));return["M"+u+","+d,"A"+p+","+p+" 0 0,"+(e<0?1:0)+" "+l+","+m].join(" ")},resistanceArc:function(r,t,o,c){var u=a(r,1/(t+1)),d=i(r,n([t,o])),s=d[0],l=d[1],m=i(r,n([t,c])),p=m[0],I=m[1];if(e(o)!==e(c)){var y=i(r,n([t,0]));return["M"+s+","+l,"A"+u+","+u+" 0 0,"+(00){for(var i=[],a=0;a=s&&(m.min=0,I.min=0,f.min=0,r.aaxis&&delete r.aaxis.min,r.baxis&&delete r.baxis.min,r.caxis&&delete r.caxis.min)}function y(r,e,n,i){var a=m[e._name];function o(n,i){return t.coerce(r,e,a,n,i)}o("uirevision",i.uirevision),e.type="linear";var p=o("color"),I=p!==a.color.dflt?p:n.font.color,y=e._name.charAt(0).toUpperCase(),f="Component "+y,g=o("title.text",f);e._hovertitle=g===f?g:y,t.coerceFont(o,"title.font",n.font,{overrideDflt:{size:t.bigFont(n.font.size),color:I}}),o("min"),s(r,e,o,"linear"),u(r,e,o,"linear"),c(r,e,o,"linear",{noAutotickangles:!0}),d(r,e,o,{outerTicks:!0}),o("showticklabels")&&(t.coerceFont(o,"tickfont",n.font,{overrideDflt:{color:I}}),o("tickangle"),o("tickformat")),l(r,e,o,{dfltColor:p,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}r.exports=function(r,e,n){o(r,e,n,{type:"ternary",attributes:m,handleDefaults:I,font:e.font,paper_bgcolor:e.paper_bgcolor})}},24696:function(r,e,n){"use strict";var i=n(33428),a=n(49760),t=n(24040),o=n(3400),c=o.strTranslate,u=o._,d=n(76308),s=n(43616),l=n(78344),m=n(92880).extendFlat,p=n(7316),I=n(54460),y=n(86476),f=n(93024),g=n(72760),_=g.freeMode,h=g.rectMode,v=n(81668),x=n(22676).prepSelect,P=n(22676).selectOnClick,G=n(22676).clearOutline,C=n(22676).clearSelectionsCache,S=n(33816);function A(r,e){this.id=r.id,this.graphDiv=r.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}r.exports=A;var b=A.prototype;b.init=function(r){this.container=r._ternarylayer,this.defs=r._defs,this.layoutId=r._uid,this.traceHash={},this.layers={}},b.plot=function(r,e){var n=this,i=e[n.id],a=e._size;n._hasClipOnAxisFalse=!1;for(var t=0;tM*v?a=(t=v)*M:t=(a=h)/M,o=g*a/h,u=_*t/v,n=e.l+e.w*y-a/2,i=e.t+e.h*(1-f)-t/2,p.x0=n,p.y0=i,p.w=a,p.h=t,p.sum=x,p.xaxis={type:"linear",range:[P+2*C-x,x-P-2*G],domain:[y-o/2,y+o/2],_id:"x"},l(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(r){return r.a>=p.aaxis.range[0]&&r.a<=p.aaxis.range[1]&&r.b>=p.baxis.range[1]&&r.b<=p.baxis.range[0]&&r.c>=p.caxis.range[1]&&r.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[P,x-G-C],domain:[f-u/2,f+u/2],_id:"y"},l(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var S=p.yaxis.domain[0],A=p.aaxis=m({},r.aaxis,{range:[P,x-G-C],side:"left",tickangle:(+r.aaxis.tickangle||0)-30,domain:[S,S+u*M],anchor:"free",position:0,_id:"y",_length:a});l(A,p.graphDiv._fullLayout),A.setScale();var b=p.baxis=m({},r.baxis,{range:[x-P-C,G],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});l(b,p.graphDiv._fullLayout),b.setScale();var B=p.caxis=m({},r.caxis,{range:[x-P-G,C],side:"right",tickangle:(+r.caxis.tickangle||0)+30,domain:[S,S+u*M],anchor:"free",position:0,_id:"y",_length:a});l(B,p.graphDiv._fullLayout),B.setScale();var k="M"+n+","+(i+t)+"h"+a+"l-"+a/2+",-"+t+"Z";p.clipDef.select("path").attr("d",k),p.layers.plotbg.select("path").attr("d",k);var F="M0,"+t+"h"+a+"l-"+a/2+",-"+t+"Z";p.clipDefRelative.select("path").attr("d",F);var z=c(n,i);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",z),p.clipDefRelative.select("path").attr("transform",null);var w=c(n-b._offset,i+t);p.layers.baxis.attr("transform",w),p.layers.bgrid.attr("transform",w);var R=c(n+a/2,i)+"rotate(30)"+c(0,-A._offset);p.layers.aaxis.attr("transform",R),p.layers.agrid.attr("transform",R);var E=c(n+a/2,i)+"rotate(-30)"+c(0,-B._offset);p.layers.caxis.attr("transform",E),p.layers.cgrid.attr("transform",E),p.drawAxes(!0),p.layers.aline.select("path").attr("d",A.showline?"M"+n+","+(i+t)+"l"+a/2+",-"+t:"M0,0").call(d.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",b.showline?"M"+n+","+(i+t)+"h"+a:"M0,0").call(d.stroke,b.linecolor||"#000").style("stroke-width",(b.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",B.showline?"M"+(n+a/2)+","+i+"l"+a/2+","+t:"M0,0").call(d.stroke,B.linecolor||"#000").style("stroke-width",(B.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),s.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},b.drawAxes=function(r){var e=this,n=e.graphDiv,i=e.id.substr(7)+"title",a=e.layers,t=e.aaxis,o=e.baxis,c=e.caxis;if(e.drawAx(t),e.drawAx(o),e.drawAx(c),r){var d=Math.max(t.showticklabels?t.tickfont.size/2:0,(c.showticklabels?.75*c.tickfont.size:0)+("outside"===c.ticks?.87*c.ticklen:0)),s=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;a["a-title"]=v.draw(n,"a"+i,{propContainer:t,propName:e.id+".aaxis.title",placeholder:u(n,"Click to enter Component A title"),attributes:{x:e.x0+e.w/2,y:e.y0-t.title.font.size/3-d,"text-anchor":"middle"}}),a["b-title"]=v.draw(n,"b"+i,{propContainer:o,propName:e.id+".baxis.title",placeholder:u(n,"Click to enter Component B title"),attributes:{x:e.x0-s,y:e.y0+e.h+.83*o.title.font.size+s,"text-anchor":"middle"}}),a["c-title"]=v.draw(n,"c"+i,{propContainer:c,propName:e.id+".caxis.title",placeholder:u(n,"Click to enter Component C title"),attributes:{x:e.x0+e.w+s,y:e.y0+e.h+.83*c.title.font.size+s,"text-anchor":"middle"}})}},b.drawAx=function(r){var e,n=this,i=n.graphDiv,a=r._name,t=a.charAt(0),c=r._id,u=n.layers[a],d=t+"tickLayout",s=(e=r).ticks+String(e.ticklen)+String(e.showticklabels);n[d]!==s&&(u.selectAll("."+c+"tick").remove(),n[d]=s),r.setScale();var l=I.calcTicks(r),m=I.clipEnds(r,l),p=I.makeTransTickFn(r),y=I.getTickSigns(r)[2],f=o.deg2rad(30),g=y*(r.linewidth||1)/2,_=y*r.ticklen,h=n.w,v=n.h,x="b"===t?"M0,"+g+"l"+Math.sin(f)*_+","+Math.cos(f)*_:"M"+g+",0l"+Math.cos(f)*_+","+-Math.sin(f)*_,P={a:"M0,0l"+v+",-"+h/2,b:"M0,0l-"+h/2+",-"+v,c:"M0,0l-"+v+","+h/2}[t];I.drawTicks(i,r,{vals:"inside"===r.ticks?m:l,layer:u,path:x,transFn:p,crisp:!1}),I.drawGrid(i,r,{vals:m,layer:n.layers[t+"grid"],path:P,transFn:p,crisp:!1}),I.drawLabels(i,r,{vals:l,layer:u,transFn:p,labelFns:I.makeLabelFns(r,0,30)})};var B=S.MINZOOM/2+.87,k="m-0.87,.5h"+B+"v3h-"+(B+5.2)+"l"+(B/2+2.6)+",-"+(.87*B+4.5)+"l2.6,1.5l-"+B/2+","+.87*B+"Z",F="m0.87,.5h-"+B+"v3h"+(B+5.2)+"l-"+(B/2+2.6)+",-"+(.87*B+4.5)+"l-2.6,1.5l"+B/2+","+.87*B+"Z",z="m0,1l"+B/2+","+.87*B+"l2.6,-1.5l-"+(B/2+2.6)+",-"+(.87*B+4.5)+"l-"+(B/2+2.6)+","+(.87*B+4.5)+"l2.6,1.5l"+B/2+",-"+.87*B+"Z",w=!0;function R(r){i.select(r).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}b.clearOutline=function(){C(this.dragOptions),G(this.dragOptions.gd)},b.initInteractions=function(){var r,e,n,i,l,m,p,I,g,v,G,C,A=this,b=A.layers.plotbg.select("path").node(),B=A.graphDiv,E=B._fullLayout._zoomlayer;function N(r){var e={};return e[A.id+".aaxis.min"]=r.a,e[A.id+".baxis.min"]=r.b,e[A.id+".caxis.min"]=r.c,e}function T(r,e){var n=B._fullLayout.clickmode;R(B),2===r&&(B.emit("plotly_doubleclick",null),t.call("_guiRelayout",B,N({a:0,b:0,c:0}))),n.indexOf("select")>-1&&1===r&&P(e,B,[A.xaxis],[A.yaxis],A.id,A.dragOptions),n.indexOf("event")>-1&&f.click(B,e,A.id)}function D(r,e){return 1-e/A.h}function J(r,e){return 1-(r+(A.h-e)/Math.sqrt(3))/A.w}function U(r,e){return(r-(A.h-e)/Math.sqrt(3))/A.w}function H(a,t){var o=n+a*r,c=i+t*e,u=Math.max(0,Math.min(1,D(0,i),D(0,c))),d=Math.max(0,Math.min(1,J(n,i),J(o,c))),s=Math.max(0,Math.min(1,U(n,i),U(o,c))),y=(u/2+s)*A.w,f=(1-u/2-d)*A.w,_=(y+f)/2,h=f-y,x=(1-u)*A.h,P=x-h/M;h.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),C.transition().style("opacity",1).duration(200),v=!0),B.emit("plotly_relayouting",N(p))}function L(){R(B),p!==l&&(t.call("_guiRelayout",B,N(p)),w&&B.data&&B._context.showTips&&(o.notifier(u(B,"Double-click to zoom back out"),"long"),w=!1))}function O(r,e){var n=r/A.xaxis._m,i=e/A.yaxis._m,a=[(p={a:l.a-i,b:l.b+(n+i)/2,c:l.c-(n-i)/2}).a,p.b,p.c].sort(o.sorterAsc),t=a.indexOf(p.a),u=a.indexOf(p.b),d=a.indexOf(p.c);a[0]<0&&(a[1]+a[0]/2<0?(a[2]+=a[0]+a[1],a[0]=a[1]=0):(a[2]+=a[0]/2,a[1]+=a[0]/2,a[0]=0),p={a:a[t],b:a[u],c:a[d]},e=(l.a-p.a)*A.yaxis._m,r=(l.c-p.c-l.b+p.b)*A.xaxis._m);var m=c(A.x0+r,A.y0+e);A.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",m);var I=c(-r,-e);A.clipDefRelative.select("path").attr("transform",I),A.aaxis.range=[p.a,A.sum-p.b-p.c],A.baxis.range=[A.sum-p.a-p.c,p.b],A.caxis.range=[A.sum-p.a-p.b,p.c],A.drawAxes(!1),A._hasClipOnAxisFalse&&A.plotContainer.select(".scatterlayer").selectAll(".trace").call(s.hideOutsideRangePoints,A),B.emit("plotly_relayouting",N(p))}function K(){t.call("_guiRelayout",B,N(p))}this.dragOptions={element:b,gd:B,plotinfo:{id:A.id,domain:B._fullLayout[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis},subplot:A.id,prepFn:function(t,u,s){A.dragOptions.xaxes=[A.xaxis],A.dragOptions.yaxes=[A.yaxis],r=B._fullLayout._invScaleX,e=B._fullLayout._invScaleY;var y=A.dragOptions.dragmode=B._fullLayout.dragmode;_(y)?A.dragOptions.minDrag=1:A.dragOptions.minDrag=void 0,"zoom"===y?(A.dragOptions.moveFn=H,A.dragOptions.clickFn=T,A.dragOptions.doneFn=L,function(r,e,t){var u=b.getBoundingClientRect();n=e-u.left,i=t-u.top,B._fullLayout._calcInverseTransform(B);var s=B._fullLayout._invTransform,y=o.apply3DTransform(s)(n,i);n=y[0],i=y[1],l={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=l,m=A.aaxis.range[1]-l.a,I=a(A.graphDiv._fullLayout[A.id].bgcolor).getLuminance(),g="M0,"+A.h+"L"+A.w/2+", 0L"+A.w+","+A.h+"Z",v=!1,G=E.append("path").attr("class","zoombox").attr("transform",c(A.x0,A.y0)).style({fill:I>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",g),C=E.append("path").attr("class","zoombox-corners").attr("transform",c(A.x0,A.y0)).style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),A.clearOutline(B)}(0,u,s)):"pan"===y?(A.dragOptions.moveFn=O,A.dragOptions.clickFn=T,A.dragOptions.doneFn=K,l={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=l,A.clearOutline(B)):(h(y)||_(y))&&x(t,u,s,A.dragOptions,y)}},b.onmousemove=function(r){f.hover(B,r,A.id),B._fullLayout._lasthover=b,B._fullLayout._hoversubplot=A.id},b.onmouseout=function(r){B._dragging||y.unhover(B,r)},y.init(this.dragOptions)}},24040:function(r,e,n){"use strict";var i=n(24248),a=n(16628),t=n(52416),o=n(63620),c=n(52200).addStyleRule,u=n(92880),d=n(45464),s=n(64859),l=u.extendFlat,m=u.extendDeepAll;function p(r){var n=r.name,a=r.categories,t=r.meta;if(e.modules[n])i.log("Type "+n+" already registered");else{e.subplotsRegistry[r.basePlotModule.name]||function(r){var n=r.name;if(e.subplotsRegistry[n])i.log("Plot type "+n+" already registered.");else for(var a in g(r),e.subplotsRegistry[n]=r,e.componentsRegistry)v(a,r.name)}(r.basePlotModule);for(var o={},u=0;u-1&&(l[p[n]].title={text:""});for(n=0;n")?"":e.html(r).text()}));return e.remove(),n}(P)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(s,"'"),a.isIE()&&(P=(P=(P=P.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),P}},84664:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e){for(var n=0;nl+d||!i(s))}for(var p=0;p=0)return r}else if("string"===typeof r&&"%"===(r=r.trim()).slice(-1)&&i(r.slice(0,-1))&&(r=+r.slice(0,-1))>=0)return r+"%"}function I(r,e,n,i,t,o){var c=!(!1===(o=o||{}).moduleHasSelected),u=!(!1===o.moduleHasUnselected),d=!(!1===o.moduleHasConstrain),s=!(!1===o.moduleHasCliponaxis),l=!(!1===o.moduleHasTextangle),p=!(!1===o.moduleHasInsideanchor),I=!!o.hasPathbar,y=Array.isArray(t)||"auto"===t,f=y||"inside"===t,g=y||"outside"===t;if(f||g){var _=m(i,"textfont",n.font),h=a.extendFlat({},_),v=!(r.textfont&&r.textfont.color);if(v&&delete h.color,m(i,"insidetextfont",h),I){var x=a.extendFlat({},_);v&&delete x.color,m(i,"pathbar.textfont",x)}g&&m(i,"outsidetextfont",_),c&&i("selected.textfont.color"),u&&i("unselected.textfont.color"),d&&i("constraintext"),s&&i("cliponaxis"),l&&i("textangle"),i("texttemplate")}f&&p&&i("insidetextanchor")}r.exports={supplyDefaults:function(r,e,n,i){function s(n,i){return a.coerce(r,e,l,n,i)}if(c(r,e,i,s)){u(r,e,i,s),s("xhoverformat"),s("yhoverformat"),s("zorder"),s("orientation",e.x&&!e.y?"h":"v"),s("base"),s("offset"),s("width"),s("text"),s("hovertext"),s("hovertemplate");var m=s("textposition");I(r,0,i,s,m,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),d(r,e,s,n,i);var p=(e.marker.line||{}).color,y=o.getComponentMethod("errorbars","supplyDefaults");y(r,e,p||t.defaultLine,{axis:"y"}),y(r,e,p||t.defaultLine,{axis:"x",inherit:"y"}),a.coerceSelectionMarkerOpacity(e,s)}else e.visible=!1},crossTraceDefaults:function(r,e){var n,i;function t(r,e){return a.coerce(i._input,i,l,r,e)}for(var o=0;ot))return e}return void 0!==n?n:r.dflt},e.coerceColor=function(r,e,n){return a(e).isValid()?e:void 0!==n?n:r.dflt},e.coerceEnumerated=function(r,e,n){return r.coerceNumber&&(e=+e),-1!==r.values.indexOf(e)?e:void 0!==n?n:r.dflt},e.getValue=function(r,e){var n;return t(r)?e0?e+=n:s<0&&(e-=n)}return e}function R(r){var e=s,n=r.b,a=w(r);return i.inbox(n-e,a-e,x+(a-e)/(a-n)-1)}var E=r[l+"a"],N=r[m+"a"];y=Math.abs(E.r2c(E.range[1])-E.r2c(E.range[0]));var T=i.getDistanceFunction(a,p,I,(function(r){return(p(r)+I(r))/2}));if(i.getClosest(f,T,r),!1!==r.index&&f[r.index].p!==d){C||(B=function(r){return Math.min(S(r),r.p-_.bargroupwidth/2)},k=function(r){return Math.max(A(r),r.p+_.bargroupwidth/2)});var D=f[r.index],J=g.base?D.b+D.s:D.s;r[m+"0"]=r[m+"1"]=N.c2p(D[m],!0),r[m+"LabelVal"]=J;var U=_.extents[_.extents.round(D.p)];r[l+"0"]=E.c2p(h?B(D):U[0],!0),r[l+"1"]=E.c2p(h?k(D):U[1],!0);var H=void 0!==D.orig_p;return r[l+"LabelVal"]=H?D.orig_p:D.p,r.labelLabel=u(E,r[l+"LabelVal"],g[l+"hoverformat"]),r.valueLabel=u(N,r[m+"LabelVal"],g[m+"hoverformat"]),r.baseLabel=u(N,D.b,g[m+"hoverformat"]),r.spikeDistance=(function(r){var e=s,n=r.b,a=w(r);return i.inbox(n-e,a-e,P+(a-e)/(a-n)-1)}(D)+function(r){return F(S(r),A(r),P)}(D))/2,r[l+"Spike"]=E.c2p(D.p,!0),o(D,g,r),r.hovertemplate=g.hovertemplate,r}}function l(r,e){var n=e.mcc||r.marker.color,i=e.mlcc||r.marker.line.color,a=c(r,e);return t.opacity(n)?n:t.opacity(i)&&a?i:void 0}r.exports={hoverPoints:function(r,e,n,i,t){var o=s(r,e,n,i,t);if(o){var c=o.cd,u=c[0].trace,d=c[o.index];return o.color=l(u,d),a.getComponentMethod("errorbars","hoverInfo")(d,u,o),[o]}},hoverOnBars:s,getTraceColor:l}},51132:function(r,e,n){"use strict";r.exports={attributes:n(20832),layoutAttributes:n(39324),supplyDefaults:n(31508).supplyDefaults,crossTraceDefaults:n(31508).crossTraceDefaults,supplyLayoutDefaults:n(37156),calc:n(71820),crossTraceCalc:n(96376).crossTraceCalc,colorbar:n(5528),arraysToCalcdata:n(84664),plot:n(98184).plot,style:n(60100).style,styleOnSelect:n(60100).styleOnSelect,hoverPoints:n(63400).hoverPoints,eventData:n(52160),selectPoints:n(45784),moduleType:"trace",name:"bar",basePlotModule:n(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(r){"use strict";r.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"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(r,e,n){"use strict";var i=n(24040),a=n(54460),t=n(3400),o=n(39324),c=n(31508).validateCornerradius;r.exports=function(r,e,n){function u(n,i){return t.coerce(r,e,o,n,i)}for(var d=!1,s=!1,l=!1,m={},p=u("barmode"),I=0;I0)-(r<0)}function S(r,e){return r0}function M(r,e,n,i,a){return!(r<0||e<0)&&(n<=r&&i<=e||n<=e&&i<=r||(a?r>=n*(e/i):e>=i*(r/n)))}function B(r){return"auto"===r?0:r}function k(r,e){var n=Math.PI/180*e,i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));return{x:r.width*a+r.height*i,y:r.width*i+r.height*a}}function F(r,e,n,i,a,t){var o=!!t.isHorizontal,c=!!t.constrained,u=t.angle||0,d=t.anchor,s="end"===d,l="start"===d,m=((t.leftToRight||0)+1)/2,p=1-m,I=t.hasB,y=t.r,f=t.overhead,g=a.width,_=a.height,h=Math.abs(e-r),v=Math.abs(i-n),P=h>2*x&&v>2*x?x:0;h-=2*P,v-=2*P;var G=B(u);"auto"!==u||g<=h&&_<=v||!(g>h||_>v)||(g>v||_>h)&&g<_===hx){var M=function(r,e,n,i,a,t,o,c,u){var d,s,l,m,p,I=Math.max(0,Math.abs(e-r)-2*x),y=Math.max(0,Math.abs(i-n)-2*x),f=t-x,g=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,_=u?2*f:c?f-o:2*g,h=u?2*f:c?2*g:f-o;return a.y/a.x>=y/(I-_)?m=y/a.y:a.y/a.x<=(y-h)/I?m=I/a.x:!u&&c?(d=a.x*a.x+a.y*a.y/4,l=(I-f)*(I-f)+(y/2-f)*(y/2-f)-f*f,m=(-(s=-2*a.x*(I-f)-a.y*(y/2-f))+Math.sqrt(s*s-4*d*l))/(2*d)):u?(d=(a.x*a.x+a.y*a.y)/4,l=(I/2-f)*(I/2-f)+(y/2-f)*(y/2-f)-f*f,m=(-(s=-a.x*(I/2-f)-a.y*(y/2-f))+Math.sqrt(s*s-4*d*l))/(2*d)):(d=a.x*a.x/4+a.y*a.y,l=(I/2-f)*(I/2-f)+(y-f)*(y-f)-f*f,m=(-(s=-a.x*(I/2-f)-2*a.y*(y-f))+Math.sqrt(s*s-4*d*l))/(2*d)),m=Math.min(1,m),p=c?Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(y-a.y*m)/2)*(f-(y-a.y*m)/2)))-o):Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(I-a.x*m)/2)*(f-(I-a.x*m)/2)))-o),{scale:m,pad:p}}(r,e,n,i,b,y,f,o,I);C=M.scale,A=M.pad}else C=1,c&&(C=Math.min(1,h/b.x,v/b.y)),A=0;var F=a.left*p+a.right*m,z=(a.top+a.bottom)/2,w=(r+x)*p+(e-x)*m,R=(n+i)/2,E=0,N=0;if(l||s){var T=(o?b.x:b.y)/2;y&&(s||I)&&(P+=A);var D=o?S(r,e):S(n,i);o?l?(w=r+D*P,E=-D*T):(w=e-D*P,E=D*T):l?(R=n+D*P,N=-D*T):(R=i-D*P,N=D*T)}return{textX:F,textY:z,targetX:w,targetY:R,anchorX:E,anchorY:N,scale:C,rotate:G}}r.exports={plot:function(r,e,n,l,f,g){var P=e.xaxis,z=e.yaxis,w=r._fullLayout,R=r._context.staticPlot;f||(f={mode:w.barmode,norm:w.barmode,gap:w.bargap,groupgap:w.bargroupgap},p("bar",w));var E=t.makeTraceGroups(l,n,"trace bars").each((function(n){var d=i.select(this),l=n[0].trace,p=n[0].t,E="waterfall"===l.type,N="funnel"===l.type,T="histogram"===l.type,D="bar"===l.type,J=D||N,U=0;E&&l.connector.visible&&"between"===l.connector.mode&&(U=l.connector.line.width/2);var H="h"===l.orientation,L=b(f),O=t.ensureSingle(d,"g","points"),K=G(l),V=O.selectAll("g.point").data(t.identity,K);V.enter().append("g").classed("point",!0),V.exit().remove(),V.each((function(d,G){var b,E,N=i.select(this),O=function(r,e,n,i){var a=[],t=[],o=i?e:n,c=i?n:e;return a[0]=o.c2p(r.s0,!0),t[0]=c.c2p(r.p0,!0),a[1]=o.c2p(r.s1,!0),t[1]=c.c2p(r.p1,!0),i?[a,t]:[t,a]}(d,P,z,H),K=O[0][0],V=O[0][1],j=O[1][0],W=O[1][1],Z=0===(H?V-K:W-j);if(Z&&J&&y.getLineWidth(l,d)&&(Z=!1),Z||(Z=!a(K)||!a(V)||!a(j)||!a(W)),d.isBlank=Z,Z&&(H?V=K:W=j),U&&!Z&&(H?(K-=S(K,V)*U,V+=S(K,V)*U):(j-=S(j,W)*U,W+=S(j,W)*U)),"waterfall"===l.type){if(!Z){var q=l[d.dir].marker;b=q.line.width,E=q.color}}else b=y.getLineWidth(l,d),E=d.mc||l.marker.color;function Y(r){var e=i.round(b/2%1,2);return 0===f.gap&&0===f.groupgap?i.round(Math.round(r)-e,2):r}var X=c.opacity(E)<1||b>.01?Y:function(r,e,n){return n&&r===e?r:Math.abs(r-e)>=2?Y(r):r>e?Math.ceil(r):Math.floor(r)};r._context.staticPlot||(K=X(K,V,H),V=X(V,K,H),j=X(j,W,!H),W=X(W,j,!H));var Q,$=H?P.c2p:z.c2p;Q=d.s0>0?d._sMax:d.s0<0?d._sMin:d.s1>0?d._sMax:d._sMin;var rr,er,nr=D||T?function(r,e){if(!r)return 0;var n,i=H?Math.abs(W-j):Math.abs(V-K),a=H?Math.abs(V-K):Math.abs(W-j),t=X(Math.abs($(Q,!0)-$(0,!0))),o=d.hasB?Math.min(i/2,a/2):Math.min(i/2,t);return n="%"===e?i*(Math.min(50,r)/100):r,X(Math.max(Math.min(n,o),0))}(p.cornerradiusvalue,p.cornerradiusform):0,ir="M"+K+","+j+"V"+W+"H"+V+"V"+j+"Z",ar=0;if(nr&&d.s){var tr=0===C(d.s0)||C(d.s)===C(d.s0)?d.s1:d.s0;if((ar=X(d.hasB?0:Math.abs($(Q,!0)-$(tr,!0))))0?Math.sqrt(ar*(2*nr-ar)):0,lr=or>0?Math.max:Math.min;rr="M"+K+","+j+"V"+(W-dr*cr)+"H"+lr(V-(nr-ar)*or,K)+"A "+nr+","+nr+" 0 0 "+ur+" "+V+","+(W-nr*cr-sr)+"V"+(j+nr*cr+sr)+"A "+nr+","+nr+" 0 0 "+ur+" "+lr(V-(nr-ar)*or,K)+","+(j+dr*cr)+"Z"}else if(d.hasB)rr="M"+(K+nr*or)+","+j+"A "+nr+","+nr+" 0 0 "+ur+" "+K+","+(j+nr*cr)+"V"+(W-nr*cr)+"A "+nr+","+nr+" 0 0 "+ur+" "+(K+nr*or)+","+W+"H"+(V-nr*or)+"A "+nr+","+nr+" 0 0 "+ur+" "+V+","+(W-nr*cr)+"V"+(j+nr*cr)+"A "+nr+","+nr+" 0 0 "+ur+" "+(V-nr*or)+","+j+"Z";else{var mr=(er=Math.abs(W-j)+ar)0?Math.sqrt(ar*(2*nr-ar)):0,Ir=cr>0?Math.max:Math.min;rr="M"+(K+mr*or)+","+j+"V"+Ir(W-(nr-ar)*cr,j)+"A "+nr+","+nr+" 0 0 "+ur+" "+(K+nr*or-pr)+","+W+"H"+(V-nr*or+pr)+"A "+nr+","+nr+" 0 0 "+ur+" "+(V-mr*or)+","+Ir(W-(nr-ar)*cr,j)+"V"+j+"Z"}}else rr=ir}else rr=ir;var yr=A(t.ensureSingle(N,"path"),w,f,g);if(yr.style("vector-effect",R?"none":"non-scaling-stroke").attr("d",isNaN((V-K)*(W-j))||Z&&r._context.staticPlot?"M0,0Z":rr).call(u.setClipUrl,e.layerClipId,r),!w.uniformtext.mode&&L){var fr=u.makePointStyleFns(l);u.singlePointStyle(d,yr,l,fr,r)}!function(r,e,n,i,a,c,d,l,p,f,g,P,G){var C,b=e.xaxis,z=e.yaxis,w=r._fullLayout;function R(e,n,i){return t.ensureSingle(e,"text").text(n).attr({class:"bartext bartext-"+C,"text-anchor":"middle","data-notex":1}).call(u.font,i).call(o.convertToTspans,r)}var E=i[0].trace,N="h"===E.orientation,T=function(r,e,n,i,a){var o,c=e[0].trace,u=c.texttemplate;return o=u?function(r,e,n,i,a){var o=e[0].trace,c=t.castOption(o,n,"texttemplate");if(!c)return"";var u,d,l,m,p="histogram"===o.type,I="waterfall"===o.type,y="funnel"===o.type,f="h"===o.orientation;function g(r){return s(d,d.c2l(r),!0).text}function _(r){return s(m,m.c2l(r),!0).text}f?(u="y",d=a,l="x",m=i):(u="x",d=i,l="y",m=a);var h=e[n],x={};x.label=h.p,x.labelLabel=x[u+"Label"]=g(h.p);var P=t.castOption(o,h.i,"text");(0===P||P)&&(x.text=P),x.value=h.s,x.valueLabel=x[l+"Label"]=_(h.s);var G={};v(G,o,h.i),(p||void 0===G.x)&&(G.x=f?x.value:x.label),(p||void 0===G.y)&&(G.y=f?x.label:x.value),(p||void 0===G.xLabel)&&(G.xLabel=f?x.valueLabel:x.labelLabel),(p||void 0===G.yLabel)&&(G.yLabel=f?x.labelLabel:x.valueLabel),I&&(x.delta=+h.rawS||h.s,x.deltaLabel=_(x.delta),x.final=h.v,x.finalLabel=_(x.final),x.initial=x.final-x.delta,x.initialLabel=_(x.initial)),y&&(x.value=h.s,x.valueLabel=_(x.value),x.percentInitial=h.begR,x.percentInitialLabel=t.formatPercent(h.begR),x.percentPrevious=h.difR,x.percentPreviousLabel=t.formatPercent(h.difR),x.percentTotal=h.sumR,x.percenTotalLabel=t.formatPercent(h.sumR));var C=t.castOption(o,h.i,"customdata");return C&&(x.customdata=C),t.texttemplateString(c,x,r._d3locale,G,x,o._meta||{})}(r,e,n,i,a):c.textinfo?function(r,e,n,i){var a=r[0].trace,o="h"===a.orientation,c="waterfall"===a.type,u="funnel"===a.type;function d(r){return s(o?i:n,r,!0).text}function l(r){return s(o?n:i,+r,!0).text}var m,p=a.textinfo,I=r[e],y=p.split("+"),f=[],g=function(r){return-1!==y.indexOf(r)};if(g("label")&&f.push(d(r[e].p)),g("text")&&(0===(m=t.castOption(a,I.i,"text"))||m)&&f.push(m),c){var _=+I.rawS||I.s,h=I.v,v=h-_;g("initial")&&f.push(l(v)),g("delta")&&f.push(l(_)),g("final")&&f.push(l(h))}if(u){g("value")&&f.push(l(I.s));var x=0;g("percent initial")&&x++,g("percent previous")&&x++,g("percent total")&&x++;var P=x>1;g("percent initial")&&(m=t.formatPercent(I.begR),P&&(m+=" of initial"),f.push(m)),g("percent previous")&&(m=t.formatPercent(I.difR),P&&(m+=" of previous"),f.push(m)),g("percent total")&&(m=t.formatPercent(I.sumR),P&&(m+=" of total"),f.push(m))}return f.join("
")}(e,n,i,a):y.getValue(c.text,n),y.coerceString(_,o)}(w,i,a,b,z);C=function(r,e){var n=y.getValue(r.textposition,e);return y.coerceEnumerated(h,n)}(E,a);var D="stack"===P.mode||"relative"===P.mode,J=i[a],U=!D||J._outmost,H=J.hasB,L=f&&f-g>x;if(T&&"none"!==C&&(!J.isBlank&&c!==d&&l!==p||"auto"!==C&&"inside"!==C)){var O=w.font,K=I.getBarColor(i[a],E),V=I.getInsideTextFont(E,a,O,K),j=I.getOutsideTextFont(E,a,O),W=E.insidetextanchor||"end",Z=n.datum();N?"log"===b.type&&Z.s0<=0&&(c=b.range[0]0&&Q>0;ar=L?H?M(nr-2*f,ir,X,Q,N)||M(nr,ir-2*f,X,Q,N):N?M(nr-(f-g),ir,X,Q,N)||M(nr,ir-2*(f-g),X,Q,N):M(nr,ir-(f-g),X,Q,N)||M(nr-2*(f-g),ir,X,Q,N):M(nr,ir,X,Q,N),tr&&ar?C="inside":(C="outside",q.remove(),q=null)}else C="inside";if(!q){var or=(q=R(n,T,$=t.ensureUniformFontSize(r,"outside"===C?j:V))).attr("transform");if(q.attr("transform",""),X=(Y=u.bBox(q.node())).width,Q=Y.height,q.attr("transform",or),X<=0||Q<=0)return void q.remove()}var cr,ur=E.textangle;cr="outside"===C?function(r,e,n,i,a,t){var o,c=!!t.isHorizontal,u=!!t.constrained,d=t.angle||0,s=a.width,l=a.height,m=Math.abs(e-r),p=Math.abs(i-n);o=c?p>2*x?x:0:m>2*x?x:0;var I=1;u&&(I=c?Math.min(1,p/l):Math.min(1,m/s));var y=B(d),f=k(a,y),g=(c?f.x:f.y)/2,_=(a.left+a.right)/2,h=(a.top+a.bottom)/2,v=(r+e)/2,P=(n+i)/2,G=0,C=0,A=c?S(e,r):S(n,i);return c?(v=e-A*o,G=A*g):(P=i+A*o,C=-A*g),{textX:_,textY:h,targetX:v,targetY:P,anchorX:G,anchorY:C,scale:I,rotate:y}}(c,d,l,p,Y,{isHorizontal:N,constrained:"both"===E.constraintext||"outside"===E.constraintext,angle:ur}):F(c,d,l,p,Y,{isHorizontal:N,constrained:"both"===E.constraintext||"inside"===E.constraintext,angle:ur,anchor:W,hasB:H,r:f,overhead:g}),cr.fontSize=$.size,m("histogram"===E.type?"bar":E.type,cr,w),J.transform=cr;var dr=A(q,w,P,G);t.setTransormAndDisplay(dr,cr)}else n.select("text").remove()}(r,e,N,n,G,K,V,j,W,nr,ar,f,g),e.layerClipId&&u.hideOutsideRangePoint(d,N.select("text"),P,z,l.xcalendar,l.ycalendar)}));var j=!1===l.cliponaxis;u.setClipUrl(d,j?null:e.layerClipId,r)}));d.getComponentMethod("errorbars","plot")(r,E,e,f)},toMoveInsideBar:F}},45784:function(r){"use strict";function e(r,e,n,i,a){var t=e.c2p(i?r.s0:r.p0,!0),o=e.c2p(i?r.s1:r.p1,!0),c=n.c2p(i?r.p0:r.s0,!0),u=n.c2p(i?r.p1:r.s1,!0);return a?[(t+o)/2,(c+u)/2]:i?[o,(c+u)/2]:[(t+o)/2,u]}r.exports=function(r,n){var i,a=r.cd,t=r.xaxis,o=r.yaxis,c=a[0].trace,u="funnel"===c.type,d="h"===c.orientation,s=[];if(!1===n)for(i=0;i1||0===a.bargap&&0===a.bargroupgap&&!r[0].trace.marker.line.width)&&i.select(this).attr("shape-rendering","crispEdges")})),e.selectAll("g.points").each((function(e){I(i.select(this),e[0].trace,r)})),c.getComponentMethod("errorbars","style")(e)},styleTextPoints:y,styleOnSelect:function(r,e,n){var a=e[0].trace;a.selectedpoints?function(r,e,n){t.selectedPointStyle(r.selectAll("path"),e),function(r,e,n){r.each((function(r){var a,c=i.select(this);if(r.selected){a=o.ensureUniformFontSize(n,f(c,r,e,n));var u=e.selected.textfont&&e.selected.textfont.color;u&&(a.color=u),t.font(c,a)}else t.selectedTextStyle(c,e)}))}(r.selectAll("text"),e,n)}(n,a,r):(I(n,a,r),c.getComponentMethod("errorbars","style")(n))},getInsideTextFont:_,getOutsideTextFont:h,getBarColor:x,resizeText:u}},55592:function(r,e,n){"use strict";var i=n(76308),a=n(94288).hasColorscale,t=n(27260),o=n(3400).coercePattern;r.exports=function(r,e,n,c,u){var d=n("marker.color",c),s=a(r,"marker");s&&t(r,e,u,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",i.defaultLine),a(r,"marker.line")&&t(r,e,u,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),o(n,"marker.pattern",d,s),n("selected.marker.color"),n("unselected.marker.color")}},82744:function(r,e,n){"use strict";var i=n(33428),a=n(3400);function t(r){return"_"+r+"Text_minsize"}r.exports={recordMinTextSize:function(r,e,n){if(n.uniformtext.mode){var i=t(r),a=n.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=om.range[1]&&(h+=Math.PI),i.getClosest(d,(function(r){return y(_,h,[r.rp0,r.rp1],[r.thetag0,r.thetag1],I)?f+Math.min(1,Math.abs(r.thetag1-r.thetag0)/g)-1+(r.rp1-_)/(r.rp1-r.rp0)-1:1/0}),r),!1!==r.index){var v=d[r.index];r.x0=r.x1=v.ct[0],r.y0=r.y1=v.ct[1];var x=a.extendFlat({},v,{r:v.s,theta:v.p});return o(v,s,r),c(x,s,l,r),r.hovertemplate=s.hovertemplate,r.color=t(s,v),r.xLabelVal=r.yLabelVal=void 0,v.s<0&&(r.idealAlign="left"),[r]}}},94456:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"barpolar",basePlotModule:n(40872),categories:["polar","bar","showLegend"],attributes:n(78100),layoutAttributes:n(9320),supplyDefaults:n(70384),supplyLayoutDefaults:n(89580),calc:n(47056).calc,crossTraceCalc:n(47056).crossTraceCalc,plot:n(42040),colorbar:n(5528),formatLabels:n(22852),style:n(60100).style,styleOnSelect:n(60100).styleOnSelect,hoverPoints:n(68896),selectPoints:n(45784),meta:{}}},9320:function(r){"use strict";r.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(r,e,n){"use strict";var i=n(3400),a=n(9320);r.exports=function(r,e,n){var t,o={};function c(n,o){return i.coerce(r[t]||{},e[t],a,n,o)}for(var u=0;u0?(d=o,s=u):(d=u,s=o);var l=[c.findEnclosingVertexAngles(d,r.vangles)[0],(d+s)/2,c.findEnclosingVertexAngles(s,r.vangles)[1]];return c.pathPolygonAnnulus(i,a,d,s,l,e,n)}:function(r,i,a,o){return t.pathAnnulus(r,i,a,o,e,n)}}(e),I=e.layers.frontplot.select("g.barlayer");t.makeTraceGroups(I,n,"trace bars").each((function(){var n=i.select(this),c=t.ensureSingle(n,"g","points").selectAll("g.point").data(t.identity);c.enter().append("g").style("vector-effect",u?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),c.exit().remove(),c.each((function(r){var e,n=i.select(this),o=r.rp0=l.c2p(r.s0),c=r.rp1=l.c2p(r.s1),u=r.thetag0=m.c2g(r.p0),I=r.thetag1=m.c2g(r.p1);if(a(o)&&a(c)&&a(u)&&a(I)&&o!==c&&u!==I){var y=l.c2g(r.s1),f=(u+I)/2;r.ct=[d.c2p(y*Math.cos(f)),s.c2p(y*Math.sin(f))],e=p(o,c,u,I)}else e="M0,0Z";t.ensureSingle(n,"path").attr("d",e)})),o.setClipUrl(n,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,r)}))}},63188:function(r,e,n){"use strict";var i=n(98304),a=n(52904),t=n(20832),o=n(22548),c=n(29736).axisHoverFormat,u=n(21776).Ks,d=n(92880).extendFlat,s=a.marker,l=s.line;r.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"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:a.xperiod,yperiod:a.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:a.xperiodalignment,yperiodalignment:a.yperiodalignment,xhoverformat:c("x"),yhoverformat:c("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:d({},s.symbol,{arrayOk:!1,editType:"plot"}),opacity:d({},s.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:d({},s.angle,{arrayOk:!1,editType:"calc"}),size:d({},s.size,{arrayOk:!1,editType:"calc"}),color:d({},s.color,{arrayOk:!1,editType:"style"}),line:{color:d({},l.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:d({},l.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:i(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:t.offsetgroup,alignmentgroup:t.alignmentgroup,selected:{marker:a.selected.marker,editType:"style"},unselected:{marker:a.unselected.marker,editType:"style"},text:d({},a.text,{}),hovertext:d({},a.hovertext,{}),hovertemplate:u({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:a.zorder}},62555:function(r,e,n){"use strict";var i=n(38248),a=n(54460),t=n(1220),o=n(3400),c=n(39032).BADNUM,u=o._;r.exports=function(r,e){var n,d,_,h,v,x,P,G=r._fullLayout,C=a.getFromId(r,e.xaxis||"x"),S=a.getFromId(r,e.yaxis||"y"),A=[],b="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(_=C,h="x",v=S,x="y",P=!!e.yperiodalignment):(_=S,h="y",v=C,x="x",P=!!e.xperiodalignment);var M,B,k,F,z,w,R=function(r,e,n,a){var c,u=e in r,d=e+"0"in r,s="d"+e in r;if(u||d&&s){var l=n.makeCalcdata(r,e);return[t(r,n,e,l).vals,l]}c=d?r[e+"0"]:"name"in r&&("category"===n.type||i(r.name)&&-1!==["linear","log"].indexOf(n.type)||o.isDateTime(r.name)&&"date"===n.type)?r.name:a;for(var m="multicategory"===n.type?n.r2c_just_indices(c):n.d2c(c,0,r[e+"calendar"]),p=r._length,I=new Array(p),y=0;yM.uf};if(e._hasPreCompStats){var H=e[h],L=function(r){return _.d2c((e[r]||[])[n])},O=1/0,K=-1/0;for(n=0;n=M.q1&&M.q3>=M.med){var j=L("lowerfence");M.lf=j!==c&&j<=M.q1?j:p(M,k,F);var W=L("upperfence");M.uf=W!==c&&W>=M.q3?W:I(M,k,F);var Z=L("mean");M.mean=Z!==c?Z:F?o.mean(k,F):(M.q1+M.q3)/2;var q=L("sd");M.sd=Z!==c&&q>=0?q:F?o.stdev(k,F,M.mean):M.q3-M.q1,M.lo=y(M),M.uo=f(M);var Y=L("notchspan");Y=Y!==c&&Y>0?Y:g(M,F),M.ln=M.med-Y,M.un=M.med+Y;var X=M.lf,Q=M.uf;e.boxpoints&&k.length&&(X=Math.min(X,k[0]),Q=Math.max(Q,k[F-1])),e.notched&&(X=Math.min(X,M.ln),Q=Math.max(Q,M.un)),M.min=X,M.max=Q}else{var $;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+M.q1,"median = "+M.med,"q3 = "+M.q3].join("\n")),$=M.med!==c?M.med:M.q1!==c?M.q3!==c?(M.q1+M.q3)/2:M.q1:M.q3!==c?M.q3:0,M.med=$,M.q1=M.q3=$,M.lf=M.uf=$,M.mean=M.sd=$,M.ln=M.un=$,M.min=M.max=$}O=Math.min(O,M.min),K=Math.max(K,M.max),M.pts2=B.filter(U),A.push(M)}}e._extremes[_._id]=a.findExtremes(_,[O,K],{padded:!0})}else{var rr=_.makeCalcdata(e,h),er=function(r,e){for(var n=r.length,i=new Array(n+1),a=0;a=0&&ar0){var sr,lr;(M={}).pos=M[x]=D[n],B=M.pts=ir[n].sort(l),F=(k=M[h]=B.map(m)).length,M.min=k[0],M.max=k[F-1],M.mean=o.mean(k,F),M.sd=o.stdev(k,F,M.mean)*e.sdmultiple,M.med=o.interp(k,.5),F%2&&(ur||dr)?(ur?(sr=k.slice(0,F/2),lr=k.slice(F/2+1)):dr&&(sr=k.slice(0,F/2+1),lr=k.slice(F/2)),M.q1=o.interp(sr,.5),M.q3=o.interp(lr,.5)):(M.q1=o.interp(k,.25),M.q3=o.interp(k,.75)),M.lf=p(M,k,F),M.uf=I(M,k,F),M.lo=y(M),M.uo=f(M);var mr=g(M,F);M.ln=M.med-mr,M.un=M.med+mr,tr=Math.min(tr,M.ln),or=Math.max(or,M.un),M.pts2=B.filter(U),A.push(M)}e.notched&&o.isTypedArray(rr)&&(rr=Array.from(rr)),e._extremes[_._id]=a.findExtremes(_,e.notched?rr.concat([tr,or]):rr,{padded:!0})}return function(r,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var n=0;n0?(A[0].t={num:G[b],dPos:J,posLetter:x,valLetter:h,labels:{med:u(r,"median:"),min:u(r,"min:"),q1:u(r,"q1:"),q3:u(r,"q3:"),max:u(r,"max:"),mean:"sd"===e.boxmean||"sd"===e.sizemode?u(r,"mean \xb1 \u03c3:").replace("\u03c3",1===e.sdmultiple?"\u03c3":e.sdmultiple+"\u03c3"):u(r,"mean:"),lf:u(r,"lower fence:"),uf:u(r,"upper fence:")}},G[b]++,A):[{t:{empty:!0}}]};var d={text:"tx",hovertext:"htx"};function s(r,e,n){for(var i in d)o.isArrayOrTypedArray(e[i])&&(Array.isArray(n)?o.isArrayOrTypedArray(e[i][n[0]])&&(r[d[i]]=e[i][n[0]][n[1]]):r[d[i]]=e[i][n])}function l(r,e){return r.v-e.v}function m(r){return r.v}function p(r,e,n){return 0===n?r.q1:Math.min(r.q1,e[Math.min(o.findBin(2.5*r.q1-1.5*r.q3,e,!0)+1,n-1)])}function I(r,e,n){return 0===n?r.q3:Math.max(r.q3,e[Math.max(o.findBin(2.5*r.q3-1.5*r.q1,e),0)])}function y(r){return 4*r.q1-3*r.q3}function f(r){return 4*r.q3-3*r.q1}function g(r,e){return 0===e?0:1.57*(r.q3-r.q1)/Math.sqrt(e)}},96404:function(r,e,n){"use strict";var i=n(54460),a=n(3400),t=n(71888).getAxisGroup,o=["v","h"];function c(r,e,n,o){var c,u,d,s=e.calcdata,l=e._fullLayout,m=o._id,p=m.charAt(0),I=[],y=0;for(c=0;c1,v=1-l[r+"gap"],x=1-l[r+"groupgap"];for(c=0;c0){var K=M.pointpos,V=M.jitter,j=M.marker.size/2,W=0;K+V>=0&&((W=L*(K+V))>A?(O=!0,U=j,D=W):W>N&&(U=j,D=A)),W<=A&&(D=A);var Z=0;K-V<=0&&((Z=-L*(K-V))>b?(O=!0,H=j,J=Z):Z>T&&(H=j,J=b)),Z<=b&&(J=b)}else D=A,J=b;var q=new Array(d.length);for(u=0;u0?(f="v",g=h>0?Math.min(x,v):Math.min(v)):h>0?(f="h",g=Math.min(x)):g=0;if(g){e._length=g;var b=n("orientation",f);e._hasPreCompStats?"v"===b&&0===h?(n("x0",0),n("dx",1)):"h"===b&&0===_&&(n("y0",0),n("dy",1)):"v"===b&&0===h?n("x0"):"h"===b&&0===_&&n("y0"),a.getComponentMethod("calendars","handleTraceDefaults")(r,e,["x","y"],t)}else e.visible=!1}function l(r,e,n,a){var t=a.prefix,o=i.coerce2(r,e,d,"marker.outliercolor"),c=n("marker.line.outliercolor"),u="outliers";e._hasPreCompStats?u="all":(o||c)&&(u="suspectedoutliers");var s=n(t+"points",u);s?(n("jitter","all"===s?.3:0),n("pointpos","all"===s?-1.5:0),n("marker.symbol"),n("marker.opacity"),n("marker.size"),n("marker.angle"),n("marker.color",e.line.color),n("marker.line.color"),n("marker.line.width"),"suspectedoutliers"===s&&(n("marker.line.outliercolor",e.marker.color),n("marker.line.outlierwidth")),n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size"),n("text"),n("hovertext")):delete e.marker;var l=n("hoveron");"all"!==l&&-1===l.indexOf("points")||n("hovertemplate"),i.coerceSelectionMarkerOpacity(e,n)}r.exports={supplyDefaults:function(r,e,n,a){function c(n,a){return i.coerce(r,e,d,n,a)}if(s(r,e,c,a),!1!==e.visible){o(r,e,a,c),c("xhoverformat"),c("yhoverformat");var u=e._hasPreCompStats;u&&(c("lowerfence"),c("upperfence")),c("line.color",(r.marker||{}).color||n),c("line.width"),c("fillcolor",t.addOpacity(e.line.color,.5));var m=!1;if(u){var p=c("mean"),I=c("sd");p&&p.length&&(m=!0,I&&I.length&&(m="sd"))}c("whiskerwidth");var y,f=c("sizemode");"quartiles"===f&&(y=c("boxmean",m)),c("showwhiskers","quartiles"===f),"sd"!==f&&"sd"!==y||c("sdmultiple"),c("width"),c("quartilemethod");var g=!1;if(u){var _=c("notchspan");_&&_.length&&(g=!0)}else i.validate(r.notchwidth,d.notchwidth)&&(g=!0);c("notched",g)&&c("notchwidth"),l(r,e,c,{prefix:"box"}),c("zorder")}},crossTraceDefaults:function(r,e){var n,a;function t(r){return i.coerce(a._input,a,d,r)}for(var o=0;or.lo&&(x.so=!0)}return t}));I.enter().append("path").classed("point",!0),I.exit().remove(),I.call(t.translatePoints,u,d)}function s(r,e,n,t){var o,c,u=e.val,d=e.pos,s=!!d.rangebreaks,l=t.bPos,m=t.bPosPxOffset||0,p=n.boxmean||(n.meanline||{}).visible;Array.isArray(t.bdPos)?(o=t.bdPos[0],c=t.bdPos[1]):(o=t.bdPos,c=t.bdPos);var I=r.selectAll("path.mean").data("box"===n.type&&n.boxmean||"violin"===n.type&&n.box.visible&&n.meanline.visible?a.identity:[]);I.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),I.exit().remove(),I.each((function(r){var e=d.c2l(r.pos+l,!0),a=d.l2p(e-o)+m,t=d.l2p(e+c)+m,I=s?(a+t)/2:d.l2p(e)+m,y=u.c2p(r.mean,!0),f=u.c2p(r.mean-r.sd,!0),g=u.c2p(r.mean+r.sd,!0);"h"===n.orientation?i.select(this).attr("d","M"+y+","+a+"V"+t+("sd"===p?"m0,0L"+f+","+I+"L"+y+","+a+"L"+g+","+I+"Z":"")):i.select(this).attr("d","M"+a+","+y+"H"+t+("sd"===p?"m0,0L"+I+","+f+"L"+a+","+y+"L"+I+","+g+"Z":""))}))}r.exports={plot:function(r,e,n,t){var o=r._context.staticPlot,c=e.xaxis,l=e.yaxis;a.makeTraceGroups(t,n,"trace boxes").each((function(r){var e,n,a=i.select(this),t=r[0],m=t.t,p=t.trace;m.wdPos=m.bdPos*p.whiskerwidth,!0!==p.visible||m.empty?a.remove():("h"===p.orientation?(e=l,n=c):(e=c,n=l),u(a,{pos:e,val:n},p,m,o),d(a,{x:c,y:l},p,m),s(a,{pos:e,val:n},p,m))}))},plotBoxAndWhiskers:u,plotPoints:d,plotBoxMean:s}},8264:function(r){"use strict";r.exports=function(r,e){var n,i,a=r.cd,t=r.xaxis,o=r.yaxis,c=[];if(!1===e)for(n=0;n=10)return null;for(var n=1/0,t=-1/0,o=r.length,c=0;c0?Math.floor:Math.ceil,z=B>0?Math.ceil:Math.floor,w=B>0?Math.min:Math.max,R=B>0?Math.max:Math.min,E=F(b+k),N=z(M-k),T=[[l=A(b)]];for(t=E;t*B=0;a--)t[s-a]=r[l][a],o[s-a]=e[l][a];for(c.push({x:t,y:o,bicubic:u}),a=l,t=[],o=[];a>=0;a--)t[l-a]=r[a][0],o[l-a]=e[a][0];return c.push({x:t,y:o,bicubic:d}),c}},19216:function(r,e,n){"use strict";var i=n(54460),a=n(92880).extendFlat;r.exports=function(r,e,n){var t,o,c,u,d,s,l,m,p,I,y,f,g,_,h=r["_"+e],v=r[e+"axis"],x=v._gridlines=[],P=v._minorgridlines=[],G=v._boundarylines=[],C=r["_"+n],S=r[n+"axis"];"array"===v.tickmode&&(v.tickvals=h.slice());var A=r._xctrl,b=r._yctrl,M=A[0].length,B=A.length,k=r._a.length,F=r._b.length;i.prepTicks(v),"array"===v.tickmode&&delete v.tickvals;var z=v.smoothing?3:1;function w(i){var a,t,o,c,u,d,s,l,p,I,y,f,g=[],_=[],h={};if("b"===e)for(t=r.b2j(i),o=Math.floor(Math.max(0,Math.min(F-2,t))),c=t-o,h.length=F,h.crossLength=k,h.xy=function(e){return r.evalxy([],e,t)},h.dxy=function(e,n){return r.dxydi([],e,o,n,c)},a=0;a0&&(p=r.dxydi([],a-1,o,0,c),g.push(u[0]+p[0]/3),_.push(u[1]+p[1]/3),I=r.dxydi([],a-1,o,1,c),g.push(l[0]-I[0]/3),_.push(l[1]-I[1]/3)),g.push(l[0]),_.push(l[1]),u=l;else for(a=r.a2i(i),d=Math.floor(Math.max(0,Math.min(k-2,a))),s=a-d,h.length=k,h.crossLength=F,h.xy=function(e){return r.evalxy([],a,e)},h.dxy=function(e,n){return r.dxydj([],d,e,s,n)},t=0;t0&&(y=r.dxydj([],d,t-1,s,0),g.push(u[0]+y[0]/3),_.push(u[1]+y[1]/3),f=r.dxydj([],d,t-1,s,1),g.push(l[0]-f[0]/3),_.push(l[1]-f[1]/3)),g.push(l[0]),_.push(l[1]),u=l;return h.axisLetter=e,h.axis=v,h.crossAxis=S,h.value=i,h.constvar=n,h.index=m,h.x=g,h.y=_,h.smoothing=S.smoothing,h}function R(i){var a,t,o,c,u,d=[],s=[],l={};if(l.length=h.length,l.crossLength=C.length,"b"===e)for(o=Math.max(0,Math.min(F-2,i)),u=Math.min(1,Math.max(0,i-o)),l.xy=function(e){return r.evalxy([],e,i)},l.dxy=function(e,n){return r.dxydi([],e,o,n,u)},a=0;ah.length-1||x.push(a(R(o),{color:v.gridcolor,width:v.gridwidth,dash:v.griddash}));for(m=s;mh.length-1)&&!(y<0||y>h.length-1))for(f=h[c],g=h[y],t=0;th[h.length-1]||P.push(a(w(I),{color:v.minorgridcolor,width:v.minorgridwidth,dash:v.minorgriddash}));v.startline&&G.push(a(R(0),{color:v.startlinecolor,width:v.startlinewidth})),v.endline&&G.push(a(R(h.length-1),{color:v.endlinecolor,width:v.endlinewidth}))}else{for(u=5e-15,s=(d=[Math.floor((h[h.length-1]-v.tick0)/v.dtick*(1+u)),Math.ceil((h[0]-v.tick0)/v.dtick/(1+u))].sort((function(r,e){return r-e})))[0],l=d[1],m=s;m<=l;m++)p=v.tick0+v.dtick*m,x.push(a(w(p),{color:v.gridcolor,width:v.gridwidth,dash:v.griddash}));for(m=s-1;mh[h.length-1]||P.push(a(w(I),{color:v.minorgridcolor,width:v.minorgridwidth,dash:v.minorgriddash}));v.startline&&G.push(a(w(h[0]),{color:v.startlinecolor,width:v.startlinewidth})),v.endline&&G.push(a(w(h[h.length-1]),{color:v.endlinecolor,width:v.endlinewidth}))}}},14724:function(r,e,n){"use strict";var i=n(54460),a=n(92880).extendFlat;r.exports=function(r,e){var n,t,o,c=e._labels=[],u=e._gridlines;for(n=0;ne.length&&(r=r.slice(0,e.length)):r=[],a=0;a90&&(p-=180,u=-u),{angle:p,flip:u,p:r.c2p(i,e,n),offsetMultplier:d}}},164:function(r,e,n){"use strict";var i=n(33428),a=n(43616),t=n(87072),o=n(53416),c=n(15584),u=n(72736),d=n(3400),s=d.strRotate,l=d.strTranslate,m=n(84284);function p(r,e,n,c,u,d,s){var l="const-"+u+"-lines",m=n.selectAll("."+l).data(d);m.enter().append("path").classed(l,!0).style("vector-effect",s?"none":"non-scaling-stroke"),m.each((function(n){var c=n,u=c.x,d=c.y,s=t([],u,r.c2p),l=t([],d,e.c2p),m="M"+o(s,l,c.smoothing);i.select(this).attr("d",m).style("stroke-width",c.width).style("stroke",c.color).style("stroke-dasharray",a.dashStyle(c.dash,c.width)).style("fill","none")})),m.exit().remove()}function I(r,e,n,t,o,d,m,p){var I=d.selectAll("text."+p).data(m);I.enter().append("text").classed(p,!0);var y=0,f={};return I.each((function(o,d){var m;if("auto"===o.axis.tickangle)m=c(t,e,n,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;m=c(t,e,n,o.xy,[Math.cos(p),Math.sin(p)])}d||(f={angle:m.angle,flip:m.flip});var I=(o.endAnchor?-1:1)*m.flip,g=i.select(this).attr({"text-anchor":I>0?"start":"end","data-notex":1}).call(a.font,o.font).text(o.text).call(u.convertToTspans,r),_=a.bBox(this);g.attr("transform",l(m.p[0],m.p[1])+s(m.angle)+l(o.axis.labelpadding*I,.3*_.height)),y=Math.max(y,_.width+o.axis.labelpadding)})),I.exit().remove(),f.maxExtent=y,f}r.exports=function(r,e,n,a){var u=r._context.staticPlot,s=e.xaxis,l=e.yaxis,m=r._fullLayout._clips;d.makeTraceGroups(a,n,"trace").each((function(e){var n=i.select(this),a=e[0],y=a.trace,f=y.aaxis,_=y.baxis,h=d.ensureSingle(n,"g","minorlayer"),v=d.ensureSingle(n,"g","majorlayer"),x=d.ensureSingle(n,"g","boundarylayer"),P=d.ensureSingle(n,"g","labellayer");n.style("opacity",y.opacity),p(s,l,v,0,"a",f._gridlines,!0),p(s,l,v,0,"b",_._gridlines,!0),p(s,l,h,0,"a",f._minorgridlines,!0),p(s,l,h,0,"b",_._minorgridlines,!0),p(s,l,x,0,"a-boundary",f._boundarylines,u),p(s,l,x,0,"b-boundary",_._boundarylines,u);var G=I(r,s,l,y,0,P,f._labels,"a-label"),C=I(r,s,l,y,0,P,_._labels,"b-label");!function(r,e,n,i,a,t,o,u){var s,l,m,p,I=d.aggNums(Math.min,null,n.a),y=d.aggNums(Math.max,null,n.a),f=d.aggNums(Math.min,null,n.b),_=d.aggNums(Math.max,null,n.b);s=.5*(I+y),l=f,m=n.ab2xy(s,l,!0),p=n.dxyda_rough(s,l),void 0===o.angle&&d.extendFlat(o,c(n,a,t,m,n.dxydb_rough(s,l))),g(r,e,n,0,m,p,n.aaxis,a,t,o,"a-title"),s=I,l=.5*(f+_),m=n.ab2xy(s,l,!0),p=n.dxydb_rough(s,l),void 0===u.angle&&d.extendFlat(u,c(n,a,t,m,n.dxyda_rough(s,l))),g(r,e,n,0,m,p,n.baxis,a,t,u,"b-title")}(r,P,y,0,s,l,G,C),function(r,e,n,i,a){var c,u,s,l,m=n.select("#"+r._clipPathId);m.size()||(m=n.append("clipPath").classed("carpetclip",!0));var p=d.ensureSingle(m,"path","carpetboundary"),I=e.clipsegments,y=[];for(l=0;l90&&_<270,v=i.select(this);v.text(m.title.text).call(u.convertToTspans,r),h&&(x=(-u.lineCount(v)+f)*y*t-x),v.attr("transform",l(e.p[0],e.p[1])+s(e.angle)+l(0,x)).attr("text-anchor","middle").call(a.font,m.title.font)})),v.exit().remove()}},81e3:function(r,e,n){"use strict";var i=n(24588),a=n(14952).findBin,t=n(30180),o=n(29056),c=n(26435),u=n(24464);r.exports=function(r){var e=r._a,n=r._b,d=e.length,s=n.length,l=r.aaxis,m=r.baxis,p=e[0],I=e[d-1],y=n[0],f=n[s-1],g=e[e.length-1]-e[0],_=n[n.length-1]-n[0],h=g*i.RELATIVE_CULL_TOLERANCE,v=_*i.RELATIVE_CULL_TOLERANCE;p-=h,I+=h,y-=v,f+=v,r.isVisible=function(r,e){return r>p&&ry&&eI||ef},r.setScale=function(){var e=r._x,n=r._y,i=t(r._xctrl,r._yctrl,e,n,l.smoothing,m.smoothing);r._xctrl=i[0],r._yctrl=i[1],r.evalxy=o([r._xctrl,r._yctrl],d,s,l.smoothing,m.smoothing),r.dxydi=c([r._xctrl,r._yctrl],l.smoothing,m.smoothing),r.dxydj=u([r._xctrl,r._yctrl],l.smoothing,m.smoothing)},r.i2a=function(r){var n=Math.max(0,Math.floor(r[0]),d-2),i=r[0]-n;return(1-i)*e[n]+i*e[n+1]},r.j2b=function(r){var e=Math.max(0,Math.floor(r[1]),d-2),i=r[1]-e;return(1-i)*n[e]+i*n[e+1]},r.ij2ab=function(e){return[r.i2a(e[0]),r.j2b(e[1])]},r.a2i=function(r){var n=Math.max(0,Math.min(a(r,e),d-2)),i=e[n],t=e[n+1];return Math.max(0,Math.min(d-1,n+(r-i)/(t-i)))},r.b2j=function(r){var e=Math.max(0,Math.min(a(r,n),s-2)),i=n[e],t=n[e+1];return Math.max(0,Math.min(s-1,e+(r-i)/(t-i)))},r.ab2ij=function(e){return[r.a2i(e[0]),r.b2j(e[1])]},r.i2c=function(e,n){return r.evalxy([],e,n)},r.ab2xy=function(i,a,t){if(!t&&(ie[d-1]|an[s-1]))return[!1,!1];var o=r.a2i(i),c=r.b2j(a),u=r.evalxy([],o,c);if(t){var l,m,p,I,y=0,f=0,g=[];ie[d-1]?(l=d-2,m=1,y=(i-e[d-1])/(e[d-1]-e[d-2])):m=o-(l=Math.max(0,Math.min(d-2,Math.floor(o)))),an[s-1]?(p=s-2,I=1,f=(a-n[s-1])/(n[s-1]-n[s-2])):I=c-(p=Math.max(0,Math.min(s-2,Math.floor(c)))),y&&(r.dxydi(g,l,p,m,I),u[0]+=g[0]*y,u[1]+=g[1]*y),f&&(r.dxydj(g,l,p,m,I),u[0]+=g[0]*f,u[1]+=g[1]*f)}return u},r.c2p=function(r,e,n){return[e.c2p(r[0]),n.c2p(r[1])]},r.p2x=function(r,e,n){return[e.p2c(r[0]),n.p2c(r[1])]},r.dadi=function(r){var n=Math.max(0,Math.min(e.length-2,r));return e[n+1]-e[n]},r.dbdj=function(r){var e=Math.max(0,Math.min(n.length-2,r));return n[e+1]-n[e]},r.dxyda=function(e,n,i,a){var t=r.dxydi(null,e,n,i,a),o=r.dadi(e,i);return[t[0]/o,t[1]/o]},r.dxydb=function(e,n,i,a){var t=r.dxydj(null,e,n,i,a),o=r.dbdj(n,a);return[t[0]/o,t[1]/o]},r.dxyda_rough=function(e,n,i){var a=g*(i||.1),t=r.ab2xy(e+a,n,!0),o=r.ab2xy(e-a,n,!0);return[.5*(t[0]-o[0])/a,.5*(t[1]-o[1])/a]},r.dxydb_rough=function(e,n,i){var a=_*(i||.1),t=r.ab2xy(e,n+a,!0),o=r.ab2xy(e,n-a,!0);return[.5*(t[0]-o[0])/a,.5*(t[1]-o[1])/a]},r.dpdx=function(r){return r._m},r.dpdy=function(r){return r._m}}},51512:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e,n){var a,t,o,c=[],u=[],d=r[0].length,s=r.length;function l(e,n){var i,a=0,t=0;return e>0&&void 0!==(i=r[n][e-1])&&(t++,a+=i),e0&&void 0!==(i=r[n-1][e])&&(t++,a+=i),n0&&t0&&a1e-5);return i.log("Smoother converged to",C,"after",S,"iterations"),r}},86411:function(r,e,n){"use strict";var i=n(3400).isArray1D;r.exports=function(r,e,n){var a=n("x"),t=a&&a.length,o=n("y"),c=o&&o.length;if(!t&&!c)return!1;if(e._cheater=!a,t&&!i(a)||c&&!i(o))e._length=null;else{var u=t?a.length:1/0;c&&(u=Math.min(u,o.length)),e.a&&e.a.length&&(u=Math.min(u,e.a.length)),e.b&&e.b.length&&(u=Math.min(u,e.b.length)),e._length=u}return!0}},83372:function(r,e,n){"use strict";var i=n(21776).Ks,a=n(6096),t=n(49084),o=n(45464),c=n(22548).defaultLine,u=n(92880).extendFlat,d=a.marker.line;r.exports=u({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},geojson:u({},a.geojson,{}),featureidkey:a.featureidkey,text:u({},a.text,{}),hovertext:u({},a.hovertext,{}),marker:{line:{color:u({},d.color,{dflt:c}),width:u({},d.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:u({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:i(),showlegend:u({},o.showlegend,{dflt:!1})},t("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(r,e,n){"use strict";var i=n(38248),a=n(39032).BADNUM,t=n(47128),o=n(20148),c=n(4500);function u(r){return r&&"string"===typeof r}r.exports=function(r,e){var n,d=e._length,s=new Array(d);n=e.geojson?function(r){return u(r)||i(r)}:u;for(var l=0;l")}}(r,l,o),[r]}},54272:function(r,e,n){"use strict";r.exports={attributes:n(83372),supplyDefaults:n(30972),colorbar:n(96288),calc:n(7924),calcGeoJSON:n(88364).calcGeoJSON,plot:n(88364).plot,style:n(7947).style,styleOnSelect:n(7947).styleOnSelect,hoverPoints:n(69224),eventData:n(52428),selectPoints:n(17328),moduleType:"trace",name:"choropleth",basePlotModule:n(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(27144),o=n(59972).getTopojsonFeatures,c=n(19280).findExtremes,u=n(7947).style;r.exports={calcGeoJSON:function(r,e){for(var n=r[0].trace,i=e[n.geo],a=i._subplot,u=n.locationmode,d=n._length,s="geojson-id"===u?t.extractTraceFeature(r):o(n,a.topojson),l=[],m=[],p=0;p=0;i--){var a=n[i].id;if("string"===typeof a&&0===a.indexOf("water"))for(var t=i+1;t=0;n--)r.removeLayer(e[n][1])},c.dispose=function(){var r=this.subplot.map;this._removeLayers(),r.removeSource(this.sourceId)},r.exports=function(r,e){var n=e[0].trace,a=new o(r,n.uid),t=a.sourceId,c=i(e),u=a.below=r.belowLookup["trace-"+n.uid];return r.map.addSource(t,{type:"geojson",data:c.geojson}),a._addLayers(c,u),e[0].trace._glTrace=a,a}},86040:function(r,e,n){"use strict";var i=n(49084),a=n(29736).axisHoverFormat,t=n(21776).Ks,o=n(52948),c=n(45464),u=n(92880).extendFlat,d={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","raw"],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:t({editType:"calc"},{keys:["norm"]}),uhoverformat:a("u",1),vhoverformat:a("v",1),whoverformat:a("w",1),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),showlegend:u({},c.showlegend,{dflt:!1})};u(d,i("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(r){d[r]=o[r]})),d.hoverinfo=u({},c.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),d.transforms=void 0,r.exports=d},83344:function(r,e,n){"use strict";var i=n(47128);r.exports=function(r,e){for(var n=e.u,a=e.v,t=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,n.length,a.length,t.length),c=-1/0,u=1/0,d=0;do.level||o.starts.length&&t===o.level)}break;case"constraint":if(i.prefixBoundary=!1,i.edgepaths.length)return;var c=i.x.length,u=i.y.length,d=-1/0,s=1/0;for(n=0;n":p>d&&(i.prefixBoundary=!0);break;case"<":(pd||i.starts.length&&m===s)&&(i.prefixBoundary=!0);break;case"][":l=Math.min(p[0],p[1]),m=Math.max(p[0],p[1]),ld&&(i.prefixBoundary=!0)}}}},55296:function(r,e,n){"use strict";var i=n(8932),a=n(41076),t=n(46960);r.exports={min:"zmin",max:"zmax",calc:function(r,e,n){var o=e.contours,c=e.line,u=o.size||1,d=o.coloring,s=a(e,{isColorbar:!0});if("heatmap"===d){var l=i.extractOpts(e);n._fillgradient=l.reversescale?i.flipScale(l.colorscale):l.colorscale,n._zrange=[l.min,l.max]}else"fill"===d&&(n._fillcolor=s);n._line={color:"lines"===d?s:c.color,width:!1!==o.showlines?c.width:0,dash:c.dash},n._levels={start:o.start,end:t(o),size:u}}}},93252:function(r){"use strict";r.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}}},95536:function(r,e,n){"use strict";var i=n(38248),a=n(17428),t=n(76308),o=t.addOpacity,c=t.opacity,u=n(69104),d=n(3400).isArrayOrTypedArray,s=u.CONSTRAINT_REDUCTION,l=u.COMPARISON_OPS2;r.exports=function(r,e,n,t,u,m){var p,I,y,f=e.contours,g=n("contours.operation");f._operation=s[g],function(r,e){var n;-1===l.indexOf(e.operation)?(r("contours.value",[0,1]),d(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(n=parseFloat(e.value[0]),e.value=[n,n+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:i(e.value)&&(n=parseFloat(e.value),e.value=[n,n+1])):(r("contours.value",0),i(e.value)||(d(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(n,f),"="===g?p=f.showlines=!0:(p=n("contours.showlines"),y=n("fillcolor",o((r.line||{}).color||u,.5))),p&&(I=n("line.color",y&&c(y)?o(e.fillcolor,1):u),n("line.width",2),n("line.dash")),n("line.smoothing"),a(n,t,I,m)}},3212:function(r,e,n){"use strict";var i=n(69104),a=n(38248);function t(r,e){var n,t=Array.isArray(e);function o(r){return a(r)?+r:null}return-1!==i.COMPARISON_OPS2.indexOf(r)?n=o(t?e[0]:e):-1!==i.INTERVAL_OPS.indexOf(r)?n=t?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==i.SET_OPS.indexOf(r)&&(n=t?e.map(o):[o(e)]),n}function o(r){return function(e){e=t(r,e);var n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return{start:n,end:i,size:i-n}}}function c(r){return function(e){return{start:e=t(r,e),end:1/0,size:1/0}}}r.exports={"[]":o("[]"),"][":o("]["),">":c(">"),"<":c("<"),"=":c("=")}},84952:function(r){"use strict";r.exports=function(r,e,n,i){var a=i("contours.start"),t=i("contours.end"),o=!1===a||!1===t,c=n("contours.size");!(o?e.autocontour=!0:n("autocontour",!1))&&c||n("ncontours")}},82172:function(r,e,n){"use strict";var i=n(3400);function a(r){return i.extendFlat({},r,{edgepaths:i.extendDeep([],r.edgepaths),paths:i.extendDeep([],r.paths),starts:i.extendDeep([],r.starts)})}r.exports=function(r,e){var n,t,o,c=function(r){return r.reverse()},u=function(r){return r};switch(e){case"=":case"<":return r;case">":for(1!==r.length&&i.warn("Contour data invalid for the specified inequality operation."),t=r[0],n=0;n1e3){i.warn("Too many contours, clipping at 1000",r);break}return u}},46960:function(r){"use strict";r.exports=function(r){return r.end+r.size/1e6}},88748:function(r,e,n){"use strict";var i=n(3400),a=n(93252);function t(r,e,n,i){return Math.abs(r[0]-e[0])20&&e?208===r||1114===r?i=0===n[0]?1:-1:t=0===n[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(r)?t=1:-1!==a.LEFTSTART.indexOf(r)?i=1:-1!==a.TOPSTART.indexOf(r)?t=-1:i=-1,[i,t]}(m,n,e),I=[u(r,e,[-p[0],-p[1]])],y=r.z.length,f=r.z[0].length,g=e.slice(),_=p.slice();for(s=0;s<1e4;s++){if(m>20?(m=a.CHOOSESADDLE[m][(p[0]||p[1])<0?0:1],r.crossings[l]=a.SADDLEREMAINDER[m]):delete r.crossings[l],!(p=a.NEWDELTA[m])){i.log("Found bad marching index:",m,e,r.level);break}I.push(u(r,e,p)),e[0]+=p[0],e[1]+=p[1],l=e.join(","),t(I[I.length-1],I[I.length-2],c,d)&&I.pop();var h=p[0]&&(e[0]<0||e[0]>f-2)||p[1]&&(e[1]<0||e[1]>y-2);if(e[0]===g[0]&&e[1]===g[1]&&p[0]===_[0]&&p[1]===_[1]||n&&h)break;m=r.crossings[l]}1e4===s&&i.log("Infinite loop in contour?");var v,x,P,G,C,S,A,b,M,B,k,F=t(I[0],I[I.length-1],c,d),z=0,w=.2*r.smoothing,R=[],E=0;for(s=1;s=E;s--)if((v=R[s])=E&&v+R[x]b&&M--,r.edgepaths[M]=k.concat(I,B));break}J||(r.edgepaths[b]=I.concat(B))}for(b=0;b=_)&&(n<=g&&(n=g),o>=_&&(o=_),u=Math.floor((o-n)/c)+1,d=0),m=0;mg&&(y.unshift(g),f.unshift(f[0])),y[y.length-1]<_&&(y.push(_),f.push(f[f.length-1])))}return a.makeColorScaleFunc({domain:y,range:f},{noNumericCheck:!0})}},72424:function(r,e,n){"use strict";var i=n(93252);function a(r,e){var n=(e[0][0]>r?0:1)+(e[0][1]>r?0:2)+(e[1][1]>r?0:4)+(e[1][0]>r?0:8);return 5===n||10===n?r>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===n?713:1114:5===n?104:208:15===n?0:n}r.exports=function(r){var e,n,t,o,c,u,d,s,l,m=r[0].z,p=m.length,I=m[0].length,y=2===p||2===I;for(n=0;n=0&&(i=_,c=u):Math.abs(n[1]-i[1])<.01?Math.abs(n[1]-_[1])<.01&&(_[0]-n[0])*(i[0]-_[0])>=0&&(i=_,c=u):a.log("endpt to newendpt is not vert. or horz.",n,i,_)}if(n=i,c>=0)break;l+="L"+i}if(c===r.edgepaths.length){a.log("unclosed perimeter path");break}m=c,(I=-1===p.indexOf(m))&&(m=p[0],l+="Z")}for(m=0;mi.center?i.right-c:c-i.left)/(s+Math.abs(Math.sin(d)*o)),p=(u>i.middle?i.bottom-u:u-i.top)/(Math.abs(l)+Math.cos(d)*o);if(m<1||p<1)return 1/0;var I=g.EDGECOST*(1/(m-1)+1/(p-1));I+=g.ANGLECOST*d*d;for(var y=c-s,f=u-l,_=c+s,h=u+l,v=0;v2*g.MAXCOST)break;p&&(c/=2),u=(o=d-c/2)+1.5*c}if(m<=g.MAXCOST)return s},e.addLabelData=function(r,e,n,i){var a=e.fontSize,t=e.width+a/3,o=Math.max(0,e.height-a/3),c=r.x,u=r.y,d=r.theta,s=Math.sin(d),l=Math.cos(d),m=function(r,e){return[c+r*l-e*s,u+r*s+e*l]},p=[m(-t/2,-o/2),m(-t/2,o/2),m(t/2,o/2),m(t/2,-o/2)];n.push({text:e.text,x:c,y:u,dy:e.dy,theta:d,level:e.level,width:t,height:o}),i.push(p)},e.drawLabels=function(r,e,n,t,o){var u=r.selectAll("text").data(e,(function(r){return r.text+","+r.x+","+r.y+","+r.theta}));if(u.exit().remove(),u.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(r){var e=r.x+Math.sin(r.theta)*r.dy,a=r.y-Math.cos(r.theta)*r.dy;i.select(this).text(r.text).attr({x:e,y:a,transform:"rotate("+180*r.theta/Math.PI+" "+e+" "+a+")"}).call(c.convertToTspans,n)})),o){for(var d="",s=0;sn.end&&(n.start=n.end=(n.start+n.end)/2),r._input.contours||(r._input.contours={}),a.extendFlat(r._input.contours,{start:n.start,end:n.end,size:n.size}),r._input.autocontour=!0}else if("constraint"!==n.type){var d,s=n.start,l=n.end,m=r._input.contours;s>l&&(n.start=m.start=l,l=n.end=m.end=s,s=n.start),n.size>0||(d=s===l?1:t(s,l,r.ncontours).dtick,m.size=n.size=d)}}},52440:function(r,e,n){"use strict";var i=n(33428),a=n(43616),t=n(41648),o=n(41076);r.exports=function(r){var e=i.select(r).selectAll("g.contour");e.style("opacity",(function(r){return r[0].trace.opacity})),e.each((function(r){var e=i.select(this),n=r[0].trace,t=n.contours,c=n.line,u=t.size||1,d=t.start,s="constraint"===t.type,l=!s&&"lines"===t.coloring,m=!s&&"fill"===t.coloring,p=l||m?o(n):null;e.selectAll("g.contourlevel").each((function(r){i.select(this).selectAll("path").call(a.lineGroupStyle,c.width,l?p(r.level):c.color,c.dash)}));var I=t.labelfont;if(e.selectAll("g.contourlabels text").each((function(r){a.font(i.select(this),{weight:I.weight,style:I.style,variant:I.variant,textcase:I.textcase,lineposition:I.lineposition,shadow:I.shadow,family:I.family,size:I.size,color:I.color||(l?p(r.level):c.color)})})),s)e.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(m){var y;e.selectAll("g.contourfill path").style("fill",(function(r){return void 0===y&&(y=r.level),p(r.level+.5*u)})),void 0===y&&(y=d),e.selectAll("g.contourbg path").style("fill",p(y-.5*u))}})),t(r)}},97680:function(r,e,n){"use strict";var i=n(27260),a=n(17428);r.exports=function(r,e,n,t,o){var c,u=n("contours.coloring"),d="";"fill"===u&&(c=n("contours.showlines")),!1!==c&&("lines"!==u&&(d=n("line.color","#000")),n("line.width",.5),n("line.dash")),"none"!==u&&(!0!==r.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,i(r,e,t,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),a(n,t,d,o)}},37960:function(r,e,n){"use strict";var i=n(83328),a=n(67104),t=n(49084),o=n(92880).extendFlat,c=a.contours;r.exports=o({carpet:{valType:"string",editType:"calc"},z:i.z,a:i.x,a0:i.x0,da:i.dx,b:i.y,b0:i.y0,db:i.dy,text:i.text,hovertext:i.hovertext,transpose:i.transpose,atype:i.xtype,btype:i.ytype,fillcolor:a.fillcolor,autocontour:a.autocontour,ncontours:a.ncontours,contours:{type:c.type,start:c.start,end:c.end,size:c.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:c.showlines,showlabels:c.showlabels,labelfont:c.labelfont,labelformat:c.labelformat,operation:c.operation,value:c.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"},zorder:a.zorder,transforms:void 0},t("",{cLetter:"z",autoColorDflt:!1}))},30572:function(r,e,n){"use strict";var i=n(47128),a=n(3400),t=n(2872),o=n(26136),c=n(70448),u=n(11240),d=n(35744),s=n(3252),l=n(50948),m=n(54444);r.exports=function(r,e){var n=e._carpetTrace=l(r,e);if(n&&n.visible&&"legendonly"!==n.visible){if(!e.a||!e.b){var p=r.data[n.index],I=r.data[e.index];I.a||(I.a=p.a),I.b||(I.b=p.b),s(I,e,e._defaultColor,r._fullLayout)}var y=function(r,e){var n,s,l,m,p,I,y,f=e._carpetTrace,g=f.aaxis,_=f.baxis;g._minDtick=0,_._minDtick=0,a.isArray1D(e.z)&&t(e,g,_,"a","b",["z"]),n=e._a=e._a||e.a,m=e._b=e._b||e.b,n=n?g.makeCalcdata(e,"_a"):[],m=m?_.makeCalcdata(e,"_b"):[],s=e.a0||0,l=e.da||1,p=e.b0||0,I=e.db||1,y=e._z=o(e._z||e.z,e.transpose),e._emptypoints=u(y),c(y,e._emptypoints);var h=a.maxRowLength(y),v="scaled"===e.xtype?"":n,x=d(e,v,s,l,h,g),P="scaled"===e.ytype?"":m,G=d(e,P,p,I,y.length,_),C={a:x,b:G,z:y};return"levels"===e.contours.type&&"none"!==e.contours.coloring&&i(r,e,{vals:y,containerStr:"",cLetter:"z"}),[C]}(r,e);return m(e,e._z),y}}},3252:function(r,e,n){"use strict";var i=n(3400),a=n(51264),t=n(37960),o=n(95536),c=n(84952),u=n(97680);r.exports=function(r,e,n,d){function s(n,a){return i.coerce(r,e,t,n,a)}if(s("carpet"),r.a&&r.b){if(!a(r,e,s,d,"a","b"))return void(e.visible=!1);s("text"),"constraint"===s("contours.type")?o(r,e,s,d,n,{hasHover:!1}):(c(r,e,s,(function(n){return i.coerce2(r,e,t,n)})),u(r,e,s,d,{hasHover:!1}))}else e._defaultColor=n,e._length=null;s("zorder")}},40448:function(r,e,n){"use strict";r.exports={attributes:n(37960),supplyDefaults:n(3252),colorbar:n(55296),calc:n(30572),plot:n(94440),style:n(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:n(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(r,e,n){"use strict";var i=n(33428),a=n(87072),t=n(53416),o=n(43616),c=n(3400),u=n(72424),d=n(88748),s=n(23676),l=n(93252),m=n(82172),p=n(61512),I=n(56008),y=n(50948),f=n(77712);function g(r,e,n){var i=r.getPointAtLength(e),a=r.getPointAtLength(n),t=a.x-i.x,o=a.y-i.y,c=Math.sqrt(t*t+o*o);return[t/c,o/c]}function _(r){var e=Math.sqrt(r[0]*r[0]+r[1]*r[1]);return[r[0]/e,r[1]/e]}function h(r,e){var n=Math.abs(r[0]*e[0]+r[1]*e[1]);return Math.sqrt(1-n*n)/n}r.exports=function(r,e,n,v){var x=e.xaxis,P=e.yaxis;c.makeTraceGroups(v,n,"contour").each((function(n){var v=i.select(this),G=n[0],C=G.trace,S=C._carpetTrace=y(r,C),A=r.calcdata[S.index][0];if(S.visible&&"legendonly"!==S.visible){var b=G.a,M=G.b,B=C.contours,k=p(B,e,G),F="constraint"===B.type,z=B._operation,w=F?"="===z?"lines":"fill":B.coloring,R=[[b[0],M[M.length-1]],[b[b.length-1],M[M.length-1]],[b[b.length-1],M[0]],[b[0],M[0]]];u(k);var E=1e-8*(b[b.length-1]-b[0]),N=1e-8*(M[M.length-1]-M[0]);d(k,E,N);var T,D,J,U,H=k;"constraint"===B.type&&(H=m(k,z)),function(r,e){var n,i,a,t,o,c,u,d,s;for(n=0;n=0;U--)T=A.clipsegments[U],D=a([],T.x,x.c2p),J=a([],T.y,P.c2p),D.reverse(),J.reverse(),L.push(t(D,J,T.bicubic));var O="M"+L.join("L")+"Z";!function(r,e,n,i,o,u){var d,s,l,m,p=c.ensureSingle(r,"g","contourbg").selectAll("path").data("fill"!==u||o?[]:[0]);p.enter().append("path"),p.exit().remove();var I=[];for(m=0;m=0&&(m=B,I=y):Math.abs(l[1]-m[1])=0&&(m=B,I=y):c.log("endpt to newendpt is not vert. or horz.",l,m,B)}if(I>=0)break;_+=b(l,m),l=m}if(I===e.edgepaths.length){c.log("unclosed perimeter path");break}s=I,(v=-1===h.indexOf(s))&&(s=h[0],_+=b(l,m)+"Z",l=null)}for(s=0;sy&&(i.max=y),i.len=i.max-i.min}function f(r,e){var n,i=0,o=.1;return(Math.abs(r[0]-u)0?+p[s]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:g},properties:_})}}var v=o.extractOpts(e),x=v.reversescale?o.flipScale(v.colorscale):v.colorscale,P=x[0][1],G=["interpolate",["linear"],["heatmap-density"],0,t.opacity(P)<1?P:t.addOpacity(P,0)];for(s=1;s=0;n--)r.removeLayer(e[n][1])},o.dispose=function(){var r=this.subplot.map;this._removeLayers(),r.removeSource(this.sourceId)},r.exports=function(r,e){var n=e[0].trace,a=new t(r,n.uid),o=a.sourceId,c=i(e),u=a.below=r.belowLookup["trace-"+n.uid];return r.map.addSource(o,{type:"geojson",data:c.geojson}),a._addLayers(c,u),a}},74248:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e){for(var n=0;n"),u.color=function(r,e){var n=r.marker,a=e.mc||n.color,t=e.mlc||n.line.color,o=e.mlw||n.line.width;return i(a)?a:i(t)&&o?t:void 0}(s,m),[u]}}},94704:function(r,e,n){"use strict";r.exports={attributes:n(20088),layoutAttributes:n(7076),supplyDefaults:n(45432).supplyDefaults,crossTraceDefaults:n(45432).crossTraceDefaults,supplyLayoutDefaults:n(11631),calc:n(23096),crossTraceCalc:n(4804),plot:n(42200),style:n(44544).style,hoverPoints:n(31488),eventData:n(34580),selectPoints:n(45784),moduleType:"trace",name:"funnel",basePlotModule:n(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(r){"use strict";r.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"}}},11631:function(r,e,n){"use strict";var i=n(3400),a=n(7076);r.exports=function(r,e,n){var t=!1;function o(n,t){return i.coerce(r,e,a,n,t)}for(var c=0;c path").each((function(r){if(!r.isBlank){var e=c.marker;i.select(this).call(t.fill,r.mc||e.color).call(t.stroke,r.mlc||e.line.color).call(a.dashLine,e.line.dash,r.mlw||e.line.width).style("opacity",c.selectedpoints&&!r.selected?o:1)}})),d(n,c,r),n.selectAll(".regions").each((function(){i.select(this).selectAll("path").style("stroke-width",0).call(t.fill,c.connector.fillcolor)})),n.selectAll(".lines").each((function(){var r=c.connector.line;a.lineGroupStyle(i.select(this).selectAll("path"),r.width,r.color,r.dash)}))}))}}},22332:function(r,e,n){"use strict";var i=n(74996),a=n(45464),t=n(86968).u,o=n(21776).Ks,c=n(21776).Gw,u=n(92880).extendFlat;r.exports={labels:i.labels,label0:i.label0,dlabel:i.dlabel,values:i.values,marker:{colors:i.marker.colors,line:{color:u({},i.marker.line.color,{dflt:null}),width:u({},i.marker.line.width,{dflt:1}),editType:"calc"},pattern:i.marker.pattern,editType:"calc"},text:i.text,hovertext:i.hovertext,scalegroup:u({},i.scalegroup,{}),textinfo:u({},i.textinfo,{flags:["label","text","value","percent"]}),texttemplate:c({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:u({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:u({},i.textposition,{values:["inside","none"],dflt:"inside"}),textfont:i.textfont,insidetextfont:i.insidetextfont,title:{text:i.title.text,font:i.title.font,position:u({},i.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:t({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"}}},91248:function(r,e,n){"use strict";var i=n(7316);e.name="funnelarea",e.plot=function(r,n,a,t){i.plotBasePlot(e.name,r,n,a,t)},e.clean=function(r,n,a,t){i.cleanBasePlot(e.name,r,n,a,t)}},54e3:function(r,e,n){"use strict";var i=n(45768);r.exports={calc:function(r,e){return i.calc(r,e)},crossTraceCalc:function(r){i.crossTraceCalc(r,{type:"funnelarea"})}}},92688:function(r,e,n){"use strict";var i=n(3400),a=n(22332),t=n(86968).Q,o=n(31508).handleText,c=n(74174).handleLabelsAndValues,u=n(74174).handleMarkerDefaults;r.exports=function(r,e,n,d){function s(n,t){return i.coerce(r,e,a,n,t)}var l=s("labels"),m=s("values"),p=c(l,m),I=p.len;if(e._hasLabels=p.hasLabels,e._hasValues=p.hasValues,!e._hasLabels&&e._hasValues&&(s("label0"),s("dlabel")),I){e._length=I,u(r,e,d,s),s("scalegroup");var y,f=s("text"),g=s("texttemplate");if(g||(y=s("textinfo",Array.isArray(f)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),g||y&&"none"!==y){var _=s("textposition");o(r,e,d,s,_,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===y&&s("textposition","none");t(e,d,s),s("title.text")&&(s("title.position"),i.coerceFont(s,"title.font",d.font)),s("aspectratio"),s("baseratio")}else e.visible=!1}},62396:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"funnelarea",basePlotModule:n(91248),categories:["pie-like","funnelarea","showLegend"],attributes:n(22332),layoutAttributes:n(61280),supplyDefaults:n(92688),supplyLayoutDefaults:n(35384),calc:n(54e3).calc,crossTraceCalc:n(54e3).crossTraceCalc,plot:n(39472),style:n(62096),styleOne:n(10528),meta:{}}},61280:function(r,e,n){"use strict";var i=n(85204).hiddenlabels;r.exports={hiddenlabels:i,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(r,e,n){"use strict";var i=n(3400),a=n(61280);r.exports=function(r,e){function n(n,t){return i.coerce(r,e,a,n,t)}n("hiddenlabels"),n("funnelareacolorway",e.colorway),n("extendfunnelareacolors")}},39472:function(r,e,n){"use strict";var i=n(33428),a=n(43616),t=n(3400),o=t.strScale,c=t.strTranslate,u=n(72736),d=n(98184).toMoveInsideBar,s=n(82744),l=s.recordMinTextSize,m=s.clearMinTextSize,p=n(69656),I=n(37820),y=I.attachFxHandlers,f=I.determineInsideTextFont,g=I.layoutAreas,_=I.prerenderTitles,h=I.positionTitleOutside,v=I.formatSliceLabel;function x(r,e){return"l"+(e[0]-r[0])+","+(e[1]-r[1])}function P(r,e){return[.5*(r[0]+e[0]),.5*(r[1]+e[1])]}r.exports=function(r,e){var n=r._context.staticPlot,s=r._fullLayout;m("funnelarea",s),_(e,r),g(e,s._size),t.makeTraceGroups(s._funnelarealayer,e,"trace").each((function(e){var m=i.select(this),I=e[0],g=I.trace;!function(r){if(r.length){var e=r[0],n=e.trace,i=n.aspectratio,a=n.baseratio;a>.999&&(a=.999);var t,o,c,u=Math.pow(a,2),d=e.vTotal,s=d,l=d*u/(1-u)/d,m=[];for(m.push(M()),o=r.length-1;o>-1;o--)if(!(c=r[o]).hidden){var p=c.v/s;l+=p,m.push(M())}var I=1/0,y=-1/0;for(o=0;o-1;o--)if(!(c=r[o]).hidden){var S=m[C+=1][0],A=m[C][1];c.TL=[-S,A],c.TR=[S,A],c.BL=x,c.BR=G,c.pxmid=P(c.TR,c.BR),x=c.TL,G=c.TR}}function b(){var r=Math.sqrt(l);return{x:r,y:-r}}function M(){var r=b();return[r.x,r.y]}}(e),m.each((function(){var m=i.select(this).selectAll("g.slice").data(e);m.enter().append("g").classed("slice",!0),m.exit().remove(),m.each((function(o,c){if(o.hidden)i.select(this).selectAll("path,g").remove();else{o.pointNumber=o.i,o.curveNumber=g.index;var m=I.cx,_=I.cy,h=i.select(this),P=h.selectAll("path.surface").data([o]);P.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),h.call(y,r,e);var G="M"+(m+o.TR[0])+","+(_+o.TR[1])+x(o.TR,o.BR)+x(o.BR,o.BL)+x(o.BL,o.TL)+"Z";P.attr("d",G),v(r,o,I);var C=p.castOption(g.textposition,o.pts),S=h.selectAll("g.slicetext").data(o.text&&"none"!==C?[0]:[]);S.enter().append("g").classed("slicetext",!0),S.exit().remove(),S.each((function(){var n=t.ensureSingle(i.select(this),"text","",(function(r){r.attr("data-notex",1)})),p=t.ensureUniformFontSize(r,f(g,o,s.font));n.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,p).call(u.convertToTspans,r);var I,y,h,v=a.bBox(n.node()),x=Math.min(o.BL[1],o.BR[1])+_,P=Math.max(o.TL[1],o.TR[1])+_;y=Math.max(o.TL[0],o.BL[0])+m,h=Math.min(o.TR[0],o.BR[0])+m,(I=d(y,h,x,P,v,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=p.size,l(g.type,I,s),e[c].transform=I,t.setTransormAndDisplay(n,I)}))}}));var _=i.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each((function(){var e=t.ensureSingle(i.select(this),"text","",(function(r){r.attr("data-notex",1)})),n=g.title.text;g._meta&&(n=t.templateString(n,g._meta)),e.text(n).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,g.title.font).call(u.convertToTspans,r);var d=h(I,s._size);e.attr("transform",c(d.x,d.y)+o(Math.min(1,d.scale))+c(d.tx,d.ty))}))}))}))}},62096:function(r,e,n){"use strict";var i=n(33428),a=n(10528),t=n(82744).resizeText;r.exports=function(r){var e=r._fullLayout._funnelarealayer.selectAll(".trace");t(r,e,"funnelarea"),e.each((function(e){var n=e[0].trace,t=i.select(this);t.style({opacity:n.opacity}),t.selectAll("path.surface").each((function(e){i.select(this).call(a,e,n,r)}))}))}},83328:function(r,e,n){"use strict";var i=n(52904),a=n(45464),t=n(25376),o=n(29736).axisHoverFormat,c=n(21776).Ks,u=n(21776).Gw,d=n(49084),s=n(92880).extendFlat;r.exports=s({z:{valType:"data_array",editType:"calc"},x:s({},i.x,{impliedEdits:{xtype:"array"}}),x0:s({},i.x0,{impliedEdits:{xtype:"scaled"}}),dx:s({},i.dx,{impliedEdits:{xtype:"scaled"}}),y:s({},i.y,{impliedEdits:{ytype:"array"}}),y0:s({},i.y0,{impliedEdits:{ytype:"scaled"}}),dy:s({},i.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:s({},i.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:s({},i.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:s({},i.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:s({},i.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:s({},i.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:s({},i.yperiodalignment,{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"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:c(),texttemplate:u({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:s({},a.showlegend,{dflt:!1}),zorder:i.zorder},{transforms:void 0},d("",{cLetter:"z",autoColorDflt:!1}))},19512:function(r,e,n){"use strict";var i=n(24040),a=n(3400),t=n(54460),o=n(1220),c=n(55480),u=n(47128),d=n(2872),s=n(26136),l=n(70448),m=n(11240),p=n(35744),I=n(39032).BADNUM;function y(r){for(var e=[],n=r.length,i=0;i1){var e=(r[r.length-1]-r[0])/(r.length-1),n=Math.abs(e/100);for(C=0;Cn)return!1}return!0}(A.rangebreaks||b.rangebreaks)&&(G=function(r,e,n){for(var i=[],a=-1,t=0;t=0;o--)(c=((l[[(n=(t=m[o])[0])-1,a=t[1]]]||y)[2]+(l[[n+1,a]]||y)[2]+(l[[n,a-1]]||y)[2]+(l[[n,a+1]]||y)[2])/20)&&(u[t]=[n,a,c],m.splice(o,1),d=!0);if(!d)throw"findEmpties iterated with no new neighbors";for(t in u)l[t]=u[t],s.push(u[t])}return s.sort((function(r,e){return e[2]-r[2]}))}},55512:function(r,e,n){"use strict";var i=n(93024),a=n(3400),t=a.isArrayOrTypedArray,o=n(54460),c=n(8932).extractOpts;r.exports=function(r,e,n,u,d){d||(d={});var s,l,m,p,I=d.isContour,y=r.cd[0],f=y.trace,g=r.xa,_=r.ya,h=y.x,v=y.y,x=y.z,P=y.xCenter,G=y.yCenter,C=y.zmask,S=f.zhoverformat,A=h,b=v;if(!1!==r.index){try{m=Math.round(r.index[1]),p=Math.round(r.index[0])}catch(U){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",r.index)}if(m<0||m>=x[0].length||p<0||p>x.length)return}else{if(i.inbox(e-h[0],e-h[h.length-1],0)>0||i.inbox(n-v[0],n-v[v.length-1],0)>0)return;if(I){var M;for(A=[2*h[0]-h[1]],M=1;My&&(g=Math.max(g,Math.abs(r[t][o]-I)/(f-y))))}return g}r.exports=function(r,e){var n,a=1;for(o(r,e),n=0;n.01;n++)a=o(r,e,t(a));return a>.01&&i.log("interp2d didn't converge quickly",a),r}},39096:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e){r("texttemplate");var n=i.extendFlat({},e.font,{color:"auto",size:"auto"});i.coerceFont(r,"textfont",n)}},35744:function(r,e,n){"use strict";var i=n(24040),a=n(3400).isArrayOrTypedArray;r.exports=function(r,e,n,t,o,c){var u,d,s,l=[],m=i.traceIs(r,"contour"),p=i.traceIs(r,"histogram"),I=i.traceIs(r,"gl2d");if(a(e)&&e.length>1&&!p&&"category"!==c.type){var y=e.length;if(!(y<=o))return m?e.slice(0,o):e.slice(0,o+1);if(m||I)l=Array.from(e).slice(0,o);else if(1===o)l="log"===c.type?[.5*e[0],2*e[0]]:[e[0]-.5,e[0]+.5];else if("log"===c.type){for(l=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],s=1;s0;)C=S.c2p(J[k]),k--;for(C0;)B=A.c2p(U[k]),k--;B=S._length||C<=0||M>=A._length||B<=0)return w.selectAll("image").data([]).exit().remove(),void v(w);"fast"===q?(X=j,Q=V):(X=$,Q=rr);var er=document.createElement("canvas");er.width=X,er.height=Q;var nr,ir,ar=er.getContext("2d",{willReadFrequently:!0}),tr=p(E,{noNumericCheck:!0,returnArray:!0});"fast"===q?(nr=W?function(r){return j-1-r}:u.identity,ir=Z?function(r){return V-1-r}:u.identity):(nr=function(r){return u.constrain(Math.round(S.c2p(J[r])-n),0,$)},ir=function(r){return u.constrain(Math.round(A.c2p(U[r])-M),0,rr)});var or,cr,ur,dr,sr=ir(0),lr=[sr,sr],mr=W?0:1,pr=Z?0:1,Ir=0,yr=0,fr=0,gr=0;function _r(r,e){if(void 0!==r){var n=tr(r);return n[0]=Math.round(n[0]),n[1]=Math.round(n[1]),n[2]=Math.round(n[2]),Ir+=e,yr+=n[0]*e,fr+=n[1]*e,gr+=n[2]*e,n}return[0,0,0,0]}function hr(r,e,n,i){var a=r[n.bin0];if(void 0===a)return _r(void 0,1);var t,o=r[n.bin1],c=e[n.bin0],u=e[n.bin1],d=o-a||0,s=c-a||0;return t=void 0===o?void 0===u?0:void 0===c?2*(u-a):2*(2*u-c-a)/3:void 0===u?void 0===c?0:2*(2*a-o-c)/3:void 0===c?2*(2*u-o-a)/3:u+a-o-c,_r(a+n.frac*d+i.frac*(s+n.frac*t))}if("default"!==q){var vr,xr=0;try{vr=new Uint8Array(X*Q*4)}catch(fe){vr=new Array(X*Q*4)}if("smooth"===q){var Pr,Gr,Cr,Sr=H||J,Ar=L||U,br=new Array(Sr.length),Mr=new Array(Ar.length),Br=new Array($),kr=H?P:x,Fr=L?P:x;for(k=0;kqr||qr>A._length))for(F=Vr;FXr||Xr>S._length)){var Qr=s({x:Yr,y:Zr},E,r._fullLayout);Qr.x=Yr,Qr.y=Zr;var $r=R.z[k][F];void 0===$r?(Qr.z="",Qr.zLabel=""):(Qr.z=$r,Qr.zLabel=c.tickText(Hr,$r,"hover").text);var re=R.text&&R.text[k]&&R.text[k][F];void 0!==re&&!1!==re||(re=""),Qr.text=re;var ee=u.texttemplateString(Jr,Qr,r._fullLayout._d3locale,Qr,E._meta||{});if(ee){var ne=ee.split("
"),ie=ne.length,ae=0;for(z=0;z0&&(t=!0);for(var u=0;ut){var o=t-n[r];return n[r]=t,o}}return 0},max:function(r,e,n,a){var t=a[e];if(i(t)){if(t=Number(t),!i(n[r]))return n[r]=t,t;if(n[r]d?r>o?r>1.1*a?a:r>1.1*t?t:o:r>c?c:r>u?u:d:Math.pow(10,Math.floor(Math.log(r)/Math.LN10))}function p(r,e,n,i,t,c){if(i&&r>o){var u=I(e,t,c),d=I(n,t,c),s=r===a?0:1;return u[s]!==d[s]}return Math.floor(n/r)-Math.floor(e/r)>.1}function I(r,e,n){var i=e.c2d(r,a,n).split("-");return""===i[0]&&(i.unshift(),i[0]="-"+i[0]),i}r.exports=function(r,e,n,i,t){var c,u,d=-1.1*e,m=-.1*e,p=r-m,I=n[0],y=n[1],f=Math.min(l(I+m,I+p,i,t),l(y+m,y+p,i,t)),g=Math.min(l(I+d,I+m,i,t),l(y+d,y+m,i,t));if(f>g&&go){var _=c===a?1:6,h=c===a?"M12":"M1";return function(e,n){var o=i.c2d(e,a,t),c=o.indexOf("-",_);c>0&&(o=o.substr(0,c));var d=i.d2c(o,0,t);if(dn.r2l(D)&&(U=o.tickIncrement(U,v.size,!0,p)),R.start=n.l2r(U),T||a.nestedProperty(e,g+".start").set(R.start)}var H=v.end,L=n.r2l(w.end),O=void 0!==L;if((v.endFound||O)&&L!==n.r2l(H)){var K=O?L:a.aggNums(Math.max,null,I);R.end=n.l2r(K),O||a.nestedProperty(e,g+".start").set(R.end)}var V="autobin"+c;return!1===e._input[V]&&(e._input[g]=a.extendFlat({},e[g]||{}),delete e._input[V],delete e[V]),[R,I]}r.exports={calc:function(r,e){var n,t,p,I,y=[],f=[],g="h"===e.orientation,_=o.getFromId(r,g?e.yaxis:e.xaxis),h=g?"y":"x",v={x:"y",y:"x"}[h],x=e[h+"calendar"],P=e.cumulative,G=m(r,e,_,h),C=G[0],S=G[1],A="string"===typeof C.size,b=[],M=A?b:C,B=[],k=[],F=[],z=0,w=e.histnorm,R=e.histfunc,E=-1!==w.indexOf("density");P.enabled&&E&&(w=w.replace(/ ?density$/,""),E=!1);var N,T="max"===R||"min"===R?null:0,D=u.count,J=d[w],U=!1,H=function(r){return _.r2c(r,0,x)};for(a.isArrayOrTypedArray(e[v])&&"count"!==R&&(N=e[v],U="avg"===R,D=u[R]),n=H(C.start),p=H(C.end)+(n-o.tickIncrement(n,C.size,!1,x))/1e6;n=0&&I=0;i--)c(i);else if("increasing"===e){for(i=1;i=0;i--)r[i]+=r[i+1];"exclude"===n&&(r.push(0),r.shift())}}(f,P.direction,P.currentbin);var X=Math.min(y.length,f.length),Q=[],$=0,rr=X-1;for(n=0;n=$;n--)if(f[n]){rr=n;break}for(n=$;n<=rr;n++)if(i(y[n])&&i(f[n])){var er={p:y[n],s:f[n],b:0};P.enabled||(er.pts=F[n],j?er.ph0=er.ph1=F[n].length?S[F[n][0]]:y[n]:(e._computePh=!0,er.ph0=K(b[n]),er.ph1=K(b[n+1],!0))),Q.push(er)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,C.size,!1,x)-Q[0].p),c(Q,e),a.isArrayOrTypedArray(e.selectedpoints)&&a.tagSelected(Q,e,q),Q},calcAllAutoBins:m}},73316:function(r){"use strict";r.exports={eventDataKeys:["binNumber"]}},80536:function(r,e,n){"use strict";var i=n(3400),a=n(79811),t=n(24040).traceIs,o=n(20011),c=n(31508).validateCornerradius,u=i.nestedProperty,d=n(71888).getAxisGroup,s=[{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"}],l=["x","y"];r.exports=function(r,e){var n,m,p,I,y,f,g,_=e._histogramBinOpts={},h=[],v={},x=[];function P(r,e){return i.coerce(n._input,n,n._module.attributes,r,e)}function G(r){return"v"===r.orientation?"x":"y"}function C(r,n,t){var o=r.uid+"__"+t;n||(n=o);var c=function(r,n){return a.getFromTrace({_fullLayout:e},r,n).type}(r,t),u=r[t+"calendar"]||"",d=_[n],s=!0;d&&(c===d.axType&&u===d.calendar?(s=!1,d.traces.push(r),d.dirs.push(t)):(n=o,c!==d.axType&&i.warn(["Attempted to group the bins of trace",r.index,"set on a","type:"+c,"axis","with bins on","type:"+d.axType,"axis."].join(" ")),u!==d.calendar&&i.warn(["Attempted to group the bins of trace",r.index,"set with a",u,"calendar","with bins",d.calendar?"on a "+d.calendar+" calendar":"w/o a set calendar"].join(" ")))),s&&(_[n]={traces:[r],dirs:[t],axType:c,calendar:r[t+"calendar"]||""}),r["_"+t+"bingroup"]=n}for(y=0;yb&&G.splice(b,G.length-b),A.length>b&&A.splice(b,A.length-b);var M=[],B=[],k=[],F="string"===typeof P.size,z="string"===typeof S.size,w=[],R=[],E=F?w:P,N=z?R:S,T=0,D=[],J=[],U=e.histnorm,H=e.histfunc,L=-1!==U.indexOf("density"),O="max"===H||"min"===H?null:0,K=t.count,V=o[U],j=!1,W=[],Z=[],q="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";q&&"count"!==H&&(j="avg"===H,K=t[H]);var Y=P.size,X=h(P.start),Q=h(P.end)+(X-a.tickIncrement(X,Y,!1,g))/1e6;for(n=X;n=0&&p=0&&I-1,flipY:k.tiling.flip.indexOf("y")>-1,orientation:k.tiling.orientation,pad:{inner:k.tiling.pad},maxDepth:k._maxDepth}).descendants(),E=1/0,N=-1/0;R.forEach((function(r){var e=r.depth;e>=k._maxDepth?(r.x0=r.x1=(r.x0+r.x1)/2,r.y0=r.y1=(r.y0+r.y1)/2):(E=Math.min(E,e),N=Math.max(N,e))})),I=I.data(R,s.getPtId),k._maxVisibleLayers=isFinite(N)?N-E+1:0,I.enter().append("g").classed("slice",!0),C(I,p,{},[f,g],v),I.order();var T=null;if(G&&b){var D=s.getPtId(b);I.each((function(r){null===T&&s.getPtId(r)===D&&(T={x0:r.x0,x1:r.x1,y0:r.y0,y1:r.y1})}))}var J=function(){return T||{x0:0,x1:f,y0:0,y1:g}},U=I;return G&&(U=U.transition().each("end",(function(){var e=i.select(this);s.setSliceCursor(e,r,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),U.each((function(c){c._x0=_(c.x0),c._x1=_(c.x1),c._y0=h(c.y0),c._y1=h(c.y1),c._hoverX=_(c.x1-k.tiling.pad),c._hoverY=h(w?c.y1-k.tiling.pad/2:c.y0+k.tiling.pad/2);var I=i.select(this),y=a.ensureSingle(I,"path","surface",(function(r){r.style("pointer-events",M?"none":"all")}));G?y.transition().attrTween("d",(function(r){var e=S(r,p,J(),[f,g],{orientation:k.tiling.orientation,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1});return function(r){return v(e(r))}})):y.attr("d",v),I.call(l,n,r,e,{styleOne:u,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(s.setSliceCursor,r,{isTransitioning:r._transitioning}),y.call(u,c,k,r,{hovered:!1}),c.x0===c.x1||c.y0===c.y1?c._text="":c._text=m(c,n,k,e,B)||"";var C=a.ensureSingle(I,"g","slicetext"),b=a.ensureSingle(C,"text","",(function(r){r.attr("data-notex",1)})),R=a.ensureUniformFontSize(r,s.determineTextFont(k,c,B.font));b.text(c._text||" ").classed("slicetext",!0).attr("text-anchor",z?"end":F?"start":"middle").call(t.font,R).call(o.convertToTspans,r),c.textBB=t.bBox(b.node()),c.transform=x(c,{fontSize:R.size}),c.transform.fontSize=R.size,G?b.transition().attrTween("transform",(function(r){var e=A(r,p,J(),[f,g]);return function(r){return P(e(r))}})):b.attr("transform",P(c))})),T}},29044:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"icicle",basePlotModule:n(59564),categories:[],animatable:!0,attributes:n(97376),layoutAttributes:n(90676),supplyDefaults:n(7045),supplyLayoutDefaults:n(4304),calc:n(73876).r,crossTraceCalc:n(73876).q,plot:n(38364),style:n(47192).style,colorbar:n(5528),meta:{}}},90676:function(r){"use strict";r.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(r,e,n){"use strict";var i=n(3400),a=n(90676);r.exports=function(r,e){function n(n,t){return i.coerce(r,e,a,n,t)}n("iciclecolorway",e.colorway),n("extendiciclecolors")}},25132:function(r,e,n){"use strict";var i=n(74148),a=n(83024);r.exports=function(r,e,n){var t=n.flipX,o=n.flipY,c="h"===n.orientation,u=n.maxDepth,d=e[0],s=e[1];u&&(d=(r.height+1)*e[0]/Math.min(r.height+1,u),s=(r.height+1)*e[1]/Math.min(r.height+1,u));var l=i.partition().padding(n.pad.inner).size(c?[e[1],d]:[e[0],s])(r);return(c||t||o)&&a(l,e,{swapXY:c,flipX:t,flipY:o}),l}},38364:function(r,e,n){"use strict";var i=n(95808),a=n(67880);r.exports=function(r,e,n,t){return i(r,e,n,t,{type:"icicle",drawDescendants:a})}},47192:function(r,e,n){"use strict";var i=n(33428),a=n(76308),t=n(3400),o=n(82744).resizeText,c=n(60404);function u(r,e,n,i){var o=e.data.data,u=!e.children,d=o.i,s=t.castOption(n,d,"marker.line.color")||a.defaultLine,l=t.castOption(n,d,"marker.line.width")||0;r.call(c,e,n,i).style("stroke-width",l).call(a.stroke,s).style("opacity",u?n.leaf.opacity:null)}r.exports={style:function(r){var e=r._fullLayout._iciclelayer.selectAll(".trace");o(r,e,"icicle"),e.each((function(e){var n=i.select(this),a=e[0].trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each((function(e){i.select(this).call(u,e,a,r)}))}))},styleOne:u}},95188:function(r,e,n){"use strict";for(var i=n(45464),a=n(52904).zorder,t=n(21776).Ks,o=n(92880).extendFlat,c=n(47797).colormodel,u=["rgb","rgba","rgba256","hsl","hsla"],d=[],s=[],l=0;l0||i.inbox(n-c.y0,n-(c.y0+c.h*u.dy),0)>0)){var l,m=Math.floor((e-c.x0)/u.dx),p=Math.floor(Math.abs(n-c.y0)/u.dy);if(u._hasZ?l=c.z[p][m]:u._hasSource&&(l=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(m,p,1,1).data),l){var I,y=c.hi||u.hoverinfo;if(y){var f=y.split("+");-1!==f.indexOf("all")&&(f=["color"]),-1!==f.indexOf("color")&&(I=!0)}var g,_=o.colormodel[u.colormodel],h=_.colormodel||u.colormodel,v=h.length,x=u._scaler(l),P=_.suffix,G=[];(u.hovertemplate||I)&&(G.push("["+[x[0]+P[0],x[1]+P[1],x[2]+P[2]].join(", ")),4===v&&G.push(", "+x[3]+P[3]),G.push("]"),G=G.join(""),r.extraText=h.toUpperCase()+": "+G),t(u.hovertext)&&t(u.hovertext[p])?g=u.hovertext[p][m]:t(u.text)&&t(u.text[p])&&(g=u.text[p][m]);var C=s.c2p(c.y0+(p+.5)*u.dy),S=c.x0+(m+.5)*u.dx,A=c.y0+(p+.5)*u.dy,b="["+l.slice(0,u.colormodel.length).join(", ")+"]";return[a.extendFlat(r,{index:[p,m],x0:d.c2p(c.x0+m*u.dx),x1:d.c2p(c.x0+(m+1)*u.dx),y0:C,y1:C,color:x,xVal:S,xLabelVal:S,yVal:A,yLabelVal:A,zLabelVal:b,text:g,hovertemplateLabels:{zLabel:b,colorLabel:G,"color[0]Label":x[0]+P[0],"color[1]Label":x[1]+P[1],"color[2]Label":x[2]+P[2],"color[3]Label":x[3]+P[3]}})]}}}},48928:function(r,e,n){"use strict";r.exports={attributes:n(95188),supplyDefaults:n(13188),calc:n(93336),plot:n(63715),style:n(28576),hoverPoints:n(24892),eventData:n(79972),moduleType:"trace",name:"image",basePlotModule:n(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=a.strTranslate,o=n(9616),c=n(47797),u=n(9188),d=n(2264).STYLE;r.exports=function(r,e,n,s){var l=e.xaxis,m=e.yaxis,p=!r._context._exportedPlot&&u();a.makeTraceGroups(s,n,"im").each((function(e){var n=i.select(this),u=e[0],s=u.trace,I=("fast"===s.zsmooth||!1===s.zsmooth&&p)&&!s._hasZ&&s._hasSource&&"linear"===l.type&&"linear"===m.type;s._realImage=I;var y,f,g,_,h,v,x=u.z,P=u.x0,G=u.y0,C=u.w,S=u.h,A=s.dx,b=s.dy;for(v=0;void 0===y&&v0;)f=l.c2p(P+v*A),v--;for(v=0;void 0===_&&v0;)h=m.c2p(G+v*b),v--;fw[0];if(R||E){var N=y+M/2,T=_+B/2;F+="transform:"+t(N+"px",T+"px")+"scale("+(R?-1:1)+","+(E?-1:1)+")"+t(-N+"px",-T+"px")+";"}}k.attr("style",F);var D=new Promise((function(r){if(s._hasZ)r();else if(s._hasSource)if(s._canvas&&s._canvas.el.width===C&&s._canvas.el.height===S&&s._canvas.source===s.source)r();else{var e=document.createElement("canvas");e.width=C,e.height=S;var n=e.getContext("2d",{willReadFrequently:!0});s._image=s._image||new Image;var i=s._image;i.onload=function(){n.drawImage(i,0,0),s._canvas={el:e,source:s.source},r()},i.setAttribute("src",s.source)}})).then((function(){var r,e;if(s._hasZ)e=J((function(r,e){var n=x[e][r];return a.isTypedArray(n)&&(n=Array.from(n)),n})),r=e.toDataURL("image/png");else if(s._hasSource)if(I)r=s.source;else{var n=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,C,S).data;e=J((function(r,e){var i=4*(e*C+r);return[n[i],n[i+1],n[i+2],n[i+3]]})),r=e.toDataURL("image/png")}k.attr({"xlink:href":r,height:B,width:M,x:y,y:_})}));r._promises.push(D)}function J(r){var e=document.createElement("canvas");e.width=M,e.height=B;var n,i=e.getContext("2d",{willReadFrequently:!0}),t=function(r){return a.constrain(Math.round(l.c2p(P+r*A)-y),0,M)},o=function(r){return a.constrain(Math.round(m.c2p(G+r*b)-_),0,B)},d=c.colormodel[s.colormodel],p=d.colormodel||s.colormodel,I=d.fmt;for(v=0;v0}function G(r){r.each((function(r){_.stroke(i.select(this),r.line.color)})).each((function(r){_.fill(i.select(this),r.color)})).style("stroke-width",(function(r){return r.line.width}))}function C(r,e,n){var i=r._fullLayout,a=o.extendFlat({type:"linear",ticks:"outside",range:n,showline:!0},e),t={type:"linear",_id:"x"+e._id},c={letter:"x",font:i.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function u(r,e){return o.coerce(a,t,g,r,e)}return y(a,t,u,c,i),f(a,t,u,c),t}function S(r,e,n){return[Math.min(e/r.width,n/r.height),r,e+"x"+n]}function A(r,e,n,a){var t=document.createElementNS("http://www.w3.org/2000/svg","text"),o=i.select(t);return o.text(r).attr("x",0).attr("y",0).attr("text-anchor",n).attr("data-unformatted",r).call(p.convertToTspans,a).call(l.font,e),l.bBox(o.node())}function b(r,e,n,i,a,t){var c="_cache"+e;r[c]&&r[c].key===a||(r[c]={key:a,value:n});var u=o.aggNums(t,null,[r[c].value,i],2);return r[c].value=u,u}r.exports=function(r,e,n,y){var f,g=r._fullLayout;P(n)&&y&&(f=y()),o.makeTraceGroups(g._indicatorlayer,e,"trace").each((function(e){var y,M,B,k,F,z=e[0].trace,w=i.select(this),R=z._hasGauge,E=z._isAngular,N=z._isBullet,T=z.domain,D={w:g._size.w*(T.x[1]-T.x[0]),h:g._size.h*(T.y[1]-T.y[0]),l:g._size.l+g._size.w*T.x[0],r:g._size.r+g._size.w*(1-T.x[1]),t:g._size.t+g._size.h*(1-T.y[1]),b:g._size.b+g._size.h*T.y[0]},J=D.l+D.w/2,U=D.t+D.h/2,H=Math.min(D.w/2,D.h),L=m.innerRadius*H,O=z.align||"center";if(M=U,R){if(E&&(y=J,M=U+H/2,B=function(r){return function(r,e){var n=Math.sqrt(r.width/2*(r.width/2)+r.height*r.height),i=e/n;return[i,r,e]}(r,.9*L)}),N){var K=m.bulletPadding,V=1-m.bulletNumberDomainSize+K;y=D.l+(V+(1-V)*v[O])*D.w,B=function(r){return S(r,(m.bulletNumberDomainSize-K)*D.w,D.h)}}}else y=D.l+v[O]*D.w,B=function(r){return S(r,D.w,D.h)};!function(r,e,n,a){var d,s,m,y=n[0].trace,f=a.numbersX,g=a.numbersY,G=y.align||"center",S=h[G],M=a.transitionOpts,B=a.onComplete,k=o.ensureSingle(e,"g","numbers"),F=[];y._hasNumber&&F.push("number"),y._hasDelta&&(F.push("delta"),"left"===y.delta.position&&F.reverse());var z=k.selectAll("text").data(F);function w(e,n,i,a){if(!e.match("s")||i>=0===a>=0||n(i).slice(-1).match(x)||n(a).slice(-1).match(x))return n;var t=e.slice().replace("s","f").replace(/\d+/,(function(r){return parseInt(r)-1})),o=C(r,{tickformat:t});return function(r){return Math.abs(r)<1?I.tickText(o,r).text:n(r)}}function R(){var e=C(r,{tickformat:y.number.valueformat},y._range);e.setScale(),I.prepTicks(e);var a=function(r){return I.tickText(e,r).text},o=y.number.suffix,c=y.number.prefix,u=k.select("text.number");function s(){var e="number"===typeof n[0].y?c+a(n[0].y)+o:"-";u.text(e).call(l.font,y.number.font).call(p.convertToTspans,r)}return P(M)?u.transition().duration(M.duration).ease(M.easing).each("end",(function(){s(),B&&B()})).each("interrupt",(function(){s(),B&&B()})).attrTween("text",(function(){var r=i.select(this),e=t(n[0].lastY,n[0].y);y._lastValue=n[0].y;var u=w(y.number.valueformat,a,n[0].lastY,n[0].y);return function(n){r.text(c+u(e(n))+o)}})):s(),d=A(c+a(n[0].y)+o,y.number.font,S,r),u}function E(){var e=C(r,{tickformat:y.delta.valueformat},y._range);e.setScale(),I.prepTicks(e);var a=function(r){return I.tickText(e,r).text},o=y.delta.suffix,c=y.delta.prefix,u=function(r){return y.delta.relative?r.relativeDelta:r.delta},d=function(r,e){return 0===r||"number"!==typeof r||isNaN(r)?"-":(r>0?y.delta.increasing.symbol:y.delta.decreasing.symbol)+c+e(r)+o},m=function(r){return r.delta>=0?y.delta.increasing.color:y.delta.decreasing.color};void 0===y._deltaLastValue&&(y._deltaLastValue=u(n[0]));var f=k.select("text.delta");function g(){f.text(d(u(n[0]),a)).call(_.fill,m(n[0])).call(p.convertToTspans,r)}return f.call(l.font,y.delta.font).call(_.fill,m({delta:y._deltaLastValue})),P(M)?f.transition().duration(M.duration).ease(M.easing).tween("text",(function(){var r=i.select(this),e=u(n[0]),o=y._deltaLastValue,c=w(y.delta.valueformat,a,o,e),s=t(o,e);return y._deltaLastValue=e,function(e){r.text(d(s(e),c)),r.call(_.fill,m({delta:s(e)}))}})).each("end",(function(){g(),B&&B()})).each("interrupt",(function(){g(),B&&B()})):g(),s=A(d(u(n[0]),a),y.delta.font,S,r),f}z.enter().append("text"),z.attr("text-anchor",(function(){return S})).attr("class",(function(r){return r})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),z.exit().remove();var N,T=y.mode+y.align;if(y._hasDelta&&(N=E(),T+=y.delta.position+y.delta.font.size+y.delta.font.family+y.delta.valueformat,T+=y.delta.increasing.symbol+y.delta.decreasing.symbol,m=s),y._hasNumber&&(R(),T+=y.number.font.size+y.number.font.family+y.number.valueformat+y.number.suffix+y.number.prefix,m=d),y._hasDelta&&y._hasNumber){var D,J,U=[(d.left+d.right)/2,(d.top+d.bottom)/2],H=[(s.left+s.right)/2,(s.top+s.bottom)/2],L=.75*y.delta.font.size;"left"===y.delta.position&&(D=b(y,"deltaPos",0,-1*(d.width*v[y.align]+s.width*(1-v[y.align])+L),T,Math.min),J=U[1]-H[1],m={width:d.width+s.width+L,height:Math.max(d.height,s.height),left:s.left+D,right:d.right,top:Math.min(d.top,s.top+J),bottom:Math.max(d.bottom,s.bottom+J)}),"right"===y.delta.position&&(D=b(y,"deltaPos",0,d.width*(1-v[y.align])+s.width*v[y.align]+L,T,Math.max),J=U[1]-H[1],m={width:d.width+s.width+L,height:Math.max(d.height,s.height),left:d.left,right:s.right+D,top:Math.min(d.top,s.top+J),bottom:Math.max(d.bottom,s.bottom+J)}),"bottom"===y.delta.position&&(D=null,J=s.height,m={width:Math.max(d.width,s.width),height:d.height+s.height,left:Math.min(d.left,s.left),right:Math.max(d.right,s.right),top:d.bottom-d.height,bottom:d.bottom+s.height}),"top"===y.delta.position&&(D=null,J=d.top,m={width:Math.max(d.width,s.width),height:d.height+s.height,left:Math.min(d.left,s.left),right:Math.max(d.right,s.right),top:d.bottom-d.height-s.height,bottom:d.bottom}),N.attr({dx:D,dy:J})}(y._hasNumber||y._hasDelta)&&k.attr("transform",(function(){var r=a.numbersScaler(m);T+=r[2];var e,n=b(y,"numbersScale",1,r[0],T,Math.min);y._scaleNumbers||(n=1),e=y._isAngular?g-n*m.bottom:g-n*(m.top+m.bottom)/2,y._numbersTop=n*m.top+e;var i=m[G];"center"===G&&(i=(m.left+m.right)/2);var t=f-n*i;return t=b(y,"numbersTranslate",0,t,T,Math.max),u(t,e)+c(n)}))}(r,w,e,{numbersX:y,numbersY:M,numbersScaler:B,transitionOpts:n,onComplete:f}),R&&(k={range:z.gauge.axis.range,color:z.gauge.bgcolor,line:{color:z.gauge.bordercolor,width:0},thickness:1},F={range:z.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:z.gauge.bordercolor,width:z.gauge.borderwidth},thickness:1});var j=w.selectAll("g.angular").data(E?e:[]);j.exit().remove();var W=w.selectAll("g.angularaxis").data(E?e:[]);W.exit().remove(),E&&function(r,e,n,t){var o,c,l,m,p=n[0].trace,y=t.size,f=t.radius,g=t.innerRadius,_=t.gaugeBg,h=t.gaugeOutline,v=[y.l+y.w/2,y.t+y.h/2+f/2],x=t.gauge,S=t.layer,A=t.transitionOpts,b=t.onComplete,M=Math.PI/2;function B(r){var e=p.gauge.axis.range[0],n=(r-e)/(p.gauge.axis.range[1]-e)*Math.PI-M;return n<-M?-M:n>M?M:n}function k(r){return i.svg.arc().innerRadius((g+f)/2-r/2*(f-g)).outerRadius((g+f)/2+r/2*(f-g)).startAngle(-M)}function F(r){r.attr("d",(function(r){return k(r.thickness).startAngle(B(r.range[0])).endAngle(B(r.range[1]))()}))}x.enter().append("g").classed("angular",!0),x.attr("transform",u(v[0],v[1])),S.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),S.selectAll("g.xangularaxistick,path,text").remove(),(o=C(r,p.gauge.axis)).type="linear",o.range=p.gauge.axis.range,o._id="xangularaxis",o.ticklabeloverflow="allow",o.setScale();var z=function(r){return(o.range[0]-r.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},w={},R=I.makeLabelFns(o,0).labelStandoff;w.xFn=function(r){var e=z(r);return Math.cos(e)*R},w.yFn=function(r){var e=z(r),n=Math.sin(e)>0?.2:1;return-Math.sin(e)*(R+r.fontSize*n)+Math.abs(Math.cos(e))*(r.fontSize*s)},w.anchorFn=function(r){var e=z(r),n=Math.cos(e);return Math.abs(n)<.1?"middle":n>0?"start":"end"},w.heightFn=function(r,e,n){var i=z(r);return-.5*(1+Math.sin(i))*n};var E=function(r){return u(v[0]+f*Math.cos(r),v[1]-f*Math.sin(r))};l=function(r){return E(z(r))};var N=function(r){var e=z(r);return E(e)+"rotate("+-d(e)+")"};if(c=I.calcTicks(o),m=I.getTickSigns(o)[2],o.visible){m="inside"===o.ticks?-1:1;var T=(o.linewidth||1)/2;I.drawTicks(r,o,{vals:c,layer:S,path:"M"+m*T+",0h"+m*o.ticklen,transFn:N}),I.drawLabels(r,o,{vals:c,layer:S,transFn:l,labelFns:w})}var D=[_].concat(p.gauge.steps),J=x.selectAll("g.bg-arc").data(D);J.enter().append("g").classed("bg-arc",!0).append("path"),J.select("path").call(F).call(G),J.exit().remove();var U=k(p.gauge.bar.thickness),H=x.selectAll("g.value-arc").data([p.gauge.bar]);H.enter().append("g").classed("value-arc",!0).append("path");var L,O,K,V=H.select("path");P(A)?(V.transition().duration(A.duration).ease(A.easing).each("end",(function(){b&&b()})).each("interrupt",(function(){b&&b()})).attrTween("d",(L=U,O=B(n[0].lastY),K=B(n[0].y),function(){var r=a(O,K);return function(e){return L.endAngle(r(e))()}})),p._lastValue=n[0].y):V.attr("d","number"===typeof n[0].y?U.endAngle(B(n[0].y)):"M0,0Z"),V.call(G),H.exit().remove(),D=[];var j=p.gauge.threshold.value;(j||0===j)&&D.push({range:[j,j],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=x.selectAll("g.threshold-arc").data(D);W.enter().append("g").classed("threshold-arc",!0).append("path"),W.select("path").call(F).call(G),W.exit().remove();var Z=x.selectAll("g.gauge-outline").data([h]);Z.enter().append("g").classed("gauge-outline",!0).append("path"),Z.select("path").call(F).call(G),Z.exit().remove()}(r,0,e,{radius:H,innerRadius:L,gauge:j,layer:W,size:D,gaugeBg:k,gaugeOutline:F,transitionOpts:n,onComplete:f});var Z=w.selectAll("g.bullet").data(N?e:[]);Z.exit().remove();var q=w.selectAll("g.bulletaxis").data(N?e:[]);q.exit().remove(),N&&function(r,e,n,i){var a,t,o,c,d,s=n[0].trace,l=i.gauge,p=i.layer,y=i.gaugeBg,f=i.gaugeOutline,g=i.size,h=s.domain,v=i.transitionOpts,x=i.onComplete;l.enter().append("g").classed("bullet",!0),l.attr("transform",u(g.l,g.t)),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var S=g.h,A=s.gauge.bar.thickness*S,b=h.x[0],M=h.x[0]+(h.x[1]-h.x[0])*(s._hasNumber||s._hasDelta?1-m.bulletNumberDomainSize:1);function B(r){r.attr("width",(function(r){return Math.max(0,a.c2p(r.range[1])-a.c2p(r.range[0]))})).attr("x",(function(r){return a.c2p(r.range[0])})).attr("y",(function(r){return.5*(1-r.thickness)*S})).attr("height",(function(r){return r.thickness*S}))}(a=C(r,s.gauge.axis))._id="xbulletaxis",a.domain=[b,M],a.setScale(),t=I.calcTicks(a),o=I.makeTransTickFn(a),c=I.getTickSigns(a)[2],d=g.t+g.h,a.visible&&(I.drawTicks(r,a,{vals:"inside"===a.ticks?I.clipEnds(a,t):t,layer:p,path:I.makeTickPath(a,d,c),transFn:o}),I.drawLabels(r,a,{vals:t,layer:p,transFn:o,labelFns:I.makeLabelFns(a,d)}));var k=[y].concat(s.gauge.steps),F=l.selectAll("g.bg-bullet").data(k);F.enter().append("g").classed("bg-bullet",!0).append("rect"),F.select("rect").call(B).call(G),F.exit().remove();var z=l.selectAll("g.value-bullet").data([s.gauge.bar]);z.enter().append("g").classed("value-bullet",!0).append("rect"),z.select("rect").attr("height",A).attr("y",(S-A)/2).call(G),P(v)?z.select("rect").transition().duration(v.duration).ease(v.easing).each("end",(function(){x&&x()})).each("interrupt",(function(){x&&x()})).attr("width",Math.max(0,a.c2p(Math.min(s.gauge.axis.range[1],n[0].y)))):z.select("rect").attr("width","number"===typeof n[0].y?Math.max(0,a.c2p(Math.min(s.gauge.axis.range[1],n[0].y))):0),z.exit().remove();var w=n.filter((function(){return s.gauge.threshold.value||0===s.gauge.threshold.value})),R=l.selectAll("g.threshold-bullet").data(w);R.enter().append("g").classed("threshold-bullet",!0).append("line"),R.select("line").attr("x1",a.c2p(s.gauge.threshold.value)).attr("x2",a.c2p(s.gauge.threshold.value)).attr("y1",(1-s.gauge.threshold.thickness)/2*S).attr("y2",(1-(1-s.gauge.threshold.thickness)/2)*S).call(_.stroke,s.gauge.threshold.line.color).style("stroke-width",s.gauge.threshold.line.width),R.exit().remove();var E=l.selectAll("g.gauge-outline").data([f]);E.enter().append("g").classed("gauge-outline",!0).append("rect"),E.select("rect").call(B).call(G),E.exit().remove()}(r,0,e,{gauge:Z,layer:q,size:D,gaugeBg:k,gaugeOutline:F,transitionOpts:n,onComplete:f});var Y=w.selectAll("text.title").data(e);Y.exit().remove(),Y.enter().append("text").classed("title",!0),Y.attr("text-anchor",(function(){return N?h.right:h[z.title.align]})).text(z.title.text).call(l.font,z.title.font).call(p.convertToTspans,r),Y.attr("transform",(function(){var r,e=D.l+D.w*v[z.title.align],n=m.titlePadding,i=l.bBox(Y.node());return R?(E&&(r=z.gauge.axis.visible?l.bBox(W.node()).top-n-i.bottom:D.t+D.h/2-H/2-i.bottom-n),N&&(r=M-(i.top+i.bottom)/2,e=D.l-m.bulletPadding*D.w)):r=z._numbersTop-n-i.bottom,u(e,r)}))}))}},50048:function(r,e,n){"use strict";var i=n(49084),a=n(29736).axisHoverFormat,t=n(21776).Ks,o=n(52948),c=n(45464),u=n(92880).extendFlat,d=n(67824).overrideAll,s=r.exports=d(u({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:t(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),valuehoverformat:a("value",1),showlegend:u({},c.showlegend,{dflt:!1})},i("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:u({},c.hoverinfo)}),"calc","nested");s.flatshading.dflt=!0,s.lighting.facenormalsepsilon.dflt=0,s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes",s.transforms=void 0},62624:function(r,e,n){"use strict";var i=n(47128),a=n(3832).processGrid,t=n(3832).filter;r.exports=function(r,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=t(e.x,e._len),e._y=t(e.y,e._len),e._z=t(e.z,e._len),e._value=t(e.value,e._len);var n=a(e);e._gridFill=n.fill,e._Xs=n.Xs,e._Ys=n.Ys,e._Zs=n.Zs,e._len=n.len;for(var o=1/0,c=-1/0,u=0;u0;n--){var i=Math.min(e[n],e[n-1]),a=Math.max(e[n],e[n-1]);if(a>i&&i-1}function N(r,e){return null===r?e:r}function T(e,n,i){k();var a,t,o,u=[n],d=[i];if(c>=1)u=[n],d=[i];else if(c>0){var s=function(r,e){var n=r[0],i=r[1],a=r[2],t=function(r,e,n){for(var i=[],a=0;a-1?i[p]:B(I,y,g);m[p]=h>-1?h:z(I,y,g,N(e,_))}a=m[0],t=m[1],o=m[2],r._meshI.push(a),r._meshJ.push(t),r._meshK.push(o),++f}}function D(r,e,n,i){var a=r[3];ai&&(a=i);for(var t=(r[3]-a)/(r[3]-e[3]+1e-9),o=[],c=0;c<4;c++)o[c]=(1-t)*r[c]+t*e[c];return o}function J(r,e,n){return r>=e&&r<=n}function U(r){var e=.001*(M-b);return r>=b-e&&r<=M+e}function H(e){for(var n=[],i=0;i<4;i++){var a=e[i];n.push([r._x[a],r._y[a],r._z[a],r._value[a]])}return n}var L=3;function O(r,e,n,i,a,t){t||(t=1),n=[-1,-1,-1];var o=!1,c=[J(e[0][3],i,a),J(e[1][3],i,a),J(e[2][3],i,a)];if(!c[0]&&!c[1]&&!c[2])return!1;var u=function(r,e,n){return U(e[0][3])&&U(e[1][3])&&U(e[2][3])?(T(r,e,n),!0):tMath.abs(G-A)?[S,G]:[G,A];rr(n,B[0],B[1])}}var k=[[Math.min(b,A),Math.max(b,A)],[Math.min(S,M),Math.max(S,M)]];["x","y","z"].forEach((function(n){for(var i=[],a=0;a0&&(l.push(I.id),"x"===n?m.push([I.distRatio,0,0]):"y"===n?m.push([0,I.distRatio,0]):m.push([0,0,I.distRatio]))}else s=ar(1,"x"===n?v-1:"y"===n?x-1:P-1);l.length>0&&(i[t]="x"===n?er(e,l,o,c,m,i[t]):"y"===n?nr(e,l,o,c,m,i[t]):ir(e,l,o,c,m,i[t]),t++),s.length>0&&(i[t]="x"===n?Y(e,s,o,c,i[t]):"y"===n?X(e,s,o,c,i[t]):Q(e,s,o,c,i[t]),t++)}var y=r.caps[n];y.show&&y.fill&&(R(y.fill),i[t]="x"===n?Y(e,[0,v-1],o,c,i[t]):"y"===n?X(e,[0,x-1],o,c,i[t]):Q(e,[0,P-1],o,c,i[t]),t++)}})),0===f&&F(),r._meshX=i,r._meshY=a,r._meshZ=t,r._meshIntensity=o,r._Xs=g,r._Ys=_,r._Zs=h}(),r}r.exports={findNearestOnAxis:d,generateIsoMeshes:p,createIsosurfaceTrace:function(r,e){var n=r.glplot.gl,a=i({gl:n}),t=new s(r,a,e.uid);return a._trace=t,t.update(e),r.glplot.add(a),t}}},70548:function(r,e,n){"use strict";var i=n(3400),a=n(24040),t=n(50048),o=n(27260);function c(r,e,n,i,t){var c=t("isomin"),u=t("isomax");void 0!==u&&null!==u&&void 0!==c&&null!==c&&c>u&&(e.isomin=null,e.isomax=null);var d=t("x"),s=t("y"),l=t("z"),m=t("value");d&&d.length&&s&&s.length&&l&&l.length&&m&&m.length?(a.getComponentMethod("calendars","handleTraceDefaults")(r,e,["x","y","z"],i),t("valuehoverformat"),["x","y","z"].forEach((function(r){t(r+"hoverformat");var e="caps."+r;t(e+".show")&&t(e+".fill");var n="slices."+r;t(n+".show")&&(t(n+".fill"),t(n+".locations"))})),t("spaceframe.show")&&t("spaceframe.fill"),t("surface.show")&&(t("surface.count"),t("surface.fill"),t("surface.pattern")),t("contour.show")&&(t("contour.color"),t("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(r){t(r)})),o(r,e,i,t,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}r.exports={supplyDefaults:function(r,e,n,a){c(r,e,0,a,(function(n,a){return i.coerce(r,e,t,n,a)}))},supplyIsoDefaults:c}},6296:function(r,e,n){"use strict";r.exports={attributes:n(50048),supplyDefaults:n(70548).supplyDefaults,calc:n(62624),colorbar:{min:"cmin",max:"cmax"},plot:n(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:n(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(r,e,n){"use strict";var i=n(49084),a=n(29736).axisHoverFormat,t=n(21776).Ks,o=n(16716),c=n(45464),u=n(92880).extendFlat;r.exports=u({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:t({editType:"calc"}),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},i("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:u({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:"calc"},lightposition:{x:u({},o.lightposition.x,{dflt:1e5}),y:u({},o.lightposition.y,{dflt:1e5}),z:u({},o.lightposition.z,{dflt:0}),editType:"calc"},lighting:u({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"},o.lighting),hoverinfo:u({},c.hoverinfo,{editType:"calc"}),showlegend:u({},c.showlegend,{dflt:!1})})},1876:function(r,e,n){"use strict";var i=n(47128);r.exports=function(r,e){e.intensity&&i(r,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},576:function(r,e,n){"use strict";var i=n(67792).gl_mesh3d,a=n(67792).delaunay_triangulate,t=n(67792).alpha_shape,o=n(67792).convex_hull,c=n(33040).parseColorScale,u=n(3400).isArrayOrTypedArray,d=n(43080),s=n(8932).extractOpts,l=n(52094);function m(r,e,n){this.scene=r,this.uid=n,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p=m.prototype;function I(r){for(var e=[],n=r.length,i=0;i=e-.5)return!1;return!0}p.handlePick=function(r){if(r.object===this.mesh){var e=r.index=r.data.index;r.data._cellCenter?r.traceCoordinate=r.data.dataCoordinate:r.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var n=this.data.hovertext||this.data.text;return u(n)&&void 0!==n[e]?r.textLabel=n[e]:n&&(r.textLabel=n),!0}},p.update=function(r){var e=this.scene,n=e.fullSceneLayout;this.data=r;var i,u=r.x.length,m=l(y(n.xaxis,r.x,e.dataScale[0],r.xcalendar),y(n.yaxis,r.y,e.dataScale[1],r.ycalendar),y(n.zaxis,r.z,e.dataScale[2],r.zcalendar));if(r.i&&r.j&&r.k){if(r.i.length!==r.j.length||r.j.length!==r.k.length||!g(r.i,u)||!g(r.j,u)||!g(r.k,u))return;i=l(f(r.i),f(r.j),f(r.k))}else i=0===r.alphahull?o(m):r.alphahull>0?t(r.alphahull,m):function(r,e){for(var n=["x","y","z"].indexOf(r),i=[],t=e.length,o=0;og):f=S>P,g=S;var A=d(P,G,C,S);A.pos=x,A.yc=(P+S)/2,A.i=v,A.dir=f?"increasing":"decreasing",A.x=A.pos,A.y=[C,G],_&&(A.orig_p=n[v]),I&&(A.tx=e.text[v]),y&&(A.htx=e.hovertext[v]),h.push(A)}else h.push({pos:x,empty:!0})}return e._extremes[u._id]=t.findExtremes(u,i.concat(m,l),{padded:!0}),h.length&&(h[0].t={labels:{open:a(r,"open:")+" ",high:a(r,"high:")+" ",low:a(r,"low:")+" ",close:a(r,"close:")+" "}}),h}r.exports={calc:function(r,e){var n=t.getFromId(r,e.xaxis),a=t.getFromId(r,e.yaxis),c=function(r,e,n){var a=n._minDiff;if(!a){var t,c=r._fullData,u=[];for(a=1/0,t=0;t"+d.labels[h]+i.hoverLabelText(c,v,u.yhoverformat):((_=a.extendFlat({},m)).y0=_.y1=x,_.yLabelVal=v,_.yLabel=d.labels[h]+i.hoverLabelText(c,v,u.yhoverformat),_.name="",l.push(_),f[v]=_)}return l}function m(r,e,n,a){var t=r.cd,o=r.ya,u=t[0].trace,l=t[0].t,m=s(r,e,n,a);if(!m)return[];var p=t[m.index],I=m.index=p.i,y=p.dir;function f(r){return l.labels[r]+i.hoverLabelText(o,u[r][I],u.yhoverformat)}var g=p.hi||u.hoverinfo,_=g.split("+"),h="all"===g,v=h||-1!==_.indexOf("y"),x=h||-1!==_.indexOf("text"),P=v?[f("open"),f("high"),f("low"),f("close")+" "+d[y]]:[];return x&&c(p,u,P),m.extraText=P.join("
"),m.y0=m.y1=o.c2p(p.yc,!0),[m]}r.exports={hoverPoints:function(r,e,n,i){return r.cd[0].trace.hoverlabel.split?l(r,e,n,i):m(r,e,n,i)},hoverSplit:l,hoverOnPoints:m}},65456:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"ohlc",basePlotModule:n(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:n(20279),supplyDefaults:n(23860),calc:n(42812).calc,plot:n(36664),style:n(14008),hoverPoints:n(18720).hoverPoints,selectPoints:n(97384)}},52744:function(r,e,n){"use strict";var i=n(24040),a=n(3400);r.exports=function(r,e,n,t){var o=n("x"),c=n("open"),u=n("high"),d=n("low"),s=n("close");if(n("hoverlabel.split"),i.getComponentMethod("calendars","handleTraceDefaults")(r,e,["x"],t),c&&u&&d&&s){var l=Math.min(c.length,u.length,d.length,s.length);return o&&(l=Math.min(l,a.minRowLength(o))),e._length=l,l}}},36664:function(r,e,n){"use strict";var i=n(33428),a=n(3400);r.exports=function(r,e,n,t){var o=e.yaxis,c=e.xaxis,u=!!c.rangebreaks;a.makeTraceGroups(t,n,"trace ohlc").each((function(r){var e=i.select(this),n=r[0],t=n.t;if(!0!==n.trace.visible||t.empty)e.remove();else{var d=t.tickLen,s=e.selectAll("path").data(a.identity);s.enter().append("path"),s.exit().remove(),s.attr("d",(function(r){if(r.empty)return"M0,0Z";var e=c.c2p(r.pos-d,!0),n=c.c2p(r.pos+d,!0),i=u?(e+n)/2:c.c2p(r.pos,!0);return"M"+e+","+o.c2p(r.o,!0)+"H"+i+"M"+i+","+o.c2p(r.h,!0)+"V"+o.c2p(r.l,!0)+"M"+n+","+o.c2p(r.c,!0)+"H"+i}))}}))}},97384:function(r){"use strict";r.exports=function(r,e){var n,i=r.cd,a=r.xaxis,t=r.yaxis,o=[],c=i[0].t.bPos||0;if(!1===e)for(n=0;n=r.length)return!1;if(void 0!==e[r[n]])return!1;e[r[n]]=!0}return!0}(n))for(e=0;e0||s(c);d&&(o="array");var l=n("categoryorder",o);"array"===l?(n("categoryarray"),n("ticktext")):(delete r.categoryarray,delete r.ticktext),d||"array"!==l||(e.categoryorder="trace")}}r.exports=function(r,e,n,s){function m(n,a){return i.coerce(r,e,u,n,a)}var p=c(r,e,{name:"dimensions",handleItemDefaults:l}),I=function(r,e,n,o,c){c("line.shape"),c("line.hovertemplate");var u=c("line.color",o.colorway[0]);if(a(r,"line")&&i.isArrayOrTypedArray(u)){if(u.length)return c("line.colorscale"),t(r,e,o,c,{prefix:"line.",cLetter:"c"}),u.length;e.line.color=n}return 1/0}(r,e,n,s,m);o(e,s,m),Array.isArray(p)&&p.length||(e.visible=!1),d(e,p,"values",I),m("hoveron"),m("hovertemplate"),m("arrangement"),m("bundlecolors"),m("sortpaths"),m("counts");var y=s.font;i.coerceFont(m,"labelfont",y,{overrideDflt:{size:Math.round(y.size)}}),i.coerceFont(m,"tickfont",y,{autoShadowDflt:!0,overrideDflt:{size:Math.round(y.size/1.2)}})}},22020:function(r,e,n){"use strict";r.exports={attributes:n(72140),supplyDefaults:n(76671),calc:n(69136),plot:n(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:n(91800),categories:["noOpacity"],meta:{}}},51036:function(r,e,n){"use strict";var i=n(33428),a=n(67756).Gz,t=n(36424),o=n(93024),c=n(3400),u=c.strTranslate,d=n(43616),s=n(49760),l=n(72736);function m(r,e,n,a){var t=e._context.staticPlot,o=r.map(T.bind(0,e,n)),s=a.selectAll("g.parcatslayer").data([null]);s.enter().append("g").attr("class","parcatslayer").style("pointer-events",t?"none":"all");var m=s.selectAll("g.trace.parcats").data(o,p),_=m.enter().append("g").attr("class","trace parcats");m.attr("transform",(function(r){return u(r.x,r.y)})),_.append("g").attr("class","paths");var h=m.select("g.paths").selectAll("path.path").data((function(r){return r.paths}),p);h.attr("fill",(function(r){return r.model.color}));var P=h.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(r){return r.model.color})).attr("fill-opacity",0);x(P),h.attr("d",(function(r){return r.svgD})),P.empty()||h.sort(y),h.exit().remove(),h.on("mouseover",f).on("mouseout",g).on("click",v),_.append("g").attr("class","dimensions");var S=m.select("g.dimensions").selectAll("g.dimension").data((function(r){return r.dimensions}),p);S.enter().append("g").attr("class","dimension"),S.attr("transform",(function(r){return u(r.x,0)})),S.exit().remove();var A=S.selectAll("g.category").data((function(r){return r.categories}),p),b=A.enter().append("g").attr("class","category");A.attr("transform",(function(r){return u(0,r.y)})),b.append("rect").attr("class","catrect").attr("pointer-events","none"),A.select("rect.catrect").attr("fill","none").attr("width",(function(r){return r.width})).attr("height",(function(r){return r.height})),G(b);var M=A.selectAll("rect.bandrect").data((function(r){return r.bands}),p);M.each((function(){c.raiseToTop(this)})),M.attr("fill",(function(r){return r.color}));var R=M.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(r){return r.color})).attr("fill-opacity",0);M.attr("fill",(function(r){return r.color})).attr("width",(function(r){return r.width})).attr("height",(function(r){return r.height})).attr("y",(function(r){return r.y})).attr("cursor",(function(r){return"fixed"===r.parcatsViewModel.arrangement?"default":"perpendicular"===r.parcatsViewModel.arrangement?"ns-resize":"move"})),C(R),M.exit().remove(),b.append("text").attr("class","catlabel").attr("pointer-events","none"),A.select("text.catlabel").attr("text-anchor",(function(r){return I(r)?"start":"end"})).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",(function(r){return I(r)?r.width+5:-5})).attr("y",(function(r){return r.height/2})).text((function(r){return r.model.categoryLabel})).each((function(r){d.font(i.select(this),r.parcatsViewModel.categorylabelfont),l.convertToTspans(i.select(this),e)})),b.append("text").attr("class","dimlabel"),A.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(r){return"fixed"===r.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(r){return r.width/2})).attr("y",-5).text((function(r,e){return 0===e?r.parcatsViewModel.model.dimensions[r.model.dimensionInd].dimensionLabel:null})).each((function(r){d.font(i.select(this),r.parcatsViewModel.labelfont)})),A.selectAll("rect.bandrect").on("mouseover",B).on("mouseout",k),A.exit().remove(),S.call(i.behavior.drag().origin((function(r){return{x:r.x,y:0}})).on("dragstart",F).on("drag",z).on("dragend",w)),m.each((function(r){r.traceSelection=i.select(this),r.pathSelection=i.select(this).selectAll("g.paths").selectAll("path.path"),r.dimensionSelection=i.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),m.exit().remove()}function p(r){return r.key}function I(r){var e=r.parcatsViewModel.dimensions.length,n=r.parcatsViewModel.dimensions[e-1].model.dimensionInd;return r.model.dimensionInd===n}function y(r,e){return r.model.rawColor>e.model.rawColor?1:r.model.rawColor"),B=i.mouse(l)[0];o.loneHover({trace:m,x:v-I.left+y.left,y:x-I.top+y.top,text:M,color:r.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:G,idealAlign:B1&&m.displayInd===l.dimensions.length-1?(a=d.left,t="left"):(a=d.left+d.width,t="right");var y=s.model.count,f=s.model.categoryLabel,g=y/s.parcatsViewModel.model.count,_={countLabel:y,categoryLabel:f,probabilityLabel:g.toFixed(3)},h=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&h.push(["Count:",_.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&h.push(["P("+_.categoryLabel+"):",_.probabilityLabel].join(" "));var v=h.join("
");return{trace:p,x:o*(a-e.left),y:c*(I-e.top),text:v,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:t,hovertemplate:p.hovertemplate,hovertemplateLabels:_,eventData:[{data:p._input,fullData:p,count:y,category:f,probability:g}]}}function B(r){if(!r.parcatsViewModel.dragDimension&&-1===r.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(i.mouse(this)[1]<-1)return;var e,n=r.parcatsViewModel.graphDiv,a=n._fullLayout,t=a._paperdiv.node().getBoundingClientRect(),u=r.parcatsViewModel.hoveron,d=this;"color"===u?(function(r){var e=i.select(r).datum(),n=S(e);P(n),n.each((function(){c.raiseToTop(this)})),i.select(r.parentNode).selectAll("rect.bandrect").filter((function(r){return r.color===e.color})).each((function(){c.raiseToTop(this),i.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(d),b(d,"plotly_hover",i.event)):(function(r){i.select(r.parentNode).selectAll("rect.bandrect").each((function(r){var e=S(r);P(e),e.each((function(){c.raiseToTop(this)}))})),i.select(r.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(d),A(d,"plotly_hover",i.event)),-1===r.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===u?e=M(n,t,d):"color"===u?e=function(r,e,n){r._fullLayout._calcInverseTransform(r);var a,t,o=r._fullLayout._invScaleX,c=r._fullLayout._invScaleY,u=n.getBoundingClientRect(),d=i.select(n).datum(),l=d.categoryViewModel,m=l.parcatsViewModel,p=m.model.dimensions[l.model.dimensionInd],I=m.trace,y=u.y+u.height/2;m.dimensions.length>1&&p.displayInd===m.dimensions.length-1?(a=u.left,t="left"):(a=u.left+u.width,t="right");var f=l.model.categoryLabel,g=d.parcatsViewModel.model.count,_=0;d.categoryViewModel.bands.forEach((function(r){r.color===d.color&&(_+=r.count)}));var h=l.model.count,v=0;m.pathSelection.each((function(r){r.model.color===d.color&&(v+=r.model.count)}));var x=_/g,P=_/v,G=_/h,C={countLabel:_,categoryLabel:f,probabilityLabel:x.toFixed(3)},S=[];-1!==l.parcatsViewModel.hoverinfoItems.indexOf("count")&&S.push(["Count:",C.countLabel].join(" ")),-1!==l.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(S.push("P(color \u2229 "+f+"): "+C.probabilityLabel),S.push("P("+f+" | color): "+P.toFixed(3)),S.push("P(color | "+f+"): "+G.toFixed(3)));var A=S.join("
"),b=s.mostReadable(d.color,["black","white"]);return{trace:I,x:o*(a-e.left),y:c*(y-e.top),text:A,color:d.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:b,fontSize:10,idealAlign:t,hovertemplate:I.hovertemplate,hovertemplateLabels:C,eventData:[{data:I._input,fullData:I,category:f,count:g,probability:x,categorycount:h,colorcount:v,bandcolorcount:_}]}}(n,t,d):"dimension"===u&&(e=function(r,e,n){var a=[];return i.select(n.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){a.push(M(r,e,this))})),a}(n,t,d)),e&&o.loneHover(e,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:n}))}}function k(r){var e=r.parcatsViewModel;e.dragDimension||(x(e.pathSelection),G(e.dimensionSelection.selectAll("g.category")),C(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(y),-1!==e.hoverinfoItems.indexOf("skip"))||("color"===r.parcatsViewModel.hoveron?b(this,"plotly_unhover",i.event):A(this,"plotly_unhover",i.event))}function F(r){"fixed"!==r.parcatsViewModel.arrangement&&(r.dragDimensionDisplayInd=r.model.displayInd,r.initialDragDimensionDisplayInds=r.parcatsViewModel.model.dimensions.map((function(r){return r.displayInd})),r.dragHasMoved=!1,r.dragCategoryDisplayInd=null,i.select(this).selectAll("g.category").select("rect.catrect").each((function(e){var n=i.mouse(this)[0],a=i.mouse(this)[1];-2<=n&&n<=e.width+2&&-2<=a&&a<=e.height+2&&(r.dragCategoryDisplayInd=e.model.displayInd,r.initialDragCategoryDisplayInds=r.model.categories.map((function(r){return r.displayInd})),e.model.dragY=e.y,c.raiseToTop(this.parentNode),i.select(this.parentNode).selectAll("rect.bandrect").each((function(e){e.yl.y+l.height/2&&(o.model.displayInd=l.model.displayInd,l.model.displayInd=u),r.dragCategoryDisplayInd=o.model.displayInd}if(null===r.dragCategoryDisplayInd||"freeform"===r.parcatsViewModel.arrangement){t.model.dragX=i.event.x;var m=r.parcatsViewModel.dimensions[n],p=r.parcatsViewModel.dimensions[a];void 0!==m&&t.model.dragXp.x&&(t.model.displayInd=p.model.displayInd,p.model.displayInd=r.dragDimensionDisplayInd),r.dragDimensionDisplayInd=t.model.displayInd}U(r.parcatsViewModel),J(r.parcatsViewModel),N(r.parcatsViewModel),E(r.parcatsViewModel)}}function w(r){if("fixed"!==r.parcatsViewModel.arrangement&&null!==r.dragDimensionDisplayInd){i.select(this).selectAll("text").attr("font-weight","normal");var e={},n=R(r.parcatsViewModel),a=r.parcatsViewModel.model.dimensions.map((function(r){return r.displayInd})),o=r.initialDragDimensionDisplayInds.some((function(r,e){return r!==a[e]}));o&&a.forEach((function(n,i){var a=r.parcatsViewModel.model.dimensions[i].containerInd;e["dimensions["+a+"].displayindex"]=n}));var c=!1;if(null!==r.dragCategoryDisplayInd){var u=r.model.categories.map((function(r){return r.displayInd}));if(c=r.initialDragCategoryDisplayInds.some((function(r,e){return r!==u[e]}))){var d=r.model.categories.slice().sort((function(r,e){return r.displayInd-e.displayInd})),s=d.map((function(r){return r.categoryValue})),l=d.map((function(r){return r.categoryLabel}));e["dimensions["+r.model.containerInd+"].categoryarray"]=[s],e["dimensions["+r.model.containerInd+"].ticktext"]=[l],e["dimensions["+r.model.containerInd+"].categoryorder"]="array"}}-1===r.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!r.dragHasMoved&&r.potentialClickBand&&("color"===r.parcatsViewModel.hoveron?b(r.potentialClickBand,"plotly_click",i.event.sourceEvent):A(r.potentialClickBand,"plotly_click",i.event.sourceEvent)),r.model.dragX=null,null!==r.dragCategoryDisplayInd&&(r.parcatsViewModel.dimensions[r.dragDimensionDisplayInd].categories[r.dragCategoryDisplayInd].model.dragY=null,r.dragCategoryDisplayInd=null),r.dragDimensionDisplayInd=null,r.parcatsViewModel.dragDimension=null,r.dragHasMoved=null,r.potentialClickBand=null,U(r.parcatsViewModel),J(r.parcatsViewModel),i.transition().duration(300).ease("cubic-in-out").each((function(){N(r.parcatsViewModel,!0),E(r.parcatsViewModel,!0)})).each("end",(function(){(o||c)&&t.restyle(r.parcatsViewModel.graphDiv,e,[n])}))}}function R(r){for(var e,n=r.graphDiv._fullData,i=0;i=0;c--)s+="C"+d[c]+","+(e[c+1]+i)+" "+u[c]+","+(e[c]+i)+" "+(r[c]+n[c])+","+(e[c]+i),s+="l-"+n[c]+",0 ";return s+="Z"}function J(r){var e=r.dimensions,n=r.model,i=e.map((function(r){return r.categories.map((function(r){return r.y}))})),a=r.model.dimensions.map((function(r){return r.categories.map((function(r){return r.displayInd}))})),t=r.model.dimensions.map((function(r){return r.displayInd})),o=r.dimensions.map((function(r){return r.model.dimensionInd})),c=e.map((function(r){return r.x})),u=e.map((function(r){return r.width})),d=[];for(var s in n.paths)n.paths.hasOwnProperty(s)&&d.push(n.paths[s]);function l(r){var e=r.categoryInds.map((function(r,e){return a[e][r]}));return o.map((function(r){return e[r]}))}d.sort((function(e,n){var i=l(e),a=l(n);return"backward"===r.sortpaths&&(i.reverse(),a.reverse()),i.push(e.valueInds[0]),a.push(n.valueInds[0]),r.bundlecolors&&(i.unshift(e.rawColor),a.unshift(n.rawColor)),ia?1:0}));for(var m=new Array(d.length),p=e[0].model.count,I=e[0].categories.map((function(r){return r.height})).reduce((function(r,e){return r+e})),y=0;y0?I*(g.count/p):0;for(var _,h=new Array(i.length),v=0;v1?(r.width-80-16)/(i-1):0)*a;var t,o,c,u,d,s=[],l=r.model.maxCats,m=e.categories.length,p=e.count,I=r.height-8*(l-1),y=8*(l-m)/2,f=e.categories.map((function(r){return{displayInd:r.displayInd,categoryInd:r.categoryInd}}));for(f.sort((function(r,e){return r.displayInd-e.displayInd})),d=0;d0?o.count/p*I:0,c={key:o.valueInds[0],model:o,width:16,height:t,y:null!==o.dragY?o.dragY:y,bands:[],parcatsViewModel:r},y=y+t+8,s.push(c);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:n,y:0,width:16,model:e,categories:s,parcatsViewModel:r,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}r.exports=function(r,e,n,i){m(n,r,i,e)}},60268:function(r,e,n){"use strict";var i=n(51036);r.exports=function(r,e,n,a){var t=r._fullLayout,o=t._paper,c=t._size;i(r,o,e,{width:c.w,height:c.h,margin:{t:c.t,r:c.r,b:c.b,l:c.l}},n,a)}},82296:function(r,e,n){"use strict";var i=n(49084),a=n(94724),t=n(25376),o=n(86968).u,c=n(92880).extendFlat,u=n(31780).templatedArray;r.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:t({editType:"plot"}),tickfont:t({autoShadowDflt:!0,editType:"plot"}),rangefont:t({editType:"plot"}),dimensions:u("dimension",{label:{valType:"string",editType:"plot"},tickvals:c({},a.tickvals,{editType:"plot"}),ticktext:c({},a.ticktext,{editType:"plot"}),tickformat:c({},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:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:c({editType:"calc"},i("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(r,e,n){"use strict";var i=n(30140),a=n(33428),t=n(71688).keyFun,o=n(71688).repeat,c=n(3400).sorterAsc,u=n(3400).strTranslate,d=i.bar.snapRatio;function s(r,e){return r*(1-d)+e*d}var l=i.bar.snapClose;function m(r,e){return r*(1-l)+e*l}function p(r,e,n,i){if(function(r,e){for(var n=0;n=e[n][0]&&r<=e[n][1])return!0;return!1}(n,i))return n;var a=r?-1:1,t=0,o=e.length-1;if(a<0){var c=t;t=o,o=c}for(var u=e[t],d=u,l=t;a*le){m=n;break}}if(t=s,isNaN(t)&&(t=isNaN(l)||isNaN(m)?isNaN(l)?m:l:e-d[l][1]r[1]+n||e=.9*r[1]+.1*r[0]?"n":e<=.9*r[0]+.1*r[1]?"s":"ns"}(I,e);y&&(o.interval=u[t],o.intervalPix=I,o.region=y)}}if(r.ordinal&&!o.region){var f=r.unitTickvals,_=r.unitToPaddedPx.invert(e);for(n=0;n=h[0]&&_<=h[1]){o.clickableOrdinalRange=h;break}}}return o}function P(r,e){a.event.sourceEvent.stopPropagation();var n=e.height-a.mouse(r)[1]-2*i.verticalPadding,t=e.brush.svgBrush;t.wasDragged=!0,t._dragging=!0,t.grabbingBar?t.newExtent=[n-t.grabPoint,n+t.barLength-t.grabPoint].map(e.unitToPaddedPx.invert):t.newExtent=[t.startExtent,e.unitToPaddedPx.invert(n)].sort(c),e.brush.filterSpecified=!0,t.extent=t.stayingIntervals.concat([t.newExtent]),t.brushCallback(e),v(r.parentNode)}function G(r,e){var n=x(e,e.height-a.mouse(r)[1]-2*i.verticalPadding),t="crosshair";n.clickableOrdinalRange?t="pointer":n.region&&(t=n.region+"-resize"),a.select(document.body).style("cursor",t)}function C(r){r.on("mousemove",(function(r){a.event.preventDefault(),r.parent.inBrushDrag||G(this,r)})).on("mouseleave",(function(r){r.parent.inBrushDrag||_()})).call(a.behavior.drag().on("dragstart",(function(r){!function(r,e){a.event.sourceEvent.stopPropagation();var n=e.height-a.mouse(r)[1]-2*i.verticalPadding,t=e.unitToPaddedPx.invert(n),o=e.brush,c=x(e,n),u=c.interval,d=o.svgBrush;if(d.wasDragged=!1,d.grabbingBar="ns"===c.region,d.grabbingBar){var s=u.map(e.unitToPaddedPx);d.grabPoint=n-s[0]-i.verticalPadding,d.barLength=s[1]-s[0]}d.clickableOrdinalRange=c.clickableOrdinalRange,d.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],u&&(d.stayingIntervals=d.stayingIntervals.filter((function(r){return r[0]!==u[0]&&r[1]!==u[1]}))),d.startExtent=c.region?u["s"===c.region?1:0]:t,e.parent.inBrushDrag=!0,d.brushStartCallback()}(this,r)})).on("drag",(function(r){P(this,r)})).on("dragend",(function(r){!function(r,e){var n=e.brush,i=n.filter,t=n.svgBrush;t._dragging||(G(r,e),P(r,e),e.brush.svgBrush.wasDragged=!1),t._dragging=!1,a.event.sourceEvent.stopPropagation();var o=t.grabbingBar;if(t.grabbingBar=!1,t.grabLocation=void 0,e.parent.inBrushDrag=!1,_(),!t.wasDragged)return t.wasDragged=void 0,t.clickableOrdinalRange?n.filterSpecified&&e.multiselect?t.extent.push(t.clickableOrdinalRange):(t.extent=[t.clickableOrdinalRange],n.filterSpecified=!0):o?(t.extent=t.stayingIntervals,0===t.extent.length&&A(n)):A(n),t.brushCallback(e),v(r.parentNode),void t.brushEndCallback(n.filterSpecified?i.getConsolidated():[]);var c=function(){i.set(i.getConsolidated())};if(e.ordinal){var u=e.unitTickvals;u[u.length-1]t.newExtent[0];t.extent=t.stayingIntervals.concat(d?[t.newExtent]:[]),t.extent.length||A(n),t.brushCallback(e),d?v(r.parentNode,c):(c(),v(r.parentNode))}else c();t.brushEndCallback(n.filterSpecified?i.getConsolidated():[])}(this,r)})))}function S(r,e){return r[0]-e[0]}function A(r){r.filterSpecified=!1,r.svgBrush.extent=[[-1/0,1/0]]}function b(r){for(var e,n=r.slice(),i=[],a=n.shift();a;){for(e=a.slice();(a=n.shift())&&a[0]<=e[1];)e[1]=Math.max(e[1],a[1]);i.push(e)}return 1===i.length&&i[0][0]>i[0][1]&&(i=[]),i}r.exports={makeBrush:function(r,e,n,i,a,t){var o,u=function(){var r,e,n=[];return{set:function(i){1===(n=i.map((function(r){return r.slice().sort(c)})).sort(S)).length&&n[0][0]===-1/0&&n[0][1]===1/0&&(n=[[0,-1]]),r=b(n),e=n.reduce((function(r,e){return[Math.min(r[0],e[0]),Math.max(r[1],e[1])]}),[1/0,-1/0])},get:function(){return n.slice()},getConsolidated:function(){return r},getBounds:function(){return e}}}();return u.set(n),{filter:u,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:i,brushCallback:(o=a,function(r){var e=r.brush,n=function(r){return r.svgBrush.extent.map((function(r){return r.slice()}))}(e),i=n.slice();e.filter.set(i),o()}),brushEndCallback:t}}},ensureAxisBrush:function(r,e,n){var a=r.selectAll("."+i.cn.axisBrush).data(o,t);a.enter().append("g").classed(i.cn.axisBrush,!0),function(r,e,n){var a=n._context.staticPlot,t=r.selectAll(".background").data(o);t.enter().append("rect").classed("background",!0).call(I).call(y).style("pointer-events",a?"none":"auto").attr("transform",u(0,i.verticalPadding)),t.call(C).attr("height",(function(r){return r.height-i.verticalPadding}));var c=r.selectAll(".highlight-shadow").data(o);c.enter().append("line").classed("highlight-shadow",!0).attr("x",-i.bar.width/2).attr("stroke-width",i.bar.width+i.bar.strokeWidth).attr("stroke",e).attr("opacity",i.bar.strokeOpacity).attr("stroke-linecap","butt"),c.attr("y1",(function(r){return r.height})).call(h);var d=r.selectAll(".highlight").data(o);d.enter().append("line").classed("highlight",!0).attr("x",-i.bar.width/2).attr("stroke-width",i.bar.width-i.bar.strokeWidth).attr("stroke",i.bar.fillColor).attr("opacity",i.bar.fillOpacity).attr("stroke-linecap","butt"),d.attr("y1",(function(r){return r.height})).call(h)}(a,e,n)},cleanRanges:function(r,e){if(Array.isArray(r[0])?(r=r.map((function(r){return r.sort(c)})),r=e.multiselect?b(r.sort(S)):[r[0]]):r=[r.sort(c)],e.tickvals){var n=e.tickvals.slice().sort(c);if(!(r=r.map((function(r){var e=[p(0,n,r[0],[]),p(1,n,r[1],[])];if(e[1]>e[0])return e})).filter((function(r){return r}))).length)return}return r.length>1?r:r[0]}}},61664:function(r,e,n){"use strict";r.exports={attributes:n(82296),supplyDefaults:n(60664),calc:n(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:n(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(r,e,n){"use strict";var i=n(33428),a=n(84888)._M,t=n(24196),o=n(9616);e.name="parcoords",e.plot=function(r){var e=a(r.calcdata,"parcoords")[0];e.length&&t(r,e)},e.clean=function(r,e,n,i){var a=i._has&&i._has("parcoords"),t=e._has&&e._has("parcoords");a&&!t&&(i._paperdiv.selectAll(".parcoords").remove(),i._glimages.selectAll("*").remove())},e.toSVG=function(r){var e=r._fullLayout._glimages,n=i.select(r).selectAll(".svg-container");n.filter((function(r,e){return e===n.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var r=this,n=r.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})})),window.setTimeout((function(){i.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},95044:function(r,e,n){"use strict";var i=n(3400).isArrayOrTypedArray,a=n(8932),t=n(71688).wrap;r.exports=function(r,e){var n,o;return a.hasColorscale(e,"line")&&i(e.line.color)?(n=e.line.color,o=a.extractOpts(e.line).colorscale,a.calc(r,e,{vals:n,containerStr:"line",cLetter:"c"})):(n=function(r){for(var e=new Array(r),n=0;nl&&(i.log("parcoords traces support up to "+l+" dimensions at the moment"),I.splice(l));var y=c(r,e,{name:"dimensions",layout:u,handleItemDefaults:p}),f=function(r,e,n,o,c){var u=c("line.color",n);if(a(r,"line")&&i.isArrayOrTypedArray(u)){if(u.length)return c("line.colorscale"),t(r,e,o,c,{prefix:"line.",cLetter:"c"}),u.length;e.line.color=n}return 1/0}(r,e,n,u,s);o(e,u,s),Array.isArray(y)&&y.length||(e.visible=!1),m(e,y,"values",f);var g=i.extendFlat({},u.font,{size:Math.round(u.font.size/1.2)});i.coerceFont(s,"labelfont",g),i.coerceFont(s,"tickfont",g,{autoShadowDflt:!0}),i.coerceFont(s,"rangefont",g),s("labelangle"),s("labelside"),s("unselected.line.color"),s("unselected.line.opacity")}},95724:function(r,e,n){"use strict";var i=n(3400).isTypedArray;e.convertTypedArray=function(r){return i(r)?Array.prototype.slice.call(r):r},e.isOrdinal=function(r){return!!r.tickvals},e.isVisible=function(r){return r.visible||!("visible"in r)}},29928:function(r,e,n){"use strict";var i=n(61664);i.plot=n(24196),r.exports=i},51352:function(r,e,n){"use strict";var i=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join("\n"),a=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join("\n"),t=n(30140).maxDimensionCount,o=n(3400),c=1e-6,u=2048,d=new Uint8Array(4),s=new Uint8Array(4),l={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function m(r,e,n,i,a){var t=r._gl;t.enable(t.SCISSOR_TEST),t.scissor(e,n,i,a),r.clear({color:[0,0,0,0],depth:1})}function p(r,e,n,i,a,t){var o=t.key;n.drawCompleted||(function(r){r.read({x:0,y:0,width:1,height:1,data:d})}(r),n.drawCompleted=!0),function c(u){var d=Math.min(i,a-u*i);0===u&&(window.cancelAnimationFrame(n.currentRafs[o]),delete n.currentRafs[o],m(r,t.scissorX,t.scissorY,t.scissorWidth,t.viewBoxSize[1])),n.clearOnly||(t.count=2*d,t.offset=2*u*i,e(t),u*i+d>>8*e)%256/255}function f(r,e,n){for(var i=new Array(8*e),a=0,t=0;ts&&(s=r[a].dim1.canvasX,o=a);0===c&&m(S,0,0,n.canvasWidth,n.canvasHeight);var l=function(r){var e,n,i,a=[[],[]];for(i=0;i<64;i++){var t=!r&&ic._length&&(M=M.slice(0,c._length));var k,F=c.tickvals;function z(r,e){return{val:r,text:k[e]}}function w(r,e){return r.val-e.val}if(t(F)&&F.length){a.isTypedArray(F)&&(F=Array.from(F)),k=c.ticktext,t(k)&&k.length?k.length>F.length?k=k.slice(0,F.length):F.length>k.length&&(F=F.slice(0,k.length)):k=F.map(o(c.tickformat));for(var R=1;R=n||u>=a)return;var d=r.lineLayer.readPixel(c,a-1-u),s=0!==d[3],l=s?d[2]+256*(d[1]+256*d[0]):null,m={x:c,y:u,clientX:e.clientX,clientY:e.clientY,dataIndex:r.model.key,curveNumber:l};l!==T&&(s?t.hover(m):t.unhover&&t.unhover(m),T=l)}})),M.style("opacity",(function(r){return r.pick?0:1})),p.style("background","rgba(255, 255, 255, 0)");var D=p.selectAll("."+h.cn.parcoords).data(b,y);D.exit().remove(),D.enter().append("g").classed(h.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),D.attr("transform",(function(r){return s(r.model.translateX,r.model.translateY)}));var J=D.selectAll("."+h.cn.parcoordsControlView).data(f,y);J.enter().append("g").classed(h.cn.parcoordsControlView,!0),J.attr("transform",(function(r){return s(r.model.pad.l,r.model.pad.t)}));var U=J.selectAll("."+h.cn.yAxis).data((function(r){return r.dimensions}),y);U.enter().append("g").classed(h.cn.yAxis,!0),J.each((function(r){R(U,r,P)})),M.each((function(r){if(r.viewModel){!r.lineLayer||t?r.lineLayer=x(this,r):r.lineLayer.update(r),(r.key||0===r.key)&&(r.viewModel[r.key]=r.lineLayer);var e=!r.context||t;r.lineLayer.render(r.viewModel.panels,e)}})),U.attr("transform",(function(r){return s(r.xScale(r.xIndex),0)})),U.call(i.behavior.drag().origin((function(r){return r})).on("drag",(function(r){var e=r.parent;A.linePickActive(!1),r.x=Math.max(-h.overdrag,Math.min(r.model.width+h.overdrag,i.event.x)),r.canvasX=r.x*r.model.canvasPixelRatio,U.sort((function(r,e){return r.x-e.x})).each((function(e,n){e.xIndex=n,e.x=r===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),R(U,e,P),U.filter((function(e){return 0!==Math.abs(r.xIndex-e.xIndex)})).attr("transform",(function(r){return s(r.xScale(r.xIndex),0)})),i.select(this).attr("transform",s(r.x,0)),U.each((function(n,i,a){a===r.parent.key&&(e.dimensions[i]=n)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!B(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on("dragend",(function(r){var e=r.parent;r.x=r.xScale(r.xIndex),r.canvasX=r.x*r.model.canvasPixelRatio,R(U,e,P),i.select(this).attr("transform",(function(r){return s(r.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!B(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),A.linePickActive(!0),t&&t.axesMoved&&t.axesMoved(e.key,e.dimensions.map((function(r){return r.crossfilterDimensionIndex})))}))),U.exit().remove();var H=U.selectAll("."+h.cn.axisOverlays).data(f,y);H.enter().append("g").classed(h.cn.axisOverlays,!0),H.selectAll("."+h.cn.axis).remove();var L=H.selectAll("."+h.cn.axis).data(f,y);L.enter().append("g").classed(h.cn.axis,!0),L.each((function(r){var e=r.model.height/r.model.tickDistance,n=r.domainScale,a=n.domain();i.select(this).call(i.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,r.tickFormat).tickValues(r.ordinal?a:null).tickFormat((function(e){return _.isOrdinal(r)?e:E(r.model.dimensions[r.visibleIndex],e)})).scale(n)),m.font(L.selectAll("text"),r.model.tickFont)})),L.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),L.selectAll("text").style("cursor","default");var O=H.selectAll("."+h.cn.axisHeading).data(f,y);O.enter().append("g").classed(h.cn.axisHeading,!0);var K=O.selectAll("."+h.cn.axisTitle).data(f,y);K.enter().append("text").classed(h.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),K.text((function(r){return r.label})).each((function(e){var n=i.select(this);m.font(n,e.model.labelFont),l.convertToTspans(n,r)})).attr("transform",(function(r){var e=w(r.model.labelAngle,r.model.labelSide),n=h.axisTitleOffset;return(e.dir>0?"":s(0,2*n+r.model.height))+d(e.degrees)+s(-n*e.dx,-n*e.dy)})).attr("text-anchor",(function(r){var e=w(r.model.labelAngle,r.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"}));var V=H.selectAll("."+h.cn.axisExtent).data(f,y);V.enter().append("g").classed(h.cn.axisExtent,!0);var j=V.selectAll("."+h.cn.axisExtentTop).data(f,y);j.enter().append("g").classed(h.cn.axisExtentTop,!0),j.attr("transform",s(0,-h.axisExtentOffset));var W=j.selectAll("."+h.cn.axisExtentTopText).data(f,y);W.enter().append("text").classed(h.cn.axisExtentTopText,!0).call(z),W.text((function(r){return N(r,!0)})).each((function(r){m.font(i.select(this),r.model.rangeFont)}));var Z=V.selectAll("."+h.cn.axisExtentBottom).data(f,y);Z.enter().append("g").classed(h.cn.axisExtentBottom,!0),Z.attr("transform",(function(r){return s(0,r.model.height+h.axisExtentOffset)}));var q=Z.selectAll("."+h.cn.axisExtentBottomText).data(f,y);q.enter().append("text").classed(h.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(z),q.text((function(r){return N(r,!1)})).each((function(r){m.font(i.select(this),r.model.rangeFont)})),v.ensureAxisBrush(H,C,r)}},24196:function(r,e,n){"use strict";var i=n(36336),a=n(5048),t=n(95724).isVisible,o={};function c(r,e,n){var i=e.indexOf(n),a=r.indexOf(i);return-1===a&&(a+=e.length),a}(r.exports=function(r,e){var n=r._fullLayout;if(a(r,[],o)){var u={},d={},s={},l={},m=n._size;e.forEach((function(e,n){var i=e[0].trace;s[n]=i.index;var a=l[n]=i._fullInput.index;u[n]=r.data[a].dimensions,d[n]=r.data[a].dimensions.slice()})),i(r,e,{width:m.w,height:m.h,margin:{t:m.t,r:m.r,b:m.b,l:m.l}},{filterChanged:function(e,i,a){var t=d[e][i],o=a.map((function(r){return r.slice()})),c="dimensions["+i+"].constraintrange",u=n._tracePreGUI[r._fullData[s[e]]._fullInput.uid];if(void 0===u[c]){var m=t.constraintrange;u[c]=m||null}var p=r._fullData[s[e]].dimensions[i];o.length?(1===o.length&&(o=o[0]),t.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete t.constraintrange,delete p.constraintrange,o=null);var I={};I[c]=o,r.emit("plotly_restyle",[I,[l[e]]])},hover:function(e){r.emit("plotly_hover",e)},unhover:function(e){r.emit("plotly_unhover",e)},axesMoved:function(e,n){var i=function(r,e){return function(n,i){return c(r,e,n)-c(r,e,i)}}(n,d[e].filter(t));u[e].sort(i),d[e].filter((function(r){return!t(r)})).sort((function(r){return d[e].indexOf(r)})).forEach((function(r){u[e].splice(u[e].indexOf(r),1),u[e].splice(d[e].indexOf(r),0,r)})),r.emit("plotly_restyle",[{dimensions:[u[e]]},[l[e]]])}})}}).reglPrecompiled=o},74996:function(r,e,n){"use strict";var i=n(45464),a=n(86968).u,t=n(25376),o=n(22548),c=n(21776).Ks,u=n(21776).Gw,d=n(92880).extendFlat,s=n(98192).c,l=t({editType:"plot",arrayOk:!0,colorEditType:"plot"});r.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"},pattern:s,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:d({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:c({},{keys:["label","color","value","percent","text"]}),texttemplate:u({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:d({},l,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:d({},l,{}),outsidetextfont:d({},l,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:d({},l,{}),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:"angle",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:d({},l,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(r,e,n){"use strict";var i=n(7316);e.name="pie",e.plot=function(r,n,a,t){i.plotBasePlot(e.name,r,n,a,t)},e.clean=function(r,n,a,t){i.cleanBasePlot(e.name,r,n,a,t)}},45768:function(r,e,n){"use strict";var i=n(38248),a=n(49760),t=n(76308),o={};function c(r){return function(e,n){return!!e&&!!(e=a(e)).isValid()&&(e=t.addOpacity(e,e.getAlpha()),r[n]||(r[n]=e),e)}}function u(r,e){var n,i=JSON.stringify(r),t=e[i];if(!t){for(t=r.slice(),n=0;n=0})),("funnelarea"===e.type?g:e.sort)&&t.sort((function(r,e){return e.v-r.v})),t[0]&&(t[0].vTotal=f),t},crossTraceCalc:function(r,e){var n=(e||{}).type;n||(n="pie");var i=r._fullLayout,a=r.calcdata,t=i[n+"colorway"],c=i["_"+n+"colormap"];i["extend"+n+"colors"]&&(t=u(t,o));for(var d=0,s=0;s0){c=!0;break}}c||(o=0)}return{hasLabels:n,hasValues:t,len:o}}function s(r,e,n,i,a){i("marker.line.width")&&i("marker.line.color",a?void 0:n.paper_bgcolor);var t=i("marker.colors");u(i,"marker.pattern",t),r.marker&&!e.marker.pattern.fgcolor&&(e.marker.pattern.fgcolor=r.marker.colors),e.marker.pattern.bgcolor||(e.marker.pattern.bgcolor=n.paper_bgcolor)}r.exports={handleLabelsAndValues:d,handleMarkerDefaults:s,supplyDefaults:function(r,e,n,i){function u(n,i){return a.coerce(r,e,t,n,i)}var l=d(u("labels"),u("values")),m=l.len;if(e._hasLabels=l.hasLabels,e._hasValues=l.hasValues,!e._hasLabels&&e._hasValues&&(u("label0"),u("dlabel")),m){e._length=m,s(r,e,i,u,!0),u("scalegroup");var p,I=u("text"),y=u("texttemplate");if(y||(p=u("textinfo",a.isArrayOrTypedArray(I)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),y||p&&"none"!==p){var f=u("textposition");c(r,e,i,u,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(f)||"auto"===f||"outside"===f)&&u("automargin"),("inside"===f||"auto"===f||Array.isArray(f))&&u("insidetextorientation")}else"none"===p&&u("textposition","none");o(e,i,u);var g=u("hole");if(u("title.text")){var _=u("title.position",g?"middle center":"top center");g||"middle center"!==_||(e.title.position="top center"),a.coerceFont(u,"title.font",i.font)}u("sort"),u("direction"),u("rotation"),u("pull")}else e.visible=!1}}},53644:function(r,e,n){"use strict";var i=n(10624).appendArrayMultiPointValues;r.exports=function(r,e){var n={curveNumber:e.index,pointNumbers:r.pts,data:e._input,fullData:e,label:r.label,color:r.color,value:r.v,percent:r.percent,text:r.text,bbox:r.bbox,v:r.v};return 1===r.pts.length&&(n.pointNumber=n.i=r.pts[0]),i(n,e,r.pts),"funnelarea"===e.type&&(delete n.v,delete n.i),n}},21552:function(r,e,n){"use strict";var i=n(43616),a=n(76308);r.exports=function(r,e,n,t){var o=n.marker.pattern;o&&o.shape?i.pointStyle(r,n,t,e):a.fill(r,e.color)}},69656:function(r,e,n){"use strict";var i=n(3400);function a(r){return-1!==r.indexOf("e")?r.replace(/[.]?0+e/,"e"):-1!==r.indexOf(".")?r.replace(/[.]?0+$/,""):r}e.formatPiePercent=function(r,e){var n=a((100*r).toPrecision(3));return i.numSeparate(n,e)+"%"},e.formatPieValue=function(r,e){var n=a(r.toPrecision(10));return i.numSeparate(n,e)},e.getFirstFilled=function(r,e){if(i.isArrayOrTypedArray(r))for(var n=0;n"),name:l.hovertemplate||-1!==m.indexOf("name")?l.name:void 0,idealAlign:r.pxmid[0]<0?"left":"right",color:f.castOption(x.bgcolor,r.pts)||r.color,borderColor:f.castOption(x.bordercolor,r.pts),fontFamily:f.castOption(P.family,r.pts),fontSize:f.castOption(P.size,r.pts),fontColor:f.castOption(P.color,r.pts),nameLength:f.castOption(x.namelength,r.pts),textAlign:f.castOption(x.align,r.pts),hovertemplate:f.castOption(l.hovertemplate,r.pts),hovertemplateLabels:r,eventData:[g(r,l)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:e,inOut_bbox:G}),r.bbox=G[0],d._hasHoverLabel=!0}d._hasHoverEvent=!0,e.emit("plotly_hover",{points:[g(r,l)],event:i.event})}})),r.on("mouseout",(function(r){var n=e._fullLayout,a=e._fullData[d.index],o=i.select(this).datum();d._hasHoverEvent&&(r.originalEvent=i.event,e.emit("plotly_unhover",{points:[g(o,a)],event:i.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(t.loneUnhover(n._hoverlayer.node()),d._hasHoverLabel=!1)})),r.on("click",(function(r){var n=e._fullLayout,a=e._fullData[d.index];e._dragging||!1===n.hovermode||(e._hoverdata=[g(r,a)],t.click(e,i.event))}))}function v(r,e,n){var i=f.castOption(r.insidetextfont.color,e.pts);!i&&r._input.textfont&&(i=f.castOption(r._input.textfont.color,e.pts));var a=f.castOption(r.insidetextfont.family,e.pts)||f.castOption(r.textfont.family,e.pts)||n.family,t=f.castOption(r.insidetextfont.size,e.pts)||f.castOption(r.textfont.size,e.pts)||n.size,c=f.castOption(r.insidetextfont.weight,e.pts)||f.castOption(r.textfont.weight,e.pts)||n.weight,u=f.castOption(r.insidetextfont.style,e.pts)||f.castOption(r.textfont.style,e.pts)||n.style,d=f.castOption(r.insidetextfont.variant,e.pts)||f.castOption(r.textfont.variant,e.pts)||n.variant,s=f.castOption(r.insidetextfont.textcase,e.pts)||f.castOption(r.textfont.textcase,e.pts)||n.textcase,l=f.castOption(r.insidetextfont.lineposition,e.pts)||f.castOption(r.textfont.lineposition,e.pts)||n.lineposition,m=f.castOption(r.insidetextfont.shadow,e.pts)||f.castOption(r.textfont.shadow,e.pts)||n.shadow;return{color:i||o.contrast(e.color),family:a,size:t,weight:c,style:u,variant:d,textcase:s,lineposition:l,shadow:m}}function x(r,e){for(var n,i,a=0;ae&&e>i||n=-4;f-=2)g(Math.PI*f,"tan");for(f=4;f>=-4;f-=2)g(Math.PI*(f+1),"tan")}if(l||p){for(f=4;f>=-4;f-=2)g(Math.PI*(f+1.5),"rad");for(f=4;f>=-4;f-=2)g(Math.PI*(f+.5),"rad")}}if(c||I||l){var _=Math.sqrt(r.width*r.width+r.height*r.height);if((t={scale:a*i*2/_,rCenter:1-a,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,t.scale>=1)return t;y.push(t)}(I||p)&&((t=G(r,i,o,u,d)).textPosAngle=(e.startangle+e.stopangle)/2,y.push(t)),(I||m)&&((t=C(r,i,o,u,d)).textPosAngle=(e.startangle+e.stopangle)/2,y.push(t));for(var h=0,v=0,x=0;x=1)break}return y[h]}function G(r,e,n,i,a){e=Math.max(0,e-2*y);var t=r.width/r.height,o=b(t,i,e,n);return{scale:2*o/r.height,rCenter:S(t,o/e),rotate:A(a)}}function C(r,e,n,i,a){e=Math.max(0,e-2*y);var t=r.height/r.width,o=b(t,i,e,n);return{scale:2*o/r.width,rCenter:S(t,o/e),rotate:A(a+Math.PI/2)}}function S(r,e){return Math.cos(e)-r*e}function A(r){return(180/Math.PI*r+720)%180-90}function b(r,e,n,i){var a=r+1/(2*Math.tan(e));return n*Math.min(1/(Math.sqrt(a*a+.5)+a),i/(Math.sqrt(r*r+i/2)+r))}function M(r,e){return r.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(r.halfangle)),r.ring/2):1}function B(r,e){var n=e.pxmid[0],i=e.pxmid[1],a=r.width/2,t=r.height/2;return n<0&&(a*=-1),i<0&&(t*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(t)*(a>0?1:-1)/2,y:t/(1+n*n/(i*i)),outside:!0}}function k(r,e){var n,i,a,t=r.trace,o={x:r.cx,y:r.cy},c={tx:0,ty:0};c.ty+=t.title.font.size,a=z(t),-1!==t.title.position.indexOf("top")?(o.y-=(1+a)*r.r,c.ty-=r.titleBox.height):-1!==t.title.position.indexOf("bottom")&&(o.y+=(1+a)*r.r);var u,d,s=(u=r.r,d=r.trace.aspectratio,u/(void 0===d?1:d)),l=e.w*(t.domain.x[1]-t.domain.x[0])/2;return-1!==t.title.position.indexOf("left")?(l+=s,o.x-=(1+a)*s,c.tx+=r.titleBox.width/2):-1!==t.title.position.indexOf("center")?l*=2:-1!==t.title.position.indexOf("right")&&(l+=s,o.x+=(1+a)*s,c.tx-=r.titleBox.width/2),n=l/r.titleBox.width,i=F(r,e)/r.titleBox.height,{x:o.x,y:o.y,scale:Math.min(n,i),tx:c.tx,ty:c.ty}}function F(r,e){var n=r.trace,i=e.h*(n.domain.y[1]-n.domain.y[0]);return Math.min(r.titleBox.height,i/2)}function z(r){var e,n=r.pull;if(!n)return 0;if(u.isArrayOrTypedArray(n))for(n=0,e=0;en&&(n=r.pull[e]);return n}function w(r,e){for(var n=[],i=0;i1?s=(d=n.r)/a.aspectratio:d=(s=n.r)*a.aspectratio,u=(d*=(1+a.baseratio)/2)*s}o=Math.min(o,u/n.vTotal)}for(i=0;i")}if(t){var h=u.castOption(a,e.i,"texttemplate");if(h){var v=function(r){return{label:r.label,value:r.v,valueLabel:f.formatPieValue(r.v,i.separators),percent:r.v/n.vTotal,percentLabel:f.formatPiePercent(r.v/n.vTotal,i.separators),color:r.color,text:r.text,customdata:u.castOption(a,r.i,"customdata")}}(e),x=f.getFirstFilled(a.text,e.pts);(_(x)||""===x)&&(v.text=x),e.text=u.texttemplateString(h,v,r._fullLayout._d3locale,v,a._meta||{})}else e.text=""}}function N(r,e){var n=r.rotate*Math.PI/180,i=Math.cos(n),a=Math.sin(n),t=(e.left+e.right)/2,o=(e.top+e.bottom)/2;r.textX=t*i-o*a,r.textY=t*a+o*i,r.noCenter=!0}r.exports={plot:function(r,e){var n=r._context.staticPlot,t=r._fullLayout,m=t._size;I("pie",t),x(e,r),w(e,m);var y=u.makeTraceGroups(t._pielayer,e,"trace").each((function(e){var I=i.select(this),y=e[0],g=y.trace;!function(r){var e,n,i,a=r[0],t=a.r,o=a.trace,c=f.getRotationAngle(o.rotation),u=2*Math.PI/a.vTotal,d="px0",s="px1";if("counterclockwise"===o.direction){for(e=0;ea.vTotal/2?1:0,n.halfangle=Math.PI*Math.min(n.v/a.vTotal,.5),n.ring=1-o.hole,n.rInscribed=M(n,a))}(e),I.attr("stroke-linejoin","round"),I.each((function(){var _=i.select(this).selectAll("g.slice").data(e);_.enter().append("g").classed("slice",!0),_.exit().remove();var x=[[[],[]],[[],[]]],G=!1;_.each((function(a,o){if(a.hidden)i.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=g.index,x[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var d=y.cx,s=y.cy,m=i.select(this),I=m.selectAll("path.surface").data([a]);if(I.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),m.call(h,r,e),g.pull){var _=+f.castOption(g.pull,a.pts)||0;_>0&&(d+=_*a.pxmid[0],s+=_*a.pxmid[1])}a.cxFinal=d,a.cyFinal=s;var C=g.hole;if(a.v===y.vTotal){var S="M"+(d+a.px0[0])+","+(s+a.px0[1])+F(a.px0,a.pxmid,!0,1)+F(a.pxmid,a.px0,!0,1)+"Z";C?I.attr("d","M"+(d+C*a.px0[0])+","+(s+C*a.px0[1])+F(a.px0,a.pxmid,!1,C)+F(a.pxmid,a.px0,!1,C)+"Z"+S):I.attr("d",S)}else{var A=F(a.px0,a.px1,!0,1);if(C){var b=1-C;I.attr("d","M"+(d+C*a.px1[0])+","+(s+C*a.px1[1])+F(a.px1,a.px0,!1,C)+"l"+b*a.px0[0]+","+b*a.px0[1]+A+"Z")}else I.attr("d","M"+d+","+s+"l"+a.px0[0]+","+a.px0[1]+A+"Z")}E(r,a,y);var M=f.castOption(g.textposition,a.pts),k=m.selectAll("g.slicetext").data(a.text&&"none"!==M?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each((function(){var n=u.ensureSingle(i.select(this),"text","",(function(r){r.attr("data-notex",1)})),m=u.ensureUniformFontSize(r,"outside"===M?function(r,e,n){var i=f.castOption(r.outsidetextfont.color,e.pts)||f.castOption(r.textfont.color,e.pts)||n.color,a=f.castOption(r.outsidetextfont.family,e.pts)||f.castOption(r.textfont.family,e.pts)||n.family,t=f.castOption(r.outsidetextfont.size,e.pts)||f.castOption(r.textfont.size,e.pts)||n.size,o=f.castOption(r.outsidetextfont.weight,e.pts)||f.castOption(r.textfont.weight,e.pts)||n.weight,c=f.castOption(r.outsidetextfont.style,e.pts)||f.castOption(r.textfont.style,e.pts)||n.style,u=f.castOption(r.outsidetextfont.variant,e.pts)||f.castOption(r.textfont.variant,e.pts)||n.variant,d=f.castOption(r.outsidetextfont.textcase,e.pts)||f.castOption(r.textfont.textcase,e.pts)||n.textcase,s=f.castOption(r.outsidetextfont.lineposition,e.pts)||f.castOption(r.textfont.lineposition,e.pts)||n.lineposition,l=f.castOption(r.outsidetextfont.shadow,e.pts)||f.castOption(r.textfont.shadow,e.pts)||n.shadow;return{color:i,family:a,size:t,weight:o,style:c,variant:u,textcase:d,lineposition:s,shadow:l}}(g,a,t.font):v(g,a,t.font));n.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(c.font,m).call(l.convertToTspans,r);var I,_=c.bBox(n.node());if("outside"===M)I=B(_,a);else if(I=P(_,a,y),"auto"===M&&I.scale<1){var h=u.ensureUniformFontSize(r,g.outsidetextfont);n.call(c.font,h),I=B(_=c.bBox(n.node()),a)}var x=I.textPosAngle,C=void 0===x?a.pxmid:R(y.r,x);if(I.targetX=d+C[0]*I.rCenter+(I.x||0),I.targetY=s+C[1]*I.rCenter+(I.y||0),N(I,_),I.outside){var S=I.targetY;a.yLabelMin=S-_.height/2,a.yLabelMid=S,a.yLabelMax=S+_.height/2,a.labelExtraX=0,a.labelExtraY=0,G=!0}I.fontSize=m.size,p(g.type,I,t),e[o].transform=I,u.setTransormAndDisplay(n,I)}))}function F(r,e,n,i){var t=i*(e[0]-r[0]),o=i*(e[1]-r[1]);return"a"+i*y.r+","+i*y.r+" 0 "+a.largeArc+(n?" 1 ":" 0 ")+t+","+o}}));var C=i.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);if(C.enter().append("g").classed("titletext",!0),C.exit().remove(),C.each((function(){var e,n=u.ensureSingle(i.select(this),"text","",(function(r){r.attr("data-notex",1)})),a=g.title.text;g._meta&&(a=u.templateString(a,g._meta)),n.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(c.font,g.title.font).call(l.convertToTspans,r),e="middle center"===g.title.position?function(r){var e=Math.sqrt(r.titleBox.width*r.titleBox.width+r.titleBox.height*r.titleBox.height);return{x:r.cx,y:r.cy,scale:r.trace.hole*r.r*2/e,tx:0,ty:-r.titleBox.height/2+r.trace.title.font.size}}(y):k(y,m),n.attr("transform",s(e.x,e.y)+d(Math.min(1,e.scale))+s(e.tx,e.ty))})),G&&function(r,e){var n,i,a,t,o,c,d,s,l,m,p,I,y;function g(r,e){return r.pxmid[1]-e.pxmid[1]}function _(r,e){return e.pxmid[1]-r.pxmid[1]}function h(r,n){n||(n={});var a,s,l,p,I=n.labelExtraY+(i?n.yLabelMax:n.yLabelMin),y=i?r.yLabelMin:r.yLabelMax,g=i?r.yLabelMax:r.yLabelMin,_=r.cyFinal+o(r.px0[1],r.px1[1]),h=I-y;if(h*d>0&&(r.labelExtraY=h),u.isArrayOrTypedArray(e.pull))for(s=0;s=(f.castOption(e.pull,l.pts)||0)||((r.pxmid[1]-l.pxmid[1])*d>0?(h=l.cyFinal+o(l.px0[1],l.px1[1])-y-r.labelExtraY)*d>0&&(r.labelExtraY+=h):(g+r.labelExtraY-_)*d>0&&(a=3*c*Math.abs(s-m.indexOf(r)),(p=l.cxFinal+t(l.px0[0],l.px1[0])+a-(r.cxFinal+r.pxmid[0])-r.labelExtraX)*c>0&&(r.labelExtraX+=p)))}for(i=0;i<2;i++)for(a=i?g:_,o=i?Math.max:Math.min,d=i?1:-1,n=0;n<2;n++){for(t=n?Math.max:Math.min,c=n?1:-1,(s=r[i][n]).sort(a),l=r[1-i][n],m=l.concat(s),I=[],p=0;pMath.abs(l)?c+="l"+l*r.pxmid[0]/r.pxmid[1]+","+l+"H"+(t+r.labelExtraX+d):c+="l"+r.labelExtraX+","+s+"v"+(l-s)+"h"+d}else c+="V"+(r.yLabelMid+r.labelExtraY)+"h"+d;u.ensureSingle(n,"path","textline").call(o.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:c,fill:"none"})}else n.select("path.textline").remove()}))}(_,g),G&&g.automargin){var S=c.bBox(I.node()),A=g.domain,b=m.w*(A.x[1]-A.x[0]),M=m.h*(A.y[1]-A.y[0]),F=(.5*b-y.r)/m.w,z=(.5*M-y.r)/m.h;a.autoMargin(r,"pie."+g.uid+".automargin",{xl:A.x[0]-F,xr:A.x[1]+F,yb:A.y[0]-z,yt:A.y[1]+z,l:Math.max(y.cx-y.r-S.left,0),r:Math.max(S.right-(y.cx+y.r),0),b:Math.max(S.bottom-(y.cy+y.r),0),t:Math.max(y.cy-y.r-S.top,0),pad:5})}}))}));setTimeout((function(){y.selectAll("tspan").each((function(){var r=i.select(this);r.attr("dy")&&r.attr("dy",r.attr("dy"))}))}),0)},formatSliceLabel:E,transformInsideText:P,determineInsideTextFont:v,positionTitleOutside:k,prerenderTitles:x,layoutAreas:w,attachFxHandlers:h,computeTransform:N}},22152:function(r,e,n){"use strict";var i=n(33428),a=n(10528),t=n(82744).resizeText;r.exports=function(r){var e=r._fullLayout._pielayer.selectAll(".trace");t(r,e,"pie"),e.each((function(e){var n=e[0].trace,t=i.select(this);t.style({opacity:n.opacity}),t.selectAll("path.surface").each((function(e){i.select(this).call(a,e,n,r)}))}))}},10528:function(r,e,n){"use strict";var i=n(76308),a=n(69656).castOption,t=n(21552);r.exports=function(r,e,n,o){var c=n.marker.line,u=a(c.color,e.pts)||i.defaultLine,d=a(c.width,e.pts)||0;r.call(t,e,n,o).style("stroke-width",d).call(i.stroke,u)}},35484:function(r,e,n){"use strict";var i=n(52904);r.exports={x:i.x,y:i.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:i.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}},11072:function(r,e,n){"use strict";var i=n(67792).gl_pointcloud2d,a=n(3400).isArrayOrTypedArray,t=n(43080),o=n(19280).findExtremes,c=n(44928);function u(r,e){this.scene=r,this.uid=e,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=i(r.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var d=u.prototype;d.handlePick=function(r){var e=this.idToIndex[r.pointId];return{trace:this,dataCoord:r.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:a(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},d.update=function(r){this.index=r.index,this.textLabels=r.text,this.name=r.name,this.hoverinfo=r.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(r),this.color=c(r,{})},d.updateFast=function(r){var e,n,i,a,c,u,d=this.xData=this.pickXData=r.x,s=this.yData=this.pickYData=r.y,l=this.pickXYData=r.xy,m=r.xbounds&&r.ybounds,p=r.indices,I=this.bounds;if(l){if(i=l,e=l.length>>>1,m)I[0]=r.xbounds[0],I[2]=r.xbounds[1],I[1]=r.ybounds[0],I[3]=r.ybounds[1];else for(u=0;uI[2]&&(I[2]=a),cI[3]&&(I[3]=c);if(p)n=p;else for(n=new Int32Array(e),u=0;uI[2]&&(I[2]=a),cI[3]&&(I[3]=c);this.idToIndex=n,this.pointcloudOptions.idToIndex=n,this.pointcloudOptions.positions=i;var y=t(r.marker.color),f=t(r.marker.border.color),g=r.opacity*r.marker.opacity;y[3]*=g,this.pointcloudOptions.color=y;var _=r.marker.blend;null===_&&(_=d.length<100||s.length<100),this.pointcloudOptions.blend=_,f[3]*=g,this.pointcloudOptions.borderColor=f;var h=r.marker.sizemin,v=Math.max(r.marker.sizemax,r.marker.sizemin);this.pointcloudOptions.sizeMin=h,this.pointcloudOptions.sizeMax=v,this.pointcloudOptions.areaRatio=r.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var x=this.scene.xaxis,P=this.scene.yaxis,G=v/2||.5;r._extremes[x._id]=o(x,[I[0],I[2]],{ppad:G}),r._extremes[P._id]=o(P,[I[1],I[3]],{ppad:G})},d.dispose=function(){this.pointcloud.dispose()},r.exports=function(r,e){var n=new u(r,e.uid);return n.update(e),n}},41904:function(r,e,n){"use strict";var i=n(3400),a=n(35484);r.exports=function(r,e,n){function t(n,t){return i.coerce(r,e,a,n,t)}t("x"),t("y"),t("xbounds"),t("ybounds"),r.xy&&r.xy instanceof Float32Array&&(e.xy=r.xy),r.indices&&r.indices instanceof Int32Array&&(e.indices=r.indices),t("text"),t("marker.color",n),t("marker.opacity"),t("marker.blend"),t("marker.sizemin"),t("marker.sizemax"),t("marker.border.color",n),t("marker.border.arearatio"),e._length=null}},156:function(r,e,n){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" "),r.exports={attributes:n(35484),supplyDefaults:n(41904),calc:n(41484),plot:n(11072),moduleType:"trace",name:"pointcloud",basePlotModule:n(39952),categories:["gl","gl2d","showLegend"],meta:{}}},41440:function(r,e,n){"use strict";var i=n(25376),a=n(45464),t=n(22548),o=n(55756),c=n(86968).u,u=n(21776).Ks,d=n(49084),s=n(31780).templatedArray,l=n(29736).descriptionOnlyNumbers,m=n(92880).extendFlat,p=n(67824).overrideAll;(r.exports=p({hoverinfo:m({},a.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:c({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:l("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:i({autoShadowDflt:!0}),customdata:void 0,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},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:t.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:u({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:t.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:u({},{keys:["value","label"]}),colorscales:s("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:m(d().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},10760:function(r,e,n){"use strict";var i=n(67824).overrideAll,a=n(84888)._M,t=n(59596),o=n(65460),c=n(93972),u=n(86476),d=n(22676).prepSelect,s=n(3400),l=n(24040),m="sankey";function p(r,e){var n=r._fullData[e],i=r._fullLayout,a=i.dragmode,t="pan"===i.dragmode?"move":"crosshair",o=n._bgRect;if(o&&"pan"!==a&&"zoom"!==a){c(o,t);var m={_id:"x",c2p:s.identity,_offset:n._sankey.translateX,_length:n._sankey.width},p={_id:"y",c2p:s.identity,_offset:n._sankey.translateY,_length:n._sankey.height},I={gd:r,element:o.node(),plotinfo:{id:e,xaxis:m,yaxis:p,fillRangeItems:s.noop},subplot:e,xaxes:[m],yaxes:[p],doneFnCompleted:function(n){var i,a=r._fullData[e],t=a.node.groups.slice(),o=[];function c(r){for(var e=a._sankey.graph.nodes,n=0;nh&&(h=t.source[e]),t.target[e]>h&&(h=t.target[e]);var v,x=h+1;r.node._count=x;var P=r.node.groups,G={};for(e=0;e0&&c(B,x)&&c(k,x)&&(!G.hasOwnProperty(B)||!G.hasOwnProperty(k)||G[B]!==G[k])){G.hasOwnProperty(k)&&(k=G[k]),G.hasOwnProperty(B)&&(B=G[B]),k=+k,p[B=+B]=p[k]=!0;var F="";t.label&&t.label[e]&&(F=t.label[e]);var z=null;F&&I.hasOwnProperty(F)&&(z=I[F]),d.push({pointNumber:e,label:F,color:s?t.color[e]:t.color,hovercolor:l?t.hovercolor[e]:t.hovercolor,customdata:m?t.customdata[e]:t.customdata,concentrationscale:z,source:B,target:k,value:+M}),b.source.push(B),b.target.push(k)}}var w=x+P.length,R=o(n.color),E=o(n.customdata),N=[];for(e=0;ex-1,childrenNodes:[],pointNumber:e,label:T,color:R?n.color[e]:n.color,customdata:E?n.customdata[e]:n.customdata})}var D=!1;return function(r,e,n){for(var t=a.init2dArray(r,0),o=0;o1}))}(w,b.source,b.target)&&(D=!0),{circular:D,links:d,nodes:N,groups:P,groupLookup:G}}r.exports=function(r,e){var n=d(e);return t({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}},11820:function(r){"use strict";r.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",nodeLabel:"node-label"}}},47140:function(r,e,n){"use strict";var i=n(3400),a=n(41440),t=n(76308),o=n(49760),c=n(86968).Q,u=n(16132),d=n(31780),s=n(51272);function l(r,e){function n(n,t){return i.coerce(r,e,a.link.colorscales,n,t)}n("label"),n("cmin"),n("cmax"),n("colorscale")}r.exports=function(r,e,n,m){function p(n,t){return i.coerce(r,e,a,n,t)}var I=i.extendDeep(m.hoverlabel,r.hoverlabel),y=r.node,f=d.newContainer(e,"node");function g(r,e){return i.coerce(y,f,a.node,r,e)}g("label"),g("groups"),g("x"),g("y"),g("pad"),g("thickness"),g("line.color"),g("line.width"),g("hoverinfo",r.hoverinfo),u(y,f,g,I),g("hovertemplate"),g("align");var _=m.colorway;g("color",f.label.map((function(r,e){return t.addOpacity(function(r){return _[r%_.length]}(e),.8)}))),g("customdata");var h=r.link||{},v=d.newContainer(e,"link");function x(r,e){return i.coerce(h,v,a.link,r,e)}x("label"),x("arrowlen"),x("source"),x("target"),x("value"),x("line.color"),x("line.width"),x("hoverinfo",r.hoverinfo),u(h,v,x,I),x("hovertemplate");var P,G=o(m.paper_bgcolor).getLuminance()<.333,C=x("color",G?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)");function S(r){var e=o(r);if(!e.isValid())return r;var n=e.getAlpha();return n<=.8?e.setAlpha(n+.2):e=G?e.brighten():e.darken(),e.toRgbString()}x("hovercolor",Array.isArray(C)?C.map(S):S(C)),x("customdata"),s(h,v,{name:"colorscales",handleItemDefaults:l}),c(e,m,p),p("orientation"),p("valueformat"),p("valuesuffix"),f.x.length&&f.y.length&&(P="freeform"),p("arrangement",P),i.coerceFont(p,"textfont",m.font,{autoShadowDflt:!0}),e._length=null}},45499:function(r,e,n){"use strict";r.exports={attributes:n(41440),supplyDefaults:n(47140),calc:n(48068),plot:n(59596),moduleType:"trace",name:"sankey",basePlotModule:n(10760),selectPoints:n(81128),categories:["noOpacity"],meta:{}}},59596:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=a.numberFormat,o=n(83248),c=n(93024),u=n(76308),d=n(11820).cn,s=a._;function l(r){return""!==r}function m(r,e){return r.filter((function(r){return r.key===e.traceId}))}function p(r,e){i.select(r).select("path").style("fill-opacity",e),i.select(r).select("rect").style("fill-opacity",e)}function I(r){i.select(r).select("text.name").style("fill","black")}function y(r){return function(e){return-1!==r.node.sourceLinks.indexOf(e.link)||-1!==r.node.targetLinks.indexOf(e.link)}}function f(r){return function(e){return-1!==e.node.sourceLinks.indexOf(r.link)||-1!==e.node.targetLinks.indexOf(r.link)}}function g(r,e,n){e&&n&&m(n,e).selectAll("."+d.sankeyLink).filter(y(e)).call(h.bind(0,e,n,!1))}function _(r,e,n){e&&n&&m(n,e).selectAll("."+d.sankeyLink).filter(y(e)).call(v.bind(0,e,n,!1))}function h(r,e,n,i){i.style("fill",(function(r){if(!r.link.concentrationscale)return r.tinyColorHoverHue})).style("fill-opacity",(function(r){if(!r.link.concentrationscale)return r.tinyColorHoverAlpha})),i.each((function(n){var i=n.link.label;""!==i&&m(e,r).selectAll("."+d.sankeyLink).filter((function(r){return r.link.label===i})).style("fill",(function(r){if(!r.link.concentrationscale)return r.tinyColorHoverHue})).style("fill-opacity",(function(r){if(!r.link.concentrationscale)return r.tinyColorHoverAlpha}))})),n&&m(e,r).selectAll("."+d.sankeyNode).filter(f(r)).call(g)}function v(r,e,n,i){i.style("fill",(function(r){return r.tinyColorHue})).style("fill-opacity",(function(r){return r.tinyColorAlpha})),i.each((function(n){var i=n.link.label;""!==i&&m(e,r).selectAll("."+d.sankeyLink).filter((function(r){return r.link.label===i})).style("fill",(function(r){return r.tinyColorHue})).style("fill-opacity",(function(r){return r.tinyColorAlpha}))})),n&&m(e,r).selectAll(d.sankeyNode).filter(f(r)).call(_)}function x(r,e){var n=r.hoverlabel||{},i=a.nestedProperty(n,e).get();return!Array.isArray(i)&&i}r.exports=function(r,e){for(var n=r._fullLayout,a=n._paper,m=n._size,y=0;y"),color:x(o,"bgcolor")||u.addOpacity(y.color,1),borderColor:x(o,"bordercolor"),fontFamily:x(o,"font.family"),fontSize:x(o,"font.size"),fontColor:x(o,"font.color"),fontWeight:x(o,"font.weight"),fontStyle:x(o,"font.style"),fontVariant:x(o,"font.variant"),fontTextcase:x(o,"font.textcase"),fontLineposition:x(o,"font.lineposition"),fontShadow:x(o,"font.shadow"),nameLength:x(o,"namelength"),textAlign:x(o,"align"),idealAlign:i.event.x"),color:x(o,"bgcolor")||a.tinyColorHue,borderColor:x(o,"bordercolor"),fontFamily:x(o,"font.family"),fontSize:x(o,"font.size"),fontColor:x(o,"font.color"),fontWeight:x(o,"font.weight"),fontStyle:x(o,"font.style"),fontVariant:x(o,"font.variant"),fontTextcase:x(o,"font.textcase"),fontLineposition:x(o,"font.lineposition"),fontShadow:x(o,"font.shadow"),nameLength:x(o,"namelength"),textAlign:x(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:_,eventData:[a.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r});p(P,.85),I(P)}}},unhover:function(e,a,t){!1!==r._fullLayout.hovermode&&(i.select(e).call(_,a,t),"skip"!==a.node.trace.node.hoverinfo&&(a.node.fullData=a.node.trace,r.emit("plotly_unhover",{event:i.event,points:[a.node]})),c.loneUnhover(n._hoverlayer.node()))},select:function(e,n,a){var t=n.node;t.originalEvent=i.event,r._hoverdata=[t],i.select(e).call(_,n,a),c.click(r,{target:!0})}}})}},83248:function(r,e,n){"use strict";var i=n(49812),a=n(67756).Gz,t=n(33428),o=n(26800),c=n(48932),u=n(11820),d=n(49760),s=n(76308),l=n(43616),m=n(3400),p=m.strTranslate,I=m.strRotate,y=n(71688),f=y.keyFun,g=y.repeat,_=y.unwrap,h=n(72736),v=n(24040),x=n(84284),P=x.CAP_SHIFT,G=x.LINE_SPACING;function C(r,e,n){var i,a=_(e),t=a.trace,s=t.domain,l="h"===t.orientation,p=t.node.pad,I=t.node.thickness,y={justify:o.sankeyJustify,left:o.sankeyLeft,right:o.sankeyRight,center:o.sankeyCenter}[t.node.align],f=r.width*(s.x[1]-s.x[0]),g=r.height*(s.y[1]-s.y[0]),h=a._nodes,v=a._links,x=a.circular;(i=x?c.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(u.sankeyIterations).size(l?[f,g]:[g,f]).nodeWidth(I).nodePadding(p).nodeId((function(r){return r.pointNumber})).nodeAlign(y).nodes(h).links(v);var P,G,C,S=i();for(var A in i.nodePadding()=a||(n=a-e.y0)>1e-6&&(e.y0+=n,e.y1+=n),a=e.y1+p}))}(function(r){var e,n,i=r.map((function(r,e){return{x0:r.x0,index:e}})).sort((function(r,e){return r.x0-e.x0})),a=[],t=-1,o=-1/0;for(P=0;Po+I&&(t+=1,e=c.x0),o=c.x0,a[t]||(a[t]=[]),a[t].push(c),n=e-c.x0,c.x0+=n,c.x1+=n}return a}(h=S.nodes)),i.update(S)}return{circular:x,key:n,trace:t,guid:m.randstr(),horizontal:l,width:f,height:g,nodePad:t.node.pad,nodeLineColor:t.node.line.color,nodeLineWidth:t.node.line.width,linkLineColor:t.link.line.color,linkLineWidth:t.link.line.width,linkArrowLength:t.link.arrowlen,valueFormat:t.valueformat,valueSuffix:t.valuesuffix,textFont:t.textfont,translateX:s.x[0]*r.width+r.margin.l,translateY:r.height-s.y[1]*r.height+r.margin.t,dragParallel:l?g:f,dragPerpendicular:l?f:g,arrangement:t.arrangement,sankey:i,graph:S,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function S(r,e,n){var i=d(e.color),a=d(e.hovercolor),t=e.source.label+"|"+e.target.label+"__"+n;return e.trace=r.trace,e.curveNumber=r.trace.index,{circular:r.circular,key:t,traceId:r.key,pointNumber:e.pointNumber,link:e,tinyColorHue:s.tinyRGB(i),tinyColorAlpha:i.getAlpha(),tinyColorHoverHue:s.tinyRGB(a),tinyColorHoverAlpha:a.getAlpha(),linkPath:A,linkLineColor:r.linkLineColor,linkLineWidth:r.linkLineWidth,linkArrowLength:r.linkArrowLength,valueFormat:r.valueFormat,valueSuffix:r.valueSuffix,sankey:r.sankey,parent:r,interactionState:r.interactionState,flow:e.flow}}function A(){return function(r){var e=r.linkArrowLength;if(r.link.circular)return function(r,e){var n=r.width/2,i=r.circularPathData;return"top"===r.circularLinkType?"M "+(i.targetX-e)+" "+(i.targetY+n)+" L"+(i.rightInnerExtent-e)+" "+(i.targetY+n)+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 1 "+(i.rightFullExtent-n-e)+" "+(i.targetY-i.rightSmallArcRadius)+"L"+(i.rightFullExtent-n-e)+" "+i.verticalRightInnerExtent+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 1 "+(i.rightInnerExtent-e)+" "+(i.verticalFullExtent-n)+"L"+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent+"L"+(i.leftFullExtent+n)+" "+(i.sourceY-i.leftSmallArcRadius)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.sourceY+n)+"L"+i.sourceX+" "+(i.sourceY+n)+"L"+i.sourceX+" "+(i.sourceY-n)+"L"+i.leftInnerExtent+" "+(i.sourceY-n)+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 0 "+(i.leftFullExtent-n)+" "+(i.sourceY-i.leftSmallArcRadius)+"L"+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+"L"+(i.rightInnerExtent-e)+" "+(i.verticalFullExtent+n)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 0 "+(i.rightFullExtent+n-e)+" "+i.verticalRightInnerExtent+"L"+(i.rightFullExtent+n-e)+" "+(i.targetY-i.rightSmallArcRadius)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 0 "+(i.rightInnerExtent-e)+" "+(i.targetY-n)+"L"+(i.targetX-e)+" "+(i.targetY-n)+(e>0?"L"+i.targetX+" "+i.targetY:"")+"Z":"M "+(i.targetX-e)+" "+(i.targetY-n)+" L"+(i.rightInnerExtent-e)+" "+(i.targetY-n)+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-e)+" "+(i.targetY+i.rightSmallArcRadius)+"L"+(i.rightFullExtent-n-e)+" "+i.verticalRightInnerExtent+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-e)+" "+(i.verticalFullExtent+n)+"L"+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent+"L"+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+"L"+i.sourceX+" "+(i.sourceY-n)+"L"+i.sourceX+" "+(i.sourceY+n)+"L"+i.leftInnerExtent+" "+(i.sourceY+n)+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+"L"+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+"L"+(i.rightInnerExtent-e)+" "+(i.verticalFullExtent-n)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-e)+" "+i.verticalRightInnerExtent+"L"+(i.rightFullExtent+n-e)+" "+(i.targetY+i.rightSmallArcRadius)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-e)+" "+(i.targetY+n)+"L"+(i.targetX-e)+" "+(i.targetY+n)+(e>0?"L"+i.targetX+" "+i.targetY:"")+"Z"}(r.link,e);var n=Math.abs((r.link.target.x0-r.link.source.x1)/2);e>n&&(e=n);var i=r.link.source.x1,t=r.link.target.x0-e,o=a(i,t),c=o(.5),u=o(.5),d=r.link.y0-r.link.width/2,s=r.link.y0+r.link.width/2,l=r.link.y1-r.link.width/2,m=r.link.y1+r.link.width/2,p="M"+i+","+d,I="C"+c+","+d+" "+u+","+l+" "+t+","+l,y="C"+u+","+m+" "+c+","+s+" "+i+","+s,f=e>0?"L"+(t+e)+","+(l+r.link.width/2):"";return p+I+(f+="L"+t+","+m)+y+"Z"}}function b(r,e){var n=d(e.color),i=u.nodePadAcross,a=r.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var t=e.dx,o=Math.max(.5,e.dy),c="node_"+e.pointNumber;return e.group&&(c=m.randstr()),e.trace=r.trace,e.curveNumber=r.trace.index,{index:e.pointNumber,key:c,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:r.key,trace:r.trace,node:e,nodePad:r.nodePad,nodeLineColor:r.nodeLineColor,nodeLineWidth:r.nodeLineWidth,textFont:r.textFont,size:r.horizontal?r.height:r.width,visibleWidth:Math.ceil(t),visibleHeight:o,zoneX:-i,zoneY:-a,zoneWidth:t+2*i,zoneHeight:o+2*a,labelY:r.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:r.width,forceLayouts:r.forceLayouts,horizontal:r.horizontal,darkBackground:n.getBrightness()<=128,tinyColorHue:s.tinyRGB(n),tinyColorAlpha:n.getAlpha(),valueFormat:r.valueFormat,valueSuffix:r.valueSuffix,sankey:r.sankey,graph:r.graph,arrangement:r.arrangement,uniqueNodeLabelPathId:[r.guid,r.key,c].join("_"),interactionState:r.interactionState,figure:r}}function M(r){r.attr("transform",(function(r){return p(r.node.x0.toFixed(3),r.node.y0.toFixed(3))}))}function B(r){r.call(M)}function k(r,e){r.call(B),e.attr("d",A())}function F(r){r.attr("width",(function(r){return r.node.x1-r.node.x0})).attr("height",(function(r){return r.visibleHeight}))}function z(r){return r.link.width>1||r.linkLineWidth>0}function w(r){return p(r.translateX,r.translateY)+(r.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function R(r,e,n){r.on(".basic",null).on("mouseover.basic",(function(r){r.interactionState.dragInProgress||r.partOfGroup||(n.hover(this,r,e),r.interactionState.hovered=[this,r])})).on("mousemove.basic",(function(r){r.interactionState.dragInProgress||r.partOfGroup||(n.follow(this,r),r.interactionState.hovered=[this,r])})).on("mouseout.basic",(function(r){r.interactionState.dragInProgress||r.partOfGroup||(n.unhover(this,r,e),r.interactionState.hovered=!1)})).on("click.basic",(function(r){r.interactionState.hovered&&(n.unhover(this,r,e),r.interactionState.hovered=!1),r.interactionState.dragInProgress||r.partOfGroup||n.select(this,r,e)}))}function E(r,e,n,a){var o=t.behavior.drag().origin((function(r){return{x:r.node.x0+r.visibleWidth/2,y:r.node.y0+r.visibleHeight/2}})).on("dragstart",(function(t){if("fixed"!==t.arrangement&&(m.ensureSingle(a._fullLayout._infolayer,"g","dragcover",(function(r){a._fullLayout._dragCover=r})),m.raiseToTop(this),t.interactionState.dragInProgress=t.node,T(t.node),t.interactionState.hovered&&(n.nodeEvents.unhover.apply(0,t.interactionState.hovered),t.interactionState.hovered=!1),"snap"===t.arrangement)){var o=t.traceId+"|"+t.key;t.forceLayouts[o]?t.forceLayouts[o].alpha(1):function(r,e,n,a){!function(r){for(var e=0;e0&&i.forceLayouts[e].alpha(0)}}(0,e,t,n)).stop()}(0,o,t),function(r,e,n,i,a){window.requestAnimationFrame((function t(){var o;for(o=0;o0)window.requestAnimationFrame(t);else{var c=n.node.originalX;n.node.x0=c-n.visibleWidth/2,n.node.x1=c+n.visibleWidth/2,N(n,a)}}))}(r,e,t,o,a)}})).on("drag",(function(n){if("fixed"!==n.arrangement){var i=t.event.x,a=t.event.y;"snap"===n.arrangement?(n.node.x0=i-n.visibleWidth/2,n.node.x1=i+n.visibleWidth/2,n.node.y0=a-n.visibleHeight/2,n.node.y1=a+n.visibleHeight/2):("freeform"===n.arrangement&&(n.node.x0=i-n.visibleWidth/2,n.node.x1=i+n.visibleWidth/2),a=Math.max(0,Math.min(n.size-n.visibleHeight/2,a)),n.node.y0=a-n.visibleHeight/2,n.node.y1=a+n.visibleHeight/2),T(n.node),"snap"!==n.arrangement&&(n.sankey.update(n.graph),k(r.filter(D(n)),e))}})).on("dragend",(function(r){if("fixed"!==r.arrangement){r.interactionState.dragInProgress=!1;for(var e=0;eu&&k[g].gap;)g--;for(h=k[g].s,y=k.length-1;y>g;y--)k[y].s=h;for(;ub[l]&&l=0;l--){var m=r[l];if("scatter"===m.type&&m.xaxis===d.xaxis&&m.yaxis===d.yaxis){m.opacity=void 0;break}}}}}},18800:function(r,e,n){"use strict";var i=n(3400),a=n(24040),t=n(52904),o=n(88200),c=n(43028),u=n(43980),d=n(31147),s=n(43912),l=n(74428),m=n(66828),p=n(11731),I=n(124),y=n(70840),f=n(3400).coercePattern;r.exports=function(r,e,n,g){function _(n,a){return i.coerce(r,e,t,n,a)}var h=u(r,e,g,_);if(h||(e.visible=!1),e.visible){d(r,e,g,_),_("xhoverformat"),_("yhoverformat"),_("zorder");var v=s(r,e,g,_);"group"===g.scattermode&&void 0===e.orientation&&_("orientation","v");var x=!v&&h=Math.min(e,n)&&I<=Math.max(e,n)?0:1/0}var i=Math.max(3,r.mrc||0),a=1-1/i,t=Math.abs(m.c2p(r.x)-I);return t=Math.min(e,n)&&y<=Math.max(e,n)?0:1/0}var i=Math.max(3,r.mrc||0),a=1-1/i,t=Math.abs(p.c2p(r.y)-y);return tn!==(d=a[i][1])>=n&&(o=a[i-1][0],c=a[i][0],d-u&&(t=o+(c-o)*(n-u)/(d-u),l=Math.min(l,t),I=Math.max(I,t)));return{x0:l=Math.max(l,0),x1:I=Math.min(I,m._length),y0:n,y1:n}}(l._polygons);null===z&&(z={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var w=c.defaultLine;return c.opacity(l.fillcolor)?w=l.fillcolor:c.opacity((l.line||{}).color)&&(w=l.line.color),i.extendFlat(r,{distance:r.maxHoverDistance,x0:z.x0,x1:z.x1,y0:z.y0,y1:z.y1,color:w,hovertemplate:!1}),delete r.index,l.text&&!i.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}},65875:function(r,e,n){"use strict";var i=n(43028);r.exports={hasLines:i.hasLines,hasMarkers:i.hasMarkers,hasText:i.hasText,isBubble:i.isBubble,attributes:n(52904),layoutAttributes:n(55308),supplyDefaults:n(18800),crossTraceDefaults:n(35036),supplyLayoutDefaults:n(59748),calc:n(16356).calc,crossTraceCalc:n(96664),arraysToCalcdata:n(20148),plot:n(96504),colorbar:n(5528),formatLabels:n(76688),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(98723),selectPoints:n(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:n(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(r){"use strict";r.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(r,e,n){"use strict";var i=n(3400),a=n(55308);r.exports=function(r,e){var n,t,o="group"===e.barmode;"group"===e.scattermode&&(n="scattergap",t=o?e.bargap:.2,i.coerce(r,e,a,n,t))}},66828:function(r,e,n){"use strict";var i=n(3400).isArrayOrTypedArray,a=n(94288).hasColorscale,t=n(27260);r.exports=function(r,e,n,o,c,u){u||(u={});var d=(r.marker||{}).color;d&&d._inputArray&&(d=d._inputArray),c("line.color",n),a(r,"line")?t(r,e,o,c,{prefix:"line.",cLetter:"c"}):c("line.color",!i(d)&&d||n),c("line.width"),u.noDash||c("line.dash"),u.backoff&&c("line.backoff")}},52340:function(r,e,n){"use strict";var i=n(43616),a=n(39032),t=a.BADNUM,o=a.LOG_CLIP,c=o+.5,u=o-.5,d=n(3400),s=d.segmentsIntersect,l=d.constrain,m=n(88200);r.exports=function(r,e){var n,a,o,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b,M=e.trace||{},B=e.xaxis,k=e.yaxis,F="log"===B.type,z="log"===k.type,w=B._length,R=k._length,E=e.backoff,N=M.marker,T=e.connectGaps,D=e.baseTolerance,J=e.shape,U="linear"===J,H=M.fill&&"none"!==M.fill,L=[],O=m.minTolerance,K=r.length,V=new Array(K),j=0;function W(n){var i=r[n];if(!i)return!1;var a=e.linearized?B.l2p(i.x):B.c2p(i.x),o=e.linearized?k.l2p(i.y):k.c2p(i.y);if(a===t){if(F&&(a=B.c2p(i.x,!0)),a===t)return!1;z&&o===t&&(a*=Math.abs(B._m*R*(B._m>0?c:u)/(k._m*w*(k._m>0?c:u)))),a*=1e3}if(o===t){if(z&&(o=k.c2p(i.y,!0)),o===t)return!1;o*=1e3}return[a,o]}function Z(r,e,n,i){var a=n-r,t=i-e,o=.5-r,c=.5-e,u=a*a+t*t,d=a*o+t*c;if(d>0&&dor||r[1]ur)return[l(r[0],tr,or),l(r[1],cr,ur)]}function lr(r,e){return r[0]===e[0]&&(r[0]===tr||r[0]===or)||r[1]===e[1]&&(r[1]===cr||r[1]===ur)||void 0}function mr(r,e,n){return function(i,a){var t=sr(i),o=sr(a),c=[];if(t&&o&&lr(t,o))return c;t&&c.push(t),o&&c.push(o);var u=2*d.constrain((i[r]+a[r])/2,e,n)-((t||i)[r]+(o||a)[r]);return u&&((t&&o?u>0===t[r]>o[r]?t:o:t||o)[r]+=u),c}}function pr(r){var e=r[0],n=r[1],i=e===V[j-1][0],a=n===V[j-1][1];if(!i||!a)if(j>1){var t=e===V[j-2][0],o=n===V[j-2][1];i&&(e===tr||e===or)&&t?o?j--:V[j-1]=r:a&&(n===cr||n===ur)&&o?t?j--:V[j-1]=r:V[j++]=r}else V[j++]=r}function Ir(r){V[j-1][0]!==r[0]&&V[j-1][1]!==r[1]&&pr([$,rr]),pr(r),er=null,$=rr=0}"linear"===J||"spline"===J?ir=function(r,e){for(var n=[],i=0,a=0;a<4;a++){var t=dr[a],o=s(r[0],r[1],e[0],e[1],t[0],t[1],t[2],t[3]);o&&(!i||Math.abs(o.x-n[0][0])>1||Math.abs(o.y-n[0][1])>1)&&(o=[o.x,o.y],i&&Y(o,r)or?or:0,Q=e[1]ur?ur:0,X||Q){if(j)if(er){var i=ir(er,e);i.length>1&&(Ir(i[0]),V[j++]=i[1])}else nr=ir(V[j-1],e)[0],V[j++]=nr;else V[j++]=[X||e[0],Q||e[1]];var a=V[j-1];X&&Q&&(a[0]!==X||a[1]!==Q)?(er&&($!==X&&rr!==Q?pr($&&rr?function(r,e){var n=e[0]-r[0],i=(e[1]-r[1])/n;return(r[1]*e[0]-e[1]*r[0])/n>0?[i>0?tr:or,ur]:[i>0?or:tr,cr]}(er,e):[$||X,rr||Q]):$&&rr&&pr([$,rr])),pr([X,Q])):$-X&&rr-Q&&pr([X||$,Q||rr]),er=e,$=X,rr=Q}else er&&Ir(ir(er,e)[0]),V[j++]=e}for(n=0;nq(y,gr))break;o=y,(P=_[0]*g[0]+_[1]*g[1])>v?(v=P,p=y,f=!1):P=r.length||!y)break;fr(y),a=y}}else fr(p)}er&&pr([$||er[0],rr||er[1]]),L.push(V.slice(0,j))}var _r=J.slice(J.length-1);if(E&&"h"!==_r&&"v"!==_r){for(var hr=!1,vr=-1,xr=[],Pr=0;Pr=0?u=p:(u=p=m,m++),u0?Math.max(n,t):0}}},5528:function(r){"use strict";r.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(r,e,n){"use strict";var i=n(76308),a=n(94288).hasColorscale,t=n(27260),o=n(43028);r.exports=function(r,e,n,c,u,d){var s=o.isBubble(r),l=(r.line||{}).color;d=d||{},l&&(n=l),u("marker.symbol"),u("marker.opacity",s?.7:1),u("marker.size"),d.noAngle||(u("marker.angle"),d.noAngleRef||u("marker.angleref"),d.noStandOff||u("marker.standoff")),u("marker.color",n),a(r,"marker")&&t(r,e,c,u,{prefix:"marker.",cLetter:"c"}),d.noSelect||(u("selected.marker.color"),u("unselected.marker.color"),u("selected.marker.size"),u("unselected.marker.size")),d.noLine||(u("marker.line.color",l&&!Array.isArray(l)&&e.marker.color!==l?l:s?i.background:i.defaultLine),a(r,"marker.line")&&t(r,e,c,u,{prefix:"marker.line.",cLetter:"c"}),u("marker.line.width",s?1:0)),s&&(u("marker.sizeref"),u("marker.sizemin"),u("marker.sizemode")),d.gradient&&"none"!==u("marker.gradient.type")&&u("marker.gradient.color")}},31147:function(r,e,n){"use strict";var i=n(3400).dateTick0,a=n(39032).ONEWEEK;function t(r,e){return i(e,r%a===0?1:0)}r.exports=function(r,e,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",t(o,e.xcalendar)),i("xperiodalignment"))}if(a.y){var c=i("yperiod");c&&(i("yperiod0",t(c,e.ycalendar)),i("yperiodalignment"))}}},96504:function(r,e,n){"use strict";var i=n(33428),a=n(24040),t=n(3400),o=t.ensureSingle,c=t.identity,u=n(43616),d=n(43028),s=n(52340),l=n(14328),m=n(92065).tester;function p(r,e,n,l,p,I,y){var f,g=r._context.staticPlot;!function(r,e,n,a,o){var c=n.xaxis,u=n.yaxis,s=i.extent(t.simpleMap(c.range,c.r2c)),l=i.extent(t.simpleMap(u.range,u.r2c)),m=a[0].trace;if(d.hasMarkers(m)){var p=m.marker.maxdisplayed;if(0!==p){var I=a.filter((function(r){return r.x>=s[0]&&r.x<=s[1]&&r.y>=l[0]&&r.y<=l[1]})),y=Math.ceil(I.length/p),f=0;o.forEach((function(r,n){var i=r[0].trace;d.hasMarkers(i)&&i.marker.maxdisplayed>0&&n0;function h(r){return _?r.transition():r}var v=n.xaxis,x=n.yaxis,P=l[0].trace,G=P.line,C=i.select(I),S=o(C,"g","errorbars"),A=o(C,"g","lines"),b=o(C,"g","points"),M=o(C,"g","text");if(a.getComponentMethod("errorbars","plot")(r,S,n,y),!0===P.visible){var B,k;h(C).style("opacity",P.opacity);var F,z,w=P.fill.charAt(P.fill.length-1);"x"!==w&&"y"!==w&&(w=""),"y"===w?(F=1,z=x.c2p(0,!0)):"x"===w&&(F=0,z=v.c2p(0,!0)),l[0][n.isRangePlot?"nodeRangePlot3":"node3"]=C;var R,E,N="",T=[],D=P._prevtrace,J=null,U=null;D&&(N=D._prevRevpath||"",k=D._nextFill,T=D._ownPolygons,J=D._fillsegments,U=D._fillElement);var H,L,O,K,V,j,W="",Z="",q=[];P._polygons=[];var Y=[],X=[],Q=t.noop;if(B=P._ownFill,d.hasLines(P)||"none"!==P.fill){k&&k.datum(l),-1!==["hv","vh","hvh","vhv"].indexOf(G.shape)?(H=u.steps(G.shape),L=u.steps(G.shape.split("").reverse().join(""))):H=L="spline"===G.shape?function(r){var e=r[r.length-1];return r.length>1&&r[0][0]===e[0]&&r[0][1]===e[1]?u.smoothclosed(r.slice(1),G.smoothing):u.smoothopen(r,G.smoothing)}:function(r){return"M"+r.join("L")},O=function(r){return L(r.reverse())},X=s(l,{xaxis:v,yaxis:x,trace:P,connectGaps:P.connectgaps,baseTolerance:Math.max(G.width||1,3)/4,shape:G.shape,backoff:G.backoff,simplify:G.simplify,fill:P.fill}),Y=new Array(X.length);var $=0;for(f=0;f0,f=l(r,e,n);(s=a.selectAll("g.trace").data(f,(function(r){return r[0].trace.uid}))).enter().append("g").attr("class",(function(r){return"trace scatter trace"+r[0].trace.uid})).style("stroke-miterlimit",2),s.order(),function(r,e,n){e.each((function(e){var a=o(i.select(this),"g","fills");u.setClipUrl(a,n.layerClipId,r);var t=e[0].trace,d=[];t._ownfill&&d.push("_ownFill"),t._nexttrace&&d.push("_nextFill");var s=a.selectAll("g").data(d,c);s.enter().append("g"),s.exit().each((function(r){t[r]=null})).remove(),s.order().each((function(r){t[r]=o(i.select(this),"path","js-fill")}))}))}(r,s,e),y?(d&&(m=d()),i.transition().duration(t.duration).ease(t.easing).each("end",(function(){m&&m()})).each("interrupt",(function(){m&&m()})).each((function(){a.selectAll("g.trace").each((function(n,i){p(r,i,e,n,f,this,t)}))}))):s.each((function(n,i){p(r,i,e,n,f,this,t)})),I&&s.exit().remove(),a.selectAll("path:not([d])").remove()}},91560:function(r,e,n){"use strict";var i=n(43028);r.exports=function(r,e){var n,a,t,o,c=r.cd,u=r.xaxis,d=r.yaxis,s=[],l=c[0].trace;if(!i.hasMarkers(l)&&!i.hasText(l))return[];if(!1===e)for(n=0;n0){var m=a.c2l(s);a._lowerLogErrorBound||(a._lowerLogErrorBound=m),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,m)}}else o[c]=[-u[0]*n,u[1]*n]}return o}r.exports=function(r,e,n){var i=[a(r.x,r.error_x,e[0],n.xaxis),a(r.y,r.error_y,e[1],n.yaxis),a(r.z,r.error_z,e[2],n.zaxis)],t=function(r){for(var e=0;e-1?-1:r.indexOf("right")>-1?1:0}function v(r){return null===r||void 0===r?0:r.indexOf("top")>-1?-1:r.indexOf("bottom")>-1?1:0}function x(r,e){return e(4*r)}function P(r){return p[r]}function G(r,e,n,i,a){var t=null;if(u.isArrayOrTypedArray(r)){t=[];for(var o=0;o=0){var y=function(r,e,n){var i,a=(n+1)%3,t=(n+2)%3,o=[],u=[];for(i=0;i=0&&l("surfacecolor",p||I);for(var y=["x","y","z"],f=0;f<3;++f){var g="projection."+y[f];l(g+".show")&&(l(g+".opacity"),l(g+".scale"))}var _=i.getComponentMethod("errorbars","supplyDefaults");_(r,e,p||I||n,{axis:"z"}),_(r,e,p||I||n,{axis:"y",inherit:"z"}),_(r,e,p||I||n,{axis:"x",inherit:"z"})}else e.visible=!1}},3296:function(r,e,n){"use strict";r.exports={plot:n(41064),attributes:n(91592),markerSymbols:n(87792),supplyDefaults:n(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:n(41484),moduleType:"trace",name:"scatter3d",basePlotModule:n(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(r,e,n){"use strict";var i=n(98304),a=n(52904),t=n(45464),o=n(21776).Ks,c=n(21776).Gw,u=n(49084),d=n(92880).extendFlat,s=a.marker,l=a.line,m=s.line;r.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:d({},a.mode,{dflt:"markers"}),text:d({},a.text,{}),texttemplate:c({editType:"plot"},{keys:["a","b","text"]}),hovertext:d({},a.hovertext,{}),line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:d({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:a.connectgaps,fill:d({},a.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i(),marker:d({symbol:s.symbol,opacity:s.opacity,maxdisplayed:s.maxdisplayed,angle:s.angle,angleref:s.angleref,standoff:s.standoff,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,line:d({width:m.width,editType:"calc"},u("marker.line")),gradient:s.gradient,editType:"calc"},u("marker")),textfont:a.textfont,textposition:a.textposition,selected:a.selected,unselected:a.unselected,hoverinfo:d({},t.hoverinfo,{flags:["a","b","text","name"]}),hoveron:a.hoveron,hovertemplate:o(),zorder:a.zorder}},48228:function(r,e,n){"use strict";var i=n(38248),a=n(90136),t=n(20148),o=n(4500),c=n(16356).calcMarkerSize,u=n(50948);r.exports=function(r,e){var n=e._carpetTrace=u(r,e);if(n&&n.visible&&"legendonly"!==n.visible){var d;e.xaxis=n.xaxis,e.yaxis=n.yaxis;var s,l,m=e._length,p=new Array(m),I=!1;for(d=0;d")}return o}function _(r,e){var n;n=r.labelprefix&&r.labelprefix.length>0?r.labelprefix.replace(/ = $/,""):r._hovertitle,f.push(n+": "+e.toFixed(3)+r.labelsuffix)}}},4184:function(r,e,n){"use strict";r.exports={attributes:n(90372),supplyDefaults:n(6176),colorbar:n(5528),formatLabels:n(52364),calc:n(48228),plot:n(20036),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(58960),selectPoints:n(91560),eventData:n(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:n(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(r,e,n){"use strict";var i=n(96504),a=n(54460),t=n(43616);r.exports=function(r,e,n,o){var c,u,d,s=n[0][0].carpet,l=a.getFromId(r,s.xaxis||"x"),m=a.getFromId(r,s.yaxis||"y"),p={xaxis:l,yaxis:m,plot:e.plot};for(c=0;c")}function p(r){return r+"\xb0"}}(d,y,r,u[0].t.labels),r.hovertemplate=d.hovertemplate,[r]}}},36952:function(r,e,n){"use strict";r.exports={attributes:n(6096),supplyDefaults:n(86188),colorbar:n(5528),formatLabels:n(56696),calc:n(25212),calcGeoJSON:n(48691).calcGeoJSON,plot:n(48691).plot,style:n(25064),styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(64292),eventData:n(58544),selectPoints:n(8796),moduleType:"trace",name:"scattergeo",basePlotModule:n(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(59972).getTopojsonFeatures,o=n(44808),c=n(27144),u=n(19280).findExtremes,d=n(39032).BADNUM,s=n(16356).calcMarkerSize,l=n(43028),m=n(25064);r.exports={calcGeoJSON:function(r,e){var n,i,o=r[0].trace,l=e[o.geo],m=l._subplot,p=o._length;if(a.isArrayOrTypedArray(o.locations)){var I=o.locationmode,y="geojson-id"===I?c.extractTraceFeature(r):t(o,m.topojson);for(n=0;n=f,P=2*v,G={},C=u.makeCalcdata(e,"x"),S=_.makeCalcdata(e,"y"),A=c(e,u,"x",C),b=c(e,_,"y",S),M=A.vals,B=b.vals;e._x=M,e._y=B,e.xperiodalignment&&(e._origX=C,e._xStarts=A.starts,e._xEnds=A.ends),e.yperiodalignment&&(e._origY=S,e._yStarts=b.starts,e._yEnds=b.ends);var k=new Array(P),F=new Array(v);for(n=0;n1&&a.extendFlat(c.line,p.linePositions(r,n,i)),c.errorX||c.errorY){var u=p.errorBarPositions(r,n,i,t,o);c.errorX&&a.extendFlat(c.errorX,u.x),c.errorY&&a.extendFlat(c.errorY,u.y)}return c.text&&(a.extendFlat(c.text,{positions:i},p.textPosition(r,n,c.text,c.marker)),a.extendFlat(c.textSel,{positions:i},p.textPosition(r,n,c.text,c.markerSel)),a.extendFlat(c.textUnsel,{positions:i},p.textPosition(r,n,c.text,c.markerUnsel))),c}(r,0,e,k,M,B),R=I(r,h);return l(o,e),x?w.marker&&(z=w.marker.sizeAvg||Math.max(w.marker.size,3)):z=d(e,v),s(r,e,u,_,M,B,z),w.errorX&&g(e,u,w.errorX),w.errorY&&g(e,_,w.errorY),w.fill&&!R.fill2d&&(R.fill2d=!0),w.marker&&!R.scatter2d&&(R.scatter2d=!0),w.line&&!R.line2d&&(R.line2d=!0),!w.errorX&&!w.errorY||R.error2d||(R.error2d=!0),w.text&&!R.glText&&(R.glText=!0),w.marker&&(w.marker.snap=v),R.lineOptions.push(w.line),R.errorXOptions.push(w.errorX),R.errorYOptions.push(w.errorY),R.fillOptions.push(w.fill),R.markerOptions.push(w.marker),R.markerSelectedOptions.push(w.markerSel),R.markerUnselectedOptions.push(w.markerUnsel),R.textOptions.push(w.text),R.textSelectedOptions.push(w.textSel),R.textUnselectedOptions.push(w.textUnsel),R.selectBatch.push([]),R.unselectBatch.push([]),G._scene=R,G.index=R.count,G.x=M,G.y=B,G.positions=k,R.count++,[{x:!1,y:!1,t:G,trace:e}]}},67072:function(r){"use strict";r.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]}}},84236:function(r,e,n){"use strict";var i=n(38248),a=n(20472),t=n(72160),o=n(24040),c=n(3400),u=c.isArrayOrTypedArray,d=n(43616),s=n(79811),l=n(33040).formatColor,m=n(43028),p=n(7152),I=n(80088),y=n(67072),f=n(13448).DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},_=n(10624).appendArrayPointValue;function h(r,e){var n,a=r._fullLayout,t=e._length,o=e.textfont,d=e.textposition,s=u(d)?d:[d],l=o.color,m=o.size,p=o.family,I=o.weight,y=o.style,f=o.variant,g={},h=r._context.plotGlPixelRatio,x=e.texttemplate;if(x){g.text=[];var P=a._d3locale,G=Array.isArray(x),C=G?Math.min(x.length,t):t,S=G?function(r){return x[r]}:function(){return x};for(n=0;n500?"bold":"normal":r}function x(r,e){var n,i,a=e._length,o=e.marker,c={},d=u(o.symbol),s=u(o.angle),m=u(o.color),y=u(o.line.color),f=u(o.opacity),g=u(o.size),_=u(o.line.width);if(d||(i=I.isOpenSymbol(o.symbol)),d||m||y||f||s){c.symbols=new Array(a),c.angles=new Array(a),c.colors=new Array(a),c.borderColors=new Array(a);var h=o.symbol,v=o.angle,x=l(o,o.opacity,a),P=l(o.line,o.opacity,a);if(!u(P[0])){var G=P;for(P=Array(a),n=0;ny.TOO_MANY_POINTS||m.hasMarkers(e)?"rect":"round";if(d&&e.connectgaps){var l=i[0],p=i[1];for(a=0;a1?d[a]:d[0]:d,y=u(s)?s.length>1?s[a]:s[0]:s,f=g[I],_=g[y],h=l?l/.8+1:0,v=-_*h-.5*_;o.offset[a]=[f*h/p,v/p]}}return o}}},80220:function(r,e,n){"use strict";var i=n(3400),a=n(24040),t=n(80088),o=n(2876),c=n(88200),u=n(43028),d=n(43980),s=n(31147),l=n(74428),m=n(66828),p=n(70840),I=n(124);r.exports=function(r,e,n,y){function f(n,a){return i.coerce(r,e,o,n,a)}var g=!!r.marker&&t.isOpenSymbol(r.marker.symbol),_=u.isBubble(r),h=d(r,e,y,f);if(h){s(r,e,y,f),f("xhoverformat"),f("yhoverformat");var v=h100},e.isDotSymbol=function(r){return"string"===typeof r?i.DOT_RE.test(r):r>200}},41272:function(r,e,n){"use strict";var i=n(24040),a=n(3400),t=n(44928);function o(r,e,n,o){var c=r.xa,u=r.ya,d=r.distance,s=r.dxy,l=r.index,m={pointNumber:l,x:e[l],y:n[l]};m.tx=a.isArrayOrTypedArray(o.text)?o.text[l]:o.text,m.htx=Array.isArray(o.hovertext)?o.hovertext[l]:o.hovertext,m.data=Array.isArray(o.customdata)?o.customdata[l]:o.customdata,m.tp=Array.isArray(o.textposition)?o.textposition[l]:o.textposition;var p=o.textfont;p&&(m.ts=a.isArrayOrTypedArray(p.size)?p.size[l]:p.size,m.tc=a.isArrayOrTypedArray(p.color)?p.color[l]:p.color,m.tf=Array.isArray(p.family)?p.family[l]:p.family,m.tw=Array.isArray(p.weight)?p.weight[l]:p.weight,m.ty=Array.isArray(p.style)?p.style[l]:p.style,m.tv=Array.isArray(p.variant)?p.variant[l]:p.variant);var I=o.marker;I&&(m.ms=a.isArrayOrTypedArray(I.size)?I.size[l]:I.size,m.mo=a.isArrayOrTypedArray(I.opacity)?I.opacity[l]:I.opacity,m.mx=a.isArrayOrTypedArray(I.symbol)?I.symbol[l]:I.symbol,m.ma=a.isArrayOrTypedArray(I.angle)?I.angle[l]:I.angle,m.mc=a.isArrayOrTypedArray(I.color)?I.color[l]:I.color);var y=I&&I.line;y&&(m.mlc=Array.isArray(y.color)?y.color[l]:y.color,m.mlw=a.isArrayOrTypedArray(y.width)?y.width[l]:y.width);var f=I&&I.gradient;f&&"none"!==f.type&&(m.mgt=Array.isArray(f.type)?f.type[l]:f.type,m.mgc=Array.isArray(f.color)?f.color[l]:f.color);var g=c.c2p(m.x,!0),_=u.c2p(m.y,!0),h=m.mrc||1,v=o.hoverlabel;v&&(m.hbg=Array.isArray(v.bgcolor)?v.bgcolor[l]:v.bgcolor,m.hbc=Array.isArray(v.bordercolor)?v.bordercolor[l]:v.bordercolor,m.hts=a.isArrayOrTypedArray(v.font.size)?v.font.size[l]:v.font.size,m.htc=Array.isArray(v.font.color)?v.font.color[l]:v.font.color,m.htf=Array.isArray(v.font.family)?v.font.family[l]:v.font.family,m.hnl=a.isArrayOrTypedArray(v.namelength)?v.namelength[l]:v.namelength);var x=o.hoverinfo;x&&(m.hi=Array.isArray(x)?x[l]:x);var P=o.hovertemplate;P&&(m.ht=Array.isArray(P)?P[l]:P);var G={};G[r.index]=m;var C=o._origX,S=o._origY,A=a.extendFlat({},r,{color:t(o,m),x0:g-h,x1:g+h,xLabelVal:C?C[l]:m.x,y0:_-h,y1:_+h,yLabelVal:S?S[l]:m.y,cd:G,distance:d,spikeDistance:s,hovertemplate:m.ht});return m.htx?A.text=m.htx:m.tx?A.text=m.tx:o.text&&(A.text=o.text),a.fillText(m,o,A),i.getComponentMethod("errorbars","hoverInfo")(m,o,A),A}r.exports={hoverPoints:function(r,e,n,i){var a,t,c,u,d,s,l,m,p,I,y=r.cd,f=y[0].t,g=y[0].trace,_=r.xa,h=r.ya,v=f.x,x=f.y,P=_.c2p(e),G=h.c2p(n),C=r.distance;if(f.tree){var S=_.p2c(P-C),A=_.p2c(P+C),b=h.p2c(G-C),M=h.p2c(G+C);a="x"===i?f.tree.range(Math.min(S,A),Math.min(h._rl[0],h._rl[1]),Math.max(S,A),Math.max(h._rl[0],h._rl[1])):f.tree.range(Math.min(S,A),Math.min(b,M),Math.max(S,A),Math.max(b,M))}else a=f.ids;var B=C;if("x"===i){var k=!!g.xperiodalignment,F=!!g.yperiodalignment;for(s=0;s=Math.min(z,w)&&P<=Math.max(z,w)?0:1/0}if(l=Math.min(R,E)&&G<=Math.max(R,E)?0:1/0}I=Math.sqrt(l*l+m*m),c=a[s]}}}else for(s=a.length-1;s>-1;s--)u=v[t=a[s]],d=x[t],l=_.c2p(u)-P,m=h.c2p(d)-G,(p=Math.sqrt(l*l+m*m))_.glText.length){var G=x-_.glText.length;for(y=0;yn&&(isNaN(e[i])||isNaN(e[i+1]));)i-=2;r.positions=e.slice(n,i+2)}return r})),_.line2d.update(_.lineOptions)),_.error2d){var S=(_.errorXOptions||[]).concat(_.errorYOptions||[]);_.error2d.update(S)}_.scatter2d&&_.scatter2d.update(_.markerOptions),_.fillOrder=c.repeat(null,x),_.fill2d&&(_.fillOptions=_.fillOptions.map((function(r,e){var i=n[e];if(r&&i&&i[0]&&i[0].trace){var a,t,o=i[0],c=o.trace,u=o.t,d=_.lineOptions[e],s=[];c._ownfill&&s.push(e),c._nexttrace&&s.push(e+1),s.length&&(_.fillOrder[e]=s);var l,m,p=[],I=d&&d.positions||u.positions;if("tozeroy"===c.fill){for(l=0;ll&&isNaN(I[m+1]);)m-=2;0!==I[l+1]&&(p=[I[l],0]),p=p.concat(I.slice(l,m+2)),0!==I[m+1]&&(p=p.concat([I[m],0]))}else if("tozerox"===c.fill){for(l=0;ll&&isNaN(I[m]);)m-=2;0!==I[l]&&(p=[0,I[l+1]]),p=p.concat(I.slice(l,m+2)),0!==I[m]&&(p=p.concat([0,I[m+1]]))}else if("toself"===c.fill||"tonext"===c.fill){for(p=[],a=0,r.splitNull=!0,t=0;t-1;for(y=0;y850?" Black":a>750?" Extra Bold":a>650?" Bold":a>550?" Semi Bold":a>450?" Medium":a>350?" Regular":a>250?" Light":a>150?" Extra Light":" Thin"):"Open Sans"===t.slice(0,2).join(" ")?(c="Open Sans",c+=a>750?" Extrabold":a>650?" Bold":a>550?" Semibold":a>350?" Regular":" Light"):"Klokantech Noto Sans"===t.slice(0,3).join(" ")&&(c="Klokantech Noto Sans","CJK"===t[3]&&(c+=" CJK"),c+=a>500?" Bold":" Regular")),o&&(c+=" Italic"),"Open Sans Regular Italic"===c?c="Open Sans Italic":"Open Sans Regular Bold"===c?c="Open Sans Bold":"Open Sans Regular Bold Italic"===c?c="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===c&&(c="Klokantech Noto Sans Italic"),l(c)||(c=n),c.split(", ")}r.exports=function(r,e){var n,t=e[0].trace,l=!0===t.visible&&0!==t._length,P="none"!==t.fill,G=s.hasLines(t),C=s.hasMarkers(t),S=s.hasText(t),A=C&&"circle"===t.marker.symbol,b=C&&"circle"!==t.marker.symbol,M=t.cluster&&t.cluster.enabled,B=f("fill"),k=f("line"),F=f("circle"),z=f("symbol"),w={fill:B,line:k,circle:F,symbol:z};if(!l)return w;if((P||G)&&(n=o.calcTraceToLineCoords(e)),P&&(B.geojson=o.makePolygon(n),B.layout.visibility="visible",a.extendFlat(B.paint,{"fill-color":t.fillcolor})),G&&(k.geojson=o.makeLine(n),k.layout.visibility="visible",a.extendFlat(k.paint,{"line-width":t.line.width,"line-color":t.line.color,"line-opacity":t.opacity})),A){var R=function(r){var e,n,t,o,s=r[0].trace,l=s.marker,m=s.selectedpoints,p=a.isArrayOrTypedArray(l.color),I=a.isArrayOrTypedArray(l.size),y=a.isArrayOrTypedArray(l.opacity);function f(r){return s.opacity*r}function g(r){return r/2}p&&(n=c.hasColorscale(s,"marker")?c.makeColorScaleFuncFromTrace(l):a.identity),I&&(t=d(s)),y&&(o=function(r){return f(i(r)?+a.constrain(r,0,1):0)});var _,v=[];for(e=0;e")}function s(r){return r+"\xb0"}}r.exports={hoverPoints:function(r,e,n){var o=r.cd,s=o[0].trace,l=r.xa,m=r.ya,p=r.subplot,I=[],y=u+s.uid+"-circle",f=s.cluster&&s.cluster.enabled;if(f){var g=p.map.queryRenderedFeatures(null,{layers:[y]});I=g.map((function(r){return r.id}))}var _=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),h=e-_;if(i.getClosest(o,(function(r){var e=r.lonlat;if(e[0]===c)return 1/0;if(f&&-1===I.indexOf(r.i+1))return 1/0;var i=a.modHalf(e[0],360),t=e[1],o=p.project([i,t]),u=o.x-l.c2p([h,t]),d=o.y-m.c2p([i,n]),s=Math.max(3,r.mrc||0);return Math.max(Math.sqrt(u*u+d*d)-s,1-3/s)}),r),!1!==r.index){var v=o[r.index],x=v.lonlat,P=[a.modHalf(x[0],360)+_,x[1]],G=l.c2p(P),C=m.c2p(P),S=v.mrc||1;r.x0=G-S,r.x1=G+S,r.y0=C-S,r.y1=C+S;var A={};A[s.subplot]={_subplot:p};var b=s._module.formatLabels(v,s,A);return r.lonLabel=b.lonLabel,r.latLabel=b.latLabel,r.color=t(s,v),r.extraText=d(s,v,o[0].t.labels),r.hovertemplate=s.hovertemplate,[r]}},getExtraText:d}},11572:function(r,e,n){"use strict";r.exports={attributes:n(31512),supplyDefaults:n(15752),colorbar:n(5528),formatLabels:n(11960),calc:n(25212),plot:n(9660),hoverPoints:n(63312).hoverPoints,eventData:n(37920),selectPoints:n(404),styleOnSelect:function(r,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:n(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(r,e,n){"use strict";var i=n(3400),a=n(59392),t=n(47552).traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function c(r,e,n,i){this.type="scattermapbox",this.subplot=r,this.uid=e,this.clusterEnabled=n,this.isHidden=i,this.sourceIds={fill:"source-"+e+"-fill",line:"source-"+e+"-line",circle:"source-"+e+"-circle",symbol:"source-"+e+"-symbol",cluster:"source-"+e+"-circle",clusterCount:"source-"+e+"-circle"},this.layerIds={fill:t+e+"-fill",line:t+e+"-line",circle:t+e+"-circle",symbol:t+e+"-symbol",cluster:t+e+"-cluster",clusterCount:t+e+"-cluster-count"},this.below=null}var u=c.prototype;u.addSource=function(r,e,n){var a={type:"geojson",data:e.geojson};n&&n.enabled&&i.extendFlat(a,{cluster:!0,clusterMaxZoom:n.maxzoom});var t=this.subplot.map.getSource(this.sourceIds[r]);t?t.setData(e.geojson):this.subplot.map.addSource(this.sourceIds[r],a)},u.setSourceData=function(r,e){this.subplot.map.getSource(this.sourceIds[r]).setData(e.geojson)},u.addLayer=function(r,e,n){var i={type:e.type,id:this.layerIds[r],source:this.sourceIds[r],layout:e.layout,paint:e.paint};e.filter&&(i.filter=e.filter);for(var a,t=this.layerIds[r],o=this.subplot.getMapLayers(),c=0;c=0;n--){var a=e[n];i.removeLayer(s.layerIds[a])}r||i.removeSource(s.sourceIds.circle)}(r):function(r){for(var e=o.nonCluster,n=e.length-1;n>=0;n--){var a=e[n];i.removeLayer(s.layerIds[a]),r||i.removeSource(s.sourceIds[a])}}(r)}function m(r){u?function(r){r||s.addSource("circle",t.circle,e.cluster);for(var n=o.cluster,i=0;i=0;n--){var i=e[n];r.removeLayer(this.layerIds[i]),r.removeSource(this.sourceIds[i])}},r.exports=function(r,e){var n,i,t,u=e[0].trace,d=u.cluster&&u.cluster.enabled,s=!0!==u.visible,l=new c(r,u.uid,d,s),m=a(r.gd,e),p=l.below=r.belowLookup["trace-"+u.uid];if(d)for(l.addSource("circle",m.circle,u.cluster),n=0;n")}}r.exports={hoverPoints:function(r,e,n,t){var o=i(r,e,n,t);if(o&&!1!==o[0].index){var c=o[0];if(void 0===c.index)return o;var u=r.subplot,d=c.cd[c.index],s=c.trace;if(u.isPtInside(d))return c.xLabelVal=void 0,c.yLabelVal=void 0,a(d,s,u,c),c.hovertemplate=s.hovertemplate,o}},makeHoverPointText:a}},76924:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:n(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:n(8319),supplyDefaults:n(85968).supplyDefaults,colorbar:n(5528),formatLabels:n(22852),calc:n(58320),plot:n(43456),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(8504).hoverPoints,selectPoints:n(91560),meta:{}}},43456:function(r,e,n){"use strict";var i=n(96504),a=n(39032).BADNUM;r.exports=function(r,e,n){for(var t=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,c=e.yaxis,u={xaxis:o,yaxis:c,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},d=e.radialAxis,s=e.angularAxis,l=0;l=d&&(_.marker.cluster=I.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=x),_.line&&x.length>1&&u.extendFlat(_.line,c.linePositions(r,p,x)),_.text&&(u.extendFlat(_.text,{positions:x},c.textPosition(r,p,_.text,_.marker)),u.extendFlat(_.textSel,{positions:x},c.textPosition(r,p,_.text,_.markerSel)),u.extendFlat(_.textUnsel,{positions:x},c.textPosition(r,p,_.text,_.markerUnsel))),_.fill&&!m.fill2d&&(m.fill2d=!0),_.marker&&!m.scatter2d&&(m.scatter2d=!0),_.line&&!m.line2d&&(m.line2d=!0),_.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(_.line),m.fillOptions.push(_.fill),m.markerOptions.push(_.marker),m.markerSelectedOptions.push(_.markerSel),m.markerUnselectedOptions.push(_.markerUnsel),m.textOptions.push(_.text),m.textSelectedOptions.push(_.textSel),m.textUnselectedOptions.push(_.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),I.x=P,I.y=G,I.rawx=P,I.rawy=G,I.r=f,I.theta=g,I.positions=x,I._scene=m,I.index=m.count,m.count++}})),t(r,e,n)}},r.exports.reglPrecompiled={}},69496:function(r,e,n){"use strict";var i=n(21776).Ks,a=n(21776).Gw,t=n(92880).extendFlat,o=n(98304),c=n(52904),u=n(45464),d=c.line;r.exports={mode:c.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:c.text,texttemplate:a({editType:"plot"},{keys:["real","imag","text"]}),hovertext:c.hovertext,line:{color:d.color,width:d.width,dash:d.dash,backoff:d.backoff,shape:t({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:c.connectgaps,marker:c.marker,cliponaxis:t({},c.cliponaxis,{dflt:!1}),textposition:c.textposition,textfont:c.textfont,fill:t({},c.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o(),hoverinfo:t({},u.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:c.hoveron,hovertemplate:i(),selected:c.selected,unselected:c.unselected}},47507:function(r,e,n){"use strict";var i=n(38248),a=n(39032).BADNUM,t=n(90136),o=n(20148),c=n(4500),u=n(16356).calcMarkerSize;r.exports=function(r,e){for(var n=r._fullLayout,d=e.subplot,s=n[d].realaxis,l=n[d].imaginaryaxis,m=s.makeCalcdata(e,"real"),p=l.makeCalcdata(e,"imag"),I=e._length,y=new Array(I),f=0;f")}}r.exports={hoverPoints:function(r,e,n,t){var o=i(r,e,n,t);if(o&&!1!==o[0].index){var c=o[0];if(void 0===c.index)return o;var u=r.subplot,d=c.cd[c.index],s=c.trace;if(u.isPtInside(d))return c.xLabelVal=void 0,c.yLabelVal=void 0,a(d,s,u,c),c.hovertemplate=s.hovertemplate,o}},makeHoverPointText:a}},95443:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"scattersmith",basePlotModule:n(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:n(69496),supplyDefaults:n(76716),colorbar:n(5528),formatLabels:n(49504),calc:n(47507),plot:n(34927),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(25292).hoverPoints,selectPoints:n(91560),meta:{}}},34927:function(r,e,n){"use strict";var i=n(96504),a=n(39032).BADNUM,t=n(36416).smith;r.exports=function(r,e,n){for(var o=e.layers.frontplot.select("g.scatterlayer"),c=e.xaxis,u=e.yaxis,d={xaxis:c,yaxis:u,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=0;s"),o.hovertemplate=m.hovertemplate,t}function h(r,e){g.push(r._hovertitle+": "+e)}}},34864:function(r,e,n){"use strict";r.exports={attributes:n(5896),supplyDefaults:n(84256),colorbar:n(5528),formatLabels:n(90404),calc:n(34335),plot:n(88776),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(26596),selectPoints:n(91560),eventData:n(97476),moduleType:"trace",name:"scatterternary",basePlotModule:n(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(r,e,n){"use strict";var i=n(96504);r.exports=function(r,e,n){var a=e.plotContainer;a.select(".scatterlayer").selectAll("*").remove();for(var t=e.xaxis,o=e.yaxis,c={xaxis:t,yaxis:o,plot:a,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},u=e.layers.frontplot.select("g.scatterlayer"),d=0;dm?v.sizeAvg||Math.max(v.size,3):t(e,h),p=0;pt&&u||a-1,F=!0;if(o(h)||p.selectedpoints||k){var z=p._length;if(p.selectedpoints){y.selectBatch=p.selectedpoints;var w=p.selectedpoints,R={};for(u=0;u1&&(s=y[_-1],m=f[_-1],I=g[_-1]),e=0;e<_;e++)h=Math.max(h,y[e]),v=Math.min(v,y[e]),x=Math.max(x,f[e]),P=Math.min(P,f[e]),G=Math.max(G,g[e]),C=Math.min(C,g[e]),t||y[e]===d||(t=!0,S+="x"),c||f[e]===l||(c=!0,S+="y"),u||g[e]===p||(u=!0,S+="z");t||(S+="x"),c||(S+="y"),u||(S+="z");var A=o(r._x),b=o(r._y),M=o(r._z);S=(S=(S=S.replace("x",(d>s?"-":"+")+"x")).replace("y",(l>m?"-":"+")+"y")).replace("z",(p>I?"-":"+")+"z");var B=function(){_=0,A=[],b=[],M=[]};(!_||_2?r.slice(1,e-1):2===e?[(r[0]+r[1])/2]:r}function p(r){var e=r.length;return 1===e?[.5,.5]:[r[1]-r[0],r[e-1]-r[e-2]]}function I(r,e){var n=r.fullSceneLayout,a=r.dataScale,s=e._len,l={};function I(r,e){var i=n[e],o=a[d[e]];return t.simpleMap(r,(function(r){return i.d2l(r)*o}))}if(l.vectors=u(I(e._u,"xaxis"),I(e._v,"yaxis"),I(e._w,"zaxis"),s),!s)return{positions:[],cells:[]};var y=I(e._Xs,"xaxis"),f=I(e._Ys,"yaxis"),g=I(e._Zs,"zaxis");if(l.meshgrid=[y,f,g],l.gridFill=e._gridFill,e._slen)l.startingPositions=u(I(e._startsX,"xaxis"),I(e._startsY,"yaxis"),I(e._startsZ,"zaxis"));else{for(var _=f[0],h=m(y),v=m(g),x=new Array(h.length*v.length),P=0,G=0;G=0};_?(n=Math.min(g.length,v.length),u=function(r){return A(g[r])&&b(r)},l=function(r){return String(g[r])}):(n=Math.min(h.length,v.length),u=function(r){return A(h[r])&&b(r)},l=function(r){return String(h[r])}),P&&(n=Math.min(n,x.length));for(var M=0;M1){for(var z=t.randstr(),w=0;w=0){e.i=c.i;var s=n.marker;s.pattern&&s.colors&&s.pattern.shape||(s.color=d,e.color=d),i.pointStyle(r,n,t,e)}else a.fill(r,d)}},45716:function(r,e,n){"use strict";var i=n(33428),a=n(24040),t=n(10624).appendArrayPointValue,o=n(93024),c=n(3400),u=n(95924),d=n(78176),s=n(69656).formatPieValue;function l(r,e,n){for(var i=r.data.data,a={curveNumber:e.index,pointNumber:i.i,data:e._input,fullData:e},o=0;o"),name:S||R("name")?_.name:void 0,color:C("hoverlabel.bgcolor")||h.color,borderColor:C("hoverlabel.bordercolor"),fontFamily:C("hoverlabel.font.family"),fontSize:C("hoverlabel.font.size"),fontColor:C("hoverlabel.font.color"),fontWeight:C("hoverlabel.font.weight"),fontStyle:C("hoverlabel.font.style"),fontVariant:C("hoverlabel.font.variant"),nameLength:C("hoverlabel.namelength"),textAlign:C("hoverlabel.align"),hovertemplate:S,hovertemplateLabels:F,eventData:u};f&&(T.x0=M-a.rInscribed*a.rpx1,T.x1=M+a.rInscribed*a.rpx1,T.idealAlign=a.pxmid[0]<0?"left":"right"),g&&(T.x=M,T.idealAlign=M<0?"left":"right");var D=[];o.loneHover(T,{container:t._hoverlayer.node(),outerContainer:t._paper.node(),gd:n,inOut_bbox:D}),u[0].bbox=D[0],I._hasHoverLabel=!0}if(g){var J=r.select("path.surface");m.styleOne(J,a,_,n,{hovered:!0})}I._hasHoverEvent=!0,n.emit("plotly_hover",{points:u||[l(a,_,m.eventDataKeys)],event:i.event})}})),r.on("mouseout",(function(e){var a=n._fullLayout,t=n._fullData[I.index],c=i.select(this).datum();if(I._hasHoverEvent&&(e.originalEvent=i.event,n.emit("plotly_unhover",{points:[l(c,t,m.eventDataKeys)],event:i.event}),I._hasHoverEvent=!1),I._hasHoverLabel&&(o.loneUnhover(a._hoverlayer.node()),I._hasHoverLabel=!1),g){var u=r.select("path.surface");m.styleOne(u,c,t,n,{hovered:!1})}})),r.on("click",(function(r){var e=n._fullLayout,t=n._fullData[I.index],c=f&&(d.isHierarchyRoot(r)||d.isLeaf(r)),s=d.getPtId(r),p=d.isEntry(r)?d.findEntryWithChild(y,s):d.findEntryWithLevel(y,s),g=d.getPtId(p),_={points:[l(r,t,m.eventDataKeys)],event:i.event};c||(_.nextLevel=g);var h=u.triggerHandler(n,"plotly_"+I.type+"click",_);if(!1!==h&&e.hovermode&&(n._hoverdata=[l(r,t,m.eventDataKeys)],o.click(n,i.event)),!c&&!1!==h&&!n._dragging&&!n._transitioning){a.call("_storeDirectGUIEdit",t,e._tracePreGUI[t.uid],{level:t.level});var v={data:[{level:g}],traces:[I.index]},x={frame:{redraw:!1,duration:m.transitionTime},transition:{duration:m.transitionTime,easing:m.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),a.call("animate",n,v,x)}}))}},78176:function(r,e,n){"use strict";var i=n(3400),a=n(76308),t=n(93972),o=n(69656);function c(r){return r.data.data.pid}e.findEntryWithLevel=function(r,n){var i;return n&&r.eachAfter((function(r){if(e.getPtId(r)===n)return i=r.copy()})),i||r},e.findEntryWithChild=function(r,n){var i;return r.eachAfter((function(r){for(var a=r.children||[],t=0;t0)},e.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},e.isHeader=function(r,n){return!(e.isLeaf(r)||r.depth===n._maxDepth-1)},e.getParent=function(r,n){return e.findEntryWithLevel(r,c(n))},e.listPath=function(r,n){var i=r.parent;if(!i)return[];var a=n?[i.data[n]]:[i];return e.listPath(i,n).concat(a)},e.getPath=function(r){return e.listPath(r,"label").join("/")+"/"},e.formatValue=o.formatPieValue,e.formatPercent=function(r,e){var n=i.formatPercent(r,0);return"0%"===n&&(n=o.formatPiePercent(r,e)),n}},5621:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"sunburst",basePlotModule:n(54904),categories:[],animatable:!0,attributes:n(424),layoutAttributes:n(84920),supplyDefaults:n(25244),supplyLayoutDefaults:n(28732),calc:n(3776).calc,crossTraceCalc:n(3776).crossTraceCalc,plot:n(96488).plot,style:n(85676).style,colorbar:n(5528),meta:{}}},84920:function(r){"use strict";r.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(r,e,n){"use strict";var i=n(3400),a=n(84920);r.exports=function(r,e){function n(n,t){return i.coerce(r,e,a,n,t)}n("sunburstcolorway",e.colorway),n("extendsunburstcolors")}},96488:function(r,e,n){"use strict";var i=n(33428),a=n(74148),t=n(67756).qy,o=n(43616),c=n(3400),u=n(72736),d=n(82744),s=d.recordMinTextSize,l=d.clearMinTextSize,m=n(37820),p=n(69656).getRotationAngle,I=m.computeTransform,y=m.transformInsideText,f=n(85676).styleOne,g=n(60100).resizeText,_=n(45716),h=n(27328),v=n(78176);function x(r,n,d,l){var m=r._context.staticPlot,g=r._fullLayout,x=!g.uniformtext.mode&&v.hasTransition(l),G=i.select(d).selectAll("g.slice"),C=n[0],S=C.trace,A=C.hierarchy,b=v.findEntryWithLevel(A,S.level),M=v.getMaxDepth(S),B=g._size,k=S.domain,F=B.w*(k.x[1]-k.x[0]),z=B.h*(k.y[1]-k.y[0]),w=.5*Math.min(F,z),R=C.cx=B.l+B.w*(k.x[1]+k.x[0])/2,E=C.cy=B.t+B.h*(1-k.y[0])-z/2;if(!b)return G.remove();var N=null,T={};x&&G.each((function(r){T[v.getPtId(r)]={rpx0:r.rpx0,rpx1:r.rpx1,x0:r.x0,x1:r.x1,transform:r.transform},!N&&v.isEntry(r)&&(N=r)}));var D=function(r){return a.partition().size([2*Math.PI,r.height+1])(r)}(b).descendants(),J=b.height+1,U=0,H=M;C.hasMultipleRoots&&v.isHierarchyRoot(b)&&(D=D.slice(1),J-=1,U=1,H+=1),D=D.filter((function(r){return r.y1<=H}));var L=p(S.rotation);L&&D.forEach((function(r){r.x0+=L,r.x1+=L}));var O=Math.min(J,M),K=function(r){return(r-U)/O*w},V=function(r,e){return[r*Math.cos(e),-r*Math.sin(e)]},j=function(r){return c.pathAnnulus(r.rpx0,r.rpx1,r.x0,r.x1,R,E)},W=function(r){return R+P(r)[0]*(r.transform.rCenter||0)+(r.transform.x||0)},Z=function(r){return E+P(r)[1]*(r.transform.rCenter||0)+(r.transform.y||0)};(G=G.data(D,v.getPtId)).enter().append("g").classed("slice",!0),x?G.exit().transition().each((function(){var r=i.select(this);r.select("path.surface").transition().attrTween("d",(function(r){var e=function(r){var e,n=v.getPtId(r),i=T[n],a=T[v.getPtId(b)];if(a){var o=(r.x1>a.x1?2*Math.PI:0)+L;e=r.rpx1q?2*Math.PI:0)+L;e={x0:a,x1:a}}else e={rpx0:w,rpx1:w},c.extendFlat(e,Q(r));else e={rpx0:0,rpx1:0};else e={x0:L,x1:L};return t(e,i)}(r);return function(r){return j(e(r))}})):l.attr("d",j),d.call(_,b,r,n,{eventDataKeys:h.eventDataKeys,transitionTime:h.CLICK_TRANSITION_TIME,transitionEasing:h.CLICK_TRANSITION_EASING}).call(v.setSliceCursor,r,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:r._transitioning}),l.call(f,a,S,r);var p=c.ensureSingle(d,"g","slicetext"),P=c.ensureSingle(p,"text","",(function(r){r.attr("data-notex",1)})),G=c.ensureUniformFontSize(r,v.determineTextFont(S,a,g.font));P.text(e.formatSliceLabel(a,b,S,n,g)).classed("slicetext",!0).attr("text-anchor","middle").call(o.font,G).call(u.convertToTspans,r);var A=o.bBox(P.node());a.transform=y(A,a,C),a.transform.targetX=W(a),a.transform.targetY=Z(a);var M=function(r,e){var n=r.transform;return I(n,e),n.fontSize=G.size,s(S.type,n,g),c.getTextTransform(n)};x?P.transition().attrTween("transform",(function(r){var e=function(r){var e,n=T[v.getPtId(r)],i=r.transform;if(n)e=n;else if(e={rpx1:r.rpx1,transform:{textPosAngle:i.textPosAngle,scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},N)if(r.parent)if(q){var a=r.x1>q?2*Math.PI:0;e.x0=e.x1=a}else c.extendFlat(e,Q(r));else e.x0=e.x1=L;else e.x0=e.x1=L;var o=t(e.transform.textPosAngle,r.transform.textPosAngle),u=t(e.rpx1,r.rpx1),d=t(e.x0,r.x0),l=t(e.x1,r.x1),m=t(e.transform.scale,i.scale),p=t(e.transform.rotate,i.rotate),I=0===i.rCenter?3:0===e.transform.rCenter?1/3:1,y=t(e.transform.rCenter,i.rCenter),f=function(r){return y(Math.pow(r,I))};return function(r){var e=u(r),n=d(r),a=l(r),t=f(r),c={pxmid:V(e,(n+a)/2),rpx1:e,transform:{textPosAngle:o(r),rCenter:t,x:i.x,y:i.y}};return s(S.type,i,g),{transform:{targetX:W(c),targetY:Z(c),scale:m(r),rotate:p(r),rCenter:t}}}}(r);return function(r){return M(e(r),A)}})):P.attr("transform",M(a,A))}))}function P(r){return e=r.rpx1,n=r.transform.textPosAngle,[e*Math.sin(n),-e*Math.cos(n)];var e,n}e.plot=function(r,e,n,a){var t,o,c=r._fullLayout,u=c._sunburstlayer,d=!n,s=!c.uniformtext.mode&&v.hasTransition(n);l("sunburst",c),(t=u.selectAll("g.trace.sunburst").data(e,(function(r){return r[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),t.order(),s?(a&&(o=a()),i.transition().duration(n.duration).ease(n.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){u.selectAll("g.trace").each((function(e){x(r,e,this,n)}))}))):(t.each((function(e){x(r,e,this,n)})),c.uniformtext.mode&&g(r,c._sunburstlayer.selectAll(".trace"),"sunburst")),d&&t.exit().remove()},e.formatSliceLabel=function(r,e,n,i,a){var t=n.texttemplate,o=n.textinfo;if(!t&&(!o||"none"===o))return"";var u=a.separators,d=i[0],s=r.data.data,l=d.hierarchy,m=v.isHierarchyRoot(r),p=v.getParent(l,r),I=v.getValue(r);if(!t){var y,f=o.split("+"),g=function(r){return-1!==f.indexOf(r)},_=[];if(g("label")&&s.label&&_.push(s.label),s.hasOwnProperty("v")&&g("value")&&_.push(v.formatValue(s.v,u)),!m){g("current path")&&_.push(v.getPath(r.data));var h=0;g("percent parent")&&h++,g("percent entry")&&h++,g("percent root")&&h++;var x=h>1;if(h){var P,G=function(r){y=v.formatPercent(P,u),x&&(y+=" of "+r),_.push(y)};g("percent parent")&&!m&&(P=I/v.getValue(p),G("parent")),g("percent entry")&&(P=I/v.getValue(e),G("entry")),g("percent root")&&(P=I/v.getValue(l),G("root"))}}return g("text")&&(y=c.castOption(n,s.i,"text"),c.isValidTextValue(y)&&_.push(y)),_.join("
")}var C=c.castOption(n,s.i,"texttemplate");if(!C)return"";var S={};s.label&&(S.label=s.label),s.hasOwnProperty("v")&&(S.value=s.v,S.valueLabel=v.formatValue(s.v,u)),S.currentPath=v.getPath(r.data),m||(S.percentParent=I/v.getValue(p),S.percentParentLabel=v.formatPercent(S.percentParent,u),S.parent=v.getPtLabel(p)),S.percentEntry=I/v.getValue(e),S.percentEntryLabel=v.formatPercent(S.percentEntry,u),S.entry=v.getPtLabel(e),S.percentRoot=I/v.getValue(l),S.percentRootLabel=v.formatPercent(S.percentRoot,u),S.root=v.getPtLabel(l),s.hasOwnProperty("color")&&(S.color=s.color);var A=c.castOption(n,s.i,"text");return(c.isValidTextValue(A)||""===A)&&(S.text=A),S.customdata=c.castOption(n,s.i,"customdata"),c.texttemplateString(C,S,a._d3locale,S,n._meta||{})}},85676:function(r,e,n){"use strict";var i=n(33428),a=n(76308),t=n(3400),o=n(82744).resizeText,c=n(60404);function u(r,e,n,i){var o=e.data.data,u=!e.children,d=o.i,s=t.castOption(n,d,"marker.line.color")||a.defaultLine,l=t.castOption(n,d,"marker.line.width")||0;r.call(c,e,n,i).style("stroke-width",l).call(a.stroke,s).style("opacity",u?n.leaf.opacity:null)}r.exports={style:function(r){var e=r._fullLayout._sunburstlayer.selectAll(".trace");o(r,e,"sunburst"),e.each((function(e){var n=i.select(this),a=e[0].trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each((function(e){i.select(this).call(u,e,a,r)}))}))},styleOne:u}},16716:function(r,e,n){"use strict";var i=n(76308),a=n(49084),t=n(29736).axisHoverFormat,o=n(21776).Ks,c=n(45464),u=n(92880).extendFlat,d=n(67824).overrideAll;function s(r){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:i.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:i.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var l=r.exports=d(u({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:o(),xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},a("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:s(),y:s(),z:s()},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},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:u({},a.zauto,{}),zmin:u({},a.zmin,{}),zmax:u({},a.zmax,{})},hoverinfo:u({},c.hoverinfo),showlegend:u({},c.showlegend,{dflt:!1})}),"calc","nested");l.x.editType=l.y.editType=l.z.editType="calc+clearAxisTypes",l.transforms=void 0},56576:function(r,e,n){"use strict";var i=n(47128);r.exports=function(r,e){e.surfacecolor?i(r,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):i(r,e,{vals:e.z,containerStr:"",cLetter:"c"})}},79164:function(r,e,n){"use strict";var i=n(67792).gl_surface3d,a=n(67792).ndarray,t=n(67792).ndarray_linear_interpolate.d2,o=n(70448),c=n(11240),u=n(3400).isArrayOrTypedArray,d=n(33040).parseColorScale,s=n(43080),l=n(8932).extractOpts;function m(r,e,n){this.scene=r,this.uid=n,this.surface=e,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 p=m.prototype;p.getXat=function(r,e,n,i){var a=u(this.data.x)?u(this.data.x[0])?this.data.x[e][r]:this.data.x[r]:r;return void 0===n?a:i.d2l(a,0,n)},p.getYat=function(r,e,n,i){var a=u(this.data.y)?u(this.data.y[0])?this.data.y[e][r]:this.data.y[e]:e;return void 0===n?a:i.d2l(a,0,n)},p.getZat=function(r,e,n,i){var a=this.data.z[e][r];return null===a&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[e][r]),void 0===n?a:i.d2l(a,0,n)},p.handlePick=function(r){if(r.object===this.surface){var e=(r.data.index[0]-1)/this.dataScaleX-1,n=(r.data.index[1]-1)/this.dataScaleY-1,i=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(n),this.data._ylength-1),0);r.index=[i,a],r.traceCoordinate=[this.getXat(i,a),this.getYat(i,a),this.getZat(i,a)],r.dataCoordinate=[this.getXat(i,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(i,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(i,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var t=0;t<3;t++){var o=r.dataCoordinate[t];null!==o&&void 0!==o&&(r.dataCoordinate[t]*=this.scene.dataScale[t])}var c=this.data.hovertext||this.data.text;return u(c)&&c[a]&&void 0!==c[a][i]?r.textLabel=c[a][i]:r.textLabel=c||"",r.data.dataCoordinate=r.dataCoordinate.slice(),this.surface.highlight(r.data),this.scene.glplot.spikes.position=r.dataCoordinate,!0}};var I=[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 y(r,e){if(r0){n=I[i];break}return n}function _(r,e){if(!(r<1||e<1)){for(var n=f(r),i=f(e),a=1,t=0;tx;)n--,n/=g(n),++n1?i:1},p.refineCoords=function(r){for(var e=this.dataScaleX,n=this.dataScaleY,i=r[0].shape[0],t=r[0].shape[1],o=0|Math.floor(r[0].shape[0]*e+1),c=0|Math.floor(r[0].shape[1]*n+1),u=1+i+1,d=1+t+1,s=a(new Float32Array(u*d),[u,d]),l=[1/e,0,0,0,1/n,0,0,0,1],m=0;m0&&null!==this.contourStart[r]&&null!==this.contourEnd[r]&&this.contourEnd[r]>this.contourStart[r]))for(a[r]=!0,e=this.contourStart[r];et&&(this.minValues[e]=t),this.maxValues[e]",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"}}},55992:function(r,e,n){"use strict";var i=n(23536),a=n(92880).extendFlat,t=n(38248),o=n(38116).isTypedArray,c=n(38116).isArrayOrTypedArray;function u(r){if(c(r)){for(var e=0,n=0;n=e||d===r.length-1)&&(i[a]=o,o.key=u++,o.firstRowIndex=c,o.lastRowIndex=d,o={firstRowIndex:null,lastRowIndex:null,rows:[]},a+=t,c=d+1,t=0);return i}r.exports=function(r,e){var n=s(e.cells.values),o=function(r){return r.slice(e.header.values.length,r.length)},y=s(e.header.values);y.length&&!y[0].length&&(y[0]=[""],y=s(y));var f=y.concat(o(n).map((function(){return l((y[0]||[""]).length)}))),g=e.domain,_=Math.floor(r._fullLayout._size.w*(g.x[1]-g.x[0])),h=Math.floor(r._fullLayout._size.h*(g.y[1]-g.y[0])),v=e.header.values.length?f[0].map((function(){return e.header.height})):[i.emptyHeaderHeight],x=n.length?n[0].map((function(){return e.cells.height})):[],P=v.reduce(d,0),G=I(x,h-P+i.uplift),C=p(I(v,P),[]),S=p(G,C),A={},b=e._fullInput.columnorder;c(b)&&(b=Array.from(b)),b=b.concat(o(n.map((function(r,e){return e}))));var M=f.map((function(r,n){var i=c(e.columnwidth)?e.columnwidth[Math.min(n,e.columnwidth.length-1)]:e.columnwidth;return t(i)?Number(i):1})),B=M.reduce(d,0);M=M.map((function(r){return r/B*_}));var k=Math.max(u(e.header.line.width),u(e.cells.line.width)),F={key:e.uid+r._context.staticPlot,translateX:g.x[0]*r._fullLayout._size.w,translateY:r._fullLayout._size.h*(1-g.y[1]),size:r._fullLayout._size,width:_,maxLineWidth:k,height:h,columnOrder:b,groupHeight:h,rowBlocks:S,headerRowBlocks:C,scrollY:0,cells:a({},e.cells,{values:n}),headerCells:a({},e.header,{values:f}),gdColumns:f.map((function(r){return r[0]})),gdColumnsOriginalOrder:f.map((function(r){return r[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:f.map((function(r,e){var n=A[r];return A[r]=(n||0)+1,{key:r+"__"+A[r],label:r,specIndex:e,xIndex:b[e],xScale:m,x:void 0,calcdata:void 0,columnWidth:M[e]}}))};return F.columns.forEach((function(r){r.calcdata=F,r.x=m(r)})),F}},53056:function(r,e,n){"use strict";var i=n(92880).extendFlat;e.splitToPanels=function(r){var e=[0,0],n=i({},r,{key:"header",type:"header",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:r.calcdata.headerCells.values[r.specIndex],rowBlocks:r.calcdata.headerRowBlocks,calcdata:i({},r.calcdata,{cells:r.calcdata.headerCells})});return[i({},r,{key:"cells1",type:"cells",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:r.calcdata.cells.values[r.specIndex],rowBlocks:r.calcdata.rowBlocks}),i({},r,{key:"cells2",type:"cells",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:r.calcdata.cells.values[r.specIndex],rowBlocks:r.calcdata.rowBlocks}),n]},e.splitToCells=function(r){var e=function(r){var e=r.rowBlocks[r.page],n=e?e.rows[0].rowIndex:0,i=e?n+e.rows.length:0;return[n,i]}(r);return(r.values||[]).slice(e[0],e[1]).map((function(n,i){return{keyWithinBlock:i+("string"===typeof n&&n.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:e[0]+i,column:r,calcdata:r.calcdata,page:r.page,rowBlocks:r.rowBlocks,value:n}}))}},53212:function(r,e,n){"use strict";var i=n(3400),a=n(60520),t=n(86968).Q;r.exports=function(r,e,n,o){function c(n,t){return i.coerce(r,e,a,n,t)}t(e,o,c),c("columnwidth"),c("header.values"),c("header.format"),c("header.align"),c("header.prefix"),c("header.suffix"),c("header.height"),c("header.line.width"),c("header.line.color"),c("header.fill.color"),i.coerceFont(c,"header.font",o.font),function(r,e){for(var n=r.columnorder||[],i=r.header.values.length,a=n.slice(0,i),t=a.slice().sort((function(r,e){return r-e})),o=a.map((function(r){return t.indexOf(r)})),c=o.length;c/i),u=!t||c;r.mayHaveMarkup=t&&a.match(/[<&>]/);var d,s="string"===typeof(d=a)&&d.match(i.latexCheck);r.latex=s;var l,m,p=s?"":C(r.calcdata.cells.prefix,e,n)||"",I=s?"":C(r.calcdata.cells.suffix,e,n)||"",y=s?null:C(r.calcdata.cells.format,e,n)||null,f=p+(y?o(y)(r.value):r.value)+I;if(r.wrappingNeeded=!r.wrapped&&!u&&!s&&(l=G(f)),r.cellHeightMayIncrease=c||s||r.mayHaveMarkup||(void 0===l?G(f):l),r.needsConvertToTspans=r.mayHaveMarkup||r.wrappingNeeded||r.latex,r.wrappingNeeded){var g=(" "===i.wrapSplitCharacter?f.replace(/a&&i.push(t),a+=u}return i}(a,u,c);1===d.length&&(d[0]===a.length-1?d.unshift(d[0]-1):d.push(d[0]+1)),d[0]%2&&d.reverse(),e.each((function(r,e){r.page=d[e],r.scrollY=u})),e.attr("transform",(function(r){var e=N(r.rowBlocks,r.page)-r.scrollY;return l(0,e)})),r&&(F(r,n,e,d,i.prevPages,i,0),F(r,n,e,d,i.prevPages,i,1),v(n,r))}}function k(r,e,n,t){return function(o){var c=o.calcdata?o.calcdata:o,u=e.filter((function(r){return c.key===r.key})),d=n||c.scrollbarState.dragMultiplier,s=c.scrollY;c.scrollY=void 0===t?c.scrollY+d*a.event.dy:t;var l=u.selectAll("."+i.cn.yColumn).selectAll("."+i.cn.columnBlock).filter(A);return B(r,l,u),c.scrollY===s}}function F(r,e,n,i,a,t,o){i[o]!==a[o]&&(clearTimeout(t.currentRepaint[o]),t.currentRepaint[o]=setTimeout((function(){var t=n.filter((function(r,e){return e===o&&i[e]!==a[e]}));x(r,e,t,n),a[o]=i[o]})))}function z(r,e,n,t){return function(){var o=a.select(e.parentNode);o.each((function(r){var e=r.fragments;o.selectAll("tspan.line").each((function(r,n){e[n].width=this.getComputedTextLength()}));var n,a,t=e[e.length-1].width,c=e.slice(0,-1),u=[],d=0,s=r.column.columnWidth-2*i.cellPad;for(r.value="";c.length;)d+(a=(n=c.shift()).width+t)>s&&(r.value+=u.join(i.wrapSpacer)+i.lineBreaker,u=[],d=0),u.push(n.text),d+=a;d&&(r.value+=u.join(i.wrapSpacer)),r.wrapped=!0})),o.selectAll("tspan.line").remove(),P(o.select("."+i.cn.cellText),n,r,t),a.select(e.parentNode.parentNode).call(E)}}function w(r,e,n,t,o){return function(){if(!o.settledY){var c=a.select(e.parentNode),u=J(o),d=o.key-u.firstRowIndex,s=u.rows[d].rowHeight,m=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*i.cellPad:s,p=Math.max(m,s);p-u.rows[d].rowHeight&&(u.rows[d].rowHeight=p,r.selectAll("."+i.cn.columnCell).call(E),B(null,r.filter(A),0),v(n,t,!0)),c.attr("transform",(function(){var r=this,e=r.parentNode.getBoundingClientRect(),n=a.select(r.parentNode).select("."+i.cn.cellRect).node().getBoundingClientRect(),t=r.transform.baseVal.consolidate(),c=n.top-e.top+(t?t.matrix.f:i.cellPad);return l(R(o,a.select(r.parentNode).select("."+i.cn.cellTextHolder).node().getBoundingClientRect().width),c)})),o.settledY=!0}}}function R(r,e){switch(r.align){case"left":default:return i.cellPad;case"right":return r.column.columnWidth-(e||0)-i.cellPad;case"center":return(r.column.columnWidth-(e||0))/2}}function E(r){r.attr("transform",(function(r){var e=r.rowBlocks[0].auxiliaryBlocks.reduce((function(r,e){return r+T(e,1/0)}),0),n=T(J(r),r.key);return l(0,n+e)})).selectAll("."+i.cn.cellRect).attr("height",(function(r){return(e=J(r),n=r.key,e.rows[n-e.firstRowIndex]).rowHeight;var e,n}))}function N(r,e){for(var n=0,i=e-1;i>=0;i--)n+=D(r[i]);return n}function T(r,e){for(var n=0,i=0;i","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:s({},c.textfont,{}),editType:"calc"},text:c.text,textinfo:u.textinfo,texttemplate:a({editType:"plot"},{keys:d.eventDataKeys.concat(["label","value"])}),hovertext:c.hovertext,hoverinfo:u.hoverinfo,hovertemplate:i({},{keys:d.eventDataKeys}),textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:s({},c.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"},sort:c.sort,root:u.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}},79516:function(r,e,n){"use strict";var i=n(7316);e.name="treemap",e.plot=function(r,n,a,t){i.plotBasePlot(e.name,r,n,a,t)},e.clean=function(r,n,a,t){i.cleanBasePlot(e.name,r,n,a,t)}},97840:function(r,e,n){"use strict";var i=n(3776);e.r=function(r,e){return i.calc(r,e)},e.q=function(r){return i._runCrossTraceCalc("treemap",r)}},32984:function(r){"use strict";r.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(r,e,n){"use strict";var i=n(3400),a=n(40516),t=n(76308),o=n(86968).Q,c=n(31508).handleText,u=n(78048).TEXTPAD,d=n(74174).handleMarkerDefaults,s=n(8932),l=s.hasColorscale,m=s.handleDefaults;r.exports=function(r,e,n,s){function p(n,t){return i.coerce(r,e,a,n,t)}var I=p("labels"),y=p("parents");if(I&&I.length&&y&&y.length){var f=p("values");f&&f.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"),e.texttemplate||p("textinfo",i.isArrayOrTypedArray(g)?"text+label":"label"),p("hovertext"),p("hovertemplate");var _=p("pathbar.visible");c(r,e,s,p,"auto",{hasPathbar:_,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var h=-1!==e.textposition.indexOf("bottom");d(r,e,s,p),(e._hasColorscale=l(r,"marker","colors")||(r.marker||{}).coloraxis)?m(r,e,s,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(e.marker.colors||[]).length);var v=2*e.textfont.size;p("marker.pad.t",h?v/4:v),p("marker.pad.l",v/4),p("marker.pad.r",v/4),p("marker.pad.b",h?v:v/4),p("marker.cornerradius"),e._hovered={marker:{line:{width:2,color:t.contrast(s.paper_bgcolor)}}},_&&(p("pathbar.thickness",e.pathbar.textfont.size+2*u),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),o(e,s,p),e._length=null}else e.visible=!1}},95808:function(r,e,n){"use strict";var i=n(33428),a=n(78176),t=n(82744).clearMinTextSize,o=n(60100).resizeText,c=n(52960);r.exports=function(r,e,n,u,d){var s,l,m=d.type,p=d.drawDescendants,I=r._fullLayout,y=I["_"+m+"layer"],f=!n;t(m,I),(s=y.selectAll("g.trace."+m).data(e,(function(r){return r[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(m,!0),s.order(),!I.uniformtext.mode&&a.hasTransition(n)?(u&&(l=u()),i.transition().duration(n.duration).ease(n.easing).each("end",(function(){l&&l()})).each("interrupt",(function(){l&&l()})).each((function(){y.selectAll("g.trace").each((function(e){c(r,e,this,n,p)}))}))):(s.each((function(e){c(r,e,this,n,p)})),I.uniformtext.mode&&o(r,y.selectAll(".trace"),m)),f&&s.exit().remove()}},27336:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(43616),o=n(72736),c=n(13832),u=n(66192).styleOne,d=n(32984),s=n(78176),l=n(45716),m=!0;r.exports=function(r,e,n,p,I){var y=I.barDifY,f=I.width,g=I.height,_=I.viewX,h=I.viewY,v=I.pathSlice,x=I.toMoveInsideSlice,P=I.strTransform,G=I.hasTransition,C=I.handleSlicesExit,S=I.makeUpdateSliceInterpolator,A=I.makeUpdateTextInterpolator,b={},M=r._context.staticPlot,B=r._fullLayout,k=e[0],F=k.trace,z=k.hierarchy,w=f/F._entryDepth,R=s.listPath(n.data,"id"),E=c(z.copy(),[f,g],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(E=E.filter((function(r){var e=R.indexOf(r.data.id);return-1!==e&&(r.x0=w*e,r.x1=w*(e+1),r.y0=y,r.y1=y+g,r.onPathbar=!0,!0)}))).reverse(),(p=p.data(E,s.getPtId)).enter().append("g").classed("pathbar",!0),C(p,m,b,[f,g],v),p.order();var N=p;G&&(N=N.transition().each("end",(function(){var e=i.select(this);s.setSliceCursor(e,r,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(c){c._x0=_(c.x0),c._x1=_(c.x1),c._y0=h(c.y0),c._y1=h(c.y1),c._hoverX=_(c.x1-Math.min(f,g)/2),c._hoverY=h(c.y1-g/2);var p=i.select(this),I=a.ensureSingle(p,"path","surface",(function(r){r.style("pointer-events",M?"none":"all")}));G?I.transition().attrTween("d",(function(r){var e=S(r,m,b,[f,g]);return function(r){return v(e(r))}})):I.attr("d",v),p.call(l,n,r,e,{styleOne:u,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(s.setSliceCursor,r,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:r._transitioning}),I.call(u,c,F,r,{hovered:!1}),c._text=(s.getPtLabel(c)||"").split("
").join(" ")||"";var y=a.ensureSingle(p,"g","slicetext"),C=a.ensureSingle(y,"text","",(function(r){r.attr("data-notex",1)})),k=a.ensureUniformFontSize(r,s.determineTextFont(F,c,B.font,{onPathbar:!0}));C.text(c._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(t.font,k).call(o.convertToTspans,r),c.textBB=t.bBox(C.node()),c.transform=x(c,{fontSize:k.size,onPathbar:!0}),c.transform.fontSize=k.size,G?C.transition().attrTween("transform",(function(r){var e=A(r,m,b,[f,g]);return function(r){return P(e(r))}})):C.attr("transform",P(c))}))}},76477:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(43616),o=n(72736),c=n(13832),u=n(66192).styleOne,d=n(32984),s=n(78176),l=n(45716),m=n(96488).formatSliceLabel,p=!1;r.exports=function(r,e,n,I,y){var f=y.width,g=y.height,_=y.viewX,h=y.viewY,v=y.pathSlice,x=y.toMoveInsideSlice,P=y.strTransform,G=y.hasTransition,C=y.handleSlicesExit,S=y.makeUpdateSliceInterpolator,A=y.makeUpdateTextInterpolator,b=y.prevEntry,M=r._context.staticPlot,B=r._fullLayout,k=e[0].trace,F=-1!==k.textposition.indexOf("left"),z=-1!==k.textposition.indexOf("right"),w=-1!==k.textposition.indexOf("bottom"),R=!w&&!k.marker.pad.t||w&&!k.marker.pad.b,E=c(n,[f,g],{packing:k.tiling.packing,squarifyratio:k.tiling.squarifyratio,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1,pad:{inner:k.tiling.pad,top:k.marker.pad.t,left:k.marker.pad.l,right:k.marker.pad.r,bottom:k.marker.pad.b}}).descendants(),N=1/0,T=-1/0;E.forEach((function(r){var e=r.depth;e>=k._maxDepth?(r.x0=r.x1=(r.x0+r.x1)/2,r.y0=r.y1=(r.y0+r.y1)/2):(N=Math.min(N,e),T=Math.max(T,e))})),I=I.data(E,s.getPtId),k._maxVisibleLayers=isFinite(T)?T-N+1:0,I.enter().append("g").classed("slice",!0),C(I,p,{},[f,g],v),I.order();var D=null;if(G&&b){var J=s.getPtId(b);I.each((function(r){null===D&&s.getPtId(r)===J&&(D={x0:r.x0,x1:r.x1,y0:r.y0,y1:r.y1})}))}var U=function(){return D||{x0:0,x1:f,y0:0,y1:g}},H=I;return G&&(H=H.transition().each("end",(function(){var e=i.select(this);s.setSliceCursor(e,r,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),H.each((function(c){var I=s.isHeader(c,k);c._x0=_(c.x0),c._x1=_(c.x1),c._y0=h(c.y0),c._y1=h(c.y1),c._hoverX=_(c.x1-k.marker.pad.r),c._hoverY=h(w?c.y1-k.marker.pad.b/2:c.y0+k.marker.pad.t/2);var y=i.select(this),C=a.ensureSingle(y,"path","surface",(function(r){r.style("pointer-events",M?"none":"all")}));G?C.transition().attrTween("d",(function(r){var e=S(r,p,U(),[f,g]);return function(r){return v(e(r))}})):C.attr("d",v),y.call(l,n,r,e,{styleOne:u,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(s.setSliceCursor,r,{isTransitioning:r._transitioning}),C.call(u,c,k,r,{hovered:!1}),c.x0===c.x1||c.y0===c.y1?c._text="":c._text=I?R?"":s.getPtLabel(c)||"":m(c,n,k,e,B)||"";var b=a.ensureSingle(y,"g","slicetext"),E=a.ensureSingle(b,"text","",(function(r){r.attr("data-notex",1)})),N=a.ensureUniformFontSize(r,s.determineTextFont(k,c,B.font)),T=c._text||" ",D=I&&-1===T.indexOf("
");E.text(T).classed("slicetext",!0).attr("text-anchor",z?"end":F||D?"start":"middle").call(t.font,N).call(o.convertToTspans,r),c.textBB=t.bBox(E.node()),c.transform=x(c,{fontSize:N.size,isHeader:I}),c.transform.fontSize=N.size,G?E.transition().attrTween("transform",(function(r){var e=A(r,p,U(),[f,g]);return function(r){return P(e(r))}})):E.attr("transform",P(c))})),D}},83024:function(r){"use strict";r.exports=function r(e,n,i){var a;i.swapXY&&(a=e.x0,e.x0=e.y0,e.y0=a,a=e.x1,e.x1=e.y1,e.y1=a),i.flipX&&(a=e.x0,e.x0=n[0]-e.x1,e.x1=n[0]-a),i.flipY&&(a=e.y0,e.y0=n[1]-e.y1,e.y1=n[1]-a);var t=e.children;if(t)for(var o=0;o-1?k+w:-(z+w):0,E={x0:F,x1:F,y0:R,y1:R+z},N=function(r,e,n){var i=g.tiling.pad,a=function(r){return r-i<=e.x0},t=function(r){return r+i>=e.x1},o=function(r){return r-i<=e.y0},c=function(r){return r+i>=e.y1};return r.x0===e.x0&&r.x1===e.x1&&r.y0===e.y0&&r.y1===e.y1?{x0:r.x0,x1:r.x1,y0:r.y0,y1:r.y1}:{x0:a(r.x0-i)?0:t(r.x0-i)?n[0]:r.x0,x1:a(r.x1+i)?0:t(r.x1+i)?n[0]:r.x1,y0:o(r.y0-i)?0:c(r.y0-i)?n[1]:r.y0,y1:o(r.y1+i)?0:c(r.y1+i)?n[1]:r.y1}},T=null,D={},J={},U=null,H=function(r,e){return e?D[m(r)]:J[m(r)]},L=function(r,e,n,i){if(e)return D[m(h)]||E;var a=J[g.level]||n;return function(r){return r.data.depth-v.data.depth=(i-=(_?er:er.r)-c)){var p=(n+i)/2;n=p,i=p}var I;or?a<(I=t-(_?er:er.b))&&I"===rr?(u.x-=t,d.x-=t,s.x-=t,l.x-=t):"/"===rr?(s.x-=t,l.x-=t,o.x-=t/2,c.x-=t/2):"\\"===rr?(u.x-=t,d.x-=t,o.x-=t/2,c.x-=t/2):"<"===rr&&(o.x-=t,c.x-=t),$(u),$(l),$(o),$(d),$(s),$(c),"M"+X(u.x,u.y)+"L"+X(d.x,d.y)+"L"+X(c.x,c.y)+"L"+X(s.x,s.y)+"L"+X(l.x,l.y)+"L"+X(o.x,o.y)+"Z"},toMoveInsideSlice:cr,makeUpdateSliceInterpolator:dr,makeUpdateTextInterpolator:sr,handleSlicesExit:lr,hasTransition:S,strTransform:mr}):P.remove()}},66192:function(r,e,n){"use strict";var i=n(33428),a=n(76308),t=n(3400),o=n(78176),c=n(82744).resizeText,u=n(60404);function d(r,e,n,i,c){var d,s,l=(c||{}).hovered,m=e.data.data,p=m.i,I=m.color,y=o.isHierarchyRoot(e),f=1;if(l)d=n._hovered.marker.line.color,s=n._hovered.marker.line.width;else if(y&&I===n.root.color)f=100,d="rgba(0,0,0,0)",s=0;else if(d=t.castOption(n,p,"marker.line.color")||a.defaultLine,s=t.castOption(n,p,"marker.line.width")||0,!n._hasColorscale&&!e.onPathbar){var g=n.marker.depthfade;if(g){var _,h=a.combine(a.addOpacity(n._backgroundColor,.75),I);if(!0===g){var v=o.getMaxDepth(n);_=isFinite(v)?o.isLeaf(e)?0:n._maxVisibleLayers-(e.data.depth-n._entryDepth):e.data.height+1}else _=e.data.depth-n._entryDepth,n._atRootLevel||_++;if(_>0)for(var x=0;x<_;x++){var P=.5*x/_;I=a.combine(a.addOpacity(h,P),I)}}}r.call(u,e,n,i,I).style("stroke-width",s).call(a.stroke,d).style("opacity",f)}r.exports={style:function(r){var e=r._fullLayout._treemaplayer.selectAll(".trace");c(r,e,"treemap"),e.each((function(e){var n=i.select(this),a=e[0].trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each((function(e){i.select(this).call(d,e,a,r,{hovered:!1})}))}))},styleOne:d}},13988:function(r,e,n){"use strict";var i=n(63188),a=n(92880).extendFlat,t=n(29736).axisHoverFormat;r.exports={y:i.y,x:i.x,x0:i.x0,y0:i.y0,xhoverformat:t("x"),yhoverformat:t("y"),name:a({},i.name,{}),orientation:a({},i.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:i.fillcolor,points:a({},i.boxpoints,{}),jitter:a({},i.jitter,{}),pointpos:a({},i.pointpos,{}),width:a({},i.width,{}),marker:i.marker,text:i.text,hovertext:i.hovertext,hovertemplate:i.hovertemplate,quartilemethod:i.quartilemethod,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:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:i.selected,unselected:i.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:i.zorder}},67064:function(r,e,n){"use strict";var i=n(3400),a=n(54460),t=n(62555),o=n(63800),c=n(39032).BADNUM;function u(r,e,n){var a=e.max-e.min;if(!a)return r.bandwidth?r.bandwidth:0;if(r.bandwidth)return Math.max(r.bandwidth,a/1e4);var t=n.length,o=i.stdev(n,t-1,e.mean);return Math.max(function(r,e,n){return 1.059*Math.min(e,n/1.349)*Math.pow(r,-.2)}(t,o,e.q3-e.q1),a/100)}function d(r,e,n,i){var t,o=r.spanmode,u=r.span||[],d=[e.min,e.max],s=[e.min-2*i,e.max+2*i];function l(i){var a=u[i],t="multicategory"===n.type?n.r2c(a):n.d2c(a,0,r[e.valLetter+"calendar"]);return t===c?s[i]:t}var m={type:"linear",range:t="soft"===o?s:"hard"===o?d:[l(0),l(1)]};return a.setConvert(m),m.cleanRange(),t}r.exports=function(r,e){var n=t(r,e);if(n[0].t.empty)return n;for(var c=r._fullLayout,s=a.getFromId(r,e["h"===e.orientation?"xaxis":"yaxis"]),l=1/0,m=-1/0,p=0,I=0,y=0;y0){var v,x,P,G,C,S=r.xa,A=r.ya;"h"===I.orientation?(C=e,v="y",P=A,x="x",G=S):(C=n,v="x",P=S,x="y",G=A);var b=p[r.index];if(C>=b.span[0]&&C<=b.span[1]){var M=a.extendFlat({},r),B=G.c2p(C,!0),k=c.getKdeValue(b,I,C),F=c.getPositionOnKdePath(b,I,B),z=P._offset,w=P._length;M[v+"0"]=F[0],M[v+"1"]=F[1],M[x+"0"]=M[x+"1"]=B,M[x+"Label"]=x+": "+t.hoverLabelText(G,C,I[x+"hoverformat"])+", "+p[0].t.labels.kde+" "+k.toFixed(3);for(var R=0,E=0;E")),s.color=function(r,e){var n=r[e.dir].marker,i=n.color,t=n.line.color,o=n.line.width;return a(i)?i:a(t)&&o?t:void 0}(m,f),[s]}function C(r){return i(y,r,m[I+"hoverformat"])}}},95952:function(r,e,n){"use strict";r.exports={attributes:n(65776),layoutAttributes:n(91352),supplyDefaults:n(24224).supplyDefaults,crossTraceDefaults:n(24224).crossTraceDefaults,supplyLayoutDefaults:n(59464),calc:n(73540),crossTraceCalc:n(50152),plot:n(64488),style:n(12252).style,hoverPoints:n(94196),eventData:n(53256),selectPoints:n(45784),moduleType:"trace",name:"waterfall",basePlotModule:n(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(r){"use strict";r.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"}}},59464:function(r,e,n){"use strict";var i=n(3400),a=n(91352);r.exports=function(r,e,n){var t=!1;function o(n,t){return i.coerce(r,e,a,n,t)}for(var c=0;c0&&(f+=m?"M"+l[0]+","+I[1]+"V"+I[0]:"M"+l[1]+","+I[0]+"H"+l[0]),"between"!==p&&(n.isSum||c path").each((function(r){if(!r.isBlank){var e=c[r.dir].marker;i.select(this).call(t.fill,e.color).call(t.stroke,e.line.color).call(a.dashLine,e.line.dash,e.line.width).style("opacity",c.selectedpoints&&!r.selected?o:1)}})),d(n,c,r),n.selectAll(".lines").each((function(){var r=c.connector.line;a.lineGroupStyle(i.select(this).selectAll("path"),r.width,r.color,r.dash)}))}))}}},84224:function(r,e,n){"use strict";var i=n(54460),a=n(3400),t=n(73060),o=n(60468).W,c=n(39032).BADNUM;e.moduleType="transform",e.name="aggregate";var u=e.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"},d=u.aggregations;function s(r,e,n,t){if(t.enabled){for(var o=t.target,u=a.nestedProperty(e,o),d=u.get(),s=function(r,e){var n=r.func,i=e.d2c,t=e.c2d;switch(n){case"count":return l;case"first":return m;case"last":return p;case"sum":return function(r,e){for(var n=0,a=0;aa&&(a=s,o=d)}}return a?t(o):c};case"rms":return function(r,e){for(var n=0,a=0,o=0;o":return function(r){return p(r)>l};case">=":return function(r){return p(r)>=l};case"[]":return function(r){var e=p(r);return e>=l[0]&&e<=l[1]};case"()":return function(r){var e=p(r);return e>l[0]&&e=l[0]&&el[0]&&e<=l[1]};case"][":return function(r){var e=p(r);return e<=l[0]||e>=l[1]};case")(":return function(r){var e=p(r);return el[1]};case"](":return function(r){var e=p(r);return e<=l[0]||e>l[1]};case")[":return function(r){var e=p(r);return e=l[1]};case"{}":return function(r){return-1!==l.indexOf(p(r))};case"}{":return function(r){return-1===l.indexOf(p(r))}}}(n,t.getDataToCoordFunc(r,e,c,a),m),h={},v={},x=0;I?(f=function(r){h[r.astr]=i.extendDeep([],r.get()),r.set(new Array(l))},g=function(r,e){var n=h[r.astr][e];r.get()[e]=n}):(f=function(r){h[r.astr]=i.extendDeep([],r.get()),r.set([])},g=function(r,e){var n=h[r.astr][e];r.get().push(n)}),C(f);for(var P=o(e.transforms,n),G=0;G1?"%{group} (%{trace})":"%{group}");var u=r.styles,d=o.styles=[];if(u)for(t=0;tp)throw new RangeError('The value "'+r+'" is invalid for option "size"');var e=new Uint8Array(r);return Object.setPrototypeOf(e,y.prototype),e}function y(r,e,n){if("number"===typeof r){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return _(r)}return f(r,e,n)}function f(r,e,n){if("string"===typeof r)return function(r,e){if("string"===typeof e&&""!==e||(e="utf8"),!y.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|P(r,e),i=I(n),a=i.write(r,e);return a!==n&&(i=i.slice(0,a)),i}(r,e);if(ArrayBuffer.isView(r))return function(r){if(nr(r,Uint8Array)){var e=new Uint8Array(r);return v(e.buffer,e.byteOffset,e.byteLength)}return h(r)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+d(r));if(nr(r,ArrayBuffer)||r&&nr(r.buffer,ArrayBuffer))return v(r,e,n);if("undefined"!==typeof SharedArrayBuffer&&(nr(r,SharedArrayBuffer)||r&&nr(r.buffer,SharedArrayBuffer)))return v(r,e,n);if("number"===typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=r.valueOf&&r.valueOf();if(null!=i&&i!==r)return y.from(i,e,n);var a=function(r){if(y.isBuffer(r)){var e=0|x(r.length),n=I(e);return 0===n.length||r.copy(n,0,0,e),n}return void 0!==r.length?"number"!==typeof r.length||ir(r.length)?I(0):h(r):"Buffer"===r.type&&Array.isArray(r.data)?h(r.data):void 0}(r);if(a)return a;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof r[Symbol.toPrimitive])return y.from(r[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+d(r))}function g(r){if("number"!==typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function _(r){return g(r),I(r<0?0:0|x(r))}function h(r){for(var e=r.length<0?0:0|x(r.length),n=I(e),i=0;i=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|r}function P(r,e){if(y.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||nr(r,ArrayBuffer))return r.byteLength;if("string"!==typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+d(r));var n=r.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return $(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return rr(r).length;default:if(a)return i?-1:$(r).length;e=(""+e).toLowerCase(),a=!0}}function G(r,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return T(this,e,n);case"utf8":case"utf-8":return w(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return z(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}function C(r,e,n){var i=r[e];r[e]=r[n],r[n]=i}function S(r,e,n,i,a){if(0===r.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),ir(n=+n)&&(n=a?0:r.length-1),n<0&&(n=r.length+n),n>=r.length){if(a)return-1;n=r.length-1}else if(n<0){if(!a)return-1;n=0}if("string"===typeof e&&(e=y.from(e,i)),y.isBuffer(e))return 0===e.length?-1:A(r,e,n,i,a);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(r,e,n):Uint8Array.prototype.lastIndexOf.call(r,e,n):A(r,[e],n,i,a);throw new TypeError("val must be string, number or Buffer")}function A(r,e,n,i,a){var t,o=1,c=r.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(r.length<2||e.length<2)return-1;o=2,c/=2,u/=2,n/=2}function d(r,e){return 1===o?r[e]:r.readUInt16BE(e*o)}if(a){var s=-1;for(t=n;tc&&(n=c-u),t=n;t>=0;t--){for(var l=!0,m=0;ma&&(i=a):i=a;var t,o=e.length;for(i>o/2&&(i=o/2),t=0;t>8,a=n%256,t.push(a),t.push(i);return t}(e,r.length-n),r,n,i)}function z(r,e,n){return 0===e&&n===r.length?s.fromByteArray(r):s.fromByteArray(r.slice(e,n))}function w(r,e,n){n=Math.min(r.length,n);for(var i=[],a=e;a239?4:t>223?3:t>191?2:1;if(a+c<=n){var u=void 0,d=void 0,s=void 0,l=void 0;switch(c){case 1:t<128&&(o=t);break;case 2:128===(192&(u=r[a+1]))&&(l=(31&t)<<6|63&u)>127&&(o=l);break;case 3:u=r[a+1],d=r[a+2],128===(192&u)&&128===(192&d)&&(l=(15&t)<<12|(63&u)<<6|63&d)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:u=r[a+1],d=r[a+2],s=r[a+3],128===(192&u)&&128===(192&d)&&128===(192&s)&&(l=(15&t)<<18|(63&u)<<12|(63&d)<<6|63&s)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,c=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),a+=c}return function(r){var e=r.length;if(e<=R)return String.fromCharCode.apply(String,r);for(var n="",i=0;ii.length?(y.isBuffer(t)||(t=y.from(t)),t.copy(i,a)):Uint8Array.prototype.set.call(i,t,a);else{if(!y.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,a)}a+=t.length}return i},y.byteLength=P,y.prototype._isBuffer=!0,y.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;en&&(r+=" ... "),""},m&&(y.prototype[m]=y.prototype.inspect),y.prototype.compare=function(r,e,n,i,a){if(nr(r,Uint8Array)&&(r=y.from(r,r.offset,r.byteLength)),!y.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+d(r));if(void 0===e&&(e=0),void 0===n&&(n=r?r.length:0),void 0===i&&(i=0),void 0===a&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(this===r)return 0;for(var t=(a>>>=0)-(i>>>=0),o=(n>>>=0)-(e>>>=0),c=Math.min(t,o),u=this.slice(i,a),s=r.slice(e,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var a=this.length-e;if((void 0===n||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var t=!1;;)switch(i){case"hex":return b(this,r,e,n);case"utf8":case"utf-8":return M(this,r,e,n);case"ascii":case"latin1":case"binary":return B(this,r,e,n);case"base64":return k(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,r,e,n);default:if(t)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),t=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function E(r,e,n){var i="";n=Math.min(r.length,n);for(var a=e;ai)&&(n=i);for(var a="",t=e;tn)throw new RangeError("Trying to access beyond buffer length")}function U(r,e,n,i,a,t){if(!y.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||er.length)throw new RangeError("Index out of range")}function H(r,e,n,i,a){q(e,i,a,r,n,7);var t=Number(e&BigInt(4294967295));r[n++]=t,t>>=8,r[n++]=t,t>>=8,r[n++]=t,t>>=8,r[n++]=t;var o=Number(e>>BigInt(32)&BigInt(4294967295));return r[n++]=o,o>>=8,r[n++]=o,o>>=8,r[n++]=o,o>>=8,r[n++]=o,n}function L(r,e,n,i,a){q(e,i,a,r,n,7);var t=Number(e&BigInt(4294967295));r[n+7]=t,t>>=8,r[n+6]=t,t>>=8,r[n+5]=t,t>>=8,r[n+4]=t;var o=Number(e>>BigInt(32)&BigInt(4294967295));return r[n+3]=o,o>>=8,r[n+2]=o,o>>=8,r[n+1]=o,o>>=8,r[n]=o,n+8}function O(r,e,n,i,a,t){if(n+i>r.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function K(r,e,n,i,a){return e=+e,n>>>=0,a||O(r,0,n,4),l.write(r,e,n,i,23,4),n+4}function V(r,e,n,i,a){return e=+e,n>>>=0,a||O(r,0,n,8),l.write(r,e,n,i,52,8),n+8}y.prototype.slice=function(r,e){var n=this.length;(r=~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r],a=1,t=0;++t>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i},y.prototype.readUint8=y.prototype.readUInt8=function(r,e){return r>>>=0,e||J(r,1,this.length),this[r]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(r,e){return r>>>=0,e||J(r,2,this.length),this[r]|this[r+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(r,e){return r>>>=0,e||J(r,2,this.length),this[r]<<8|this[r+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(r,e){return r>>>=0,e||J(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(r,e){return r>>>=0,e||J(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},y.prototype.readBigUInt64LE=tr((function(r){Y(r>>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=e+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,24),a=this[++r]+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(i)+(BigInt(a)<>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=e*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r],a=this[++r]*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+n;return(BigInt(i)<>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r],a=1,t=0;++t=(a*=128)&&(i-=Math.pow(2,8*e)),i},y.prototype.readIntBE=function(r,e,n){r>>>=0,e>>>=0,n||J(r,e,this.length);for(var i=e,a=1,t=this[r+--i];i>0&&(a*=256);)t+=this[r+--i]*a;return t>=(a*=128)&&(t-=Math.pow(2,8*e)),t},y.prototype.readInt8=function(r,e){return r>>>=0,e||J(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},y.prototype.readInt16LE=function(r,e){r>>>=0,e||J(r,2,this.length);var n=this[r]|this[r+1]<<8;return 32768&n?4294901760|n:n},y.prototype.readInt16BE=function(r,e){r>>>=0,e||J(r,2,this.length);var n=this[r+1]|this[r]<<8;return 32768&n?4294901760|n:n},y.prototype.readInt32LE=function(r,e){return r>>>=0,e||J(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},y.prototype.readInt32BE=function(r,e){return r>>>=0,e||J(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},y.prototype.readBigInt64LE=tr((function(r){Y(r>>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=this[r+4]+this[r+5]*Math.pow(2,8)+this[r+6]*Math.pow(2,16)+(n<<24);return(BigInt(i)<>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=(e<<24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r];return(BigInt(i)<>>=0,e||J(r,4,this.length),l.read(this,r,!0,23,4)},y.prototype.readFloatBE=function(r,e){return r>>>=0,e||J(r,4,this.length),l.read(this,r,!1,23,4)},y.prototype.readDoubleLE=function(r,e){return r>>>=0,e||J(r,8,this.length),l.read(this,r,!0,52,8)},y.prototype.readDoubleBE=function(r,e){return r>>>=0,e||J(r,8,this.length),l.read(this,r,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(r,e,n,i){r=+r,e>>>=0,n>>>=0,i||U(this,r,e,n,Math.pow(2,8*n)-1,0);var a=1,t=0;for(this[e]=255&r;++t>>=0,n>>>=0,i||U(this,r,e,n,Math.pow(2,8*n)-1,0);var a=n-1,t=1;for(this[e+a]=255&r;--a>=0&&(t*=256);)this[e+a]=r/t&255;return e+n},y.prototype.writeUint8=y.prototype.writeUInt8=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,1,255,0),this[e]=255&r,e+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,65535,0),this[e]=255&r,this[e+1]=r>>>8,e+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,65535,0),this[e]=r>>>8,this[e+1]=255&r,e+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,4294967295,0),this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=255&r,e+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,4294967295,0),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r,e+4},y.prototype.writeBigUInt64LE=tr((function(r){return H(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeBigUInt64BE=tr((function(r){return L(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e>>>=0,!i){var a=Math.pow(2,8*n-1);U(this,r,e,n,a-1,-a)}var t=0,o=1,c=0;for(this[e]=255&r;++t>>=0,!i){var a=Math.pow(2,8*n-1);U(this,r,e,n,a-1,-a)}var t=n-1,o=1,c=0;for(this[e+t]=255&r;--t>=0&&(o*=256);)r<0&&0===c&&0!==this[e+t+1]&&(c=1),this[e+t]=(r/o|0)-c&255;return e+n},y.prototype.writeInt8=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,1,127,-128),r<0&&(r=255+r+1),this[e]=255&r,e+1},y.prototype.writeInt16LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,32767,-32768),this[e]=255&r,this[e+1]=r>>>8,e+2},y.prototype.writeInt16BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,32767,-32768),this[e]=r>>>8,this[e+1]=255&r,e+2},y.prototype.writeInt32LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,2147483647,-2147483648),this[e]=255&r,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24,e+4},y.prototype.writeInt32BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r,e+4},y.prototype.writeBigInt64LE=tr((function(r){return H(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeBigInt64BE=tr((function(r){return L(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeFloatLE=function(r,e,n){return K(this,r,e,!0,n)},y.prototype.writeFloatBE=function(r,e,n){return K(this,r,e,!1,n)},y.prototype.writeDoubleLE=function(r,e,n){return V(this,r,e,!0,n)},y.prototype.writeDoubleBE=function(r,e,n){return V(this,r,e,!1,n)},y.prototype.copy=function(r,e,n,i){if(!y.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e>>=0,n=void 0===n?this.length:n>>>0,r||(r=0),"number"===typeof r)for(t=e;t=i+4;n-=3)e="_".concat(r.slice(n-3,n)).concat(e);return"".concat(r.slice(0,n)).concat(e)}function q(r,e,n,i,a,t){if(r>n||r3?0===e||e===BigInt(0)?">= 0".concat(c," and < 2").concat(c," ** ").concat(8*(t+1)).concat(c):">= -(2".concat(c," ** ").concat(8*(t+1)-1).concat(c,") and < 2 ** ")+"".concat(8*(t+1)-1).concat(c):">= ".concat(e).concat(c," and <= ").concat(n).concat(c),new j.ERR_OUT_OF_RANGE("value",o,r)}!function(r,e,n){Y(e,"offset"),void 0!==r[e]&&void 0!==r[e+n]||X(e,r.length-(n+1))}(i,a,t)}function Y(r,e){if("number"!==typeof r)throw new j.ERR_INVALID_ARG_TYPE(e,"number",r)}function X(r,e,n){if(Math.floor(r)!==r)throw Y(r,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",r);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(e),r)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(r){return r?"".concat(r," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(r,e){return'The "'.concat(r,'" argument must be of type number. Received type ').concat(d(e))}),TypeError),W("ERR_OUT_OF_RANGE",(function(r,e,n){var i='The value of "'.concat(r,'" is out of range.'),a=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?a=Z(String(n)):"bigint"===typeof n&&(a=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(a=Z(a)),a+="n"),i+=" It must be ".concat(e,". Received ").concat(a)}),RangeError);var Q=/[^+/0-9A-Za-z-_]/g;function $(r,e){var n;e=e||1/0;for(var i=r.length,a=null,t=[],o=0;o55295&&n<57344){if(!a){if(n>56319){(e-=3)>-1&&t.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&t.push(239,191,189);continue}a=n;continue}if(n<56320){(e-=3)>-1&&t.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(e-=3)>-1&&t.push(239,191,189);if(a=null,n<128){if((e-=1)<0)break;t.push(n)}else if(n<2048){if((e-=2)<0)break;t.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;t.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;t.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return t}function rr(r){return s.toByteArray(function(r){if((r=(r=r.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;r.length%4!==0;)r+="=";return r}(r))}function er(r,e,n,i){var a;for(a=0;a=e.length||a>=r.length);++a)e[a+n]=r[a];return a}function nr(r,e){return r instanceof e||null!=r&&null!=r.constructor&&null!=r.constructor.name&&r.constructor.name===e.name}function ir(r){return r!==r}var ar=function(){for(var r="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var i=16*n,a=0;a<16;++a)e[i+a]=r[n]+r[a];return e}();function tr(r){return"undefined"===typeof BigInt?or:r}function or(){throw new Error("BigInt not supported")}},9216:function(r){"use strict";r.exports=a,r.exports.isMobile=a,r.exports.default=a;var e=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,i=/android|ipad|playbook|silk/i;function a(r){r||(r={});var a=r.ua;if(a||"undefined"===typeof navigator||(a=navigator.userAgent),a&&a.headers&&"string"===typeof a.headers["user-agent"]&&(a=a.headers["user-agent"]),"string"!==typeof a)return!1;var t=e.test(a)&&!n.test(a)||!!r.tablet&&i.test(a);return!t&&r.tablet&&r.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==a.indexOf("Macintosh")&&-1!==a.indexOf("Safari")&&(t=!0),t}},6296:function(r,e,n){"use strict";r.exports=function(r){var e=(r=r||{}).eye||[0,0,1],n=r.center||[0,0,0],c=r.up||[0,1,0],u=r.distanceLimits||[0,1/0],d=r.mode||"turntable",s=i(),l=a(),m=t();return s.setDistanceLimits(u[0],u[1]),s.lookAt(0,e,n,c),l.setDistanceLimits(u[0],u[1]),l.lookAt(0,e,n,c),m.setDistanceLimits(u[0],u[1]),m.lookAt(0,e,n,c),new o({turntable:s,orbit:l,matrix:m},d)};var i=n(7261),a=n(9977),t=n(4192);function o(r,e){this._controllerNames=Object.keys(r),this._controllerList=this._controllerNames.map((function(e){return r[e]})),this._mode=e,this._active=r[e],this._active||(this._mode="turntable",this._active=r.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 c=o.prototype;c.flush=function(r){for(var e=this._controllerList,n=0;n0?o-4:o;for(n=0;n>16&255,d[s++]=e>>8&255,d[s++]=255&e;return 2===u&&(e=i[r.charCodeAt(n)]<<2|i[r.charCodeAt(n+1)]>>4,d[s++]=255&e),1===u&&(e=i[r.charCodeAt(n)]<<10|i[r.charCodeAt(n+1)]<<4|i[r.charCodeAt(n+2)]>>2,d[s++]=e>>8&255,d[s++]=255&e),d},e.fromByteArray=function(r){for(var e,i=r.length,a=i%3,t=[],o=16383,c=0,d=i-a;cd?d:c+o));return 1===a?(e=r[i-1],t.push(n[e>>2]+n[e<<4&63]+"==")):2===a&&(e=(r[i-2]<<8)+r[i-1],t.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),t.join("")};for(var n=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=t[o],i[t.charCodeAt(o)]=o;function c(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=r.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(r,e,i){for(var a,t,o=[],c=e;c>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},3865:function(r,e,n){"use strict";var i=n(869);r.exports=function(r,e){return i(r[0].mul(e[1]).add(e[0].mul(r[1])),r[1].mul(e[1]))}},1318:function(r){"use strict";r.exports=function(r,e){return r[0].mul(e[1]).cmp(e[0].mul(r[1]))}},8697:function(r,e,n){"use strict";var i=n(869);r.exports=function(r,e){return i(r[0].mul(e[1]),r[1].mul(e[0]))}},7842:function(r,e,n){"use strict";var i=n(6330),a=n(1533),t=n(2651),o=n(4387),c=n(869),u=n(8697);r.exports=function r(e,n){if(i(e))return n?u(e,r(n)):[e[0].clone(),e[1].clone()];var d,s,l=0;if(a(e))d=e.clone();else if("string"===typeof e)d=o(e);else{if(0===e)return[t(0),t(1)];if(e===Math.floor(e))d=t(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),l-=256;d=t(e)}}if(i(n))d.mul(n[1]),s=n[0].clone();else if(a(n))s=n.clone();else if("string"===typeof n)s=o(n);else if(n)if(n===Math.floor(n))s=t(n);else{for(;n!==Math.floor(n);)n*=Math.pow(2,256),l+=256;s=t(n)}else s=t(1);return l>0?d=d.ushln(l):l<0&&(s=s.ushln(-l)),c(d,s)}},6330:function(r,e,n){"use strict";var i=n(1533);r.exports=function(r){return Array.isArray(r)&&2===r.length&&i(r[0])&&i(r[1])}},5716:function(r,e,n){"use strict";var i=n(6859);r.exports=function(r){return r.cmp(new i(0))}},1369:function(r,e,n){"use strict";var i=n(5716);r.exports=function(r){var e=r.length,n=r.words,a=0;if(1===e)a=n[0];else if(2===e)a=n[0]+67108864*n[1];else for(var t=0;t20?52:n+32}},1533:function(r,e,n){"use strict";n(6859),r.exports=function(r){return r&&"object"===typeof r&&Boolean(r.words)}},2651:function(r,e,n){"use strict";var i=n(6859),a=n(2361);r.exports=function(r){var e=a.exponent(r);return e<52?new i(r):new i(r*Math.pow(2,52-e)).ushln(e-52)}},869:function(r,e,n){"use strict";var i=n(2651),a=n(5716);r.exports=function(r,e){var n=a(r),t=a(e);if(0===n)return[i(0),i(1)];if(0===t)return[i(0),i(0)];t<0&&(r=r.neg(),e=e.neg());var o=r.gcd(e);return o.cmpn(1)?[r.div(o),e.div(o)]:[r,e]}},4387:function(r,e,n){"use strict";var i=n(6859);r.exports=function(r){return new i(r)}},6504:function(r,e,n){"use strict";var i=n(869);r.exports=function(r,e){return i(r[0].mul(e[0]),r[1].mul(e[1]))}},7721:function(r,e,n){"use strict";var i=n(5716);r.exports=function(r){return i(r[0])*i(r[1])}},5572:function(r,e,n){"use strict";var i=n(869);r.exports=function(r,e){return i(r[0].mul(e[1]).sub(r[1].mul(e[0])),r[1].mul(e[1]))}},946:function(r,e,n){"use strict";var i=n(1369),a=n(4025);r.exports=function(r){var e=r[0],n=r[1];if(0===e.cmpn(0))return 0;var t=e.abs().divmod(n.abs()),o=t.div,c=i(o),u=t.mod,d=e.negative!==n.negative?-1:1;if(0===u.cmpn(0))return d*c;if(c){var s=a(c)+4;return d*(c+(m=i(u.ushln(s).divRound(n)))*Math.pow(2,-s))}var l=n.bitLength()-u.bitLength()+53,m=i(u.ushln(l).divRound(n));return l<1023?d*m*Math.pow(2,-l):d*(m*=Math.pow(2,-1023))*Math.pow(2,1023-l)}},2478:function(r){"use strict";function e(r,e,n,i,a){for(var t=a+1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)>=0?(t=o,a=o-1):i=o+1}return t}function n(r,e,n,i,a){for(var t=a+1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)>0?(t=o,a=o-1):i=o+1}return t}function i(r,e,n,i,a){for(var t=i-1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)<0?(t=o,i=o+1):a=o-1}return t}function a(r,e,n,i,a){for(var t=i-1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)<=0?(t=o,i=o+1):a=o-1}return t}function t(r,e,n,i,a){for(;i<=a;){var t=i+a>>>1,o=r[t],c=void 0!==n?n(o,e):o-e;if(0===c)return t;c<=0?i=t+1:a=t-1}return-1}function o(r,e,n,i,a,t){return"function"===typeof n?t(r,e,n,void 0===i?0:0|i,void 0===a?r.length-1:0|a):t(r,e,void 0,void 0===n?0:0|n,void 0===i?r.length-1:0|i)}r.exports={ge:function(r,n,i,a,t){return o(r,n,i,a,t,e)},gt:function(r,e,i,a,t){return o(r,e,i,a,t,n)},lt:function(r,e,n,a,t){return o(r,e,n,a,t,i)},le:function(r,e,n,i,t){return o(r,e,n,i,t,a)},eq:function(r,e,n,i,a){return o(r,e,n,i,a,t)}}},8828:function(r,e){"use strict";function n(r){var e=32;return(r&=-r)&&e--,65535&r&&(e-=16),16711935&r&&(e-=8),252645135&r&&(e-=4),858993459&r&&(e-=2),1431655765&r&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(r){return(r>0)-(r<0)},e.abs=function(r){var e=r>>31;return(r^e)-e},e.min=function(r,e){return e^(r^e)&-(r65535)<<4,e|=n=((r>>>=e)>255)<<3,e|=n=((r>>>=n)>15)<<2,(e|=n=((r>>>=n)>3)<<1)|(r>>>=n)>>1},e.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},e.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},e.countTrailingZeros=n,e.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,1+(r|=r>>>16)},e.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},e.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);!function(r){for(var e=0;e<256;++e){var n=e,i=e,a=7;for(n>>>=1;n;n>>>=1)i<<=1,i|=1&n,--a;r[e]=i<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},e.interleave2=function(r,e){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(r,e){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>e&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},e.interleave3=function(r,e,n){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(r,e){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>e&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},e.nextCombination=function(r){var e=r|r-1;return e+1|(~e&-~e)-1>>>n(r)+1}},6859:function(r,e,n){!function(r,e){"use strict";function i(r,e){if(!r)throw new Error(e||"Assertion failed")}function a(r,e){r.super_=e;var n=function(){};n.prototype=e.prototype,r.prototype=new n,r.prototype.constructor=r}function t(r,e,n){if(t.isBN(r))return r;this.negative=0,this.words=null,this.length=0,this.red=null,null!==r&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(r||0,e||10,n||"be"))}var o;"object"===typeof r?r.exports=t:e.BN=t,t.BN=t,t.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(7790).Buffer}catch(S){}function c(r,e){var n=r.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(r,e,n){var i=c(r,n);return n-1>=e&&(i|=c(r,n-1)<<4),i}function d(r,e,n,i){for(var a=0,t=Math.min(r.length,n),o=e;o=49?c-49+10:c>=17?c-17+10:c}return a}t.isBN=function(r){return r instanceof t||null!==r&&"object"===typeof r&&r.constructor.wordSize===t.wordSize&&Array.isArray(r.words)},t.max=function(r,e){return r.cmp(e)>0?r:e},t.min=function(r,e){return r.cmp(e)<0?r:e},t.prototype._init=function(r,e,n){if("number"===typeof r)return this._initNumber(r,e,n);if("object"===typeof r)return this._initArray(r,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var a=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=r[a]|r[a-1]<<8|r[a-2]<<16,this.words[t]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,t++);else if("le"===n)for(a=0,t=0;a>>26-c&67108863,(c+=24)>=26&&(c-=26,t++);return this.strip()},t.prototype._parseHex=function(r,e,n){this.length=Math.ceil((r.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)a=u(r,e,i)<=18?(t-=18,o+=1,this.words[o]|=a>>>26):t+=8;else for(i=(r.length-e)%2===0?e+1:e;i=18?(t-=18,o+=1,this.words[o]|=a>>>26):t+=8;this.strip()},t.prototype._parseBase=function(r,e,n){this.words=[0],this.length=1;for(var i=0,a=1;a<=67108863;a*=e)i++;i--,a=a/e|0;for(var t=r.length-n,o=t%i,c=Math.min(t,t-o)+n,u=0,s=n;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},t.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},t.prototype.inspect=function(){return(this.red?""};var s=["","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"],l=[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],m=[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(r,e,n){n.negative=e.negative^r.negative;var i=r.length+e.length|0;n.length=i,i=i-1|0;var a=0|r.words[0],t=0|e.words[0],o=a*t,c=67108863&o,u=o/67108864|0;n.words[0]=c;for(var d=1;d>>26,l=67108863&u,m=Math.min(d,e.length-1),p=Math.max(0,d-r.length+1);p<=m;p++){var I=d-p|0;s+=(o=(a=0|r.words[I])*(t=0|e.words[p])+l)/67108864|0,l=67108863&o}n.words[d]=0|l,u=0|s}return 0!==u?n.words[d]=0|u:n.length--,n.strip()}t.prototype.toString=function(r,e){var n;if(e=0|e||1,16===(r=r||10)||"hex"===r){n="";for(var a=0,t=0,o=0;o>>24-a&16777215)||o!==this.length-1?s[6-u.length]+u+n:u+n,(a+=2)>=26&&(a-=26,o--)}for(0!==t&&(n=t.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(r===(0|r)&&r>=2&&r<=36){var d=l[r],p=m[r];n="";var I=this.clone();for(I.negative=0;!I.isZero();){var y=I.modn(p).toString(r);n=(I=I.idivn(p)).isZero()?y+n:s[d-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},t.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},t.prototype.toJSON=function(){return this.toString(16)},t.prototype.toBuffer=function(r,e){return i("undefined"!==typeof o),this.toArrayLike(o,r,e)},t.prototype.toArray=function(r,e){return this.toArrayLike(Array,r,e)},t.prototype.toArrayLike=function(r,e,n){var a=this.byteLength(),t=n||Math.max(1,a);i(a<=t,"byte array longer than desired length"),i(t>0,"Requested array length <= 0"),this.strip();var o,c,u="le"===e,d=new r(t),s=this.clone();if(u){for(c=0;!s.isZero();c++)o=s.andln(255),s.iushrn(8),d[c]=o;for(;c=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},t.prototype._zeroBits=function(r){if(0===r)return 26;var e=r,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},t.prototype.bitLength=function(){var r=this.words[this.length-1],e=this._countBits(r);return 26*(this.length-1)+e},t.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,e=0;er.length?this.clone().ior(r):r.clone().ior(this)},t.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},t.prototype.iuand=function(r){var e;e=this.length>r.length?r:this;for(var n=0;nr.length?this.clone().iand(r):r.clone().iand(this)},t.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},t.prototype.iuxor=function(r){var e,n;this.length>r.length?(e=this,n=r):(e=r,n=this);for(var i=0;ir.length?this.clone().ixor(r):r.clone().ixor(this)},t.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},t.prototype.inotn=function(r){i("number"===typeof r&&r>=0);var e=0|Math.ceil(r/26),n=r%26;this._expand(e),n>0&&e--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},t.prototype.notn=function(r){return this.clone().inotn(r)},t.prototype.setn=function(r,e){i("number"===typeof r&&r>=0);var n=r/26|0,a=r%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<r.length?(n=this,i=r):(n=r,i=this);for(var a=0,t=0;t>>26;for(;0!==a&&t>>26;if(this.length=n.length,0!==a)this.words[this.length]=a,this.length++;else if(n!==this)for(;tr.length?this.clone().iadd(r):r.clone().iadd(this)},t.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var e=this.iadd(r);return r.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var n,i,a=this.cmp(r);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(n=this,i=r):(n=r,i=this);for(var t=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==t&&o>26,this.words[o]=67108863&e;if(0===t&&o>>13,p=0|o[1],I=8191&p,y=p>>>13,f=0|o[2],g=8191&f,_=f>>>13,h=0|o[3],v=8191&h,x=h>>>13,P=0|o[4],G=8191&P,C=P>>>13,S=0|o[5],A=8191&S,b=S>>>13,M=0|o[6],B=8191&M,k=M>>>13,F=0|o[7],z=8191&F,w=F>>>13,R=0|o[8],E=8191&R,N=R>>>13,T=0|o[9],D=8191&T,J=T>>>13,U=0|c[0],H=8191&U,L=U>>>13,O=0|c[1],K=8191&O,V=O>>>13,j=0|c[2],W=8191&j,Z=j>>>13,q=0|c[3],Y=8191&q,X=q>>>13,Q=0|c[4],$=8191&Q,rr=Q>>>13,er=0|c[5],nr=8191&er,ir=er>>>13,ar=0|c[6],tr=8191&ar,or=ar>>>13,cr=0|c[7],ur=8191&cr,dr=cr>>>13,sr=0|c[8],lr=8191&sr,mr=sr>>>13,pr=0|c[9],Ir=8191&pr,yr=pr>>>13;n.negative=r.negative^e.negative,n.length=19;var fr=(d+(i=Math.imul(l,H))|0)+((8191&(a=(a=Math.imul(l,L))+Math.imul(m,H)|0))<<13)|0;d=((t=Math.imul(m,L))+(a>>>13)|0)+(fr>>>26)|0,fr&=67108863,i=Math.imul(I,H),a=(a=Math.imul(I,L))+Math.imul(y,H)|0,t=Math.imul(y,L);var gr=(d+(i=i+Math.imul(l,K)|0)|0)+((8191&(a=(a=a+Math.imul(l,V)|0)+Math.imul(m,K)|0))<<13)|0;d=((t=t+Math.imul(m,V)|0)+(a>>>13)|0)+(gr>>>26)|0,gr&=67108863,i=Math.imul(g,H),a=(a=Math.imul(g,L))+Math.imul(_,H)|0,t=Math.imul(_,L),i=i+Math.imul(I,K)|0,a=(a=a+Math.imul(I,V)|0)+Math.imul(y,K)|0,t=t+Math.imul(y,V)|0;var _r=(d+(i=i+Math.imul(l,W)|0)|0)+((8191&(a=(a=a+Math.imul(l,Z)|0)+Math.imul(m,W)|0))<<13)|0;d=((t=t+Math.imul(m,Z)|0)+(a>>>13)|0)+(_r>>>26)|0,_r&=67108863,i=Math.imul(v,H),a=(a=Math.imul(v,L))+Math.imul(x,H)|0,t=Math.imul(x,L),i=i+Math.imul(g,K)|0,a=(a=a+Math.imul(g,V)|0)+Math.imul(_,K)|0,t=t+Math.imul(_,V)|0,i=i+Math.imul(I,W)|0,a=(a=a+Math.imul(I,Z)|0)+Math.imul(y,W)|0,t=t+Math.imul(y,Z)|0;var hr=(d+(i=i+Math.imul(l,Y)|0)|0)+((8191&(a=(a=a+Math.imul(l,X)|0)+Math.imul(m,Y)|0))<<13)|0;d=((t=t+Math.imul(m,X)|0)+(a>>>13)|0)+(hr>>>26)|0,hr&=67108863,i=Math.imul(G,H),a=(a=Math.imul(G,L))+Math.imul(C,H)|0,t=Math.imul(C,L),i=i+Math.imul(v,K)|0,a=(a=a+Math.imul(v,V)|0)+Math.imul(x,K)|0,t=t+Math.imul(x,V)|0,i=i+Math.imul(g,W)|0,a=(a=a+Math.imul(g,Z)|0)+Math.imul(_,W)|0,t=t+Math.imul(_,Z)|0,i=i+Math.imul(I,Y)|0,a=(a=a+Math.imul(I,X)|0)+Math.imul(y,Y)|0,t=t+Math.imul(y,X)|0;var vr=(d+(i=i+Math.imul(l,$)|0)|0)+((8191&(a=(a=a+Math.imul(l,rr)|0)+Math.imul(m,$)|0))<<13)|0;d=((t=t+Math.imul(m,rr)|0)+(a>>>13)|0)+(vr>>>26)|0,vr&=67108863,i=Math.imul(A,H),a=(a=Math.imul(A,L))+Math.imul(b,H)|0,t=Math.imul(b,L),i=i+Math.imul(G,K)|0,a=(a=a+Math.imul(G,V)|0)+Math.imul(C,K)|0,t=t+Math.imul(C,V)|0,i=i+Math.imul(v,W)|0,a=(a=a+Math.imul(v,Z)|0)+Math.imul(x,W)|0,t=t+Math.imul(x,Z)|0,i=i+Math.imul(g,Y)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(_,Y)|0,t=t+Math.imul(_,X)|0,i=i+Math.imul(I,$)|0,a=(a=a+Math.imul(I,rr)|0)+Math.imul(y,$)|0,t=t+Math.imul(y,rr)|0;var xr=(d+(i=i+Math.imul(l,nr)|0)|0)+((8191&(a=(a=a+Math.imul(l,ir)|0)+Math.imul(m,nr)|0))<<13)|0;d=((t=t+Math.imul(m,ir)|0)+(a>>>13)|0)+(xr>>>26)|0,xr&=67108863,i=Math.imul(B,H),a=(a=Math.imul(B,L))+Math.imul(k,H)|0,t=Math.imul(k,L),i=i+Math.imul(A,K)|0,a=(a=a+Math.imul(A,V)|0)+Math.imul(b,K)|0,t=t+Math.imul(b,V)|0,i=i+Math.imul(G,W)|0,a=(a=a+Math.imul(G,Z)|0)+Math.imul(C,W)|0,t=t+Math.imul(C,Z)|0,i=i+Math.imul(v,Y)|0,a=(a=a+Math.imul(v,X)|0)+Math.imul(x,Y)|0,t=t+Math.imul(x,X)|0,i=i+Math.imul(g,$)|0,a=(a=a+Math.imul(g,rr)|0)+Math.imul(_,$)|0,t=t+Math.imul(_,rr)|0,i=i+Math.imul(I,nr)|0,a=(a=a+Math.imul(I,ir)|0)+Math.imul(y,nr)|0,t=t+Math.imul(y,ir)|0;var Pr=(d+(i=i+Math.imul(l,tr)|0)|0)+((8191&(a=(a=a+Math.imul(l,or)|0)+Math.imul(m,tr)|0))<<13)|0;d=((t=t+Math.imul(m,or)|0)+(a>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,i=Math.imul(z,H),a=(a=Math.imul(z,L))+Math.imul(w,H)|0,t=Math.imul(w,L),i=i+Math.imul(B,K)|0,a=(a=a+Math.imul(B,V)|0)+Math.imul(k,K)|0,t=t+Math.imul(k,V)|0,i=i+Math.imul(A,W)|0,a=(a=a+Math.imul(A,Z)|0)+Math.imul(b,W)|0,t=t+Math.imul(b,Z)|0,i=i+Math.imul(G,Y)|0,a=(a=a+Math.imul(G,X)|0)+Math.imul(C,Y)|0,t=t+Math.imul(C,X)|0,i=i+Math.imul(v,$)|0,a=(a=a+Math.imul(v,rr)|0)+Math.imul(x,$)|0,t=t+Math.imul(x,rr)|0,i=i+Math.imul(g,nr)|0,a=(a=a+Math.imul(g,ir)|0)+Math.imul(_,nr)|0,t=t+Math.imul(_,ir)|0,i=i+Math.imul(I,tr)|0,a=(a=a+Math.imul(I,or)|0)+Math.imul(y,tr)|0,t=t+Math.imul(y,or)|0;var Gr=(d+(i=i+Math.imul(l,ur)|0)|0)+((8191&(a=(a=a+Math.imul(l,dr)|0)+Math.imul(m,ur)|0))<<13)|0;d=((t=t+Math.imul(m,dr)|0)+(a>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,i=Math.imul(E,H),a=(a=Math.imul(E,L))+Math.imul(N,H)|0,t=Math.imul(N,L),i=i+Math.imul(z,K)|0,a=(a=a+Math.imul(z,V)|0)+Math.imul(w,K)|0,t=t+Math.imul(w,V)|0,i=i+Math.imul(B,W)|0,a=(a=a+Math.imul(B,Z)|0)+Math.imul(k,W)|0,t=t+Math.imul(k,Z)|0,i=i+Math.imul(A,Y)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(b,Y)|0,t=t+Math.imul(b,X)|0,i=i+Math.imul(G,$)|0,a=(a=a+Math.imul(G,rr)|0)+Math.imul(C,$)|0,t=t+Math.imul(C,rr)|0,i=i+Math.imul(v,nr)|0,a=(a=a+Math.imul(v,ir)|0)+Math.imul(x,nr)|0,t=t+Math.imul(x,ir)|0,i=i+Math.imul(g,tr)|0,a=(a=a+Math.imul(g,or)|0)+Math.imul(_,tr)|0,t=t+Math.imul(_,or)|0,i=i+Math.imul(I,ur)|0,a=(a=a+Math.imul(I,dr)|0)+Math.imul(y,ur)|0,t=t+Math.imul(y,dr)|0;var Cr=(d+(i=i+Math.imul(l,lr)|0)|0)+((8191&(a=(a=a+Math.imul(l,mr)|0)+Math.imul(m,lr)|0))<<13)|0;d=((t=t+Math.imul(m,mr)|0)+(a>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,i=Math.imul(D,H),a=(a=Math.imul(D,L))+Math.imul(J,H)|0,t=Math.imul(J,L),i=i+Math.imul(E,K)|0,a=(a=a+Math.imul(E,V)|0)+Math.imul(N,K)|0,t=t+Math.imul(N,V)|0,i=i+Math.imul(z,W)|0,a=(a=a+Math.imul(z,Z)|0)+Math.imul(w,W)|0,t=t+Math.imul(w,Z)|0,i=i+Math.imul(B,Y)|0,a=(a=a+Math.imul(B,X)|0)+Math.imul(k,Y)|0,t=t+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,a=(a=a+Math.imul(A,rr)|0)+Math.imul(b,$)|0,t=t+Math.imul(b,rr)|0,i=i+Math.imul(G,nr)|0,a=(a=a+Math.imul(G,ir)|0)+Math.imul(C,nr)|0,t=t+Math.imul(C,ir)|0,i=i+Math.imul(v,tr)|0,a=(a=a+Math.imul(v,or)|0)+Math.imul(x,tr)|0,t=t+Math.imul(x,or)|0,i=i+Math.imul(g,ur)|0,a=(a=a+Math.imul(g,dr)|0)+Math.imul(_,ur)|0,t=t+Math.imul(_,dr)|0,i=i+Math.imul(I,lr)|0,a=(a=a+Math.imul(I,mr)|0)+Math.imul(y,lr)|0,t=t+Math.imul(y,mr)|0;var Sr=(d+(i=i+Math.imul(l,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(l,yr)|0)+Math.imul(m,Ir)|0))<<13)|0;d=((t=t+Math.imul(m,yr)|0)+(a>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,i=Math.imul(D,K),a=(a=Math.imul(D,V))+Math.imul(J,K)|0,t=Math.imul(J,V),i=i+Math.imul(E,W)|0,a=(a=a+Math.imul(E,Z)|0)+Math.imul(N,W)|0,t=t+Math.imul(N,Z)|0,i=i+Math.imul(z,Y)|0,a=(a=a+Math.imul(z,X)|0)+Math.imul(w,Y)|0,t=t+Math.imul(w,X)|0,i=i+Math.imul(B,$)|0,a=(a=a+Math.imul(B,rr)|0)+Math.imul(k,$)|0,t=t+Math.imul(k,rr)|0,i=i+Math.imul(A,nr)|0,a=(a=a+Math.imul(A,ir)|0)+Math.imul(b,nr)|0,t=t+Math.imul(b,ir)|0,i=i+Math.imul(G,tr)|0,a=(a=a+Math.imul(G,or)|0)+Math.imul(C,tr)|0,t=t+Math.imul(C,or)|0,i=i+Math.imul(v,ur)|0,a=(a=a+Math.imul(v,dr)|0)+Math.imul(x,ur)|0,t=t+Math.imul(x,dr)|0,i=i+Math.imul(g,lr)|0,a=(a=a+Math.imul(g,mr)|0)+Math.imul(_,lr)|0,t=t+Math.imul(_,mr)|0;var Ar=(d+(i=i+Math.imul(I,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(I,yr)|0)+Math.imul(y,Ir)|0))<<13)|0;d=((t=t+Math.imul(y,yr)|0)+(a>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,i=Math.imul(D,W),a=(a=Math.imul(D,Z))+Math.imul(J,W)|0,t=Math.imul(J,Z),i=i+Math.imul(E,Y)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(N,Y)|0,t=t+Math.imul(N,X)|0,i=i+Math.imul(z,$)|0,a=(a=a+Math.imul(z,rr)|0)+Math.imul(w,$)|0,t=t+Math.imul(w,rr)|0,i=i+Math.imul(B,nr)|0,a=(a=a+Math.imul(B,ir)|0)+Math.imul(k,nr)|0,t=t+Math.imul(k,ir)|0,i=i+Math.imul(A,tr)|0,a=(a=a+Math.imul(A,or)|0)+Math.imul(b,tr)|0,t=t+Math.imul(b,or)|0,i=i+Math.imul(G,ur)|0,a=(a=a+Math.imul(G,dr)|0)+Math.imul(C,ur)|0,t=t+Math.imul(C,dr)|0,i=i+Math.imul(v,lr)|0,a=(a=a+Math.imul(v,mr)|0)+Math.imul(x,lr)|0,t=t+Math.imul(x,mr)|0;var br=(d+(i=i+Math.imul(g,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(g,yr)|0)+Math.imul(_,Ir)|0))<<13)|0;d=((t=t+Math.imul(_,yr)|0)+(a>>>13)|0)+(br>>>26)|0,br&=67108863,i=Math.imul(D,Y),a=(a=Math.imul(D,X))+Math.imul(J,Y)|0,t=Math.imul(J,X),i=i+Math.imul(E,$)|0,a=(a=a+Math.imul(E,rr)|0)+Math.imul(N,$)|0,t=t+Math.imul(N,rr)|0,i=i+Math.imul(z,nr)|0,a=(a=a+Math.imul(z,ir)|0)+Math.imul(w,nr)|0,t=t+Math.imul(w,ir)|0,i=i+Math.imul(B,tr)|0,a=(a=a+Math.imul(B,or)|0)+Math.imul(k,tr)|0,t=t+Math.imul(k,or)|0,i=i+Math.imul(A,ur)|0,a=(a=a+Math.imul(A,dr)|0)+Math.imul(b,ur)|0,t=t+Math.imul(b,dr)|0,i=i+Math.imul(G,lr)|0,a=(a=a+Math.imul(G,mr)|0)+Math.imul(C,lr)|0,t=t+Math.imul(C,mr)|0;var Mr=(d+(i=i+Math.imul(v,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(v,yr)|0)+Math.imul(x,Ir)|0))<<13)|0;d=((t=t+Math.imul(x,yr)|0)+(a>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,i=Math.imul(D,$),a=(a=Math.imul(D,rr))+Math.imul(J,$)|0,t=Math.imul(J,rr),i=i+Math.imul(E,nr)|0,a=(a=a+Math.imul(E,ir)|0)+Math.imul(N,nr)|0,t=t+Math.imul(N,ir)|0,i=i+Math.imul(z,tr)|0,a=(a=a+Math.imul(z,or)|0)+Math.imul(w,tr)|0,t=t+Math.imul(w,or)|0,i=i+Math.imul(B,ur)|0,a=(a=a+Math.imul(B,dr)|0)+Math.imul(k,ur)|0,t=t+Math.imul(k,dr)|0,i=i+Math.imul(A,lr)|0,a=(a=a+Math.imul(A,mr)|0)+Math.imul(b,lr)|0,t=t+Math.imul(b,mr)|0;var Br=(d+(i=i+Math.imul(G,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(G,yr)|0)+Math.imul(C,Ir)|0))<<13)|0;d=((t=t+Math.imul(C,yr)|0)+(a>>>13)|0)+(Br>>>26)|0,Br&=67108863,i=Math.imul(D,nr),a=(a=Math.imul(D,ir))+Math.imul(J,nr)|0,t=Math.imul(J,ir),i=i+Math.imul(E,tr)|0,a=(a=a+Math.imul(E,or)|0)+Math.imul(N,tr)|0,t=t+Math.imul(N,or)|0,i=i+Math.imul(z,ur)|0,a=(a=a+Math.imul(z,dr)|0)+Math.imul(w,ur)|0,t=t+Math.imul(w,dr)|0,i=i+Math.imul(B,lr)|0,a=(a=a+Math.imul(B,mr)|0)+Math.imul(k,lr)|0,t=t+Math.imul(k,mr)|0;var kr=(d+(i=i+Math.imul(A,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(A,yr)|0)+Math.imul(b,Ir)|0))<<13)|0;d=((t=t+Math.imul(b,yr)|0)+(a>>>13)|0)+(kr>>>26)|0,kr&=67108863,i=Math.imul(D,tr),a=(a=Math.imul(D,or))+Math.imul(J,tr)|0,t=Math.imul(J,or),i=i+Math.imul(E,ur)|0,a=(a=a+Math.imul(E,dr)|0)+Math.imul(N,ur)|0,t=t+Math.imul(N,dr)|0,i=i+Math.imul(z,lr)|0,a=(a=a+Math.imul(z,mr)|0)+Math.imul(w,lr)|0,t=t+Math.imul(w,mr)|0;var Fr=(d+(i=i+Math.imul(B,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(B,yr)|0)+Math.imul(k,Ir)|0))<<13)|0;d=((t=t+Math.imul(k,yr)|0)+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,i=Math.imul(D,ur),a=(a=Math.imul(D,dr))+Math.imul(J,ur)|0,t=Math.imul(J,dr),i=i+Math.imul(E,lr)|0,a=(a=a+Math.imul(E,mr)|0)+Math.imul(N,lr)|0,t=t+Math.imul(N,mr)|0;var zr=(d+(i=i+Math.imul(z,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(z,yr)|0)+Math.imul(w,Ir)|0))<<13)|0;d=((t=t+Math.imul(w,yr)|0)+(a>>>13)|0)+(zr>>>26)|0,zr&=67108863,i=Math.imul(D,lr),a=(a=Math.imul(D,mr))+Math.imul(J,lr)|0,t=Math.imul(J,mr);var wr=(d+(i=i+Math.imul(E,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(E,yr)|0)+Math.imul(N,Ir)|0))<<13)|0;d=((t=t+Math.imul(N,yr)|0)+(a>>>13)|0)+(wr>>>26)|0,wr&=67108863;var Rr=(d+(i=Math.imul(D,Ir))|0)+((8191&(a=(a=Math.imul(D,yr))+Math.imul(J,Ir)|0))<<13)|0;return d=((t=Math.imul(J,yr))+(a>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,u[0]=fr,u[1]=gr,u[2]=_r,u[3]=hr,u[4]=vr,u[5]=xr,u[6]=Pr,u[7]=Gr,u[8]=Cr,u[9]=Sr,u[10]=Ar,u[11]=br,u[12]=Mr,u[13]=Br,u[14]=kr,u[15]=Fr,u[16]=zr,u[17]=wr,u[18]=Rr,0!==d&&(u[19]=d,n.length++),n};function y(r,e,n){return(new f).mulp(r,e,n)}function f(r,e){this.x=r,this.y=e}Math.imul||(I=p),t.prototype.mulTo=function(r,e){var n,i=this.length+r.length;return n=10===this.length&&10===r.length?I(this,r,e):i<63?p(this,r,e):i<1024?function(r,e,n){n.negative=e.negative^r.negative,n.length=r.length+e.length;for(var i=0,a=0,t=0;t>>26)|0)>>>26,o&=67108863}n.words[t]=c,i=o,o=a}return 0!==i?n.words[t]=i:n.length--,n.strip()}(this,r,e):y(this,r,e),n},f.prototype.makeRBT=function(r){for(var e=new Array(r),n=t.prototype._countBits(r)-1,i=0;i>=1;return i},f.prototype.permute=function(r,e,n,i,a,t){for(var o=0;o>>=1)a++;return 1<>>=13,n[2*o+1]=8191&t,t>>>=13;for(o=2*e;o>=26,e+=a/67108864|0,e+=t>>>26,this.words[n]=67108863&t}return 0!==e&&(this.words[n]=e,this.length++),this},t.prototype.muln=function(r){return this.clone().imuln(r)},t.prototype.sqr=function(){return this.mul(this)},t.prototype.isqr=function(){return this.imul(this.clone())},t.prototype.pow=function(r){var e=function(r){for(var e=new Array(r.bitLength()),n=0;n>>a}return e}(r);if(0===e.length)return new t(1);for(var n=this,i=0;i=0);var e,n=r%26,a=(r-n)/26,t=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==a){for(e=this.length-1;e>=0;e--)this.words[e+a]=this.words[e];for(e=0;e=0),a=e?(e-e%26)/26:0;var t=r%26,o=Math.min((r-t)/26,this.length),c=67108863^67108863>>>t<o)for(this.length-=o,d=0;d=0&&(0!==s||d>=a);d--){var l=0|this.words[d];this.words[d]=s<<26-t|l>>>t,s=l&c}return u&&0!==s&&(u.words[u.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},t.prototype.ishrn=function(r,e,n){return i(0===this.negative),this.iushrn(r,e,n)},t.prototype.shln=function(r){return this.clone().ishln(r)},t.prototype.ushln=function(r){return this.clone().iushln(r)},t.prototype.shrn=function(r){return this.clone().ishrn(r)},t.prototype.ushrn=function(r){return this.clone().iushrn(r)},t.prototype.testn=function(r){i("number"===typeof r&&r>=0);var e=r%26,n=(r-e)/26,a=1<=0);var e=r%26,n=(r-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var a=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},t.prototype.isubn=function(r){if(i("number"===typeof r),i(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[a+n]=67108863&t}for(;a>26,this.words[a+n]=67108863&t;if(0===c)return this.strip();for(i(-1===c),c=0,a=0;a>26,this.words[a]=67108863&t;return this.negative=1,this.strip()},t.prototype._wordDiv=function(r,e){var n=(this.length,r.length),i=this.clone(),a=r,o=0|a.words[a.length-1];0!==(n=26-this._countBits(o))&&(a=a.ushln(n),i.iushln(n),o=0|a.words[a.length-1]);var c,u=i.length-a.length;if("mod"!==e){(c=new t(null)).length=u+1,c.words=new Array(c.length);for(var d=0;d=0;l--){var m=67108864*(0|i.words[a.length+l])+(0|i.words[a.length+l-1]);for(m=Math.min(m/o|0,67108863),i._ishlnsubmul(a,m,l);0!==i.negative;)m--,i.negative=0,i._ishlnsubmul(a,1,l),i.isZero()||(i.negative^=1);c&&(c.words[l]=m)}return c&&c.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:c||null,mod:i}},t.prototype.divmod=function(r,e,n){return i(!r.isZero()),this.isZero()?{div:new t(0),mod:new t(0)}:0!==this.negative&&0===r.negative?(c=this.neg().divmod(r,e),"mod"!==e&&(a=c.div.neg()),"div"!==e&&(o=c.mod.neg(),n&&0!==o.negative&&o.iadd(r)),{div:a,mod:o}):0===this.negative&&0!==r.negative?(c=this.divmod(r.neg(),e),"mod"!==e&&(a=c.div.neg()),{div:a,mod:c.mod}):0!==(this.negative&r.negative)?(c=this.neg().divmod(r.neg(),e),"div"!==e&&(o=c.mod.neg(),n&&0!==o.negative&&o.isub(r)),{div:c.div,mod:o}):r.length>this.length||this.cmp(r)<0?{div:new t(0),mod:this}:1===r.length?"div"===e?{div:this.divn(r.words[0]),mod:null}:"mod"===e?{div:null,mod:new t(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new t(this.modn(r.words[0]))}:this._wordDiv(r,e);var a,o,c},t.prototype.div=function(r){return this.divmod(r,"div",!1).div},t.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},t.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},t.prototype.divRound=function(r){var e=this.divmod(r);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(r):e.mod,i=r.ushrn(1),a=r.andln(1),t=n.cmp(i);return t<0||1===a&&0===t?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},t.prototype.modn=function(r){i(r<=67108863);for(var e=(1<<26)%r,n=0,a=this.length-1;a>=0;a--)n=(e*n+(0|this.words[a]))%r;return n},t.prototype.idivn=function(r){i(r<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*e;this.words[n]=a/r|0,e=a%r}return this.strip()},t.prototype.divn=function(r){return this.clone().idivn(r)},t.prototype.egcd=function(r){i(0===r.negative),i(!r.isZero());var e=this,n=r.clone();e=0!==e.negative?e.umod(r):e.clone();for(var a=new t(1),o=new t(0),c=new t(0),u=new t(1),d=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++d;for(var s=n.clone(),l=e.clone();!e.isZero();){for(var m=0,p=1;0===(e.words[0]&p)&&m<26;++m,p<<=1);if(m>0)for(e.iushrn(m);m-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(s),o.isub(l)),a.iushrn(1),o.iushrn(1);for(var I=0,y=1;0===(n.words[0]&y)&&I<26;++I,y<<=1);if(I>0)for(n.iushrn(I);I-- >0;)(c.isOdd()||u.isOdd())&&(c.iadd(s),u.isub(l)),c.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(c),o.isub(u)):(n.isub(e),c.isub(a),u.isub(o))}return{a:c,b:u,gcd:n.iushln(d)}},t.prototype._invmp=function(r){i(0===r.negative),i(!r.isZero());var e=this,n=r.clone();e=0!==e.negative?e.umod(r):e.clone();for(var a,o=new t(1),c=new t(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var d=0,s=1;0===(e.words[0]&s)&&d<26;++d,s<<=1);if(d>0)for(e.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var l=0,m=1;0===(n.words[0]&m)&&l<26;++l,m<<=1);if(l>0)for(n.iushrn(l);l-- >0;)c.isOdd()&&c.iadd(u),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(c)):(n.isub(e),c.isub(o))}return(a=0===e.cmpn(1)?o:c).cmpn(0)<0&&a.iadd(r),a},t.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var e=this.clone(),n=r.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var a=e.cmp(n);if(a<0){var t=e;e=n,n=t}else if(0===a||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},t.prototype.invm=function(r){return this.egcd(r).a.umod(r)},t.prototype.isEven=function(){return 0===(1&this.words[0])},t.prototype.isOdd=function(){return 1===(1&this.words[0])},t.prototype.andln=function(r){return this.words[0]&r},t.prototype.bincn=function(r){i("number"===typeof r);var e=r%26,n=(r-e)/26,a=1<>>26,c&=67108863,this.words[o]=c}return 0!==t&&(this.words[o]=t,this.length++),this},t.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},t.prototype.cmpn=function(r){var e,n=r<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(r=-r),i(r<=67108863,"Number is too big");var a=0|this.words[0];e=a===r?0:ar.length)return 1;if(this.length=0;n--){var i=0|this.words[n],a=0|r.words[n];if(i!==a){ia&&(e=1);break}}return e},t.prototype.gtn=function(r){return 1===this.cmpn(r)},t.prototype.gt=function(r){return 1===this.cmp(r)},t.prototype.gten=function(r){return this.cmpn(r)>=0},t.prototype.gte=function(r){return this.cmp(r)>=0},t.prototype.ltn=function(r){return-1===this.cmpn(r)},t.prototype.lt=function(r){return-1===this.cmp(r)},t.prototype.lten=function(r){return this.cmpn(r)<=0},t.prototype.lte=function(r){return this.cmp(r)<=0},t.prototype.eqn=function(r){return 0===this.cmpn(r)},t.prototype.eq=function(r){return 0===this.cmp(r)},t.red=function(r){return new G(r)},t.prototype.toRed=function(r){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},t.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},t.prototype._forceRed=function(r){return this.red=r,this},t.prototype.forceRed=function(r){return i(!this.red,"Already a number in reduction context"),this._forceRed(r)},t.prototype.redAdd=function(r){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},t.prototype.redIAdd=function(r){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},t.prototype.redSub=function(r){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},t.prototype.redISub=function(r){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},t.prototype.redShl=function(r){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},t.prototype.redMul=function(r){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},t.prototype.redIMul=function(r){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},t.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},t.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},t.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},t.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},t.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},t.prototype.redPow=function(r){return i(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var g={k256:null,p224:null,p192:null,p25519:null};function _(r,e){this.name=r,this.p=new t(e,16),this.n=this.p.bitLength(),this.k=new t(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function h(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function G(r){if("string"===typeof r){var e=t._prime(r);this.m=e.p,this.prime=e}else i(r.gtn(1),"modulus must be greater than 1"),this.m=r,this.prime=null}function C(r){G.call(this,r),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new t(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)}_.prototype._tmp=function(){var r=new t(null);return r.words=new Array(Math.ceil(this.n/13)),r},_.prototype.ireduce=function(r){var e,n=r;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(r,e){r.iushrn(this.n,0,e)},_.prototype.imulK=function(r){return r.imul(this.k)},a(h,_),h.prototype.split=function(r,e){for(var n=4194303,i=Math.min(r.length,9),a=0;a>>22,t=o}t>>>=22,r.words[a-10]=t,0===t&&r.length>10?r.length-=10:r.length-=9},h.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var e=0,n=0;n>>=26,r.words[n]=a,e=i}return 0!==e&&(r.words[r.length++]=e),r},t._prime=function(r){if(g[r])return g[r];var e;if("k256"===r)e=new h;else if("p224"===r)e=new v;else if("p192"===r)e=new x;else{if("p25519"!==r)throw new Error("Unknown prime "+r);e=new P}return g[r]=e,e},G.prototype._verify1=function(r){i(0===r.negative,"red works only with positives"),i(r.red,"red works only with red numbers")},G.prototype._verify2=function(r,e){i(0===(r.negative|e.negative),"red works only with positives"),i(r.red&&r.red===e.red,"red works only with red numbers")},G.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},G.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},G.prototype.add=function(r,e){this._verify2(r,e);var n=r.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},G.prototype.iadd=function(r,e){this._verify2(r,e);var n=r.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},G.prototype.sub=function(r,e){this._verify2(r,e);var n=r.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},G.prototype.isub=function(r,e){this._verify2(r,e);var n=r.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},G.prototype.shl=function(r,e){return this._verify1(r),this.imod(r.ushln(e))},G.prototype.imul=function(r,e){return this._verify2(r,e),this.imod(r.imul(e))},G.prototype.mul=function(r,e){return this._verify2(r,e),this.imod(r.mul(e))},G.prototype.isqr=function(r){return this.imul(r,r.clone())},G.prototype.sqr=function(r){return this.mul(r,r)},G.prototype.sqrt=function(r){if(r.isZero())return r.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var n=this.m.add(new t(1)).iushrn(2);return this.pow(r,n)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);i(!a.isZero());var c=new t(1).toRed(this),u=c.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new t(2*s*s).toRed(this);0!==this.pow(s,d).cmp(u);)s.redIAdd(u);for(var l=this.pow(s,a),m=this.pow(r,a.addn(1).iushrn(1)),p=this.pow(r,a),I=o;0!==p.cmp(c);){for(var y=p,f=0;0!==y.cmp(c);f++)y=y.redSqr();i(f=0;i--){for(var d=e.words[i],s=u-1;s>=0;s--){var l=d>>s&1;a!==n[0]&&(a=this.sqr(a)),0!==l||0!==o?(o<<=1,o|=l,(4===++c||0===i&&0===s)&&(a=this.mul(a,n[o]),c=0,o=0)):c=0}u=26}return a},G.prototype.convertTo=function(r){var e=r.umod(this.m);return e===r?e.clone():e},G.prototype.convertFrom=function(r){var e=r.clone();return e.red=null,e},t.mont=function(r){return new C(r)},a(C,G),C.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},C.prototype.convertFrom=function(r){var e=this.imod(r.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(r,e){if(r.isZero()||e.isZero())return r.words[0]=0,r.length=1,r;var n=r.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(i).iushrn(this.shift),t=a;return a.cmp(this.m)>=0?t=a.isub(this.m):a.cmpn(0)<0&&(t=a.iadd(this.m)),t._forceRed(this)},C.prototype.mul=function(r,e){if(r.isZero()||e.isZero())return new t(0)._forceRed(this);var n=r.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(i).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)},C.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}}(r=n.nmd(r),this)},6204:function(r){"use strict";r.exports=function(r){var e,n,i,a=r.length,t=0;for(e=0;e>>1;if(!(s<=0)){var l,m=a.mallocDouble(2*s*c),p=a.mallocInt32(c);if((c=u(r,s,m,p))>0){if(1===s&&i)t.init(c),l=t.sweepComplete(s,n,0,c,m,p,0,c,m,p);else{var I=a.mallocDouble(2*s*d),y=a.mallocInt32(d);(d=u(e,s,I,y))>0&&(t.init(c+d),l=1===s?t.sweepBipartite(s,n,0,c,m,p,0,d,I,y):o(s,n,i,c,m,p,d,I,y),a.free(I),a.free(y))}a.free(m),a.free(p)}return l}}}function s(r,e){i.push([r,e])}},2455:function(r,e){"use strict";function n(r){return r?function(r,e,n,i,a,t,o,c,u,d,s){return a-i>u-c?function(r,e,n,i,a,t,o,c,u,d,s){for(var l=2*r,m=i,p=l*i;md-u?i?function(r,e,n,i,a,t,o,c,u,d,s){for(var l=2*r,m=i,p=l*i;m0;){var R=(z-=1)*v,E=P[R],N=P[R+1],T=P[R+2],D=P[R+3],J=P[R+4],U=P[R+5],H=z*x,L=G[H],O=G[H+1],K=1&U,V=!!(16&U),j=s,W=b,Z=B,q=k;if(K&&(j=B,W=k,Z=s,q=b),!(2&U&&N>=(T=f(r,E,N,T,j,W,O)))&&!(4&U&&(N=g(r,E,N,T,j,W,L))>=T)){var Y=T-N,X=J-D;if(V){if(r*Y*(Y+X)=p0)&&!(p1>=hi)"),y=s("lo===p0"),f=s("lo>>1,m=2*r,p=l,I=c[m*l+e];d=h?(p=_,I=h):g>=x?(p=f,I=g):(p=v,I=x):h>=x?(p=_,I=h):x>=g?(p=f,I=g):(p=v,I=x);for(var P=m*(s-1),G=m*p,C=0;Cn&&a[l+e]>d;--s,l-=o){for(var m=l,p=l+o,I=0;Im;++m,u+=c)if(a[u+l]===o)if(s===m)s+=1,d+=c;else{for(var p=0;c>p;++p){var I=a[u+p];a[u+p]=a[d],a[d++]=I}var y=t[m];t[m]=t[s],t[s++]=y}return s},"lom;++m,u+=c)if(a[u+l]p;++p){var I=a[u+p];a[u+p]=a[d],a[d++]=I}var y=t[m];t[m]=t[s],t[s++]=y}return s},"lo<=p0":function(r,e,n,i,a,t,o){for(var c=2*r,u=c*n,d=u,s=n,l=r+e,m=n;i>m;++m,u+=c)if(a[u+l]<=o)if(s===m)s+=1,d+=c;else{for(var p=0;c>p;++p){var I=a[u+p];a[u+p]=a[d],a[d++]=I}var y=t[m];t[m]=t[s],t[s++]=y}return s},"hi<=p0":function(r,e,n,i,a,t,o){for(var c=2*r,u=c*n,d=u,s=n,l=r+e,m=n;i>m;++m,u+=c)if(a[u+l]<=o)if(s===m)s+=1,d+=c;else{for(var p=0;c>p;++p){var I=a[u+p];a[u+p]=a[d],a[d++]=I}var y=t[m];t[m]=t[s],t[s++]=y}return s},"lop;++p,u+=c){var I=a[u+l],y=a[u+m];if(If;++f){var g=a[u+f];a[u+f]=a[d],a[d++]=g}var _=t[p];t[p]=t[s],t[s++]=_}}return s},"lo<=p0&&p0<=hi":function(r,e,n,i,a,t,o){for(var c=2*r,u=c*n,d=u,s=n,l=e,m=r+e,p=n;i>p;++p,u+=c){var I=a[u+l],y=a[u+m];if(I<=o&&o<=y)if(s===p)s+=1,d+=c;else{for(var f=0;c>f;++f){var g=a[u+f];a[u+f]=a[d],a[d++]=g}var _=t[p];t[p]=t[s],t[s++]=_}}return s},"!(lo>=p0)&&!(p1>=hi)":function(r,e,n,i,a,t,o,c){for(var u=2*r,d=u*n,s=d,l=n,m=e,p=r+e,I=n;i>I;++I,d+=u){var y=a[d+m],f=a[d+p];if(!(y>=o)&&!(c>=f))if(l===I)l+=1,s+=u;else{for(var g=0;u>g;++g){var _=a[d+g];a[d+g]=a[s],a[s++]=_}var h=t[I];t[I]=t[l],t[l++]=h}}return l}}},1811:function(r){"use strict";r.exports=function(r,i){i<=4*e?n(0,i-1,r):d(0,i-1,r)};var e=32;function n(r,e,n){for(var i=2*(r+1),a=r+1;a<=e;++a){for(var t=n[i++],o=n[i++],c=a,u=i-2;c-- >r;){var d=n[u-2],s=n[u-1];if(dn[e+1])}function u(r,e,n,i){var a=i[r*=2];return a>1,f=y-m,g=y+m,_=p,h=f,v=y,x=g,P=I,G=r+1,C=s-1,S=0;c(_,h,l)&&(S=_,_=h,h=S),c(x,P,l)&&(S=x,x=P,P=S),c(_,v,l)&&(S=_,_=v,v=S),c(h,v,l)&&(S=h,h=v,v=S),c(_,x,l)&&(S=_,_=x,x=S),c(v,x,l)&&(S=v,v=x,x=S),c(h,P,l)&&(S=h,h=P,P=S),c(h,v,l)&&(S=h,h=v,v=S),c(x,P,l)&&(S=x,x=P,P=S);for(var A=l[2*h],b=l[2*h+1],M=l[2*x],B=l[2*x+1],k=2*_,F=2*v,z=2*P,w=2*p,R=2*y,E=2*I,N=0;N<2;++N){var T=l[k+N],D=l[F+N],J=l[z+N];l[w+N]=T,l[R+N]=D,l[E+N]=J}a(f,r,l),a(g,s,l);for(var U=G;U<=C;++U)if(u(U,A,b,l))U!==G&&i(U,G,l),++G;else if(!u(U,M,B,l))for(;;){if(u(C,M,B,l)){u(C,A,b,l)?(t(U,G,C,l),++G,--C):(i(U,C,l),--C);break}if(--C>>1;t(I,b);var M=0,B=0;for(G=0;G=o)y(s,l,B--,k=k-o|0);else if(k>=0)y(u,d,M--,k);else if(k<=-o){k=-k-o|0;for(var F=0;F>>1;t(I,M);var B=0,k=0,F=0;for(C=0;C>1===I[2*C+3]>>1&&(w=2,C+=1),z<0){for(var R=-(z>>1)-1,E=0;E>1)-1,0===w?y(u,d,B--,R):1===w?y(s,l,k--,R):2===w&&y(m,p,F--,R)}},scanBipartite:function(r,e,n,i,a,c,s,l,m,p,g,_){var h=0,v=2*r,x=e,P=e+r,G=1,C=1;i?C=o:G=o;for(var S=a;S>>1;t(I,B);var k=0;for(S=0;S=o?(z=!i,A-=o):(z=!!i,A-=1),z)f(u,d,k++,A);else{var w=_[A],R=v*A,E=g[R+e+1],N=g[R+e+1+r];r:for(var T=0;T>>1;t(I,G);var C=0;for(h=0;h=o)u[C++]=v-o;else{var A=p[v-=1],b=f*v,M=m[b+e+1],B=m[b+e+1+r];r:for(var k=0;k=0;--k)if(u[k]===v){for(R=k+1;R0;){for(var p=n.pop(),I=(s=-1,l=-1,u=o[c=n.pop()],1);I=0||(e.flip(c,p),a(r,e,n,s,c,l),a(r,e,n,c,l,s),a(r,e,n,l,p,s),a(r,e,n,p,s,l))}}},5023:function(r,e,n){"use strict";var i=n(2478);function a(r,e,n,i,a,t,o){this.cells=r,this.neighbor=e,this.flags=i,this.constraint=n,this.active=a,this.next=t,this.boundary=o}function t(r,e){return r[0]-e[0]||r[1]-e[1]||r[2]-e[2]}r.exports=function(r,e,n){var i=function(r,e){for(var n=r.cells(),i=n.length,o=0;o0||u.length>0;){for(;c.length>0;){var p=c.pop();if(d[p]!==-o){d[p]=o,s[p];for(var I=0;I<3;++I){var y=m[3*p+I];y>=0&&0===d[y]&&(l[3*p+I]?u.push(y):(c.push(y),d[y]=o))}}}var f=u;u=c,c=f,u.length=0,o=-o}var g=function(r,e,n){for(var i=0,a=0;a1&&a(n[m[p-2]],n[m[p-1]],t)>0;)r.push([m[p-1],m[p-2],o]),p-=1;m.length=p,m.push(o);var I=l.upperIds;for(p=I.length;p>1&&a(n[I[p-2]],n[I[p-1]],t)<0;)r.push([I[p-2],I[p-1],o]),p-=1;I.length=p,I.push(o)}}function l(r,e){var n;return(n=r.a[0]y[0]&&a.push(new c(y,I,2,d),new c(I,y,1,d))}a.sort(u);for(var f=a[0].a[0]-(1+Math.abs(a[0].a[0]))*Math.pow(2,-52),g=[new o([f,1],[f,0],-1,[],[],[],[])],_=[],h=(d=0,a.length);d=0}}(),t.removeTriangle=function(r,e,n){var i=this.stars;o(i[r],e,n),o(i[e],n,r),o(i[n],r,e)},t.addTriangle=function(r,e,n){var i=this.stars;i[r].push(e,n),i[e].push(n,r),i[n].push(r,e)},t.opposite=function(r,e){for(var n=this.stars[e],i=1,a=n.length;ie[2]?1:0)}function g(r,e,n){if(0!==r.length){if(e)for(var i=0;i=0;--t){var h=e[s=(b=i[t])[0]],v=h[0],x=h[1],P=r[v],G=r[x];if((P[0]-G[0]||P[1]-G[1])<0){var C=v;v=x,x=C}h[0]=v;var S,A=h[1]=b[1];for(a&&(S=h[2]);t>0&&i[t-1][0]===s;){var b,M=(b=i[--t])[1];a?e.push([A,M,S]):e.push([A,M]),A=M}a?e.push([A,x,S]):e.push([A,x])}return m}(r,e,m,f,n),h=I(r,_);return g(e,h,n),!!h||m.length>0||f.length>0}},3637:function(r,e,n){"use strict";r.exports=function(r,e,n,i){var t=c(e,r),l=c(i,n),m=s(t,l);if(0===o(m))return null;var p=c(r,n),I=s(l,p),y=a(I,m),f=d(t,y);return u(r,f)};var i=n(6504),a=n(8697),t=n(5572),o=n(7721),c=n(544),u=n(2653),d=n(8987);function s(r,e){return t(i(r[0],e[1]),i(r[1],e[0]))}},3642:function(r){r.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]}],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]}]}},6729:function(r,e,n){"use strict";var i=n(3642),a=n(395);function t(r){return[r[0]/255,r[1]/255,r[2]/255,r[3]]}function o(r){for(var e,n="#",i=0;i<3;++i)n+=("00"+(e=(e=r[i]).toString(16))).substr(e.length);return n}function c(r){return"rgba("+r.join(",")+")"}r.exports=function(r){var e,n,u,d,s,l,m,p,I,y;if(r||(r={}),p=(r.nshades||72)-1,m=r.format||"hex",(l=r.colormap)||(l="jet"),"string"===typeof l){if(l=l.toLowerCase(),!i[l])throw Error(l+" not a supported colorscale");s=i[l]}else{if(!Array.isArray(l))throw Error("unsupported colormap option",l);s=l.slice()}if(s.length>p+1)throw new Error(l+" map requires nshades to be at least size "+s.length);I=Array.isArray(r.alpha)?2!==r.alpha.length?[1,1]:r.alpha.slice():"number"===typeof r.alpha?[r.alpha,r.alpha]:[1,1],e=s.map((function(r){return Math.round(r.index*p)})),I[0]=Math.min(Math.max(I[0],0),1),I[1]=Math.min(Math.max(I[1],0),1);var f=s.map((function(r,e){var n=s[e].index,i=s[e].rgb.slice();return 4===i.length&&i[3]>=0&&i[3]<=1||(i[3]=I[0]+(I[1]-I[0])*n),i})),g=[];for(y=0;y0||u(r,e,t)?-1:1:0===c?d>0||u(r,e,n)?1:-1:a(d-c)}var l=i(r,e,n);return l>0?o>0&&i(r,e,t)>0?1:-1:l<0?o>0||i(r,e,t)>0?1:-1:i(r,e,t)>0||u(r,e,n)?1:-1};var i=n(3250),a=n(8572),t=n(9362),o=n(5382),c=n(8210);function u(r,e,n){var i=t(r[0],-e[0]),a=t(r[1],-e[1]),u=t(n[0],-e[0]),d=t(n[1],-e[1]),s=c(o(i,u),o(a,d));return s[s.length-1]>=0}},8572:function(r){"use strict";r.exports=function(r){return r<0?-1:r>0?1:0}},8507:function(r){r.exports=function(r,i){var a=r.length,t=r.length-i.length;if(t)return t;switch(a){case 0:return 0;case 1:return r[0]-i[0];case 2:return r[0]+r[1]-i[0]-i[1]||e(r[0],r[1])-e(i[0],i[1]);case 3:var o=r[0]+r[1],c=i[0]+i[1];if(t=o+r[2]-(c+i[2]))return t;var u=e(r[0],r[1]),d=e(i[0],i[1]);return e(u,r[2])-e(d,i[2])||e(u+r[2],o)-e(d+i[2],c);case 4:var s=r[0],l=r[1],m=r[2],p=r[3],I=i[0],y=i[1],f=i[2],g=i[3];return s+l+m+p-(I+y+f+g)||e(s,l,m,p)-e(I,y,f,g,I)||e(s+l,s+m,s+p,l+m,l+p,m+p)-e(I+y,I+f,I+g,y+f,y+g,f+g)||e(s+l+m,s+l+p,s+m+p,l+m+p)-e(I+y+f,I+y+g,I+f+g,y+f+g);default:for(var _=r.slice().sort(n),h=i.slice().sort(n),v=0;vr[n][0]&&(n=i);return en?[[n],[e]]:[[e]]}},4750:function(r,e,n){"use strict";r.exports=function(r){var e=i(r),n=e.length;if(n<=2)return[];for(var a=new Array(n),t=e[n-1],o=0;o=e[u]&&(c+=1);t[o]=c}}return r}(i(t,!0),n)}};var i=n(8954),a=n(3952)},4769:function(r){"use strict";r.exports=function(r,e,n,i,a,t){var o=a-1,c=a*a,u=o*o,d=(1+2*a)*u,s=a*u,l=c*(3-2*a),m=c*o;if(r.length){t||(t=new Array(r.length));for(var p=r.length-1;p>=0;--p)t[p]=d*r[p]+s*e[p]+l*n[p]+m*i[p];return t}return d*r+s*e+l*n+m*i},r.exports.derivative=function(r,e,n,i,a,t){var o=6*a*a-6*a,c=3*a*a-4*a+1,u=-6*a*a+6*a,d=3*a*a-2*a;if(r.length){t||(t=new Array(r.length));for(var s=r.length-1;s>=0;--s)t[s]=o*r[s]+c*e[s]+u*n[s]+d*i[s];return t}return o*r+c*e+u*n[s]+d*i}},7642:function(r,e,n){"use strict";var i=n(8954),a=n(1682);function t(r,e){this.point=r,this.index=e}function o(r,e){for(var n=r.point,i=e.point,a=n.length,t=0;t=2)return!1;r[n]=i}return!0})):x.filter((function(r){for(var e=0;e<=c;++e){var n=g[r[e]];if(n<0)return!1;r[e]=n}return!0})),1&c)for(s=0;s>>31},r.exports.exponent=function(e){return(r.exports.hi(e)<<1>>>21)-1023},r.exports.fraction=function(e){var n=r.exports.lo(e),i=r.exports.hi(e),a=1048575&i;return 2146435072&i&&(a+=1<<20),[n,a]},r.exports.denormalized=function(e){return!(2146435072&r.exports.hi(e))}},1338:function(r){"use strict";function e(r,n,i){var a=0|r[i];if(a<=0)return[];var t,o=new Array(a);if(i===r.length-1)for(t=0;t0)return function(r,e){var n,i;for(n=new Array(r),i=0;i=n-1){m=u.length-1;var I=r-e[n-1];for(p=0;p=n-1)for(var s=c.length-1,l=(e[n-1],0);l=0;--n)if(r[--e])return!1;return!0},c.jump=function(r){var e=this.lastT(),n=this.dimension;if(!(r0;--l)i.push(t(u[l-1],d[l-1],arguments[l])),a.push(0)}},c.push=function(r){var e=this.lastT(),n=this.dimension;if(!(r1e-6?1/c:0;this._time.push(r);for(var m=n;m>0;--m){var p=t(d[m-1],s[m-1],arguments[m]);i.push(p),a.push((p-i[o++])*l)}}},c.set=function(r){var e=this.dimension;if(!(r0;--u)n.push(t(o[u-1],c[u-1],arguments[u])),i.push(0)}},c.move=function(r){var e=this.lastT(),n=this.dimension;if(!(r<=e||arguments.length!==n+1)){var i=this._state,a=this._velocity,o=i.length-this.dimension,c=this.bounds,u=c[0],d=c[1],s=r-e,l=s>1e-6?1/s:0;this._time.push(r);for(var m=n;m>0;--m){var p=arguments[m];i.push(t(u[m-1],d[m-1],i[o++]+p)),a.push(p*l)}}},c.idle=function(r){var e=this.lastT();if(!(r=0;--l)i.push(t(u[l],d[l],i[o]+s*a[o])),a.push(0),o+=1}}},3840:function(r){"use strict";function e(r,e,n,i,a,t){this._color=r,this.key=e,this.value=n,this.left=i,this.right=a,this._count=t}function n(r){return new e(r._color,r.key,r.value,r.left,r.right,r._count)}function i(r,n){return new e(r,n.key,n.value,n.left,n.right,n._count)}function a(r){r._count=1+(r.left?r.left._count:0)+(r.right?r.right._count:0)}function t(r,e){this._compare=r,this.root=e}r.exports=function(r){return new t(r||p,null)};var o=t.prototype;function c(r,e){var n;return e.left&&(n=c(r,e.left))?n:(n=r(e.key,e.value))||(e.right?c(r,e.right):void 0)}function u(r,e,n,i){if(e(r,i.key)<=0){var a;if(i.left&&(a=u(r,e,n,i.left)))return a;if(a=n(i.key,i.value))return a}if(i.right)return u(r,e,n,i.right)}function d(r,e,n,i,a){var t,o=n(r,a.key),c=n(e,a.key);if(o<=0){if(a.left&&(t=d(r,e,n,i,a.left)))return t;if(c>0&&(t=i(a.key,a.value)))return t}if(c>0&&a.right)return d(r,e,n,i,a.right)}function s(r,e){this.tree=r,this._stack=e}Object.defineProperty(o,"keys",{get:function(){var r=[];return this.forEach((function(e,n){r.push(e)})),r}}),Object.defineProperty(o,"values",{get:function(){var r=[];return this.forEach((function(e,n){r.push(n)})),r}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(r,n){for(var o=this._compare,c=this.root,u=[],d=[];c;){var s=o(r,c.key);u.push(c),d.push(s),c=s<=0?c.left:c.right}u.push(new e(0,r,n,null,null,1));for(var l=u.length-2;l>=0;--l)c=u[l],d[l]<=0?u[l]=new e(c._color,c.key,c.value,u[l+1],c.right,c._count+1):u[l]=new e(c._color,c.key,c.value,c.left,u[l+1],c._count+1);for(l=u.length-1;l>1;--l){var m=u[l-1];if(c=u[l],1===m._color||1===c._color)break;var p=u[l-2];if(p.left===m)if(m.left===c){if(!(I=p.right)||0!==I._color){p._color=0,p.left=m.right,m._color=1,m.right=p,u[l-2]=m,u[l-1]=c,a(p),a(m),l>=3&&((y=u[l-3]).left===p?y.left=m:y.right=m);break}m._color=1,p.right=i(1,I),p._color=0,l-=1}else{if(!(I=p.right)||0!==I._color){m.right=c.left,p._color=0,p.left=c.right,c._color=1,c.left=m,c.right=p,u[l-2]=c,u[l-1]=m,a(p),a(m),a(c),l>=3&&((y=u[l-3]).left===p?y.left=c:y.right=c);break}m._color=1,p.right=i(1,I),p._color=0,l-=1}else if(m.right===c){if(!(I=p.left)||0!==I._color){p._color=0,p.right=m.left,m._color=1,m.left=p,u[l-2]=m,u[l-1]=c,a(p),a(m),l>=3&&((y=u[l-3]).right===p?y.right=m:y.left=m);break}m._color=1,p.left=i(1,I),p._color=0,l-=1}else{var I;if(!(I=p.left)||0!==I._color){var y;m.left=c.right,p._color=0,p.right=c.left,c._color=1,c.right=m,c.left=p,u[l-2]=c,u[l-1]=m,a(p),a(m),a(c),l>=3&&((y=u[l-3]).right===p?y.right=c:y.left=c);break}m._color=1,p.left=i(1,I),p._color=0,l-=1}}return u[0]._color=1,new t(o,u[0])},o.forEach=function(r,e,n){if(this.root)switch(arguments.length){case 1:return c(r,this.root);case 2:return u(e,this._compare,r,this.root);case 3:if(this._compare(e,n)>=0)return;return d(e,n,this._compare,r,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var r=[],e=this.root;e;)r.push(e),e=e.left;return new s(this,r)}}),Object.defineProperty(o,"end",{get:function(){for(var r=[],e=this.root;e;)r.push(e),e=e.right;return new s(this,r)}}),o.at=function(r){if(r<0)return new s(this,[]);for(var e=this.root,n=[];;){if(n.push(e),e.left){if(r=e.right._count)break;e=e.right}return new s(this,[])},o.ge=function(r){for(var e=this._compare,n=this.root,i=[],a=0;n;){var t=e(r,n.key);i.push(n),t<=0&&(a=i.length),n=t<=0?n.left:n.right}return i.length=a,new s(this,i)},o.gt=function(r){for(var e=this._compare,n=this.root,i=[],a=0;n;){var t=e(r,n.key);i.push(n),t<0&&(a=i.length),n=t<0?n.left:n.right}return i.length=a,new s(this,i)},o.lt=function(r){for(var e=this._compare,n=this.root,i=[],a=0;n;){var t=e(r,n.key);i.push(n),t>0&&(a=i.length),n=t<=0?n.left:n.right}return i.length=a,new s(this,i)},o.le=function(r){for(var e=this._compare,n=this.root,i=[],a=0;n;){var t=e(r,n.key);i.push(n),t>=0&&(a=i.length),n=t<0?n.left:n.right}return i.length=a,new s(this,i)},o.find=function(r){for(var e=this._compare,n=this.root,i=[];n;){var a=e(r,n.key);if(i.push(n),0===a)return new s(this,i);n=a<=0?n.left:n.right}return new s(this,[])},o.remove=function(r){var e=this.find(r);return e?e.remove():this},o.get=function(r){for(var e=this._compare,n=this.root;n;){var i=e(r,n.key);if(0===i)return n.value;n=i<=0?n.left:n.right}};var l=s.prototype;function m(r,e){r.key=e.key,r.value=e.value,r.left=e.left,r.right=e.right,r._color=e._color,r._count=e._count}function p(r,e){return re?1:0}Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new s(this.tree,this._stack.slice())},l.remove=function(){var r=this._stack;if(0===r.length)return this.tree;var o=new Array(r.length),c=r[r.length-1];o[o.length-1]=new e(c._color,c.key,c.value,c.left,c.right,c._count);for(var u=r.length-2;u>=0;--u)(c=r[u]).left===r[u+1]?o[u]=new e(c._color,c.key,c.value,o[u+1],c.right,c._count):o[u]=new e(c._color,c.key,c.value,c.left,o[u+1],c._count);if((c=o[o.length-1]).left&&c.right){var d=o.length;for(c=c.left;c.right;)o.push(c),c=c.right;var s=o[d-1];for(o.push(new e(c._color,s.key,s.value,c.left,c.right,c._count)),o[d-1].key=c.key,o[d-1].value=c.value,u=o.length-2;u>=d;--u)c=o[u],o[u]=new e(c._color,c.key,c.value,c.left,o[u+1],c._count);o[d-1].left=o[d]}if(0===(c=o[o.length-1])._color){var l=o[o.length-2];for(l.left===c?l.left=null:l.right===c&&(l.right=null),o.pop(),u=0;u=0;--u){if(e=r[u],0===u)return void(e._color=1);if((t=r[u-1]).left===e){if((o=t.right).right&&0===o.right._color)return c=(o=t.right=n(o)).right=n(o.right),t.right=o.left,o.left=t,o.right=c,o._color=t._color,e._color=1,t._color=1,c._color=1,a(t),a(o),u>1&&((d=r[u-2]).left===t?d.left=o:d.right=o),void(r[u-1]=o);if(o.left&&0===o.left._color)return c=(o=t.right=n(o)).left=n(o.left),t.right=c.left,o.left=c.right,c.left=t,c.right=o,c._color=t._color,t._color=1,o._color=1,e._color=1,a(t),a(o),a(c),u>1&&((d=r[u-2]).left===t?d.left=c:d.right=c),void(r[u-1]=c);if(1===o._color){if(0===t._color)return t._color=1,void(t.right=i(0,o));t.right=i(0,o);continue}o=n(o),t.right=o.left,o.left=t,o._color=t._color,t._color=0,a(t),a(o),u>1&&((d=r[u-2]).left===t?d.left=o:d.right=o),r[u-1]=o,r[u]=t,u+11&&((d=r[u-2]).right===t?d.right=o:d.left=o),void(r[u-1]=o);if(o.right&&0===o.right._color)return c=(o=t.left=n(o)).right=n(o.right),t.left=c.right,o.right=c.left,c.right=t,c.left=o,c._color=t._color,t._color=1,o._color=1,e._color=1,a(t),a(o),a(c),u>1&&((d=r[u-2]).right===t?d.right=c:d.left=c),void(r[u-1]=c);if(1===o._color){if(0===t._color)return t._color=1,void(t.left=i(0,o));t.left=i(0,o);continue}var d;o=n(o),t.left=o.right,o.right=t,o._color=t._color,t._color=0,a(t),a(o),u>1&&((d=r[u-2]).right===t?d.right=o:d.left=o),r[u-1]=o,r[u]=t,u+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var r=0,e=this._stack;if(0===e.length){var n=this.tree.root;return n?n._count:0}e[e.length-1].left&&(r=e[e.length-1].left._count);for(var i=e.length-2;i>=0;--i)e[i+1]===e[i].right&&(++r,e[i].left&&(r+=e[i].left._count));return r},enumerable:!0}),l.next=function(){var r=this._stack;if(0!==r.length){var e=r[r.length-1];if(e.right)for(e=e.right;e;)r.push(e),e=e.left;else for(r.pop();r.length>0&&r[r.length-1].right===e;)e=r[r.length-1],r.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var r=this._stack;if(0===r.length)return!1;if(r[r.length-1].right)return!0;for(var e=r.length-1;e>0;--e)if(r[e-1].left===r[e])return!0;return!1}}),l.update=function(r){var n=this._stack;if(0===n.length)throw new Error("Can't update empty node!");var i=new Array(n.length),a=n[n.length-1];i[i.length-1]=new e(a._color,a.key,r,a.left,a.right,a._count);for(var o=n.length-2;o>=0;--o)(a=n[o]).left===n[o+1]?i[o]=new e(a._color,a.key,a.value,i[o+1],a.right,a._count):i[o]=new e(a._color,a.key,a.value,a.left,i[o+1],a._count);return new t(this.tree._compare,i[0])},l.prev=function(){var r=this._stack;if(0!==r.length){var e=r[r.length-1];if(e.left)for(e=e.left;e;)r.push(e),e=e.right;else for(r.pop();r.length>0&&r[r.length-1].left===e;)e=r[r.length-1],r.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var r=this._stack;if(0===r.length)return!1;if(r[r.length-1].left)return!0;for(var e=r.length-1;e>0;--e)if(r[e-1].right===r[e])return!0;return!1}})},3837:function(r,e,n){"use strict";r.exports=function(r,e){var n=new p(r);return n.update(e),n};var i=n(4935),a=n(501),t=n(5304),o=n(6429),c=n(6444),u=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,s=DataView;function l(r){return Array.isArray(r)||function(r){return d.isView(r)&&!(r instanceof s)}(r)}function m(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function p(r){this.gl=r,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.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],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","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],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=t(r)}var I=p.prototype;function y(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}I.update=function(r){function e(e,n,i){if(i in r){var a,t=r[i],o=this[i];(e?l(t)&&l(t[0]):l(t))?this[i]=a=[n(t[0]),n(t[1]),n(t[2])]:this[i]=a=[n(t),n(t),n(t)];for(var c=0;c<3;++c)if(a[c]!==o[c])return!0}return!1}r=r||{};var n,t=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),u=e.bind(this,!1,String),d=e.bind(this,!0,(function(r){if(l(r)){if(3===r.length)return[+r[0],+r[1],+r[2],1];if(4===r.length)return[+r[0],+r[1],+r[2],+r[3]]}return[0,0,0,1]})),s=!1,m=!1;if("bounds"in r)for(var p=r.bounds,I=0;I<2;++I)for(var y=0;y<3;++y)p[I][y]!==this.bounds[I][y]&&(m=!0),this.bounds[I][y]=p[I][y];if("ticks"in r)for(n=r.ticks,s=!0,this.autoTicks=!1,I=0;I<3;++I)this.tickSpacing[I]=0;else t("tickSpacing")&&(this.autoTicks=!0,m=!0);if(this._firstInit&&("ticks"in r||"tickSpacing"in r||(this.autoTicks=!0),m=!0,s=!0,this._firstInit=!1),m&&this.autoTicks&&(n=c.create(this.bounds,this.tickSpacing),s=!0),s){for(I=0;I<3;++I)n[I].sort((function(r,e){return r.x-e.x}));c.equal(n,this.ticks)?s=!1:this.ticks=n}o("tickEnable"),u("tickFont")&&(s=!0),u("tickFontStyle")&&(s=!0),u("tickFontWeight")&&(s=!0),u("tickFontVariant")&&(s=!0),t("tickSize"),t("tickAngle"),t("tickPad"),d("tickColor");var f=u("labels");u("labelFont")&&(f=!0),u("labelFontStyle")&&(f=!0),u("labelFontWeight")&&(f=!0),u("labelFontVariant")&&(f=!0),o("labelEnable"),t("labelSize"),t("labelPad"),d("labelColor"),o("lineEnable"),o("lineMirror"),t("lineWidth"),d("lineColor"),o("lineTickEnable"),o("lineTickMirror"),t("lineTickLength"),t("lineTickWidth"),d("lineTickColor"),o("gridEnable"),t("gridWidth"),d("gridColor"),o("zeroEnable"),d("zeroLineColor"),t("zeroLineWidth"),o("backgroundEnable"),d("backgroundColor");var g=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],_=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(f||s)&&this._text.update(this.bounds,this.labels,g,this.ticks,_):this._text=i(this.gl,this.bounds,this.labels,g,this.ticks,_),this._lines&&s&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};var f=[new y,new y,new y];function g(r,e,n,i,a){for(var t=r.primalOffset,o=r.primalMinor,c=r.mirrorOffset,u=r.mirrorMinor,d=i[e],s=0;s<3;++s)if(e!==s){var l=t,m=c,p=o,I=u;d&1<0?(p[s]=-1,I[s]=0):(p[s]=0,I[s]=1)}}var _=[0,0,0],h={model:u,view:u,projection:u,_ortho:!1};I.isOpaque=function(){return!0},I.isTransparent=function(){return!1},I.drawTransparent=function(r){};var v=[0,0,0],x=[0,0,0],P=[0,0,0];I.draw=function(r){r=r||h;for(var e=this.gl,n=r.model||u,i=r.view||u,a=r.projection||u,t=this.bounds,c=r._ortho||!1,d=o(n,i,a,t,c),s=d.cubeEdges,l=d.axis,p=i[12],I=i[13],y=i[14],G=i[15],C=(c?2:1)*this.pixelRatio*(a[3]*p+a[7]*I+a[11]*y+a[15]*G)/e.drawingBufferHeight,S=0;S<3;++S)this.lastCubeProps.cubeEdges[S]=s[S],this.lastCubeProps.axis[S]=l[S];var A=f;for(S=0;S<3;++S)g(f[S],S,this.bounds,s,l);e=this.gl;var b,M,B,k=_;for(S=0;S<3;++S)this.backgroundEnable[S]?k[S]=l[S]:k[S]=0;for(this._background.draw(n,i,a,t,k,this.backgroundColor),this._lines.bind(n,i,a,this),S=0;S<3;++S){var F=[0,0,0];l[S]>0?F[S]=t[1][S]:F[S]=t[0][S];for(var z=0;z<2;++z){var w=(S+1+z)%3,R=(S+1+(1^z))%3;this.gridEnable[w]&&this._lines.drawGrid(w,R,this.bounds,F,this.gridColor[w],this.gridWidth[w]*this.pixelRatio)}for(z=0;z<2;++z)w=(S+1+z)%3,R=(S+1+(1^z))%3,this.zeroEnable[R]&&Math.min(t[0][R],t[1][R])<=0&&Math.max(t[0][R],t[1][R])>=0&&this._lines.drawZero(w,R,this.bounds,F,this.zeroLineColor[R],this.zeroLineWidth[R]*this.pixelRatio)}for(S=0;S<3;++S){this.lineEnable[S]&&this._lines.drawAxisLine(S,this.bounds,A[S].primalOffset,this.lineColor[S],this.lineWidth[S]*this.pixelRatio),this.lineMirror[S]&&this._lines.drawAxisLine(S,this.bounds,A[S].mirrorOffset,this.lineColor[S],this.lineWidth[S]*this.pixelRatio);var E=m(v,A[S].primalMinor),N=m(x,A[S].mirrorMinor),T=this.lineTickLength;for(z=0;z<3;++z){var D=C/n[5*z];E[z]*=T[z]*D,N[z]*=T[z]*D}this.lineTickEnable[S]&&this._lines.drawAxisTicks(S,A[S].primalOffset,E,this.lineTickColor[S],this.lineTickWidth[S]*this.pixelRatio),this.lineTickMirror[S]&&this._lines.drawAxisTicks(S,A[S].mirrorOffset,N,this.lineTickColor[S],this.lineTickWidth[S]*this.pixelRatio)}function J(r){(B=[0,0,0])[r]=1}function U(r,e,n){var i=(r+1)%3,a=(r+2)%3,t=e[i],o=e[a],c=n[i],u=n[a];t>0&&u>0||t>0&&u<0||t<0&&u>0||t<0&&u<0?J(i):(o>0&&c>0||o>0&&c<0||o<0&&c>0||o<0&&c<0)&&J(a)}for(this._lines.unbind(),this._text.bind(n,i,a,this.pixelRatio),S=0;S<3;++S){var H=A[S].primalMinor,L=A[S].mirrorMinor,O=m(P,A[S].primalOffset);for(z=0;z<3;++z)this.lineTickEnable[S]&&(O[z]+=C*H[z]*Math.max(this.lineTickLength[z],0)/n[5*z]);var K=[0,0,0];if(K[S]=1,this.tickEnable[S]){for(-3600===this.tickAngle[S]?(this.tickAngle[S]=0,this.tickAlign[S]="auto"):this.tickAlign[S]=-1,M=1,"auto"===(b=[this.tickAlign[S],.5,M])[0]?b[0]=0:b[0]=parseInt(""+b[0]),B=[0,0,0],U(S,H,L),z=0;z<3;++z)O[z]+=C*H[z]*this.tickPad[z]/n[5*z];this._text.drawTicks(S,this.tickSize[S],this.tickAngle[S],O,this.tickColor[S],K,B,b)}if(this.labelEnable[S]){for(M=0,B=[0,0,0],this.labels[S].length>4&&(J(S),M=1),"auto"===(b=[this.labelAlign[S],.5,M])[0]?b[0]=0:b[0]=parseInt(""+b[0]),z=0;z<3;++z)O[z]+=C*H[z]*this.labelPad[z]/n[5*z];O[S]+=.5*(t[0][S]+t[1][S]),this._text.drawLabel(S,this.labelSize[S],this.labelAngle[S],O,this.labelColor[S],[0,0,0],B,b)}}this._text.unbind()},I.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(r,e,n){"use strict";r.exports=function(r){for(var e=[],n=[],c=0,u=0;u<3;++u)for(var d=(u+1)%3,s=(u+2)%3,l=[0,0,0],m=[0,0,0],p=-1;p<=1;p+=2){n.push(c,c+2,c+1,c+1,c+2,c+3),l[u]=p,m[u]=p;for(var I=-1;I<=1;I+=2){l[d]=I;for(var y=-1;y<=1;y+=2)l[s]=y,e.push(l[0],l[1],l[2],m[0],m[1],m[2]),c+=1}var f=d;d=s,s=f}var g=i(r,new Float32Array(e)),_=i(r,new Uint16Array(n),r.ELEMENT_ARRAY_BUFFER),h=a(r,[{buffer:g,type:r.FLOAT,size:3,offset:0,stride:24},{buffer:g,type:r.FLOAT,size:3,offset:12,stride:24}],_),v=t(r);return v.attributes.position.location=0,v.attributes.normal.location=1,new o(r,g,h,v)};var i=n(2762),a=n(8116),t=n(1879).bg;function o(r,e,n,i){this.gl=r,this.buffer=e,this.vao=n,this.shader=i}var c=o.prototype;c.draw=function(r,e,n,i,a,t){for(var o=!1,c=0;c<3;++c)o=o||a[c];if(o){var u=this.gl;u.enable(u.POLYGON_OFFSET_FILL),u.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:r,view:e,projection:n,bounds:i,enable:a,colors:t},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),u.disable(u.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(r,e,n){"use strict";r.exports=function(r,e,n,t,p){a(c,e,r),a(c,n,c);for(var _=0,h=0;h<2;++h){s[2]=t[h][2];for(var v=0;v<2;++v){s[1]=t[v][1];for(var x=0;x<2;++x)s[0]=t[x][0],m(u[_],s,c),_+=1}}var P=-1;for(h=0;h<8;++h){for(var G=u[h][3],C=0;C<3;++C)d[h][C]=u[h][C]/G;p&&(d[h][2]*=-1),G<0&&(P<0||d[h][2]M&&(P|=1<M&&(P|=1<d[h][1])&&(N=h);var T=-1;for(h=0;h<3;++h)(J=N^1<d[D][0]&&(D=J))}var U=y;U[0]=U[1]=U[2]=0,U[i.log2(T^N)]=N&T,U[i.log2(N^D)]=N&D;var H=7^D;H===P||H===E?(H=7^T,U[i.log2(D^H)]=H&D):U[i.log2(T^H)]=H&T;var L=f,O=P;for(S=0;S<3;++S)L[S]=O&1< 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}\n"]),u=i(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.Q=function(r){return a(r,c,u,null,[{name:"position",type:"vec3"}])};var d=i(["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}\n"]),s=i(["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}"]);e.bg=function(r){return a(r,d,s,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(r,e,n){"use strict";r.exports=function(r,e,n,i,o,u){var d=a(r),l=t(r,[{buffer:d,size:3}]),m=c(r);m.attributes.position.location=0;var p=new s(r,m,d,l);return p.update(e,n,i,o,u),p};var a=n(2762),t=n(8116),o=n(4359),c=n(1879).Q,u=window||i.global||{},d=u.__TEXT_CACHE||{};function s(r,e,n,i){this.gl=r,this.shader=e,this.buffer=n,this.vao=i,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}u.__TEXT_CACHE={};var l=s.prototype,m=[0,0];l.bind=function(r,e,n,i){this.vao.bind(),this.shader.bind();var a=this.shader.uniforms;a.model=r,a.view=e,a.projection=n,a.pixelScale=i,m[0]=this.gl.drawingBufferWidth,m[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=m},l.unbind=function(){this.vao.unbind()},l.update=function(r,e,n,i,a){var t=[];function c(r,e,n,i,a,c){var u=[n.style,n.weight,n.variant,n.family].join("_"),s=d[u];s||(s=d[u]={});var l=s[e];l||(l=s[e]=function(r,e){try{return o(r,e)}catch(n){return console.warn('error vectorizing text:"'+r+'" error:',n),{cells:[],positions:[]}}}(e,{triangles:!0,font:n.family,fontStyle:n.style,fontWeight:n.weight,fontVariant:n.variant,textAlign:"center",textBaseline:"middle",lineSpacing:a,styletags:c}));for(var m=(i||12)/12,p=l.positions,I=l.cells,y=0,f=I.length;y=0;--_){var h=p[g[_]];t.push(m*h[0],-m*h[1],r)}}for(var u=[0,0,0],s=[0,0,0],l=[0,0,0],m=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},I=0;I<3;++I){l[I]=t.length/3|0,c(.5*(r[0][I]+r[1][I]),e[I],n[I],12,1.25,p),m[I]=(t.length/3|0)-l[I],u[I]=t.length/3|0;for(var y=0;y=0&&(a=n.length-i-1);var t=Math.pow(10,a),o=Math.round(r*e*t),c=o+"";if(c.indexOf("e")>=0)return c;var u=o/t,d=o%t;o<0?(u=0|-Math.ceil(u),d=0|-d):(u=0|Math.floor(u),d|=0);var s=""+u;if(o<0&&(s="-"+s),a){for(var l=""+d;l.length=r[0][a];--o)t.push({x:o*e[a],text:n(e[a],o)});i.push(t)}return i},e.equal=function(r,e){for(var n=0;n<3;++n){if(r[n].length!==e[n].length)return!1;for(var i=0;in)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return r.bufferSubData(e,t,a),n}function s(r,e){for(var n=i.malloc(r.length,e),a=r.length,t=0;t=0;--i){if(e[i]!==n)return!1;n*=r[i]}return!0}(r.shape,r.stride))0===r.offset&&r.data.length===r.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,r.data,e):this.length=d(this.gl,this.type,this.length,this.usage,r.data.subarray(r.offset,r.shape[0]),e);else{var c=i.malloc(r.size,n),u=t(c,r.shape);a.assign(u,r),this.length=d(this.gl,this.type,this.length,this.usage,e<0?c:c.subarray(0,r.size),e),i.free(c)}}else if(Array.isArray(r)){var l;l=this.type===this.gl.ELEMENT_ARRAY_BUFFER?s(r,"uint16"):s(r,"float32"),this.length=d(this.gl,this.type,this.length,this.usage,e<0?l:l.subarray(0,r.length),e),i.free(l)}else if("object"===typeof r&&"number"===typeof r.length)this.length=d(this.gl,this.type,this.length,this.usage,r,e);else{if("number"!==typeof r&&void 0!==r)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(r|=0)<=0&&(r=1),this.gl.bufferData(this.type,0|r,this.usage),this.length=r}},r.exports=function(r,e,n,i){if(n=n||r.ARRAY_BUFFER,i=i||r.DYNAMIC_DRAW,n!==r.ARRAY_BUFFER&&n!==r.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(i!==r.DYNAMIC_DRAW&&i!==r.STATIC_DRAW&&i!==r.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=r.createBuffer(),t=new c(r,n,a,0,i);return t.update(e),t}},6405:function(r,e,n){"use strict";var i=n(2931);r.exports=function(r,e){var n=r.positions,a=r.vectors,t={positions:[],vertexIntensity:[],vertexIntensityBounds:r.vertexIntensityBounds,vectors:[],cells:[],coneOffset:r.coneOffset,colormap:r.colormap};if(0===r.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),t;for(var o=0,c=1/0,u=-1/0,d=1/0,s=-1/0,l=1/0,m=-1/0,p=null,I=null,y=[],f=1/0,g=!1,_="raw"===r.coneSizemode,h=0;ho&&(o=i.length(x)),h&&!_){var P=2*i.distance(p,v)/(i.length(I)+i.length(x));P?(f=Math.min(f,P),g=!1):g=!0}g||(p=v,I=x),y.push(x)}var G=[c,d,l],C=[u,s,m];e&&(e[0]=G,e[1]=C),0===o&&(o=1);var S=1/o;isFinite(f)||(f=1),t.vectorScale=f;var A=r.coneSize||(_?1:.5);r.absoluteConeSize&&(A=r.absoluteConeSize*S),t.coneScale=A,h=0;for(var b=0;h=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(r){this.pickId=r},p.update=function(r){r=r||{};var e=this.gl;this.dirty=!0,"lightPosition"in r&&(this.lightPosition=r.lightPosition),"opacity"in r&&(this.opacity=r.opacity),"ambient"in r&&(this.ambientLight=r.ambient),"diffuse"in r&&(this.diffuseLight=r.diffuse),"specular"in r&&(this.specularLight=r.specular),"roughness"in r&&(this.roughness=r.roughness),"fresnel"in r&&(this.fresnel=r.fresnel),void 0!==r.tubeScale&&(this.tubeScale=r.tubeScale),void 0!==r.vectorScale&&(this.vectorScale=r.vectorScale),void 0!==r.coneScale&&(this.coneScale=r.coneScale),void 0!==r.coneOffset&&(this.coneOffset=r.coneOffset),r.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(r){for(var e=s({colormap:r,nshades:256,format:"rgba"}),n=new Uint8Array(1024),i=0;i<256;++i){for(var a=e[i],t=0;t<3;++t)n[4*i+t]=a[t];n[4*i+3]=255*a[3]}return d(n,[256,256,4],[4,0,1])}(r.colormap)),this.texture.generateMipmap());var n=r.cells,i=r.positions,a=r.vectors;if(i&&n&&a){var t=[],o=[],c=[],u=[],l=[];this.cells=n,this.positions=i,this.vectors=a;var m=r.meshColor||[1,1,1,1],p=r.vertexIntensity,I=1/0,y=-1/0;if(p)if(r.vertexIntensityBounds)I=+r.vertexIntensityBounds[0],y=+r.vertexIntensityBounds[1];else for(var f=0;f0){var y=this.triShader;y.bind(),y.uniforms=d,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(r){r=r||{};for(var e=this.gl,n=r.model||l,i=r.view||l,a=r.projection||l,t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)t[0][o]=Math.max(t[0][o],this.clipBounds[0][o]),t[1][o]=Math.min(t[1][o],this.clipBounds[1][o]);this._model=[].slice.call(n),this._view=[].slice.call(i),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var c={model:n,view:i,projection:a,clipBounds:t,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},u=this.pickShader;u.bind(),u.uniforms=c,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(r){if(!r)return null;if(r.id!==this.pickId)return null;var e=r.value[0]+256*r.value[1]+65536*r.value[2],n=this.cells[e],i=this.positions[n[1]].slice(0,3),a={position:i,dataCoordinate:i,index:Math.floor(n[1]/48)};return"cone"===this.traceType?a.index=Math.floor(n[1]/48):"streamtube"===this.traceType&&(a.intensity=this.intensity[n[1]],a.velocity=this.vectors[n[1]].slice(0,3),a.divergence=this.vectors[n[1]][3],a.index=e),a},p.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()},r.exports=function(r,e,n){var c=n.shaders;1===arguments.length&&(r=(e=r).gl);var u=function(r,e){var n=i(r,e.meshShader.vertex,e.meshShader.fragment,null,e.meshShader.attributes);return n.attributes.position.location=0,n.attributes.color.location=2,n.attributes.uv.location=3,n.attributes.vector.location=4,n}(r,c),s=function(r,e){var n=i(r,e.pickShader.vertex,e.pickShader.fragment,null,e.pickShader.attributes);return n.attributes.position.location=0,n.attributes.id.location=1,n.attributes.vector.location=4,n}(r,c),l=o(r,d(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=r.LINEAR_MIPMAP_LINEAR,l.magFilter=r.LINEAR;var p=a(r),I=a(r),y=a(r),f=a(r),g=a(r),_=new m(r,l,u,s,p,I,g,y,f,t(r,[{buffer:p,type:r.FLOAT,size:4},{buffer:g,type:r.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:y,type:r.FLOAT,size:4},{buffer:f,type:r.FLOAT,size:2},{buffer:I,type:r.FLOAT,size:4}]),n.traceType||"cone");return _.update(e),_}},614:function(r,e,n){var i=n(3236),a=i(["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"]),t=i(["#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=i(["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"]),c=i(["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}"]);e.meshShader={vertex:a,fragment:t,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(r){r.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"}},5171:function(r,e,n){var i=n(737);r.exports=function(r){return i[r]}},9165:function(r,e,n){"use strict";r.exports=function(r){var e=r.gl,n=i(e),o=a(e,[{buffer:n,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:n,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:n,type:e.FLOAT,size:3,offset:28,stride:40}]),u=t(e);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.offset.location=2;var d=new c(e,n,o,u);return d.update(r),d};var i=n(2762),a=n(8116),t=n(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(r,e,n,i){this.gl=r,this.shader=i,this.buffer=e,this.vao=n,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 u=c.prototype;function d(r,e){for(var n=0;n<3;++n)r[0][n]=Math.min(r[0][n],e[n]),r[1][n]=Math.max(r[1][n],e[n])}u.isOpaque=function(){return!this.hasAlpha},u.isTransparent=function(){return this.hasAlpha},u.drawTransparent=u.draw=function(r){var e=this.gl,n=this.shader.uniforms;this.shader.bind();var i=n.view=r.view||o,a=n.projection=r.projection||o;n.model=r.model||o,n.clipBounds=this.clipBounds,n.opacity=this.opacity;var t=i[12],c=i[13],u=i[14],d=i[15],s=(r._ortho?2:1)*this.pixelRatio*(a[3]*t+a[7]*c+a[11]*u+a[15]*d)/e.drawingBufferHeight;this.vao.bind();for(var l=0;l<3;++l)e.lineWidth(this.lineWidth[l]*this.pixelRatio),n.capSize=this.capSize[l]*s,this.lineCount[l]&&e.drawArrays(e.LINES,this.lineOffset[l],this.lineCount[l]);this.vao.unbind()};var s=function(){for(var r=new Array(3),e=0;e<3;++e){for(var n=[],i=1;i<=2;++i)for(var a=-1;a<=1;a+=2){var t=[0,0,0];t[(i+e)%3]=a,n.push(t)}r[e]=n}return r}();function l(r,e,n,i){for(var a=s[i],t=0;t0&&((p=s.slice())[c]+=I[1][c],a.push(s[0],s[1],s[2],y[0],y[1],y[2],y[3],0,0,0,p[0],p[1],p[2],y[0],y[1],y[2],y[3],0,0,0),d(this.bounds,p),o+=2+l(a,p,y,c))}this.lineCount[c]=o-this.lineOffset[c]}this.buffer.update(a)}},u.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(r,e,n){"use strict";var i=n(3236),a=n(9405),t=i(["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=i(["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}"]);r.exports=function(r){return a(r,t,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(r,e,n){"use strict";var i=n(7766);r.exports=function(r,e,n,i){a||(a=r.FRAMEBUFFER_UNSUPPORTED,t=r.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=r.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,c=r.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var d=r.getExtension("WEBGL_draw_buffers");if(!u&&d&&function(r,e){var n=r.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(n+1);for(var i=0;i<=n;++i){for(var a=new Array(n),t=0;ts||n<0||n>s)throw new Error("gl-fbo: Parameters are too large for FBO");var l=1;if("color"in(i=i||{})){if((l=Math.max(0|i.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(l>1){if(!d)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(l>r.getParameter(d.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+l+" draw buffers")}}var m=r.UNSIGNED_BYTE,p=r.getExtension("OES_texture_float");if(i.float&&l>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");m=r.FLOAT}else i.preferFloat&&l>0&&p&&(m=r.FLOAT);var y=!0;"depth"in i&&(y=!!i.depth);var f=!1;return"stencil"in i&&(f=!!i.stencil),new I(r,e,n,m,l,y,f,d)};var a,t,o,c,u=null;function d(r){return[r.getParameter(r.FRAMEBUFFER_BINDING),r.getParameter(r.RENDERBUFFER_BINDING),r.getParameter(r.TEXTURE_BINDING_2D)]}function s(r,e){r.bindFramebuffer(r.FRAMEBUFFER,e[0]),r.bindRenderbuffer(r.RENDERBUFFER,e[1]),r.bindTexture(r.TEXTURE_2D,e[2])}function l(r){switch(r){case a:throw new Error("gl-fbo: Framebuffer unsupported");case t:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case c:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function m(r,e,n,a,t,o){if(!a)return null;var c=i(r,e,n,t,a);return c.magFilter=r.NEAREST,c.minFilter=r.NEAREST,c.mipSamples=1,c.bind(),r.framebufferTexture2D(r.FRAMEBUFFER,o,r.TEXTURE_2D,c.handle,0),c}function p(r,e,n,i,a){var t=r.createRenderbuffer();return r.bindRenderbuffer(r.RENDERBUFFER,t),r.renderbufferStorage(r.RENDERBUFFER,i,e,n),r.framebufferRenderbuffer(r.FRAMEBUFFER,a,r.RENDERBUFFER,t),t}function I(r,e,n,i,a,t,o,c){this.gl=r,this._shape=[0|e,0|n],this._destroyed=!1,this._ext=c,this.color=new Array(a);for(var I=0;I1&&c.drawBuffersWEBGL(u[o]);var _=n.getExtension("WEBGL_depth_texture");_?I?r.depth=m(n,a,t,_.UNSIGNED_INT_24_8_WEBGL,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):y&&(r.depth=m(n,a,t,n.UNSIGNED_SHORT,n.DEPTH_COMPONENT,n.DEPTH_ATTACHMENT)):y&&I?r._depth_rb=p(n,a,t,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):y?r._depth_rb=p(n,a,t,n.DEPTH_COMPONENT16,n.DEPTH_ATTACHMENT):I&&(r._depth_rb=p(n,a,t,n.STENCIL_INDEX,n.STENCIL_ATTACHMENT));var h=n.checkFramebufferStatus(n.FRAMEBUFFER);if(h!==n.FRAMEBUFFER_COMPLETE){for(r._destroyed=!0,n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteFramebuffer(r.handle),r.handle=null,r.depth&&(r.depth.dispose(),r.depth=null),r._depth_rb&&(n.deleteRenderbuffer(r._depth_rb),r._depth_rb=null),g=0;ga||n<0||n>a)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");r._shape[0]=e,r._shape[1]=n;for(var t=d(i),o=0;o>8*p&255;this.pickOffset=n,a.bind();var I=a.uniforms;I.viewTransform=r,I.pickOffset=e,I.shape=this.shape;var y=a.attributes;return this.positionBuffer.bind(),y.position.pointer(),this.weightBuffer.bind(),y.weight.pointer(c.UNSIGNED_BYTE,!1),this.idBuffer.bind(),y.pickId.pointer(c.UNSIGNED_BYTE,!1),c.drawArrays(c.TRIANGLES,0,o),n+this.shape[0]*this.shape[1]}}}(),s.pick=function(r,e,n){var i=this.pickOffset,a=this.shape[0]*this.shape[1];if(n=i+a)return null;var t=n-i,o=this.xData,c=this.yData;return{object:this,pointId:t,dataCoord:[o[t%this.shape[0]],c[t/this.shape[0]|0]]}},s.update=function(r){var e=(r=r||{}).shape||[0,0],n=r.x||a(e[0]),o=r.y||a(e[1]),c=r.z||new Float32Array(e[0]*e[1]),u=!1!==r.zsmooth;this.xData=n,this.yData=o;var d,s,m,p,I=r.colorLevels||[0],y=r.colorValues||[0,0,0,1],f=I.length,g=this.bounds;u?(d=g[0]=n[0],s=g[1]=o[0],m=g[2]=n[n.length-1],p=g[3]=o[o.length-1]):(d=g[0]=n[0]+(n[1]-n[0])/2,s=g[1]=o[0]+(o[1]-o[0])/2,m=g[2]=n[n.length-1]+(n[n.length-1]-n[n.length-2])/2,p=g[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var _=1/(m-d),h=1/(p-s),v=e[0],x=e[1];this.shape=[v,x];var P=(u?(v-1)*(x-1):v*x)*(l.length>>>1);this.numVertices=P;for(var G=t.mallocUint8(4*P),C=t.mallocFloat32(2*P),S=t.mallocUint8(2*P),A=t.mallocUint32(P),b=0,M=u?v-1:v,B=u?x-1:x,k=0;k 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"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n 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 vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n 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 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, packFloat(pixelArcLength).xyz);\n}"]),u=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(r){return a(r,t,o,null,u)},e.createPickShader=function(r){return a(r,t,c,null,u)}},5714:function(r,e,n){"use strict";r.exports=function(r){var e=r.gl||r.scene&&r.scene.gl,n=l(e);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;var o=m(e);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 c=i(e),u=a(e,[{buffer:c,size:3,offset:0,stride:48},{buffer:c,size:3,offset:12,stride:48},{buffer:c,size:1,offset:24,stride:48},{buffer:c,size:1,offset:28,stride:48},{buffer:c,size:4,offset:32,stride:48}]),s=d(new Array(1024),[256,1,4]),p=0;p<1024;++p)s.data[p]=255;var I=t(e,s);I.wrap=e.REPEAT;var y=new g(e,n,o,c,u,I);return y.update(r),y};var i=n(2762),a=n(8116),t=n(7766),o=new Uint8Array(4),c=new Float32Array(o.buffer),u=n(2478),d=n(9618),s=n(7319),l=s.createShader,m=s.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(r,e){for(var n=0,i=0;i<3;++i){var a=r[i]-e[i];n+=a*a}return Math.sqrt(n)}function y(r){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],n=0;n<3;++n)e[0][n]=Math.max(r[0][n],e[0][n]),e[1][n]=Math.min(r[1][n],e[1][n]);return e}function f(r,e,n,i){this.arcLength=r,this.position=e,this.index=n,this.dataCoordinate=i}function g(r,e,n,i,a,t){this.gl=r,this.shader=e,this.pickShader=n,this.buffer=i,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=t,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var _=g.prototype;_.isTransparent=function(){return this.hasAlpha},_.isOpaque=function(){return!this.hasAlpha},_.pickSlots=1,_.setPickBase=function(r){this.pickId=r},_.drawTransparent=_.draw=function(r){if(this.vertexCount){var e=this.gl,n=this.shader,i=this.vao;n.bind(),n.uniforms={model:r.model||p,view:r.view||p,projection:r.projection||p,clipBounds:y(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},i.bind(),i.draw(e.TRIANGLE_STRIP,this.vertexCount),i.unbind()}},_.drawPick=function(r){if(this.vertexCount){var e=this.gl,n=this.pickShader,i=this.vao;n.bind(),n.uniforms={model:r.model||p,view:r.view||p,projection:r.projection||p,pickId:this.pickId,clipBounds:y(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},i.bind(),i.draw(e.TRIANGLE_STRIP,this.vertexCount),i.unbind()}},_.update=function(r){var e,n;this.dirty=!0;var i=!!r.connectGaps;"dashScale"in r&&(this.dashScale=r.dashScale),this.hasAlpha=!1,"opacity"in r&&(this.opacity=+r.opacity,this.opacity<1&&(this.hasAlpha=!0));var a=[],t=[],o=[],c=0,s=0,l=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],m=r.position||r.positions;if(m){var p=r.color||r.colors||[0,0,0,1],y=r.lineWidth||1,f=!1;r:for(e=1;e0){for(var P=0;P<24;++P)a.push(a[a.length-12]);s+=2,f=!0}continue r}l[0][n]=Math.min(l[0][n],v[n],x[n]),l[1][n]=Math.max(l[1][n],v[n],x[n])}Array.isArray(p[0])?(g=p.length>e-1?p[e-1]:p.length>0?p[p.length-1]:[0,0,0,1],_=p.length>e?p[e]:p.length>0?p[p.length-1]:[0,0,0,1]):g=_=p,3===g.length&&(g=[g[0],g[1],g[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]),!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0),h=Array.isArray(y)?y.length>e-1?y[e-1]:y.length>0?y[y.length-1]:[0,0,0,1]:y;var G=c;if(c+=I(v,x),f){for(n=0;n<2;++n)a.push(v[0],v[1],v[2],x[0],x[1],x[2],G,h,g[0],g[1],g[2],g[3]);s+=2,f=!1}a.push(v[0],v[1],v[2],x[0],x[1],x[2],G,h,g[0],g[1],g[2],g[3],v[0],v[1],v[2],x[0],x[1],x[2],G,-h,g[0],g[1],g[2],g[3],x[0],x[1],x[2],v[0],v[1],v[2],c,-h,_[0],_[1],_[2],_[3],x[0],x[1],x[2],v[0],v[1],v[2],c,h,_[0],_[1],_[2],_[3]),s+=4}}if(this.buffer.update(a),t.push(c),o.push(m[m.length-1].slice()),this.bounds=l,this.vertexCount=s,this.points=o,this.arcLength=t,"dashes"in r){var C=r.dashes.slice();for(C.unshift(0),e=1;e1.0001)return null;g+=f[l]}return Math.abs(g-1)>.001?null:[m,c(r,f),f]}},840:function(r,e,n){var i=n(3236),a=i(["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"]),t=i(["#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=i(["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}"]),c=i(["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}"]),u=i(["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}"]),d=i(["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}"]),s=i(["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}"]),l=i(["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}"]),m=i(["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}"]),p=i(["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}"]),I=i(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:a,fragment:t,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:u,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:s,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:m,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:p,fragment:I,attributes:[{name:"position",type:"vec3"}]}},7201:function(r,e,n){"use strict";var i=n(9405),a=n(2762),t=n(8116),o=n(7766),c=n(8406),u=n(6760),d=n(7608),s=n(9618),l=n(6729),m=n(7765),p=n(1888),I=n(840),y=n(7626),f=I.meshShader,g=I.wireShader,_=I.pointShader,h=I.pickShader,v=I.pointPickShader,x=I.contourShader,P=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function G(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,G,C,S,A,b){this.gl=r,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=n,this.lineShader=i,this.pointShader=a,this.pickShader=t,this.pointPickShader=o,this.contourShader=c,this.trianglePositions=u,this.triangleColors=s,this.triangleNormals=m,this.triangleUVs=l,this.triangleIds=d,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=I,this.edgeColors=f,this.edgeUVs=g,this.edgeIds=y,this.edgeVAO=_,this.edgeCount=0,this.pointPositions=h,this.pointColors=x,this.pointUVs=G,this.pointSizes=C,this.pointIds=v,this.pointVAO=S,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=b,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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=P,this._view=P,this._projection=P,this._resolution=[1,1]}var C=G.prototype;function S(r,e){if(!e)return 1;if(!e.length)return 1;for(var n=0;nr&&n>0){var i=(e[n][0]-r)/(e[n][0]-e[n-1][0]);return e[n][1]*(1-i)+i*e[n-1][1]}}return 1}function A(r){var e=i(r,_.vertex,_.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function b(r){var e=i(r,h.vertex,h.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function M(r){var e=i(r,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function B(r){var e=i(r,x.vertex,x.fragment);return e.attributes.position.location=0,e}C.isOpaque=function(){return!this.hasAlpha},C.isTransparent=function(){return this.hasAlpha},C.pickSlots=1,C.setPickBase=function(r){this.pickId=r},C.highlight=function(r){if(r&&this.contourEnable){for(var e=m(this.cells,this.intensity,r.intensity),n=e.cells,i=e.vertexIds,a=e.vertexWeights,t=n.length,o=p.mallocFloat32(6*t),c=0,u=0;u0&&((l=this.triShader).bind(),l.uniforms=c,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((l=this.lineShader).bind(),l.uniforms=c,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((l=this.pointShader).bind(),l.uniforms=c,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((l=this.contourShader).bind(),l.uniforms=c,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},C.drawPick=function(r){r=r||{};for(var e=this.gl,n=r.model||P,i=r.view||P,a=r.projection||P,t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)t[0][o]=Math.max(t[0][o],this.clipBounds[0][o]),t[1][o]=Math.min(t[1][o],this.clipBounds[1][o]);this._model=[].slice.call(n),this._view=[].slice.call(i),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var c,u={model:n,view:i,projection:a,clipBounds:t,pickId:this.pickId/255};(c=this.pickShader).bind(),c.uniforms=u,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((c=this.pointPickShader).bind(),c.uniforms=u,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},C.pick=function(r){if(!r)return null;if(r.id!==this.pickId)return null;for(var e=r.value[0]+256*r.value[1]+65536*r.value[2],n=this.cells[e],i=this.positions,a=new Array(n.length),t=0;tu[C]&&(t.uniforms.dataAxis=r,t.uniforms.screenOffset=e,t.uniforms.color=f[i],t.uniforms.angle=g[i],d.drawArrays(d.TRIANGLES,u[C],u[S]-u[C]))),_[i]&&G&&(e[1^i]-=A*p*h[i],t.uniforms.dataAxis=n,t.uniforms.screenOffset=e,t.uniforms.color=v[i],t.uniforms.angle=x[i],d.drawArrays(d.TRIANGLES,P,G)),e[1^i]=A*s[2+(1^i)]-1,I[i+2]&&(e[1^i]+=A*p*y[i+2],Cu[C]&&(t.uniforms.dataAxis=r,t.uniforms.screenOffset=e,t.uniforms.color=f[i+2],t.uniforms.angle=g[i+2],d.drawArrays(d.TRIANGLES,u[C],u[S]-u[C]))),_[i+2]&&G&&(e[1^i]+=A*p*h[i+2],t.uniforms.dataAxis=n,t.uniforms.screenOffset=e,t.uniforms.color=v[i+2],t.uniforms.angle=x[i+2],d.drawArrays(d.TRIANGLES,P,G))}}(),d.drawTitle=function(){var r=[0,0],e=[0,0];return function(){var n=this.plot,i=this.shader,a=n.gl,t=n.screenBox,o=n.titleCenter,c=n.titleAngle,u=n.titleColor,d=n.pixelRatio;if(this.titleCount){for(var s=0;s<2;++s)e[s]=2*(o[s]*d-t[s])/(t[2+s]-t[s])-1;i.bind(),i.uniforms.dataAxis=r,i.uniforms.screenOffset=e,i.uniforms.angle=c,i.uniforms.color=u,a.drawArrays(a.TRIANGLES,this.titleOffset,this.titleCount)}}}(),d.bind=function(){var r=[0,0],e=[0,0],n=[0,0];return function(){var i=this.plot,a=this.shader,t=i._tickBounds,o=i.dataBox,c=i.screenBox,u=i.viewBox;a.bind();for(var d=0;d<2;++d){var s=t[d],l=t[d+2]-s,m=.5*(o[d+2]+o[d]),p=o[d+2]-o[d],I=u[d],y=u[d+2]-I,f=c[d],g=c[d+2]-f;e[d]=2*l/p*y/g,r[d]=2*(s-m)/p*y/g}n[1]=2*i.pixelRatio/(c[3]-c[1]),n[0]=n[1]*(c[3]-c[1])/(c[2]-c[0]),a.uniforms.dataScale=e,a.uniforms.dataShift=r,a.uniforms.textScale=n,this.vbo.bind(),a.attributes.textCoordinate.pointer()}}(),d.update=function(r){var e,n,i,a,o,c=[],u=r.ticks,d=r.bounds;for(o=0;o<2;++o){var s=[Math.floor(c.length/3)],l=[-1/0],m=u[o];for(e=0;e=0){var y=e[I]-i[I]*(e[I+2]-e[I])/(i[I+2]-i[I]);0===I?o.drawLine(y,e[1],y,e[3],p[I],m[I]):o.drawLine(e[0],y,e[2],y,p[I],m[I])}}for(I=0;I=0;--r)this.objects[r].dispose();for(this.objects.length=0,r=this.overlays.length-1;r>=0;--r)this.overlays[r].dispose();this.overlays.length=0,this.gl=null},d.addObject=function(r){this.objects.indexOf(r)<0&&(this.objects.push(r),this.setDirty())},d.removeObject=function(r){for(var e=this.objects,n=0;nMath.abs(e))d.rotate(t,0,0,-r*n*Math.PI*I.rotateSpeed/window.innerWidth);else if(!I._ortho){var o=-I.zoomSpeed*a*e/window.innerHeight*(t-d.lastT())/20;d.pan(t,0,0,l*(Math.exp(o)-1))}}}),!0)},I.enableMouseListeners(),I};var i=n(3025),a=n(6296),t=n(351),o=n(8512),c=n(24),u=n(7520)},799:function(r,e,n){var i=n(3236),a=n(9405),t=i(["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=i(["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}"]);r.exports=function(r){return a(r,t,o,null,[{name:"position",type:"vec2"}])}},4100:function(r,e,n){"use strict";var i=n(4437),a=n(3837),t=n(5445),o=n(4449),c=n(3589),u=n(2260),d=n(7169),s=n(351),l=n(4772),m=n(4040),p=n(799),I=n(9216)({tablet:!0,featureDetect:!0});function y(){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 f(r){var e=Math.round(Math.log(Math.abs(r))/Math.log(10));if(e<0){var n=Math.round(Math.pow(10,-e));return Math.ceil(r*n)/n}return e>0?(n=Math.round(Math.pow(10,e)),Math.ceil(r/n)*n):Math.ceil(r)}function g(r){return"boolean"!==typeof r||r}r.exports={createScene:function(r){(r=r||{}).camera=r.camera||{};var e=r.canvas;e||(e=document.createElement("canvas"),r.container?r.container.appendChild(e):document.body.appendChild(e));var n=r.gl;if(n||(r.glOptions&&(I=!!r.glOptions.preserveDrawingBuffer),n=function(r,e){var n=null;try{(n=r.getContext("webgl",e))||(n=r.getContext("experimental-webgl",e))}catch(i){return null}return n}(e,r.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:I})),!n)throw new Error("webgl not supported");var _=r.bounds||[[-10,-10,-10],[10,10,10]],h=new y,v=u(n,n.drawingBufferWidth,n.drawingBufferHeight,{preferFloat:!I}),x=p(n),P=r.cameraObject&&!0===r.cameraObject._ortho||r.camera.projection&&"orthographic"===r.camera.projection.type||!1,G={eye:r.camera.eye||[2,0,0],center:r.camera.center||[0,0,0],up:r.camera.up||[0,1,0],zoomMin:r.camera.zoomMax||.1,zoomMax:r.camera.zoomMin||100,mode:r.camera.mode||"turntable",_ortho:P},C=r.axes||{},S=a(n,C);S.enable=!C.disable;var A=r.spikes||{},b=o(n,A),M=[],B=[],k=[],F=[],z=!0,w=!0,R=new Array(16),E=new Array(16),N={view:null,projection:R,model:E,_ortho:!1},T=(w=!0,[n.drawingBufferWidth,n.drawingBufferHeight]),D=r.cameraObject||i(e,G),J={gl:n,contextLost:!1,pixelRatio:r.pixelRatio||1,canvas:e,selection:h,camera:D,axes:S,axesPixels:null,spikes:b,bounds:_,objects:M,shape:T,aspect:r.aspectRatio||[1,1,1],pickRadius:r.pickRadius||10,zNear:r.zNear||.01,zFar:r.zFar||1e3,fovy:r.fovy||Math.PI/4,clearColor:r.clearColor||[0,0,0,0],autoResize:g(r.autoResize),autoBounds:g(r.autoBounds),autoScale:!!r.autoScale,autoCenter:g(r.autoCenter),clipToBounds:g(r.clipToBounds),snapToData:!!r.snapToData,onselect:r.onselect||null,onrender:r.onrender||null,onclick:r.onclick||null,cameraParams:N,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(r){this.aspect[0]=r.x,this.aspect[1]=r.y,this.aspect[2]=r.z,w=!0},setBounds:function(r,e){this.bounds[0][r]=e.min,this.bounds[1][r]=e.max},setClearColor:function(r){this.clearColor=r},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},U=[n.drawingBufferWidth/J.pixelRatio|0,n.drawingBufferHeight/J.pixelRatio|0];function H(){if(!J._stopped&&J.autoResize){var r=e.parentNode,n=1,i=1;r&&r!==document.body?(n=r.clientWidth,i=r.clientHeight):(n=window.innerWidth,i=window.innerHeight);var a=0|Math.ceil(n*J.pixelRatio),t=0|Math.ceil(i*J.pixelRatio);if(a!==e.width||t!==e.height){e.width=a,e.height=t;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=n+"px",o.height=i+"px",z=!0}}}function L(){for(var r=M.length,e=F.length,i=0;i0&&0===k[e-1];)k.pop(),F.pop().dispose()}function O(){if(J.contextLost)return!0;n.isContextLost()&&(J.contextLost=!0,J.mouseListener.enabled=!1,J.selection.object=null,J.oncontextloss&&J.oncontextloss())}J.autoResize&&H(),window.addEventListener("resize",H),J.update=function(r){J._stopped||(r=r||{},z=!0,w=!0)},J.add=function(r){J._stopped||(r.axes=S,M.push(r),B.push(-1),z=!0,w=!0,L())},J.remove=function(r){if(!J._stopped){var e=M.indexOf(r);e<0||(M.splice(e,1),B.pop(),z=!0,w=!0,L())}},J.dispose=function(){if(!J._stopped&&(J._stopped=!0,window.removeEventListener("resize",H),e.removeEventListener("webglcontextlost",O),J.mouseListener.enabled=!1,!J.contextLost)){S.dispose(),b.dispose();for(var r=0;rh.distance)continue;for(var d=0;d 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"]),e.pickVertex=i(["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"]),e.pickFragment=i(["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"])},4696:function(r,e,n){"use strict";var i=n(9405),a=n(2762),t=n(1888),o=n(6640);function c(r,e,n,i,a){this.plot=r,this.offsetBuffer=e,this.pickBuffer=n,this.shader=i,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}r.exports=function(r,e){var n=r.gl,t=a(n),u=a(n),d=i(n,o.pointVertex,o.pointFragment),s=i(n,o.pickVertex,o.pickFragment),l=new c(r,t,u,d,s);return l.update(e),r.addObject(l),l};var u=c.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(r){var e;function n(e,n){return e in r?r[e]:n}r=r||{},this.sizeMin=n("sizeMin",.5),this.sizeMax=n("sizeMax",20),this.color=n("color",[1,0,0,1]).slice(),this.areaRatio=n("areaRatio",1),this.borderColor=n("borderColor",[0,0,0,1]).slice(),this.blend=n("blend",!1);var i=r.positions.length>>>1,a=r.positions instanceof Float32Array,o=r.idToIndex instanceof Int32Array&&r.idToIndex.length>=i,c=r.positions,u=a?c:t.mallocFloat32(c.length),d=o?r.idToIndex:t.mallocInt32(i);if(a||u.set(c),!o)for(u.set(c),e=0;e>>1;for(n=0;n=e[0]&&t<=e[2]&&o>=e[1]&&o<=e[3]&&i++}return i}(this.points,o),s=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(d,.33333)));r[0]=2/c,r[4]=2/u,r[6]=-2*o[0]/c-1,r[7]=-2*o[1]/u-1,this.offsetBuffer.bind(),a.bind(),a.attributes.position.pointer(),a.uniforms.matrix=r,a.uniforms.color=this.color,a.uniforms.borderColor=this.borderColor,a.uniforms.pointCloud=s<5,a.uniforms.pointSize=s,a.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),i&&(e[0]=255&n,e[1]=n>>8&255,e[2]=n>>16&255,e[3]=n>>24&255,this.pickBuffer.bind(),a.attributes.pickId.pointer(t.UNSIGNED_BYTE),a.uniforms.pickOffset=e,this.pickOffset=n);var l=t.getParameter(t.BLEND),m=t.getParameter(t.DITHER);return l&&!this.blend&&t.disable(t.BLEND),m&&t.disable(t.DITHER),t.drawArrays(t.POINTS,0,this.pointCount),l&&!this.blend&&t.enable(t.BLEND),m&&t.enable(t.DITHER),n+this.pointCount}}(),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(r,e,n){var i=this.pickOffset,a=this.pointCount;if(n=i+a)return null;var t=n-i,o=this.points;return{object:this,pointId:t,dataCoord:[o[2*t],o[2*t+1]]}}},783:function(r){r.exports=function(r,e,n,i){var a,t,o,c,u,d=e[0],s=e[1],l=e[2],m=e[3],p=n[0],I=n[1],y=n[2],f=n[3];return(t=d*p+s*I+l*y+m*f)<0&&(t=-t,p=-p,I=-I,y=-y,f=-f),1-t>1e-6?(a=Math.acos(t),o=Math.sin(a),c=Math.sin((1-i)*a)/o,u=Math.sin(i*a)/o):(c=1-i,u=i),r[0]=c*d+u*p,r[1]=c*s+u*I,r[2]=c*l+u*y,r[3]=c*m+u*f,r}},5964:function(r){"use strict";r.exports=function(r){return r||0===r?r.toString():""}},9366:function(r,e,n){"use strict";var i=n(4359);r.exports=function(r,e,n){var t=[e.style,e.weight,e.variant,e.family].join("_"),o=a[t];if(o||(o=a[t]={}),r in o)return o[r];var c={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e.family,fontStyle:e.style,fontWeight:e.weight,fontVariant:e.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},u=i(r,c);c.triangles=!1;var d,s,l=i(r,c);if(n&&1!==n){for(d=0;d 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}"]),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\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"]),u=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"]),d=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}"]),s=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],l={vertex:t,fragment:u,attributes:s},m={vertex:o,fragment:u,attributes:s},p={vertex:c,fragment:u,attributes:s},I={vertex:t,fragment:d,attributes:s},y={vertex:o,fragment:d,attributes:s},f={vertex:c,fragment:d,attributes:s};function g(r,e){var n=i(r,e),a=n.attributes;return a.position.location=0,a.color.location=1,a.glyph.location=2,a.id.location=3,n}e.createPerspective=function(r){return g(r,l)},e.createOrtho=function(r){return g(r,m)},e.createProject=function(r){return g(r,p)},e.createPickPerspective=function(r){return g(r,I)},e.createPickOrtho=function(r){return g(r,y)},e.createPickProject=function(r){return g(r,f)}},8418:function(r,e,n){"use strict";var i=n(5219),a=n(2762),t=n(8116),o=n(1888),c=n(6760),u=n(1283),d=n(9366),s=n(5964),l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],m=ArrayBuffer,p=DataView;function I(r){return Array.isArray(r)||function(r){return m.isView(r)&&!(r instanceof p)}(r)}function y(r,e){var n=r[0],i=r[1],a=r[2],t=r[3];return r[0]=e[0]*n+e[4]*i+e[8]*a+e[12]*t,r[1]=e[1]*n+e[5]*i+e[9]*a+e[13]*t,r[2]=e[2]*n+e[6]*i+e[10]*a+e[14]*t,r[3]=e[3]*n+e[7]*i+e[11]*a+e[15]*t,r}function f(r,e,n,i){return y(i,i),y(i,i),y(i,i)}function g(r,e){this.index=r,this.dataCoordinate=this.position=e}function _(r){return!0===r||r>1?1:r}function h(r,e,n,i,a,t,o,c,u,d,s,l){this.gl=r,this.pixelRatio=1,this.shader=e,this.orthoShader=n,this.projectShader=i,this.pointBuffer=a,this.colorBuffer=t,this.glyphBuffer=o,this.idBuffer=c,this.vao=u,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=d,this.pickOrthoShader=s,this.pickProjectShader=l,this.points=[],this._selectResult=new g(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}r.exports=function(r){var e=r.gl,n=u.createPerspective(e),i=u.createOrtho(e),o=u.createProject(e),c=u.createPickPerspective(e),d=u.createPickOrtho(e),s=u.createPickProject(e),l=a(e),m=a(e),p=a(e),I=a(e),y=t(e,[{buffer:l,size:3,type:e.FLOAT},{buffer:m,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:I,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),f=new h(e,n,i,o,l,m,p,I,y,c,d,s);return f.update(r),f};var v=h.prototype;v.pickSlots=1,v.setPickBase=function(r){this.pickId=r},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var r=0;r<3;++r)if(this.axesProject[r]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var r=0;r<3;++r)if(this.axesProject[r]&&!this.projectHasAlpha)return!0;return!1};var x=[0,0],P=[0,0,0],G=[0,0,0],C=[0,0,0,1],S=[0,0,0,1],A=l.slice(),b=[0,0,0],M=[[0,0,0],[0,0,0]];function B(r){return r[0]=r[1]=r[2]=0,r}function k(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=1,r}function F(r,e,n,i){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[n]=i,r}function z(r,e,n,i){var a,t=e.axesProject,o=e.gl,u=r.uniforms,d=n.model||l,s=n.view||l,m=n.projection||l,p=e.axesBounds,I=function(r){for(var e=M,n=0;n<2;++n)for(var i=0;i<3;++i)e[n][i]=Math.max(Math.min(r[n][i],1e8),-1e8);return e}(e.clipBounds);a=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],x[0]=2/o.drawingBufferWidth,x[1]=2/o.drawingBufferHeight,r.bind(),u.view=s,u.projection=m,u.screenSize=x,u.highlightId=e.highlightId,u.highlightScale=e.highlightScale,u.clipBounds=I,u.pickGroup=e.pickId/255,u.pixelRatio=i;for(var y=0;y<3;++y)if(t[y]){u.scale=e.projectScale[y],u.opacity=e.projectOpacity[y];for(var g=A,_=0;_<16;++_)g[_]=0;for(_=0;_<4;++_)g[5*_]=1;g[5*y]=0,a[y]<0?g[12+y]=p[0][y]:g[12+y]=p[1][y],c(g,d,g),u.model=g;var h=(y+1)%3,v=(y+2)%3,z=B(P),w=B(G);z[h]=1,w[v]=1;var R=f(0,0,0,k(C,z)),E=f(0,0,0,k(S,w));if(Math.abs(R[1])>Math.abs(E[1])){var N=R;R=E,E=N,N=z,z=w,w=N;var T=h;h=v,v=T}R[0]<0&&(z[h]=-1),E[1]>0&&(w[v]=-1);var D=0,J=0;for(_=0;_<4;++_)D+=Math.pow(d[4*h+_],2),J+=Math.pow(d[4*v+_],2);z[h]/=Math.sqrt(D),w[v]/=Math.sqrt(J),u.axes[0]=z,u.axes[1]=w,u.fragClipBounds[0]=F(b,I[0],y,-1e8),u.fragClipBounds[1]=F(b,I[1],y,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*i),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var w=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function R(r,e,n,i,a,t,o){var c=n.gl;if((t===n.projectHasAlpha||o)&&z(e,n,i,a),t===n.hasAlpha||o){r.bind();var u=r.uniforms;u.model=i.model||l,u.view=i.view||l,u.projection=i.projection||l,x[0]=2/c.drawingBufferWidth,x[1]=2/c.drawingBufferHeight,u.screenSize=x,u.highlightId=n.highlightId,u.highlightScale=n.highlightScale,u.fragClipBounds=w,u.clipBounds=n.axes.bounds,u.opacity=n.opacity,u.pickGroup=n.pickId/255,u.pixelRatio=a,n.vao.bind(),n.vao.draw(c.TRIANGLES,n.vertexCount),n.lineWidth>0&&(c.lineWidth(n.lineWidth*a),n.vao.draw(c.LINES,n.lineVertexCount,n.vertexCount)),n.vao.unbind()}}function E(r,e,n,a){var t;t=I(r)?e=this.pointCount||e<0)return null;var n=this.points[e],i=this._selectResult;i.index=e;for(var a=0;a<3;++a)i.position[a]=i.dataCoordinate[a]=n[a];return i},v.highlight=function(r){if(r){var e=r.index,n=255&e,i=e>>8&255,a=e>>16&255;this.highlightId=[n/255,i/255,a/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(r){if("perspective"in(r=r||{})&&(this.useOrtho=!r.perspective),"orthographic"in r&&(this.useOrtho=!!r.orthographic),"lineWidth"in r&&(this.lineWidth=r.lineWidth),"project"in r)if(I(r.project))this.axesProject=r.project;else{var e=!!r.project;this.axesProject=[e,e,e]}if("projectScale"in r)if(I(r.projectScale))this.projectScale=r.projectScale.slice();else{var n=+r.projectScale;this.projectScale=[n,n,n]}if(this.projectHasAlpha=!1,"projectOpacity"in r){I(r.projectOpacity)?this.projectOpacity=r.projectOpacity.slice():(n=+r.projectOpacity,this.projectOpacity=[n,n,n]);for(var i=0;i<3;++i)this.projectOpacity[i]=_(this.projectOpacity[i]),this.projectOpacity[i]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in r&&(this.opacity=_(r.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var a,t,c=r.position,u={family:r.font||"normal",style:r.fontStyle||"normal",weight:r.fontWeight||"normal",variant:r.fontVariant||"normal"},d=r.alignment||[0,0];if(2===d.length)a=d[0],t=d[1];else for(a=[],t=[],i=0;i0){var w=0,R=v,N=[0,0,0,1],T=[0,0,0,1],D=I(p)&&I(p[0]),J=I(g)&&I(g[0]);r:for(i=0;i0?1-b[0][0]:W<0?1+b[1][0]:1,Z*=Z>0?1-b[0][1]:Z<0?1+b[1][1]:1],Y=S.cells||[],X=S.positions||[];for(C=0;C0){var g=n*s;o.drawBox(l-g,m-g,p+g,m+g,t),o.drawBox(l-g,I-g,p+g,I+g,t),o.drawBox(l-g,m-g,l+g,I+g,t),o.drawBox(p-g,m-g,p+g,I+g,t)}}}},c.update=function(r){r=r||{},this.innerFill=!!r.innerFill,this.outerFill=!!r.outerFill,this.innerColor=(r.innerColor||[0,0,0,.5]).slice(),this.outerColor=(r.outerColor||[0,0,0,.5]).slice(),this.borderColor=(r.borderColor||[0,0,0,1]).slice(),this.borderWidth=r.borderWidth||0,this.selectBox=(r.selectBox||this.selectBox).slice()},c.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(r,e,n){"use strict";r.exports=function(r,e){var n=e[0],t=e[1],o=i(r,n,t,{}),c=a.mallocUint8(n*t*4);return new u(r,o,c)};var i=n(2260),a=n(1888),t=n(9618),o=n(8828).nextPow2;function c(r,e,n,i,a){this.coord=[r,e],this.id=n,this.value=i,this.distance=a}function u(r,e,n){this.gl=r,this.fbo=e,this.buffer=n,this._readTimeout=null;var i=this;this._readCallback=function(){i.gl&&(e.bind(),r.readPixels(0,0,e.shape[0],e.shape[1],r.RGBA,r.UNSIGNED_BYTE,i.buffer),i._readTimeout=null)}}var d=u.prototype;Object.defineProperty(d,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(r){if(this.gl){this.fbo.shape=r;var e=this.fbo.shape[0],n=this.fbo.shape[1];if(n*e*4>this.buffer.length){a.free(this.buffer);for(var i=this.buffer=a.mallocUint8(o(n*e*4)),t=0;tn)for(r=n;re)for(r=e;r=0){for(var G=0|P.type.charAt(P.type.length-1),C=new Array(G),S=0;S=0;)A+=1;x[_]=A}var b=new Array(n.length);function M(){m.program=o.program(p,m._vref,m._fref,v,x);for(var r=0;r=0){if((I=m.charCodeAt(m.length-1)-48)<2||I>4)throw new i("","Invalid data type for attribute "+l+": "+m);c(r,e,p[0],a,I,t,l)}else{if(!(m.indexOf("mat")>=0))throw new i("","Unknown data type for attribute "+l+": "+m);var I;if((I=m.charCodeAt(m.length-1)-48)<2||I>4)throw new i("","Invalid data type for attribute "+l+": "+m);u(r,e,p,a,I,t,l)}}}return t};var i=n(8866);function a(r,e,n,i,a,t){this._gl=r,this._wrapper=e,this._index=n,this._locations=i,this._dimension=a,this._constFunc=t}var t=a.prototype;t.pointer=function(r,e,n,i){var a=this,t=a._gl,o=a._locations[a._index];t.vertexAttribPointer(o,a._dimension,r||t.FLOAT,!!e,n||0,i||0),t.enableVertexAttribArray(o)},t.set=function(r,e,n,i){return this._constFunc(this._locations[this._index],r,e,n,i)},Object.defineProperty(t,"location",{get:function(){return this._locations[this._index]},set:function(r){return r!==this._locations[this._index]&&(this._locations[this._index]=0|r,this._wrapper.program=null),0|r}});var o=[function(r,e,n){return void 0===n.length?r.vertexAttrib1f(e,n):r.vertexAttrib1fv(e,n)},function(r,e,n,i){return void 0===n.length?r.vertexAttrib2f(e,n,i):r.vertexAttrib2fv(e,n)},function(r,e,n,i,a){return void 0===n.length?r.vertexAttrib3f(e,n,i,a):r.vertexAttrib3fv(e,n)},function(r,e,n,i,a,t){return void 0===n.length?r.vertexAttrib4f(e,n,i,a,t):r.vertexAttrib4fv(e,n)}];function c(r,e,n,i,t,c,u){var d=o[t],s=new a(r,e,n,i,t,d);Object.defineProperty(c,u,{set:function(e){return r.disableVertexAttribArray(i[n]),d(r,i[n],e),e},get:function(){return s},enumerable:!0})}function u(r,e,n,i,a,t,o){for(var u=new Array(a),d=new Array(a),s=0;s4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+_);r["uniformMatrix"+g+"fv"](c[l],!1,m);break}throw new a("","Unknown uniform data type for "+name+": "+_)}if((g=_.charCodeAt(_.length-1)-48)<2||g>4)throw new a("","Invalid data type");switch(_.charAt(0)){case"b":case"i":r["uniform"+g+"iv"](c[l],m);break;case"v":r["uniform"+g+"fv"](c[l],m);break;default:throw new a("","Unrecognized data type for vector "+name+": "+_)}}}}}}function d(r,e){if("object"!==typeof e)return[[r,e]];var n=[];for(var i in e){var a=e[i],t=r;parseInt(i)+""===i?t+="["+i+"]":t+="."+i,"object"===typeof a?n.push.apply(n,d(t,a)):n.push([t,a])}return n}function s(r,e,i){if("object"===typeof i){var d=l(i);Object.defineProperty(r,e,{get:t(d),set:u(i),enumerable:!0,configurable:!1})}else c[i]?Object.defineProperty(r,e,{get:(s=i,function(r,e,n){return r.getUniform(e.program,n[s])}),set:u(i),enumerable:!0,configurable:!1}):r[e]=function(r){switch(r){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=r.indexOf("vec");if(0<=e&&e<=1&&r.length===4+e){if((n=r.charCodeAt(r.length-1)-48)<2||n>4)throw new a("","Invalid data type");return"b"===r.charAt(0)?o(n,!1):o(n,0)}if(0===r.indexOf("mat")&&4===r.length){var n;if((n=r.charCodeAt(r.length-1)-48)<2||n>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+r);return o(n*n,0)}throw new a("","Unknown uniform data type for "+name+": "+r)}}(n[i].type);var s}function l(r){var e;if(Array.isArray(r)){e=new Array(r.length);for(var n=0;n1){c[0]in t||(t[c[0]]=[]),t=t[c[0]];for(var u=1;u1)for(var u=0;u 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"]),t=i(["#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=i(["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"]),c=i(["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}"]);e.meshShader={vertex:a,fragment:t,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(r,e,n){"use strict";var i=n(2931),a=n(9970),t=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(r,e,n,t){for(var o=0,c=0;c0)for(G=0;G<8;G++){var C=(G+1)%8;d.push(m[G],p[G],p[C],p[C],m[C],m[G]),l.push(_,g,g,g,_,_),I.push(y,f,f,f,y,y);var S=d.length;s.push([S-6,S-5,S-4],[S-3,S-2,S-1])}var A=m;m=p,p=A;var b=_;_=g,g=b;var M=y;y=f,f=M}return{positions:d,cells:s,vectors:l,vertexIntensity:I}}(r,n,t,o)})),l=[],m=[],p=[],I=[];for(c=0;ce)return n-1}return n},u=function(r,e,n){return rn?n:r},d=function(r){var e=1/0;r.sort((function(r,e){return r-e}));for(var n=r.length,i=1;il-1||_>m-1||h>p-1)return i.create();var v,x,P,G,C,S,A=t[0][I],b=t[0][g],M=t[1][y],B=t[1][_],k=t[2][f],F=(o-A)/(b-A),z=(d-M)/(B-M),w=(s-k)/(t[2][h]-k);switch(isFinite(F)||(F=.5),isFinite(z)||(z=.5),isFinite(w)||(w=.5),n.reversedX&&(I=l-1-I,g=l-1-g),n.reversedY&&(y=m-1-y,_=m-1-_),n.reversedZ&&(f=p-1-f,h=p-1-h),n.filled){case 5:C=f,S=h,P=y*p,G=_*p,v=I*p*m,x=g*p*m;break;case 4:C=f,S=h,v=I*p,x=g*p,P=y*p*l,G=_*p*l;break;case 3:P=y,G=_,C=f*m,S=h*m,v=I*m*p,x=g*m*p;break;case 2:P=y,G=_,v=I*m,x=g*m,C=f*m*l,S=h*m*l;break;case 1:v=I,x=g,C=f*l,S=h*l,P=y*l*p,G=_*l*p;break;default:v=I,x=g,P=y*l,G=_*l,C=f*l*m,S=h*l*m}var R=a[v+P+C],E=a[v+P+S],N=a[v+G+C],T=a[v+G+S],D=a[x+P+C],J=a[x+P+S],U=a[x+G+C],H=a[x+G+S],L=i.create(),O=i.create(),K=i.create(),V=i.create();i.lerp(L,R,D,F),i.lerp(O,E,J,F),i.lerp(K,N,U,F),i.lerp(V,T,H,F);var j=i.create(),W=i.create();i.lerp(j,L,K,z),i.lerp(W,O,V,z);var Z=i.create();return i.lerp(Z,j,W,w),Z}(e,r,p)},y=r.getDivergence||function(r,e){var n=i.create(),a=1e-4;i.add(n,r,[a,0,0]);var t=I(n);i.subtract(t,t,e),i.scale(t,t,1/a),i.add(n,r,[0,a,0]);var o=I(n);i.subtract(o,o,e),i.scale(o,o,1/a),i.add(n,r,[0,0,a]);var c=I(n);return i.subtract(c,c,e),i.scale(c,c,1/a),i.add(n,t,o),i.add(n,n,c),n},f=[],g=e[0][0],_=e[0][1],h=e[0][2],v=e[1][0],x=e[1][1],P=e[1][2],G=function(r){var e=r[0],n=r[1],i=r[2];return!(ev||n<_||n>x||iP)},C=10*i.distance(e[0],e[1])/a,S=C*C,A=1,b=0,M=n.length;M>1&&(A=function(r){for(var e=[],n=[],i=[],a={},t={},o={},c=r.length,u=0;ub&&(b=T),E.push(T),f.push({points:F,velocities:z,divergences:E});for(var D=0;D<100*a&&F.lengthS&&i.scale(J,J,C/Math.sqrt(U)),i.add(J,J,k),w=I(J),i.squaredDistance(R,J)-S>-1e-4*S&&(F.push(J),R=J,z.push(w),N=y(J,w),T=i.length(N),isFinite(T)&&T>b&&(b=T),E.push(T)),k=J}}var H=o(f,r.colormap,b,A);return l?H.tubeScale=l:(0===b&&(b=1),H.tubeScale=.5*s*A/b),H};var s=n(6740),l=n(6405).createMesh;r.exports.createTubeMesh=function(r,e){return l(r,e,{shaders:s,traceType:"streamtube"})}},990:function(r,e,n){var i=n(9405),a=n(3236),t=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 mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 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 (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) 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 \u2014 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"]),c=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 mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 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"]),u=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"]);e.createShader=function(r){var e=i(r,t,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(r){var e=i(r,t,u,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(r){var e=i(r,c,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(r){var e=i(r,c,u,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},9499:function(r,e,n){"use strict";r.exports=function(r){var e=r.gl,n=_(e),i=v(e),c=h(e),u=x(e),d=a(e),s=t(e,[{buffer:d,size:4,stride:P,offset:0},{buffer:d,size:3,stride:P,offset:16},{buffer:d,size:3,stride:P,offset:28}]),l=a(e),m=t(e,[{buffer:l,size:4,stride:20,offset:0},{buffer:l,size:1,stride:20,offset:16}]),p=a(e),I=t(e,[{buffer:p,size:2,type:e.FLOAT}]),y=o(e,1,b,e.RGBA,e.UNSIGNED_BYTE);y.minFilter=e.LINEAR,y.magFilter=e.LINEAR;var f=new M(e,[0,0],[[0,0,0],[0,0,0]],n,i,d,s,y,c,u,l,m,p,I,[0,0,0]),g={levels:[[],[],[]]};for(var G in r)g[G]=r[G];return g.colormap=g.colormap||"jet",f.update(g),f};var i=n(8828),a=n(2762),t=n(8116),o=n(7766),c=n(1888),u=n(6729),d=n(5298),s=n(9994),l=n(9618),m=n(3711),p=n(6760),I=n(7608),y=n(2478),f=n(6199),g=n(990),_=g.createShader,h=g.createContourShader,v=g.createPickShader,x=g.createPickContourShader,P=40,G=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],C=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],S=[[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 A(r,e,n,i,a){this.position=r,this.index=e,this.uv=n,this.level=i,this.dataCoordinate=a}!function(){for(var r=0;r<3;++r){var e=S[r],n=(r+2)%3;e[(r+1)%3+0]=1,e[n+3]=1,e[r+6]=1}}();var b=256;function M(r,e,n,i,a,t,o,u,d,s,m,p,I,y,f){this.gl=r,this.shape=e,this.bounds=n,this.objectOffset=f,this.intensityBounds=[],this._shader=i,this._pickShader=a,this._coordinateBuffer=t,this._vao=o,this._colorMap=u,this._contourShader=d,this._contourPickShader=s,this._contourBuffer=m,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new A([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=I,this._dynamicVAO=y,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=[l(c.mallocFloat(1024),[0,0]),l(c.mallocFloat(1024),[0,0]),l(c.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 B=M.prototype;B.genColormap=function(r,e){var n=!1,i=s([u({colormap:r,nshades:b,format:"rgba"}).map((function(r,i){var a=e?function(r,e){if(!e)return 1;if(!e.length)return 1;for(var n=0;nr&&n>0){var i=(e[n][0]-r)/(e[n][0]-e[n-1][0]);return e[n][1]*(1-i)+i*e[n-1][1]}}return 1}(i/255,e):r[3];return a<1&&(n=!0),[r[0],r[1],r[2],255*a]}))]);return d.divseq(i,255),this.hasAlphaScale=n,i},B.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},B.isOpaque=function(){return!this.isTransparent()},B.pickSlots=1,B.setPickBase=function(r){this.pickId=r};var k=[0,0,0],F={showSurface:!1,showContour:!1,projections:[G.slice(),G.slice(),G.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function z(r,e){var n,i,a,t=e.axes&&e.axes.lastCubeProps.axis||k,o=e.showSurface,c=e.showContour;for(n=0;n<3;++n)for(o=o||e.surfaceProject[n],i=0;i<3;++i)c=c||e.contourProject[n][i];for(n=0;n<3;++n){var u=F.projections[n];for(i=0;i<16;++i)u[i]=0;for(i=0;i<4;++i)u[5*i]=1;u[5*n]=0,u[12+n]=e.axesBounds[+(t[n]>0)][n],p(u,r.model,u);var d=F.clipBounds[n];for(a=0;a<2;++a)for(i=0;i<3;++i)d[a][i]=r.clipBounds[a][i];d[0][n]=-1e8,d[1][n]=1e8}return F.showSurface=o,F.showContour=c,F}var w={model:G,view:G,projection:G,inverseModel:G.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},R=G.slice(),E=[1,0,0,0,1,0,0,0,1];function N(r,e){r=r||{};var n=this.gl;n.disable(n.CULL_FACE),this._colorMap.bind(0);var i=w;i.model=r.model||G,i.view=r.view||G,i.projection=r.projection||G,i.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],i.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],i.objectOffset=this.objectOffset,i.contourColor=this.contourColor[0],i.inverseModel=I(i.inverseModel,i.model);for(var a=0;a<2;++a)for(var t=i.clipBounds[a],o=0;o<3;++o)t[o]=Math.min(Math.max(this.clipBounds[a][o],-1e8),1e8);i.kambient=this.ambientLight,i.kdiffuse=this.diffuseLight,i.kspecular=this.specularLight,i.roughness=this.roughness,i.fresnel=this.fresnel,i.opacity=this.opacity,i.height=0,i.permutation=E,i.vertexColor=this.vertexColor;var c=R;for(p(c,i.view,i.model),p(c,i.projection,c),I(c,c),a=0;a<3;++a)i.eyePosition[a]=c[12+a]/c[15];var u=c[15];for(a=0;a<3;++a)u+=this.lightPosition[a]*c[4*a+3];for(a=0;a<3;++a){var d=c[12+a];for(o=0;o<3;++o)d+=c[4*o+a]*this.lightPosition[o];i.lightPosition[a]=d/u}var s=z(i,this);if(s.showSurface){for(this._shader.bind(),this._shader.uniforms=i,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(n.TRIANGLES,this._vertexCount),a=0;a<3;++a)this.surfaceProject[a]&&this.vertexCount&&(this._shader.uniforms.model=s.projections[a],this._shader.uniforms.clipBounds=s.clipBounds[a],this._vao.draw(n.TRIANGLES,this._vertexCount));this._vao.unbind()}if(s.showContour){var l=this._contourShader;i.kambient=1,i.kdiffuse=0,i.kspecular=0,i.opacity=1,l.bind(),l.uniforms=i;var m=this._contourVAO;for(m.bind(),a=0;a<3;++a)for(l.uniforms.permutation=S[a],n.lineWidth(this.contourWidth[a]*this.pixelRatio),o=0;o>4)/16)/255,a=Math.floor(i),t=i-a,o=e[1]*(r.value[1]+(15&r.value[2])/16)/255,c=Math.floor(o),u=o-c;a+=1,c+=1;var d=n.position;d[0]=d[1]=d[2]=0;for(var s=0;s<2;++s)for(var l=s?t:1-t,m=0;m<2;++m)for(var p=a+s,I=c+m,f=l*(m?u:1-u),g=0;g<3;++g)d[g]+=this._field[g].get(p,I)*f;for(var _=this._pickResult.level,h=0;h<3;++h)if(_[h]=y.le(this.contourLevels[h],d[h]),_[h]<0)this.contourLevels[h].length>0&&(_[h]=0);else if(_[h]Math.abs(x-d[h])&&(_[h]+=1)}for(n.index[0]=t<.5?a:a+1,n.index[1]=u<.5?c:c+1,n.uv[0]=i/e[0],n.uv[1]=o/e[1],g=0;g<3;++g)n.dataCoordinate[g]=this._field[g].get(n.index[0],n.index[1]);return n},B.padField=function(r,e){var n=e.shape.slice(),i=r.shape.slice();d.assign(r.lo(1,1).hi(n[0],n[1]),e),d.assign(r.lo(1).hi(n[0],1),e.hi(n[0],1)),d.assign(r.lo(1,i[1]-1).hi(n[0],1),e.lo(0,n[1]-1).hi(n[0],1)),d.assign(r.lo(0,1).hi(1,n[1]),e.hi(1)),d.assign(r.lo(i[0]-1,1).hi(1,n[1]),e.lo(n[0]-1)),r.set(0,0,e.get(0,0)),r.set(0,i[1]-1,e.get(0,n[1]-1)),r.set(i[0]-1,0,e.get(n[0]-1,0)),r.set(i[0]-1,i[1]-1,e.get(n[0]-1,n[1]-1))},B.update=function(r){r=r||{},this.objectOffset=r.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in r&&(this.contourWidth=D(r.contourWidth,Number)),"showContour"in r&&(this.showContour=D(r.showContour,Boolean)),"showSurface"in r&&(this.showSurface=!!r.showSurface),"contourTint"in r&&(this.contourTint=D(r.contourTint,Boolean)),"contourColor"in r&&(this.contourColor=U(r.contourColor)),"contourProject"in r&&(this.contourProject=D(r.contourProject,(function(r){return D(r,Boolean)}))),"surfaceProject"in r&&(this.surfaceProject=r.surfaceProject),"dynamicColor"in r&&(this.dynamicColor=U(r.dynamicColor)),"dynamicTint"in r&&(this.dynamicTint=D(r.dynamicTint,Number)),"dynamicWidth"in r&&(this.dynamicWidth=D(r.dynamicWidth,Number)),"opacity"in r&&(this.opacity=r.opacity),"opacityscale"in r&&(this.opacityscale=r.opacityscale),"colorBounds"in r&&(this.colorBounds=r.colorBounds),"vertexColor"in r&&(this.vertexColor=r.vertexColor?1:0),"colormap"in r&&this._colorMap.setPixels(this.genColormap(r.colormap,this.opacityscale));var e=r.field||r.coords&&r.coords[2]||null,n=!1;if(e||(e=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 r||"coords"in r){var a=(e.shape[0]+2)*(e.shape[1]+2);a>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(i.nextPow2(a))),this._field[2]=l(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var t=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(c.freeFloat(this._field[o].data),this._field[o].data=c.mallocFloat(this._field[2].size)),this._field[o]=l(this._field[o].data,[t[0]+2,t[1]+2]);if(r.coords){var u=r.coords;if(!Array.isArray(u)||3!==u.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var d=u[o];for(g=0;g<2;++g)if(d.shape[g]!==t[g])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],d)}}else if(r.ticks){var s=r.ticks;if(!Array.isArray(s)||2!==s.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=s[o];if((Array.isArray(p)||p.length)&&(p=l(p)),p.shape[0]!==t[o])throw new Error("gl-surface: invalid tick length");var I=l(p.data,t);I.stride[o]=p.stride[0],I.stride[1^o]=0,this.padField(this._field[o],I)}}else{for(o=0;o<2;++o){var y=[0,0];y[o]=1,this._field[o]=l(this._field[o].data,[t[0]+2,t[1]+2],y,0)}this._field[0].set(0,0,0);for(var g=0;g0){for(var hr=0;hr<5;++hr)Q.pop();H-=1}continue r}Q.push(ir[0],ir[1],or[0],or[1],ir[2]),H+=1}}nr.push(H)}this._contourOffsets[$]=er,this._contourCounts[$]=nr}var vr=c.mallocFloat(Q.length);for(o=0;oc||o[1]<0||o[1]>c)throw new Error("gl-texture2d: Invalid texture size");var u=I(o,e.stride.slice()),d=0;"float32"===n?d=r.FLOAT:"float64"===n?(d=r.FLOAT,u=!1,n="float32"):"uint8"===n?d=r.UNSIGNED_BYTE:(d=r.UNSIGNED_BYTE,u=!1,n="uint8");var l,p,f=0;if(2===o.length)f=r.LUMINANCE,o=[o[0],o[1],1],e=i(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])f=r.ALPHA;else if(2===o[2])f=r.LUMINANCE_ALPHA;else if(3===o[2])f=r.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=r.RGBA}}d!==r.FLOAT||r.getExtension("OES_texture_float")||(d=r.UNSIGNED_BYTE,u=!1);var g=e.size;if(u)l=0===e.offset&&e.data.length===g?e.data:e.data.subarray(e.offset,e.offset+g);else{var _=[o[2],o[2]*o[0],1];p=t.malloc(g,n);var h=i(p,o,_,0);"float32"!==n&&"float64"!==n||d!==r.UNSIGNED_BYTE?a.assign(h,e):s(h,e),l=p.subarray(0,g)}var v=y(r);return r.texImage2D(r.TEXTURE_2D,0,f,o[0],o[1],0,f,d,l),u||t.free(p),new m(r,v,o[0],o[1],f,d)}(r,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,c=null,u=null;function d(r){return"undefined"!=typeof HTMLCanvasElement&&r instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&r instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&r instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&r instanceof ImageData}var s=function(r,e){a.muls(r,e,255)};function l(r,e,n){var i=r.gl,a=i.getParameter(i.MAX_TEXTURE_SIZE);if(e<0||e>a||n<0||n>a)throw new Error("gl-texture2d: Invalid texture size");return r._shape=[e,n],r.bind(),i.texImage2D(i.TEXTURE_2D,0,r.format,e,n,0,r.format,r.type,null),r._mipLevels=[0],r}function m(r,e,n,i,a,t){this.gl=r,this.handle=e,this.format=a,this.type=t,this._shape=[n,i],this._mipLevels=[0],this._magFilter=r.NEAREST,this._minFilter=r.NEAREST,this._wrapS=r.CLAMP_TO_EDGE,this._wrapT=r.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,c=[this._wrapS,this._wrapT];Object.defineProperties(c,[{get:function(){return o._wrapS},set:function(r){return o.wrapS=r}},{get:function(){return o._wrapT},set:function(r){return o.wrapT=r}}]),this._wrapVector=c;var u=[this._shape[0],this._shape[1]];Object.defineProperties(u,[{get:function(){return o._shape[0]},set:function(r){return o.width=r}},{get:function(){return o._shape[1]},set:function(r){return o.height=r}}]),this._shapeVector=u}var p=m.prototype;function I(r,e){return 3===r.length?1===e[2]&&e[1]===r[0]*r[2]&&e[0]===r[2]:1===e[0]&&e[1]===r[0]}function y(r){var e=r.createTexture();return r.bindTexture(r.TEXTURE_2D,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e}function f(r,e,n,i,a){var t=r.getParameter(r.MAX_TEXTURE_SIZE);if(e<0||e>t||n<0||n>t)throw new Error("gl-texture2d: Invalid texture shape");if(a===r.FLOAT&&!r.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=y(r);return r.texImage2D(r.TEXTURE_2D,0,i,e,n,0,i,a,null),new m(r,o,e,n,i,a)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(r){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(r)>=0&&(e.getExtension("OES_texture_float_linear")||(r=e.NEAREST)),c.indexOf(r)<0)throw new Error("gl-texture2d: Unknown filter mode "+r);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r),this._minFilter=r}},magFilter:{get:function(){return this._magFilter},set:function(r){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(r)>=0&&(e.getExtension("OES_texture_float_linear")||(r=e.NEAREST)),c.indexOf(r)<0)throw new Error("gl-texture2d: Unknown filter mode "+r);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r),this._magFilter=r}},mipSamples:{get:function(){return this._anisoSamples},set:function(r){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(r,1),e!==this._anisoSamples){var n=this.gl.getExtension("EXT_texture_filter_anisotropic");n&&this.gl.texParameterf(this.gl.TEXTURE_2D,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(r){if(this.bind(),u.indexOf(r)<0)throw new Error("gl-texture2d: Unknown wrap mode "+r);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,r),this._wrapS=r}},wrapT:{get:function(){return this._wrapT},set:function(r){if(this.bind(),u.indexOf(r)<0)throw new Error("gl-texture2d: Unknown wrap mode "+r);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,r),this._wrapT=r}},wrap:{get:function(){return this._wrapVector},set:function(r){if(Array.isArray(r)||(r=[r,r]),2!==r.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(u.indexOf(r[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+r);this._wrapS=r[0],this._wrapT=r[1];var n=this.gl;return this.bind(),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,this._wrapS),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,this._wrapT),r}},shape:{get:function(){return this._shapeVector},set:function(r){if(Array.isArray(r)){if(2!==r.length)throw new Error("gl-texture2d: Invalid texture shape")}else r=[0|r,0|r];return l(this,0|r[0],0|r[1]),[0|r[0],0|r[1]]}},width:{get:function(){return this._shape[0]},set:function(r){return l(this,r|=0,this._shape[1]),r}},height:{get:function(){return this._shape[1]},set:function(r){return r|=0,l(this,this._shape[0],r),r}}}),p.bind=function(r){var e=this.gl;return void 0!==r&&e.activeTexture(e.TEXTURE0+(0|r)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==r?0|r:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var r=Math.min(this._shape[0],this._shape[1]),e=0;r>0;++e,r>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(r,e,n,o){var c=this.gl;this.bind(),Array.isArray(e)?(o=n,n=0|e[1],e=0|e[0]):(e=e||0,n=n||0),o=o||0;var u=d(r)?r:r.raw;if(u)this._mipLevels.indexOf(o)<0?(c.texImage2D(c.TEXTURE_2D,0,this.format,this.format,this.type,u),this._mipLevels.push(o)):c.texSubImage2D(c.TEXTURE_2D,o,e,n,this.format,this.type,u);else{if(!(r.shape&&r.stride&&r.data))throw new Error("gl-texture2d: Unsupported data type");if(r.shape.length<2||e+r.shape[1]>this._shape[1]>>>o||n+r.shape[0]>this._shape[0]>>>o||e<0||n<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(r,e,n,o,c,u,d,l){var m=l.dtype,p=l.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var y=0,f=0,g=I(p,l.stride.slice());if("float32"===m?y=r.FLOAT:"float64"===m?(y=r.FLOAT,g=!1,m="float32"):"uint8"===m?y=r.UNSIGNED_BYTE:(y=r.UNSIGNED_BYTE,g=!1,m="uint8"),2===p.length)f=r.LUMINANCE,p=[p[0],p[1],1],l=i(l.data,p,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])f=r.ALPHA;else if(2===p[2])f=r.LUMINANCE_ALPHA;else if(3===p[2])f=r.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=r.RGBA}p[2]}if(f!==r.LUMINANCE&&f!==r.ALPHA||c!==r.LUMINANCE&&c!==r.ALPHA||(f=c),f!==c)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var _=l.size,h=d.indexOf(o)<0;if(h&&d.push(o),y===u&&g)0===l.offset&&l.data.length===_?h?r.texImage2D(r.TEXTURE_2D,o,c,p[0],p[1],0,c,u,l.data):r.texSubImage2D(r.TEXTURE_2D,o,e,n,p[0],p[1],c,u,l.data):h?r.texImage2D(r.TEXTURE_2D,o,c,p[0],p[1],0,c,u,l.data.subarray(l.offset,l.offset+_)):r.texSubImage2D(r.TEXTURE_2D,o,e,n,p[0],p[1],c,u,l.data.subarray(l.offset,l.offset+_));else{var v;v=u===r.FLOAT?t.mallocFloat32(_):t.mallocUint8(_);var x=i(v,p,[p[2],p[2]*p[0],1]);y===r.FLOAT&&u===r.UNSIGNED_BYTE?s(x,l):a.assign(x,l),h?r.texImage2D(r.TEXTURE_2D,o,c,p[0],p[1],0,c,u,v.subarray(0,_)):r.texSubImage2D(r.TEXTURE_2D,o,e,n,p[0],p[1],c,u,v.subarray(0,_)),u===r.FLOAT?t.freeFloat32(v):t.freeUint8(v)}}(c,e,n,o,this.format,this.type,this._mipLevels,r)}}},1433:function(r){"use strict";r.exports=function(r,e,n){e?e.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var i=0|r.getParameter(r.MAX_VERTEX_ATTRIBS);if(n){if(n.length>i)throw new Error("gl-vao: Too many vertex attributes");for(var a=0;a1?0:Math.acos(c)};var i=n(2825),a=n(3536),t=n(244)},9226:function(r){r.exports=function(r,e){return r[0]=Math.ceil(e[0]),r[1]=Math.ceil(e[1]),r[2]=Math.ceil(e[2]),r}},3126:function(r){r.exports=function(r){var e=new Float32Array(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}},3990:function(r){r.exports=function(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}},1091:function(r){r.exports=function(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},5911:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[0],c=n[1],u=n[2];return r[0]=a*u-t*c,r[1]=t*o-i*u,r[2]=i*c-a*o,r}},5455:function(r,e,n){r.exports=n(7056)},7056:function(r){r.exports=function(r,e){var n=e[0]-r[0],i=e[1]-r[1],a=e[2]-r[2];return Math.sqrt(n*n+i*i+a*a)}},4008:function(r,e,n){r.exports=n(6690)},6690:function(r){r.exports=function(r,e,n){return r[0]=e[0]/n[0],r[1]=e[1]/n[1],r[2]=e[2]/n[2],r}},244:function(r){r.exports=function(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}},2613:function(r){r.exports=1e-6},9922:function(r,e,n){r.exports=function(r,e){var n=r[0],a=r[1],t=r[2],o=e[0],c=e[1],u=e[2];return Math.abs(n-o)<=i*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(a-c)<=i*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(t-u)<=i*Math.max(1,Math.abs(t),Math.abs(u))};var i=n(2613)},9265:function(r){r.exports=function(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}},2681:function(r){r.exports=function(r,e){return r[0]=Math.floor(e[0]),r[1]=Math.floor(e[1]),r[2]=Math.floor(e[2]),r}},5137:function(r,e,n){r.exports=function(r,e,n,a,t,o){var c,u;for(e||(e=3),n||(n=0),u=a?Math.min(a*e+n,r.length):r.length,c=n;c0&&(t=1/Math.sqrt(t),r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t),r}},7636:function(r){r.exports=function(r,e){e=e||1;var n=2*Math.random()*Math.PI,i=2*Math.random()-1,a=Math.sqrt(1-i*i)*e;return r[0]=Math.cos(n)*a,r[1]=Math.sin(n)*a,r[2]=i*e,r}},6894:function(r){r.exports=function(r,e,n,i){var a=n[1],t=n[2],o=e[1]-a,c=e[2]-t,u=Math.sin(i),d=Math.cos(i);return r[0]=e[0],r[1]=a+o*d-c*u,r[2]=t+o*u+c*d,r}},109:function(r){r.exports=function(r,e,n,i){var a=n[0],t=n[2],o=e[0]-a,c=e[2]-t,u=Math.sin(i),d=Math.cos(i);return r[0]=a+c*u+o*d,r[1]=e[1],r[2]=t+c*d-o*u,r}},8692:function(r){r.exports=function(r,e,n,i){var a=n[0],t=n[1],o=e[0]-a,c=e[1]-t,u=Math.sin(i),d=Math.cos(i);return r[0]=a+o*d-c*u,r[1]=t+o*u+c*d,r[2]=e[2],r}},2447:function(r){r.exports=function(r,e){return r[0]=Math.round(e[0]),r[1]=Math.round(e[1]),r[2]=Math.round(e[2]),r}},6621:function(r){r.exports=function(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r}},8489:function(r){r.exports=function(r,e,n,i){return r[0]=e[0]+n[0]*i,r[1]=e[1]+n[1]*i,r[2]=e[2]+n[2]*i,r}},1463:function(r){r.exports=function(r,e,n,i){return r[0]=e,r[1]=n,r[2]=i,r}},6141:function(r,e,n){r.exports=n(2953)},5486:function(r,e,n){r.exports=n(3066)},2953:function(r){r.exports=function(r,e){var n=e[0]-r[0],i=e[1]-r[1],a=e[2]-r[2];return n*n+i*i+a*a}},3066:function(r){r.exports=function(r){var e=r[0],n=r[1],i=r[2];return e*e+n*n+i*i}},2229:function(r,e,n){r.exports=n(6843)},6843:function(r){r.exports=function(r,e,n){return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],r}},492:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2];return r[0]=i*n[0]+a*n[3]+t*n[6],r[1]=i*n[1]+a*n[4]+t*n[7],r[2]=i*n[2]+a*n[5]+t*n[8],r}},5673:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[3]*i+n[7]*a+n[11]*t+n[15];return o=o||1,r[0]=(n[0]*i+n[4]*a+n[8]*t+n[12])/o,r[1]=(n[1]*i+n[5]*a+n[9]*t+n[13])/o,r[2]=(n[2]*i+n[6]*a+n[10]*t+n[14])/o,r}},264:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[0],c=n[1],u=n[2],d=n[3],s=d*i+c*t-u*a,l=d*a+u*i-o*t,m=d*t+o*a-c*i,p=-o*i-c*a-u*t;return r[0]=s*d+p*-o+l*-u-m*-c,r[1]=l*d+p*-c+m*-o-s*-u,r[2]=m*d+p*-u+s*-c-l*-o,r}},4361:function(r){r.exports=function(r,e,n){return r[0]=e[0]+n[0],r[1]=e[1]+n[1],r[2]=e[2]+n[2],r[3]=e[3]+n[3],r}},2335:function(r){r.exports=function(r){var e=new Float32Array(4);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e}},2933:function(r){r.exports=function(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}},7536:function(r){r.exports=function(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},4691:function(r){r.exports=function(r,e){var n=e[0]-r[0],i=e[1]-r[1],a=e[2]-r[2],t=e[3]-r[3];return Math.sqrt(n*n+i*i+a*a+t*t)}},1373:function(r){r.exports=function(r,e,n){return r[0]=e[0]/n[0],r[1]=e[1]/n[1],r[2]=e[2]/n[2],r[3]=e[3]/n[3],r}},3750:function(r){r.exports=function(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]}},3390:function(r){r.exports=function(r,e,n,i){var a=new Float32Array(4);return a[0]=r,a[1]=e,a[2]=n,a[3]=i,a}},9970:function(r,e,n){r.exports={create:n(7536),clone:n(2335),fromValues:n(3390),copy:n(2933),set:n(4578),add:n(4361),subtract:n(6860),multiply:n(3576),divide:n(1373),min:n(2334),max:n(160),scale:n(9288),scaleAndAdd:n(4844),distance:n(4691),squaredDistance:n(7960),length:n(6808),squaredLength:n(483),negate:n(1498),inverse:n(4494),normalize:n(5177),dot:n(3750),lerp:n(2573),random:n(9131),transformMat4:n(5352),transformQuat:n(4041)}},4494:function(r){r.exports=function(r,e){return r[0]=1/e[0],r[1]=1/e[1],r[2]=1/e[2],r[3]=1/e[3],r}},6808:function(r){r.exports=function(r){var e=r[0],n=r[1],i=r[2],a=r[3];return Math.sqrt(e*e+n*n+i*i+a*a)}},2573:function(r){r.exports=function(r,e,n,i){var a=e[0],t=e[1],o=e[2],c=e[3];return r[0]=a+i*(n[0]-a),r[1]=t+i*(n[1]-t),r[2]=o+i*(n[2]-o),r[3]=c+i*(n[3]-c),r}},160:function(r){r.exports=function(r,e,n){return r[0]=Math.max(e[0],n[0]),r[1]=Math.max(e[1],n[1]),r[2]=Math.max(e[2],n[2]),r[3]=Math.max(e[3],n[3]),r}},2334:function(r){r.exports=function(r,e,n){return r[0]=Math.min(e[0],n[0]),r[1]=Math.min(e[1],n[1]),r[2]=Math.min(e[2],n[2]),r[3]=Math.min(e[3],n[3]),r}},3576:function(r){r.exports=function(r,e,n){return r[0]=e[0]*n[0],r[1]=e[1]*n[1],r[2]=e[2]*n[2],r[3]=e[3]*n[3],r}},1498:function(r){r.exports=function(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=-e[3],r}},5177:function(r){r.exports=function(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=n*n+i*i+a*a+t*t;return o>0&&(o=1/Math.sqrt(o),r[0]=n*o,r[1]=i*o,r[2]=a*o,r[3]=t*o),r}},9131:function(r,e,n){var i=n(5177),a=n(9288);r.exports=function(r,e){return e=e||1,r[0]=Math.random(),r[1]=Math.random(),r[2]=Math.random(),r[3]=Math.random(),i(r,r),a(r,r,e),r}},9288:function(r){r.exports=function(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r}},4844:function(r){r.exports=function(r,e,n,i){return r[0]=e[0]+n[0]*i,r[1]=e[1]+n[1]*i,r[2]=e[2]+n[2]*i,r[3]=e[3]+n[3]*i,r}},4578:function(r){r.exports=function(r,e,n,i,a){return r[0]=e,r[1]=n,r[2]=i,r[3]=a,r}},7960:function(r){r.exports=function(r,e){var n=e[0]-r[0],i=e[1]-r[1],a=e[2]-r[2],t=e[3]-r[3];return n*n+i*i+a*a+t*t}},483:function(r){r.exports=function(r){var e=r[0],n=r[1],i=r[2],a=r[3];return e*e+n*n+i*i+a*a}},6860:function(r){r.exports=function(r,e,n){return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],r[3]=e[3]-n[3],r}},5352:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3];return r[0]=n[0]*i+n[4]*a+n[8]*t+n[12]*o,r[1]=n[1]*i+n[5]*a+n[9]*t+n[13]*o,r[2]=n[2]*i+n[6]*a+n[10]*t+n[14]*o,r[3]=n[3]*i+n[7]*a+n[11]*t+n[15]*o,r}},4041:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[0],c=n[1],u=n[2],d=n[3],s=d*i+c*t-u*a,l=d*a+u*i-o*t,m=d*t+o*a-c*i,p=-o*i-c*a-u*t;return r[0]=s*d+p*-o+l*-u-m*-c,r[1]=l*d+p*-c+m*-o-s*-u,r[2]=m*d+p*-u+s*-c-l*-o,r[3]=e[3],r}},1848:function(r,e,n){var i=n(4905),a=n(6468);r.exports=function(r){for(var e=Array.isArray(r)?r:i(r),n=0;n0)continue;n=r.slice(0,1).join("")}return J(n),F+=n.length,(b=b.slice(n.length)).length}}function W(){return/[^a-fA-F0-9]/.test(e)?(J(b.join("")),A=u,C):(b.push(e),n=e,C+1)}function Z(){return"."===e||/[eE]/.test(e)?(b.push(e),A=y,n=e,C+1):"x"===e&&1===b.length&&"0"===b[0]?(A=x,b.push(e),n=e,C+1):/[^\d]/.test(e)?(J(b.join("")),A=u,C):(b.push(e),n=e,C+1)}function q(){return"f"===e&&(b.push(e),n=e,C+=1),/[eE]/.test(e)?(b.push(e),n=e,C+1):("-"!==e&&"+"!==e||!/[eE]/.test(n))&&/[^\d]/.test(e)?(J(b.join("")),A=u,C):(b.push(e),n=e,C+1)}function Y(){if(/[^\d\w_]/.test(e)){var r=b.join("");return A=D[r]?_:T[r]?g:f,J(b.join("")),A=u,C}return b.push(e),n=e,C+1}};var i=n(620),a=n(7827),t=n(6852),o=n(7932),c=n(3508),u=999,d=9999,s=0,l=1,m=2,p=3,I=4,y=5,f=6,g=7,_=8,h=9,v=10,x=11,P=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(r,e,n){var i=n(6852);i=i.slice().filter((function(r){return!/^(gl\_|texture)/.test(r)})),r.exports=i.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"])},6852:function(r){r.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"]},7932:function(r,e,n){var i=n(620);r.exports=i.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])},620:function(r){r.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]},7827:function(r){r.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(r,e,n){var i=n(5874);r.exports=function(r,e){var n=i(e),a=[];return a=(a=a.concat(n(r))).concat(n(null))}},3236:function(r){r.exports=function(r){"string"===typeof r&&(r=[r]);for(var e=[].slice.call(arguments,1),n=[],i=0;i>1,s=-7,l=n?a-1:0,m=n?-1:1,p=r[e+l];for(l+=m,t=p&(1<<-s)-1,p>>=-s,s+=c;s>0;t=256*t+r[e+l],l+=m,s-=8);for(o=t&(1<<-s)-1,t>>=-s,s+=i;s>0;o=256*o+r[e+l],l+=m,s-=8);if(0===t)t=1-d;else{if(t===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),t-=d}return(p?-1:1)*o*Math.pow(2,t-i)},e.write=function(r,e,n,i,a,t){var o,c,u,d=8*t-a-1,s=(1<>1,m=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:t-1,I=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=s):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+l>=1?m/u:m*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=s?(c=0,o=s):o+l>=1?(c=(e*u-1)*Math.pow(2,a),o+=l):(c=e*Math.pow(2,l-1)*Math.pow(2,a),o=0));a>=8;r[n+p]=255&c,p+=I,c/=256,a-=8);for(o=o<0;r[n+p]=255&o,p+=I,o/=256,d-=8);r[n+p-I]|=128*y}},8954:function(r,e,n){"use strict";r.exports=function(r,e){var n=r.length;if(0===n)throw new Error("Must have at least d+1 points");var a=r[0].length;if(n<=a)throw new Error("Must input at least d+1 points");var o=r.slice(0,a+1),c=i.apply(void 0,o);if(0===c)throw new Error("Input not in general position");for(var u=new Array(a+1),s=0;s<=a;++s)u[s]=s;c<0&&(u[0]=1,u[1]=0);var l=new t(u,new Array(a+1),!1),m=l.adjacent,p=new Array(a+2);for(s=0;s<=a;++s){for(var I=u.slice(),y=0;y<=a;++y)y===s&&(I[y]=-1);var f=I[0];I[0]=I[1],I[1]=f;var g=new t(I,new Array(a+1),!0);m[s]=g,p[s]=g}for(p[a+1]=l,s=0;s<=a;++s){I=m[s].vertices;var _=m[s].adjacent;for(y=0;y<=a;++y){var h=I[y];if(h<0)_[y]=l;else for(var v=0;v<=a;++v)m[v].vertices.indexOf(h)<0&&(_[y]=m[v])}}var x=new d(a,o,p),P=!!e;for(s=a+1;s0;)for(var c=(r=o.pop()).adjacent,u=0;u<=n;++u){var d=c[u];if(d.boundary&&!(d.lastVisited<=-i)){for(var s=d.vertices,l=0;l<=n;++l){var m=s[l];a[l]=m<0?e:t[m]}var p=this.orient();if(p>0)return d;d.lastVisited=-i,0===p&&o.push(d)}}return null},s.walk=function(r,e){var n=this.vertices.length-1,i=this.dimension,a=this.vertices,t=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,c=this.interior[o];r:for(;!c.boundary;){for(var u=c.vertices,d=c.adjacent,s=0;s<=i;++s)t[s]=a[u[s]];for(c.lastVisited=n,s=0;s<=i;++s){var l=d[s];if(!(l.lastVisited>=n)){var m=t[s];t[s]=r;var p=this.orient();if(t[s]=m,p<0){c=l;continue r}l.boundary?l.lastVisited=-n:l.lastVisited=n}}return}return c},s.addPeaks=function(r,e){var n=this.vertices.length-1,i=this.dimension,a=this.vertices,u=this.tuple,d=this.interior,s=this.simplices,l=[e];e.lastVisited=n,e.vertices[e.vertices.indexOf(-1)]=n,e.boundary=!1,d.push(e);for(var m=[];l.length>0;){var p=(e=l.pop()).vertices,I=e.adjacent,y=p.indexOf(n);if(!(y<0))for(var f=0;f<=i;++f)if(f!==y){var g=I[f];if(g.boundary&&!(g.lastVisited>=n)){var _=g.vertices;if(g.lastVisited!==-n){for(var h=0,v=0;v<=i;++v)_[v]<0?(h=v,u[v]=r):u[v]=a[_[v]];if(this.orient()>0){_[h]=n,g.boundary=!1,d.push(g),l.push(g),g.lastVisited=n;continue}g.lastVisited=-n}var x=g.adjacent,P=p.slice(),G=I.slice(),C=new t(P,G,!0);s.push(C);var S=x.indexOf(e);if(!(S<0))for(x[S]=C,G[y]=g,P[f]=-1,G[f]=e,I[f]=C,C.flip(),v=0;v<=i;++v){var A=P[v];if(!(A<0||A===n)){for(var b=new Array(i-1),M=0,B=0;B<=i;++B){var k=P[B];k<0||B===v||(b[M++]=k)}m.push(new o(b,C,v))}}}}}for(m.sort(c),f=0;f+1=0?o[u++]=c[s]:d=1&s;if(d===(1&r)){var l=o[0];o[0]=o[1],o[1]=l}e.push(o)}}return e}},3352:function(r,e,n){"use strict";var i=n(2478);function a(r,e,n,i,a){this.mid=r,this.left=e,this.right=n,this.leftPoints=i,this.rightPoints=a,this.count=(e?e.count:0)+(n?n.count:0)+i.length}r.exports=function(r){return r&&0!==r.length?new g(f(r)):new g(null)};var t=a.prototype;function o(r,e){r.mid=e.mid,r.left=e.left,r.right=e.right,r.leftPoints=e.leftPoints,r.rightPoints=e.rightPoints,r.count=e.count}function c(r,e){var n=f(e);r.mid=n.mid,r.left=n.left,r.right=n.right,r.leftPoints=n.leftPoints,r.rightPoints=n.rightPoints,r.count=n.count}function u(r,e){var n=r.intervals([]);n.push(e),c(r,n)}function d(r,e){var n=r.intervals([]),i=n.indexOf(e);return i<0?0:(n.splice(i,1),c(r,n),1)}function s(r,e,n){for(var i=0;i=0&&r[i][1]>=e;--i){var a=n(r[i]);if(a)return a}}function m(r,e){for(var n=0;n>1],t=[],o=[],c=[];for(n=0;n3*(e+1)?u(this,r):this.left.insert(r):this.left=f([r]);else if(r[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?u(this,r):this.right.insert(r):this.right=f([r]);else{var n=i.ge(this.leftPoints,r,I),a=i.ge(this.rightPoints,r,y);this.leftPoints.splice(n,0,r),this.rightPoints.splice(a,0,r)}},t.remove=function(r){var e=this.count-this.leftPoints;if(r[1]3*(e-1)?d(this,r):2===(c=this.left.remove(r))?(this.left=null,this.count-=1,1):(1===c&&(this.count-=1),c):0;if(r[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?d(this,r):2===(c=this.right.remove(r))?(this.right=null,this.count-=1,1):(1===c&&(this.count-=1),c):0;if(1===this.count)return this.leftPoints[0]===r?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===r){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var t=this.left,c=this.right;n.count-=a.count,n.right=a.left,a.left=t,a.right=c}o(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(t=i.ge(this.leftPoints,r,I);tthis.mid?this.right&&(n=this.right.queryPoint(r,e))?n:l(this.rightPoints,r,e):m(this.leftPoints,e);var n},t.queryInterval=function(r,e,n){var i;return rthis.mid&&this.right&&(i=this.right.queryInterval(r,e,n))?i:ethis.mid?l(this.rightPoints,r,n):m(this.leftPoints,n)};var _=g.prototype;_.insert=function(r){this.root?this.root.insert(r):this.root=new a(r[0],null,null,[r],[r])},_.remove=function(r){if(this.root){var e=this.root.remove(r);return 2===e&&(this.root=null),0!==e}return!1},_.queryPoint=function(r,e){if(this.root)return this.root.queryPoint(r,e)},_.queryInterval=function(r,e,n){if(r<=e&&this.root)return this.root.queryInterval(r,e,n)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(r){"use strict";r.exports=function(r){for(var e=new Array(r),n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},395:function(r){r.exports=function(r,e,n){return r*(1-n)+e*n}},2652:function(r,e,n){var i=n(4335),a=n(6864),t=n(1903),o=n(9921),c=n(7608),u=n(5665),d={length:n(1387),normalize:n(3536),dot:n(244),cross:n(5911)},s=a(),l=a(),m=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],I=[0,0,0];function y(r,e,n,i,a){r[0]=e[0]*i+n[0]*a,r[1]=e[1]*i+n[1]*a,r[2]=e[2]*i+n[2]*a}r.exports=function(r,e,n,a,f,g){if(e||(e=[0,0,0]),n||(n=[0,0,0]),a||(a=[0,0,0]),f||(f=[0,0,0,1]),g||(g=[0,0,0,1]),!i(s,r))return!1;if(t(l,s),l[3]=0,l[7]=0,l[11]=0,l[15]=1,Math.abs(o(l)<1e-8))return!1;var _,h,v=s[3],x=s[7],P=s[11],G=s[12],C=s[13],S=s[14],A=s[15];if(0!==v||0!==x||0!==P){if(m[0]=v,m[1]=x,m[2]=P,m[3]=A,!c(l,l))return!1;u(l,l),function(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3];r[0]=n[0]*i+n[4]*a+n[8]*t+n[12]*o,r[1]=n[1]*i+n[5]*a+n[9]*t+n[13]*o,r[2]=n[2]*i+n[6]*a+n[10]*t+n[14]*o,r[3]=n[3]*i+n[7]*a+n[11]*t+n[15]*o}(f,m,l)}else f[0]=f[1]=f[2]=0,f[3]=1;if(e[0]=G,e[1]=C,e[2]=S,h=s,(_=p)[0][0]=h[0],_[0][1]=h[1],_[0][2]=h[2],_[1][0]=h[4],_[1][1]=h[5],_[1][2]=h[6],_[2][0]=h[8],_[2][1]=h[9],_[2][2]=h[10],n[0]=d.length(p[0]),d.normalize(p[0],p[0]),a[0]=d.dot(p[0],p[1]),y(p[1],p[1],p[0],1,-a[0]),n[1]=d.length(p[1]),d.normalize(p[1],p[1]),a[0]/=n[1],a[1]=d.dot(p[0],p[2]),y(p[2],p[2],p[0],1,-a[1]),a[2]=d.dot(p[1],p[2]),y(p[2],p[2],p[1],1,-a[2]),n[2]=d.length(p[2]),d.normalize(p[2],p[2]),a[1]/=n[2],a[2]/=n[2],d.cross(I,p[1],p[2]),d.dot(p[0],I)<0)for(var b=0;b<3;b++)n[b]*=-1,p[b][0]*=-1,p[b][1]*=-1,p[b][2]*=-1;return g[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),g[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),g[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),g[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(g[0]=-g[0]),p[0][2]>p[2][0]&&(g[1]=-g[1]),p[1][0]>p[0][1]&&(g[2]=-g[2]),!0}},4335:function(r){r.exports=function(r,e){var n=e[15];if(0===n)return!1;for(var i=1/n,a=0;a<16;a++)r[a]=e[a]*i;return!0}},7442:function(r,e,n){var i=n(6658),a=n(7182),t=n(2652),o=n(9921),c=n(8648),u=l(),d=l(),s=l();function l(){return{translate:m(),scale:m(1),skew:m(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function m(r){return[r||0,r||0,r||0]}r.exports=function(r,e,n,l){if(0===o(e)||0===o(n))return!1;var m=t(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),p=t(n,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!(!m||!p)&&(i(s.translate,u.translate,d.translate,l),i(s.skew,u.skew,d.skew,l),i(s.scale,u.scale,d.scale,l),i(s.perspective,u.perspective,d.perspective,l),c(s.quaternion,u.quaternion,d.quaternion,l),a(r,s.translate,s.scale,s.skew,s.perspective,s.quaternion),!0)}},7182:function(r,e,n){var i={identity:n(7894),translate:n(7656),multiply:n(6760),create:n(6864),scale:n(2504),fromRotationTranslation:n(6743)},a=(i.create(),i.create());r.exports=function(r,e,n,t,o,c){return i.identity(r),i.fromRotationTranslation(r,c,e),r[3]=o[0],r[7]=o[1],r[11]=o[2],r[15]=o[3],i.identity(a),0!==t[2]&&(a[9]=t[2],i.multiply(r,r,a)),0!==t[1]&&(a[9]=0,a[8]=t[1],i.multiply(r,r,a)),0!==t[0]&&(a[8]=0,a[4]=t[0],i.multiply(r,r,a)),i.scale(r,r,n),r}},4192:function(r,e,n){"use strict";var i=n(2478),a=n(7442),t=n(7608),o=n(5567),c=n(2408),u=n(7089),d=n(6582),s=n(7656),l=(n(2504),n(3536)),m=[0,0,0];function p(r){this._components=r.slice(),this._time=[0],this.prevMatrix=r.slice(),this.nextMatrix=r.slice(),this.computedMatrix=r.slice(),this.computedInverse=r.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]}r.exports=function(r){return new p((r=r||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var I=p.prototype;I.recalcMatrix=function(r){var e=this._time,n=i.le(e,r),o=this.computedMatrix;if(!(n<0)){var c=this._components;if(n===e.length-1)for(var u=16*n,d=0;d<16;++d)o[d]=c[u++];else{var s=e[n+1]-e[n],m=(u=16*n,this.prevMatrix),p=!0;for(d=0;d<16;++d)m[d]=c[u++];var I=this.nextMatrix;for(d=0;d<16;++d)I[d]=c[u++],p=p&&m[d]===I[d];if(s<1e-6||p)for(d=0;d<16;++d)o[d]=m[d];else a(o,m,I,(r-e[n])/s)}var y=this.computedUp;y[0]=o[1],y[1]=o[5],y[2]=o[9],l(y,y);var f=this.computedInverse;t(f,o);var g=this.computedEye,_=f[15];g[0]=f[12]/_,g[1]=f[13]/_,g[2]=f[14]/_;var h=this.computedCenter,v=Math.exp(this.computedRadius[0]);for(d=0;d<3;++d)h[d]=g[d]-o[2+4*d]*v}},I.idle=function(r){if(!(r1&&i(r[o[s-2]],r[o[s-1]],d)<=0;)s-=1,o.pop();for(o.push(u),s=c.length;s>1&&i(r[c[s-2]],r[c[s-1]],d)>=0;)s-=1,c.pop();c.push(u)}n=new Array(c.length+o.length-2);for(var l=0,m=(a=0,o.length);a0;--p)n[l++]=c[p];return n};var i=n(3250)[3]},351:function(r,e,n){"use strict";r.exports=function(r,e){e||(e=r,r=window);var n=0,a=0,t=0,o={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function u(r){var e=!1;return"altKey"in r&&(e=e||r.altKey!==o.alt,o.alt=!!r.altKey),"shiftKey"in r&&(e=e||r.shiftKey!==o.shift,o.shift=!!r.shiftKey),"ctrlKey"in r&&(e=e||r.ctrlKey!==o.control,o.control=!!r.ctrlKey),"metaKey"in r&&(e=e||r.metaKey!==o.meta,o.meta=!!r.metaKey),e}function d(r,c){var d=i.x(c),s=i.y(c);"buttons"in c&&(r=0|c.buttons),(r!==n||d!==a||s!==t||u(c))&&(n=0|r,a=d||0,t=s||0,e&&e(n,a,t,o))}function s(r){d(0,r)}function l(){(n||a||t||o.shift||o.alt||o.meta||o.control)&&(a=t=0,n=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function m(r){u(r)&&e&&e(n,a,t,o)}function p(r){0===i.buttons(r)?d(0,r):d(n,r)}function I(r){d(n|i.buttons(r),r)}function y(r){d(n&~i.buttons(r),r)}function f(){c||(c=!0,r.addEventListener("mousemove",p),r.addEventListener("mousedown",I),r.addEventListener("mouseup",y),r.addEventListener("mouseleave",s),r.addEventListener("mouseenter",s),r.addEventListener("mouseout",s),r.addEventListener("mouseover",s),r.addEventListener("blur",l),r.addEventListener("keyup",m),r.addEventListener("keydown",m),r.addEventListener("keypress",m),r!==window&&(window.addEventListener("blur",l),window.addEventListener("keyup",m),window.addEventListener("keydown",m),window.addEventListener("keypress",m)))}f();var g={element:r};return Object.defineProperties(g,{enabled:{get:function(){return c},set:function(e){e?f():c&&(c=!1,r.removeEventListener("mousemove",p),r.removeEventListener("mousedown",I),r.removeEventListener("mouseup",y),r.removeEventListener("mouseleave",s),r.removeEventListener("mouseenter",s),r.removeEventListener("mouseout",s),r.removeEventListener("mouseover",s),r.removeEventListener("blur",l),r.removeEventListener("keyup",m),r.removeEventListener("keydown",m),r.removeEventListener("keypress",m),r!==window&&(window.removeEventListener("blur",l),window.removeEventListener("keyup",m),window.removeEventListener("keydown",m),window.removeEventListener("keypress",m)))},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return t},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),g};var i=n(4687)},24:function(r){var e={left:0,top:0};r.exports=function(r,n,i){n=n||r.currentTarget||r.srcElement,Array.isArray(i)||(i=[0,0]);var a,t=r.clientX||0,o=r.clientY||0,c=(a=n)===window||a===document||a===document.body?e:a.getBoundingClientRect();return i[0]=t-c.left,i[1]=o-c.top,i}},4687:function(r,e){"use strict";function n(r){return r.target||r.srcElement||window}e.buttons=function(r){if("object"===typeof r){if("buttons"in r)return r.buttons;if("which"in r){if(2===(e=r.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0"),"function"!==typeof r.vertex&&e("Must specify vertex creation function"),"function"!==typeof r.cell&&e("Must specify cell creation function"),"function"!==typeof r.phase&&e("Must specify phase function");for(var c=r.getters||[],u=new Array(t),d=0;d=0?u[d]=!0:u[d]=!1;return function(r,e,n,t,o,c){var u=[c,o].join(",");return(0,a[u])(r,e,n,i.mallocUint32,i.freeUint32)}(r.vertex,r.cell,r.phase,0,n,u)};var a={"false,0,1":function(r,e,n,i,a){return function(t,o,c,u){var d,s=0|t.shape[0],l=0|t.shape[1],m=t.data,p=0|t.offset,I=0|t.stride[0],y=0|t.stride[1],f=p,g=0|-I,_=0,h=0|-y,v=0,x=-I-y|0,P=0,G=0|I,C=y-I*s|0,S=0,A=0,b=0,M=2*s|0,B=i(M),k=i(M),F=0,z=0,w=-1,R=-1,E=0,N=0|-s,T=0|s,D=0,J=-s-1|0,U=s-1|0,H=0,L=0,O=0;for(S=0;S0){if(A=1,B[F++]=n(m[f],o,c,u),f+=G,s>0)for(S=1,d=m[f],z=B[F]=n(d,o,c,u),E=B[F+w],D=B[F+N],H=B[F+J],z===E&&z===D&&z===H||(_=m[f+g],v=m[f+h],P=m[f+x],r(S,A,d,_,v,P,z,E,D,H,o,c,u),L=k[F]=b++),F+=1,f+=G,S=2;S0)for(S=1,d=m[f],z=B[F]=n(d,o,c,u),E=B[F+w],D=B[F+N],H=B[F+J],z===E&&z===D&&z===H||(_=m[f+g],v=m[f+h],P=m[f+x],r(S,A,d,_,v,P,z,E,D,H,o,c,u),L=k[F]=b++,H!==D&&e(k[F+N],L,v,P,D,H,o,c,u)),F+=1,f+=G,S=2;S0){if(S=1,B[F++]=n(m[f],o,c,u),f+=G,l>0)for(A=1,d=m[f],z=B[F]=n(d,o,c,u),D=B[F+N],E=B[F+w],H=B[F+J],z===D&&z===E&&z===H||(_=m[f+g],v=m[f+h],P=m[f+x],r(S,A,d,_,v,P,z,D,E,H,o,c,u),L=k[F]=b++),F+=1,f+=G,A=2;A0)for(A=1,d=m[f],z=B[F]=n(d,o,c,u),D=B[F+N],E=B[F+w],H=B[F+J],z===D&&z===E&&z===H||(_=m[f+g],v=m[f+h],P=m[f+x],r(S,A,d,_,v,P,z,D,E,H,o,c,u),L=k[F]=b++,H!==D&&e(k[F+N],L,P,_,H,D,o,c,u)),F+=1,f+=G,A=2;A2&&t[1]>2&&i(a.pick(-1,-1).lo(1,1).hi(t[0]-2,t[1]-2),r.pick(-1,-1,0).lo(1,1).hi(t[0]-2,t[1]-2),r.pick(-1,-1,1).lo(1,1).hi(t[0]-2,t[1]-2)),t[1]>2&&(n(a.pick(0,-1).lo(1).hi(t[1]-2),r.pick(0,-1,1).lo(1).hi(t[1]-2)),e(r.pick(0,-1,0).lo(1).hi(t[1]-2))),t[1]>2&&(n(a.pick(t[0]-1,-1).lo(1).hi(t[1]-2),r.pick(t[0]-1,-1,1).lo(1).hi(t[1]-2)),e(r.pick(t[0]-1,-1,0).lo(1).hi(t[1]-2))),t[0]>2&&(n(a.pick(-1,0).lo(1).hi(t[0]-2),r.pick(-1,0,0).lo(1).hi(t[0]-2)),e(r.pick(-1,0,1).lo(1).hi(t[0]-2))),t[0]>2&&(n(a.pick(-1,t[1]-1).lo(1).hi(t[0]-2),r.pick(-1,t[1]-1,0).lo(1).hi(t[0]-2)),e(r.pick(-1,t[1]-1,1).lo(1).hi(t[0]-2))),r.set(0,0,0,0),r.set(0,0,1,0),r.set(t[0]-1,0,0,0),r.set(t[0]-1,0,1,0),r.set(0,t[1]-1,0,0),r.set(0,t[1]-1,1,0),r.set(t[0]-1,t[1]-1,0,0),r.set(t[0]-1,t[1]-1,1,0),r}}r.exports=function(r,e,n){return Array.isArray(n)||(n=i(e.dimension,"string"===typeof n?n:"clamp")),0===e.size?r:0===e.dimension?(r.set(0),r):function(r){var e=r.join();if(t=s[e])return t;for(var n=r.length,i=[l,m],a=1;a<=n;++a)i.push(p(a));var t=I.apply(void 0,i);return s[e]=t,t}(n)(r,e)}},4317:function(r){"use strict";function e(r,e){var n=Math.floor(e),i=e-n,a=0<=n&&n0;){h<64?(u=h,h=0):(u=64,h-=64);for(var v=0|r[1];v>0;){v<64?(d=v,v=0):(d=64,v-=64),i=g+h*l+v*m,o=_+h*I+v*y;var x=0,P=0,G=0,C=p,S=l-s*p,A=m-u*l,b=f,M=I-s*f,B=y-u*I;for(G=0;G0;){y<64?(u=y,y=0):(u=64,y-=64);for(var f=0|r[0];f>0;){f<64?(c=f,f=0):(c=64,f-=64),i=p+y*s+f*d,o=I+y*m+f*l;var g=0,_=0,h=s,v=d-u*s,x=m,P=l-u*m;for(_=0;_0;){_<64?(d=_,_=0):(d=64,_-=64);for(var h=0|r[0];h>0;){h<64?(c=h,h=0):(c=64,h-=64);for(var v=0|r[1];v>0;){v<64?(u=v,v=0):(u=64,v-=64),i=f+_*m+h*s+v*l,o=g+_*y+h*p+v*I;var x=0,P=0,G=0,C=m,S=s-d*m,A=l-c*s,b=y,M=p-d*y,B=I-c*p;for(G=0;Gn;){g=0,_=y-o;e:for(f=0;fv)break e;_+=l,g+=m}for(g=y,_=y-o,f=0;f>1,K=O-U,V=O+U,j=H,W=K,Z=O,q=V,Y=L,X=a+1,Q=t-1,$=!0,rr=0,er=0,nr=0,ir=l,ar=e(ir),tr=e(ir);S=u*j,A=u*W,J=c;r:for(C=0;C0){f=j,j=W,W=f;break r}if(nr<0)break r;J+=p}S=u*q,A=u*Y,J=c;r:for(C=0;C0){f=q,q=Y,Y=f;break r}if(nr<0)break r;J+=p}S=u*j,A=u*Z,J=c;r:for(C=0;C0){f=j,j=Z,Z=f;break r}if(nr<0)break r;J+=p}S=u*W,A=u*Z,J=c;r:for(C=0;C0){f=W,W=Z,Z=f;break r}if(nr<0)break r;J+=p}S=u*j,A=u*q,J=c;r:for(C=0;C0){f=j,j=q,q=f;break r}if(nr<0)break r;J+=p}S=u*Z,A=u*q,J=c;r:for(C=0;C0){f=Z,Z=q,q=f;break r}if(nr<0)break r;J+=p}S=u*W,A=u*Y,J=c;r:for(C=0;C0){f=W,W=Y,Y=f;break r}if(nr<0)break r;J+=p}S=u*W,A=u*Z,J=c;r:for(C=0;C0){f=W,W=Z,Z=f;break r}if(nr<0)break r;J+=p}S=u*q,A=u*Y,J=c;r:for(C=0;C0){f=q,q=Y,Y=f;break r}if(nr<0)break r;J+=p}for(S=u*j,A=u*W,b=u*Z,M=u*q,B=u*Y,k=u*H,F=u*O,z=u*L,D=0,J=c,C=0;C0)){if(nr<0){for(S=u*v,A=u*X,b=u*Q,J=c,C=0;C0)for(;;){for(x=c+Q*u,D=0,C=0;C0)){for(x=c+Q*u,D=0,C=0;CL){r:for(;;){for(x=c+X*u,D=0,J=c,C=0;C1&&i?c(n,i[0],i[1]):c(n)}(r,e,u);return i(u,d)}},446:function(r,e,n){"use strict";var i=n(7640),a={};r.exports=function(r){var e=r.order,n=r.dtype,t=[e,n].join(":"),o=a[t];return o||(a[t]=o=i(e,n)),o(r),r}},9618:function(r,e,n){var i=n(7163),a="undefined"!==typeof Float64Array;function t(r,e){return r[0]-e[0]}function o(){var r,e=this.stride,n=new Array(e.length);for(r=0;r=0&&(e+=t*(n=0|r),a-=n),new i(this.data,a,t,e)},a.step=function(r){var e=this.shape[0],n=this.stride[0],a=this.offset,t=0,o=Math.ceil;return"number"===typeof r&&((t=0|r)<0?(a+=n*(e-1),e=o(-e/t)):e=o(e/t),n*=t),new i(this.data,e,n,a)},a.transpose=function(r){r=void 0===r?0:0|r;var e=this.shape,n=this.stride;return new i(this.data,e[r],n[r],this.offset)},a.pick=function(r){var n=[],i=[],a=this.offset;return"number"===typeof r&&r>=0?a=a+this.stride[0]*r|0:(n.push(this.shape[0]),i.push(this.stride[0])),(0,e[n.length+1])(this.data,n,i,a)},function(r,e,n,a){return new i(r,e[0],n[0],a)}},2:function(r,e,n){function i(r,e,n,i,a,t){this.data=r,this.shape=[e,n],this.stride=[i,a],this.offset=0|t}var a=i.prototype;return a.dtype=r,a.dimension=2,Object.defineProperty(a,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(a,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),a.set=function(e,n,i){return"generic"===r?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*n]=i},a.get=function(e,n){return"generic"===r?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*n]},a.index=function(r,e){return this.offset+this.stride[0]*r+this.stride[1]*e},a.hi=function(r,e){return new i(this.data,"number"!==typeof r||r<0?this.shape[0]:0|r,"number"!==typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},a.lo=function(r,e){var n=this.offset,a=0,t=this.shape[0],o=this.shape[1],c=this.stride[0],u=this.stride[1];return"number"===typeof r&&r>=0&&(n+=c*(a=0|r),t-=a),"number"===typeof e&&e>=0&&(n+=u*(a=0|e),o-=a),new i(this.data,t,o,c,u,n)},a.step=function(r,e){var n=this.shape[0],a=this.shape[1],t=this.stride[0],o=this.stride[1],c=this.offset,u=0,d=Math.ceil;return"number"===typeof r&&((u=0|r)<0?(c+=t*(n-1),n=d(-n/u)):n=d(n/u),t*=u),"number"===typeof e&&((u=0|e)<0?(c+=o*(a-1),a=d(-a/u)):a=d(a/u),o*=u),new i(this.data,n,a,t,o,c)},a.transpose=function(r,e){r=void 0===r?0:0|r,e=void 0===e?1:0|e;var n=this.shape,a=this.stride;return new i(this.data,n[r],n[e],a[r],a[e],this.offset)},a.pick=function(r,n){var i=[],a=[],t=this.offset;return"number"===typeof r&&r>=0?t=t+this.stride[0]*r|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"===typeof n&&n>=0?t=t+this.stride[1]*n|0:(i.push(this.shape[1]),a.push(this.stride[1])),(0,e[i.length+1])(this.data,i,a,t)},function(r,e,n,a){return new i(r,e[0],e[1],n[0],n[1],a)}},3:function(r,e,n){function i(r,e,n,i,a,t,o,c){this.data=r,this.shape=[e,n,i],this.stride=[a,t,o],this.offset=0|c}var a=i.prototype;return a.dtype=r,a.dimension=3,Object.defineProperty(a,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(a,"order",{get:function(){var r=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),n=Math.abs(this.stride[2]);return r>e?e>n?[2,1,0]:r>n?[1,2,0]:[1,0,2]:r>n?[2,0,1]:n>e?[0,1,2]:[0,2,1]}}),a.set=function(e,n,i,a){return"generic"===r?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i]=a},a.get=function(e,n,i){return"generic"===r?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i]},a.index=function(r,e,n){return this.offset+this.stride[0]*r+this.stride[1]*e+this.stride[2]*n},a.hi=function(r,e,n){return new i(this.data,"number"!==typeof r||r<0?this.shape[0]:0|r,"number"!==typeof e||e<0?this.shape[1]:0|e,"number"!==typeof n||n<0?this.shape[2]:0|n,this.stride[0],this.stride[1],this.stride[2],this.offset)},a.lo=function(r,e,n){var a=this.offset,t=0,o=this.shape[0],c=this.shape[1],u=this.shape[2],d=this.stride[0],s=this.stride[1],l=this.stride[2];return"number"===typeof r&&r>=0&&(a+=d*(t=0|r),o-=t),"number"===typeof e&&e>=0&&(a+=s*(t=0|e),c-=t),"number"===typeof n&&n>=0&&(a+=l*(t=0|n),u-=t),new i(this.data,o,c,u,d,s,l,a)},a.step=function(r,e,n){var a=this.shape[0],t=this.shape[1],o=this.shape[2],c=this.stride[0],u=this.stride[1],d=this.stride[2],s=this.offset,l=0,m=Math.ceil;return"number"===typeof r&&((l=0|r)<0?(s+=c*(a-1),a=m(-a/l)):a=m(a/l),c*=l),"number"===typeof e&&((l=0|e)<0?(s+=u*(t-1),t=m(-t/l)):t=m(t/l),u*=l),"number"===typeof n&&((l=0|n)<0?(s+=d*(o-1),o=m(-o/l)):o=m(o/l),d*=l),new i(this.data,a,t,o,c,u,d,s)},a.transpose=function(r,e,n){r=void 0===r?0:0|r,e=void 0===e?1:0|e,n=void 0===n?2:0|n;var a=this.shape,t=this.stride;return new i(this.data,a[r],a[e],a[n],t[r],t[e],t[n],this.offset)},a.pick=function(r,n,i){var a=[],t=[],o=this.offset;return"number"===typeof r&&r>=0?o=o+this.stride[0]*r|0:(a.push(this.shape[0]),t.push(this.stride[0])),"number"===typeof n&&n>=0?o=o+this.stride[1]*n|0:(a.push(this.shape[1]),t.push(this.stride[1])),"number"===typeof i&&i>=0?o=o+this.stride[2]*i|0:(a.push(this.shape[2]),t.push(this.stride[2])),(0,e[a.length+1])(this.data,a,t,o)},function(r,e,n,a){return new i(r,e[0],e[1],e[2],n[0],n[1],n[2],a)}},4:function(r,e,n){function i(r,e,n,i,a,t,o,c,u,d){this.data=r,this.shape=[e,n,i,a],this.stride=[t,o,c,u],this.offset=0|d}var a=i.prototype;return a.dtype=r,a.dimension=4,Object.defineProperty(a,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(a,"order",{get:n}),a.set=function(e,n,i,a,t){return"generic"===r?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a,t):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a]=t},a.get=function(e,n,i,a){return"generic"===r?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a]},a.index=function(r,e,n,i){return this.offset+this.stride[0]*r+this.stride[1]*e+this.stride[2]*n+this.stride[3]*i},a.hi=function(r,e,n,a){return new i(this.data,"number"!==typeof r||r<0?this.shape[0]:0|r,"number"!==typeof e||e<0?this.shape[1]:0|e,"number"!==typeof n||n<0?this.shape[2]:0|n,"number"!==typeof a||a<0?this.shape[3]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},a.lo=function(r,e,n,a){var t=this.offset,o=0,c=this.shape[0],u=this.shape[1],d=this.shape[2],s=this.shape[3],l=this.stride[0],m=this.stride[1],p=this.stride[2],I=this.stride[3];return"number"===typeof r&&r>=0&&(t+=l*(o=0|r),c-=o),"number"===typeof e&&e>=0&&(t+=m*(o=0|e),u-=o),"number"===typeof n&&n>=0&&(t+=p*(o=0|n),d-=o),"number"===typeof a&&a>=0&&(t+=I*(o=0|a),s-=o),new i(this.data,c,u,d,s,l,m,p,I,t)},a.step=function(r,e,n,a){var t=this.shape[0],o=this.shape[1],c=this.shape[2],u=this.shape[3],d=this.stride[0],s=this.stride[1],l=this.stride[2],m=this.stride[3],p=this.offset,I=0,y=Math.ceil;return"number"===typeof r&&((I=0|r)<0?(p+=d*(t-1),t=y(-t/I)):t=y(t/I),d*=I),"number"===typeof e&&((I=0|e)<0?(p+=s*(o-1),o=y(-o/I)):o=y(o/I),s*=I),"number"===typeof n&&((I=0|n)<0?(p+=l*(c-1),c=y(-c/I)):c=y(c/I),l*=I),"number"===typeof a&&((I=0|a)<0?(p+=m*(u-1),u=y(-u/I)):u=y(u/I),m*=I),new i(this.data,t,o,c,u,d,s,l,m,p)},a.transpose=function(r,e,n,a){r=void 0===r?0:0|r,e=void 0===e?1:0|e,n=void 0===n?2:0|n,a=void 0===a?3:0|a;var t=this.shape,o=this.stride;return new i(this.data,t[r],t[e],t[n],t[a],o[r],o[e],o[n],o[a],this.offset)},a.pick=function(r,n,i,a){var t=[],o=[],c=this.offset;return"number"===typeof r&&r>=0?c=c+this.stride[0]*r|0:(t.push(this.shape[0]),o.push(this.stride[0])),"number"===typeof n&&n>=0?c=c+this.stride[1]*n|0:(t.push(this.shape[1]),o.push(this.stride[1])),"number"===typeof i&&i>=0?c=c+this.stride[2]*i|0:(t.push(this.shape[2]),o.push(this.stride[2])),"number"===typeof a&&a>=0?c=c+this.stride[3]*a|0:(t.push(this.shape[3]),o.push(this.stride[3])),(0,e[t.length+1])(this.data,t,o,c)},function(r,e,n,a){return new i(r,e[0],e[1],e[2],e[3],n[0],n[1],n[2],n[3],a)}},5:function(r,e,n){function i(r,e,n,i,a,t,o,c,u,d,s,l){this.data=r,this.shape=[e,n,i,a,t],this.stride=[o,c,u,d,s],this.offset=0|l}var a=i.prototype;return a.dtype=r,a.dimension=5,Object.defineProperty(a,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(a,"order",{get:n}),a.set=function(e,n,i,a,t,o){return"generic"===r?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a+this.stride[4]*t,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a+this.stride[4]*t]=o},a.get=function(e,n,i,a,t){return"generic"===r?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a+this.stride[4]*t):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a+this.stride[4]*t]},a.index=function(r,e,n,i,a){return this.offset+this.stride[0]*r+this.stride[1]*e+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a},a.hi=function(r,e,n,a,t){return new i(this.data,"number"!==typeof r||r<0?this.shape[0]:0|r,"number"!==typeof e||e<0?this.shape[1]:0|e,"number"!==typeof n||n<0?this.shape[2]:0|n,"number"!==typeof a||a<0?this.shape[3]:0|a,"number"!==typeof t||t<0?this.shape[4]:0|t,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},a.lo=function(r,e,n,a,t){var o=this.offset,c=0,u=this.shape[0],d=this.shape[1],s=this.shape[2],l=this.shape[3],m=this.shape[4],p=this.stride[0],I=this.stride[1],y=this.stride[2],f=this.stride[3],g=this.stride[4];return"number"===typeof r&&r>=0&&(o+=p*(c=0|r),u-=c),"number"===typeof e&&e>=0&&(o+=I*(c=0|e),d-=c),"number"===typeof n&&n>=0&&(o+=y*(c=0|n),s-=c),"number"===typeof a&&a>=0&&(o+=f*(c=0|a),l-=c),"number"===typeof t&&t>=0&&(o+=g*(c=0|t),m-=c),new i(this.data,u,d,s,l,m,p,I,y,f,g,o)},a.step=function(r,e,n,a,t){var o=this.shape[0],c=this.shape[1],u=this.shape[2],d=this.shape[3],s=this.shape[4],l=this.stride[0],m=this.stride[1],p=this.stride[2],I=this.stride[3],y=this.stride[4],f=this.offset,g=0,_=Math.ceil;return"number"===typeof r&&((g=0|r)<0?(f+=l*(o-1),o=_(-o/g)):o=_(o/g),l*=g),"number"===typeof e&&((g=0|e)<0?(f+=m*(c-1),c=_(-c/g)):c=_(c/g),m*=g),"number"===typeof n&&((g=0|n)<0?(f+=p*(u-1),u=_(-u/g)):u=_(u/g),p*=g),"number"===typeof a&&((g=0|a)<0?(f+=I*(d-1),d=_(-d/g)):d=_(d/g),I*=g),"number"===typeof t&&((g=0|t)<0?(f+=y*(s-1),s=_(-s/g)):s=_(s/g),y*=g),new i(this.data,o,c,u,d,s,l,m,p,I,y,f)},a.transpose=function(r,e,n,a,t){r=void 0===r?0:0|r,e=void 0===e?1:0|e,n=void 0===n?2:0|n,a=void 0===a?3:0|a,t=void 0===t?4:0|t;var o=this.shape,c=this.stride;return new i(this.data,o[r],o[e],o[n],o[a],o[t],c[r],c[e],c[n],c[a],c[t],this.offset)},a.pick=function(r,n,i,a,t){var o=[],c=[],u=this.offset;return"number"===typeof r&&r>=0?u=u+this.stride[0]*r|0:(o.push(this.shape[0]),c.push(this.stride[0])),"number"===typeof n&&n>=0?u=u+this.stride[1]*n|0:(o.push(this.shape[1]),c.push(this.stride[1])),"number"===typeof i&&i>=0?u=u+this.stride[2]*i|0:(o.push(this.shape[2]),c.push(this.stride[2])),"number"===typeof a&&a>=0?u=u+this.stride[3]*a|0:(o.push(this.shape[3]),c.push(this.stride[3])),"number"===typeof t&&t>=0?u=u+this.stride[4]*t|0:(o.push(this.shape[4]),c.push(this.stride[4])),(0,e[o.length+1])(this.data,o,c,u)},function(r,e,n,a){return new i(r,e[0],e[1],e[2],e[3],e[4],n[0],n[1],n[2],n[3],n[4],a)}}};function u(r,e){var n=-1===e?"T":String(e),i=c[n];return-1===e?i(r):0===e?i(r,d[r][0]):i(r,d[r],o)}var d={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};r.exports=function(r,e,n,t){if(void 0===r)return(0,d.array[0])([]);"number"===typeof r&&(r=[r]),void 0===e&&(e=[r.length]);var o=e.length;if(void 0===n){n=new Array(o);for(var c=o-1,s=1;c>=0;--c)n[c]=s,s*=e[c]}if(void 0===t)for(t=0,c=0;c>>0;r.exports=function(r,e){if(isNaN(r)||isNaN(e))return NaN;if(r===e)return r;if(0===r)return e<0?-a:a;var n=i.hi(r),o=i.lo(r);return e>r===r>0?o===t?(n+=1,o=0):o+=1:0===o?(o=t,n-=1):o-=1,i.pack(o,n)}},8406:function(r,e){e.vertexNormals=function(r,e,n){for(var i=e.length,a=new Array(i),t=void 0===n?1e-6:n,o=0;ot){var v=a[d],x=1/Math.sqrt(f*_);for(h=0;h<3;++h){var P=(h+1)%3,G=(h+2)%3;v[h]+=x*(g[P]*y[G]-g[G]*y[P])}}}for(o=0;ot)for(x=1/Math.sqrt(C),h=0;h<3;++h)v[h]*=x;else for(h=0;h<3;++h)v[h]=0}return a},e.faceNormals=function(r,e,n){for(var i=r.length,a=new Array(i),t=void 0===n?1e-6:n,o=0;ot?1/Math.sqrt(p):0,d=0;d<3;++d)m[d]*=p;a[o]=m}return a}},4081:function(r){"use strict";r.exports=function(r,e,n,i,a,t,o,c,u,d){var s=e+t+d;if(l>0){var l=Math.sqrt(s+1);r[0]=.5*(o-u)/l,r[1]=.5*(c-i)/l,r[2]=.5*(n-t)/l,r[3]=.5*l}else{var m=Math.max(e,t,d);l=Math.sqrt(2*m-s+1),e>=m?(r[0]=.5*l,r[1]=.5*(a+n)/l,r[2]=.5*(c+i)/l,r[3]=.5*(o-u)/l):t>=m?(r[0]=.5*(n+a)/l,r[1]=.5*l,r[2]=.5*(u+o)/l,r[3]=.5*(c-i)/l):(r[0]=.5*(i+c)/l,r[1]=.5*(o+u)/l,r[2]=.5*l,r[3]=.5*(n-a)/l)}return r}},9977:function(r,e,n){"use strict";r.exports=function(r){var e=(r=r||{}).center||[0,0,0],n=r.rotation||[0,0,0,1],i=r.radius||1;e=[].slice.call(e,0,3),s(n=[].slice.call(n,0,4),n);var a=new l(n,e,Math.log(i));return a.setDistanceLimits(r.zoomMin,r.zoomMax),("eye"in r||"up"in r)&&a.lookAt(0,r.eye,r.center,r.up),a};var i=n(9215),a=n(6582),t=n(7399),o=n(7608),c=n(4081);function u(r,e,n){return Math.sqrt(Math.pow(r,2)+Math.pow(e,2)+Math.pow(n,2))}function d(r,e,n,i){return Math.sqrt(Math.pow(r,2)+Math.pow(e,2)+Math.pow(n,2)+Math.pow(i,2))}function s(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=d(n,i,a,t);o>1e-6?(r[0]=n/o,r[1]=i/o,r[2]=a/o,r[3]=t/o):(r[0]=r[1]=r[2]=0,r[3]=1)}function l(r,e,n){this.radius=i([n]),this.center=i(e),this.rotation=i(r),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 m=l.prototype;m.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},m.recalcMatrix=function(r){this.radius.curve(r),this.center.curve(r),this.rotation.curve(r);var e=this.computedRotation;s(e,e);var n=this.computedMatrix;t(n,e);var i=this.computedCenter,a=this.computedEye,o=this.computedUp,c=Math.exp(this.computedRadius[0]);a[0]=i[0]+c*n[2],a[1]=i[1]+c*n[6],a[2]=i[2]+c*n[10],o[0]=n[1],o[1]=n[5],o[2]=n[9];for(var u=0;u<3;++u){for(var d=0,l=0;l<3;++l)d+=n[u+4*l]*a[l];n[12+u]=-d}},m.getMatrix=function(r,e){this.recalcMatrix(r);var n=this.computedMatrix;if(e){for(var i=0;i<16;++i)e[i]=n[i];return e}return n},m.idle=function(r){this.center.idle(r),this.radius.idle(r),this.rotation.idle(r)},m.flush=function(r){this.center.flush(r),this.radius.flush(r),this.rotation.flush(r)},m.pan=function(r,e,n,i){e=e||0,n=n||0,i=i||0,this.recalcMatrix(r);var a=this.computedMatrix,t=a[1],o=a[5],c=a[9],d=u(t,o,c);t/=d,o/=d,c/=d;var s=a[0],l=a[4],m=a[8],p=s*t+l*o+m*c,I=u(s-=t*p,l-=o*p,m-=c*p);s/=I,l/=I,m/=I;var y=a[2],f=a[6],g=a[10],_=y*t+f*o+g*c,h=y*s+f*l+g*m,v=u(y-=_*t+h*s,f-=_*o+h*l,g-=_*c+h*m);y/=v,f/=v,g/=v;var x=s*e+t*n,P=l*e+o*n,G=m*e+c*n;this.center.move(r,x,P,G);var C=Math.exp(this.computedRadius[0]);C=Math.max(1e-4,C+i),this.radius.set(r,Math.log(C))},m.rotate=function(r,e,n,i){this.recalcMatrix(r),e=e||0,n=n||0;var a=this.computedMatrix,t=a[0],o=a[4],c=a[8],s=a[1],l=a[5],m=a[9],p=a[2],I=a[6],y=a[10],f=e*t+n*s,g=e*o+n*l,_=e*c+n*m,h=-(I*_-y*g),v=-(y*f-p*_),x=-(p*g-I*f),P=Math.sqrt(Math.max(0,1-Math.pow(h,2)-Math.pow(v,2)-Math.pow(x,2))),G=d(h,v,x,P);G>1e-6?(h/=G,v/=G,x/=G,P/=G):(h=v=x=0,P=1);var C=this.computedRotation,S=C[0],A=C[1],b=C[2],M=C[3],B=S*P+M*h+A*x-b*v,k=A*P+M*v+b*h-S*x,F=b*P+M*x+S*v-A*h,z=M*P-S*h-A*v-b*x;if(i){h=p,v=I,x=y;var w=Math.sin(i)/u(h,v,x);h*=w,v*=w,x*=w,z=z*(P=Math.cos(e))-(B=B*P+z*h+k*x-F*v)*h-(k=k*P+z*v+F*h-B*x)*v-(F=F*P+z*x+B*v-k*h)*x}var R=d(B,k,F,z);R>1e-6?(B/=R,k/=R,F/=R,z/=R):(B=k=F=0,z=1),this.rotation.set(r,B,k,F,z)},m.lookAt=function(r,e,n,i){this.recalcMatrix(r),n=n||this.computedCenter,e=e||this.computedEye,i=i||this.computedUp;var t=this.computedMatrix;a(t,e,n,i);var o=this.computedRotation;c(o,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),s(o,o),this.rotation.set(r,o[0],o[1],o[2],o[3]);for(var u=0,d=0;d<3;++d)u+=Math.pow(n[d]-e[d],2);this.radius.set(r,.5*Math.log(Math.max(u,1e-6))),this.center.set(r,n[0],n[1],n[2])},m.translate=function(r,e,n,i){this.center.move(r,e||0,n||0,i||0)},m.setMatrix=function(r,e){var n=this.computedRotation;c(n,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),s(n,n),this.rotation.set(r,n[0],n[1],n[2],n[3]);var i=this.computedMatrix;o(i,e);var a=i[15];if(Math.abs(a)>1e-6){var t=i[12]/a,u=i[13]/a,d=i[14]/a;this.recalcMatrix(r);var l=Math.exp(this.computedRadius[0]);this.center.set(r,t-i[2]*l,u-i[6]*l,d-i[10]*l),this.radius.idle(r)}else this.center.idle(r),this.radius.idle(r)},m.setDistance=function(r,e){e>0&&this.radius.set(r,Math.log(e))},m.setDistanceLimits=function(r,e){r=r>0?Math.log(r):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,r),this.radius.bounds[0][0]=r,this.radius.bounds[1][0]=e},m.getDistanceLimits=function(r){var e=this.radius.bounds;return r?(r[0]=Math.exp(e[0][0]),r[1]=Math.exp(e[1][0]),r):[Math.exp(e[0][0]),Math.exp(e[1][0])]},m.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]}},m.fromJSON=function(r){var e=this.lastT(),n=r.center;n&&this.center.set(e,n[0],n[1],n[2]);var i=r.rotation;i&&this.rotation.set(e,i[0],i[1],i[2],i[3]);var a=r.distance;a&&a>0&&this.radius.set(e,Math.log(a)),this.setDistanceLimits(r.zoomMin,r.zoomMax)}},1371:function(r,e,n){"use strict";var i=n(3233);r.exports=function(r,e,n){return i(n="undefined"!==typeof n?n+"":" ",e)+r}},3202:function(r){r.exports=function(r,e){e||(e=[0,""]),r=String(r);var n=parseFloat(r,10);return e[0]=n,e[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},3088:function(r,e,n){"use strict";r.exports=function(r,e){for(var n=0|e.length,a=r.length,t=[new Array(n),new Array(n)],o=0;o0){o=t[s][n][0],u=s;break}c=o[1^u];for(var l=0;l<2;++l)for(var m=t[l][n],p=0;p0&&(o=I,c=y,u=l)}return a||o&&d(o,u),c}function l(r,n){var a=t[n][r][0],o=[r];d(a,n);for(var c=a[1^n];;){for(;c!==r;)o.push(c),c=s(o[o.length-2],c,!1);if(t[0][r].length+t[1][r].length===0)break;var u=o[o.length-1],l=r,m=o[1],p=s(u,l,!0);if(i(e[u],e[l],e[m],e[p])<0)break;o.push(r),c=s(u,l)}return o}function m(r,e){return e[1]===e[e.length-1]}for(o=0;o0;){t[0][o].length;var y=l(o,p);m(0,y)?I.push.apply(I,y):(I.length>0&&u.push(I),I=y)}I.length>0&&u.push(I)}return u};var i=n(3140)},5609:function(r,e,n){"use strict";r.exports=function(r,e){for(var n=i(r,e.length),a=new Array(e.length),t=new Array(e.length),o=[],c=0;c0;){a[p=o.pop()]=!1;var d=n[p];for(c=0;c0}))).length,f=new Array(y),g=new Array(y);for(p=0;p0;){var D=N.pop(),J=M[D];u(J,(function(r,e){return r-e}));var U,H=J.length,L=T[D];for(0===L&&(U=[O=I[D]]),p=0;p=0||(T[K]=1^L,N.push(K),0===L&&(E(O=I[K])||(O.reverse(),U.push(O))))}0===L&&n.push(U)}return n};var i=n(3134),a=n(3088),t=n(5085),o=n(5250),c=n(8210),u=n(1682),d=n(5609);function s(r,e){for(var n=new Array(r),i=0;i0&&e[a]===n[0]))return 1;t=r[a-1]}for(var c=1;t;){var u=t.key,d=i(n,u[0],u[1]);if(u[0][0]0))return 0;c=-1,t=t.right}else if(d>0)t=t.left;else{if(!(d<0))return 0;c=1,t=t.right}}return c}}(g.slabs,g.coordinates);return 0===t.length?_:function(r,e){return function(n){return r(n[0],n[1])?0:e(n)}}(u(t),_)};var i=n(3250)[3],a=n(4209),t=n(3352),o=n(2478);function c(){return!0}function u(r){for(var e={},n=0;n=d?(C=1,_=d+2*m+I):_=m*(C=-m/d)+I):(C=0,p>=0?(S=0,_=I):-p>=l?(S=1,_=l+2*p+I):_=p*(S=-p/l)+I);else if(S<0)S=0,m>=0?(C=0,_=I):-m>=d?(C=1,_=d+2*m+I):_=m*(C=-m/d)+I;else{var A=1/G;_=(C*=A)*(d*C+s*(S*=A)+2*m)+S*(s*C+l*S+2*p)+I}else C<0?(v=l+p)>(h=s+m)?(x=v-h)>=(P=d-2*s+l)?(C=1,S=0,_=d+2*m+I):_=(C=x/P)*(d*C+s*(S=1-C)+2*m)+S*(s*C+l*S+2*p)+I:(C=0,v<=0?(S=1,_=l+2*p+I):p>=0?(S=0,_=I):_=p*(S=-p/l)+I):S<0?(v=d+m)>(h=s+p)?(x=v-h)>=(P=d-2*s+l)?(S=1,C=0,_=l+2*p+I):_=(C=1-(S=x/P))*(d*C+s*S+2*m)+S*(s*C+l*S+2*p)+I:(S=0,v<=0?(C=1,_=d+2*m+I):m>=0?(C=0,_=I):_=m*(C=-m/d)+I):(x=l+p-s-m)<=0?(C=0,S=1,_=l+2*p+I):x>=(P=d-2*s+l)?(C=1,S=0,_=d+2*m+I):_=(C=x/P)*(d*C+s*(S=1-C)+2*m)+S*(s*C+l*S+2*p)+I;var b=1-C-S;for(u=0;u0){var d=r[n-1];if(0===i(c,d)&&t(d)!==u){n-=1;continue}}r[n++]=c}}return r.length=n,r}},3233:function(r){"use strict";var e,n="";r.exports=function(r,i){if("string"!==typeof r)throw new TypeError("expected a string");if(1===i)return r;if(2===i)return r+r;var a=r.length*i;if(e!==r||"undefined"===typeof e)e=r,n="";else if(n.length>=a)return n.substr(0,a);for(;a>n.length&&i>1;)1&i&&(n+=r),i>>=1,r+=r;return n=(n+=r).substr(0,a)}},3025:function(r,e,n){r.exports=n.g.performance&&n.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(r){"use strict";r.exports=function(r){for(var e=r.length,n=r[r.length-1],i=e,a=e-2;a>=0;--a){var t=n;(u=(c=r[a])-((n=t+c)-t))&&(r[--i]=n,n=u)}var o=0;for(a=i;a0){if(t<=0)return o;i=a+t}else{if(!(a<0))return o;if(t>=0)return o;i=-(a+t)}var c=33306690738754716e-32*i;return o>=c||o<=-c?o:l(r,e,n)},function(r,e,n,i){var a=r[0]-i[0],t=e[0]-i[0],o=n[0]-i[0],c=r[1]-i[1],u=e[1]-i[1],d=n[1]-i[1],s=r[2]-i[2],l=e[2]-i[2],p=n[2]-i[2],I=t*d,y=o*u,f=o*c,g=a*d,_=a*u,h=t*c,v=s*(I-y)+l*(f-g)+p*(_-h),x=7771561172376103e-31*((Math.abs(I)+Math.abs(y))*Math.abs(s)+(Math.abs(f)+Math.abs(g))*Math.abs(l)+(Math.abs(_)+Math.abs(h))*Math.abs(p));return v>x||-v>x?v:m(r,e,n,i)}];function I(r){var e=p[r.length];return e||(e=p[r.length]=s(r.length)),e.apply(void 0,r)}function y(r,e,n,i,a,t,o){return function(e,n,c,u,d){switch(arguments.length){case 0:case 1:return 0;case 2:return i(e,n);case 3:return a(e,n,c);case 4:return t(e,n,c,u);case 5:return o(e,n,c,u,d)}for(var s=new Array(arguments.length),l=0;l0&&o>0||t<0&&o<0)return!1;var c=i(n,r,e),u=i(a,r,e);return!(c>0&&u>0||c<0&&u<0)&&(0!==t||0!==o||0!==c||0!==u||function(r,e,n,i){for(var a=0;a<2;++a){var t=r[a],o=e[a],c=Math.min(t,o),u=Math.max(t,o),d=n[a],s=i[a],l=Math.min(d,s);if(Math.max(d,s)=i?(a=l,(u+=1)=i?(a=l,(u+=1)>1,d=e[2*u+1];if(d===t)return u;t>1,d=e[2*u+1];if(d===t)return u;t>1,d=e[2*u+1];if(d===t)return u;t0)-(r<0)},e.abs=function(r){var e=r>>31;return(r^e)-e},e.min=function(r,e){return e^(r^e)&-(r65535)<<4,e|=n=((r>>>=e)>255)<<3,e|=n=((r>>>=n)>15)<<2,(e|=n=((r>>>=n)>3)<<1)|(r>>>=n)>>1},e.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},e.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},e.countTrailingZeros=n,e.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,1+(r|=r>>>16)},e.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},e.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);!function(r){for(var e=0;e<256;++e){var n=e,i=e,a=7;for(n>>>=1;n;n>>>=1)i<<=1,i|=1&n,--a;r[e]=i<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},e.interleave2=function(r,e){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(r,e){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>e&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},e.interleave3=function(r,e,n){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(r,e){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>e&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},e.nextCombination=function(r){var e=r|r-1;return e+1|(~e&-~e)-1>>>n(r)+1}},2014:function(r,e,n){"use strict";var i=n(3105),a=n(4623);function t(r,e){var n=r.length,i=r.length-e.length,a=Math.min;if(i)return i;switch(n){case 0:return 0;case 1:return r[0]-e[0];case 2:return(c=r[0]+r[1]-e[0]-e[1])||a(r[0],r[1])-a(e[0],e[1]);case 3:var t=r[0]+r[1],o=e[0]+e[1];if(c=t+r[2]-(o+e[2]))return c;var c,u=a(r[0],r[1]),d=a(e[0],e[1]);return(c=a(u,r[2])-a(d,e[2]))||a(u+r[2],t)-a(d+e[2],o);default:var s=r.slice(0);s.sort();var l=e.slice(0);l.sort();for(var m=0;m>1,c=t(r[o],e);c<=0?(0===c&&(a=o),n=o+1):c>0&&(i=o-1)}return a}function s(r,e){for(var n=new Array(r.length),a=0,o=n.length;a=r.length||0!==t(r[f],c)););}return n}function l(r,e){if(e<0)return[];for(var n=[],a=(1<>>s&1&&d.push(a[s]);e.push(d)}return c(e)},e.skeleton=l,e.boundary=function(r){for(var e=[],n=0,i=r.length;n>1:(r>>1)-1}function h(r){for(var e=g(r);;){var n=e,i=2*r+1,a=2*(r+1),t=r;if(i0;){var n=_(r);if(!(n>=0&&e0){var r=C[0];return f(0,A-1),A-=1,h(0),r}return-1}function P(r,e){var n=C[r];return d[n]===e?r:(d[n]=-1/0,v(r),x(),d[n]=e,v((A+=1)-1))}function G(r){if(!s[r]){s[r]=!0;var e=c[r],n=u[r];c[n]>=0&&(c[n]=e),u[e]>=0&&(u[e]=n),S[e]>=0&&P(S[e],y(e)),S[n]>=0&&P(S[n],y(n))}}var C=[],S=new Array(t);for(l=0;l>1;l>=0;--l)h(l);for(;;){var b=x();if(b<0||d[b]>n)break;G(b)}var M=[];for(l=0;l=0&&n>=0&&e!==n){var i=S[e],a=S[n];i!==a&&k.push([i,a])}})),a.unique(a.normalize(k)),{positions:M,edges:k}};var i=n(3250),a=n(2014)},1303:function(r,e,n){"use strict";r.exports=function(r,e){var n,t,o,c;if(e[0][0]e[1][0]))return a(e,r);n=e[1],t=e[0]}if(r[0][0]r[1][0]))return-a(r,e);o=r[1],c=r[0]}var u=i(n,t,c),d=i(n,t,o);if(u<0){if(d<=0)return u}else if(u>0){if(d>=0)return u}else if(d)return d;if(u=i(c,o,t),d=i(c,o,n),u<0){if(d<=0)return u}else if(u>0){if(d>=0)return u}else if(d)return d;return t[0]-c[0]};var i=n(3250);function a(r,e){var n,a,t,o;if(e[0][0]e[1][0])){var c=Math.min(r[0][1],r[1][1]),u=Math.max(r[0][1],r[1][1]),d=Math.min(e[0][1],e[1][1]),s=Math.max(e[0][1],e[1][1]);return us?c-s:u-s}n=e[1],a=e[0]}r[0][1]0)if(e[0]!==o[1][0])n=r,r=r.right;else{if(u=d(r.right,e))return u;r=r.left}else{if(e[0]!==o[1][0])return r;var u;if(u=d(r.right,e))return u;r=r.left}}return n}function s(r,e,n,i){this.y=r,this.index=e,this.start=n,this.closed=i}function l(r,e,n,i){this.x=r,this.segment=e,this.create=n,this.index=i}c.prototype.castUp=function(r){var e=i.le(this.coordinates,r[0]);if(e<0)return-1;this.slabs[e];var n=d(this.slabs[e],r),a=-1;if(n&&(a=n.value),this.coordinates[e]===r[0]){var c=null;if(n&&(c=n.key),e>0){var s=d(this.slabs[e-1],r);s&&(c?o(s.key,c)>0&&(c=s.key,a=s.value):(a=s.value,c=s.key))}var l=this.horizontal[e];if(l.length>0){var m=i.ge(l,r[1],u);if(m=l.length)return a;p=l[m]}}if(p.start)if(c){var I=t(c[0],c[1],[r[0],p.y]);c[0][0]>c[1][0]&&(I=-I),I>0&&(a=p.index)}else a=p.index;else p.y!==r[1]&&(a=p.index)}}}return a}},5202:function(r,e,n){"use strict";var i=n(1944),a=n(8210);function t(r,e){var n=a(i(r,e),[e[e.length-1]]);return n[n.length-1]}function o(r,e,n,i){var a=-e/(i-e);a<0?a=0:a>1&&(a=1);for(var t=1-a,o=r.length,c=new Array(o),u=0;u0||a>0&&s<0){var l=o(c,s,u,a);n.push(l),i.push(l.slice())}s<0?i.push(u.slice()):s>0?n.push(u.slice()):(n.push(u.slice()),i.push(u.slice())),a=s}return{positive:n,negative:i}},r.exports.positive=function(r,e){for(var n=[],i=t(r[r.length-1],e),a=r[r.length-1],c=r[0],u=0;u0||i>0&&d<0)&&n.push(o(a,d,c,i)),d>=0&&n.push(c.slice()),i=d}return n},r.exports.negative=function(r,e){for(var n=[],i=t(r[r.length-1],e),a=r[r.length-1],c=r[0],u=0;u0||i>0&&d<0)&&n.push(o(a,d,c,i)),d<=0&&n.push(c.slice()),i=d}return n}},3387:function(r,e,n){var i;!function(){"use strict";var a={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,e){var n,i,o,c,u,d,s,l,m,p=1,I=r.length,y="";for(i=0;i=0),c.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,c.width?parseInt(c.width):0);break;case"e":n=c.precision?parseFloat(n).toExponential(c.precision):parseFloat(n).toExponential();break;case"f":n=c.precision?parseFloat(n).toFixed(c.precision):parseFloat(n);break;case"g":n=c.precision?String(Number(n.toPrecision(c.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=c.precision?n.substring(0,c.precision):n;break;case"t":n=String(!!n),n=c.precision?n.substring(0,c.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=c.precision?n.substring(0,c.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=c.precision?n.substring(0,c.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}a.json.test(c.type)?y+=n:(!a.number.test(c.type)||l&&!c.sign?m="":(m=l?"+":"-",n=n.toString().replace(a.sign,"")),d=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",s=c.width-(m+n).length,u=c.width&&s>0?d.repeat(s):"",y+=c.align?m+n+u:"0"===d?m+u+n:u+m+n)}return y}(function(r){if(c[r])return c[r];for(var e,n=r,i=[],t=0;n;){if(null!==(e=a.text.exec(n)))i.push(e[0]);else if(null!==(e=a.modulo.exec(n)))i.push("%");else{if(null===(e=a.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){t|=1;var o=[],u=e[2],d=[];if(null===(d=a.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(d[1]);""!==(u=u.substring(d[0].length));)if(null!==(d=a.key_access.exec(u)))o.push(d[1]);else{if(null===(d=a.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(d[1])}e[2]=o}else t|=2;if(3===t)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}n=n.substring(e[0].length)}return c[r]=i}(r),arguments)}function o(r,e){return t.apply(null,[r].concat(e||[]))}var c=Object.create(null);e.sprintf=t,e.vsprintf=o,"undefined"!==typeof window&&(window.sprintf=t,window.vsprintf=o,void 0===(i=function(){return{sprintf:t,vsprintf:o}}.call(e,n,e,r))||(r.exports=i))}()},3711:function(r,e,n){"use strict";r.exports=function(r,e){if(r.dimension<=0)return{positions:[],cells:[]};if(1===r.dimension)return function(r,e){for(var n=a(r,e),i=n.length,t=new Array(i),o=new Array(i),c=0;ci|0},vertex:function(r,e,n,i,a,t,o,c,u,d,s,l,m){var p=(0|o)+(c<<1)+(u<<2)+(d<<3)|0;if(0!==p&&15!==p)switch(p){case 0:case 15:s.push([r-.5,e-.5]);break;case 1:s.push([r-.25-.25*(i+n-2*m)/(n-i),e-.25-.25*(a+n-2*m)/(n-a)]);break;case 2:s.push([r-.75-.25*(-i-n+2*m)/(i-n),e-.25-.25*(t+i-2*m)/(i-t)]);break;case 3:s.push([r-.5,e-.5-.5*(a+n+t+i-4*m)/(n-a+i-t)]);break;case 4:s.push([r-.25-.25*(t+a-2*m)/(a-t),e-.75-.25*(-a-n+2*m)/(a-n)]);break;case 5:s.push([r-.5-.5*(i+n+t+a-4*m)/(n-i+a-t),e-.5]);break;case 6:s.push([r-.5-.25*(-i-n+t+a)/(i-n+a-t),e-.5-.25*(-a-n+t+i)/(a-n+i-t)]);break;case 7:s.push([r-.75-.25*(t+a-2*m)/(a-t),e-.75-.25*(t+i-2*m)/(i-t)]);break;case 8:s.push([r-.75-.25*(-t-a+2*m)/(t-a),e-.75-.25*(-t-i+2*m)/(t-i)]);break;case 9:s.push([r-.5-.25*(i+n+-t-a)/(n-i+t-a),e-.5-.25*(a+n+-t-i)/(n-a+t-i)]);break;case 10:s.push([r-.5-.5*(-i-n-t-a+4*m)/(i-n+t-a),e-.5]);break;case 11:s.push([r-.25-.25*(-t-a+2*m)/(t-a),e-.75-.25*(a+n-2*m)/(n-a)]);break;case 12:s.push([r-.5,e-.5-.5*(-a-n-t-i+4*m)/(a-n+t-i)]);break;case 13:s.push([r-.75-.25*(i+n-2*m)/(n-i),e-.25-.25*(-t-i+2*m)/(t-i)]);break;case 14:s.push([r-.25-.25*(-i-n+2*m)/(i-n),e-.25-.25*(-a-n+2*m)/(a-n)])}},cell:function(r,e,n,i,a,t,o,c,u){a?c.push([r,e]):c.push([e,r])}});return function(r,e){var n=[],a=[];return i(r,n,a,e),{positions:n,cells:a}}}},o={}},529:function(r,e,n){"use strict";r.exports=function r(e,n,i){var t=(i=i||{}).fontStyle||"normal",c=i.fontWeight||"normal",u=i.fontVariant||"normal",d=[t,c,u,e].join("_"),s=o[d];s||(s=o[d]={" ":{data:new Float32Array(0),shape:.2}});var l=s[n];if(!l)if(n.length<=1||!/\d/.test(n))l=s[n]=function(r){for(var e=r.cells,n=r.positions,i=new Float32Array(6*e.length),a=0,t=0,o=0;o0&&(y+=.02);var g=new Float32Array(I),_=0,h=-.5*y;for(f=0;fMath.max(n,i)?a[2]=1:n>Math.max(e,i)?a[0]=1:a[1]=1;for(var t=0,o=0,u=0;u<3;++u)t+=r[u]*r[u],o+=a[u]*r[u];for(u=0;u<3;++u)a[u]-=o/t*r[u];return c(a,a),a}function m(r,e,n,a,t,o,c,u){this.center=i(n),this.up=i(a),this.right=i(t),this.radius=i([o]),this.angle=i([c,u]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(r,e),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 d=0;d<16;++d)this.computedMatrix[d]=.5;this.recalcMatrix(0)}var p=m.prototype;p.setDistanceLimits=function(r,e){r=r>0?Math.log(r):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,r),this.radius.bounds[0][0]=r,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(r){var e=this.radius.bounds[0];return r?(r[0]=Math.exp(e[0][0]),r[1]=Math.exp(e[1][0]),r):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(r){this.center.curve(r),this.up.curve(r),this.right.curve(r),this.radius.curve(r),this.angle.curve(r);for(var e=this.computedUp,n=this.computedRight,i=0,a=0,t=0;t<3;++t)a+=e[t]*n[t],i+=e[t]*e[t];var u=Math.sqrt(i),s=0;for(t=0;t<3;++t)n[t]-=e[t]*a/i,s+=n[t]*n[t],e[t]/=u;var l=Math.sqrt(s);for(t=0;t<3;++t)n[t]/=l;var m=this.computedToward;o(m,e,n),c(m,m);var p=Math.exp(this.computedRadius[0]),I=this.computedAngle[0],y=this.computedAngle[1],f=Math.cos(I),g=Math.sin(I),_=Math.cos(y),h=Math.sin(y),v=this.computedCenter,x=f*_,P=g*_,G=h,C=-f*h,S=-g*h,A=_,b=this.computedEye,M=this.computedMatrix;for(t=0;t<3;++t){var B=x*n[t]+P*m[t]+G*e[t];M[4*t+1]=C*n[t]+S*m[t]+A*e[t],M[4*t+2]=B,M[4*t+3]=0}var k=M[1],F=M[5],z=M[9],w=M[2],R=M[6],E=M[10],N=F*E-z*R,T=z*w-k*E,D=k*R-F*w,J=d(N,T,D);for(N/=J,T/=J,D/=J,M[0]=N,M[4]=T,M[8]=D,t=0;t<3;++t)b[t]=v[t]+M[2+4*t]*p;for(t=0;t<3;++t){s=0;for(var U=0;U<3;++U)s+=M[t+4*U]*b[U];M[12+t]=-s}M[15]=1},p.getMatrix=function(r,e){this.recalcMatrix(r);var n=this.computedMatrix;if(e){for(var i=0;i<16;++i)e[i]=n[i];return e}return n};var I=[0,0,0];p.rotate=function(r,e,n,i){if(this.angle.move(r,e,n),i){this.recalcMatrix(r);var a=this.computedMatrix;I[0]=a[2],I[1]=a[6],I[2]=a[10];for(var o=this.computedUp,c=this.computedRight,u=this.computedToward,d=0;d<3;++d)a[4*d]=o[d],a[4*d+1]=c[d],a[4*d+2]=u[d];for(t(a,a,i,I),d=0;d<3;++d)o[d]=a[4*d],c[d]=a[4*d+1];this.up.set(r,o[0],o[1],o[2]),this.right.set(r,c[0],c[1],c[2])}},p.pan=function(r,e,n,i){e=e||0,n=n||0,i=i||0,this.recalcMatrix(r);var a=this.computedMatrix,t=(Math.exp(this.computedRadius[0]),a[1]),o=a[5],c=a[9],u=d(t,o,c);t/=u,o/=u,c/=u;var s=a[0],l=a[4],m=a[8],p=s*t+l*o+m*c,I=d(s-=t*p,l-=o*p,m-=c*p),y=(s/=I)*e+t*n,f=(l/=I)*e+o*n,g=(m/=I)*e+c*n;this.center.move(r,y,f,g);var _=Math.exp(this.computedRadius[0]);_=Math.max(1e-4,_+i),this.radius.set(r,Math.log(_))},p.translate=function(r,e,n,i){this.center.move(r,e||0,n||0,i||0)},p.setMatrix=function(r,e,n,i){var t=1;"number"===typeof n&&(t=0|n),(t<0||t>3)&&(t=1);var o=(t+2)%3;e||(this.recalcMatrix(r),e=this.computedMatrix);var c=e[t],u=e[t+4],l=e[t+8];if(i){var m=Math.abs(c),p=Math.abs(u),I=Math.abs(l),y=Math.max(m,p,I);m===y?(c=c<0?-1:1,u=l=0):I===y?(l=l<0?-1:1,c=u=0):(u=u<0?-1:1,c=l=0)}else{var f=d(c,u,l);c/=f,u/=f,l/=f}var g,_,h=e[o],v=e[o+4],x=e[o+8],P=h*c+v*u+x*l,G=d(h-=c*P,v-=u*P,x-=l*P),C=u*(x/=G)-l*(v/=G),S=l*(h/=G)-c*x,A=c*v-u*h,b=d(C,S,A);if(C/=b,S/=b,A/=b,this.center.jump(r,K,V,j),this.radius.idle(r),this.up.jump(r,c,u,l),this.right.jump(r,h,v,x),2===t){var M=e[1],B=e[5],k=e[9],F=M*h+B*v+k*x,z=M*C+B*S+k*A;g=N<0?-Math.PI/2:Math.PI/2,_=Math.atan2(z,F)}else{var w=e[2],R=e[6],E=e[10],N=w*c+R*u+E*l,T=w*h+R*v+E*x,D=w*C+R*S+E*A;g=Math.asin(s(N)),_=Math.atan2(D,T)}this.angle.jump(r,_,g),this.recalcMatrix(r);var J=e[2],U=e[6],H=e[10],L=this.computedMatrix;a(L,e);var O=L[15],K=L[12]/O,V=L[13]/O,j=L[14]/O,W=Math.exp(this.computedRadius[0]);this.center.jump(r,K-J*W,V-U*W,j-H*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(r){this.center.idle(r),this.up.idle(r),this.right.idle(r),this.radius.idle(r),this.angle.idle(r)},p.flush=function(r){this.center.flush(r),this.up.flush(r),this.right.flush(r),this.radius.flush(r),this.angle.flush(r)},p.setDistance=function(r,e){e>0&&this.radius.set(r,Math.log(e))},p.lookAt=function(r,e,n,i){this.recalcMatrix(r),e=e||this.computedEye,n=n||this.computedCenter;var a=(i=i||this.computedUp)[0],t=i[1],o=i[2],c=d(a,t,o);if(!(c<1e-6)){a/=c,t/=c,o/=c;var u=e[0]-n[0],l=e[1]-n[1],m=e[2]-n[2],p=d(u,l,m);if(!(p<1e-6)){u/=p,l/=p,m/=p;var I=this.computedRight,y=I[0],f=I[1],g=I[2],_=a*y+t*f+o*g,h=d(y-=_*a,f-=_*t,g-=_*o);if(!(h<.01&&(h=d(y=t*m-o*l,f=o*u-a*m,g=a*l-t*u))<1e-6)){y/=h,f/=h,g/=h,this.up.set(r,a,t,o),this.right.set(r,y,f,g),this.center.set(r,n[0],n[1],n[2]),this.radius.set(r,Math.log(p));var v=t*g-o*f,x=o*y-a*g,P=a*f-t*y,G=d(v,x,P),C=a*u+t*l+o*m,S=y*u+f*l+g*m,A=(v/=G)*u+(x/=G)*l+(P/=G)*m,b=Math.asin(s(C)),M=Math.atan2(A,S),B=this.angle._state,k=B[B.length-1],F=B[B.length-2];k%=2*Math.PI;var z=Math.abs(k+2*Math.PI-M),w=Math.abs(k-M),R=Math.abs(k-2*Math.PI-M);z0?n.pop():new ArrayBuffer(r)}function I(r){return new Uint8Array(p(r),0,r)}function y(r){return new Uint16Array(p(2*r),0,r)}function f(r){return new Uint32Array(p(4*r),0,r)}function g(r){return new Int8Array(p(r),0,r)}function _(r){return new Int16Array(p(2*r),0,r)}function h(r){return new Int32Array(p(4*r),0,r)}function v(r){return new Float32Array(p(4*r),0,r)}function x(r){return new Float64Array(p(8*r),0,r)}function P(r){return o?new Uint8ClampedArray(p(r),0,r):I(r)}function G(r){return c?new BigUint64Array(p(8*r),0,r):null}function C(r){return u?new BigInt64Array(p(8*r),0,r):null}function S(r){return new DataView(p(r),0,r)}function A(r){r=i.nextPow2(r);var e=i.log2(r),n=l[e];return n.length>0?n.pop():new t(r)}e.free=function(r){if(t.isBuffer(r))l[i.log2(r.length)].push(r);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(r)&&(r=r.buffer),!r)return;var e=r.length||r.byteLength,n=0|i.log2(e);s[n].push(r)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(r){m(r.buffer)},e.freeArrayBuffer=m,e.freeBuffer=function(r){l[i.log2(r.length)].push(r)},e.malloc=function(r,e){if(void 0===e||"arraybuffer"===e)return p(r);switch(e){case"uint8":return I(r);case"uint16":return y(r);case"uint32":return f(r);case"int8":return g(r);case"int16":return _(r);case"int32":return h(r);case"float":case"float32":return v(r);case"double":case"float64":return x(r);case"uint8_clamped":return P(r);case"bigint64":return C(r);case"biguint64":return G(r);case"buffer":return A(r);case"data":case"dataview":return S(r);default:return null}return null},e.mallocArrayBuffer=p,e.mallocUint8=I,e.mallocUint16=y,e.mallocUint32=f,e.mallocInt8=g,e.mallocInt16=_,e.mallocInt32=h,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=P,e.mallocBigUint64=G,e.mallocBigInt64=C,e.mallocDataView=S,e.mallocBuffer=A,e.clearCache=function(){for(var r=0;r<32;++r)d.UINT8[r].length=0,d.UINT16[r].length=0,d.UINT32[r].length=0,d.INT8[r].length=0,d.INT16[r].length=0,d.INT32[r].length=0,d.FLOAT[r].length=0,d.DOUBLE[r].length=0,d.BIGUINT64[r].length=0,d.BIGINT64[r].length=0,d.UINT8C[r].length=0,s[r].length=0,l[r].length=0}},1755:function(r){"use strict";function e(r){this.roots=new Array(r),this.ranks=new Array(r);for(var e=0;e0&&(t=i.size),i.lineSpacing&&i.lineSpacing>0&&(o=i.lineSpacing),i.styletags&&i.styletags.breaklines&&(c.breaklines=!!i.styletags.breaklines),i.styletags&&i.styletags.bolds&&(c.bolds=!!i.styletags.bolds),i.styletags&&i.styletags.italics&&(c.italics=!!i.styletags.italics),i.styletags&&i.styletags.subscripts&&(c.subscripts=!!i.styletags.subscripts),i.styletags&&i.styletags.superscripts&&(c.superscripts=!!i.styletags.superscripts)),n.font=[i.fontStyle,i.fontVariant,i.fontWeight,t+"px",i.font].filter((function(r){return r})).join(" "),n.textAlign="start",n.textBaseline="alphabetic",n.direction="ltr",P(function(r,e,n,i,t,o){n=n.replace(/\n/g,""),n=!0===o.breaklines?n.replace(/\/g,"\n"):n.replace(/\/g," ");var c="",u=[];for(G=0;G-1?parseInt(r[1+a]):0,u=t>-1?parseInt(n[1+t]):0;c!==u&&(i=i.replace(T(),"?px "),A*=Math.pow(.75,u-c),i=i.replace("?px ",T())),S+=.25*B*(u-c)}if(!0===o.superscripts){var d=r.indexOf(I),l=n.indexOf(I),p=d>-1?parseInt(r[1+d]):0,y=l>-1?parseInt(n[1+l]):0;p!==y&&(i=i.replace(T(),"?px "),A*=Math.pow(.75,y-p),i=i.replace("?px ",T())),S-=.25*B*(y-p)}if(!0===o.bolds){var f=r.indexOf(s)>-1,_=n.indexOf(s)>-1;!f&&_&&(i=h?i.replace("italic ","italic bold "):"bold "+i),f&&!_&&(i=i.replace("bold ",""))}if(!0===o.italics){var h=r.indexOf(m)>-1,v=n.indexOf(m)>-1;!h&&v&&(i="italic "+i),h&&!v&&(i=i.replace("italic ",""))}e.font=i}for(P=0;P",t="",o=a.length,c=t.length,u=e[0]===I||e[0]===g,d=0,s=-c;d>-1&&-1!==(d=n.indexOf(a,d))&&-1!==(s=n.indexOf(t,d+o))&&!(s<=d);){for(var l=d;l=s)i[l]=null,n=n.substr(0,l)+" "+n.substr(l+1);else if(null!==i[l]){var m=i[l].indexOf(e[0]);-1===m?i[l]+=e:u&&(i[l]=i[l].substr(0,m+1)+(1+parseInt(i[l][m+1]))+i[l].substr(m+2))}var p=d+o,y=n.substr(p,s-p).indexOf(a);d=-1!==y?y:s+c}return i}function v(r,e){var n=i(r,128);return e?t(n.cells,n.positions,.25):{edges:n.cells,positions:n.positions}}function x(r,e,n,i){var a=v(r,i),t=function(r,e,n){for(var i=e.textAlign||"start",a=e.textBaseline||"alphabetic",t=[1<<30,1<<30],o=[0,0],c=r.length,u=0;u=0?e[t]:a}))},has___:{value:h((function(e){var i=_(e);return i?n in i:r.indexOf(e)>=0}))},set___:{value:h((function(i,a){var t,o=_(i);return o?o[n]=a:(t=r.indexOf(i))>=0?e[t]=a:(t=r.length,e[t]=a,r[t]=i),this}))},delete___:{value:h((function(i){var a,t,o=_(i);return o?n in o&&delete o[n]:!((a=r.indexOf(i))<0)&&(t=r.length-1,r[a]=void 0,e[a]=e[t],r[a]=r[t],r.length=t,e.length=t,!0)}))}})};y.prototype=Object.create(Object.prototype,{get:{value:function(r,e){return this.get___(r,e)},writable:!0,configurable:!0},has:{value:function(r){return this.has___(r)},writable:!0,configurable:!0},set:{value:function(r,e){return this.set___(r,e)},writable:!0,configurable:!0},delete:{value:function(r){return this.delete___(r)},writable:!0,configurable:!0}}),"function"===typeof n?function(){function i(){this instanceof y||v();var r,i=new n,a=void 0,t=!1;return r=e?function(r,e){return i.set(r,e),i.has(r)||(a||(a=new y),a.set(r,e)),this}:function(r,e){if(t)try{i.set(r,e)}catch(n){a||(a=new y),a.set___(r,e)}else i.set(r,e);return this},Object.create(y.prototype,{get___:{value:h((function(r,e){return a?i.has(r)?i.get(r):a.get___(r,e):i.get(r,e)}))},has___:{value:h((function(r){return i.has(r)||!!a&&a.has___(r)}))},set___:{value:h(r)},delete___:{value:h((function(r){var e=!!i.delete(r);return a&&a.delete___(r)||e}))},permitHostObjects___:{value:h((function(r){if(r!==f)throw new Error("bogus call to permitHostObjects___");t=!0}))}})}e&&"undefined"!==typeof Proxy&&(Proxy=void 0),i.prototype=y.prototype,r.exports=i,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!==typeof Proxy&&(Proxy=void 0),r.exports=y)}function f(r){r.permitHostObjects___&&r.permitHostObjects___(f)}function g(r){return!(r.substr(0,8)==u&&"___"===r.substr(r.length-3))}function _(r){if(r!==Object(r))throw new TypeError("Not an object: "+r);var e=r[d];if(e&&e.key===r)return e;if(c(r)){e={key:r};try{return o(r,d,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(n){return}}}function h(r){return r.prototype=null,Object.freeze(r)}function v(){p||"undefined"===typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(r,e,n){var i=n(8284);r.exports=function(){var r={};return function(e){if(("object"!==typeof e||null===e)&&"function"!==typeof e)throw new Error("Weakmap-shim: Key must be object");var n=e.valueOf(r);return n&&n.identity===r?n:i(e,r)}}},8284:function(r){r.exports=function(r,e){var n={identity:e},i=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(r){return r!==e?i.apply(this,arguments):n},writable:!0}),n}},606:function(r,e,n){var i=n(236);r.exports=function(){var r=i();return{get:function(e,n){var i=r(e);return i.hasOwnProperty("value")?i.value:n},set:function(e,n){return r(e).value=n,this},has:function(e){return"value"in r(e)},delete:function(e){return delete r(e).value}}}},3349:function(r){"use strict";var e=function(){return function(r,e,n,i,a,t){var o=r[0],c=n[0],u=[0],d=c;i|=0;var s=0,l=c;for(s=0;s=0!==p>=0&&a.push(u[0]+.5+.5*(m+p)/(m-p)),i+=l,++u[0]}}};r.exports=function(r){return n={funcName:r.funcName},function(r){var e={};return function(n,i,a){var t=n.dtype,o=n.order,c=[t,o.join()].join(),u=e[c];return u||(e[c]=u=r([t,o])),u(n.shape.slice(0),n.data,n.stride,0|n.offset,i,a)}}(e.bind(void 0,n));var n}({funcName:"zeroCrossings"})},781:function(r,e,n){"use strict";r.exports=function(r,e){var n=[];return e=+e||0,i(r.hi(r.shape[0]-1),n,e),n};var i=n(3349)},7790:function(){}},n={};function a(r){var i=n[r];if(void 0!==i)return i.exports;var t=n[r]={id:r,loaded:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.loaded=!0,t.exports}a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"===typeof window)return window}}(),a.nmd=function(r){return r.paths=[],r.children||(r.children=[]),r};var t=a(1964);r.exports=t}()},33576:function(r,e,n){"use strict";function i(r,e){for(var n=0;np)throw new RangeError('The value "'+r+'" is invalid for option "size"');var e=new Uint8Array(r);return Object.setPrototypeOf(e,y.prototype),e}function y(r,e,n){if("number"===typeof r){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return _(r)}return f(r,e,n)}function f(r,e,n){if("string"===typeof r)return function(r,e){if("string"===typeof e&&""!==e||(e="utf8"),!y.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|P(r,e),i=I(n),a=i.write(r,e);return a!==n&&(i=i.slice(0,a)),i}(r,e);if(ArrayBuffer.isView(r))return function(r){if(nr(r,Uint8Array)){var e=new Uint8Array(r);return v(e.buffer,e.byteOffset,e.byteLength)}return h(r)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+d(r));if(nr(r,ArrayBuffer)||r&&nr(r.buffer,ArrayBuffer))return v(r,e,n);if("undefined"!==typeof SharedArrayBuffer&&(nr(r,SharedArrayBuffer)||r&&nr(r.buffer,SharedArrayBuffer)))return v(r,e,n);if("number"===typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=r.valueOf&&r.valueOf();if(null!=i&&i!==r)return y.from(i,e,n);var a=function(r){if(y.isBuffer(r)){var e=0|x(r.length),n=I(e);return 0===n.length||r.copy(n,0,0,e),n}return void 0!==r.length?"number"!==typeof r.length||ir(r.length)?I(0):h(r):"Buffer"===r.type&&Array.isArray(r.data)?h(r.data):void 0}(r);if(a)return a;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof r[Symbol.toPrimitive])return y.from(r[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+d(r))}function g(r){if("number"!==typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function _(r){return g(r),I(r<0?0:0|x(r))}function h(r){for(var e=r.length<0?0:0|x(r.length),n=I(e),i=0;i=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|r}function P(r,e){if(y.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||nr(r,ArrayBuffer))return r.byteLength;if("string"!==typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+d(r));var n=r.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return $(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return rr(r).length;default:if(a)return i?-1:$(r).length;e=(""+e).toLowerCase(),a=!0}}function G(r,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return T(this,e,n);case"utf8":case"utf-8":return w(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return z(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}function C(r,e,n){var i=r[e];r[e]=r[n],r[n]=i}function S(r,e,n,i,a){if(0===r.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),ir(n=+n)&&(n=a?0:r.length-1),n<0&&(n=r.length+n),n>=r.length){if(a)return-1;n=r.length-1}else if(n<0){if(!a)return-1;n=0}if("string"===typeof e&&(e=y.from(e,i)),y.isBuffer(e))return 0===e.length?-1:A(r,e,n,i,a);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(r,e,n):Uint8Array.prototype.lastIndexOf.call(r,e,n):A(r,[e],n,i,a);throw new TypeError("val must be string, number or Buffer")}function A(r,e,n,i,a){var t,o=1,c=r.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(r.length<2||e.length<2)return-1;o=2,c/=2,u/=2,n/=2}function d(r,e){return 1===o?r[e]:r.readUInt16BE(e*o)}if(a){var s=-1;for(t=n;tc&&(n=c-u),t=n;t>=0;t--){for(var l=!0,m=0;ma&&(i=a):i=a;var t,o=e.length;for(i>o/2&&(i=o/2),t=0;t>8,a=n%256,t.push(a),t.push(i);return t}(e,r.length-n),r,n,i)}function z(r,e,n){return 0===e&&n===r.length?s.fromByteArray(r):s.fromByteArray(r.slice(e,n))}function w(r,e,n){n=Math.min(r.length,n);for(var i=[],a=e;a239?4:t>223?3:t>191?2:1;if(a+c<=n){var u=void 0,d=void 0,s=void 0,l=void 0;switch(c){case 1:t<128&&(o=t);break;case 2:128===(192&(u=r[a+1]))&&(l=(31&t)<<6|63&u)>127&&(o=l);break;case 3:u=r[a+1],d=r[a+2],128===(192&u)&&128===(192&d)&&(l=(15&t)<<12|(63&u)<<6|63&d)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:u=r[a+1],d=r[a+2],s=r[a+3],128===(192&u)&&128===(192&d)&&128===(192&s)&&(l=(15&t)<<18|(63&u)<<12|(63&d)<<6|63&s)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,c=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),a+=c}return function(r){var e=r.length;if(e<=R)return String.fromCharCode.apply(String,r);for(var n="",i=0;ii.length?(y.isBuffer(t)||(t=y.from(t)),t.copy(i,a)):Uint8Array.prototype.set.call(i,t,a);else{if(!y.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,a)}a+=t.length}return i},y.byteLength=P,y.prototype._isBuffer=!0,y.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;en&&(r+=" ... "),""},m&&(y.prototype[m]=y.prototype.inspect),y.prototype.compare=function(r,e,n,i,a){if(nr(r,Uint8Array)&&(r=y.from(r,r.offset,r.byteLength)),!y.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+d(r));if(void 0===e&&(e=0),void 0===n&&(n=r?r.length:0),void 0===i&&(i=0),void 0===a&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(this===r)return 0;for(var t=(a>>>=0)-(i>>>=0),o=(n>>>=0)-(e>>>=0),c=Math.min(t,o),u=this.slice(i,a),s=r.slice(e,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var a=this.length-e;if((void 0===n||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var t=!1;;)switch(i){case"hex":return b(this,r,e,n);case"utf8":case"utf-8":return M(this,r,e,n);case"ascii":case"latin1":case"binary":return B(this,r,e,n);case"base64":return k(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,r,e,n);default:if(t)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),t=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function E(r,e,n){var i="";n=Math.min(r.length,n);for(var a=e;ai)&&(n=i);for(var a="",t=e;tn)throw new RangeError("Trying to access beyond buffer length")}function U(r,e,n,i,a,t){if(!y.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||er.length)throw new RangeError("Index out of range")}function H(r,e,n,i,a){q(e,i,a,r,n,7);var t=Number(e&BigInt(4294967295));r[n++]=t,t>>=8,r[n++]=t,t>>=8,r[n++]=t,t>>=8,r[n++]=t;var o=Number(e>>BigInt(32)&BigInt(4294967295));return r[n++]=o,o>>=8,r[n++]=o,o>>=8,r[n++]=o,o>>=8,r[n++]=o,n}function L(r,e,n,i,a){q(e,i,a,r,n,7);var t=Number(e&BigInt(4294967295));r[n+7]=t,t>>=8,r[n+6]=t,t>>=8,r[n+5]=t,t>>=8,r[n+4]=t;var o=Number(e>>BigInt(32)&BigInt(4294967295));return r[n+3]=o,o>>=8,r[n+2]=o,o>>=8,r[n+1]=o,o>>=8,r[n]=o,n+8}function O(r,e,n,i,a,t){if(n+i>r.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function K(r,e,n,i,a){return e=+e,n>>>=0,a||O(r,0,n,4),l.write(r,e,n,i,23,4),n+4}function V(r,e,n,i,a){return e=+e,n>>>=0,a||O(r,0,n,8),l.write(r,e,n,i,52,8),n+8}y.prototype.slice=function(r,e){var n=this.length;(r=~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r],a=1,t=0;++t>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i},y.prototype.readUint8=y.prototype.readUInt8=function(r,e){return r>>>=0,e||J(r,1,this.length),this[r]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(r,e){return r>>>=0,e||J(r,2,this.length),this[r]|this[r+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(r,e){return r>>>=0,e||J(r,2,this.length),this[r]<<8|this[r+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(r,e){return r>>>=0,e||J(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(r,e){return r>>>=0,e||J(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},y.prototype.readBigUInt64LE=tr((function(r){Y(r>>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=e+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,24),a=this[++r]+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(i)+(BigInt(a)<>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=e*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r],a=this[++r]*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+n;return(BigInt(i)<>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r],a=1,t=0;++t=(a*=128)&&(i-=Math.pow(2,8*e)),i},y.prototype.readIntBE=function(r,e,n){r>>>=0,e>>>=0,n||J(r,e,this.length);for(var i=e,a=1,t=this[r+--i];i>0&&(a*=256);)t+=this[r+--i]*a;return t>=(a*=128)&&(t-=Math.pow(2,8*e)),t},y.prototype.readInt8=function(r,e){return r>>>=0,e||J(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},y.prototype.readInt16LE=function(r,e){r>>>=0,e||J(r,2,this.length);var n=this[r]|this[r+1]<<8;return 32768&n?4294901760|n:n},y.prototype.readInt16BE=function(r,e){r>>>=0,e||J(r,2,this.length);var n=this[r+1]|this[r]<<8;return 32768&n?4294901760|n:n},y.prototype.readInt32LE=function(r,e){return r>>>=0,e||J(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},y.prototype.readInt32BE=function(r,e){return r>>>=0,e||J(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},y.prototype.readBigInt64LE=tr((function(r){Y(r>>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=this[r+4]+this[r+5]*Math.pow(2,8)+this[r+6]*Math.pow(2,16)+(n<<24);return(BigInt(i)<>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=(e<<24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r];return(BigInt(i)<>>=0,e||J(r,4,this.length),l.read(this,r,!0,23,4)},y.prototype.readFloatBE=function(r,e){return r>>>=0,e||J(r,4,this.length),l.read(this,r,!1,23,4)},y.prototype.readDoubleLE=function(r,e){return r>>>=0,e||J(r,8,this.length),l.read(this,r,!0,52,8)},y.prototype.readDoubleBE=function(r,e){return r>>>=0,e||J(r,8,this.length),l.read(this,r,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(r,e,n,i){r=+r,e>>>=0,n>>>=0,i||U(this,r,e,n,Math.pow(2,8*n)-1,0);var a=1,t=0;for(this[e]=255&r;++t>>=0,n>>>=0,i||U(this,r,e,n,Math.pow(2,8*n)-1,0);var a=n-1,t=1;for(this[e+a]=255&r;--a>=0&&(t*=256);)this[e+a]=r/t&255;return e+n},y.prototype.writeUint8=y.prototype.writeUInt8=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,1,255,0),this[e]=255&r,e+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,65535,0),this[e]=255&r,this[e+1]=r>>>8,e+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,65535,0),this[e]=r>>>8,this[e+1]=255&r,e+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,4294967295,0),this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=255&r,e+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,4294967295,0),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r,e+4},y.prototype.writeBigUInt64LE=tr((function(r){return H(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeBigUInt64BE=tr((function(r){return L(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e>>>=0,!i){var a=Math.pow(2,8*n-1);U(this,r,e,n,a-1,-a)}var t=0,o=1,c=0;for(this[e]=255&r;++t>>=0,!i){var a=Math.pow(2,8*n-1);U(this,r,e,n,a-1,-a)}var t=n-1,o=1,c=0;for(this[e+t]=255&r;--t>=0&&(o*=256);)r<0&&0===c&&0!==this[e+t+1]&&(c=1),this[e+t]=(r/o|0)-c&255;return e+n},y.prototype.writeInt8=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,1,127,-128),r<0&&(r=255+r+1),this[e]=255&r,e+1},y.prototype.writeInt16LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,32767,-32768),this[e]=255&r,this[e+1]=r>>>8,e+2},y.prototype.writeInt16BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,32767,-32768),this[e]=r>>>8,this[e+1]=255&r,e+2},y.prototype.writeInt32LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,2147483647,-2147483648),this[e]=255&r,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24,e+4},y.prototype.writeInt32BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r,e+4},y.prototype.writeBigInt64LE=tr((function(r){return H(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeBigInt64BE=tr((function(r){return L(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeFloatLE=function(r,e,n){return K(this,r,e,!0,n)},y.prototype.writeFloatBE=function(r,e,n){return K(this,r,e,!1,n)},y.prototype.writeDoubleLE=function(r,e,n){return V(this,r,e,!0,n)},y.prototype.writeDoubleBE=function(r,e,n){return V(this,r,e,!1,n)},y.prototype.copy=function(r,e,n,i){if(!y.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e>>=0,n=void 0===n?this.length:n>>>0,r||(r=0),"number"===typeof r)for(t=e;t=i+4;n-=3)e="_".concat(r.slice(n-3,n)).concat(e);return"".concat(r.slice(0,n)).concat(e)}function q(r,e,n,i,a,t){if(r>n||r3?0===e||e===BigInt(0)?">= 0".concat(c," and < 2").concat(c," ** ").concat(8*(t+1)).concat(c):">= -(2".concat(c," ** ").concat(8*(t+1)-1).concat(c,") and < 2 ** ")+"".concat(8*(t+1)-1).concat(c):">= ".concat(e).concat(c," and <= ").concat(n).concat(c),new j.ERR_OUT_OF_RANGE("value",o,r)}!function(r,e,n){Y(e,"offset"),void 0!==r[e]&&void 0!==r[e+n]||X(e,r.length-(n+1))}(i,a,t)}function Y(r,e){if("number"!==typeof r)throw new j.ERR_INVALID_ARG_TYPE(e,"number",r)}function X(r,e,n){if(Math.floor(r)!==r)throw Y(r,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",r);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(e),r)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(r){return r?"".concat(r," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(r,e){return'The "'.concat(r,'" argument must be of type number. Received type ').concat(d(e))}),TypeError),W("ERR_OUT_OF_RANGE",(function(r,e,n){var i='The value of "'.concat(r,'" is out of range.'),a=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?a=Z(String(n)):"bigint"===typeof n&&(a=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(a=Z(a)),a+="n"),i+=" It must be ".concat(e,". Received ").concat(a)}),RangeError);var Q=/[^+/0-9A-Za-z-_]/g;function $(r,e){var n;e=e||1/0;for(var i=r.length,a=null,t=[],o=0;o55295&&n<57344){if(!a){if(n>56319){(e-=3)>-1&&t.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&t.push(239,191,189);continue}a=n;continue}if(n<56320){(e-=3)>-1&&t.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(e-=3)>-1&&t.push(239,191,189);if(a=null,n<128){if((e-=1)<0)break;t.push(n)}else if(n<2048){if((e-=2)<0)break;t.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;t.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;t.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return t}function rr(r){return s.toByteArray(function(r){if((r=(r=r.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;r.length%4!==0;)r+="=";return r}(r))}function er(r,e,n,i){var a;for(a=0;a=e.length||a>=r.length);++a)e[a+n]=r[a];return a}function nr(r,e){return r instanceof e||null!=r&&null!=r.constructor&&null!=r.constructor.name&&r.constructor.name===e.name}function ir(r){return r!==r}var ar=function(){for(var r="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var i=16*n,a=0;a<16;++a)e[i+a]=r[n]+r[a];return e}();function tr(r){return"undefined"===typeof BigInt?or:r}function or(){throw new Error("BigInt not supported")}},25928:function(r){"use strict";r.exports=a,r.exports.isMobile=a,r.exports.default=a;var e=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,i=/android|ipad|playbook|silk/i;function a(r){r||(r={});var a=r.ua;if(a||"undefined"===typeof navigator||(a=navigator.userAgent),a&&a.headers&&"string"===typeof a.headers["user-agent"]&&(a=a.headers["user-agent"]),"string"!==typeof a)return!1;var t=e.test(a)&&!n.test(a)||!!r.tablet&&i.test(a);return!t&&r.tablet&&r.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==a.indexOf("Macintosh")&&-1!==a.indexOf("Safari")&&(t=!0),t}},48932:function(r,e,n){"use strict";n.r(e),n.d(e,{sankeyCenter:function(){return m},sankeyCircular:function(){return k},sankeyJustify:function(){return l},sankeyLeft:function(){return d},sankeyRight:function(){return s}});var i=n(84706),a=n(34712),t=n(10132),o=n(6688),c=n.n(o);function u(r){return r.target.depth}function d(r){return r.depth}function s(r,e){return e-1-r.height}function l(r,e){return r.sourceLinks.length?r.depth:e-1}function m(r){return r.targetLinks.length?r.depth:r.sourceLinks.length?(0,i.SY)(r.sourceLinks,u)-1:0}function p(r){return function(){return r}}var I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"===typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function y(r,e){return g(r.source,e.source)||r.index-e.index}function f(r,e){return g(r.target,e.target)||r.index-e.index}function g(r,e){return r.partOfCycle===e.partOfCycle?r.y0-e.y0:"top"===r.circularLinkType||"bottom"===e.circularLinkType?-1:1}function _(r){return r.value}function h(r){return(r.y0+r.y1)/2}function v(r){return h(r.source)}function x(r){return h(r.target)}function P(r){return r.index}function G(r){return r.nodes}function C(r){return r.links}function S(r,e){var n=r.get(e);if(!n)throw new Error("missing: "+e);return n}function A(r,e){return e(r)}var b=25,M=10,B=.3;function k(){var r,e,n=0,t=0,o=1,u=1,d=24,s=P,m=l,A=G,k=C,z=32,R=2,E=null;function T(){var l={nodes:A.apply(null,arguments),links:k.apply(null,arguments)};!function(r){r.nodes.forEach((function(r,e){r.index=e,r.sourceLinks=[],r.targetLinks=[]}));var e=(0,a.kH)(r.nodes,s);r.links.forEach((function(r,n){r.index=n;var i=r.source,a=r.target;"object"!==("undefined"===typeof i?"undefined":I(i))&&(i=r.source=S(e,i)),"object"!==("undefined"===typeof a?"undefined":I(a))&&(a=r.target=S(e,a)),i.sourceLinks.push(r),a.targetLinks.push(r)}))}(l),function(r,e,n){var i=0;if(null===n){for(var a=[],t=0;t0;--I)f(p*=.99,l),P();function y(a){if(e){var s=1/0;m.forEach((function(r){var n=u*e/(r.length+1);s=n0?e+b+M:e,bottom:n=n>0?n+b+M:n,left:t=t>0?t+b+M:t,right:a=a>0?a+b+M:a}}(c),I=function(r,e){var a=(0,i.kv)(r.nodes,(function(r){return r.column})),c=o-n,s=u-t,l=c+e.right+e.left,m=s+e.top+e.bottom,p=c/l,I=s/m;return n=n*p+e.left,o=0==e.right?o:o*p,t=t*I+e.top,u*=I,r.nodes.forEach((function(r){r.x0=n+r.column*((o-n-d)/a),r.x1=r.x0+d})),I}(c,p);l*=I,c.links.forEach((function(r){r.width=r.value*l})),m.forEach((function(r){var e=r.length;r.forEach((function(r,n){r.depth==m.length-1&&1==e||0==r.depth&&1==e?(r.y0=u/2-r.value*l,r.y1=r.y0+r.value*l):r.partOfCycle?0==w(r,a)?(r.y0=u/2+n,r.y1=r.y0+r.value*l):"top"==r.circularLinkType?(r.y0=t+n,r.y1=r.y0+r.value*l):(r.y0=u-r.value*l-n,r.y1=r.y0+r.value*l):0==p.top||0==p.bottom?(r.y0=(u-t)/e*n,r.y1=r.y0+r.value*l):(r.y0=(u-t)/2-e/2+n,r.y1=r.y0+r.value*l)}))}))}function f(r,e){var n=m.length;m.forEach((function(a){var t=a.length,o=a[0].depth;a.forEach((function(a){var c;if(a.sourceLinks.length||a.targetLinks.length)if(a.partOfCycle&&w(a,e)>0);else if(0==o&&1==t)c=a.y1-a.y0,a.y0=u/2-c/2,a.y1=u/2+c/2;else if(o==n-1&&1==t)c=a.y1-a.y0,a.y0=u/2-c/2,a.y1=u/2+c/2;else{var d=(0,i.mo)(a.sourceLinks,x),s=(0,i.mo)(a.targetLinks,v),l=((d&&s?(d+s)/2:d||s)-h(a))*r;a.y0+=l,a.y1+=l}}))}))}function P(){m.forEach((function(e){var n,i,a,o=t,c=e.length;for(e.sort(g),a=0;a0&&(n.y0+=i,n.y1+=i),o=n.y1+r;if((i=o-r-u)>0)for(o=n.y0-=i,n.y1-=i,a=c-2;a>=0;--a)(i=(n=e[a]).y1+r-o)>0&&(n.y0-=i,n.y1-=i),o=n.y0}))}}(l,z,s),D(l);for(var p=0;p<4;p++)Z(l,u,s),q(l,0,s),j(l,t,u,s),Z(l,u,s),q(l,0,s);return function(r,e,n){var a=r.nodes,t=r.links,o=!1,c=!1;if(t.forEach((function(r){"top"==r.circularLinkType?o=!0:"bottom"==r.circularLinkType&&(c=!0)})),0==o||0==c){var u=(0,i.SY)(a,(function(r){return r.y0})),d=(n-e)/((0,i.kv)(a,(function(r){return r.y1}))-u);a.forEach((function(r){var e=(r.y1-r.y0)*d;r.y0=(r.y0-u)*d,r.y1=r.y0+e})),t.forEach((function(r){r.y0=(r.y0-u)*d,r.y1=(r.y1-u)*d,r.width=r.width*d}))}}(l,t,u),N(l,R,u,s),l}function D(r){r.nodes.forEach((function(r){r.sourceLinks.sort(f),r.targetLinks.sort(y)})),r.nodes.forEach((function(r){var e=r.y0,n=e,i=r.y1,a=i;r.sourceLinks.forEach((function(r){r.circular?(r.y0=i-r.width/2,i-=r.width):(r.y0=e+r.width/2,e+=r.width)})),r.targetLinks.forEach((function(r){r.circular?(r.y1=a-r.width/2,a-=r.width):(r.y1=n+r.width/2,n+=r.width)}))}))}return T.nodeId=function(r){return arguments.length?(s="function"===typeof r?r:p(r),T):s},T.nodeAlign=function(r){return arguments.length?(m="function"===typeof r?r:p(r),T):m},T.nodeWidth=function(r){return arguments.length?(d=+r,T):d},T.nodePadding=function(e){return arguments.length?(r=+e,T):r},T.nodes=function(r){return arguments.length?(A="function"===typeof r?r:p(r),T):A},T.links=function(r){return arguments.length?(k="function"===typeof r?r:p(r),T):k},T.size=function(r){return arguments.length?(n=t=0,o=+r[0],u=+r[1],T):[o-n,u-t]},T.extent=function(r){return arguments.length?(n=+r[0][0],o=+r[1][0],t=+r[0][1],u=+r[1][1],T):[[n,t],[o,u]]},T.iterations=function(r){return arguments.length?(z=+r,T):z},T.circularLinkGap=function(r){return arguments.length?(R=+r,T):R},T.nodePaddingRatio=function(r){return arguments.length?(e=+r,T):e},T.sortNodes=function(r){return arguments.length?(E=r,T):E},T.update=function(r){return F(r,s),D(r),r.links.forEach((function(r){r.circular&&(r.circularLinkType=r.y0+r.y11||a>1)}function E(r,e,n){return r.sort(T),r.forEach((function(i,a){var t,o,c=0;if(Q(i,n)&&R(i))i.circularPathData.verticalBuffer=c+i.width/2;else{for(var u=0;uo.source.column)){var d=r[u].circularPathData.verticalBuffer+r[u].width/2+e;c=d>c?d:c}i.circularPathData.verticalBuffer=c+i.width/2}})),r}function N(r,e,n,a){var o=(0,i.SY)(r.links,(function(r){return r.source.y0}));r.links.forEach((function(r){r.circular&&(r.circularPathData={})})),E(r.links.filter((function(r){return"top"==r.circularLinkType})),e,a),E(r.links.filter((function(r){return"bottom"==r.circularLinkType})),e,a),r.links.forEach((function(i){if(i.circular){if(i.circularPathData.arcRadius=i.width+M,i.circularPathData.leftNodeBuffer=5,i.circularPathData.rightNodeBuffer=5,i.circularPathData.sourceWidth=i.source.x1-i.source.x0,i.circularPathData.sourceX=i.source.x0+i.circularPathData.sourceWidth,i.circularPathData.targetX=i.target.x0,i.circularPathData.sourceY=i.y0,i.circularPathData.targetY=i.y1,Q(i,a)&&R(i))i.circularPathData.leftSmallArcRadius=M+i.width/2,i.circularPathData.leftLargeArcRadius=M+i.width/2,i.circularPathData.rightSmallArcRadius=M+i.width/2,i.circularPathData.rightLargeArcRadius=M+i.width/2,"bottom"==i.circularLinkType?(i.circularPathData.verticalFullExtent=i.source.y1+b+i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.rightLargeArcRadius):(i.circularPathData.verticalFullExtent=i.source.y0-b-i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.rightLargeArcRadius);else{var c=i.source.column,u=i.circularLinkType,d=r.links.filter((function(r){return r.source.column==c&&r.circularLinkType==u}));"bottom"==i.circularLinkType?d.sort(J):d.sort(D);var s=0;d.forEach((function(r,n){r.circularLinkID==i.circularLinkID&&(i.circularPathData.leftSmallArcRadius=M+i.width/2+s,i.circularPathData.leftLargeArcRadius=M+i.width/2+n*e+s),s+=r.width})),c=i.target.column,d=r.links.filter((function(r){return r.target.column==c&&r.circularLinkType==u})),"bottom"==i.circularLinkType?d.sort(H):d.sort(U),s=0,d.forEach((function(r,n){r.circularLinkID==i.circularLinkID&&(i.circularPathData.rightSmallArcRadius=M+i.width/2+s,i.circularPathData.rightLargeArcRadius=M+i.width/2+n*e+s),s+=r.width})),"bottom"==i.circularLinkType?(i.circularPathData.verticalFullExtent=Math.max(n,i.source.y1,i.target.y1)+b+i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.rightLargeArcRadius):(i.circularPathData.verticalFullExtent=o-b-i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.rightLargeArcRadius)}i.circularPathData.leftInnerExtent=i.circularPathData.sourceX+i.circularPathData.leftNodeBuffer,i.circularPathData.rightInnerExtent=i.circularPathData.targetX-i.circularPathData.rightNodeBuffer,i.circularPathData.leftFullExtent=i.circularPathData.sourceX+i.circularPathData.leftLargeArcRadius+i.circularPathData.leftNodeBuffer,i.circularPathData.rightFullExtent=i.circularPathData.targetX-i.circularPathData.rightLargeArcRadius-i.circularPathData.rightNodeBuffer}if(i.circular)i.path=function(r){return"top"==r.circularLinkType?"M"+r.circularPathData.sourceX+" "+r.circularPathData.sourceY+" L"+r.circularPathData.leftInnerExtent+" "+r.circularPathData.sourceY+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftSmallArcRadius+" 0 0 0 "+r.circularPathData.leftFullExtent+" "+(r.circularPathData.sourceY-r.circularPathData.leftSmallArcRadius)+" L"+r.circularPathData.leftFullExtent+" "+r.circularPathData.verticalLeftInnerExtent+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftLargeArcRadius+" 0 0 0 "+r.circularPathData.leftInnerExtent+" "+r.circularPathData.verticalFullExtent+" L"+r.circularPathData.rightInnerExtent+" "+r.circularPathData.verticalFullExtent+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightLargeArcRadius+" 0 0 0 "+r.circularPathData.rightFullExtent+" "+r.circularPathData.verticalRightInnerExtent+" L"+r.circularPathData.rightFullExtent+" "+(r.circularPathData.targetY-r.circularPathData.rightSmallArcRadius)+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightSmallArcRadius+" 0 0 0 "+r.circularPathData.rightInnerExtent+" "+r.circularPathData.targetY+" L"+r.circularPathData.targetX+" "+r.circularPathData.targetY:"M"+r.circularPathData.sourceX+" "+r.circularPathData.sourceY+" L"+r.circularPathData.leftInnerExtent+" "+r.circularPathData.sourceY+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftSmallArcRadius+" 0 0 1 "+r.circularPathData.leftFullExtent+" "+(r.circularPathData.sourceY+r.circularPathData.leftSmallArcRadius)+" L"+r.circularPathData.leftFullExtent+" "+r.circularPathData.verticalLeftInnerExtent+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftLargeArcRadius+" 0 0 1 "+r.circularPathData.leftInnerExtent+" "+r.circularPathData.verticalFullExtent+" L"+r.circularPathData.rightInnerExtent+" "+r.circularPathData.verticalFullExtent+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightLargeArcRadius+" 0 0 1 "+r.circularPathData.rightFullExtent+" "+r.circularPathData.verticalRightInnerExtent+" L"+r.circularPathData.rightFullExtent+" "+(r.circularPathData.targetY+r.circularPathData.rightSmallArcRadius)+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightSmallArcRadius+" 0 0 1 "+r.circularPathData.rightInnerExtent+" "+r.circularPathData.targetY+" L"+r.circularPathData.targetX+" "+r.circularPathData.targetY}(i);else{var l=(0,t.ak)().source((function(r){return[r.source.x0+(r.source.x1-r.source.x0),r.y0]})).target((function(r){return[r.target.x0,r.y1]}));i.path=l(i)}}))}function T(r,e){return L(r)==L(e)?"bottom"==r.circularLinkType?J(r,e):D(r,e):L(e)-L(r)}function D(r,e){return r.y0-e.y0}function J(r,e){return e.y0-r.y0}function U(r,e){return r.y1-e.y1}function H(r,e){return e.y1-r.y1}function L(r){return r.target.column-r.source.column}function O(r){return r.target.x0-r.source.x1}function K(r,e){var n=z(r),i=O(e)/Math.tan(n);return"up"==X(r)?r.y1+i:r.y1-i}function V(r,e){var n=z(r),i=O(e)/Math.tan(n);return"up"==X(r)?r.y1-i:r.y1+i}function j(r,e,n,i){r.links.forEach((function(a){if(!a.circular&&a.target.column-a.source.column>1){var t=a.source.column+1,o=a.target.column-1,c=1,u=o-t+1;for(c=1;t<=o;t++,c++)r.nodes.forEach((function(o){if(o.column==t){var d,s=c/(u+1),l=Math.pow(1-s,3),m=3*s*Math.pow(1-s,2),p=3*Math.pow(s,2)*(1-s),I=Math.pow(s,3),y=l*a.y0+m*a.y0+p*a.y1+I*a.y1,f=y-a.width/2,g=y+a.width/2;f>o.y0&&ft.y0&&a.y0t.y0&&a.y1t.y1)&&W(r,d,e,n)}))):(g>o.y0&&go.y1)&&(d=g-o.y0+10,o=W(o,d,e,n),r.nodes.forEach((function(r){A(r,i)!=A(o,i)&&r.column==o.column&&r.y0o.y1&&W(r,d,e,n)})))}}))}}))}function W(r,e,n,i){return r.y0+e>=n&&r.y1+e<=i&&(r.y0=r.y0+e,r.y1=r.y1+e,r.targetLinks.forEach((function(r){r.y1=r.y1+e})),r.sourceLinks.forEach((function(r){r.y0=r.y0+e}))),r}function Z(r,e,n,i){r.nodes.forEach((function(a){i&&a.y+(a.y1-a.y0)>e&&(a.y=a.y-(a.y+(a.y1-a.y0)-e));var t=r.links.filter((function(r){return A(r.source,n)==A(a,n)})),o=t.length;o>1&&t.sort((function(r,e){if(!r.circular&&!e.circular){if(r.target.column==e.target.column)return r.y1-e.y1;if(!Y(r,e))return r.y1-e.y1;if(r.target.column>e.target.column){var n=V(e,r);return r.y1-n}if(e.target.column>r.target.column)return V(r,e)-e.y1}return r.circular&&!e.circular?"top"==r.circularLinkType?-1:1:e.circular&&!r.circular?"top"==e.circularLinkType?1:-1:r.circular&&e.circular?r.circularLinkType===e.circularLinkType&&"top"==r.circularLinkType?r.target.column===e.target.column?r.target.y1-e.target.y1:e.target.column-r.target.column:r.circularLinkType===e.circularLinkType&&"bottom"==r.circularLinkType?r.target.column===e.target.column?e.target.y1-r.target.y1:r.target.column-e.target.column:"top"==r.circularLinkType?-1:1:void 0}));var c=a.y0;t.forEach((function(r){r.y0=c+r.width/2,c+=r.width})),t.forEach((function(r,e){if("bottom"==r.circularLinkType){for(var n=e+1,i=0;n1&&i.sort((function(r,e){if(!r.circular&&!e.circular){if(r.source.column==e.source.column)return r.y0-e.y0;if(!Y(r,e))return r.y0-e.y0;if(e.source.column0?"up":"down"}function Q(r,e){return A(r.source,e)==A(r.target,e)}},26800:function(r,e,n){"use strict";n.r(e),n.d(e,{sankey:function(){return P},sankeyCenter:function(){return d},sankeyJustify:function(){return u},sankeyLeft:function(){return o},sankeyLinkHorizontal:function(){return A},sankeyRight:function(){return c}});var i=n(84706),a=n(34712);function t(r){return r.target.depth}function o(r){return r.depth}function c(r,e){return e-1-r.height}function u(r,e){return r.sourceLinks.length?r.depth:e-1}function d(r){return r.targetLinks.length?r.depth:r.sourceLinks.length?(0,i.SY)(r.sourceLinks,t)-1:0}function s(r){return function(){return r}}function l(r,e){return p(r.source,e.source)||r.index-e.index}function m(r,e){return p(r.target,e.target)||r.index-e.index}function p(r,e){return r.y0-e.y0}function I(r){return r.value}function y(r){return(r.y0+r.y1)/2}function f(r){return y(r.source)*r.value}function g(r){return y(r.target)*r.value}function _(r){return r.index}function h(r){return r.nodes}function v(r){return r.links}function x(r,e){var n=r.get(e);if(!n)throw new Error("missing: "+e);return n}function P(){var r=0,e=0,n=1,t=1,o=24,c=8,d=_,P=u,G=h,C=v,S=32,A=2/3;function b(){var u={nodes:G.apply(null,arguments),links:C.apply(null,arguments)};return function(r){r.nodes.forEach((function(r,e){r.index=e,r.sourceLinks=[],r.targetLinks=[]}));var e=(0,a.kH)(r.nodes,d);r.links.forEach((function(r,n){r.index=n;var i=r.source,a=r.target;"object"!==typeof i&&(i=r.source=x(e,i)),"object"!==typeof a&&(a=r.target=x(e,a)),i.sourceLinks.push(r),a.targetLinks.push(r)}))}(u),function(r){r.nodes.forEach((function(r){r.value=Math.max((0,i.oh)(r.sourceLinks,I),(0,i.oh)(r.targetLinks,I))}))}(u),function(e){var i,a,t;for(i=e.nodes,a=[],t=0;i.length;++t,i=a,a=[])i.forEach((function(r){r.depth=t,r.sourceLinks.forEach((function(r){a.indexOf(r.target)<0&&a.push(r.target)}))}));for(i=e.nodes,a=[],t=0;i.length;++t,i=a,a=[])i.forEach((function(r){r.height=t,r.targetLinks.forEach((function(r){a.indexOf(r.source)<0&&a.push(r.source)}))}));var c=(n-r-o)/(t-1);e.nodes.forEach((function(e){e.x1=(e.x0=r+Math.max(0,Math.min(t-1,Math.floor(P.call(null,e,t))))*c)+o}))}(u),function(r){var n=(0,a.UJ)().key((function(r){return r.x0})).sortKeys(i.XE).entries(r.nodes).map((function(r){return r.values}));d(),m();for(var o=1,u=S;u>0;--u)l(o*=.99),m(),s(o),m();function d(){var a=(0,i.kv)(n,(function(r){return r.length})),o=A*(t-e)/(a-1);c>o&&(c=o);var u=(0,i.SY)(n,(function(r){return(t-e-(r.length-1)*c)/(0,i.oh)(r,I)}));n.forEach((function(r){r.forEach((function(r,e){r.y1=(r.y0=e)+r.value*u}))})),r.links.forEach((function(r){r.width=r.value*u}))}function s(r){n.forEach((function(e){e.forEach((function(e){if(e.targetLinks.length){var n=((0,i.oh)(e.targetLinks,f)/(0,i.oh)(e.targetLinks,I)-y(e))*r;e.y0+=n,e.y1+=n}}))}))}function l(r){n.slice().reverse().forEach((function(e){e.forEach((function(e){if(e.sourceLinks.length){var n=((0,i.oh)(e.sourceLinks,g)/(0,i.oh)(e.sourceLinks,I)-y(e))*r;e.y0+=n,e.y1+=n}}))}))}function m(){n.forEach((function(r){var n,i,a,o=e,u=r.length;for(r.sort(p),a=0;a0&&(n.y0+=i,n.y1+=i),o=n.y1+c;if((i=o-c-t)>0)for(o=n.y0-=i,n.y1-=i,a=u-2;a>=0;--a)(i=(n=r[a]).y1+c-o)>0&&(n.y0-=i,n.y1-=i),o=n.y0}))}}(u),M(u),u}function M(r){r.nodes.forEach((function(r){r.sourceLinks.sort(m),r.targetLinks.sort(l)})),r.nodes.forEach((function(r){var e=r.y0,n=e;r.sourceLinks.forEach((function(r){r.y0=e+r.width/2,e+=r.width})),r.targetLinks.forEach((function(r){r.y1=n+r.width/2,n+=r.width}))}))}return b.update=function(r){return M(r),r},b.nodeId=function(r){return arguments.length?(d="function"===typeof r?r:s(r),b):d},b.nodeAlign=function(r){return arguments.length?(P="function"===typeof r?r:s(r),b):P},b.nodeWidth=function(r){return arguments.length?(o=+r,b):o},b.nodePadding=function(r){return arguments.length?(c=+r,b):c},b.nodes=function(r){return arguments.length?(G="function"===typeof r?r:s(r),b):G},b.links=function(r){return arguments.length?(C="function"===typeof r?r:s(r),b):C},b.size=function(i){return arguments.length?(r=e=0,n=+i[0],t=+i[1],b):[n-r,t-e]},b.extent=function(i){return arguments.length?(r=+i[0][0],n=+i[1][0],e=+i[0][1],t=+i[1][1],b):[[r,e],[n,t]]},b.iterations=function(r){return arguments.length?(S=+r,b):S},b}var G=n(10132);function C(r){return[r.source.x1,r.y0]}function S(r){return[r.target.x0,r.y1]}function A(){return(0,G.ak)().source(C).target(S)}},33428:function(r,e,n){var i,a;(function(){var t={version:"3.8.2"},o=[].slice,c=function(r){return o.call(r)},u=self.document;function d(r){return r&&(r.ownerDocument||r.document||r).documentElement}function s(r){return r&&(r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView)}if(u)try{c(u.documentElement.childNodes)[0].nodeType}catch(gt){c=function(r){for(var e=r.length,n=new Array(e);e--;)n[e]=r[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),u)try{u.createElement("DIV").style.setProperty("opacity",0,"")}catch(_t){var l=this.Element.prototype,m=l.setAttribute,p=l.setAttributeNS,I=this.CSSStyleDeclaration.prototype,y=I.setProperty;l.setAttribute=function(r,e){m.call(this,r,e+"")},l.setAttributeNS=function(r,e,n){p.call(this,r,e,n+"")},I.setProperty=function(r,e,n){y.call(this,r,e+"",n)}}function f(r,e){return re?1:r>=e?0:NaN}function g(r){return null===r?NaN:+r}function _(r){return!isNaN(r)}function h(r){return{left:function(e,n,i,a){for(arguments.length<3&&(i=0),arguments.length<4&&(a=e.length);i>>1;r(e[t],n)<0?i=t+1:a=t}return i},right:function(e,n,i,a){for(arguments.length<3&&(i=0),arguments.length<4&&(a=e.length);i>>1;r(e[t],n)>0?a=t:i=t+1}return i}}}t.ascending=f,t.descending=function(r,e){return er?1:e>=r?0:NaN},t.min=function(r,e){var n,i,a=-1,t=r.length;if(1===arguments.length){for(;++a=i){n=i;break}for(;++ai&&(n=i)}else{for(;++a=i){n=i;break}for(;++ai&&(n=i)}return n},t.max=function(r,e){var n,i,a=-1,t=r.length;if(1===arguments.length){for(;++a=i){n=i;break}for(;++an&&(n=i)}else{for(;++a=i){n=i;break}for(;++an&&(n=i)}return n},t.extent=function(r,e){var n,i,a,t=-1,o=r.length;if(1===arguments.length){for(;++t=i){n=a=i;break}for(;++ti&&(n=i),a=i){n=a=i;break}for(;++ti&&(n=i),a1)return o/(u-1)},t.deviation=function(){var r=t.variance.apply(this,arguments);return r?Math.sqrt(r):r};var v=h(f);function x(r){return r.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(r){return h(1===r.length?function(e,n){return f(r(e),n)}:r)},t.shuffle=function(r,e,n){(t=arguments.length)<3&&(n=r.length,t<2&&(e=0));for(var i,a,t=n-e;t;)a=Math.random()*t--|0,i=r[t+e],r[t+e]=r[a+e],r[a+e]=i;return r},t.permute=function(r,e){for(var n=e.length,i=new Array(n);n--;)i[n]=r[e[n]];return i},t.pairs=function(r){for(var e=0,n=r.length-1,i=r[0],a=new Array(n<0?0:n);e=0;)for(e=(i=r[a]).length;--e>=0;)n[--o]=i[e];return n};var P=Math.abs;function G(r,e){for(var n in e)Object.defineProperty(r.prototype,n,{value:e[n],enumerable:!1})}function C(){this._=Object.create(null)}t.range=function(r,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=r,r=0)),(e-r)/n===1/0)throw new Error("infinite range");var i,a=[],t=function(r){for(var e=1;r*e%1;)e*=10;return e}(P(n)),o=-1;if(r*=t,e*=t,(n*=t)<0)for(;(i=r+n*++o)>e;)a.push(i/t);else for(;(i=r+n*++o)=i.length)return e?e.call(n,t):r?t.sort(r):t;for(var u,d,s,l,m=-1,p=t.length,I=i[c++],y=new C;++m=i.length)return r;var n=[],t=a[e++];return r.forEach((function(r,i){n.push({key:r,values:c(i,e)})})),t?n.sort((function(r,e){return t(r.key,e.key)})):n}return n.map=function(r,e){return o(e,r,0)},n.entries=function(r){return c(o(t.map,r,0),0)},n.key=function(r){return i.push(r),n},n.sortKeys=function(r){return a[i.length-1]=r,n},n.sortValues=function(e){return r=e,n},n.rollup=function(r){return e=r,n},n},t.set=function(r){var e=new R;if(r)for(var n=0,i=r.length;n=0&&(i=r.slice(n+1),r=r.slice(0,n)),r)return arguments.length<2?this[r].on(i):this[r].on(i,e);if(2===arguments.length){if(null==e)for(r in this)this.hasOwnProperty(r)&&this[r].on(i,null);return this}},t.event=null,t.requote=function(r){return r.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,j={}.__proto__?function(r,e){r.__proto__=e}:function(r,e){for(var n in e)r[n]=e[n]};function W(r){return j(r,X),r}var Z=function(r,e){return e.querySelector(r)},q=function(r,e){return e.querySelectorAll(r)},Y=function(r,e){var n=r.matches||r[T(r,"matchesSelector")];return Y=function(r,e){return n.call(r,e)},Y(r,e)};"function"===typeof Sizzle&&(Z=function(r,e){return Sizzle(r,e)[0]||null},q=Sizzle,Y=Sizzle.matchesSelector),t.selection=function(){return t.select(u.documentElement)};var X=t.selection.prototype=[];function Q(r){return"function"===typeof r?r:function(){return Z(r,this)}}function $(r){return"function"===typeof r?r:function(){return q(r,this)}}X.select=function(r){var e,n,i,a,t=[];r=Q(r);for(var o=-1,c=this.length;++o=0&&"xmlns"!==(n=r.slice(0,e))&&(r=r.slice(e+1)),er.hasOwnProperty(n)?{space:er[n],local:r}:r}},X.attr=function(r,e){if(arguments.length<2){if("string"===typeof r){var n=this.node();return(r=t.ns.qualify(r)).local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}for(e in r)this.each(nr(e,r[e]));return this}return this.each(nr(r,e))},X.classed=function(r,e){if(arguments.length<2){if("string"===typeof r){var n=this.node(),i=(r=tr(r)).length,a=-1;if(e=n.classList){for(;++a=0;)(n=i[a])&&(t&&t!==n.nextSibling&&t.parentNode.insertBefore(n,t),t=n);return this},X.sort=function(r){r=Ir.apply(this,arguments);for(var e=-1,n=this.length;++e0&&(r=r.slice(0,a));var u=hr.get(r);function d(){var e=this[i];e&&(this.removeEventListener(r,e,e.$),delete this[i])}return u&&(r=u,o=xr),a?e?function(){var a=o(e,c(arguments));d.call(this),this.addEventListener(r,this[i]=a,a.$=n),a._=e}:d:e?J:function(){var e,n=new RegExp("^__on([^.]+)"+t.requote(r)+"$");for(var i in this)if(e=i.match(n)){var a=this[i];this.removeEventListener(e[1],a,a.$),delete this[i]}}}t.selection.enter=fr,t.selection.enter.prototype=gr,gr.append=X.append,gr.empty=X.empty,gr.node=X.node,gr.call=X.call,gr.size=X.size,gr.select=function(r){for(var e,n,i,a,t,o=[],c=-1,u=this.length;++c=e&&(e=a+1);!(o=c[e])&&++e1?wr:r<-1?-wr:Math.asin(r)}function Tr(r){return((r=Math.exp(r))+1/r)/2}var Dr=Math.SQRT2;t.interpolateZoom=function(r,e){var n,i,a=r[0],t=r[1],o=r[2],c=e[0],u=e[1],d=e[2],s=c-a,l=u-t,m=s*s+l*l;if(m0&&(r=r.transition().duration(y)),r.call(P.event)}function b(){c&&c.domain(o.range().map((function(r){return(r-m.x)/m.k})).map(o.invert)),l&&l.domain(d.range().map((function(r){return(r-m.y)/m.k})).map(d.invert))}function M(r){f++||r({type:"zoomstart"})}function B(r){b(),r({type:"zoom",scale:m.k,translate:[m.x,m.y]})}function k(r){--f||(r({type:"zoomend"}),e=null)}function F(){var r=this,e=x.of(r,arguments),n=0,i=t.select(s(r)).on(_,(function(){n=1,S(t.mouse(r),a),B(e)})).on(h,(function(){i.on(_,null).on(h,null),o(n),k(e)})),a=G(t.mouse(r)),o=Cr(r);Qa.call(r),M(e)}function z(){var r,e=this,n=x.of(e,arguments),i={},o=0,c=".zoom-"+t.event.changedTouches[0].identifier,u="touchmove"+c,d="touchend"+c,s=[],l=t.select(e),p=Cr(e);function I(){var n=t.touches(e);return r=m.k,n.forEach((function(r){r.identifier in i&&(i[r.identifier]=G(r))})),n}function y(){var r=t.event.target;t.select(r).on(u,f).on(d,_),s.push(r);for(var n=t.event.changedTouches,c=0,l=n.length;c1){g=p[0];var h=p[1],v=g[0]-h[0],x=g[1]-h[1];o=v*v+x*x}}function f(){var c,u,d,s,l=t.touches(e);Qa.call(e);for(var m=0,p=l.length;m360?r-=360:r<0&&(r+=360),r<60?i+(a-i)*r/60:r<180?a:r<240?i+(a-i)*(240-r)/60:i}(r))}return r=isNaN(r)?0:(r%=360)<0?r+360:r,e=isNaN(e)||e<0?0:e>1?1:e,i=2*(n=n<0?0:n>1?1:n)-(a=n<=.5?n*(1+e):n+e-n*e),new oe(t(r+120),t(r),t(r-120))}function jr(r,e,n){return this instanceof jr?(this.h=+r,this.c=+e,void(this.l=+n)):arguments.length<2?r instanceof jr?new jr(r.h,r.c,r.l):ne(r instanceof qr?r.l:(r=pe((r=t.rgb(r)).r,r.g,r.b)).l,r.a,r.b):new jr(r,e,n)}Kr.brighter=function(r){return r=Math.pow(.7,arguments.length?r:1),new Or(this.h,this.s,this.l/r)},Kr.darker=function(r){return r=Math.pow(.7,arguments.length?r:1),new Or(this.h,this.s,r*this.l)},Kr.rgb=function(){return Vr(this.h,this.s,this.l)},t.hcl=jr;var Wr=jr.prototype=new Lr;function Zr(r,e,n){return isNaN(r)&&(r=0),isNaN(e)&&(e=0),new qr(n,Math.cos(r*=Rr)*e,Math.sin(r)*e)}function qr(r,e,n){return this instanceof qr?(this.l=+r,this.a=+e,void(this.b=+n)):arguments.length<2?r instanceof qr?new qr(r.l,r.a,r.b):r instanceof jr?Zr(r.h,r.c,r.l):pe((r=oe(r)).r,r.g,r.b):new qr(r,e,n)}Wr.brighter=function(r){return new jr(this.h,this.c,Math.min(100,this.l+Yr*(arguments.length?r:1)))},Wr.darker=function(r){return new jr(this.h,this.c,Math.max(0,this.l-Yr*(arguments.length?r:1)))},Wr.rgb=function(){return Zr(this.h,this.c,this.l).rgb()},t.lab=qr;var Yr=18,Xr=.95047,Qr=1,$r=1.08883,re=qr.prototype=new Lr;function ee(r,e,n){var i=(r+16)/116,a=i+e/500,t=i-n/200;return new oe(te(3.2404542*(a=ie(a)*Xr)-1.5371385*(i=ie(i)*Qr)-.4985314*(t=ie(t)*$r)),te(-.969266*a+1.8760108*i+.041556*t),te(.0556434*a-.2040259*i+1.0572252*t))}function ne(r,e,n){return r>0?new jr(Math.atan2(n,e)*Er,Math.sqrt(e*e+n*n),r):new jr(NaN,NaN,r)}function ie(r){return r>.206893034?r*r*r:(r-4/29)/7.787037}function ae(r){return r>.008856?Math.pow(r,1/3):7.787037*r+4/29}function te(r){return Math.round(255*(r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055))}function oe(r,e,n){return this instanceof oe?(this.r=~~r,this.g=~~e,void(this.b=~~n)):arguments.length<2?r instanceof oe?new oe(r.r,r.g,r.b):le(""+r,oe,Vr):new oe(r,e,n)}function ce(r){return new oe(r>>16,r>>8&255,255&r)}function ue(r){return ce(r)+""}re.brighter=function(r){return new qr(Math.min(100,this.l+Yr*(arguments.length?r:1)),this.a,this.b)},re.darker=function(r){return new qr(Math.max(0,this.l-Yr*(arguments.length?r:1)),this.a,this.b)},re.rgb=function(){return ee(this.l,this.a,this.b)},t.rgb=oe;var de=oe.prototype=new Lr;function se(r){return r<16?"0"+Math.max(0,r).toString(16):Math.min(255,r).toString(16)}function le(r,e,n){var i,a,t,o=0,c=0,u=0;if(i=/([a-z]+)\((.*)\)/.exec(r=r.toLowerCase()))switch(a=i[2].split(","),i[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(ye(a[0]),ye(a[1]),ye(a[2]))}return(t=fe.get(r))?e(t.r,t.g,t.b):(null==r||"#"!==r.charAt(0)||isNaN(t=parseInt(r.slice(1),16))||(4===r.length?(o=(3840&t)>>4,o|=o>>4,c=240&t,c|=c>>4,u=15&t,u|=u<<4):7===r.length&&(o=(16711680&t)>>16,c=(65280&t)>>8,u=255&t)),e(o,c,u))}function me(r,e,n){var i,a,t=Math.min(r/=255,e/=255,n/=255),o=Math.max(r,e,n),c=o-t,u=(o+t)/2;return c?(a=u<.5?c/(o+t):c/(2-o-t),i=r==o?(e-n)/c+(e0&&u<1?0:i),new Or(i,a,u)}function pe(r,e,n){var i=ae((.4124564*(r=Ie(r))+.3575761*(e=Ie(e))+.1804375*(n=Ie(n)))/Xr),a=ae((.2126729*r+.7151522*e+.072175*n)/Qr);return qr(116*a-16,500*(i-a),200*(a-ae((.0193339*r+.119192*e+.9503041*n)/$r)))}function Ie(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function ye(r){var e=parseFloat(r);return"%"===r.charAt(r.length-1)?Math.round(2.55*e):e}de.brighter=function(r){r=Math.pow(.7,arguments.length?r:1);var e=this.r,n=this.g,i=this.b,a=30;return e||n||i?(e&&e=200&&e<300||304===e){try{r=n.call(a,d)}catch(gt){return void o.error.call(a,gt)}o.load.call(a,r)}else o.error.call(a,d)}return self.XDomainRequest&&!("withCredentials"in d)&&/^(http(s)?:)?\/\//.test(r)&&(d=new XDomainRequest),"onload"in d?d.onload=d.onerror=l:d.onreadystatechange=function(){d.readyState>3&&l()},d.onprogress=function(r){var e=t.event;t.event=r;try{o.progress.call(a,d)}finally{t.event=e}},a.header=function(r,e){return r=(r+"").toLowerCase(),arguments.length<2?u[r]:(null==e?delete u[r]:u[r]=e+"",a)},a.mimeType=function(r){return arguments.length?(e=null==r?null:r+"",a):e},a.responseType=function(r){return arguments.length?(s=r,a):s},a.response=function(r){return n=r,a},["get","post"].forEach((function(r){a[r]=function(){return a.send.apply(a,[r].concat(c(arguments)))}})),a.send=function(n,i,t){if(2===arguments.length&&"function"===typeof i&&(t=i,i=null),d.open(n,r,!0),null==e||"accept"in u||(u.accept=e+",*/*"),d.setRequestHeader)for(var c in u)d.setRequestHeader(c,u[c]);return null!=e&&d.overrideMimeType&&d.overrideMimeType(e),null!=s&&(d.responseType=s),null!=t&&a.on("error",t).on("load",(function(r){t(null,r)})),o.beforesend.call(a,d),d.send(null==i?null:i),a},a.abort=function(){return d.abort(),a},t.rebind(a,o,"on"),null==i?a:a.get(function(r){return 1===r.length?function(e,n){r(null==e?n:null)}:r}(i))}fe.forEach((function(r,e){fe.set(r,ce(e))})),t.functor=ge,t.xhr=_e(E),t.dsv=function(r,e){var n=new RegExp('["'+r+"\n]"),i=r.charCodeAt(0);function a(r,n,i){arguments.length<3&&(i=n,n=null);var a=he(r,e,null==n?t:o(n),i);return a.row=function(r){return arguments.length?a.response(null==(n=r)?t:o(r)):n},a}function t(r){return a.parse(r.responseText)}function o(r){return function(e){return a.parse(e.responseText,r)}}function c(e){return e.map(u).join(r)}function u(r){return n.test(r)?'"'+r.replace(/\"/g,'""')+'"':r}return a.parse=function(r,e){var n;return a.parseRows(r,(function(r,i){if(n)return n(r,i-1);var a=function(e){for(var n={},i=r.length,a=0;a=u)return o;if(a)return a=!1,t;var e=d;if(34===r.charCodeAt(e)){for(var n=e;n++24?(isFinite(e)&&(clearTimeout(Ge),Ge=setTimeout(Ae,e)),Pe=0):(Pe=1,Ce(Ae))}function be(){for(var r=Date.now(),e=ve;e;)r>=e.t&&e.c(r-e.t)&&(e.c=null),e=e.n;return r}function Me(){for(var r,e=ve,n=1/0;e;)e.c?(e.t1&&(e=r[t[o-2]],n=r[t[o-1]],i=r[c],(n[0]-e[0])*(i[1]-e[1])-(n[1]-e[1])*(i[0]-e[0])<=0);)--o;t[o++]=c}return t.slice(0,o)}function ze(r,e){return r[0]-e[0]||r[1]-e[1]}t.timer=function(){Se.apply(this,arguments)},t.timer.flush=function(){be(),Me()},t.round=function(r,e){return e?Math.round(r*(e=Math.pow(10,e)))/e:Math.round(r)},t.geom={},t.geom.hull=function(r){var e=Be,n=ke;if(arguments.length)return i(r);function i(r){if(r.length<3)return[];var i,a=ge(e),t=ge(n),o=r.length,c=[],u=[];for(i=0;i=0;--i)p.push(r[c[d[i]][2]]);for(i=+l;iMr)c=c.L;else{if(!((a=t-Ye(c,o))>Mr)){i>-Mr?(e=c.P,n=c):a>-Mr?(e=c,n=c.N):e=n=c;break}if(!c.R){e=c;break}c=c.R}var u=Ve(r);if(Je.insert(e,u),e||n){if(e===n)return en(e),n=Ve(e.site),Je.insert(u,n),u.edge=n.edge=tn(e.site,u.site),rn(e),void rn(n);if(n){en(e),en(n);var d=e.site,s=d.x,l=d.y,m=r.x-s,p=r.y-l,I=n.site,y=I.x-s,f=I.y-l,g=2*(m*f-p*y),_=m*m+p*p,h=y*y+f*f,v={x:(f*_-p*h)/g+s,y:(m*h-y*_)/g+l};cn(n.edge,d,I,v),u.edge=tn(d,r,null,v),n.edge=tn(r,I,null,v),rn(e),rn(n)}else u.edge=tn(e.site,u.site)}}function qe(r,e){var n=r.site,i=n.x,a=n.y,t=a-e;if(!t)return i;var o=r.P;if(!o)return-1/0;var c=(n=o.site).x,u=n.y,d=u-e;if(!d)return c;var s=c-i,l=1/t-1/d,m=s/d;return l?(-m+Math.sqrt(m*m-2*l*(s*s/(-2*d)-u+d/2+a-t/2)))/l+i:(i+c)/2}function Ye(r,e){var n=r.N;if(n)return qe(n,e);var i=r.site;return i.y===e?i.x:1/0}function Xe(r){this.site=r,this.edges=[]}function Qe(r,e){return e.angle-r.angle}function $e(){sn(this),this.x=this.y=this.arc=this.site=this.cy=null}function rn(r){var e=r.P,n=r.N;if(e&&n){var i=e.site,a=r.site,t=n.site;if(i!==t){var o=a.x,c=a.y,u=i.x-o,d=i.y-c,s=t.x-o,l=2*(u*(f=t.y-c)-d*s);if(!(l>=-Br)){var m=u*u+d*d,p=s*s+f*f,I=(f*m-d*p)/l,y=(u*p-s*m)/l,f=y+c,g=Oe.pop()||new $e;g.arc=r,g.site=a,g.x=I+o,g.y=f+Math.sqrt(I*I+y*y),g.cy=f,r.circle=g;for(var _=null,h=He._;h;)if(g.y=c)return;if(m>I){if(t){if(t.y>=d)return}else t={x:f,y:u};n={x:f,y:d}}else{if(t){if(t.y1)if(m>I){if(t){if(t.y>=d)return}else t={x:(u-a)/i,y:u};n={x:(d-a)/i,y:d}}else{if(t){if(t.y=c)return}else t={x:o,y:i*o+a};n={x:c,y:i*c+a}}else{if(t){if(t.x0)){if(e/=m,m<0){if(e0){if(e>l)return;e>s&&(s=e)}if(e=a-u,m||!(e<0)){if(e/=m,m<0){if(e>l)return;e>s&&(s=e)}else if(m>0){if(e0)){if(e/=p,p<0){if(e0){if(e>l)return;e>s&&(s=e)}if(e=t-d,p||!(e<0)){if(e/=p,p<0){if(e>l)return;e>s&&(s=e)}else if(p>0){if(e0&&(r.a={x:u+s*m,y:d+s*p}),l<1&&(r.b={x:u+l*m,y:d+l*p}),r}}}}}),u=o.length;u--;)(!nn(e=o[u],r)||!c(e)||P(e.a.x-e.b.x)Mr||P(a-n)>Mr)&&(c.splice(o,0,new un(on(t.site,s,P(i-l)Mr?{x:l,y:P(e-l)Mr?{x:P(n-I)Mr?{x:m,y:P(e-m)Mr?{x:P(n-p)=n&&d.x<=a&&d.y>=i&&d.y<=o?[[n,o],[a,o],[a,i],[n,i]]:[]).point=r[c]})),e}function c(r){return r.map((function(r,e){return{x:Math.round(i(r,e)/Mr)*Mr,y:Math.round(a(r,e)/Mr)*Mr,i:e}}))}return o.links=function(r){return In(c(r)).edges.filter((function(r){return r.l&&r.r})).map((function(e){return{source:r[e.l.i],target:r[e.r.i]}}))},o.triangles=function(r){var e=[];return In(c(r)).cells.forEach((function(n,i){for(var a,t,o,c,u=n.site,d=n.edges.sort(Qe),s=-1,l=d.length,m=d[l-1].edge,p=m.l===u?m.r:m.l;++st&&(a=e.slice(t,a),c[o]?c[o]+=a:c[++o]=a),(n=n[0])===(i=i[0])?c[o]?c[o]+=i:c[++o]=i:(c[++o]=null,u.push({i:o,x:Pn(n,i)})),t=Sn.lastIndex;return ty&&(y=u.x),u.y>f&&(f=u.y),d.push(u.x),s.push(u.y);else for(l=0;ly&&(y=h),v>f&&(f=v),d.push(h),s.push(v)}var x=y-p,G=f-I;function C(r,e,n,i,a,t,o,c){if(!isNaN(n)&&!isNaN(i))if(r.leaf){var u=r.x,d=r.y;if(null!=u)if(P(u-n)+P(d-i)<.01)S(r,e,n,i,a,t,o,c);else{var s=r.point;r.x=r.y=r.point=null,S(r,s,u,d,a,t,o,c),S(r,e,n,i,a,t,o,c)}else r.x=n,r.y=i,r.point=e}else S(r,e,n,i,a,t,o,c)}function S(r,e,n,i,a,t,o,c){var u=.5*(a+o),d=.5*(t+c),s=n>=u,l=i>=d,m=l<<1|s;r.leaf=!1,s?a=u:o=u,l?t=d:c=d,C(r=r.nodes[m]||(r.nodes[m]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,n,i,a,t,o,c)}x>G?f=I+x:y=p+G;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(r){C(A,r,+g(r,++l),+_(r,l),p,I,y,f)},visit:function(r){hn(r,A,p,I,y,f)},find:function(r){return function(r,e,n,i,a,t,o){var c,u=1/0;return function r(d,s,l,m,p){if(!(s>t||l>o||m=x)<<1|e>=v,G=P+4;P=0&&!(n=t.interpolators[i](r,e)););return n}function bn(r,e){var n,i=[],a=[],t=r.length,o=e.length,c=Math.min(r.length,e.length);for(n=0;n=1)return 1;var e=r*r,n=e*r;return 4*(r<.5?n:3*(r-e)+n-.75)}function Nn(r){return 1-Math.cos(r*wr)}function Tn(r){return Math.pow(2,10*(r-1))}function Dn(r){return 1-Math.sqrt(1-r*r)}function Jn(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375}function Un(r,e){return e-=r,function(n){return Math.round(r+e*n)}}function Hn(r){var e,n,i,a=[r.a,r.b],t=[r.c,r.d],o=On(a),c=Ln(a,t),u=On(((e=t)[0]+=(i=-c)*(n=a)[0],e[1]+=i*n[1],e))||0;a[0]*t[1]=0?r.slice(0,n):r,a=n>=0?r.slice(n+1):"in";return i=Bn.get(i)||Mn,a=kn.get(a)||E,e=a(i.apply(null,o.call(arguments,1))),function(r){return r<=0?0:r>=1?1:e(r)}},t.interpolateHcl=function(r,e){r=t.hcl(r),e=t.hcl(e);var n=r.h,i=r.c,a=r.l,o=e.h-n,c=e.c-i,u=e.l-a;return isNaN(c)&&(c=0,i=isNaN(i)?e.c:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(r){return Zr(n+o*r,i+c*r,a+u*r)+""}},t.interpolateHsl=function(r,e){r=t.hsl(r),e=t.hsl(e);var n=r.h,i=r.s,a=r.l,o=e.h-n,c=e.s-i,u=e.l-a;return isNaN(c)&&(c=0,i=isNaN(i)?e.s:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(r){return Vr(n+o*r,i+c*r,a+u*r)+""}},t.interpolateLab=function(r,e){r=t.lab(r),e=t.lab(e);var n=r.l,i=r.a,a=r.b,o=e.l-n,c=e.a-i,u=e.b-a;return function(r){return ee(n+o*r,i+c*r,a+u*r)+""}},t.interpolateRound=Un,t.transform=function(r){var e=u.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(r){if(null!=r){e.setAttribute("transform",r);var n=e.transform.baseVal.consolidate()}return new Hn(n?n.matrix:Kn)})(r)},Hn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Kn={a:1,b:0,c:0,d:1,e:0,f:0};function Vn(r){return r.length?r.pop()+",":""}function jn(r,e){var n=[],i=[];return r=t.transform(r),e=t.transform(e),function(r,e,n,i){if(r[0]!==e[0]||r[1]!==e[1]){var a=n.push("translate(",null,",",null,")");i.push({i:a-4,x:Pn(r[0],e[0])},{i:a-2,x:Pn(r[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(r.translate,e.translate,n,i),function(r,e,n,i){r!==e?(r-e>180?e+=360:e-r>180&&(r+=360),i.push({i:n.push(Vn(n)+"rotate(",null,")")-2,x:Pn(r,e)})):e&&n.push(Vn(n)+"rotate("+e+")")}(r.rotate,e.rotate,n,i),function(r,e,n,i){r!==e?i.push({i:n.push(Vn(n)+"skewX(",null,")")-2,x:Pn(r,e)}):e&&n.push(Vn(n)+"skewX("+e+")")}(r.skew,e.skew,n,i),function(r,e,n,i){if(r[0]!==e[0]||r[1]!==e[1]){var a=n.push(Vn(n)+"scale(",null,",",null,")");i.push({i:a-4,x:Pn(r[0],e[0])},{i:a-2,x:Pn(r[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(Vn(n)+"scale("+e+")")}(r.scale,e.scale,n,i),r=e=null,function(r){for(var e,a=-1,t=i.length;++a0?n=e:(r.c=null,r.t=NaN,r=null,u.end({type:"end",alpha:n=0})):e>0&&(u.start({type:"start",alpha:n=e}),r=Se(c.tick)),c):n},c.start=function(){var r,e,n,t=g.length,u=_.length,s=d[0],I=d[1];for(r=0;r=0;)n.push(a[i])}function ci(r,e){for(var n=[r],i=[];null!=(r=n.pop());)if(i.push(r),(t=r.children)&&(a=t.length))for(var a,t,o=-1;++o=0;)o.push(s=d[u]),s.parent=t,s.depth=t.depth+1;n&&(t.value=0),t.children=d}else n&&(t.value=+n.call(i,t,t.depth)||0),delete t.children;return ci(a,(function(e){var i,a;r&&(i=e.children)&&i.sort(r),n&&(a=e.parent)&&(a.value+=e.value)})),c}return i.sort=function(e){return arguments.length?(r=e,i):r},i.children=function(r){return arguments.length?(e=r,i):e},i.value=function(r){return arguments.length?(n=r,i):n},i.revalue=function(r){return n&&(oi(r,(function(r){r.children&&(r.value=0)})),ci(r,(function(r){var e;r.children||(r.value=+n.call(i,r,r.depth)||0),(e=r.parent)&&(e.value+=r.value)}))),r},i},t.layout.partition=function(){var r=t.layout.hierarchy(),e=[1,1];function n(r,e,i,a){var t=r.children;if(r.x=e,r.y=r.depth*a,r.dx=i,r.dy=a,t&&(o=t.length)){var o,c,u,d=-1;for(i=r.value?i/r.value:0;++dc&&(c=i),o.push(i)}for(n=0;na&&(i=n,a=e);return i}function xi(r){return r.reduce(Pi,0)}function Pi(r,e){return r+e[1]}function Gi(r,e){return Ci(r,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ci(r,e){for(var n=-1,i=+r[0],a=(r[1]-i)/e,t=[];++n<=e;)t[n]=a*n+i;return t}function Si(r){return[t.min(r),t.max(r)]}function Ai(r,e){return r.value-e.value}function bi(r,e){var n=r._pack_next;r._pack_next=e,e._pack_prev=r,e._pack_next=n,n._pack_prev=e}function Mi(r,e){r._pack_next=e,e._pack_prev=r}function Bi(r,e){var n=e.x-r.x,i=e.y-r.y,a=r.r+e.r;return.999*a*a>n*n+i*i}function ki(r){if((e=r.children)&&(u=e.length)){var e,n,i,a,t,o,c,u,d=1/0,s=-1/0,l=1/0,m=-1/0;if(e.forEach(Fi),(n=e[0]).x=-n.r,n.y=0,h(n),u>1&&((i=e[1]).x=i.r,i.y=0,h(i),u>2))for(Ri(n,i,a=e[2]),h(a),bi(n,a),n._pack_prev=a,bi(a,i),i=n._pack_next,t=3;t0)for(o=-1;++o=l[0]&&u<=l[1]&&((c=d[t.bisect(m,u,1,I)-1]).y+=y,c.push(a[o]));return d}return a.value=function(r){return arguments.length?(e=r,a):e},a.range=function(r){return arguments.length?(n=ge(r),a):n},a.bins=function(r){return arguments.length?(i="number"===typeof r?function(e){return Ci(e,r)}:ge(r),a):i},a.frequency=function(e){return arguments.length?(r=!!e,a):r},a},t.layout.pack=function(){var r,e=t.layout.hierarchy().sort(Ai),n=0,i=[1,1];function a(a,t){var o=e.call(this,a,t),c=o[0],u=i[0],d=i[1],s=null==r?Math.sqrt:"function"===typeof r?r:function(){return r};if(c.x=c.y=0,ci(c,(function(r){r.r=+s(r.value)})),ci(c,ki),n){var l=n*(r?1:Math.max(2*c.r/u,2*c.r/d))/2;ci(c,(function(r){r.r+=l})),ci(c,ki),ci(c,(function(r){r.r-=l}))}return wi(c,u/2,d/2,r?1:1/Math.max(2*c.r/u,2*c.r/d)),o}return a.size=function(r){return arguments.length?(i=r,a):i},a.radius=function(e){return arguments.length?(r=null==e||"function"===typeof e?e:+e,a):r},a.padding=function(r){return arguments.length?(n=+r,a):n},ti(a,e)},t.layout.tree=function(){var r=t.layout.hierarchy().sort(null).value(null),e=Ei,n=[1,1],i=null;function a(a,t){var d=r.call(this,a,t),s=d[0],l=function(r){for(var e,n={A:null,children:[r]},i=[n];null!=(e=i.pop());)for(var a,t=e.children,o=0,c=t.length;op.x&&(p=r),r.depth>I.depth&&(I=r)}));var y=e(m,p)/2-m.x,f=n[0]/(p.x+e(p,m)/2+y),g=n[1]/(I.depth||1);oi(s,(function(r){r.x=(r.x+y)*f,r.y=r.depth*g}))}return d}function o(r){var n=r.children,i=r.parent.children,a=r.i?i[r.i-1]:null;if(n.length){!function(r){for(var e,n=0,i=0,a=r.children,t=a.length;--t>=0;)(e=a[t]).z+=n,e.m+=n,n+=e.s+(i+=e.c)}(r);var t=(n[0].z+n[n.length-1].z)/2;a?(r.z=a.z+e(r._,a._),r.m=r.z-t):r.z=t}else a&&(r.z=a.z+e(r._,a._));r.parent.A=function(r,n,i){if(n){for(var a,t=r,o=r,c=n,u=t.parent.children[0],d=t.m,s=o.m,l=c.m,m=u.m;c=Ti(c),t=Ni(t),c&&t;)u=Ni(u),(o=Ti(o)).a=r,(a=c.z+l-t.z-d+e(c._,t._))>0&&(Di(Ji(c,r,i),r,a),d+=a,s+=a),l+=c.m,d+=t.m,m+=u.m,s+=o.m;c&&!Ti(o)&&(o.t=c,o.m+=l-s),t&&!Ni(u)&&(u.t=t,u.m+=d-m,i=r)}return i}(r,a,r.parent.A||i[0])}function c(r){r._.x=r.z+r.parent.m,r.m+=r.parent.m}function u(r){r.x*=n[0],r.y=r.depth*n[1]}return a.separation=function(r){return arguments.length?(e=r,a):e},a.size=function(r){return arguments.length?(i=null==(n=r)?u:null,a):i?null:n},a.nodeSize=function(r){return arguments.length?(i=null==(n=r)?null:u,a):i?n:null},ti(a,r)},t.layout.cluster=function(){var r=t.layout.hierarchy().sort(null).value(null),e=Ei,n=[1,1],i=!1;function a(a,o){var c,u=r.call(this,a,o),d=u[0],s=0;ci(d,(function(r){var n=r.children;n&&n.length?(r.x=function(r){return r.reduce((function(r,e){return r+e.x}),0)/r.length}(n),r.y=function(r){return 1+t.max(r,(function(r){return r.y}))}(n)):(r.x=c?s+=e(r,c):0,r.y=0,c=r)}));var l=Ui(d),m=Hi(d),p=l.x-e(l,m)/2,I=m.x+e(m,l)/2;return ci(d,i?function(r){r.x=(r.x-d.x)*n[0],r.y=(d.y-r.y)*n[1]}:function(r){r.x=(r.x-p)/(I-p)*n[0],r.y=(1-(d.y?r.y/d.y:1))*n[1]}),u}return a.separation=function(r){return arguments.length?(e=r,a):e},a.size=function(r){return arguments.length?(i=null==(n=r),a):i?null:n},a.nodeSize=function(r){return arguments.length?(i=null!=(n=r),a):i?n:null},ti(a,r)},t.layout.treemap=function(){var r,e=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=Li,c=!1,u="squarify",d=.5*(1+Math.sqrt(5));function s(r,e){for(var n,i,a=-1,t=r.length;++a0;)c.push(n=d[a-1]),c.area+=n.area,"squarify"!==u||(i=p(c,y))<=m?(d.pop(),m=i):(c.area-=c.pop().area,I(c,y,t,!1),y=Math.min(t.dx,t.dy),c.length=c.area=0,m=1/0);c.length&&(I(c,y,t,!0),c.length=c.area=0),e.forEach(l)}}function m(r){var e=r.children;if(e&&e.length){var n,i=o(r),a=e.slice(),t=[];for(s(a,i.dx*i.dy/r.value),t.area=0;n=a.pop();)t.push(n),t.area+=n.area,null!=n.z&&(I(t,n.z?i.dx:i.dy,i,!a.length),t.length=t.area=0);e.forEach(m)}}function p(r,e){for(var n,i=r.area,a=0,t=1/0,o=-1,c=r.length;++oa&&(a=n));return e*=e,(i*=i)?Math.max(e*a*d/i,i/(e*t*d)):1/0}function I(r,e,i,a){var t,o=-1,c=r.length,u=i.x,d=i.y,s=e?n(r.area/e):0;if(e==i.dx){for((a||s>i.dy)&&(s=i.dy);++oi.dx)&&(s=i.dx);++o1);return r+e*n*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var r=t.random.normal.apply(t,arguments);return function(){return Math.exp(r())}},bates:function(r){var e=t.random.irwinHall(r);return function(){return e()/r}},irwinHall:function(r){return function(){for(var e=0,n=0;n2?Yi:ji,u=i?Zn:Wn;return a=o(r,e,u,n),t=o(e,r,u,An),c}function c(r){return a(r)}return c.invert=function(r){return t(r)},c.domain=function(e){return arguments.length?(r=e.map(Number),o()):r},c.range=function(r){return arguments.length?(e=r,o()):e},c.rangeRound=function(r){return c.range(r).interpolate(Un)},c.clamp=function(r){return arguments.length?(i=r,o()):i},c.interpolate=function(r){return arguments.length?(n=r,o()):n},c.ticks=function(e){return ea(r,e)},c.tickFormat=function(e,n){return d3_scale_linearTickFormat(r,e,n)},c.nice=function(e){return $i(r,e),o()},c.copy=function(){return Xi(r,e,n,i)},o()}function Qi(r,e){return t.rebind(r,e,"range","rangeRound","interpolate","clamp")}function $i(r,e){return Wi(r,Zi(ra(r,e)[2])),Wi(r,Zi(ra(r,e)[2])),r}function ra(r,e){null==e&&(e=10);var n=Ki(r),i=n[1]-n[0],a=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),t=e/i*a;return t<=.15?a*=10:t<=.35?a*=5:t<=.75&&(a*=2),n[0]=Math.ceil(n[0]/a)*a,n[1]=Math.floor(n[1]/a)*a+.5*a,n[2]=a,n}function ea(r,e){return t.range.apply(t,ra(r,e))}function na(r,e,n,i){function a(r){return(n?Math.log(r<0?0:r):-Math.log(r>0?0:-r))/Math.log(e)}function t(r){return n?Math.pow(e,r):-Math.pow(e,-r)}function o(e){return r(a(e))}return o.invert=function(e){return t(r.invert(e))},o.domain=function(e){return arguments.length?(n=e[0]>=0,r.domain((i=e.map(Number)).map(a)),o):i},o.base=function(n){return arguments.length?(e=+n,r.domain(i.map(a)),o):e},o.nice=function(){var e=Wi(i.map(a),n?Math:ia);return r.domain(e),i=e.map(t),o},o.ticks=function(){var r=Ki(i),o=[],c=r[0],u=r[1],d=Math.floor(a(c)),s=Math.ceil(a(u)),l=e%1?2:e;if(isFinite(s-d)){if(n){for(;d0;m--)o.push(t(d)*m);for(d=0;o[d]u;s--);o=o.slice(d,s)}return o},o.copy=function(){return na(r.copy(),e,n,i)},Qi(o,r)}t.scale.linear=function(){return Xi([0,1],[0,1],An,!1)},t.scale.log=function(){return na(t.scale.linear().domain([0,1]),10,!0,[1,10])};var ia={floor:function(r){return-Math.ceil(-r)},ceil:function(r){return-Math.floor(-r)}};function aa(r,e,n){var i=ta(e),a=ta(1/e);function t(e){return r(i(e))}return t.invert=function(e){return a(r.invert(e))},t.domain=function(e){return arguments.length?(r.domain((n=e.map(Number)).map(i)),t):n},t.ticks=function(r){return ea(n,r)},t.tickFormat=function(r,e){return d3_scale_linearTickFormat(n,r,e)},t.nice=function(r){return t.domain($i(n,r))},t.exponent=function(o){return arguments.length?(i=ta(e=o),a=ta(1/e),r.domain(n.map(i)),t):e},t.copy=function(){return aa(r.copy(),e,n)},Qi(t,r)}function ta(r){return function(e){return e<0?-Math.pow(-e,r):Math.pow(e,r)}}function oa(r,e){var n,i,a;function o(a){return i[((n.get(a)||("range"===e.t?n.set(a,r.push(a)):NaN))-1)%i.length]}function c(e,n){return t.range(r.length).map((function(r){return e+n*r}))}return o.domain=function(i){if(!arguments.length)return r;r=[],n=new C;for(var a,t=-1,c=i.length;++t0?n[i-1]:r[0],il?0:1;if(d=zr)return u(d,p)+(c?u(c,1-p):"")+"Z";var I,y,f,g,_,h,v,x,P,G,C,S,A=0,b=0,M=[];if((g=(+o.apply(this,arguments)||0)/2)&&(f=i===fa?Math.sqrt(c*c+d*d):+i.apply(this,arguments),p||(b*=-1),d&&(b=Nr(f/d*Math.sin(g))),c&&(A=Nr(f/c*Math.sin(g)))),d){_=d*Math.cos(s+b),h=d*Math.sin(s+b),v=d*Math.cos(l-b),x=d*Math.sin(l-b);var B=Math.abs(l-s-2*b)<=kr?0:1;if(b&&Pa(_,h,v,x)===p^B){var k=(s+l)/2;_=d*Math.cos(k),h=d*Math.sin(k),v=x=null}}else _=h=0;if(c){P=c*Math.cos(l-A),G=c*Math.sin(l-A),C=c*Math.cos(s+A),S=c*Math.sin(s+A);var F=Math.abs(s-l+2*A)<=kr?0:1;if(A&&Pa(P,G,C,S)===1-p^F){var z=(s+l)/2;P=c*Math.cos(z),G=c*Math.sin(z),C=S=null}}else P=G=0;if(m>Mr&&(I=Math.min(Math.abs(d-c)/2,+n.apply(this,arguments)))>.001){y=c0?0:1}function Ga(r,e,n,i,a){var t=r[0]-e[0],o=r[1]-e[1],c=(a?i:-i)/Math.sqrt(t*t+o*o),u=c*o,d=-c*t,s=r[0]+u,l=r[1]+d,m=e[0]+u,p=e[1]+d,I=(s+m)/2,y=(l+p)/2,f=m-s,g=p-l,_=f*f+g*g,h=n-i,v=s*p-m*l,x=(g<0?-1:1)*Math.sqrt(Math.max(0,h*h*_-v*v)),P=(v*g-f*x)/_,G=(-v*f-g*x)/_,C=(v*g+f*x)/_,S=(-v*f+g*x)/_,A=P-I,b=G-y,M=C-I,B=S-y;return A*A+b*b>M*M+B*B&&(P=C,G=S),[[P-u,G-d],[P*n/h,G*n/h]]}function Ca(){return!0}function Sa(r){var e=Be,n=ke,i=Ca,a=ba,t=a.key,o=.7;function c(t){var c,u=[],d=[],s=-1,l=t.length,m=ge(e),p=ge(n);function I(){u.push("M",a(r(d),o))}for(;++s1&&a.push("H",i[0]),a.join("")},"step-before":Ba,"step-after":ka,basis:wa,"basis-open":function(r){if(r.length<4)return ba(r);for(var e,n=[],i=-1,a=r.length,t=[0],o=[0];++i<3;)e=r[i],t.push(e[0]),o.push(e[1]);for(n.push(Ra(Ta,t)+","+Ra(Ta,o)),--i;++i9&&(a=3*e/Math.sqrt(a),o[c]=a*n,o[c+1]=a*i);for(c=-1;++c<=u;)a=(r[Math.min(u,c+1)][0]-r[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),t.push([a||0,o[c]*a||0]);return t}(r))}});function ba(r){return r.length>1?r.join("L"):r+"Z"}function Ma(r){return r.join("L")+"Z"}function Ba(r){for(var e=0,n=r.length,i=r[0],a=[i[0],",",i[1]];++e1){c=e[1],t=r[u],u++,i+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(t[0]-c[0])+","+(t[1]-c[1])+","+t[0]+","+t[1];for(var d=2;dkr)+",1 "+e}function u(r,e,n,i){return"Q 0,0 "+i}return t.radius=function(r){return arguments.length?(n=ge(r),t):n},t.source=function(e){return arguments.length?(r=ge(e),t):r},t.target=function(r){return arguments.length?(e=ge(r),t):e},t.startAngle=function(r){return arguments.length?(i=ge(r),t):i},t.endAngle=function(r){return arguments.length?(a=ge(r),t):a},t},t.svg.diagonal=function(){var r=La,e=Oa,n=Va;function i(i,a){var t=r.call(this,i,a),o=e.call(this,i,a),c=(t.y+o.y)/2,u=[t,{x:t.x,y:c},{x:o.x,y:c},o];return"M"+(u=u.map(n))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}return i.source=function(e){return arguments.length?(r=ge(e),i):r},i.target=function(r){return arguments.length?(e=ge(r),i):e},i.projection=function(r){return arguments.length?(n=r,i):n},i},t.svg.diagonal.radial=function(){var r=t.svg.diagonal(),e=Va,n=r.projection;return r.projection=function(r){return arguments.length?n(function(r){return function(){var e=r.apply(this,arguments),n=e[0],i=e[1]-wr;return[n*Math.cos(i),n*Math.sin(i)]}}(e=r)):e},r},t.svg.symbol=function(){var r=Wa,e=ja;function n(n,i){return(qa.get(r.call(this,n,i))||Za)(e.call(this,n,i))}return n.type=function(e){return arguments.length?(r=ge(e),n):r},n.size=function(r){return arguments.length?(e=ge(r),n):e},n};var qa=t.map({circle:Za,cross:function(r){var e=Math.sqrt(r/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(r){var e=Math.sqrt(r/(2*Xa)),n=e*Xa;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(r){var e=Math.sqrt(r)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(r){var e=Math.sqrt(r/Ya),n=e*Ya/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(r){var e=Math.sqrt(r/Ya),n=e*Ya/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});t.svg.symbolTypes=qa.keys();var Ya=Math.sqrt(3),Xa=Math.tan(30*Rr);X.transition=function(r){for(var e,n,i=et||++at,a=ct(r),t=[],o=nt||{time:Date.now(),ease:En,delay:0,duration:250},c=-1,u=this.length;++c0;)d[--m].call(r,o);if(t>=1)return l.event&&l.event.end.call(r,r.__data__,e),--s.count?delete s[i]:delete r[n],1}l||(t=a.time,o=Se((function(r){var e=l.delay;if(o.t=e+t,e<=r)return m(r-e);o.c=m}),0,t),l=s[i]={tween:new C,time:t,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++s.count)}it.call=X.call,it.empty=X.empty,it.node=X.node,it.size=X.size,t.transition=function(r,e){return r&&r.transition?et?r.transition(e):r:t.selection().transition(r)},t.transition.prototype=it,it.select=function(r){var e,n,i,a=this.id,t=this.namespace,o=[];r=Q(r);for(var c=-1,u=this.length;++crect,.s>rect").attr("width",o[1]-o[0])}function y(r){r.select(".extent").attr("y",c[0]),r.selectAll(".extent,.e>rect,.w>rect").attr("height",c[1]-c[0])}function f(){var l,f,g=this,_=t.select(t.event.target),h=n.of(g,arguments),v=t.select(g),x=_.datum(),P=!/^(n|s)$/.test(x)&&i,G=!/^(e|w)$/.test(x)&&a,C=_.classed("extent"),S=Cr(g),A=t.mouse(g),b=t.select(s(g)).on("keydown.brush",(function(){32==t.event.keyCode&&(C||(l=null,A[0]-=o[1],A[1]-=c[1],C=2),L())})).on("keyup.brush",(function(){32==t.event.keyCode&&2==C&&(A[0]+=o[1],A[1]+=c[1],C=0,L())}));if(t.event.changedTouches?b.on("touchmove.brush",k).on("touchend.brush",z):b.on("mousemove.brush",k).on("mouseup.brush",z),v.interrupt().selectAll("*").interrupt(),C)A[0]=o[0]-A[0],A[1]=c[0]-A[1];else if(x){var M=+/w$/.test(x),B=+/^n/.test(x);f=[o[1-M]-A[0],c[1-B]-A[1]],A[0]=o[M],A[1]=c[B]}else t.event.altKey&&(l=A.slice());function k(){var r=t.mouse(g),e=!1;f&&(r[0]+=f[0],r[1]+=f[1]),C||(t.event.altKey?(l||(l=[(o[0]+o[1])/2,(c[0]+c[1])/2]),A[0]=o[+(r[0](i=1))return i;for(;nt?n=a:i=a,a=.5*(i-n)+n}return a},a.prototype.solve=function(r,e){return this.sampleCurveY(this.solveCurveX(r,e))};var t=o;function o(r,e){this.x=r,this.y=e}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(r){return this.clone()._add(r)},sub:function(r){return this.clone()._sub(r)},multByPoint:function(r){return this.clone()._multByPoint(r)},divByPoint:function(r){return this.clone()._divByPoint(r)},mult:function(r){return this.clone()._mult(r)},div:function(r){return this.clone()._div(r)},rotate:function(r){return this.clone()._rotate(r)},rotateAround:function(r,e){return this.clone()._rotateAround(r,e)},matMult:function(r){return this.clone()._matMult(r)},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(r){return this.x===r.x&&this.y===r.y},dist:function(r){return Math.sqrt(this.distSqr(r))},distSqr:function(r){var e=r.x-this.x,n=r.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith:function(r){return this.angleWithSep(r.x,r.y)},angleWithSep:function(r,e){return Math.atan2(this.x*e-this.y*r,this.x*r+this.y*e)},_matMult:function(r){var e=r[0]*this.x+r[1]*this.y,n=r[2]*this.x+r[3]*this.y;return this.x=e,this.y=n,this},_add:function(r){return this.x+=r.x,this.y+=r.y,this},_sub:function(r){return this.x-=r.x,this.y-=r.y,this},_mult:function(r){return this.x*=r,this.y*=r,this},_div:function(r){return this.x/=r,this.y/=r,this},_multByPoint:function(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint:function(r){return this.x/=r.x,this.y/=r.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var r=this.y;return this.y=this.x,this.x=-r,this},_rotate:function(r){var e=Math.cos(r),n=Math.sin(r),i=e*this.x-n*this.y,a=n*this.x+e*this.y;return this.x=i,this.y=a,this},_rotateAround:function(r,e){var n=Math.cos(r),i=Math.sin(r),a=e.x+n*(this.x-e.x)-i*(this.y-e.y),t=e.y+i*(this.x-e.x)+n*(this.y-e.y);return this.x=a,this.y=t,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(r){return r instanceof o?r:Array.isArray(r)?new o(r[0],r[1]):r};var c="undefined"!==typeof self?self:{};function u(r,e){if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(var n=0;n=1)return 1;var e=r*r,n=e*r;return 4*(r<.5?n:3*(r-e)+n-.75)}function l(r,e,n,a){var t=new i(r,e,n,a);return function(r){return t.solve(r)}}var m=l(.25,.1,.25,1);function p(r,e,n){return Math.min(n,Math.max(e,r))}function I(r,e,n){var i=n-e,a=((r-e)%i+i)%i+e;return a===e?n:a}function y(r,e,n){if(!r.length)return n(null,[]);var i=r.length,a=new Array(r.length),t=null;r.forEach((function(r,o){e(r,(function(r,e){r&&(t=r),a[o]=e,0===--i&&n(t,a)}))}))}function f(r){var e=[];for(var n in r)e.push(r[n]);return e}function g(r,e){var n=[];for(var i in r)i in e||n.push(i);return n}function _(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var i=0,a=e;i>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,r)}return r()}function G(r){return r<=1?1:Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function C(r){return!!r&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(r)}function S(r,e){r.forEach((function(r){e[r]&&(e[r]=e[r].bind(e))}))}function A(r,e){return-1!==r.indexOf(e,r.length-e.length)}function b(r,e,n){var i={};for(var a in r)i[a]=e.call(n||this,r[a],a,r);return i}function M(r,e,n){var i={};for(var a in r)e.call(n||this,r[a],a,r)&&(i[a]=r[a]);return i}function B(r){return Array.isArray(r)?r.map(B):"object"===typeof r&&r?b(r,B):r}function k(r,e){for(var n=0;n=0)return!0;return!1}var F={};function z(r){F[r]||("undefined"!==typeof console&&console.warn(r),F[r]=!0)}function w(r,e,n){return(n.y-r.y)*(e.x-r.x)>(e.y-r.y)*(n.x-r.x)}function R(r){for(var e=0,n=0,i=r.length,a=i-1,t=void 0,o=void 0;n@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,n={};if(r.replace(e,(function(r,e,i,a){var t=i||a;return n[e]=!t||t.toLowerCase(),""})),n["max-age"]){var i=parseInt(n["max-age"],10);isNaN(i)?delete n["max-age"]:n["max-age"]=i}return n}var D=null;function J(r){if(null==D){var e=r.navigator?r.navigator.userAgent:null;D=!!r.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return D}function U(r){try{var e=c[r];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(n){return!1}}function H(r){return c.btoa(encodeURIComponent(r).replace(/%([0-9A-F]{2})/g,(function(r,e){return String.fromCharCode(Number("0x"+e))})))}function L(r){return decodeURIComponent(c.atob(r).split("").map((function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)})).join(""))}var O,K,V,j,W=c.performance&&c.performance.now?c.performance.now.bind(c.performance):Date.now.bind(Date),Z=c.requestAnimationFrame||c.mozRequestAnimationFrame||c.webkitRequestAnimationFrame||c.msRequestAnimationFrame,q=c.cancelAnimationFrame||c.mozCancelAnimationFrame||c.webkitCancelAnimationFrame||c.msCancelAnimationFrame,Y={now:W,frame:function(r){var e=Z(r);return{cancel:function(){return q(e)}}},getImageData:function(r,e){void 0===e&&(e=0);var n=c.document.createElement("canvas"),i=n.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return n.width=r.width,n.height=r.height,i.drawImage(r,0,0,r.width,r.height),i.getImageData(-e,-e,r.width+2*e,r.height+2*e)},resolveURL:function(r){return O||(O=c.document.createElement("a")),O.href=r,O.href},hardwareConcurrency:c.navigator&&c.navigator.hardwareConcurrency||4,get devicePixelRatio(){return c.devicePixelRatio},get prefersReducedMotion(){return!!c.matchMedia&&(null==K&&(K=c.matchMedia("(prefers-reduced-motion: reduce)")),K.matches)}},X={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},Q={supported:!1,testSupport:er},$=!1,rr=!1;function er(r){!$&&j&&(rr?nr(r):V=r)}function nr(r){var e=r.createTexture();r.bindTexture(r.TEXTURE_2D,e);try{if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,j),r.isContextLost())return;Q.supported=!0}catch(n){}r.deleteTexture(e),$=!0}c.document&&((j=c.document.createElement("img")).onload=function(){V&&nr(V),V=null,rr=!0},j.onerror=function(){$=!0,V=null},j.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ir="01";function ar(){for(var r="1",e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n="",i=0;i<10;i++)n+=e[Math.floor(62*Math.random())];var a=432e5;return{token:[r,ir,n].join(""),tokenExpiresAt:Date.now()+a}}var tr=function(r,e){this._transformRequestFn=r,this._customAccessToken=e,this._createSkuToken()};function or(r){return 0===r.indexOf("mapbox:")}tr.prototype._createSkuToken=function(){var r=ar();this._skuToken=r.token,this._skuTokenExpiresAt=r.tokenExpiresAt},tr.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},tr.prototype.transformRequest=function(r,e){return this._transformRequestFn&&this._transformRequestFn(r,e)||{url:r}},tr.prototype.normalizeStyleURL=function(r,e){if(!or(r))return r;var n=mr(r);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},tr.prototype.normalizeGlyphsURL=function(r,e){if(!or(r))return r;var n=mr(r);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},tr.prototype.normalizeSourceURL=function(r,e){if(!or(r))return r;var n=mr(r);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||e)},tr.prototype.normalizeSpriteURL=function(r,e,n,i){var a=mr(r);return or(r)?(a.path="/styles/v1"+a.path+"/sprite"+e+n,this._makeAPIURL(a,this._customAccessToken||i)):(a.path+=""+e+n,pr(a))},tr.prototype.normalizeTileURL=function(r,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),r&&!or(r))return r;var n=mr(r),i=/(\.(png|jpg)\d*)(?=$)/,a=/^.+\/v4\//,t=Y.devicePixelRatio>=2||512===e?"@2x":"",o=Q.supported?".webp":"$1";n.path=n.path.replace(i,""+t+o),n.path=n.path.replace(a,"/"),n.path="/v4"+n.path;var c=this._customAccessToken||sr(n.params)||X.ACCESS_TOKEN;return X.REQUIRE_ACCESS_TOKEN&&c&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,c)},tr.prototype.canonicalizeTileURL=function(r,e){var n="/v4/",i=/\.[\w]+$/,a=mr(r);if(!a.path.match(/(^\/v4\/)/)||!a.path.match(i))return r;var t="mapbox://tiles/";t+=a.path.replace(n,"");var o=a.params;return e&&(o=o.filter((function(r){return!r.match(/^access_token=/)}))),o.length&&(t+="?"+o.join("&")),t},tr.prototype.canonicalizeTileset=function(r,e){for(var n=!!e&&or(e),i=[],a=0,t=r.tiles||[];a=0&&r.params.splice(a,1)}if("/"!==i.path&&(r.path=""+i.path+r.path),!X.REQUIRE_ACCESS_TOKEN)return pr(r);if(!(e=e||X.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+n);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+n);return r.params=r.params.filter((function(r){return-1===r.indexOf("access_token")})),r.params.push("access_token="+e),pr(r)};var cr=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ur(r){return cr.test(r)}function dr(r){return r.indexOf("sku=")>0&&ur(r)}function sr(r){for(var e=0,n=r;e=1&&c.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(i){z("Unable to write to LocalStorage")}},fr.prototype.processRequests=function(r){},fr.prototype.postEvent=function(r,e,i,a){var t=this;if(X.EVENTS_URL){var o=mr(X.EVENTS_URL);o.params.push("access_token="+(a||X.ACCESS_TOKEN||""));var c={event:this.type,created:new Date(r).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:n,skuId:ir,userId:this.anonId},u=e?_(c,e):c,d={url:pr(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([u])};this.pendingRequest=Xr(d,(function(r){t.pendingRequest=null,i(r),t.saveEventData(),t.processRequests(a)}))}},fr.prototype.queueRequest=function(r,e){this.queue.push(r),this.processRequests(e)};var gr,_r,hr=function(r){function e(){r.call(this,"map.load"),this.success={},this.skuToken=""}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(r,e,n,i){this.skuToken=n,(X.EVENTS_URL&&i||X.ACCESS_TOKEN&&Array.isArray(r)&&r.some((function(r){return or(r)||ur(r)})))&&this.queueRequest({id:e,timestamp:Date.now()},i)},e.prototype.processRequests=function(r){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),i=n.id,a=n.timestamp;i&&this.success[i]||(this.anonId||this.fetchEventData(),C(this.anonId)||(this.anonId=P()),this.postEvent(a,{skuToken:this.skuToken},(function(r){r||i&&(e.success[i]=!0)}),r))}},e}(fr),vr=function(r){function e(e){r.call(this,"appUserTurnstile"),this._customAccessToken=e}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(r,e){X.EVENTS_URL&&X.ACCESS_TOKEN&&Array.isArray(r)&&r.some((function(r){return or(r)||ur(r)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(r){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=yr(X.ACCESS_TOKEN),i=n?n.u:X.ACCESS_TOKEN,a=i!==this.eventData.tokenU;C(this.anonId)||(this.anonId=P(),a=!0);var t=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),c=new Date(t),u=(t-this.eventData.lastSuccess)/864e5;a=a||u>=1||u<-1||o.getDate()!==c.getDate()}else a=!0;if(!a)return this.processRequests();this.postEvent(t,{"enabled.telemetry":!1},(function(r){r||(e.eventData.lastSuccess=t,e.eventData.tokenU=i)}),r)}},e}(fr),xr=new vr,Pr=xr.postTurnstileEvent.bind(xr),Gr=new hr,Cr=Gr.postMapLoadEvent.bind(Gr),Sr="mapbox-tiles",Ar=500,br=50,Mr=42e4;function Br(){c.caches&&!gr&&(gr=c.caches.open(Sr))}function kr(r,e){if(void 0===_r)try{new Response(new ReadableStream),_r=!0}catch(n){_r=!1}_r?e(r.body):r.blob().then(e)}function Fr(r,e,n){if(Br(),gr){var i={status:e.status,statusText:e.statusText,headers:new c.Headers};e.headers.forEach((function(r,e){return i.headers.set(e,r)}));var a=T(e.headers.get("Cache-Control")||"");a["no-store"]||(a["max-age"]&&i.headers.set("Expires",new Date(n+1e3*a["max-age"]).toUTCString()),new Date(i.headers.get("Expires")).getTime()-nDate.now()&&!n["no-cache"]}var Er,Nr=1/0;function Tr(r){++Nr>br&&(r.getActor().send("enforceCacheSizeLimit",Ar),Nr=0)}function Dr(r){Br(),gr&&gr.then((function(e){e.keys().then((function(n){for(var i=0;i=200&&n.status<300||0===n.status)&&null!==n.response){var i=n.response;if("json"===r.type)try{i=JSON.parse(n.response)}catch(a){return e(a)}e(null,i,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else e(new Or(n.statusText,n.status,r.url))},n.send(r.body),{cancel:function(){return n.abort()}}}var Zr=function(r,e){if(!Vr(r.url)){if(c.fetch&&c.Request&&c.AbortController&&c.Request.prototype.hasOwnProperty("signal"))return jr(r,e);if(N()&&self.worker&&self.worker.actor){var n=!0;return self.worker.actor.send("getResource",r,e,void 0,n)}}return Wr(r,e)},qr=function(r,e){return Zr(_(r,{type:"json"}),e)},Yr=function(r,e){return Zr(_(r,{type:"arrayBuffer"}),e)},Xr=function(r,e){return Zr(_(r,{method:"POST"}),e)};function Qr(r){var e=c.document.createElement("a");return e.href=r,e.protocol===c.document.location.protocol&&e.host===c.document.location.host}var $r,re,ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ne(r,e,n,i){var a=new c.Image,t=c.URL;a.onload=function(){e(null,a),t.revokeObjectURL(a.src),a.onload=null,c.requestAnimationFrame((function(){a.src=ee}))},a.onerror=function(){return e(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 o=new c.Blob([new Uint8Array(r)],{type:"image/png"});a.cacheControl=n,a.expires=i,a.src=r.byteLength?t.createObjectURL(o):ee}function ie(r,e){var n=new c.Blob([new Uint8Array(r)],{type:"image/png"});c.createImageBitmap(n).then((function(r){e(null,r)})).catch((function(r){e(new Error("Could not load image because of "+r.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}$r=[],re=0;var ae=function(r,e){if(Q.supported&&(r.headers||(r.headers={}),r.headers.accept="image/webp,*/*"),re>=X.MAX_PARALLEL_IMAGE_REQUESTS){var n={requestParameters:r,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return $r.push(n),n}re++;var i=!1,a=function(){if(!i)for(i=!0,re--;$r.length&&re0||this._oneTimeListeners&&this._oneTimeListeners[r]&&this._oneTimeListeners[r].length>0||this._eventedParent&&this._eventedParent.listens(r)},se.prototype.setEventedParent=function(r,e){return this._eventedParent=r,this._eventedParentData=e,this};var le={$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"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},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:"resolvedImage",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"}],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":{},within:{}}},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:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},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:"resolvedImage",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:"resolvedImage",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:"resolvedImage",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:"resolvedImage",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"}},promoteId:{"*":{type:"string"}}},me=function(r,e,n,i){this.message=(r?r+": ":"")+n,i&&(this.identifier=i),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)};function pe(r){var e=r.key,n=r.value;return n?[new me(e,n,"constants have been deprecated as of v8")]:[]}function Ie(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var i=0,a=e;i":"value"===r.itemType.kind?"array":"array<"+e+">"}return r.kind}var ze=[he,ve,xe,Pe,Ge,Me,Ce,ke(Se),Be];function we(r,e){if("error"===e.kind)return null;if("array"===r.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!we(r.itemType,e.itemType))&&("number"!==typeof r.N||r.N===e.N))return null}else{if(r.kind===e.kind)return null;if("value"===r.kind)for(var n=0,i=ze;n255?255:r}function a(r){return r<0?0:r>1?1:r}function t(r){return"%"===r[r.length-1]?i(parseFloat(r)/100*255):i(parseInt(r))}function o(r){return"%"===r[r.length-1]?a(parseFloat(r)/100):a(parseFloat(r))}function c(r,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?r+(e-r)*n*6:2*n<1?e:3*n<2?r+(e-r)*(2/3-n)*6:r}function u(r){var e,a=r.replace(/ /g,"").toLowerCase();if(a in n)return n[a].slice();if("#"===a[0])return 4===a.length?(e=parseInt(a.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===a.length&&(e=parseInt(a.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=a.indexOf("("),d=a.indexOf(")");if(-1!==u&&d+1===a.length){var s=a.substr(0,u),l=a.substr(u+1,d-(u+1)).split(","),m=1;switch(s){case"rgba":if(4!==l.length)return null;m=o(l.pop());case"rgb":return 3!==l.length?null:[t(l[0]),t(l[1]),t(l[2]),m];case"hsla":if(4!==l.length)return null;m=o(l.pop());case"hsl":if(3!==l.length)return null;var p=(parseFloat(l[0])%360+360)%360/360,I=o(l[1]),y=o(l[2]),f=y<=.5?y*(I+1):y+I-y*I,g=2*y-f;return[i(255*c(g,f,p+1/3)),i(255*c(g,f,p)),i(255*c(g,f,p-1/3)),m];default:return null}}return null}try{e.parseCSSColor=u}catch(d){}})),Te=Ne.parseCSSColor,De=function(r,e,n,i){void 0===i&&(i=1),this.r=r,this.g=e,this.b=n,this.a=i};De.parse=function(r){if(r){if(r instanceof De)return r;if("string"===typeof r){var e=Te(r);if(e)return new De(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},De.prototype.toString=function(){var r=this.toArray(),e=r[0],n=r[1],i=r[2],a=r[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(i)+","+a+")"},De.prototype.toArray=function(){var r=this,e=r.r,n=r.g,i=r.b,a=r.a;return 0===a?[0,0,0,0]:[255*e/a,255*n/a,255*i/a,a]},De.black=new De(0,0,0,1),De.white=new De(1,1,1,1),De.transparent=new De(0,0,0,0),De.red=new De(1,0,0,1);var Je=function(r,e,n){this.sensitivity=r?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Je.prototype.compare=function(r,e){return this.collator.compare(r,e)},Je.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Ue=function(r,e,n,i,a){this.text=r,this.image=e,this.scale=n,this.fontStack=i,this.textColor=a},He=function(r){this.sections=r};He.fromString=function(r){return new He([new Ue(r,null,null,null,null)])},He.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(r){return 0!==r.text.length||r.image&&0!==r.image.name.length}))},He.factory=function(r){return r instanceof He?r:He.fromString(r)},He.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(r){return r.text})).join("")},He.prototype.serialize=function(){for(var r=["format"],e=0,n=this.sections;e=0&&r<=255&&"number"===typeof e&&e>=0&&e<=255&&"number"===typeof n&&n>=0&&n<=255?"undefined"===typeof i||"number"===typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[r,e,n,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"===typeof i?[r,e,n,i]:[r,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Ke(r){if(null===r)return!0;if("string"===typeof r)return!0;if("boolean"===typeof r)return!0;if("number"===typeof r)return!0;if(r instanceof De)return!0;if(r instanceof Je)return!0;if(r instanceof He)return!0;if(r instanceof Le)return!0;if(Array.isArray(r)){for(var e=0,n=r;e2){var c=r[1];if("string"!==typeof c||!(c in qe)||"object"===c)return e.error('The item type argument of "array" must be one of string, number, boolean',1);t=qe[c],i++}else t=Se;if(r.length>3){if(null!==r[2]&&("number"!==typeof r[2]||r[2]<0||r[2]!==Math.floor(r[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=r[2],i++}n=ke(t,o)}else n=qe[a];for(var u=[];i1)&&e.push(i)}}return e.concat(this.args.map((function(r){return r.serialize()})))};var Xe=function(r){this.type=Me,this.sections=r};Xe.parse=function(r,e){if(r.length<2)return e.error("Expected at least one argument.");var n=r[1];if(!Array.isArray(n)&&"object"===typeof n)return e.error("First argument must be an image or text section.");for(var i=[],a=!1,t=1;t<=r.length-1;++t){var o=r[t];if(a&&"object"===typeof o&&!Array.isArray(o)){a=!1;var c=null;if(o["font-scale"]&&!(c=e.parse(o["font-scale"],1,ve)))return null;var u=null;if(o["text-font"]&&!(u=e.parse(o["text-font"],1,ke(xe))))return null;var d=null;if(o["text-color"]&&!(d=e.parse(o["text-color"],1,Ge)))return null;var s=i[i.length-1];s.scale=c,s.font=u,s.textColor=d}else{var l=e.parse(r[t],1,Se);if(!l)return null;var m=l.type.kind;if("string"!==m&&"value"!==m&&"null"!==m&&"resolvedImage"!==m)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,i.push({content:l,scale:null,font:null,textColor:null})}}return new Xe(i)},Xe.prototype.evaluate=function(r){var e=function(e){var n=e.content.evaluate(r);return Ve(n)===Be?new Ue("",n,null,null,null):new Ue(je(n),null,e.scale?e.scale.evaluate(r):null,e.font?e.font.evaluate(r).join(","):null,e.textColor?e.textColor.evaluate(r):null)};return new He(this.sections.map(e))},Xe.prototype.eachChild=function(r){for(var e=0,n=this.sections;e-1),n},Qe.prototype.eachChild=function(r){r(this.input)},Qe.prototype.outputDefined=function(){return!1},Qe.prototype.serialize=function(){return["image",this.input.serialize()]};var $e={"to-boolean":Pe,"to-color":Ge,"to-number":ve,"to-string":xe},rn=function(r,e){this.type=r,this.args=e};rn.parse=function(r,e){if(r.length<2)return e.error("Expected at least one argument.");var n=r[0];if(("to-boolean"===n||"to-string"===n)&&2!==r.length)return e.error("Expected one argument.");for(var i=$e[n],a=[],t=1;t4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":Oe(e[0],e[1],e[2],e[3])))return new De(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Ze(n||"Could not parse color from value '"+("string"===typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var o=null,c=0,u=this.args;c=e[2])&&!(r[1]<=e[1])&&!(r[3]>=e[3])}function mn(r,e){var n=dn(r[0]),i=sn(r[1]),a=Math.pow(2,e.z);return[Math.round(n*a*cn),Math.round(i*a*cn)]}function pn(r,e,n){var i=r[0]-e[0],a=r[1]-e[1],t=r[0]-n[0],o=r[1]-n[1];return i*o-t*a===0&&i*t<=0&&a*o<=0}function In(r,e,n){return e[1]>r[1]!==n[1]>r[1]&&r[0]<(n[0]-e[0])*(r[1]-e[1])/(n[1]-e[1])+e[0]}function yn(r,e){for(var n=!1,i=0,a=e.length;i0&&l<0||s<0&&l>0}function hn(r,e,n,i){var a=[e[0]-r[0],e[1]-r[1]];return 0!==gn([i[0]-n[0],i[1]-n[1]],a)&&!(!_n(r,e,n,i)||!_n(n,i,r,e))}function vn(r,e,n){for(var i=0,a=n;in[2]){var a=.5*i,t=r[0]-n[0]>a?-i:n[0]-r[0]>a?i:0;0===t&&(t=r[0]-n[2]>a?-i:n[2]-r[0]>a?i:0),r[0]+=t}un(e,r)}function An(r){r[0]=r[1]=1/0,r[2]=r[3]=-1/0}function bn(r,e,n,i){for(var a=Math.pow(2,i.z)*cn,t=[i.x*cn,i.y*cn],o=[],c=0,u=r;c=0)return!1;var n=!0;return r.eachChild((function(r){n&&!Rn(r,e)&&(n=!1)})),n}Fn.parse=function(r,e){if(2!==r.length)return e.error("'within' expression requires exactly one argument, but found "+(r.length-1)+" instead.");if(Ke(r[1])){var n=r[1];if("FeatureCollection"===n.type)for(var i=0;ie))throw new Ze("Input is not a number.");o=c-1}return 0}Nn.prototype.parse=function(r,e,n,i,a){return void 0===a&&(a={}),e?this.concat(e,n,i)._parse(r,a):this._parse(r,a)},Nn.prototype._parse=function(r,e){function n(r,e,n){return"assert"===n?new Ye(e,[r]):"coerce"===n?new rn(e,[r]):r}if(null!==r&&"string"!==typeof r&&"boolean"!==typeof r&&"number"!==typeof r||(r=["literal",r]),Array.isArray(r)){if(0===r.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var i=r[0];if("string"!==typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var a=this.registry[i];if(a){var t=a.parse(r,this);if(!t)return null;if(this.expectedType){var o=this.expectedType,c=t.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==c.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==c.kind&&"string"!==c.kind){if(this.checkSubtype(o,c))return null}else t=n(t,o,e.typeAnnotation||"coerce");else t=n(t,o,e.typeAnnotation||"assert")}if(!(t instanceof We)&&"resolvedImage"!==t.type.kind&&Tn(t)){var u=new nn;try{t=new We(t.type,t.evaluate(u))}catch(d){return this.error(d.message),null}}return t}return this.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0)}return"undefined"===typeof r?this.error("'undefined' value invalid. Use null instead."):"object"===typeof r?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof r+" instead.")},Nn.prototype.concat=function(r,e,n){var i="number"===typeof r?this.path.concat(r):this.path,a=n?this.scope.concat(n):this.scope;return new Nn(this.registry,i,e||null,a,this.errors)},Nn.prototype.error=function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var i=""+this.key+e.map((function(r){return"["+r+"]"})).join("");this.errors.push(new ge(i,r))},Nn.prototype.checkSubtype=function(r,e){var n=we(r,e);return n&&this.error(n),n};var Jn=function(r,e,n){this.type=r,this.input=e,this.labels=[],this.outputs=[];for(var i=0,a=n;i=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var s=e.parse(c,d,a);if(!s)return null;a=a||s.type,i.push([o,s])}return new Jn(a,n,i)},Jn.prototype.evaluate=function(r){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(r);var i=this.input.evaluate(r);if(i<=e[0])return n[0].evaluate(r);var a=e.length;return i>=e[a-1]?n[a-1].evaluate(r):n[Dn(e,i)].evaluate(r)},Jn.prototype.eachChild=function(r){r(this.input);for(var e=0,n=this.outputs;e0&&r.push(this.labels[e]),r.push(this.outputs[e].serialize());return r};var On=Object.freeze({__proto__:null,number:Un,color:Hn,array:Ln}),Kn=.95047,Vn=1,jn=1.08883,Wn=4/29,Zn=6/29,qn=3*Zn*Zn,Yn=Zn*Zn*Zn,Xn=Math.PI/180,Qn=180/Math.PI;function $n(r){return r>Yn?Math.pow(r,1/3):r/qn+Wn}function ri(r){return r>Zn?r*r*r:qn*(r-Wn)}function ei(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function ni(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function ii(r){var e=ni(r.r),n=ni(r.g),i=ni(r.b),a=$n((.4124564*e+.3575761*n+.1804375*i)/Kn),t=$n((.2126729*e+.7151522*n+.072175*i)/Vn);return{l:116*t-16,a:500*(a-t),b:200*(t-$n((.0193339*e+.119192*n+.9503041*i)/jn)),alpha:r.a}}function ai(r){var e=(r.l+16)/116,n=isNaN(r.a)?e:e+r.a/500,i=isNaN(r.b)?e:e-r.b/200;return e=Vn*ri(e),n=Kn*ri(n),i=jn*ri(i),new De(ei(3.2404542*n-1.5371385*e-.4985314*i),ei(-.969266*n+1.8760108*e+.041556*i),ei(.0556434*n-.2040259*e+1.0572252*i),r.alpha)}function ti(r,e,n){return{l:Un(r.l,e.l,n),a:Un(r.a,e.a,n),b:Un(r.b,e.b,n),alpha:Un(r.alpha,e.alpha,n)}}function oi(r){var e=ii(r),n=e.l,i=e.a,a=e.b,t=Math.atan2(a,i)*Qn;return{h:t<0?t+360:t,c:Math.sqrt(i*i+a*a),l:n,alpha:r.a}}function ci(r){var e=r.h*Xn,n=r.c;return ai({l:r.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:r.alpha})}function ui(r,e,n){var i=e-r;return r+n*(i>180||i<-180?i-360*Math.round(i/360):i)}function di(r,e,n){return{h:ui(r.h,e.h,n),c:Un(r.c,e.c,n),l:Un(r.l,e.l,n),alpha:Un(r.alpha,e.alpha,n)}}var si={forward:ii,reverse:ai,interpolate:ti},li={forward:oi,reverse:ci,interpolate:di},mi=Object.freeze({__proto__:null,lab:si,hcl:li}),pi=function(r,e,n,i,a){this.type=r,this.operator=e,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];for(var t=0,o=a;t1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:c}}if(r.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(r.length-1)+".");if((r.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(!(a=e.parse(a,2,ve)))return null;var u=[],d=null;"interpolate-hcl"===n||"interpolate-lab"===n?d=Ge:e.expectedType&&"value"!==e.expectedType.kind&&(d=e.expectedType);for(var s=0;s=l)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var y=e.parse(m,I,d);if(!y)return null;d=d||y.type,u.push([l,y])}return"number"===d.kind||"color"===d.kind||"array"===d.kind&&"number"===d.itemType.kind&&"number"===typeof d.N?new pi(d,n,i,a,u):e.error("Type "+Fe(d)+" is not interpolatable.")},pi.prototype.evaluate=function(r){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(r);var i=this.input.evaluate(r);if(i<=e[0])return n[0].evaluate(r);var a=e.length;if(i>=e[a-1])return n[a-1].evaluate(r);var t=Dn(e,i),o=e[t],c=e[t+1],u=pi.interpolationFactor(this.interpolation,i,o,c),d=n[t].evaluate(r),s=n[t+1].evaluate(r);return"interpolate"===this.operator?On[this.type.kind.toLowerCase()](d,s,u):"interpolate-hcl"===this.operator?li.reverse(li.interpolate(li.forward(d),li.forward(s),u)):si.reverse(si.interpolate(si.forward(d),si.forward(s),u))},pi.prototype.eachChild=function(r){r(this.input);for(var e=0,n=this.outputs;e=n.length)throw new Ze("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new Ze("Array index must be an integer, but found "+e+" instead.");return n[e]},gi.prototype.eachChild=function(r){r(this.index),r(this.input)},gi.prototype.outputDefined=function(){return!1},gi.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _i=function(r,e){this.type=Pe,this.needle=r,this.haystack=e};_i.parse=function(r,e){if(3!==r.length)return e.error("Expected 2 arguments, but found "+(r.length-1)+" instead.");var n=e.parse(r[1],1,Se),i=e.parse(r[2],2,Se);return n&&i?Re(n.type,[Pe,xe,ve,he,Se])?new _i(n,i):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Fe(n.type)+" instead"):null},_i.prototype.evaluate=function(r){var e=this.needle.evaluate(r),n=this.haystack.evaluate(r);if(!n)return!1;if(!Ee(e,["boolean","string","number","null"]))throw new Ze("Expected first argument to be of type boolean, string, number or null, but found "+Fe(Ve(e))+" instead.");if(!Ee(n,["string","array"]))throw new Ze("Expected second argument to be of type array or string, but found "+Fe(Ve(n))+" instead.");return n.indexOf(e)>=0},_i.prototype.eachChild=function(r){r(this.needle),r(this.haystack)},_i.prototype.outputDefined=function(){return!0},_i.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var hi=function(r,e,n){this.type=ve,this.needle=r,this.haystack=e,this.fromIndex=n};hi.parse=function(r,e){if(r.length<=2||r.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(r.length-1)+" instead.");var n=e.parse(r[1],1,Se),i=e.parse(r[2],2,Se);if(!n||!i)return null;if(!Re(n.type,[Pe,xe,ve,he,Se]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Fe(n.type)+" instead");if(4===r.length){var a=e.parse(r[3],3,ve);return a?new hi(n,i,a):null}return new hi(n,i)},hi.prototype.evaluate=function(r){var e=this.needle.evaluate(r),n=this.haystack.evaluate(r);if(!Ee(e,["boolean","string","number","null"]))throw new Ze("Expected first argument to be of type boolean, string, number or null, but found "+Fe(Ve(e))+" instead.");if(!Ee(n,["string","array"]))throw new Ze("Expected second argument to be of type array or string, but found "+Fe(Ve(n))+" instead.");if(this.fromIndex){var i=this.fromIndex.evaluate(r);return n.indexOf(e,i)}return n.indexOf(e)},hi.prototype.eachChild=function(r){r(this.needle),r(this.haystack),this.fromIndex&&r(this.fromIndex)},hi.prototype.outputDefined=function(){return!1},hi.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var r=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),r]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var vi=function(r,e,n,i,a,t){this.inputType=r,this.type=e,this.input=n,this.cases=i,this.outputs=a,this.otherwise=t};vi.parse=function(r,e){if(r.length<5)return e.error("Expected at least 4 arguments, but found only "+(r.length-1)+".");if(r.length%2!==1)return e.error("Expected an even number of arguments.");var n,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var a={},t=[],o=2;oNumber.MAX_SAFE_INTEGER)return d.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"===typeof m&&Math.floor(m)!==m)return d.error("Numeric branch labels must be integer values.");if(n){if(d.checkSubtype(n,Ve(m)))return null}else n=Ve(m);if("undefined"!==typeof a[String(m)])return d.error("Branch labels must be unique.");a[String(m)]=t.length}var p=e.parse(u,o,i);if(!p)return null;i=i||p.type,t.push(p)}var I=e.parse(r[1],1,Se);if(!I)return null;var y=e.parse(r[r.length-1],r.length-1,i);return y?"value"!==I.type.kind&&e.concat(1).checkSubtype(n,I.type)?null:new vi(n,i,I,a,t,y):null},vi.prototype.evaluate=function(r){var e=this.input.evaluate(r);return(Ve(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(r)},vi.prototype.eachChild=function(r){r(this.input),this.outputs.forEach(r),r(this.otherwise)},vi.prototype.outputDefined=function(){return this.outputs.every((function(r){return r.outputDefined()}))&&this.otherwise.outputDefined()},vi.prototype.serialize=function(){for(var r=this,e=["match",this.input.serialize()],n=[],i={},a=0,t=Object.keys(this.cases).sort();an}function Mi(r,e,n){return e<=n}function Bi(r,e,n){return e>=n}function ki(r,e,n,i){return 0===i.compare(e,n)}function Fi(r,e,n,i){return!ki(r,e,n,i)}function zi(r,e,n,i){return i.compare(e,n)<0}function wi(r,e,n,i){return i.compare(e,n)>0}function Ri(r,e,n,i){return i.compare(e,n)<=0}function Ei(r,e,n,i){return i.compare(e,n)>=0}function Ni(r,e,n){var i="=="!==r&&"!="!==r;return function(){function a(r,e,n){this.type=Pe,this.lhs=r,this.rhs=e,this.collator=n,this.hasUntypedArgument="value"===r.type.kind||"value"===e.type.kind}return a.parse=function(r,e){if(3!==r.length&&4!==r.length)return e.error("Expected two or three arguments.");var n=r[0],t=e.parse(r[1],1,Se);if(!t)return null;if(!Gi(n,t.type))return e.concat(1).error('"'+n+"\" comparisons are not supported for type '"+Fe(t.type)+"'.");var o=e.parse(r[2],2,Se);if(!o)return null;if(!Gi(n,o.type))return e.concat(2).error('"'+n+"\" comparisons are not supported for type '"+Fe(o.type)+"'.");if(t.type.kind!==o.type.kind&&"value"!==t.type.kind&&"value"!==o.type.kind)return e.error("Cannot compare types '"+Fe(t.type)+"' and '"+Fe(o.type)+"'.");i&&("value"===t.type.kind&&"value"!==o.type.kind?t=new Ye(o.type,[t]):"value"!==t.type.kind&&"value"===o.type.kind&&(o=new Ye(t.type,[o])));var c=null;if(4===r.length){if("string"!==t.type.kind&&"string"!==o.type.kind&&"value"!==t.type.kind&&"value"!==o.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(c=e.parse(r[3],3,be)))return null}return new a(t,o,c)},a.prototype.evaluate=function(a){var t=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){var c=Ve(t),u=Ve(o);if(c.kind!==u.kind||"string"!==c.kind&&"number"!==c.kind)throw new Ze('Expected arguments for "'+r+'" to be (string, string) or (number, number), but found ('+c.kind+", "+u.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var d=Ve(t),s=Ve(o);if("string"!==d.kind||"string"!==s.kind)return e(a,t,o)}return this.collator?n(a,t,o,this.collator.evaluate(a)):e(a,t,o)},a.prototype.eachChild=function(r){r(this.lhs),r(this.rhs),this.collator&&r(this.collator)},a.prototype.outputDefined=function(){return!0},a.prototype.serialize=function(){var e=[r];return this.eachChild((function(r){e.push(r.serialize())})),e},a}()}Pi.parse=function(r,e){if(r.length<=2||r.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(r.length-1)+" instead.");var n=e.parse(r[1],1,Se),i=e.parse(r[2],2,ve);if(!n||!i)return null;if(!Re(n.type,[ke(Se),xe,Se]))return e.error("Expected first argument to be of type array or string, but found "+Fe(n.type)+" instead");if(4===r.length){var a=e.parse(r[3],3,ve);return a?new Pi(n.type,n,i,a):null}return new Pi(n.type,n,i)},Pi.prototype.evaluate=function(r){var e=this.input.evaluate(r),n=this.beginIndex.evaluate(r);if(!Ee(e,["string","array"]))throw new Ze("Expected first argument to be of type array or string, but found "+Fe(Ve(e))+" instead.");if(this.endIndex){var i=this.endIndex.evaluate(r);return e.slice(n,i)}return e.slice(n)},Pi.prototype.eachChild=function(r){r(this.input),r(this.beginIndex),this.endIndex&&r(this.endIndex)},Pi.prototype.outputDefined=function(){return!1},Pi.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var r=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),r]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Ti=Ni("==",Ci,ki),Di=Ni("!=",Si,Fi),Ji=Ni("<",Ai,zi),Ui=Ni(">",bi,wi),Hi=Ni("<=",Mi,Ri),Li=Ni(">=",Bi,Ei),Oi=function(r,e,n,i,a){this.type=xe,this.number=r,this.locale=e,this.currency=n,this.minFractionDigits=i,this.maxFractionDigits=a};Oi.parse=function(r,e){if(3!==r.length)return e.error("Expected two arguments.");var n=e.parse(r[1],1,ve);if(!n)return null;var i=r[2];if("object"!==typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var a=null;if(i.locale&&!(a=e.parse(i.locale,1,xe)))return null;var t=null;if(i.currency&&!(t=e.parse(i.currency,1,xe)))return null;var o=null;if(i["min-fraction-digits"]&&!(o=e.parse(i["min-fraction-digits"],1,ve)))return null;var c=null;return i["max-fraction-digits"]&&!(c=e.parse(i["max-fraction-digits"],1,ve))?null:new Oi(n,a,t,o,c)},Oi.prototype.evaluate=function(r){return new Intl.NumberFormat(this.locale?this.locale.evaluate(r):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(r):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(r):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(r):void 0}).format(this.number.evaluate(r))},Oi.prototype.eachChild=function(r){r(this.number),this.locale&&r(this.locale),this.currency&&r(this.currency),this.minFractionDigits&&r(this.minFractionDigits),this.maxFractionDigits&&r(this.maxFractionDigits)},Oi.prototype.outputDefined=function(){return!1},Oi.prototype.serialize=function(){var r={};return this.locale&&(r.locale=this.locale.serialize()),this.currency&&(r.currency=this.currency.serialize()),this.minFractionDigits&&(r["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(r["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),r]};var Ki=function(r){this.type=ve,this.input=r};Ki.parse=function(r,e){if(2!==r.length)return e.error("Expected 1 argument, but found "+(r.length-1)+" instead.");var n=e.parse(r[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+Fe(n.type)+" instead."):new Ki(n):null},Ki.prototype.evaluate=function(r){var e=this.input.evaluate(r);if("string"===typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Ze("Expected value to be of type string or array, but found "+Fe(Ve(e))+" instead.")},Ki.prototype.eachChild=function(r){r(this.input)},Ki.prototype.outputDefined=function(){return!1},Ki.prototype.serialize=function(){var r=["length"];return this.eachChild((function(e){r.push(e.serialize())})),r};var Vi={"==":Ti,"!=":Di,">":Ui,"<":Ji,">=":Li,"<=":Hi,array:Ye,at:gi,boolean:Ye,case:xi,coalesce:yi,collator:on,format:Xe,image:Qe,in:_i,"index-of":hi,interpolate:pi,"interpolate-hcl":pi,"interpolate-lab":pi,length:Ki,let:fi,literal:We,match:vi,number:Ye,"number-format":Oi,object:Ye,slice:Pi,step:Jn,string:Ye,"to-boolean":rn,"to-color":rn,"to-number":rn,"to-string":rn,var:En,within:Fn};function ji(r,e){var n=e[0],i=e[1],a=e[2],t=e[3];n=n.evaluate(r),i=i.evaluate(r),a=a.evaluate(r);var o=t?t.evaluate(r):1,c=Oe(n,i,a,o);if(c)throw new Ze(c);return new De(n/255*o,i/255*o,a/255*o,o)}function Wi(r,e){return r in e}function Zi(r,e){var n=e[r];return"undefined"===typeof n?null:n}function qi(r,e,n,i){for(;n<=i;){var a=n+i>>1;if(e[a]===r)return!0;e[a]>r?i=a-1:n=a+1}return!1}function Yi(r){return{type:r}}function Xi(r){return{result:"success",value:r}}function Qi(r){return{result:"error",value:r}}function $i(r){return"data-driven"===r["property-type"]||"cross-faded-data-driven"===r["property-type"]}function ra(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function ea(r){return!!r.expression&&r.expression.interpolated}function na(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":null===r?"null":typeof r}function ia(r){return"object"===typeof r&&null!==r&&!Array.isArray(r)}function aa(r){return r}function ta(r,e){var n,i,a,t="color"===e.type,o=r.stops&&"object"===typeof r.stops[0][0],c=o||void 0!==r.property,u=o||!c,d=r.type||(ea(e)?"exponential":"interval");if(t&&((r=Ie({},r)).stops&&(r.stops=r.stops.map((function(r){return[r[0],De.parse(r[1])]}))),r.default?r.default=De.parse(r.default):r.default=De.parse(e.default)),r.colorSpace&&"rgb"!==r.colorSpace&&!mi[r.colorSpace])throw new Error("Unknown color space: "+r.colorSpace);if("exponential"===d)n=da;else if("interval"===d)n=ua;else if("categorical"===d){n=ca,i=Object.create(null);for(var s=0,l=r.stops;s=r.stops[i-1][0])return r.stops[i-1][1];var a=Dn(r.stops.map((function(r){return r[0]})),n);return r.stops[a][1]}function da(r,e,n){var i=void 0!==r.base?r.base:1;if("number"!==na(n))return oa(r.default,e.default);var a=r.stops.length;if(1===a)return r.stops[0][1];if(n<=r.stops[0][0])return r.stops[0][1];if(n>=r.stops[a-1][0])return r.stops[a-1][1];var t=Dn(r.stops.map((function(r){return r[0]})),n),o=la(n,i,r.stops[t][0],r.stops[t+1][0]),c=r.stops[t][1],u=r.stops[t+1][1],d=On[e.type]||aa;if(r.colorSpace&&"rgb"!==r.colorSpace){var s=mi[r.colorSpace];d=function(r,e){return s.reverse(s.interpolate(s.forward(r),s.forward(e),o))}}return"function"===typeof c.evaluate?{evaluate:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=c.evaluate.apply(void 0,r),i=u.evaluate.apply(void 0,r);if(void 0!==n&&void 0!==i)return d(n,i,o)}}:d(c,u,o)}function sa(r,e,n){return"color"===e.type?n=De.parse(n):"formatted"===e.type?n=He.fromString(n.toString()):"resolvedImage"===e.type?n=Le.fromString(n.toString()):na(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),oa(n,r.default,e.default)}function la(r,e,n,i){var a=i-n,t=r-n;return 0===a?0:1===e?t/a:(Math.pow(e,t)-1)/(Math.pow(e,a)-1)}an.register(Vi,{error:[Ae,[xe],function(r,e){var n=e[0];throw new Ze(n.evaluate(r))}],typeof:[xe,[Se],function(r,e){return Fe(Ve(e[0].evaluate(r)))}],"to-rgba":[ke(ve,4),[Ge],function(r,e){return e[0].evaluate(r).toArray()}],rgb:[Ge,[ve,ve,ve],ji],rgba:[Ge,[ve,ve,ve,ve],ji],has:{type:Pe,overloads:[[[xe],function(r,e){return Wi(e[0].evaluate(r),r.properties())}],[[xe,Ce],function(r,e){var n=e[0],i=e[1];return Wi(n.evaluate(r),i.evaluate(r))}]]},get:{type:Se,overloads:[[[xe],function(r,e){return Zi(e[0].evaluate(r),r.properties())}],[[xe,Ce],function(r,e){var n=e[0],i=e[1];return Zi(n.evaluate(r),i.evaluate(r))}]]},"feature-state":[Se,[xe],function(r,e){return Zi(e[0].evaluate(r),r.featureState||{})}],properties:[Ce,[],function(r){return r.properties()}],"geometry-type":[xe,[],function(r){return r.geometryType()}],id:[Se,[],function(r){return r.id()}],zoom:[ve,[],function(r){return r.globals.zoom}],"heatmap-density":[ve,[],function(r){return r.globals.heatmapDensity||0}],"line-progress":[ve,[],function(r){return r.globals.lineProgress||0}],accumulated:[Se,[],function(r){return void 0===r.globals.accumulated?null:r.globals.accumulated}],"+":[ve,Yi(ve),function(r,e){for(var n=0,i=0,a=e;i":[Pe,[xe,Se],function(r,e){var n=e[0],i=e[1],a=r.properties()[n.value],t=i.value;return typeof a===typeof t&&a>t}],"filter-id->":[Pe,[Se],function(r,e){var n=e[0],i=r.id(),a=n.value;return typeof i===typeof a&&i>a}],"filter-<=":[Pe,[xe,Se],function(r,e){var n=e[0],i=e[1],a=r.properties()[n.value],t=i.value;return typeof a===typeof t&&a<=t}],"filter-id-<=":[Pe,[Se],function(r,e){var n=e[0],i=r.id(),a=n.value;return typeof i===typeof a&&i<=a}],"filter->=":[Pe,[xe,Se],function(r,e){var n=e[0],i=e[1],a=r.properties()[n.value],t=i.value;return typeof a===typeof t&&a>=t}],"filter-id->=":[Pe,[Se],function(r,e){var n=e[0],i=r.id(),a=n.value;return typeof i===typeof a&&i>=a}],"filter-has":[Pe,[Se],function(r,e){return e[0].value in r.properties()}],"filter-has-id":[Pe,[],function(r){return null!==r.id()&&void 0!==r.id()}],"filter-type-in":[Pe,[ke(xe)],function(r,e){return e[0].value.indexOf(r.geometryType())>=0}],"filter-id-in":[Pe,[ke(Se)],function(r,e){return e[0].value.indexOf(r.id())>=0}],"filter-in-small":[Pe,[xe,ke(Se)],function(r,e){var n=e[0];return e[1].value.indexOf(r.properties()[n.value])>=0}],"filter-in-large":[Pe,[xe,ke(Se)],function(r,e){var n=e[0],i=e[1];return qi(r.properties()[n.value],i.value,0,i.value.length-1)}],all:{type:Pe,overloads:[[[Pe,Pe],function(r,e){var n=e[0],i=e[1];return n.evaluate(r)&&i.evaluate(r)}],[Yi(Pe),function(r,e){for(var n=0,i=e;n0&&"string"===typeof r[0]&&r[0]in Vi}function Ia(r,e){var n=new Nn(Vi,[],e?xa(e):void 0),i=n.parse(r,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?Xi(new ma(i,e)):Qi(n.errors)}ma.prototype.evaluateWithoutErrorHandling=function(r,e,n,i,a,t){return this._evaluator.globals=r,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=i,this._evaluator.availableImages=a||null,this._evaluator.formattedSection=t,this.expression.evaluate(this._evaluator)},ma.prototype.evaluate=function(r,e,n,i,a,t){this._evaluator.globals=r,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=i,this._evaluator.availableImages=a||null,this._evaluator.formattedSection=t||null;try{var o=this.expression.evaluate(this._evaluator);if(null===o||void 0===o||"number"===typeof o&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new Ze("Expected value to be one of "+Object.keys(this._enumValues).map((function(r){return JSON.stringify(r)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(c){return this._warningHistory[c.message]||(this._warningHistory[c.message]=!0,"undefined"!==typeof console&&console.warn(c.message)),this._defaultValue}};var ya=function(r,e){this.kind=r,this._styleExpression=e,this.isStateDependent="constant"!==r&&!wn(e.expression)};ya.prototype.evaluateWithoutErrorHandling=function(r,e,n,i,a,t){return this._styleExpression.evaluateWithoutErrorHandling(r,e,n,i,a,t)},ya.prototype.evaluate=function(r,e,n,i,a,t){return this._styleExpression.evaluate(r,e,n,i,a,t)};var fa=function(r,e,n,i){this.kind=r,this.zoomStops=n,this._styleExpression=e,this.isStateDependent="camera"!==r&&!wn(e.expression),this.interpolationType=i};function ga(r,e){if("error"===(r=Ia(r,e)).result)return r;var n=r.value.expression,i=zn(n);if(!i&&!$i(e))return Qi([new ge("","data expressions not supported")]);var a=Rn(n,["zoom"]);if(!a&&!ra(e))return Qi([new ge("","zoom expressions not supported")]);var t=va(n);if(!t&&!a)return Qi([new ge("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(t instanceof ge)return Qi([t]);if(t instanceof pi&&!ea(e))return Qi([new ge("",'"interpolate" expressions cannot be used with this property')]);if(!t)return Xi(new ya(i?"constant":"source",r.value));var o=t instanceof pi?t.interpolation:void 0;return Xi(new fa(i?"camera":"composite",r.value,t.labels,o))}fa.prototype.evaluateWithoutErrorHandling=function(r,e,n,i,a,t){return this._styleExpression.evaluateWithoutErrorHandling(r,e,n,i,a,t)},fa.prototype.evaluate=function(r,e,n,i,a,t){return this._styleExpression.evaluate(r,e,n,i,a,t)},fa.prototype.interpolationFactor=function(r,e,n){return this.interpolationType?pi.interpolationFactor(this.interpolationType,r,e,n):0};var _a=function(r,e){this._parameters=r,this._specification=e,Ie(this,ta(this._parameters,this._specification))};function ha(r,e){if(ia(r))return new _a(r,e);if(pa(r)){var n=ga(r,e);if("error"===n.result)throw new Error(n.value.map((function(r){return r.key+": "+r.message})).join(", "));return n.value}var i=r;return"string"===typeof r&&"color"===e.type&&(i=De.parse(r)),{kind:"constant",evaluate:function(){return i}}}function va(r){var e=null;if(r instanceof fi)e=va(r.result);else if(r instanceof yi)for(var n=0,i=r.args;ni.maximum?[new me(e,n,n+" is greater than the maximum value "+i.maximum)]:[]}function Aa(r){var e,n,i,a=r.valueSpec,t=ye(r.value.type),o={},c="categorical"!==t&&void 0===r.value.property,u=!c,d="array"===na(r.value.stops)&&"array"===na(r.value.stops[0])&&"object"===na(r.value.stops[0][0]),s=Ga({key:r.key,value:r.value,valueSpec:r.styleSpec.function,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:l,default:I}});return"identity"===t&&c&&s.push(new me(r.key,r.value,'missing required property "property"')),"identity"===t||r.value.stops||s.push(new me(r.key,r.value,'missing required property "stops"')),"exponential"===t&&r.valueSpec.expression&&!ea(r.valueSpec)&&s.push(new me(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(u&&!$i(r.valueSpec)?s.push(new me(r.key,r.value,"property functions not supported")):c&&!ra(r.valueSpec)&&s.push(new me(r.key,r.value,"zoom functions not supported"))),"categorical"!==t&&!d||void 0!==r.value.property||s.push(new me(r.key,r.value,'"property" property is required')),s;function l(r){if("identity"===t)return[new me(r.key,r.value,'identity function may not have a "stops" property')];var e=[],n=r.value;return e=e.concat(Ca({key:r.key,value:n,valueSpec:r.valueSpec,style:r.style,styleSpec:r.styleSpec,arrayElementValidator:m})),"array"===na(n)&&0===n.length&&e.push(new me(r.key,n,"array must have at least one stop")),e}function m(r){var e=[],t=r.value,c=r.key;if("array"!==na(t))return[new me(c,t,"array expected, "+na(t)+" found")];if(2!==t.length)return[new me(c,t,"array length 2 expected, length "+t.length+" found")];if(d){if("object"!==na(t[0]))return[new me(c,t,"object expected, "+na(t[0])+" found")];if(void 0===t[0].zoom)return[new me(c,t,"object stop key must have zoom")];if(void 0===t[0].value)return[new me(c,t,"object stop key must have value")];if(i&&i>ye(t[0].zoom))return[new me(c,t[0].zoom,"stop zoom values must appear in ascending order")];ye(t[0].zoom)!==i&&(i=ye(t[0].zoom),n=void 0,o={}),e=e.concat(Ga({key:c+"[0]",value:t[0],valueSpec:{zoom:{}},style:r.style,styleSpec:r.styleSpec,objectElementValidators:{zoom:Sa,value:p}}))}else e=e.concat(p({key:c+"[0]",value:t[0],valueSpec:{},style:r.style,styleSpec:r.styleSpec},t));return pa(fe(t[1]))?e.concat([new me(c+"[1]",t[1],"expressions are not allowed in function stops.")]):e.concat(nt({key:c+"[1]",value:t[1],valueSpec:a,style:r.style,styleSpec:r.styleSpec}))}function p(r,i){var c=na(r.value),u=ye(r.value),d=null!==r.value?r.value:i;if(e){if(c!==e)return[new me(r.key,d,c+" stop domain type must match previous stop domain type "+e)]}else e=c;if("number"!==c&&"string"!==c&&"boolean"!==c)return[new me(r.key,d,"stop domain value must be a number, string, or boolean")];if("number"!==c&&"categorical"!==t){var s="number expected, "+c+" found";return $i(a)&&void 0===t&&(s+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new me(r.key,d,s)]}return"categorical"!==t||"number"!==c||isFinite(u)&&Math.floor(u)===u?"categorical"!==t&&"number"===c&&void 0!==n&&u=2&&"$id"!==r[1]&&"$type"!==r[1];case"in":return r.length>=3&&("string"!==typeof r[1]||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==r.length||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(var e=0,n=r.slice(1);ee?1:0}function Ea(r){if(!Array.isArray(r))return!1;if("within"===r[0])return!0;for(var e=1;e"===e||"<="===e||">="===e?Ta(r[1],r[2],e):"any"===e?Da(r.slice(1)):"all"===e?["all"].concat(r.slice(1).map(Na)):"none"===e?["all"].concat(r.slice(1).map(Na).map(Ha)):"in"===e?Ja(r[1],r.slice(2)):"!in"===e?Ha(Ja(r[1],r.slice(2))):"has"===e?Ua(r[1]):"!has"===e?Ha(Ua(r[1])):"within"!==e||r}function Ta(r,e,n){switch(r){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,r,e]}}function Da(r){return["any"].concat(r.map(Na))}function Ja(r,e){if(0===e.length)return!1;switch(r){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(r){return typeof r!==typeof e[0]}))?["filter-in-large",r,["literal",e.sort(Ra)]]:["filter-in-small",r,["literal",e]]}}function Ua(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function Ha(r){return["!",r]}function La(r){return Fa(fe(r.value))?ba(Ie({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Oa(r)}function Oa(r){var e=r.value,n=r.key;if("array"!==na(e))return[new me(n,e,"array expected, "+na(e)+" found")];var i,a=r.styleSpec,t=[];if(e.length<1)return[new me(n,e,"filter array must have at least 1 element")];switch(t=t.concat(ka({key:n+"[0]",value:e[0],valueSpec:a.filter_operator,style:r.style,styleSpec:r.styleSpec})),ye(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===ye(e[1])&&t.push(new me(n,e,'"$type" cannot be use with operator "'+e[0]+'"'));case"==":case"!=":3!==e.length&&t.push(new me(n,e,'filter array for operator "'+e[0]+'" must have 3 elements'));case"in":case"!in":e.length>=2&&"string"!==(i=na(e[1]))&&t.push(new me(n+"[1]",e[1],"string expected, "+i+" found"));for(var o=2;o=s[p+0]&&i>=s[p+1])?(o[m]=!0,t.push(d[m])):o[m]=!1}}},It.prototype._forEachCell=function(r,e,n,i,a,t,o,c){for(var u=this._convertToCellCoord(r),d=this._convertToCellCoord(e),s=this._convertToCellCoord(n),l=this._convertToCellCoord(i),m=u;m<=s;m++)for(var p=d;p<=l;p++){var I=this.d*p+m;if((!c||c(this._convertFromCellCoord(m),this._convertFromCellCoord(p),this._convertFromCellCoord(m+1),this._convertFromCellCoord(p+1)))&&a.call(this,r,e,n,i,I,t,o,c))return}},It.prototype._convertFromCellCoord=function(r){return(r-this.padding)/this.scale},It.prototype._convertToCellCoord=function(r){return Math.max(0,Math.min(this.d-1,Math.floor(r*this.scale)+this.padding))},It.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var r=this.cells,e=pt+this.cells.length+1+1,n=0,i=0;i=0)){var l=r[s];d[s]=gt[u].shallow.indexOf(s)>=0?l:Pt(l,e)}r instanceof Error&&(d.message=r.message)}if(d.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(d.$name=u),d}throw new Error("can't serialize object of type "+typeof r)}function Gt(r){if(null===r||void 0===r||"boolean"===typeof r||"number"===typeof r||"string"===typeof r||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp||vt(r)||xt(r)||ArrayBuffer.isView(r)||r instanceof yt)return r;if(Array.isArray(r))return r.map(Gt);if("object"===typeof r){var e=r.$name||"Object",n=gt[e].klass;if(!n)throw new Error("can't deserialize unregistered class "+e);if(n.deserialize)return n.deserialize(r);for(var i=Object.create(n.prototype),a=0,t=Object.keys(r);a=0?c:Gt(c)}}return i}throw new Error("can't deserialize object of type "+typeof r)}var Ct=function(){this.first=!0};Ct.prototype.update=function(r,e){var n=Math.floor(r);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=r,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom=128&&r<=255},Arabic:function(r){return r>=1536&&r<=1791},"Arabic Supplement":function(r){return r>=1872&&r<=1919},"Arabic Extended-A":function(r){return r>=2208&&r<=2303},"Hangul Jamo":function(r){return r>=4352&&r<=4607},"Unified Canadian Aboriginal Syllabics":function(r){return r>=5120&&r<=5759},Khmer:function(r){return r>=6016&&r<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(r){return r>=6320&&r<=6399},"General Punctuation":function(r){return r>=8192&&r<=8303},"Letterlike Symbols":function(r){return r>=8448&&r<=8527},"Number Forms":function(r){return r>=8528&&r<=8591},"Miscellaneous Technical":function(r){return r>=8960&&r<=9215},"Control Pictures":function(r){return r>=9216&&r<=9279},"Optical Character Recognition":function(r){return r>=9280&&r<=9311},"Enclosed Alphanumerics":function(r){return r>=9312&&r<=9471},"Geometric Shapes":function(r){return r>=9632&&r<=9727},"Miscellaneous Symbols":function(r){return r>=9728&&r<=9983},"Miscellaneous Symbols and Arrows":function(r){return r>=11008&&r<=11263},"CJK Radicals Supplement":function(r){return r>=11904&&r<=12031},"Kangxi Radicals":function(r){return r>=12032&&r<=12255},"Ideographic Description Characters":function(r){return r>=12272&&r<=12287},"CJK Symbols and Punctuation":function(r){return r>=12288&&r<=12351},Hiragana:function(r){return r>=12352&&r<=12447},Katakana:function(r){return r>=12448&&r<=12543},Bopomofo:function(r){return r>=12544&&r<=12591},"Hangul Compatibility Jamo":function(r){return r>=12592&&r<=12687},Kanbun:function(r){return r>=12688&&r<=12703},"Bopomofo Extended":function(r){return r>=12704&&r<=12735},"CJK Strokes":function(r){return r>=12736&&r<=12783},"Katakana Phonetic Extensions":function(r){return r>=12784&&r<=12799},"Enclosed CJK Letters and Months":function(r){return r>=12800&&r<=13055},"CJK Compatibility":function(r){return r>=13056&&r<=13311},"CJK Unified Ideographs Extension A":function(r){return r>=13312&&r<=19903},"Yijing Hexagram Symbols":function(r){return r>=19904&&r<=19967},"CJK Unified Ideographs":function(r){return r>=19968&&r<=40959},"Yi Syllables":function(r){return r>=40960&&r<=42127},"Yi Radicals":function(r){return r>=42128&&r<=42191},"Hangul Jamo Extended-A":function(r){return r>=43360&&r<=43391},"Hangul Syllables":function(r){return r>=44032&&r<=55215},"Hangul Jamo Extended-B":function(r){return r>=55216&&r<=55295},"Private Use Area":function(r){return r>=57344&&r<=63743},"CJK Compatibility Ideographs":function(r){return r>=63744&&r<=64255},"Arabic Presentation Forms-A":function(r){return r>=64336&&r<=65023},"Vertical Forms":function(r){return r>=65040&&r<=65055},"CJK Compatibility Forms":function(r){return r>=65072&&r<=65103},"Small Form Variants":function(r){return r>=65104&&r<=65135},"Arabic Presentation Forms-B":function(r){return r>=65136&&r<=65279},"Halfwidth and Fullwidth Forms":function(r){return r>=65280&&r<=65519}};function At(r){for(var e=0,n=r;e=65097&&r<=65103)||!!St["CJK Compatibility Ideographs"](r)||!!St["CJK Compatibility"](r)||!!St["CJK Radicals Supplement"](r)||!!St["CJK Strokes"](r)||!(!St["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||12336===r)||!!St["CJK Unified Ideographs Extension A"](r)||!!St["CJK Unified Ideographs"](r)||!!St["Enclosed CJK Letters and Months"](r)||!!St["Hangul Compatibility Jamo"](r)||!!St["Hangul Jamo Extended-A"](r)||!!St["Hangul Jamo Extended-B"](r)||!!St["Hangul Jamo"](r)||!!St["Hangul Syllables"](r)||!!St.Hiragana(r)||!!St["Ideographic Description Characters"](r)||!!St.Kanbun(r)||!!St["Kangxi Radicals"](r)||!!St["Katakana Phonetic Extensions"](r)||!(!St.Katakana(r)||12540===r)||!(!St["Halfwidth and Fullwidth Forms"](r)||65288===r||65289===r||65293===r||r>=65306&&r<=65310||65339===r||65341===r||65343===r||r>=65371&&r<=65503||65507===r||r>=65512&&r<=65519)||!(!St["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||!!St["Unified Canadian Aboriginal Syllabics"](r)||!!St["Unified Canadian Aboriginal Syllabics Extended"](r)||!!St["Vertical Forms"](r)||!!St["Yijing Hexagram Symbols"](r)||!!St["Yi Syllables"](r)||!!St["Yi Radicals"](r))}function Ft(r){return!(!St["Latin-1 Supplement"](r)||167!==r&&169!==r&&174!==r&&177!==r&&188!==r&&189!==r&&190!==r&&215!==r&&247!==r)||!(!St["General Punctuation"](r)||8214!==r&&8224!==r&&8225!==r&&8240!==r&&8241!==r&&8251!==r&&8252!==r&&8258!==r&&8263!==r&&8264!==r&&8265!==r&&8273!==r)||!!St["Letterlike Symbols"](r)||!!St["Number Forms"](r)||!(!St["Miscellaneous Technical"](r)||!(r>=8960&&r<=8967||r>=8972&&r<=8991||r>=8996&&r<=9e3||9003===r||r>=9085&&r<=9114||r>=9150&&r<=9165||9167===r||r>=9169&&r<=9179||r>=9186&&r<=9215))||!(!St["Control Pictures"](r)||9251===r)||!!St["Optical Character Recognition"](r)||!!St["Enclosed Alphanumerics"](r)||!!St["Geometric Shapes"](r)||!(!St["Miscellaneous Symbols"](r)||r>=9754&&r<=9759)||!(!St["Miscellaneous Symbols and Arrows"](r)||!(r>=11026&&r<=11055||r>=11088&&r<=11097||r>=11192&&r<=11243))||!!St["CJK Symbols and Punctuation"](r)||!!St.Katakana(r)||!!St["Private Use Area"](r)||!!St["CJK Compatibility Forms"](r)||!!St["Small Form Variants"](r)||!!St["Halfwidth and Fullwidth Forms"](r)||8734===r||8756===r||8757===r||r>=9984&&r<=10087||r>=10102&&r<=10131||65532===r||65533===r}function zt(r){return!(kt(r)||Ft(r))}function wt(r){return St.Arabic(r)||St["Arabic Supplement"](r)||St["Arabic Extended-A"](r)||St["Arabic Presentation Forms-A"](r)||St["Arabic Presentation Forms-B"](r)}function Rt(r){return r>=1424&&r<=2303||St["Arabic Presentation Forms-A"](r)||St["Arabic Presentation Forms-B"](r)}function Et(r,e){return!(!e&&Rt(r))&&!(r>=2304&&r<=3583||r>=3840&&r<=4255||St.Khmer(r))}function Nt(r){for(var e=0,n=r;e-1&&(Ut=Dt.error),Jt&&Jt(r)};function Ot(){Kt.fire(new ue("pluginStateChange",{pluginStatus:Ut,pluginURL:Ht}))}var Kt=new se,Vt=function(){return Ut},jt=function(r){return r({pluginStatus:Ut,pluginURL:Ht}),Kt.on("pluginStateChange",r),r},Wt=function(r,e,n){if(void 0===n&&(n=!1),Ut===Dt.deferred||Ut===Dt.loading||Ut===Dt.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ht=Y.resolveURL(r),Ut=Dt.deferred,Jt=e,Ot(),n||Zt()},Zt=function(){if(Ut!==Dt.deferred||!Ht)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ut=Dt.loading,Ot(),Ht&&Yr({url:Ht},(function(r){r?Lt(r):(Ut=Dt.loaded,Ot())}))},qt={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ut===Dt.loaded||null!=qt.applyArabicShaping},isLoading:function(){return Ut===Dt.loading},setState:function(r){Ut=r.pluginStatus,Ht=r.pluginURL},isParsed:function(){return null!=qt.applyArabicShaping&&null!=qt.processBidirectionalText&&null!=qt.processStyledBidirectionalText},getPluginURL:function(){return Ht}},Yt=function(){qt.isLoading()||qt.isLoaded()||"deferred"!==Vt()||Zt()},Xt=function(r,e){this.zoom=r,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ct,this.transition={})};Xt.prototype.isSupportedScript=function(r){return Tt(r,qt.isLoaded())},Xt.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Xt.prototype.getCrossfadeParameters=function(){var r=this.zoom,e=r-Math.floor(r),n=this.crossFadingFactor();return r>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}};var Qt=function(r,e){this.property=r,this.value=e,this.expression=ha(void 0===e?r.specification.default:e,r.specification)};Qt.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Qt.prototype.possiblyEvaluate=function(r,e,n){return this.property.possiblyEvaluate(this,r,e,n)};var $t=function(r){this.property=r,this.value=new Qt(r,void 0)};$t.prototype.transitioned=function(r,e){return new eo(this.property,this.value,e,_({},r.transition,this.transition),r.now)},$t.prototype.untransitioned=function(){return new eo(this.property,this.value,null,{},0)};var ro=function(r){this._properties=r,this._values=Object.create(r.defaultTransitionablePropertyValues)};ro.prototype.getValue=function(r){return B(this._values[r].value.value)},ro.prototype.setValue=function(r,e){this._values.hasOwnProperty(r)||(this._values[r]=new $t(this._values[r].property)),this._values[r].value=new Qt(this._values[r].property,null===e?void 0:B(e))},ro.prototype.getTransition=function(r){return B(this._values[r].transition)},ro.prototype.setTransition=function(r,e){this._values.hasOwnProperty(r)||(this._values[r]=new $t(this._values[r].property)),this._values[r].transition=B(e)||void 0},ro.prototype.serialize=function(){for(var r={},e=0,n=Object.keys(this._values);ethis.end)return this.prior=null,a;if(this.value.isDataDriven())return this.prior=null,a;if(ii.zoomHistory.lastIntegerZoom?{from:r,to:e}:{from:n,to:e}},e.prototype.interpolate=function(r){return r},e}(co),so=function(r){this.specification=r};so.prototype.possiblyEvaluate=function(r,e,n,i){if(void 0!==r.value){if("constant"===r.expression.kind){var a=r.expression.evaluate(e,null,{},n,i);return this._calculate(a,a,a,e)}return this._calculate(r.expression.evaluate(new Xt(Math.floor(e.zoom-1),e)),r.expression.evaluate(new Xt(Math.floor(e.zoom),e)),r.expression.evaluate(new Xt(Math.floor(e.zoom+1),e)),e)}},so.prototype._calculate=function(r,e,n,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:r,to:e}:{from:n,to:e}},so.prototype.interpolate=function(r){return r};var lo=function(r){this.specification=r};lo.prototype.possiblyEvaluate=function(r,e,n,i){return!!r.expression.evaluate(e,null,{},n,i)},lo.prototype.interpolate=function(){return!1};var mo=function(r){for(var e in this.properties=r,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],r){var n=r[e];n.specification.overridable&&this.overridableProperties.push(e);var i=this.defaultPropertyValues[e]=new Qt(n,void 0),a=this.defaultTransitionablePropertyValues[e]=new $t(n);this.defaultTransitioningPropertyValues[e]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};_t("DataDrivenProperty",co),_t("DataConstantProperty",oo),_t("CrossFadedDataDrivenProperty",uo),_t("CrossFadedProperty",so),_t("ColorRampProperty",lo);var po="-transition",Io=function(r){function e(e,n){if(r.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),n.layout&&(this._unevaluatedLayout=new io(n.layout)),n.paint)){for(var i in this._transitionablePaint=new ro(n.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var a in e.layout)this.setLayoutProperty(a,e.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new to(n.paint)}}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(r){return"visibility"===r?this.visibility:this._unevaluatedLayout.getValue(r)},e.prototype.setLayoutProperty=function(r,e,n){if(void 0===n&&(n={}),null!==e&&void 0!==e){var i="layers."+this.id+".layout."+r;if(this._validate(st,i,r,e,n))return}"visibility"!==r?this._unevaluatedLayout.setValue(r,e):this.visibility=e},e.prototype.getPaintProperty=function(r){return A(r,po)?this._transitionablePaint.getTransition(r.slice(0,-po.length)):this._transitionablePaint.getValue(r)},e.prototype.setPaintProperty=function(r,e,n){if(void 0===n&&(n={}),null!==e&&void 0!==e){var i="layers."+this.id+".paint."+r;if(this._validate(dt,i,r,e,n))return!1}if(A(r,po))return this._transitionablePaint.setTransition(r.slice(0,-po.length),e||void 0),!1;var a=this._transitionablePaint._values[r],t="cross-faded-data-driven"===a.property.specification["property-type"],o=a.value.isDataDriven(),c=a.value;this._transitionablePaint.setValue(r,e),this._handleSpecialPaintPropertyUpdate(r);var u=this._transitionablePaint._values[r].value;return u.isDataDriven()||o||t||this._handleOverridablePaintPropertyUpdate(r,c,u)},e.prototype._handleSpecialPaintPropertyUpdate=function(r){},e.prototype._handleOverridablePaintPropertyUpdate=function(r,e,n){return!1},e.prototype.isHidden=function(r){return!!(this.minzoom&&r=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(r){this._transitioningPaint=this._transitionablePaint.transitioned(r,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(r,e){r.getCrossfadeParameters&&(this._crossfadeParameters=r.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(r,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(r,void 0,e)},e.prototype.serialize=function(){var r={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&&(r.layout=r.layout||{},r.layout.visibility=this.visibility),M(r,(function(r,e){return void 0!==r&&!("layout"===e&&!Object.keys(r).length)&&!("paint"===e&&!Object.keys(r).length)}))},e.prototype._validate=function(r,e,n,i,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&<(this,r.call(ct,{key:e,layerType:this.type,objectKey:n,value:i,styleSpec:le,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var r in this.paint._values){var e=this.paint.get(r);if(e instanceof ao&&$i(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(se),yo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},fo=function(r,e){this._structArray=r,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},go=128,_o=5,ho=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function vo(r,e){void 0===e&&(e=1);var n=0,i=0;return{members:r.map((function(r){var a=xo(r.type),t=n=Po(n,Math.max(e,a)),o=r.components||1;return i=Math.max(i,a),n+=a*o,{name:r.name,type:r.type,components:o,offset:t}})),size:Po(n,Math.max(i,e)),alignment:e}}function xo(r){return yo[r].BYTES_PER_ELEMENT}function Po(r,e){return Math.ceil(r/e)*e}ho.serialize=function(r,e){return r._trim(),e&&(r.isTransferred=!0,e.push(r.arrayBuffer)),{length:r.length,arrayBuffer:r.arrayBuffer}},ho.deserialize=function(r){var e=Object.create(this.prototype);return e.arrayBuffer=r.arrayBuffer,e.length=r.length,e.capacity=r.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},ho.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ho.prototype.clear=function(){this.length=0},ho.prototype.resize=function(r){this.reserve(r),this.length=r},ho.prototype.reserve=function(r){if(r>this.capacity){this.capacity=Math.max(r,Math.floor(this.capacity*_o),go),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},ho.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Go=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e){var n=this.length;return this.resize(n+1),this.emplace(n,r,e)},e.prototype.emplace=function(r,e,n){var i=2*r;return this.int16[i+0]=e,this.int16[i+1]=n,r},e}(ho);Go.prototype.bytesPerElement=4,_t("StructArrayLayout2i4",Go);var Co=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,r,e,n,i)},e.prototype.emplace=function(r,e,n,i,a){var t=4*r;return this.int16[t+0]=e,this.int16[t+1]=n,this.int16[t+2]=i,this.int16[t+3]=a,r},e}(ho);Co.prototype.bytesPerElement=8,_t("StructArrayLayout4i8",Co);var So=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t){var o=this.length;return this.resize(o+1),this.emplace(o,r,e,n,i,a,t)},e.prototype.emplace=function(r,e,n,i,a,t,o){var c=6*r;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=i,this.int16[c+3]=a,this.int16[c+4]=t,this.int16[c+5]=o,r},e}(ho);So.prototype.bytesPerElement=12,_t("StructArrayLayout2i4i12",So);var Ao=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t){var o=this.length;return this.resize(o+1),this.emplace(o,r,e,n,i,a,t)},e.prototype.emplace=function(r,e,n,i,a,t,o){var c=4*r,u=8*r;return this.int16[c+0]=e,this.int16[c+1]=n,this.uint8[u+4]=i,this.uint8[u+5]=a,this.uint8[u+6]=t,this.uint8[u+7]=o,r},e}(ho);Ao.prototype.bytesPerElement=8,_t("StructArrayLayout2i4ub8",Ao);var bo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e){var n=this.length;return this.resize(n+1),this.emplace(n,r,e)},e.prototype.emplace=function(r,e,n){var i=2*r;return this.float32[i+0]=e,this.float32[i+1]=n,r},e}(ho);bo.prototype.bytesPerElement=8,_t("StructArrayLayout2f8",bo);var Mo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u,d){var s=this.length;return this.resize(s+1),this.emplace(s,r,e,n,i,a,t,o,c,u,d)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d,s){var l=10*r;return this.uint16[l+0]=e,this.uint16[l+1]=n,this.uint16[l+2]=i,this.uint16[l+3]=a,this.uint16[l+4]=t,this.uint16[l+5]=o,this.uint16[l+6]=c,this.uint16[l+7]=u,this.uint16[l+8]=d,this.uint16[l+9]=s,r},e}(ho);Mo.prototype.bytesPerElement=20,_t("StructArrayLayout10ui20",Mo);var Bo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u,d,s,l){var m=this.length;return this.resize(m+1),this.emplace(m,r,e,n,i,a,t,o,c,u,d,s,l)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d,s,l,m){var p=12*r;return this.int16[p+0]=e,this.int16[p+1]=n,this.int16[p+2]=i,this.int16[p+3]=a,this.uint16[p+4]=t,this.uint16[p+5]=o,this.uint16[p+6]=c,this.uint16[p+7]=u,this.int16[p+8]=d,this.int16[p+9]=s,this.int16[p+10]=l,this.int16[p+11]=m,r},e}(ho);Bo.prototype.bytesPerElement=24,_t("StructArrayLayout4i4ui4i24",Bo);var ko=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,r,e,n)},e.prototype.emplace=function(r,e,n,i){var a=3*r;return this.float32[a+0]=e,this.float32[a+1]=n,this.float32[a+2]=i,r},e}(ho);ko.prototype.bytesPerElement=12,_t("StructArrayLayout3f12",ko);var Fo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r){var e=this.length;return this.resize(e+1),this.emplace(e,r)},e.prototype.emplace=function(r,e){var n=1*r;return this.uint32[n+0]=e,r},e}(ho);Fo.prototype.bytesPerElement=4,_t("StructArrayLayout1ul4",Fo);var zo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u){var d=this.length;return this.resize(d+1),this.emplace(d,r,e,n,i,a,t,o,c,u)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d){var s=10*r,l=5*r;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=i,this.int16[s+3]=a,this.int16[s+4]=t,this.int16[s+5]=o,this.uint32[l+3]=c,this.uint16[s+8]=u,this.uint16[s+9]=d,r},e}(ho);zo.prototype.bytesPerElement=20,_t("StructArrayLayout6i1ul2ui20",zo);var wo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t){var o=this.length;return this.resize(o+1),this.emplace(o,r,e,n,i,a,t)},e.prototype.emplace=function(r,e,n,i,a,t,o){var c=6*r;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=i,this.int16[c+3]=a,this.int16[c+4]=t,this.int16[c+5]=o,r},e}(ho);wo.prototype.bytesPerElement=12,_t("StructArrayLayout2i2i2i12",wo);var Ro=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a){var t=this.length;return this.resize(t+1),this.emplace(t,r,e,n,i,a)},e.prototype.emplace=function(r,e,n,i,a,t){var o=4*r,c=8*r;return this.float32[o+0]=e,this.float32[o+1]=n,this.float32[o+2]=i,this.int16[c+6]=a,this.int16[c+7]=t,r},e}(ho);Ro.prototype.bytesPerElement=16,_t("StructArrayLayout2f1f2i16",Ro);var Eo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,r,e,n,i)},e.prototype.emplace=function(r,e,n,i,a){var t=12*r,o=3*r;return this.uint8[t+0]=e,this.uint8[t+1]=n,this.float32[o+1]=i,this.float32[o+2]=a,r},e}(ho);Eo.prototype.bytesPerElement=12,_t("StructArrayLayout2ub2f12",Eo);var No=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,r,e,n)},e.prototype.emplace=function(r,e,n,i){var a=3*r;return this.uint16[a+0]=e,this.uint16[a+1]=n,this.uint16[a+2]=i,r},e}(ho);No.prototype.bytesPerElement=6,_t("StructArrayLayout3ui6",No);var To=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f){var g=this.length;return this.resize(g+1),this.emplace(g,r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g){var _=24*r,h=12*r,v=48*r;return this.int16[_+0]=e,this.int16[_+1]=n,this.uint16[_+2]=i,this.uint16[_+3]=a,this.uint32[h+2]=t,this.uint32[h+3]=o,this.uint32[h+4]=c,this.uint16[_+10]=u,this.uint16[_+11]=d,this.uint16[_+12]=s,this.float32[h+7]=l,this.float32[h+8]=m,this.uint8[v+36]=p,this.uint8[v+37]=I,this.uint8[v+38]=y,this.uint32[h+10]=f,this.int16[_+22]=g,r},e}(ho);To.prototype.bytesPerElement=48,_t("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",To);var Do=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b){var M=this.length;return this.resize(M+1),this.emplace(M,r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b,M){var B=34*r,k=17*r;return this.int16[B+0]=e,this.int16[B+1]=n,this.int16[B+2]=i,this.int16[B+3]=a,this.int16[B+4]=t,this.int16[B+5]=o,this.int16[B+6]=c,this.int16[B+7]=u,this.uint16[B+8]=d,this.uint16[B+9]=s,this.uint16[B+10]=l,this.uint16[B+11]=m,this.uint16[B+12]=p,this.uint16[B+13]=I,this.uint16[B+14]=y,this.uint16[B+15]=f,this.uint16[B+16]=g,this.uint16[B+17]=_,this.uint16[B+18]=h,this.uint16[B+19]=v,this.uint16[B+20]=x,this.uint16[B+21]=P,this.uint16[B+22]=G,this.uint32[k+12]=C,this.float32[k+13]=S,this.float32[k+14]=A,this.float32[k+15]=b,this.float32[k+16]=M,r},e}(ho);Do.prototype.bytesPerElement=68,_t("StructArrayLayout8i15ui1ul4f68",Do);var Jo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r){var e=this.length;return this.resize(e+1),this.emplace(e,r)},e.prototype.emplace=function(r,e){var n=1*r;return this.float32[n+0]=e,r},e}(ho);Jo.prototype.bytesPerElement=4,_t("StructArrayLayout1f4",Jo);var Uo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,r,e,n)},e.prototype.emplace=function(r,e,n,i){var a=3*r;return this.int16[a+0]=e,this.int16[a+1]=n,this.int16[a+2]=i,r},e}(ho);Uo.prototype.bytesPerElement=6,_t("StructArrayLayout3i6",Uo);var Ho=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,r,e,n)},e.prototype.emplace=function(r,e,n,i){var a=2*r,t=4*r;return this.uint32[a+0]=e,this.uint16[t+2]=n,this.uint16[t+3]=i,r},e}(ho);Ho.prototype.bytesPerElement=8,_t("StructArrayLayout1ul2ui8",Ho);var Lo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e){var n=this.length;return this.resize(n+1),this.emplace(n,r,e)},e.prototype.emplace=function(r,e,n){var i=2*r;return this.uint16[i+0]=e,this.uint16[i+1]=n,r},e}(ho);Lo.prototype.bytesPerElement=4,_t("StructArrayLayout2ui4",Lo);var Oo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r){var e=this.length;return this.resize(e+1),this.emplace(e,r)},e.prototype.emplace=function(r,e){var n=1*r;return this.uint16[n+0]=e,r},e}(ho);Oo.prototype.bytesPerElement=2,_t("StructArrayLayout1ui2",Oo);var Ko=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,r,e,n,i)},e.prototype.emplace=function(r,e,n,i,a){var t=4*r;return this.float32[t+0]=e,this.float32[t+1]=n,this.float32[t+2]=i,this.float32[t+3]=a,r},e}(ho);Ko.prototype.bytesPerElement=16,_t("StructArrayLayout4f16",Ko);var Vo=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var n={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},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new t(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(fo);Vo.prototype.size=20;var jo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return new Vo(this,r)},e}(zo);_t("CollisionBoxArray",jo);var Wo=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var n={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},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(r){this._structArray.uint8[this._pos1+37]=r},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(r){this._structArray.uint8[this._pos1+38]=r},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(r){this._structArray.uint32[this._pos4+10]=r},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,n),e}(fo);Wo.prototype.size=48;var Zo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return new Wo(this,r)},e}(To);_t("PlacedSymbolArray",Zo);var qo=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(r){this._structArray.uint32[this._pos4+12]=r},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,n),e}(fo);qo.prototype.size=68;var Yo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return new qo(this,r)},e}(Do);_t("SymbolInstanceArray",Yo);var Xo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(r){return this.float32[1*r+0]},e}(Jo);_t("GlyphOffsetArray",Xo);var Qo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getx=function(r){return this.int16[3*r+0]},e.prototype.gety=function(r){return this.int16[3*r+1]},e.prototype.gettileUnitDistanceFromAnchor=function(r){return this.int16[3*r+2]},e}(Uo);_t("SymbolLineVertexArray",Qo);var $o=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,n),e}(fo);$o.prototype.size=8;var rc=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return new $o(this,r)},e}(Ho);_t("FeatureIndexArray",rc);var ec=vo([{name:"a_pos",components:2,type:"Int16"}],4).members,nc=function(r){void 0===r&&(r=[]),this.segments=r};function ic(r,e){return 256*(r=p(Math.floor(r),0,255))+(e=p(Math.floor(e),0,255))}nc.prototype.prepareSegment=function(r,e,n,i){var a=this.segments[this.segments.length-1];return r>nc.MAX_VERTEX_ARRAY_LENGTH&&z("Max vertices per segment is "+nc.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+r),(!a||a.vertexLength+r>nc.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==i)&&(a={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==i&&(a.sortKey=i),this.segments.push(a)),a},nc.prototype.get=function(){return this.segments},nc.prototype.destroy=function(){for(var r=0,e=this.segments;r>>16)*o&65535)<<16)&4294967295)<<15|u>>>17))*c+(((u>>>16)*c&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(t>>>16)&65535)<<16);switch(u=0,n){case 3:u^=(255&r.charCodeAt(d+2))<<16;case 2:u^=(255&r.charCodeAt(d+1))<<8;case 1:a^=u=(65535&(u=(u=(65535&(u^=255&r.charCodeAt(d)))*o+(((u>>>16)*o&65535)<<16)&4294967295)<<15|u>>>17))*c+(((u>>>16)*c&65535)<<16)&4294967295}return a^=r.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}r.exports=e})),oc=e((function(r){function e(r,e){for(var n,i=r.length,a=e^i,t=0;i>=4;)n=1540483477*(65535&(n=255&r.charCodeAt(t)|(255&r.charCodeAt(++t))<<8|(255&r.charCodeAt(++t))<<16|(255&r.charCodeAt(++t))<<24))+((1540483477*(n>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),i-=4,++t;switch(i){case 3:a^=(255&r.charCodeAt(t+2))<<16;case 2:a^=(255&r.charCodeAt(t+1))<<8;case 1:a=1540483477*(65535&(a^=255&r.charCodeAt(t)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}r.exports=e})),cc=tc,uc=tc,dc=oc;cc.murmur3=uc,cc.murmur2=dc;var sc=function(){this.ids=[],this.positions=[],this.indexed=!1};sc.prototype.add=function(r,e,n,i){this.ids.push(mc(r)),this.positions.push(e,n,i)},sc.prototype.getPositions=function(r){for(var e=mc(r),n=0,i=this.ids.length-1;n>1;this.ids[a]>=e?i=a:n=a+1}for(var t=[];this.ids[n]===e;){var o=this.positions[3*n],c=this.positions[3*n+1],u=this.positions[3*n+2];t.push({index:o,start:c,end:u}),n++}return t},sc.serialize=function(r,e){var n=new Float64Array(r.ids),i=new Uint32Array(r.positions);return pc(n,i,0,n.length-1),e&&e.push(n.buffer,i.buffer),{ids:n,positions:i}},sc.deserialize=function(r){var e=new sc;return e.ids=r.ids,e.positions=r.positions,e.indexed=!0,e};var lc=Math.pow(2,53)-1;function mc(r){var e=+r;return!isNaN(e)&&e<=lc?e:cc(String(r))}function pc(r,e,n,i){for(;n>1],t=n-1,o=i+1;;){do{t++}while(r[t]a);if(t>=o)break;Ic(r,t,o),Ic(e,3*t,3*o),Ic(e,3*t+1,3*o+1),Ic(e,3*t+2,3*o+2)}o-no.x+1||uo.y+1)&&z("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}function Uc(r,e){return{type:r.type,id:r.id,properties:r.properties,geometry:e?Jc(r):[]}}function Hc(r,e,n,i,a){r.emplaceBack(2*e+(i+1)/2,2*n+(a+1)/2)}var Lc=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map((function(r){return r.id})),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new Go,this.indexArray=new No,this.segments=new nc,this.programConfigurations=new Fc(r.layers,r.zoom),this.stateDependentLayerIds=this.layers.filter((function(r){return r.isStateDependent()})).map((function(r){return r.id}))};function Oc(r,e){for(var n=0;n=3)for(var t=0;t1){if(Zc(r,e))return!0;for(var i=0;i1?r.distSqr(n):r.distSqr(n.sub(e)._mult(a)._add(e))}function Qc(r,e){for(var n,i,a,t=!1,o=0;oe.y!==a.y>e.y&&e.x<(a.x-i.x)*(e.y-i.y)/(a.y-i.y)+i.x&&(t=!t);return t}function $c(r,e){for(var n=!1,i=0,a=r.length-1;ie.y!==o.y>e.y&&e.x<(o.x-t.x)*(e.y-t.y)/(o.y-t.y)+t.x&&(n=!n)}return n}function ru(r,e,n,i,a){for(var o=0,c=r;o=u.x&&a>=u.y)return!0}var d=[new t(e,n),new t(e,a),new t(i,a),new t(i,n)];if(r.length>2)for(var s=0,l=d;sa.x&&e.x>a.x||r.ya.y&&e.y>a.y)return!1;var t=w(r,e,n[0]);return t!==w(r,e,n[1])||t!==w(r,e,n[2])||t!==w(r,e,n[3])}function nu(r,e,n){var i=e.paint.get(r).value;return"constant"===i.kind?i.value:n.programConfigurations.get(e.id).getMaxValue(r)}function iu(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function au(r,e,n,i,a){if(!e[0]&&!e[1])return r;var o=t.convert(e)._mult(a);"viewport"===n&&o._rotate(-i);for(var c=[],u=0;u=Ec||s<0||s>=Ec)){var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,r.sortKey),m=l.vertexLength;Hc(this.layoutVertexArray,d,s,-1,-1),Hc(this.layoutVertexArray,d,s,1,-1),Hc(this.layoutVertexArray,d,s,1,1),Hc(this.layoutVertexArray,d,s,-1,1),this.indexArray.emplaceBack(m,m+1,m+2),this.indexArray.emplaceBack(m,m+3,m+2),l.vertexLength+=4,l.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,n,{},i)},_t("CircleBucket",Lc,{omit:["layers"]});var tu=new mo({"circle-sort-key":new co(le.layout_circle["circle-sort-key"])}),ou={paint:new mo({"circle-radius":new co(le.paint_circle["circle-radius"]),"circle-color":new co(le.paint_circle["circle-color"]),"circle-blur":new co(le.paint_circle["circle-blur"]),"circle-opacity":new co(le.paint_circle["circle-opacity"]),"circle-translate":new oo(le.paint_circle["circle-translate"]),"circle-translate-anchor":new oo(le.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new oo(le.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new oo(le.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new co(le.paint_circle["circle-stroke-width"]),"circle-stroke-color":new co(le.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new co(le.paint_circle["circle-stroke-opacity"])}),layout:tu},cu="undefined"!==typeof Float32Array?Float32Array:Array;function uu(){var r=new cu(4);return cu!=Float32Array&&(r[1]=0,r[2]=0),r[0]=1,r[3]=1,r}function du(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3],c=Math.sin(n),u=Math.cos(n);return r[0]=i*u+t*c,r[1]=a*u+o*c,r[2]=i*-c+t*u,r[3]=a*-c+o*u,r}function su(){var r=new cu(9);return cu!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function lu(r,e){var n=Math.sin(e),i=Math.cos(e);return r[0]=i,r[1]=n,r[2]=0,r[3]=-n,r[4]=i,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function mu(){var r=new cu(16);return cu!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r}function pu(r){var e=new cu(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function Iu(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function yu(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=e[4],c=e[5],u=e[6],d=e[7],s=e[8],l=e[9],m=e[10],p=e[11],I=e[12],y=e[13],f=e[14],g=e[15],_=n*c-i*o,h=n*u-a*o,v=n*d-t*o,x=i*u-a*c,P=i*d-t*c,G=a*d-t*u,C=s*y-l*I,S=s*f-m*I,A=s*g-p*I,b=l*f-m*y,M=l*g-p*y,B=m*g-p*f,k=_*B-h*M+v*b+x*A-P*S+G*C;return k?(k=1/k,r[0]=(c*B-u*M+d*b)*k,r[1]=(a*M-i*B-t*b)*k,r[2]=(y*G-f*P+g*x)*k,r[3]=(m*P-l*G-p*x)*k,r[4]=(u*A-o*B-d*S)*k,r[5]=(n*B-a*A+t*S)*k,r[6]=(f*v-I*G-g*h)*k,r[7]=(s*G-m*v+p*h)*k,r[8]=(o*M-c*A+d*C)*k,r[9]=(i*A-n*M-t*C)*k,r[10]=(I*P-y*v+g*_)*k,r[11]=(l*v-s*P-p*_)*k,r[12]=(c*S-o*b-u*C)*k,r[13]=(n*b-i*S+a*C)*k,r[14]=(y*h-I*x-f*_)*k,r[15]=(s*x-l*h+m*_)*k,r):null}function fu(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3],c=e[4],u=e[5],d=e[6],s=e[7],l=e[8],m=e[9],p=e[10],I=e[11],y=e[12],f=e[13],g=e[14],_=e[15],h=n[0],v=n[1],x=n[2],P=n[3];return r[0]=h*i+v*c+x*l+P*y,r[1]=h*a+v*u+x*m+P*f,r[2]=h*t+v*d+x*p+P*g,r[3]=h*o+v*s+x*I+P*_,h=n[4],v=n[5],x=n[6],P=n[7],r[4]=h*i+v*c+x*l+P*y,r[5]=h*a+v*u+x*m+P*f,r[6]=h*t+v*d+x*p+P*g,r[7]=h*o+v*s+x*I+P*_,h=n[8],v=n[9],x=n[10],P=n[11],r[8]=h*i+v*c+x*l+P*y,r[9]=h*a+v*u+x*m+P*f,r[10]=h*t+v*d+x*p+P*g,r[11]=h*o+v*s+x*I+P*_,h=n[12],v=n[13],x=n[14],P=n[15],r[12]=h*i+v*c+x*l+P*y,r[13]=h*a+v*u+x*m+P*f,r[14]=h*t+v*d+x*p+P*g,r[15]=h*o+v*s+x*I+P*_,r}function gu(r,e,n){var i,a,t,o,c,u,d,s,l,m,p,I,y=n[0],f=n[1],g=n[2];return e===r?(r[12]=e[0]*y+e[4]*f+e[8]*g+e[12],r[13]=e[1]*y+e[5]*f+e[9]*g+e[13],r[14]=e[2]*y+e[6]*f+e[10]*g+e[14],r[15]=e[3]*y+e[7]*f+e[11]*g+e[15]):(i=e[0],a=e[1],t=e[2],o=e[3],c=e[4],u=e[5],d=e[6],s=e[7],l=e[8],m=e[9],p=e[10],I=e[11],r[0]=i,r[1]=a,r[2]=t,r[3]=o,r[4]=c,r[5]=u,r[6]=d,r[7]=s,r[8]=l,r[9]=m,r[10]=p,r[11]=I,r[12]=i*y+c*f+l*g+e[12],r[13]=a*y+u*f+m*g+e[13],r[14]=t*y+d*f+p*g+e[14],r[15]=o*y+s*f+I*g+e[15]),r}function _u(r,e,n){var i=n[0],a=n[1],t=n[2];return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r[3]=e[3]*i,r[4]=e[4]*a,r[5]=e[5]*a,r[6]=e[6]*a,r[7]=e[7]*a,r[8]=e[8]*t,r[9]=e[9]*t,r[10]=e[10]*t,r[11]=e[11]*t,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function hu(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[4],o=e[5],c=e[6],u=e[7],d=e[8],s=e[9],l=e[10],m=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=t*a+d*i,r[5]=o*a+s*i,r[6]=c*a+l*i,r[7]=u*a+m*i,r[8]=d*a-t*i,r[9]=s*a-o*i,r[10]=l*a-c*i,r[11]=m*a-u*i,r}function vu(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[0],o=e[1],c=e[2],u=e[3],d=e[4],s=e[5],l=e[6],m=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=t*a+d*i,r[1]=o*a+s*i,r[2]=c*a+l*i,r[3]=u*a+m*i,r[4]=d*a-t*i,r[5]=s*a-o*i,r[6]=l*a-c*i,r[7]=m*a-u*i,r}function xu(r,e,n,i,a){var t,o=1/Math.tan(e/2);return r[0]=o/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=-1,r[12]=0,r[13]=0,r[15]=0,null!=a&&a!==1/0?(t=1/(i-a),r[10]=(a+i)*t,r[14]=2*a*i*t):(r[10]=-1,r[14]=-2*i),r}function Pu(r,e,n,i,a,t,o){var c=1/(e-n),u=1/(i-a),d=1/(t-o);return r[0]=-2*c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*u,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*d,r[11]=0,r[12]=(e+n)*c,r[13]=(a+i)*u,r[14]=(o+t)*d,r[15]=1,r}Math.hypot||(Math.hypot=function(){for(var r=arguments,e=0,n=arguments.length;n--;)e+=r[n]*r[n];return Math.sqrt(e)});var Gu=fu;function Cu(){var r=new cu(3);return cu!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Su(r){var e=new cu(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function Au(r,e,n){return r[0]=e[0]+n[0],r[1]=e[1]+n[1],r[2]=e[2]+n[2],r}function bu(r,e,n){return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],r}function Mu(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r}function Bu(r,e){var n=e[0],i=e[1],a=e[2],t=n*n+i*i+a*a;return t>0&&(t=1/Math.sqrt(t)),r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t,r}function ku(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Fu(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[0],c=n[1],u=n[2];return r[0]=a*u-t*c,r[1]=t*o-i*u,r[2]=i*c-a*o,r}function zu(r,e,n){var i=e[0],a=e[1],t=e[2];return r[0]=i*n[0]+a*n[3]+t*n[6],r[1]=i*n[1]+a*n[4]+t*n[7],r[2]=i*n[2]+a*n[5]+t*n[8],r}var wu=bu;function Ru(){var r=new cu(4);return cu!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function Eu(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r}function Nu(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]}function Tu(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3];return r[0]=n[0]*i+n[4]*a+n[8]*t+n[12]*o,r[1]=n[1]*i+n[5]*a+n[9]*t+n[13]*o,r[2]=n[2]*i+n[6]*a+n[10]*t+n[14]*o,r[3]=n[3]*i+n[7]*a+n[11]*t+n[15]*o,r}function Du(){var r=new cu(2);return cu!=Float32Array&&(r[0]=0,r[1]=0),r}function Ju(r){var e=r[0],n=r[1];return e*e+n*n}Cu(),Ru();var Uu=Ju,Hu=(Du(),function(r){function e(e){r.call(this,e,ou)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(r){return new Lc(r)},e.prototype.queryRadius=function(r){var e=r;return nu("circle-radius",this,e)+nu("circle-stroke-width",this,e)+iu(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(r,e,n,i,a,t,o,c){for(var u=au(r,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),t.angle,o),d=this.paint.get("circle-radius").evaluate(e,n)+this.paint.get("circle-stroke-width").evaluate(e,n),s="map"===this.paint.get("circle-pitch-alignment"),l=s?u:Ou(u,c),m=s?d*o:d,p=0,I=i;pr.width||a.height>r.height||n.x>r.width-a.width||n.y>r.height-a.height)throw new RangeError("out of range source coordinates for image copy");if(a.width>e.width||a.height>e.height||i.x>e.width-a.width||i.y>e.height-a.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=r.data,c=e.data,u=0;u80*n){i=t=r[0],a=o=r[1];for(var I=n;It&&(t=c),u>o&&(o=u);d=0!==(d=Math.max(t-i,o-a))?1/d:0}return cd(m,p,n,i,a,d),p}function td(r,e,n,i,a){var t,o;if(a===Ed(r,e,n,i)>0)for(t=e;t=e;t-=i)o=zd(t,r[t],r[t+1],o);return o&&Cd(o,o.next)&&(wd(o),o=o.next),o}function od(r,e){if(!r)return r;e||(e=r);var n,i=r;do{if(n=!1,i.steiner||!Cd(i,i.next)&&0!==Gd(i.prev,i,i.next))i=i.next;else{if(wd(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function cd(r,e,n,i,a,t,o){if(r){!o&&t&&gd(r,i,a,t);for(var c,u,d=r;r.prev!==r.next;)if(c=r.prev,u=r.next,t?dd(r,i,a,t):ud(r))e.push(c.i/n),e.push(r.i/n),e.push(u.i/n),wd(r),r=u.next,d=u.next;else if((r=u)===d){o?1===o?cd(r=sd(od(r),e,n),e,n,i,a,t,2):2===o&&ld(r,e,n,i,a,t):cd(od(r),e,n,i,a,t,1);break}}}function ud(r){var e=r.prev,n=r,i=r.next;if(Gd(e,n,i)>=0)return!1;for(var a=r.next.next;a!==r.prev;){if(xd(e.x,e.y,n.x,n.y,i.x,i.y,a.x,a.y)&&Gd(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function dd(r,e,n,i){var a=r.prev,t=r,o=r.next;if(Gd(a,t,o)>=0)return!1;for(var c=a.xt.x?a.x>o.x?a.x:o.x:t.x>o.x?t.x:o.x,s=a.y>t.y?a.y>o.y?a.y:o.y:t.y>o.y?t.y:o.y,l=hd(c,u,e,n,i),m=hd(d,s,e,n,i),p=r.prevZ,I=r.nextZ;p&&p.z>=l&&I&&I.z<=m;){if(p!==r.prev&&p!==r.next&&xd(a.x,a.y,t.x,t.y,o.x,o.y,p.x,p.y)&&Gd(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,I!==r.prev&&I!==r.next&&xd(a.x,a.y,t.x,t.y,o.x,o.y,I.x,I.y)&&Gd(I.prev,I,I.next)>=0)return!1;I=I.nextZ}for(;p&&p.z>=l;){if(p!==r.prev&&p!==r.next&&xd(a.x,a.y,t.x,t.y,o.x,o.y,p.x,p.y)&&Gd(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;I&&I.z<=m;){if(I!==r.prev&&I!==r.next&&xd(a.x,a.y,t.x,t.y,o.x,o.y,I.x,I.y)&&Gd(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function sd(r,e,n){var i=r;do{var a=i.prev,t=i.next.next;!Cd(a,t)&&Sd(a,i,i.next,t)&&Bd(a,t)&&Bd(t,a)&&(e.push(a.i/n),e.push(i.i/n),e.push(t.i/n),wd(i),wd(i.next),i=r=t),i=i.next}while(i!==r);return od(i)}function ld(r,e,n,i,a,t){var o=r;do{for(var c=o.next.next;c!==o.prev;){if(o.i!==c.i&&Pd(o,c)){var u=Fd(o,c);return o=od(o,o.next),u=od(u,u.next),cd(o,e,n,i,a,t),void cd(u,e,n,i,a,t)}c=c.next}o=o.next}while(o!==r)}function md(r,e,n,i){var a,t,o,c=[];for(a=0,t=e.length;a=i.next.y&&i.next.y!==i.y){var c=i.x+(t-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(c<=a&&c>o){if(o=c,c===a){if(t===i.y)return i;if(t===i.next.y)return i.next}n=i.x=i.x&&i.x>=s&&a!==i.x&&xd(tn.x||i.x===n.x&&fd(n,i)))&&(n=i,m=u)),i=i.next}while(i!==d);return n}function fd(r,e){return Gd(r.prev,r,e.prev)<0&&Gd(e.next,r,r.next)<0}function gd(r,e,n,i){var a=r;do{null===a.z&&(a.z=hd(a.x,a.y,e,n,i)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==r);a.prevZ.nextZ=null,a.prevZ=null,_d(a)}function _d(r){var e,n,i,a,t,o,c,u,d=1;do{for(n=r,r=null,t=null,o=0;n;){for(o++,i=n,c=0,e=0;e0||u>0&&i;)0!==c&&(0===u||!i||n.z<=i.z)?(a=n,n=n.nextZ,c--):(a=i,i=i.nextZ,u--),t?t.nextZ=a:r=a,a.prevZ=t,t=a;n=i}t.nextZ=null,d*=2}while(o>1);return r}function hd(r,e,n,i,a){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-n)*a)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*a)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function vd(r){var e=r,n=r;do{(e.x=0&&(r-o)*(i-c)-(n-o)*(e-c)>=0&&(n-o)*(t-c)-(a-o)*(i-c)>=0}function Pd(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!Md(r,e)&&(Bd(r,e)&&Bd(e,r)&&kd(r,e)&&(Gd(r.prev,r,e.prev)||Gd(r,e.prev,e))||Cd(r,e)&&Gd(r.prev,r,r.next)>0&&Gd(e.prev,e,e.next)>0)}function Gd(r,e,n){return(e.y-r.y)*(n.x-e.x)-(e.x-r.x)*(n.y-e.y)}function Cd(r,e){return r.x===e.x&&r.y===e.y}function Sd(r,e,n,i){var a=bd(Gd(r,e,n)),t=bd(Gd(r,e,i)),o=bd(Gd(n,i,r)),c=bd(Gd(n,i,e));return a!==t&&o!==c||!(0!==a||!Ad(r,n,e))||!(0!==t||!Ad(r,i,e))||!(0!==o||!Ad(n,r,i))||!(0!==c||!Ad(n,e,i))}function Ad(r,e,n){return e.x<=Math.max(r.x,n.x)&&e.x>=Math.min(r.x,n.x)&&e.y<=Math.max(r.y,n.y)&&e.y>=Math.min(r.y,n.y)}function bd(r){return r>0?1:r<0?-1:0}function Md(r,e){var n=r;do{if(n.i!==r.i&&n.next.i!==r.i&&n.i!==e.i&&n.next.i!==e.i&&Sd(n,n.next,r,e))return!0;n=n.next}while(n!==r);return!1}function Bd(r,e){return Gd(r.prev,r,r.next)<0?Gd(r,e,r.next)>=0&&Gd(r,r.prev,e)>=0:Gd(r,e,r.prev)<0||Gd(r,r.next,e)<0}function kd(r,e){var n=r,i=!1,a=(r.x+e.x)/2,t=(r.y+e.y)/2;do{n.y>t!==n.next.y>t&&n.next.y!==n.y&&a<(n.next.x-n.x)*(t-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==r);return i}function Fd(r,e){var n=new Rd(r.i,r.x,r.y),i=new Rd(e.i,e.x,e.y),a=r.next,t=e.prev;return r.next=e,e.prev=r,n.next=a,a.prev=n,i.next=n,n.prev=i,t.next=i,i.prev=t,i}function zd(r,e,n,i){var a=new Rd(r,e,n);return i?(a.next=i.next,a.prev=i,i.next.prev=a,i.next=a):(a.prev=a,a.next=a),a}function wd(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Rd(r,e,n){this.i=r,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ed(r,e,n,i){for(var a=0,t=e,o=n-i;tn;){if(i-n>600){var t=i-n+1,o=e-n+1,c=Math.log(t),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(t-u)/t)*(o-t/2<0?-1:1);Td(r,e,Math.max(n,Math.floor(e-o*u/t+d)),Math.min(i,Math.floor(e+(t-o)*u/t+d)),a)}var s=r[e],l=n,m=i;for(Dd(r,n,e),a(r[i],s)>0&&Dd(r,n,i);l0;)m--}0===a(r[n],s)?Dd(r,n,m):Dd(r,++m,i),m<=e&&(n=m+1),e<=m&&(i=m-1)}}function Dd(r,e,n){var i=r[e];r[e]=r[n],r[n]=i}function Jd(r,e){return re?1:0}function Ud(r,e){var n=r.length;if(n<=1)return[r];for(var i,a,t=[],o=0;o1)for(var u=0;u0&&(i+=r[a-1].length,n.holes.push(i))}return n},nd.default=id;var Kd=500,Vd=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map((function(r){return r.id})),this.index=r.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Go,this.indexArray=new No,this.indexArray2=new Lo,this.programConfigurations=new Fc(r.layers,r.zoom),this.segments=new nc,this.segments2=new nc,this.stateDependentLayerIds=this.layers.filter((function(r){return r.isStateDependent()})).map((function(r){return r.id}))};Vd.prototype.populate=function(r,e,n){this.hasPattern=Ld("fill",this.layers,e);for(var i=this.layers[0].layout.get("fill-sort-key"),a=[],t=0,o=r;t>3}if(a--,1===i||2===i)o+=r.readSVarint(),c+=r.readSVarint(),1===i&&(e&&u.push(e),e=[]),e.push(new t(o,c));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&u.push(e),u},Xd.prototype.bbox=function(){var r=this._pbf;r.pos=this._geometry;for(var e=r.readVarint()+r.pos,n=1,i=0,a=0,t=0,o=1/0,c=-1/0,u=1/0,d=-1/0;r.pos>3}if(i--,1===n||2===n)(a+=r.readSVarint())c&&(c=a),(t+=r.readSVarint())d&&(d=t);else if(7!==n)throw new Error("unknown command "+n)}return[o,u,c,d]},Xd.prototype.toGeoJSON=function(r,e,n){var i,a,t=this.extent*Math.pow(2,n),o=this.extent*r,c=this.extent*e,u=this.loadGeometry(),d=Xd.types[this.type];function s(r){for(var e=0;e>3;e=1===i?r.readString():2===i?r.readFloat():3===i?r.readDouble():4===i?r.readVarint64():5===i?r.readVarint():6===i?r.readSVarint():7===i?r.readBoolean():null}return e}function os(r,e){this.layers=r.readFields(cs,{},e)}function cs(r,e,n){if(3===r){var i=new ns(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}is.prototype.feature=function(r){if(r<0||r>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[r];var e=this._pbf.readVarint()+this._pbf.pos;return new Yd(this._pbf,e,this.extent,this._keys,this._values)};var us={VectorTile:os,VectorTileFeature:Yd,VectorTileLayer:ns},ds=us.VectorTileFeature.types,ss=500,ls=Math.pow(2,13);function ms(r,e,n,i,a,t,o,c){r.emplaceBack(e,n,2*Math.floor(i*ls)+o,a*ls*2,t*ls*2,Math.round(c))}var ps=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map((function(r){return r.id})),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new So,this.indexArray=new No,this.programConfigurations=new Fc(r.layers,r.zoom),this.segments=new nc,this.stateDependentLayerIds=this.layers.filter((function(r){return r.isStateDependent()})).map((function(r){return r.id}))};function Is(r,e){return r.x===e.x&&(r.x<0||r.x>Ec)||r.y===e.y&&(r.y<0||r.y>Ec)}function ys(r){return r.every((function(r){return r.x<0}))||r.every((function(r){return r.x>Ec}))||r.every((function(r){return r.y<0}))||r.every((function(r){return r.y>Ec}))}ps.prototype.populate=function(r,e,n){this.features=[],this.hasPattern=Ld("fill-extrusion",this.layers,e);for(var i=0,a=r;i=1){var _=I[f-1];if(!Is(g,_)){l.vertexLength+4>nc.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var h=g.sub(_)._perp()._unit(),v=_.dist(g);y+v>32768&&(y=0),ms(this.layoutVertexArray,g.x,g.y,h.x,h.y,0,0,y),ms(this.layoutVertexArray,g.x,g.y,h.x,h.y,0,1,y),y+=v,ms(this.layoutVertexArray,_.x,_.y,h.x,h.y,0,0,y),ms(this.layoutVertexArray,_.x,_.y,h.x,h.y,0,1,y);var x=l.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),l.vertexLength+=4,l.primitiveLength+=2}}}}if(l.vertexLength+u>nc.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(u,this.layoutVertexArray,this.indexArray)),"Polygon"===ds[r.type]){for(var P=[],G=[],C=l.vertexLength,S=0,A=c;S=2&&r[u-1].equals(r[u-2]);)u--;for(var d=0;d0;if(G&&g>d){var S=s.dist(p);if(S>2*l){var A=s.sub(s.sub(p)._mult(l/S)._round());this.updateDistance(p,A),this.addCurrentVertex(A,y,0,0,m),p=A}}var b=p&&I,M=b?n:c?"butt":i;if(b&&"round"===M&&(xa&&(M="bevel"),"bevel"===M&&(x>2&&(M="flipbevel"),x100)_=f.mult(-1);else{var B=x*y.add(f).mag()/y.sub(f).mag();_._perp()._mult(B*(C?-1:1))}this.addCurrentVertex(s,_,0,0,m),this.addCurrentVertex(s,_.mult(-1),0,0,m)}else if("bevel"===M||"fakeround"===M){var k=-Math.sqrt(x*x-1),F=C?k:0,z=C?0:k;if(p&&this.addCurrentVertex(s,y,F,z,m),"fakeround"===M)for(var w=Math.round(180*P/Math.PI/Bs),R=1;R2*l){var U=s.add(I.sub(s)._mult(l/J)._round());this.updateDistance(s,U),this.addCurrentVertex(U,f,0,0,m),s=U}}}}},ws.prototype.addCurrentVertex=function(r,e,n,i,a,t){void 0===t&&(t=!1);var o=e.x+e.y*n,c=e.y-e.x*n,u=-e.x+e.y*i,d=-e.y-e.x*i;this.addHalfVertex(r,o,c,t,!1,n,a),this.addHalfVertex(r,u,d,t,!0,-i,a),this.distance>zs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(r,e,n,i,a,t))},ws.prototype.addHalfVertex=function(r,e,n,i,a,t,o){var c=r.x,u=r.y,d=(this.lineClips?this.scaledDistance*(zs-1):this.scaledDistance)*Fs;if(this.layoutVertexArray.emplaceBack((c<<1)+(i?1:0),(u<<1)+(a?1:0),Math.round(As*e)+128,Math.round(As*n)+128,1+(0===t?0:t<0?-1:1)|(63&d)<<2,d>>6),this.lineClips){var s=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(s,this.lineClipsArray.length)}var l=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),o.primitiveLength++),a?this.e2=l:this.e1=l},ws.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},ws.prototype.updateDistance=function(r,e){this.distance+=r.dist(e),this.updateScaledDistance()},_t("LineBucket",ws,{omit:["layers","patternFeatures"]});var Rs=new mo({"line-cap":new oo(le.layout_line["line-cap"]),"line-join":new co(le.layout_line["line-join"]),"line-miter-limit":new oo(le.layout_line["line-miter-limit"]),"line-round-limit":new oo(le.layout_line["line-round-limit"]),"line-sort-key":new co(le.layout_line["line-sort-key"])}),Es={paint:new mo({"line-opacity":new co(le.paint_line["line-opacity"]),"line-color":new co(le.paint_line["line-color"]),"line-translate":new oo(le.paint_line["line-translate"]),"line-translate-anchor":new oo(le.paint_line["line-translate-anchor"]),"line-width":new co(le.paint_line["line-width"]),"line-gap-width":new co(le.paint_line["line-gap-width"]),"line-offset":new co(le.paint_line["line-offset"]),"line-blur":new co(le.paint_line["line-blur"]),"line-dasharray":new so(le.paint_line["line-dasharray"]),"line-pattern":new uo(le.paint_line["line-pattern"]),"line-gradient":new lo(le.paint_line["line-gradient"])}),layout:Rs},Ns=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,n){return n=new Xt(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),r.prototype.possiblyEvaluate.call(this,e,n)},e.prototype.evaluate=function(e,n,i,a){return n=_({},n,{zoom:Math.floor(n.zoom)}),r.prototype.evaluate.call(this,e,n,i,a)},e}(co),Ts=new Ns(Es.paint.properties["line-width"].specification);Ts.useIntegerZoom=!0;var Ds=function(r){function e(e){r.call(this,e,Es),this.gradientVersion=0}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(r){if("line-gradient"===r){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=e._styleExpression.expression instanceof Jn,this.gradientVersion=(this.gradientVersion+1)%d}},e.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},e.prototype.recalculate=function(e,n){r.prototype.recalculate.call(this,e,n),this.paint._values["line-floorwidth"]=Ts.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(r){return new ws(r)},e.prototype.queryRadius=function(r){var e=r,n=Js(nu("line-width",this,e),nu("line-gap-width",this,e)),i=nu("line-offset",this,e);return n/2+Math.abs(i)+iu(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(r,e,n,i,a,t,o){var c=au(r,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),t.angle,o),u=o/2*Js(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),d=this.paint.get("line-offset").evaluate(e,n);return d&&(i=Us(i,d*o)),jc(c,i,u)},e.prototype.isTileClipped=function(){return!0},e}(Io);function Js(r,e){return e>0?e+2*r:r}function Us(r,e){for(var n=[],i=new t(0,0),a=0;a":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};function Ys(r){for(var e="",n=0;n>1,s=-7,l=n?a-1:0,m=n?-1:1,p=r[e+l];for(l+=m,t=p&(1<<-s)-1,p>>=-s,s+=c;s>0;t=256*t+r[e+l],l+=m,s-=8);for(o=t&(1<<-s)-1,t>>=-s,s+=i;s>0;o=256*o+r[e+l],l+=m,s-=8);if(0===t)t=1-d;else{if(t===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),t-=d}return(p?-1:1)*o*Math.pow(2,t-i)},write:function(r,e,n,i,a,t){var o,c,u,d=8*t-a-1,s=(1<>1,m=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:t-1,I=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=s):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+l>=1?m/u:m*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=s?(c=0,o=s):o+l>=1?(c=(e*u-1)*Math.pow(2,a),o+=l):(c=e*Math.pow(2,l-1)*Math.pow(2,a),o=0));a>=8;r[n+p]=255&c,p+=I,c/=256,a-=8);for(o=o<0;r[n+p]=255&o,p+=I,o/=256,d-=8);r[n+p-I]|=128*y}},$s=rl;function rl(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}rl.Varint=0,rl.Fixed64=1,rl.Bytes=2,rl.Fixed32=5;var el=4294967296,nl=1/el,il=12,al="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function tl(r,e,n){var i,a,t=n.buf;if(i=(112&(a=t[n.pos++]))>>4,a<128)return cl(r,i,e);if(i|=(127&(a=t[n.pos++]))<<3,a<128)return cl(r,i,e);if(i|=(127&(a=t[n.pos++]))<<10,a<128)return cl(r,i,e);if(i|=(127&(a=t[n.pos++]))<<17,a<128)return cl(r,i,e);if(i|=(127&(a=t[n.pos++]))<<24,a<128)return cl(r,i,e);if(i|=(1&(a=t[n.pos++]))<<31,a<128)return cl(r,i,e);throw new Error("Expected varint not more than 10 bytes")}function ol(r){return r.type===rl.Bytes?r.readVarint()+r.pos:r.pos+1}function cl(r,e,n){return n?4294967296*e+(r>>>0):4294967296*(e>>>0)+(r>>>0)}function ul(r,e){var n,i;if(r>=0?(n=r%4294967296|0,i=r/4294967296|0):(i=~(-r/4294967296),4294967295^(n=~(-r%4294967296))?n=n+1|0:(n=0,i=i+1|0)),r>=0x10000000000000000||r<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),dl(n,i,e),sl(i,e)}function dl(r,e,n){n.buf[n.pos++]=127&r|128,r>>>=7,n.buf[n.pos++]=127&r|128,r>>>=7,n.buf[n.pos++]=127&r|128,r>>>=7,n.buf[n.pos++]=127&r|128,r>>>=7,n.buf[n.pos]=127&r}function sl(r,e){var n=(7&r)<<4;e.buf[e.pos++]|=n|((r>>>=3)?128:0),r&&(e.buf[e.pos++]=127&r|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=127&r|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=127&r|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=127&r|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=127&r)))))}function ll(r,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var a=n.pos-1;a>=r;a--)n.buf[a+i]=n.buf[a]}function ml(r,e){for(var n=0;n>>8,r[n+2]=e>>>16,r[n+3]=e>>>24}function Gl(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+(r[e+3]<<24)}function Cl(r,e,n){for(var i="",a=e;a239?4:u>223?3:u>191?2:1;if(a+s>n)break;1===s?u<128&&(d=u):2===s?128===(192&(t=r[a+1]))&&(d=(31&u)<<6|63&t)<=127&&(d=null):3===s?(t=r[a+1],o=r[a+2],128===(192&t)&&128===(192&o)&&((d=(15&u)<<12|(63&t)<<6|63&o)<=2047||d>=55296&&d<=57343)&&(d=null)):4===s&&(t=r[a+1],o=r[a+2],c=r[a+3],128===(192&t)&&128===(192&o)&&128===(192&c)&&((d=(15&u)<<18|(63&t)<<12|(63&o)<<6|63&c)<=65535||d>=1114112)&&(d=null)),null===d?(d=65533,s=1):d>65535&&(d-=65536,i+=String.fromCharCode(d>>>10&1023|55296),d=56320|1023&d),i+=String.fromCharCode(d),a+=s}return i}function Sl(r,e,n){return al.decode(r.subarray(e,n))}function Al(r,e,n){for(var i,a,t=0;t55295&&i<57344){if(!a){i>56319||t+1===e.length?(r[n++]=239,r[n++]=191,r[n++]=189):a=i;continue}if(i<56320){r[n++]=239,r[n++]=191,r[n++]=189,a=i;continue}i=a-55296<<10|i-56320|65536,a=null}else a&&(r[n++]=239,r[n++]=191,r[n++]=189,a=null);i<128?r[n++]=i:(i<2048?r[n++]=i>>6|192:(i<65536?r[n++]=i>>12|224:(r[n++]=i>>18|240,r[n++]=i>>12&63|128),r[n++]=i>>6&63|128),r[n++]=63&i|128)}return n}rl.prototype={destroy:function(){this.buf=null},readFields:function(r,e,n){for(n=n||this.length;this.pos>3,t=this.pos;this.type=7&i,r(a,e,this),this.pos===t&&this.skip(i)}return e},readMessage:function(r,e){return this.readFields(r,e,this.readVarint()+this.pos)},readFixed32:function(){var r=xl(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=Gl(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=xl(this.buf,this.pos)+xl(this.buf,this.pos+4)*el;return this.pos+=8,r},readSFixed64:function(){var r=xl(this.buf,this.pos)+Gl(this.buf,this.pos+4)*el;return this.pos+=8,r},readFloat:function(){var r=Qs.read(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=Qs.read(this.buf,this.pos,!0,52,8);return this.pos+=8,r},readVarint:function(r){var e,n,i=this.buf;return e=127&(n=i[this.pos++]),n<128?e:(e|=(127&(n=i[this.pos++]))<<7,n<128?e:(e|=(127&(n=i[this.pos++]))<<14,n<128?e:(e|=(127&(n=i[this.pos++]))<<21,n<128?e:tl(e|=(15&(n=i[this.pos]))<<28,r,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var r=this.readVarint();return r%2===1?(r+1)/-2:r/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var r=this.readVarint()+this.pos,e=this.pos;return this.pos=r,r-e>=il&&al?Sl(this.buf,e,r):Cl(this.buf,e,r)},readBytes:function(){var r=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,r);return this.pos=r,e},readPackedVarint:function(r,e){if(this.type!==rl.Bytes)return r.push(this.readVarint(e));var n=ol(this);for(r=r||[];this.pos127;);else if(e===rl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===rl.Fixed32)this.pos+=4;else{if(e!==rl.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(r,e){this.writeVarint(r<<3|e)},realloc:function(r){for(var e=this.length||16;e268435455||r<0?ul(r,this):(this.realloc(4),this.buf[this.pos++]=127&r|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=r>>>7&127))))},writeSVarint:function(r){this.writeVarint(r<0?2*-r-1:2*r)},writeBoolean:function(r){this.writeVarint(Boolean(r))},writeString:function(r){r=String(r),this.realloc(4*r.length),this.pos++;var e=this.pos;this.pos=Al(this.buf,r,this.pos);var n=this.pos-e;n>=128&&ll(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(r){this.realloc(4),Qs.write(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),Qs.write(this.buf,r,this.pos,!0,52,8),this.pos+=8},writeBytes:function(r){var e=r.length;this.writeVarint(e),this.realloc(e);for(var n=0;n=128&&ll(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(r,e,n){this.writeTag(r,rl.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(r,e){e.length&&this.writeMessage(r,ml,e)},writePackedSVarint:function(r,e){e.length&&this.writeMessage(r,pl,e)},writePackedBoolean:function(r,e){e.length&&this.writeMessage(r,fl,e)},writePackedFloat:function(r,e){e.length&&this.writeMessage(r,Il,e)},writePackedDouble:function(r,e){e.length&&this.writeMessage(r,yl,e)},writePackedFixed32:function(r,e){e.length&&this.writeMessage(r,gl,e)},writePackedSFixed32:function(r,e){e.length&&this.writeMessage(r,_l,e)},writePackedFixed64:function(r,e){e.length&&this.writeMessage(r,hl,e)},writePackedSFixed64:function(r,e){e.length&&this.writeMessage(r,vl,e)},writeBytesField:function(r,e){this.writeTag(r,rl.Bytes),this.writeBytes(e)},writeFixed32Field:function(r,e){this.writeTag(r,rl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(r,e){this.writeTag(r,rl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(r,e){this.writeTag(r,rl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(r,e){this.writeTag(r,rl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(r,e){this.writeTag(r,rl.Varint),this.writeVarint(e)},writeSVarintField:function(r,e){this.writeTag(r,rl.Varint),this.writeSVarint(e)},writeStringField:function(r,e){this.writeTag(r,rl.Bytes),this.writeString(e)},writeFloatField:function(r,e){this.writeTag(r,rl.Fixed32),this.writeFloat(e)},writeDoubleField:function(r,e){this.writeTag(r,rl.Fixed64),this.writeDouble(e)},writeBooleanField:function(r,e){this.writeVarintField(r,Boolean(e))}};var bl=3;function Ml(r,e,n){1===r&&n.readMessage(Bl,e)}function Bl(r,e,n){if(3===r){var i=n.readMessage(kl,{}),a=i.id,t=i.bitmap,o=i.width,c=i.height,u=i.left,d=i.top,s=i.advance;e.push({id:a,bitmap:new Zu({width:o+2*bl,height:c+2*bl},t),metrics:{width:o,height:c,left:u,top:d,advance:s}})}}function kl(r,e,n){1===r?e.id=n.readVarint():2===r?e.bitmap=n.readBytes():3===r?e.width=n.readVarint():4===r?e.height=n.readVarint():5===r?e.left=n.readSVarint():6===r?e.top=n.readSVarint():7===r&&(e.advance=n.readVarint())}function Fl(r){return new $s(r).readFields(Ml,[])}var zl=bl;function wl(r){for(var e=0,n=0,i=0,a=r;i=0;m--){var p=o[m];if(!(l.w>p.w||l.h>p.h)){if(l.x=p.x,l.y=p.y,u=Math.max(u,l.y+l.h),c=Math.max(c,l.x+l.w),l.w===p.w&&l.h===p.h){var I=o.pop();m=0&&i>=r&&Wl[this.text.charCodeAt(i)];i--)n--;this.text=this.text.substring(r,n),this.sectionIndex=this.sectionIndex.slice(r,n)},Kl.prototype.substring=function(r,e){var n=new Kl;return n.text=this.text.substring(r,e),n.sectionIndex=this.sectionIndex.slice(r,e),n.sections=this.sections,n},Kl.prototype.toString=function(){return this.text},Kl.prototype.getMaxScale=function(){var r=this;return this.sectionIndex.reduce((function(e,n){return Math.max(e,r.sections[n].scale)}),0)},Kl.prototype.addTextSection=function(r,e){this.text+=r.text,this.sections.push(Ol.forText(r.scale,r.fontStack||e));for(var n=this.sections.length-1,i=0;i=Ll?null:++this.imageSectionID:(this.imageSectionID=Hl,this.imageSectionID)};var Wl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Zl={};function ql(r,e,n,i,a,t){if(e.imageName){var o=i[e.imageName];return o?o.displaySize[0]*e.scale*Xs/t+a:0}var c=n[e.fontStack],u=c&&c[r];return u?u.metrics.advance*e.scale+a:0}function Yl(r,e,n,i,a,t){for(var o=0,c=0;c=0,s=0,l=0;l0&&D>S&&(S=D)}else{var J=n[b.fontStack],U=J&&J[B];if(U&&U.rect)z=U.rect,F=U.metrics;else{var H=e[b.fontStack],L=H&&H[B];if(!L)continue;F=L.metrics}k=(x-b.scale)*Xs}E?(r.verticalizable=!0,C.push({glyph:B,imageName:w,x:m,y:p+k,vertical:E,scale:b.scale,fontStack:b.fontStack,sectionIndex:M,metrics:F,rect:z}),m+=R*b.scale+d):(C.push({glyph:B,imageName:w,x:m,y:p+k,vertical:E,scale:b.scale,fontStack:b.fontStack,sectionIndex:M,metrics:F,rect:z}),m+=F.advance*b.scale+d)}if(0!==C.length){var O=m-d;I=Math.max(O,I),am(C,0,C.length-1,f,S)}m=0;var K=t*x+S;G.lineOffset=Math.max(S,P),p+=K,y=Math.max(K,y),++g}else p+=t,++g}var V=p-Jl,j=nm(o),W=j.horizontalAlign,Z=j.verticalAlign;tm(r.positionedLines,f,W,Z,I,y,t,V,a.length),r.top+=-Z*V,r.bottom=r.top+V,r.left+=-W*I,r.right=r.left+I}function am(r,e,n,i,a){if(i||a)for(var t=r[n],o=t.metrics.advance*t.scale,c=(r[n].x+o)*i,u=e;u<=n;u++)r[u].x-=c,r[u].y+=a}function tm(r,e,n,i,a,t,o,c,u){var d=(e-n)*a,s=0;s=t!==o?-c*i-Jl:(-i*u+.5)*o;for(var l=0,m=r;l-n/2;){if(--o<0)return!1;c-=r[o].dist(t),t=r[o]}c+=r[o].dist(r[o+1]),o++;for(var u=[],d=0;ci;)d-=u.shift().angleDelta;if(d>a)return!1;o++,c+=l.dist(m)}return!0}function ym(r){for(var e=0,n=0;nd){var I=(d-u)/p,y=Un(l.x,m.x,I),f=Un(l.y,m.y,I),g=new um(y,f,m.angleTo(l),s);return g._round(),!o||Im(r,g,c,o,e)?g:void 0}u+=p}}function hm(r,e,n,i,a,t,o,c,u){var d=fm(i,t,o),s=gm(i,a),l=s*o,m=0===r[0].x||r[0].x===u||0===r[0].y||r[0].y===u;return e-l=0&&v=0&&x=0&&m+d<=s){var P=new um(v,x,_,I);P._round(),i&&!Im(r,P,t,i,a)||p.push(P)}}l+=g}return c||p.length||o||(p=vm(r,l/2,n,i,a,t,o,!0,u)),p}function xm(r,e,n,i,a){for(var o=[],c=0;c=i&&m.x>=i||(l.x>=i?l=new t(i,l.y+(m.y-l.y)*((i-l.x)/(m.x-l.x)))._round():m.x>=i&&(m=new t(i,l.y+(m.y-l.y)*((i-l.x)/(m.x-l.x)))._round()),l.y>=a&&m.y>=a||(l.y>=a?l=new t(l.x+(m.x-l.x)*((a-l.y)/(m.y-l.y)),a)._round():m.y>=a&&(m=new t(l.x+(m.x-l.x)*((a-l.y)/(m.y-l.y)),a)._round()),d&&l.equals(d[d.length-1])||(d=[l],o.push(d)),d.push(m)))))}return o}var Pm=Rl;function Gm(r,e,n,i){var a=[],o=r.image,c=o.pixelRatio,u=o.paddedRect.w-2*Pm,d=o.paddedRect.h-2*Pm,s=r.right-r.left,l=r.bottom-r.top,m=o.stretchX||[[0,u]],p=o.stretchY||[[0,d]],I=function(r,e){return r+e[1]-e[0]},y=m.reduce(I,0),f=p.reduce(I,0),g=u-y,_=d-f,h=0,v=y,x=0,P=f,G=0,C=g,S=0,A=_;if(o.content&&i){var b=o.content;h=Cm(m,0,b[0]),x=Cm(p,0,b[1]),v=Cm(m,b[0],b[2]),P=Cm(p,b[1],b[3]),G=b[0]-h,S=b[1]-x,C=b[2]-b[0]-v,A=b[3]-b[1]-P}var M=function(i,a,u,d){var m=Am(i.stretch-h,v,s,r.left),p=bm(i.fixed-G,C,i.stretch,y),I=Am(a.stretch-x,P,l,r.top),g=bm(a.fixed-S,A,a.stretch,f),_=Am(u.stretch-h,v,s,r.left),b=bm(u.fixed-G,C,u.stretch,y),M=Am(d.stretch-x,P,l,r.top),B=bm(d.fixed-S,A,d.stretch,f),k=new t(m,I),F=new t(_,I),z=new t(_,M),w=new t(m,M),R=new t(p/c,g/c),E=new t(b/c,B/c),N=e*Math.PI/180;if(N){var T=Math.sin(N),D=Math.cos(N),J=[D,-T,T,D];k._matMult(J),F._matMult(J),w._matMult(J),z._matMult(J)}var U=i.stretch+i.fixed,H=u.stretch+u.fixed,L=a.stretch+a.fixed,O=d.stretch+d.fixed;return{tl:k,tr:F,bl:w,br:z,tex:{x:o.paddedRect.x+Pm+U,y:o.paddedRect.y+Pm+L,w:H-U,h:O-L},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:R,pixelOffsetBR:E,minFontScaleX:C/c/s,minFontScaleY:A/c/l,isSDF:n}};if(i&&(o.stretchX||o.stretchY))for(var B=Sm(m,g,y),k=Sm(p,_,f),F=0;F0&&(I=Math.max(10,I),this.circleDiameter=I)}else{var y=o.top*c-u,f=o.bottom*c+u,g=o.left*c-u,_=o.right*c+u,h=o.collisionPadding;if(h&&(g-=h[0]*c,y-=h[1]*c,_+=h[2]*c,f+=h[3]*c),s){var v=new t(g,y),x=new t(_,y),P=new t(g,f),G=new t(_,f),C=s*Math.PI/180;v._rotate(C),x._rotate(C),P._rotate(C),G._rotate(C),g=Math.min(v.x,x.x,P.x,G.x),_=Math.max(v.x,x.x,P.x,G.x),y=Math.min(v.y,x.y,P.y,G.y),f=Math.max(v.y,x.y,P.y,G.y)}r.emplaceBack(e.x,e.y,g,y,_,f,n,i,a)}this.boxEndIndex=r.length},km=function(r,e){if(void 0===r&&(r=[]),void 0===e&&(e=Fm),this.data=r,this.length=this.data.length,this.compare=e,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function Fm(r,e){return re?1:0}function zm(r,e,n){void 0===e&&(e=1),void 0===n&&(n=!1);for(var i=1/0,a=1/0,o=-1/0,c=-1/0,u=r[0],d=0;do)&&(o=s.x),(!d||s.y>c)&&(c=s.y)}var l=o-i,m=c-a,p=Math.min(l,m),I=p/2,y=new km([],wm);if(0===p)return new t(i,a);for(var f=i;f_.d||!_.d)&&(_=v,n&&console.log("found best %d after %d probes",Math.round(1e4*v.d)/1e4,h)),v.max-_.d<=e||(I=v.h/2,y.push(new Rm(v.p.x-I,v.p.y-I,I,r)),y.push(new Rm(v.p.x+I,v.p.y-I,I,r)),y.push(new Rm(v.p.x-I,v.p.y+I,I,r)),y.push(new Rm(v.p.x+I,v.p.y+I,I,r)),h+=4)}return n&&(console.log("num probes: "+h),console.log("best distance: "+_.d)),_.p}function wm(r,e){return e.max-r.max}function Rm(r,e,n,i){this.p=new t(r,e),this.h=n,this.d=Em(this.p,i),this.max=this.d+this.h*Math.SQRT2}function Em(r,e){for(var n=!1,i=1/0,a=0;ar.y!==s.y>r.y&&r.x<(s.x-d.x)*(r.y-d.y)/(s.y-d.y)+d.x&&(n=!n),i=Math.min(i,Xc(r,d,s))}return(n?1:-1)*Math.sqrt(i)}function Nm(r){for(var e=0,n=0,i=0,a=r[0],t=0,o=a.length,c=o-1;t0&&(this.data[0]=e,this._down(0)),r}},km.prototype.peek=function(){return this.data[0]},km.prototype._up=function(r){for(var e=this,n=e.data,i=e.compare,a=n[r];r>0;){var t=r-1>>1,o=n[t];if(i(a,o)>=0)break;n[r]=o,r=t}n[r]=a},km.prototype._down=function(r){for(var e=this,n=e.data,i=e.compare,a=this.length>>1,t=n[r];r=0)break;n[r]=c,r=o}n[r]=t};var Tm=7,Dm=Number.POSITIVE_INFINITY;function Jm(r,e){function n(r,e){var n=0,i=0;e<0&&(e=0);var a=e/Math.sqrt(2);switch(r){case"top-right":case"top-left":i=a-Tm;break;case"bottom-right":case"bottom-left":i=-a+Tm;break;case"bottom":i=-e+Tm;break;case"top":i=e-Tm}switch(r){case"top-right":case"bottom-right":n=-a;break;case"top-left":case"bottom-left":n=a;break;case"left":n=e;break;case"right":n=-e}return[n,i]}function i(r,e,n){var i=0,a=0;switch(e=Math.abs(e),n=Math.abs(n),r){case"top-right":case"top-left":case"top":a=n-Tm;break;case"bottom-right":case"bottom-left":case"bottom":a=-n+Tm}switch(r){case"top-right":case"bottom-right":case"right":i=-e;break;case"top-left":case"bottom-left":case"left":i=e}return[i,a]}return e[1]!==Dm?i(r,e[0],e[1]):n(r,e[0])}function Um(r,e,n,i,a,t,o){r.createArrays();var c=512*r.overscaling;r.tilePixelRatio=Ec/c,r.compareText={},r.iconsNeedLinear=!1;var u=r.layers[0].layout,d=r.layers[0]._unevaluatedLayout._values,s={};if("composite"===r.textSizeData.kind){var l=r.textSizeData,m=l.minZoom,p=l.maxZoom;s.compositeTextSizes=[d["text-size"].possiblyEvaluate(new Xt(m),o),d["text-size"].possiblyEvaluate(new Xt(p),o)]}if("composite"===r.iconSizeData.kind){var I=r.iconSizeData,y=I.minZoom,f=I.maxZoom;s.compositeIconSizes=[d["icon-size"].possiblyEvaluate(new Xt(y),o),d["icon-size"].possiblyEvaluate(new Xt(f),o)]}s.layoutTextSize=d["text-size"].possiblyEvaluate(new Xt(r.zoom+1),o),s.layoutIconSize=d["icon-size"].possiblyEvaluate(new Xt(r.zoom+1),o),s.textMaxSize=d["text-size"].possiblyEvaluate(new Xt(18));for(var g=u.get("text-line-height")*Xs,_="map"===u.get("text-rotation-alignment")&&"point"!==u.get("symbol-placement"),h=u.get("text-keep-upright"),v=u.get("text-size"),x=function(){var t=G[P],c=u.get("text-font").evaluate(t,{},o).join(","),d=v.evaluate(t,{},o),l=s.layoutTextSize.evaluate(t,{},o),m=s.layoutIconSize.evaluate(t,{},o),p={horizontal:{},vertical:void 0},I=t.text,y=[0,0];if(I){var f=I.toString(),x=u.get("text-letter-spacing").evaluate(t,{},o)*Xs,C=bt(f)?x:0,S=u.get("text-anchor").evaluate(t,{},o),A=u.get("text-variable-anchor");if(!A){var b=u.get("text-radial-offset").evaluate(t,{},o);y=b?Jm(S,[b*Xs,Dm]):u.get("text-offset").evaluate(t,{},o).map((function(r){return r*Xs}))}var M=_?"center":u.get("text-justify").evaluate(t,{},o),B=u.get("symbol-placement"),k="point"===B?u.get("text-max-width").evaluate(t,{},o)*Xs:0,F=function(){r.allowVerticalPlacement&&At(f)&&(p.vertical=jl(I,e,n,a,c,k,g,S,"left",C,y,Dl.vertical,!0,B,l,d))};if(!_&&A){for(var w="auto"===M?A.map((function(r){return Hm(r)})):[M],R=!1,E=0;E=Ec||l.y<0||l.y>=Ec||Wm(r,l,c,n,i,a,m,r.layers[0],r.collisionBoxArray,e.index,e.sourceLayerIndex,r.index,_,P,S,u,v,G,A,I,e,t,d,s,o)};if("line"===b)for(var F=0,z=xm(e.geometry,0,0,Ec,Ec);F1){var U=_m(J,C,n.vertical||y,i,f,h);U&&k(J,U)}}else if("Polygon"===e.type)for(var H=0,L=Ud(e.geometry,0);HKm&&z(r.layerIds[0]+': Value for "text-size" is >= '+Om+'. Reduce your "text-size".'):"composite"===f.kind&&((g=[dm*p.compositeTextSizes[0].evaluate(o,{},I),dm*p.compositeTextSizes[1].evaluate(o,{},I)])[0]>Km||g[1]>Km)&&z(r.layerIds[0]+': Value for "text-size" is >= '+Om+'. Reduce your "text-size".'),r.addSymbols(r.text,y,g,c,t,o,d,e,u.lineStartIndex,u.lineLength,m,I);for(var _=0,h=s;_Km&&z(r.layerIds[0]+': Value for "icon-size" is >= '+Om+'. Reduce your "icon-size".'):"composite"===Z.kind&&((q=[dm*x.compositeIconSizes[0].evaluate(v,{},G),dm*x.compositeIconSizes[1].evaluate(v,{},G)])[0]>Km||q[1]>Km)&&z(r.layerIds[0]+': Value for "icon-size" is >= '+Om+'. Reduce your "icon-size".'),r.addSymbols(r.icon,j,q,h,_,v,!1,e,k.lineStartIndex,k.lineLength,-1,G),N=r.icon.placedSymbolArray.length-1,W&&(w=4*W.length,r.addSymbols(r.icon,W,q,h,_,v,Dl.vertical,e,k.lineStartIndex,k.lineLength,-1,G),T=r.icon.placedSymbolArray.length-1)}for(var Y in i.horizontal){var X=i.horizontal[Y];if(!A){J=cc(X.text);var Q=c.layout.get("text-rotate").evaluate(v,{},G);A=new Bm(u,e,d,s,l,X,m,p,I,Q)}var $=1===X.positionedLines.length;if(R+=Vm(r,e,X,t,c,I,v,y,k,i.vertical?Dl.horizontal:Dl.horizontalOnly,$?Object.keys(i.horizontal):[Y],D,N,x,G),$)break}i.vertical&&(E+=Vm(r,e,i.vertical,t,c,I,v,y,k,Dl.vertical,["vertical"],D,T,x,G));var rr=A?A.boxStartIndex:r.collisionBoxArray.length,er=A?A.boxEndIndex:r.collisionBoxArray.length,nr=M?M.boxStartIndex:r.collisionBoxArray.length,ir=M?M.boxEndIndex:r.collisionBoxArray.length,ar=b?b.boxStartIndex:r.collisionBoxArray.length,tr=b?b.boxEndIndex:r.collisionBoxArray.length,or=B?B.boxStartIndex:r.collisionBoxArray.length,cr=B?B.boxEndIndex:r.collisionBoxArray.length,ur=-1,dr=function(r,e){return r&&r.circleDiameter?Math.max(r.circleDiameter,e):e};ur=dr(A,ur),ur=dr(M,ur),ur=dr(b,ur);var sr=(ur=dr(B,ur))>-1?1:0;sr&&(ur*=C/Xs),r.glyphOffsetArray.length>=np.MAX_GLYPHS&&z("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==v.sortKey&&r.addToSortKeyRanges(r.symbolInstances.length,v.sortKey),r.symbolInstances.emplaceBack(e.x,e.y,D.right>=0?D.right:-1,D.center>=0?D.center:-1,D.left>=0?D.left:-1,D.vertical||-1,N,T,J,rr,er,nr,ir,ar,tr,or,cr,d,R,E,F,w,sr,0,m,U,H,ur)}function Zm(r,e,n,i){var a=r.compareText;if(e in a){for(var t=a[e],o=t.length-1;o>=0;o--)if(i.dist(t[o])0)&&("constant"!==t.value.kind||t.value.value.length>0),d="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,s=a.get("symbol-sort-key");if(this.features=[],u||d){for(var l=e.iconDependencies,m=e.glyphDependencies,p=e.availableImages,I=new Xt(this.zoom),y=0,f=r;y=0;for(var w=0,R=C.sections;w=0;c--)t[c]={x:e[c].x,y:e[c].y,tileUnitDistanceFromAnchor:a},c>0&&(a+=e[c-1].dist(e[c]));for(var u=0;u0},np.prototype.hasIconData=function(){return this.icon.segments.get().length>0},np.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},np.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},np.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},np.prototype.addIndicesForPlacedSymbol=function(r,e){for(var n=r.placedSymbolArray.get(e),i=n.vertexStartIndex+4*n.numGlyphs,a=n.vertexStartIndex;a1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(r),this.sortedAngle=r,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,i=this.symbolInstanceIndexes;n=0&&i.indexOf(r)===n&&e.addIndicesForPlacedSymbol(e.text,r)})),t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},_t("SymbolBucket",np,{omit:["layers","collisionBoxArray","features","compareText"]}),np.MAX_GLYPHS=65535,np.addDynamicAttributes=Qm;var ap=new mo({"symbol-placement":new oo(le.layout_symbol["symbol-placement"]),"symbol-spacing":new oo(le.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new oo(le.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new co(le.layout_symbol["symbol-sort-key"]),"symbol-z-order":new oo(le.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new oo(le.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new oo(le.layout_symbol["icon-ignore-placement"]),"icon-optional":new oo(le.layout_symbol["icon-optional"]),"icon-rotation-alignment":new oo(le.layout_symbol["icon-rotation-alignment"]),"icon-size":new co(le.layout_symbol["icon-size"]),"icon-text-fit":new oo(le.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new oo(le.layout_symbol["icon-text-fit-padding"]),"icon-image":new co(le.layout_symbol["icon-image"]),"icon-rotate":new co(le.layout_symbol["icon-rotate"]),"icon-padding":new oo(le.layout_symbol["icon-padding"]),"icon-keep-upright":new oo(le.layout_symbol["icon-keep-upright"]),"icon-offset":new co(le.layout_symbol["icon-offset"]),"icon-anchor":new co(le.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new oo(le.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new oo(le.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new oo(le.layout_symbol["text-rotation-alignment"]),"text-field":new co(le.layout_symbol["text-field"]),"text-font":new co(le.layout_symbol["text-font"]),"text-size":new co(le.layout_symbol["text-size"]),"text-max-width":new co(le.layout_symbol["text-max-width"]),"text-line-height":new oo(le.layout_symbol["text-line-height"]),"text-letter-spacing":new co(le.layout_symbol["text-letter-spacing"]),"text-justify":new co(le.layout_symbol["text-justify"]),"text-radial-offset":new co(le.layout_symbol["text-radial-offset"]),"text-variable-anchor":new oo(le.layout_symbol["text-variable-anchor"]),"text-anchor":new co(le.layout_symbol["text-anchor"]),"text-max-angle":new oo(le.layout_symbol["text-max-angle"]),"text-writing-mode":new oo(le.layout_symbol["text-writing-mode"]),"text-rotate":new co(le.layout_symbol["text-rotate"]),"text-padding":new oo(le.layout_symbol["text-padding"]),"text-keep-upright":new oo(le.layout_symbol["text-keep-upright"]),"text-transform":new co(le.layout_symbol["text-transform"]),"text-offset":new co(le.layout_symbol["text-offset"]),"text-allow-overlap":new oo(le.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new oo(le.layout_symbol["text-ignore-placement"]),"text-optional":new oo(le.layout_symbol["text-optional"])}),tp={paint:new mo({"icon-opacity":new co(le.paint_symbol["icon-opacity"]),"icon-color":new co(le.paint_symbol["icon-color"]),"icon-halo-color":new co(le.paint_symbol["icon-halo-color"]),"icon-halo-width":new co(le.paint_symbol["icon-halo-width"]),"icon-halo-blur":new co(le.paint_symbol["icon-halo-blur"]),"icon-translate":new oo(le.paint_symbol["icon-translate"]),"icon-translate-anchor":new oo(le.paint_symbol["icon-translate-anchor"]),"text-opacity":new co(le.paint_symbol["text-opacity"]),"text-color":new co(le.paint_symbol["text-color"],{runtimeType:Ge,getOverride:function(r){return r.textColor},hasOverride:function(r){return!!r.textColor}}),"text-halo-color":new co(le.paint_symbol["text-halo-color"]),"text-halo-width":new co(le.paint_symbol["text-halo-width"]),"text-halo-blur":new co(le.paint_symbol["text-halo-blur"]),"text-translate":new oo(le.paint_symbol["text-translate"]),"text-translate-anchor":new oo(le.paint_symbol["text-translate-anchor"])}),layout:ap},op=function(r){this.type=r.property.overrides?r.property.overrides.runtimeType:he,this.defaultValue=r};op.prototype.evaluate=function(r){if(r.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(r.formattedSection))return e.getOverride(r.formattedSection)}return r.feature&&r.featureState?this.defaultValue.evaluate(r.feature,r.featureState):this.defaultValue.property.specification.default},op.prototype.eachChild=function(r){this.defaultValue.isConstant()||r(this.defaultValue.value._styleExpression.expression)},op.prototype.outputDefined=function(){return!1},op.prototype.serialize=function(){return null},_t("FormatSectionOverride",op,{omit:["defaultValue"]});var cp=function(r){function e(e){r.call(this,e,tp)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,n){if(r.prototype.recalculate.call(this,e,n),"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 i=this.layout.get("text-writing-mode");if(i){for(var a=[],t=0,o=i;t",targetMapId:i,sourceMapId:t.mapId})}}},Gp.prototype.receive=function(r){var e=r.data,n=e.id;if(n&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[n];var i=this.cancelCallbacks[n];delete this.cancelCallbacks[n],i&&i()}else N()||e.mustQueue?(this.tasks[n]=e,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,e)},Gp.prototype.process=function(){if(this.taskQueue.length){var r=this.taskQueue.shift(),e=this.tasks[r];delete this.tasks[r],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(r,e)}},Gp.prototype.processTask=function(r,e){var n=this;if(""===e.type){var i=this.callbacks[r];delete this.callbacks[r],i&&(e.error?i(Gt(e.error)):i(null,Gt(e.data)))}else{var a=!1,t=J(this.globalScope)?void 0:[],o=e.hasCallback?function(e,i){a=!0,delete n.cancelCallbacks[r],n.target.postMessage({id:r,type:"",sourceMapId:n.mapId,error:e?Pt(e):null,data:Pt(i,t)},t)}:function(r){a=!0},c=null,u=Gt(e.data);if(this.parent[e.type])c=this.parent[e.type](e.sourceMapId,u,o);else if(this.parent.getWorkerSource){var d=e.type.split(".");c=this.parent.getWorkerSource(e.sourceMapId,d[0],u.source)[d[1]](u,o)}else o(new Error("Could not find function "+e.type));!a&&c&&c.cancel&&(this.cancelCallbacks[r]=c.cancel)}},Gp.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Ap=function(r,e){r&&(e?this.setSouthWest(r).setNorthEast(e):4===r.length?this.setSouthWest([r[0],r[1]]).setNorthEast([r[2],r[3]]):this.setSouthWest(r[0]).setNorthEast(r[1]))};Ap.prototype.setNorthEast=function(r){return this._ne=r instanceof Mp?new Mp(r.lng,r.lat):Mp.convert(r),this},Ap.prototype.setSouthWest=function(r){return this._sw=r instanceof Mp?new Mp(r.lng,r.lat):Mp.convert(r),this},Ap.prototype.extend=function(r){var e,n,i=this._sw,a=this._ne;if(r instanceof Mp)e=r,n=r;else{if(!(r instanceof Ap)){if(Array.isArray(r)){if(4===r.length||r.every(Array.isArray)){var t=r;return this.extend(Ap.convert(t))}var o=r;return this.extend(Mp.convert(o))}return this}if(e=r._sw,n=r._ne,!e||!n)return this}return i||a?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),a.lng=Math.max(n.lng,a.lng),a.lat=Math.max(n.lat,a.lat)):(this._sw=new Mp(e.lng,e.lat),this._ne=new Mp(n.lng,n.lat)),this},Ap.prototype.getCenter=function(){return new Mp((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Ap.prototype.getSouthWest=function(){return this._sw},Ap.prototype.getNorthEast=function(){return this._ne},Ap.prototype.getNorthWest=function(){return new Mp(this.getWest(),this.getNorth())},Ap.prototype.getSouthEast=function(){return new Mp(this.getEast(),this.getSouth())},Ap.prototype.getWest=function(){return this._sw.lng},Ap.prototype.getSouth=function(){return this._sw.lat},Ap.prototype.getEast=function(){return this._ne.lng},Ap.prototype.getNorth=function(){return this._ne.lat},Ap.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Ap.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Ap.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Ap.prototype.contains=function(r){var e=Mp.convert(r),n=e.lng,i=e.lat,a=this._sw.lat<=i&&i<=this._ne.lat,t=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(t=this._sw.lng>=n&&n>=this._ne.lng),a&&t},Ap.convert=function(r){return!r||r instanceof Ap?r:new Ap(r)};var bp=6371008.8,Mp=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid LngLat object: ("+r+", "+e+")");if(this.lng=+r,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Mp.prototype.wrap=function(){return new Mp(I(this.lng,-180,180),this.lat)},Mp.prototype.toArray=function(){return[this.lng,this.lat]},Mp.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Mp.prototype.distanceTo=function(r){var e=Math.PI/180,n=this.lat*e,i=r.lat*e,a=Math.sin(n)*Math.sin(i)+Math.cos(n)*Math.cos(i)*Math.cos((r.lng-this.lng)*e);return bp*Math.acos(Math.min(a,1))},Mp.prototype.toBounds=function(r){void 0===r&&(r=0);var e=360*r/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new Ap(new Mp(this.lng-n,this.lat-e),new Mp(this.lng+n,this.lat+e))},Mp.convert=function(r){if(r instanceof Mp)return r;if(Array.isArray(r)&&(2===r.length||3===r.length))return new Mp(Number(r[0]),Number(r[1]));if(!Array.isArray(r)&&"object"===typeof r&&null!==r)return new Mp(Number("lng"in r?r.lng:r.lon),Number(r.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Bp=2*Math.PI*bp;function kp(r){return Bp*Math.cos(r*Math.PI/180)}function Fp(r){return(180+r)/360}function zp(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function wp(r,e){return r/kp(e)}function Rp(r){return 360*r-180}function Ep(r){var e=180-360*r;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Np(r,e){return r*kp(Ep(e))}function Tp(r){return 1/Math.cos(r*Math.PI/180)}var Dp=function(r,e,n){void 0===n&&(n=0),this.x=+r,this.y=+e,this.z=+n};Dp.fromLngLat=function(r,e){void 0===e&&(e=0);var n=Mp.convert(r);return new Dp(Fp(n.lng),zp(n.lat),wp(e,n.lat))},Dp.prototype.toLngLat=function(){return new Mp(Rp(this.x),Ep(this.y))},Dp.prototype.toAltitude=function(){return Np(this.z,this.y)},Dp.prototype.meterInMercatorCoordinateUnits=function(){return 1/Bp*Tp(Ep(this.y))};var Jp=function(r,e,n){this.z=r,this.x=e,this.y=n,this.key=Lp(0,r,r,e,n)};Jp.prototype.equals=function(r){return this.z===r.z&&this.x===r.x&&this.y===r.y},Jp.prototype.url=function(r,e){var n=Cp(this.x,this.y,this.z),i=Op(this.z,this.x,this.y);return r[(this.x+this.y)%r.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"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",i).replace("{bbox-epsg-3857}",n)},Jp.prototype.getTilePoint=function(r){var e=Math.pow(2,this.z);return new t((r.x*e-this.x)*Ec,(r.y*e-this.y)*Ec)},Jp.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Up=function(r,e){this.wrap=r,this.canonical=e,this.key=Lp(r,e.z,e.z,e.x,e.y)},Hp=function(r,e,n,i,a){this.overscaledZ=r,this.wrap=e,this.canonical=new Jp(n,+i,+a),this.key=Lp(e,r,n,i,a)};function Lp(r,e,n,i,a){(r*=2)<0&&(r=-1*r-1);var t=1<0;t--)a+=(e&(i=1<this.canonical.z?new Hp(r,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Hp(r,this.wrap,r,this.canonical.x>>e,this.canonical.y>>e)},Hp.prototype.calculateScaledKey=function(r,e){var n=this.canonical.z-r;return r>this.canonical.z?Lp(this.wrap*+e,r,this.canonical.z,this.canonical.x,this.canonical.y):Lp(this.wrap*+e,r,r,this.canonical.x>>n,this.canonical.y>>n)},Hp.prototype.isChildOf=function(r){if(r.wrap!==this.wrap)return!1;var e=this.canonical.z-r.canonical.z;return 0===r.overscaledZ||r.overscaledZ>e&&r.canonical.y===this.canonical.y>>e},Hp.prototype.children=function(r){if(this.overscaledZ>=r)return[new Hp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,n=2*this.canonical.x,i=2*this.canonical.y;return[new Hp(e,this.wrap,e,n,i),new Hp(e,this.wrap,e,n+1,i),new Hp(e,this.wrap,e,n,i+1),new Hp(e,this.wrap,e,n+1,i+1)]},Hp.prototype.isLessThan=function(r){return this.wrapr.wrap)&&(this.overscaledZr.overscaledZ)&&(this.canonical.xr.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(r+1)},Kp.prototype._unpackMapbox=function(r,e,n){return(256*r*256+256*e+n)/10-1e4},Kp.prototype._unpackTerrarium=function(r,e,n){return 256*r+e+n/256-32768},Kp.prototype.getPixels=function(){return new qu({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Kp.prototype.backfillBorder=function(r,e,n){if(this.dim!==r.dim)throw new Error("dem dimension mismatch");var i=e*this.dim,a=e*this.dim+this.dim,t=n*this.dim,o=n*this.dim+this.dim;switch(e){case-1:i=a-1;break;case 1:a=i+1}switch(n){case-1:t=o-1;break;case 1:o=t+1}for(var c=-e*this.dim,u=-n*this.dim,d=t;d=0&&s[3]>=0&&c.insert(o,s[0],s[1],s[2],s[3])}},Yp.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new us.VectorTile(new $s(this.rawTileData)).layers,this.sourceLayerCoder=new jp(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Yp.prototype.query=function(r,e,n,i){var a=this;this.loadVTLayers();for(var t=r.params||{},o=Ec/r.tileSize/r.scale,c=wa(t.filter),u=r.queryGeometry,d=r.queryPadding*o,s=Qp(u),l=this.grid.query(s.minX-d,s.minY-d,s.maxX+d,s.maxY+d),m=Qp(r.cameraQueryGeometry),p=0,I=this.grid3D.query(m.minX-d,m.minY-d,m.maxX+d,m.maxY+d,(function(e,n,i,a){return ru(r.cameraQueryGeometry,e-d,n-d,i+d,a+d)}));pi)a=!1;else if(e)if(this.expirationTime=M.maxzoom||"none"!==M.visibility&&(u(b,this.zoom,i),(y[M.id]=M.createBucket({index:s.bucketLayerIDs.length,layers:b,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:v,sourceID:this.source})).populate(x,f,this.tileID.canonical),s.bucketLayerIDs.push(b.map((function(r){return r.id}))))}}}var B=r.mapObject(f.glyphDependencies,(function(r){return Object.keys(r).map(Number)}));Object.keys(B).length?a.send("getGlyphs",{uid:this.uid,stacks:B},(function(r,e){l||(l=r,m=e,z.call(c))})):m={};var k=Object.keys(f.iconDependencies);k.length?a.send("getImages",{icons:k,source:this.source,tileID:this.tileID,type:"icons"},(function(r,e){l||(l=r,p=e,z.call(c))})):p={};var F=Object.keys(f.patternDependencies);function z(){if(l)return t(l);if(m&&p&&I){var e=new o(m),n=new r.ImageAtlas(p,I);for(var a in y){var c=y[a];c instanceof r.SymbolBucket?(u(c.layers,this.zoom,i),r.performSymbolLayout(c,m,e.positions,p,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):c.hasPattern&&(c instanceof r.LineBucket||c instanceof r.FillBucket||c instanceof r.FillExtrusionBucket)&&(u(c.layers,this.zoom,i),c.addFeatures(f,this.tileID.canonical,n.patternPositions))}this.status="done",t(null,{buckets:r.values(y).filter((function(r){return!r.isEmpty()})),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n,glyphMap:this.returnDependencies?m:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}F.length?a.send("getImages",{icons:F,source:this.source,tileID:this.tileID,type:"patterns"},(function(r,e){l||(l=r,I=e,z.call(c))})):I={},z.call(this)};var s=function(r,e,n,i){this.actor=r,this.layerIndex=e,this.availableImages=n,this.loadVectorData=i||d,this.loading={},this.loaded={}};s.prototype.loadTile=function(e,n){var i=this,a=e.uid;this.loading||(this.loading={});var t=!!(e&&e.request&&e.request.collectResourceTiming)&&new r.RequestPerformance(e.request),o=this.loading[a]=new c(e);o.abort=this.loadVectorData(e,(function(e,c){if(delete i.loading[a],e||!c)return o.status="done",i.loaded[a]=o,n(e);var u=c.rawData,d={};c.expires&&(d.expires=c.expires),c.cacheControl&&(d.cacheControl=c.cacheControl);var s={};if(t){var l=t.finish();l&&(s.resourceTiming=JSON.parse(JSON.stringify(l)))}o.vectorTile=c.vectorTile,o.parse(c.vectorTile,i.layerIndex,i.availableImages,i.actor,(function(e,i){if(e||!i)return n(e);n(null,r.extend({rawTileData:u.slice(0)},i,d,s))})),i.loaded=i.loaded||{},i.loaded[a]=o}))},s.prototype.reloadTile=function(r,e){var n=this,i=this.loaded,a=r.uid,t=this;if(i&&i[a]){var o=i[a];o.showCollisionBoxes=r.showCollisionBoxes;var c=function(r,i){var a=o.reloadCallback;a&&(delete o.reloadCallback,o.parse(o.vectorTile,t.layerIndex,n.availableImages,t.actor,a)),e(r,i)};"parsing"===o.status?o.reloadCallback=c:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,c):c())}},s.prototype.abortTile=function(r,e){var n=this.loading,i=r.uid;n&&n[i]&&n[i].abort&&(n[i].abort(),delete n[i]),e()},s.prototype.removeTile=function(r,e){var n=this.loaded,i=r.uid;n&&n[i]&&delete n[i],e()};var l=r.window.ImageBitmap,m=function(){this.loaded={}};m.prototype.loadTile=function(e,n){var i=e.uid,a=e.encoding,t=e.rawImageData,o=l&&t instanceof l?this.getImageData(t):t,c=new r.DEMData(i,o,a);this.loaded=this.loaded||{},this.loaded[i]=c,n(null,c)},m.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var n=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new r.RGBAImage({width:n.width,height:n.height},n.data)},m.prototype.removeTile=function(r){var e=this.loaded,n=r.uid;e&&e[n]&&delete e[n]};var p=I;function I(r,e){var n,i=r&&r.type;if("FeatureCollection"===i)for(n=0;n=0!==!!e&&r.reverse()}var g=r.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(e){this._feature=e,this.extent=r.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};_.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],n=0,i=this._feature.geometry;n>31}function N(r,e){for(var n=r.loadGeometry(),i=r.type,a=0,t=0,o=n.length,c=0;c>1;J(r,e,o,i,a,t%2),D(r,e,n,i,o-1,t+1),D(r,e,n,o+1,a,t+1)}}function J(r,e,n,i,a,t){for(;a>i;){if(a-i>600){var o=a-i+1,c=n-i+1,u=Math.log(o),d=.5*Math.exp(2*u/3),s=.5*Math.sqrt(u*d*(o-d)/o)*(c-o/2<0?-1:1);J(r,e,n,Math.max(i,Math.floor(n-c*d/o+s)),Math.min(a,Math.floor(n+(o-c)*d/o+s)),t)}var l=e[2*n+t],m=i,p=a;for(U(r,e,i,n),e[2*a+t]>l&&U(r,e,i,a);ml;)p--}e[2*i+t]===l?U(r,e,i,p):U(r,e,++p,a),p<=n&&(i=p+1),n<=p&&(a=p-1)}}function U(r,e,n,i){H(r,n,i),H(e,2*n,2*i),H(e,2*n+1,2*i+1)}function H(r,e,n){var i=r[e];r[e]=r[n],r[n]=i}function L(r,e,n,i,a,t,o){for(var c,u,d=[0,r.length-1,0],s=[];d.length;){var l=d.pop(),m=d.pop(),p=d.pop();if(m-p<=o)for(var I=p;I<=m;I++)c=e[2*I],u=e[2*I+1],c>=n&&c<=a&&u>=i&&u<=t&&s.push(r[I]);else{var y=Math.floor((p+m)/2);c=e[2*y],u=e[2*y+1],c>=n&&c<=a&&u>=i&&u<=t&&s.push(r[y]);var f=(l+1)%2;(0===l?n<=c:i<=u)&&(d.push(p),d.push(y-1),d.push(f)),(0===l?a>=c:t>=u)&&(d.push(y+1),d.push(m),d.push(f))}}return s}function O(r,e,n,i,a,t){for(var o=[0,r.length-1,0],c=[],u=a*a;o.length;){var d=o.pop(),s=o.pop(),l=o.pop();if(s-l<=t)for(var m=l;m<=s;m++)K(e[2*m],e[2*m+1],n,i)<=u&&c.push(r[m]);else{var p=Math.floor((l+s)/2),I=e[2*p],y=e[2*p+1];K(I,y,n,i)<=u&&c.push(r[p]);var f=(d+1)%2;(0===d?n-a<=I:i-a<=y)&&(o.push(l),o.push(p-1),o.push(f)),(0===d?n+a>=I:i+a>=y)&&(o.push(p+1),o.push(s),o.push(f))}}return c}function K(r,e,n,i){var a=r-n,t=e-i;return a*a+t*t}C.fromVectorTileJs=S,C.fromGeojsonVt=A,C.GeoJSONWrapper=b;var V=function(r){return r[0]},j=function(r){return r[1]},W=function(r,e,n,i,a){void 0===e&&(e=V),void 0===n&&(n=j),void 0===i&&(i=64),void 0===a&&(a=Float64Array),this.nodeSize=i,this.points=r;for(var t=r.length<65536?Uint16Array:Uint32Array,o=this.ids=new t(r.length),c=this.coords=new a(2*r.length),u=0;u=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return ar(ar({},r.properties),{cluster:!0,cluster_id:r.id,point_count:e,point_count_abbreviated:n})}function rr(r){return r/360+.5}function er(r){var e=Math.sin(r*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function nr(r){return 360*(r-.5)}function ir(r){var e=(180-360*r)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function ar(r,e){for(var n in e)r[n]=e[n];return r}function tr(r){return r.x}function or(r){return r.y}function cr(r,e,n,i){for(var a,t=i,o=n-e>>1,c=n-e,u=r[e],d=r[e+1],s=r[n],l=r[n+1],m=e+3;mt)a=m,t=p;else if(p===t){var I=Math.abs(m-o);Ii&&(a-e>3&&cr(r,e,a,i),r[a+2]=t,n-a>3&&cr(r,a,n,i))}function ur(r,e,n,i,a,t){var o=a-n,c=t-i;if(0!==o||0!==c){var u=((r-n)*o+(e-i)*c)/(o*o+c*c);u>1?(n=a,i=t):u>0&&(n+=o*u,i+=c*u)}return(o=r-n)*o+(c=e-i)*c}function dr(r,e,n,i){var a={id:"undefined"===typeof r?null:r,type:e,geometry:n,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return sr(a),a}function sr(r){var e=r.geometry,n=r.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)lr(r,e);else if("Polygon"===n||"MultiLineString"===n)for(var i=0;i0&&(o+=i?(a*d-u*t)/2:Math.sqrt(Math.pow(u-a,2)+Math.pow(d-t,2))),a=u,t=d}var s=e.length-3;e[2]=1,cr(e,0,s,n),e[s+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function fr(r,e,n,i){for(var a=0;a1?1:n}function hr(r,e,n,i,a,t,o,c){if(i/=e,t>=(n/=e)&&o=i)return null;for(var u=[],d=0;d=n&&I=i)){var y=[];if("Point"===m||"MultiPoint"===m)vr(l,y,n,i,a);else if("LineString"===m)xr(l,y,n,i,a,!1,c.lineMetrics);else if("MultiLineString"===m)Gr(l,y,n,i,a,!1);else if("Polygon"===m)Gr(l,y,n,i,a,!0);else if("MultiPolygon"===m)for(var f=0;f=n&&o<=i&&(e.push(r[t]),e.push(r[t+1]),e.push(r[t+2]))}}function xr(r,e,n,i,a,t,o){for(var c,u,d=Pr(r),s=0===a?Sr:Ar,l=r.start,m=0;mn&&(u=s(d,p,I,f,g,n),o&&(d.start=l+c*u)):_>i?h=n&&(u=s(d,p,I,f,g,n),v=!0),h>i&&_<=i&&(u=s(d,p,I,f,g,i),v=!0),!t&&v&&(o&&(d.end=l+c*u),e.push(d),d=Pr(r)),o&&(l+=c)}var x=r.length-3;p=r[x],I=r[x+1],y=r[x+2],(_=0===a?p:I)>=n&&_<=i&&Cr(d,p,I,y),x=d.length-3,t&&x>=3&&(d[x]!==d[0]||d[x+1]!==d[1])&&Cr(d,d[0],d[1],d[2]),d.length&&e.push(d)}function Pr(r){var e=[];return e.size=r.size,e.start=r.start,e.end=r.end,e}function Gr(r,e,n,i,a,t){for(var o=0;oo.maxX&&(o.maxX=s),l>o.maxY&&(o.maxY=l)}return o}function wr(r,e,n,i){var a=e.geometry,t=e.type,o=[];if("Point"===t||"MultiPoint"===t)for(var c=0;c0&&e.size<(a?o:i))n.numPoints+=e.length/3;else{for(var c=[],u=0;uo)&&(n.numSimplified++,c.push(e[u]),c.push(e[u+1])),n.numPoints++;a&&Er(c,t),r.push(c)}}function Er(r,e){for(var n=0,i=0,a=r.length,t=a-2;i0===e)for(i=0,a=r.length;i
24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=mr(r,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=br(i,e)).length&&this.splitTile(i,0,0,0),n&&(i.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 Dr(r,e,n){return 32*((1<=i;d--){var s=+Date.now();c=this._cluster(c,d),this.trees[d]=new W(c,tr,or,t,Float32Array),n&&console.log("z%d: %d clusters in %dms",d,c.length,+Date.now()-s)}return n&&console.timeEnd("total time"),this},q.prototype.getClusters=function(r,e){var n=((r[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,r[1])),a=180===r[2]?180:((r[2]+180)%360+360)%360-180,t=Math.max(-90,Math.min(90,r[3]));if(r[2]-r[0]>=360)n=-180,a=180;else if(n>a){var o=this.getClusters([n,i,180,t],e),c=this.getClusters([-180,i,a,t],e);return o.concat(c)}for(var u=this.trees[this._limitZoom(e)],d=[],s=0,l=u.range(rr(n),er(t),rr(a),er(i));se&&(I+=_.numPoints||1)}if(I>=c){for(var h=s.x*p,v=s.y*p,x=o&&p>1?this._map(s,!0):null,P=(d<<5)+(e+1)+this.points.length,G=0,C=m;G1)for(var M=0,B=m;M>5},q.prototype._getOriginZoom=function(r){return(r-this.points.length)%32},q.prototype._map=function(r,e){if(r.numPoints)return e?ar({},r.properties):r.properties;var n=this.points[r.index].properties,i=this.options.map(n);return e&&i===n?ar({},i):i},Tr.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Tr.prototype.splitTile=function(r,e,n,i,a,t,o){for(var c=[r,e,n,i],u=this.options,d=u.debug;c.length;){i=c.pop(),n=c.pop(),e=c.pop(),r=c.pop();var s=1<1&&console.time("creation"),m=this.tiles[l]=zr(r,e,n,i,u),this.tileCoords.push({z:e,x:n,y:i}),d)){d>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,i,m.numFeatures,m.numPoints,m.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(m.source=r,a){if(e===u.maxZoom||e===a)continue;var I=1<1&&console.time("clipping");var y,f,g,_,h,v,x=.5*u.buffer/u.extent,P=.5-x,G=.5+x,C=1+x;y=f=g=_=null,h=hr(r,s,n-x,n+G,0,m.minX,m.maxX,u),v=hr(r,s,n+P,n+C,0,m.minX,m.maxX,u),r=null,h&&(y=hr(h,s,i-x,i+G,1,m.minY,m.maxY,u),f=hr(h,s,i+P,i+C,1,m.minY,m.maxY,u),h=null),v&&(g=hr(v,s,i-x,i+G,1,m.minY,m.maxY,u),_=hr(v,s,i+P,i+C,1,m.minY,m.maxY,u),v=null),d>1&&console.timeEnd("clipping"),c.push(y||[],e+1,2*n,2*i),c.push(f||[],e+1,2*n,2*i+1),c.push(g||[],e+1,2*n+1,2*i),c.push(_||[],e+1,2*n+1,2*i+1)}}},Tr.prototype.getTile=function(r,e,n){var i=this.options,a=i.extent,t=i.debug;if(r<0||r>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",r,e,n);for(var u,d=r,s=e,l=n;!u&&d>0;)d--,s=Math.floor(s/2),l=Math.floor(l/2),u=this.tiles[Dr(d,s,l)];return u&&u.source?(t>1&&console.log("found parent tile z%d-%d-%d",d,s,l),t>1&&console.time("drilling down"),this.splitTile(u.source,d,s,l,r,e,n),t>1&&console.timeEnd("drilling down"),this.tiles[c]?kr(this.tiles[c],a):null):null};var Hr=function(e){function n(r,n,i,a){e.call(this,r,n,i,Ur),a&&(this.loadGeoJSON=a)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.loadData=function(r,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=r,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var a=!!(i&&i.request&&i.request.collectResourceTiming)&&new r.RequestPerformance(i.request);this.loadGeoJSON(i,(function(t,o){if(t||!o)return n(t);if("object"!==typeof o)return n(new Error("Input data given to '"+i.source+"' is not a valid GeoJSON object."));p(o,!0);try{if(i.filter){var c=r.createExpression(i.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===c.result)throw new Error(c.value.map((function(r){return r.key+": "+r.message})).join(", "));var u=o.features.filter((function(r){return c.value.evaluate({zoom:0},r)}));o={type:"FeatureCollection",features:u}}e._geoJSONIndex=i.cluster?new q(Lr(i)).load(o.features):Nr(o,i.geojsonVtOptions)}catch(t){return n(t)}e.loaded={};var d={};if(a){var s=a.finish();s&&(d.resourceTiming={},d.resourceTiming[i.source]=JSON.parse(JSON.stringify(s)))}n(null,d)}))}},n.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},n.prototype.reloadTile=function(r,n){var i=this.loaded,a=r.uid;return i&&i[a]?e.prototype.reloadTile.call(this,r,n):this.loadTile(r,n)},n.prototype.loadGeoJSON=function(e,n){if(e.request)r.getJSON(e.request,n);else{if("string"!==typeof e.data)return n(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."));try{return n(null,JSON.parse(e.data))}catch(i){return n(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."))}}},n.prototype.removeSource=function(r,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},n.prototype.getClusterExpansionZoom=function(r,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(r.clusterId))}catch(n){e(n)}},n.prototype.getClusterChildren=function(r,e){try{e(null,this._geoJSONIndex.getChildren(r.clusterId))}catch(n){e(n)}},n.prototype.getClusterLeaves=function(r,e){try{e(null,this._geoJSONIndex.getLeaves(r.clusterId,r.limit,r.offset))}catch(n){e(n)}},n}(s);function Lr(e){var n=e.superclusterOptions,i=e.clusterProperties;if(!i||!n)return n;for(var a={},t={},o={accumulated:null,zoom:0},c={properties:null},u=Object.keys(i),d=0,s=u;d1?"@2x":"",u=r.getJSON(n.transformRequest(n.normalizeSpriteURL(e,c,".json"),r.ResourceType.SpriteJSON),(function(r,e){u=null,o||(o=r,a=e,s())})),d=r.getImage(n.transformRequest(n.normalizeSpriteURL(e,c,".png"),r.ResourceType.SpriteImage),(function(r,e){d=null,o||(o=r,t=e,s())}));function s(){if(o)i(o);else if(a&&t){var e=r.browser.getImageData(t),n={};for(var c in a){var u=a[c],d=u.width,s=u.height,l=u.x,m=u.y,p=u.sdf,I=u.pixelRatio,y=u.stretchX,f=u.stretchY,g=u.content,_=new r.RGBAImage({width:d,height:s});r.RGBAImage.copy(e,_,{x:l,y:m},{x:0,y:0},{width:d,height:s}),n[c]={data:_,pixelRatio:I,sdf:p,stretchX:y,stretchY:f,content:g}}i(null,n)}}return{cancel:function(){u&&(u.cancel(),u=null),d&&(d.cancel(),d=null)}}}function m(r){var e=r.userImage;return!!(e&&e.render&&e.render())&&(r.data.replace(new Uint8Array(e.data.buffer)),!0)}n.suppressClick=function(){r.window.addEventListener("click",s,!0),r.window.setTimeout((function(){r.window.removeEventListener("click",s,!0)}),0)},n.mousePos=function(e,n){var i=e.getBoundingClientRect();return new r.Point(n.clientX-i.left-e.clientLeft,n.clientY-i.top-e.clientTop)},n.touchPos=function(e,n){for(var i=e.getBoundingClientRect(),a=[],t=0;t=0?0:e.button},n.remove=function(r){r.parentNode&&r.parentNode.removeChild(r)};var p=1,I=function(e){function n(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new r.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(r){if(this.loaded!==r&&(this.loaded=r,r)){for(var e=0,n=this.requestors;e=0?1.2:1))}function v(r,e,n,i,a,t,o){for(var c=0;c65535)e(new Error("glyphs > 65535 not supported"));else if(t.ranges[c])e(null,{stack:n,id:a,glyph:o});else{var u=t.requests[c];u||(u=t.requests[c]=[],P.loadGlyphRange(n,c,i.url,i.requestManager,(function(r,e){if(e){for(var n in e)i._doesCharSupportLocalGlyph(+n)||(t.glyphs[+n]=e[+n]);t.ranges[c]=!0}for(var a=0,o=u;a1&&(u=r[++c]);var s=Math.abs(d-u.left),l=Math.abs(d-u.right),m=Math.min(s,l),p=void 0,I=a/n*(i+1);if(u.isDash){var y=i-Math.abs(I);p=Math.sqrt(m*m+y*y)}else p=i-Math.sqrt(m*m+I*I);this.data[o+d]=Math.max(0,Math.min(255,p+128))}},b.prototype.addRegularDash=function(r){for(var e=r.length-1;e>=0;--e){var n=r[e],i=r[e+1];n.zeroLength?r.splice(e,1):i&&i.isDash===n.isDash&&(i.left=n.left,r.splice(e,1))}var a=r[0],t=r[r.length-1];a.isDash===t.isDash&&(a.left=t.left-this.width,t.right=a.right+this.width);for(var o=this.width*this.nextRow,c=0,u=r[c],d=0;d1&&(u=r[++c]);var s=Math.abs(d-u.left),l=Math.abs(d-u.right),m=Math.min(s,l),p=u.isDash?m:-m;this.data[o+d]=Math.max(0,Math.min(255,p+128))}},b.prototype.addDash=function(e,n){var i=n?7:0,a=2*i+1;if(this.nextRow+a>this.height)return r.warnOnce("LineAtlas out of space"),null;for(var t=0,o=0;o=i.minX&&e.x=i.minY&&e.y0&&(u[new r.OverscaledTileID(e.overscaledZ,t,n.z,a,n.y-1).key]={backfilled:!1},u[new r.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},u[new r.OverscaledTileID(e.overscaledZ,c,n.z,o,n.y-1).key]={backfilled:!1}),n.y+10&&(i.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new r.Event("data",i))}}))},n.prototype.onAdd=function(r){this.map=r,this.load()},n.prototype.setData=function(e){var n=this;return this._data=e,this.fire(new r.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)n.fire(new r.ErrorEvent(e));else{var i={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(i.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new r.Event("data",i))}})),this},n.prototype.getClusterExpansionZoom=function(r,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:r,source:this.id},e),this},n.prototype.getClusterChildren=function(r,e){return this.actor.send("geojson.getClusterChildren",{clusterId:r,source:this.id},e),this},n.prototype.getClusterLeaves=function(r,e,n,i){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:r,limit:e,offset:n},i),this},n.prototype._updateWorkerData=function(e){var n=this;this._loaded=!1;var i=r.extend({},this.workerOptions),a=this._data;"string"===typeof a?(i.request=this.map._requestManager.transformRequest(r.browser.resolveURL(a),r.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(a),this.actor.send(this.type+".loadData",i,(function(r,a){n._removed||a&&a.abandoned||(n._loaded=!0,a&&a.resourceTiming&&a.resourceTiming[n.id]&&(n._resourceTiming=a.resourceTiming[n.id].slice(0)),n.actor.send(n.type+".coalesce",{source:i.source},null),e(r))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(e,n){var i=this,a=e.actor?"reloadTile":"loadTile";e.actor=this.actor;var t={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:r.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(a,t,(function(r,t){return delete e.request,e.unloadVectorData(),e.aborted?n(null):r?n(r):(e.loadVectorData(t,i.map.painter,"reloadTile"===a),n(null))}))},n.prototype.abortTile=function(r){r.request&&(r.request.cancel(),delete r.request),r.aborted=!0},n.prototype.unloadTile=function(r){r.unloadVectorData(),this.actor.send("removeTile",{uid:r.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return r.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(r.Evented),E=r.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),N=function(e){function n(r,n,i,a){e.call(this),this.id=r,this.dispatcher=i,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=n}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(e,n){var i=this;this._loaded=!1,this.fire(new r.Event("dataloading",{dataType:"source"})),this.url=this.options.url,r.getImage(this.map._requestManager.transformRequest(this.url,r.ResourceType.Image),(function(a,t){i._loaded=!0,a?i.fire(new r.ErrorEvent(a)):t&&(i.image=t,e&&(i.coordinates=e),n&&n(),i._finishLoading())}))},n.prototype.loaded=function(){return this._loaded},n.prototype.updateImage=function(r){var e=this;return this.image&&r.url?(this.options.url=r.url,this.load(r.coordinates,(function(){e.texture=null})),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new r.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(r){this.map=r,this.load()},n.prototype.setCoordinates=function(e){var n=this;this.coordinates=e;var i=e.map(r.MercatorCoordinate.fromLngLat);this.tileID=T(i),this.minzoom=this.maxzoom=this.tileID.z;var a=i.map((function(r){return n.tileID.getTilePoint(r)._round()}));return this._boundsArray=new r.StructArrayLayout4i8,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,r.EXTENT,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,r.EXTENT),this._boundsArray.emplaceBack(a[2].x,a[2].y,r.EXTENT,r.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new r.Event("data",{dataType:"source",sourceDataType:"content"})),this},n.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,n=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=r.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new r.Texture(e,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},n.prototype.loadTile=function(r,e){this.tileID&&this.tileID.equals(r.tileID.canonical)?(this.tiles[String(r.tileID.wrap)]=r,r.buckets={},e(null)):(r.state="errored",e(null))},n.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return!1},n}(r.Evented);function T(e){for(var n=1/0,i=1/0,a=-1/0,t=-1/0,o=0,c=e;on.end(0)?this.fire(new r.ErrorEvent(new r.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=e}},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(r){this.map||(this.map=r,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,n=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=r.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new r.Texture(e,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(N),J=function(e){function n(n,i,a,t){e.call(this,n,i,a,t),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some((function(r){return!Array.isArray(r)||2!==r.length||r.some((function(r){return"number"!==typeof r}))}))||this.fire(new r.ErrorEvent(new r.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new r.ErrorEvent(new r.ValidationError("sources."+n,null,'missing required property "coordinates"'))),i.animate&&"boolean"!==typeof i.animate&&this.fire(new r.ErrorEvent(new r.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"===typeof i.canvas||i.canvas instanceof r.window.HTMLCanvasElement||this.fire(new r.ErrorEvent(new r.ValidationError("sources."+n,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 r.ErrorEvent(new r.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof r.window.HTMLCanvasElement?this.options.canvas:r.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new r.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())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(r){this.map=r,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var n=this.map.painter.context,i=n.gl;for(var a in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=r.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new r.Texture(n,this.canvas,i.RGBA,{premultiply:!0}),this.tiles){var t=this.tiles[a];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var r=0,e=[this.canvas.width,this.canvas.height];rthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},X.prototype.has=function(r){return r.wrapped().key in this.data},X.prototype.getAndRemove=function(r){return this.has(r)?this._getAndRemoveByKey(r.wrapped().key):null},X.prototype._getAndRemoveByKey=function(r){var e=this.data[r].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[r].length&&delete this.data[r],this.order.splice(this.order.indexOf(r),1),e.value},X.prototype.getByKey=function(r){var e=this.data[r];return e?e[0].value:null},X.prototype.get=function(r){return this.has(r)?this.data[r.wrapped().key][0].value:null},X.prototype.remove=function(r,e){if(!this.has(r))return this;var n=r.wrapped().key,i=void 0===e?0:this.data[n].indexOf(e),a=this.data[n][i];return this.data[n].splice(i,1),a.timeout&&clearTimeout(a.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(a.value),this.order.splice(this.order.indexOf(n),1),this},X.prototype.setMaxSize=function(r){for(this.max=r;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},X.prototype.filter=function(r){var e=[];for(var n in this.data)for(var i=0,a=this.data[n];i1||(Math.abs(n)>1&&(1===Math.abs(n+a)?n+=a:1===Math.abs(n-a)&&(n-=a)),e.dem&&r.dem&&(r.dem.backfillBorder(e.dem,n,i),r.neighboringTiles&&r.neighboringTiles[t]&&(r.neighboringTiles[t].backfilled=!0)))}},n.prototype.getTile=function(r){return this.getTileByID(r.key)},n.prototype.getTileByID=function(r){return this._tiles[r]},n.prototype._retainLoadedChildren=function(r,e,n,i){for(var a in this._tiles){var t=this._tiles[a];if(!(i[a]||!t.hasData()||t.tileID.overscaledZ<=e||t.tileID.overscaledZ>n)){for(var o=t.tileID;t&&t.tileID.overscaledZ>e+1;){var c=t.tileID.scaledTo(t.tileID.overscaledZ-1);(t=this._tiles[c.key])&&t.hasData()&&(o=c)}for(var u=o;u.overscaledZ>e;)if(r[(u=u.scaledTo(u.overscaledZ-1)).key]){i[o.key]=o;break}}}},n.prototype.findLoadedParent=function(r,e){if(r.key in this._loadedParentTiles){var n=this._loadedParentTiles[r.key];return n&&n.tileID.overscaledZ>=e?n:null}for(var i=r.overscaledZ-1;i>=e;i--){var a=r.scaledTo(i),t=this._getLoadedTile(a);if(t)return t}},n.prototype._getLoadedTile=function(r){var e=this._tiles[r.key];return e&&e.hasData()?e:this._cache.getByKey(r.wrapped().key)},n.prototype.updateCacheSize=function(r){var e=(Math.ceil(r.width/this._source.tileSize)+1)*(Math.ceil(r.height/this._source.tileSize)+1),n=5,i=Math.floor(e*n),a="number"===typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(a)},n.prototype.handleWrapJump=function(r){var e=(r-(void 0===this._prevLng?r:this._prevLng))/360,n=Math.round(e);if(this._prevLng=r,n){var i={};for(var a in this._tiles){var t=this._tiles[a];t.tileID=t.tileID.unwrapTo(t.tileID.wrap+n),i[t.tileID.key]=t}for(var o in this._tiles=i,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var c in this._tiles){var u=this._tiles[c];this._setTileReloadTimer(c,u)}}},n.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var a;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?a=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new r.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(a=e.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(r){return i._source.hasTile(r)})))):a=[];var t=e.coveringZoomLevel(this._source),o=Math.max(t-n.maxOverzooming,this._source.minzoom),c=Math.max(t+n.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(a,t);if(Qr(this._source.type)){for(var d={},s={},l=0,m=Object.keys(u);lthis._source.maxzoom){var f=I.children(this._source.maxzoom)[0],g=this.getTile(f);if(g&&g.hasData()){i[f.key]=f;continue}}else{var _=I.children(this._source.maxzoom);if(i[_[0].key]&&i[_[1].key]&&i[_[2].key]&&i[_[3].key])continue}for(var h=y.wasRequested(),v=I.overscaledZ-1;v>=t;--v){var x=I.scaledTo(v);if(a[x.key])break;if(a[x.key]=!0,!(y=this.getTile(x))&&h&&(y=this._addTile(x)),y&&(i[x.key]=x,h=y.wasRequested(),y.hasData()))break}}}return i},n.prototype._updateLoadedParentTileCache=function(){for(var r in this._loadedParentTiles={},this._tiles){for(var e=[],n=void 0,i=this._tiles[r].tileID;i.overscaledZ>0;){if(i.key in this._loadedParentTiles){n=this._loadedParentTiles[i.key];break}e.push(i.key);var a=i.scaledTo(i.overscaledZ-1);if(n=this._getLoadedTile(a))break;i=a}for(var t=0,o=e;t0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},n.prototype.clearTiles=function(){for(var r in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(r);this._cache.reset()},n.prototype.tilesIn=function(e,n,i){var a=this,t=[],o=this.transform;if(!o)return t;for(var c=i?o.getCameraQueryGeometry(e):e,u=e.map((function(r){return o.pointCoordinate(r)})),d=c.map((function(r){return o.pointCoordinate(r)})),s=this.getIds(),l=1/0,m=1/0,p=-1/0,I=-1/0,y=0,f=d;y=0&&g[1].y+f>=0){var _=u.map((function(r){return c.getTilePoint(r)})),h=d.map((function(r){return c.getTilePoint(r)}));t.push({tile:i,tileID:c,queryGeometry:_,cameraQueryGeometry:h,scale:y})}}},h=0;h=r.browser.now())return!0}return!1},n.prototype.setFeatureState=function(r,e,n){r=r||"_geojsonTileLayer",this._state.updateState(r,e,n)},n.prototype.removeFeatureState=function(r,e,n){r=r||"_geojsonTileLayer",this._state.removeFeatureState(r,e,n)},n.prototype.getFeatureState=function(r,e){return r=r||"_geojsonTileLayer",this._state.getState(r,e)},n.prototype.setDependencies=function(r,e,n){var i=this._tiles[r];i&&i.setDependencies(e,n)},n.prototype.reloadTilesForDependencies=function(r,e){for(var n in this._tiles)this._tiles[n].hasDependency(r,e)&&this._reloadTile(n,"reloading");this._cache.filter((function(n){return!n.hasDependency(r,e)}))},n}(r.Evented);function Xr(r,e){var n=Math.abs(2*r.wrap)-+(r.wrap<0),i=Math.abs(2*e.wrap)-+(e.wrap<0);return r.overscaledZ-e.overscaledZ||i-n||e.canonical.y-r.canonical.y||e.canonical.x-r.canonical.x}function Qr(r){return"raster"===r||"image"===r||"video"===r}function $r(){return new r.window.Worker(Ic.workerUrl)}Yr.maxOverzooming=10,Yr.maxUnderzooming=3;var re="mapboxgl_preloaded_worker_pool",ee=function(){this.active={}};ee.prototype.acquire=function(r){if(!this.workers)for(this.workers=[];this.workers.length0?(a-o)/c:0;return this.points[t].mult(1-u).add(this.points[n].mult(u))};var Pe=function(r,e,n){var i=this.boxCells=[],a=this.circleCells=[];this.xCellCount=Math.ceil(r/n),this.yCellCount=Math.ceil(e/n);for(var t=0;t=-e[0]&&n<=e[0]&&i>=-e[1]&&i<=e[1]}function Me(e,n,i,a,t,o,c,u){var d=a?e.textSizeData:e.iconSizeData,s=r.evaluateSizeForZoom(d,i.transform.zoom),l=[256/i.width*2+1,256/i.height*2+1],m=a?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;m.clear();for(var p=e.lineVertexArray,I=a?e.text.placedSymbolArray:e.icon.placedSymbolArray,y=i.transform.width/i.transform.height,f=!1,g=0;gMath.abs(i.x-n.x)*a?{useVertical:!0}:(e===r.WritingMode.vertical?n.yi.x)?{needsFlipping:!0}:null}function Fe(e,n,i,a,t,o,c,u,d,s,l,m,p,I){var y,f=n/24,g=e.lineOffsetX*f,_=e.lineOffsetY*f;if(e.numGlyphs>1){var h=e.glyphStartIndex+e.numGlyphs,v=e.lineStartIndex,x=e.lineStartIndex+e.lineLength,P=Be(f,u,g,_,i,l,m,e,d,o,p);if(!P)return{notEnoughRoom:!0};var G=Se(P.first.point,c).point,C=Se(P.last.point,c).point;if(a&&!i){var S=ke(e.writingMode,G,C,I);if(S)return S}y=[P.first];for(var A=e.glyphStartIndex+1;A0?k.point:ze(m,B,b,1,t),z=ke(e.writingMode,b,F,I);if(z)return z}var w=we(f*u.getoffsetX(e.glyphStartIndex),g,_,i,l,m,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,d,o,p);if(!w)return{notEnoughRoom:!0};y=[w]}for(var R=0,E=y;R0?1:-1,y=0;a&&(I*=-1,y=Math.PI),I<0&&(y+=Math.PI);for(var f=I>0?u+c:u+c+1,g=t,_=t,h=0,v=0,x=Math.abs(p),P=[];h+v<=x;){if((f+=I)=d)return null;if(_=g,P.push(g),void 0===(g=m[f])){var G=new r.Point(s.getx(f),s.gety(f)),C=Se(G,l);if(C.signedDistanceFromCamera>0)g=m[f]=C.point;else{var S=f-I;g=ze(0===h?o:new r.Point(s.getx(S),s.gety(S)),G,_,x-h+1,l)}}h+=v,v=_.dist(g)}var A=(x-h)/v,b=g.sub(_),M=b.mult(A)._add(_);M._add(b._unit()._perp()._mult(i*I));var B=y+Math.atan2(g.y-_.y,g.x-_.x);return P.push(M),{point:M,angle:B,path:P}}Pe.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Pe.prototype.insert=function(r,e,n,i,a){this._forEachCell(e,n,i,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(r),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(i),this.bboxes.push(a)},Pe.prototype.insertCircle=function(r,e,n,i){this._forEachCell(e-i,n-i,e+i,n+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(r),this.circles.push(e),this.circles.push(n),this.circles.push(i)},Pe.prototype._insertBoxCell=function(r,e,n,i,a,t){this.boxCells[a].push(t)},Pe.prototype._insertCircleCell=function(r,e,n,i,a,t){this.circleCells[a].push(t)},Pe.prototype._query=function(r,e,n,i,a,t){if(n<0||r>this.width||i<0||e>this.height)return!a&&[];var o=[];if(r<=0&&e<=0&&this.width<=n&&this.height<=i){if(a)return!0;for(var c=0;c0:o},Pe.prototype._queryCircle=function(r,e,n,i,a){var t=r-n,o=r+n,c=e-n,u=e+n;if(o<0||t>this.width||u<0||c>this.height)return!i&&[];var d=[],s={hitTest:i,circle:{x:r,y:e,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(t,c,o,u,this._queryCellCircle,d,s,a),i?d.length>0:d},Pe.prototype.query=function(r,e,n,i,a){return this._query(r,e,n,i,!1,a)},Pe.prototype.hitTest=function(r,e,n,i,a){return this._query(r,e,n,i,!0,a)},Pe.prototype.hitTestCircle=function(r,e,n,i){return this._queryCircle(r,e,n,!0,i)},Pe.prototype._queryCell=function(r,e,n,i,a,t,o,c){var u=o.seenUids,d=this.boxCells[a];if(null!==d)for(var s=this.bboxes,l=0,m=d;l=s[I+0]&&i>=s[I+1]&&(!c||c(this.boxKeys[p]))){if(o.hitTest)return t.push(!0),!0;t.push({key:this.boxKeys[p],x1:s[I],y1:s[I+1],x2:s[I+2],y2:s[I+3]})}}}var y=this.circleCells[a];if(null!==y)for(var f=this.circles,g=0,_=y;g<_.length;g+=1){var h=_[g];if(!u.circle[h]){u.circle[h]=!0;var v=3*h;if(this._circleAndRectCollide(f[v],f[v+1],f[v+2],r,e,n,i)&&(!c||c(this.circleKeys[h]))){if(o.hitTest)return t.push(!0),!0;var x=f[v],P=f[v+1],G=f[v+2];t.push({key:this.circleKeys[h],x1:x-G,y1:P-G,x2:x+G,y2:P+G})}}}},Pe.prototype._queryCellCircle=function(r,e,n,i,a,t,o,c){var u=o.circle,d=o.seenUids,s=this.boxCells[a];if(null!==s)for(var l=this.bboxes,m=0,p=s;mo*o+c*c},Pe.prototype._circleAndRectCollide=function(r,e,n,i,a,t,o){var c=(t-i)/2,u=Math.abs(r-(i+c));if(u>c+n)return!1;var d=(o-a)/2,s=Math.abs(e-(a+d));if(s>d+n)return!1;if(u<=c||s<=d)return!0;var l=u-c,m=s-d;return l*l+m*m<=n*n};var Re=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ee(r,e){for(var n=0;n=1;z--)F.push(B.path[z]);for(var w=1;w0){for(var T=F[0].clone(),D=F[0].clone(),J=1;J=A.x&&D.x<=b.x&&T.y>=A.y&&D.y<=b.y?[F]:D.xb.x||D.yb.y?[]:r.clipLine([F],A.x,A.y,b.x,b.y)}for(var U=0,H=N;U=this.screenRightBoundary||ithis.screenBottomBoundary},De.prototype.isInsideGrid=function(r,e,n,i){return n>=0&&r=0&&e0?(this.prevPlacement&&this.prevPlacement.variableOffsets[l.crossTileID]&&this.prevPlacement.placements[l.crossTileID]&&this.prevPlacement.placements[l.crossTileID].text&&(y=this.prevPlacement.variableOffsets[l.crossTileID].anchor),this.variableOffsets[l.crossTileID]={textOffset:f,width:n,height:i,anchor:r,textBoxScale:a,prevAnchor:y},this.markUsedJustification(m,r,l,p),m.allowVerticalPlacement&&(this.markUsedOrientation(m,p,l),this.placedOrientations[l.crossTileID]=p),{shift:g,placedGlyphBoxes:_}):void 0},Ze.prototype.placeLayerBucketPart=function(e,n,i){var a=this,t=e.parameters,o=t.bucket,c=t.layout,u=t.posMatrix,d=t.textLabelPlaneMatrix,s=t.labelToScreenMatrix,l=t.textPixelRatio,m=t.holdingForFade,p=t.collisionBoxArray,I=t.partiallyEvaluatedTextSize,y=t.collisionGroup,f=c.get("text-optional"),g=c.get("icon-optional"),_=c.get("text-allow-overlap"),h=c.get("icon-allow-overlap"),v="map"===c.get("text-rotation-alignment"),x="map"===c.get("text-pitch-alignment"),P="none"!==c.get("icon-text-fit"),G="viewport-y"===c.get("symbol-z-order"),C=_&&(h||!o.hasIconData()||g),S=h&&(_||!o.hasTextData()||f);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var A=function(e,t){if(!n[e.crossTileID])if(m)a.placements[e.crossTileID]=new Le(!1,!1,!1);else{var p=!1,G=!1,A=!0,b=null,M={box:null,offscreen:null},B={box:null,offscreen:null},k=null,F=null,z=null,w=0,R=0,E=0;t.textFeatureIndex?w=t.textFeatureIndex:e.useRuntimeCollisionCircles&&(w=e.featureIndex),t.verticalTextFeatureIndex&&(R=t.verticalTextFeatureIndex);var N=t.textBox;if(N){var T=function(n){var i=r.WritingMode.horizontal;if(o.allowVerticalPlacement&&!n&&a.prevPlacement){var t=a.prevPlacement.placedOrientations[e.crossTileID];t&&(a.placedOrientations[e.crossTileID]=t,i=t,a.markUsedOrientation(o,i,e))}return i},D=function(n,i){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&t.verticalTextBox)for(var a=0,c=o.writingModes;a0&&(J=J.filter((function(r){return r!==U.anchor}))).unshift(U.anchor)}var H=function(r,n,i){for(var t=r.x2-r.x1,c=r.y2-r.y1,d=e.textBoxScale,s=P&&!h?n:null,m={box:[],offscreen:!1},I=_?2*J.length:J.length,f=0;f=J.length,C=a.attemptAnchorPlacement(g,r,t,c,d,v,x,l,u,y,G,e,o,i,s);if(C&&(m=C.placedGlyphBoxes)&&m.box&&m.box.length){p=!0,b=C.shift;break}}return m};D((function(){return H(N,t.iconBox,r.WritingMode.horizontal)}),(function(){var n=t.verticalTextBox,i=M&&M.box&&M.box.length;return o.allowVerticalPlacement&&!i&&e.numVerticalGlyphVertices>0&&n?H(n,t.verticalIconBox,r.WritingMode.vertical):{box:null,offscreen:null}})),M&&(p=M.box,A=M.offscreen);var L=T(M&&M.box);if(!p&&a.prevPlacement){var O=a.prevPlacement.variableOffsets[e.crossTileID];O&&(a.variableOffsets[e.crossTileID]=O,a.markUsedJustification(o,O.anchor,e,L))}}else{var K=function(r,n){var i=a.collisionIndex.placeCollisionBox(r,_,l,u,y.predicate);return i&&i.box&&i.box.length&&(a.markUsedOrientation(o,n,e),a.placedOrientations[e.crossTileID]=n),i};D((function(){return K(N,r.WritingMode.horizontal)}),(function(){var n=t.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&n?K(n,r.WritingMode.vertical):{box:null,offscreen:null}})),T(M&&M.box&&M.box.length)}}if(p=(k=M)&&k.box&&k.box.length>0,A=k&&k.offscreen,e.useRuntimeCollisionCircles){var V=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),j=r.evaluateSizeForFeature(o.textSizeData,I,V),W=c.get("text-padding"),Z=e.collisionCircleDiameter;F=a.collisionIndex.placeCollisionCircles(_,V,o.lineVertexArray,o.glyphOffsetArray,j,u,d,s,i,x,y.predicate,Z,W),p=_||F.circles.length>0&&!F.collisionDetected,A=A&&F.offscreen}if(t.iconFeatureIndex&&(E=t.iconFeatureIndex),t.iconBox){var q=function(r){var e=P&&b?We(r,b.x,b.y,v,x,a.transform.angle):r;return a.collisionIndex.placeCollisionBox(e,h,l,u,y.predicate)};G=B&&B.box&&B.box.length&&t.verticalIconBox?(z=q(t.verticalIconBox)).box.length>0:(z=q(t.iconBox)).box.length>0,A=A&&z.offscreen}var Y=f||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,X=g||0===e.numIconVertices;if(Y||X?X?Y||(G=G&&p):p=G&&p:G=p=G&&p,p&&k&&k.box&&(B&&B.box&&R?a.collisionIndex.insertCollisionBox(k.box,c.get("text-ignore-placement"),o.bucketInstanceId,R,y.ID):a.collisionIndex.insertCollisionBox(k.box,c.get("text-ignore-placement"),o.bucketInstanceId,w,y.ID)),G&&z&&a.collisionIndex.insertCollisionBox(z.box,c.get("icon-ignore-placement"),o.bucketInstanceId,E,y.ID),F&&(p&&a.collisionIndex.insertCollisionCircles(F.circles,c.get("text-ignore-placement"),o.bucketInstanceId,w,y.ID),i)){var Q=o.bucketInstanceId,$=a.collisionCircleArrays[Q];void 0===$&&($=a.collisionCircleArrays[Q]=new Oe);for(var rr=0;rr=0;--M){var B=b[M];A(o.symbolInstances.get(B),o.collisionArrays[B])}else for(var k=e.symbolInstanceStart;k=0&&(e.text.placedSymbolArray.get(d).crossTileID=t>=0&&d!==t?0:i.crossTileID)}},Ze.prototype.markUsedOrientation=function(e,n,i){for(var a=n===r.WritingMode.horizontal||n===r.WritingMode.horizontalOnly?n:0,t=n===r.WritingMode.vertical?n:0,o=0,c=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];o0||u>0,h=t.numIconVertices>0,v=a.placedOrientations[t.crossTileID],x=v===r.WritingMode.vertical,P=v===r.WritingMode.horizontal||v===r.WritingMode.horizontalOnly;if(_){var G=an(g.text),C=x?tn:G;I(e.text,c,C);var S=P?tn:G;I(e.text,u,S);var A=g.text.isHidden();[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex].forEach((function(r){r>=0&&(e.text.placedSymbolArray.get(r).hidden=A||x?1:0)})),t.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(t.verticalPlacedTextSymbolIndex).hidden=A||P?1:0);var b=a.variableOffsets[t.crossTileID];b&&a.markUsedJustification(e,b.anchor,t,v);var M=a.placedOrientations[t.crossTileID];M&&(a.markUsedJustification(e,"left",t,M),a.markUsedOrientation(e,M,t))}if(h){var B=an(g.icon),k=!(m&&t.verticalPlacedIconSymbolIndex&&x);if(t.placedIconSymbolIndex>=0){var F=k?B:tn;I(e.icon,t.numIconVertices,F),e.icon.placedSymbolArray.get(t.placedIconSymbolIndex).hidden=g.icon.isHidden()}if(t.verticalPlacedIconSymbolIndex>=0){var z=k?tn:B;I(e.icon,t.numVerticalIconVertices,z),e.icon.placedSymbolArray.get(t.verticalPlacedIconSymbolIndex).hidden=g.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var w=e.collisionArrays[i];if(w){var R=new r.Point(0,0);if(w.textBox||w.verticalTextBox){var E=!0;if(d){var N=a.variableOffsets[y];N?(R=je(N.anchor,N.width,N.height,N.textOffset,N.textBoxScale),s&&R._rotate(l?a.transform.angle:-a.transform.angle)):E=!1}w.textBox&&qe(e.textCollisionBox.collisionVertexArray,g.text.placed,!E||x,R.x,R.y),w.verticalTextBox&&qe(e.textCollisionBox.collisionVertexArray,g.text.placed,!E||P,R.x,R.y)}var T=Boolean(!P&&w.verticalIconBox);w.iconBox&&qe(e.iconCollisionBox.collisionVertexArray,g.icon.placed,T,m?R.x:0,m?R.y:0),w.verticalIconBox&&qe(e.iconCollisionBox.collisionVertexArray,g.icon.placed,!T,m?R.x:0,m?R.y:0)}}},f=0;fr},Ze.prototype.setStale=function(){this.stale=!0};var Ye=Math.pow(2,25),Xe=Math.pow(2,24),Qe=Math.pow(2,17),$e=Math.pow(2,16),rn=Math.pow(2,9),en=Math.pow(2,8),nn=Math.pow(2,1);function an(r){if(0===r.opacity&&!r.placed)return 0;if(1===r.opacity&&r.placed)return 4294967295;var e=r.placed?1:0,n=Math.floor(127*r.opacity);return n*Ye+e*Xe+n*Qe+e*$e+n*rn+e*en+n*nn+e}var tn=0,on=function(r){this._sortAcrossTiles="viewport-y"!==r.layout.get("symbol-z-order")&&void 0!==r.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};on.prototype.continuePlacement=function(r,e,n,i,a){for(var t=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var c=n[e[this._currentPlacementIndex]],u=this.placement.collisionIndex.transform.zoom;if("symbol"===c.type&&(!c.minzoom||c.minzoom<=u)&&(!c.maxzoom||c.maxzoom>u)){if(this._inProgressLayer||(this._inProgressLayer=new on(c)),this._inProgressLayer.continuePlacement(i[c.source],this.placement,this._showCollisionBoxes,c,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},cn.prototype.commit=function(r){return this.placement.commit(r),this.placement};var un=512/r.EXTENT/2,dn=function(r,e,n){this.tileID=r,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var i=0;ir.overscaledZ)for(var c in o){var u=o[c];u.tileID.isChildOf(r)&&u.findMatches(e.symbolInstances,r,a)}else{var d=o[r.scaledTo(Number(t)).key];d&&d.findMatches(e.symbolInstances,r,a)}}for(var s=0;s0)throw new Error("Unimplemented: "+a.map((function(r){return r.command})).join(", ")+".");return i.forEach((function(r){"setTransition"!==r.command&&n[r.command].apply(n,r.args)})),this.stylesheet=e,!0},n.prototype.addImage=function(e,n){if(this.getImage(e))return this.fire(new r.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,n),this._afterImageUpdated(e)},n.prototype.updateImage=function(r,e){this.imageManager.updateImage(r,e)},n.prototype.getImage=function(r){return this.imageManager.getImage(r)},n.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new r.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._afterImageUpdated(e)},n.prototype._afterImageUpdated=function(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new r.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(e,n,i){var a=this;if(void 0===i&&(i={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0)||!this._validate(r.validateStyle.source,"sources."+e,n,null,i)){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var t=this.sourceCaches[e]=new Yr(e,n,this.dispatcher);t.style=this,t.setEventedParent(this,(function(){return{isSourceLoaded:a.loaded(),source:t.serialize(),sourceId:e}})),t.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===e)return this.fire(new r.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+n+'" is using it.')));var i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new r.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(r,e){this._checkLoaded(),this.sourceCaches[r].getSource().setData(e),this._changed=!0},n.prototype.getSource=function(r){return this.sourceCaches[r]&&this.sourceCaches[r].getSource()},n.prototype.addLayer=function(e,n,i){void 0===i&&(i={}),this._checkLoaded();var a=e.id;if(this.getLayer(a))this.fire(new r.ErrorEvent(new Error('Layer with id "'+a+'" already exists on this map')));else{var t;if("custom"===e.type){if(pn(this,r.validateCustomStyleLayer(e)))return;t=r.createStyleLayer(e)}else{if("object"===typeof e.source&&(this.addSource(a,e.source),e=r.clone$1(e),e=r.extend(e,{source:a})),this._validate(r.validateStyle.layer,"layers."+a,e,{arrayIndex:-1},i))return;t=r.createStyleLayer(e),this._validateLayer(t),t.setEventedParent(this,{layer:{id:a}}),this._serializedLayers[t.id]=t.serialize()}var o=n?this._order.indexOf(n):this._order.length;if(n&&-1===o)this.fire(new r.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=t,this._removedLayers[a]&&t.source&&"custom"!==t.type){var c=this._removedLayers[a];delete this._removedLayers[a],c.type!==t.type?this._updatedSources[t.source]="clear":(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause())}this._updateLayer(t),t.onAdd&&t.onAdd(this.map)}}},n.prototype.moveLayer=function(e,n){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==n){var i=this._order.indexOf(e);this._order.splice(i,1);var a=n?this._order.indexOf(n):this._order.length;n&&-1===a?this.fire(new r.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(a,0,e),this._layerOrderChanged=!0)}}else this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(e){this._checkLoaded();var n=this._layers[e];if(n){n.setEventedParent(null);var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.onRemove(this.map)}else this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(r){return this._layers[r]},n.prototype.hasLayer=function(r){return r in this._layers},n.prototype.setLayerZoomRange=function(e,n,i){this._checkLoaded();var a=this.getLayer(e);a?a.minzoom===n&&a.maxzoom===i||(null!=n&&(a.minzoom=n),null!=i&&(a.maxzoom=i),this._updateLayer(a)):this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(e,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);if(a){if(!r.deepEqual(a.filter,n))return null===n||void 0===n?(a.filter=void 0,void this._updateLayer(a)):void(this._validate(r.validateStyle.filter,"layers."+a.id+".filter",n,null,i)||(a.filter=r.clone$1(n),this._updateLayer(a)))}else this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(e){return r.clone$1(this.getLayer(e).filter)},n.prototype.setLayoutProperty=function(e,n,i,a){void 0===a&&(a={}),this._checkLoaded();var t=this.getLayer(e);t?r.deepEqual(t.getLayoutProperty(n),i)||(t.setLayoutProperty(n,i,a),this._updateLayer(t)):this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(e,n){var i=this.getLayer(e);if(i)return i.getLayoutProperty(n);this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(e,n,i,a){void 0===a&&(a={}),this._checkLoaded();var t=this.getLayer(e);t?r.deepEqual(t.getPaintProperty(n),i)||(t.setPaintProperty(n,i,a)&&this._updateLayer(t),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(r,e){return this.getLayer(r).getPaintProperty(e)},n.prototype.setFeatureState=function(e,n){this._checkLoaded();var i=e.source,a=e.sourceLayer,t=this.sourceCaches[i];if(void 0!==t){var o=t.getSource().type;"geojson"===o&&a?this.fire(new r.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||a?(void 0===e.id&&this.fire(new r.ErrorEvent(new Error("The feature id parameter must be provided."))),t.setFeatureState(a,e.id,n)):this.fire(new r.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new r.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},n.prototype.removeFeatureState=function(e,n){this._checkLoaded();var i=e.source,a=this.sourceCaches[i];if(void 0!==a){var t=a.getSource().type,o="vector"===t?e.sourceLayer:void 0;"vector"!==t||o?n&&"string"!==typeof e.id&&"number"!==typeof e.id?this.fire(new r.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):a.removeFeatureState(o,e.id,n):this.fire(new r.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new r.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(e){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){if("vector"!==a.getSource().type||i)return void 0===e.id&&this.fire(new r.ErrorEvent(new Error("The feature id parameter must be provided."))),a.getFeatureState(i,e.id);this.fire(new r.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new r.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return r.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return r.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:r.mapObject(this.sourceCaches,(function(r){return r.serialize()})),layers:this._serializeLayers(this._order)},(function(r){return void 0!==r}))},n.prototype._updateLayer=function(r){this._updatedLayers[r.id]=!0,r.source&&!this._updatedSources[r.source]&&"raster"!==this.sourceCaches[r.source].getSource().type&&(this._updatedSources[r.source]="reload",this.sourceCaches[r.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(r){for(var e=this,n=function(r){return"fill-extrusion"===e._layers[r].type},i={},a=[],t=this._order.length-1;t>=0;t--){var o=this._order[t];if(n(o)){i[o]=t;for(var c=0,u=r;c=0;I--){var y=this._order[I];if(n(y))for(var f=a.length-1;f>=0;f--){var g=a[f].feature;if(i[g.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",zn="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;}",wn="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",Rn="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",En="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",Nn="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",Tn="#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}",Dn="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);}",Jn="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}",Un="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;}",Hn="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}",Ln="uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 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\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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 tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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;}",On="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}",Kn="uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 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\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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 tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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);}",Vn="varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",jn="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;}",Wn="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\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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}",Zn="uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 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\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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 tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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;}",qn="#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 vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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}",Yn="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;}",Xn="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}",Qn="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;}",$n="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}",ri="\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);}",ei="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 vec2 v_uv;\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,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",ni="\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);}",ii="uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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 pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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 tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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 aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;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*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));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}",ai="\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;varying float v_width;\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 float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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 lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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);v_width=floorwidth;}",ti="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}",oi="\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);}",ci="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}",ui="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;}",di="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}",si="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;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;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;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_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} 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*max(a_minFontScale,fontScale)+a_pxoffset/16.0),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));}",li="#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}",mi="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;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;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;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_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} 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+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;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=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}",pi="#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 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 fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;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}",Ii="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;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 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;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;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_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} 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=size/24.0;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 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.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}",yi=Hi("#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;}"),fi=Hi(hn,vn),gi=Hi(xn,Pn),_i=Hi(Gn,Cn),hi=Hi(Sn,An),vi=Hi(bn,Mn),xi=Hi(Bn,kn),Pi=Hi(Fn,zn),Gi=Hi(wn,Rn),Ci=Hi(En,Nn),Si=Hi(Tn,Dn),Ai=Hi(Jn,Un),bi=Hi(Hn,Ln),Mi=Hi(On,Kn),Bi=Hi(Vn,jn),ki=Hi(Wn,Zn),Fi=Hi(qn,Yn),zi=Hi(Xn,Qn),wi=Hi($n,ri),Ri=Hi(ei,ni),Ei=Hi(ii,ai),Ni=Hi(ti,oi),Ti=Hi(ci,ui),Di=Hi(di,si),Ji=Hi(li,mi),Ui=Hi(pi,Ii);function Hi(r,e){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i=e.match(/attribute ([\w]+) ([\w]+)/g),a=r.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),t=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=t?t.concat(a):a,c={};return{fragmentSource:r=r.replace(n,(function(r,e,n,i,a){return c[a]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nvarying "+n+" "+i+" "+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n"})),vertexSource:e=e.replace(n,(function(r,e,n,i,a){var t="float"===i?"vec2":"vec4",o=a.match(/color/)?"color":t;return c[a]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+n+" "+t+" a_"+a+";\nvarying "+n+" "+i+" "+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = a_"+a+";\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = unpack_mix_"+o+"(a_"+a+", u_"+a+"_t);\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+n+" "+t+" a_"+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = a_"+a+";\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = unpack_mix_"+o+"(a_"+a+", u_"+a+"_t);\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n"})),staticAttributes:i,staticUniforms:o}}var Li=Object.freeze({__proto__:null,prelude:yi,background:fi,backgroundPattern:gi,circle:_i,clippingMask:hi,heatmap:vi,heatmapTexture:xi,collisionBox:Pi,collisionCircle:Gi,debug:Ci,fill:Si,fillOutline:Ai,fillOutlinePattern:bi,fillPattern:Mi,fillExtrusion:Bi,fillExtrusionPattern:ki,hillshadePrepare:Fi,hillshade:zi,line:wi,lineGradient:Ri,linePattern:Ei,lineSDF:Ni,raster:Ti,symbolIcon:Di,symbolSDF:Ji,symbolTextAndIcon:Ui}),Oi=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function Ki(r){for(var e=[],n=0;n>16,c>>16],u_pixel_coord_lower:[65535&o,65535&c]}}function Wi(r,e,n,i){var a=n.imageManager.getPattern(r.from.toString()),t=n.imageManager.getPattern(r.to.toString()),o=n.imageManager.getPixelSize(),c=o.width,u=o.height,d=Math.pow(2,i.tileID.overscaledZ),s=i.tileSize*Math.pow(2,n.transform.tileZoom)/d,l=s*(i.tileID.canonical.x+i.tileID.wrap*d),m=s*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:t.tl,u_pattern_br_b:t.br,u_texsize:[c,u],u_mix:e.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:t.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/Je(i,1,n.transform.tileZoom),u_pixel_coord_upper:[l>>16,m>>16],u_pixel_coord_lower:[65535&l,65535&m]}}Vi.prototype.draw=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y){var f,g=r.gl;if(!this.failedToCreate){for(var _ in r.program.set(this.program),r.setDepthMode(n),r.setStencilMode(i),r.setColorMode(a),r.setCullFace(t),this.fixedUniforms)this.fixedUniforms[_].set(o[_]);p&&p.setUniforms(r,this.binderUniforms,l,{zoom:m});for(var h=(f={},f[g.LINES]=2,f[g.TRIANGLES]=3,f[g.LINE_STRIP]=1,f)[e],v=0,x=s.get();v0?1/(1-r):1+r}function ha(r){return r>0?1-1/(1.001-r):-r}var va,xa=function(r,e,n,i,a,t,o,c,u,d){var s=a.transform;return{u_is_size_zoom_constant:+("constant"===r||"source"===r),u_is_size_feature_constant:+("constant"===r||"camera"===r),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:s.cameraToCenterDistance,u_pitch:s.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:s.width/s.height,u_fade_change:a.options.fadeDuration?a.symbolFadeChange:1,u_matrix:t,u_label_plane_matrix:o,u_coord_matrix:c,u_is_text:+u,u_pitch_with_map:+i,u_texsize:d,u_texture:0}},Pa=function(e,n,i,a,t,o,c,u,d,s,l){var m=t.transform;return r.extend(xa(e,n,i,a,t,o,c,u,d,s),{u_gamma_scale:a?Math.cos(m._pitch)*m.cameraToCenterDistance:1,u_device_pixel_ratio:r.browser.devicePixelRatio,u_is_halo:+l})},Ga=function(e,n,i,a,t,o,c,u,d,s){return r.extend(Pa(e,n,i,a,t,o,c,u,!0,d,!0),{u_texsize_icon:s,u_texture_icon:1})},Ca=function(r,e,n){return{u_matrix:r,u_opacity:e,u_color:n}},Sa=function(e,n,i,a,t,o){return r.extend(Wi(a,o,i,t),{u_matrix:e,u_opacity:n})},Aa={fillExtrusion:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_lightpos:new r.Uniform3f(e,n.u_lightpos),u_lightintensity:new r.Uniform1f(e,n.u_lightintensity),u_lightcolor:new r.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new r.Uniform1f(e,n.u_vertical_gradient),u_opacity:new r.Uniform1f(e,n.u_opacity)}},fillExtrusionPattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_lightpos:new r.Uniform3f(e,n.u_lightpos),u_lightintensity:new r.Uniform1f(e,n.u_lightintensity),u_lightcolor:new r.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new r.Uniform1f(e,n.u_vertical_gradient),u_height_factor:new r.Uniform1f(e,n.u_height_factor),u_image:new r.Uniform1i(e,n.u_image),u_texsize:new r.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new r.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new r.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new r.Uniform3f(e,n.u_scale),u_fade:new r.Uniform1f(e,n.u_fade),u_opacity:new r.Uniform1f(e,n.u_opacity)}},fill:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix)}},fillPattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_image:new r.Uniform1i(e,n.u_image),u_texsize:new r.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new r.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new r.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new r.Uniform3f(e,n.u_scale),u_fade:new r.Uniform1f(e,n.u_fade)}},fillOutline:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_world:new r.Uniform2f(e,n.u_world)}},fillOutlinePattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_world:new r.Uniform2f(e,n.u_world),u_image:new r.Uniform1i(e,n.u_image),u_texsize:new r.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new r.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new r.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new r.Uniform3f(e,n.u_scale),u_fade:new r.Uniform1f(e,n.u_fade)}},circle:function(e,n){return{u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_scale_with_map:new r.Uniform1i(e,n.u_scale_with_map),u_pitch_with_map:new r.Uniform1i(e,n.u_pitch_with_map),u_extrude_scale:new r.Uniform2f(e,n.u_extrude_scale),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_matrix:new r.UniformMatrix4f(e,n.u_matrix)}},collisionBox:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_pixels_to_tile_units:new r.Uniform1f(e,n.u_pixels_to_tile_units),u_extrude_scale:new r.Uniform2f(e,n.u_extrude_scale),u_overscale_factor:new r.Uniform1f(e,n.u_overscale_factor)}},collisionCircle:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_inv_matrix:new r.UniformMatrix4f(e,n.u_inv_matrix),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_viewport_size:new r.Uniform2f(e,n.u_viewport_size)}},debug:function(e,n){return{u_color:new r.UniformColor(e,n.u_color),u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_overlay:new r.Uniform1i(e,n.u_overlay),u_overlay_scale:new r.Uniform1f(e,n.u_overlay_scale)}},clippingMask:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix)}},heatmap:function(e,n){return{u_extrude_scale:new r.Uniform1f(e,n.u_extrude_scale),u_intensity:new r.Uniform1f(e,n.u_intensity),u_matrix:new r.UniformMatrix4f(e,n.u_matrix)}},heatmapTexture:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_world:new r.Uniform2f(e,n.u_world),u_image:new r.Uniform1i(e,n.u_image),u_color_ramp:new r.Uniform1i(e,n.u_color_ramp),u_opacity:new r.Uniform1f(e,n.u_opacity)}},hillshade:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_image:new r.Uniform1i(e,n.u_image),u_latrange:new r.Uniform2f(e,n.u_latrange),u_light:new r.Uniform2f(e,n.u_light),u_shadow:new r.UniformColor(e,n.u_shadow),u_highlight:new r.UniformColor(e,n.u_highlight),u_accent:new r.UniformColor(e,n.u_accent)}},hillshadePrepare:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_image:new r.Uniform1i(e,n.u_image),u_dimension:new r.Uniform2f(e,n.u_dimension),u_zoom:new r.Uniform1f(e,n.u_zoom),u_unpack:new r.Uniform4f(e,n.u_unpack)}},line:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_ratio:new r.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new r.Uniform2f(e,n.u_units_to_pixels)}},lineGradient:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_ratio:new r.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new r.Uniform2f(e,n.u_units_to_pixels),u_image:new r.Uniform1i(e,n.u_image),u_image_height:new r.Uniform1f(e,n.u_image_height)}},linePattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_texsize:new r.Uniform2f(e,n.u_texsize),u_ratio:new r.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_image:new r.Uniform1i(e,n.u_image),u_units_to_pixels:new r.Uniform2f(e,n.u_units_to_pixels),u_scale:new r.Uniform3f(e,n.u_scale),u_fade:new r.Uniform1f(e,n.u_fade)}},lineSDF:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_ratio:new r.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new r.Uniform2f(e,n.u_units_to_pixels),u_patternscale_a:new r.Uniform2f(e,n.u_patternscale_a),u_patternscale_b:new r.Uniform2f(e,n.u_patternscale_b),u_sdfgamma:new r.Uniform1f(e,n.u_sdfgamma),u_image:new r.Uniform1i(e,n.u_image),u_tex_y_a:new r.Uniform1f(e,n.u_tex_y_a),u_tex_y_b:new r.Uniform1f(e,n.u_tex_y_b),u_mix:new r.Uniform1f(e,n.u_mix)}},raster:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_tl_parent:new r.Uniform2f(e,n.u_tl_parent),u_scale_parent:new r.Uniform1f(e,n.u_scale_parent),u_buffer_scale:new r.Uniform1f(e,n.u_buffer_scale),u_fade_t:new r.Uniform1f(e,n.u_fade_t),u_opacity:new r.Uniform1f(e,n.u_opacity),u_image0:new r.Uniform1i(e,n.u_image0),u_image1:new r.Uniform1i(e,n.u_image1),u_brightness_low:new r.Uniform1f(e,n.u_brightness_low),u_brightness_high:new r.Uniform1f(e,n.u_brightness_high),u_saturation_factor:new r.Uniform1f(e,n.u_saturation_factor),u_contrast_factor:new r.Uniform1f(e,n.u_contrast_factor),u_spin_weights:new r.Uniform3f(e,n.u_spin_weights)}},symbolIcon:function(e,n){return{u_is_size_zoom_constant:new r.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new r.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new r.Uniform1f(e,n.u_size_t),u_size:new r.Uniform1f(e,n.u_size),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new r.Uniform1f(e,n.u_pitch),u_rotate_symbol:new r.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new r.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new r.Uniform1f(e,n.u_fade_change),u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new r.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new r.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new r.Uniform1i(e,n.u_is_text),u_pitch_with_map:new r.Uniform1i(e,n.u_pitch_with_map),u_texsize:new r.Uniform2f(e,n.u_texsize),u_texture:new r.Uniform1i(e,n.u_texture)}},symbolSDF:function(e,n){return{u_is_size_zoom_constant:new r.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new r.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new r.Uniform1f(e,n.u_size_t),u_size:new r.Uniform1f(e,n.u_size),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new r.Uniform1f(e,n.u_pitch),u_rotate_symbol:new r.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new r.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new r.Uniform1f(e,n.u_fade_change),u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new r.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new r.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new r.Uniform1i(e,n.u_is_text),u_pitch_with_map:new r.Uniform1i(e,n.u_pitch_with_map),u_texsize:new r.Uniform2f(e,n.u_texsize),u_texture:new r.Uniform1i(e,n.u_texture),u_gamma_scale:new r.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new r.Uniform1i(e,n.u_is_halo)}},symbolTextAndIcon:function(e,n){return{u_is_size_zoom_constant:new r.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new r.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new r.Uniform1f(e,n.u_size_t),u_size:new r.Uniform1f(e,n.u_size),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new r.Uniform1f(e,n.u_pitch),u_rotate_symbol:new r.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new r.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new r.Uniform1f(e,n.u_fade_change),u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new r.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new r.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new r.Uniform1i(e,n.u_is_text),u_pitch_with_map:new r.Uniform1i(e,n.u_pitch_with_map),u_texsize:new r.Uniform2f(e,n.u_texsize),u_texsize_icon:new r.Uniform2f(e,n.u_texsize_icon),u_texture:new r.Uniform1i(e,n.u_texture),u_texture_icon:new r.Uniform1i(e,n.u_texture_icon),u_gamma_scale:new r.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new r.Uniform1i(e,n.u_is_halo)}},background:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_opacity:new r.Uniform1f(e,n.u_opacity),u_color:new r.UniformColor(e,n.u_color)}},backgroundPattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_opacity:new r.Uniform1f(e,n.u_opacity),u_image:new r.Uniform1i(e,n.u_image),u_pattern_tl_a:new r.Uniform2f(e,n.u_pattern_tl_a),u_pattern_br_a:new r.Uniform2f(e,n.u_pattern_br_a),u_pattern_tl_b:new r.Uniform2f(e,n.u_pattern_tl_b),u_pattern_br_b:new r.Uniform2f(e,n.u_pattern_br_b),u_texsize:new r.Uniform2f(e,n.u_texsize),u_mix:new r.Uniform1f(e,n.u_mix),u_pattern_size_a:new r.Uniform2f(e,n.u_pattern_size_a),u_pattern_size_b:new r.Uniform2f(e,n.u_pattern_size_b),u_scale_a:new r.Uniform1f(e,n.u_scale_a),u_scale_b:new r.Uniform1f(e,n.u_scale_b),u_pixel_coord_upper:new r.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new r.Uniform2f(e,n.u_pixel_coord_lower),u_tile_units_to_pixels:new r.Uniform1f(e,n.u_tile_units_to_pixels)}}};function ba(e,n,i,a,t,o,c){for(var u=e.context,d=u.gl,s=e.useProgram("collisionBox"),l=[],m=0,p=0,I=0;I0){var x=r.create(),P=_;r.mul(x,g.placementInvProjMatrix,e.transform.glCoordMatrix),r.mul(x,x,g.placementViewportMatrix),l.push({circleArray:v,circleOffset:p,transform:P,invTransform:x}),p=m+=v.length/4}h&&s.draw(u,d.LINES,Dr.disabled,Hr.disabled,e.colorModeForRenderPass(),Zr.disabled,ea(_,e.transform,f),i.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,e.transform.zoom,null,null,h.collisionVertexBuffer)}}if(c&&l.length){var G=e.useProgram("collisionCircle"),C=new r.StructArrayLayout2f1f2i16;C.resize(4*m),C._trim();for(var S=0,A=0,b=l;A=0&&(y[g.associatedIconIndex]={shiftedAnchor:b,angle:M})}else Ee(g.numGlyphs,p)}if(l){I.clear();for(var k=e.icon.placedSymbolArray,F=0;F0){var c=r.browser.now(),u=(c-e.timeAdded)/o,d=n?(c-n.timeAdded)/o:-1,s=i.getSource(),l=t.coveringZoomLevel({tileSize:s.tileSize,roundZoom:s.roundZoom}),m=!n||Math.abs(n.tileID.overscaledZ-l)>Math.abs(e.tileID.overscaledZ-l),p=m&&e.refreshedUponExpiration?1:r.clamp(m?u:1-d,0,1);return e.refreshedUponExpiration&&u>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}function Qa(r,e,n){var i=n.paint.get("background-color"),a=n.paint.get("background-opacity");if(0!==a){var t=r.context,o=t.gl,c=r.transform,u=c.tileSize,d=n.paint.get("background-pattern");if(!r.isPatternMissing(d)){var s=!d&&1===i.a&&1===a&&r.opaquePassEnabledForLayer()?"opaque":"translucent";if(r.renderPass===s){var l=Hr.disabled,m=r.depthModeForSublayer(0,"opaque"===s?Dr.ReadWrite:Dr.ReadOnly),p=r.colorModeForRenderPass(),I=r.useProgram(d?"backgroundPattern":"background"),y=c.coveringTiles({tileSize:u});d&&(t.activeTexture.set(o.TEXTURE0),r.imageManager.bind(r.context));for(var f=n.getCrossfadeParameters(),g=0,_=y;g<_.length;g+=1){var h=_[g],v=r.transform.calculatePosMatrix(h.toUnwrapped()),x=d?Sa(v,a,r,d,{tileID:h,tileSize:u},f):Ca(v,a,i);I.draw(t,o.TRIANGLES,m,l,p,Zr.disabled,x,n.id,r.tileExtentBuffer,r.quadTriangleIndexBuffer,r.tileExtentSegments)}}}}}var $a=new r.Color(1,0,0,1),rt=new r.Color(0,1,0,1),et=new r.Color(0,0,1,1),nt=new r.Color(1,0,1,1),it=new r.Color(0,1,1,1);function at(r){var e=r.transform.padding,n=3;ot(r,r.transform.height-(e.top||0),n,$a),ot(r,e.bottom||0,n,rt),ct(r,e.left||0,n,et),ct(r,r.transform.width-(e.right||0),n,nt);var i=r.transform.centerPoint;tt(r,i.x,r.transform.height-i.y,it)}function tt(r,e,n,i){var a=20,t=2;ut(r,e-t/2,n-a/2,t,a,i),ut(r,e-a/2,n-t/2,a,t,i)}function ot(r,e,n,i){ut(r,0,e+n/2,r.transform.width,n,i)}function ct(r,e,n,i){ut(r,e-n/2,0,n,r.transform.height,i)}function ut(e,n,i,a,t,o){var c=e.context,u=c.gl;u.enable(u.SCISSOR_TEST),u.scissor(n*r.browser.devicePixelRatio,i*r.browser.devicePixelRatio,a*r.browser.devicePixelRatio,t*r.browser.devicePixelRatio),c.clear({color:o}),u.disable(u.SCISSOR_TEST)}function dt(r,e,n){for(var i=0;i "+i.overscaledZ),lt(e,g+" "+I+"kb"),c.draw(a,t.TRIANGLES,u,d,Vr.alphaBlended,Zr.disabled,ia(o,r.Color.transparent,f),l,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}function lt(r,e){r.initDebugOverlayCanvas();var n=r.debugOverlayCanvas,i=r.context.gl,a=r.debugOverlayCanvas.getContext("2d");a.clearRect(0,0,n.width,n.height),a.shadowColor="white",a.shadowBlur=2,a.lineWidth=1.5,a.strokeStyle="white",a.textBaseline="top",a.font="bold 36px Open Sans, sans-serif",a.fillText(e,5,5),a.strokeText(e,5,5),r.debugOverlayTexture.update(n),r.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}function mt(r,e,n){var i=r.context,a=n.implementation;if("offscreen"===r.renderPass){var t=a.prerender;t&&(r.setCustomLayerDefaults(),i.setColorMode(r.colorModeForRenderPass()),t.call(a,i.gl,r.transform.customLayerMatrix()),i.setDirty(),r.setBaseState())}else if("translucent"===r.renderPass){r.setCustomLayerDefaults(),i.setColorMode(r.colorModeForRenderPass()),i.setStencilMode(Hr.disabled);var o="3d"===a.renderingMode?new Dr(r.context.gl.LEQUAL,Dr.ReadWrite,r.depthRangeFor3D):r.depthModeForSublayer(0,Dr.ReadOnly);i.setDepthMode(o),a.render(i.gl,r.transform.customLayerMatrix()),i.setDirty(),r.setBaseState(),i.bindFramebuffer.set(null)}}var pt={symbol:ka,circle:Ta,heatmap:Da,line:La,fill:Oa,"fill-extrusion":Va,hillshade:Wa,raster:Ya,background:Qa,debug:dt,custom:mt},It=function(r,e){this.context=new qr(r),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=Yr.maxUnderzooming+Yr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new mn,this.gpuTimers={}};It.prototype.resize=function(e,n){if(this.width=e*r.browser.devicePixelRatio,this.height=n*r.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,a=this.style._order;i256&&this.clearStencil(),n.setColorMode(Vr.disabled),n.setDepthMode(Dr.disabled);var a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var t=0,o=e;t256&&this.clearStencil();var r=this.nextStencilID++,e=this.context.gl;return new Hr({func:e.NOTEQUAL,mask:255},r,255,e.KEEP,e.KEEP,e.REPLACE)},It.prototype.stencilModeForClipping=function(r){var e=this.context.gl;return new Hr({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[r.key],0,e.KEEP,e.KEEP,e.REPLACE)},It.prototype.stencilConfigForOverlap=function(r){var e,n=this.context.gl,i=r.sort((function(r,e){return e.overscaledZ-r.overscaledZ})),a=i[i.length-1].overscaledZ,t=i[0].overscaledZ-a+1;if(t>1){this.currentStencilSource=void 0,this.nextStencilID+t>256&&this.clearStencil();for(var o={},c=0;c=0;this.currentLayer--){var P=this.style._layers[a[this.currentLayer]],G=t[P.source],C=s[P.source];this._renderTileClippingMasks(P,C),this.renderLayer(this,G,P,C)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},It.prototype.isPatternMissing=function(r){if(!r)return!1;if(!r.from||!r.to)return!0;var e=this.imageManager.getPattern(r.from.toString()),n=this.imageManager.getPattern(r.to.toString());return!e||!n},It.prototype.useProgram=function(r,e){this.cache=this.cache||{};var n=""+r+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new Vi(this.context,r,Li[r],e,Aa[r],this._showOverdrawInspector)),this.cache[n]},It.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()},It.prototype.setBaseState=function(){var r=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(r.FUNC_ADD)},It.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=r.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new r.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},It.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var yt=function(r,e){this.points=r,this.planes=e};yt.fromInvProjectionMatrix=function(e,n,i){var a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],t=Math.pow(2,i),o=a.map((function(n){return r.transformMat4([],n,e)})).map((function(e){return r.scale$1([],e,1/e[3]/n*t)})),c=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var n=r.sub([],o[e[0]],o[e[1]]),i=r.sub([],o[e[2]],o[e[1]]),a=r.normalize([],r.cross([],n,i)),t=-r.dot(a,o[e[1]]);return a.concat(t)}));return new yt(o,c)};var ft=function(e,n){this.min=e,this.max=n,this.center=r.scale$2([],r.add([],this.min,this.max),.5)};ft.prototype.quadrant=function(e){for(var n=[e%2===0,e<2],i=r.clone$2(this.min),a=r.clone$2(this.max),t=0;t=0;if(0===o)return 0;o!==n.length&&(i=!1)}if(i)return 2;for(var u=0;u<3;u++){for(var d=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0;lthis.max[u]-this.min[u])return 0}return 1};var gt=function(r,e,n,i){if(void 0===r&&(r=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),isNaN(r)||r<0||isNaN(e)||e<0||isNaN(n)||n<0||isNaN(i)||i<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=r,this.bottom=e,this.left=n,this.right=i};gt.prototype.interpolate=function(e,n,i){return null!=n.top&&null!=e.top&&(this.top=r.number(e.top,n.top,i)),null!=n.bottom&&null!=e.bottom&&(this.bottom=r.number(e.bottom,n.bottom,i)),null!=n.left&&null!=e.left&&(this.left=r.number(e.left,n.left,i)),null!=n.right&&null!=e.right&&(this.right=r.number(e.right,n.right,i)),this},gt.prototype.getCenter=function(e,n){var i=r.clamp((this.left+e-this.right)/2,0,e),a=r.clamp((this.top+n-this.bottom)/2,0,n);return new r.Point(i,a)},gt.prototype.equals=function(r){return this.top===r.top&&this.bottom===r.bottom&&this.left===r.left&&this.right===r.right},gt.prototype.clone=function(){return new gt(this.top,this.bottom,this.left,this.right)},gt.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var _t=function(e,n,i,a,t){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===t||t,this._minZoom=e||0,this._maxZoom=n||22,this._minPitch=void 0===i||null===i?0:i,this._maxPitch=void 0===a||null===a?60:a,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new gt,this._posMatrixCache={},this._alignedPosMatrixCache={}},ht={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};function vt(r,e){var n=!1,i=null,a=function(){i=null,n&&(r(),i=setTimeout(a,e),n=!1)};return function(){return n=!0,i||a(),i}}_t.prototype.clone=function(){var r=new _t(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return r.tileSize=this.tileSize,r.latRange=this.latRange,r.width=this.width,r.height=this.height,r._center=this._center,r.zoom=this.zoom,r.angle=this.angle,r._fov=this._fov,r._pitch=this._pitch,r._unmodified=this._unmodified,r._edgeInsets=this._edgeInsets.clone(),r._calcMatrices(),r},ht.minZoom.get=function(){return this._minZoom},ht.minZoom.set=function(r){this._minZoom!==r&&(this._minZoom=r,this.zoom=Math.max(this.zoom,r))},ht.maxZoom.get=function(){return this._maxZoom},ht.maxZoom.set=function(r){this._maxZoom!==r&&(this._maxZoom=r,this.zoom=Math.min(this.zoom,r))},ht.minPitch.get=function(){return this._minPitch},ht.minPitch.set=function(r){this._minPitch!==r&&(this._minPitch=r,this.pitch=Math.max(this.pitch,r))},ht.maxPitch.get=function(){return this._maxPitch},ht.maxPitch.set=function(r){this._maxPitch!==r&&(this._maxPitch=r,this.pitch=Math.min(this.pitch,r))},ht.renderWorldCopies.get=function(){return this._renderWorldCopies},ht.renderWorldCopies.set=function(r){void 0===r?r=!0:null===r&&(r=!1),this._renderWorldCopies=r},ht.worldSize.get=function(){return this.tileSize*this.scale},ht.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ht.size.get=function(){return new r.Point(this.width,this.height)},ht.bearing.get=function(){return-this.angle/Math.PI*180},ht.bearing.set=function(e){var n=-r.wrap(e,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=r.create$2(),r.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},ht.pitch.get=function(){return this._pitch/Math.PI*180},ht.pitch.set=function(e){var n=r.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},ht.fov.get=function(){return this._fov/Math.PI*180},ht.fov.set=function(r){r=Math.max(.01,Math.min(60,r)),this._fov!==r&&(this._unmodified=!1,this._fov=r/180*Math.PI,this._calcMatrices())},ht.zoom.get=function(){return this._zoom},ht.zoom.set=function(r){var e=Math.min(Math.max(r,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},ht.center.get=function(){return this._center},ht.center.set=function(r){r.lat===this._center.lat&&r.lng===this._center.lng||(this._unmodified=!1,this._center=r,this._constrain(),this._calcMatrices())},ht.padding.get=function(){return this._edgeInsets.toJSON()},ht.padding.set=function(r){this._edgeInsets.equals(r)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,r,1),this._calcMatrices())},ht.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},_t.prototype.isPaddingEqual=function(r){return this._edgeInsets.equals(r)},_t.prototype.interpolatePadding=function(r,e,n){this._unmodified=!1,this._edgeInsets.interpolate(r,e,n),this._constrain(),this._calcMatrices()},_t.prototype.coveringZoomLevel=function(r){var e=(r.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/r.tileSize));return Math.max(0,e)},_t.prototype.getVisibleUnwrappedCoordinates=function(e){var n=[new r.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new r.Point(0,0)),a=this.pointCoordinate(new r.Point(this.width,0)),t=this.pointCoordinate(new r.Point(this.width,this.height)),o=this.pointCoordinate(new r.Point(0,this.height)),c=Math.floor(Math.min(i.x,a.x,t.x,o.x)),u=Math.floor(Math.max(i.x,a.x,t.x,o.x)),d=1,s=c-d;s<=u+d;s++)0!==s&&n.push(new r.UnwrappedTileID(s,e));return n},_t.prototype.coveringTiles=function(e){var n=this.coveringZoomLevel(e),i=n;if(void 0!==e.minzoom&&ne.maxzoom&&(n=e.maxzoom);var a=r.MercatorCoordinate.fromLngLat(this.center),t=Math.pow(2,n),o=[t*a.x,t*a.y,0],c=yt.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),u=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(u=n);var d=3,s=function(r){return{aabb:new ft([r*t,0,0],[(r+1)*t,t,0]),zoom:0,x:0,y:0,wrap:r,fullyVisible:!1}},l=[],m=[],p=n,I=e.reparseOverscaled?i:n;if(this._renderWorldCopies)for(var y=1;y<=3;y++)l.push(s(-y)),l.push(s(y));for(l.push(s(0));l.length>0;){var f=l.pop(),g=f.x,_=f.y,h=f.fullyVisible;if(!h){var v=f.aabb.intersects(c);if(0===v)continue;h=2===v}var x=f.aabb.distanceX(o),P=f.aabb.distanceY(o),G=Math.max(Math.abs(x),Math.abs(P)),C=d+(1<C&&f.zoom>=u)m.push({tileID:new r.OverscaledTileID(f.zoom===p?I:f.zoom,f.wrap,f.zoom,g,_),distanceSq:r.sqrLen([o[0]-.5-g,o[1]-.5-_])});else for(var S=0;S<4;S++){var A=(g<<1)+S%2,b=(_<<1)+(S>>1);l.push({aabb:f.aabb.quadrant(S),zoom:f.zoom+1,x:A,y:b,wrap:f.wrap,fullyVisible:h})}}return m.sort((function(r,e){return r.distanceSq-e.distanceSq})).map((function(r){return r.tileID}))},_t.prototype.resize=function(r,e){this.width=r,this.height=e,this.pixelsToGLUnits=[2/r,-2/e],this._constrain(),this._calcMatrices()},ht.unmodified.get=function(){return this._unmodified},_t.prototype.zoomScale=function(r){return Math.pow(2,r)},_t.prototype.scaleZoom=function(r){return Math.log(r)/Math.LN2},_t.prototype.project=function(e){var n=r.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new r.Point(r.mercatorXfromLng(e.lng)*this.worldSize,r.mercatorYfromLat(n)*this.worldSize)},_t.prototype.unproject=function(e){return new r.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},ht.point.get=function(){return this.project(this.center)},_t.prototype.setLocationAtPoint=function(e,n){var i=this.pointCoordinate(n),a=this.pointCoordinate(this.centerPoint),t=this.locationCoordinate(e),o=new r.MercatorCoordinate(t.x-(i.x-a.x),t.y-(i.y-a.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},_t.prototype.locationPoint=function(r){return this.coordinatePoint(this.locationCoordinate(r))},_t.prototype.pointLocation=function(r){return this.coordinateLocation(this.pointCoordinate(r))},_t.prototype.locationCoordinate=function(e){return r.MercatorCoordinate.fromLngLat(e)},_t.prototype.coordinateLocation=function(r){return r.toLngLat()},_t.prototype.pointCoordinate=function(e){var n=0,i=[e.x,e.y,0,1],a=[e.x,e.y,1,1];r.transformMat4(i,i,this.pixelMatrixInverse),r.transformMat4(a,a,this.pixelMatrixInverse);var t=i[3],o=a[3],c=i[0]/t,u=a[0]/o,d=i[1]/t,s=a[1]/o,l=i[2]/t,m=a[2]/o,p=l===m?0:(n-l)/(m-l);return new r.MercatorCoordinate(r.number(c,u,p)/this.worldSize,r.number(d,s,p)/this.worldSize)},_t.prototype.coordinatePoint=function(e){var n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return r.transformMat4(n,n,this.pixelMatrix),new r.Point(n[0]/n[3],n[1]/n[3])},_t.prototype.getBounds=function(){return(new r.LngLatBounds).extend(this.pointLocation(new r.Point(0,0))).extend(this.pointLocation(new r.Point(this.width,0))).extend(this.pointLocation(new r.Point(this.width,this.height))).extend(this.pointLocation(new r.Point(0,this.height)))},_t.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new r.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},_t.prototype.setMaxBounds=function(r){r?(this.lngRange=[r.getWest(),r.getEast()],this.latRange=[r.getSouth(),r.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},_t.prototype.calculatePosMatrix=function(e,n){void 0===n&&(n=!1);var i=e.key,a=n?this._alignedPosMatrixCache:this._posMatrixCache;if(a[i])return a[i];var t=e.canonical,o=this.worldSize/this.zoomScale(t.z),c=t.x+Math.pow(2,t.z)*e.wrap,u=r.identity(new Float64Array(16));return r.translate(u,u,[c*o,t.y*o,0]),r.scale(u,u,[o/r.EXTENT,o/r.EXTENT,1]),r.multiply(u,n?this.alignedProjMatrix:this.projMatrix,u),a[i]=new Float32Array(u),a[i]},_t.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},_t.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,n,i,a,t=-90,o=90,c=-180,u=180,d=this.size,s=this._unmodified;if(this.latRange){var l=this.latRange;t=r.mercatorYfromLat(l[1])*this.worldSize,e=(o=r.mercatorYfromLat(l[0])*this.worldSize)-to&&(a=o-f)}if(this.lngRange){var g=p.x,_=d.x/2;g-_u&&(i=u-_)}void 0===i&&void 0===a||(this.center=this.unproject(new r.Point(void 0!==i?i:p.x,void 0!==a?a:p.y))),this._unmodified=s,this._constraining=!1}},_t.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,n=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var i=Math.PI/2+this._pitch,a=this._fov*(.5+n.y/this.height),t=Math.sin(a)*this.cameraToCenterDistance/Math.sin(r.clamp(Math.PI-i-a,.01,Math.PI-.01)),o=this.point,c=o.x,u=o.y,d=1.01*(Math.cos(Math.PI/2-this._pitch)*t+this.cameraToCenterDistance),s=this.height/50,l=new Float64Array(16);r.perspective(l,this._fov,this.width/this.height,s,d),l[8]=2*-n.x/this.width,l[9]=2*n.y/this.height,r.scale(l,l,[1,-1,1]),r.translate(l,l,[0,0,-this.cameraToCenterDistance]),r.rotateX(l,l,this._pitch),r.rotateZ(l,l,this.angle),r.translate(l,l,[-c,-u,0]),this.mercatorMatrix=r.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),r.scale(l,l,[1,1,r.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l,this.invProjMatrix=r.invert([],this.projMatrix);var m=this.width%2/2,p=this.height%2/2,I=Math.cos(this.angle),y=Math.sin(this.angle),f=c-Math.round(c)+I*m+y*p,g=u-Math.round(u)+I*p+y*m,_=new Float64Array(l);if(r.translate(_,_,[f>.5?f-1:f,g>.5?g-1:g,0]),this.alignedProjMatrix=_,l=r.create(),r.scale(l,l,[this.width/2,-this.height/2,1]),r.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=r.create(),r.scale(l,l,[1,-1,1]),r.translate(l,l,[-1,-1,0]),r.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=r.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(l=r.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}},_t.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new r.Point(0,0)),n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return r.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},_t.prototype.getCameraPoint=function(){var e=this._pitch,n=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.Point(0,n))},_t.prototype.getCameraQueryGeometry=function(e){var n=this.getCameraPoint();if(1===e.length)return[e[0],n];for(var i=n.x,a=n.y,t=n.x,o=n.y,c=0,u=e;c=3&&!r.some((function(r){return isNaN(r)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(r[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+r[2],+r[1]],zoom:+r[0],bearing:e,pitch:+(r[4]||0)}),!0}return!1},xt.prototype._updateHashUnthrottled=function(){var e=r.window.location.href.replace(/(#.+)?$/,this.getHashString());try{r.window.history.replaceState(r.window.history.state,null,e)}catch(n){}};var Pt={linearity:.3,easing:r.bezier(0,0,.3,1)},Gt=r.extend({deceleration:2500,maxSpeed:1400},Pt),Ct=r.extend({deceleration:20,maxSpeed:1400},Pt),St=r.extend({deceleration:1e3,maxSpeed:360},Pt),At=r.extend({deceleration:1e3,maxSpeed:90},Pt),bt=function(r){this._map=r,this.clear()};function Mt(r,e){(!r.duration||r.duration0&&n-e[0].time>i;)e.shift()},bt.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var n={zoom:0,bearing:0,pitch:0,pan:new r.Point(0,0),pinchAround:void 0,around:void 0},i=0,a=this._inertiaBuffer;i=this._clickTolerance||this._map.fire(new kt(r.type,this._map,r))},wt.prototype.dblclick=function(r){return this._firePreventable(new kt(r.type,this._map,r))},wt.prototype.mouseover=function(r){this._map.fire(new kt(r.type,this._map,r))},wt.prototype.mouseout=function(r){this._map.fire(new kt(r.type,this._map,r))},wt.prototype.touchstart=function(r){return this._firePreventable(new Ft(r.type,this._map,r))},wt.prototype.touchmove=function(r){this._map.fire(new Ft(r.type,this._map,r))},wt.prototype.touchend=function(r){this._map.fire(new Ft(r.type,this._map,r))},wt.prototype.touchcancel=function(r){this._map.fire(new Ft(r.type,this._map,r))},wt.prototype._firePreventable=function(r){if(this._map.fire(r),r.defaultPrevented)return{}},wt.prototype.isEnabled=function(){return!0},wt.prototype.isActive=function(){return!1},wt.prototype.enable=function(){},wt.prototype.disable=function(){};var Rt=function(r){this._map=r};Rt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Rt.prototype.mousemove=function(r){this._map.fire(new kt(r.type,this._map,r))},Rt.prototype.mousedown=function(){this._delayContextMenu=!0},Rt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new kt("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Rt.prototype.contextmenu=function(r){this._delayContextMenu?this._contextMenuEvent=r:this._map.fire(new kt(r.type,this._map,r)),this._map.listens("contextmenu")&&r.preventDefault()},Rt.prototype.isEnabled=function(){return!0},Rt.prototype.isActive=function(){return!1},Rt.prototype.enable=function(){},Rt.prototype.disable=function(){};var Et=function(r,e){this._map=r,this._el=r.getCanvasContainer(),this._container=r.getContainer(),this._clickTolerance=e.clickTolerance||1};function Nt(r,e){for(var n={},i=0;ithis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=r.timeStamp),n.length===this.numTouches&&(this.centroid=Tt(e),this.touches=Nt(n,e)))},Ht.prototype.touchmove=function(r,e,n){if(!this.aborted&&this.centroid){var i=Nt(n,e);for(var a in this.touches){var t=this.touches[a],o=i[a];(!o||o.dist(t)>Ut)&&(this.aborted=!0)}}},Ht.prototype.touchend=function(r,e,n){if((!this.centroid||r.timeStamp-this.startTime>Jt)&&(this.aborted=!0),0===n.length){var i=!this.aborted&&this.centroid;if(this.reset(),i)return i}};var Lt=function(r){this.singleTap=new Ht(r),this.numTaps=r.numTaps,this.reset()};Lt.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Lt.prototype.touchstart=function(r,e,n){this.singleTap.touchstart(r,e,n)},Lt.prototype.touchmove=function(r,e,n){this.singleTap.touchmove(r,e,n)},Lt.prototype.touchend=function(r,e,n){var i=this.singleTap.touchend(r,e,n);if(i){var a=r.timeStamp-this.lastTime0&&(this._active=!0);var a=Nt(i,n),t=new r.Point(0,0),o=new r.Point(0,0),c=0;for(var u in a){var d=a[u],s=this._touches[u];s&&(t._add(d),o._add(d.sub(s)),c++,a[u]=d)}if(this._touches=a,!(cMath.abs(r.x)}var uo=100,so=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.reset=function(){r.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(r){this._lastPoints=r,co(r[0].sub(r[1]))&&(this._valid=!1)},e.prototype._move=function(r,e,n){var i=r[0].sub(this._lastPoints[0]),a=r[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(i,a,n.timeStamp),this._valid)return this._lastPoints=r,this._active=!0,{pitchDelta:(i.y+a.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(r,e,n){if(void 0!==this._valid)return this._valid;var i=2,a=r.mag()>=i,t=e.mag()>=i;if(a||t){if(!a||!t)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove0===e.y>0;return co(r)&&co(e)&&o}},e}($t),lo={panStep:100,bearingStep:15,pitchStep:10},mo=function(){var r=lo;this._panStep=r.panStep,this._bearingStep=r.bearingStep,this._pitchStep=r.pitchStep,this._rotationDisabled=!1};function po(r){return r*(2-r)}mo.prototype.reset=function(){this._active=!1},mo.prototype.keydown=function(r){var e=this;if(!(r.altKey||r.ctrlKey||r.metaKey)){var n=0,i=0,a=0,t=0,o=0;switch(r.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:r.shiftKey?i=-1:(r.preventDefault(),t=-1);break;case 39:r.shiftKey?i=1:(r.preventDefault(),t=1);break;case 38:r.shiftKey?a=1:(r.preventDefault(),o=-1);break;case 40:r.shiftKey?a=-1:(r.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(i=0,a=0),{cameraAnimation:function(c){var u=c.getZoom();c.easeTo({duration:300,easeId:"keyboardHandler",easing:po,zoom:n?Math.round(u)+n*(r.shiftKey?2:1):u,bearing:c.getBearing()+i*e._bearingStep,pitch:c.getPitch()+a*e._pitchStep,offset:[-t*e._panStep,-o*e._panStep],center:c.getCenter()},{originalEvent:r})}}}},mo.prototype.enable=function(){this._enabled=!0},mo.prototype.disable=function(){this._enabled=!1,this.reset()},mo.prototype.isEnabled=function(){return this._enabled},mo.prototype.isActive=function(){return this._active},mo.prototype.disableRotation=function(){this._rotationDisabled=!0},mo.prototype.enableRotation=function(){this._rotationDisabled=!1};var Io=4.000244140625,yo=.01,fo=1/450,go=2,_o=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=yo,this._wheelZoomRate=fo,r.bindAll(["_onTimeout"],this)};_o.prototype.setZoomRate=function(r){this._defaultZoomRate=r},_o.prototype.setWheelZoomRate=function(r){this._wheelZoomRate=r},_o.prototype.isEnabled=function(){return!!this._enabled},_o.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},_o.prototype.isZooming=function(){return!!this._zooming},_o.prototype.enable=function(r){this.isEnabled()||(this._enabled=!0,this._aroundCenter=r&&"center"===r.around)},_o.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},_o.prototype.wheel=function(e){if(this.isEnabled()){var n=e.deltaMode===r.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=r.browser.now(),a=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==n&&n%Io===0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(a*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this._active||this._start(e)),e.preventDefault()}},_o.prototype._onTimeout=function(r){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(r)},_o.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var i=n.mousePos(this._el,e);this._around=r.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},_o.prototype.renderFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var n=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>Io?this._wheelZoomRate:this._defaultZoomRate,a=go/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==a&&(a=1/a);var t="number"===typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(t*a))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,c="number"===typeof this._targetZoom?this._targetZoom:n.zoom,u=this._startZoom,d=this._easing,s=!1;if("wheel"===this._type&&u&&d){var l=Math.min((r.browser.now()-this._lastWheelEventTime)/200,1),m=d(l);o=r.number(u,c,m),l<1?this._frameId||(this._frameId=!0):s=!0}else o=c,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!s,zoomDelta:o-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},_o.prototype._smoothOutEasing=function(e){var n=r.ease;if(this._prevEase){var i=this._prevEase,a=(r.browser.now()-i.start)/i.duration,t=i.easing(a+.01)-i.easing(a),o=.27/Math.sqrt(t*t+1e-4)*.01,c=Math.sqrt(.0729-o*o);n=r.bezier(o,c,.25,1)}return this._prevEase={start:r.browser.now(),duration:e,easing:n},n},_o.prototype.reset=function(){this._active=!1};var ho=function(r,e){this._clickZoom=r,this._tapZoom=e};ho.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ho.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ho.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ho.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var vo=function(){this.reset()};vo.prototype.reset=function(){this._active=!1},vo.prototype.dblclick=function(r,e){return r.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(r.shiftKey?-1:1),around:n.unproject(e)},{originalEvent:r})}}},vo.prototype.enable=function(){this._enabled=!0},vo.prototype.disable=function(){this._enabled=!1,this.reset()},vo.prototype.isEnabled=function(){return this._enabled},vo.prototype.isActive=function(){return this._active};var xo=function(){this._tap=new Lt({numTouches:1,numTaps:1}),this.reset()};xo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},xo.prototype.touchstart=function(r,e,n){this._swipePoint||(this._tapTime&&r.timeStamp-this._tapTime>Dt&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=e[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(r,e,n))},xo.prototype.touchmove=function(r,e,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var i=e[0],a=i.y-this._swipePoint.y;return this._swipePoint=i,r.preventDefault(),this._active=!0,{zoomDelta:a/128}}}else this._tap.touchmove(r,e,n)},xo.prototype.touchend=function(r,e,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(r,e,n)&&(this._tapTime=r.timeStamp)},xo.prototype.touchcancel=function(){this.reset()},xo.prototype.enable=function(){this._enabled=!0},xo.prototype.disable=function(){this._enabled=!1,this.reset()},xo.prototype.isEnabled=function(){return this._enabled},xo.prototype.isActive=function(){return this._active};var Po=function(r,e,n){this._el=r,this._mousePan=e,this._touchPan=n};Po.prototype.enable=function(r){this._inertiaOptions=r||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Po.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Po.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Po.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Go=function(r,e,n){this._pitchWithRotate=r.pitchWithRotate,this._mouseRotate=e,this._mousePitch=n};Go.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Go.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Go.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Go.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Co=function(r,e,n,i){this._el=r,this._touchZoom=e,this._touchRotate=n,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0};Co.prototype.enable=function(r){this._touchZoom.enable(r),this._rotationDisabled||this._touchRotate.enable(r),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Co.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Co.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Co.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Co.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Co.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var So=function(r){return r.zoom||r.drag||r.pitch||r.rotate},Ao=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e}(r.Event);function bo(r){return r.panDelta&&r.panDelta.mag()||r.zoomDelta||r.bearingDelta||r.pitchDelta}var Mo=function(e,i){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new bt(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i),r.bindAll(["handleEvent","handleWindowEvent"],this);var a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[r.window.document,"mousemove",{capture:!0}],[r.window.document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[r.window,"blur",void 0]];for(var t=0,o=this._listeners;tt?Math.min(2,x):Math.max(.5,x),P=Math.pow(f,1-e),G=a.unproject(h.add(v.mult(e*P)).mult(y));a.setLocationAtPoint(a.renderWorldCopies?G.wrap():G,I)}i._fireMoveEvents(n)}),(function(r){i._afterEase(n,r)}),e),this},n.prototype._prepareEase=function(e,n,i){void 0===i&&(i={}),this._moving=!0,n||i.moving||this.fire(new r.Event("movestart",e)),this._zooming&&!i.zooming&&this.fire(new r.Event("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new r.Event("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new r.Event("pitchstart",e))},n.prototype._fireMoveEvents=function(e){this.fire(new r.Event("move",e)),this._zooming&&this.fire(new r.Event("zoom",e)),this._rotating&&this.fire(new r.Event("rotate",e)),this._pitching&&this.fire(new r.Event("pitch",e))},n.prototype._afterEase=function(e,n){if(!this._easeId||!n||this._easeId!==n){delete this._easeId;var i=this._zooming,a=this._rotating,t=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,i&&this.fire(new r.Event("zoomend",e)),a&&this.fire(new r.Event("rotateend",e)),t&&this.fire(new r.Event("pitchend",e)),this.fire(new r.Event("moveend",e))}},n.prototype.flyTo=function(e,n){var i=this;if(!e.essential&&r.browser.prefersReducedMotion){var a=r.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(a,n)}this.stop(),e=r.extend({offset:[0,0],speed:1.2,curve:1.42,easing:r.ease},e);var t=this.transform,o=this.getZoom(),c=this.getBearing(),u=this.getPitch(),d=this.getPadding(),s="zoom"in e?r.clamp(+e.zoom,t.minZoom,t.maxZoom):o,l="bearing"in e?this._normalizeBearing(e.bearing,c):c,m="pitch"in e?+e.pitch:u,p="padding"in e?e.padding:t.padding,I=t.zoomScale(s-o),y=r.Point.convert(e.offset),f=t.centerPoint.add(y),g=t.pointLocation(f),_=r.LngLat.convert(e.center||g);this._normalizeCenter(_);var h=t.project(g),v=t.project(_).sub(h),x=e.curve,P=Math.max(t.width,t.height),G=P/I,C=v.mag();if("minZoom"in e){var S=r.clamp(Math.min(e.minZoom,o,s),t.minZoom,t.maxZoom),A=P/t.zoomScale(S-o);x=Math.sqrt(A/C*2)}var b=x*x;function M(r){var e=(G*G-P*P+(r?-1:1)*b*b*C*C)/(2*(r?G:P)*b*C);return Math.log(Math.sqrt(e*e+1)-e)}function B(r){return(Math.exp(r)-Math.exp(-r))/2}function k(r){return(Math.exp(r)+Math.exp(-r))/2}function F(r){return B(r)/k(r)}var z=M(0),w=function(r){return k(z)/k(z+x*r)},R=function(r){return P*((k(z)*F(z+x*r)-B(z))/b)/C},E=(M(1)-z)/x;if(Math.abs(C)<1e-6||!isFinite(E)){if(Math.abs(P-G)<1e-6)return this.easeTo(e,n);var N=Ge.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=c!==l,this._pitching=m!==u,this._padding=!t.isPaddingEqual(p),this._prepareEase(n,!1),this._ease((function(e){var a=e*E,I=1/w(a);t.zoom=1===e?s:o+t.scaleZoom(I),i._rotating&&(t.bearing=r.number(c,l,e)),i._pitching&&(t.pitch=r.number(u,m,e)),i._padding&&(t.interpolatePadding(d,p,e),f=t.centerPoint.add(y));var g=1===e?_:t.unproject(h.add(v.mult(R(a))).mult(I));t.setLocationAtPoint(t.renderWorldCopies?g.wrap():g,f),i._fireMoveEvents(n)}),(function(){return i._afterEase(n)}),e),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){return this._stop()},n.prototype._stop=function(r,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,e)}if(!r){var i=this.handlers;i&&i.stop(!1)}return this},n.prototype._ease=function(e,n,i){!1===i.animate||0===i.duration?(e(1),n()):(this._easeStart=r.browser.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var e=Math.min((r.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(e,n){e=r.wrap(e,-180,180);var i=Math.abs(e-n);return Math.abs(e-360-n)180?-360:n<-180?360:0}},n}(r.Evented),ko=function(e){void 0===e&&(e={}),this.options=e,r.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};ko.prototype.getDefaultPosition=function(){return"bottom-right"},ko.prototype.onAdd=function(r){var e=this.options&&this.options.compact;return this._map=r,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=n.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),e&&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===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},ko.prototype.onRemove=function(){n.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,this._attribHTML=void 0},ko.prototype._setElementTitle=function(r,e){var n=this._map._getUIString("AttributionControl."+e);r.title=n,r.setAttribute("aria-label",n)},ko.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},ko.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||r.config.ACCESS_TOKEN}];if(e){var i=n.reduce((function(r,e,i){return e.value&&(r+=e.key+"="+e.value+(i=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,r.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},ko.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Fo=function(){r.bindAll(["_updateLogo"],this),r.bindAll(["_updateCompact"],this)};Fo.prototype.onAdd=function(r){this._map=r,this._container=n.create("div","mapboxgl-ctrl");var e=n.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Fo.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Fo.prototype.getDefaultPosition=function(){return"bottom-left"},Fo.prototype._updateLogo=function(r){r&&"metadata"!==r.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Fo.prototype._logoRequired=function(){if(this._map.style){var r=this._map.style.sourceCaches;for(var e in r)if(r[e].getSource().mapbox_logo)return!0;return!1}},Fo.prototype._updateCompact=function(){var r=this._container.children;if(r.length){var e=r[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var zo=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};zo.prototype.add=function(r){var e=++this._id;return this._queue.push({callback:r,id:e,cancelled:!1}),e},zo.prototype.remove=function(r){for(var e=this._currentlyRunning,n=0,i=e?this._queue.concat(e):this._queue;ne.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitchUo)throw new Error("maxPitch must be less than or equal to "+Uo);var a=new _t(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(i.call(this,a,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new zo,this._controls=[],this._mapId=r.uniqueId(),this._locale=r.extend({},wo,e.locale),this._clickTolerance=e.clickTolerance,this._requestManager=new r.RequestManager(e.transformRequest,e.accessToken),"string"===typeof e.container){if(this._container=r.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Eo))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),r.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return n._update(!1)})),this.on("moveend",(function(){return n._update(!1)})),this.on("zoom",(function(){return n._update(!0)})),"undefined"!==typeof r.window&&(r.window.addEventListener("online",this._onWindowOnline,!1),r.window.addEventListener("resize",this._onWindowResize,!1),r.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Mo(this,e);var t="string"===typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new xt(t).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,r.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new ko({customAttribution:e.customAttribution})),this.addControl(new Fo,e.logoPosition),this.on("style.load",(function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)})),this.on("data",(function(e){n._update("style"===e.dataType),n.fire(new r.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){n.fire(new r.Event(e.dataType+"dataloading",e))}))}i&&(a.__proto__=i),a.prototype=Object.create(i&&i.prototype),a.prototype.constructor=a;var t={showTileBoundaries:{configurable:!0},showPadding:{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(e,n){if(void 0===n&&(n=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new r.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var i=e.onAdd(this);this._controls.push(e);var a=this._controlPositions[n];return-1!==n.indexOf("bottom")?a.insertBefore(i,a.firstChild):a.appendChild(i),this},a.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new r.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var n=this._controls.indexOf(e);return n>-1&&this._controls.splice(n,1),e.onRemove(this),this},a.prototype.hasControl=function(r){return this._controls.indexOf(r)>-1},a.prototype.resize=function(e){var n=this._containerDimensions(),i=n[0],a=n[1];this._resizeCanvas(i,a),this.transform.resize(i,a),this.painter.resize(i,a);var t=!this._moving;return t&&(this.stop(),this.fire(new r.Event("movestart",e)).fire(new r.Event("move",e))),this.fire(new r.Event("resize",e)),t&&this.fire(new r.Event("moveend",e)),this},a.prototype.getBounds=function(){return this.transform.getBounds()},a.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},a.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(r.LngLatBounds.convert(e)),this._update()},a.prototype.setMinZoom=function(r){if((r=null===r||void 0===r?To:r)>=To&&r<=this.transform.maxZoom)return this.transform.minZoom=r,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=r,this._update(),this.getZoom()>r&&this.setZoom(r),this;throw new Error("maxZoom must be greater than the current minZoom")},a.prototype.getMaxZoom=function(){return this.transform.maxZoom},a.prototype.setMinPitch=function(r){if((r=null===r||void 0===r?Jo:r)=Jo&&r<=this.transform.maxPitch)return this.transform.minPitch=r,this._update(),this.getPitch()Uo)throw new Error("maxPitch must be less than or equal to "+Uo);if(r>=this.transform.minPitch)return this.transform.maxPitch=r,this._update(),this.getPitch()>r&&this.setPitch(r),this;throw new Error("maxPitch must be greater than the current minPitch")},a.prototype.getMaxPitch=function(){return this.transform.maxPitch},a.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},a.prototype.setRenderWorldCopies=function(r){return this.transform.renderWorldCopies=r,this._update()},a.prototype.project=function(e){return this.transform.locationPoint(r.LngLat.convert(e))},a.prototype.unproject=function(e){return this.transform.pointLocation(r.Point.convert(e))},a.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},a.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},a.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},a.prototype._createDelegatedListener=function(r,e,n){var i,a=this;if("mouseenter"===r||"mouseover"===r){var t=!1,o=function(i){var o=a.getLayer(e)?a.queryRenderedFeatures(i.point,{layers:[e]}):[];o.length?t||(t=!0,n.call(a,new kt(r,a,i.originalEvent,{features:o}))):t=!1};return{layer:e,listener:n,delegates:{mousemove:o,mouseout:function(){t=!1}}}}if("mouseleave"===r||"mouseout"===r){var c=!1,u=function(i){(a.getLayer(e)?a.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?c=!0:c&&(c=!1,n.call(a,new kt(r,a,i.originalEvent)))},d=function(e){c&&(c=!1,n.call(a,new kt(r,a,e.originalEvent)))};return{layer:e,listener:n,delegates:{mousemove:u,mouseout:d}}}var s=function(r){var i=a.getLayer(e)?a.queryRenderedFeatures(r.point,{layers:[e]}):[];i.length&&(r.features=i,n.call(a,r),delete r.features)};return{layer:e,listener:n,delegates:(i={},i[r]=s,i)}},a.prototype.on=function(r,e,n){if(void 0===n)return i.prototype.on.call(this,r,e);var a=this._createDelegatedListener(r,e,n);for(var t in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[r]=this._delegatedListeners[r]||[],this._delegatedListeners[r].push(a),a.delegates)this.on(t,a.delegates[t]);return this},a.prototype.once=function(r,e,n){if(void 0===n)return i.prototype.once.call(this,r,e);var a=this._createDelegatedListener(r,e,n);for(var t in a.delegates)this.once(t,a.delegates[t]);return this},a.prototype.off=function(r,e,n){var a=this;if(void 0===n)return i.prototype.off.call(this,r,e);var t=function(i){for(var t=i[r],o=0;o180;){var c=i.locationPoint(e);if(c.x>=0&&c.y>=0&&c.x<=i.width&&c.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e}jo.prototype.down=function(r,e){this.mouseRotate.mousedown(r,e),this.mousePitch&&this.mousePitch.mousedown(r,e),n.disableDrag()},jo.prototype.move=function(r,e){var n=this.map,i=this.mouseRotate.mousemoveWindow(r,e);if(i&&i.bearingDelta&&n.setBearing(n.getBearing()+i.bearingDelta),this.mousePitch){var a=this.mousePitch.mousemoveWindow(r,e);a&&a.pitchDelta&&n.setPitch(n.getPitch()+a.pitchDelta)}},jo.prototype.off=function(){var r=this.element;n.removeEventListener(r,"mousedown",this.mousedown),n.removeEventListener(r,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(r,"touchmove",this.touchmove),n.removeEventListener(r,"touchend",this.touchend),n.removeEventListener(r,"touchcancel",this.reset),this.offTemp()},jo.prototype.offTemp=function(){n.enableDrag(),n.removeEventListener(r.window,"mousemove",this.mousemove),n.removeEventListener(r.window,"mouseup",this.mouseup)},jo.prototype.mousedown=function(e){this.down(r.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),n.mousePos(this.element,e)),n.addEventListener(r.window,"mousemove",this.mousemove),n.addEventListener(r.window,"mouseup",this.mouseup)},jo.prototype.mousemove=function(r){this.move(r,n.mousePos(this.element,r))},jo.prototype.mouseup=function(r){this.mouseRotate.mouseupWindow(r),this.mousePitch&&this.mousePitch.mouseupWindow(r),this.offTemp()},jo.prototype.touchstart=function(r){1!==r.targetTouches.length?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,r.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return r.preventDefault()}},this._startPos))},jo.prototype.touchmove=function(r){1!==r.targetTouches.length?this.reset():(this._lastPos=n.touchPos(this.element,r.targetTouches)[0],this.move({preventDefault:function(){return r.preventDefault()}},this._lastPos))},jo.prototype.touchend=function(r){0===r.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=n}this._isDragging&&(this._pos=e.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 r.Event("dragstart"))),this.fire(new r.Event("drag")))},i.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new r.Event("dragend")),this._state="inactive"},i.prototype._addDragHandler=function(r){this._element.contains(r.originalEvent.target)&&(r.preventDefault(),this._positionDelta=r.point.sub(this._pos).add(this._offset),this._pointerdownPos=r.point,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))},i.prototype.setDraggable=function(r){return this._draggable=!!r,this._map&&(r?(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},i.prototype.isDraggable=function(){return this._draggable},i.prototype.setRotation=function(r){return this._rotation=r||0,this._update(),this},i.prototype.getRotation=function(){return this._rotation},i.prototype.setRotationAlignment=function(r){return this._rotationAlignment=r||"auto",this._update(),this},i.prototype.getRotationAlignment=function(){return this._rotationAlignment},i.prototype.setPitchAlignment=function(r){return this._pitchAlignment=r&&"auto"!==r?r:this._rotationAlignment,this._update(),this},i.prototype.getPitchAlignment=function(){return this._pitchAlignment},i}(r.Evented),Qo={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};function $o(e){void 0!==Yo?e(Yo):void 0!==r.window.navigator.permissions?r.window.navigator.permissions.query({name:"geolocation"}).then((function(r){Yo="denied"!==r.state,e(Yo)})):(Yo=!!r.window.navigator.geolocation,e(Yo))}var rc=0,ec=!1,nc=function(e){function i(n){e.call(this),this.options=r.extend({},Qo,n),r.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(r){return this._map=r,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),$o(this._setupUI),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(r.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,rc=0,ec=!1},i.prototype._isOutOfMapMaxBounds=function(r){var e=this._map.getMaxBounds(),n=r.coords;return e&&(n.longitudee.getEast()||n.latitudee.getNorth())},i.prototype._setErrorState=function(){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")}},i.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new r.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,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(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new r.Event("geolocate",e)),this._finish()}},i.prototype._updateCamera=function(e){var n=new r.LngLat(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,a=this._map.getBearing(),t=r.extend({bearing:a},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(i),t,{geolocateSource:!0})},i.prototype._updateMarker=function(e){if(e){var n=new r.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},i.prototype._updateCircleRadius=function(){var r=this._map._container.clientHeight/2,e=this._map.unproject([0,r]),n=this._map.unproject([1,r]),i=e.distanceTo(n),a=Math.ceil(2*this._accuracy/i);this._circleElement.style.width=a+"px",this._circleElement.style.height=a+"px"},i.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},i.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.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"),this._geolocateButton.disabled=!0;var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ec)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new r.Event("error",e)),this._finish()}},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;if(this._container.addEventListener("contextmenu",(function(r){return r.preventDefault()})),this._geolocateButton=n.create("button","mapboxgl-ctrl-geolocate",this._container),n.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){r.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}else{var t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Xo(this._dotElement),this._circleElement=n.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Xo({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){var n=e.originalEvent&&"resize"===e.originalEvent.type;e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||n||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new r.Event("trackuserlocationend")))}))},i.prototype.trigger=function(){if(!this._setup)return r.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 r.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":rc--,ec=!1,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 r.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 r.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")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++rc>1?(e={maximumAge:6e5,timeout:0},ec=!0):(e=this.options.positionOptions,ec=!1),this._geolocationWatchID=r.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else r.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){r.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)},i}(r.Evented),ic={maxWidth:100,unit:"metric"},ac=function(e){this.options=r.extend({},ic,e),r.bindAll(["_onMove","setUnit"],this)};function tc(r,e,n){var i=n&&n.maxWidth||100,a=r._container.clientHeight/2,t=r.unproject([0,a]),o=r.unproject([i,a]),c=t.distanceTo(o);if(n&&"imperial"===n.unit){var u=3.2808*c;u>5280?oc(e,i,u/5280,r._getUIString("ScaleControl.Miles")):oc(e,i,u,r._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?oc(e,i,c/1852,r._getUIString("ScaleControl.NauticalMiles")):c>=1e3?oc(e,i,c/1e3,r._getUIString("ScaleControl.Kilometers")):oc(e,i,c,r._getUIString("ScaleControl.Meters"))}function oc(r,e,n,i){var a=uc(n),t=a/n;r.style.width=e*t+"px",r.innerHTML=a+" "+i}function cc(r){var e=Math.pow(10,Math.ceil(-Math.log(r)/Math.LN10));return Math.round(r*e)/e}function uc(r){var e=Math.pow(10,(""+Math.floor(r)).length-1),n=r/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:cc(n))}ac.prototype.getDefaultPosition=function(){return"bottom-left"},ac.prototype._onMove=function(){tc(this._map,this._container,this.options)},ac.prototype.onAdd=function(r){return this._map=r,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",r.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ac.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ac.prototype.setUnit=function(r){this.options.unit=r,tc(this._map,this._container,this.options)};var dc=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof r.window.HTMLElement?this._container=e.container:r.warnOnce("Full screen control 'container' must be a DOM element.")),r.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in r.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in r.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in r.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in r.window.document&&(this._fullscreenchange="MSFullscreenChange")};dc.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",r.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},dc.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,r.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},dc.prototype._checkFullscreenSupport=function(){return!!(r.window.document.fullscreenEnabled||r.window.document.mozFullScreenEnabled||r.window.document.msFullscreenEnabled||r.window.document.webkitFullscreenEnabled)},dc.prototype._setupUI=function(){var e=this._fullscreenButton=n.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);n.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),r.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},dc.prototype._updateTitle=function(){var r=this._getTitle();this._fullscreenButton.setAttribute("aria-label",r),this._fullscreenButton.title=r},dc.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},dc.prototype._isFullscreen=function(){return this._fullscreen},dc.prototype._changeIcon=function(){(r.window.document.fullscreenElement||r.window.document.mozFullScreenElement||r.window.document.webkitFullscreenElement||r.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},dc.prototype._onClickFullscreen=function(){this._isFullscreen()?r.window.document.exitFullscreen?r.window.document.exitFullscreen():r.window.document.mozCancelFullScreen?r.window.document.mozCancelFullScreen():r.window.document.msExitFullscreen?r.window.document.msExitFullscreen():r.window.document.webkitCancelFullScreen&&r.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 sc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},lc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),mc=function(e){function i(n){e.call(this),this.options=r.extend(Object.create(sc),n),r.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&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 r.Event("open")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new r.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=r.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},i.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},i.prototype.getElement=function(){return this._container},i.prototype.setText=function(e){return this.setDOMContent(r.window.document.createTextNode(e))},i.prototype.setHTML=function(e){var n,i=r.window.document.createDocumentFragment(),a=r.window.document.createElement("body");for(a.innerHTML=e;n=a.firstChild;)i.appendChild(n);return this.setDOMContent(i)},i.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},i.prototype.setMaxWidth=function(r){return this.options.maxWidth=r,this._update(),this},i.prototype.setDOMContent=function(r){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(r),this._createCloseButton(),this._update(),this._focusFirstElement(),this},i.prototype.addClassName=function(r){this._container&&this._container.classList.add(r)},i.prototype.removeClassName=function(r){this._container&&this._container.classList.remove(r)},i.prototype.setOffset=function(r){return this.options.offset=r,this._update(),this},i.prototype.toggleClassName=function(r){if(this._container)return this._container.classList.toggle(r)},i.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=n.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},i.prototype._onMouseUp=function(r){this._update(r.point)},i.prototype._onMouseMove=function(r){this._update(r.point)},i.prototype._onDrag=function(r){this._update(r.point)},i.prototype._update=function(r){var e=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(r){return e._container.classList.add(r)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),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=Wo(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||r)){var a=this._pos=this._trackPointer&&r?r:this._map.project(this._lngLat),t=this.options.anchor,o=pc(this.options.offset);if(!t){var c,u=this._container.offsetWidth,d=this._container.offsetHeight;c=a.y+o.bottom.ythis._map.transform.height-d?["bottom"]:[],a.xthis._map.transform.width-u/2&&c.push("right"),t=0===c.length?"bottom":c.join("-")}var s=a.add(o[t]).round();n.setTransform(this._container,Zo[t]+" translate("+s.x+"px,"+s.y+"px)"),qo(this._container,t,"popup")}},i.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var r=this._container.querySelector(lc);r&&r.focus()}},i.prototype._onClose=function(){this.remove()},i}(r.Evented);function pc(e){if(e){if("number"===typeof e){var n=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{center:new r.Point(0,0),top:new r.Point(0,e),"top-left":new r.Point(n,n),"top-right":new r.Point(-n,n),bottom:new r.Point(0,-e),"bottom-left":new r.Point(n,-n),"bottom-right":new r.Point(-n,-n),left:new r.Point(e,0),right:new r.Point(-e,0)}}if(e instanceof r.Point||Array.isArray(e)){var i=r.Point.convert(e);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:r.Point.convert(e.center||[0,0]),top:r.Point.convert(e.top||[0,0]),"top-left":r.Point.convert(e["top-left"]||[0,0]),"top-right":r.Point.convert(e["top-right"]||[0,0]),bottom:r.Point.convert(e.bottom||[0,0]),"bottom-left":r.Point.convert(e["bottom-left"]||[0,0]),"bottom-right":r.Point.convert(e["bottom-right"]||[0,0]),left:r.Point.convert(e.left||[0,0]),right:r.Point.convert(e.right||[0,0])}}return pc(new r.Point(0,0))}var Ic={version:r.version,supported:e,setRTLTextPlugin:r.setRTLTextPlugin,getRTLTextPluginStatus:r.getRTLTextPluginStatus,Map:Lo,NavigationControl:Vo,GeolocateControl:nc,AttributionControl:ko,ScaleControl:ac,FullscreenControl:dc,Popup:mc,Marker:Xo,Style:gn,LngLat:r.LngLat,LngLatBounds:r.LngLatBounds,Point:r.Point,MercatorCoordinate:r.MercatorCoordinate,Evented:r.Evented,config:r.config,prewarm:te,clearPrewarmedResources:oe,get accessToken(){return r.config.ACCESS_TOKEN},set accessToken(e){r.config.ACCESS_TOKEN=e},get baseApiUrl(){return r.config.API_URL},set baseApiUrl(e){r.config.API_URL=e},get workerCount(){return ee.workerCount},set workerCount(r){ee.workerCount=r},get maxParallelImageRequests(){return r.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){r.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){r.clearTileCache(e)},workerUrl:""};return Ic})),n}()},3108:function(r,e,n){"use strict";r.exports=n(26099)},26099:function(r,e,n){"use strict";var i=n(64928),a=n(32420),t=n(51160),o=n(76752),c=n(55616),u=n(31264),d=n(47520),s=n(18400),l=n(72512),m=n(76244);function p(r,e){for(var n=e[0],i=e[1],t=1/(e[2]-n),o=1/(e[3]-i),c=new Array(r.length),u=0,d=r.length/2;u>>1;e.dtype||(e.dtype="array"),"string"===typeof e.dtype?I=new(l(e.dtype))(f):e.dtype&&(I=e.dtype,Array.isArray(I)&&(I.length=f));for(var g=0;gn||c>1073741824){for(var m=0;mn+a||A>i+a||b=k)&&o!==c){var u=_[t];void 0===c&&(c=u.length);for(var d=o;d=f&&l<=P&&m>=g&&m<=G&&F.push(s)}var p=h[t],I=p[4*o+0],y=p[4*o+1],v=p[4*o+2],x=p[4*o+3],C=function(r,e){for(var n=null,i=0;null===n;)if(n=r[4*e+i],++i>r.length)return null;return n}(p,o+1),M=.5*a,z=t+1;e(n,i,M,z,I,y||v||x||C),e(n,i+M,M,z,y,v||x||C),e(n+M,i,M,z,v,x||C),e(n+M,i+M,M,z,x,C)}}(0,0,1,0,0,1),F},I;function M(r,e,n){for(var i=1,a=.5,t=.5,o=.5,c=0;c0){e+=Math.abs(o(r[0]));for(var n=1;n2){for(u=0;u=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(r*n)/n},e.radiansToLength=s,e.lengthToRadians=l,e.lengthToDegrees=function(r,e){return m(l(r,e))},e.bearingToAzimuth=function(r){var e=r%360;return e<0&&(e+=360),e},e.radiansToDegrees=m,e.degreesToRadians=function(r){return r%360*Math.PI/180},e.convertLength=function(r,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(r>=0))throw new Error("length must be a positive number");return s(l(r,e),n)},e.convertArea=function(r,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(r>=0))throw new Error("area must be a positive number");var a=e.areaFactors[n];if(!a)throw new Error("invalid original units");var t=e.areaFactors[i];if(!t)throw new Error("invalid final units");return r/a*t},e.isNumber=p,e.isObject=function(r){return!!r&&r.constructor===Object},e.validateBBox=function(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(4!==r.length&&6!==r.length)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach((function(r){if(!p(r))throw new Error("bbox must only contain numbers")}))},e.validateId=function(r){if(!r)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof r))throw new Error("id must be a number or a string")}},3256:function(r,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(46284);function a(r,e,n){if(null!==r)for(var i,t,o,c,u,d,s,l,m=0,p=0,I=r.type,y="FeatureCollection"===I,f="Feature"===I,g=y?r.features.length:1,_=0;_d||p>s||I>l)return u=a,d=n,s=p,l=I,void(o=0);var y=i.lineString([u,a],r.properties);if(!1===e(y,n,t,I,o))return!1;o++,u=a}))&&void 0}}}))}function s(r,e){if(!r)throw new Error("geojson is required");u(r,(function(r,n,a){if(null!==r.geometry){var t=r.geometry.type,o=r.geometry.coordinates;switch(t){case"LineString":if(!1===e(r,n,a,0,0))return!1;break;case"Polygon":for(var c=0;cr[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(r*n)/n},e.radiansToLength=s,e.lengthToRadians=l,e.lengthToDegrees=function(r,e){return m(l(r,e))},e.bearingToAzimuth=function(r){var e=r%360;return e<0&&(e+=360),e},e.radiansToDegrees=m,e.degreesToRadians=function(r){return r%360*Math.PI/180},e.convertLength=function(r,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(r>=0))throw new Error("length must be a positive number");return s(l(r,e),n)},e.convertArea=function(r,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(r>=0))throw new Error("area must be a positive number");var a=e.areaFactors[n];if(!a)throw new Error("invalid original units");var t=e.areaFactors[i];if(!t)throw new Error("invalid final units");return r/a*t},e.isNumber=p,e.isObject=function(r){return!!r&&r.constructor===Object},e.validateBBox=function(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(4!==r.length&&6!==r.length)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach((function(r){if(!p(r))throw new Error("bbox must only contain numbers")}))},e.validateId=function(r){if(!r)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof r))throw new Error("id must be a number or a string")}},84880:function(r,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(76796);function a(r,e,n){if(null!==r)for(var i,t,o,c,u,d,s,l,m=0,p=0,I=r.type,y="FeatureCollection"===I,f="Feature"===I,g=y?r.features.length:1,_=0;_d||p>s||I>l)return u=a,d=n,s=p,l=I,void(o=0);var y=i.lineString([u,a],r.properties);if(!1===e(y,n,t,I,o))return!1;o++,u=a}))&&void 0}}}))}function s(r,e){if(!r)throw new Error("geojson is required");u(r,(function(r,n,a){if(null!==r.geometry){var t=r.geometry.type,o=r.geometry.coordinates;switch(t){case"LineString":if(!1===e(r,n,a,0,0))return!1;break;case"Polygon":for(var c=0;c=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(r*n)/n},e.radiansToLength=s,e.lengthToRadians=l,e.lengthToDegrees=function(r,e){return m(l(r,e))},e.bearingToAzimuth=function(r){var e=r%360;return e<0&&(e+=360),e},e.radiansToDegrees=m,e.degreesToRadians=function(r){return r%360*Math.PI/180},e.convertLength=function(r,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(r>=0))throw new Error("length must be a positive number");return s(l(r,e),n)},e.convertArea=function(r,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(r>=0))throw new Error("area must be a positive number");var a=e.areaFactors[n];if(!a)throw new Error("invalid original units");var t=e.areaFactors[i];if(!t)throw new Error("invalid final units");return r/a*t},e.isNumber=p,e.isObject=function(r){return!!r&&r.constructor===Object},e.validateBBox=function(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(4!==r.length&&6!==r.length)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach((function(r){if(!p(r))throw new Error("bbox must only contain numbers")}))},e.validateId=function(r){if(!r)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof r))throw new Error("id must be a number or a string")},e.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},e.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},e.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},e.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},e.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},e.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},e.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},43752:function(r,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(49840);function a(r,e,n){if(null!==r)for(var i,t,o,c,u,d,s,l,m=0,p=0,I=r.type,y="FeatureCollection"===I,f="Feature"===I,g=y?r.features.length:1,_=0;_d||p>s||I>l)return u=a,d=n,s=p,l=I,void(o=0);var y=i.lineString([u,a],r.properties);if(!1===e(y,n,t,I,o))return!1;o++,u=a}))&&void 0}}}))}function s(r,e){if(!r)throw new Error("geojson is required");u(r,(function(r,n,a){if(null!==r.geometry){var t=r.geometry.type,o=r.geometry.coordinates;switch(t){case"LineString":if(!1===e(r,n,a,0,0))return!1;break;case"Polygon":for(var c=0;ca&&(a=r[o]),r[o]1?n-1:0),a=1;a1?n-1:0),a=1;a1?n-1:0),a=1;a1?n-1:0),a=1;ar.length)&&(n=r.length),r.substring(n-e.length,n)===e}var f="",g="",_="",h="",v={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(r){var e=Object.keys(r),n=Object.create(Object.getPrototypeOf(r));return e.forEach((function(e){n[e]=r[e]})),Object.defineProperty(n,"message",{value:r.message}),n}function P(r){return p(r,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function G(r,e,n){var a="",t="",o=0,c="",u=!1,d=P(r),s=d.split("\n"),l=P(e).split("\n"),p=0,I="";if("strictEqual"===n&&"object"===m(r)&&"object"===m(e)&&null!==r&&null!==e&&(n="strictEqualObject"),1===s.length&&1===l.length&&s[0]!==l[0]){var x=s[0].length+l[0].length;if(x<=10){if(("object"!==m(r)||null===r)&&("object"!==m(e)||null===e)&&(0!==r||0!==e))return"".concat(v[n],"\n\n")+"".concat(s[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==n&&x<(i.stderr&&i.stderr.isTTY?i.stderr.columns:80)){for(;s[0][p]===l[0][p];)p++;p>2&&(I="\n ".concat(function(r,e){if(e=Math.floor(e),0==r.length||0==e)return"";var n=r.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)r+=r,e--;return r+r.substring(0,n-r.length)}(" ",p),"^"),p=0)}}for(var G=s[s.length-1],C=l[l.length-1];G===C&&(p++<2?c="\n ".concat(G).concat(c):a=G,s.pop(),l.pop(),0!==s.length&&0!==l.length);)G=s[s.length-1],C=l[l.length-1];var S=Math.max(s.length,l.length);if(0===S){var A=d.split("\n");if(A.length>30)for(A[26]="".concat(f,"...").concat(h);A.length>27;)A.pop();return"".concat(v.notIdentical,"\n\n").concat(A.join("\n"),"\n")}p>3&&(c="\n".concat(f,"...").concat(h).concat(c),u=!0),""!==a&&(c="\n ".concat(a).concat(c),a="");var b=0,M=v[n]+"\n".concat(g,"+ actual").concat(h," ").concat(_,"- expected").concat(h),B=" ".concat(f,"...").concat(h," Lines skipped");for(p=0;p1&&p>2&&(k>4?(t+="\n".concat(f,"...").concat(h),u=!0):k>3&&(t+="\n ".concat(l[p-2]),b++),t+="\n ".concat(l[p-1]),b++),o=p,a+="\n".concat(_,"-").concat(h," ").concat(l[p]),b++;else if(l.length1&&p>2&&(k>4?(t+="\n".concat(f,"...").concat(h),u=!0):k>3&&(t+="\n ".concat(s[p-2]),b++),t+="\n ".concat(s[p-1]),b++),o=p,t+="\n".concat(g,"+").concat(h," ").concat(s[p]),b++;else{var F=l[p],z=s[p],w=z!==F&&(!y(z,",")||z.slice(0,-1)!==F);w&&y(F,",")&&F.slice(0,-1)===z&&(w=!1,z+=","),w?(k>1&&p>2&&(k>4?(t+="\n".concat(f,"...").concat(h),u=!0):k>3&&(t+="\n ".concat(s[p-2]),b++),t+="\n ".concat(s[p-1]),b++),o=p,t+="\n".concat(g,"+").concat(h," ").concat(z),a+="\n".concat(_,"-").concat(h," ").concat(F),b+=2):(t+=a,a="",1!==k&&0!==p||(t+="\n ".concat(z),b++))}if(b>20&&p30)for(C[26]="".concat(f,"...").concat(h);C.length>27;)C.pop();n=1===C.length?o(this,l(e).call(this,"".concat(y," ").concat(C[0]))):o(this,l(e).call(this,"".concat(y,"\n\n").concat(C.join("\n"),"\n")))}else{var S=P(d),A="",b=v[t];"notDeepEqual"===t||"notEqual"===t?(S="".concat(v[t],"\n\n").concat(S)).length>1024&&(S="".concat(S.slice(0,1021),"...")):(A="".concat(P(s)),S.length>512&&(S="".concat(S.slice(0,509),"...")),A.length>512&&(A="".concat(A.slice(0,509),"...")),"deepEqual"===t||"equal"===t?S="".concat(b,"\n\n").concat(S,"\n\nshould equal\n\n"):A=" ".concat(t," ").concat(A)),n=o(this,l(e).call(this,"".concat(S).concat(A)))}return Error.stackTraceLimit=p,n.generatedMessage=!a,Object.defineProperty(c(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=d,n.expected=s,n.operator=t,Error.captureStackTrace&&Error.captureStackTrace(c(n),u),n.stack,n.name="AssertionError",o(n)}var n,u,d;return function(r,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&s(r,e)}(e,r),n=e,u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(r,e){return p(this,function(r){for(var e=1;e2?"one of ".concat(e," ").concat(r.slice(0,n-1).join(", "),", or ")+r[n-1]:2===n?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(r,e,a){var t,o,u,d;if(void 0===c&&(c=n(45408)),c("string"===typeof r,"'name' must be a string"),"string"===typeof e&&(o="not ",e.substr(!u||u<0?0:+u,o.length)===o)?(t="must not be",e=e.replace(/^not /,"")):t="must be",function(r,e,n){return(void 0===n||n>r.length)&&(n=r.length),r.substring(n-e.length,n)===e}(r," argument"))d="The ".concat(r," ").concat(t," ").concat(l(e,"type"));else{var s=function(r,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>r.length)&&-1!==r.indexOf(e,n)}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(s," ").concat(t," ").concat(l(e,"type"))}return d+=". Received type ".concat(i(a))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(r,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=n(35840));var a=u.inspect(e);return a.length>128&&(a="".concat(a.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(a)}),TypeError,RangeError),s("ERR_INVALID_RETURN_VALUE",(function(r,e,n){var a;return a=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(i(n)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(a,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),i=0;i0,"At least one arg needs to be specified");var a="The ",t=e.length;switch(e=e.map((function(r){return'"'.concat(r,'"')})),t){case 1:a+="".concat(e[0]," argument");break;case 2:a+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:a+=e.slice(0,t-1).join(", "),a+=", and ".concat(e[t-1]," arguments")}return"".concat(a," must be specified")}),TypeError),r.exports.codes=d},25116:function(r,e,n){"use strict";function i(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=[],i=!0,a=!1,t=void 0;try{for(var o,c=r[Symbol.iterator]();!(i=(o=c.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(u){a=!0,t=u}finally{try{i||null==c.return||c.return()}finally{if(a)throw t}}return n}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(r){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"===typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},a(r)}var t=void 0!==/a/g.flags,o=function(r){var e=[];return r.forEach((function(r){return e.push(r)})),e},c=function(r){var e=[];return r.forEach((function(r,n){return e.push([n,r])})),e},u=Object.is?Object.is:n(39896),d=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},s=Number.isNaN?Number.isNaN:n(1560);function l(r){return r.call.bind(r)}var m=l(Object.prototype.hasOwnProperty),p=l(Object.prototype.propertyIsEnumerable),I=l(Object.prototype.toString),y=n(35840).types,f=y.isAnyArrayBuffer,g=y.isArrayBufferView,_=y.isDate,h=y.isMap,v=y.isRegExp,x=y.isSet,P=y.isNativeError,G=y.isBoxedPrimitive,C=y.isNumberObject,S=y.isStringObject,A=y.isBooleanObject,b=y.isBigIntObject,M=y.isSymbolObject,B=y.isFloat32Array,k=y.isFloat64Array;function F(r){if(0===r.length||r.length>10)return!0;for(var e=0;e57)return!0}return 10===r.length&&r>=Math.pow(2,32)}function z(r){return Object.keys(r).filter(F).concat(d(r).filter(Object.prototype.propertyIsEnumerable.bind(r)))}function w(r,e){if(r===e)return 0;for(var n=r.length,i=e.length,a=0,t=Math.min(n,i);a>2],t+=i[(3&n[e])<<4|n[e+1]>>4],t+=i[(15&n[e+1])<<2|n[e+2]>>6],t+=i[63&n[e+2]];return a%3===2?t=t.substring(0,t.length-1)+"=":a%3===1&&(t=t.substring(0,t.length-2)+"=="),t},c=function(r){var e,n,i,t,o,c=.75*r.length,u=r.length,d=0;"="===r[r.length-1]&&(c--,"="===r[r.length-2]&&c--);var s=new ArrayBuffer(c),l=new Uint8Array(s);for(e=0;e>4,l[d++]=(15&i)<<4|t>>2,l[d++]=(3&t)<<6|63&o;return s}},59968:function(r,e){"use strict";e.byteLength=function(r){var e=c(r),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(r){var e,n,t=c(r),o=t[0],u=t[1],d=new a(function(r,e,n){return 3*(e+n)/4-n}(0,o,u)),s=0,l=u>0?o-4:o;for(n=0;n>16&255,d[s++]=e>>8&255,d[s++]=255&e;return 2===u&&(e=i[r.charCodeAt(n)]<<2|i[r.charCodeAt(n+1)]>>4,d[s++]=255&e),1===u&&(e=i[r.charCodeAt(n)]<<10|i[r.charCodeAt(n+1)]<<4|i[r.charCodeAt(n+2)]>>2,d[s++]=e>>8&255,d[s++]=255&e),d},e.fromByteArray=function(r){for(var e,i=r.length,a=i%3,t=[],o=16383,c=0,d=i-a;cd?d:c+o));return 1===a?(e=r[i-1],t.push(n[e>>2]+n[e<<4&63]+"==")):2===a&&(e=(r[i-2]<<8)+r[i-1],t.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),t.join("")};for(var n=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=t[o],i[t.charCodeAt(o)]=o;function c(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=r.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(r,e,i){for(var a,t,o=[],c=e;c>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},64928:function(r){"use strict";function e(r,e,n,i,a){for(var t=a+1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)>=0?(t=o,a=o-1):i=o+1}return t}function n(r,e,n,i,a){for(var t=a+1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)>0?(t=o,a=o-1):i=o+1}return t}function i(r,e,n,i,a){for(var t=i-1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)<0?(t=o,i=o+1):a=o-1}return t}function a(r,e,n,i,a){for(var t=i-1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)<=0?(t=o,i=o+1):a=o-1}return t}function t(r,e,n,i,a){for(;i<=a;){var t=i+a>>>1,o=r[t],c=void 0!==n?n(o,e):o-e;if(0===c)return t;c<=0?i=t+1:a=t-1}return-1}function o(r,e,n,i,a,t){return"function"===typeof n?t(r,e,n,void 0===i?0:0|i,void 0===a?r.length-1:0|a):t(r,e,void 0,void 0===n?0:0|n,void 0===i?r.length-1:0|i)}r.exports={ge:function(r,n,i,a,t){return o(r,n,i,a,t,e)},gt:function(r,e,i,a,t){return o(r,e,i,a,t,n)},lt:function(r,e,n,a,t){return o(r,e,n,a,t,i)},le:function(r,e,n,i,t){return o(r,e,n,i,t,a)},eq:function(r,e,n,i,a){return o(r,e,n,i,a,t)}}},308:function(r,e){"use strict";function n(r){var e=32;return(r&=-r)&&e--,65535&r&&(e-=16),16711935&r&&(e-=8),252645135&r&&(e-=4),858993459&r&&(e-=2),1431655765&r&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(r){return(r>0)-(r<0)},e.abs=function(r){var e=r>>31;return(r^e)-e},e.min=function(r,e){return e^(r^e)&-(r65535)<<4,e|=n=((r>>>=e)>255)<<3,e|=n=((r>>>=n)>15)<<2,(e|=n=((r>>>=n)>3)<<1)|(r>>>=n)>>1},e.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},e.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},e.countTrailingZeros=n,e.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,1+(r|=r>>>16)},e.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},e.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);!function(r){for(var e=0;e<256;++e){var n=e,i=e,a=7;for(n>>>=1;n;n>>>=1)i<<=1,i|=1&n,--a;r[e]=i<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},e.interleave2=function(r,e){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(r,e){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>e&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},e.interleave3=function(r,e,n){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(r,e){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>e&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},e.nextCombination=function(r){var e=r|r-1;return e+1|(~e&-~e)-1>>>n(r)+1}},29620:function(r,e,n){"use strict";var i=n(32420);r.exports=function(r,e){e||(e={});var n,o,c,u,d,s,l,m,p,I,y,f=null==e.cutoff?.25:e.cutoff,g=null==e.radius?8:e.radius,_=e.channel||0;if(ArrayBuffer.isView(r)||Array.isArray(r)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");n=e.width,o=e.height,u=r,s=e.stride?e.stride:Math.floor(r.length/n/o)}else window.HTMLCanvasElement&&r instanceof window.HTMLCanvasElement?(l=(m=r).getContext("2d"),n=m.width,o=m.height,u=(p=l.getImageData(0,0,n,o)).data,s=4):window.CanvasRenderingContext2D&&r instanceof window.CanvasRenderingContext2D?(l=r,n=(m=r.canvas).width,o=m.height,u=(p=l.getImageData(0,0,n,o)).data,s=4):window.ImageData&&r instanceof window.ImageData&&(p=r,n=r.width,o=r.height,u=p.data,s=4);if(c=Math.max(n,o),window.Uint8ClampedArray&&u instanceof window.Uint8ClampedArray||window.Uint8Array&&u instanceof window.Uint8Array)for(d=u,u=Array(n*o),I=0,y=d.length;I-1?a(n):n}},57916:function(r,e,n){"use strict";var i=n(8844),a=n(53664),t=n(14500),o=a("%TypeError%"),c=a("%Function.prototype.apply%"),u=a("%Function.prototype.call%"),d=a("%Reflect.apply%",!0)||i.call(u,c),s=a("%Object.defineProperty%",!0),l=a("%Math.max%");if(s)try{s({},"a",{value:1})}catch(p){s=null}r.exports=function(r){if("function"!==typeof r)throw new o("a function is required");var e=d(i,u,arguments);return t(e,1+l(0,r.length-(arguments.length-1)),!0)};var m=function(){return d(i,c,arguments)};s?s(r.exports,"apply",{value:m}):r.exports.apply=m},32420:function(r){r.exports=function(r,e,n){return en?n:r:re?e:r}},3808:function(r,e,n){"use strict";var i=n(32420);function a(r,e){null==e&&(e=!0);var n=r[0],a=r[1],t=r[2],o=r[3];return null==o&&(o=e?1:255),e&&(n*=255,a*=255,t*=255,o*=255),16777216*(n=255&i(n,0,255))+((a=255&i(a,0,255))<<16)+((t=255&i(t,0,255))<<8)+(o=255&i(o,0,255))}r.exports=a,r.exports.to=a,r.exports.from=function(r,e){var n=(r=+r)>>>24,i=(16711680&r)>>>16,a=(65280&r)>>>8,t=255&r;return!1===e?[n,i,a,t]:[n/255,i/255,a/255,t/255]}},17592:function(r){"use strict";r.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]}},72160:function(r,e,n){"use strict";var i=n(96824),a=n(32420),t=n(72512);r.exports=function(r,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var n=new(t(e))(4),o="uint8"!==e&&"uint8_clamped"!==e;return r.length&&"string"!==typeof r||((r=i(r))[0]/=255,r[1]/=255,r[2]/=255),function(r){return r instanceof Uint8Array||r instanceof Uint8ClampedArray||!!(Array.isArray(r)&&(r[0]>1||0===r[0])&&(r[1]>1||0===r[1])&&(r[2]>1||0===r[2])&&(!r[3]||r[3]>1))}(r)?(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=null!=r[3]?r[3]:255,o&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(o?(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=null!=r[3]?r[3]:1):(n[0]=a(Math.floor(255*r[0]),0,255),n[1]=a(Math.floor(255*r[1]),0,255),n[2]=a(Math.floor(255*r[2]),0,255),n[3]=null==r[3]?255:a(Math.floor(255*r[3]),0,255)),n)}},96824:function(r,e,n){"use strict";var i=n(95532),a=n(53576),t=n(32420);r.exports=function(r){var e,n=i(r);return n.space?((e=Array(3))[0]=t(n.values[0],0,255),e[1]=t(n.values[1],0,255),e[2]=t(n.values[2],0,255),"h"===n.space[0]&&(e=a.rgb(e)),e.push(t(n.alpha,0,1)),e):[]}},95532:function(r,e,n){"use strict";var i=n(17592);r.exports=function(r){var e,n,t=[],o=1;if("string"===typeof r)if(r=r.toLowerCase(),i[r])t=i[r].slice(),n="rgb";else if("transparent"===r)o=0,n="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(r)){var c=r.slice(1);o=1,(s=c.length)<=4?(t=[parseInt(c[0]+c[0],16),parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16)],4===s&&(o=parseInt(c[3]+c[3],16)/255)):(t=[parseInt(c[0]+c[1],16),parseInt(c[2]+c[3],16),parseInt(c[4]+c[5],16)],8===s&&(o=parseInt(c[6]+c[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),n="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(r)){var u=e[1],d="rgb"===u;n=c=u.replace(/a$/,"");var s="cmyk"===c?4:"gray"===c?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(r,e){if(/%$/.test(r))return e===s?parseFloat(r)/100:"rgb"===c?255*parseFloat(r)/100:parseFloat(r);if("h"===c[e]){if(/deg$/.test(r))return parseFloat(r);if(void 0!==a[r])return a[r]}return parseFloat(r)})),u===c&&t.push(1),o=d||void 0===t[s]?1:t[s],t=t.slice(0,s)}else r.length>10&&/[0-9](?:\s|\/)/.test(r)&&(t=r.match(/([0-9]+)/g).map((function(r){return parseFloat(r)})),n=r.match(/([a-z])/gi).join("").toLowerCase());else isNaN(r)?Array.isArray(r)||r.length?(t=[r[0],r[1],r[2]],n="rgb",o=4===r.length?r[3]:1):r instanceof Object&&(null!=r.r||null!=r.red||null!=r.R?(n="rgb",t=[r.r||r.red||r.R||0,r.g||r.green||r.G||0,r.b||r.blue||r.B||0]):(n="hsl",t=[r.h||r.hue||r.H||0,r.s||r.saturation||r.S||0,r.l||r.lightness||r.L||r.b||r.brightness]),o=r.a||r.alpha||r.opacity||1,null!=r.opacity&&(o/=100)):(n="rgb",t=[r>>>16,(65280&r)>>>8,255&r]);return{space:n,values:t,alpha:o}};var a={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},53576:function(r,e,n){"use strict";var i=n(19336);r.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(r){var e,n,i,a,t,o=r[0]/360,c=r[1]/100,u=r[2]/100;if(0===c)return[t=255*u,t,t];e=2*u-(n=u<.5?u*(1+c):u+c-u*c),a=[0,0,0];for(var d=0;d<3;d++)(i=o+1/3*-(d-1))<0?i++:i>1&&i--,t=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[d]=255*t;return a}},i.hsl=function(r){var e,n,i=r[0]/255,a=r[1]/255,t=r[2]/255,o=Math.min(i,a,t),c=Math.max(i,a,t),u=c-o;return c===o?e=0:i===c?e=(a-t)/u:a===c?e=2+(t-i)/u:t===c&&(e=4+(i-a)/u),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+c)/2,[e,100*(c===o?0:n<=.5?u/(c+o):u/(2-c-o)),100*n]}},19336:function(r){"use strict";r.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(r){r.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|\xe7)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|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)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|\xe3)o.?tom(e|\xe9)",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"}},42771:function(r,e,n){"use strict";r.exports={parse:n(46416),stringify:n(49395)}},8744:function(r,e,n){"use strict";var i=n(30584);r.exports={isSize:function(r){return/^[\d\.]/.test(r)||-1!==r.indexOf("/")||-1!==i.indexOf(r)}}},46416:function(r,e,n){"use strict";var i=n(92384),a=n(68194),t=n(3748),o=n(2904),c=n(47916),u=n(7294),d=n(39956),s=n(8744).isSize;r.exports=m;var l=m.cache={};function m(r){if("string"!==typeof r)throw new Error("Font argument must be a string.");if(l[r])return l[r];if(""===r)throw new Error("Cannot parse an empty string.");if(-1!==t.indexOf(r))return l[r]={system:r};for(var e,n={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},m=d(r,/\s+/);e=m.shift();){if(-1!==a.indexOf(e))return["style","variant","weight","stretch"].forEach((function(r){n[r]=e})),l[r]=n;if(-1===c.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===u.indexOf(e)){if(-1===o.indexOf(e)){if(s(e)){var I=d(e,"/");if(n.size=I[0],null!=I[1]?n.lineHeight=p(I[1]):"/"===m[0]&&(m.shift(),n.lineHeight=p(m.shift())),!m.length)throw new Error("Missing required font-family.");return n.family=d(m.join(" "),/\s*,\s*/).map(i),l[r]=n}throw new Error("Unknown or unsupported font token: "+e)}n.weight=e}else n.stretch=e;else n.variant=e;else n.style=e}throw new Error("Missing required font-size.")}function p(r){var e=parseFloat(r);return e.toString()===r?e:r}},49395:function(r,e,n){"use strict";var i=n(55616),a=n(8744).isSize,t=y(n(68194)),o=y(n(3748)),c=y(n(2904)),u=y(n(47916)),d=y(n(7294)),s={normal:1,"small-caps":1},l={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},m="1rem",p="serif";function I(r,e){if(r&&!e[r]&&!t[r])throw Error("Unknown keyword `"+r+"`");return r}function y(r){for(var e={},n=0;ne?1:r>=e?0:NaN}n.d(e,{XE:function(){return i},kv:function(){return o},mo:function(){return u},Uf:function(){return d},SY:function(){return s},ik:function(){return l},oh:function(){return m}});var a=function(r){var e;return 1===r.length&&(e=r,r=function(r,n){return i(e(r),n)}),{left:function(e,n,i,a){for(null==i&&(i=0),null==a&&(a=e.length);i>>1;r(e[t],n)<0?i=t+1:a=t}return i},right:function(e,n,i,a){for(null==i&&(i=0),null==a&&(a=e.length);i>>1;r(e[t],n)>0?a=t:i=t+1}return i}}}(i),t=(a.right,a.left,Array.prototype);function o(r,e){var n,i,a=r.length,t=-1;if(null==e){for(;++t=n)for(i=n;++ti&&(i=n)}else for(;++t=n)for(i=n;++ti&&(i=n);return i}function c(r){return null===r?NaN:+r}function u(r,e){var n,i=r.length,a=i,t=-1,o=0;if(null==e)for(;++t=0;)for(e=(i=r[a]).length;--e>=0;)n[--o]=i[e];return n}function s(r,e){var n,i,a=r.length,t=-1;if(null==e){for(;++t=n)for(i=n;++tn&&(i=n)}else for(;++t=n)for(i=n;++tn&&(i=n);return i}function l(r,e,n){r=+r,e=+e,n=(a=arguments.length)<2?(e=r,r=0,1):a<3?1:+n;for(var i=-1,a=0|Math.max(0,Math.ceil((e-r)/n)),t=new Array(a);++i=i.length)return null!=r&&n.sort(r),null!=e?e(n):n;for(var d,s,l,m=-1,p=n.length,I=i[a++],y=o(),f=c();++mi.length)return r;var t,o=a[n-1];return null!=e&&n>=i.length?t=r.entries():(t=[],r.each((function(r,e){t.push({key:e,values:c(r,n)})}))),null!=o?t.sort((function(r,e){return o(r.key,e.key)})):t}return n={object:function(r){return t(r,0,u,d)},map:function(r){return t(r,0,s,l)},entries:function(r){return c(t(r,0,s,l),0)},key:function(r){return i.push(r),n},sortKeys:function(r){return a[i.length-1]=r,n},sortValues:function(e){return r=e,n},rollup:function(r){return e=r,n}}}function u(){return{}}function d(r,e,n){r[e]=n}function s(){return o()}function l(r,e,n){r.set(e,n)}function m(){}var p=o.prototype;m.prototype=function(r,e){var n=new m;if(r instanceof m)r.each((function(r){n.add(r)}));else if(r){var i=-1,a=r.length;if(null==e)for(;++i=(t=(y+g)/2))?y=t:g=t,(s=n>=(o=(f+_)/2))?f=o:_=o,a=p,!(p=p[l=s<<1|d]))return a[l]=I,r;if(c=+r._x.call(null,p.data),u=+r._y.call(null,p.data),e===c&&n===u)return I.next=p,a?a[l]=I:r._root=I,r;do{a=a?a[l]=new Array(4):r._root=new Array(4),(d=e>=(t=(y+g)/2))?y=t:g=t,(s=n>=(o=(f+_)/2))?f=o:_=o}while((l=s<<1|d)===(m=(u>=o)<<1|c>=t));return a[m]=p,a[l]=I,r}function c(r,e,n,i,a){this.node=r,this.x0=e,this.y0=n,this.x1=i,this.y1=a}function u(r){return r[0]}function d(r){return r[1]}function s(r,e,n){var i=new l(null==e?u:e,null==n?d:n,NaN,NaN,NaN,NaN);return null==r?i:i.addAll(r)}function l(r,e,n,i,a,t){this._x=r,this._y=e,this._x0=n,this._y0=i,this._x1=a,this._y1=t,this._root=void 0}function m(r){for(var e={data:r.data},n=e;r=r.next;)n=n.next={data:r.data};return e}n.r(e),n.d(e,{forceCenter:function(){return i},forceCollide:function(){return f},forceLink:function(){return v},forceManyBody:function(){return Y},forceRadial:function(){return X},forceSimulation:function(){return q},forceX:function(){return Q},forceY:function(){return $}});var p=s.prototype=l.prototype;function I(r){return r.x+r.vx}function y(r){return r.y+r.vy}function f(r){var e,n,i=1,o=1;function c(){for(var r,a,c,d,l,m,p,f=e.length,g=0;gd+I||al+I||oc.index){var y=d-u.x-u.vx,f=l-u.y-u.vy,g=y*y+f*f;gr.r&&(r.r=r[e].r)}function d(){if(e){var i,a,t=e.length;for(n=new Array(t),i=0;il&&(l=i),am&&(m=a));if(d>l||s>m)return this;for(this.cover(d,s).cover(l,m),n=0;nr||r>=a||i>e||e>=t;)switch(c=(ep||(t=d.y0)>I||(o=d.x1)=_)<<1|r>=g)&&(d=y[y.length-1],y[y.length-1]=y[y.length-1-s],y[y.length-1-s]=d)}else{var h=r-+this._x.call(null,f.data),v=e-+this._y.call(null,f.data),x=h*h+v*v;if(x=(c=(I+f)/2))?I=c:f=c,(s=o>=(u=(y+g)/2))?y=u:g=u,e=p,!(p=p[l=s<<1|d]))return this;if(!p.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,m=l)}for(;p.data!==r;)if(i=p,!(p=p.next))return this;return(a=p.next)&&delete p.next,i?(a?i.next=a:delete i.next,this):e?(a?e[l]=a:delete e[l],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[m]=p:this._root=p),this):(this._root=a,this)},p.removeAll=function(r){for(var e=0,n=r.length;e=0&&(e=r.slice(n+1),r=r.slice(0,n)),r&&!i.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:e}}))),o=-1,c=t.length;if(!(arguments.length<2)){if(null!=e&&"function"!==typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var n,i,a=new Array(n),t=0;t=0&&e._call.call(null,r),e=e._next;--B}()}finally{B=0,function(){for(var r,e,n=A,i=1/0;n;)n._call?(i>n._time&&(i=n._time),r=n,n=n._next):(e=n._next,n._next=null,n=r?r._next=e:A=e);b=r,K(i)}(),R=0}}function O(){var r=N.now(),e=r-w;e>z&&(E-=e,w=r)}function K(r){B||(k&&(k=clearTimeout(k)),r-R>24?(r<1/0&&(k=setTimeout(L,r-N.now()-E)),F&&(F=clearInterval(F))):(F||(w=N.now(),F=setInterval(O,z)),B=1,T(L)))}function V(r){return r.x}function j(r){return r.y}U.prototype=H.prototype={constructor:U,restart:function(r,e,n){if("function"!==typeof r)throw new TypeError("callback is not a function");n=(null==n?D():+n)+(null==e?0:+e),this._next||b===this||(b?b._next=this:A=this,b=this),this._call=r,this._time=n,K()},stop:function(){this._call&&(this._call=null,this._time=1/0,K())}};var W=10,Z=Math.PI*(3-Math.sqrt(5));function q(r){var e,n=1,i=.001,a=1-Math.pow(i,1/300),t=0,o=.6,c=(0,g.kH)(),u=H(s),d=M("tick","end");function s(){l(),d.call("tick",e),n1?(null==n?c.remove(r):c.set(r,p(n)),e):c.get(r)},find:function(e,n,i){var a,t,o,c,u,d=0,s=r.length;for(null==i?i=1/0:i*=i,d=0;d1?(d.on(r,n),e):d.on(r)}}}function Y(){var r,e,n,i,o=a(-30),c=1,u=1/0,d=.81;function l(i){var a,t=r.length,o=s(r,V,j).visitAfter(p);for(n=i,a=0;a=u)){(r.data!==e||r.next)&&(0===l&&(I+=(l=t())*l),0===m&&(I+=(m=t())*m),I1?i[0]+i.slice(2):i,+r.slice(n+1)]}n.d(e,{E9:function(){return m},SO:function(){return y}});var a,t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(r){if(!(e=t.exec(r)))throw new Error("invalid format: "+r);var e;return new c({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function c(r){this.fill=void 0===r.fill?" ":r.fill+"",this.align=void 0===r.align?">":r.align+"",this.sign=void 0===r.sign?"-":r.sign+"",this.symbol=void 0===r.symbol?"":r.symbol+"",this.zero=!!r.zero,this.width=void 0===r.width?void 0:+r.width,this.comma=!!r.comma,this.precision=void 0===r.precision?void 0:+r.precision,this.trim=!!r.trim,this.type=void 0===r.type?"":r.type+""}function u(r,e){var n=i(r,e);if(!n)return r+"";var a=n[0],t=n[1];return t<0?"0."+new Array(-t).join("0")+a:a.length>t+1?a.slice(0,t+1)+"."+a.slice(t+1):a+new Array(t-a.length+2).join("0")}o.prototype=c.prototype,c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var d={"%":function(r,e){return(100*r).toFixed(e)},b:function(r){return Math.round(r).toString(2)},c:function(r){return r+""},d:function(r){return Math.abs(r=Math.round(r))>=1e21?r.toLocaleString("en").replace(/,/g,""):r.toString(10)},e:function(r,e){return r.toExponential(e)},f:function(r,e){return r.toFixed(e)},g:function(r,e){return r.toPrecision(e)},o:function(r){return Math.round(r).toString(8)},p:function(r,e){return u(100*r,e)},r:u,s:function(r,e){var n=i(r,e);if(!n)return r+"";var t=n[0],o=n[1],c=o-(a=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,u=t.length;return c===u?t:c>u?t+new Array(c-u+1).join("0"):c>0?t.slice(0,c)+"."+t.slice(c):"0."+new Array(1-c).join("0")+i(r,Math.max(0,e+c-1))[0]},X:function(r){return Math.round(r).toString(16).toUpperCase()},x:function(r){return Math.round(r).toString(16)}};function s(r){return r}var l,m,p=Array.prototype.map,I=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function y(r){var e,n,t=void 0===r.grouping||void 0===r.thousands?s:(e=p.call(r.grouping,Number),n=r.thousands+"",function(r,i){for(var a=r.length,t=[],o=0,c=e[0],u=0;a>0&&c>0&&(u+c+1>i&&(c=Math.max(1,i-u)),t.push(r.substring(a-=c,a+c)),!((u+=c+1)>i));)c=e[o=(o+1)%e.length];return t.reverse().join(n)}),c=void 0===r.currency?"":r.currency[0]+"",u=void 0===r.currency?"":r.currency[1]+"",l=void 0===r.decimal?".":r.decimal+"",m=void 0===r.numerals?s:function(r){return function(e){return e.replace(/[0-9]/g,(function(e){return r[+e]}))}}(p.call(r.numerals,String)),y=void 0===r.percent?"%":r.percent+"",f=void 0===r.minus?"-":r.minus+"",g=void 0===r.nan?"NaN":r.nan+"";function _(r){var e=(r=o(r)).fill,n=r.align,i=r.sign,s=r.symbol,p=r.zero,_=r.width,h=r.comma,v=r.precision,x=r.trim,P=r.type;"n"===P?(h=!0,P="g"):d[P]||(void 0===v&&(v=12),x=!0,P="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var G="$"===s?c:"#"===s&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",C="$"===s?u:/[%p]/.test(P)?y:"",S=d[P],A=/[defgprs%]/.test(P);function b(r){var o,c,u,d=G,s=C;if("c"===P)s=S(r)+s,r="";else{var y=(r=+r)<0||1/r<0;if(r=isNaN(r)?g:S(Math.abs(r),v),x&&(r=function(r){r:for(var e,n=r.length,i=1,a=-1;i0&&(a=0)}return a>0?r.slice(0,a)+r.slice(e+1):r}(r)),y&&0===+r&&"+"!==i&&(y=!1),d=(y?"("===i?i:f:"-"===i||"("===i?"":i)+d,s=("s"===P?I[8+a/3]:"")+s+(y&&"("===i?")":""),A)for(o=-1,c=r.length;++o(u=r.charCodeAt(o))||u>57){s=(46===u?l+r.slice(o+1):r.slice(o))+s,r=r.slice(0,o);break}}h&&!p&&(r=t(r,1/0));var b=d.length+r.length+s.length,M=b<_?new Array(_-b+1).join(e):"";switch(h&&p&&(r=t(M+r,M.length?_-s.length:1/0),M=""),n){case"<":r=d+r+s+M;break;case"=":r=d+M+r+s;break;case"^":r=M.slice(0,b=M.length>>1)+d+r+s+M.slice(b);break;default:r=M+d+r+s}return m(r)}return v=void 0===v?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),b.toString=function(){return r+""},b}return{format:_,formatPrefix:function(r,e){var n,a=_(((r=o(r)).type="f",r)),t=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=i(Math.abs(n)))?n[1]:NaN)/3)))),c=Math.pow(10,-t),u=I[8+t/3];return function(r){return a(c*r)+u}}}}l=y({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),m=l.format,l.formatPrefix},87108:function(r,e,n){"use strict";n.r(e),n.d(e,{geoAiry:function(){return E},geoAiryRaw:function(){return R},geoAitoff:function(){return T},geoAitoffRaw:function(){return N},geoArmadillo:function(){return J},geoArmadilloRaw:function(){return D},geoAugust:function(){return H},geoAugustRaw:function(){return U},geoBaker:function(){return V},geoBakerRaw:function(){return K},geoBerghaus:function(){return Z},geoBerghausRaw:function(){return W},geoBertin1953:function(){return nr},geoBertin1953Raw:function(){return er},geoBoggs:function(){return sr},geoBoggsRaw:function(){return dr},geoBonne:function(){return yr},geoBonneRaw:function(){return Ir},geoBottomley:function(){return gr},geoBottomleyRaw:function(){return fr},geoBromley:function(){return hr},geoBromleyRaw:function(){return _r},geoChamberlin:function(){return Mr},geoChamberlinAfrica:function(){return br},geoChamberlinRaw:function(){return Sr},geoCollignon:function(){return kr},geoCollignonRaw:function(){return Br},geoCraig:function(){return zr},geoCraigRaw:function(){return Fr},geoCraster:function(){return Er},geoCrasterRaw:function(){return Rr},geoCylindricalEqualArea:function(){return Tr},geoCylindricalEqualAreaRaw:function(){return Nr},geoCylindricalStereographic:function(){return Jr},geoCylindricalStereographicRaw:function(){return Dr},geoEckert1:function(){return Hr},geoEckert1Raw:function(){return Ur},geoEckert2:function(){return Or},geoEckert2Raw:function(){return Lr},geoEckert3:function(){return Vr},geoEckert3Raw:function(){return Kr},geoEckert4:function(){return Wr},geoEckert4Raw:function(){return jr},geoEckert5:function(){return qr},geoEckert5Raw:function(){return Zr},geoEckert6:function(){return Xr},geoEckert6Raw:function(){return Yr},geoEisenlohr:function(){return re},geoEisenlohrRaw:function(){return $r},geoFahey:function(){return ie},geoFaheyRaw:function(){return ne},geoFoucaut:function(){return te},geoFoucautRaw:function(){return ae},geoFoucautSinusoidal:function(){return ce},geoFoucautSinusoidalRaw:function(){return oe},geoGilbert:function(){return me},geoGingery:function(){return fe},geoGingeryRaw:function(){return pe},geoGinzburg4:function(){return he},geoGinzburg4Raw:function(){return _e},geoGinzburg5:function(){return xe},geoGinzburg5Raw:function(){return ve},geoGinzburg6:function(){return Ge},geoGinzburg6Raw:function(){return Pe},geoGinzburg8:function(){return Se},geoGinzburg8Raw:function(){return Ce},geoGinzburg9:function(){return be},geoGinzburg9Raw:function(){return Ae},geoGringorten:function(){return ke},geoGringortenQuincuncial:function(){return ta},geoGringortenRaw:function(){return Be},geoGuyou:function(){return Re},geoGuyouRaw:function(){return we},geoHammer:function(){return Q},geoHammerRaw:function(){return Y},geoHammerRetroazimuthal:function(){return De},geoHammerRetroazimuthalRaw:function(){return Ne},geoHealpix:function(){return We},geoHealpixRaw:function(){return Oe},geoHill:function(){return qe},geoHillRaw:function(){return Ze},geoHomolosine:function(){return en},geoHomolosineRaw:function(){return rn},geoHufnagel:function(){return an},geoHufnagelRaw:function(){return nn},geoHyperelliptical:function(){return un},geoHyperellipticalRaw:function(){return cn},geoInterrupt:function(){return ln},geoInterruptedBoggs:function(){return pn},geoInterruptedHomolosine:function(){return yn},geoInterruptedMollweide:function(){return gn},geoInterruptedMollweideHemispheres:function(){return hn},geoInterruptedQuarticAuthalic:function(){return li},geoInterruptedSinuMollweide:function(){return xn},geoInterruptedSinusoidal:function(){return Gn},geoKavrayskiy7:function(){return Sn},geoKavrayskiy7Raw:function(){return Cn},geoLagrange:function(){return bn},geoLagrangeRaw:function(){return An},geoLarrivee:function(){return kn},geoLarriveeRaw:function(){return Bn},geoLaskowski:function(){return zn},geoLaskowskiRaw:function(){return Fn},geoLittrow:function(){return Rn},geoLittrowRaw:function(){return wn},geoLoximuthal:function(){return Nn},geoLoximuthalRaw:function(){return En},geoMiller:function(){return Dn},geoMillerRaw:function(){return Tn},geoModifiedStereographic:function(){return Yn},geoModifiedStereographicAlaska:function(){return Vn},geoModifiedStereographicGs48:function(){return jn},geoModifiedStereographicGs50:function(){return Wn},geoModifiedStereographicLee:function(){return qn},geoModifiedStereographicMiller:function(){return Zn},geoModifiedStereographicRaw:function(){return Jn},geoMollweide:function(){return or},geoMollweideRaw:function(){return tr},geoMtFlatPolarParabolic:function(){return ri},geoMtFlatPolarParabolicRaw:function(){return $n},geoMtFlatPolarQuartic:function(){return ni},geoMtFlatPolarQuarticRaw:function(){return ei},geoMtFlatPolarSinusoidal:function(){return ai},geoMtFlatPolarSinusoidalRaw:function(){return ii},geoNaturalEarth:function(){return ti.c},geoNaturalEarth2:function(){return ci},geoNaturalEarth2Raw:function(){return oi},geoNaturalEarthRaw:function(){return ti.g},geoNellHammer:function(){return di},geoNellHammerRaw:function(){return ui},geoNicolosi:function(){return pi},geoNicolosiRaw:function(){return mi},geoPatterson:function(){return Ci},geoPattersonRaw:function(){return Gi},geoPeirceQuincuncial:function(){return oa},geoPierceQuincuncial:function(){return oa},geoPolyconic:function(){return Ai},geoPolyconicRaw:function(){return Si},geoPolyhedral:function(){return wi},geoPolyhedralButterfly:function(){return Ui},geoPolyhedralCollignon:function(){return Oi},geoPolyhedralWaterman:function(){return Ki},geoProject:function(){return qi},geoQuantize:function(){return ca},geoQuincuncial:function(){return aa},geoRectangularPolyconic:function(){return da},geoRectangularPolyconicRaw:function(){return ua},geoRobinson:function(){return ma},geoRobinsonRaw:function(){return la},geoSatellite:function(){return Ia},geoSatelliteRaw:function(){return pa},geoSinuMollweide:function(){return $e},geoSinuMollweideRaw:function(){return Qe},geoSinusoidal:function(){return pr},geoSinusoidalRaw:function(){return mr},geoStitch:function(){return wa},geoTimes:function(){return Ea},geoTimesRaw:function(){return Ra},geoTwoPointAzimuthal:function(){return Ja},geoTwoPointAzimuthalRaw:function(){return Ta},geoTwoPointAzimuthalUsa:function(){return Da},geoTwoPointEquidistant:function(){return La},geoTwoPointEquidistantRaw:function(){return Ua},geoTwoPointEquidistantUsa:function(){return Ha},geoVanDerGrinten:function(){return Ka},geoVanDerGrinten2:function(){return ja},geoVanDerGrinten2Raw:function(){return Va},geoVanDerGrinten3:function(){return Za},geoVanDerGrinten3Raw:function(){return Wa},geoVanDerGrinten4:function(){return Ya},geoVanDerGrinten4Raw:function(){return qa},geoVanDerGrintenRaw:function(){return Oa},geoWagner:function(){return Qa},geoWagner4:function(){return it},geoWagner4Raw:function(){return nt},geoWagner6:function(){return tt},geoWagner6Raw:function(){return at},geoWagner7:function(){return $a},geoWagnerRaw:function(){return Xa},geoWiechel:function(){return ct},geoWiechelRaw:function(){return ot},geoWinkel3:function(){return dt},geoWinkel3Raw:function(){return ut}});var i=n(87952),a=Math.abs,t=Math.atan,o=Math.atan2,c=(Math.ceil,Math.cos),u=Math.exp,d=Math.floor,s=Math.log,l=Math.max,m=Math.min,p=Math.pow,I=Math.round,y=Math.sign||function(r){return r>0?1:r<0?-1:0},f=Math.sin,g=Math.tan,_=1e-6,h=1e-12,v=Math.PI,x=v/2,P=v/4,G=Math.SQRT1_2,C=F(2),S=F(v),A=2*v,b=180/v,M=v/180;function B(r){return r>1?x:r<-1?-x:Math.asin(r)}function k(r){return r>1?0:r<-1?v:Math.acos(r)}function F(r){return r>0?Math.sqrt(r):0}function z(r){return(u(r)-u(-r))/2}function w(r){return(u(r)+u(-r))/2}function R(r){var e=g(r/2),n=2*s(c(r/2))/(e*e);function i(r,e){var i=c(r),a=c(e),t=f(e),o=a*i,u=-((1-o?s((1+o)/2)/(1-o):-.5)+n/(1+o));return[u*a*f(r),u*t]}return i.invert=function(e,i){var t,u=F(e*e+i*i),d=-r/2,l=50;if(!u)return[0,0];do{var m=d/2,p=c(m),I=f(m),y=I/p,g=-s(a(p));d-=t=(2/y*g-n*y-u)/(-g/(I*I)+1-n/(2*p*p))*(p<0?.7:1)}while(a(t)>_&&--l>0);var h=f(d);return[o(e*h,u*c(d)),B(i*h/u)]},i}function E(){var r=x,e=(0,i.U)(R),n=e(r);return n.radius=function(n){return arguments.length?e(r=n*M):r*b},n.scale(179.976).clipAngle(147)}function N(r,e){var n=c(e),i=function(r){return r?r/Math.sin(r):1}(k(n*c(r/=2)));return[2*n*f(r)*i,f(e)*i]}function T(){return(0,i.c)(N).scale(152.63)}function D(r){var e=f(r),n=c(r),i=r>=0?1:-1,t=g(i*r),u=(1+e-n)/2;function d(r,a){var d=c(a),s=c(r/=2);return[(1+d)*f(r),(i*a>-o(s,t)-.001?0:10*-i)+u+f(a)*n-(1+d)*e*s]}return d.invert=function(r,d){var s=0,l=0,m=50;do{var p=c(s),I=f(s),y=c(l),g=f(l),h=1+y,v=h*I-r,x=u+g*n-h*e*p-d,P=h*p/2,G=-I*g,C=e*h*I/2,S=n*y+e*p*g,A=G*C-S*P,b=(x*G-v*S)/A/2,M=(v*C-x*P)/A;a(M)>2&&(M/=2),s-=b,l-=M}while((a(b)>_||a(M)>_)&&--m>0);return i*l>-o(c(s),t)-.001?[2*s,l]:null},d}function J(){var r=20*M,e=r>=0?1:-1,n=g(e*r),a=(0,i.U)(D),t=a(r),u=t.stream;return t.parallel=function(i){return arguments.length?(n=g((e=(r=i*M)>=0?1:-1)*r),a(r)):r*b},t.stream=function(i){var a=t.rotate(),d=u(i),s=(t.rotate([0,0]),u(i)),l=t.precision();return t.rotate(a),d.sphere=function(){s.polygonStart(),s.lineStart();for(var i=-180*e;e*i<180;i+=90*e)s.point(i,90*e);if(r)for(;e*(i-=3*e*l)>=-180;)s.point(i,e*-o(c(i*M/2),n)*b);s.lineEnd(),s.polygonEnd()},d},t.scale(218.695).center([0,28.0974])}function U(r,e){var n=g(e/2),i=F(1-n*n),a=1+i*c(r/=2),t=f(r)*i/a,o=n/a,u=t*t,d=o*o;return[4/3*t*(3+u-3*d),4/3*o*(3+3*u-d)]}function H(){return(0,i.c)(U).scale(66.1603)}N.invert=function(r,e){if(!(r*r+4*e*e>v*v+_)){var n=r,i=e,t=25;do{var o,u=f(n),d=f(n/2),s=c(n/2),l=f(i),m=c(i),p=f(2*i),I=l*l,y=m*m,g=d*d,h=1-y*s*s,x=h?k(m*s)*F(o=1/h):o=0,P=2*x*m*d-r,G=x*l-e,C=o*(y*g+x*m*s*I),S=o*(.5*u*p-2*x*l*d),A=.25*o*(p*d-x*l*y*u),b=o*(I*s+x*g*m),M=S*A-b*C;if(!M)break;var B=(G*S-P*b)/M,z=(P*A-G*C)/M;n-=B,i-=z}while((a(B)>_||a(z)>_)&&--t>0);return[n,i]}},U.invert=function(r,e){if(e*=3/8,!(r*=3/8)&&a(e)>1)return null;var n=1+r*r+e*e,i=F((n-F(n*n-4*e*e))/2),t=B(i)/3,u=i?function(r){return s(r+F(r*r-1))}(a(e/i))/3:function(r){return s(r+F(r*r+1))}(a(r))/3,d=c(t),l=w(u),m=l*l-d*d;return[2*y(r)*o(z(u)*d,.25-m),2*y(e)*o(l*f(t),.25+m)]};var L=F(8),O=s(1+C);function K(r,e){var n=a(e);return nh&&--d>0);return[r/(c(o)*(L-1/f(o))),y(e)*o]};var j=n(69020);function W(r){var e=2*v/r;function n(r,n){var i=(0,j.O)(r,n);if(a(r)>x){var t=o(i[1],i[0]),u=F(i[0]*i[0]+i[1]*i[1]),d=e*I((t-x)/e)+x,s=o(f(t-=d),2-c(t));t=d+B(v/u*f(s))-s,i[0]=u*c(t),i[1]=u*f(t)}return i}return n.invert=function(r,n){var i=F(r*r+n*n);if(i>x){var a=o(n,r),u=e*I((a-x)/e)+x,d=a>u?-1:1,s=i*c(u-a),l=1/g(d*k((s-v)/F(v*(v-2*s)+i*i)));a=u+2*t((l+d*F(l*l-3))/3),r=i*c(a),n=i*f(a)}return j.O.invert(r,n)},n}function Z(){var r=5,e=(0,i.U)(W),n=e(r),a=n.stream,t=.01,u=-c(t*M),d=f(t*M);return n.lobes=function(n){return arguments.length?e(r=+n):r},n.stream=function(e){var i=n.rotate(),s=a(e),l=(n.rotate([0,0]),a(e));return n.rotate(i),s.sphere=function(){l.polygonStart(),l.lineStart();for(var e=0,n=360/r,i=2*v/r,a=90-180/r,s=x;e0&&a(i)>_);return c<0?NaN:n}function rr(r,e,n){return void 0===e&&(e=40),void 0===n&&(n=h),function(i,t,o,c){var u,d,s;o=void 0===o?0:+o,c=void 0===c?0:+c;for(var l=0;lu)o-=d/=2,c-=s/=2;else{u=y;var f=(o>0?-1:1)*n,g=(c>0?-1:1)*n,_=r(o+f,c),h=r(o,c+g),v=(_[0]-m[0])/f,x=(_[1]-m[1])/f,P=(h[0]-m[0])/g,G=(h[1]-m[1])/g,C=G*v-x*P,S=(a(C)<.5?.5:1)/C;if(o+=d=(I*P-p*G)*S,c+=s=(p*x-I*v)*S,a(d)0&&(a[1]*=1+t/1.5*a[0]*a[0]),a}return e.invert=rr(e),e}function nr(){return(0,i.c)(er()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function ir(r,e){var n,i=r*f(e),t=30;do{e-=n=(e+f(e)-i)/(1+c(e))}while(a(n)>_&&--t>0);return e/2}function ar(r,e,n){function i(i,a){return[r*i*c(a=ir(n,a)),e*f(a)]}return i.invert=function(i,a){return a=B(a/e),[i/(r*c(a)),B((2*a+f(2*a))/n)]},i}X.invert=function(r,e){var n=2*B(e/2);return[r*c(n/2)/c(n),n]};var tr=ar(C/x,C,v);function or(){return(0,i.c)(tr).scale(169.529)}var cr=2.00276,ur=1.11072;function dr(r,e){var n=ir(v,e);return[cr*r/(1/c(e)+ur/c(n)),(e+C*f(n))/cr]}function sr(){return(0,i.c)(dr).scale(160.857)}function lr(r){var e=0,n=(0,i.U)(r),a=n(e);return a.parallel=function(r){return arguments.length?n(e=r*M):e*b},a}function mr(r,e){return[r*c(e),e]}function pr(){return(0,i.c)(mr).scale(152.63)}function Ir(r){if(!r)return mr;var e=1/g(r);function n(n,i){var a=e+r-i,t=a?n*c(i)/a:a;return[a*f(t),e-a*c(t)]}return n.invert=function(n,i){var a=F(n*n+(i=e-i)*i),t=e+r-a;return[a/c(t)*o(n,i),t]},n}function yr(){return lr(Ir).scale(123.082).center([0,26.1441]).parallel(45)}function fr(r){function e(e,n){var i=x-n,a=i?e*r*f(i)/i:i;return[i*f(a)/r,x-i*c(a)]}return e.invert=function(e,n){var i=e*r,a=x-n,t=F(i*i+a*a),c=o(i,a);return[(t?t/f(t):1)*c/r,x-t]},e}function gr(){var r=.5,e=(0,i.U)(fr),n=e(r);return n.fraction=function(n){return arguments.length?e(r=+n):r},n.scale(158.837)}dr.invert=function(r,e){var n,i,t=cr*e,o=e<0?-P:P,u=25;do{i=t-C*f(o),o-=n=(f(2*o)+2*o-v*f(i))/(2*c(2*o)+2+v*c(i)*C*c(o))}while(a(n)>_&&--u>0);return i=t-C*f(o),[r*(1/c(i)+ur/c(o))/cr,i]},mr.invert=function(r,e){return[r/c(e),e]};var _r=ar(1,4/v,v);function hr(){return(0,i.c)(_r).scale(152.63)}var vr=n(24052),xr=n(92992);function Pr(r,e,n,i,t,u){var d,s=c(u);if(a(r)>1||a(u)>1)d=k(n*t+e*i*s);else{var l=f(r/2),m=f(u/2);d=2*B(F(l*l+e*i*m*m))}return a(d)>_?[d,o(i*f(u),e*t-n*i*s)]:[0,0]}function Gr(r,e,n){return k((r*r+e*e-n*n)/(2*r*e))}function Cr(r){return r-2*v*d((r+v)/(2*v))}function Sr(r,e,n){for(var i,a=[[r[0],r[1],f(r[1]),c(r[1])],[e[0],e[1],f(e[1]),c(e[1])],[n[0],n[1],f(n[1]),c(n[1])]],t=a[2],o=0;o<3;++o,t=i)i=a[o],t.v=Pr(i[1]-t[1],t[3],t[2],i[3],i[2],i[0]-t[0]),t.point=[0,0];var u=Gr(a[0].v[0],a[2].v[0],a[1].v[0]),d=Gr(a[0].v[0],a[1].v[0],a[2].v[0]),s=v-u;a[2].point[1]=0,a[0].point[0]=-(a[1].point[0]=a[0].v[0]/2);var l=[a[2].point[0]=a[0].point[0]+a[2].v[0]*c(u),2*(a[0].point[1]=a[1].point[1]=a[2].v[0]*f(u))];return function(r,e){var n,i=f(e),t=c(e),o=new Array(3);for(n=0;n<3;++n){var u=a[n];if(o[n]=Pr(e-u[1],u[3],u[2],t,i,r-u[0]),!o[n][0])return u.point;o[n][1]=Cr(o[n][1]-u.v[1])}var m=l.slice();for(n=0;n<3;++n){var p=2==n?0:n+1,I=Gr(a[n].v[0],o[n][0],o[p][0]);o[n][1]<0&&(I=-I),n?1==n?(I=d-I,m[0]-=o[n][0]*c(I),m[1]-=o[n][0]*f(I)):(I=s-I,m[0]+=o[n][0]*c(I),m[1]+=o[n][0]*f(I)):(m[0]+=o[n][0]*c(I),m[1]-=o[n][0]*f(I))}return m[0]/=3,m[1]/=3,m}}function Ar(r){return r[0]*=M,r[1]*=M,r}function br(){return Mr([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Mr(r,e,n){var a=(0,vr.c)({type:"MultiPoint",coordinates:[r,e,n]}),t=[-a[0],-a[1]],o=(0,xr.c)(t),c=Sr(Ar(o(r)),Ar(o(e)),Ar(o(n)));c.invert=rr(c);var u=(0,i.c)(c).rotate(t),d=u.center;return delete u.rotate,u.center=function(r){return arguments.length?d(o(r)):o.invert(d())},u.clipAngle(90)}function Br(r,e){var n=F(1-f(e));return[2/S*r*n,S*(1-n)]}function kr(){return(0,i.c)(Br).scale(95.6464).center([0,30])}function Fr(r){var e=g(r);function n(r,n){return[r,(r?r/f(r):1)*(f(n)*c(r)-e*c(n))]}return n.invert=e?function(r,n){r&&(n*=f(r)/r);var i=c(r);return[r,2*o(F(i*i+e*e-n*n)-i,e-n)]}:function(r,e){return[r,B(r?e*g(r)/r:e)]},n}function zr(){return lr(Fr).scale(249.828).clipAngle(90)}Br.invert=function(r,e){var n=(n=e/S-1)*n;return[n>0?r*F(v/n)/2:0,B(1-n)]};var wr=F(3);function Rr(r,e){return[wr*r*(2*c(2*e/3)-1)/S,wr*S*f(e/3)]}function Er(){return(0,i.c)(Rr).scale(156.19)}function Nr(r){var e=c(r);function n(r,n){return[r*e,f(n)/e]}return n.invert=function(r,n){return[r/e,B(n*e)]},n}function Tr(){return lr(Nr).parallel(38.58).scale(195.044)}function Dr(r){var e=c(r);function n(r,n){return[r*e,(1+e)*g(n/2)]}return n.invert=function(r,n){return[r/e,2*t(n/(1+e))]},n}function Jr(){return lr(Dr).scale(124.75)}function Ur(r,e){var n=F(8/(3*v));return[n*r*(1-a(e)/v),n*e]}function Hr(){return(0,i.c)(Ur).scale(165.664)}function Lr(r,e){var n=F(4-3*f(a(e)));return[2/F(6*v)*r*n,y(e)*F(2*v/3)*(2-n)]}function Or(){return(0,i.c)(Lr).scale(165.664)}function Kr(r,e){var n=F(v*(4+v));return[2/n*r*(1+F(1-4*e*e/(v*v))),4/n*e]}function Vr(){return(0,i.c)(Kr).scale(180.739)}function jr(r,e){var n=(2+x)*f(e);e/=2;for(var i=0,t=1/0;i<10&&a(t)>_;i++){var o=c(e);e-=t=(e+f(e)*(o+2)-n)/(2*o*(1+o))}return[2/F(v*(4+v))*r*(1+c(e)),2*F(v/(4+v))*f(e)]}function Wr(){return(0,i.c)(jr).scale(180.739)}function Zr(r,e){return[r*(1+c(e))/F(2+v),2*e/F(2+v)]}function qr(){return(0,i.c)(Zr).scale(173.044)}function Yr(r,e){for(var n=(1+x)*f(e),i=0,t=1/0;i<10&&a(t)>_;i++)e-=t=(e+f(e)-n)/(1+c(e));return n=F(2+v),[r*(1+c(e))/n,2*e/n]}function Xr(){return(0,i.c)(Yr).scale(173.044)}Rr.invert=function(r,e){var n=3*B(e/(wr*S));return[S*r/(wr*(2*c(2*n/3)-1)),n]},Ur.invert=function(r,e){var n=F(8/(3*v)),i=e/n;return[r/(n*(1-a(i)/v)),i]},Lr.invert=function(r,e){var n=2-a(e)/F(2*v/3);return[r*F(6*v)/(2*n),y(e)*B((4-n*n)/3)]},Kr.invert=function(r,e){var n=F(v*(4+v))/2;return[r*n/(1+F(1-e*e*(4+v)/(4*v))),e*n/2]},jr.invert=function(r,e){var n=e*F((4+v)/v)/2,i=B(n),a=c(i);return[r/(2/F(v*(4+v))*(1+a)),B((i+n*(a+2))/(2+x))]},Zr.invert=function(r,e){var n=F(2+v),i=e*n/2;return[n*r/(1+c(i)),i]},Yr.invert=function(r,e){var n=1+x,i=F(n/2);return[2*r*i/(1+c(e*=i)),B((e+f(e))/n)]};var Qr=3+2*C;function $r(r,e){var n=f(r/=2),i=c(r),a=F(c(e)),o=c(e/=2),u=f(e)/(o+C*i*a),d=F(2/(1+u*u)),l=F((C*o+(i+n)*a)/(C*o+(i-n)*a));return[Qr*(d*(l-1/l)-2*s(l)),Qr*(d*u*(l+1/l)-2*t(u))]}function re(){return(0,i.c)($r).scale(62.5271)}$r.invert=function(r,e){if(!(n=U.invert(r/1.2,1.065*e)))return null;var n,i=n[0],o=n[1],u=20;r/=Qr,e/=Qr;do{var d=i/2,p=o/2,I=f(d),y=c(d),g=f(p),h=c(p),v=c(o),P=F(v),S=g/(h+C*y*P),A=S*S,b=F(2/(1+A)),M=(C*h+(y+I)*P)/(C*h+(y-I)*P),B=F(M),k=B-1/B,z=B+1/B,w=b*k-2*s(B)-r,R=b*S*z-2*t(S)-e,E=g&&G*P*I*A/g,N=(C*y*h+P)/(2*(h+C*y*P)*(h+C*y*P)*P),T=-.5*S*b*b*b,D=T*E,J=T*N,H=(H=2*h+C*P*(y-I))*H*B,L=(C*y*h*P+v)/H,O=-C*I*g/(P*H),K=k*D-2*L/B+b*(L+L/M),V=k*J-2*O/B+b*(O+O/M),j=S*z*D-2*E/(1+A)+b*z*E+b*S*(L-L/M),W=S*z*J-2*N/(1+A)+b*z*N+b*S*(O-O/M),Z=V*j-W*K;if(!Z)break;var q=(R*V-w*W)/Z,Y=(w*j-R*K)/Z;i-=q,o=l(-x,m(x,o-Y))}while((a(q)>_||a(Y)>_)&&--u>0);return a(a(o)-x)<_?[0,o]:u&&[i,o]};var ee=c(35*M);function ne(r,e){var n=g(e/2);return[r*ee*F(1-n*n),(1+ee)*n]}function ie(){return(0,i.c)(ne).scale(137.152)}function ae(r,e){var n=e/2,i=c(n);return[2*r/S*c(e)*i*i,S*g(n)]}function te(){return(0,i.c)(ae).scale(135.264)}function oe(r){var e=1-r,n=a(v,0)[0]-a(-v,0)[0],i=F(2*(a(0,x)[1]-a(0,-x)[1])/n);function a(n,i){var a=c(i),t=f(i);return[a/(e+r*a)*n,e*i+r*t]}function t(r,e){var n=a(r,e);return[n[0]*i,n[1]/i]}function o(r){return t(0,r)[1]}return t.invert=function(n,a){var t=$(o,a);return[n/i*(r+e/c(t)),t]},t}function ce(){var r=.5,e=(0,i.U)(oe),n=e(r);return n.alpha=function(n){return arguments.length?e(r=+n):r},n.scale(168.725)}ne.invert=function(r,e){var n=e/(1+ee);return[r&&r/(ee*F(1-n*n)),2*t(n)]},ae.invert=function(r,e){var n=t(e/S),i=c(n),a=2*n;return[r*S/2/(c(a)*i*i),a]};var ue=n(4888),de=n(69604);function se(r){return[r[0]/2,B(g(r[1]/2*M))*b]}function le(r){return[2*r[0],2*t(f(r[1]*M))*b]}function me(r){null==r&&(r=ue.c);var e=r(),n=(0,de.c)().scale(b).precision(0).clipAngle(null).translate([0,0]);function i(r){return e(se(r))}function a(r){i[r]=function(){return arguments.length?(e[r].apply(e,arguments),i):e[r]()}}return e.invert&&(i.invert=function(r){return le(e.invert(r))}),i.stream=function(r){var i=e.stream(r),a=n.stream({point:function(r,e){i.point(r/2,B(g(-e/2*M))*b)},lineStart:function(){i.lineStart()},lineEnd:function(){i.lineEnd()},polygonStart:function(){i.polygonStart()},polygonEnd:function(){i.polygonEnd()}});return a.sphere=i.sphere,a},i.rotate=function(r){return arguments.length?(n.rotate(r),i):n.rotate()},i.center=function(r){return arguments.length?(e.center(se(r)),i):le(e.center())},a("angle"),a("clipAngle"),a("clipExtent"),a("fitExtent"),a("fitHeight"),a("fitSize"),a("fitWidth"),a("scale"),a("translate"),a("precision"),i.scale(249.5)}function pe(r,e){var n=2*v/e,i=r*r;function t(e,t){var u=(0,j.O)(e,t),d=u[0],s=u[1],l=d*d+s*s;if(l>i){var m=F(l),p=o(s,d),y=n*I(p/n),g=p-y,h=r*c(g),P=(r*f(g)-g*f(h))/(x-h),G=Ie(g,P),C=(v-r)/ye(G,h,v);d=m;var S,A=50;do{d-=S=(r+ye(G,h,d)*C-m)/(G(d)*C)}while(a(S)>_&&--A>0);s=g*f(d),di){var d=F(u),s=o(t,e),l=n*I(s/n),m=s-l;e=d*c(m),t=d*f(m);for(var p=e-x,y=f(e),g=t/y,_=e_||a(p)>_)&&--g>0);return[I,y]},s}var _e=ge(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function he(){return(0,i.c)(_e).scale(149.995)}var ve=ge(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function xe(){return(0,i.c)(ve).scale(153.93)}var Pe=ge(5/6*v,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Ge(){return(0,i.c)(Pe).scale(130.945)}function Ce(r,e){var n=r*r,i=e*e;return[r*(1-.162388*i)*(.87-952426e-9*n*n),e*(1+i/12)]}function Se(){return(0,i.c)(Ce).scale(131.747)}Ce.invert=function(r,e){var n,i=r,t=e,o=50;do{var c=t*t;t-=n=(t*(1+c/12)-e)/(1+c/4)}while(a(n)>_&&--o>0);o=50,r/=1-.162388*c;do{var u=(u=i*i)*u;i-=n=(i*(.87-952426e-9*u)-r)/(.87-.00476213*u)}while(a(n)>_&&--o>0);return[i,t]};var Ae=ge(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function be(){return(0,i.c)(Ae).scale(131.087)}function Me(r){var e=r(x,0)[0]-r(-x,0)[0];function n(n,i){var a=n>0?-.5:.5,t=r(n+a*v,i);return t[0]-=a*e,t}return r.invert&&(n.invert=function(n,i){var a=n>0?-.5:.5,t=r.invert(n+a*e,i),o=t[0]-a*v;return o<-v?o+=2*v:o>v&&(o-=2*v),t[0]=o,t}),n}function Be(r,e){var n=y(r),i=y(e),t=c(e),u=c(r)*t,d=f(r)*t,s=f(i*e);r=a(o(d,s)),e=B(u),a(r-x)>_&&(r%=x);var l=function(r,e){if(e===x)return[0,0];var n,i,t=f(e),o=t*t,u=o*o,d=1+u,s=1+3*u,l=1-u,m=B(1/F(d)),p=l+o*d*m,I=(1-t)/p,y=F(I),g=I*d,h=F(g),P=y*l;if(0===r)return[0,-(P+o*h)];var G,C=c(e),S=1/C,A=2*t*C,b=(-3*o+m*s)*A,M=(-p*C-(1-t)*b)/(p*p),k=o*d*M+I*s*A,z=-S*A,w=-S*k,R=-2*S*(l*(.5*M/y)-2*o*y*A),E=4*r/v;if(r>.222*v||e.175*v){if(n=(P+o*F(g*(1+u)-P*P))/(1+u),r>v/4)return[n,n];var N=n,T=.5*n;n=.5*(T+N),i=50;do{var D=n*(R+z*F(g-n*n))+w*B(n/h)-E;if(!D)break;D<0?T=n:N=n,n=.5*(T+N)}while(a(N-T)>_&&--i>0)}else{n=_,i=25;do{var J=n*n,U=F(g-J),H=R+z*U,L=n*H+w*B(n/h)-E;n-=G=U?L/(H+(w-z*J)/U):0}while(a(G)>_&&--i>0)}return[n,-P-o*F(g-n*n)]}(r>v/4?x-r:r,e);return r>v/4&&(s=l[0],l[0]=-l[1],l[1]=-s),l[0]*=n,l[1]*=-i,l}function ke(){return(0,i.c)(Me(Be)).scale(239.75)}function Fe(r,e){var n,i,o,d,s,l;if(e<_)return[(d=f(r))-(n=e*(r-d*(i=c(r)))/4)*i,i+n*d,1-e*d*d/2,r-n];if(e>=1-_)return n=(1-e)/4,o=1/(i=w(r)),[(d=((l=u(2*(l=r)))-1)/(l+1))+n*((s=i*z(r))-r)/(i*i),o-n*d*o*(s-r),o+n*d*o*(s+r),2*t(u(r))-x+n*(s-r)/i];var m=[1,0,0,0,0,0,0,0,0],p=[F(e),0,0,0,0,0,0,0,0],I=0;for(i=F(1-e),s=1;a(p[I]/m[I])>_&&I<8;)n=m[I++],p[I]=(n-i)/2,m[I]=(n+i)/2,i=F(n*i),s*=2;o=s*m[I]*r;do{o=(B(d=p[I]*f(i=o)/m[I])+o)/2}while(--I);return[f(o),d=c(o),d/c(o-i),o]}function ze(r,e){if(!e)return r;if(1===e)return s(g(r/2+P));for(var n=1,i=F(1-e),o=F(e),c=0;a(o)>_;c++){if(r%v){var u=t(i*g(r)/n);u<0&&(u+=v),r+=u+~~(r/v)*v}else r+=r;o=(n+i)/2,i=F(n*i),o=((n=o)-i)/2}return r/(p(2,c)*n)}function we(r,e){var n=(C-1)/(C+1),i=F(1-n*n),d=ze(x,i*i),l=s(g(v/4+a(e)/2)),m=u(-1*l)/F(n),p=function(r,e){var n=r*r,i=e+1,a=1-n-e*e;return[.5*((r>=0?x:-x)-o(a,2*r)),-.25*s(a*a+4*n)+.5*s(i*i+n)]}(m*c(-1*r),m*f(-1*r)),I=function(r,e,n){var i=a(r),o=z(a(e));if(i){var c=1/f(i),u=1/(g(i)*g(i)),d=-(u+n*(o*o*c*c)-1+n),s=(-d+F(d*d-(n-1)*u*4))/2;return[ze(t(1/F(s)),n)*y(r),ze(t(F((s/u-1)/n)),1-n)*y(e)]}return[0,ze(t(o),1-n)*y(e)]}(p[0],p[1],i*i);return[-I[1],(e>=0?1:-1)*(.5*d-I[0])]}function Re(){return(0,i.c)(Me(we)).scale(151.496)}Be.invert=function(r,e){a(r)>1&&(r=2*y(r)-r),a(e)>1&&(e=2*y(e)-e);var n=y(r),i=y(e),t=-n*r,u=-i*e,d=u/t<1,s=function(r,e){for(var n=0,i=1,t=.5,o=50;;){var u=t*t,d=F(t),s=B(1/F(1+u)),l=1-u+t*(1+u)*s,m=(1-d)/l,p=F(m),I=m*(1+u),y=p*(1-u),f=F(I-r*r),g=e+y+t*f;if(a(i-n)0?n=t:i=t,t=.5*(n+i)}if(!o)return null;var _=B(d),x=c(_),P=1/x,G=2*d*x,C=(-l*x-(-3*t+s*(1+3*u))*G*(1-d))/(l*l),S=.5*C/p,A=(1-u)*S-2*t*p*G;return[v/4*(r*(-2*P*A+-P*G*f)+-P*(t*(1+u)*C+m*(1+3*u)*G)*B(r/F(I))),_]}(d?u:t,d?t:u),l=s[0],m=s[1],p=c(m);return d&&(l=-x-l),[n*(o(f(l)*p,-f(m))+v),i*B(c(l)*p)]},we.invert=function(r,e){var n=(C-1)/(C+1),i=F(1-n*n),a=function(r,e,n){var i,a,t;return r?(i=Fe(r,n),e?(t=(a=Fe(e,1-n))[1]*a[1]+n*i[0]*i[0]*a[0]*a[0],[[i[0]*a[2]/t,i[1]*i[2]*a[0]*a[1]/t],[i[1]*a[1]/t,-i[0]*i[2]*a[0]*a[2]/t],[i[2]*a[1]*a[2]/t,-n*i[0]*i[1]*a[0]/t]]):[[i[0],0],[i[1],0],[i[2],0]]):[[0,(a=Fe(e,1-n))[0]/a[1]],[1/a[1],0],[a[2]/a[1],0]]}(.5*ze(x,i*i)-e,-r,i*i),c=function(r,e){var n=e[0]*e[0]+e[1]*e[1];return[(r[0]*e[0]+r[1]*e[1])/n,(r[1]*e[0]-r[0]*e[1])/n]}(a[0],a[1]);return[o(c[1],c[0])/-1,2*t(u(-.5*s(n*c[0]*c[0]+n*c[1]*c[1])))-x]};var Ee=n(61780);function Ne(r){var e=f(r),n=c(r),i=Te(r);function t(r,t){var o=i(r,t);r=o[0],t=o[1];var u=f(t),d=c(t),s=c(r),l=k(e*u+n*d*s),m=f(l),p=a(m)>_?l/m:1;return[p*n*f(r),(a(r)>x?p:-p)*(e*d-n*u*s)]}return i.invert=Te(-r),t.invert=function(r,n){var a=F(r*r+n*n),t=-f(a),u=c(a),d=a*u,s=-n*t,l=a*e,m=F(d*d+s*s-l*l),p=o(d*l+s*m,s*l-d*m),I=(a>x?-1:1)*o(r*t,a*c(p)*u+n*f(p)*t);return i.invert(I,p)},t}function Te(r){var e=f(r),n=c(r);return function(r,i){var a=c(i),t=c(r)*a,u=f(r)*a,d=f(i);return[o(u,t*n-d*e),B(d*n+t*e)]}}function De(){var r=0,e=(0,i.U)(Ne),n=e(r),a=n.rotate,t=n.stream,o=(0,Ee.c)();return n.parallel=function(i){if(!arguments.length)return r*b;var a=n.rotate();return e(r=i*M).rotate(a)},n.rotate=function(e){return arguments.length?(a.call(n,[e[0],e[1]-r*b]),o.center([-e[0],-e[1]]),n):((e=a.call(n))[1]+=r*b,e)},n.stream=function(r){return(r=t(r)).sphere=function(){r.polygonStart();var e,n=o.radius(89.99)().coordinates[0],i=n.length-1,a=-1;for(r.lineStart();++a=0;)r.point((e=n[a])[0],e[1]);r.lineEnd(),r.polygonEnd()},r},n.scale(79.4187).parallel(45).clipAngle(179.999)}var Je=n(84706),Ue=n(16016),He=B(1-1/3)*b,Le=Nr(0);function Oe(r){var e=He*M,n=Br(v,e)[0]-Br(-v,e)[0],i=Le(0,e)[1],t=Br(0,e)[1],o=S-t,c=A/r,u=4/A,s=i+o*o*4/A;function p(p,I){var y,f=a(I);if(f>e){var g=m(r-1,l(0,d((p+v)/c)));(y=Br(p+=v*(r-1)/r-g*c,f))[0]=y[0]*A/n-A*(r-1)/(2*r)+g*A/r,y[1]=i+4*(y[1]-t)*o/A,I<0&&(y[1]=-y[1])}else y=Le(p,I);return y[0]*=u,y[1]/=s,y}return p.invert=function(e,p){e/=u;var I=a(p*=s);if(I>i){var y=m(r-1,l(0,d((e+v)/c)));e=(e+v*(r-1)/r-y*c)*n/A;var f=Br.invert(e,.25*(I-i)*A/o+t);return f[0]-=v*(r-1)/r-y*c,p<0&&(f[1]=-f[1]),f}return Le.invert(e,p)},p}function Ke(r,e){return[r,1&e?90-_:He]}function Ve(r,e){return[r,1&e?-90+_:-He]}function je(r){return[r[0]*(1-_),r[1]]}function We(){var r=4,e=(0,i.U)(Oe),n=e(r),a=n.stream;return n.lobes=function(n){return arguments.length?e(r=+n):r},n.stream=function(e){var i=n.rotate(),t=a(e),o=(n.rotate([0,0]),a(e));return n.rotate(i),t.sphere=function(){(0,Ue.c)(function(r){var e=[].concat((0,Je.ik)(-180,180+r/2,r).map(Ke),(0,Je.ik)(180,-180-r/2,-r).map(Ve));return{type:"Polygon",coordinates:[180===r?e.map(je):e]}}(180/r),o)},t},n.scale(239.75)}function Ze(r){var e,n=1+r,i=B(f(1/n)),t=2*F(v/(e=v+4*i*n)),u=.5*t*(n+F(r*(2+r))),d=r*r,s=n*n;function l(l,m){var p,I,y=1-f(m);if(y&&y<2){var g,_=x-m,P=25;do{var G=f(_),C=c(_),S=i+o(G,n-C),A=1+s-2*n*C;_-=g=(_-d*i-n*G+A*S-.5*y*e)/(2*n*G*S)}while(a(g)>h&&--P>0);p=t*F(A),I=l*S/v}else p=t*(r+y),I=l*i/v;return[p*f(I),u-p*c(I)]}return l.invert=function(r,a){var c=r*r+(a-=u)*a,l=(1+s-c/(t*t))/(2*n),m=k(l),p=f(m),I=i+o(p,n-l);return[B(r/F(c))*v/I,B(1-2*(m-d*i-n*p+(1+s-2*n*l)*I)/e)]},l}function qe(){var r=1,e=(0,i.U)(Ze),n=e(r);return n.ratio=function(n){return arguments.length?e(r=+n):r},n.scale(167.774).center([0,18.67])}var Ye=.7109889596207567,Xe=.0528035274542;function Qe(r,e){return e>-Ye?((r=tr(r,e))[1]+=Xe,r):mr(r,e)}function $e(){return(0,i.c)(Qe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function rn(r,e){return a(e)>Ye?((r=tr(r,e))[1]-=e>0?Xe:-Xe,r):mr(r,e)}function en(){return(0,i.c)(rn).scale(152.63)}function nn(r,e,n,i){var a=F(4*v/(2*n+(1+r-e/2)*f(2*n)+(r+e)/2*f(4*n)+e/2*f(6*n))),t=F(i*f(n)*F((1+r*c(2*n)+e*c(4*n))/(1+r+e))),o=n*d(1);function u(n){return F(1+r*c(2*n)+e*c(4*n))}function d(i){var a=i*n;return(2*a+(1+r-e/2)*f(2*a)+(r+e)/2*f(4*a)+e/2*f(6*a))/n}function s(r){return u(r)*f(r)}var l=function(r,e){var i=n*$(d,o*f(e)/n,e/v);isNaN(i)&&(i=n*y(e));var s=a*u(i);return[s*t*r/v*c(i),s/t*f(i)]};return l.invert=function(r,e){var i=$(s,e*t/a);return[r*v/(c(i)*a*t*u(i)),B(n*d(i/n)/o)]},0===n&&(a=F(i/v),(l=function(r,e){return[r*a,f(e)/a]}).invert=function(r,e){return[r/a,B(e*a)]}),l}function an(){var r=1,e=0,n=45*M,a=2,t=(0,i.U)(nn),o=t(r,e,n,a);return o.a=function(i){return arguments.length?t(r=+i,e,n,a):r},o.b=function(i){return arguments.length?t(r,e=+i,n,a):e},o.psiMax=function(i){return arguments.length?t(r,e,n=+i*M,a):n*b},o.ratio=function(i){return arguments.length?t(r,e,n,a=+i):a},o.scale(180.739)}function tn(r,e,n,i,a,t,o,c,u,d,s){if(s.nanEncountered)return NaN;var l,m,p,I,y,f,g,_,h,v;if(m=r(e+.25*(l=n-e)),p=r(n-.25*l),isNaN(m))s.nanEncountered=!0;else{if(!isNaN(p))return v=((f=(I=l*(i+4*m+a)/12)+(y=l*(a+4*p+t)/12))-o)/15,d>u?(s.maxDepthCount++,f+v):Math.abs(v)r?n=i:e=i,i=e+n>>1}while(i>e);var a=d[i+1]-d[i];return a&&(a=(r-d[i+1])/a),(i+1+a)/c}var m=2*l(1)/v*o/n,I=function(r,e){var n=l(a(f(e))),t=i(n)*r;return n/=m,[t,e>=0?n:-n]};return I.invert=function(r,e){var n;return a(e*=m)<1&&(n=y(e)*B(t(a(e))*o)),[r/i(a(e)),n]},I}function un(){var r=0,e=2.5,n=1.183136,a=(0,i.U)(cn),t=a(r,e,n);return t.alpha=function(i){return arguments.length?a(r=+i,e,n):r},t.k=function(i){return arguments.length?a(r,e=+i,n):e},t.gamma=function(i){return arguments.length?a(r,e,n=+i):n},t.scale(152.63)}function dn(r,e){return a(r[0]-e[0])<_&&a(r[1]-e[1])<_}function sn(r,e){for(var n,i,a,t=-1,o=r.length,c=r[0],u=[];++tt[o][2][0];++o);var u=r(n-t[o][1][0],i);return u[0]+=r(t[o][1][0],a*i>a*t[o][0][1]?t[o][0][1]:i)[0],u}n?o.invert=n(o):r.invert&&(o.invert=function(n,i){for(var a=t[+(i<0)],c=e[+(i<0)],u=0,d=a.length;u=0;--c)n=(e=r[1][c])[0][0],i=e[0][1],a=e[1][1],t=e[2][0],o=e[2][1],u.push(sn([[t-_,o-_],[t-_,a+_],[n+_,a+_],[n+_,i-_]],30));return{type:"Polygon",coordinates:[(0,Je.Uf)(u)]}}(n),e=n.map((function(r){return r.map((function(r){return[[r[0][0]*M,r[0][1]*M],[r[1][0]*M,r[1][1]*M],[r[2][0]*M,r[2][1]*M]]}))})),t=e.map((function(e){return e.map((function(e){var n,i=r(e[0][0],e[0][1])[0],a=r(e[2][0],e[2][1])[0],t=r(e[1][0],e[0][1])[1],o=r(e[1][0],e[1][1])[1];return t>o&&(n=t,t=o,o=n),[[i,t],[a,o]]}))})),c):e.map((function(r){return r.map((function(r){return[[r[0][0]*b,r[0][1]*b],[r[1][0]*b,r[1][1]*b],[r[2][0]*b,r[2][1]*b]]}))}))},null!=e&&c.lobes(e),c}Qe.invert=function(r,e){return e>-Ye?tr.invert(r,e-Xe):mr.invert(r,e)},rn.invert=function(r,e){return a(e)>Ye?tr.invert(r,e+(e>0?Xe:-Xe)):mr.invert(r,e)};var mn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function pn(){return ln(dr,mn).scale(160.857)}var In=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function yn(){return ln(rn,In).scale(152.63)}var fn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function gn(){return ln(tr,fn).scale(169.529)}var _n=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function hn(){return ln(tr,_n).scale(169.529).rotate([20,0])}var vn=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function xn(){return ln(Qe,vn,rr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Pn=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Gn(){return ln(mr,Pn).scale(152.63).rotate([-20,0])}function Cn(r,e){return[3/A*r*F(v*v/3-e*e),e]}function Sn(){return(0,i.c)(Cn).scale(158.837)}function An(r){function e(e,n){if(a(a(n)-x)<_)return[0,n<0?-2:2];var i=f(n),t=p((1+i)/(1-i),r/2),o=.5*(t+1/t)+c(e*=r);return[2*f(e)/o,(t-1/t)/o]}return e.invert=function(e,n){var i=a(n);if(a(i-2)<_)return e?null:[0,y(n)*x];if(i>2)return null;var t=(e/=2)*e,c=(n/=2)*n,u=2*n/(1+t+c);return u=p((1+u)/(1-u),1/r),[o(2*e,1-t-c)/r,B((u-1)/(u+1))]},e}function bn(){var r=.5,e=(0,i.U)(An),n=e(r);return n.spacing=function(n){return arguments.length?e(r=+n):r},n.scale(124.75)}Cn.invert=function(r,e){return[A/3*r/F(v*v/3-e*e),e]};var Mn=v/C;function Bn(r,e){return[r*(1+F(c(e)))/2,e/(c(e/2)*c(r/6))]}function kn(){return(0,i.c)(Bn).scale(97.2672)}function Fn(r,e){var n=r*r,i=e*e;return[r*(.975534+i*(-.0143059*n-.119161+-.0547009*i)),e*(1.00384+n*(.0802894+-.02855*i+199025e-9*n)+i*(.0998909+-.0491032*i))]}function zn(){return(0,i.c)(Fn).scale(139.98)}function wn(r,e){return[f(r)/c(e),g(e)*c(r)]}function Rn(){return(0,i.c)(wn).scale(144.049).clipAngle(89.999)}function En(r){var e=c(r),n=g(P+r/2);function i(i,t){var o=t-r,c=a(o)<_?i*e:a(c=P+t/2)<_||a(a(c)-x)<_?0:i*o/s(g(c)/n);return[c,o]}return i.invert=function(i,t){var o,c=t+r;return[a(t)<_?i/e:a(o=P+c/2)<_||a(a(o)-x)<_?0:i*s(g(o)/n)/t,c]},i}function Nn(){return lr(En).parallel(40).scale(158.837)}function Tn(r,e){return[r,1.25*s(g(P+.4*e))]}function Dn(){return(0,i.c)(Tn).scale(108.318)}function Jn(r){var e=r.length-1;function n(n,i){for(var a,t=c(i),o=2/(1+t*c(n)),u=o*t*f(n),d=o*f(i),s=e,l=r[s],m=l[0],p=l[1];--s>=0;)m=(l=r[s])[0]+u*(a=m)-d*p,p=l[1]+u*p+d*a;return[m=u*(a=m)-d*p,p=u*p+d*a]}return n.invert=function(n,i){var u=20,d=n,s=i;do{for(var l,m=e,p=r[m],I=p[0],y=p[1],g=0,h=0;--m>=0;)g=I+d*(l=g)-s*h,h=y+d*h+s*l,I=(p=r[m])[0]+d*(l=I)-s*y,y=p[1]+d*y+s*l;var v,x,P=(g=I+d*(l=g)-s*h)*g+(h=y+d*h+s*l)*h;d-=v=((I=d*(l=I)-s*y-n)*g+(y=d*y+s*l-i)*h)/P,s-=x=(y*g-I*h)/P}while(a(v)+a(x)>_*_&&--u>0);if(u){var G=F(d*d+s*s),C=2*t(.5*G),S=f(C);return[o(d*S,G*c(C)),G?B(s*S/G):0]}},n}Bn.invert=function(r,e){var n=a(r),i=a(e),t=_,o=x;i_||a(h)>_)&&--t>0);return t&&[n,i]},wn.invert=function(r,e){var n=r*r,i=e*e+1,a=n+i,t=r?G*F((a-F(a*a-4*n))/n):1/F(i);return[B(r*t),y(e)*k(t)]},Tn.invert=function(r,e){return[r,2.5*t(u(.8*e))-.625*v]};var Un=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Hn=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ln=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],On=[[.9245,0],[0,0],[.01943,0]],Kn=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vn(){return Yn(Un,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function jn(){return Yn(Hn,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Wn(){return Yn(Ln,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Zn(){return Yn(On,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function qn(){return Yn(Kn,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Yn(r,e){var n=(0,i.c)(Jn(r)).rotate(e).clipAngle(90),a=(0,xr.c)(e),t=n.center;return delete n.rotate,n.center=function(r){return arguments.length?t(a(r)):a.invert(t())},n}var Xn=F(6),Qn=F(7);function $n(r,e){var n=B(7*f(e)/(3*Xn));return[Xn*r*(2*c(2*n/3)-1)/Qn,9*f(n/3)/Qn]}function ri(){return(0,i.c)($n).scale(164.859)}function ei(r,e){for(var n,i=(1+G)*f(e),t=e,o=0;o<25&&(t-=n=(f(t/2)+f(t)-i)/(.5*c(t/2)+c(t)),!(a(n)<_));o++);return[r*(1+2*c(t)/c(t/2))/(3*C),2*F(3)*f(t/2)/F(2+C)]}function ni(){return(0,i.c)(ei).scale(188.209)}function ii(r,e){for(var n,i=F(6/(4+v)),t=(1+v/4)*f(e),o=e/2,u=0;u<25&&(o-=n=(o/2+f(o)-t)/(.5+c(o)),!(a(n)<_));u++);return[i*(.5+c(o))*r/1.5,i*o]}function ai(){return(0,i.c)(ii).scale(166.518)}$n.invert=function(r,e){var n=3*B(e*Qn/9);return[r*Qn/(Xn*(2*c(2*n/3)-1)),B(3*f(n)*Xn/7)]},ei.invert=function(r,e){var n=e*F(2+C)/(2*F(3)),i=2*B(n);return[3*C*r/(1+2*c(i)/c(i/2)),B((n+f(i))/(1+G))]},ii.invert=function(r,e){var n=F(6/(4+v)),i=e/n;return a(a(i)-x)<_&&(i=i<0?-x:x),[1.5*r/(n*(.5+c(i))),B((i/2+f(i))/(1+v/4))]};var ti=n(47984);function oi(r,e){var n=e*e,i=n*n,a=n*i;return[r*(.84719-.13063*n+a*a*(.05494*n-.04515-.02326*i+.00331*a)),e*(1.01183+i*i*(.01926*n-.02625-.00396*i))]}function ci(){return(0,i.c)(oi).scale(175.295)}function ui(r,e){return[r*(1+c(e))/2,2*(e-g(e/2))]}function di(){return(0,i.c)(ui).scale(152.63)}oi.invert=function(r,e){var n,i,t,o,c=e,u=25;do{c-=n=(c*(1.01183+(t=(i=c*c)*i)*t*(.01926*i-.02625-.00396*t))-e)/(1.01183+t*t*(.21186*i-.23625+-.05148*t))}while(a(n)>h&&--u>0);return[r/(.84719-.13063*(i=c*c)+(o=i*(t=i*i))*o*(.05494*i-.04515-.02326*t+.00331*o)),c]},ui.invert=function(r,e){for(var n=e/2,i=0,t=1/0;i<10&&a(t)>_;++i){var o=c(e/2);e-=t=(e-g(e/2)-n)/(1-.5/(o*o))}return[2*r/(1+c(e)),e]};var si=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function li(){return ln(Y(1/0),si).rotate([20,0]).scale(152.63)}function mi(r,e){var n=f(e),i=c(e),t=y(r);if(0===r||a(e)===x)return[0,e];if(0===e)return[r,0];if(a(r)===x)return[r*i,x*n];var o=v/(2*r)-2*r/v,u=2*e/v,d=(1-u*u)/(n-u),s=o*o,l=d*d,m=1+s/l,p=1+l/s,I=(o*n/d-o/2)/m,g=(l*n/s+d/2)/p,_=g*g-(l*n*n/s+d*n-1)/p;return[x*(I+F(I*I+i*i/m)*t),x*(g+F(_<0?0:_)*y(-e*o)*t)]}function pi(){return(0,i.c)(mi).scale(127.267)}mi.invert=function(r,e){var n=(r/=x)*r,i=n+(e/=x)*e,a=v*v;return[r?(i-1+F((1-i)*(1-i)+4*n))/(2*r)*x:0,$((function(r){return i*(v*f(r)-2*r)*v+4*r*r*(e-f(r))+2*v*r-a*e}),0)]};var Ii=1.0148,yi=.23185,fi=-.14499,gi=.02406,_i=Ii,hi=5*yi,vi=7*fi,xi=9*gi,Pi=1.790857183;function Gi(r,e){var n=e*e;return[r,e*(Ii+n*n*(yi+n*(fi+gi*n)))]}function Ci(){return(0,i.c)(Gi).scale(139.319)}function Si(r,e){if(a(e)<_)return[r,0];var n=g(e),i=r*f(e);return[f(i)/n,e+(1-c(i))/n]}function Ai(){return(0,i.c)(Si).scale(103.74)}Gi.invert=function(r,e){e>Pi?e=Pi:e<-1.790857183&&(e=-1.790857183);var n,i=e;do{var t=i*i;i-=n=(i*(Ii+t*t*(yi+t*(fi+gi*t)))-e)/(_i+t*t*(hi+t*(vi+xi*t)))}while(a(n)>_);return[r,i]},Si.invert=function(r,e){if(a(e)<_)return[r,0];var n,i=r*r+e*e,t=.5*e,o=10;do{var u=g(t),d=1/c(t),s=i-2*e*t+t*t;t-=n=(u*s+2*(t-e))/(2+s*d*d+2*(t-e)*u)}while(a(n)>_&&--o>0);return u=g(t),[(a(e)=0;)if(i=e[c],n[0]===i[0]&&n[1]===i[1]){if(t)return[t,n];t=n}}}(e.face,n.face),a=Bi(i.map(n.project),i.map(e.project));e.transform=n.transform?ki(n.transform,a):a;for(var t=n.edges,o=0,c=t.length;o0?[-e[0],0]:[180-e[0],180])};var e=Ji.map((function(e){return{face:e,project:r(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(r,n){var i=e[r];i&&(i.children||(i.children=[])).push(e[n])})),wi(e[0],(function(r,n){return e[r<-v/2?n<0?6:4:r<0?n<0?2:0:ri^p>i&&n<(m-d)*(i-s)/(p-s)+d&&(a=!a)}return a}(r[0],n))return r.push(e),!0}))||r.push([e])})),ra=[],r.length?r.length>1?{type:"MultiPolygon",coordinates:r}:{type:"Polygon",coordinates:r[0]}:null}};function aa(r){var e=r(x,0)[0]-r(-x,0)[0];function n(n,i){var t=a(n)0?n-v:n+v,i),c=(o[0]-o[1])*G,u=(o[0]+o[1])*G;if(t)return[c,u];var d=e*G,s=c>0^u>0?-1:1;return[s*c-y(u)*d,s*u-y(c)*d]}return r.invert&&(n.invert=function(n,i){var t=(n+i)*G,o=(i-n)*G,c=a(t)<.5*e&&a(o)<.5*e;if(!c){var u=e*G,d=t>0^o>0?-1:1,s=-d*n+(o>0?1:-1)*u,l=-d*i+(t>0?1:-1)*u;t=(-s-l)*G,o=(s-l)*G}var m=r.invert(t,o);return c||(m[0]+=t>0?v:-v),m}),(0,i.c)(n).rotate([-90,-90,45]).clipAngle(179.999)}function ta(){return aa(Be).scale(176.423)}function oa(){return aa(we).scale(111.48)}function ca(r,e){if(!(0<=(e=+e)&&e<=20))throw new Error("invalid digits");function n(r){var n=r.length,i=2,a=new Array(n);for(a[0]=+r[0].toFixed(e),a[1]=+r[1].toFixed(e);i2||t[0]!=e[0]||t[1]!=e[1])&&(i.push(t),e=t)}return 1===i.length&&r.length>1&&i.push(n(r[r.length-1])),i}function t(r){return r.map(a)}function o(r){if(null==r)return r;var e;switch(r.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:r.geometries.map(o)};break;case"Point":e={type:"Point",coordinates:n(r.coordinates)};break;case"MultiPoint":e={type:r.type,coordinates:i(r.coordinates)};break;case"LineString":e={type:r.type,coordinates:a(r.coordinates)};break;case"MultiLineString":case"Polygon":e={type:r.type,coordinates:t(r.coordinates)};break;case"MultiPolygon":e={type:"MultiPolygon",coordinates:r.coordinates.map(t)};break;default:return r}return null!=r.bbox&&(e.bbox=r.bbox),e}function c(r){var e={type:"Feature",properties:r.properties,geometry:o(r.geometry)};return null!=r.id&&(e.id=r.id),null!=r.bbox&&(e.bbox=r.bbox),e}if(null!=r)switch(r.type){case"Feature":return c(r);case"FeatureCollection":var u={type:"FeatureCollection",features:r.features.map(c)};return null!=r.bbox&&(u.bbox=r.bbox),u;default:return o(r)}return r}function ua(r){var e=f(r);function n(n,i){var a=e?g(n*e/2)/e:n/2;if(!i)return[2*a,-r];var o=2*t(a*f(i)),u=1/g(i);return[f(o)*u,i+(1-c(o))*u-r]}return n.invert=function(n,i){if(a(i+=r)<_)return[e?2*t(e*n/2)/e:n,0];var o,u=n*n+i*i,d=0,s=10;do{var l=g(d),m=1/c(d),p=u-2*i*d+d*d;d-=o=(l*p+2*(d-i))/(2+p*m*m+2*(d-i)*l)}while(a(o)>_&&--s>0);var I=n*(l=g(d)),y=g(a(i)0?x:-x)*(l+o*(I-u)/2+o*o*(I-2*l+u)/2)]}function ma(){return(0,i.c)(la).scale(152.63)}function pa(r,e){var n=function(r){function e(e,n){var i=c(n),a=(r-1)/(r-i*c(e));return[a*i*f(e),a*f(n)]}return e.invert=function(e,n){var i=e*e+n*n,a=F(i),t=(r-F(1-i*(r+1)/(r-1)))/((r-1)/a+a/(r-1));return[o(e*t,a*F(1-t*t)),a?B(n*t/a):0]},e}(r);if(!e)return n;var i=c(e),a=f(e);function t(e,t){var o=n(e,t),c=o[1],u=c*a/(r-1)+i;return[o[0]*i/u,c/u]}return t.invert=function(e,t){var o=(r-1)/(r-1-t*a);return n.invert(o*e,o*t*i)},t}function Ia(){var r=2,e=0,n=(0,i.U)(pa),a=n(r,e);return a.distance=function(i){return arguments.length?n(r=+i,e):r},a.tilt=function(i){return arguments.length?n(r,e=i*M):e*b},a.scale(432.147).clipAngle(k(1/r)*b-1e-6)}sa.forEach((function(r){r[1]*=1.0144})),la.invert=function(r,e){var n=e/x,i=90*n,t=m(18,a(i/5)),o=l(0,d(t));do{var c=sa[o][1],u=sa[o+1][1],s=sa[m(19,o+2)][1],p=s-c,I=s-2*u+c,y=2*(a(n)-u)/p,f=I/p,g=y*(1-f*y*(1-2*f*y));if(g>=0||1===o){i=(e>=0?5:-5)*(g+t);var _,v=50;do{g=(t=m(18,a(i)/5))-(o=d(t)),c=sa[o][1],u=sa[o+1][1],s=sa[m(19,o+2)][1],i-=(_=(e>=0?x:-x)*(u+g*(s-c)/2+g*g*(s-2*u+c)/2)-e)*b}while(a(_)>h&&--v>0);break}}while(--o>=0);var P=sa[o][0],G=sa[o+1][0],C=sa[m(19,o+2)][0];return[r/(G+g*(C-P)/2+g*g*(C-2*G+P)/2),i*M]};var ya=1e-4,fa=1e4,ga=-180,_a=ga+ya,ha=180,va=ha-ya,xa=-90,Pa=xa+ya,Ga=90,Ca=Ga-ya;function Sa(r){return r.length>0}function Aa(r){return r===xa||r===Ga?[0,r]:[ga,(e=r,Math.floor(e*fa)/fa)];var e}function ba(r){var e=r[0],n=r[1],i=!1;return e<=_a?(e=ga,i=!0):e>=va&&(e=ha,i=!0),n<=Pa?(n=xa,i=!0):n>=Ca&&(n=Ga,i=!0),i?[e,n]:r}function Ma(r){return r.map(ba)}function Ba(r,e,n){for(var i=0,a=r.length;i=va||s<=Pa||s>=Ca){t[o]=ba(u);for(var l=o+1;l_a&&pPa&&I=c)break;n.push({index:-1,polygon:e,ring:t=t.slice(l-1)}),t[0]=Aa(t[0][1]),o=-1,c=t.length}}}}function ka(r){var e,n,i,a,t,o,c=r.length,u={},d={};for(e=0;e0?v-u:u)*b],s=(0,i.c)(r(c)).rotate(d),l=(0,xr.c)(d),m=s.center;return delete s.rotate,s.center=function(r){return arguments.length?m(l(r)):l.invert(m())},s.clipAngle(90)}function Ta(r){var e=c(r);function n(r,n){var i=(0,Ti.Y)(r,n);return i[0]*=e,i}return n.invert=function(r,n){return Ti.Y.invert(r/e,n)},n}function Da(){return Ja([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Ja(r,e){return Na(Ta,r,e)}function Ua(r){if(!(r*=2))return j.O;var e=-r/2,n=-e,i=r*r,a=g(n),t=.5/f(n);function u(a,t){var o=k(c(t)*c(a-e)),u=k(c(t)*c(a-n));return[((o*=o)-(u*=u))/(2*r),(t<0?-1:1)*F(4*i*u-(i-o+u)*(i-o+u))/(2*r)]}return u.invert=function(r,i){var u,d,s=i*i,l=c(F(s+(u=r+e)*u)),m=c(F(s+(u=r+n)*u));return[o(d=l-m,u=(l+m)*a),(i<0?-1:1)*k(F(u*u+d*d)*t)]},u}function Ha(){return La([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function La(r,e){return Na(Ua,r,e)}function Oa(r,e){if(a(e)<_)return[r,0];var n=a(e/x),i=B(n);if(a(r)<_||a(a(e)-x)<_)return[0,y(e)*v*g(i/2)];var t=c(i),o=a(v/r-r/v)/2,u=o*o,d=t/(n+t-1),s=d*(2/n-1),l=s*s,m=l+u,p=d-l,I=u+d;return[y(r)*v*(o*p+F(u*p*p-m*(d*d-l)))/m,y(e)*v*(s*I-o*F((u+1)*m-I*I))/m]}function Ka(){return(0,i.c)(Oa).scale(79.4183)}function Va(r,e){if(a(e)<_)return[r,0];var n=a(e/x),i=B(n);if(a(r)<_||a(a(e)-x)<_)return[0,y(e)*v*g(i/2)];var t=c(i),o=a(v/r-r/v)/2,u=o*o,d=t*(F(1+u)-o*t)/(1+u*n*n);return[y(r)*v*d,y(e)*v*F(1-d*(2*o+d))]}function ja(){return(0,i.c)(Va).scale(79.4183)}function Wa(r,e){if(a(e)<_)return[r,0];var n=e/x,i=B(n);if(a(r)<_||a(a(e)-x)<_)return[0,v*g(i/2)];var t=(v/r-r/v)/2,o=n/(1+c(i));return[v*(y(r)*F(t*t+1-o*o)-t),v*o]}function Za(){return(0,i.c)(Wa).scale(79.4183)}function qa(r,e){if(!e)return[r,0];var n=a(e);if(!r||n===x)return[0,e];var i=n/x,t=i*i,o=(8*i-t*(t+2)-5)/(2*t*(i-1)),c=o*o,u=i*o,d=t+c+2*u,s=i+3*o,l=r/x,m=l+1/l,p=y(a(r)-x)*F(m*m-4),I=p*p,f=(p*(d+c-1)+2*F(d*(t+c*I-1)+(1-t)*(t*(s*s+4*c)+12*u*c+4*c*c)))/(4*d+I);return[y(r)*x*f,y(e)*x*F(1+p*a(f)-f*f)]}function Ya(){return(0,i.c)(qa).scale(127.16)}function Xa(r,e,n,i){var a=v/3;r=l(r,_),e=l(e,_),r=m(r,x),e=m(e,v-_),n=l(n,0),n=m(n,100-_);var t=(i=l(i,_))/100,u=k((n/100+1)*c(a))/a,d=f(r)/f(u*x),s=e/v,p=F(t*f(r/2)/f(e/2));return function(r,e,n,i,a){function t(t,o){var u=n*f(i*o),d=F(1-u*u),s=F(2/(1+d*c(t*=a)));return[r*d*s*f(t),e*u*s]}return t.invert=function(t,c){var u=t/r,d=c/e,s=F(u*u+d*d),l=2*B(s/2);return[o(t*g(l),r*s)/a,s&&B(c*f(l)/(e*n*s))/i]},t}(p/F(s*d*u),1/(p*F(s*d*u)),d,u,s)}function Qa(){var r=65*M,e=60*M,n=20,a=200,t=(0,i.U)(Xa),o=t(r,e,n,a);return o.poleline=function(i){return arguments.length?t(r=+i*M,e,n,a):r*b},o.parallels=function(i){return arguments.length?t(r,e=+i*M,n,a):e*b},o.inflation=function(i){return arguments.length?t(r,e,n=+i,a):n},o.ratio=function(i){return arguments.length?t(r,e,n,a=+i):a},o.scale(163.775)}function $a(){return Qa().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}Ra.invert=function(r,e){var n=e/1.70711,i=f(P*n);return[r/(.74482-.34588*i*i),2*t(n)]},Oa.invert=function(r,e){if(a(e)<_)return[r,0];if(a(r)<_)return[0,x*f(2*t(e/v))];var n=(r/=v)*r,i=(e/=v)*e,o=n+i,u=o*o,d=-a(e)*(1+o),s=d-2*i+n,l=-2*d+1+2*i+u,m=i/l+(2*s*s*s/(l*l*l)-9*d*s/(l*l))/27,p=(d-s*s/(3*l))/l,I=2*F(-p/3),g=k(3*m/(p*I))/3;return[v*(o-1+F(1+2*(n-i)+u))/(2*r),y(e)*v*(-I*c(g+v/3)-s/(3*l))]},Va.invert=function(r,e){if(!r)return[0,x*f(2*t(e/v))];var n=a(r/v),i=(1-n*n-(e/=v)*e)/(2*n),c=F(i*i+1);return[y(r)*v*(c-i),y(e)*x*f(2*o(F((1-2*i*n)*(i+c)-n),F(c+i+n)))]},Wa.invert=function(r,e){if(!e)return[r,0];var n=e/v,i=(v*v*(1-n*n)-r*r)/(2*v*r);return[r?v*(y(r)*F(i*i+1)-i):0,x*f(2*t(n))]},qa.invert=function(r,e){var n;if(!r||!e)return[r,e];e/=v;var i=y(r)*r/x,t=(i*i-1+4*e*e)/a(i),o=t*t,c=2*e,u=50;do{var d=c*c,s=(8*c-d*(d+2)-5)/(2*d*(c-1)),l=(3*c-d*c-10)/(2*d*c),m=s*s,p=c*s,I=c+s,f=I*I,g=c+3*s,h=-2*I*(4*p*m+(1-4*d+3*d*d)*(1+l)+m*(14*d-6-o+(8*d-8-2*o)*l)+p*(12*d-8+(10*d-10-o)*l)),P=F(f*(d+m*o-1)+(1-d)*(d*(g*g+4*m)+m*(12*p+4*m)));c-=n=(t*(f+m-1)+2*P-i*(4*f+o))/(t*(2*s*l+2*I*(1+l))+h/P-8*I*(t*(-1+m+f)+2*P)*(1+l)/(o+4*f))}while(n>_&&--u>0);return[y(r)*(F(t*t+4)+t)*v/4,x*c]};var rt=4*v+3*F(3),et=2*F(2*v*F(3)/rt),nt=ar(et*F(3)/v,et,rt/6);function it(){return(0,i.c)(nt).scale(176.84)}function at(r,e){return[r*F(1-3*e*e/(v*v)),e]}function tt(){return(0,i.c)(at).scale(152.63)}function ot(r,e){var n=c(e),i=c(r)*n,a=1-i,t=c(r=o(f(r)*n,-f(e))),u=f(r);return[u*(n=F(1-i*i))-t*a,-t*n-u*a]}function ct(){return(0,i.c)(ot).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function ut(r,e){var n=N(r,e);return[(n[0]+r/x)/2,(n[1]+e)/2]}function dt(){return(0,i.c)(ut).scale(158.837)}at.invert=function(r,e){return[r/F(1-3*e*e/(v*v)),e]},ot.invert=function(r,e){var n=(r*r+e*e)/-2,i=F(-n*(2+n)),a=e*n+r*i,t=r*n-e*i,c=F(t*t+a*a);return[o(i*a,c*(1+n)),c?-B(i*t/c):0]},ut.invert=function(r,e){var n=r,i=e,t=25;do{var o,u=c(i),d=f(i),s=f(2*i),l=d*d,m=u*u,p=f(n),I=c(n/2),y=f(n/2),g=y*y,h=1-m*I*I,v=h?k(u*I)*F(o=1/h):o=0,P=.5*(2*v*u*y+n/x)-r,G=.5*(v*d+i)-e,C=.5*o*(m*g+v*u*I*l)+.5/x,S=o*(p*s/4-v*d*y),A=.125*o*(s*y-v*d*m*p),b=.5*o*(l*I+v*g*u)+.5,M=S*A-b*C,B=(G*S-P*b)/M,z=(P*A-G*C)/M;n-=B,i-=z}while((a(B)>_||a(z)>_)&&--t>0);return[n,i]}},88728:function(r,e,n){"use strict";function i(){return new a}function a(){this.reset()}n.d(e,{c:function(){return i}}),a.prototype={constructor:a,reset:function(){this.s=this.t=0},add:function(r){o(t,r,this.t),o(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new a;function o(r,e,n){var i=r.s=e+n,a=i-e,t=i-a;r.t=e-t+(n-a)}},95384:function(r,e,n){"use strict";n.d(e,{cp:function(){return h},mQ:function(){return m},oB:function(){return I}});var i,a,t,o,c,u=n(88728),d=n(64528),s=n(70932),l=n(16016),m=(0,u.c)(),p=(0,u.c)(),I={point:s.c,lineStart:s.c,lineEnd:s.c,polygonStart:function(){m.reset(),I.lineStart=y,I.lineEnd=f},polygonEnd:function(){var r=+m;p.add(r<0?d.kD+r:r),this.lineStart=this.lineEnd=this.point=s.c},sphere:function(){p.add(d.kD)}};function y(){I.point=g}function f(){_(i,a)}function g(r,e){I.point=_,i=r,a=e,r*=d.qw,e*=d.qw,t=r,o=(0,d.W8)(e=e/2+d.wL),c=(0,d.g$)(e)}function _(r,e){r*=d.qw,e=(e*=d.qw)/2+d.wL;var n=r-t,i=n>=0?1:-1,a=i*n,u=(0,d.W8)(e),s=(0,d.g$)(e),l=c*s,p=o*u+l*(0,d.W8)(a),I=l*i*(0,d.g$)(a);m.add((0,d.WE)(I,p)),t=r,o=u,c=s}function h(r){return p.reset(),(0,l.c)(r,I),2*p}},13696:function(r,e,n){"use strict";n.d(e,{c:function(){return k}});var i,a,t,o,c,u,d,s,l,m,p=n(88728),I=n(95384),y=n(84220),f=n(64528),g=n(16016),_=(0,p.c)(),h={point:v,lineStart:P,lineEnd:G,polygonStart:function(){h.point=C,h.lineStart=S,h.lineEnd=A,_.reset(),I.oB.polygonStart()},polygonEnd:function(){I.oB.polygonEnd(),h.point=v,h.lineStart=P,h.lineEnd=G,I.mQ<0?(i=-(t=180),a=-(o=90)):_>f.Gg?o=90:_<-f.Gg&&(a=-90),m[0]=i,m[1]=t},sphere:function(){i=-(t=180),a=-(o=90)}};function v(r,e){l.push(m=[i=r,t=r]),eo&&(o=e)}function x(r,e){var n=(0,y.ux)([r*f.qw,e*f.qw]);if(s){var u=(0,y.CW)(s,n),d=[u[1],-u[0],0],p=(0,y.CW)(d,u);(0,y.cJ)(p),p=(0,y.G)(p);var I,g=r-c,_=g>0?1:-1,h=p[0]*f.oh*_,v=(0,f.a2)(g)>180;v^(_*co&&(o=I):v^(_*c<(h=(h+360)%360-180)&&h<_*r)?(I=-p[1]*f.oh)o&&(o=e)),v?rb(i,t)&&(t=r):b(r,t)>b(i,t)&&(i=r):t>=i?(rt&&(t=r)):r>c?b(i,r)>b(i,t)&&(t=r):b(r,t)>b(i,t)&&(i=r)}else l.push(m=[i=r,t=r]);eo&&(o=e),s=n,c=r}function P(){h.point=x}function G(){m[0]=i,m[1]=t,h.point=v,s=null}function C(r,e){if(s){var n=r-c;_.add((0,f.a2)(n)>180?n+(n>0?360:-360):n)}else u=r,d=e;I.oB.point(r,e),x(r,e)}function S(){I.oB.lineStart()}function A(){C(u,d),I.oB.lineEnd(),(0,f.a2)(_)>f.Gg&&(i=-(t=180)),m[0]=i,m[1]=t,s=null}function b(r,e){return(e-=r)<0?e+360:e}function M(r,e){return r[0]-e[0]}function B(r,e){return r[0]<=r[1]?r[0]<=e&&e<=r[1]:eb(c[0],c[1])&&(c[1]=u[1]),b(u[0],c[1])>b(c[0],c[1])&&(c[0]=u[0])):d.push(c=u);for(s=-1/0,e=0,c=d[n=d.length-1];e<=n;c=u,++e)u=d[e],(p=b(c[1],u[0]))>s&&(s=p,i=u[0],t=c[1])}return l=m=null,i===1/0||a===1/0?[[NaN,NaN],[NaN,NaN]]:[[i,a],[t,o]]}},84220:function(r,e,n){"use strict";n.d(e,{CW:function(){return c},Ez:function(){return o},G:function(){return a},cJ:function(){return s},mg:function(){return u},ux:function(){return t},wx:function(){return d}});var i=n(64528);function a(r){return[(0,i.WE)(r[1],r[0]),(0,i.qR)(r[2])]}function t(r){var e=r[0],n=r[1],a=(0,i.W8)(n);return[a*(0,i.W8)(e),a*(0,i.g$)(e),(0,i.g$)(n)]}function o(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function c(r,e){return[r[1]*e[2]-r[2]*e[1],r[2]*e[0]-r[0]*e[2],r[0]*e[1]-r[1]*e[0]]}function u(r,e){r[0]+=e[0],r[1]+=e[1],r[2]+=e[2]}function d(r,e){return[r[0]*e,r[1]*e,r[2]*e]}function s(r){var e=(0,i._I)(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=e,r[1]/=e,r[2]/=e}},24052:function(r,e,n){"use strict";n.d(e,{c:function(){return w}});var i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h=n(64528),v=n(70932),x=n(16016),P={sphere:v.c,point:G,lineStart:S,lineEnd:M,polygonStart:function(){P.lineStart=B,P.lineEnd=k},polygonEnd:function(){P.lineStart=S,P.lineEnd=M}};function G(r,e){r*=h.qw,e*=h.qw;var n=(0,h.W8)(e);C(n*(0,h.W8)(r),n*(0,h.g$)(r),(0,h.g$)(e))}function C(r,e,n){++i,t+=(r-t)/i,o+=(e-o)/i,c+=(n-c)/i}function S(){P.point=A}function A(r,e){r*=h.qw,e*=h.qw;var n=(0,h.W8)(e);f=n*(0,h.W8)(r),g=n*(0,h.g$)(r),_=(0,h.g$)(e),P.point=b,C(f,g,_)}function b(r,e){r*=h.qw,e*=h.qw;var n=(0,h.W8)(e),i=n*(0,h.W8)(r),t=n*(0,h.g$)(r),o=(0,h.g$)(e),c=(0,h.WE)((0,h._I)((c=g*o-_*t)*c+(c=_*i-f*o)*c+(c=f*t-g*i)*c),f*i+g*t+_*o);a+=c,u+=c*(f+(f=i)),d+=c*(g+(g=t)),s+=c*(_+(_=o)),C(f,g,_)}function M(){P.point=G}function B(){P.point=F}function k(){z(I,y),P.point=G}function F(r,e){I=r,y=e,r*=h.qw,e*=h.qw,P.point=z;var n=(0,h.W8)(e);f=n*(0,h.W8)(r),g=n*(0,h.g$)(r),_=(0,h.g$)(e),C(f,g,_)}function z(r,e){r*=h.qw,e*=h.qw;var n=(0,h.W8)(e),i=n*(0,h.W8)(r),t=n*(0,h.g$)(r),o=(0,h.g$)(e),c=g*o-_*t,I=_*i-f*o,y=f*t-g*i,v=(0,h._I)(c*c+I*I+y*y),x=(0,h.qR)(v),P=v&&-x/v;l+=P*c,m+=P*I,p+=P*y,a+=x,u+=x*(f+(f=i)),d+=x*(g+(g=t)),s+=x*(_+(_=o)),C(f,g,_)}function w(r){i=a=t=o=c=u=d=s=l=m=p=0,(0,x.c)(r,P);var e=l,n=m,I=p,y=e*e+n*n+I*I;return y0?oc)&&(o+=a*t.kD));for(var m,p=o;a>0?p>c:p0?a.pi:-a.pi,d=(0,a.a2)(o-n);(0,a.a2)(d-a.pi)0?a.or:-a.or),r.point(t,i),r.lineEnd(),r.lineStart(),r.point(u,i),r.point(o,i),e=0):t!==u&&d>=a.pi&&((0,a.a2)(n-t)a.Gg?(0,a.MQ)(((0,a.g$)(e)*(o=(0,a.W8)(i))*(0,a.g$)(n)-(0,a.g$)(i)*(t=(0,a.W8)(e))*(0,a.g$)(r))/(t*o*c)):(e+i)/2}(n,i,o,c),r.point(t,i),r.lineEnd(),r.lineStart(),r.point(u,i),e=0),r.point(n=o,i=c),t=u},lineEnd:function(){r.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(r,e,n,i){var t;if(null==r)t=n*a.or,i.point(-a.pi,t),i.point(0,t),i.point(a.pi,t),i.point(a.pi,0),i.point(a.pi,-t),i.point(0,-t),i.point(-a.pi,-t),i.point(-a.pi,0),i.point(-a.pi,t);else if((0,a.a2)(r[0]-e[0])>a.Gg){var o=r[0]1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],r=null,n}}}},2728:function(r,e,n){"use strict";n.d(e,{c:function(){return u}});var i=n(84220),a=n(61780),t=n(64528),o=n(41860),c=n(14229);function u(r){var e=(0,t.W8)(r),n=6*t.qw,u=e>0,d=(0,t.a2)(e)>t.Gg;function s(r,n){return(0,t.W8)(r)*(0,t.W8)(n)>e}function l(r,n,a){var o=(0,i.ux)(r),c=(0,i.ux)(n),u=[1,0,0],d=(0,i.CW)(o,c),s=(0,i.Ez)(d,d),l=d[0],m=s-l*l;if(!m)return!a&&r;var p=e*s/m,I=-e*l/m,y=(0,i.CW)(u,d),f=(0,i.wx)(u,p),g=(0,i.wx)(d,I);(0,i.mg)(f,g);var _=y,h=(0,i.Ez)(f,_),v=(0,i.Ez)(_,_),x=h*h-v*((0,i.Ez)(f,f)-1);if(!(x<0)){var P=(0,t._I)(x),G=(0,i.wx)(_,(-h-P)/v);if((0,i.mg)(G,f),G=(0,i.G)(G),!a)return G;var C,S=r[0],A=n[0],b=r[1],M=n[1];A0^G[1]<((0,t.a2)(G[0]-S)t.pi^(S<=G[0]&&G[0]<=A)){var F=(0,i.wx)(_,(-h+P)/v);return(0,i.mg)(F,f),[G,(0,i.G)(F)]}}}function m(e,n){var i=u?r:t.pi-r,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return(0,c.c)(s,(function(r){var e,n,i,a,c;return{lineStart:function(){a=i=!1,c=1},point:function(p,I){var y,f=[p,I],g=s(p,I),_=u?g?0:m(p,I):g?m(p+(p<0?t.pi:-t.pi),I):0;if(!e&&(a=i=g)&&r.lineStart(),g!==i&&(!(y=l(e,f))||(0,o.c)(e,y)||(0,o.c)(f,y))&&(f[2]=1),g!==i)c=0,g?(r.lineStart(),y=l(f,e),r.point(y[0],y[1])):(y=l(e,f),r.point(y[0],y[1],2),r.lineEnd()),e=y;else if(d&&e&&u^g){var h;_&n||!(h=l(f,e,!0))||(c=0,u?(r.lineStart(),r.point(h[0][0],h[0][1]),r.point(h[1][0],h[1][1]),r.lineEnd()):(r.point(h[1][0],h[1][1]),r.lineEnd(),r.lineStart(),r.point(h[0][0],h[0][1],3)))}!g||e&&(0,o.c)(e,f)||r.point(f[0],f[1]),e=f,i=g,n=_},lineEnd:function(){i&&r.lineEnd(),e=null},clean:function(){return c|(a&&i)<<1}}}),(function(e,i,t,o){(0,a.Q)(o,r,n,t,e,i)}),u?[0,-r]:[-t.pi,r-t.pi])}},14229:function(r,e,n){"use strict";n.d(e,{c:function(){return u}});var i=n(97208),a=n(32232),t=n(64528),o=n(58196),c=n(84706);function u(r,e,n,t){return function(u){var l,m,p,I=e(u),y=(0,i.c)(),f=e(y),g=!1,_={point:h,lineStart:x,lineEnd:P,polygonStart:function(){_.point=G,_.lineStart=C,_.lineEnd=S,m=[],l=[]},polygonEnd:function(){_.point=h,_.lineStart=x,_.lineEnd=P,m=(0,c.Uf)(m);var r=(0,o.c)(l,t);m.length?(g||(u.polygonStart(),g=!0),(0,a.c)(m,s,r,n,u)):r&&(g||(u.polygonStart(),g=!0),u.lineStart(),n(null,null,1,u),u.lineEnd()),g&&(u.polygonEnd(),g=!1),m=l=null},sphere:function(){u.polygonStart(),u.lineStart(),n(null,null,1,u),u.lineEnd(),u.polygonEnd()}};function h(e,n){r(e,n)&&u.point(e,n)}function v(r,e){I.point(r,e)}function x(){_.point=v,I.lineStart()}function P(){_.point=h,I.lineEnd()}function G(r,e){p.push([r,e]),f.point(r,e)}function C(){f.lineStart(),p=[]}function S(){G(p[0][0],p[0][1]),f.lineEnd();var r,e,n,i,a=f.clean(),t=y.result(),o=t.length;if(p.pop(),l.push(p),p=null,o)if(1&a){if((e=(n=t[0]).length-1)>0){for(g||(u.polygonStart(),g=!0),u.lineStart(),r=0;r1&&2&a&&t.push(t.pop().concat(t.shift())),m.push(t.filter(d))}return _}}function d(r){return r.length>1}function s(r,e){return((r=r.x)[0]<0?r[1]-t.or-t.Gg:t.or-r[1])-((e=e.x)[0]<0?e[1]-t.or-t.Gg:t.or-e[1])}},21676:function(r,e,n){"use strict";n.d(e,{c:function(){return d}});var i=n(64528),a=n(97208),t=n(32232),o=n(84706),c=1e9,u=-c;function d(r,e,n,d){function s(i,a){return r<=i&&i<=n&&e<=a&&a<=d}function l(i,a,t,o){var c=0,u=0;if(null==i||(c=m(i,t))!==(u=m(a,t))||I(i,a)<0^t>0)do{o.point(0===c||3===c?r:n,c>1?d:e)}while((c=(c+t+4)%4)!==u);else o.point(a[0],a[1])}function m(a,t){return(0,i.a2)(a[0]-r)0?0:3:(0,i.a2)(a[0]-n)0?2:1:(0,i.a2)(a[1]-e)0?1:0:t>0?3:2}function p(r,e){return I(r.x,e.x)}function I(r,e){var n=m(r,1),i=m(e,1);return n!==i?n-i:0===n?e[1]-r[1]:1===n?r[0]-e[0]:2===n?r[1]-e[1]:e[0]-r[0]}return function(i){var m,I,y,f,g,_,h,v,x,P,G,C=i,S=(0,a.c)(),A={point:b,lineStart:function(){A.point=M,I&&I.push(y=[]),P=!0,x=!1,h=v=NaN},lineEnd:function(){m&&(M(f,g),_&&x&&S.rejoin(),m.push(S.result())),A.point=b,x&&C.lineEnd()},polygonStart:function(){C=S,m=[],I=[],G=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=I.length;nd&&(l-a)*(d-t)>(m-t)*(r-a)&&++e:m<=d&&(l-a)*(d-t)<(m-t)*(r-a)&&--e;return e}(),n=G&&e,a=(m=(0,o.Uf)(m)).length;(n||a)&&(i.polygonStart(),n&&(i.lineStart(),l(null,null,1,i),i.lineEnd()),a&&(0,t.c)(m,p,e,l,i),i.polygonEnd()),C=i,m=I=y=null}};function b(r,e){s(r,e)&&C.point(r,e)}function M(i,a){var t=s(i,a);if(I&&y.push([i,a]),P)f=i,g=a,_=t,P=!1,t&&(C.lineStart(),C.point(i,a));else if(t&&x)C.point(i,a);else{var o=[h=Math.max(u,Math.min(c,h)),v=Math.max(u,Math.min(c,v))],l=[i=Math.max(u,Math.min(c,i)),a=Math.max(u,Math.min(c,a))];!function(r,e,n,i,a,t){var o,c=r[0],u=r[1],d=0,s=1,l=e[0]-c,m=e[1]-u;if(o=n-c,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>d&&(d=o)}if(o=a-c,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>d&&(d=o)}else if(l>0){if(o0)){if(o/=m,m<0){if(o0){if(o>s)return;o>d&&(d=o)}if(o=t-u,m||!(o<0)){if(o/=m,m<0){if(o>s)return;o>d&&(d=o)}else if(m>0){if(o0&&(r[0]=c+d*l,r[1]=u+d*m),s<1&&(e[0]=c+s*l,e[1]=u+s*m),!0}}}}}(o,l,r,e,n,d)?t&&(C.lineStart(),C.point(i,a),G=!1):(x||(C.lineStart(),C.point(o[0],o[1])),C.point(l[0],l[1]),t||C.lineEnd(),G=!1)}h=i,v=a,x=t}return A}}},32232:function(r,e,n){"use strict";n.d(e,{c:function(){return o}});var i=n(41860),a=n(64528);function t(r,e,n,i){this.x=r,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function o(r,e,n,o,u){var d,s,l=[],m=[];if(r.forEach((function(r){if(!((e=r.length-1)<=0)){var e,n,o=r[0],c=r[e];if((0,i.c)(o,c)){if(!o[2]&&!c[2]){for(u.lineStart(),d=0;d=0;--d)u.point((I=p[d])[0],I[1]);else o(f.x,f.p.x,-1,u);f=f.p}p=(f=f.o).z,g=!g}while(!f.v);u.lineEnd()}}}function c(r){if(e=r.length){for(var e,n,i=0,a=r[0];++i0&&(a=b(r[t],r[t-1]))>0&&n<=a&&i<=a&&(n+i-a)*(1-Math.pow((n-i)/a,2))f.Gg})).map(u)).concat((0,T.ik)((0,f.Km)(t/p)*p,a,p).filter((function(r){return(0,f.a2)(r%y)>f.Gg})).map(d))}return _.lines=function(){return h().map((function(r){return{type:"LineString",coordinates:r}}))},_.outline=function(){return{type:"Polygon",coordinates:[s(i).concat(l(o).slice(1),s(n).reverse().slice(1),l(c).reverse().slice(1))]}},_.extent=function(r){return arguments.length?_.extentMajor(r).extentMinor(r):_.extentMinor()},_.extentMajor=function(r){return arguments.length?(i=+r[0][0],n=+r[1][0],c=+r[0][1],o=+r[1][1],i>n&&(r=i,i=n,n=r),c>o&&(r=c,c=o,o=r),_.precision(g)):[[i,c],[n,o]]},_.extentMinor=function(n){return arguments.length?(e=+n[0][0],r=+n[1][0],t=+n[0][1],a=+n[1][1],e>r&&(n=e,e=r,r=n),t>a&&(n=t,t=a,a=n),_.precision(g)):[[e,t],[r,a]]},_.step=function(r){return arguments.length?_.stepMajor(r).stepMinor(r):_.stepMinor()},_.stepMajor=function(r){return arguments.length?(I=+r[0],y=+r[1],_):[I,y]},_.stepMinor=function(r){return arguments.length?(m=+r[0],p=+r[1],_):[m,p]},_.precision=function(m){return arguments.length?(g=+m,u=D(t,a,90),d=J(e,r,g),s=D(c,o,90),l=J(i,n,g),_):g},_.extentMajor([[-180,-90+f.Gg],[180,90-f.Gg]]).extentMinor([[-180,-80-f.Gg],[180,80+f.Gg]])}function H(){return U()()}var L,O,K,V,j=n(27284),W=n(7376),Z=(0,y.c)(),q=(0,y.c)(),Y={point:g.c,lineStart:g.c,lineEnd:g.c,polygonStart:function(){Y.lineStart=X,Y.lineEnd=rr},polygonEnd:function(){Y.lineStart=Y.lineEnd=Y.point=g.c,Z.add((0,f.a2)(q)),q.reset()},result:function(){var r=Z/2;return Z.reset(),r}};function X(){Y.point=Q}function Q(r,e){Y.point=$,L=K=r,O=V=e}function $(r,e){q.add(V*r-K*e),K=r,V=e}function rr(){$(L,O)}var er,nr,ir,ar,tr=Y,or=n(73784),cr=0,ur=0,dr=0,sr=0,lr=0,mr=0,pr=0,Ir=0,yr=0,fr={point:gr,lineStart:_r,lineEnd:xr,polygonStart:function(){fr.lineStart=Pr,fr.lineEnd=Gr},polygonEnd:function(){fr.point=gr,fr.lineStart=_r,fr.lineEnd=xr},result:function(){var r=yr?[pr/yr,Ir/yr]:mr?[sr/mr,lr/mr]:dr?[cr/dr,ur/dr]:[NaN,NaN];return cr=ur=dr=sr=lr=mr=pr=Ir=yr=0,r}};function gr(r,e){cr+=r,ur+=e,++dr}function _r(){fr.point=hr}function hr(r,e){fr.point=vr,gr(ir=r,ar=e)}function vr(r,e){var n=r-ir,i=e-ar,a=(0,f._I)(n*n+i*i);sr+=a*(ir+r)/2,lr+=a*(ar+e)/2,mr+=a,gr(ir=r,ar=e)}function xr(){fr.point=gr}function Pr(){fr.point=Cr}function Gr(){Sr(er,nr)}function Cr(r,e){fr.point=Sr,gr(er=ir=r,nr=ar=e)}function Sr(r,e){var n=r-ir,i=e-ar,a=(0,f._I)(n*n+i*i);sr+=a*(ir+r)/2,lr+=a*(ar+e)/2,mr+=a,pr+=(a=ar*r-ir*e)*(ir+r),Ir+=a*(ar+e),yr+=3*a,gr(ir=r,ar=e)}var Ar=fr;function br(r){this._context=r}br.prototype={_radius:4.5,pointRadius:function(r){return this._radius=r,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(r,e){switch(this._point){case 0:this._context.moveTo(r,e),this._point=1;break;case 1:this._context.lineTo(r,e);break;default:this._context.moveTo(r+this._radius,e),this._context.arc(r,e,this._radius,0,f.kD)}},result:g.c};var Mr,Br,kr,Fr,zr,wr=(0,y.c)(),Rr={point:g.c,lineStart:function(){Rr.point=Er},lineEnd:function(){Mr&&Nr(Br,kr),Rr.point=g.c},polygonStart:function(){Mr=!0},polygonEnd:function(){Mr=null},result:function(){var r=+wr;return wr.reset(),r}};function Er(r,e){Rr.point=Nr,Br=Fr=r,kr=zr=e}function Nr(r,e){Fr-=r,zr-=e,wr.add((0,f._I)(Fr*Fr+zr*zr)),Fr=r,zr=e}var Tr=Rr;function Dr(){this._string=[]}function Jr(r){return"m0,"+r+"a"+r+","+r+" 0 1,1 0,"+-2*r+"a"+r+","+r+" 0 1,1 0,"+2*r+"z"}function Ur(r,e){var n,i,a=4.5;function t(r){return r&&("function"===typeof a&&i.pointRadius(+a.apply(this,arguments)),(0,_.c)(r,n(i))),i.result()}return t.area=function(r){return(0,_.c)(r,n(tr)),tr.result()},t.measure=function(r){return(0,_.c)(r,n(Tr)),Tr.result()},t.bounds=function(r){return(0,_.c)(r,n(or.c)),or.c.result()},t.centroid=function(r){return(0,_.c)(r,n(Ar)),Ar.result()},t.projection=function(e){return arguments.length?(n=null==e?(r=null,W.c):(r=e).stream,t):r},t.context=function(r){return arguments.length?(i=null==r?(e=null,new Dr):new br(e=r),"function"!==typeof a&&i.pointRadius(a),t):e},t.pointRadius=function(r){return arguments.length?(a="function"===typeof r?r:(i.pointRadius(+r),+r),t):a},t.projection(r).context(e)}Dr.prototype={_radius:4.5,_circle:Jr(4.5),pointRadius:function(r){return(r=+r)!==this._radius&&(this._radius=r,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(r,e){switch(this._point){case 0:this._string.push("M",r,",",e),this._point=1;break;case 1:this._string.push("L",r,",",e);break;default:null==this._circle&&(this._circle=Jr(this._radius)),this._string.push("M",r,",",e,this._circle)}},result:function(){if(this._string.length){var r=this._string.join("");return this._string=[],r}return null}};var Hr=n(87952);function Lr(r){var e=0,n=f.pi/3,i=(0,Hr.U)(r),a=i(e,n);return a.parallels=function(r){return arguments.length?i(e=r[0]*f.qw,n=r[1]*f.qw):[e*f.oh,n*f.oh]},a}function Or(r,e){var n=(0,f.g$)(r),i=(n+(0,f.g$)(e))/2;if((0,f.a2)(i)=.12&&a<.234&&i>=-.425&&i<-.214?c:a>=.166&&a<.234&&i>=-.214&&i<-.115?u:o).invert(r)},s.stream=function(n){return r&&e===n?r:r=function(r){var e=r.length;return{point:function(n,i){for(var a=-1;++a0?e<-f.or+f.Gg&&(e=-f.or+f.Gg):e>f.or-f.Gg&&(e=f.or-f.Gg);var n=a/(0,f.g3)(re(e),i);return[n*(0,f.g$)(i*r),a-n*(0,f.W8)(i*r)]}return t.invert=function(r,e){var n=a-e,t=(0,f.kq)(i)*(0,f._I)(r*r+n*n),o=(0,f.WE)(r,(0,f.a2)(n))*(0,f.kq)(n);return n*i<0&&(o-=f.pi*(0,f.kq)(r)*(0,f.kq)(n)),[o/i,2*(0,f.MQ)((0,f.g3)(a/t,1/i))-f.or]},t}function ne(){return Lr(ee).scale(109.5).parallels([30,30])}Xr.invert=function(r,e){return[r,2*(0,f.MQ)((0,f.oN)(e))-f.or]};var ie=n(69604);function ae(r,e){var n=(0,f.W8)(r),i=r===e?(0,f.g$)(r):(n-(0,f.W8)(e))/(e-r),a=n/i+r;if((0,f.a2)(i)2?r[2]+90:90]):[(r=n())[0],r[1],r[2]-90]},n([0,0,90]).scale(159.155)}he.invert=(0,_e.g)((function(r){return 2*(0,f.MQ)(r)})),xe.invert=function(r,e){return[-e,2*(0,f.MQ)((0,f.oN)(r))-f.or]}},27284:function(r,e,n){"use strict";n.d(e,{c:function(){return a}});var i=n(64528);function a(r,e){var n=r[0]*i.qw,a=r[1]*i.qw,t=e[0]*i.qw,o=e[1]*i.qw,c=(0,i.W8)(a),u=(0,i.g$)(a),d=(0,i.W8)(o),s=(0,i.g$)(o),l=c*(0,i.W8)(n),m=c*(0,i.g$)(n),p=d*(0,i.W8)(t),I=d*(0,i.g$)(t),y=2*(0,i.qR)((0,i._I)((0,i.SD)(o-a)+c*d*(0,i.SD)(t-n))),f=(0,i.g$)(y),g=y?function(r){var e=(0,i.g$)(r*=y)/f,n=(0,i.g$)(y-r)/f,a=n*l+e*p,t=n*m+e*I,o=n*u+e*s;return[(0,i.WE)(t,a)*i.oh,(0,i.WE)(o,(0,i._I)(a*a+t*t))*i.oh]}:function(){return[n*i.oh,a*i.oh]};return g.distance=y,g}},64528:function(r,e,n){"use strict";n.d(e,{Gg:function(){return i},Km:function(){return y},MQ:function(){return m},SD:function(){return S},W8:function(){return I},WE:function(){return p},Yz:function(){return g},_I:function(){return x},a2:function(){return l},a6:function(){return P},a8:function(){return a},g$:function(){return h},g3:function(){return _},kD:function(){return u},kq:function(){return v},mE:function(){return G},oN:function(){return f},oh:function(){return d},or:function(){return o},pi:function(){return t},qR:function(){return C},qw:function(){return s},wL:function(){return c}});var i=1e-6,a=1e-12,t=Math.PI,o=t/2,c=t/4,u=2*t,d=180/t,s=t/180,l=Math.abs,m=Math.atan,p=Math.atan2,I=Math.cos,y=Math.ceil,f=Math.exp,g=(Math.floor,Math.log),_=Math.pow,h=Math.sin,v=Math.sign||function(r){return r>0?1:r<0?-1:0},x=Math.sqrt,P=Math.tan;function G(r){return r>1?0:r<-1?t:Math.acos(r)}function C(r){return r>1?o:r<-1?-o:Math.asin(r)}function S(r){return(r=h(r/2))*r}},70932:function(r,e,n){"use strict";function i(){}n.d(e,{c:function(){return i}})},73784:function(r,e,n){"use strict";var i=n(70932),a=1/0,t=a,o=-a,c=o,u={point:function(r,e){ro&&(o=r),ec&&(c=e)},lineStart:i.c,lineEnd:i.c,polygonStart:i.c,polygonEnd:i.c,result:function(){var r=[[a,t],[o,c]];return o=c=-(t=a=1/0),r}};e.c=u},41860:function(r,e,n){"use strict";n.d(e,{c:function(){return a}});var i=n(64528);function a(r,e){return(0,i.a2)(r[0]-e[0])=0?1:-1,B=M*b,k=B>t.pi,F=h*S;if(o.add((0,t.WE)(F*M*(0,t.g$)(B),v*A+F*(0,t.W8)(B))),s+=k?b+M*t.kD:b,k^g>=n^G>=n){var z=(0,a.CW)((0,a.ux)(f),(0,a.ux)(P));(0,a.cJ)(z);var w=(0,a.CW)(d,z);(0,a.cJ)(w);var R=(k^b>=0?-1:1)*(0,t.qR)(w[2]);(i>R||i===R&&(z[0]||z[1]))&&(l+=k^b>=0?1:-1)}}return(s<-t.Gg||s4*e&&g--){var P=o+p,G=c+y,C=d+f,S=(0,u._I)(P*P+G*G+C*C),A=(0,u.qR)(C/=S),b=(0,u.a2)((0,u.a2)(C)-1)e||(0,u.a2)((h*F+v*z)/x-.5)>.3||o*p+c*y+d*f2?r[2]%360*u.qw:0,L()):[B*u.oh,k*u.oh,F*u.oh]},U.angle=function(r){return arguments.length?(z=r%360*u.qw,L()):z*u.oh},U.reflectX=function(r){return arguments.length?(w=r?-1:1,L()):w<0},U.reflectY=function(r){return arguments.length?(R=r?-1:1,L()):R<0},U.precision=function(r){return arguments.length?(h=y(v,J=r*r),O()):(0,u._I)(J)},U.fitExtent=function(r,e){return(0,l.QX)(U,r,e)},U.fitSize=function(r,e){return(0,l.UV)(U,r,e)},U.fitWidth=function(r,e){return(0,l.Qx)(U,r,e)},U.fitHeight=function(r,e){return(0,l.OW)(U,r,e)},function(){return e=r.apply(this,arguments),U.invert=e.invert&&H,L()}}},47984:function(r,e,n){"use strict";n.d(e,{c:function(){return o},g:function(){return t}});var i=n(87952),a=n(64528);function t(r,e){var n=e*e,i=n*n;return[r*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),e*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function o(){return(0,i.c)(t).scale(175.295)}t.invert=function(r,e){var n,i=e,t=25;do{var o=i*i,c=o*o;i-=n=(i*(1.007226+o*(.015085+c*(.028874*o-.044475-.005916*c)))-e)/(1.007226+o*(.045255+c*(.259866*o-.311325-.005916*11*c)))}while((0,a.a2)(n)>a.Gg&&--t>0);return[r/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]}},4888:function(r,e,n){"use strict";n.d(e,{c:function(){return c},t:function(){return o}});var i=n(64528),a=n(62280),t=n(87952);function o(r,e){return[(0,i.W8)(e)*(0,i.g$)(r),(0,i.g$)(e)]}function c(){return(0,t.c)(o).scale(249.5).clipAngle(90+i.Gg)}o.invert=(0,a.g)(i.qR)},92992:function(r,e,n){"use strict";n.d(e,{O:function(){return o},c:function(){return s}});var i=n(68120),a=n(64528);function t(r,e){return[(0,a.a2)(r)>a.pi?r+Math.round(-r/a.kD)*a.kD:r,e]}function o(r,e,n){return(r%=a.kD)?e||n?(0,i.c)(u(r),d(e,n)):u(r):e||n?d(e,n):t}function c(r){return function(e,n){return[(e+=r)>a.pi?e-a.kD:e<-a.pi?e+a.kD:e,n]}}function u(r){var e=c(r);return e.invert=c(-r),e}function d(r,e){var n=(0,a.W8)(r),i=(0,a.g$)(r),t=(0,a.W8)(e),o=(0,a.g$)(e);function c(r,e){var c=(0,a.W8)(e),u=(0,a.W8)(r)*c,d=(0,a.g$)(r)*c,s=(0,a.g$)(e),l=s*n+u*i;return[(0,a.WE)(d*t-l*o,u*n-s*i),(0,a.qR)(l*t+d*o)]}return c.invert=function(r,e){var c=(0,a.W8)(e),u=(0,a.W8)(r)*c,d=(0,a.g$)(r)*c,s=(0,a.g$)(e),l=s*t-d*o;return[(0,a.WE)(d*t+s*o,u*n+l*i),(0,a.qR)(l*n-u*i)]},c}function s(r){function e(e){return(e=r(e[0]*a.qw,e[1]*a.qw))[0]*=a.oh,e[1]*=a.oh,e}return r=o(r[0]*a.qw,r[1]*a.qw,r.length>2?r[2]*a.qw:0),e.invert=function(e){return(e=r.invert(e[0]*a.qw,e[1]*a.qw))[0]*=a.oh,e[1]*=a.oh,e},e}t.invert=t},16016:function(r,e,n){"use strict";function i(r,e){r&&t.hasOwnProperty(r.type)&&t[r.type](r,e)}n.d(e,{c:function(){return u}});var a={Feature:function(r,e){i(r.geometry,e)},FeatureCollection:function(r,e){for(var n=r.features,a=-1,t=n.length;++a=0;)e+=n[i].value;else e=1;r.value=e}function u(r,e){var n,i,a,t,o,c=new m(r),u=+r.value&&(c.value=r.value),s=[c];for(null==e&&(e=d);n=s.pop();)if(u&&(n.value=+n.data.value),(a=e(n.data))&&(o=a.length))for(n.children=new Array(o),t=o-1;t>=0;--t)s.push(i=n.children[t]=new m(a[t])),i.parent=n,i.depth=n.depth+1;return c.eachBefore(l)}function d(r){return r.children}function s(r){r.data=r.data.data}function l(r){var e=0;do{r.height=e}while((r=r.parent)&&r.height<++e)}function m(r){this.data=r,this.depth=this.height=0,this.parent=null}n.r(e),n.d(e,{cluster:function(){return o},hierarchy:function(){return u},pack:function(){return z},packEnclose:function(){return I},packSiblings:function(){return b},partition:function(){return D},stratify:function(){return K},tree:function(){return X},treemap:function(){return nr},treemapBinary:function(){return ir},treemapDice:function(){return T},treemapResquarify:function(){return tr},treemapSlice:function(){return Q},treemapSliceDice:function(){return ar},treemapSquarify:function(){return er}}),m.prototype=u.prototype={constructor:m,count:function(){return this.eachAfter(c)},each:function(r){var e,n,i,a,t=this,o=[t];do{for(e=o.reverse(),o=[];t=e.pop();)if(r(t),n=t.children)for(i=0,a=n.length;i=0;--n)a.push(e[n]);return this},sum:function(r){return this.eachAfter((function(e){for(var n=+r(e.data)||0,i=e.children,a=i&&i.length;--a>=0;)n+=i[a].value;e.value=n}))},sort:function(r){return this.eachBefore((function(e){e.children&&e.children.sort(r)}))},path:function(r){for(var e=this,n=function(r,e){if(r===e)return r;var n=r.ancestors(),i=e.ancestors(),a=null;for(r=n.pop(),e=i.pop();r===e;)a=r,r=n.pop(),e=i.pop();return a}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i},ancestors:function(){for(var r=this,e=[r];r=r.parent;)e.push(r);return e},descendants:function(){var r=[];return this.each((function(e){r.push(e)})),r},leaves:function(){var r=[];return this.eachBefore((function(e){e.children||r.push(e)})),r},links:function(){var r=this,e=[];return r.each((function(n){n!==r&&e.push({source:n.parent,target:n})})),e},copy:function(){return u(this).eachBefore(s)}};var p=Array.prototype.slice;function I(r){for(var e,n,i=0,a=(r=function(r){for(var e,n,i=r.length;i;)n=Math.random()*i--|0,e=r[i],r[i]=r[n],r[n]=e;return r}(p.call(r))).length,t=[];i0&&n*n>i*i+a*a}function _(r,e){for(var n=0;n(o*=o)?(i=(d+o-a)/(2*d),t=Math.sqrt(Math.max(0,o/d-i*i)),n.x=r.x-i*c-t*u,n.y=r.y-i*u+t*c):(i=(d+a-o)/(2*d),t=Math.sqrt(Math.max(0,a/d-i*i)),n.x=e.x+i*c-t*u,n.y=e.y+i*u+t*c)):(n.x=e.x+n.r,n.y=e.y)}function G(r,e){var n=r.r+e.r-1e-6,i=e.x-r.x,a=e.y-r.y;return n>0&&n*n>i*i+a*a}function C(r){var e=r._,n=r.next._,i=e.r+n.r,a=(e.x*n.r+n.x*e.r)/i,t=(e.y*n.r+n.y*e.r)/i;return a*a+t*t}function S(r){this._=r,this.next=null,this.previous=null}function A(r){if(!(a=r.length))return 0;var e,n,i,a,t,o,c,u,d,s,l;if((e=r[0]).x=0,e.y=0,!(a>1))return e.r;if(n=r[1],e.x=-n.r,n.x=e.r,n.y=0,!(a>2))return e.r+n.r;P(n,e,i=r[2]),e=new S(e),n=new S(n),i=new S(i),e.next=i.previous=n,n.next=e.previous=i,i.next=n.previous=e;r:for(c=3;c0)throw new Error("cycle");return t}return n.id=function(e){return arguments.length?(r=M(e),n):r},n.parentId=function(r){return arguments.length?(e=M(r),n):e},n}function V(r,e){return r.parent===e.parent?1:2}function j(r){var e=r.children;return e?e[0]:r.t}function W(r){var e=r.children;return e?e[e.length-1]:r.t}function Z(r,e,n){var i=n/(e.i-r.i);e.c-=i,e.s+=n,r.c+=i,e.z+=n,e.m+=n}function q(r,e,n){return r.a.parent===e.parent?r.a:n}function Y(r,e){this._=r,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=e}function X(){var r=V,e=1,n=1,i=null;function a(a){var u=function(r){for(var e,n,i,a,t,o=new Y(r,0),c=[o];e=c.pop();)if(i=e._.children)for(e.children=new Array(t=i.length),a=t-1;a>=0;--a)c.push(n=e.children[a]=new Y(i[a],a)),n.parent=e;return(o.parent=new Y(null,0)).children=[o],o}(a);if(u.eachAfter(t),u.parent.m=-u.z,u.eachBefore(o),i)a.eachBefore(c);else{var d=a,s=a,l=a;a.eachBefore((function(r){r.xs.x&&(s=r),r.depth>l.depth&&(l=r)}));var m=d===s?1:r(d,s)/2,p=m-d.x,I=e/(s.x+m+p),y=n/(l.depth||1);a.eachBefore((function(r){r.x=(r.x+p)*I,r.y=r.depth*y}))}return a}function t(e){var n=e.children,i=e.parent.children,a=e.i?i[e.i-1]:null;if(n){!function(r){for(var e,n=0,i=0,a=r.children,t=a.length;--t>=0;)(e=a[t]).z+=n,e.m+=n,n+=e.s+(i+=e.c)}(e);var t=(n[0].z+n[n.length-1].z)/2;a?(e.z=a.z+r(e._,a._),e.m=e.z-t):e.z=t}else a&&(e.z=a.z+r(e._,a._));e.parent.A=function(e,n,i){if(n){for(var a,t=e,o=e,c=n,u=t.parent.children[0],d=t.m,s=o.m,l=c.m,m=u.m;c=W(c),t=j(t),c&&t;)u=j(u),(o=W(o)).a=e,(a=c.z+l-t.z-d+r(c._,t._))>0&&(Z(q(c,e,i),e,a),d+=a,s+=a),l+=c.m,d+=t.m,m+=u.m,s+=o.m;c&&!W(o)&&(o.t=c,o.m+=l-s),t&&!j(u)&&(u.t=t,u.m+=d-m,i=e)}return i}(e,a,e.parent.A||i[0])}function o(r){r._.x=r.z+r.parent.m,r.m+=r.parent.m}function c(r){r.x*=e,r.y=r.depth*n}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(r){return arguments.length?(i=!1,e=+r[0],n=+r[1],a):i?null:[e,n]},a.nodeSize=function(r){return arguments.length?(i=!0,e=+r[0],n=+r[1],a):i?[e,n]:null},a}function Q(r,e,n,i,a){for(var t,o=r.children,c=-1,u=o.length,d=r.value&&(a-n)/r.value;++cm&&(m=c),f=s*s*y,(p=Math.max(m/f,f/l))>I){s-=c;break}I=p}g.push(o={value:s,dice:u1?e:1)},n}($);function nr(){var r=er,e=!1,n=1,i=1,a=[0],t=B,o=B,c=B,u=B,d=B;function s(r){return r.x0=r.y0=0,r.x1=n,r.y1=i,r.eachBefore(l),a=[0],e&&r.eachBefore(N),r}function l(e){var n=a[e.depth],i=e.x0+n,s=e.y0+n,l=e.x1-n,m=e.y1-n;l=n-1){var s=c[e];return s.x0=a,s.y0=t,s.x1=o,void(s.y1=u)}for(var l=d[e],m=i/2+l,p=e+1,I=n-1;p>>1;d[y]u-t){var _=(a*g+o*f)/i;r(e,p,f,a,t,_,u),r(p,n,g,_,t,o,u)}else{var h=(t*g+u*f)/i;r(e,p,f,a,t,o,h),r(p,n,g,a,h,o,u)}}(0,u,r.value,e,n,i,a)}function ar(r,e,n,i,a){(1&r.depth?Q:T)(r,e,n,i,a)}var tr=function r(e){function n(r,n,i,a,t){if((o=r._squarify)&&o.ratio===e)for(var o,c,u,d,s,l=-1,m=o.length,p=r.value;++l1?e:1)},n}($)},10132:function(r,e,n){"use strict";n.d(e,{ak:function(){return _}});var i=Math.PI,a=2*i,t=1e-6,o=a-t;function c(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function u(){return new c}c.prototype=u.prototype={constructor:c,moveTo:function(r,e){this._+="M"+(this._x0=this._x1=+r)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(r,e){this._+="L"+(this._x1=+r)+","+(this._y1=+e)},quadraticCurveTo:function(r,e,n,i){this._+="Q"+ +r+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(r,e,n,i,a,t){this._+="C"+ +r+","+ +e+","+ +n+","+ +i+","+(this._x1=+a)+","+(this._y1=+t)},arcTo:function(r,e,n,a,o){r=+r,e=+e,n=+n,a=+a,o=+o;var c=this._x1,u=this._y1,d=n-r,s=a-e,l=c-r,m=u-e,p=l*l+m*m;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=r)+","+(this._y1=e);else if(p>t)if(Math.abs(m*d-s*l)>t&&o){var I=n-c,y=a-u,f=d*d+s*s,g=I*I+y*y,_=Math.sqrt(f),h=Math.sqrt(p),v=o*Math.tan((i-Math.acos((f+p-g)/(2*_*h)))/2),x=v/h,P=v/_;Math.abs(x-1)>t&&(this._+="L"+(r+x*l)+","+(e+x*m)),this._+="A"+o+","+o+",0,0,"+ +(m*I>l*y)+","+(this._x1=r+P*d)+","+(this._y1=e+P*s)}else this._+="L"+(this._x1=r)+","+(this._y1=e)},arc:function(r,e,n,c,u,d){r=+r,e=+e,d=!!d;var s=(n=+n)*Math.cos(c),l=n*Math.sin(c),m=r+s,p=e+l,I=1^d,y=d?c-u:u-c;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+m+","+p:(Math.abs(this._x1-m)>t||Math.abs(this._y1-p)>t)&&(this._+="L"+m+","+p),n&&(y<0&&(y=y%a+a),y>o?this._+="A"+n+","+n+",0,1,"+I+","+(r-s)+","+(e-l)+"A"+n+","+n+",0,1,"+I+","+(this._x1=m)+","+(this._y1=p):y>t&&(this._+="A"+n+","+n+",0,"+ +(y>=i)+","+I+","+(this._x1=r+n*Math.cos(u))+","+(this._y1=e+n*Math.sin(u))))},rect:function(r,e,n,i){this._+="M"+(this._x0=this._x1=+r)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var d=u,s=Array.prototype.slice;function l(r){return function(){return r}}function m(r){return r[0]}function p(r){return r[1]}function I(r){return r.source}function y(r){return r.target}function f(r){var e=I,n=y,i=m,a=p,t=null;function o(){var o,c=s.call(arguments),u=e.apply(this,c),l=n.apply(this,c);if(t||(t=o=d()),r(t,+i.apply(this,(c[0]=u,c)),+a.apply(this,c),+i.apply(this,(c[0]=l,c)),+a.apply(this,c)),o)return t=null,o+""||null}return o.source=function(r){return arguments.length?(e=r,o):e},o.target=function(r){return arguments.length?(n=r,o):n},o.x=function(r){return arguments.length?(i="function"===typeof r?r:l(+r),o):i},o.y=function(r){return arguments.length?(a="function"===typeof r?r:l(+r),o):a},o.context=function(r){return arguments.length?(t=null==r?null:r,o):t},o}function g(r,e,n,i,a){r.moveTo(e,n),r.bezierCurveTo(e=(e+i)/2,n,e,a,i,a)}function _(){return f(g)}},94336:function(r,e,n){"use strict";n.d(e,{Yn:function(){return I},m_:function(){return m},E9:function(){return y}});var i=n(8208),a=n(58931),t=n(46192),o=n(68936),c=n(32171),u=n(53528);function d(r){if(0<=r.y&&r.y<100){var e=new Date(-1,r.m,r.d,r.H,r.M,r.S,r.L);return e.setFullYear(r.y),e}return new Date(r.y,r.m,r.d,r.H,r.M,r.S,r.L)}function s(r){if(0<=r.y&&r.y<100){var e=new Date(Date.UTC(-1,r.m,r.d,r.H,r.M,r.S,r.L));return e.setUTCFullYear(r.y),e}return new Date(Date.UTC(r.y,r.m,r.d,r.H,r.M,r.S,r.L))}function l(r,e,n){return{y:r,m:e,d:n,H:0,M:0,S:0,L:0}}function m(r){var e=r.dateTime,n=r.date,c=r.time,u=r.periods,m=r.days,p=r.shortDays,I=r.months,y=r.shortMonths,g=P(u),_=G(u),h=P(m),v=G(m),x=P(p),br=G(p),Mr=P(I),Br=G(I),kr=P(y),Fr=G(y),zr={a:function(r){return p[r.getDay()]},A:function(r){return m[r.getDay()]},b:function(r){return y[r.getMonth()]},B:function(r){return I[r.getMonth()]},c:null,d:K,e:K,f:q,H:V,I:j,j:W,L:Z,m:Y,M:X,p:function(r){return u[+(r.getHours()>=12)]},q:function(r){return 1+~~(r.getMonth()/3)},Q:Sr,s:Ar,S:Q,u:$,U:rr,V:er,w:nr,W:ir,x:null,X:null,y:ar,Y:tr,Z:or,"%":Cr},wr={a:function(r){return p[r.getUTCDay()]},A:function(r){return m[r.getUTCDay()]},b:function(r){return y[r.getUTCMonth()]},B:function(r){return I[r.getUTCMonth()]},c:null,d:cr,e:cr,f:mr,H:ur,I:dr,j:sr,L:lr,m:pr,M:Ir,p:function(r){return u[+(r.getUTCHours()>=12)]},q:function(r){return 1+~~(r.getUTCMonth()/3)},Q:Sr,s:Ar,S:yr,u:fr,U:gr,V:_r,w:hr,W:vr,x:null,X:null,y:xr,Y:Pr,Z:Gr,"%":Cr},Rr={a:function(r,e,n){var i=x.exec(e.slice(n));return i?(r.w=br[i[0].toLowerCase()],n+i[0].length):-1},A:function(r,e,n){var i=h.exec(e.slice(n));return i?(r.w=v[i[0].toLowerCase()],n+i[0].length):-1},b:function(r,e,n){var i=kr.exec(e.slice(n));return i?(r.m=Fr[i[0].toLowerCase()],n+i[0].length):-1},B:function(r,e,n){var i=Mr.exec(e.slice(n));return i?(r.m=Br[i[0].toLowerCase()],n+i[0].length):-1},c:function(r,n,i){return Tr(r,e,n,i)},d:R,e:R,f:U,H:N,I:N,j:E,L:J,m:w,M:T,p:function(r,e,n){var i=g.exec(e.slice(n));return i?(r.p=_[i[0].toLowerCase()],n+i[0].length):-1},q:z,Q:L,s:O,S:D,u:S,U:A,V:b,w:C,W:M,x:function(r,e,i){return Tr(r,n,e,i)},X:function(r,e,n){return Tr(r,c,e,n)},y:k,Y:B,Z:F,"%":H};function Er(r,e){return function(n){var i,a,t,o=[],c=-1,u=0,d=r.length;for(n instanceof Date||(n=new Date(+n));++c53)return null;"w"in m||(m.w=1),"Z"in m?(u=(c=s(l(m.y,0,1))).getUTCDay(),c=u>4||0===u?i.ot.ceil(c):(0,i.ot)(c),c=a.c.offset(c,7*(m.V-1)),m.y=c.getUTCFullYear(),m.m=c.getUTCMonth(),m.d=c.getUTCDate()+(m.w+6)%7):(u=(c=d(l(m.y,0,1))).getDay(),c=u>4||0===u?t.qT.ceil(c):(0,t.qT)(c),c=o.c.offset(c,7*(m.V-1)),m.y=c.getFullYear(),m.m=c.getMonth(),m.d=c.getDate()+(m.w+6)%7)}else("W"in m||"U"in m)&&("w"in m||(m.w="u"in m?m.u%7:"W"in m?1:0),u="Z"in m?s(l(m.y,0,1)).getUTCDay():d(l(m.y,0,1)).getDay(),m.m=0,m.d="W"in m?(m.w+6)%7+7*m.W-(u+5)%7:m.w+7*m.U-(u+6)%7);return"Z"in m?(m.H+=m.Z/100|0,m.M+=m.Z%100,s(m)):d(m)}}function Tr(r,e,n,i){for(var a,t,o=0,c=e.length,u=n.length;o=u)return-1;if(37===(a=e.charCodeAt(o++))){if(a=e.charAt(o++),!(t=Rr[a in f?e.charAt(o++):a])||(i=t(r,n,i))<0)return-1}else if(a!=n.charCodeAt(i++))return-1}return i}return zr.x=Er(n,zr),zr.X=Er(c,zr),zr.c=Er(e,zr),wr.x=Er(n,wr),wr.X=Er(c,wr),wr.c=Er(e,wr),{format:function(r){var e=Er(r+="",zr);return e.toString=function(){return r},e},parse:function(r){var e=Nr(r+="",!1);return e.toString=function(){return r},e},utcFormat:function(r){var e=Er(r+="",wr);return e.toString=function(){return r},e},utcParse:function(r){var e=Nr(r+="",!0);return e.toString=function(){return r},e}}}var p,I,y,f={"-":"",_:" ",0:"0"},g=/^\s*\d+/,_=/^%/,h=/[\\^$*+?|[\]().{}]/g;function v(r,e,n){var i=r<0?"-":"",a=(i?-r:r)+"",t=a.length;return i+(t68?1900:2e3),n+i[0].length):-1}function F(r,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(r.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function z(r,e,n){var i=g.exec(e.slice(n,n+1));return i?(r.q=3*i[0]-3,n+i[0].length):-1}function w(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.m=i[0]-1,n+i[0].length):-1}function R(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.d=+i[0],n+i[0].length):-1}function E(r,e,n){var i=g.exec(e.slice(n,n+3));return i?(r.m=0,r.d=+i[0],n+i[0].length):-1}function N(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.H=+i[0],n+i[0].length):-1}function T(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.M=+i[0],n+i[0].length):-1}function D(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.S=+i[0],n+i[0].length):-1}function J(r,e,n){var i=g.exec(e.slice(n,n+3));return i?(r.L=+i[0],n+i[0].length):-1}function U(r,e,n){var i=g.exec(e.slice(n,n+6));return i?(r.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function H(r,e,n){var i=_.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function L(r,e,n){var i=g.exec(e.slice(n));return i?(r.Q=+i[0],n+i[0].length):-1}function O(r,e,n){var i=g.exec(e.slice(n));return i?(r.s=+i[0],n+i[0].length):-1}function K(r,e){return v(r.getDate(),e,2)}function V(r,e){return v(r.getHours(),e,2)}function j(r,e){return v(r.getHours()%12||12,e,2)}function W(r,e){return v(1+o.c.count((0,c.c)(r),r),e,3)}function Z(r,e){return v(r.getMilliseconds(),e,3)}function q(r,e){return Z(r,e)+"000"}function Y(r,e){return v(r.getMonth()+1,e,2)}function X(r,e){return v(r.getMinutes(),e,2)}function Q(r,e){return v(r.getSeconds(),e,2)}function $(r){var e=r.getDay();return 0===e?7:e}function rr(r,e){return v(t.uU.count((0,c.c)(r)-1,r),e,2)}function er(r,e){var n=r.getDay();return r=n>=4||0===n?(0,t.kD)(r):t.kD.ceil(r),v(t.kD.count((0,c.c)(r),r)+(4===(0,c.c)(r).getDay()),e,2)}function nr(r){return r.getDay()}function ir(r,e){return v(t.qT.count((0,c.c)(r)-1,r),e,2)}function ar(r,e){return v(r.getFullYear()%100,e,2)}function tr(r,e){return v(r.getFullYear()%1e4,e,4)}function or(r){var e=r.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+v(e/60|0,"0",2)+v(e%60,"0",2)}function cr(r,e){return v(r.getUTCDate(),e,2)}function ur(r,e){return v(r.getUTCHours(),e,2)}function dr(r,e){return v(r.getUTCHours()%12||12,e,2)}function sr(r,e){return v(1+a.c.count((0,u.c)(r),r),e,3)}function lr(r,e){return v(r.getUTCMilliseconds(),e,3)}function mr(r,e){return lr(r,e)+"000"}function pr(r,e){return v(r.getUTCMonth()+1,e,2)}function Ir(r,e){return v(r.getUTCMinutes(),e,2)}function yr(r,e){return v(r.getUTCSeconds(),e,2)}function fr(r){var e=r.getUTCDay();return 0===e?7:e}function gr(r,e){return v(i.EV.count((0,u.c)(r)-1,r),e,2)}function _r(r,e){var n=r.getUTCDay();return r=n>=4||0===n?(0,i.yA)(r):i.yA.ceil(r),v(i.yA.count((0,u.c)(r),r)+(4===(0,u.c)(r).getUTCDay()),e,2)}function hr(r){return r.getUTCDay()}function vr(r,e){return v(i.ot.count((0,u.c)(r)-1,r),e,2)}function xr(r,e){return v(r.getUTCFullYear()%100,e,2)}function Pr(r,e){return v(r.getUTCFullYear()%1e4,e,4)}function Gr(){return"+0000"}function Cr(){return"%"}function Sr(r){return+r}function Ar(r){return Math.floor(+r/1e3)}p=m({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]}),I=p.format,p.parse,y=p.utcFormat,p.utcParse},68936:function(r,e,n){"use strict";n.d(e,{m:function(){return o}});var i=n(81628),a=n(69792),t=(0,i.c)((function(r){r.setHours(0,0,0,0)}),(function(r,e){r.setDate(r.getDate()+e)}),(function(r,e){return(e-r-(e.getTimezoneOffset()-r.getTimezoneOffset())*a.iy)/a.SK}),(function(r){return r.getDate()-1}));e.c=t;var o=t.range},69792:function(r,e,n){"use strict";n.d(e,{KK:function(){return c},SK:function(){return o},cg:function(){return t},iy:function(){return a},yc:function(){return i}});var i=1e3,a=6e4,t=36e5,o=864e5,c=6048e5},73220:function(r,e,n){"use strict";n.r(e),n.d(e,{timeDay:function(){return g.c},timeDays:function(){return g.m},timeFriday:function(){return _.iB},timeFridays:function(){return _.sJ},timeHour:function(){return y},timeHours:function(){return f},timeInterval:function(){return i.c},timeMillisecond:function(){return t},timeMilliseconds:function(){return o},timeMinute:function(){return m},timeMinutes:function(){return p},timeMonday:function(){return _.qT},timeMondays:function(){return _.QP},timeMonth:function(){return v},timeMonths:function(){return x},timeSaturday:function(){return _.Wc},timeSaturdays:function(){return _.aI},timeSecond:function(){return d},timeSeconds:function(){return s},timeSunday:function(){return _.uU},timeSundays:function(){return _.Ab},timeThursday:function(){return _.kD},timeThursdays:function(){return _.eC},timeTuesday:function(){return _.Mf},timeTuesdays:function(){return _.Oc},timeWednesday:function(){return _.eg},timeWednesdays:function(){return _.sn},timeWeek:function(){return _.uU},timeWeeks:function(){return _.Ab},timeYear:function(){return P.c},timeYears:function(){return P.Q},utcDay:function(){return B.c},utcDays:function(){return B.o},utcFriday:function(){return k.od},utcFridays:function(){return k.iG},utcHour:function(){return b},utcHours:function(){return M},utcMillisecond:function(){return t},utcMilliseconds:function(){return o},utcMinute:function(){return C},utcMinutes:function(){return S},utcMonday:function(){return k.ot},utcMondays:function(){return k.iO},utcMonth:function(){return z},utcMonths:function(){return w},utcSaturday:function(){return k.Ad},utcSaturdays:function(){return k.K8},utcSecond:function(){return d},utcSeconds:function(){return s},utcSunday:function(){return k.EV},utcSundays:function(){return k.Wq},utcThursday:function(){return k.yA},utcThursdays:function(){return k.ob},utcTuesday:function(){return k.sG},utcTuesdays:function(){return k.kl},utcWednesday:function(){return k._6},utcWednesdays:function(){return k.W_},utcWeek:function(){return k.EV},utcWeeks:function(){return k.Wq},utcYear:function(){return R.c},utcYears:function(){return R.i}});var i=n(81628),a=(0,i.c)((function(){}),(function(r,e){r.setTime(+r+e)}),(function(r,e){return e-r}));a.every=function(r){return r=Math.floor(r),isFinite(r)&&r>0?r>1?(0,i.c)((function(e){e.setTime(Math.floor(e/r)*r)}),(function(e,n){e.setTime(+e+n*r)}),(function(e,n){return(n-e)/r})):a:null};var t=a,o=a.range,c=n(69792),u=(0,i.c)((function(r){r.setTime(r-r.getMilliseconds())}),(function(r,e){r.setTime(+r+e*c.yc)}),(function(r,e){return(e-r)/c.yc}),(function(r){return r.getUTCSeconds()})),d=u,s=u.range,l=(0,i.c)((function(r){r.setTime(r-r.getMilliseconds()-r.getSeconds()*c.yc)}),(function(r,e){r.setTime(+r+e*c.iy)}),(function(r,e){return(e-r)/c.iy}),(function(r){return r.getMinutes()})),m=l,p=l.range,I=(0,i.c)((function(r){r.setTime(r-r.getMilliseconds()-r.getSeconds()*c.yc-r.getMinutes()*c.iy)}),(function(r,e){r.setTime(+r+e*c.cg)}),(function(r,e){return(e-r)/c.cg}),(function(r){return r.getHours()})),y=I,f=I.range,g=n(68936),_=n(46192),h=(0,i.c)((function(r){r.setDate(1),r.setHours(0,0,0,0)}),(function(r,e){r.setMonth(r.getMonth()+e)}),(function(r,e){return e.getMonth()-r.getMonth()+12*(e.getFullYear()-r.getFullYear())}),(function(r){return r.getMonth()})),v=h,x=h.range,P=n(32171),G=(0,i.c)((function(r){r.setUTCSeconds(0,0)}),(function(r,e){r.setTime(+r+e*c.iy)}),(function(r,e){return(e-r)/c.iy}),(function(r){return r.getUTCMinutes()})),C=G,S=G.range,A=(0,i.c)((function(r){r.setUTCMinutes(0,0,0)}),(function(r,e){r.setTime(+r+e*c.cg)}),(function(r,e){return(e-r)/c.cg}),(function(r){return r.getUTCHours()})),b=A,M=A.range,B=n(58931),k=n(8208),F=(0,i.c)((function(r){r.setUTCDate(1),r.setUTCHours(0,0,0,0)}),(function(r,e){r.setUTCMonth(r.getUTCMonth()+e)}),(function(r,e){return e.getUTCMonth()-r.getUTCMonth()+12*(e.getUTCFullYear()-r.getUTCFullYear())}),(function(r){return r.getUTCMonth()})),z=F,w=F.range,R=n(53528)},81628:function(r,e,n){"use strict";n.d(e,{c:function(){return t}});var i=new Date,a=new Date;function t(r,e,n,o){function c(e){return r(e=0===arguments.length?new Date:new Date(+e)),e}return c.floor=function(e){return r(e=new Date(+e)),e},c.ceil=function(n){return r(n=new Date(n-1)),e(n,1),r(n),n},c.round=function(r){var e=c(r),n=c.ceil(r);return r-e0))return o;do{o.push(t=new Date(+n)),e(n,a),r(n)}while(t=e)for(;r(e),!n(e);)e.setTime(e-1)}),(function(r,i){if(r>=r)if(i<0)for(;++i<=0;)for(;e(r,-1),!n(r););else for(;--i>=0;)for(;e(r,1),!n(r););}))},n&&(c.count=function(e,t){return i.setTime(+e),a.setTime(+t),r(i),r(a),Math.floor(n(i,a))},c.every=function(r){return r=Math.floor(r),isFinite(r)&&r>0?r>1?c.filter(o?function(e){return o(e)%r===0}:function(e){return c.count(0,e)%r===0}):c:null}),c}},58931:function(r,e,n){"use strict";n.d(e,{o:function(){return o}});var i=n(81628),a=n(69792),t=(0,i.c)((function(r){r.setUTCHours(0,0,0,0)}),(function(r,e){r.setUTCDate(r.getUTCDate()+e)}),(function(r,e){return(e-r)/a.SK}),(function(r){return r.getUTCDate()-1}));e.c=t;var o=t.range},8208:function(r,e,n){"use strict";n.d(e,{Ad:function(){return m},EV:function(){return o},K8:function(){return h},W_:function(){return f},Wq:function(){return p},_6:function(){return d},iG:function(){return _},iO:function(){return I},kl:function(){return y},ob:function(){return g},od:function(){return l},ot:function(){return c},sG:function(){return u},yA:function(){return s}});var i=n(81628),a=n(69792);function t(r){return(0,i.c)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-r)%7),e.setUTCHours(0,0,0,0)}),(function(r,e){r.setUTCDate(r.getUTCDate()+7*e)}),(function(r,e){return(e-r)/a.KK}))}var o=t(0),c=t(1),u=t(2),d=t(3),s=t(4),l=t(5),m=t(6),p=o.range,I=c.range,y=u.range,f=d.range,g=s.range,_=l.range,h=m.range},53528:function(r,e,n){"use strict";n.d(e,{i:function(){return t}});var i=n(81628),a=(0,i.c)((function(r){r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)}),(function(r,e){r.setUTCFullYear(r.getUTCFullYear()+e)}),(function(r,e){return e.getUTCFullYear()-r.getUTCFullYear()}),(function(r){return r.getUTCFullYear()}));a.every=function(r){return isFinite(r=Math.floor(r))&&r>0?(0,i.c)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/r)*r),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*r)})):null},e.c=a;var t=a.range},46192:function(r,e,n){"use strict";n.d(e,{Ab:function(){return p},Mf:function(){return u},Oc:function(){return y},QP:function(){return I},Wc:function(){return m},aI:function(){return h},eC:function(){return g},eg:function(){return d},iB:function(){return l},kD:function(){return s},qT:function(){return c},sJ:function(){return _},sn:function(){return f},uU:function(){return o}});var i=n(81628),a=n(69792);function t(r){return(0,i.c)((function(e){e.setDate(e.getDate()-(e.getDay()+7-r)%7),e.setHours(0,0,0,0)}),(function(r,e){r.setDate(r.getDate()+7*e)}),(function(r,e){return(e-r-(e.getTimezoneOffset()-r.getTimezoneOffset())*a.iy)/a.KK}))}var o=t(0),c=t(1),u=t(2),d=t(3),s=t(4),l=t(5),m=t(6),p=o.range,I=c.range,y=u.range,f=d.range,g=s.range,_=l.range,h=m.range},32171:function(r,e,n){"use strict";n.d(e,{Q:function(){return t}});var i=n(81628),a=(0,i.c)((function(r){r.setMonth(0,1),r.setHours(0,0,0,0)}),(function(r,e){r.setFullYear(r.getFullYear()+e)}),(function(r,e){return e.getFullYear()-r.getFullYear()}),(function(r){return r.getFullYear()}));a.every=function(r){return isFinite(r=Math.floor(r))&&r>0?(0,i.c)((function(e){e.setFullYear(Math.floor(e.getFullYear()/r)*r),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*r)})):null},e.c=a;var t=a.range},64348:function(r,e,n){"use strict";var i=n(39640)(),a=n(53664),t=i&&a("%Object.defineProperty%",!0);if(t)try{t({},"a",{value:1})}catch(d){t=!1}var o=a("%SyntaxError%"),c=a("%TypeError%"),u=n(2304);r.exports=function(r,e,n){if(!r||"object"!==typeof r&&"function"!==typeof r)throw new c("`obj` must be an object or a function`");if("string"!==typeof e&&"symbol"!==typeof e)throw new c("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new c("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new c("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,s=arguments.length>6&&arguments[6],l=!!u&&u(r,e);if(t)t(r,e,{configurable:null===d&&l?l.configurable:!d,enumerable:null===i&&l?l.enumerable:!i,value:n,writable:null===a&&l?l.writable:!a});else{if(!s&&(i||a||d))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");r[e]=n}}},81288:function(r,e,n){"use strict";var i=n(41820),a="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),t=Object.prototype.toString,o=Array.prototype.concat,c=Object.defineProperty,u=n(39640)(),d=c&&u,s=function(r,e,n,i){if(e in r)if(!0===i){if(r[e]===n)return}else if("function"!==typeof(a=i)||"[object Function]"!==t.call(a)||!i())return;var a;d?c(r,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):r[e]=n},l=function(r,e){var n=arguments.length>2?arguments[2]:{},t=i(e);a&&(t=o.call(t,Object.getOwnPropertySymbols(e)));for(var c=0;cc*u){var p=(m-l)/c;o[s]=1e3*p}}return o}function a(r){for(var e=[],n=r[0];n<=r[1];n++)for(var i=String.fromCharCode(n),a=r[0];a0)return function(r,e){var n,i;for(n=new Array(r),i=0;i80*t){o=u=r[0],c=l=r[1];for(var v=t;vu&&(u=m),I>l&&(l=I);y=0!==(y=Math.max(u-o,l-c))?1/y:0}return a(_,h,t,o,c,y),h}function n(r,e,n,i,a){var t,o;if(a===A(r,e,n,i)>0)for(t=e;t=e;t-=i)o=G(t,r[t],r[t+1],o);return o&&g(o,o.next)&&(C(o),o=o.next),o}function i(r,e){if(!r)return r;e||(e=r);var n,i=r;do{if(n=!1,i.steiner||!g(i,i.next)&&0!==f(i.prev,i,i.next))i=i.next;else{if(C(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function a(r,e,n,d,s,l,p){if(r){!p&&l&&function(r,e,n,i){var a=r;do{null===a.z&&(a.z=m(a.x,a.y,e,n,i)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==r);a.prevZ.nextZ=null,a.prevZ=null,function(r){var e,n,i,a,t,o,c,u,d=1;do{for(n=r,r=null,t=null,o=0;n;){for(o++,i=n,c=0,e=0;e0||u>0&&i;)0!==c&&(0===u||!i||n.z<=i.z)?(a=n,n=n.nextZ,c--):(a=i,i=i.nextZ,u--),t?t.nextZ=a:r=a,a.prevZ=t,t=a;n=i}t.nextZ=null,d*=2}while(o>1)}(a)}(r,d,s,l);for(var I,y,f=r;r.prev!==r.next;)if(I=r.prev,y=r.next,l?o(r,d,s,l):t(r))e.push(I.i/n),e.push(r.i/n),e.push(y.i/n),C(r),r=y.next,f=y.next;else if((r=y)===f){p?1===p?a(r=c(i(r),e,n),e,n,d,s,l,2):2===p&&u(r,e,n,d,s,l):a(i(r),e,n,d,s,l,1);break}}}function t(r){var e=r.prev,n=r,i=r.next;if(f(e,n,i)>=0)return!1;for(var a=r.next.next;a!==r.prev;){if(I(e.x,e.y,n.x,n.y,i.x,i.y,a.x,a.y)&&f(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function o(r,e,n,i){var a=r.prev,t=r,o=r.next;if(f(a,t,o)>=0)return!1;for(var c=a.xt.x?a.x>o.x?a.x:o.x:t.x>o.x?t.x:o.x,s=a.y>t.y?a.y>o.y?a.y:o.y:t.y>o.y?t.y:o.y,l=m(c,u,e,n,i),p=m(d,s,e,n,i),y=r.prevZ,g=r.nextZ;y&&y.z>=l&&g&&g.z<=p;){if(y!==r.prev&&y!==r.next&&I(a.x,a.y,t.x,t.y,o.x,o.y,y.x,y.y)&&f(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,g!==r.prev&&g!==r.next&&I(a.x,a.y,t.x,t.y,o.x,o.y,g.x,g.y)&&f(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;y&&y.z>=l;){if(y!==r.prev&&y!==r.next&&I(a.x,a.y,t.x,t.y,o.x,o.y,y.x,y.y)&&f(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;g&&g.z<=p;){if(g!==r.prev&&g!==r.next&&I(a.x,a.y,t.x,t.y,o.x,o.y,g.x,g.y)&&f(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(r,e,n){var a=r;do{var t=a.prev,o=a.next.next;!g(t,o)&&_(t,a,a.next,o)&&x(t,o)&&x(o,t)&&(e.push(t.i/n),e.push(a.i/n),e.push(o.i/n),C(a),C(a.next),a=r=o),a=a.next}while(a!==r);return i(a)}function u(r,e,n,t,o,c){var u=r;do{for(var d=u.next.next;d!==u.prev;){if(u.i!==d.i&&y(u,d)){var s=P(u,d);return u=i(u,u.next),s=i(s,s.next),a(u,e,n,t,o,c),void a(s,e,n,t,o,c)}d=d.next}u=u.next}while(u!==r)}function d(r,e){return r.x-e.x}function s(r,e){if(e=function(r,e){var n,i=e,a=r.x,t=r.y,o=-1/0;do{if(t<=i.y&&t>=i.next.y&&i.next.y!==i.y){var c=i.x+(t-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(c<=a&&c>o){if(o=c,c===a){if(t===i.y)return i;if(t===i.next.y)return i.next}n=i.x=i.x&&i.x>=s&&a!==i.x&&I(tn.x||i.x===n.x&&l(n,i)))&&(n=i,p=u)),i=i.next}while(i!==d);return n}(r,e),e){var n=P(e,r);i(e,e.next),i(n,n.next)}}function l(r,e){return f(r.prev,r,e.prev)<0&&f(e.next,r,r.next)<0}function m(r,e,n,i,a){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-n)*a)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*a)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(r){var e=r,n=r;do{(e.x=0&&(r-o)*(i-c)-(n-o)*(e-c)>=0&&(n-o)*(t-c)-(a-o)*(i-c)>=0}function y(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!function(r,e){var n=r;do{if(n.i!==r.i&&n.next.i!==r.i&&n.i!==e.i&&n.next.i!==e.i&&_(n,n.next,r,e))return!0;n=n.next}while(n!==r);return!1}(r,e)&&(x(r,e)&&x(e,r)&&function(r,e){var n=r,i=!1,a=(r.x+e.x)/2,t=(r.y+e.y)/2;do{n.y>t!==n.next.y>t&&n.next.y!==n.y&&a<(n.next.x-n.x)*(t-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==r);return i}(r,e)&&(f(r.prev,r,e.prev)||f(r,e.prev,e))||g(r,e)&&f(r.prev,r,r.next)>0&&f(e.prev,e,e.next)>0)}function f(r,e,n){return(e.y-r.y)*(n.x-e.x)-(e.x-r.x)*(n.y-e.y)}function g(r,e){return r.x===e.x&&r.y===e.y}function _(r,e,n,i){var a=v(f(r,e,n)),t=v(f(r,e,i)),o=v(f(n,i,r)),c=v(f(n,i,e));return a!==t&&o!==c||!(0!==a||!h(r,n,e))||!(0!==t||!h(r,i,e))||!(0!==o||!h(n,r,i))||!(0!==c||!h(n,e,i))}function h(r,e,n){return e.x<=Math.max(r.x,n.x)&&e.x>=Math.min(r.x,n.x)&&e.y<=Math.max(r.y,n.y)&&e.y>=Math.min(r.y,n.y)}function v(r){return r>0?1:r<0?-1:0}function x(r,e){return f(r.prev,r,r.next)<0?f(r,e,r.next)>=0&&f(r,r.prev,e)>=0:f(r,e,r.prev)<0||f(r,r.next,e)<0}function P(r,e){var n=new S(r.i,r.x,r.y),i=new S(e.i,e.x,e.y),a=r.next,t=e.prev;return r.next=e,e.prev=r,n.next=a,a.prev=n,i.next=n,n.prev=i,t.next=i,i.prev=t,i}function G(r,e,n,i){var a=new S(r,e,n);return i?(a.next=i.next,a.prev=i,i.next.prev=a,i.next=a):(a.prev=a,a.next=a),a}function C(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function S(r,e,n){this.i=r,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(r,e,n,i){for(var a=0,t=e,o=n-i;t0&&(i+=r[a-1].length,n.holes.push(i))}return n}},6688:function(r,e,n){var i=n(78484);r.exports=function(r,e){var n,a=[],t=[],o=[],c={},u=[];function d(r){o[r]=!1,c.hasOwnProperty(r)&&Object.keys(c[r]).forEach((function(e){delete c[r][e],o[e]&&d(e)}))}function s(r){var e,i,a=!1;for(t.push(r),o[r]=!0,e=0;e=e}))}(e);for(var n,a=i(r).components.filter((function(r){return r.length>1})),t=1/0,o=0;o=55296&&_<=56319&&(P+=r[++n]),P=G?m.call(G,C,P,y):P,e?(p.value=P,I(f,y,p)):f[y]=P,++y;g=y}if(void 0===g)for(g=o(r.length),e&&(f=new e(g)),n=0;n0?1:-1}},96936:function(r,e,n){"use strict";var i=n(85608),a=Math.abs,t=Math.floor;r.exports=function(r){return isNaN(r)?0:0!==(r=Number(r))&&isFinite(r)?i(r)*t(a(r)):r}},81304:function(r,e,n){"use strict";var i=n(96936),a=Math.max;r.exports=function(r){return a(0,i(r))}},14428:function(r,e,n){"use strict";var i=n(34044),a=n(9252),t=Function.prototype.bind,o=Function.prototype.call,c=Object.keys,u=Object.prototype.propertyIsEnumerable;r.exports=function(r,e){return function(n,d){var s,l=arguments[2],m=arguments[3];return n=Object(a(n)),i(d),s=c(n),m&&s.sort("function"===typeof m?t.call(m,n):void 0),"function"!==typeof r&&(r=s[r]),o.call(r,s,(function(r,i){return u.call(n,r)?o.call(d,l,n[r],r,n,i):e}))}}},38452:function(r,e,n){"use strict";r.exports=n(96276)()?Object.assign:n(81892)},96276:function(r){"use strict";r.exports=function(){var r,e=Object.assign;return"function"===typeof e&&(e(r={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}},81892:function(r,e,n){"use strict";var i=n(54768),a=n(9252),t=Math.max;r.exports=function(r,e){var n,o,c,u=t(arguments.length,2);for(r=Object(a(r)),c=function(i){try{r[i]=e[i]}catch(a){n||(n=a)}},o=1;o-1}},29768:function(r){"use strict";var e=Object.prototype.toString,n=e.call("");r.exports=function(r){return"string"===typeof r||r&&"object"===typeof r&&(r instanceof String||e.call(r)===n)||!1}},82252:function(r){"use strict";var e=Object.create(null),n=Math.random;r.exports=function(){var r;do{r=n().toString(36).slice(2)}while(e[r]);return r}},52104:function(r,e,n){"use strict";var i,a=n(69932),t=n(71056),o=n(21092),c=n(92664),u=n(85512),d=Object.defineProperty;i=r.exports=function(r,e){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");u.call(this,r),e=e?t.call(e,"key+value")?"key+value":t.call(e,"key")?"key":"value":"value",d(this,"__kind__",o("",e))},a&&a(i,u),delete i.prototype.constructor,i.prototype=Object.create(u.prototype,{_resolve:o((function(r){return"value"===this.__kind__?this.__list__[r]:"key+value"===this.__kind__?[r,this.__list__[r]]:r}))}),d(i.prototype,c.toStringTag,o("c","Array Iterator"))},76024:function(r,e,n){"use strict";var i=n(60948),a=n(34044),t=n(29768),o=n(76252),c=Array.isArray,u=Function.prototype.call,d=Array.prototype.some;r.exports=function(r,e){var n,s,l,m,p,I,y,f,g=arguments[2];if(c(r)||i(r)?n="array":t(r)?n="string":r=o(r),a(e),l=function(){m=!0},"array"!==n)if("string"!==n)for(s=r.next();!s.done;){if(u.call(e,g,s.value,l),m)return;s=r.next()}else for(I=r.length,p=0;p=55296&&f<=56319&&(y+=r[++p]),u.call(e,g,y,l),!m);++p);else d.call(r,(function(r){return u.call(e,g,r,l),m}))}},76252:function(r,e,n){"use strict";var i=n(60948),a=n(29768),t=n(52104),o=n(80940),c=n(52891),u=n(92664).iterator;r.exports=function(r){return"function"===typeof c(r)[u]?r[u]():i(r)?new t(r):a(r)?new o(r):new t(r)}},85512:function(r,e,n){"use strict";var i,a=n(41476),t=n(38452),o=n(34044),c=n(9252),u=n(21092),d=n(27940),s=n(92664),l=Object.defineProperty,m=Object.defineProperties;r.exports=i=function(r,e){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");m(this,{__list__:u("w",c(r)),__context__:u("w",e),__nextIndex__:u("w",0)}),e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete i.prototype.constructor,m(i.prototype,t({_next:u((function(){var r;if(this.__list__)return this.__redo__&&void 0!==(r=this.__redo__.shift())?r:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,n){e>=r&&(this.__redo__[n]=++e)}),this),this.__redo__.push(r)):l(this,"__redo__",u("c",[r])))})),_onDelete:u((function(r){var e;r>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(r))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,n){e>r&&(this.__redo__[n]=--e)}),this)))})),_onClear:u((function(){this.__redo__&&a.call(this.__redo__),this.__nextIndex__=0}))}))),l(i.prototype,s.iterator,u((function(){return this})))},76368:function(r,e,n){"use strict";var i=n(60948),a=n(42584),t=n(29768),o=n(92664).iterator,c=Array.isArray;r.exports=function(r){return!!a(r)&&(!!c(r)||!!t(r)||!!i(r)||"function"===typeof r[o])}},80940:function(r,e,n){"use strict";var i,a=n(69932),t=n(21092),o=n(92664),c=n(85512),u=Object.defineProperty;i=r.exports=function(r){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");r=String(r),c.call(this,r),u(this,"__length__",t("",r.length))},a&&a(i,c),delete i.prototype.constructor,i.prototype=Object.create(c.prototype,{_next:t((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?n+this.__list__[this.__nextIndex__++]:n}))}),u(i.prototype,o.toStringTag,t("c","String Iterator"))},52891:function(r,e,n){"use strict";var i=n(76368);r.exports=function(r){if(!i(r))throw new TypeError(r+" is not iterable");return r}},60964:function(r){"use strict";function e(r,e){if(void 0===r||null===r)throw new TypeError("Cannot convert first argument to object");for(var n=Object(r),i=1;i0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=r,s.type=e,s.count=o.length,d=s,console&&console.warn&&console.warn(d)}return r}function s(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(r,e,n){var i={fired:!1,wrapFn:void 0,target:r,type:e,listener:n},a=s.bind(i);return a.listener=n,i.wrapFn=a,a}function m(r,e,n){var i=r._events;if(void 0===i)return[];var a=i[e];return void 0===a?[]:"function"===typeof a?n?[a.listener||a]:[a]:n?function(r){for(var e=new Array(r.length),n=0;n0&&(o=e[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var u=t[r];if(void 0===u)return!1;if("function"===typeof u)i(u,this,e);else{var d=u.length,s=I(u,d);for(n=0;n=0;t--)if(n[t]===e||n[t].listener===e){o=n[t].listener,a=t;break}if(a<0)return this;0===a?n.shift():function(r,e){for(;e+1=0;i--)this.removeListener(r,e[i]);return this},t.prototype.listeners=function(r){return m(this,r,!0)},t.prototype.rawListeners=function(r){return m(this,r,!1)},t.listenerCount=function(r,e){return"function"===typeof r.listenerCount?r.listenerCount(e):p.call(r,e)},t.prototype.listenerCount=p,t.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},39072:function(r){var e=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};r.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(r){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},12296:function(r,e,n){"use strict";r.exports=n(45072)()?globalThis:n(39072)},45072:function(r){"use strict";r.exports=function(){return"object"===typeof globalThis&&!!globalThis&&globalThis.Array===Array}},38248:function(r,e,n){"use strict";var i=n(94576);r.exports=function(r){var e=typeof r;if("string"===e){var n=r;if(0===(r=+r)&&i(n))return!1}else if("number"!==e)return!1;return r-r<1}},47520:function(r,e,n){var i=n(72512);r.exports=function(r,e,n){if(!r)throw new TypeError("must specify data as first parameter");if(n=0|+(n||0),Array.isArray(r)&&r[0]&&"number"===typeof r[0][0]){var a,t,o,c,u=r[0].length,d=r.length*u;e&&"string"!==typeof e||(e=new(i(e||"float32"))(d+n));var s=e.length-n;if(d!==s)throw new Error("source length "+d+" ("+u+"x"+r.length+") does not match destination length "+s);for(a=0,o=n;ae[0]-o[0]/2&&(m=o[0]/2,p+=o[1]);return n}},71920:function(r){"use strict";function e(r,t){t||(t={}),("string"===typeof r||Array.isArray(r))&&(t.family=r);var o=Array.isArray(t.family)?t.family.join(", "):t.family;if(!o)throw Error("`family` must be defined");var c=t.size||t.fontSize||t.em||48,u=t.weight||t.fontWeight||"",d=(r=[t.style||t.fontStyle||"",u,c].join(" ")+"px "+o,t.origin||"top");if(e.cache[o]&&c<=e.cache[o].em)return n(e.cache[o],d);var s=t.canvas||e.canvas,l=s.getContext("2d"),m={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"},p=Math.ceil(1.5*c);s.height=p,s.width=.5*p,l.font=r;var I="H",y={top:0};l.clearRect(0,0,p,p),l.textBaseline="top",l.fillStyle="black",l.fillText(I,0,0);var f=i(l.getImageData(0,0,p,p));l.clearRect(0,0,p,p),l.textBaseline="bottom",l.fillText(I,0,p);var g=i(l.getImageData(0,0,p,p));y.lineHeight=y.bottom=p-g+f,l.clearRect(0,0,p,p),l.textBaseline="alphabetic",l.fillText(I,0,p);var _=p-i(l.getImageData(0,0,p,p))-1+f;y.baseline=y.alphabetic=_,l.clearRect(0,0,p,p),l.textBaseline="middle",l.fillText(I,0,.5*p);var h=i(l.getImageData(0,0,p,p));y.median=y.middle=p-h-1+f-.5*p,l.clearRect(0,0,p,p),l.textBaseline="hanging",l.fillText(I,0,.5*p);var v=i(l.getImageData(0,0,p,p));y.hanging=p-v-1+f-.5*p,l.clearRect(0,0,p,p),l.textBaseline="ideographic",l.fillText(I,0,p);var x=i(l.getImageData(0,0,p,p));if(y.ideographic=p-x-1+f,m.upper&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.upper,0,0),y.upper=i(l.getImageData(0,0,p,p)),y.capHeight=y.baseline-y.upper),m.lower&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.lower,0,0),y.lower=i(l.getImageData(0,0,p,p)),y.xHeight=y.baseline-y.lower),m.tittle&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.tittle,0,0),y.tittle=i(l.getImageData(0,0,p,p))),m.ascent&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.ascent,0,0),y.ascent=i(l.getImageData(0,0,p,p))),m.descent&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.descent,0,0),y.descent=a(l.getImageData(0,0,p,p))),m.overshoot){l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.overshoot,0,0);var P=a(l.getImageData(0,0,p,p));y.overshoot=P-_}for(var G in y)y[G]/=c;return y.em=c,e.cache[o]=y,n(y,d)}function n(r,e){var n={};for(var i in"string"===typeof e&&(e=r[e]),r)"em"!==i&&(n[i]=r[i]-e);return n}function i(r){for(var e=r.height,n=r.data,i=3;i0;i-=4)if(0!==n[i])return Math.floor(.25*(i-3)/e)}r.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},46492:function(r,e,n){"use strict";var i=n(90720),a=Object.prototype.toString,t=Object.prototype.hasOwnProperty;r.exports=function(r,e,n){if(!i(e))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=n),"[object Array]"===a.call(r)?function(r,e,n){for(var i=0,a=r.length;i1&&"boolean"!==typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,r))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(r){var e=S(r,0,1),n=S(r,-1);if("%"===e&&"%"!==n)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new a("invalid intrinsic syntax, expected opening `%`");var i=[];return C(r,b,(function(r,e,n,a){i[i.length]=n?C(a,M,"$1"):e||r})),i}(r),i=n.length>0?n[0]:"",t=B("%"+i+"%",e),c=t.name,d=t.value,s=!1,l=t.alias;l&&(i=l[0],G(n,P([0,1],l)));for(var m=1,p=!0;m=n.length){var _=u(d,I);d=(p=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:d[I]}else p=x(d,I),d=d[I];p&&!s&&(f[c]=d)}}return d}},12408:function(r){r.exports=function(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=e[4],c=e[5],u=e[6],d=e[7],s=e[8],l=e[9],m=e[10],p=e[11],I=e[12],y=e[13],f=e[14],g=e[15];return r[0]=c*(m*g-p*f)-l*(u*g-d*f)+y*(u*p-d*m),r[1]=-(i*(m*g-p*f)-l*(a*g-t*f)+y*(a*p-t*m)),r[2]=i*(u*g-d*f)-c*(a*g-t*f)+y*(a*d-t*u),r[3]=-(i*(u*p-d*m)-c*(a*p-t*m)+l*(a*d-t*u)),r[4]=-(o*(m*g-p*f)-s*(u*g-d*f)+I*(u*p-d*m)),r[5]=n*(m*g-p*f)-s*(a*g-t*f)+I*(a*p-t*m),r[6]=-(n*(u*g-d*f)-o*(a*g-t*f)+I*(a*d-t*u)),r[7]=n*(u*p-d*m)-o*(a*p-t*m)+s*(a*d-t*u),r[8]=o*(l*g-p*y)-s*(c*g-d*y)+I*(c*p-d*l),r[9]=-(n*(l*g-p*y)-s*(i*g-t*y)+I*(i*p-t*l)),r[10]=n*(c*g-d*y)-o*(i*g-t*y)+I*(i*d-t*c),r[11]=-(n*(c*p-d*l)-o*(i*p-t*l)+s*(i*d-t*c)),r[12]=-(o*(l*f-m*y)-s*(c*f-u*y)+I*(c*m-u*l)),r[13]=n*(l*f-m*y)-s*(i*f-a*y)+I*(i*m-a*l),r[14]=-(n*(c*f-u*y)-o*(i*f-a*y)+I*(i*u-a*c)),r[15]=n*(c*m-u*l)-o*(i*m-a*l)+s*(i*u-a*c),r}},76860:function(r){r.exports=function(r){var e=new Float32Array(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}},64492:function(r){r.exports=function(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}},54212:function(r){r.exports=function(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},70800:function(r){r.exports=function(r){var e=r[0],n=r[1],i=r[2],a=r[3],t=r[4],o=r[5],c=r[6],u=r[7],d=r[8],s=r[9],l=r[10],m=r[11],p=r[12],I=r[13],y=r[14],f=r[15];return(e*o-n*t)*(l*f-m*y)-(e*c-i*t)*(s*f-m*I)+(e*u-a*t)*(s*y-l*I)+(n*c-i*o)*(d*f-m*p)-(n*u-a*o)*(d*y-l*p)+(i*u-a*c)*(d*I-s*p)}},61784:function(r){r.exports=function(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=n+n,c=i+i,u=a+a,d=n*o,s=i*o,l=i*c,m=a*o,p=a*c,I=a*u,y=t*o,f=t*c,g=t*u;return r[0]=1-l-I,r[1]=s+g,r[2]=m-f,r[3]=0,r[4]=s-g,r[5]=1-d-I,r[6]=p+y,r[7]=0,r[8]=m+f,r[9]=p-y,r[10]=1-d-l,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},91616:function(r){r.exports=function(r,e,n){var i,a,t,o=n[0],c=n[1],u=n[2],d=Math.sqrt(o*o+c*c+u*u);return Math.abs(d)<1e-6?null:(o*=d=1/d,c*=d,u*=d,i=Math.sin(e),a=Math.cos(e),t=1-a,r[0]=o*o*t+a,r[1]=c*o*t+u*i,r[2]=u*o*t-c*i,r[3]=0,r[4]=o*c*t-u*i,r[5]=c*c*t+a,r[6]=u*c*t+o*i,r[7]=0,r[8]=o*u*t+c*i,r[9]=c*u*t-o*i,r[10]=u*u*t+a,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r)}},51944:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3],c=i+i,u=a+a,d=t+t,s=i*c,l=i*u,m=i*d,p=a*u,I=a*d,y=t*d,f=o*c,g=o*u,_=o*d;return r[0]=1-(p+y),r[1]=l+_,r[2]=m-g,r[3]=0,r[4]=l-_,r[5]=1-(s+y),r[6]=I+f,r[7]=0,r[8]=m+g,r[9]=I-f,r[10]=1-(s+p),r[11]=0,r[12]=n[0],r[13]=n[1],r[14]=n[2],r[15]=1,r}},69444:function(r){r.exports=function(r,e){return r[0]=e[0],r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=e[1],r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=e[2],r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},48268:function(r){r.exports=function(r,e){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=e[0],r[13]=e[1],r[14]=e[2],r[15]=1,r}},21856:function(r){r.exports=function(r,e){var n=Math.sin(e),i=Math.cos(e);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=i,r[6]=n,r[7]=0,r[8]=0,r[9]=-n,r[10]=i,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},79216:function(r){r.exports=function(r,e){var n=Math.sin(e),i=Math.cos(e);return r[0]=i,r[1]=0,r[2]=-n,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=n,r[9]=0,r[10]=i,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},57736:function(r){r.exports=function(r,e){var n=Math.sin(e),i=Math.cos(e);return r[0]=i,r[1]=n,r[2]=0,r[3]=0,r[4]=-n,r[5]=i,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},38848:function(r){r.exports=function(r,e,n,i,a,t,o){var c=1/(n-e),u=1/(a-i),d=1/(t-o);return r[0]=2*t*c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=2*t*u,r[6]=0,r[7]=0,r[8]=(n+e)*c,r[9]=(a+i)*u,r[10]=(o+t)*d,r[11]=-1,r[12]=0,r[13]=0,r[14]=o*t*2*d,r[15]=0,r}},36635:function(r){r.exports=function(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},36524:function(r,e,n){r.exports={create:n(54212),clone:n(76860),copy:n(64492),identity:n(36635),transpose:n(86520),invert:n(4308),adjoint:n(12408),determinant:n(70800),multiply:n(80944),translate:n(35176),scale:n(68152),rotate:n(30016),rotateX:n(15456),rotateY:n(64840),rotateZ:n(4192),fromRotation:n(91616),fromRotationTranslation:n(51944),fromScaling:n(69444),fromTranslation:n(48268),fromXRotation:n(21856),fromYRotation:n(79216),fromZRotation:n(57736),fromQuat:n(61784),frustum:n(38848),perspective:n(51296),perspectiveFromFieldOfView:n(63688),ortho:n(97688),lookAt:n(56508),str:n(89412)}},4308:function(r){r.exports=function(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=e[4],c=e[5],u=e[6],d=e[7],s=e[8],l=e[9],m=e[10],p=e[11],I=e[12],y=e[13],f=e[14],g=e[15],_=n*c-i*o,h=n*u-a*o,v=n*d-t*o,x=i*u-a*c,P=i*d-t*c,G=a*d-t*u,C=s*y-l*I,S=s*f-m*I,A=s*g-p*I,b=l*f-m*y,M=l*g-p*y,B=m*g-p*f,k=_*B-h*M+v*b+x*A-P*S+G*C;return k?(k=1/k,r[0]=(c*B-u*M+d*b)*k,r[1]=(a*M-i*B-t*b)*k,r[2]=(y*G-f*P+g*x)*k,r[3]=(m*P-l*G-p*x)*k,r[4]=(u*A-o*B-d*S)*k,r[5]=(n*B-a*A+t*S)*k,r[6]=(f*v-I*G-g*h)*k,r[7]=(s*G-m*v+p*h)*k,r[8]=(o*M-c*A+d*C)*k,r[9]=(i*A-n*M-t*C)*k,r[10]=(I*P-y*v+g*_)*k,r[11]=(l*v-s*P-p*_)*k,r[12]=(c*S-o*b-u*C)*k,r[13]=(n*b-i*S+a*C)*k,r[14]=(y*h-I*x-f*_)*k,r[15]=(s*x-l*h+m*_)*k,r):null}},56508:function(r,e,n){var i=n(36635);r.exports=function(r,e,n,a){var t,o,c,u,d,s,l,m,p,I,y=e[0],f=e[1],g=e[2],_=a[0],h=a[1],v=a[2],x=n[0],P=n[1],G=n[2];return Math.abs(y-x)<1e-6&&Math.abs(f-P)<1e-6&&Math.abs(g-G)<1e-6?i(r):(l=y-x,m=f-P,p=g-G,I=1/Math.sqrt(l*l+m*m+p*p),t=h*(p*=I)-v*(m*=I),o=v*(l*=I)-_*p,c=_*m-h*l,(I=Math.sqrt(t*t+o*o+c*c))?(t*=I=1/I,o*=I,c*=I):(t=0,o=0,c=0),u=m*c-p*o,d=p*t-l*c,s=l*o-m*t,(I=Math.sqrt(u*u+d*d+s*s))?(u*=I=1/I,d*=I,s*=I):(u=0,d=0,s=0),r[0]=t,r[1]=u,r[2]=l,r[3]=0,r[4]=o,r[5]=d,r[6]=m,r[7]=0,r[8]=c,r[9]=s,r[10]=p,r[11]=0,r[12]=-(t*y+o*f+c*g),r[13]=-(u*y+d*f+s*g),r[14]=-(l*y+m*f+p*g),r[15]=1,r)}},80944:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3],c=e[4],u=e[5],d=e[6],s=e[7],l=e[8],m=e[9],p=e[10],I=e[11],y=e[12],f=e[13],g=e[14],_=e[15],h=n[0],v=n[1],x=n[2],P=n[3];return r[0]=h*i+v*c+x*l+P*y,r[1]=h*a+v*u+x*m+P*f,r[2]=h*t+v*d+x*p+P*g,r[3]=h*o+v*s+x*I+P*_,h=n[4],v=n[5],x=n[6],P=n[7],r[4]=h*i+v*c+x*l+P*y,r[5]=h*a+v*u+x*m+P*f,r[6]=h*t+v*d+x*p+P*g,r[7]=h*o+v*s+x*I+P*_,h=n[8],v=n[9],x=n[10],P=n[11],r[8]=h*i+v*c+x*l+P*y,r[9]=h*a+v*u+x*m+P*f,r[10]=h*t+v*d+x*p+P*g,r[11]=h*o+v*s+x*I+P*_,h=n[12],v=n[13],x=n[14],P=n[15],r[12]=h*i+v*c+x*l+P*y,r[13]=h*a+v*u+x*m+P*f,r[14]=h*t+v*d+x*p+P*g,r[15]=h*o+v*s+x*I+P*_,r}},97688:function(r){r.exports=function(r,e,n,i,a,t,o){var c=1/(e-n),u=1/(i-a),d=1/(t-o);return r[0]=-2*c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*u,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*d,r[11]=0,r[12]=(e+n)*c,r[13]=(a+i)*u,r[14]=(o+t)*d,r[15]=1,r}},51296:function(r){r.exports=function(r,e,n,i,a){var t=1/Math.tan(e/2),o=1/(i-a);return r[0]=t/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=t,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(a+i)*o,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*a*i*o,r[15]=0,r}},63688:function(r){r.exports=function(r,e,n,i){var a=Math.tan(e.upDegrees*Math.PI/180),t=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),c=Math.tan(e.rightDegrees*Math.PI/180),u=2/(o+c),d=2/(a+t);return r[0]=u,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=d,r[6]=0,r[7]=0,r[8]=-(o-c)*u*.5,r[9]=(a-t)*d*.5,r[10]=i/(n-i),r[11]=-1,r[12]=0,r[13]=0,r[14]=i*n/(n-i),r[15]=0,r}},30016:function(r){r.exports=function(r,e,n,i){var a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b,M=i[0],B=i[1],k=i[2],F=Math.sqrt(M*M+B*B+k*k);return Math.abs(F)<1e-6?null:(M*=F=1/F,B*=F,k*=F,a=Math.sin(n),t=Math.cos(n),o=1-t,c=e[0],u=e[1],d=e[2],s=e[3],l=e[4],m=e[5],p=e[6],I=e[7],y=e[8],f=e[9],g=e[10],_=e[11],h=M*M*o+t,v=B*M*o+k*a,x=k*M*o-B*a,P=M*B*o-k*a,G=B*B*o+t,C=k*B*o+M*a,S=M*k*o+B*a,A=B*k*o-M*a,b=k*k*o+t,r[0]=c*h+l*v+y*x,r[1]=u*h+m*v+f*x,r[2]=d*h+p*v+g*x,r[3]=s*h+I*v+_*x,r[4]=c*P+l*G+y*C,r[5]=u*P+m*G+f*C,r[6]=d*P+p*G+g*C,r[7]=s*P+I*G+_*C,r[8]=c*S+l*A+y*b,r[9]=u*S+m*A+f*b,r[10]=d*S+p*A+g*b,r[11]=s*S+I*A+_*b,e!==r&&(r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r)}},15456:function(r){r.exports=function(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[4],o=e[5],c=e[6],u=e[7],d=e[8],s=e[9],l=e[10],m=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=t*a+d*i,r[5]=o*a+s*i,r[6]=c*a+l*i,r[7]=u*a+m*i,r[8]=d*a-t*i,r[9]=s*a-o*i,r[10]=l*a-c*i,r[11]=m*a-u*i,r}},64840:function(r){r.exports=function(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[0],o=e[1],c=e[2],u=e[3],d=e[8],s=e[9],l=e[10],m=e[11];return e!==r&&(r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=t*a-d*i,r[1]=o*a-s*i,r[2]=c*a-l*i,r[3]=u*a-m*i,r[8]=t*i+d*a,r[9]=o*i+s*a,r[10]=c*i+l*a,r[11]=u*i+m*a,r}},4192:function(r){r.exports=function(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[0],o=e[1],c=e[2],u=e[3],d=e[4],s=e[5],l=e[6],m=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=t*a+d*i,r[1]=o*a+s*i,r[2]=c*a+l*i,r[3]=u*a+m*i,r[4]=d*a-t*i,r[5]=s*a-o*i,r[6]=l*a-c*i,r[7]=m*a-u*i,r}},68152:function(r){r.exports=function(r,e,n){var i=n[0],a=n[1],t=n[2];return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r[3]=e[3]*i,r[4]=e[4]*a,r[5]=e[5]*a,r[6]=e[6]*a,r[7]=e[7]*a,r[8]=e[8]*t,r[9]=e[9]*t,r[10]=e[10]*t,r[11]=e[11]*t,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}},89412:function(r){r.exports=function(r){return"mat4("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+", "+r[6]+", "+r[7]+", "+r[8]+", "+r[9]+", "+r[10]+", "+r[11]+", "+r[12]+", "+r[13]+", "+r[14]+", "+r[15]+")"}},35176:function(r){r.exports=function(r,e,n){var i,a,t,o,c,u,d,s,l,m,p,I,y=n[0],f=n[1],g=n[2];return e===r?(r[12]=e[0]*y+e[4]*f+e[8]*g+e[12],r[13]=e[1]*y+e[5]*f+e[9]*g+e[13],r[14]=e[2]*y+e[6]*f+e[10]*g+e[14],r[15]=e[3]*y+e[7]*f+e[11]*g+e[15]):(i=e[0],a=e[1],t=e[2],o=e[3],c=e[4],u=e[5],d=e[6],s=e[7],l=e[8],m=e[9],p=e[10],I=e[11],r[0]=i,r[1]=a,r[2]=t,r[3]=o,r[4]=c,r[5]=u,r[6]=d,r[7]=s,r[8]=l,r[9]=m,r[10]=p,r[11]=I,r[12]=i*y+c*f+l*g+e[12],r[13]=a*y+u*f+m*g+e[13],r[14]=t*y+d*f+p*g+e[14],r[15]=o*y+s*f+I*g+e[15]),r}},86520:function(r){r.exports=function(r,e){if(r===e){var n=e[1],i=e[2],a=e[3],t=e[6],o=e[7],c=e[11];r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=n,r[6]=e[9],r[7]=e[13],r[8]=i,r[9]=t,r[11]=e[14],r[12]=a,r[13]=o,r[14]=c}else r[0]=e[0],r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=e[1],r[5]=e[5],r[6]=e[9],r[7]=e[13],r[8]=e[2],r[9]=e[6],r[10]=e[10],r[11]=e[14],r[12]=e[3],r[13]=e[7],r[14]=e[11],r[15]=e[15];return r}},23352:function(r,e,n){"use strict";var i=n(42771),a=n(55616),t=n(28624),o=n(55212),c=n(60463),u=n(72160),d=n(33888),s=n(14144),l=n(51160),m=n(58908),p=n(65819),I=n(23464),y=n(63768),f=n(50896),g=n(71920),_=n(47520),h=n(308).nextPow2,v=new c,x=!1;if(document.body){var P=document.body.appendChild(document.createElement("div"));P.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(P).fontStretch&&(x=!0),document.body.removeChild(P)}var G=function(r){!function(r){return"function"===typeof r&&r._gl&&r.prop&&r.texture&&r.buffer}(r)?this.gl=o(r):(r={regl:r},this.gl=r.regl._gl),this.shader=v.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=r.regl||t({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(),v.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(m(r)?r:{})};G.prototype.createShader=function(){var r=this.regl,e=r({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:r.prop("count"),offset:r.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:r.this("sizeBuffer")},width:{offset:0,stride:8,buffer:r.this("sizeBuffer")},char:r.this("charBuffer"),position:r.this("position")},uniforms:{atlasSize:function(r,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(r,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(r,e){return e.atlas.texture},charStep:function(r,e){return e.atlas.step},em:function(r,e){return e.atlas.em},color:r.prop("color"),opacity:r.prop("opacity"),viewport:r.this("viewportArray"),scale:r.this("scale"),align:r.prop("align"),baseline:r.prop("baseline"),translate:r.this("translate"),positionOffset:r.prop("positionOffset")},primitive:"points",viewport:r.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\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\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\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 float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\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:r,draw:e,atlas:{}}},G.prototype.update=function(r){var e=this;if("string"===typeof r)r={text:r};else if(!r)return;null!=(r=a(r,{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(r.opacity)?this.opacity=r.opacity.map((function(r){return parseFloat(r)})):this.opacity=parseFloat(r.opacity)),null!=r.viewport&&(this.viewport=l(r.viewport),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!=r.kerning&&(this.kerning=r.kerning),null!=r.offset&&("number"===typeof r.offset&&(r.offset=[r.offset,0]),this.positionOffset=_(r.offset)),r.direction&&(this.direction=r.direction),r.range&&(this.range=r.range,this.scale=[1/(r.range[2]-r.range[0]),1/(r.range[3]-r.range[1])],this.translate=[-r.range[0],-r.range[1]]),r.scale&&(this.scale=r.scale),r.translate&&(this.translate=r.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||r.font||(r.font=G.baseFontSize+"px sans-serif");var n,t=!1,o=!1;if(r.font&&(Array.isArray(r.font)?r.font:[r.font]).forEach((function(r,n){if("string"===typeof r)try{r=i.parse(r)}catch(_){r=i.parse(G.baseFontSize+"px "+r)}else{var a=r.style,c=r.weight,u=r.stretch,d=r.variant;r=i.parse(i.stringify(r)),a&&(r.style=a),c&&(r.weight=c),u&&(r.stretch=u),d&&(r.variant=d)}var s=i.stringify({size:G.baseFontSize,family:r.family,stretch:x?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style}),l=p(r.size),m=Math.round(l[0]*I(l[1]));if(m!==e.fontSize[n]&&(o=!0,e.fontSize[n]=m),(!e.font[n]||s!=e.font[n].baseString)&&(t=!0,e.font[n]=G.fonts[s],!e.font[n])){var y=r.family.join(", "),f=[r.style];r.style!=r.variant&&f.push(r.variant),r.variant!=r.weight&&f.push(r.weight),x&&r.weight!=r.stretch&&f.push(r.stretch),e.font[n]={baseString:s,family:y,weight:r.weight,stretch:r.stretch,style:r.style,variant:r.variant,width:{},kerning:{},metrics:g(y,{origin:"top",fontSize:G.baseFontSize,fontStyle:f.join(" ")})},G.fonts[s]=e.font[n]}})),(t||o)&&this.font.forEach((function(n,a){var t=i.stringify({size:e.fontSize[a],family:n.family,stretch:x?n.stretch:void 0,variant:n.variant,weight:n.weight,style:n.style});if(e.fontAtlas[a]=e.shader.atlas[t],!e.fontAtlas[a]){var o=n.metrics;e.shader.atlas[t]=e.fontAtlas[a]={fontString:t,step:2*Math.ceil(e.fontSize[a]*o.bottom*.5),em:e.fontSize[a],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==r.text&&(r.text=e.text)})),"string"===typeof r.text&&r.position&&r.position.length>2){for(var c=Array(.5*r.position.length),m=0;m2){for(var P=!r.position[0].length,C=s.mallocFloat(2*this.count),S=0,A=0;S1?e.align[n]:e.align[0]:e.align;if("number"===typeof i)return i;switch(i){case"right":case"end":return-r;case"center":case"centre":case"middle":return.5*-r}return 0}))),null==this.baseline&&null==r.baseline&&(r.baseline=0),null!=r.baseline&&(this.baseline=r.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(r,n){var i=(e.font[n]||e.font[0]).metrics,a=0;return a+=.5*i.bottom,a+="number"===typeof r?r-i.baseline:-i[r],a*=-1}))),null!=r.color)if(r.color||(r.color="transparent"),"string"!==typeof r.color&&isNaN(r.color)){var K;if("number"===typeof r.color[0]&&r.color.length>this.counts.length){var V=r.color.length;K=s.mallocUint8(V);for(var j=(r.color.subarray||r.color.slice).bind(r.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Y=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(Y);for(var X=0;X1?this.counts[X]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[X]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*X,4*X+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[X]:this.opacity,baseline:null!=this.baselineOffset[X]?this.baselineOffset[X]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[X]?this.alignOffset[X]:this.alignOffset[0]:0,atlas:this.fontAtlas[X]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*X,2*X+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=[]},G.prototype.destroy=function(){},G.prototype.kerning=!0,G.prototype.position={constant:new Float32Array(2)},G.prototype.translate=null,G.prototype.scale=null,G.prototype.font=null,G.prototype.text="",G.prototype.positionOffset=[0,0],G.prototype.opacity=1,G.prototype.color=new Uint8Array([0,0,0,255]),G.prototype.alignOffset=[0,0],G.maxAtlasSize=1024,G.atlasCanvas=document.createElement("canvas"),G.atlasContext=G.atlasCanvas.getContext("2d",{alpha:!1}),G.baseFontSize=64,G.fonts={},r.exports=G},55212:function(r,e,n){"use strict";var i=n(55616);function a(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*n.g.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*n.g.innerHeight);else{var e=r.container.getBoundingClientRect();r.canvas.width=r.width||e.right-e.left,r.canvas.height=r.height||e.bottom-e.top}}function t(r){return"function"===typeof r.getContext&&"width"in r&&"height"in r}function o(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}r.exports=function(r){var e;if(r?"string"===typeof r&&(r={container:r}):r={},(r=t(r)||"string"===typeof(e=r).nodeName&&"function"===typeof e.appendChild&&"function"===typeof e.getBoundingClientRect?{container:r}:function(r){return"function"===typeof r.drawArrays||"function"===typeof r.drawElements}(r)?{gl:r}:i(r,{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||(r.pixelRatio=n.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if("string"===typeof r.container){var c=document.querySelector(r.container);if(!c)throw Error("Element "+r.container+" is not found");r.container=c}t(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=o(),r.container.appendChild(r.canvas),a(r))}else if(!r.canvas){if("undefined"===typeof document)throw Error("Not DOM environment. Use headless-gl.");r.container=document.body||document.documentElement,r.canvas=o(),r.container.appendChild(r.canvas),a(r)}return r.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(n){try{r.gl=r.canvas.getContext(n,r.attrs)}catch(e){}return r.gl})),r.gl}},26444:function(r){r.exports=function(r){"string"===typeof r&&(r=[r]);for(var e=[].slice.call(arguments,1),n=[],i=0;i>1,s=-7,l=n?a-1:0,m=n?-1:1,p=r[e+l];for(l+=m,t=p&(1<<-s)-1,p>>=-s,s+=c;s>0;t=256*t+r[e+l],l+=m,s-=8);for(o=t&(1<<-s)-1,t>>=-s,s+=i;s>0;o=256*o+r[e+l],l+=m,s-=8);if(0===t)t=1-d;else{if(t===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),t-=d}return(p?-1:1)*o*Math.pow(2,t-i)},e.write=function(r,e,n,i,a,t){var o,c,u,d=8*t-a-1,s=(1<>1,m=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:t-1,I=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=s):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+l>=1?m/u:m*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=s?(c=0,o=s):o+l>=1?(c=(e*u-1)*Math.pow(2,a),o+=l):(c=e*Math.pow(2,l-1)*Math.pow(2,a),o=0));a>=8;r[n+p]=255&c,p+=I,c/=256,a-=8);for(o=o<0;r[n+p]=255&o,p+=I,o/=256,d-=8);r[n+p-I]|=128*y}},6768:function(r){"function"===typeof Object.create?r.exports=function(r,e){e&&(r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:r.exports=function(r,e){if(e){r.super_=e;var n=function(){};n.prototype=e.prototype,r.prototype=new n,r.prototype.constructor=r}}},91148:function(r,e,n){"use strict";var i=n(46672)(),a=n(99676)("Object.prototype.toString"),t=function(r){return!(i&&r&&"object"===typeof r&&Symbol.toStringTag in r)&&"[object Arguments]"===a(r)},o=function(r){return!!t(r)||null!==r&&"object"===typeof r&&"number"===typeof r.length&&r.length>=0&&"[object Array]"!==a(r)&&"[object Function]"===a(r.callee)},c=function(){return t(arguments)}();t.isLegacyArguments=o,r.exports=c?t:o},24200:function(r){r.exports=!0},90720:function(r){"use strict";var e,n,i=Function.prototype.toString,a="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof a&&"function"===typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw n}}),n={},a((function(){throw 42}),null,e)}catch(p){p!==n&&(a=null)}else a=null;var t=/^\s*class\b/,o=function(r){try{var e=i.call(r);return t.test(e)}catch(n){return!1}},c=function(r){try{return!o(r)&&(i.call(r),!0)}catch(e){return!1}},u=Object.prototype.toString,d="function"===typeof Symbol&&!!Symbol.toStringTag,s=!(0 in[,]),l=function(){return!1};if("object"===typeof document){var m=document.all;u.call(m)===u.call(document.all)&&(l=function(r){if((s||!r)&&("undefined"===typeof r||"object"===typeof r))try{var e=u.call(r);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==r("")}catch(n){}return!1})}r.exports=a?function(r){if(l(r))return!0;if(!r)return!1;if("function"!==typeof r&&"object"!==typeof r)return!1;try{a(r,null,e)}catch(i){if(i!==n)return!1}return!o(r)&&c(r)}:function(r){if(l(r))return!0;if(!r)return!1;if("function"!==typeof r&&"object"!==typeof r)return!1;if(d)return c(r);if(o(r))return!1;var e=u.call(r);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&c(r)}},84420:function(r,e,n){"use strict";var i,a=Object.prototype.toString,t=Function.prototype.toString,o=/^\s*(?:function)?\*/,c=n(46672)(),u=Object.getPrototypeOf;r.exports=function(r){if("function"!==typeof r)return!1;if(o.test(t.call(r)))return!0;if(!c)return"[object GeneratorFunction]"===a.call(r);if(!u)return!1;if("undefined"===typeof i){var e=function(){if(!c)return!1;try{return Function("return function*() {}")()}catch(r){}}();i=!!e&&u(e)}return u(r)===i}},96604:function(r){"use strict";r.exports="undefined"!==typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(r){"use strict";r.exports=function(r){return r!==r}},1560:function(r,e,n){"use strict";var i=n(57916),a=n(81288),t=n(85992),o=n(57740),c=n(59736),u=i(o(),Number);a(u,{getPolyfill:o,implementation:t,shim:c}),r.exports=u},57740:function(r,e,n){"use strict";var i=n(85992);r.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:i}},59736:function(r,e,n){"use strict";var i=n(81288),a=n(57740);r.exports=function(){var r=a();return i(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r}},18400:function(r){"use strict";r.exports=function(r){var e=typeof r;return null!==r&&("object"===e||"function"===e)}},58908:function(r){"use strict";var e=Object.prototype.toString;r.exports=function(r){var n;return"[object Object]"===e.call(r)&&(null===(n=Object.getPrototypeOf(r))||n===Object.getPrototypeOf({}))}},94576:function(r){"use strict";r.exports=function(r){for(var e,n=r.length,i=0;i13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},53520:function(r){"use strict";r.exports=function(r){return"string"===typeof r&&(r=r.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(r)&&/[\dz]$/i.test(r)&&r.length>4))}},7728:function(r,e,n){"use strict";var i=n(46492),a=n(63436),t=n(99676),o=t("Object.prototype.toString"),c=n(46672)(),u=n(2304),d="undefined"===typeof globalThis?n.g:globalThis,s=a(),l=t("Array.prototype.indexOf",!0)||function(r,e){for(var n=0;n-1}return!!u&&function(r){var e=!1;return i(p,(function(n,i){if(!e)try{e=n.call(r)===i}catch(a){}})),e}(r)}},76244:function(r){"use strict";r.exports=Math.log2||function(r){return Math.log(r)*Math.LOG2E}},62644:function(r,e,n){"use strict";r.exports=function(r,e){e||(e=r,r=window);var n=0,a=0,t=0,o={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function u(r){var e=!1;return"altKey"in r&&(e=e||r.altKey!==o.alt,o.alt=!!r.altKey),"shiftKey"in r&&(e=e||r.shiftKey!==o.shift,o.shift=!!r.shiftKey),"ctrlKey"in r&&(e=e||r.ctrlKey!==o.control,o.control=!!r.ctrlKey),"metaKey"in r&&(e=e||r.metaKey!==o.meta,o.meta=!!r.metaKey),e}function d(r,c){var d=i.x(c),s=i.y(c);"buttons"in c&&(r=0|c.buttons),(r!==n||d!==a||s!==t||u(c))&&(n=0|r,a=d||0,t=s||0,e&&e(n,a,t,o))}function s(r){d(0,r)}function l(){(n||a||t||o.shift||o.alt||o.meta||o.control)&&(a=t=0,n=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function m(r){u(r)&&e&&e(n,a,t,o)}function p(r){0===i.buttons(r)?d(0,r):d(n,r)}function I(r){d(n|i.buttons(r),r)}function y(r){d(n&~i.buttons(r),r)}function f(){c||(c=!0,r.addEventListener("mousemove",p),r.addEventListener("mousedown",I),r.addEventListener("mouseup",y),r.addEventListener("mouseleave",s),r.addEventListener("mouseenter",s),r.addEventListener("mouseout",s),r.addEventListener("mouseover",s),r.addEventListener("blur",l),r.addEventListener("keyup",m),r.addEventListener("keydown",m),r.addEventListener("keypress",m),r!==window&&(window.addEventListener("blur",l),window.addEventListener("keyup",m),window.addEventListener("keydown",m),window.addEventListener("keypress",m)))}f();var g={element:r};return Object.defineProperties(g,{enabled:{get:function(){return c},set:function(e){e?f():c&&(c=!1,r.removeEventListener("mousemove",p),r.removeEventListener("mousedown",I),r.removeEventListener("mouseup",y),r.removeEventListener("mouseleave",s),r.removeEventListener("mouseenter",s),r.removeEventListener("mouseout",s),r.removeEventListener("mouseover",s),r.removeEventListener("blur",l),r.removeEventListener("keyup",m),r.removeEventListener("keydown",m),r.removeEventListener("keypress",m),r!==window&&(window.removeEventListener("blur",l),window.removeEventListener("keyup",m),window.removeEventListener("keydown",m),window.removeEventListener("keypress",m)))},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return t},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),g};var i=n(93784)},29128:function(r){var e={left:0,top:0};r.exports=function(r,n,i){n=n||r.currentTarget||r.srcElement,Array.isArray(i)||(i=[0,0]);var a,t=r.clientX||0,o=r.clientY||0,c=(a=n)===window||a===document||a===document.body?e:a.getBoundingClientRect();return i[0]=t-c.left,i[1]=o-c.top,i}},93784:function(r,e){"use strict";function n(r){return r.target||r.srcElement||window}e.buttons=function(r){if("object"===typeof r){if("buttons"in r)return r.buttons;if("which"in r){if(2===(e=r.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<0&&t(c,n))}catch(f){s.call(new m(n),f)}}}function s(r){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=r,e.state=2,e.chain.length>0&&t(c,e))}function l(r,e,n,i){for(var a=0;a1&&(a*=g=Math.sqrt(g),c*=g);var _=a*a,h=c*c,v=(d==s?-1:1)*Math.sqrt(Math.abs((_*h-_*f*f-h*y*y)/(_*f*f+h*y*y)));v==1/0&&(v=1);var x=v*a*f/c+(r+l)/2,P=v*-c*y/a+(i+m)/2,G=Math.asin(((i-P)/c).toFixed(9)),C=Math.asin(((m-P)/c).toFixed(9));(G=rC&&(G-=2*e),!s&&C>G&&(C-=2*e)}if(Math.abs(C-G)>n){var S=C,A=l,b=m;C=G+n*(s&&C>G?1:-1);var M=t(l=x+a*Math.cos(C),m=P+c*Math.sin(C),a,c,u,0,s,A,b,[C,S,x,P])}var B=Math.tan((C-G)/4),k=4/3*a*B,F=4/3*c*B,z=[2*r-(r+k*Math.sin(G)),2*i-(i-F*Math.cos(G)),l+k*Math.sin(C),m-F*Math.cos(C),l,m];if(p)return z;M&&(z=z.concat(M));for(var w=0;w7&&(n.push(g.splice(0,7)),g.unshift("C"));break;case"S":var h=p,v=I;"C"!=e&&"S"!=e||(h+=h-o,v+=v-u),g=["C",h,v,g[1],g[2],g[3],g[4]];break;case"T":"Q"==e||"T"==e?(l=2*p-l,m=2*I-m):(l=p,m=I),g=a(p,I,l,m,g[1],g[2]);break;case"Q":l=g[1],m=g[2],g=a(p,I,g[1],g[2],g[3],g[4]);break;case"L":g=i(p,I,g[1],g[2]);break;case"H":g=i(p,I,g[1],I);break;case"V":g=i(p,I,p,g[1]);break;case"Z":g=i(p,I,d,s)}e=_,p=g[g.length-2],I=g[g.length-1],g.length>4?(o=g[g.length-4],u=g[g.length-3]):(o=p,u=I),n.push(g)}return n}},50896:function(r){"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;r.exports=function(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(r){return e[r]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(r){i[r]=r})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(a){return!1}}()?Object.assign:function(r,a){for(var t,o,c=function(r){if(null===r||void 0===r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}(r),u=1;u0&&!a.call(r,0))for(var y=0;y0)for(var f=0;f=0&&"[object Function]"===e.call(r.callee)),i}},32868:function(r){"use strict";function e(r,e){if("string"!==typeof r)return[r];var n=[r];"string"===typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var i=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],a=e.escape||"___",t=!!e.flat;i.forEach((function(r){var e=new RegExp(["\\",r[0],"[^\\",r[0],"\\",r[1],"]*\\",r[1]].join("")),i=[];function t(e,t,o){var c=n.push(e.slice(r[0].length,-r[1].length))-1;return i.push(c),a+c+a}n.forEach((function(r,i){for(var a,o=0;r!=a;)if(a=r,r=r.replace(e,t),o++>1e4)throw Error("References have circular dependency. Please, check them.");n[i]=r})),i=i.reverse(),n=n.map((function(e){return i.forEach((function(n){e=e.replace(new RegExp("(\\"+a+n+"\\"+a+")","g"),r[0]+"$1"+r[1])})),e}))}));var o=new RegExp("\\"+a+"([0-9]+)\\"+a);return t?n:function r(e,n,i){for(var a,t=[],c=0;a=o.exec(e);){if(c++>1e4)throw Error("Circular references in parenthesis");t.push(e.slice(0,a.index)),t.push(r(n[a[1]],n)),e=e.slice(a.index+a[0].length)}return t.push(e),t}(n[0],n)}function n(r,e){if(e&&e.flat){var n,i=e&&e.escape||"___",a=r[0];if(!a)return"";for(var t=new RegExp("\\"+i+"([0-9]+)\\"+i),o=0;a!=n;){if(o++>1e4)throw Error("Circular references in "+r);n=a,a=a.replace(t,c)}return a}return r.reduce((function r(e,n){return Array.isArray(n)&&(n=n.reduce(r,"")),e+n}),"");function c(e,n){if(null==r[n])throw Error("Reference "+n+"is undefined");return r[n]}}function i(r,i){return Array.isArray(r)?n(r,i):e(r,i)}i.parse=e,i.stringify=n,r.exports=i},51160:function(r,e,n){"use strict";var i=n(55616);r.exports=function(r){var e;return arguments.length>1&&(r=arguments),"string"===typeof r?r=r.split(/\s/).map(parseFloat):"number"===typeof r&&(r=[r]),r.length&&"number"===typeof r[0]?e=1===r.length?{width:r[0],height:r[0],x:0,y:0}:2===r.length?{width:r[0],height:r[1],x:0,y:0}:{x:r[0],y:r[1],width:r[2]-r[0]||0,height:r[3]-r[1]||0}:r&&(e={x:(r=i(r,{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"})).left||0,y:r.top||0},null==r.width?r.right?e.width=r.right-e.x:e.width=0:e.width=r.width,null==r.height?r.bottom?e.height=r.bottom-e.y:e.height=0:e.height=r.height),e}},21984:function(r){r.exports=function(r){var a=[];return r.replace(n,(function(r,n,t){var o=n.toLowerCase();for(t=function(r){var e=r.match(i);return e?e.map(Number):[]}(t),"m"==o&&t.length>2&&(a.push([n].concat(t.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(t.length==e[o])return t.unshift(n),a.push(t);if(t.lengtht!==p>t&&a<(m-s)*(t-l)/(p-l)+s&&(o=!o)}return o}},14756:function(r,e,n){var i,a=n(7688),t=n(28648),o=n(72200),c=n(11403),u=n(82368),d=n(17792),s=!1,l=t();function m(r,e,n){var a=i.segments(r),t=i.segments(e),o=n(i.combine(a,t));return i.polygon(o)}i={buildLog:function(r){return!0===r?s=a():!1===r&&(s=!1),!1!==s&&s.list},epsilon:function(r){return l.epsilon(r)},segments:function(r){var e=o(!0,l,s);return r.regions.forEach(e.addRegion),{segments:e.calculate(r.inverted),inverted:r.inverted}},combine:function(r,e){return{combined:o(!1,l,s).calculate(r.segments,r.inverted,e.segments,e.inverted),inverted1:r.inverted,inverted2:e.inverted}},selectUnion:function(r){return{segments:u.union(r.combined,s),inverted:r.inverted1||r.inverted2}},selectIntersect:function(r){return{segments:u.intersect(r.combined,s),inverted:r.inverted1&&r.inverted2}},selectDifference:function(r){return{segments:u.difference(r.combined,s),inverted:r.inverted1&&!r.inverted2}},selectDifferenceRev:function(r){return{segments:u.differenceRev(r.combined,s),inverted:!r.inverted1&&r.inverted2}},selectXor:function(r){return{segments:u.xor(r.combined,s),inverted:r.inverted1!==r.inverted2}},polygon:function(r){return{regions:c(r.segments,l,s),inverted:r.inverted}},polygonFromGeoJSON:function(r){return d.toPolygon(i,r)},polygonToGeoJSON:function(r){return d.fromPolygon(i,l,r)},union:function(r,e){return m(r,e,i.selectUnion)},intersect:function(r,e){return m(r,e,i.selectIntersect)},difference:function(r,e){return m(r,e,i.selectDifference)},differenceRev:function(r,e){return m(r,e,i.selectDifferenceRev)},xor:function(r,e){return m(r,e,i.selectXor)}},"object"===typeof window&&(window.PolyBool=i),r.exports=i},7688:function(r){r.exports=function(){var r,e=0,n=!1;function i(e,n){return r.list.push({type:e,data:n?JSON.parse(JSON.stringify(n)):void 0}),r}return r={list:[],segmentId:function(){return e++},checkIntersection:function(r,e){return i("check",{seg1:r,seg2:e})},segmentChop:function(r,e){return i("div_seg",{seg:r,pt:e}),i("chop",{seg:r,pt:e})},statusRemove:function(r){return i("pop_seg",{seg:r})},segmentUpdate:function(r){return i("seg_update",{seg:r})},segmentNew:function(r,e){return i("new_seg",{seg:r,primary:e})},segmentRemove:function(r){return i("rem_seg",{seg:r})},tempStatus:function(r,e,n){return i("temp_status",{seg:r,above:e,below:n})},rewind:function(r){return i("rewind",{seg:r})},status:function(r,e,n){return i("status",{seg:r,above:e,below:n})},vert:function(e){return e===n?r:(n=e,i("vert",{x:e}))},log:function(r){return"string"!==typeof r&&(r=JSON.stringify(r,!1," ")),i("log",{txt:r})},reset:function(){return i("reset")},selected:function(r){return i("selected",{segs:r})},chainStart:function(r){return i("chain_start",{seg:r})},chainRemoveHead:function(r,e){return i("chain_rem_head",{index:r,pt:e})},chainRemoveTail:function(r,e){return i("chain_rem_tail",{index:r,pt:e})},chainNew:function(r,e){return i("chain_new",{pt1:r,pt2:e})},chainMatch:function(r){return i("chain_match",{index:r})},chainClose:function(r){return i("chain_close",{index:r})},chainAddHead:function(r,e){return i("chain_add_head",{index:r,pt:e})},chainAddTail:function(r,e){return i("chain_add_tail",{index:r,pt:e})},chainConnect:function(r,e){return i("chain_con",{index1:r,index2:e})},chainReverse:function(r){return i("chain_rev",{index:r})},chainJoin:function(r,e){return i("chain_join",{index1:r,index2:e})},done:function(){return i("done")}}}},28648:function(r){r.exports=function(r){"number"!==typeof r&&(r=1e-10);var e={epsilon:function(e){return"number"===typeof e&&(r=e),r},pointAboveOrOnLine:function(e,n,i){var a=n[0],t=n[1],o=i[0],c=i[1],u=e[0];return(o-a)*(e[1]-t)-(c-t)*(u-a)>=-r},pointBetween:function(e,n,i){var a=e[1]-n[1],t=i[0]-n[0],o=e[0]-n[0],c=i[1]-n[1],u=o*t+a*c;return!(u-r)},pointsSameX:function(e,n){return Math.abs(e[0]-n[0])r!=o-a>r&&(t-d)*(a-s)/(o-s)+d-i>r&&(c=!c),t=d,o=s}return c}};return e}},17792:function(r){var e={toPolygon:function(r,e){function n(e){if(e.length<=0)return r.segments({inverted:!1,regions:[]});function n(e){var n=e.slice(0,e.length-1);return r.segments({inverted:!1,regions:[n]})}for(var i=n(e[0]),a=1;a0}))}function s(r,i){var a=r.seg,t=i.seg,o=a.start,c=a.end,d=t.start,s=t.end;n&&n.checkIntersection(a,t);var l=e.linesIntersect(o,c,d,s);if(!1===l){if(!e.pointsCollinear(o,c,d))return!1;if(e.pointsSame(o,s)||e.pointsSame(c,d))return!1;var m=e.pointsSame(o,d),p=e.pointsSame(c,s);if(m&&p)return i;var I=!m&&e.pointBetween(o,d,s),y=!p&&e.pointBetween(c,d,s);if(m)return y?u(i,c):u(r,s),i;I&&(p||(y?u(i,c):u(r,s)),u(i,o))}else 0===l.alongA&&(-1===l.alongB?u(r,d):0===l.alongB?u(r,l.pt):1===l.alongB&&u(r,s)),0===l.alongB&&(-1===l.alongA?u(i,o):0===l.alongA?u(i,l.pt):1===l.alongA&&u(i,c));return!1}for(var l=[];!t.isEmpty();){var m=t.getHead();if(n&&n.vert(m.pt[0]),m.isStart){n&&n.segmentNew(m.seg,m.primary);var p=d(m),I=p.before?p.before.ev:null,y=p.after?p.after.ev:null;function f(){if(I){var r=s(m,I);if(r)return r}return!!y&&s(m,y)}n&&n.tempStatus(m.seg,!!I&&I.seg,!!y&&y.seg);var g,_,h=f();if(h)r?(_=null===m.seg.myFill.below||m.seg.myFill.above!==m.seg.myFill.below)&&(h.seg.myFill.above=!h.seg.myFill.above):h.seg.otherFill=m.seg.myFill,n&&n.segmentUpdate(h.seg),m.other.remove(),m.remove();if(t.getHead()!==m){n&&n.rewind(m.seg);continue}r?(_=null===m.seg.myFill.below||m.seg.myFill.above!==m.seg.myFill.below,m.seg.myFill.below=y?y.seg.myFill.above:a,m.seg.myFill.above=_?!m.seg.myFill.below:m.seg.myFill.below):null===m.seg.otherFill&&(g=y?m.primary===y.primary?y.seg.otherFill.above:y.seg.myFill.above:m.primary?o:a,m.seg.otherFill={above:g,below:g}),n&&n.status(m.seg,!!I&&I.seg,!!y&&y.seg),m.other.status=p.insert(i.node({ev:m}))}else{var v=m.status;if(null===v)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(c.exists(v.prev)&&c.exists(v.next)&&s(v.prev.ev,v.next.ev),n&&n.statusRemove(v.ev.seg),v.remove(),!m.primary){var x=m.seg.myFill;m.seg.myFill=m.seg.otherFill,m.seg.otherFill=x}l.push(m.seg)}t.getHead().remove()}return n&&n.done(),l}return r?{addRegion:function(r){for(var i,a,t,o=r[r.length-1],u=0;u0&&!this.aborted;){var n=this.ifds_to_read.shift();n.offset&&this.scan_ifd(n.id,n.offset,r)}},i.prototype.read_uint16=function(r){var n=this.input;if(r+2>n.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?256*n[r]+n[r+1]:n[r]+256*n[r+1]},i.prototype.read_uint32=function(r){var n=this.input;if(r+4>n.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?16777216*n[r]+65536*n[r+1]+256*n[r+2]+n[r+3]:n[r]+256*n[r+1]+65536*n[r+2]+16777216*n[r+3]},i.prototype.is_subifd_link=function(r,e){return 0===r&&34665===e||0===r&&34853===e||34665===r&&40965===e},i.prototype.exif_format_length=function(r){switch(r){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(r,e){var n;switch(r){case 1:case 2:return n=this.input[e];case 6:return(n=this.input[e])|33554430*(128&n);case 3:return n=this.read_uint16(e);case 8:return(n=this.read_uint16(e))|131070*(32768&n);case 4:return n=this.read_uint32(e);case 9:return 0|(n=this.read_uint32(e));default:return null}},i.prototype.scan_ifd=function(r,i,a){var t=this.read_uint16(i);i+=2;for(var o=0;othis.input.length)throw e("unexpected EOF","EBADDATA");for(var I=[],y=m,f=0;f0&&(this.ifds_to_read.push({id:c,offset:I[0]}),p=!0),!1===a({is_big_endian:this.big_endian,ifd:r,tag:c,format:u,count:d,entry_offset:i+this.start,data_length:l,data_offset:m+this.start,value:I,is_subifd_link:p}))return void(this.aborted=!0);i+=12}0===r&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},r.exports.ExifParser=i,r.exports.get_orientation=function(r){var e=0;try{return new i(r,0,r.length).each((function(r){if(0===r.ifd&&274===r.tag&&Array.isArray(r.value))return e=r.value[0],!1})),e}catch(n){return-1}}},44600:function(r,e,n){"use strict";var i=n(9696).eW,a=n(9696).eI;function t(r,e){if(r.length<4+e)return null;var n=a(r,e);return r.length>4&15,a=15&r[4],t=r[5]>>4&15,o=i(r,6),u=8,d=0;de.width||r.width===e.width&&r.height>e.height?r:e})),n=r.reduce((function(r,e){return r.height>e.height||r.height===e.height&&r.width>e.width?r:e}));return e.width>n.height||e.width===n.height&&e.height>n.width?e:n}(e.sizes),i=1;e.transforms.forEach((function(r){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},n={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===r.type&&(i=0===r.value?n[i]:e[i=e[i=n[i]]]),"irot"===r.type)for(var a=0;a1&&(m.variants=l.variants),l.orientation&&(m.orientation=l.orientation),l.exif_location&&l.exif_location.offset+l.exif_location.length<=r.length){var p=t(r,l.exif_location.offset),I=r.slice(l.exif_location.offset+p+4,l.exif_location.offset+l.exif_location.length),y=c.get_orientation(I);y>0&&(m.orientation=y)}return m}}}}}}},38728:function(r,e,n){"use strict";var i=n(9696).wR,a=n(9696).gS,t=n(9696).Bz,o=i("BM");r.exports=function(r){if(!(r.length<26)&&a(r,0,o))return{width:t(r,18),height:t(r,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(r,e,n){"use strict";var i=n(9696).wR,a=n(9696).gS,t=n(9696).Bz,o=i("GIF87a"),c=i("GIF89a");r.exports=function(r){if(!(r.length<10)&&(a(r,0,o)||a(r,0,c)))return{width:t(r,6),height:t(r,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(r,e,n){"use strict";var i=n(9696).Bz;r.exports=function(r){var e=i(r,0),n=i(r,2),a=i(r,4);if(0===e&&1===n&&a){for(var t=[],o={width:0,height:0},c=0;co.width||d>o.height)&&(o=s)}return{width:o.width,height:o.height,variants:t,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(r,e,n){"use strict";var i=n(9696).eW,a=n(9696).wR,t=n(9696).gS,o=n(11688),c=a("Exif\0\0");r.exports=function(r){if(!(r.length<2)&&255===r[0]&&216===r[1]&&255===r[2])for(var e=2;;){for(;;){if(r.length-e<2)return;if(255===r[e++])break}for(var n,a,u=r[e++];255===u;)u=r[e++];if(208<=u&&u<=217||1===u)n=0;else{if(!(192<=u&&u<=254))return;if(r.length-e<2)return;n=i(r,e)-2,e+=2}if(217===u||218===u)return;if(225===u&&n>=10&&t(r,e,c)&&(a=o.get_orientation(r.slice(e+6,e+n))),n>=5&&192<=u&&u<=207&&196!==u&&200!==u&&204!==u){if(r.length-e0&&(d.orientation=a),d}e+=n}}},37276:function(r,e,n){"use strict";var i=n(9696).wR,a=n(9696).gS,t=n(9696).eI,o=i("\x89PNG\r\n\x1a\n"),c=i("IHDR");r.exports=function(r){if(!(r.length<24)&&a(r,0,o)&&a(r,12,c))return{width:t(r,16),height:t(r,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},90328:function(r,e,n){"use strict";var i=n(9696).wR,a=n(9696).gS,t=n(9696).eI,o=i("8BPS\0\x01");r.exports=function(r){if(!(r.length<22)&&a(r,0,o))return{width:t(r,18),height:t(r,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},16024:function(r){"use strict";function e(r){return"number"===typeof r&&isFinite(r)&&r>0}var n=/<[-_.:a-zA-Z0-9][^>]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,a=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(r){return c.test(r)?r.match(c)[0]:"px"}r.exports=function(r){if(function(r){var e,n=0,i=r.length;for(239===r[0]&&187===r[1]&&191===r[2]&&(n=3);n>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function m(r,e){return{width:1+(r[e+6]<<16|r[e+5]<<8|r[e+4]),height:1+(r[e+9]<r.length)){for(;e+8=10?n=n||s(r,e+8):"VP8L"===p&&I>=9?n=n||l(r,e+8):"VP8X"===p&&I>=10?n=n||m(r,e+8):"EXIF"===p&&(i=c.get_orientation(r.slice(e+8,e+8+I)),e=1/0),e+=8+I}else e++;if(n)return i>0&&(n.orientation=i),n}}}},87480:function(r,e,n){"use strict";r.exports={avif:n(40528),bmp:n(38728),gif:n(5588),ico:n(41924),jpeg:n(87968),png:n(37276),psd:n(90328),svg:n(16024),tiff:n(98792),webp:n(20704)}},19480:function(r,e,n){"use strict";var i=n(87480);r.exports=function(r){return function(r){for(var e=Object.keys(i),n=0;n1)for(var n=1;n1&&(r.scaleRatio=[r.scale[0]*r.viewport.width,r.scale[1]*r.viewport.height],n(r),r.after&&r.after(r))}function G(r){if(r){null!=r.length?"number"===typeof r[0]&&(r=[{positions:r}]):Array.isArray(r)||(r=[r]);var e=0,n=0;if(v.groups=h=r.map((function(r,d){var s=h[d];return r?("function"===typeof r?r={after:r}:"number"===typeof r[0]&&(r={positions:r}),r=o(r,{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"}),s||(h[d]=s={id:d,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},r=c({},_,r)),t(s,r,[{lineWidth:function(r){return.5*+r},capSize:function(r){return.5*+r},opacity:parseFloat,errors:function(r){return r=u(r),n+=r.length,r},positions:function(r,n){return r=u(r,"float64"),n.count=Math.floor(r.length/2),n.bounds=i(r,2),n.offset=e,e+=n.count,r}},{color:function(r,e){var n=e.count;if(r||(r="transparent"),!Array.isArray(r)||"number"===typeof r[0]){var i=r;r=Array(n);for(var t=0;t 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:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\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) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:n,divisor:0,stride:8,offset:0},lineTop:{buffer:n,divisor:0,stride:8,offset:4},aColor:{buffer:r.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:r.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:r.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:r.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:r.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:r.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},i))}catch(o){e=a}return{fill:r({primitive:"triangle",elements:function(r,e){return e.triangles},offset:0,vert:"\nprecision highp float;\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:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:r.prop("scale"),color:r.prop("fill"),scaleFract:r.prop("scaleFract"),translateFract:r.prop("translateFract"),translate:r.prop("translate"),opacity:r.prop("opacity"),pixelRatio:r.context("pixelRatio"),id:r.prop("id"),viewport:function(r,e){return[e.viewport.x,e.viewport.y,r.viewportWidth,r.viewportHeight]}},attributes:{position:{buffer:r.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:r.prop("positionFractBuffer"),stride:8,offset:8}},blend:i.blend,depth:{enable:!1},scissor:i.scissor,stencil:i.stencil,viewport:i.viewport}),rect:a,miter:e}},f.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},f.prototype.render=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];e.length&&(r=this).update.apply(r,e),this.draw()},f.prototype.draw=function(){for(var r=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];return(e.length?e:this.passes).forEach((function(e,n){var i;if(e&&Array.isArray(e))return(i=r).draw.apply(i,e);"number"===typeof e&&(e=r.passes[e]),e&&e.count>1&&e.opacity&&(r.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&r.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>f.precisionThreshold||e.scale[1]*e.viewport.height>f.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=f.maxPoints)?r.shaders.rect(e):r.shaders.miter(e)))})),this},f.prototype.update=function(r){var e=this;if(r){null!=r.length?"number"===typeof r[0]&&(r=[{positions:r}]):Array.isArray(r)||(r=[r]);var n=this.regl,s=this.gl;if(r.forEach((function(r,p){var g=e.passes[p];if(void 0!==r)if(null!==r){if("number"===typeof r[0]&&(r={positions:r}),r=o(r,{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",splitNull:"splitNull"}),g||(e.passes[p]=g={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:n.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:n.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},r=t({},f.defaults,r)),null!=r.thickness&&(g.thickness=parseFloat(r.thickness)),null!=r.opacity&&(g.opacity=parseFloat(r.opacity)),null!=r.miterLimit&&(g.miterLimit=parseFloat(r.miterLimit)),null!=r.overlay&&(g.overlay=!!r.overlay,p=E}));(z=z.slice(0,N)).push(E)}for(var T=function(r){var e=C.slice(2*R,2*z[r]).concat(E?C.slice(2*E):[]),n=(g.hole||[]).map((function(e){return e-E+(z[r]-R)})),i=u(e,n);i=i.map((function(e){return e+R+(e+Rr.length)&&(e=r.length);for(var n=0,i=new Array(e);n 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"]),d.vert=m(["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\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\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) * pointSizeScale;\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&&(d.frag=d.frag.replace("smoothstep","smoothStep"),u.frag=u.frag.replace("smoothstep","smoothStep")),this.drawCircle=r(d)}v.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},v.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},v.prototype.draw=function(){for(var r=this,e=arguments.length,n=new Array(e),i=0;ii)?e.tree=s(r,{bounds:l}):i&&i.length&&(e.tree=i),e.tree){var m={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(m):e.elements=o.elements(m)}var p=g.float32(r);return a({data:p,usage:"dynamic"}),t({data:g.fract32(r,p),usage:"dynamic"}),c({data:new Uint8Array(d),type:"uint8",usage:"stream"}),r}},{marker:function(e,n,i){var a=n.activation;if(a.forEach((function(r){return r&&r.destroy&&r.destroy()})),a.length=0,e&&"number"!==typeof e[0]){for(var t=[],c=0,u=Math.min(e.length,n.count);c=0)return t;if(r instanceof Uint8Array||r instanceof Uint8ClampedArray)e=r;else{e=new Uint8Array(r.length);for(var o=0,c=r.length;o4*i&&(this.tooManyColors=!0),this.updatePalette(n),1===a.length?a[0]:a},v.prototype.updatePalette=function(r){if(!this.tooManyColors){var e=this.maxColors,n=this.paletteTexture,i=Math.ceil(.25*r.length/e);if(i>1)for(var a=.25*(r=r.slice()).length%e;a2?(c[0],c[2],i=c[1],a=c[3]):c.length?(i=c[0],a=c[1]):(c.x,i=c.y,c.x,c.width,a=c.y+c.height),u.length>2?(t=u[0],o=u[2],u[1],u[3]):u.length?(t=u[0],o=u[1]):(t=u.x,u.y,o=u.x+u.width,u.y,u.height),[t,i,o,a]}function p(r){if("number"===typeof r)return[r,r,r,r];if(2===r.length)return[r[0],r[1],r[0],r[1]];var e=u(r);return[e.x,e.y,e.x+e.width,e.y+e.height]}r.exports=s,s.prototype.render=function(){for(var r,e=this,n=[],i=arguments.length;i--;)n[i]=arguments[i];return n.length&&(r=this).update.apply(r,n),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){e.draw(),e.dirty=!0,e.planned=null}))):(this.draw(),this.dirty=!0,o((function(){e.dirty=!1}))),this)},s.prototype.update=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];if(e.length){for(var i=0;iC))&&(c.lower||!(G>>=e))<<3,(e|=n=(15<(r>>>=n))<<2)|(n=(3<(r>>>=n))<<1)|r>>>n>>1}function p(){function r(r){r:{for(var e=16;268435456>=e;e*=16)if(r<=e){r=e;break r}r=0}return 0<(e=n[m(r)>>2]).length?e.pop():new ArrayBuffer(r)}function e(r){n[m(r.byteLength)>>2].push(r)}var n=l(8,(function(){return[]}));return{alloc:r,free:e,allocType:function(e,n){var i=null;switch(e){case 5120:i=new Int8Array(r(n),0,n);break;case 5121:i=new Uint8Array(r(n),0,n);break;case 5122:i=new Int16Array(r(2*n),0,n);break;case 5123:i=new Uint16Array(r(2*n),0,n);break;case 5124:i=new Int32Array(r(4*n),0,n);break;case 5125:i=new Uint32Array(r(4*n),0,n);break;case 5126:i=new Float32Array(r(4*n),0,n);break;default:return null}return i.length!==n?i.subarray(0,n):i},freeType:function(r){e(r.buffer)}}}function I(r){return!!r&&"object"===typeof r&&Array.isArray(r.shape)&&Array.isArray(r.stride)&&"number"===typeof r.offset&&r.shape.length===r.stride.length&&(Array.isArray(r.data)||or(r.data))}function y(r,e,n,i,a,t){for(var o=0;o(a=c)&&(a=i.buffer.byteLength,5123===s?a>>=1:5125===s&&(a>>=2)),i.vertCount=a,a=o,0>o&&(a=4,1===(o=i.buffer.dimension)&&(a=0),2===o&&(a=1),3===o&&(a=4)),i.primType=a}function o(r){i.elementsCount--,delete c[r.id],r.buffer.destroy(),r.buffer=null}var c={},u=0,d={uint8:5121,uint16:5123};e.oes_element_index_uint&&(d.uint32=5125),a.prototype.bind=function(){this.buffer.bind()};var s=[];return{create:function(r,e){function c(r){if(r)if("number"===typeof r)u(r),s.primType=4,s.vertCount=0|r,s.type=5121;else{var e=null,n=35044,i=-1,a=-1,o=0,l=0;Array.isArray(r)||or(r)||I(r)?e=r:("data"in r&&(e=r.data),"usage"in r&&(n=lr[r.usage]),"primitive"in r&&(i=yr[r.primitive]),"count"in r&&(a=0|r.count),"type"in r&&(l=d[r.type]),"length"in r?o=0|r.length:(o=a,5123===l||5122===l?o*=2:5125!==l&&5124!==l||(o*=4))),t(s,e,n,i,a,o,l)}else u(),s.primType=4,s.vertCount=0,s.type=5121;return c}var u=n.create(null,34963,!0),s=new a(u._buffer);return i.elementsCount++,c(r),c._reglType="elements",c._elements=s,c.subdata=function(r,e){return u.subdata(r,e),c},c.destroy=function(){o(s)},c},createStream:function(r){var e=s.pop();return e||(e=new a(n.create(null,34963,!0,!1)._buffer)),t(e,r,35040,-1,-1,0,0),e},destroyStream:function(r){s.push(r)},getElements:function(r){return"function"===typeof r&&r._elements instanceof a?r._elements:null},clear:function(){cr(c).forEach(o)}}}function P(r){for(var e=ar.allocType(5123,r.length),n=0;n>>31<<15,a=(t<<1>>>24)-127,t=t>>13&1023;e[n]=-24>a?i:-14>a?i+(t+1024>>-14-a):15>=a,n.height>>=a,m(n,i[a]),r.mipmask|=1<e;++e)r.images[e]=null;return r}function C(r){for(var e=r.images,n=0;ne){for(var n=0;n=--this.refCount&&T(this)}}),o.profile&&(t.getTotalTextureSize=function(){var r=0;return Object.keys(tr).forEach((function(e){r+=tr[e].stats.size})),r}),{create2D:function(e,n){function i(r,e){var n=a.texInfo;F.call(n);var t=x();return"number"===typeof r?_(t,0|r,"number"===typeof e?0|e:0|r):r?(z(n,r),h(t,r)):_(t,1,1),n.genMipmaps&&(t.mipmask=(t.width<<1)-1),a.mipmask=t.mipmask,u(a,t),a.internalformat=t.internalformat,i.width=t.width,i.height=t.height,E(a),v(t,3553),w(n,3553),N(),C(t),o.profile&&(a.stats.size=k(a.internalformat,a.type,t.width,t.height,n.genMipmaps,!1)),i.format=Z[a.internalformat],i.type=q[a.type],i.mag=Y[n.magFilter],i.min=X[n.minFilter],i.wrapS=Q[n.wrapS],i.wrapT=Q[n.wrapT],i}var a=new R(3553);return tr[a.id]=a,t.textureCount++,i(e,n),i.subimage=function(r,e,n,t){e|=0,n|=0,t|=0;var o=y();return u(o,a),o.width=0,o.height=0,m(o,r),o.width=o.width||(a.width>>t)-e,o.height=o.height||(a.height>>t)-n,E(a),p(o,3553,e,n,t),N(),f(o),i},i.resize=function(e,n){var t=0|e,c=0|n||t;if(t===a.width&&c===a.height)return i;i.width=a.width=t,i.height=a.height=c,E(a);for(var u=0;a.mipmask>>u;++u){var d=t>>u,s=c>>u;if(!d||!s)break;r.texImage2D(3553,u,a.format,d,s,0,a.format,a.type,null)}return N(),o.profile&&(a.stats.size=k(a.internalformat,a.type,t,c,!1,!1)),i},i._reglType="texture2d",i._texture=a,o.profile&&(i.stats=a.stats),i.destroy=function(){a.decRef()},i},createCube:function(e,n,i,a,c,s){function l(r,e,n,i,a,t){var c,s=I.texInfo;for(F.call(s),c=0;6>c;++c)g[c]=x();if("number"!==typeof r&&r){if("object"===typeof r)if(e)h(g[0],r),h(g[1],e),h(g[2],n),h(g[3],i),h(g[4],a),h(g[5],t);else if(z(s,r),d(I,r),"faces"in r)for(r=r.faces,c=0;6>c;++c)u(g[c],I),h(g[c],r[c]);else for(c=0;6>c;++c)h(g[c],r)}else for(r=0|r||1,c=0;6>c;++c)_(g[c],r,r);for(u(I,g[0]),I.mipmask=s.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,I.internalformat=g[0].internalformat,l.width=g[0].width,l.height=g[0].height,E(I),c=0;6>c;++c)v(g[c],34069+c);for(w(s,34067),N(),o.profile&&(I.stats.size=k(I.internalformat,I.type,l.width,l.height,s.genMipmaps,!0)),l.format=Z[I.internalformat],l.type=q[I.type],l.mag=Y[s.magFilter],l.min=X[s.minFilter],l.wrapS=Q[s.wrapS],l.wrapT=Q[s.wrapT],c=0;6>c;++c)C(g[c]);return l}var I=new R(34067);tr[I.id]=I,t.cubeCount++;var g=Array(6);return l(e,n,i,a,c,s),l.subimage=function(r,e,n,i,a){n|=0,i|=0,a|=0;var t=y();return u(t,I),t.width=0,t.height=0,m(t,e),t.width=t.width||(I.width>>a)-n,t.height=t.height||(I.height>>a)-i,E(I),p(t,34069+r,n,i,a),N(),f(t),l},l.resize=function(e){if((e|=0)!==I.width){l.width=I.width=e,l.height=I.height=e,E(I);for(var n=0;6>n;++n)for(var i=0;I.mipmask>>i;++i)r.texImage2D(34069+n,i,I.format,e>>i,e>>i,0,I.format,I.type,null);return N(),o.profile&&(I.stats.size=k(I.internalformat,I.type,l.width,l.height,!1,!0)),l}},l._reglType="textureCube",l._texture=I,o.profile&&(l.stats=I.stats),l.destroy=function(){I.decRef()},l},clear:function(){for(var e=0;en;++n)if(0!==(e.mipmask&1<>n,e.height>>n,0,e.internalformat,e.type,null);else for(var i=0;6>i;++i)r.texImage2D(34069+i,n,e.internalformat,e.width>>n,e.height>>n,0,e.internalformat,e.type,null);w(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ea;++a){for(d=0;dr;++r)n[r].resize(i);return e.width=e.height=i,e},_reglType:"framebufferCube",destroy:function(){n.forEach((function(r){r.destroy()}))}})},clear:function(){cr(C).forEach(f)},restore:function(){h.cur=null,h.next=null,h.dirty=!0,cr(C).forEach((function(e){e.framebuffer=r.createFramebuffer(),g(e)}))}})}function w(){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 R(r,e,n,i,a,t,o){function c(r){if(r!==g.currentVAO){var n=e.oes_vertex_array_object;r?n.bindVertexArrayOES(r.vao):n.bindVertexArrayOES(null),g.currentVAO=r}}function u(n){if(n!==g.currentVAO){if(n)n.bindAttrs();else{for(var i=e.angle_instanced_arrays,a=0;a=l.byteLength?u.subdata(l):(u.destroy(),n.buffers[c]=null)),n.buffers[c]||(u=n.buffers[c]=a.create(d,34962,!1,!0)),s.buffer=a.getBuffer(u),s.size=0|s.buffer.dimension,s.normalized=!1,s.type=s.buffer.dtype,s.offset=0,s.stride=0,s.divisor=0,s.state=1,r[c]=1):a.getBuffer(d)?(s.buffer=a.getBuffer(d),s.size=0|s.buffer.dimension,s.normalized=!1,s.type=s.buffer.dtype,s.offset=0,s.stride=0,s.divisor=0,s.state=1):a.getBuffer(d.buffer)?(s.buffer=a.getBuffer(d.buffer),s.size=0|(+d.size||s.buffer.dimension),s.normalized=!!d.normalized||!1,s.type="type"in d?sr[d.type]:s.buffer.dtype,s.offset=0|(d.offset||0),s.stride=0|(d.stride||0),s.divisor=0|(d.divisor||0),s.state=1):"x"in d&&(s.x=+d.x||0,s.y=+d.y||0,s.z=+d.z||0,s.w=+d.w||0,s.state=2)}for(u=0;ur&&(r=e.stats.uniformsCount)})),r},n.getMaxAttributesCount=function(){var r=0;return m.forEach((function(e){e.stats.attributesCount>r&&(r=e.stats.attributesCount)})),r}),{clear:function(){var e=r.deleteShader.bind(r);cr(d).forEach(e),d={},cr(s).forEach(e),s={},m.forEach((function(e){r.deleteProgram(e.program)})),m.length=0,l={},n.shaderCount=0},program:function(e,i,a,t){var o=l[i];o||(o=l[i]={});var p=o[e];if(p&&(p.refCount++,!t))return p;var I=new c(i,e);return n.shaderCount++,u(I,a,t),p||(o[e]=I),m.push(I),$(I,{destroy:function(){if(I.refCount--,0>=I.refCount){r.deleteProgram(I.program);var e=m.indexOf(I);m.splice(e,1),n.shaderCount--}0>=o[I.vertId].refCount&&(r.deleteShader(s[I.vertId]),delete s[I.vertId],delete l[I.fragId][I.vertId]),Object.keys(l[I.fragId]).length||(r.deleteShader(d[I.fragId]),delete d[I.fragId],delete l[I.fragId])}})},restore:function(){d={},s={};for(var r=0;r>2),n=0;n>5]|=(255&r.charCodeAt(n/8))<<24-n%32;var i,a,t,o,c,u,d,s,l,m,p,I=8*r.length;for(r=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],n=Array(64),e[I>>5]|=128<<24-I%32,e[15+(I+64>>9<<4)]=I,s=0;sl;l++){var y;16>l?n[l]=e[l+s]:(m=l,p=H(p=U(p=n[l-2],17)^U(p,19)^p>>>10,n[l-7]),y=U(y=n[l-15],7)^U(y,18)^y>>>3,n[m]=H(H(p,y),n[l-16])),m=H(H(H(H(d,m=U(m=o,6)^U(m,11)^U(m,25)),o&c^~o&u),Rr[l]),n[l]),p=H(d=U(d=I,2)^U(d,13)^U(d,22),I&i^I&a^i&a),d=u,u=c,c=o,o=H(t,m),t=a,a=i,i=I,I=H(m,p)}r[0]=H(I,r[0]),r[1]=H(i,r[1]),r[2]=H(a,r[2]),r[3]=H(t,r[3]),r[4]=H(o,r[4]),r[5]=H(c,r[5]),r[6]=H(u,r[6]),r[7]=H(d,r[7])}for(e="",n=0;n<32*r.length;n+=8)e+=String.fromCharCode(r[n>>5]>>>24-n%32&255);return e}function D(r){for(var e,n="",i=0;i>>4&15)+"0123456789abcdef".charAt(15&e);return n}function J(r){for(var e,n,i="",a=-1;++a=e&&56320<=n&&57343>=n&&(e=65536+((1023&e)<<10)+(1023&n),a++),127>=e?i+=String.fromCharCode(e):2047>=e?i+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?i+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(i+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return i}function U(r,e){return r>>>e|r<<32-e}function H(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function L(r){return Array.prototype.slice.call(r)}function O(r){return L(r).join("")}function K(r){function e(){var r=[],e=[];return $((function(){r.push.apply(r,L(arguments))}),{def:function(){var n="v"+a++;return e.push(n),0"+e+"?"+a+".constant["+e+"]:0;"})).join(""),"}}else{","if(",c,"(",a,".buffer)){",s,"=",t,".createStream(",34962,",",a,".buffer);","}else{",s,"=",t,".getBuffer(",a,".buffer);","}",l,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",s,".dtype;",u.normalized,"=!!",a,".normalized;"),i("size"),i("offset"),i("stride"),i("divisor"),n("}}"),n.exit("if(",u.isStream,"){",t,".destroyStream(",s,");","}"),u}))})),o}function F(r){var e=r.static,n=r.dynamic,i={};return Object.keys(e).forEach((function(r){var n=e[r];i[r]=q((function(r,e){return"number"===typeof n||"boolean"===typeof n?""+n:r.link(n)}))})),Object.keys(n).forEach((function(r){var e=n[r];i[r]=Y(e,(function(r,n){return r.invoke(n,e)}))})),i}function z(r,e,i,a,t){function o(r){var e=u[r];e&&(l[r]=e)}var c=S(r,e),u=C(r,p=P(r,t),t),s=b(r,t),l=M(r,t),m=A(r,t,c);o("viewport"),o(g("scissor.box"));var p,I=0>1)",c],");")}function e(){n(u,".drawArraysInstancedANGLE(",[I,y,f,c],");")}p&&"null"!==p?_?r():(n("if(",p,"){"),r(),n("}else{"),e(),n("}")):e()}function o(){function r(){n(s+".drawElements("+[I,f,g,y+"<<(("+g+"-5121)>>1)"]+");")}function e(){n(s+".drawArrays("+[I,y,f]+");")}p&&"null"!==p?_?r():(n("if(",p,"){"),r(),n("}else{"),e(),n("}")):e()}var c,u,d=r.shared,s=d.gl,l=d.draw,m=i.draw,p=function(){var a=m.elements,t=e;return a?((a.contextDep&&i.contextDynamic||a.propDep)&&(t=n),a=a.append(r,t),m.elementsActive&&t("if("+a+")"+s+".bindBuffer(34963,"+a+".buffer.buffer);")):(a=t.def(),t(a,"=",l,".","elements",";","if(",a,"){",s,".bindBuffer(",34963,",",a,".buffer.buffer);}","else if(",d.vao,".currentVAO){",a,"=",r.shared.elements+".getElements("+d.vao,".currentVAO.elements);",lr?"":"if("+a+")"+s+".bindBuffer(34963,"+a+".buffer.buffer);","}")),a}(),I=a("primitive"),y=a("offset"),f=function(){var a=m.count,t=e;return a?((a.contextDep&&i.contextDynamic||a.propDep)&&(t=n),a=a.append(r,t)):a=t.def(l,".","count"),a}();if("number"===typeof f){if(0===f)return}else n("if(",f,"){"),n.exit("}");ur&&(c=a("instances"),u=r.instancing);var g=p+".type",_=m.elements&&Z(m.elements)&&!m.vaoActive;ur&&("number"!==typeof c||0<=c)?"string"===typeof c?(n("if(",c,">0){"),t(),n("}else if(",c,"<0){"),o(),n("}")):t():o()}function L(r,e,n,i,a){return a=(e=v()).proc("body",a),ur&&(e.instancing=a.def(e.shared.extensions,".angle_instanced_arrays")),r(e,a,n,i),e.compile().body}function O(r,e,n,i){T(r,e),n.useVAO?n.drawVAO?e(r.shared.vao,".setVAO(",n.drawVAO.append(r,e),");"):e(r.shared.vao,".setVAO(",r.shared.vao,".targetVAO);"):(e(r.shared.vao,".setVAO(null);"),J(r,e,n,i.attributes,(function(){return!0}))),U(r,e,n,i.uniforms,(function(){return!0}),!1),H(r,e,e,n)}function X(r,e){var n=r.proc("draw",1);T(r,n),w(r,n,e.context),R(r,n,e.framebuffer),E(r,n,e),N(r,n,e.state),D(r,n,e,!1,!0);var i=e.shader.progVar.append(r,n);if(n(r.shared.gl,".useProgram(",i,".program);"),e.shader.program)O(r,n,e,e.shader.program);else{n(r.shared.vao,".setVAO(null);");var a=r.global.def("{}"),t=n.def(i,".id"),o=n.def(a,"[",t,"]");n(r.cond(o).then(o,".call(this,a0);").else(o,"=",a,"[",t,"]=",r.link((function(n){return L(O,r,e,n,1)})),"(",i,");",o,".call(this,a0);"))}0=--this.refCount&&o(this)},a.profile&&(i.getTotalRenderbufferSize=function(){var r=0;return Object.keys(s).forEach((function(e){r+=s[e].stats.size})),r}),{create:function(e,n){function o(e,n){var i=0,t=0,s=32854;if("object"===typeof e&&e?("shape"in e?(i=0|(t=e.shape)[0],t=0|t[1]):("radius"in e&&(i=t=0|e.radius),"width"in e&&(i=0|e.width),"height"in e&&(t=0|e.height)),"format"in e&&(s=c[e.format])):"number"===typeof e?(i=0|e,t="number"===typeof n?0|n:i):e||(i=t=1),i!==d.width||t!==d.height||s!==d.format)return o.width=d.width=i,o.height=d.height=t,d.format=s,r.bindRenderbuffer(36161,d.renderbuffer),r.renderbufferStorage(36161,s,i,t),a.profile&&(d.stats.size=kr[d.format]*d.width*d.height),o.format=u[d.format],o}var d=new t(r.createRenderbuffer());return s[d.id]=d,i.renderbufferCount++,o(e,n),o.resize=function(e,n){var i=0|e,t=0|n||i;return i===d.width&&t===d.height||(o.width=d.width=i,o.height=d.height=t,r.bindRenderbuffer(36161,d.renderbuffer),r.renderbufferStorage(36161,d.format,i,t),a.profile&&(d.stats.size=kr[d.format]*d.width*d.height)),o},o._reglType="renderbuffer",o._renderbuffer=d,a.profile&&(o.stats=d.stats),o.destroy=function(){d.decRef()},o},clear:function(){cr(s).forEach(o)},restore:function(){cr(s).forEach((function(e){e.renderbuffer=r.createRenderbuffer(),r.bindRenderbuffer(36161,e.renderbuffer),r.renderbufferStorage(36161,e.format,e.width,e.height)})),r.bindRenderbuffer(36161,null)}}},zr=[];zr[6408]=4,zr[6407]=3;var wr=[];wr[5121]=1,wr[5126]=4,wr[36193]=2;var Rr=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Er=["x","y","z","w"],Nr="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Tr={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},Dr={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},Jr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ur={cw:2304,ccw:2305},Hr=new W(!1,!1,!1,(function(){})),Lr=function(r,e){function n(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function i(r,e,i){var a=o.pop()||new n;a.startQueryIndex=r,a.endQueryIndex=e,a.sum=0,a.stats=i,c.push(a)}if(!e.ext_disjoint_timer_query)return null;var a=[],t=[],o=[],c=[],u=[],d=[];return{beginQuery:function(r){var n=a.pop()||e.ext_disjoint_timer_query.createQueryEXT();e.ext_disjoint_timer_query.beginQueryEXT(35007,n),t.push(n),i(t.length-1,t.length,r)},endQuery:function(){e.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:i,update:function(){var r,n;if(0!==(r=t.length)){d.length=Math.max(d.length,r+1),u.length=Math.max(u.length,r+1),u[0]=0;var i=d[0]=0;for(n=r=0;n=j.length&&i()}var n=Q(j,r);j[n]=e}}}function m(){var r=K.viewport,e=K.scissor_box;r[0]=r[1]=e[0]=e[1]=0,B.viewportWidth=B.framebufferWidth=B.drawingBufferWidth=r[2]=e[2]=f.drawingBufferWidth,B.viewportHeight=B.framebufferHeight=B.drawingBufferHeight=r[3]=e[3]=f.drawingBufferHeight}function p(){B.tick+=1,B.time=y(),m(),O.procs.poll()}function I(){U.refresh(),m(),O.procs.refresh(),S&&S.update()}function y(){return(ir()-A)/1e3}if(!(r=d(r)))return null;var f=r.gl,g=f.getContextAttributes();f.isContextLost();var _=s(f,r);if(!_)return null;var h=a(),P={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},G=r.cachedCode||{},C=_.extensions,S=Lr(f,C),A=ir(),b=f.drawingBufferWidth,M=f.drawingBufferHeight,B={tick:0,time:0,viewportWidth:b,viewportHeight:M,framebufferWidth:b,framebufferHeight:M,drawingBufferWidth:b,drawingBufferHeight:M,pixelRatio:r.pixelRatio},k=(b={elements:null,primitive:4,count:-1,offset:0,instances:-1},tr(f,C)),w=v(f,P,r,(function(r){return D.destroyBuffer(r)})),T=x(f,C,w,P),D=R(f,C,k,P,w,T,b),J=E(f,h,P,r),U=F(f,C,k,(function(){O.procs.poll()}),B,P,r),H=Fr(f,C,k,P,r),L=z(f,C,k,U,H,P),O=X(f,h,C,k,w,T,U,L,{},D,J,b,B,S,G,r),K=(h=N(f,L,O.procs.poll,B,g,C,k),O.next),V=f.canvas,j=[],W=[],Z=[],q=[r.onDestroy],Y=null;V&&(V.addEventListener("webglcontextlost",t,!1),V.addEventListener("webglcontextrestored",o,!1));var rr=L.setFBO=c({framebuffer:er.define.call(null,1,"framebuffer")});return I(),g=$(c,{clear:function(r){if("framebuffer"in r)if(r.framebuffer&&"framebufferCube"===r.framebuffer_reglType)for(var e=0;6>e;++e)rr($({framebuffer:r.framebuffer.faces[e]},r),u);else rr(r,u);else u(null,r)},prop:er.define.bind(null,1),context:er.define.bind(null,2),this:er.define.bind(null,3),draw:c({}),buffer:function(r){return w.create(r,34962,!1,!1)},elements:function(r){return T.create(r,!1)},texture:U.create2D,cube:U.createCube,renderbuffer:H.create,framebuffer:L.create,framebufferCube:L.createCube,vao:D.createVAO,attributes:g,frame:l,on:function(r,e){var n;switch(r){case"frame":return l(e);case"lost":n=W;break;case"restore":n=Z;break;case"destroy":n=q}return n.push(e),{cancel:function(){for(var r=0;r4294967295||u(e)!==e)throw new c("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,d=!0;if("length"in r&&o){var s=o(r,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(d=!1)}return(i||d||!n)&&(t?a(r,"length",e,!0,!0):a(r,"length",e)),r}},29936:function(r,e,n){r.exports=a;var i=n(61252).EventEmitter;function a(){i.call(this)}n(6768)(a,i),a.Readable=n(12348),a.Writable=n(11288),a.Duplex=n(15316),a.Transform=n(22477),a.PassThrough=n(27136),a.finished=n(15932),a.pipeline=n(38180),a.Stream=a,a.prototype.pipe=function(r,e){var n=this;function a(e){r.writable&&!1===r.write(e)&&n.pause&&n.pause()}function t(){n.readable&&n.resume&&n.resume()}n.on("data",a),r.on("drain",t),r._isStdio||e&&!1===e.end||(n.on("end",c),n.on("close",u));var o=!1;function c(){o||(o=!0,r.end())}function u(){o||(o=!0,"function"===typeof r.destroy&&r.destroy())}function d(r){if(s(),0===i.listenerCount(this,"error"))throw r}function s(){n.removeListener("data",a),r.removeListener("drain",t),n.removeListener("end",c),n.removeListener("close",u),n.removeListener("error",d),r.removeListener("error",d),n.removeListener("end",s),n.removeListener("close",s),r.removeListener("close",s)}return n.on("error",d),r.on("error",d),n.on("end",s),n.on("close",s),r.on("close",s),r.emit("pipe",n),r}},92784:function(r){"use strict";var e={};function n(r,n,i){i||(i=Error);var a=function(r){var e,i;function a(e,i,a){return r.call(this,function(r,e,i){return"string"===typeof n?n:n(r,e,i)}(e,i,a))||this}return i=r,(e=a).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,a}(i);a.prototype.name=i.name,a.prototype.code=r,e[r]=a}function i(r,e){if(Array.isArray(r)){var n=r.length;return r=r.map((function(r){return String(r)})),n>2?"one of ".concat(e," ").concat(r.slice(0,n-1).join(", "),", or ")+r[n-1]:2===n?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}n("ERR_INVALID_OPT_VALUE",(function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(r,e,n){var a,t,o,c;if("string"===typeof e&&(t="not ",e.substr(!o||o<0?0:+o,t.length)===t)?(a="must not be",e=e.replace(/^not /,"")):a="must be",function(r,e,n){return(void 0===n||n>r.length)&&(n=r.length),r.substring(n-e.length,n)===e}(r," argument"))c="The ".concat(r," ").concat(a," ").concat(i(e,"type"));else{var u=function(r,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>r.length)&&-1!==r.indexOf(e,n)}(r,".")?"property":"argument";c='The "'.concat(r,'" ').concat(u," ").concat(a," ").concat(i(e,"type"))}return c+=". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(r){return"The "+r+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(r){return"Cannot call "+r+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(r){return"Unknown encoding: "+r}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r.exports.i=e},15316:function(r,e,n){"use strict";var i=n(4168),a=Object.keys||function(r){var e=[];for(var n in r)e.push(n);return e};r.exports=s;var t=n(12348),o=n(11288);n(6768)(s,t);for(var c=a(o.prototype),u=0;u0)if("string"===typeof e||c.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(r){return u.from(r)}(e)),i)c.endEmitted?P(r,new x):b(r,c,e,!0);else if(c.ended)P(r,new h);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!n?(e=c.decoder.write(e),c.objectMode||0!==e.length?b(r,c,e,!1):z(r,c)):b(r,c,e,!1)}else i||(c.reading=!1,z(r,c));return!c.ended&&(c.lengthe.highWaterMark&&(e.highWaterMark=function(r){return r>=M?r=M:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r}(r)),r<=e.length?r:e.ended?e.length:(e.needReadable=!0,0))}function k(r){var e=r._readableState;t("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(t("emitReadable",e.flowing),e.emittedReadable=!0,a.nextTick(F,r))}function F(r){var e=r._readableState;t("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(r.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,T(r)}function z(r,e){e.readingMore||(e.readingMore=!0,a.nextTick(w,r,e))}function w(r,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:r.listenerCount("data")>0&&r.resume()}function E(r){t("readable nexttick read 0"),r.read(0)}function N(r,e){t("resume",e.reading),e.reading||r.read(0),e.resumeScheduled=!1,r.emit("resume"),T(r),e.flowing&&!e.reading&&r.read(0)}function T(r){var e=r._readableState;for(t("flow",e.flowing);e.flowing&&null!==r.read(););}function D(r,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!r||r>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(r,e.decoder),n);var n}function J(r){var e=r._readableState;t("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,a.nextTick(U,e,r))}function U(r,e){if(t("endReadableNT",r.endEmitted,r.length),!r.endEmitted&&0===r.length&&(r.endEmitted=!0,e.readable=!1,e.emit("end"),r.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function H(r,e){for(var n=0,i=r.length;n=e.highWaterMark:e.length>0)||e.ended))return t("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?J(this):k(this),null;if(0===(r=B(r,e))&&e.ended)return 0===e.length&&J(this),null;var i,a=e.needReadable;return t("need readable",a),(0===e.length||e.length-r0?D(r,e):null)?(e.needReadable=e.length<=e.highWaterMark,r=0):(e.length-=r,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==r&&e.ended&&J(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(r){P(this,new v("_read()"))},S.prototype.pipe=function(r,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=r;break;case 1:i.pipes=[i.pipes,r];break;default:i.pipes.push(r)}i.pipesCount+=1,t("pipe count=%d opts=%j",i.pipesCount,e);var c=e&&!1===e.end||r===a.stdout||r===a.stderr?f:d;function u(e,a){t("onunpipe"),e===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,t("cleanup"),r.removeListener("close",I),r.removeListener("finish",y),r.removeListener("drain",s),r.removeListener("error",p),r.removeListener("unpipe",u),n.removeListener("end",d),n.removeListener("end",f),n.removeListener("data",m),l=!0,!i.awaitDrain||r._writableState&&!r._writableState.needDrain||s())}function d(){t("onend"),r.end()}i.endEmitted?a.nextTick(c):n.once("end",c),r.on("unpipe",u);var s=function(r){return function(){var e=r._readableState;t("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(r,"data")&&(e.flowing=!0,T(r))}}(n);r.on("drain",s);var l=!1;function m(e){t("ondata");var a=r.write(e);t("dest.write",a),!1===a&&((1===i.pipesCount&&i.pipes===r||i.pipesCount>1&&-1!==H(i.pipes,r))&&!l&&(t("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){t("onerror",e),f(),r.removeListener("error",p),0===o(r,"error")&&P(r,e)}function I(){r.removeListener("finish",y),f()}function y(){t("onfinish"),r.removeListener("close",I),f()}function f(){t("unpipe"),n.unpipe(r)}return n.on("data",m),function(r,e,n){if("function"===typeof r.prependListener)return r.prependListener(e,n);r._events&&r._events[e]?Array.isArray(r._events[e])?r._events[e].unshift(n):r._events[e]=[n,r._events[e]]:r.on(e,n)}(r,"error",p),r.once("close",I),r.once("finish",y),r.emit("pipe",n),i.flowing||(t("pipe resume"),n.resume()),r},S.prototype.unpipe=function(r){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return r&&r!==e.pipes||(r||(r=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,r&&r.emit("unpipe",this,n)),this;if(!r){var i=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var t=0;t0,!1!==i.flowing&&this.resume()):"readable"===r&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,t("on readable",i.length,i.reading),i.length?k(this):i.reading||a.nextTick(E,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(r,e){var n=c.prototype.removeListener.call(this,r,e);return"readable"===r&&a.nextTick(R,this),n},S.prototype.removeAllListeners=function(r){var e=c.prototype.removeAllListeners.apply(this,arguments);return"readable"!==r&&void 0!==r||a.nextTick(R,this),e},S.prototype.resume=function(){var r=this._readableState;return r.flowing||(t("resume"),r.flowing=!r.readableListening,function(r,e){e.resumeScheduled||(e.resumeScheduled=!0,a.nextTick(N,r,e))}(this,r)),r.paused=!1,this},S.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(r){var e=this,n=this._readableState,i=!1;for(var a in r.on("end",(function(){if(t("wrapped end"),n.decoder&&!n.ended){var r=n.decoder.end();r&&r.length&&e.push(r)}e.push(null)})),r.on("data",(function(a){t("wrapped data"),n.decoder&&(a=n.decoder.write(a)),(!n.objectMode||null!==a&&void 0!==a)&&(n.objectMode||a&&a.length)&&(e.push(a)||(i=!0,r.pause()))})),r)void 0===this[a]&&"function"===typeof r[a]&&(this[a]=function(e){return function(){return r[e].apply(r,arguments)}}(a));for(var o=0;o-1))throw new x(r);return this._writableState.defaultEncoding=r,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(r,e,n){n(new y("_write()"))},S.prototype._writev=null,S.prototype.end=function(r,e,n){var i=this._writableState;return"function"===typeof r?(n=r,r=null,e=null):"function"===typeof e&&(n=e,e=null),null!==r&&void 0!==r&&this.write(r,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(r,e,n){e.ending=!0,F(r,e),n&&(e.finished?a.nextTick(n):r.once("finish",n)),e.ended=!0,r.writable=!1}(this,i,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(r){this._writableState&&(this._writableState.destroyed=r)}}),S.prototype.destroy=l.destroy,S.prototype._undestroy=l.undestroy,S.prototype._destroy=function(r,e){e(r)}},60328:function(r,e,n){"use strict";var i,a=n(4168);function t(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}var o=n(15932),c=Symbol("lastResolve"),u=Symbol("lastReject"),d=Symbol("error"),s=Symbol("ended"),l=Symbol("lastPromise"),m=Symbol("handlePromise"),p=Symbol("stream");function I(r,e){return{value:r,done:e}}function y(r){var e=r[c];if(null!==e){var n=r[p].read();null!==n&&(r[l]=null,r[c]=null,r[u]=null,e(I(n,!1)))}}function f(r){a.nextTick(y,r)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((t(i={get stream(){return this[p]},next:function(){var r=this,e=this[d];if(null!==e)return Promise.reject(e);if(this[s])return Promise.resolve(I(void 0,!0));if(this[p].destroyed)return new Promise((function(e,n){a.nextTick((function(){r[d]?n(r[d]):e(I(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(r,e){return function(n,i){r.then((function(){e[s]?n(I(void 0,!0)):e[m](n,i)}),i)}}(i,this));else{var t=this[p].read();if(null!==t)return Promise.resolve(I(t,!1));n=new Promise(this[m])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),t(i,"return",(function(){var r=this;return new Promise((function(e,n){r[p].destroy(null,(function(r){r?n(r):e(I(void 0,!0))}))}))})),i),g);r.exports=function(r){var e,n=Object.create(_,(t(e={},p,{value:r,writable:!0}),t(e,c,{value:null,writable:!0}),t(e,u,{value:null,writable:!0}),t(e,d,{value:null,writable:!0}),t(e,s,{value:r._readableState.endEmitted,writable:!0}),t(e,m,{value:function(r,e){var i=n[p].read();i?(n[l]=null,n[c]=null,n[u]=null,r(I(i,!1))):(n[c]=r,n[u]=e)},writable:!0}),e));return n[l]=null,o(r,(function(r){if(r&&"ERR_STREAM_PREMATURE_CLOSE"!==r.code){var e=n[u];return null!==e&&(n[l]=null,n[c]=null,n[u]=null,e(r)),void(n[d]=r)}var i=n[c];null!==i&&(n[l]=null,n[c]=null,n[u]=null,i(I(void 0,!0))),n[s]=!0})),r.on("readable",f.bind(null,n)),n}},47264:function(r,e,n){"use strict";function i(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,i)}return n}function a(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function t(r,e){for(var n=0;n0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(r){var e={data:r,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var r=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=r+e.data;return n}},{key:"concat",value:function(r){if(0===this.length)return o.alloc(0);for(var e,n,i,a=o.allocUnsafe(r>>>0),t=this.head,c=0;t;)e=t.data,n=a,i=c,o.prototype.copy.call(e,n,i),c+=t.data.length,t=t.next;return a}},{key:"consume",value:function(r,e){var n;return ra.length?a.length:r;if(t===a.length?i+=a:i+=a.slice(0,r),0===(r-=t)){t===a.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=a.slice(t));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(r){var e=o.allocUnsafe(r),n=this.head,i=1;for(n.data.copy(e),r-=n.data.length;n=n.next;){var a=n.data,t=r>a.length?a.length:r;if(a.copy(e,e.length-r,0,t),0===(r-=t)){t===a.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(t));break}++i}return this.length-=i,e}},{key:u,value:function(r,e){return c(this,function(r){for(var e=1;e0,(function(r){s||(s=r),r&&m.forEach(u),t||(m.forEach(u),l(s))}))}));return e.reduce(d)}},24888:function(r,e,n){"use strict";var i=n(92784).i.ERR_INVALID_OPT_VALUE;r.exports={getHighWaterMark:function(r,e,n,a){var t=function(r,e,n){return null!=r.highWaterMark?r.highWaterMark:e?r[n]:null}(e,a,n);if(null!=t){if(!isFinite(t)||Math.floor(t)!==t||t<0)throw new i(a?n:"highWaterMark",t);return Math.floor(t)}return r.objectMode?16:16384}}},4776:function(r,e,n){r.exports=n(61252).EventEmitter},86032:function(r,e,n){"use strict";var i=n(30456).Buffer,a=i.isEncoding||function(r){switch((r=""+r)&&r.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(r){var e;switch(this.encoding=function(r){var e=function(r){if(!r)return"utf8";for(var e;;)switch(r){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return r;default:if(e)return;r=(""+r).toLowerCase(),e=!0}}(r);if("string"!==typeof e&&(i.isEncoding===a||!a(r)))throw new Error("Unknown encoding: "+r);return e||r}(r),this.encoding){case"utf16le":this.text=u,this.end=d,e=4;break;case"utf8":this.fillLast=c,e=4;break;case"base64":this.text=s,this.end=l,e=3;break;default:return this.write=m,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function o(r){return r<=127?0:r>>5===6?2:r>>4===14?3:r>>3===30?4:r>>6===2?-1:-2}function c(r){var e=this.lastTotal-this.lastNeed,n=function(r,e,n){if(128!==(192&e[0]))return r.lastNeed=0,"\ufffd";if(r.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return r.lastNeed=1,"\ufffd";if(r.lastNeed>2&&e.length>2&&128!==(192&e[2]))return r.lastNeed=2,"\ufffd"}}(this,r);return void 0!==n?n:this.lastNeed<=r.length?(r.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(r.copy(this.lastChar,e,0,r.length),void(this.lastNeed-=r.length))}function u(r,e){if((r.length-e)%2===0){var n=r.toString("utf16le",e);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r[r.length-1],r.toString("utf16le",e,r.length-1)}function d(r){var e=r&&r.length?this.write(r):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function s(r,e){var n=(r.length-e)%3;return 0===n?r.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=r[r.length-1]:(this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1]),r.toString("base64",e,r.length-n))}function l(r){var e=r&&r.length?this.write(r):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function m(r){return r.toString(this.encoding)}function p(r){return r&&r.length?this.write(r):""}e.o=t,t.prototype.write=function(r){if(0===r.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(r)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(a>0&&(r.lastNeed=a-1),a):--i=0?(a>0&&(r.lastNeed=a-2),a):--i=0?(a>0&&(2===a?a=0:r.lastNeed=a-3),a):0}(this,r,e);if(!this.lastNeed)return r.toString("utf8",e);this.lastTotal=n;var i=r.length-(n-this.lastNeed);return r.copy(this.lastChar,0,i),r.toString("utf8",e,i)},t.prototype.fillLast=function(r){if(this.lastNeed<=r.length)return r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,r.length),this.lastNeed-=r.length}},55619:function(r,e,n){var i=n(45408),a=n(86844)("stream-parser");r.exports=function(r){var e=r&&"function"==typeof r._transform,n=r&&"function"==typeof r._write;if(!e&&!n)throw new Error("must pass a Writable or Transform stream in");a("extending Parser into stream"),r._bytes=s,r._skipBytes=l,e&&(r._passthrough=m),e?r._transform=I:r._write=p};var t=-1,o=0,c=1,u=2;function d(r){a("initializing parser stream"),r._parserBytesLeft=0,r._parserBuffers=[],r._parserBuffered=0,r._parserState=t,r._parserCallback=null,"function"==typeof r.push&&(r._parserOutput=r.push.bind(r)),r._parserInit=!0}function s(r,e){i(!this._parserCallback,'there is already a "callback" set!'),i(isFinite(r)&&r>0,'can only buffer a finite number of bytes > 0, got "'+r+'"'),this._parserInit||d(this),a("buffering %o bytes",r),this._parserBytesLeft=r,this._parserCallback=e,this._parserState=o}function l(r,e){i(!this._parserCallback,'there is already a "callback" set!'),i(r>0,'can only skip > 0 bytes, got "'+r+'"'),this._parserInit||d(this),a("skipping %o bytes",r),this._parserBytesLeft=r,this._parserCallback=e,this._parserState=c}function m(r,e){i(!this._parserCallback,'There is already a "callback" set!'),i(r>0,'can only pass through > 0 bytes, got "'+r+'"'),this._parserInit||d(this),a("passing through %o bytes",r),this._parserBytesLeft=r,this._parserCallback=e,this._parserState=u}function p(r,e,n){this._parserInit||d(this),a("write(%o bytes)",r.length),"function"==typeof e&&(n=e),f(this,r,null,n)}function I(r,e,n){this._parserInit||d(this),a("transform(%o bytes)",r.length),"function"!=typeof e&&(e=this._parserOutput),f(this,r,e,n)}function y(r,e,n,i){if(r._parserBytesLeft-=e.length,a("%o bytes left for stream piece",r._parserBytesLeft),r._parserState===o?(r._parserBuffers.push(e),r._parserBuffered+=e.length):r._parserState===u&&n(e),0!==r._parserBytesLeft)return i;var c=r._parserCallback;if(c&&r._parserState===o&&r._parserBuffers.length>1&&(e=Buffer.concat(r._parserBuffers,r._parserBuffered)),r._parserState!==o&&(e=null),r._parserCallback=null,r._parserBuffered=0,r._parserState=t,r._parserBuffers.splice(0),c){var d=[];e&&d.push(e),n&&d.push(n);var s=c.length>d.length;s&&d.push(g(i));var l=c.apply(r,d);if(!s||i===l)return i}}var f=g((function r(e,n,i,a){return e._parserBytesLeft<=0?a(new Error("got data but not currently parsing anything")):n.length<=e._parserBytesLeft?function(){return y(e,n,i,a)}:function(){var t=n.slice(0,e._parserBytesLeft);return y(e,t,i,(function(o){return o?a(o):n.length>t.length?function(){return r(e,n.slice(t.length),i,a)}:void 0}))}}));function g(r){return function(){for(var e=r.apply(this,arguments);"function"==typeof e;)e=e();return e}}},86844:function(r,e,n){var i=n(4168);function a(){var r;try{r=e.storage.debug}catch(n){}return!r&&"undefined"!==typeof i&&"env"in i&&(r=i.env.DEBUG),r}(e=r.exports=n(89416)).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(r){var n=this.useColors;if(r[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+r[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var i="color: "+this.color;r.splice(1,0,i,"color: inherit");var a=0,t=0;r[0].replace(/%[a-zA-Z%]/g,(function(r){"%%"!==r&&(a++,"%c"===r&&(t=a))})),r.splice(t,0,i)}},e.save=function(r){try{null==r?e.storage.removeItem("debug"):e.storage.debug=r}catch(n){}},e.load=a,e.useColors=function(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(r){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(a())},89416:function(r,e,n){var i;function a(r){function n(){if(n.enabled){var r=n,a=+new Date,t=a-(i||a);r.diff=t,r.prev=i,r.curr=a,i=a;for(var o=new Array(arguments.length),c=0;c0)return function(r){if(!((r=String(r)).length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(o){var c=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*t;case"days":case"day":case"d":return c*a;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}(r);if("number"===d&&!1===isNaN(r))return c.long?o(u=r,a,"day")||o(u,i,"hour")||o(u,n,"minute")||o(u,e,"second")||u+" ms":function(r){return r>=a?Math.round(r/a)+"d":r>=i?Math.round(r/i)+"h":r>=n?Math.round(r/n)+"m":r>=e?Math.round(r/e)+"s":r+"ms"}(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))}},39956:function(r,e,n){"use strict";var i=n(32868);r.exports=function(r,e,n){if(null==r)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");n?("string"===typeof n||Array.isArray(n))&&(n={ignore:n}):n={},null==n.escape&&(n.escape=!0),null==n.ignore?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201c\u201d","\xab\xbb"]:("string"===typeof n.ignore&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map((function(r){return 1===r.length&&(r+=r),r})));var a=i.parse(r,{flat:!0,brackets:n.ignore}),t=a[0].split(e);if(n.escape){for(var o=[],c=0;c0;){e=d[d.length-1];var p=r[e];if(t[e]=0&&c[e].push(o[y])}t[e]=I}else{if(i[e]===n[e]){var f=[],g=[],_=0;for(I=u.length-1;I>=0;--I){var h=u[I];if(a[h]=!1,f.push(h),g.push(c[h]),_+=c[h].length,o[h]=l.length,h===e){u.length=I;break}}l.push(f);var v=new Array(_);for(I=0;I1&&(a=1),a<-1&&(a=-1),(r*i-e*n<0?-1:1)*Math.acos(a)};e.default=function(r){var e=r.px,n=r.py,u=r.cx,d=r.cy,s=r.rx,l=r.ry,m=r.xAxisRotation,p=void 0===m?0:m,I=r.largeArcFlag,y=void 0===I?0:I,f=r.sweepFlag,g=void 0===f?0:f,_=[];if(0===s||0===l)return[];var h=Math.sin(p*a/360),v=Math.cos(p*a/360),x=v*(e-u)/2+h*(n-d)/2,P=-h*(e-u)/2+v*(n-d)/2;if(0===x&&0===P)return[];s=Math.abs(s),l=Math.abs(l);var G=Math.pow(x,2)/Math.pow(s,2)+Math.pow(P,2)/Math.pow(l,2);G>1&&(s*=Math.sqrt(G),l*=Math.sqrt(G));var C=function(r,e,n,i,t,o,u,d,s,l,m,p){var I=Math.pow(t,2),y=Math.pow(o,2),f=Math.pow(m,2),g=Math.pow(p,2),_=I*y-I*g-y*f;_<0&&(_=0),_/=I*g+y*f;var h=(_=Math.sqrt(_)*(u===d?-1:1))*t/o*p,v=_*-o/t*m,x=l*h-s*v+(r+n)/2,P=s*h+l*v+(e+i)/2,G=(m-h)/t,C=(p-v)/o,S=(-m-h)/t,A=(-p-v)/o,b=c(1,0,G,C),M=c(G,C,S,A);return 0===d&&M>0&&(M-=a),1===d&&M<0&&(M+=a),[x,P,b,M]}(e,n,u,d,s,l,y,g,h,v,x,P),S=i(C,4),A=S[0],b=S[1],M=S[2],B=S[3],k=Math.abs(B)/(a/4);Math.abs(1-k)<1e-7&&(k=1);var F=Math.max(Math.ceil(k),1);B/=F;for(var z=0;ze[2]&&(e[2]=d[s+0]),d[s+1]>e[3]&&(e[3]=d[s+1]);return e}},41976:function(r,e,n){"use strict";r.exports=function(r){for(var e,n=[],o=0,c=0,u=0,d=0,s=null,l=null,m=0,p=0,I=0,y=r.length;I4?(o=f[f.length-4],c=f[f.length-3]):(o=m,c=p),n.push(f)}return n};var i=n(92848);function a(r,e,n,i){return["C",r,e,n,i,n,i]}function t(r,e,n,i,a,t){return["C",r/3+2/3*n,e/3+2/3*i,a/3+2/3*n,t/3+2/3*i,a,t]}},20472:function(r,e,n){"use strict";var i,a=n(74840),t=n(21984),o=n(22235),c=n(53520),u=n(29620),d=document.createElement("canvas"),s=d.getContext("2d");r.exports=function(r,e){if(!c(r))throw Error("Argument should be valid svg path string");var n,l;e||(e={}),e.shape?(n=e.shape[0],l=e.shape[1]):(n=d.width=e.w||e.width||200,l=d.height=e.h||e.height||200);var m=Math.min(n,l),p=e.stroke||0,I=e.viewbox||e.viewBox||a(r),y=[n/(I[2]-I[0]),l/(I[3]-I[1])],f=Math.min(y[0]||0,y[1]||0)/2;if(s.fillStyle="black",s.fillRect(0,0,n,l),s.fillStyle="white",p&&("number"!=typeof p&&(p=1),s.strokeStyle=p>0?"white":"black",s.lineWidth=Math.abs(p)),s.translate(.5*n,.5*l),s.scale(f,f),function(){if(null!=i)return i;var r=document.createElement("canvas").getContext("2d");if(r.canvas.width=r.canvas.height=1,!window.Path2D)return i=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");r.fillStyle="black",r.fill(e);var n=r.getImageData(0,0,1,1);return i=n&&n.data&&255===n.data[3]}()){var g=new Path2D(r);s.fill(g),p&&s.stroke(g)}else{var _=t(r);o(s,_),s.fill(),p&&s.stroke()}return s.setTransform(1,0,0,1,0,0),u(s,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*m})}},49760:function(r,e,n){var i;!function(a){var t=/^\s+/,o=/\s+$/,c=0,u=a.round,d=a.min,s=a.max,l=a.random;function m(r,e){if(e=e||{},(r=r||"")instanceof m)return r;if(!(this instanceof m))return new m(r,e);var n=function(r){var e,n,i,c={r:0,g:0,b:0},u=1,l=null,m=null,p=null,I=!1,y=!1;return"string"==typeof r&&(r=function(r){r=r.replace(t,"").replace(o,"").toLowerCase();var e,n=!1;if(k[r])r=k[r],n=!0;else if("transparent"==r)return{r:0,g:0,b:0,a:0,format:"name"};return(e=U.rgb.exec(r))?{r:e[1],g:e[2],b:e[3]}:(e=U.rgba.exec(r))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=U.hsl.exec(r))?{h:e[1],s:e[2],l:e[3]}:(e=U.hsla.exec(r))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=U.hsv.exec(r))?{h:e[1],s:e[2],v:e[3]}:(e=U.hsva.exec(r))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=U.hex8.exec(r))?{r:E(e[1]),g:E(e[2]),b:E(e[3]),a:J(e[4]),format:n?"name":"hex8"}:(e=U.hex6.exec(r))?{r:E(e[1]),g:E(e[2]),b:E(e[3]),format:n?"name":"hex"}:(e=U.hex4.exec(r))?{r:E(e[1]+""+e[1]),g:E(e[2]+""+e[2]),b:E(e[3]+""+e[3]),a:J(e[4]+""+e[4]),format:n?"name":"hex8"}:!!(e=U.hex3.exec(r))&&{r:E(e[1]+""+e[1]),g:E(e[2]+""+e[2]),b:E(e[3]+""+e[3]),format:n?"name":"hex"}}(r)),"object"==typeof r&&(H(r.r)&&H(r.g)&&H(r.b)?(e=r.r,n=r.g,i=r.b,c={r:255*w(e,255),g:255*w(n,255),b:255*w(i,255)},I=!0,y="%"===String(r.r).substr(-1)?"prgb":"rgb"):H(r.h)&&H(r.s)&&H(r.v)?(l=T(r.s),m=T(r.v),c=function(r,e,n){r=6*w(r,360),e=w(e,100),n=w(n,100);var i=a.floor(r),t=r-i,o=n*(1-e),c=n*(1-t*e),u=n*(1-(1-t)*e),d=i%6,s=[n,c,o,o,u,n][d],l=[u,n,n,c,o,o][d],m=[o,o,u,n,n,c][d];return{r:255*s,g:255*l,b:255*m}}(r.h,l,m),I=!0,y="hsv"):H(r.h)&&H(r.s)&&H(r.l)&&(l=T(r.s),p=T(r.l),c=function(r,e,n){var i,a,t;function o(r,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?r+6*(e-r)*n:n<.5?e:n<2/3?r+(e-r)*(2/3-n)*6:r}if(r=w(r,360),e=w(e,100),n=w(n,100),0===e)i=a=t=n;else{var c=n<.5?n*(1+e):n+e-n*e,u=2*n-c;i=o(u,c,r+1/3),a=o(u,c,r),t=o(u,c,r-1/3)}return{r:255*i,g:255*a,b:255*t}}(r.h,l,p),I=!0,y="hsl"),r.hasOwnProperty("a")&&(u=r.a)),u=z(u),{ok:I,format:r.format||y,r:d(255,s(c.r,0)),g:d(255,s(c.g,0)),b:d(255,s(c.b,0)),a:u}}(r);this._originalInput=r,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=u(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=u(this._r)),this._g<1&&(this._g=u(this._g)),this._b<1&&(this._b=u(this._b)),this._ok=n.ok,this._tc_id=c++}function p(r,e,n){r=w(r,255),e=w(e,255),n=w(n,255);var i,a,t=s(r,e,n),o=d(r,e,n),c=(t+o)/2;if(t==o)i=a=0;else{var u=t-o;switch(a=c>.5?u/(2-t-o):u/(t+o),t){case r:i=(e-n)/u+(e>1)+720)%360;--e;)i.h=(i.h+a)%360,t.push(m(i));return t}function B(r,e){e=e||6;for(var n=m(r).toHsv(),i=n.h,a=n.s,t=n.v,o=[],c=1/e;e--;)o.push(m({h:i,s:a,v:t})),t=(t+c)%1;return o}m.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 r=this.toRgb();return(299*r.r+587*r.g+114*r.b)/1e3},getLuminance:function(){var r,e,n,i=this.toRgb();return r=i.r/255,e=i.g/255,n=i.b/255,.2126*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:a.pow((n+.055)/1.055,2.4))},setAlpha:function(r){return this._a=z(r),this._roundA=u(100*this._a)/100,this},toHsv:function(){var r=I(this._r,this._g,this._b);return{h:360*r.h,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=I(this._r,this._g,this._b),e=u(360*r.h),n=u(100*r.s),i=u(100*r.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var r=p(this._r,this._g,this._b);return{h:360*r.h,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=p(this._r,this._g,this._b),e=u(360*r.h),n=u(100*r.s),i=u(100*r.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(r){return y(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return function(r,e,n,i,a){var t=[N(u(r).toString(16)),N(u(e).toString(16)),N(u(n).toString(16)),N(D(i))];return a&&t[0].charAt(0)==t[0].charAt(1)&&t[1].charAt(0)==t[1].charAt(1)&&t[2].charAt(0)==t[2].charAt(1)&&t[3].charAt(0)==t[3].charAt(1)?t[0].charAt(0)+t[1].charAt(0)+t[2].charAt(0)+t[3].charAt(0):t.join("")}(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:u(this._r),g:u(this._g),b:u(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+u(this._r)+", "+u(this._g)+", "+u(this._b)+")":"rgba("+u(this._r)+", "+u(this._g)+", "+u(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:u(100*w(this._r,255))+"%",g:u(100*w(this._g,255))+"%",b:u(100*w(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+u(100*w(this._r,255))+"%, "+u(100*w(this._g,255))+"%, "+u(100*w(this._b,255))+"%)":"rgba("+u(100*w(this._r,255))+"%, "+u(100*w(this._g,255))+"%, "+u(100*w(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(F[y(this._r,this._g,this._b,!0)]||!1)},toFilter:function(r){var e="#"+f(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(r){var a=m(r);n="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(r){var e=!!r;r=r||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==r&&"hex6"!==r&&"hex3"!==r&&"hex4"!==r&&"hex8"!==r&&"name"!==r?("rgb"===r&&(n=this.toRgbString()),"prgb"===r&&(n=this.toPercentageRgbString()),"hex"!==r&&"hex6"!==r||(n=this.toHexString()),"hex3"===r&&(n=this.toHexString(!0)),"hex4"===r&&(n=this.toHex8String(!0)),"hex8"===r&&(n=this.toHex8String()),"name"===r&&(n=this.toName()),"hsl"===r&&(n=this.toHslString()),"hsv"===r&&(n=this.toHsvString()),n||this.toHexString()):"name"===r&&0===this._a?this.toName():this.toRgbString()},clone:function(){return m(this.toString())},_applyModification:function(r,e){var n=r.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(P,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(G,arguments)},_applyCombination:function(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(b,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},m.fromRatio=function(r,e){if("object"==typeof r){var n={};for(var i in r)r.hasOwnProperty(i)&&(n[i]="a"===i?r[i]:T(r[i]));r=n}return m(r,e)},m.equals=function(r,e){return!(!r||!e)&&m(r).toRgbString()==m(e).toRgbString()},m.random=function(){return m.fromRatio({r:l(),g:l(),b:l()})},m.mix=function(r,e,n){n=0===n?0:n||50;var i=m(r).toRgb(),a=m(e).toRgb(),t=n/100;return m({r:(a.r-i.r)*t+i.r,g:(a.g-i.g)*t+i.g,b:(a.b-i.b)*t+i.b,a:(a.a-i.a)*t+i.a})},m.readability=function(r,e){var n=m(r),i=m(e);return(a.max(n.getLuminance(),i.getLuminance())+.05)/(a.min(n.getLuminance(),i.getLuminance())+.05)},m.isReadable=function(r,e,n){var i,a,t=m.readability(r,e);switch(a=!1,(i=function(r){var e,n;return e=((r=r||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(r.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==n&&"large"!==n&&(n="small"),{level:e,size:n}}(n)).level+i.size){case"AAsmall":case"AAAlarge":a=t>=4.5;break;case"AAlarge":a=t>=3;break;case"AAAsmall":a=t>=7}return a},m.mostReadable=function(r,e,n){var i,a,t,o,c=null,u=0;a=(n=n||{}).includeFallbackColors,t=n.level,o=n.size;for(var d=0;du&&(u=i,c=m(e[d]));return m.isReadable(r,c,{level:t,size:o})||!a?c:(n.includeFallbackColors=!1,m.mostReadable(r,["#fff","#000"],n))};var k=m.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"},F=m.hexNames=function(r){var e={};for(var n in r)r.hasOwnProperty(n)&&(e[r[n]]=n);return e}(k);function z(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function w(r,e){(function(r){return"string"==typeof r&&-1!=r.indexOf(".")&&1===parseFloat(r)})(r)&&(r="100%");var n=function(r){return"string"===typeof r&&-1!=r.indexOf("%")}(r);return r=d(e,s(0,parseFloat(r))),n&&(r=parseInt(r*e,10)/100),a.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function R(r){return d(1,s(0,r))}function E(r){return parseInt(r,16)}function N(r){return 1==r.length?"0"+r:""+r}function T(r){return r<=1&&(r=100*r+"%"),r}function D(r){return a.round(255*parseFloat(r)).toString(16)}function J(r){return E(r)/255}var U=function(){var r="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),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 H(r){return!!U.CSS_UNIT.exec(r)}r.exports?r.exports=m:void 0===(i=function(){return m}.call(e,n,e,r))||(r.exports=i)}(Math)},37816:function(r){"use strict";r.exports=n,r.exports.float32=r.exports.float=n,r.exports.fract32=r.exports.fract=function(r,e){if(r.length){if(r instanceof Float32Array)return new Float32Array(r.length);e instanceof Float32Array||(e=n(r));for(var i=0,a=e.length;i":(e.length>100&&(e=e.slice(0,99)+"\u2026"),e=e.replace(a,(function(r){switch(r){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},7328:function(r,e,n){"use strict";var i=n(81680),a={object:!0,function:!0,undefined:!0};r.exports=function(r){return!!i(r)&&hasOwnProperty.call(a,typeof r)}},87396:function(r,e,n){"use strict";var i=n(57980),a=n(85488);r.exports=function(r){return a(r)?r:i(r,"%v is not a plain function",arguments[1])}},85488:function(r,e,n){"use strict";var i=n(73384),a=/^\s*class[\s{/}]/,t=Function.prototype.toString;r.exports=function(r){return!!i(r)&&!a.test(t.call(r))}},54612:function(r,e,n){"use strict";var i=n(7328);r.exports=function(r){if(!i(r))return!1;try{return!!r.constructor&&r.constructor.prototype===r}catch(e){return!1}}},33940:function(r,e,n){"use strict";var i=n(81680),a=n(7328),t=Object.prototype.toString;r.exports=function(r){if(!i(r))return null;if(a(r)){var e=r.toString;if("function"!==typeof e)return null;if(e===t)return null}try{return""+r}catch(n){return null}}},18496:function(r,e,n){"use strict";var i=n(57980),a=n(81680);r.exports=function(r){return a(r)?r:i(r,"Cannot use %v",arguments[1])}},81680:function(r){"use strict";r.exports=function(r){return void 0!==r&&null!==r}},14144:function(r,e,n){"use strict";var i=n(308),a=n(10352),t=n(33576).Buffer;n.g.__TYPEDARRAY_POOL||(n.g.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),BIGUINT64:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),BIGINT64:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var o="undefined"!==typeof Uint8ClampedArray,c="undefined"!==typeof BigUint64Array,u="undefined"!==typeof BigInt64Array,d=n.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=a([32,0])),d.BIGUINT64||(d.BIGUINT64=a([32,0])),d.BIGINT64||(d.BIGINT64=a([32,0])),d.BUFFER||(d.BUFFER=a([32,0]));var s=d.DATA,l=d.BUFFER;function m(r){if(r){var e=r.length||r.byteLength,n=i.log2(e);s[n].push(r)}}function p(r){r=i.nextPow2(r);var e=i.log2(r),n=s[e];return n.length>0?n.pop():new ArrayBuffer(r)}function I(r){return new Uint8Array(p(r),0,r)}function y(r){return new Uint16Array(p(2*r),0,r)}function f(r){return new Uint32Array(p(4*r),0,r)}function g(r){return new Int8Array(p(r),0,r)}function _(r){return new Int16Array(p(2*r),0,r)}function h(r){return new Int32Array(p(4*r),0,r)}function v(r){return new Float32Array(p(4*r),0,r)}function x(r){return new Float64Array(p(8*r),0,r)}function P(r){return o?new Uint8ClampedArray(p(r),0,r):I(r)}function G(r){return c?new BigUint64Array(p(8*r),0,r):null}function C(r){return u?new BigInt64Array(p(8*r),0,r):null}function S(r){return new DataView(p(r),0,r)}function A(r){r=i.nextPow2(r);var e=i.log2(r),n=l[e];return n.length>0?n.pop():new t(r)}e.free=function(r){if(t.isBuffer(r))l[i.log2(r.length)].push(r);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(r)&&(r=r.buffer),!r)return;var e=r.length||r.byteLength,n=0|i.log2(e);s[n].push(r)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(r){m(r.buffer)},e.freeArrayBuffer=m,e.freeBuffer=function(r){l[i.log2(r.length)].push(r)},e.malloc=function(r,e){if(void 0===e||"arraybuffer"===e)return p(r);switch(e){case"uint8":return I(r);case"uint16":return y(r);case"uint32":return f(r);case"int8":return g(r);case"int16":return _(r);case"int32":return h(r);case"float":case"float32":return v(r);case"double":case"float64":return x(r);case"uint8_clamped":return P(r);case"bigint64":return C(r);case"biguint64":return G(r);case"buffer":return A(r);case"data":case"dataview":return S(r);default:return null}return null},e.mallocArrayBuffer=p,e.mallocUint8=I,e.mallocUint16=y,e.mallocUint32=f,e.mallocInt8=g,e.mallocInt16=_,e.mallocInt32=h,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=P,e.mallocBigUint64=G,e.mallocBigInt64=C,e.mallocDataView=S,e.mallocBuffer=A,e.clearCache=function(){for(var r=0;r<32;++r)d.UINT8[r].length=0,d.UINT16[r].length=0,d.UINT32[r].length=0,d.INT8[r].length=0,d.INT16[r].length=0,d.INT32[r].length=0,d.FLOAT[r].length=0,d.DOUBLE[r].length=0,d.BIGUINT64[r].length=0,d.BIGINT64[r].length=0,d.UINT8C[r].length=0,s[r].length=0,l[r].length=0}},92384:function(r){var e=/[\'\"]/;r.exports=function(r){return r?(e.test(r.charAt(0))&&(r=r.substr(1)),e.test(r.charAt(r.length-1))&&(r=r.substr(0,r.length-1)),r):""}},45223:function(r){"use strict";r.exports=function(r,e,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i=a)return r;switch(r){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return r}})),c=i[n];n=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),f(n)?i.showHidden=n:n&&e._extend(i,n),v(i.showHidden)&&(i.showHidden=!1),v(i.depth)&&(i.depth=2),v(i.colors)&&(i.colors=!1),v(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=s),m(i,r,i.depth)}function s(r,e){var n=d.styles[e];return n?"\x1b["+d.colors[n][0]+"m"+r+"\x1b["+d.colors[n][1]+"m":r}function l(r,e){return r}function m(r,n,i){if(r.customInspect&&n&&S(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var a=n.inspect(i,r);return h(a)||(a=m(r,a,i)),a}var t=function(r,e){if(v(e))return r.stylize("undefined","undefined");if(h(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(n,"string")}return _(e)?r.stylize(""+e,"number"):f(e)?r.stylize(""+e,"boolean"):g(e)?r.stylize("null","null"):void 0}(r,n);if(t)return t;var o=Object.keys(n),c=function(r){var e={};return r.forEach((function(r,n){e[r]=!0})),e}(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(n)),C(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(n);if(0===o.length){if(S(n)){var u=n.name?": "+n.name:"";return r.stylize("[Function"+u+"]","special")}if(x(n))return r.stylize(RegExp.prototype.toString.call(n),"regexp");if(G(n))return r.stylize(Date.prototype.toString.call(n),"date");if(C(n))return p(n)}var d,s="",l=!1,P=["{","}"];return y(n)&&(l=!0,P=["[","]"]),S(n)&&(s=" [Function"+(n.name?": "+n.name:"")+"]"),x(n)&&(s=" "+RegExp.prototype.toString.call(n)),G(n)&&(s=" "+Date.prototype.toUTCString.call(n)),C(n)&&(s=" "+p(n)),0!==o.length||l&&0!=n.length?i<0?x(n)?r.stylize(RegExp.prototype.toString.call(n),"regexp"):r.stylize("[Object]","special"):(r.seen.push(n),d=l?function(r,e,n,i,a){for(var t=[],o=0,c=e.length;o60?n[0]+(""===e?"":e+"\n ")+" "+r.join(",\n ")+" "+n[1]:n[0]+e+" "+r.join(", ")+" "+n[1]}(d,s,P)):P[0]+s+P[1]}function p(r){return"["+Error.prototype.toString.call(r)+"]"}function I(r,e,n,i,a,t){var o,c,u;if((u=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]}).get?c=u.set?r.stylize("[Getter/Setter]","special"):r.stylize("[Getter]","special"):u.set&&(c=r.stylize("[Setter]","special")),B(i,a)||(o="["+a+"]"),c||(r.seen.indexOf(u.value)<0?(c=g(n)?m(r,u.value,null):m(r,u.value,n-1)).indexOf("\n")>-1&&(c=t?c.split("\n").map((function(r){return" "+r})).join("\n").slice(2):"\n"+c.split("\n").map((function(r){return" "+r})).join("\n")):c=r.stylize("[Circular]","special")),v(o)){if(t&&a.match(/^\d+$/))return c;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=r.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=r.stylize(o,"string"))}return o+": "+c}function y(r){return Array.isArray(r)}function f(r){return"boolean"===typeof r}function g(r){return null===r}function _(r){return"number"===typeof r}function h(r){return"string"===typeof r}function v(r){return void 0===r}function x(r){return P(r)&&"[object RegExp]"===A(r)}function P(r){return"object"===typeof r&&null!==r}function G(r){return P(r)&&"[object Date]"===A(r)}function C(r){return P(r)&&("[object Error]"===A(r)||r instanceof Error)}function S(r){return"function"===typeof r}function A(r){return Object.prototype.toString.call(r)}function b(r){return r<10?"0"+r.toString(10):r.toString(10)}e.debuglog=function(r){if(r=r.toUpperCase(),!o[r])if(c.test(r)){var n=i.pid;o[r]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,i)}}else o[r]=function(){};return o[r]},e.inspect=d,d.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]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=n(41088),e.isArray=y,e.isBoolean=f,e.isNull=g,e.isNullOrUndefined=function(r){return null==r},e.isNumber=_,e.isString=h,e.isSymbol=function(r){return"symbol"===typeof r},e.isUndefined=v,e.isRegExp=x,e.types.isRegExp=x,e.isObject=P,e.isDate=G,e.types.isDate=G,e.isError=C,e.types.isNativeError=C,e.isFunction=S,e.isPrimitive=function(r){return null===r||"boolean"===typeof r||"number"===typeof r||"string"===typeof r||"symbol"===typeof r||"undefined"===typeof r},e.isBuffer=n(75272);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(r,e){return Object.prototype.hasOwnProperty.call(r,e)}e.log=function(){console.log("%s - %s",function(){var r=new Date,e=[b(r.getHours()),b(r.getMinutes()),b(r.getSeconds())].join(":");return[r.getDate(),M[r.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=n(6768),e._extend=function(r,e){if(!e||!P(e))return r;for(var n=Object.keys(e),i=n.length;i--;)r[n[i]]=e[n[i]];return r};var k="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function F(r,e){if(!r){var n=new Error("Promise was rejected with a falsy value");n.reason=r,r=n}return e(r)}e.promisify=function(r){if("function"!==typeof r)throw new TypeError('The "original" argument must be of type Function');if(k&&r[k]){var e;if("function"!==typeof(e=r[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,i=new Promise((function(r,i){e=r,n=i})),a=[],t=0;t-1?e:"Object"===e&&function(r){var e=!1;return i(y,(function(n,i){if(!e)try{n(r),e=m(i,1)}catch(a){}})),e}(r)}return c?function(r){var e=!1;return i(y,(function(n,i){if(!e)try{"$"+n(r)===i&&(e=m(i,1))}catch(a){}})),e}(r):null}},67020:function(r,e,n){var i=n(38700),a=n(50896),t=i.instance();function o(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}o.prototype=new i.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(r,e){if("string"===typeof r){var n=r.match(u);return n?n[0]:""}var i=this._validateYear(r),a=r.month(),t=""+this.toChineseMonth(i,a);return e&&t.length<2&&(t="0"+t),this.isIntercalaryMonth(i,a)&&(t+="i"),t},monthNames:function(r){if("string"===typeof r){var e=r.match(d);return e?e[0]:""}var n=this._validateYear(r),i=r.month(),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(n,i)-1];return this.isIntercalaryMonth(n,i)&&(a="\u95f0"+a),a},monthNamesShort:function(r){if("string"===typeof r){var e=r.match(s);return e?e[0]:""}var n=this._validateYear(r),i=r.month(),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(n,i)-1];return this.isIntercalaryMonth(n,i)&&(a="\u95f0"+a),a},parseMonth:function(r,e){r=this._validateYear(r);var n,i=parseInt(e);if(isNaN(i))"\u95f0"===e[0]&&(n=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),i=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var a=e[e.length-1];n="i"===a||"I"===a}return this.toMonthIndex(r,i,n)},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(r,e){if(r.year&&(r=r.year()),"number"!==typeof r||r<1888||r>2111)throw e.replace(/\{0\}/,this.local.name);return r},toMonthIndex:function(r,e,n){var a=this.intercalaryMonth(r);if(n&&e!==a||e<1||e>12)throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!n&&e<=a?e-1:e:e-1},toChineseMonth:function(r,e){r.year&&(e=(r=r.year()).month());var n=this.intercalaryMonth(r);if(e<0||e>(n?12:11))throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?e>13},isIntercalaryMonth:function(r,e){r.year&&(e=(r=r.year()).month());var n=this.intercalaryMonth(r);return!!n&&n===e},leapYear:function(r){return 0!==this.intercalaryMonth(r)},weekOfYear:function(r,e,n){var a,o=this._validateYear(r,i.local.invalidyear),c=m[o-m[0]],u=c>>9&4095,d=c>>5&15,s=31&c;(a=t.newDate(u,d,s)).add(4-(a.dayOfWeek()||7),"d");var l=this.toJD(r,e,n)-a.toJD();return 1+Math.floor(l/7)},monthsInYear:function(r){return this.leapYear(r)?13:12},daysInMonth:function(r,e){r.year&&(e=r.month(),r=r.year()),r=this._validateYear(r);var n=l[r-l[0]];if(e>(n>>13?12:11))throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-e?30:29},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,c,n,i.local.invalidDate);r=this._validateYear(a.year()),e=a.month(),n=a.day();var o=this.isIntercalaryMonth(r,e),c=this.toChineseMonth(r,e),u=function(r,e,n,i,a){var t,o,c;if("object"===typeof r)o=r,t=e||{};else{var u;if(!("number"===typeof r&&r>=1888&&r<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"===typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"===typeof n&&n>=1&&n<=30))throw new Error("Lunar day outside range 1 - 30");"object"===typeof i?(u=!1,t=i):(u=!!i,t=a||{}),o={year:r,month:e,day:n,isIntercalary:u}}c=o.day-1;var d,s=l[o.year-l[0]],p=s>>13;d=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var I=0;I>9&4095,(y>>5&15)-1,(31&y)+c);return t.year=f.getFullYear(),t.month=1+f.getMonth(),t.day=f.getDate(),t}(r,c,n,o);return t.toJD(u.year,u.month,u.day)},fromJD:function(r){var e=t.fromJD(r),n=function(r,e,n,i){var a,t;if("object"===typeof r)a=r,t=e||{};else{if(!("number"===typeof r&&r>=1888&&r<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"===typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"===typeof n&&n>=1&&n<=31))throw new Error("Solar day outside range 1 - 31");a={year:r,month:e,day:n},t=i||{}}var o=m[a.year-m[0]],c=a.year<<9|a.month<<5|a.day;t.year=c>=o?a.year:a.year-1,o=m[t.year-m[0]];var u,d=new Date(o>>9&4095,(o>>5&15)-1,31&o),s=new Date(a.year,a.month-1,a.day);u=Math.round((s-d)/864e5);var p,I=l[t.year-l[0]];for(p=0;p<13;p++){var y=I&1<<12-p?30:29;if(u>13;return!f||p=2&&i<=6},extraInfo:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=a.year()+(a.year()<0?1:0),e=a.month(),(n=a.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(r-1)+this.jdEpoch-1},fromJD:function(r){r=Math.floor(r+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(r/400)+1;r-=400*(e-1),r+=r>15?16:0;var n=Math.floor(r/32)+1,i=r-32*(n-1)+1;return this.newDate(e<=0?e-1:e,n,i)}});var o={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=t},65168:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return(r=e.year()+(e.year()<0?1:0))%4===3||r%4===-1},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return(r=a.year())<0&&r++,a.day()+30*(a.month()-1)+365*(r-1)+Math.floor(r/4)+this.jdEpoch-1},fromJD:function(r){var e=Math.floor(r)+.5-this.jdEpoch,n=Math.floor((e-Math.floor((e+366)/1461))/365)+1;n<=0&&n--,e=Math.floor(r)+.5-this.newDate(n,1,1).toJD();var i=Math.floor(e/30)+1,a=e-30*(i-1)+1;return this.newDate(n,i,a)}}),i.calendars.ethiopian=t},2084:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}function o(r,e){return r-e*Math.floor(r/e)}t.prototype=new i.baseCalendar,a(t.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(r){return o(7*(r=r<0?r+1:r)+1,19)<7},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear),this._leapYear(r.year?r.year():r)?13:12},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(r){return r=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear).year(),this.toJD(-1===r?1:r+1,7,1)-this.toJD(r,7,1)},daysInMonth:function(r,e){return r.year&&(e=r.month(),r=r.year()),this._validate(r,e,this.minDay,i.local.invalidMonth),12===e&&this.leapYear(r)||8===e&&5===o(this.daysInYear(r),10)?30:9===e&&3===o(this.daysInYear(r),10)?29:this.daysPerMonth[e-1]},weekDay:function(r,e,n){return 6!==this.dayOfWeek(r,e,n)},extraInfo:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);r=a.year(),e=a.month(),n=a.day();var t=r<=0?r+1:r,o=this.jdEpoch+this._delay1(t)+this._delay2(t)+n+1;if(e<7){for(var c=7;c<=this.monthsInYear(r);c++)o+=this.daysInMonth(r,c);for(c=1;c=this.toJD(-1===e?1:e+1,7,1);)e++;for(var n=rthis.toJD(e,n,this.daysInMonth(e,n));)n++;var i=r-this.toJD(e,n,1)+1;return this.newDate(e,n,i)}}),i.calendars.hebrew=t},26368:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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\u012bs","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(r){return(11*this._validate(r,this.minMonth,this.minDay,i.local.invalidYear).year()+14)%30<11},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(r){return this.leapYear(r)?355:354},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return 5!==this.dayOfWeek(r,e,n)},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=a.year(),e=a.month(),r=r<=0?r+1:r,(n=a.day())+Math.ceil(29.5*(e-1))+354*(r-1)+Math.floor((3+11*r)/30)+this.jdEpoch-1},fromJD:function(r){r=Math.floor(r)+.5;var e=Math.floor((30*(r-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var n=Math.min(12,Math.ceil((r-29-this.toJD(e,1,1))/29.5)+1),i=r-this.toJD(e,n,1)+1;return this.newDate(e,n,i)}}),i.calendars.islamic=t},24747:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return(r=e.year()<0?e.year()+1:e.year())%4===0},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=a.year(),e=a.month(),n=a.day(),r<0&&r++,e<=2&&(r--,e+=12),Math.floor(365.25*(r+4716))+Math.floor(30.6001*(e+1))+n-1524.5},fromJD:function(r){var e=Math.floor(r+.5)+1524,n=Math.floor((e-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((e-i)/30.6001),t=a-Math.floor(a<14?1:13),o=n-Math.floor(t>2?4716:4715),c=e-i-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,t,c)}}),i.calendars.julian=t},65616:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}function o(r,e){return r-e*Math.floor(r/e)}function c(r,e){return o(r-1,e)+1}t.prototype=new i.baseCalendar,a(t.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(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear),!1},formatYear:function(r){r=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear).year();var e=Math.floor(r/400);return r%=400,r+=r<0?400:0,e+"."+Math.floor(r/20)+"."+r%20},forYear:function(r){if((r=r.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,n=0;n19||n>0&&i<0)throw"Invalid Mayan year";e=20*e+i}return e},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear),18},weekOfYear:function(r,e,n){return this._validate(r,e,n,i.local.invalidDate),0},daysInYear:function(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear),360},daysInMonth:function(r,e){return this._validate(r,e,this.minDay,i.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(r,e,n){return this._validate(r,e,n,i.local.invalidDate).day()},weekDay:function(r,e,n){return this._validate(r,e,n,i.local.invalidDate),!0},extraInfo:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate).toJD(),t=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[t[0]-1],haabMonth:t[0],haabDay:t[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(r){var e=o(8+(r-=this.jdEpoch)+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(r){return[c(20+(r-=this.jdEpoch),20),c(r+4,13)]},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(r){r=Math.floor(r)+.5-this.jdEpoch;var e=Math.floor(r/360);r%=360,r+=r<0?360:0;var n=Math.floor(r/20),i=r%20;return this.newDate(e,n,i)}}),i.calendars.mayan=t},30632:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar;var o=i.instance("gregorian");a(t.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidMonth);(r=a.year())<0&&r++;for(var t=a.day(),c=1;c=this.toJD(e+1,1,1);)e++;for(var n=r-Math.floor(this.toJD(e,1,1)+.5)+1,i=1;n>this.daysInMonth(e,i);)n-=this.daysInMonth(e,i),i++;return this.newDate(e,i,n)}}),i.calendars.nanakshahi=t},73040:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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(r){return this.daysInYear(r)!==this.daysPerYear},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(r){if(r=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear).year(),"undefined"===typeof this.NEPALI_CALENDAR_DATA[r])return this.daysPerYear;for(var e=0,n=this.minMonth;n<=12;n++)e+=this.NEPALI_CALENDAR_DATA[r][n];return e},daysInMonth:function(r,e){return r.year&&(e=r.month(),r=r.year()),this._validate(r,e,this.minDay,i.local.invalidMonth),"undefined"===typeof this.NEPALI_CALENDAR_DATA[r]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[r][e]},weekDay:function(r,e,n){return 6!==this.dayOfWeek(r,e,n)},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);r=a.year(),e=a.month(),n=a.day();var t=i.instance(),o=0,c=e,u=r;this._createMissingCalendarData(r);var d=r-(c>9||9===c&&n>=this.NEPALI_CALENDAR_DATA[u][0]?56:57);for(9!==e&&(o=n,c--);9!==c;)c<=0&&(c=12,u--),o+=this.NEPALI_CALENDAR_DATA[u][c],c--;return 9===e?(o+=n-this.NEPALI_CALENDAR_DATA[u][0])<0&&(o+=t.daysInYear(d)):o+=this.NEPALI_CALENDAR_DATA[u][9]-this.NEPALI_CALENDAR_DATA[u][0],t.newDate(d,1,1).add(o,"d").toJD()},fromJD:function(r){var e=i.instance().fromJD(r),n=e.year(),a=e.dayOfYear(),t=n+56;this._createMissingCalendarData(t);for(var o=9,c=this.NEPALI_CALENDAR_DATA[t][0],u=this.NEPALI_CALENDAR_DATA[t][o]-c+1;a>u;)++o>12&&(o=1,t++),u+=this.NEPALI_CALENDAR_DATA[t][o];var d=this.NEPALI_CALENDAR_DATA[t][o]-(u-a);return this.newDate(t,o,d)},_createMissingCalendarData:function(r){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var n=r-1;n0?474:473))%2820+474+38)%2816<682},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-(i.dayOfWeek()+1)%7,"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return 5!==this.dayOfWeek(r,e,n)},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);r=a.year(),e=a.month(),n=a.day();var t=r-(r>=0?474:473),c=474+o(t,2820);return n+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*c-110)/2816)+365*(c-1)+1029983*Math.floor(t/2820)+this.jdEpoch-1},fromJD:function(r){var e=(r=Math.floor(r)+.5)-this.toJD(475,1,1),n=Math.floor(e/1029983),i=o(e,1029983),a=2820;if(1029982!==i){var t=Math.floor(i/366),c=o(i,366);a=Math.floor((2134*t+2816*c+2815)/1028522)+t+1}var u=a+2820*n+474;u=u<=0?u-1:u;var d=r-this.toJD(u,1,1)+1,s=d<=186?Math.ceil(d/31):Math.ceil((d-6)/30),l=r-this.toJD(u,s,1)+1;return this.newDate(u,s,l)}}),i.calendars.persian=t,i.calendars.jalali=t},51456:function(r,e,n){var i=n(38700),a=n(50896),t=i.instance();function o(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}o.prototype=new i.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return r=this._t2gYear(e.year()),t.leapYear(r)},weekOfYear:function(r,e,n){var a=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return r=this._t2gYear(a.year()),t.weekOfYear(r,a.month(),a.day())},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=this._t2gYear(a.year()),t.toJD(r,a.month(),a.day())},fromJD:function(r){var e=t.fromJD(r),n=this._g2tYear(e.year());return this.newDate(n,e.month(),e.day())},_t2gYear:function(r){return r+this.yearsOffset+(r>=-this.yearsOffset&&r<=-1?1:0)},_g2tYear:function(r){return r-this.yearsOffset-(r>=1&&r<=this.yearsOffset?1:0)}}),i.calendars.taiwan=o},4592:function(r,e,n){var i=n(38700),a=n(50896),t=i.instance();function o(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}o.prototype=new i.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return r=this._t2gYear(e.year()),t.leapYear(r)},weekOfYear:function(r,e,n){var a=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return r=this._t2gYear(a.year()),t.weekOfYear(r,a.month(),a.day())},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=this._t2gYear(a.year()),t.toJD(r,a.month(),a.day())},fromJD:function(r){var e=t.fromJD(r),n=this._g2tYear(e.year());return this.newDate(n,e.month(),e.day())},_t2gYear:function(r){return r-this.yearsOffset-(r>=1&&r<=this.yearsOffset?1:0)},_g2tYear:function(r){return r+this.yearsOffset+(r>=-this.yearsOffset&&r<=-1?1:0)}}),i.calendars.thai=o},45348:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(r){for(var e=0,n=1;n<=12;n++)e+=this.daysInMonth(r,n);return e},daysInMonth:function(r,e){for(var n=this._validate(r,e,this.minDay,i.local.invalidMonth).toJD()-24e5+.5,a=0,t=0;tn)return o[a]-o[a-1];a++}return 30},weekDay:function(r,e,n){return 5!==this.dayOfWeek(r,e,n)},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate),t=12*(a.year()-1)+a.month()-15292;return a.day()+o[t-1]-1+24e5-.5},fromJD:function(r){for(var e=r-24e5+.5,n=0,i=0;ie);i++)n++;var a=n+15292,t=Math.floor((a-1)/12),c=t+1,u=a-12*t,d=e-o[n-1]+1;return this.newDate(c,u,d)},isValid:function(r,e,n){var a=i.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(r=null!=r.year?r.year:r)>=1276&&r<=1500),a},_validate:function(r,e,n,a){var t=i.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw a.replace(/\{0\}/,this.local.name);return t}}),i.calendars.ummalqura=t;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]},38700:function(r,e,n){var i=n(50896);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 t(r,e,n,i){if(this._calendar=r,this._year=e,this._month=n,this._day=i,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(d.local.invalidDate||d.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(r,e){return"000000".substring(0,e-(r=""+r).length)+r}function c(){this.shortYearCutoff="+10"}function u(r){this.local=this.regionalOptions[r]||this.regionalOptions[""]}i(a.prototype,{instance:function(r,e){r=(r||"gregorian").toLowerCase(),e=e||"";var n=this._localCals[r+"-"+e];if(!n&&this.calendars[r]&&(n=new this.calendars[r](e),this._localCals[r+"-"+e]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return n},newDate:function(r,e,n,i,a){return(i=(null!=r&&r.year?r.calendar():"string"===typeof i?this.instance(i,a):i)||this.instance()).newDate(r,e,n)},substituteDigits:function(r){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return r[e]}))}},substituteChineseDigits:function(r,e){return function(n){for(var i="",a=0;n>0;){var t=n%10;i=(0===t?"":r[t]+e[a])+i,a++,n=Math.floor(n/10)}return 0===i.indexOf(r[1]+e[1])&&(i=i.substr(1)),i||r[0]}}}),i(t.prototype,{newDate:function(r,e,n){return this._calendar.newDate(null==r?this:r,e,n)},year:function(r){return 0===arguments.length?this._year:this.set(r,"y")},month:function(r){return 0===arguments.length?this._month:this.set(r,"m")},day:function(r){return 0===arguments.length?this._day:this.set(r,"d")},date:function(r,e,n){if(!this._calendar.isValid(r,e,n))throw(d.local.invalidDate||d.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=e,this._day=n,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(r,e){return this._calendar.add(this,r,e)},set:function(r,e){return this._calendar.set(this,r,e)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(d.local.differentCalendars||d.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var e=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),i(c.prototype,{_validateLevel:0,newDate:function(r,e,n){return null==r?this.today():(r.year&&(this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate),n=r.day(),e=r.month(),r=r.year()),new t(this,r,e,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){return this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear),12},monthOfYear:function(r,e){var n=this._validate(r,e,this.minDay,d.local.invalidMonth||d.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(r,e){var n=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,n,this.minDay,d.local.invalidMonth||d.regionalOptions[""].invalidMonth),n},daysInYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(r,e,n){var i=this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,e,n){var i=this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(r,e,n){return this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate),{}},add:function(r,e,n){return this._validate(r,this.minMonth,this.minDay,d.local.invalidDate||d.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,e,n),e,n)},_add:function(r,e,n){if(this._validateLevel++,"d"===n||"w"===n){var i=r.toJD()+e*("w"===n?this.daysInWeek():1),a=r.calendar().fromJD(i);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var t=r.year()+("y"===n?e:0),o=r.monthOfYear()+("m"===n?e:0);a=r.day(),"y"===n?(r.month()!==this.fromMonthOfYear(t,o)&&(o=this.newDate(t,r.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(t)),a=Math.min(a,this.daysInMonth(t,this.fromMonthOfYear(t,o)))):"m"===n&&(function(r){for(;oe-1+r.minMonth;)t++,o-=e,e=r.monthsInYear(t)}(this),a=Math.min(a,this.daysInMonth(t,this.fromMonthOfYear(t,o))));var c=[t,this.fromMonthOfYear(t,o),a];return this._validateLevel--,c}catch(u){throw this._validateLevel--,u}},_correctAdd:function(r,e,n,i){if(!this.hasYearZero&&("y"===i||"m"===i)&&(0===e[0]||r.year()>0!==e[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"]}[i],t=n<0?-1:1;e=this._add(r,n*a[0]+t*a[1],a[2])}return r.date(e[0],e[1],e[2])},set:function(r,e,n){this._validate(r,this.minMonth,this.minDay,d.local.invalidDate||d.regionalOptions[""].invalidDate);var i="y"===n?e:r.year(),a="m"===n?e:r.month(),t="d"===n?e:r.day();return"y"!==n&&"m"!==n||(t=Math.min(t,this.daysInMonth(i,a))),r.date(i,a,t)},isValid:function(r,e,n){this._validateLevel++;var i=this.hasYearZero||0!==r;if(i){var a=this.newDate(r,e,this.minDay);i=e>=this.minMonth&&e-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),d=a-(u>2.5?4716:4715);return d<=0&&d--,this.newDate(d,u,c)},toJSDate:function(r,e,n){var i=this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate),a=new Date(i.year(),i.month()-1,i.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(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var d=r.exports=new a;d.cdate=t,d.baseCalendar=c,d.calendars.gregorian=u},15168:function(r,e,n){var i=n(50896),a=n(38700);i(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[""],i(a.cdate.prototype,{formatDate:function(r,e){return"string"!==typeof r&&(e=r,r=""),this._calendar.formatDate(r||"",this,e)}}),i(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(r,e,n){if("string"!==typeof r&&(n=e,e=r,r=""),!e)return"";if(e.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;r=r||this.local.dateFormat;for(var i,t,o,c,u=(n=n||{}).dayNamesShort||this.local.dayNamesShort,d=n.dayNames||this.local.dayNames,s=n.monthNumbers||this.local.monthNumbers,l=n.monthNamesShort||this.local.monthNamesShort,m=n.monthNames||this.local.monthNames,p=(n.calculateWeek||this.local.calculateWeek,function(e,n){for(var i=1;P+i1}),I=function(r,e,n,i){var a=""+e;if(p(r,i))for(;a.length1},h=function(r,n){var i=_(r,n),t=[2,3,i?4:2,i?4:2,10,11,20]["oyYJ@!".indexOf(r)+1],o=new RegExp("^-?\\d{1,"+t+"}"),c=e.substring(S).match(o);if(!c)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,S);return S+=c[0].length,parseInt(c[0],10)},v=this,x=function(){if("function"===typeof u){_("m");var r=u.call(v,e.substring(S));return S+=r.length,r}return h("m")},P=function(r,n,i,t){for(var o=_(r,t)?i:n,c=0;c-1){p=1,I=y;for(var M=this.daysInMonth(m,p);I>M;M=this.daysInMonth(m,p))p++,I-=M}return l>-1?this.fromJD(l):this.newDate(m,p,I)},determineDate:function(r,e,n,i,a){n&&"object"!==typeof n&&(a=i,i=n,n=null),"string"!==typeof i&&(a=i,i="");var t=this;return e=e?e.newDate():null,r=null==r?e:"string"===typeof r?function(r){try{return t.parseDate(i,r,a)}catch(u){}for(var e=((r=r.toLowerCase()).match(/^c/)&&n?n.newDate():null)||t.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=o.exec(r);c;)e.add(parseInt(c[1],10),c[2]||"d"),c=o.exec(r);return e}(r):"number"===typeof r?isNaN(r)||r===1/0||r===-1/0?e:t.today().add(r,"d"):t.newDate(r)}})},21576:function(){},19768:function(){},63436:function(r,e,n){"use strict";var i=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],a="undefined"===typeof globalThis?n.g:globalThis;r.exports=function(){for(var r=[],e=0;e>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?G(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?G(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=m.exec(r))?new S(e[1],e[2],e[3],1):(e=p.exec(r))?new S(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=I.exec(r))?G(e[1],e[2],e[3],e[4]):(e=y.exec(r))?G(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=f.exec(r))?F(e[1],e[2]/100,e[3]/100,1):(e=g.exec(r))?F(e[1],e[2]/100,e[3]/100,e[4]):_.hasOwnProperty(r)?P(_[r]):"transparent"===r?new S(NaN,NaN,NaN,0):null}function P(r){return new S(r>>16&255,r>>8&255,255&r,1)}function G(r,e,n,i){return i<=0&&(r=e=n=NaN),new S(r,e,n,i)}function C(r,e,n,i){return 1===arguments.length?((a=r)instanceof t||(a=x(a)),a?new S((a=a.rgb()).r,a.g,a.b,a.opacity):new S):new S(r,e,n,null==i?1:i);var a}function S(r,e,n,i){this.r=+r,this.g=+e,this.b=+n,this.opacity=+i}function A(){return"#".concat(k(this.r)).concat(k(this.g)).concat(k(this.b))}function b(){var r=M(this.opacity);return"".concat(1===r?"rgb(":"rgba(").concat(B(this.r),", ").concat(B(this.g),", ").concat(B(this.b)).concat(1===r?")":", ".concat(r,")"))}function M(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function B(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function k(r){return((r=B(r))<16?"0":"")+r.toString(16)}function F(r,e,n,i){return i<=0?r=e=n=NaN:n<=0||n>=1?r=e=NaN:e<=0&&(r=NaN),new w(r,e,n,i)}function z(r){if(r instanceof w)return new w(r.h,r.s,r.l,r.opacity);if(r instanceof t||(r=x(r)),!r)return new w;if(r instanceof w)return r;var e=(r=r.rgb()).r/255,n=r.g/255,i=r.b/255,a=Math.min(e,n,i),o=Math.max(e,n,i),c=NaN,u=o-a,d=(o+a)/2;return u?(c=e===o?(n-i)/u+6*(n0&&d<1?0:c,new w(c,u,d,r.opacity)}function w(r,e,n,i){this.h=+r,this.s=+e,this.l=+n,this.opacity=+i}function R(r){return(r=(r||0)%360)<0?r+360:r}function E(r){return Math.max(0,Math.min(1,r||0))}function N(r,e,n){return 255*(r<60?e+(n-e)*r/60:r<180?n:r<240?e+(n-e)*(240-r)/60:e)}function T(r,e,n,i,a){var t=r*r,o=t*r;return((1-3*r+3*t-o)*e+(4-6*t+3*o)*n+(1+3*r+3*t-3*o)*i+o*a)/6}i(t,x,{copy:function(r){return Object.assign(new this.constructor,this,r)},displayable:function(){return this.rgb().displayable()},hex:h,formatHex:h,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return z(this).formatHsl()},formatRgb:v,toString:v}),i(S,C,a(t,{brighter:function(r){return r=null==r?c:Math.pow(c,r),new S(this.r*r,this.g*r,this.b*r,this.opacity)},darker:function(r){return r=null==r?o:Math.pow(o,r),new S(this.r*r,this.g*r,this.b*r,this.opacity)},rgb:function(){return this},clamp:function(){return new S(B(this.r),B(this.g),B(this.b),M(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A,formatHex:A,formatHex8:function(){return"#".concat(k(this.r)).concat(k(this.g)).concat(k(this.b)).concat(k(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:b,toString:b})),i(w,(function(r,e,n,i){return 1===arguments.length?z(r):new w(r,e,n,null==i?1:i)}),a(t,{brighter:function(r){return r=null==r?c:Math.pow(c,r),new w(this.h,this.s,this.l*r,this.opacity)},darker:function(r){return r=null==r?o:Math.pow(o,r),new w(this.h,this.s,this.l*r,this.opacity)},rgb:function(){var r=this.h%360+360*(this.h<0),e=isNaN(r)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,a=2*n-i;return new S(N(r>=240?r-240:r+120,a,i),N(r,a,i),N(r<120?r+240:r-120,a,i),this.opacity)},clamp:function(){return new w(R(this.h),E(this.s),E(this.l),M(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},formatHsl:function(){var r=M(this.opacity);return"".concat(1===r?"hsl(":"hsla(").concat(R(this.h),", ").concat(100*E(this.s),"%, ").concat(100*E(this.l),"%").concat(1===r?")":", ".concat(r,")"))}}));var D=function(r){return function(){return r}};function J(r,e){return function(n){return r+n*e}}function U(r){return 1===(r=+r)?H:function(e,n){return n-e?function(r,e,n){return r=Math.pow(r,n),e=Math.pow(e,n)-r,n=1/n,function(i){return Math.pow(r+i*e,n)}}(e,n,r):D(isNaN(e)?n:e)}}function H(r,e){var n=e-r;return n?J(r,n):D(isNaN(r)?e:r)}var L=function r(e){var n=U(e);function i(r,e){var i=n((r=C(r)).r,(e=C(e)).r),a=n(r.g,e.g),t=n(r.b,e.b),o=H(r.opacity,e.opacity);return function(e){return r.r=i(e),r.g=a(e),r.b=t(e),r.opacity=o(e),r+""}}return i.gamma=r,i}(1);function O(r){return function(e){var n,i,a=e.length,t=new Array(a),o=new Array(a),c=new Array(a);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),a=r[i],t=r[i+1],o=i>0?r[i-1]:2*a-t,c=it&&(a=e.slice(t,a),c[o]?c[o]+=a:c[++o]=a),(n=n[0])===(i=i[0])?c[o]?c[o]+=i:c[++o]=i:(c[++o]=null,u.push({i:o,x:j(n,i)})),t=Y.lastIndex;return t{"use strict";var i=n(3218);function a(){}function t(){}t.resetWarningCache=a,r.exports=function(){function r(r,e,n,a,t,o){if(o!==i){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function e(){return r}r.isRequired=r;var n={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:t,resetWarningCache:a};return n.PropTypes=n,n}},5173:(r,e,n)=>{r.exports=n(1497)()},3218:r=>{"use strict";r.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2730:(r,e,n)=>{"use strict";var i=n(5043),a=n(8853);function t(r){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+r,n=1;n contributors',o=['\xa9 Carto',t].join(" "),c=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),u={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:t,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:o,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:o,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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:c,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:c,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},d=i(u);r.exports={requiredVersion:a,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:u,styleValuesNonMapbox:d,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+a+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(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:",d.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\')'}}},89032:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e){var n=r.split(" "),a=n[0],t=n[1],o=i.isArrayOrTypedArray(e)?i.mean(e):e,c=.5+o/100,u=1.5+o/100,d=["",""],s=[0,0];switch(a){case"top":d[0]="top",s[1]=-u;break;case"bottom":d[0]="bottom",s[1]=u}switch(t){case"left":d[1]="right",s[0]=-c;break;case"right":d[1]="left",s[0]=c}return{anchor:d[0]&&d[1]?d.join("-"):d[0]?d[0]:d[1]?d[1]:"center",offset:s}}},33688:function(r,e,n){"use strict";var i=n(3480),a=n(3400),t=a.strTranslate,o=a.strScale,c=n(84888).KY,u=n(9616),d=n(33428),s=n(43616),l=n(72736),m=n(14440),p="mapbox",I=e.constants=n(47552);function y(r){return"string"===typeof r&&(-1!==I.styleValuesMapbox.indexOf(r)||0===r.indexOf("mapbox://")||0===r.indexOf("stamen"))}e.name=p,e.attr="subplot",e.idRoot=p,e.idRegex=e.attrRegex=a.counterRegex(p),e.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},e.layoutAttributes=n(5232),e.supplyLayoutDefaults=n(5976),e.plot=function(r){var e=r._fullLayout,n=r.calcdata,t=e._subplots[p];if(i.version!==I.requiredVersion)throw new Error(I.wrongVersionErrorMsg);var o=function(r,e){var n=r._fullLayout,i=r._context;if(""===i.mapboxAccessToken)return"";for(var t=[],o=[],c=!1,u=!1,d=0;d1&&a.warn(I.multipleTokensErrorMsg),t[0]):(o.length&&a.log(["Listed mapbox access token(s)",o.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(r,t);i.accessToken=o;for(var u=0;uP/2){var G=_.split("|").join("
");v.text(G).attr("data-unformatted",G).call(l.convertToTspans,r),x=s.bBox(v.node())}v.attr("transform",t(-3,8-x.height)),h.insert("rect",".static-attribution").attr({x:-x.width-6,y:-x.height-3,width:x.width+6,height:x.height+3,fill:"rgba(255, 255, 255, 0.75)"});var C=1;x.width+6>P&&(C=P/(x.width+6));var S=[i.l+i.w*m.x[1],i.t+i.h*(1-m.y[0])];h.attr("transform",t(S[0],S[1])+o(C))}},e.updateFx=function(r){for(var e=r._fullLayout,n=e._subplots[p],i=0;i0){for(var n=0;n0}function s(r){var e={},n={};switch(r.type){case"circle":i.extendFlat(n,{"circle-radius":r.circle.radius,"circle-color":r.color,"circle-opacity":r.opacity});break;case"line":i.extendFlat(n,{"line-width":r.line.width,"line-color":r.color,"line-opacity":r.opacity,"line-dasharray":r.line.dash});break;case"fill":i.extendFlat(n,{"fill-color":r.color,"fill-outline-color":r.fill.outlinecolor,"fill-opacity":r.opacity});break;case"symbol":var a=r.symbol,o=t(a.textposition,a.iconsize);i.extendFlat(e,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),i.extendFlat(n,{"icon-color":r.color,"text-color":a.textfont.color,"text-opacity":r.opacity});break;case"raster":i.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":r.opacity})}return{layout:e,paint:n}}u.update=function(r){this.visible?this.needsNewImage(r)?this.updateImage(r):this.needsNewSource(r)?(this.removeLayer(),this.updateSource(r),this.updateLayer(r)):this.needsNewLayer(r)?this.updateLayer(r):this.updateStyle(r):(this.updateSource(r),this.updateLayer(r)),this.visible=d(r)},u.needsNewImage=function(r){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===r.sourcetype&&(this.source!==r.source||JSON.stringify(this.coordinates)!==JSON.stringify(r.coordinates))},u.needsNewSource=function(r){return this.sourceType!==r.sourcetype||JSON.stringify(this.source)!==JSON.stringify(r.source)||this.layerType!==r.type},u.needsNewLayer=function(r){return this.layerType!==r.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},u.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},u.updateImage=function(r){this.subplot.map.getSource(this.idSource).updateImage({url:r.source,coordinates:r.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},u.updateSource=function(r){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=r.sourcetype,this.source=r.source,d(r)){var n=function(r){var e,n=r.sourcetype,i=r.source,t={type:n};return"geojson"===n?e="data":"vector"===n?e="string"===typeof i?"url":"tiles":"raster"===n?(e="tiles",t.tileSize=256):"image"===n&&(e="url",t.coordinates=r.coordinates),t[e]=i,r.sourceattribution&&(t.attribution=a(r.sourceattribution)),t}(r);e.addSource(this.idSource,n)}},u.findFollowingMapboxLayerId=function(r){if("traces"===r)for(var e=this.subplot.getMapLayers(),n=0;n1)for(n=0;n-1&&f(e.originalEvent,i,[n.xaxis],[n.yaxis],n.id,r),a.indexOf("event")>-1&&d.click(i,e.originalEvent)}}},v.updateFx=function(r){var e=this,n=e.map,i=e.gd;if(!e.isStatic){var t,o=r.dragmode;t=function(r,n){n.isRect?(r.range={})[e.id]=[d([n.xmin,n.ymin]),d([n.xmax,n.ymax])]:(r.lassoPoints={})[e.id]=n.map(d)};var c=e.dragOptions;e.dragOptions=a.extendDeep(c||{},{dragmode:r.dragmode,element:e.div,gd:i,plotinfo:{id:e.id,domain:r[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:t},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),n.off("click",e.onClickInPanHandler),m(o)||l(o)?(n.dragPan.disable(),n.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(r,n,i){p(r,n,i,e.dragOptions,o)},u.init(e.dragOptions)):(n.dragPan.enable(),n.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),n.on("click",e.onClickInPanHandler))}function d(r){var n=e.map.unproject(r);return[n.lng,n.lat]}},v.updateFramework=function(r){var e=r[this.id].domain,n=r._size,i=this.div.style;i.width=n.w*(e.x[1]-e.x[0])+"px",i.height=n.h*(e.y[1]-e.y[0])+"px",i.left=n.l+e.x[0]*n.w+"px",i.top=n.t+(1-e.y[1])*n.h+"px",this.xaxis._offset=n.l+e.x[0]*n.w,this.xaxis._length=n.w*(e.x[1]-e.x[0]),this.yaxis._offset=n.t+(1-e.y[1])*n.h,this.yaxis._length=n.h*(e.y[1]-e.y[0])},v.updateLayers=function(r){var e,n=r[this.id].layers,i=this.layerList;if(n.length!==i.length){for(e=0;e=e.width-20?(t["text-anchor"]="start",t.x=5):(t["text-anchor"]="end",t.x=e._paper.attr("width")-7),n.attr(t);var o=n.select(".js-link-to-tool"),c=n.select(".js-link-spacer"),u=n.select(".js-sourcelinks");r._context.showSources&&r._context.showSources(r),r._context.showLink&&function(r,e){e.text("");var n=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(r._context.linkText+" "+String.fromCharCode(187));if(r._context.sendData)n.on("click",(function(){P.sendDataToCloud(r)}));else{var i=window.location.pathname.split("/"),a=window.location.search;n.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+i[2].split(".")[0]+"/"+i[1]+a})}}(r,o),c.text(o.text()&&u.text()?" - ":"")}},P.sendDataToCloud=function(r){var e=(window.PLOTLYENV||{}).BASE_URL||r._context.plotlyServerURL;if(e){r.emit("plotly_beforeexport");var n=i.select(r).append("div").attr("id","hiddenform").style("display","none"),a=n.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return a.append("input").attr({type:"text",name:"data"}).node().value=P.graphJson(r,!1,"keepdata"),a.node().submit(),n.remove(),r.emit("plotly_afterexport"),!1}};var S=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function b(r,e){var n=r._context.locale;n||(n="en-US");var i=!1,a={};function t(r){for(var n=!0,t=0;t1&&R.length>1){for(u.getComponentMethod("grid","sizeDefaults")(d,c),o=0;o15&&R.length>15&&0===c.shapes.length&&0===c.images.length,P.linkSubplots(m,c,s,i),P.cleanPlot(m,c,s,i);var J=!(!i._has||!i._has("gl2d")),U=!(!c._has||!c._has("gl2d")),H=!(!i._has||!i._has("cartesian"))||J,L=!(!c._has||!c._has("cartesian"))||U;H&&!L?i._bgLayer.remove():L&&!H&&(c._shouldCreateBgLayer=!0),i._zoomlayer&&!r._dragging&&y({_fullLayout:i}),function(r,e){var n,i=[];e.meta&&(n=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var a=0;a0){var s=1-2*c;i=Math.round(s*i),a=Math.round(s*a)}}var m=P.layoutAttributes.width.min,p=P.layoutAttributes.height.min;i1,y=!e.height&&Math.abs(n.height-a)>1;(y||I)&&(I&&(n.width=i),y&&(n.height=a)),r._initialAutoSize||(r._initialAutoSize={width:i,height:a}),P.sanitizeMargins(n)},P.supplyLayoutModuleDefaults=function(r,e,n,i){var a,t,o,c=u.componentsRegistry,d=e._basePlotModules,s=u.subplotsRegistry.cartesian;for(a in c)(o=c[a]).includeBasePlot&&o.includeBasePlot(r,e);for(var m in d.length||d.push(s),e._has("cartesian")&&(u.getComponentMethod("grid","contentDefaults")(r,e),s.finalizeSubplots(r,e)),e._subplots)e._subplots[m].sort(l.subplotSort);for(t=0;t1&&(n.l/=g,n.r/=g)}if(p){var _=(n.t+n.b)/p;_>1&&(n.t/=_,n.b/=_)}var h=void 0!==n.xl?n.xl:n.x,v=void 0!==n.xr?n.xr:n.x,x=void 0!==n.yt?n.yt:n.y,G=void 0!==n.yb?n.yb:n.y;I[e]={l:{val:h,size:n.l+f},r:{val:v,size:n.r+f},b:{val:G,size:n.b+f},t:{val:x,size:n.t+f}},y[e]=1}else delete I[e],delete y[e];if(!i._replotting)return P.doAutoMargin(r)}},P.doAutoMargin=function(r){var e=r._fullLayout,n=e.width,i=e.height;e._size||(e._size={}),z(e);var a=e._size,t=e.margin,c={t:0,b:0,l:0,r:0},d=l.extendFlat({},a),s=t.l,m=t.r,p=t.t,y=t.b,f=e._pushmargin,g=e._pushmarginIds,_=e.minreducedwidth,h=e.minreducedheight;if(!1!==t.autoexpand){for(var v in f)g[v]||delete f[v];var x=r._fullLayout._reservedMargin;for(var G in x)for(var C in x[G]){var S=x[G][C];c[C]=Math.max(c[C],S)}for(var A in f.base={l:{val:0,size:s},r:{val:1,size:m},t:{val:1,size:p},b:{val:0,size:y}},c){var b=0;for(var M in f)"base"!==M&&o(f[M][A].size)&&(b=f[M][A].size>b?f[M][A].size:b);var B=Math.max(0,t[A]-b);c[A]=Math.max(0,c[A]-B)}for(var k in f){var F=f[k].l||{},w=f[k].b||{},R=F.val,E=F.size,N=w.val,T=w.size,D=n-c.r-c.l,J=i-c.t-c.b;for(var U in f){if(o(E)&&f[U].r){var H=f[U].r.val,L=f[U].r.size;if(H>R){var O=(E*H+(L-D)*R)/(H-R),K=(L*(1-R)+(E-D)*(1-H))/(H-R);O+K>s+m&&(s=O,m=K)}}if(o(T)&&f[U].t){var V=f[U].t.val,j=f[U].t.size;if(V>N){var W=(T*V+(j-J)*N)/(V-N),Z=(j*(1-N)+(T-J)*(1-V))/(V-N);W+Z>y+p&&(y=W,p=Z)}}}}}var q=l.constrain(n-t.l-t.r,2,_),Y=l.constrain(i-t.t-t.b,2,h),X=Math.max(0,n-q),Q=Math.max(0,i-Y);if(X){var $=(s+m)/X;$>1&&(s/=$,m/=$)}if(Q){var rr=(y+p)/Q;rr>1&&(y/=rr,p/=rr)}if(a.l=Math.round(s)+c.l,a.r=Math.round(m)+c.r,a.t=Math.round(p)+c.t,a.b=Math.round(y)+c.b,a.p=Math.round(t.pad),a.w=Math.round(n)-a.l-a.r,a.h=Math.round(i)-a.t-a.b,!e._replotting&&(P.didMarginChange(d,a)||function(r){if("_redrawFromAutoMarginCount"in r._fullLayout)return!1;var e=I.list(r,"",!0);for(var n in e)if(e[n].autoshift||e[n].shift)return!0;return!1}(r))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var er=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(r._transitioningWithDuration=!0),r._transitionData._interruptCallbacks.push((function(){i=!0})),n.redraw&&r._transitionData._interruptCallbacks.push((function(){return u.call("redraw",r)})),r._transitionData._interruptCallbacks.push((function(){r.emit("plotly_transitioninterrupted",[])}));var t=0,o=0;function c(){return t++,function(){var e;o++,i||o!==t||(e=a,r._transitionData&&(function(r){if(r)for(;r.length;)r.shift()}(r._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(n.redraw)return u.call("redraw",r)})).then((function(){r._transitioning=!1,r._transitioningWithDuration=!1,r.emit("plotly_transitioned",[])})).then(e)))}}n.runFn(c),setTimeout(c())}))}],t=l.syncOrAsync(a,r);return t&&t.then||(t=Promise.resolve()),t.then((function(){return r}))}P.didMarginChange=function(r,e){for(var n=0;n1)return!0}return!1},P.graphJson=function(r,e,n,i,a,t){(a&&e&&!r._fullData||a&&!e&&!r._fullLayout)&&P.supplyDefaults(r);var o=a?r._fullData:r.data,u=a?r._fullLayout:r.layout,d=(r._transitionData||{})._frames;function s(r,e){if("function"===typeof r)return e?"_function_":null;if(l.isPlainObject(r)){var i,a={};return Object.keys(r).sort().forEach((function(t){if(-1===["_","["].indexOf(t.charAt(0)))if("function"!==typeof r[t]){if("keepdata"===n){if("src"===t.substr(t.length-3))return}else if("keepstream"===n){if("string"===typeof(i=r[t+"src"])&&i.indexOf(":")>0&&!l.isPlainObject(r.stream))return}else if("keepall"!==n&&"string"===typeof(i=r[t+"src"])&&i.indexOf(":")>0)return;a[t]=s(r[t],e)}else e&&(a[t]="_function")})),a}var t=Array.isArray(r),o=l.isTypedArray(r);if((t||o)&&r.dtype&&r.shape){var u=r.bdata;return s({dtype:r.dtype,shape:r.shape,bdata:l.isArrayBuffer(u)?c.encode(u):u},e)}return t?r.map((function(r){return s(r,e)})):o?l.simpleMap(r,l.identity):l.isJSDate(r)?l.ms2DateTimeLocal(+r):r}var m={data:(o||[]).map((function(r){var n=s(r);return e&&delete n.fit,n}))};if(!e&&(m.layout=s(u),a)){var p=u._size;m.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return d&&(m.frames=s(d)),t&&(m.config=s(r._context,!0)),"object"===i?m:JSON.stringify(m)},P.modifyFrames=function(r,e){var n,i,a,t=r._transitionData._frames,o=r._transitionData._frameHash;for(n=0;n=0;t--)if(u[t].enabled){n._indexToPoints=u[t]._indexToPoints;break}i&&i.calc&&(o=i.calc(r,n))}Array.isArray(o)&&o[0]||(o=[{x:p,y:p}]),o[0].t||(o[0].t={}),o[0].trace=n,m[e]=o}}for(N(o,c,s),a=0;a1e-10?r:0}function m(r,e,n){e=e||0,n=n||0;for(var i=r.length,a=new Array(i),t=0;t0?n:1/0})),a=i.mod(n+1,e.length);return[e[n],e[a]]},findIntersectionXY:d,findXYatLength:function(r,e,n,i){var a=-e*n,t=e*e+1,o=2*(e*a-n),c=a*a+n*n-r*r,u=Math.sqrt(o*o-4*t*c),d=(-o+u)/(2*t),s=(-o-u)/(2*t);return[[d,e*d+a+i],[s,e*s+a+i]]},clampTiny:l,pathPolygon:function(r,e,n,i,a,t){return"M"+m(s(r,e,n,i),a,t).join("L")},pathPolygonAnnulus:function(r,e,n,i,a,t,o){var c,u;r=90||u>90&&d>=450?1:l<=0&&p<=0?0:Math.max(l,p),e=u<=180&&d>=180||u>180&&d>=540?-1:s>=0&&m>=0?0:Math.min(s,m),n=u<=270&&d>=270||u>270&&d>=630?-1:l>=0&&p>=0?0:Math.min(l,p),i=d>=360?1:s<=0&&m<=0?0:Math.max(s,m),[e,n,i,a]}(I),x=v[2]-v[0],P=v[3]-v[1],G=p/m,C=Math.abs(P/x);G>C?(y=m,h=(p-(f=m*C))/a.h/2,g=[c[0],c[1]],_=[l[0]+h,l[1]-h]):(f=p,h=(m-(y=p/C))/a.w/2,g=[c[0]+h,c[1]-h],_=[l[0],l[1]]),n.xLength2=y,n.yLength2=f,n.xDomain2=g,n.yDomain2=_;var S,A=n.xOffset2=a.l+a.w*g[0],b=n.yOffset2=a.t+a.h*(1-_[1]),M=n.radius=y/x,B=n.innerRadius=n.getHole(e)*M,k=n.cx=A-M*v[0],F=n.cy=b+M*v[3],z=n.cxx=k-A,w=n.cyy=F-b,R=t.side;"counterclockwise"===R?(S=R,R="top"):"clockwise"===R&&(S=R,R="bottom"),n.radialAxis=n.mockAxis(r,e,t,{_id:"x",side:R,_trueSide:S,domain:[B/a.w,M/a.w]}),n.angularAxis=n.mockAxis(r,e,o,{side:"right",domain:[0,Math.PI],autorange:!1}),n.doAutoRange(r,e),n.updateAngularAxis(r,e),n.updateRadialAxis(r,e),n.updateRadialAxisTitle(r,e),n.xaxis=n.mockCartesianAxis(r,e,{_id:"x",domain:g}),n.yaxis=n.mockCartesianAxis(r,e,{_id:"y",domain:_});var T=n.pathSubplot();n.clipPaths.forTraces.select("path").attr("d",T).attr("transform",u(z,w)),i.frontplot.attr("transform",u(A,b)).call(s.setClipUrl,n._hasClipOnAxisFalse?null:n.clipIds.forTraces,n.gd),i.bg.attr("d",T).attr("transform",u(k,F)).call(d.fill,e.bgcolor)},J.mockAxis=function(r,e,n,i){var a=o.extendFlat({},n,i);return I(a,e,r),a},J.mockCartesianAxis=function(r,e,n){var i=this,a=i.isSmith,t=n._id,c=o.extendFlat({type:"linear"},n);p(c,r);var u={x:[0,2],y:[1,3]};return c.setRange=function(){var r=i.sectorBBox,n=u[t],a=i.radialAxis._rl,o=(a[1]-a[0])/(1-i.getHole(e));c.range=[r[n[0]]*o,r[n[1]]*o]},c.isPtWithinRange="x"!==t||a?function(){return!0}:function(r){return i.isPtInside(r)},c.setRange(),c.setScale(),c},J.doAutoRange=function(r,e){var n=this,i=n.gd,a=n.radialAxis,t=n.getRadial(e);y(i,a);var o=a.range;if(t.range=o.slice(),t._input.range=o.slice(),a._rl=[a.r2l(o[0],null,"gregorian"),a.r2l(o[1],null,"gregorian")],void 0!==a.minallowed){var c=a.r2l(a.minallowed);a._rl[0]>a._rl[1]?a._rl[1]=Math.max(a._rl[1],c):a._rl[0]=Math.max(a._rl[0],c)}if(void 0!==a.maxallowed){var u=a.r2l(a.maxallowed);a._rl[0]90&&y<=270&&(f.tickangle=180);var h=_?function(r){var e=w(n,k([r.x,0]));return u(e[0]-l,e[1]-p)}:function(r){return u(f.l2p(r.x)+s,0)},v=_?function(r){return z(n,r.x,-1/0,1/0)}:function(r){return n.pathArc(f.r2p(r.x)+s)},x=U(I);if(n.radialTickLayout!==x&&(a["radial-axis"].selectAll(".xtick").remove(),n.radialTickLayout=x),g){f.setScale();var P=0,G=_?(f.tickvals||[]).filter((function(r){return r>=0})).map((function(r){return m.tickText(f,r,!0,!1)})):m.calcTicks(f),C=_?G:m.clipEnds(f,G),S=m.getTickSigns(f)[2];_&&(("top"===f.ticks&&"bottom"===f.side||"bottom"===f.ticks&&"top"===f.side)&&(S=-S),"top"===f.ticks&&"top"===f.side&&(P=-f.ticklen),"bottom"===f.ticks&&"bottom"===f.side&&(P=f.ticklen)),m.drawTicks(i,f,{vals:G,layer:a["radial-axis"],path:m.makeTickPath(f,0,S),transFn:h,crisp:!1}),m.drawGrid(i,f,{vals:C,layer:a["radial-grid"],path:v,transFn:o.noop,crisp:!1}),m.drawLabels(i,f,{vals:G,layer:a["radial-axis"],transFn:h,labelFns:m.makeLabelFns(f,P)})}var A=n.radialAxisAngle=n.vangles?T(H(N(I.angle),n.vangles)):I.angle,b=u(l,p),M=b+c(-A);L(a["radial-axis"],g&&(I.showticklabels||I.ticks),{transform:M}),L(a["radial-grid"],g&&I.showgrid,{transform:_?"":b}),L(a["radial-line"].select("line"),g&&I.showline,{x1:_?-t:s,y1:0,x2:t,y2:0,transform:M}).attr("stroke-width",I.linewidth).call(d.stroke,I.linecolor)},J.updateRadialAxisTitle=function(r,e,n){if(!this.isSmith){var i=this,a=i.gd,t=i.radius,o=i.cx,c=i.cy,u=i.getRadial(e),d=i.id+"title",l=0;if(u.title){var m=s.bBox(i.layers["radial-axis"].node()).height,p=u.title.font.size,I=u.side;l="top"===I?p:"counterclockwise"===I?-(m+.4*p):m+.8*p}var y=void 0!==n?n:i.radialAxisAngle,f=N(y),g=Math.cos(f),_=Math.sin(f),v=o+t/2*g+l*_,x=c-t/2*_+l*g;i.layers["radial-axis-title"]=h.draw(a,d,{propContainer:u,propName:i.id+".radialaxis.title",placeholder:R(a,"Click to enter radial axis title"),attributes:{x:v,y:x,"text-anchor":"middle"},transform:{rotate:-y}})}},J.updateAngularAxis=function(r,e){var n=this,i=n.gd,a=n.layers,t=n.radius,s=n.innerRadius,l=n.cx,p=n.cy,I=n.getAngular(e),y=n.angularAxis,f=n.isSmith;f||(n.fillViewInitialKey("angularaxis.rotation",I.rotation),y.setGeometry(),y.setScale());var g=f?function(r){var e=w(n,k([0,r.x]));return Math.atan2(e[0]-l,e[1]-p)-Math.PI/2}:function(r){return y.t2g(r.x)};"linear"===y.type&&"radians"===y.thetaunit&&(y.tick0=T(y.tick0),y.dtick=T(y.dtick));var _=function(r){return u(l+t*Math.cos(r),p-t*Math.sin(r))},h=f?function(r){var e=w(n,k([0,r.x]));return u(e[0],e[1])}:function(r){return _(g(r))},v=f?function(r){var e=w(n,k([0,r.x])),i=Math.atan2(e[0]-l,e[1]-p)-Math.PI/2;return u(e[0],e[1])+c(-T(i))}:function(r){var e=g(r);return _(e)+c(-T(e))},x=f?function(r){return F(n,r.x,0,1/0)}:function(r){var e=g(r),n=Math.cos(e),i=Math.sin(e);return"M"+[l+s*n,p-s*i]+"L"+[l+t*n,p-t*i]},P=m.makeLabelFns(y,0).labelStandoff,G={xFn:function(r){var e=g(r);return Math.cos(e)*P},yFn:function(r){var e=g(r),n=Math.sin(e)>0?.2:1;return-Math.sin(e)*(P+r.fontSize*n)+Math.abs(Math.cos(e))*(r.fontSize*A)},anchorFn:function(r){var e=g(r),n=Math.cos(e);return Math.abs(n)<.1?"middle":n>0?"start":"end"},heightFn:function(r,e,n){var i=g(r);return-.5*(1+Math.sin(i))*n}},C=U(I);n.angularTickLayout!==C&&(a["angular-axis"].selectAll("."+y._id+"tick").remove(),n.angularTickLayout=C);var S,b=f?[1/0].concat(y.tickvals||[]).map((function(r){return m.tickText(y,r,!0,!1)})):m.calcTicks(y);if(f&&(b[0].text="\u221e",b[0].fontSize*=1.75),"linear"===e.gridshape?(S=b.map(g),o.angleDelta(S[0],S[1])<0&&(S=S.slice().reverse())):S=null,n.vangles=S,"category"===y.type&&(b=b.filter((function(r){return o.isAngleInsideSector(g(r),n.sectorInRad)}))),y.visible){var M="inside"===y.ticks?-1:1,B=(y.linewidth||1)/2;m.drawTicks(i,y,{vals:b,layer:a["angular-axis"],path:"M"+M*B+",0h"+M*y.ticklen,transFn:v,crisp:!1}),m.drawGrid(i,y,{vals:b,layer:a["angular-grid"],path:x,transFn:o.noop,crisp:!1}),m.drawLabels(i,y,{vals:b,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:h,labelFns:G})}L(a["angular-line"].select("path"),I.showline,{d:n.pathSubplot(),transform:u(l,p)}).attr("stroke-width",I.linewidth).call(d.stroke,I.linecolor)},J.updateFx=function(r,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(r),this.updateRadialDrag(r,e,0),this.updateRadialDrag(r,e,1)),this.updateHoverAndMainDrag(r))},J.updateHoverAndMainDrag=function(r){var e,n,c=this,d=c.isSmith,s=c.gd,l=c.layers,m=r._zoomlayer,p=b.MINZOOM,I=b.OFFEDGE,y=c.radius,h=c.innerRadius,G=c.cx,C=c.cy,S=c.cxx,A=c.cyy,B=c.sectorInRad,k=c.vangles,F=c.radialAxis,z=M.clampTiny,w=M.findXYatLength,R=M.findEnclosingVertexAngles,E=b.cornerHalfWidth,N=b.cornerLen/2,T=f.makeDragger(l,"path","maindrag",!1===r.dragmode?"none":"crosshair");i.select(T).attr("d",c.pathSubplot()).attr("transform",u(G,C)),T.onmousemove=function(r){_.hover(s,r,c.id),s._fullLayout._lasthover=T,s._fullLayout._hoversubplot=c.id},T.onmouseout=function(r){s._dragging||g.unhover(s,r)};var D,J,U,H,L,O,K,V,j,W={element:T,gd:s,subplot:c.id,plotinfo:{id:c.id,xaxis:c.xaxis,yaxis:c.yaxis},xaxes:[c.xaxis],yaxes:[c.yaxis]};function Z(r,e){return Math.sqrt(r*r+e*e)}function q(r,e){return Z(r-S,e-A)}function Y(r,e){return Math.atan2(A-e,r-S)}function X(r,e){return[r*Math.cos(e),r*Math.sin(-e)]}function Q(r,e){if(0===r)return c.pathSector(2*E);var n=N/r,i=e-n,a=e+n,t=Math.max(0,Math.min(r,y)),o=t-E,u=t+E;return"M"+X(o,i)+"A"+[o,o]+" 0,0,0 "+X(o,a)+"L"+X(u,a)+"A"+[u,u]+" 0,0,1 "+X(u,i)+"Z"}function $(r,e,n){if(0===r)return c.pathSector(2*E);var i,a,t=X(r,e),o=X(r,n),u=z((t[0]+o[0])/2),d=z((t[1]+o[1])/2);if(u&&d){var s=d/u,l=-1/s,m=w(E,s,u,d);i=w(N,l,m[0][0],m[0][1]),a=w(N,l,m[1][0],m[1][1])}else{var p,I;d?(p=N,I=E):(p=E,I=N),i=[[u-p,d-I],[u+p,d-I]],a=[[u-p,d+I],[u+p,d+I]]}return"M"+i.join("L")+"L"+a.reverse().join("L")+"Z"}function rr(r,e){return e=Math.max(Math.min(e,y),h),rp?(r-1&&1===r&&x(e,s,[c.xaxis],[c.yaxis],c.id,W),n.indexOf("event")>-1&&_.click(s,e,c.id)}W.prepFn=function(r,i,t){var u=s._fullLayout.dragmode,l=T.getBoundingClientRect();s._fullLayout._calcInverseTransform(s);var p=s._fullLayout._invTransform;e=s._fullLayout._invScaleX,n=s._fullLayout._invScaleY;var I=o.apply3DTransform(p)(i-l.left,t-l.top);if(D=I[0],J=I[1],k){var g=M.findPolygonOffset(y,B[0],B[1],k);D+=S+g[0],J+=A+g[1]}switch(u){case"zoom":W.clickFn=cr,d||(W.moveFn=k?ar:nr,W.doneFn=tr,function(){U=null,H=null,L=c.pathSubplot(),O=!1;var r=s._fullLayout[c.id];K=a(r.bgcolor).getLuminance(),(V=f.makeZoombox(m,K,G,C,L)).attr("fill-rule","evenodd"),j=f.makeCorners(m,G,C),P(s)}());break;case"select":case"lasso":v(r,i,t,W,u)}},g.init(W)},J.updateRadialDrag=function(r,e,n){var a=this,d=a.gd,s=a.layers,l=a.radius,m=a.innerRadius,p=a.cx,I=a.cy,y=a.radialAxis,_=b.radialDragBoxSize,h=_/2;if(y.visible){var v,x,G,A=N(a.radialAxisAngle),M=y._rl,B=M[0],k=M[1],F=M[n],z=.75*(M[1]-M[0])/(1-a.getHole(e))/l;n?(v=p+(l+h)*Math.cos(A),x=I-(l+h)*Math.sin(A),G="radialdrag"):(v=p+(m-h)*Math.cos(A),x=I-(m-h)*Math.sin(A),G="radialdrag-inner");var w,R,E,D=f.makeRectDragger(s,G,"crosshair",-h,-h,_,_),J={element:D,gd:d};!1===r.dragmode&&(J.dragmode=!1),L(i.select(D),y.visible&&m0===(n?E>B:Ei?function(r){return r<=0}:function(r){return r>=0};r.c2g=function(n){var i=r.c2l(n)-e;return(c(i)?i:0)+o},r.g2c=function(n){return r.l2c(n+e-o)},r.g2p=function(r){return r*t},r.c2p=function(e){return r.g2p(r.c2g(e))}}}(r,e);break;case"angularaxis":!function(r,e){var n=r.type;if("linear"===n){var a=r.d2c,c=r.c2d;r.d2c=function(r,e){return function(r,e){return"degrees"===e?t(r):r}(a(r),e)},r.c2d=function(r,e){return c(function(r,e){return"degrees"===e?o(r):r}(r,e))}}r.makeCalcdata=function(e,n){var i,a,t=e[n],o=e._length,c=function(n){return r.d2c(n,e.thetaunit)};if(t)for(i=new Array(o),a=0;a0?1:0}function n(r){var e=r[0],n=r[1];if(!isFinite(e)||!isFinite(n))return[1,0];var i=(e+1)*(e+1)+n*n;return[(e*e+n*n-1)/i,2*n/i]}function i(r,e){var n=e[0],i=e[1];return[n*r.radius+r.cx,-i*r.radius+r.cy]}function a(r,e){return e*r.radius}r.exports={smith:n,reactanceArc:function(r,e,t,o){var c=i(r,n([t,e])),u=c[0],d=c[1],s=i(r,n([o,e])),l=s[0],m=s[1];if(0===e)return["M"+u+","+d,"L"+l+","+m].join(" ");var p=a(r,1/Math.abs(e));return["M"+u+","+d,"A"+p+","+p+" 0 0,"+(e<0?1:0)+" "+l+","+m].join(" ")},resistanceArc:function(r,t,o,c){var u=a(r,1/(t+1)),d=i(r,n([t,o])),s=d[0],l=d[1],m=i(r,n([t,c])),p=m[0],I=m[1];if(e(o)!==e(c)){var y=i(r,n([t,0]));return["M"+s+","+l,"A"+u+","+u+" 0 0,"+(00){for(var i=[],a=0;a=s&&(m.min=0,I.min=0,f.min=0,r.aaxis&&delete r.aaxis.min,r.baxis&&delete r.baxis.min,r.caxis&&delete r.caxis.min)}function y(r,e,n,i){var a=m[e._name];function o(n,i){return t.coerce(r,e,a,n,i)}o("uirevision",i.uirevision),e.type="linear";var p=o("color"),I=p!==a.color.dflt?p:n.font.color,y=e._name.charAt(0).toUpperCase(),f="Component "+y,g=o("title.text",f);e._hovertitle=g===f?g:y,t.coerceFont(o,"title.font",n.font,{overrideDflt:{size:t.bigFont(n.font.size),color:I}}),o("min"),s(r,e,o,"linear"),u(r,e,o,"linear"),c(r,e,o,"linear",{noAutotickangles:!0}),d(r,e,o,{outerTicks:!0}),o("showticklabels")&&(t.coerceFont(o,"tickfont",n.font,{overrideDflt:{color:I}}),o("tickangle"),o("tickformat")),l(r,e,o,{dfltColor:p,bgColor:n.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),o("hoverformat"),o("layer")}r.exports=function(r,e,n){o(r,e,n,{type:"ternary",attributes:m,handleDefaults:I,font:e.font,paper_bgcolor:e.paper_bgcolor})}},24696:function(r,e,n){"use strict";var i=n(33428),a=n(49760),t=n(24040),o=n(3400),c=o.strTranslate,u=o._,d=n(76308),s=n(43616),l=n(78344),m=n(92880).extendFlat,p=n(7316),I=n(54460),y=n(86476),f=n(93024),g=n(72760),_=g.freeMode,h=g.rectMode,v=n(81668),x=n(22676).prepSelect,P=n(22676).selectOnClick,G=n(22676).clearOutline,C=n(22676).clearSelectionsCache,S=n(33816);function A(r,e){this.id=r.id,this.graphDiv=r.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}r.exports=A;var b=A.prototype;b.init=function(r){this.container=r._ternarylayer,this.defs=r._defs,this.layoutId=r._uid,this.traceHash={},this.layers={}},b.plot=function(r,e){var n=this,i=e[n.id],a=e._size;n._hasClipOnAxisFalse=!1;for(var t=0;tM*v?a=(t=v)*M:t=(a=h)/M,o=g*a/h,u=_*t/v,n=e.l+e.w*y-a/2,i=e.t+e.h*(1-f)-t/2,p.x0=n,p.y0=i,p.w=a,p.h=t,p.sum=x,p.xaxis={type:"linear",range:[P+2*C-x,x-P-2*G],domain:[y-o/2,y+o/2],_id:"x"},l(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(r){return r.a>=p.aaxis.range[0]&&r.a<=p.aaxis.range[1]&&r.b>=p.baxis.range[1]&&r.b<=p.baxis.range[0]&&r.c>=p.caxis.range[1]&&r.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[P,x-G-C],domain:[f-u/2,f+u/2],_id:"y"},l(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var S=p.yaxis.domain[0],A=p.aaxis=m({},r.aaxis,{range:[P,x-G-C],side:"left",tickangle:(+r.aaxis.tickangle||0)-30,domain:[S,S+u*M],anchor:"free",position:0,_id:"y",_length:a});l(A,p.graphDiv._fullLayout),A.setScale();var b=p.baxis=m({},r.baxis,{range:[x-P-C,G],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:a});l(b,p.graphDiv._fullLayout),b.setScale();var B=p.caxis=m({},r.caxis,{range:[x-P-G,C],side:"right",tickangle:(+r.caxis.tickangle||0)+30,domain:[S,S+u*M],anchor:"free",position:0,_id:"y",_length:a});l(B,p.graphDiv._fullLayout),B.setScale();var k="M"+n+","+(i+t)+"h"+a+"l-"+a/2+",-"+t+"Z";p.clipDef.select("path").attr("d",k),p.layers.plotbg.select("path").attr("d",k);var F="M0,"+t+"h"+a+"l-"+a/2+",-"+t+"Z";p.clipDefRelative.select("path").attr("d",F);var z=c(n,i);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",z),p.clipDefRelative.select("path").attr("transform",null);var w=c(n-b._offset,i+t);p.layers.baxis.attr("transform",w),p.layers.bgrid.attr("transform",w);var R=c(n+a/2,i)+"rotate(30)"+c(0,-A._offset);p.layers.aaxis.attr("transform",R),p.layers.agrid.attr("transform",R);var E=c(n+a/2,i)+"rotate(-30)"+c(0,-B._offset);p.layers.caxis.attr("transform",E),p.layers.cgrid.attr("transform",E),p.drawAxes(!0),p.layers.aline.select("path").attr("d",A.showline?"M"+n+","+(i+t)+"l"+a/2+",-"+t:"M0,0").call(d.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",b.showline?"M"+n+","+(i+t)+"h"+a:"M0,0").call(d.stroke,b.linecolor||"#000").style("stroke-width",(b.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",B.showline?"M"+(n+a/2)+","+i+"l"+a/2+","+t:"M0,0").call(d.stroke,B.linecolor||"#000").style("stroke-width",(B.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),s.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},b.drawAxes=function(r){var e=this,n=e.graphDiv,i=e.id.substr(7)+"title",a=e.layers,t=e.aaxis,o=e.baxis,c=e.caxis;if(e.drawAx(t),e.drawAx(o),e.drawAx(c),r){var d=Math.max(t.showticklabels?t.tickfont.size/2:0,(c.showticklabels?.75*c.tickfont.size:0)+("outside"===c.ticks?.87*c.ticklen:0)),s=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;a["a-title"]=v.draw(n,"a"+i,{propContainer:t,propName:e.id+".aaxis.title",placeholder:u(n,"Click to enter Component A title"),attributes:{x:e.x0+e.w/2,y:e.y0-t.title.font.size/3-d,"text-anchor":"middle"}}),a["b-title"]=v.draw(n,"b"+i,{propContainer:o,propName:e.id+".baxis.title",placeholder:u(n,"Click to enter Component B title"),attributes:{x:e.x0-s,y:e.y0+e.h+.83*o.title.font.size+s,"text-anchor":"middle"}}),a["c-title"]=v.draw(n,"c"+i,{propContainer:c,propName:e.id+".caxis.title",placeholder:u(n,"Click to enter Component C title"),attributes:{x:e.x0+e.w+s,y:e.y0+e.h+.83*c.title.font.size+s,"text-anchor":"middle"}})}},b.drawAx=function(r){var e,n=this,i=n.graphDiv,a=r._name,t=a.charAt(0),c=r._id,u=n.layers[a],d=t+"tickLayout",s=(e=r).ticks+String(e.ticklen)+String(e.showticklabels);n[d]!==s&&(u.selectAll("."+c+"tick").remove(),n[d]=s),r.setScale();var l=I.calcTicks(r),m=I.clipEnds(r,l),p=I.makeTransTickFn(r),y=I.getTickSigns(r)[2],f=o.deg2rad(30),g=y*(r.linewidth||1)/2,_=y*r.ticklen,h=n.w,v=n.h,x="b"===t?"M0,"+g+"l"+Math.sin(f)*_+","+Math.cos(f)*_:"M"+g+",0l"+Math.cos(f)*_+","+-Math.sin(f)*_,P={a:"M0,0l"+v+",-"+h/2,b:"M0,0l-"+h/2+",-"+v,c:"M0,0l-"+v+","+h/2}[t];I.drawTicks(i,r,{vals:"inside"===r.ticks?m:l,layer:u,path:x,transFn:p,crisp:!1}),I.drawGrid(i,r,{vals:m,layer:n.layers[t+"grid"],path:P,transFn:p,crisp:!1}),I.drawLabels(i,r,{vals:l,layer:u,transFn:p,labelFns:I.makeLabelFns(r,0,30)})};var B=S.MINZOOM/2+.87,k="m-0.87,.5h"+B+"v3h-"+(B+5.2)+"l"+(B/2+2.6)+",-"+(.87*B+4.5)+"l2.6,1.5l-"+B/2+","+.87*B+"Z",F="m0.87,.5h-"+B+"v3h"+(B+5.2)+"l-"+(B/2+2.6)+",-"+(.87*B+4.5)+"l-2.6,1.5l"+B/2+","+.87*B+"Z",z="m0,1l"+B/2+","+.87*B+"l2.6,-1.5l-"+(B/2+2.6)+",-"+(.87*B+4.5)+"l-"+(B/2+2.6)+","+(.87*B+4.5)+"l2.6,1.5l"+B/2+",-"+.87*B+"Z",w=!0;function R(r){i.select(r).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}b.clearOutline=function(){C(this.dragOptions),G(this.dragOptions.gd)},b.initInteractions=function(){var r,e,n,i,l,m,p,I,g,v,G,C,A=this,b=A.layers.plotbg.select("path").node(),B=A.graphDiv,E=B._fullLayout._zoomlayer;function N(r){var e={};return e[A.id+".aaxis.min"]=r.a,e[A.id+".baxis.min"]=r.b,e[A.id+".caxis.min"]=r.c,e}function T(r,e){var n=B._fullLayout.clickmode;R(B),2===r&&(B.emit("plotly_doubleclick",null),t.call("_guiRelayout",B,N({a:0,b:0,c:0}))),n.indexOf("select")>-1&&1===r&&P(e,B,[A.xaxis],[A.yaxis],A.id,A.dragOptions),n.indexOf("event")>-1&&f.click(B,e,A.id)}function D(r,e){return 1-e/A.h}function J(r,e){return 1-(r+(A.h-e)/Math.sqrt(3))/A.w}function U(r,e){return(r-(A.h-e)/Math.sqrt(3))/A.w}function H(a,t){var o=n+a*r,c=i+t*e,u=Math.max(0,Math.min(1,D(0,i),D(0,c))),d=Math.max(0,Math.min(1,J(n,i),J(o,c))),s=Math.max(0,Math.min(1,U(n,i),U(o,c))),y=(u/2+s)*A.w,f=(1-u/2-d)*A.w,_=(y+f)/2,h=f-y,x=(1-u)*A.h,P=x-h/M;h.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),C.transition().style("opacity",1).duration(200),v=!0),B.emit("plotly_relayouting",N(p))}function L(){R(B),p!==l&&(t.call("_guiRelayout",B,N(p)),w&&B.data&&B._context.showTips&&(o.notifier(u(B,"Double-click to zoom back out"),"long"),w=!1))}function O(r,e){var n=r/A.xaxis._m,i=e/A.yaxis._m,a=[(p={a:l.a-i,b:l.b+(n+i)/2,c:l.c-(n-i)/2}).a,p.b,p.c].sort(o.sorterAsc),t=a.indexOf(p.a),u=a.indexOf(p.b),d=a.indexOf(p.c);a[0]<0&&(a[1]+a[0]/2<0?(a[2]+=a[0]+a[1],a[0]=a[1]=0):(a[2]+=a[0]/2,a[1]+=a[0]/2,a[0]=0),p={a:a[t],b:a[u],c:a[d]},e=(l.a-p.a)*A.yaxis._m,r=(l.c-p.c-l.b+p.b)*A.xaxis._m);var m=c(A.x0+r,A.y0+e);A.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",m);var I=c(-r,-e);A.clipDefRelative.select("path").attr("transform",I),A.aaxis.range=[p.a,A.sum-p.b-p.c],A.baxis.range=[A.sum-p.a-p.c,p.b],A.caxis.range=[A.sum-p.a-p.b,p.c],A.drawAxes(!1),A._hasClipOnAxisFalse&&A.plotContainer.select(".scatterlayer").selectAll(".trace").call(s.hideOutsideRangePoints,A),B.emit("plotly_relayouting",N(p))}function K(){t.call("_guiRelayout",B,N(p))}this.dragOptions={element:b,gd:B,plotinfo:{id:A.id,domain:B._fullLayout[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis},subplot:A.id,prepFn:function(t,u,s){A.dragOptions.xaxes=[A.xaxis],A.dragOptions.yaxes=[A.yaxis],r=B._fullLayout._invScaleX,e=B._fullLayout._invScaleY;var y=A.dragOptions.dragmode=B._fullLayout.dragmode;_(y)?A.dragOptions.minDrag=1:A.dragOptions.minDrag=void 0,"zoom"===y?(A.dragOptions.moveFn=H,A.dragOptions.clickFn=T,A.dragOptions.doneFn=L,function(r,e,t){var u=b.getBoundingClientRect();n=e-u.left,i=t-u.top,B._fullLayout._calcInverseTransform(B);var s=B._fullLayout._invTransform,y=o.apply3DTransform(s)(n,i);n=y[0],i=y[1],l={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=l,m=A.aaxis.range[1]-l.a,I=a(A.graphDiv._fullLayout[A.id].bgcolor).getLuminance(),g="M0,"+A.h+"L"+A.w/2+", 0L"+A.w+","+A.h+"Z",v=!1,G=E.append("path").attr("class","zoombox").attr("transform",c(A.x0,A.y0)).style({fill:I>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",g),C=E.append("path").attr("class","zoombox-corners").attr("transform",c(A.x0,A.y0)).style({fill:d.background,stroke:d.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),A.clearOutline(B)}(0,u,s)):"pan"===y?(A.dragOptions.moveFn=O,A.dragOptions.clickFn=T,A.dragOptions.doneFn=K,l={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=l,A.clearOutline(B)):(h(y)||_(y))&&x(t,u,s,A.dragOptions,y)}},b.onmousemove=function(r){f.hover(B,r,A.id),B._fullLayout._lasthover=b,B._fullLayout._hoversubplot=A.id},b.onmouseout=function(r){B._dragging||y.unhover(B,r)},y.init(this.dragOptions)}},24040:function(r,e,n){"use strict";var i=n(24248),a=n(16628),t=n(52416),o=n(63620),c=n(52200).addStyleRule,u=n(92880),d=n(45464),s=n(64859),l=u.extendFlat,m=u.extendDeepAll;function p(r){var n=r.name,a=r.categories,t=r.meta;if(e.modules[n])i.log("Type "+n+" already registered");else{e.subplotsRegistry[r.basePlotModule.name]||function(r){var n=r.name;if(e.subplotsRegistry[n])i.log("Plot type "+n+" already registered.");else for(var a in g(r),e.subplotsRegistry[n]=r,e.componentsRegistry)v(a,r.name)}(r.basePlotModule);for(var o={},u=0;u-1&&(l[p[n]].title={text:""});for(n=0;n")?"":e.html(r).text()}));return e.remove(),n}(P)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(s,"'"),a.isIE()&&(P=(P=(P=P.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),P}},84664:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e){for(var n=0;nl+d||!i(s))}for(var p=0;p=0)return r}else if("string"===typeof r&&"%"===(r=r.trim()).slice(-1)&&i(r.slice(0,-1))&&(r=+r.slice(0,-1))>=0)return r+"%"}function I(r,e,n,i,t,o){var c=!(!1===(o=o||{}).moduleHasSelected),u=!(!1===o.moduleHasUnselected),d=!(!1===o.moduleHasConstrain),s=!(!1===o.moduleHasCliponaxis),l=!(!1===o.moduleHasTextangle),p=!(!1===o.moduleHasInsideanchor),I=!!o.hasPathbar,y=Array.isArray(t)||"auto"===t,f=y||"inside"===t,g=y||"outside"===t;if(f||g){var _=m(i,"textfont",n.font),h=a.extendFlat({},_),v=!(r.textfont&&r.textfont.color);if(v&&delete h.color,m(i,"insidetextfont",h),I){var x=a.extendFlat({},_);v&&delete x.color,m(i,"pathbar.textfont",x)}g&&m(i,"outsidetextfont",_),c&&i("selected.textfont.color"),u&&i("unselected.textfont.color"),d&&i("constraintext"),s&&i("cliponaxis"),l&&i("textangle"),i("texttemplate")}f&&p&&i("insidetextanchor")}r.exports={supplyDefaults:function(r,e,n,i){function s(n,i){return a.coerce(r,e,l,n,i)}if(c(r,e,i,s)){u(r,e,i,s),s("xhoverformat"),s("yhoverformat"),s("zorder"),s("orientation",e.x&&!e.y?"h":"v"),s("base"),s("offset"),s("width"),s("text"),s("hovertext"),s("hovertemplate");var m=s("textposition");I(r,0,i,s,m,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),d(r,e,s,n,i);var p=(e.marker.line||{}).color,y=o.getComponentMethod("errorbars","supplyDefaults");y(r,e,p||t.defaultLine,{axis:"y"}),y(r,e,p||t.defaultLine,{axis:"x",inherit:"y"}),a.coerceSelectionMarkerOpacity(e,s)}else e.visible=!1},crossTraceDefaults:function(r,e){var n,i;function t(r,e){return a.coerce(i._input,i,l,r,e)}for(var o=0;ot))return e}return void 0!==n?n:r.dflt},e.coerceColor=function(r,e,n){return a(e).isValid()?e:void 0!==n?n:r.dflt},e.coerceEnumerated=function(r,e,n){return r.coerceNumber&&(e=+e),-1!==r.values.indexOf(e)?e:void 0!==n?n:r.dflt},e.getValue=function(r,e){var n;return t(r)?e0?e+=n:s<0&&(e-=n)}return e}function R(r){var e=s,n=r.b,a=w(r);return i.inbox(n-e,a-e,x+(a-e)/(a-n)-1)}var E=r[l+"a"],N=r[m+"a"];y=Math.abs(E.r2c(E.range[1])-E.r2c(E.range[0]));var T=i.getDistanceFunction(a,p,I,(function(r){return(p(r)+I(r))/2}));if(i.getClosest(f,T,r),!1!==r.index&&f[r.index].p!==d){C||(B=function(r){return Math.min(S(r),r.p-_.bargroupwidth/2)},k=function(r){return Math.max(A(r),r.p+_.bargroupwidth/2)});var D=f[r.index],J=g.base?D.b+D.s:D.s;r[m+"0"]=r[m+"1"]=N.c2p(D[m],!0),r[m+"LabelVal"]=J;var U=_.extents[_.extents.round(D.p)];r[l+"0"]=E.c2p(h?B(D):U[0],!0),r[l+"1"]=E.c2p(h?k(D):U[1],!0);var H=void 0!==D.orig_p;return r[l+"LabelVal"]=H?D.orig_p:D.p,r.labelLabel=u(E,r[l+"LabelVal"],g[l+"hoverformat"]),r.valueLabel=u(N,r[m+"LabelVal"],g[m+"hoverformat"]),r.baseLabel=u(N,D.b,g[m+"hoverformat"]),r.spikeDistance=(function(r){var e=s,n=r.b,a=w(r);return i.inbox(n-e,a-e,P+(a-e)/(a-n)-1)}(D)+function(r){return F(S(r),A(r),P)}(D))/2,r[l+"Spike"]=E.c2p(D.p,!0),o(D,g,r),r.hovertemplate=g.hovertemplate,r}}function l(r,e){var n=e.mcc||r.marker.color,i=e.mlcc||r.marker.line.color,a=c(r,e);return t.opacity(n)?n:t.opacity(i)&&a?i:void 0}r.exports={hoverPoints:function(r,e,n,i,t){var o=s(r,e,n,i,t);if(o){var c=o.cd,u=c[0].trace,d=c[o.index];return o.color=l(u,d),a.getComponentMethod("errorbars","hoverInfo")(d,u,o),[o]}},hoverOnBars:s,getTraceColor:l}},51132:function(r,e,n){"use strict";r.exports={attributes:n(20832),layoutAttributes:n(39324),supplyDefaults:n(31508).supplyDefaults,crossTraceDefaults:n(31508).crossTraceDefaults,supplyLayoutDefaults:n(37156),calc:n(71820),crossTraceCalc:n(96376).crossTraceCalc,colorbar:n(5528),arraysToCalcdata:n(84664),plot:n(98184).plot,style:n(60100).style,styleOnSelect:n(60100).styleOnSelect,hoverPoints:n(63400).hoverPoints,eventData:n(52160),selectPoints:n(45784),moduleType:"trace",name:"bar",basePlotModule:n(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(r){"use strict";r.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"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(r,e,n){"use strict";var i=n(24040),a=n(54460),t=n(3400),o=n(39324),c=n(31508).validateCornerradius;r.exports=function(r,e,n){function u(n,i){return t.coerce(r,e,o,n,i)}for(var d=!1,s=!1,l=!1,m={},p=u("barmode"),I=0;I0)-(r<0)}function S(r,e){return r0}function M(r,e,n,i,a){return!(r<0||e<0)&&(n<=r&&i<=e||n<=e&&i<=r||(a?r>=n*(e/i):e>=i*(r/n)))}function B(r){return"auto"===r?0:r}function k(r,e){var n=Math.PI/180*e,i=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));return{x:r.width*a+r.height*i,y:r.width*i+r.height*a}}function F(r,e,n,i,a,t){var o=!!t.isHorizontal,c=!!t.constrained,u=t.angle||0,d=t.anchor,s="end"===d,l="start"===d,m=((t.leftToRight||0)+1)/2,p=1-m,I=t.hasB,y=t.r,f=t.overhead,g=a.width,_=a.height,h=Math.abs(e-r),v=Math.abs(i-n),P=h>2*x&&v>2*x?x:0;h-=2*P,v-=2*P;var G=B(u);"auto"!==u||g<=h&&_<=v||!(g>h||_>v)||(g>v||_>h)&&g<_===hx){var M=function(r,e,n,i,a,t,o,c,u){var d,s,l,m,p,I=Math.max(0,Math.abs(e-r)-2*x),y=Math.max(0,Math.abs(i-n)-2*x),f=t-x,g=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,_=u?2*f:c?f-o:2*g,h=u?2*f:c?2*g:f-o;return a.y/a.x>=y/(I-_)?m=y/a.y:a.y/a.x<=(y-h)/I?m=I/a.x:!u&&c?(d=a.x*a.x+a.y*a.y/4,l=(I-f)*(I-f)+(y/2-f)*(y/2-f)-f*f,m=(-(s=-2*a.x*(I-f)-a.y*(y/2-f))+Math.sqrt(s*s-4*d*l))/(2*d)):u?(d=(a.x*a.x+a.y*a.y)/4,l=(I/2-f)*(I/2-f)+(y/2-f)*(y/2-f)-f*f,m=(-(s=-a.x*(I/2-f)-a.y*(y/2-f))+Math.sqrt(s*s-4*d*l))/(2*d)):(d=a.x*a.x/4+a.y*a.y,l=(I/2-f)*(I/2-f)+(y-f)*(y-f)-f*f,m=(-(s=-a.x*(I/2-f)-2*a.y*(y-f))+Math.sqrt(s*s-4*d*l))/(2*d)),m=Math.min(1,m),p=c?Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(y-a.y*m)/2)*(f-(y-a.y*m)/2)))-o):Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(I-a.x*m)/2)*(f-(I-a.x*m)/2)))-o),{scale:m,pad:p}}(r,e,n,i,b,y,f,o,I);C=M.scale,A=M.pad}else C=1,c&&(C=Math.min(1,h/b.x,v/b.y)),A=0;var F=a.left*p+a.right*m,z=(a.top+a.bottom)/2,w=(r+x)*p+(e-x)*m,R=(n+i)/2,E=0,N=0;if(l||s){var T=(o?b.x:b.y)/2;y&&(s||I)&&(P+=A);var D=o?S(r,e):S(n,i);o?l?(w=r+D*P,E=-D*T):(w=e-D*P,E=D*T):l?(R=n+D*P,N=-D*T):(R=i-D*P,N=D*T)}return{textX:F,textY:z,targetX:w,targetY:R,anchorX:E,anchorY:N,scale:C,rotate:G}}r.exports={plot:function(r,e,n,l,f,g){var P=e.xaxis,z=e.yaxis,w=r._fullLayout,R=r._context.staticPlot;f||(f={mode:w.barmode,norm:w.barmode,gap:w.bargap,groupgap:w.bargroupgap},p("bar",w));var E=t.makeTraceGroups(l,n,"trace bars").each((function(n){var d=i.select(this),l=n[0].trace,p=n[0].t,E="waterfall"===l.type,N="funnel"===l.type,T="histogram"===l.type,D="bar"===l.type,J=D||N,U=0;E&&l.connector.visible&&"between"===l.connector.mode&&(U=l.connector.line.width/2);var H="h"===l.orientation,L=b(f),O=t.ensureSingle(d,"g","points"),K=G(l),V=O.selectAll("g.point").data(t.identity,K);V.enter().append("g").classed("point",!0),V.exit().remove(),V.each((function(d,G){var b,E,N=i.select(this),O=function(r,e,n,i){var a=[],t=[],o=i?e:n,c=i?n:e;return a[0]=o.c2p(r.s0,!0),t[0]=c.c2p(r.p0,!0),a[1]=o.c2p(r.s1,!0),t[1]=c.c2p(r.p1,!0),i?[a,t]:[t,a]}(d,P,z,H),K=O[0][0],V=O[0][1],j=O[1][0],W=O[1][1],Z=0===(H?V-K:W-j);if(Z&&J&&y.getLineWidth(l,d)&&(Z=!1),Z||(Z=!a(K)||!a(V)||!a(j)||!a(W)),d.isBlank=Z,Z&&(H?V=K:W=j),U&&!Z&&(H?(K-=S(K,V)*U,V+=S(K,V)*U):(j-=S(j,W)*U,W+=S(j,W)*U)),"waterfall"===l.type){if(!Z){var q=l[d.dir].marker;b=q.line.width,E=q.color}}else b=y.getLineWidth(l,d),E=d.mc||l.marker.color;function Y(r){var e=i.round(b/2%1,2);return 0===f.gap&&0===f.groupgap?i.round(Math.round(r)-e,2):r}var X=c.opacity(E)<1||b>.01?Y:function(r,e,n){return n&&r===e?r:Math.abs(r-e)>=2?Y(r):r>e?Math.ceil(r):Math.floor(r)};r._context.staticPlot||(K=X(K,V,H),V=X(V,K,H),j=X(j,W,!H),W=X(W,j,!H));var Q,$=H?P.c2p:z.c2p;Q=d.s0>0?d._sMax:d.s0<0?d._sMin:d.s1>0?d._sMax:d._sMin;var rr,er,nr=D||T?function(r,e){if(!r)return 0;var n,i=H?Math.abs(W-j):Math.abs(V-K),a=H?Math.abs(V-K):Math.abs(W-j),t=X(Math.abs($(Q,!0)-$(0,!0))),o=d.hasB?Math.min(i/2,a/2):Math.min(i/2,t);return n="%"===e?i*(Math.min(50,r)/100):r,X(Math.max(Math.min(n,o),0))}(p.cornerradiusvalue,p.cornerradiusform):0,ir="M"+K+","+j+"V"+W+"H"+V+"V"+j+"Z",ar=0;if(nr&&d.s){var tr=0===C(d.s0)||C(d.s)===C(d.s0)?d.s1:d.s0;if((ar=X(d.hasB?0:Math.abs($(Q,!0)-$(tr,!0))))0?Math.sqrt(ar*(2*nr-ar)):0,lr=or>0?Math.max:Math.min;rr="M"+K+","+j+"V"+(W-dr*cr)+"H"+lr(V-(nr-ar)*or,K)+"A "+nr+","+nr+" 0 0 "+ur+" "+V+","+(W-nr*cr-sr)+"V"+(j+nr*cr+sr)+"A "+nr+","+nr+" 0 0 "+ur+" "+lr(V-(nr-ar)*or,K)+","+(j+dr*cr)+"Z"}else if(d.hasB)rr="M"+(K+nr*or)+","+j+"A "+nr+","+nr+" 0 0 "+ur+" "+K+","+(j+nr*cr)+"V"+(W-nr*cr)+"A "+nr+","+nr+" 0 0 "+ur+" "+(K+nr*or)+","+W+"H"+(V-nr*or)+"A "+nr+","+nr+" 0 0 "+ur+" "+V+","+(W-nr*cr)+"V"+(j+nr*cr)+"A "+nr+","+nr+" 0 0 "+ur+" "+(V-nr*or)+","+j+"Z";else{var mr=(er=Math.abs(W-j)+ar)0?Math.sqrt(ar*(2*nr-ar)):0,Ir=cr>0?Math.max:Math.min;rr="M"+(K+mr*or)+","+j+"V"+Ir(W-(nr-ar)*cr,j)+"A "+nr+","+nr+" 0 0 "+ur+" "+(K+nr*or-pr)+","+W+"H"+(V-nr*or+pr)+"A "+nr+","+nr+" 0 0 "+ur+" "+(V-mr*or)+","+Ir(W-(nr-ar)*cr,j)+"V"+j+"Z"}}else rr=ir}else rr=ir;var yr=A(t.ensureSingle(N,"path"),w,f,g);if(yr.style("vector-effect",R?"none":"non-scaling-stroke").attr("d",isNaN((V-K)*(W-j))||Z&&r._context.staticPlot?"M0,0Z":rr).call(u.setClipUrl,e.layerClipId,r),!w.uniformtext.mode&&L){var fr=u.makePointStyleFns(l);u.singlePointStyle(d,yr,l,fr,r)}!function(r,e,n,i,a,c,d,l,p,f,g,P,G){var C,b=e.xaxis,z=e.yaxis,w=r._fullLayout;function R(e,n,i){return t.ensureSingle(e,"text").text(n).attr({class:"bartext bartext-"+C,"text-anchor":"middle","data-notex":1}).call(u.font,i).call(o.convertToTspans,r)}var E=i[0].trace,N="h"===E.orientation,T=function(r,e,n,i,a){var o,c=e[0].trace,u=c.texttemplate;return o=u?function(r,e,n,i,a){var o=e[0].trace,c=t.castOption(o,n,"texttemplate");if(!c)return"";var u,d,l,m,p="histogram"===o.type,I="waterfall"===o.type,y="funnel"===o.type,f="h"===o.orientation;function g(r){return s(d,d.c2l(r),!0).text}function _(r){return s(m,m.c2l(r),!0).text}f?(u="y",d=a,l="x",m=i):(u="x",d=i,l="y",m=a);var h=e[n],x={};x.label=h.p,x.labelLabel=x[u+"Label"]=g(h.p);var P=t.castOption(o,h.i,"text");(0===P||P)&&(x.text=P),x.value=h.s,x.valueLabel=x[l+"Label"]=_(h.s);var G={};v(G,o,h.i),(p||void 0===G.x)&&(G.x=f?x.value:x.label),(p||void 0===G.y)&&(G.y=f?x.label:x.value),(p||void 0===G.xLabel)&&(G.xLabel=f?x.valueLabel:x.labelLabel),(p||void 0===G.yLabel)&&(G.yLabel=f?x.labelLabel:x.valueLabel),I&&(x.delta=+h.rawS||h.s,x.deltaLabel=_(x.delta),x.final=h.v,x.finalLabel=_(x.final),x.initial=x.final-x.delta,x.initialLabel=_(x.initial)),y&&(x.value=h.s,x.valueLabel=_(x.value),x.percentInitial=h.begR,x.percentInitialLabel=t.formatPercent(h.begR),x.percentPrevious=h.difR,x.percentPreviousLabel=t.formatPercent(h.difR),x.percentTotal=h.sumR,x.percenTotalLabel=t.formatPercent(h.sumR));var C=t.castOption(o,h.i,"customdata");return C&&(x.customdata=C),t.texttemplateString(c,x,r._d3locale,G,x,o._meta||{})}(r,e,n,i,a):c.textinfo?function(r,e,n,i){var a=r[0].trace,o="h"===a.orientation,c="waterfall"===a.type,u="funnel"===a.type;function d(r){return s(o?i:n,r,!0).text}function l(r){return s(o?n:i,+r,!0).text}var m,p=a.textinfo,I=r[e],y=p.split("+"),f=[],g=function(r){return-1!==y.indexOf(r)};if(g("label")&&f.push(d(r[e].p)),g("text")&&(0===(m=t.castOption(a,I.i,"text"))||m)&&f.push(m),c){var _=+I.rawS||I.s,h=I.v,v=h-_;g("initial")&&f.push(l(v)),g("delta")&&f.push(l(_)),g("final")&&f.push(l(h))}if(u){g("value")&&f.push(l(I.s));var x=0;g("percent initial")&&x++,g("percent previous")&&x++,g("percent total")&&x++;var P=x>1;g("percent initial")&&(m=t.formatPercent(I.begR),P&&(m+=" of initial"),f.push(m)),g("percent previous")&&(m=t.formatPercent(I.difR),P&&(m+=" of previous"),f.push(m)),g("percent total")&&(m=t.formatPercent(I.sumR),P&&(m+=" of total"),f.push(m))}return f.join("
")}(e,n,i,a):y.getValue(c.text,n),y.coerceString(_,o)}(w,i,a,b,z);C=function(r,e){var n=y.getValue(r.textposition,e);return y.coerceEnumerated(h,n)}(E,a);var D="stack"===P.mode||"relative"===P.mode,J=i[a],U=!D||J._outmost,H=J.hasB,L=f&&f-g>x;if(T&&"none"!==C&&(!J.isBlank&&c!==d&&l!==p||"auto"!==C&&"inside"!==C)){var O=w.font,K=I.getBarColor(i[a],E),V=I.getInsideTextFont(E,a,O,K),j=I.getOutsideTextFont(E,a,O),W=E.insidetextanchor||"end",Z=n.datum();N?"log"===b.type&&Z.s0<=0&&(c=b.range[0]0&&Q>0;ar=L?H?M(nr-2*f,ir,X,Q,N)||M(nr,ir-2*f,X,Q,N):N?M(nr-(f-g),ir,X,Q,N)||M(nr,ir-2*(f-g),X,Q,N):M(nr,ir-(f-g),X,Q,N)||M(nr-2*(f-g),ir,X,Q,N):M(nr,ir,X,Q,N),tr&&ar?C="inside":(C="outside",q.remove(),q=null)}else C="inside";if(!q){var or=(q=R(n,T,$=t.ensureUniformFontSize(r,"outside"===C?j:V))).attr("transform");if(q.attr("transform",""),X=(Y=u.bBox(q.node())).width,Q=Y.height,q.attr("transform",or),X<=0||Q<=0)return void q.remove()}var cr,ur=E.textangle;cr="outside"===C?function(r,e,n,i,a,t){var o,c=!!t.isHorizontal,u=!!t.constrained,d=t.angle||0,s=a.width,l=a.height,m=Math.abs(e-r),p=Math.abs(i-n);o=c?p>2*x?x:0:m>2*x?x:0;var I=1;u&&(I=c?Math.min(1,p/l):Math.min(1,m/s));var y=B(d),f=k(a,y),g=(c?f.x:f.y)/2,_=(a.left+a.right)/2,h=(a.top+a.bottom)/2,v=(r+e)/2,P=(n+i)/2,G=0,C=0,A=c?S(e,r):S(n,i);return c?(v=e-A*o,G=A*g):(P=i+A*o,C=-A*g),{textX:_,textY:h,targetX:v,targetY:P,anchorX:G,anchorY:C,scale:I,rotate:y}}(c,d,l,p,Y,{isHorizontal:N,constrained:"both"===E.constraintext||"outside"===E.constraintext,angle:ur}):F(c,d,l,p,Y,{isHorizontal:N,constrained:"both"===E.constraintext||"inside"===E.constraintext,angle:ur,anchor:W,hasB:H,r:f,overhead:g}),cr.fontSize=$.size,m("histogram"===E.type?"bar":E.type,cr,w),J.transform=cr;var dr=A(q,w,P,G);t.setTransormAndDisplay(dr,cr)}else n.select("text").remove()}(r,e,N,n,G,K,V,j,W,nr,ar,f,g),e.layerClipId&&u.hideOutsideRangePoint(d,N.select("text"),P,z,l.xcalendar,l.ycalendar)}));var j=!1===l.cliponaxis;u.setClipUrl(d,j?null:e.layerClipId,r)}));d.getComponentMethod("errorbars","plot")(r,E,e,f)},toMoveInsideBar:F}},45784:function(r){"use strict";function e(r,e,n,i,a){var t=e.c2p(i?r.s0:r.p0,!0),o=e.c2p(i?r.s1:r.p1,!0),c=n.c2p(i?r.p0:r.s0,!0),u=n.c2p(i?r.p1:r.s1,!0);return a?[(t+o)/2,(c+u)/2]:i?[o,(c+u)/2]:[(t+o)/2,u]}r.exports=function(r,n){var i,a=r.cd,t=r.xaxis,o=r.yaxis,c=a[0].trace,u="funnel"===c.type,d="h"===c.orientation,s=[];if(!1===n)for(i=0;i1||0===a.bargap&&0===a.bargroupgap&&!r[0].trace.marker.line.width)&&i.select(this).attr("shape-rendering","crispEdges")})),e.selectAll("g.points").each((function(e){I(i.select(this),e[0].trace,r)})),c.getComponentMethod("errorbars","style")(e)},styleTextPoints:y,styleOnSelect:function(r,e,n){var a=e[0].trace;a.selectedpoints?function(r,e,n){t.selectedPointStyle(r.selectAll("path"),e),function(r,e,n){r.each((function(r){var a,c=i.select(this);if(r.selected){a=o.ensureUniformFontSize(n,f(c,r,e,n));var u=e.selected.textfont&&e.selected.textfont.color;u&&(a.color=u),t.font(c,a)}else t.selectedTextStyle(c,e)}))}(r.selectAll("text"),e,n)}(n,a,r):(I(n,a,r),c.getComponentMethod("errorbars","style")(n))},getInsideTextFont:_,getOutsideTextFont:h,getBarColor:x,resizeText:u}},55592:function(r,e,n){"use strict";var i=n(76308),a=n(94288).hasColorscale,t=n(27260),o=n(3400).coercePattern;r.exports=function(r,e,n,c,u){var d=n("marker.color",c),s=a(r,"marker");s&&t(r,e,u,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",i.defaultLine),a(r,"marker.line")&&t(r,e,u,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),o(n,"marker.pattern",d,s),n("selected.marker.color"),n("unselected.marker.color")}},82744:function(r,e,n){"use strict";var i=n(33428),a=n(3400);function t(r){return"_"+r+"Text_minsize"}r.exports={recordMinTextSize:function(r,e,n){if(n.uniformtext.mode){var i=t(r),a=n.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=om.range[1]&&(h+=Math.PI),i.getClosest(d,(function(r){return y(_,h,[r.rp0,r.rp1],[r.thetag0,r.thetag1],I)?f+Math.min(1,Math.abs(r.thetag1-r.thetag0)/g)-1+(r.rp1-_)/(r.rp1-r.rp0)-1:1/0}),r),!1!==r.index){var v=d[r.index];r.x0=r.x1=v.ct[0],r.y0=r.y1=v.ct[1];var x=a.extendFlat({},v,{r:v.s,theta:v.p});return o(v,s,r),c(x,s,l,r),r.hovertemplate=s.hovertemplate,r.color=t(s,v),r.xLabelVal=r.yLabelVal=void 0,v.s<0&&(r.idealAlign="left"),[r]}}},94456:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"barpolar",basePlotModule:n(40872),categories:["polar","bar","showLegend"],attributes:n(78100),layoutAttributes:n(9320),supplyDefaults:n(70384),supplyLayoutDefaults:n(89580),calc:n(47056).calc,crossTraceCalc:n(47056).crossTraceCalc,plot:n(42040),colorbar:n(5528),formatLabels:n(22852),style:n(60100).style,styleOnSelect:n(60100).styleOnSelect,hoverPoints:n(68896),selectPoints:n(45784),meta:{}}},9320:function(r){"use strict";r.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(r,e,n){"use strict";var i=n(3400),a=n(9320);r.exports=function(r,e,n){var t,o={};function c(n,o){return i.coerce(r[t]||{},e[t],a,n,o)}for(var u=0;u0?(d=o,s=u):(d=u,s=o);var l=[c.findEnclosingVertexAngles(d,r.vangles)[0],(d+s)/2,c.findEnclosingVertexAngles(s,r.vangles)[1]];return c.pathPolygonAnnulus(i,a,d,s,l,e,n)}:function(r,i,a,o){return t.pathAnnulus(r,i,a,o,e,n)}}(e),I=e.layers.frontplot.select("g.barlayer");t.makeTraceGroups(I,n,"trace bars").each((function(){var n=i.select(this),c=t.ensureSingle(n,"g","points").selectAll("g.point").data(t.identity);c.enter().append("g").style("vector-effect",u?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),c.exit().remove(),c.each((function(r){var e,n=i.select(this),o=r.rp0=l.c2p(r.s0),c=r.rp1=l.c2p(r.s1),u=r.thetag0=m.c2g(r.p0),I=r.thetag1=m.c2g(r.p1);if(a(o)&&a(c)&&a(u)&&a(I)&&o!==c&&u!==I){var y=l.c2g(r.s1),f=(u+I)/2;r.ct=[d.c2p(y*Math.cos(f)),s.c2p(y*Math.sin(f))],e=p(o,c,u,I)}else e="M0,0Z";t.ensureSingle(n,"path").attr("d",e)})),o.setClipUrl(n,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,r)}))}},63188:function(r,e,n){"use strict";var i=n(98304),a=n(52904),t=n(20832),o=n(22548),c=n(29736).axisHoverFormat,u=n(21776).Ks,d=n(92880).extendFlat,s=a.marker,l=s.line;r.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"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:a.xperiod,yperiod:a.yperiod,xperiod0:a.xperiod0,yperiod0:a.yperiod0,xperiodalignment:a.xperiodalignment,yperiodalignment:a.yperiodalignment,xhoverformat:c("x"),yhoverformat:c("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:d({},s.symbol,{arrayOk:!1,editType:"plot"}),opacity:d({},s.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:d({},s.angle,{arrayOk:!1,editType:"calc"}),size:d({},s.size,{arrayOk:!1,editType:"calc"}),color:d({},s.color,{arrayOk:!1,editType:"style"}),line:{color:d({},l.color,{arrayOk:!1,dflt:o.defaultLine,editType:"style"}),width:d({},l.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:i(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:t.offsetgroup,alignmentgroup:t.alignmentgroup,selected:{marker:a.selected.marker,editType:"style"},unselected:{marker:a.unselected.marker,editType:"style"},text:d({},a.text,{}),hovertext:d({},a.hovertext,{}),hovertemplate:u({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:a.zorder}},62555:function(r,e,n){"use strict";var i=n(38248),a=n(54460),t=n(1220),o=n(3400),c=n(39032).BADNUM,u=o._;r.exports=function(r,e){var n,d,_,h,v,x,P,G=r._fullLayout,C=a.getFromId(r,e.xaxis||"x"),S=a.getFromId(r,e.yaxis||"y"),A=[],b="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(_=C,h="x",v=S,x="y",P=!!e.yperiodalignment):(_=S,h="y",v=C,x="x",P=!!e.xperiodalignment);var M,B,k,F,z,w,R=function(r,e,n,a){var c,u=e in r,d=e+"0"in r,s="d"+e in r;if(u||d&&s){var l=n.makeCalcdata(r,e);return[t(r,n,e,l).vals,l]}c=d?r[e+"0"]:"name"in r&&("category"===n.type||i(r.name)&&-1!==["linear","log"].indexOf(n.type)||o.isDateTime(r.name)&&"date"===n.type)?r.name:a;for(var m="multicategory"===n.type?n.r2c_just_indices(c):n.d2c(c,0,r[e+"calendar"]),p=r._length,I=new Array(p),y=0;yM.uf};if(e._hasPreCompStats){var H=e[h],L=function(r){return _.d2c((e[r]||[])[n])},O=1/0,K=-1/0;for(n=0;n=M.q1&&M.q3>=M.med){var j=L("lowerfence");M.lf=j!==c&&j<=M.q1?j:p(M,k,F);var W=L("upperfence");M.uf=W!==c&&W>=M.q3?W:I(M,k,F);var Z=L("mean");M.mean=Z!==c?Z:F?o.mean(k,F):(M.q1+M.q3)/2;var q=L("sd");M.sd=Z!==c&&q>=0?q:F?o.stdev(k,F,M.mean):M.q3-M.q1,M.lo=y(M),M.uo=f(M);var Y=L("notchspan");Y=Y!==c&&Y>0?Y:g(M,F),M.ln=M.med-Y,M.un=M.med+Y;var X=M.lf,Q=M.uf;e.boxpoints&&k.length&&(X=Math.min(X,k[0]),Q=Math.max(Q,k[F-1])),e.notched&&(X=Math.min(X,M.ln),Q=Math.max(Q,M.un)),M.min=X,M.max=Q}else{var $;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+M.q1,"median = "+M.med,"q3 = "+M.q3].join("\n")),$=M.med!==c?M.med:M.q1!==c?M.q3!==c?(M.q1+M.q3)/2:M.q1:M.q3!==c?M.q3:0,M.med=$,M.q1=M.q3=$,M.lf=M.uf=$,M.mean=M.sd=$,M.ln=M.un=$,M.min=M.max=$}O=Math.min(O,M.min),K=Math.max(K,M.max),M.pts2=B.filter(U),A.push(M)}}e._extremes[_._id]=a.findExtremes(_,[O,K],{padded:!0})}else{var rr=_.makeCalcdata(e,h),er=function(r,e){for(var n=r.length,i=new Array(n+1),a=0;a=0&&ar0){var sr,lr;(M={}).pos=M[x]=D[n],B=M.pts=ir[n].sort(l),F=(k=M[h]=B.map(m)).length,M.min=k[0],M.max=k[F-1],M.mean=o.mean(k,F),M.sd=o.stdev(k,F,M.mean)*e.sdmultiple,M.med=o.interp(k,.5),F%2&&(ur||dr)?(ur?(sr=k.slice(0,F/2),lr=k.slice(F/2+1)):dr&&(sr=k.slice(0,F/2+1),lr=k.slice(F/2)),M.q1=o.interp(sr,.5),M.q3=o.interp(lr,.5)):(M.q1=o.interp(k,.25),M.q3=o.interp(k,.75)),M.lf=p(M,k,F),M.uf=I(M,k,F),M.lo=y(M),M.uo=f(M);var mr=g(M,F);M.ln=M.med-mr,M.un=M.med+mr,tr=Math.min(tr,M.ln),or=Math.max(or,M.un),M.pts2=B.filter(U),A.push(M)}e.notched&&o.isTypedArray(rr)&&(rr=Array.from(rr)),e._extremes[_._id]=a.findExtremes(_,e.notched?rr.concat([tr,or]):rr,{padded:!0})}return function(r,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var n=0;n0?(A[0].t={num:G[b],dPos:J,posLetter:x,valLetter:h,labels:{med:u(r,"median:"),min:u(r,"min:"),q1:u(r,"q1:"),q3:u(r,"q3:"),max:u(r,"max:"),mean:"sd"===e.boxmean||"sd"===e.sizemode?u(r,"mean \xb1 \u03c3:").replace("\u03c3",1===e.sdmultiple?"\u03c3":e.sdmultiple+"\u03c3"):u(r,"mean:"),lf:u(r,"lower fence:"),uf:u(r,"upper fence:")}},G[b]++,A):[{t:{empty:!0}}]};var d={text:"tx",hovertext:"htx"};function s(r,e,n){for(var i in d)o.isArrayOrTypedArray(e[i])&&(Array.isArray(n)?o.isArrayOrTypedArray(e[i][n[0]])&&(r[d[i]]=e[i][n[0]][n[1]]):r[d[i]]=e[i][n])}function l(r,e){return r.v-e.v}function m(r){return r.v}function p(r,e,n){return 0===n?r.q1:Math.min(r.q1,e[Math.min(o.findBin(2.5*r.q1-1.5*r.q3,e,!0)+1,n-1)])}function I(r,e,n){return 0===n?r.q3:Math.max(r.q3,e[Math.max(o.findBin(2.5*r.q3-1.5*r.q1,e),0)])}function y(r){return 4*r.q1-3*r.q3}function f(r){return 4*r.q3-3*r.q1}function g(r,e){return 0===e?0:1.57*(r.q3-r.q1)/Math.sqrt(e)}},96404:function(r,e,n){"use strict";var i=n(54460),a=n(3400),t=n(71888).getAxisGroup,o=["v","h"];function c(r,e,n,o){var c,u,d,s=e.calcdata,l=e._fullLayout,m=o._id,p=m.charAt(0),I=[],y=0;for(c=0;c1,v=1-l[r+"gap"],x=1-l[r+"groupgap"];for(c=0;c0){var K=M.pointpos,V=M.jitter,j=M.marker.size/2,W=0;K+V>=0&&((W=L*(K+V))>A?(O=!0,U=j,D=W):W>N&&(U=j,D=A)),W<=A&&(D=A);var Z=0;K-V<=0&&((Z=-L*(K-V))>b?(O=!0,H=j,J=Z):Z>T&&(H=j,J=b)),Z<=b&&(J=b)}else D=A,J=b;var q=new Array(d.length);for(u=0;u0?(f="v",g=h>0?Math.min(x,v):Math.min(v)):h>0?(f="h",g=Math.min(x)):g=0;if(g){e._length=g;var b=n("orientation",f);e._hasPreCompStats?"v"===b&&0===h?(n("x0",0),n("dx",1)):"h"===b&&0===_&&(n("y0",0),n("dy",1)):"v"===b&&0===h?n("x0"):"h"===b&&0===_&&n("y0"),a.getComponentMethod("calendars","handleTraceDefaults")(r,e,["x","y"],t)}else e.visible=!1}function l(r,e,n,a){var t=a.prefix,o=i.coerce2(r,e,d,"marker.outliercolor"),c=n("marker.line.outliercolor"),u="outliers";e._hasPreCompStats?u="all":(o||c)&&(u="suspectedoutliers");var s=n(t+"points",u);s?(n("jitter","all"===s?.3:0),n("pointpos","all"===s?-1.5:0),n("marker.symbol"),n("marker.opacity"),n("marker.size"),n("marker.angle"),n("marker.color",e.line.color),n("marker.line.color"),n("marker.line.width"),"suspectedoutliers"===s&&(n("marker.line.outliercolor",e.marker.color),n("marker.line.outlierwidth")),n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size"),n("text"),n("hovertext")):delete e.marker;var l=n("hoveron");"all"!==l&&-1===l.indexOf("points")||n("hovertemplate"),i.coerceSelectionMarkerOpacity(e,n)}r.exports={supplyDefaults:function(r,e,n,a){function c(n,a){return i.coerce(r,e,d,n,a)}if(s(r,e,c,a),!1!==e.visible){o(r,e,a,c),c("xhoverformat"),c("yhoverformat");var u=e._hasPreCompStats;u&&(c("lowerfence"),c("upperfence")),c("line.color",(r.marker||{}).color||n),c("line.width"),c("fillcolor",t.addOpacity(e.line.color,.5));var m=!1;if(u){var p=c("mean"),I=c("sd");p&&p.length&&(m=!0,I&&I.length&&(m="sd"))}c("whiskerwidth");var y,f=c("sizemode");"quartiles"===f&&(y=c("boxmean",m)),c("showwhiskers","quartiles"===f),"sd"!==f&&"sd"!==y||c("sdmultiple"),c("width"),c("quartilemethod");var g=!1;if(u){var _=c("notchspan");_&&_.length&&(g=!0)}else i.validate(r.notchwidth,d.notchwidth)&&(g=!0);c("notched",g)&&c("notchwidth"),l(r,e,c,{prefix:"box"}),c("zorder")}},crossTraceDefaults:function(r,e){var n,a;function t(r){return i.coerce(a._input,a,d,r)}for(var o=0;or.lo&&(x.so=!0)}return t}));I.enter().append("path").classed("point",!0),I.exit().remove(),I.call(t.translatePoints,u,d)}function s(r,e,n,t){var o,c,u=e.val,d=e.pos,s=!!d.rangebreaks,l=t.bPos,m=t.bPosPxOffset||0,p=n.boxmean||(n.meanline||{}).visible;Array.isArray(t.bdPos)?(o=t.bdPos[0],c=t.bdPos[1]):(o=t.bdPos,c=t.bdPos);var I=r.selectAll("path.mean").data("box"===n.type&&n.boxmean||"violin"===n.type&&n.box.visible&&n.meanline.visible?a.identity:[]);I.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),I.exit().remove(),I.each((function(r){var e=d.c2l(r.pos+l,!0),a=d.l2p(e-o)+m,t=d.l2p(e+c)+m,I=s?(a+t)/2:d.l2p(e)+m,y=u.c2p(r.mean,!0),f=u.c2p(r.mean-r.sd,!0),g=u.c2p(r.mean+r.sd,!0);"h"===n.orientation?i.select(this).attr("d","M"+y+","+a+"V"+t+("sd"===p?"m0,0L"+f+","+I+"L"+y+","+a+"L"+g+","+I+"Z":"")):i.select(this).attr("d","M"+a+","+y+"H"+t+("sd"===p?"m0,0L"+I+","+f+"L"+a+","+y+"L"+I+","+g+"Z":""))}))}r.exports={plot:function(r,e,n,t){var o=r._context.staticPlot,c=e.xaxis,l=e.yaxis;a.makeTraceGroups(t,n,"trace boxes").each((function(r){var e,n,a=i.select(this),t=r[0],m=t.t,p=t.trace;m.wdPos=m.bdPos*p.whiskerwidth,!0!==p.visible||m.empty?a.remove():("h"===p.orientation?(e=l,n=c):(e=c,n=l),u(a,{pos:e,val:n},p,m,o),d(a,{x:c,y:l},p,m),s(a,{pos:e,val:n},p,m))}))},plotBoxAndWhiskers:u,plotPoints:d,plotBoxMean:s}},8264:function(r){"use strict";r.exports=function(r,e){var n,i,a=r.cd,t=r.xaxis,o=r.yaxis,c=[];if(!1===e)for(n=0;n=10)return null;for(var n=1/0,t=-1/0,o=r.length,c=0;c0?Math.floor:Math.ceil,z=B>0?Math.ceil:Math.floor,w=B>0?Math.min:Math.max,R=B>0?Math.max:Math.min,E=F(b+k),N=z(M-k),T=[[l=A(b)]];for(t=E;t*B=0;a--)t[s-a]=r[l][a],o[s-a]=e[l][a];for(c.push({x:t,y:o,bicubic:u}),a=l,t=[],o=[];a>=0;a--)t[l-a]=r[a][0],o[l-a]=e[a][0];return c.push({x:t,y:o,bicubic:d}),c}},19216:function(r,e,n){"use strict";var i=n(54460),a=n(92880).extendFlat;r.exports=function(r,e,n){var t,o,c,u,d,s,l,m,p,I,y,f,g,_,h=r["_"+e],v=r[e+"axis"],x=v._gridlines=[],P=v._minorgridlines=[],G=v._boundarylines=[],C=r["_"+n],S=r[n+"axis"];"array"===v.tickmode&&(v.tickvals=h.slice());var A=r._xctrl,b=r._yctrl,M=A[0].length,B=A.length,k=r._a.length,F=r._b.length;i.prepTicks(v),"array"===v.tickmode&&delete v.tickvals;var z=v.smoothing?3:1;function w(i){var a,t,o,c,u,d,s,l,p,I,y,f,g=[],_=[],h={};if("b"===e)for(t=r.b2j(i),o=Math.floor(Math.max(0,Math.min(F-2,t))),c=t-o,h.length=F,h.crossLength=k,h.xy=function(e){return r.evalxy([],e,t)},h.dxy=function(e,n){return r.dxydi([],e,o,n,c)},a=0;a0&&(p=r.dxydi([],a-1,o,0,c),g.push(u[0]+p[0]/3),_.push(u[1]+p[1]/3),I=r.dxydi([],a-1,o,1,c),g.push(l[0]-I[0]/3),_.push(l[1]-I[1]/3)),g.push(l[0]),_.push(l[1]),u=l;else for(a=r.a2i(i),d=Math.floor(Math.max(0,Math.min(k-2,a))),s=a-d,h.length=k,h.crossLength=F,h.xy=function(e){return r.evalxy([],a,e)},h.dxy=function(e,n){return r.dxydj([],d,e,s,n)},t=0;t0&&(y=r.dxydj([],d,t-1,s,0),g.push(u[0]+y[0]/3),_.push(u[1]+y[1]/3),f=r.dxydj([],d,t-1,s,1),g.push(l[0]-f[0]/3),_.push(l[1]-f[1]/3)),g.push(l[0]),_.push(l[1]),u=l;return h.axisLetter=e,h.axis=v,h.crossAxis=S,h.value=i,h.constvar=n,h.index=m,h.x=g,h.y=_,h.smoothing=S.smoothing,h}function R(i){var a,t,o,c,u,d=[],s=[],l={};if(l.length=h.length,l.crossLength=C.length,"b"===e)for(o=Math.max(0,Math.min(F-2,i)),u=Math.min(1,Math.max(0,i-o)),l.xy=function(e){return r.evalxy([],e,i)},l.dxy=function(e,n){return r.dxydi([],e,o,n,u)},a=0;ah.length-1||x.push(a(R(o),{color:v.gridcolor,width:v.gridwidth,dash:v.griddash}));for(m=s;mh.length-1)&&!(y<0||y>h.length-1))for(f=h[c],g=h[y],t=0;th[h.length-1]||P.push(a(w(I),{color:v.minorgridcolor,width:v.minorgridwidth,dash:v.minorgriddash}));v.startline&&G.push(a(R(0),{color:v.startlinecolor,width:v.startlinewidth})),v.endline&&G.push(a(R(h.length-1),{color:v.endlinecolor,width:v.endlinewidth}))}else{for(u=5e-15,s=(d=[Math.floor((h[h.length-1]-v.tick0)/v.dtick*(1+u)),Math.ceil((h[0]-v.tick0)/v.dtick/(1+u))].sort((function(r,e){return r-e})))[0],l=d[1],m=s;m<=l;m++)p=v.tick0+v.dtick*m,x.push(a(w(p),{color:v.gridcolor,width:v.gridwidth,dash:v.griddash}));for(m=s-1;mh[h.length-1]||P.push(a(w(I),{color:v.minorgridcolor,width:v.minorgridwidth,dash:v.minorgriddash}));v.startline&&G.push(a(w(h[0]),{color:v.startlinecolor,width:v.startlinewidth})),v.endline&&G.push(a(w(h[h.length-1]),{color:v.endlinecolor,width:v.endlinewidth}))}}},14724:function(r,e,n){"use strict";var i=n(54460),a=n(92880).extendFlat;r.exports=function(r,e){var n,t,o,c=e._labels=[],u=e._gridlines;for(n=0;ne.length&&(r=r.slice(0,e.length)):r=[],a=0;a90&&(p-=180,u=-u),{angle:p,flip:u,p:r.c2p(i,e,n),offsetMultplier:d}}},164:function(r,e,n){"use strict";var i=n(33428),a=n(43616),t=n(87072),o=n(53416),c=n(15584),u=n(72736),d=n(3400),s=d.strRotate,l=d.strTranslate,m=n(84284);function p(r,e,n,c,u,d,s){var l="const-"+u+"-lines",m=n.selectAll("."+l).data(d);m.enter().append("path").classed(l,!0).style("vector-effect",s?"none":"non-scaling-stroke"),m.each((function(n){var c=n,u=c.x,d=c.y,s=t([],u,r.c2p),l=t([],d,e.c2p),m="M"+o(s,l,c.smoothing);i.select(this).attr("d",m).style("stroke-width",c.width).style("stroke",c.color).style("stroke-dasharray",a.dashStyle(c.dash,c.width)).style("fill","none")})),m.exit().remove()}function I(r,e,n,t,o,d,m,p){var I=d.selectAll("text."+p).data(m);I.enter().append("text").classed(p,!0);var y=0,f={};return I.each((function(o,d){var m;if("auto"===o.axis.tickangle)m=c(t,e,n,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;m=c(t,e,n,o.xy,[Math.cos(p),Math.sin(p)])}d||(f={angle:m.angle,flip:m.flip});var I=(o.endAnchor?-1:1)*m.flip,g=i.select(this).attr({"text-anchor":I>0?"start":"end","data-notex":1}).call(a.font,o.font).text(o.text).call(u.convertToTspans,r),_=a.bBox(this);g.attr("transform",l(m.p[0],m.p[1])+s(m.angle)+l(o.axis.labelpadding*I,.3*_.height)),y=Math.max(y,_.width+o.axis.labelpadding)})),I.exit().remove(),f.maxExtent=y,f}r.exports=function(r,e,n,a){var u=r._context.staticPlot,s=e.xaxis,l=e.yaxis,m=r._fullLayout._clips;d.makeTraceGroups(a,n,"trace").each((function(e){var n=i.select(this),a=e[0],y=a.trace,f=y.aaxis,_=y.baxis,h=d.ensureSingle(n,"g","minorlayer"),v=d.ensureSingle(n,"g","majorlayer"),x=d.ensureSingle(n,"g","boundarylayer"),P=d.ensureSingle(n,"g","labellayer");n.style("opacity",y.opacity),p(s,l,v,0,"a",f._gridlines,!0),p(s,l,v,0,"b",_._gridlines,!0),p(s,l,h,0,"a",f._minorgridlines,!0),p(s,l,h,0,"b",_._minorgridlines,!0),p(s,l,x,0,"a-boundary",f._boundarylines,u),p(s,l,x,0,"b-boundary",_._boundarylines,u);var G=I(r,s,l,y,0,P,f._labels,"a-label"),C=I(r,s,l,y,0,P,_._labels,"b-label");!function(r,e,n,i,a,t,o,u){var s,l,m,p,I=d.aggNums(Math.min,null,n.a),y=d.aggNums(Math.max,null,n.a),f=d.aggNums(Math.min,null,n.b),_=d.aggNums(Math.max,null,n.b);s=.5*(I+y),l=f,m=n.ab2xy(s,l,!0),p=n.dxyda_rough(s,l),void 0===o.angle&&d.extendFlat(o,c(n,a,t,m,n.dxydb_rough(s,l))),g(r,e,n,0,m,p,n.aaxis,a,t,o,"a-title"),s=I,l=.5*(f+_),m=n.ab2xy(s,l,!0),p=n.dxydb_rough(s,l),void 0===u.angle&&d.extendFlat(u,c(n,a,t,m,n.dxyda_rough(s,l))),g(r,e,n,0,m,p,n.baxis,a,t,u,"b-title")}(r,P,y,0,s,l,G,C),function(r,e,n,i,a){var c,u,s,l,m=n.select("#"+r._clipPathId);m.size()||(m=n.append("clipPath").classed("carpetclip",!0));var p=d.ensureSingle(m,"path","carpetboundary"),I=e.clipsegments,y=[];for(l=0;l90&&_<270,v=i.select(this);v.text(m.title.text).call(u.convertToTspans,r),h&&(x=(-u.lineCount(v)+f)*y*t-x),v.attr("transform",l(e.p[0],e.p[1])+s(e.angle)+l(0,x)).attr("text-anchor","middle").call(a.font,m.title.font)})),v.exit().remove()}},81e3:function(r,e,n){"use strict";var i=n(24588),a=n(14952).findBin,t=n(30180),o=n(29056),c=n(26435),u=n(24464);r.exports=function(r){var e=r._a,n=r._b,d=e.length,s=n.length,l=r.aaxis,m=r.baxis,p=e[0],I=e[d-1],y=n[0],f=n[s-1],g=e[e.length-1]-e[0],_=n[n.length-1]-n[0],h=g*i.RELATIVE_CULL_TOLERANCE,v=_*i.RELATIVE_CULL_TOLERANCE;p-=h,I+=h,y-=v,f+=v,r.isVisible=function(r,e){return r>p&&ry&&eI||ef},r.setScale=function(){var e=r._x,n=r._y,i=t(r._xctrl,r._yctrl,e,n,l.smoothing,m.smoothing);r._xctrl=i[0],r._yctrl=i[1],r.evalxy=o([r._xctrl,r._yctrl],d,s,l.smoothing,m.smoothing),r.dxydi=c([r._xctrl,r._yctrl],l.smoothing,m.smoothing),r.dxydj=u([r._xctrl,r._yctrl],l.smoothing,m.smoothing)},r.i2a=function(r){var n=Math.max(0,Math.floor(r[0]),d-2),i=r[0]-n;return(1-i)*e[n]+i*e[n+1]},r.j2b=function(r){var e=Math.max(0,Math.floor(r[1]),d-2),i=r[1]-e;return(1-i)*n[e]+i*n[e+1]},r.ij2ab=function(e){return[r.i2a(e[0]),r.j2b(e[1])]},r.a2i=function(r){var n=Math.max(0,Math.min(a(r,e),d-2)),i=e[n],t=e[n+1];return Math.max(0,Math.min(d-1,n+(r-i)/(t-i)))},r.b2j=function(r){var e=Math.max(0,Math.min(a(r,n),s-2)),i=n[e],t=n[e+1];return Math.max(0,Math.min(s-1,e+(r-i)/(t-i)))},r.ab2ij=function(e){return[r.a2i(e[0]),r.b2j(e[1])]},r.i2c=function(e,n){return r.evalxy([],e,n)},r.ab2xy=function(i,a,t){if(!t&&(ie[d-1]|an[s-1]))return[!1,!1];var o=r.a2i(i),c=r.b2j(a),u=r.evalxy([],o,c);if(t){var l,m,p,I,y=0,f=0,g=[];ie[d-1]?(l=d-2,m=1,y=(i-e[d-1])/(e[d-1]-e[d-2])):m=o-(l=Math.max(0,Math.min(d-2,Math.floor(o)))),an[s-1]?(p=s-2,I=1,f=(a-n[s-1])/(n[s-1]-n[s-2])):I=c-(p=Math.max(0,Math.min(s-2,Math.floor(c)))),y&&(r.dxydi(g,l,p,m,I),u[0]+=g[0]*y,u[1]+=g[1]*y),f&&(r.dxydj(g,l,p,m,I),u[0]+=g[0]*f,u[1]+=g[1]*f)}return u},r.c2p=function(r,e,n){return[e.c2p(r[0]),n.c2p(r[1])]},r.p2x=function(r,e,n){return[e.p2c(r[0]),n.p2c(r[1])]},r.dadi=function(r){var n=Math.max(0,Math.min(e.length-2,r));return e[n+1]-e[n]},r.dbdj=function(r){var e=Math.max(0,Math.min(n.length-2,r));return n[e+1]-n[e]},r.dxyda=function(e,n,i,a){var t=r.dxydi(null,e,n,i,a),o=r.dadi(e,i);return[t[0]/o,t[1]/o]},r.dxydb=function(e,n,i,a){var t=r.dxydj(null,e,n,i,a),o=r.dbdj(n,a);return[t[0]/o,t[1]/o]},r.dxyda_rough=function(e,n,i){var a=g*(i||.1),t=r.ab2xy(e+a,n,!0),o=r.ab2xy(e-a,n,!0);return[.5*(t[0]-o[0])/a,.5*(t[1]-o[1])/a]},r.dxydb_rough=function(e,n,i){var a=_*(i||.1),t=r.ab2xy(e,n+a,!0),o=r.ab2xy(e,n-a,!0);return[.5*(t[0]-o[0])/a,.5*(t[1]-o[1])/a]},r.dpdx=function(r){return r._m},r.dpdy=function(r){return r._m}}},51512:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e,n){var a,t,o,c=[],u=[],d=r[0].length,s=r.length;function l(e,n){var i,a=0,t=0;return e>0&&void 0!==(i=r[n][e-1])&&(t++,a+=i),e0&&void 0!==(i=r[n-1][e])&&(t++,a+=i),n0&&t0&&a1e-5);return i.log("Smoother converged to",C,"after",S,"iterations"),r}},86411:function(r,e,n){"use strict";var i=n(3400).isArray1D;r.exports=function(r,e,n){var a=n("x"),t=a&&a.length,o=n("y"),c=o&&o.length;if(!t&&!c)return!1;if(e._cheater=!a,t&&!i(a)||c&&!i(o))e._length=null;else{var u=t?a.length:1/0;c&&(u=Math.min(u,o.length)),e.a&&e.a.length&&(u=Math.min(u,e.a.length)),e.b&&e.b.length&&(u=Math.min(u,e.b.length)),e._length=u}return!0}},83372:function(r,e,n){"use strict";var i=n(21776).Ks,a=n(6096),t=n(49084),o=n(45464),c=n(22548).defaultLine,u=n(92880).extendFlat,d=a.marker.line;r.exports=u({locations:{valType:"data_array",editType:"calc"},locationmode:a.locationmode,z:{valType:"data_array",editType:"calc"},geojson:u({},a.geojson,{}),featureidkey:a.featureidkey,text:u({},a.text,{}),hovertext:u({},a.hovertext,{}),marker:{line:{color:u({},d.color,{dflt:c}),width:u({},d.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:u({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:i(),showlegend:u({},o.showlegend,{dflt:!1})},t("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(r,e,n){"use strict";var i=n(38248),a=n(39032).BADNUM,t=n(47128),o=n(20148),c=n(4500);function u(r){return r&&"string"===typeof r}r.exports=function(r,e){var n,d=e._length,s=new Array(d);n=e.geojson?function(r){return u(r)||i(r)}:u;for(var l=0;l")}}(r,l,o),[r]}},54272:function(r,e,n){"use strict";r.exports={attributes:n(83372),supplyDefaults:n(30972),colorbar:n(96288),calc:n(7924),calcGeoJSON:n(88364).calcGeoJSON,plot:n(88364).plot,style:n(7947).style,styleOnSelect:n(7947).styleOnSelect,hoverPoints:n(69224),eventData:n(52428),selectPoints:n(17328),moduleType:"trace",name:"choropleth",basePlotModule:n(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(27144),o=n(59972).getTopojsonFeatures,c=n(19280).findExtremes,u=n(7947).style;r.exports={calcGeoJSON:function(r,e){for(var n=r[0].trace,i=e[n.geo],a=i._subplot,u=n.locationmode,d=n._length,s="geojson-id"===u?t.extractTraceFeature(r):o(n,a.topojson),l=[],m=[],p=0;p=0;i--){var a=n[i].id;if("string"===typeof a&&0===a.indexOf("water"))for(var t=i+1;t=0;n--)r.removeLayer(e[n][1])},c.dispose=function(){var r=this.subplot.map;this._removeLayers(),r.removeSource(this.sourceId)},r.exports=function(r,e){var n=e[0].trace,a=new o(r,n.uid),t=a.sourceId,c=i(e),u=a.below=r.belowLookup["trace-"+n.uid];return r.map.addSource(t,{type:"geojson",data:c.geojson}),a._addLayers(c,u),e[0].trace._glTrace=a,a}},86040:function(r,e,n){"use strict";var i=n(49084),a=n(29736).axisHoverFormat,t=n(21776).Ks,o=n(52948),c=n(45464),u=n(92880).extendFlat,d={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","raw"],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:t({editType:"calc"},{keys:["norm"]}),uhoverformat:a("u",1),vhoverformat:a("v",1),whoverformat:a("w",1),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),showlegend:u({},c.showlegend,{dflt:!1})};u(d,i("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(r){d[r]=o[r]})),d.hoverinfo=u({},c.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),d.transforms=void 0,r.exports=d},83344:function(r,e,n){"use strict";var i=n(47128);r.exports=function(r,e){for(var n=e.u,a=e.v,t=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,n.length,a.length,t.length),c=-1/0,u=1/0,d=0;do.level||o.starts.length&&t===o.level)}break;case"constraint":if(i.prefixBoundary=!1,i.edgepaths.length)return;var c=i.x.length,u=i.y.length,d=-1/0,s=1/0;for(n=0;n":p>d&&(i.prefixBoundary=!0);break;case"<":(pd||i.starts.length&&m===s)&&(i.prefixBoundary=!0);break;case"][":l=Math.min(p[0],p[1]),m=Math.max(p[0],p[1]),ld&&(i.prefixBoundary=!0)}}}},55296:function(r,e,n){"use strict";var i=n(8932),a=n(41076),t=n(46960);r.exports={min:"zmin",max:"zmax",calc:function(r,e,n){var o=e.contours,c=e.line,u=o.size||1,d=o.coloring,s=a(e,{isColorbar:!0});if("heatmap"===d){var l=i.extractOpts(e);n._fillgradient=l.reversescale?i.flipScale(l.colorscale):l.colorscale,n._zrange=[l.min,l.max]}else"fill"===d&&(n._fillcolor=s);n._line={color:"lines"===d?s:c.color,width:!1!==o.showlines?c.width:0,dash:c.dash},n._levels={start:o.start,end:t(o),size:u}}}},93252:function(r){"use strict";r.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}}},95536:function(r,e,n){"use strict";var i=n(38248),a=n(17428),t=n(76308),o=t.addOpacity,c=t.opacity,u=n(69104),d=n(3400).isArrayOrTypedArray,s=u.CONSTRAINT_REDUCTION,l=u.COMPARISON_OPS2;r.exports=function(r,e,n,t,u,m){var p,I,y,f=e.contours,g=n("contours.operation");f._operation=s[g],function(r,e){var n;-1===l.indexOf(e.operation)?(r("contours.value",[0,1]),d(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(n=parseFloat(e.value[0]),e.value=[n,n+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:i(e.value)&&(n=parseFloat(e.value),e.value=[n,n+1])):(r("contours.value",0),i(e.value)||(d(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(n,f),"="===g?p=f.showlines=!0:(p=n("contours.showlines"),y=n("fillcolor",o((r.line||{}).color||u,.5))),p&&(I=n("line.color",y&&c(y)?o(e.fillcolor,1):u),n("line.width",2),n("line.dash")),n("line.smoothing"),a(n,t,I,m)}},3212:function(r,e,n){"use strict";var i=n(69104),a=n(38248);function t(r,e){var n,t=Array.isArray(e);function o(r){return a(r)?+r:null}return-1!==i.COMPARISON_OPS2.indexOf(r)?n=o(t?e[0]:e):-1!==i.INTERVAL_OPS.indexOf(r)?n=t?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==i.SET_OPS.indexOf(r)&&(n=t?e.map(o):[o(e)]),n}function o(r){return function(e){e=t(r,e);var n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return{start:n,end:i,size:i-n}}}function c(r){return function(e){return{start:e=t(r,e),end:1/0,size:1/0}}}r.exports={"[]":o("[]"),"][":o("]["),">":c(">"),"<":c("<"),"=":c("=")}},84952:function(r){"use strict";r.exports=function(r,e,n,i){var a=i("contours.start"),t=i("contours.end"),o=!1===a||!1===t,c=n("contours.size");!(o?e.autocontour=!0:n("autocontour",!1))&&c||n("ncontours")}},82172:function(r,e,n){"use strict";var i=n(3400);function a(r){return i.extendFlat({},r,{edgepaths:i.extendDeep([],r.edgepaths),paths:i.extendDeep([],r.paths),starts:i.extendDeep([],r.starts)})}r.exports=function(r,e){var n,t,o,c=function(r){return r.reverse()},u=function(r){return r};switch(e){case"=":case"<":return r;case">":for(1!==r.length&&i.warn("Contour data invalid for the specified inequality operation."),t=r[0],n=0;n1e3){i.warn("Too many contours, clipping at 1000",r);break}return u}},46960:function(r){"use strict";r.exports=function(r){return r.end+r.size/1e6}},88748:function(r,e,n){"use strict";var i=n(3400),a=n(93252);function t(r,e,n,i){return Math.abs(r[0]-e[0])20&&e?208===r||1114===r?i=0===n[0]?1:-1:t=0===n[1]?1:-1:-1!==a.BOTTOMSTART.indexOf(r)?t=1:-1!==a.LEFTSTART.indexOf(r)?i=1:-1!==a.TOPSTART.indexOf(r)?t=-1:i=-1,[i,t]}(m,n,e),I=[u(r,e,[-p[0],-p[1]])],y=r.z.length,f=r.z[0].length,g=e.slice(),_=p.slice();for(s=0;s<1e4;s++){if(m>20?(m=a.CHOOSESADDLE[m][(p[0]||p[1])<0?0:1],r.crossings[l]=a.SADDLEREMAINDER[m]):delete r.crossings[l],!(p=a.NEWDELTA[m])){i.log("Found bad marching index:",m,e,r.level);break}I.push(u(r,e,p)),e[0]+=p[0],e[1]+=p[1],l=e.join(","),t(I[I.length-1],I[I.length-2],c,d)&&I.pop();var h=p[0]&&(e[0]<0||e[0]>f-2)||p[1]&&(e[1]<0||e[1]>y-2);if(e[0]===g[0]&&e[1]===g[1]&&p[0]===_[0]&&p[1]===_[1]||n&&h)break;m=r.crossings[l]}1e4===s&&i.log("Infinite loop in contour?");var v,x,P,G,C,S,A,b,M,B,k,F=t(I[0],I[I.length-1],c,d),z=0,w=.2*r.smoothing,R=[],E=0;for(s=1;s=E;s--)if((v=R[s])=E&&v+R[x]b&&M--,r.edgepaths[M]=k.concat(I,B));break}J||(r.edgepaths[b]=I.concat(B))}for(b=0;b=_)&&(n<=g&&(n=g),o>=_&&(o=_),u=Math.floor((o-n)/c)+1,d=0),m=0;mg&&(y.unshift(g),f.unshift(f[0])),y[y.length-1]<_&&(y.push(_),f.push(f[f.length-1])))}return a.makeColorScaleFunc({domain:y,range:f},{noNumericCheck:!0})}},72424:function(r,e,n){"use strict";var i=n(93252);function a(r,e){var n=(e[0][0]>r?0:1)+(e[0][1]>r?0:2)+(e[1][1]>r?0:4)+(e[1][0]>r?0:8);return 5===n||10===n?r>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===n?713:1114:5===n?104:208:15===n?0:n}r.exports=function(r){var e,n,t,o,c,u,d,s,l,m=r[0].z,p=m.length,I=m[0].length,y=2===p||2===I;for(n=0;n=0&&(i=_,c=u):Math.abs(n[1]-i[1])<.01?Math.abs(n[1]-_[1])<.01&&(_[0]-n[0])*(i[0]-_[0])>=0&&(i=_,c=u):a.log("endpt to newendpt is not vert. or horz.",n,i,_)}if(n=i,c>=0)break;l+="L"+i}if(c===r.edgepaths.length){a.log("unclosed perimeter path");break}m=c,(I=-1===p.indexOf(m))&&(m=p[0],l+="Z")}for(m=0;mi.center?i.right-c:c-i.left)/(s+Math.abs(Math.sin(d)*o)),p=(u>i.middle?i.bottom-u:u-i.top)/(Math.abs(l)+Math.cos(d)*o);if(m<1||p<1)return 1/0;var I=g.EDGECOST*(1/(m-1)+1/(p-1));I+=g.ANGLECOST*d*d;for(var y=c-s,f=u-l,_=c+s,h=u+l,v=0;v2*g.MAXCOST)break;p&&(c/=2),u=(o=d-c/2)+1.5*c}if(m<=g.MAXCOST)return s},e.addLabelData=function(r,e,n,i){var a=e.fontSize,t=e.width+a/3,o=Math.max(0,e.height-a/3),c=r.x,u=r.y,d=r.theta,s=Math.sin(d),l=Math.cos(d),m=function(r,e){return[c+r*l-e*s,u+r*s+e*l]},p=[m(-t/2,-o/2),m(-t/2,o/2),m(t/2,o/2),m(t/2,-o/2)];n.push({text:e.text,x:c,y:u,dy:e.dy,theta:d,level:e.level,width:t,height:o}),i.push(p)},e.drawLabels=function(r,e,n,t,o){var u=r.selectAll("text").data(e,(function(r){return r.text+","+r.x+","+r.y+","+r.theta}));if(u.exit().remove(),u.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(r){var e=r.x+Math.sin(r.theta)*r.dy,a=r.y-Math.cos(r.theta)*r.dy;i.select(this).text(r.text).attr({x:e,y:a,transform:"rotate("+180*r.theta/Math.PI+" "+e+" "+a+")"}).call(c.convertToTspans,n)})),o){for(var d="",s=0;sn.end&&(n.start=n.end=(n.start+n.end)/2),r._input.contours||(r._input.contours={}),a.extendFlat(r._input.contours,{start:n.start,end:n.end,size:n.size}),r._input.autocontour=!0}else if("constraint"!==n.type){var d,s=n.start,l=n.end,m=r._input.contours;s>l&&(n.start=m.start=l,l=n.end=m.end=s,s=n.start),n.size>0||(d=s===l?1:t(s,l,r.ncontours).dtick,m.size=n.size=d)}}},52440:function(r,e,n){"use strict";var i=n(33428),a=n(43616),t=n(41648),o=n(41076);r.exports=function(r){var e=i.select(r).selectAll("g.contour");e.style("opacity",(function(r){return r[0].trace.opacity})),e.each((function(r){var e=i.select(this),n=r[0].trace,t=n.contours,c=n.line,u=t.size||1,d=t.start,s="constraint"===t.type,l=!s&&"lines"===t.coloring,m=!s&&"fill"===t.coloring,p=l||m?o(n):null;e.selectAll("g.contourlevel").each((function(r){i.select(this).selectAll("path").call(a.lineGroupStyle,c.width,l?p(r.level):c.color,c.dash)}));var I=t.labelfont;if(e.selectAll("g.contourlabels text").each((function(r){a.font(i.select(this),{weight:I.weight,style:I.style,variant:I.variant,textcase:I.textcase,lineposition:I.lineposition,shadow:I.shadow,family:I.family,size:I.size,color:I.color||(l?p(r.level):c.color)})})),s)e.selectAll("g.contourfill path").style("fill",n.fillcolor);else if(m){var y;e.selectAll("g.contourfill path").style("fill",(function(r){return void 0===y&&(y=r.level),p(r.level+.5*u)})),void 0===y&&(y=d),e.selectAll("g.contourbg path").style("fill",p(y-.5*u))}})),t(r)}},97680:function(r,e,n){"use strict";var i=n(27260),a=n(17428);r.exports=function(r,e,n,t,o){var c,u=n("contours.coloring"),d="";"fill"===u&&(c=n("contours.showlines")),!1!==c&&("lines"!==u&&(d=n("line.color","#000")),n("line.width",.5),n("line.dash")),"none"!==u&&(!0!==r.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,i(r,e,t,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),a(n,t,d,o)}},37960:function(r,e,n){"use strict";var i=n(83328),a=n(67104),t=n(49084),o=n(92880).extendFlat,c=a.contours;r.exports=o({carpet:{valType:"string",editType:"calc"},z:i.z,a:i.x,a0:i.x0,da:i.dx,b:i.y,b0:i.y0,db:i.dy,text:i.text,hovertext:i.hovertext,transpose:i.transpose,atype:i.xtype,btype:i.ytype,fillcolor:a.fillcolor,autocontour:a.autocontour,ncontours:a.ncontours,contours:{type:c.type,start:c.start,end:c.end,size:c.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:c.showlines,showlabels:c.showlabels,labelfont:c.labelfont,labelformat:c.labelformat,operation:c.operation,value:c.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"},zorder:a.zorder,transforms:void 0},t("",{cLetter:"z",autoColorDflt:!1}))},30572:function(r,e,n){"use strict";var i=n(47128),a=n(3400),t=n(2872),o=n(26136),c=n(70448),u=n(11240),d=n(35744),s=n(3252),l=n(50948),m=n(54444);r.exports=function(r,e){var n=e._carpetTrace=l(r,e);if(n&&n.visible&&"legendonly"!==n.visible){if(!e.a||!e.b){var p=r.data[n.index],I=r.data[e.index];I.a||(I.a=p.a),I.b||(I.b=p.b),s(I,e,e._defaultColor,r._fullLayout)}var y=function(r,e){var n,s,l,m,p,I,y,f=e._carpetTrace,g=f.aaxis,_=f.baxis;g._minDtick=0,_._minDtick=0,a.isArray1D(e.z)&&t(e,g,_,"a","b",["z"]),n=e._a=e._a||e.a,m=e._b=e._b||e.b,n=n?g.makeCalcdata(e,"_a"):[],m=m?_.makeCalcdata(e,"_b"):[],s=e.a0||0,l=e.da||1,p=e.b0||0,I=e.db||1,y=e._z=o(e._z||e.z,e.transpose),e._emptypoints=u(y),c(y,e._emptypoints);var h=a.maxRowLength(y),v="scaled"===e.xtype?"":n,x=d(e,v,s,l,h,g),P="scaled"===e.ytype?"":m,G=d(e,P,p,I,y.length,_),C={a:x,b:G,z:y};return"levels"===e.contours.type&&"none"!==e.contours.coloring&&i(r,e,{vals:y,containerStr:"",cLetter:"z"}),[C]}(r,e);return m(e,e._z),y}}},3252:function(r,e,n){"use strict";var i=n(3400),a=n(51264),t=n(37960),o=n(95536),c=n(84952),u=n(97680);r.exports=function(r,e,n,d){function s(n,a){return i.coerce(r,e,t,n,a)}if(s("carpet"),r.a&&r.b){if(!a(r,e,s,d,"a","b"))return void(e.visible=!1);s("text"),"constraint"===s("contours.type")?o(r,e,s,d,n,{hasHover:!1}):(c(r,e,s,(function(n){return i.coerce2(r,e,t,n)})),u(r,e,s,d,{hasHover:!1}))}else e._defaultColor=n,e._length=null;s("zorder")}},40448:function(r,e,n){"use strict";r.exports={attributes:n(37960),supplyDefaults:n(3252),colorbar:n(55296),calc:n(30572),plot:n(94440),style:n(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:n(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(r,e,n){"use strict";var i=n(33428),a=n(87072),t=n(53416),o=n(43616),c=n(3400),u=n(72424),d=n(88748),s=n(23676),l=n(93252),m=n(82172),p=n(61512),I=n(56008),y=n(50948),f=n(77712);function g(r,e,n){var i=r.getPointAtLength(e),a=r.getPointAtLength(n),t=a.x-i.x,o=a.y-i.y,c=Math.sqrt(t*t+o*o);return[t/c,o/c]}function _(r){var e=Math.sqrt(r[0]*r[0]+r[1]*r[1]);return[r[0]/e,r[1]/e]}function h(r,e){var n=Math.abs(r[0]*e[0]+r[1]*e[1]);return Math.sqrt(1-n*n)/n}r.exports=function(r,e,n,v){var x=e.xaxis,P=e.yaxis;c.makeTraceGroups(v,n,"contour").each((function(n){var v=i.select(this),G=n[0],C=G.trace,S=C._carpetTrace=y(r,C),A=r.calcdata[S.index][0];if(S.visible&&"legendonly"!==S.visible){var b=G.a,M=G.b,B=C.contours,k=p(B,e,G),F="constraint"===B.type,z=B._operation,w=F?"="===z?"lines":"fill":B.coloring,R=[[b[0],M[M.length-1]],[b[b.length-1],M[M.length-1]],[b[b.length-1],M[0]],[b[0],M[0]]];u(k);var E=1e-8*(b[b.length-1]-b[0]),N=1e-8*(M[M.length-1]-M[0]);d(k,E,N);var T,D,J,U,H=k;"constraint"===B.type&&(H=m(k,z)),function(r,e){var n,i,a,t,o,c,u,d,s;for(n=0;n=0;U--)T=A.clipsegments[U],D=a([],T.x,x.c2p),J=a([],T.y,P.c2p),D.reverse(),J.reverse(),L.push(t(D,J,T.bicubic));var O="M"+L.join("L")+"Z";!function(r,e,n,i,o,u){var d,s,l,m,p=c.ensureSingle(r,"g","contourbg").selectAll("path").data("fill"!==u||o?[]:[0]);p.enter().append("path"),p.exit().remove();var I=[];for(m=0;m=0&&(m=B,I=y):Math.abs(l[1]-m[1])=0&&(m=B,I=y):c.log("endpt to newendpt is not vert. or horz.",l,m,B)}if(I>=0)break;_+=b(l,m),l=m}if(I===e.edgepaths.length){c.log("unclosed perimeter path");break}s=I,(v=-1===h.indexOf(s))&&(s=h[0],_+=b(l,m)+"Z",l=null)}for(s=0;sy&&(i.max=y),i.len=i.max-i.min}function f(r,e){var n,i=0,o=.1;return(Math.abs(r[0]-u)0?+p[s]:0),l.push({type:"Feature",geometry:{type:"Point",coordinates:g},properties:_})}}var v=o.extractOpts(e),x=v.reversescale?o.flipScale(v.colorscale):v.colorscale,P=x[0][1],G=["interpolate",["linear"],["heatmap-density"],0,t.opacity(P)<1?P:t.addOpacity(P,0)];for(s=1;s=0;n--)r.removeLayer(e[n][1])},o.dispose=function(){var r=this.subplot.map;this._removeLayers(),r.removeSource(this.sourceId)},r.exports=function(r,e){var n=e[0].trace,a=new t(r,n.uid),o=a.sourceId,c=i(e),u=a.below=r.belowLookup["trace-"+n.uid];return r.map.addSource(o,{type:"geojson",data:c.geojson}),a._addLayers(c,u),a}},74248:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e){for(var n=0;n"),u.color=function(r,e){var n=r.marker,a=e.mc||n.color,t=e.mlc||n.line.color,o=e.mlw||n.line.width;return i(a)?a:i(t)&&o?t:void 0}(s,m),[u]}}},94704:function(r,e,n){"use strict";r.exports={attributes:n(20088),layoutAttributes:n(7076),supplyDefaults:n(45432).supplyDefaults,crossTraceDefaults:n(45432).crossTraceDefaults,supplyLayoutDefaults:n(11631),calc:n(23096),crossTraceCalc:n(4804),plot:n(42200),style:n(44544).style,hoverPoints:n(31488),eventData:n(34580),selectPoints:n(45784),moduleType:"trace",name:"funnel",basePlotModule:n(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(r){"use strict";r.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"}}},11631:function(r,e,n){"use strict";var i=n(3400),a=n(7076);r.exports=function(r,e,n){var t=!1;function o(n,t){return i.coerce(r,e,a,n,t)}for(var c=0;c path").each((function(r){if(!r.isBlank){var e=c.marker;i.select(this).call(t.fill,r.mc||e.color).call(t.stroke,r.mlc||e.line.color).call(a.dashLine,e.line.dash,r.mlw||e.line.width).style("opacity",c.selectedpoints&&!r.selected?o:1)}})),d(n,c,r),n.selectAll(".regions").each((function(){i.select(this).selectAll("path").style("stroke-width",0).call(t.fill,c.connector.fillcolor)})),n.selectAll(".lines").each((function(){var r=c.connector.line;a.lineGroupStyle(i.select(this).selectAll("path"),r.width,r.color,r.dash)}))}))}}},22332:function(r,e,n){"use strict";var i=n(74996),a=n(45464),t=n(86968).u,o=n(21776).Ks,c=n(21776).Gw,u=n(92880).extendFlat;r.exports={labels:i.labels,label0:i.label0,dlabel:i.dlabel,values:i.values,marker:{colors:i.marker.colors,line:{color:u({},i.marker.line.color,{dflt:null}),width:u({},i.marker.line.width,{dflt:1}),editType:"calc"},pattern:i.marker.pattern,editType:"calc"},text:i.text,hovertext:i.hovertext,scalegroup:u({},i.scalegroup,{}),textinfo:u({},i.textinfo,{flags:["label","text","value","percent"]}),texttemplate:c({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:u({},a.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:u({},i.textposition,{values:["inside","none"],dflt:"inside"}),textfont:i.textfont,insidetextfont:i.insidetextfont,title:{text:i.title.text,font:i.title.font,position:u({},i.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:t({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"}}},91248:function(r,e,n){"use strict";var i=n(7316);e.name="funnelarea",e.plot=function(r,n,a,t){i.plotBasePlot(e.name,r,n,a,t)},e.clean=function(r,n,a,t){i.cleanBasePlot(e.name,r,n,a,t)}},54e3:function(r,e,n){"use strict";var i=n(45768);r.exports={calc:function(r,e){return i.calc(r,e)},crossTraceCalc:function(r){i.crossTraceCalc(r,{type:"funnelarea"})}}},92688:function(r,e,n){"use strict";var i=n(3400),a=n(22332),t=n(86968).Q,o=n(31508).handleText,c=n(74174).handleLabelsAndValues,u=n(74174).handleMarkerDefaults;r.exports=function(r,e,n,d){function s(n,t){return i.coerce(r,e,a,n,t)}var l=s("labels"),m=s("values"),p=c(l,m),I=p.len;if(e._hasLabels=p.hasLabels,e._hasValues=p.hasValues,!e._hasLabels&&e._hasValues&&(s("label0"),s("dlabel")),I){e._length=I,u(r,e,d,s),s("scalegroup");var y,f=s("text"),g=s("texttemplate");if(g||(y=s("textinfo",Array.isArray(f)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),g||y&&"none"!==y){var _=s("textposition");o(r,e,d,s,_,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===y&&s("textposition","none");t(e,d,s),s("title.text")&&(s("title.position"),i.coerceFont(s,"title.font",d.font)),s("aspectratio"),s("baseratio")}else e.visible=!1}},62396:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"funnelarea",basePlotModule:n(91248),categories:["pie-like","funnelarea","showLegend"],attributes:n(22332),layoutAttributes:n(61280),supplyDefaults:n(92688),supplyLayoutDefaults:n(35384),calc:n(54e3).calc,crossTraceCalc:n(54e3).crossTraceCalc,plot:n(39472),style:n(62096),styleOne:n(10528),meta:{}}},61280:function(r,e,n){"use strict";var i=n(85204).hiddenlabels;r.exports={hiddenlabels:i,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(r,e,n){"use strict";var i=n(3400),a=n(61280);r.exports=function(r,e){function n(n,t){return i.coerce(r,e,a,n,t)}n("hiddenlabels"),n("funnelareacolorway",e.colorway),n("extendfunnelareacolors")}},39472:function(r,e,n){"use strict";var i=n(33428),a=n(43616),t=n(3400),o=t.strScale,c=t.strTranslate,u=n(72736),d=n(98184).toMoveInsideBar,s=n(82744),l=s.recordMinTextSize,m=s.clearMinTextSize,p=n(69656),I=n(37820),y=I.attachFxHandlers,f=I.determineInsideTextFont,g=I.layoutAreas,_=I.prerenderTitles,h=I.positionTitleOutside,v=I.formatSliceLabel;function x(r,e){return"l"+(e[0]-r[0])+","+(e[1]-r[1])}function P(r,e){return[.5*(r[0]+e[0]),.5*(r[1]+e[1])]}r.exports=function(r,e){var n=r._context.staticPlot,s=r._fullLayout;m("funnelarea",s),_(e,r),g(e,s._size),t.makeTraceGroups(s._funnelarealayer,e,"trace").each((function(e){var m=i.select(this),I=e[0],g=I.trace;!function(r){if(r.length){var e=r[0],n=e.trace,i=n.aspectratio,a=n.baseratio;a>.999&&(a=.999);var t,o,c,u=Math.pow(a,2),d=e.vTotal,s=d,l=d*u/(1-u)/d,m=[];for(m.push(M()),o=r.length-1;o>-1;o--)if(!(c=r[o]).hidden){var p=c.v/s;l+=p,m.push(M())}var I=1/0,y=-1/0;for(o=0;o-1;o--)if(!(c=r[o]).hidden){var S=m[C+=1][0],A=m[C][1];c.TL=[-S,A],c.TR=[S,A],c.BL=x,c.BR=G,c.pxmid=P(c.TR,c.BR),x=c.TL,G=c.TR}}function b(){var r=Math.sqrt(l);return{x:r,y:-r}}function M(){var r=b();return[r.x,r.y]}}(e),m.each((function(){var m=i.select(this).selectAll("g.slice").data(e);m.enter().append("g").classed("slice",!0),m.exit().remove(),m.each((function(o,c){if(o.hidden)i.select(this).selectAll("path,g").remove();else{o.pointNumber=o.i,o.curveNumber=g.index;var m=I.cx,_=I.cy,h=i.select(this),P=h.selectAll("path.surface").data([o]);P.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),h.call(y,r,e);var G="M"+(m+o.TR[0])+","+(_+o.TR[1])+x(o.TR,o.BR)+x(o.BR,o.BL)+x(o.BL,o.TL)+"Z";P.attr("d",G),v(r,o,I);var C=p.castOption(g.textposition,o.pts),S=h.selectAll("g.slicetext").data(o.text&&"none"!==C?[0]:[]);S.enter().append("g").classed("slicetext",!0),S.exit().remove(),S.each((function(){var n=t.ensureSingle(i.select(this),"text","",(function(r){r.attr("data-notex",1)})),p=t.ensureUniformFontSize(r,f(g,o,s.font));n.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(a.font,p).call(u.convertToTspans,r);var I,y,h,v=a.bBox(n.node()),x=Math.min(o.BL[1],o.BR[1])+_,P=Math.max(o.TL[1],o.TR[1])+_;y=Math.max(o.TL[0],o.BL[0])+m,h=Math.min(o.TR[0],o.BR[0])+m,(I=d(y,h,x,P,v,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=p.size,l(g.type,I,s),e[c].transform=I,t.setTransormAndDisplay(n,I)}))}}));var _=i.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each((function(){var e=t.ensureSingle(i.select(this),"text","",(function(r){r.attr("data-notex",1)})),n=g.title.text;g._meta&&(n=t.templateString(n,g._meta)),e.text(n).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(a.font,g.title.font).call(u.convertToTspans,r);var d=h(I,s._size);e.attr("transform",c(d.x,d.y)+o(Math.min(1,d.scale))+c(d.tx,d.ty))}))}))}))}},62096:function(r,e,n){"use strict";var i=n(33428),a=n(10528),t=n(82744).resizeText;r.exports=function(r){var e=r._fullLayout._funnelarealayer.selectAll(".trace");t(r,e,"funnelarea"),e.each((function(e){var n=e[0].trace,t=i.select(this);t.style({opacity:n.opacity}),t.selectAll("path.surface").each((function(e){i.select(this).call(a,e,n,r)}))}))}},83328:function(r,e,n){"use strict";var i=n(52904),a=n(45464),t=n(25376),o=n(29736).axisHoverFormat,c=n(21776).Ks,u=n(21776).Gw,d=n(49084),s=n(92880).extendFlat;r.exports=s({z:{valType:"data_array",editType:"calc"},x:s({},i.x,{impliedEdits:{xtype:"array"}}),x0:s({},i.x0,{impliedEdits:{xtype:"scaled"}}),dx:s({},i.dx,{impliedEdits:{xtype:"scaled"}}),y:s({},i.y,{impliedEdits:{ytype:"array"}}),y0:s({},i.y0,{impliedEdits:{ytype:"scaled"}}),dy:s({},i.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:s({},i.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:s({},i.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:s({},i.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:s({},i.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:s({},i.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:s({},i.yperiodalignment,{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"},xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:c(),texttemplate:u({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:s({},a.showlegend,{dflt:!1}),zorder:i.zorder},{transforms:void 0},d("",{cLetter:"z",autoColorDflt:!1}))},19512:function(r,e,n){"use strict";var i=n(24040),a=n(3400),t=n(54460),o=n(1220),c=n(55480),u=n(47128),d=n(2872),s=n(26136),l=n(70448),m=n(11240),p=n(35744),I=n(39032).BADNUM;function y(r){for(var e=[],n=r.length,i=0;i1){var e=(r[r.length-1]-r[0])/(r.length-1),n=Math.abs(e/100);for(C=0;Cn)return!1}return!0}(A.rangebreaks||b.rangebreaks)&&(G=function(r,e,n){for(var i=[],a=-1,t=0;t=0;o--)(c=((l[[(n=(t=m[o])[0])-1,a=t[1]]]||y)[2]+(l[[n+1,a]]||y)[2]+(l[[n,a-1]]||y)[2]+(l[[n,a+1]]||y)[2])/20)&&(u[t]=[n,a,c],m.splice(o,1),d=!0);if(!d)throw"findEmpties iterated with no new neighbors";for(t in u)l[t]=u[t],s.push(u[t])}return s.sort((function(r,e){return e[2]-r[2]}))}},55512:function(r,e,n){"use strict";var i=n(93024),a=n(3400),t=a.isArrayOrTypedArray,o=n(54460),c=n(8932).extractOpts;r.exports=function(r,e,n,u,d){d||(d={});var s,l,m,p,I=d.isContour,y=r.cd[0],f=y.trace,g=r.xa,_=r.ya,h=y.x,v=y.y,x=y.z,P=y.xCenter,G=y.yCenter,C=y.zmask,S=f.zhoverformat,A=h,b=v;if(!1!==r.index){try{m=Math.round(r.index[1]),p=Math.round(r.index[0])}catch(U){return void a.error("Error hovering on heatmap, pointNumber must be [row,col], found:",r.index)}if(m<0||m>=x[0].length||p<0||p>x.length)return}else{if(i.inbox(e-h[0],e-h[h.length-1],0)>0||i.inbox(n-v[0],n-v[v.length-1],0)>0)return;if(I){var M;for(A=[2*h[0]-h[1]],M=1;My&&(g=Math.max(g,Math.abs(r[t][o]-I)/(f-y))))}return g}r.exports=function(r,e){var n,a=1;for(o(r,e),n=0;n.01;n++)a=o(r,e,t(a));return a>.01&&i.log("interp2d didn't converge quickly",a),r}},39096:function(r,e,n){"use strict";var i=n(3400);r.exports=function(r,e){r("texttemplate");var n=i.extendFlat({},e.font,{color:"auto",size:"auto"});i.coerceFont(r,"textfont",n)}},35744:function(r,e,n){"use strict";var i=n(24040),a=n(3400).isArrayOrTypedArray;r.exports=function(r,e,n,t,o,c){var u,d,s,l=[],m=i.traceIs(r,"contour"),p=i.traceIs(r,"histogram"),I=i.traceIs(r,"gl2d");if(a(e)&&e.length>1&&!p&&"category"!==c.type){var y=e.length;if(!(y<=o))return m?e.slice(0,o):e.slice(0,o+1);if(m||I)l=Array.from(e).slice(0,o);else if(1===o)l="log"===c.type?[.5*e[0],2*e[0]]:[e[0]-.5,e[0]+.5];else if("log"===c.type){for(l=[Math.pow(e[0],1.5)/Math.pow(e[1],.5)],s=1;s0;)C=S.c2p(J[k]),k--;for(C0;)B=A.c2p(U[k]),k--;B=S._length||C<=0||M>=A._length||B<=0)return w.selectAll("image").data([]).exit().remove(),void v(w);"fast"===q?(X=j,Q=V):(X=$,Q=rr);var er=document.createElement("canvas");er.width=X,er.height=Q;var nr,ir,ar=er.getContext("2d",{willReadFrequently:!0}),tr=p(E,{noNumericCheck:!0,returnArray:!0});"fast"===q?(nr=W?function(r){return j-1-r}:u.identity,ir=Z?function(r){return V-1-r}:u.identity):(nr=function(r){return u.constrain(Math.round(S.c2p(J[r])-n),0,$)},ir=function(r){return u.constrain(Math.round(A.c2p(U[r])-M),0,rr)});var or,cr,ur,dr,sr=ir(0),lr=[sr,sr],mr=W?0:1,pr=Z?0:1,Ir=0,yr=0,fr=0,gr=0;function _r(r,e){if(void 0!==r){var n=tr(r);return n[0]=Math.round(n[0]),n[1]=Math.round(n[1]),n[2]=Math.round(n[2]),Ir+=e,yr+=n[0]*e,fr+=n[1]*e,gr+=n[2]*e,n}return[0,0,0,0]}function hr(r,e,n,i){var a=r[n.bin0];if(void 0===a)return _r(void 0,1);var t,o=r[n.bin1],c=e[n.bin0],u=e[n.bin1],d=o-a||0,s=c-a||0;return t=void 0===o?void 0===u?0:void 0===c?2*(u-a):2*(2*u-c-a)/3:void 0===u?void 0===c?0:2*(2*a-o-c)/3:void 0===c?2*(2*u-o-a)/3:u+a-o-c,_r(a+n.frac*d+i.frac*(s+n.frac*t))}if("default"!==q){var vr,xr=0;try{vr=new Uint8Array(X*Q*4)}catch(fe){vr=new Array(X*Q*4)}if("smooth"===q){var Pr,Gr,Cr,Sr=H||J,Ar=L||U,br=new Array(Sr.length),Mr=new Array(Ar.length),Br=new Array($),kr=H?P:x,Fr=L?P:x;for(k=0;kqr||qr>A._length))for(F=Vr;FXr||Xr>S._length)){var Qr=s({x:Yr,y:Zr},E,r._fullLayout);Qr.x=Yr,Qr.y=Zr;var $r=R.z[k][F];void 0===$r?(Qr.z="",Qr.zLabel=""):(Qr.z=$r,Qr.zLabel=c.tickText(Hr,$r,"hover").text);var re=R.text&&R.text[k]&&R.text[k][F];void 0!==re&&!1!==re||(re=""),Qr.text=re;var ee=u.texttemplateString(Jr,Qr,r._fullLayout._d3locale,Qr,E._meta||{});if(ee){var ne=ee.split("
"),ie=ne.length,ae=0;for(z=0;z0&&(t=!0);for(var u=0;ut){var o=t-n[r];return n[r]=t,o}}return 0},max:function(r,e,n,a){var t=a[e];if(i(t)){if(t=Number(t),!i(n[r]))return n[r]=t,t;if(n[r]d?r>o?r>1.1*a?a:r>1.1*t?t:o:r>c?c:r>u?u:d:Math.pow(10,Math.floor(Math.log(r)/Math.LN10))}function p(r,e,n,i,t,c){if(i&&r>o){var u=I(e,t,c),d=I(n,t,c),s=r===a?0:1;return u[s]!==d[s]}return Math.floor(n/r)-Math.floor(e/r)>.1}function I(r,e,n){var i=e.c2d(r,a,n).split("-");return""===i[0]&&(i.unshift(),i[0]="-"+i[0]),i}r.exports=function(r,e,n,i,t){var c,u,d=-1.1*e,m=-.1*e,p=r-m,I=n[0],y=n[1],f=Math.min(l(I+m,I+p,i,t),l(y+m,y+p,i,t)),g=Math.min(l(I+d,I+m,i,t),l(y+d,y+m,i,t));if(f>g&&go){var _=c===a?1:6,h=c===a?"M12":"M1";return function(e,n){var o=i.c2d(e,a,t),c=o.indexOf("-",_);c>0&&(o=o.substr(0,c));var d=i.d2c(o,0,t);if(dn.r2l(D)&&(U=o.tickIncrement(U,v.size,!0,p)),R.start=n.l2r(U),T||a.nestedProperty(e,g+".start").set(R.start)}var H=v.end,L=n.r2l(w.end),O=void 0!==L;if((v.endFound||O)&&L!==n.r2l(H)){var K=O?L:a.aggNums(Math.max,null,I);R.end=n.l2r(K),O||a.nestedProperty(e,g+".start").set(R.end)}var V="autobin"+c;return!1===e._input[V]&&(e._input[g]=a.extendFlat({},e[g]||{}),delete e._input[V],delete e[V]),[R,I]}r.exports={calc:function(r,e){var n,t,p,I,y=[],f=[],g="h"===e.orientation,_=o.getFromId(r,g?e.yaxis:e.xaxis),h=g?"y":"x",v={x:"y",y:"x"}[h],x=e[h+"calendar"],P=e.cumulative,G=m(r,e,_,h),C=G[0],S=G[1],A="string"===typeof C.size,b=[],M=A?b:C,B=[],k=[],F=[],z=0,w=e.histnorm,R=e.histfunc,E=-1!==w.indexOf("density");P.enabled&&E&&(w=w.replace(/ ?density$/,""),E=!1);var N,T="max"===R||"min"===R?null:0,D=u.count,J=d[w],U=!1,H=function(r){return _.r2c(r,0,x)};for(a.isArrayOrTypedArray(e[v])&&"count"!==R&&(N=e[v],U="avg"===R,D=u[R]),n=H(C.start),p=H(C.end)+(n-o.tickIncrement(n,C.size,!1,x))/1e6;n=0&&I=0;i--)c(i);else if("increasing"===e){for(i=1;i=0;i--)r[i]+=r[i+1];"exclude"===n&&(r.push(0),r.shift())}}(f,P.direction,P.currentbin);var X=Math.min(y.length,f.length),Q=[],$=0,rr=X-1;for(n=0;n=$;n--)if(f[n]){rr=n;break}for(n=$;n<=rr;n++)if(i(y[n])&&i(f[n])){var er={p:y[n],s:f[n],b:0};P.enabled||(er.pts=F[n],j?er.ph0=er.ph1=F[n].length?S[F[n][0]]:y[n]:(e._computePh=!0,er.ph0=K(b[n]),er.ph1=K(b[n+1],!0))),Q.push(er)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,C.size,!1,x)-Q[0].p),c(Q,e),a.isArrayOrTypedArray(e.selectedpoints)&&a.tagSelected(Q,e,q),Q},calcAllAutoBins:m}},73316:function(r){"use strict";r.exports={eventDataKeys:["binNumber"]}},80536:function(r,e,n){"use strict";var i=n(3400),a=n(79811),t=n(24040).traceIs,o=n(20011),c=n(31508).validateCornerradius,u=i.nestedProperty,d=n(71888).getAxisGroup,s=[{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"}],l=["x","y"];r.exports=function(r,e){var n,m,p,I,y,f,g,_=e._histogramBinOpts={},h=[],v={},x=[];function P(r,e){return i.coerce(n._input,n,n._module.attributes,r,e)}function G(r){return"v"===r.orientation?"x":"y"}function C(r,n,t){var o=r.uid+"__"+t;n||(n=o);var c=function(r,n){return a.getFromTrace({_fullLayout:e},r,n).type}(r,t),u=r[t+"calendar"]||"",d=_[n],s=!0;d&&(c===d.axType&&u===d.calendar?(s=!1,d.traces.push(r),d.dirs.push(t)):(n=o,c!==d.axType&&i.warn(["Attempted to group the bins of trace",r.index,"set on a","type:"+c,"axis","with bins on","type:"+d.axType,"axis."].join(" ")),u!==d.calendar&&i.warn(["Attempted to group the bins of trace",r.index,"set with a",u,"calendar","with bins",d.calendar?"on a "+d.calendar+" calendar":"w/o a set calendar"].join(" ")))),s&&(_[n]={traces:[r],dirs:[t],axType:c,calendar:r[t+"calendar"]||""}),r["_"+t+"bingroup"]=n}for(y=0;yb&&G.splice(b,G.length-b),A.length>b&&A.splice(b,A.length-b);var M=[],B=[],k=[],F="string"===typeof P.size,z="string"===typeof S.size,w=[],R=[],E=F?w:P,N=z?R:S,T=0,D=[],J=[],U=e.histnorm,H=e.histfunc,L=-1!==U.indexOf("density"),O="max"===H||"min"===H?null:0,K=t.count,V=o[U],j=!1,W=[],Z=[],q="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";q&&"count"!==H&&(j="avg"===H,K=t[H]);var Y=P.size,X=h(P.start),Q=h(P.end)+(X-a.tickIncrement(X,Y,!1,g))/1e6;for(n=X;n=0&&p=0&&I-1,flipY:k.tiling.flip.indexOf("y")>-1,orientation:k.tiling.orientation,pad:{inner:k.tiling.pad},maxDepth:k._maxDepth}).descendants(),E=1/0,N=-1/0;R.forEach((function(r){var e=r.depth;e>=k._maxDepth?(r.x0=r.x1=(r.x0+r.x1)/2,r.y0=r.y1=(r.y0+r.y1)/2):(E=Math.min(E,e),N=Math.max(N,e))})),I=I.data(R,s.getPtId),k._maxVisibleLayers=isFinite(N)?N-E+1:0,I.enter().append("g").classed("slice",!0),C(I,p,{},[f,g],v),I.order();var T=null;if(G&&b){var D=s.getPtId(b);I.each((function(r){null===T&&s.getPtId(r)===D&&(T={x0:r.x0,x1:r.x1,y0:r.y0,y1:r.y1})}))}var J=function(){return T||{x0:0,x1:f,y0:0,y1:g}},U=I;return G&&(U=U.transition().each("end",(function(){var e=i.select(this);s.setSliceCursor(e,r,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),U.each((function(c){c._x0=_(c.x0),c._x1=_(c.x1),c._y0=h(c.y0),c._y1=h(c.y1),c._hoverX=_(c.x1-k.tiling.pad),c._hoverY=h(w?c.y1-k.tiling.pad/2:c.y0+k.tiling.pad/2);var I=i.select(this),y=a.ensureSingle(I,"path","surface",(function(r){r.style("pointer-events",M?"none":"all")}));G?y.transition().attrTween("d",(function(r){var e=S(r,p,J(),[f,g],{orientation:k.tiling.orientation,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1});return function(r){return v(e(r))}})):y.attr("d",v),I.call(l,n,r,e,{styleOne:u,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(s.setSliceCursor,r,{isTransitioning:r._transitioning}),y.call(u,c,k,r,{hovered:!1}),c.x0===c.x1||c.y0===c.y1?c._text="":c._text=m(c,n,k,e,B)||"";var C=a.ensureSingle(I,"g","slicetext"),b=a.ensureSingle(C,"text","",(function(r){r.attr("data-notex",1)})),R=a.ensureUniformFontSize(r,s.determineTextFont(k,c,B.font));b.text(c._text||" ").classed("slicetext",!0).attr("text-anchor",z?"end":F?"start":"middle").call(t.font,R).call(o.convertToTspans,r),c.textBB=t.bBox(b.node()),c.transform=x(c,{fontSize:R.size}),c.transform.fontSize=R.size,G?b.transition().attrTween("transform",(function(r){var e=A(r,p,J(),[f,g]);return function(r){return P(e(r))}})):b.attr("transform",P(c))})),T}},29044:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"icicle",basePlotModule:n(59564),categories:[],animatable:!0,attributes:n(97376),layoutAttributes:n(90676),supplyDefaults:n(7045),supplyLayoutDefaults:n(4304),calc:n(73876).r,crossTraceCalc:n(73876).q,plot:n(38364),style:n(47192).style,colorbar:n(5528),meta:{}}},90676:function(r){"use strict";r.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(r,e,n){"use strict";var i=n(3400),a=n(90676);r.exports=function(r,e){function n(n,t){return i.coerce(r,e,a,n,t)}n("iciclecolorway",e.colorway),n("extendiciclecolors")}},25132:function(r,e,n){"use strict";var i=n(74148),a=n(83024);r.exports=function(r,e,n){var t=n.flipX,o=n.flipY,c="h"===n.orientation,u=n.maxDepth,d=e[0],s=e[1];u&&(d=(r.height+1)*e[0]/Math.min(r.height+1,u),s=(r.height+1)*e[1]/Math.min(r.height+1,u));var l=i.partition().padding(n.pad.inner).size(c?[e[1],d]:[e[0],s])(r);return(c||t||o)&&a(l,e,{swapXY:c,flipX:t,flipY:o}),l}},38364:function(r,e,n){"use strict";var i=n(95808),a=n(67880);r.exports=function(r,e,n,t){return i(r,e,n,t,{type:"icicle",drawDescendants:a})}},47192:function(r,e,n){"use strict";var i=n(33428),a=n(76308),t=n(3400),o=n(82744).resizeText,c=n(60404);function u(r,e,n,i){var o=e.data.data,u=!e.children,d=o.i,s=t.castOption(n,d,"marker.line.color")||a.defaultLine,l=t.castOption(n,d,"marker.line.width")||0;r.call(c,e,n,i).style("stroke-width",l).call(a.stroke,s).style("opacity",u?n.leaf.opacity:null)}r.exports={style:function(r){var e=r._fullLayout._iciclelayer.selectAll(".trace");o(r,e,"icicle"),e.each((function(e){var n=i.select(this),a=e[0].trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each((function(e){i.select(this).call(u,e,a,r)}))}))},styleOne:u}},95188:function(r,e,n){"use strict";for(var i=n(45464),a=n(52904).zorder,t=n(21776).Ks,o=n(92880).extendFlat,c=n(47797).colormodel,u=["rgb","rgba","rgba256","hsl","hsla"],d=[],s=[],l=0;l0||i.inbox(n-c.y0,n-(c.y0+c.h*u.dy),0)>0)){var l,m=Math.floor((e-c.x0)/u.dx),p=Math.floor(Math.abs(n-c.y0)/u.dy);if(u._hasZ?l=c.z[p][m]:u._hasSource&&(l=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(m,p,1,1).data),l){var I,y=c.hi||u.hoverinfo;if(y){var f=y.split("+");-1!==f.indexOf("all")&&(f=["color"]),-1!==f.indexOf("color")&&(I=!0)}var g,_=o.colormodel[u.colormodel],h=_.colormodel||u.colormodel,v=h.length,x=u._scaler(l),P=_.suffix,G=[];(u.hovertemplate||I)&&(G.push("["+[x[0]+P[0],x[1]+P[1],x[2]+P[2]].join(", ")),4===v&&G.push(", "+x[3]+P[3]),G.push("]"),G=G.join(""),r.extraText=h.toUpperCase()+": "+G),t(u.hovertext)&&t(u.hovertext[p])?g=u.hovertext[p][m]:t(u.text)&&t(u.text[p])&&(g=u.text[p][m]);var C=s.c2p(c.y0+(p+.5)*u.dy),S=c.x0+(m+.5)*u.dx,A=c.y0+(p+.5)*u.dy,b="["+l.slice(0,u.colormodel.length).join(", ")+"]";return[a.extendFlat(r,{index:[p,m],x0:d.c2p(c.x0+m*u.dx),x1:d.c2p(c.x0+(m+1)*u.dx),y0:C,y1:C,color:x,xVal:S,xLabelVal:S,yVal:A,yLabelVal:A,zLabelVal:b,text:g,hovertemplateLabels:{zLabel:b,colorLabel:G,"color[0]Label":x[0]+P[0],"color[1]Label":x[1]+P[1],"color[2]Label":x[2]+P[2],"color[3]Label":x[3]+P[3]}})]}}}},48928:function(r,e,n){"use strict";r.exports={attributes:n(95188),supplyDefaults:n(13188),calc:n(93336),plot:n(63715),style:n(28576),hoverPoints:n(24892),eventData:n(79972),moduleType:"trace",name:"image",basePlotModule:n(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=a.strTranslate,o=n(9616),c=n(47797),u=n(9188),d=n(2264).STYLE;r.exports=function(r,e,n,s){var l=e.xaxis,m=e.yaxis,p=!r._context._exportedPlot&&u();a.makeTraceGroups(s,n,"im").each((function(e){var n=i.select(this),u=e[0],s=u.trace,I=("fast"===s.zsmooth||!1===s.zsmooth&&p)&&!s._hasZ&&s._hasSource&&"linear"===l.type&&"linear"===m.type;s._realImage=I;var y,f,g,_,h,v,x=u.z,P=u.x0,G=u.y0,C=u.w,S=u.h,A=s.dx,b=s.dy;for(v=0;void 0===y&&v0;)f=l.c2p(P+v*A),v--;for(v=0;void 0===_&&v0;)h=m.c2p(G+v*b),v--;fw[0];if(R||E){var N=y+M/2,T=_+B/2;F+="transform:"+t(N+"px",T+"px")+"scale("+(R?-1:1)+","+(E?-1:1)+")"+t(-N+"px",-T+"px")+";"}}k.attr("style",F);var D=new Promise((function(r){if(s._hasZ)r();else if(s._hasSource)if(s._canvas&&s._canvas.el.width===C&&s._canvas.el.height===S&&s._canvas.source===s.source)r();else{var e=document.createElement("canvas");e.width=C,e.height=S;var n=e.getContext("2d",{willReadFrequently:!0});s._image=s._image||new Image;var i=s._image;i.onload=function(){n.drawImage(i,0,0),s._canvas={el:e,source:s.source},r()},i.setAttribute("src",s.source)}})).then((function(){var r,e;if(s._hasZ)e=J((function(r,e){var n=x[e][r];return a.isTypedArray(n)&&(n=Array.from(n)),n})),r=e.toDataURL("image/png");else if(s._hasSource)if(I)r=s.source;else{var n=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,C,S).data;e=J((function(r,e){var i=4*(e*C+r);return[n[i],n[i+1],n[i+2],n[i+3]]})),r=e.toDataURL("image/png")}k.attr({"xlink:href":r,height:B,width:M,x:y,y:_})}));r._promises.push(D)}function J(r){var e=document.createElement("canvas");e.width=M,e.height=B;var n,i=e.getContext("2d",{willReadFrequently:!0}),t=function(r){return a.constrain(Math.round(l.c2p(P+r*A)-y),0,M)},o=function(r){return a.constrain(Math.round(m.c2p(G+r*b)-_),0,B)},d=c.colormodel[s.colormodel],p=d.colormodel||s.colormodel,I=d.fmt;for(v=0;v0}function G(r){r.each((function(r){_.stroke(i.select(this),r.line.color)})).each((function(r){_.fill(i.select(this),r.color)})).style("stroke-width",(function(r){return r.line.width}))}function C(r,e,n){var i=r._fullLayout,a=o.extendFlat({type:"linear",ticks:"outside",range:n,showline:!0},e),t={type:"linear",_id:"x"+e._id},c={letter:"x",font:i.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function u(r,e){return o.coerce(a,t,g,r,e)}return y(a,t,u,c,i),f(a,t,u,c),t}function S(r,e,n){return[Math.min(e/r.width,n/r.height),r,e+"x"+n]}function A(r,e,n,a){var t=document.createElementNS("http://www.w3.org/2000/svg","text"),o=i.select(t);return o.text(r).attr("x",0).attr("y",0).attr("text-anchor",n).attr("data-unformatted",r).call(p.convertToTspans,a).call(l.font,e),l.bBox(o.node())}function b(r,e,n,i,a,t){var c="_cache"+e;r[c]&&r[c].key===a||(r[c]={key:a,value:n});var u=o.aggNums(t,null,[r[c].value,i],2);return r[c].value=u,u}r.exports=function(r,e,n,y){var f,g=r._fullLayout;P(n)&&y&&(f=y()),o.makeTraceGroups(g._indicatorlayer,e,"trace").each((function(e){var y,M,B,k,F,z=e[0].trace,w=i.select(this),R=z._hasGauge,E=z._isAngular,N=z._isBullet,T=z.domain,D={w:g._size.w*(T.x[1]-T.x[0]),h:g._size.h*(T.y[1]-T.y[0]),l:g._size.l+g._size.w*T.x[0],r:g._size.r+g._size.w*(1-T.x[1]),t:g._size.t+g._size.h*(1-T.y[1]),b:g._size.b+g._size.h*T.y[0]},J=D.l+D.w/2,U=D.t+D.h/2,H=Math.min(D.w/2,D.h),L=m.innerRadius*H,O=z.align||"center";if(M=U,R){if(E&&(y=J,M=U+H/2,B=function(r){return function(r,e){var n=Math.sqrt(r.width/2*(r.width/2)+r.height*r.height),i=e/n;return[i,r,e]}(r,.9*L)}),N){var K=m.bulletPadding,V=1-m.bulletNumberDomainSize+K;y=D.l+(V+(1-V)*v[O])*D.w,B=function(r){return S(r,(m.bulletNumberDomainSize-K)*D.w,D.h)}}}else y=D.l+v[O]*D.w,B=function(r){return S(r,D.w,D.h)};!function(r,e,n,a){var d,s,m,y=n[0].trace,f=a.numbersX,g=a.numbersY,G=y.align||"center",S=h[G],M=a.transitionOpts,B=a.onComplete,k=o.ensureSingle(e,"g","numbers"),F=[];y._hasNumber&&F.push("number"),y._hasDelta&&(F.push("delta"),"left"===y.delta.position&&F.reverse());var z=k.selectAll("text").data(F);function w(e,n,i,a){if(!e.match("s")||i>=0===a>=0||n(i).slice(-1).match(x)||n(a).slice(-1).match(x))return n;var t=e.slice().replace("s","f").replace(/\d+/,(function(r){return parseInt(r)-1})),o=C(r,{tickformat:t});return function(r){return Math.abs(r)<1?I.tickText(o,r).text:n(r)}}function R(){var e=C(r,{tickformat:y.number.valueformat},y._range);e.setScale(),I.prepTicks(e);var a=function(r){return I.tickText(e,r).text},o=y.number.suffix,c=y.number.prefix,u=k.select("text.number");function s(){var e="number"===typeof n[0].y?c+a(n[0].y)+o:"-";u.text(e).call(l.font,y.number.font).call(p.convertToTspans,r)}return P(M)?u.transition().duration(M.duration).ease(M.easing).each("end",(function(){s(),B&&B()})).each("interrupt",(function(){s(),B&&B()})).attrTween("text",(function(){var r=i.select(this),e=t(n[0].lastY,n[0].y);y._lastValue=n[0].y;var u=w(y.number.valueformat,a,n[0].lastY,n[0].y);return function(n){r.text(c+u(e(n))+o)}})):s(),d=A(c+a(n[0].y)+o,y.number.font,S,r),u}function E(){var e=C(r,{tickformat:y.delta.valueformat},y._range);e.setScale(),I.prepTicks(e);var a=function(r){return I.tickText(e,r).text},o=y.delta.suffix,c=y.delta.prefix,u=function(r){return y.delta.relative?r.relativeDelta:r.delta},d=function(r,e){return 0===r||"number"!==typeof r||isNaN(r)?"-":(r>0?y.delta.increasing.symbol:y.delta.decreasing.symbol)+c+e(r)+o},m=function(r){return r.delta>=0?y.delta.increasing.color:y.delta.decreasing.color};void 0===y._deltaLastValue&&(y._deltaLastValue=u(n[0]));var f=k.select("text.delta");function g(){f.text(d(u(n[0]),a)).call(_.fill,m(n[0])).call(p.convertToTspans,r)}return f.call(l.font,y.delta.font).call(_.fill,m({delta:y._deltaLastValue})),P(M)?f.transition().duration(M.duration).ease(M.easing).tween("text",(function(){var r=i.select(this),e=u(n[0]),o=y._deltaLastValue,c=w(y.delta.valueformat,a,o,e),s=t(o,e);return y._deltaLastValue=e,function(e){r.text(d(s(e),c)),r.call(_.fill,m({delta:s(e)}))}})).each("end",(function(){g(),B&&B()})).each("interrupt",(function(){g(),B&&B()})):g(),s=A(d(u(n[0]),a),y.delta.font,S,r),f}z.enter().append("text"),z.attr("text-anchor",(function(){return S})).attr("class",(function(r){return r})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),z.exit().remove();var N,T=y.mode+y.align;if(y._hasDelta&&(N=E(),T+=y.delta.position+y.delta.font.size+y.delta.font.family+y.delta.valueformat,T+=y.delta.increasing.symbol+y.delta.decreasing.symbol,m=s),y._hasNumber&&(R(),T+=y.number.font.size+y.number.font.family+y.number.valueformat+y.number.suffix+y.number.prefix,m=d),y._hasDelta&&y._hasNumber){var D,J,U=[(d.left+d.right)/2,(d.top+d.bottom)/2],H=[(s.left+s.right)/2,(s.top+s.bottom)/2],L=.75*y.delta.font.size;"left"===y.delta.position&&(D=b(y,"deltaPos",0,-1*(d.width*v[y.align]+s.width*(1-v[y.align])+L),T,Math.min),J=U[1]-H[1],m={width:d.width+s.width+L,height:Math.max(d.height,s.height),left:s.left+D,right:d.right,top:Math.min(d.top,s.top+J),bottom:Math.max(d.bottom,s.bottom+J)}),"right"===y.delta.position&&(D=b(y,"deltaPos",0,d.width*(1-v[y.align])+s.width*v[y.align]+L,T,Math.max),J=U[1]-H[1],m={width:d.width+s.width+L,height:Math.max(d.height,s.height),left:d.left,right:s.right+D,top:Math.min(d.top,s.top+J),bottom:Math.max(d.bottom,s.bottom+J)}),"bottom"===y.delta.position&&(D=null,J=s.height,m={width:Math.max(d.width,s.width),height:d.height+s.height,left:Math.min(d.left,s.left),right:Math.max(d.right,s.right),top:d.bottom-d.height,bottom:d.bottom+s.height}),"top"===y.delta.position&&(D=null,J=d.top,m={width:Math.max(d.width,s.width),height:d.height+s.height,left:Math.min(d.left,s.left),right:Math.max(d.right,s.right),top:d.bottom-d.height-s.height,bottom:d.bottom}),N.attr({dx:D,dy:J})}(y._hasNumber||y._hasDelta)&&k.attr("transform",(function(){var r=a.numbersScaler(m);T+=r[2];var e,n=b(y,"numbersScale",1,r[0],T,Math.min);y._scaleNumbers||(n=1),e=y._isAngular?g-n*m.bottom:g-n*(m.top+m.bottom)/2,y._numbersTop=n*m.top+e;var i=m[G];"center"===G&&(i=(m.left+m.right)/2);var t=f-n*i;return t=b(y,"numbersTranslate",0,t,T,Math.max),u(t,e)+c(n)}))}(r,w,e,{numbersX:y,numbersY:M,numbersScaler:B,transitionOpts:n,onComplete:f}),R&&(k={range:z.gauge.axis.range,color:z.gauge.bgcolor,line:{color:z.gauge.bordercolor,width:0},thickness:1},F={range:z.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:z.gauge.bordercolor,width:z.gauge.borderwidth},thickness:1});var j=w.selectAll("g.angular").data(E?e:[]);j.exit().remove();var W=w.selectAll("g.angularaxis").data(E?e:[]);W.exit().remove(),E&&function(r,e,n,t){var o,c,l,m,p=n[0].trace,y=t.size,f=t.radius,g=t.innerRadius,_=t.gaugeBg,h=t.gaugeOutline,v=[y.l+y.w/2,y.t+y.h/2+f/2],x=t.gauge,S=t.layer,A=t.transitionOpts,b=t.onComplete,M=Math.PI/2;function B(r){var e=p.gauge.axis.range[0],n=(r-e)/(p.gauge.axis.range[1]-e)*Math.PI-M;return n<-M?-M:n>M?M:n}function k(r){return i.svg.arc().innerRadius((g+f)/2-r/2*(f-g)).outerRadius((g+f)/2+r/2*(f-g)).startAngle(-M)}function F(r){r.attr("d",(function(r){return k(r.thickness).startAngle(B(r.range[0])).endAngle(B(r.range[1]))()}))}x.enter().append("g").classed("angular",!0),x.attr("transform",u(v[0],v[1])),S.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),S.selectAll("g.xangularaxistick,path,text").remove(),(o=C(r,p.gauge.axis)).type="linear",o.range=p.gauge.axis.range,o._id="xangularaxis",o.ticklabeloverflow="allow",o.setScale();var z=function(r){return(o.range[0]-r.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},w={},R=I.makeLabelFns(o,0).labelStandoff;w.xFn=function(r){var e=z(r);return Math.cos(e)*R},w.yFn=function(r){var e=z(r),n=Math.sin(e)>0?.2:1;return-Math.sin(e)*(R+r.fontSize*n)+Math.abs(Math.cos(e))*(r.fontSize*s)},w.anchorFn=function(r){var e=z(r),n=Math.cos(e);return Math.abs(n)<.1?"middle":n>0?"start":"end"},w.heightFn=function(r,e,n){var i=z(r);return-.5*(1+Math.sin(i))*n};var E=function(r){return u(v[0]+f*Math.cos(r),v[1]-f*Math.sin(r))};l=function(r){return E(z(r))};var N=function(r){var e=z(r);return E(e)+"rotate("+-d(e)+")"};if(c=I.calcTicks(o),m=I.getTickSigns(o)[2],o.visible){m="inside"===o.ticks?-1:1;var T=(o.linewidth||1)/2;I.drawTicks(r,o,{vals:c,layer:S,path:"M"+m*T+",0h"+m*o.ticklen,transFn:N}),I.drawLabels(r,o,{vals:c,layer:S,transFn:l,labelFns:w})}var D=[_].concat(p.gauge.steps),J=x.selectAll("g.bg-arc").data(D);J.enter().append("g").classed("bg-arc",!0).append("path"),J.select("path").call(F).call(G),J.exit().remove();var U=k(p.gauge.bar.thickness),H=x.selectAll("g.value-arc").data([p.gauge.bar]);H.enter().append("g").classed("value-arc",!0).append("path");var L,O,K,V=H.select("path");P(A)?(V.transition().duration(A.duration).ease(A.easing).each("end",(function(){b&&b()})).each("interrupt",(function(){b&&b()})).attrTween("d",(L=U,O=B(n[0].lastY),K=B(n[0].y),function(){var r=a(O,K);return function(e){return L.endAngle(r(e))()}})),p._lastValue=n[0].y):V.attr("d","number"===typeof n[0].y?U.endAngle(B(n[0].y)):"M0,0Z"),V.call(G),H.exit().remove(),D=[];var j=p.gauge.threshold.value;(j||0===j)&&D.push({range:[j,j],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=x.selectAll("g.threshold-arc").data(D);W.enter().append("g").classed("threshold-arc",!0).append("path"),W.select("path").call(F).call(G),W.exit().remove();var Z=x.selectAll("g.gauge-outline").data([h]);Z.enter().append("g").classed("gauge-outline",!0).append("path"),Z.select("path").call(F).call(G),Z.exit().remove()}(r,0,e,{radius:H,innerRadius:L,gauge:j,layer:W,size:D,gaugeBg:k,gaugeOutline:F,transitionOpts:n,onComplete:f});var Z=w.selectAll("g.bullet").data(N?e:[]);Z.exit().remove();var q=w.selectAll("g.bulletaxis").data(N?e:[]);q.exit().remove(),N&&function(r,e,n,i){var a,t,o,c,d,s=n[0].trace,l=i.gauge,p=i.layer,y=i.gaugeBg,f=i.gaugeOutline,g=i.size,h=s.domain,v=i.transitionOpts,x=i.onComplete;l.enter().append("g").classed("bullet",!0),l.attr("transform",u(g.l,g.t)),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var S=g.h,A=s.gauge.bar.thickness*S,b=h.x[0],M=h.x[0]+(h.x[1]-h.x[0])*(s._hasNumber||s._hasDelta?1-m.bulletNumberDomainSize:1);function B(r){r.attr("width",(function(r){return Math.max(0,a.c2p(r.range[1])-a.c2p(r.range[0]))})).attr("x",(function(r){return a.c2p(r.range[0])})).attr("y",(function(r){return.5*(1-r.thickness)*S})).attr("height",(function(r){return r.thickness*S}))}(a=C(r,s.gauge.axis))._id="xbulletaxis",a.domain=[b,M],a.setScale(),t=I.calcTicks(a),o=I.makeTransTickFn(a),c=I.getTickSigns(a)[2],d=g.t+g.h,a.visible&&(I.drawTicks(r,a,{vals:"inside"===a.ticks?I.clipEnds(a,t):t,layer:p,path:I.makeTickPath(a,d,c),transFn:o}),I.drawLabels(r,a,{vals:t,layer:p,transFn:o,labelFns:I.makeLabelFns(a,d)}));var k=[y].concat(s.gauge.steps),F=l.selectAll("g.bg-bullet").data(k);F.enter().append("g").classed("bg-bullet",!0).append("rect"),F.select("rect").call(B).call(G),F.exit().remove();var z=l.selectAll("g.value-bullet").data([s.gauge.bar]);z.enter().append("g").classed("value-bullet",!0).append("rect"),z.select("rect").attr("height",A).attr("y",(S-A)/2).call(G),P(v)?z.select("rect").transition().duration(v.duration).ease(v.easing).each("end",(function(){x&&x()})).each("interrupt",(function(){x&&x()})).attr("width",Math.max(0,a.c2p(Math.min(s.gauge.axis.range[1],n[0].y)))):z.select("rect").attr("width","number"===typeof n[0].y?Math.max(0,a.c2p(Math.min(s.gauge.axis.range[1],n[0].y))):0),z.exit().remove();var w=n.filter((function(){return s.gauge.threshold.value||0===s.gauge.threshold.value})),R=l.selectAll("g.threshold-bullet").data(w);R.enter().append("g").classed("threshold-bullet",!0).append("line"),R.select("line").attr("x1",a.c2p(s.gauge.threshold.value)).attr("x2",a.c2p(s.gauge.threshold.value)).attr("y1",(1-s.gauge.threshold.thickness)/2*S).attr("y2",(1-(1-s.gauge.threshold.thickness)/2)*S).call(_.stroke,s.gauge.threshold.line.color).style("stroke-width",s.gauge.threshold.line.width),R.exit().remove();var E=l.selectAll("g.gauge-outline").data([f]);E.enter().append("g").classed("gauge-outline",!0).append("rect"),E.select("rect").call(B).call(G),E.exit().remove()}(r,0,e,{gauge:Z,layer:q,size:D,gaugeBg:k,gaugeOutline:F,transitionOpts:n,onComplete:f});var Y=w.selectAll("text.title").data(e);Y.exit().remove(),Y.enter().append("text").classed("title",!0),Y.attr("text-anchor",(function(){return N?h.right:h[z.title.align]})).text(z.title.text).call(l.font,z.title.font).call(p.convertToTspans,r),Y.attr("transform",(function(){var r,e=D.l+D.w*v[z.title.align],n=m.titlePadding,i=l.bBox(Y.node());return R?(E&&(r=z.gauge.axis.visible?l.bBox(W.node()).top-n-i.bottom:D.t+D.h/2-H/2-i.bottom-n),N&&(r=M-(i.top+i.bottom)/2,e=D.l-m.bulletPadding*D.w)):r=z._numbersTop-n-i.bottom,u(e,r)}))}))}},50048:function(r,e,n){"use strict";var i=n(49084),a=n(29736).axisHoverFormat,t=n(21776).Ks,o=n(52948),c=n(45464),u=n(92880).extendFlat,d=n(67824).overrideAll,s=r.exports=d(u({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:t(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),valuehoverformat:a("value",1),showlegend:u({},c.showlegend,{dflt:!1})},i("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:u({},c.hoverinfo)}),"calc","nested");s.flatshading.dflt=!0,s.lighting.facenormalsepsilon.dflt=0,s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes",s.transforms=void 0},62624:function(r,e,n){"use strict";var i=n(47128),a=n(3832).processGrid,t=n(3832).filter;r.exports=function(r,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=t(e.x,e._len),e._y=t(e.y,e._len),e._z=t(e.z,e._len),e._value=t(e.value,e._len);var n=a(e);e._gridFill=n.fill,e._Xs=n.Xs,e._Ys=n.Ys,e._Zs=n.Zs,e._len=n.len;for(var o=1/0,c=-1/0,u=0;u0;n--){var i=Math.min(e[n],e[n-1]),a=Math.max(e[n],e[n-1]);if(a>i&&i-1}function N(r,e){return null===r?e:r}function T(e,n,i){k();var a,t,o,u=[n],d=[i];if(c>=1)u=[n],d=[i];else if(c>0){var s=function(r,e){var n=r[0],i=r[1],a=r[2],t=function(r,e,n){for(var i=[],a=0;a-1?i[p]:B(I,y,g);m[p]=h>-1?h:z(I,y,g,N(e,_))}a=m[0],t=m[1],o=m[2],r._meshI.push(a),r._meshJ.push(t),r._meshK.push(o),++f}}function D(r,e,n,i){var a=r[3];ai&&(a=i);for(var t=(r[3]-a)/(r[3]-e[3]+1e-9),o=[],c=0;c<4;c++)o[c]=(1-t)*r[c]+t*e[c];return o}function J(r,e,n){return r>=e&&r<=n}function U(r){var e=.001*(M-b);return r>=b-e&&r<=M+e}function H(e){for(var n=[],i=0;i<4;i++){var a=e[i];n.push([r._x[a],r._y[a],r._z[a],r._value[a]])}return n}var L=3;function O(r,e,n,i,a,t){t||(t=1),n=[-1,-1,-1];var o=!1,c=[J(e[0][3],i,a),J(e[1][3],i,a),J(e[2][3],i,a)];if(!c[0]&&!c[1]&&!c[2])return!1;var u=function(r,e,n){return U(e[0][3])&&U(e[1][3])&&U(e[2][3])?(T(r,e,n),!0):tMath.abs(G-A)?[S,G]:[G,A];rr(n,B[0],B[1])}}var k=[[Math.min(b,A),Math.max(b,A)],[Math.min(S,M),Math.max(S,M)]];["x","y","z"].forEach((function(n){for(var i=[],a=0;a0&&(l.push(I.id),"x"===n?m.push([I.distRatio,0,0]):"y"===n?m.push([0,I.distRatio,0]):m.push([0,0,I.distRatio]))}else s=ar(1,"x"===n?v-1:"y"===n?x-1:P-1);l.length>0&&(i[t]="x"===n?er(e,l,o,c,m,i[t]):"y"===n?nr(e,l,o,c,m,i[t]):ir(e,l,o,c,m,i[t]),t++),s.length>0&&(i[t]="x"===n?Y(e,s,o,c,i[t]):"y"===n?X(e,s,o,c,i[t]):Q(e,s,o,c,i[t]),t++)}var y=r.caps[n];y.show&&y.fill&&(R(y.fill),i[t]="x"===n?Y(e,[0,v-1],o,c,i[t]):"y"===n?X(e,[0,x-1],o,c,i[t]):Q(e,[0,P-1],o,c,i[t]),t++)}})),0===f&&F(),r._meshX=i,r._meshY=a,r._meshZ=t,r._meshIntensity=o,r._Xs=g,r._Ys=_,r._Zs=h}(),r}r.exports={findNearestOnAxis:d,generateIsoMeshes:p,createIsosurfaceTrace:function(r,e){var n=r.glplot.gl,a=i({gl:n}),t=new s(r,a,e.uid);return a._trace=t,t.update(e),r.glplot.add(a),t}}},70548:function(r,e,n){"use strict";var i=n(3400),a=n(24040),t=n(50048),o=n(27260);function c(r,e,n,i,t){var c=t("isomin"),u=t("isomax");void 0!==u&&null!==u&&void 0!==c&&null!==c&&c>u&&(e.isomin=null,e.isomax=null);var d=t("x"),s=t("y"),l=t("z"),m=t("value");d&&d.length&&s&&s.length&&l&&l.length&&m&&m.length?(a.getComponentMethod("calendars","handleTraceDefaults")(r,e,["x","y","z"],i),t("valuehoverformat"),["x","y","z"].forEach((function(r){t(r+"hoverformat");var e="caps."+r;t(e+".show")&&t(e+".fill");var n="slices."+r;t(n+".show")&&(t(n+".fill"),t(n+".locations"))})),t("spaceframe.show")&&t("spaceframe.fill"),t("surface.show")&&(t("surface.count"),t("surface.fill"),t("surface.pattern")),t("contour.show")&&(t("contour.color"),t("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(r){t(r)})),o(r,e,i,t,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}r.exports={supplyDefaults:function(r,e,n,a){c(r,e,0,a,(function(n,a){return i.coerce(r,e,t,n,a)}))},supplyIsoDefaults:c}},6296:function(r,e,n){"use strict";r.exports={attributes:n(50048),supplyDefaults:n(70548).supplyDefaults,calc:n(62624),colorbar:{min:"cmin",max:"cmax"},plot:n(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:n(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(r,e,n){"use strict";var i=n(49084),a=n(29736).axisHoverFormat,t=n(21776).Ks,o=n(16716),c=n(45464),u=n(92880).extendFlat;r.exports=u({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:t({editType:"calc"}),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},i("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:u({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:"calc"},lightposition:{x:u({},o.lightposition.x,{dflt:1e5}),y:u({},o.lightposition.y,{dflt:1e5}),z:u({},o.lightposition.z,{dflt:0}),editType:"calc"},lighting:u({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"},o.lighting),hoverinfo:u({},c.hoverinfo,{editType:"calc"}),showlegend:u({},c.showlegend,{dflt:!1})})},1876:function(r,e,n){"use strict";var i=n(47128);r.exports=function(r,e){e.intensity&&i(r,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},576:function(r,e,n){"use strict";var i=n(67792).gl_mesh3d,a=n(67792).delaunay_triangulate,t=n(67792).alpha_shape,o=n(67792).convex_hull,c=n(33040).parseColorScale,u=n(3400).isArrayOrTypedArray,d=n(43080),s=n(8932).extractOpts,l=n(52094);function m(r,e,n){this.scene=r,this.uid=n,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var p=m.prototype;function I(r){for(var e=[],n=r.length,i=0;i=e-.5)return!1;return!0}p.handlePick=function(r){if(r.object===this.mesh){var e=r.index=r.data.index;r.data._cellCenter?r.traceCoordinate=r.data.dataCoordinate:r.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var n=this.data.hovertext||this.data.text;return u(n)&&void 0!==n[e]?r.textLabel=n[e]:n&&(r.textLabel=n),!0}},p.update=function(r){var e=this.scene,n=e.fullSceneLayout;this.data=r;var i,u=r.x.length,m=l(y(n.xaxis,r.x,e.dataScale[0],r.xcalendar),y(n.yaxis,r.y,e.dataScale[1],r.ycalendar),y(n.zaxis,r.z,e.dataScale[2],r.zcalendar));if(r.i&&r.j&&r.k){if(r.i.length!==r.j.length||r.j.length!==r.k.length||!g(r.i,u)||!g(r.j,u)||!g(r.k,u))return;i=l(f(r.i),f(r.j),f(r.k))}else i=0===r.alphahull?o(m):r.alphahull>0?t(r.alphahull,m):function(r,e){for(var n=["x","y","z"].indexOf(r),i=[],t=e.length,o=0;og):f=S>P,g=S;var A=d(P,G,C,S);A.pos=x,A.yc=(P+S)/2,A.i=v,A.dir=f?"increasing":"decreasing",A.x=A.pos,A.y=[C,G],_&&(A.orig_p=n[v]),I&&(A.tx=e.text[v]),y&&(A.htx=e.hovertext[v]),h.push(A)}else h.push({pos:x,empty:!0})}return e._extremes[u._id]=t.findExtremes(u,i.concat(m,l),{padded:!0}),h.length&&(h[0].t={labels:{open:a(r,"open:")+" ",high:a(r,"high:")+" ",low:a(r,"low:")+" ",close:a(r,"close:")+" "}}),h}r.exports={calc:function(r,e){var n=t.getFromId(r,e.xaxis),a=t.getFromId(r,e.yaxis),c=function(r,e,n){var a=n._minDiff;if(!a){var t,c=r._fullData,u=[];for(a=1/0,t=0;t"+d.labels[h]+i.hoverLabelText(c,v,u.yhoverformat):((_=a.extendFlat({},m)).y0=_.y1=x,_.yLabelVal=v,_.yLabel=d.labels[h]+i.hoverLabelText(c,v,u.yhoverformat),_.name="",l.push(_),f[v]=_)}return l}function m(r,e,n,a){var t=r.cd,o=r.ya,u=t[0].trace,l=t[0].t,m=s(r,e,n,a);if(!m)return[];var p=t[m.index],I=m.index=p.i,y=p.dir;function f(r){return l.labels[r]+i.hoverLabelText(o,u[r][I],u.yhoverformat)}var g=p.hi||u.hoverinfo,_=g.split("+"),h="all"===g,v=h||-1!==_.indexOf("y"),x=h||-1!==_.indexOf("text"),P=v?[f("open"),f("high"),f("low"),f("close")+" "+d[y]]:[];return x&&c(p,u,P),m.extraText=P.join("
"),m.y0=m.y1=o.c2p(p.yc,!0),[m]}r.exports={hoverPoints:function(r,e,n,i){return r.cd[0].trace.hoverlabel.split?l(r,e,n,i):m(r,e,n,i)},hoverSplit:l,hoverOnPoints:m}},65456:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"ohlc",basePlotModule:n(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:n(20279),supplyDefaults:n(23860),calc:n(42812).calc,plot:n(36664),style:n(14008),hoverPoints:n(18720).hoverPoints,selectPoints:n(97384)}},52744:function(r,e,n){"use strict";var i=n(24040),a=n(3400);r.exports=function(r,e,n,t){var o=n("x"),c=n("open"),u=n("high"),d=n("low"),s=n("close");if(n("hoverlabel.split"),i.getComponentMethod("calendars","handleTraceDefaults")(r,e,["x"],t),c&&u&&d&&s){var l=Math.min(c.length,u.length,d.length,s.length);return o&&(l=Math.min(l,a.minRowLength(o))),e._length=l,l}}},36664:function(r,e,n){"use strict";var i=n(33428),a=n(3400);r.exports=function(r,e,n,t){var o=e.yaxis,c=e.xaxis,u=!!c.rangebreaks;a.makeTraceGroups(t,n,"trace ohlc").each((function(r){var e=i.select(this),n=r[0],t=n.t;if(!0!==n.trace.visible||t.empty)e.remove();else{var d=t.tickLen,s=e.selectAll("path").data(a.identity);s.enter().append("path"),s.exit().remove(),s.attr("d",(function(r){if(r.empty)return"M0,0Z";var e=c.c2p(r.pos-d,!0),n=c.c2p(r.pos+d,!0),i=u?(e+n)/2:c.c2p(r.pos,!0);return"M"+e+","+o.c2p(r.o,!0)+"H"+i+"M"+i+","+o.c2p(r.h,!0)+"V"+o.c2p(r.l,!0)+"M"+n+","+o.c2p(r.c,!0)+"H"+i}))}}))}},97384:function(r){"use strict";r.exports=function(r,e){var n,i=r.cd,a=r.xaxis,t=r.yaxis,o=[],c=i[0].t.bPos||0;if(!1===e)for(n=0;n=r.length)return!1;if(void 0!==e[r[n]])return!1;e[r[n]]=!0}return!0}(n))for(e=0;e0||s(c);d&&(o="array");var l=n("categoryorder",o);"array"===l?(n("categoryarray"),n("ticktext")):(delete r.categoryarray,delete r.ticktext),d||"array"!==l||(e.categoryorder="trace")}}r.exports=function(r,e,n,s){function m(n,a){return i.coerce(r,e,u,n,a)}var p=c(r,e,{name:"dimensions",handleItemDefaults:l}),I=function(r,e,n,o,c){c("line.shape"),c("line.hovertemplate");var u=c("line.color",o.colorway[0]);if(a(r,"line")&&i.isArrayOrTypedArray(u)){if(u.length)return c("line.colorscale"),t(r,e,o,c,{prefix:"line.",cLetter:"c"}),u.length;e.line.color=n}return 1/0}(r,e,n,s,m);o(e,s,m),Array.isArray(p)&&p.length||(e.visible=!1),d(e,p,"values",I),m("hoveron"),m("hovertemplate"),m("arrangement"),m("bundlecolors"),m("sortpaths"),m("counts");var y=s.font;i.coerceFont(m,"labelfont",y,{overrideDflt:{size:Math.round(y.size)}}),i.coerceFont(m,"tickfont",y,{autoShadowDflt:!0,overrideDflt:{size:Math.round(y.size/1.2)}})}},22020:function(r,e,n){"use strict";r.exports={attributes:n(72140),supplyDefaults:n(76671),calc:n(69136),plot:n(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:n(91800),categories:["noOpacity"],meta:{}}},51036:function(r,e,n){"use strict";var i=n(33428),a=n(67756).Gz,t=n(36424),o=n(93024),c=n(3400),u=c.strTranslate,d=n(43616),s=n(49760),l=n(72736);function m(r,e,n,a){var t=e._context.staticPlot,o=r.map(T.bind(0,e,n)),s=a.selectAll("g.parcatslayer").data([null]);s.enter().append("g").attr("class","parcatslayer").style("pointer-events",t?"none":"all");var m=s.selectAll("g.trace.parcats").data(o,p),_=m.enter().append("g").attr("class","trace parcats");m.attr("transform",(function(r){return u(r.x,r.y)})),_.append("g").attr("class","paths");var h=m.select("g.paths").selectAll("path.path").data((function(r){return r.paths}),p);h.attr("fill",(function(r){return r.model.color}));var P=h.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(r){return r.model.color})).attr("fill-opacity",0);x(P),h.attr("d",(function(r){return r.svgD})),P.empty()||h.sort(y),h.exit().remove(),h.on("mouseover",f).on("mouseout",g).on("click",v),_.append("g").attr("class","dimensions");var S=m.select("g.dimensions").selectAll("g.dimension").data((function(r){return r.dimensions}),p);S.enter().append("g").attr("class","dimension"),S.attr("transform",(function(r){return u(r.x,0)})),S.exit().remove();var A=S.selectAll("g.category").data((function(r){return r.categories}),p),b=A.enter().append("g").attr("class","category");A.attr("transform",(function(r){return u(0,r.y)})),b.append("rect").attr("class","catrect").attr("pointer-events","none"),A.select("rect.catrect").attr("fill","none").attr("width",(function(r){return r.width})).attr("height",(function(r){return r.height})),G(b);var M=A.selectAll("rect.bandrect").data((function(r){return r.bands}),p);M.each((function(){c.raiseToTop(this)})),M.attr("fill",(function(r){return r.color}));var R=M.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(r){return r.color})).attr("fill-opacity",0);M.attr("fill",(function(r){return r.color})).attr("width",(function(r){return r.width})).attr("height",(function(r){return r.height})).attr("y",(function(r){return r.y})).attr("cursor",(function(r){return"fixed"===r.parcatsViewModel.arrangement?"default":"perpendicular"===r.parcatsViewModel.arrangement?"ns-resize":"move"})),C(R),M.exit().remove(),b.append("text").attr("class","catlabel").attr("pointer-events","none"),A.select("text.catlabel").attr("text-anchor",(function(r){return I(r)?"start":"end"})).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",(function(r){return I(r)?r.width+5:-5})).attr("y",(function(r){return r.height/2})).text((function(r){return r.model.categoryLabel})).each((function(r){d.font(i.select(this),r.parcatsViewModel.categorylabelfont),l.convertToTspans(i.select(this),e)})),b.append("text").attr("class","dimlabel"),A.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(r){return"fixed"===r.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(r){return r.width/2})).attr("y",-5).text((function(r,e){return 0===e?r.parcatsViewModel.model.dimensions[r.model.dimensionInd].dimensionLabel:null})).each((function(r){d.font(i.select(this),r.parcatsViewModel.labelfont)})),A.selectAll("rect.bandrect").on("mouseover",B).on("mouseout",k),A.exit().remove(),S.call(i.behavior.drag().origin((function(r){return{x:r.x,y:0}})).on("dragstart",F).on("drag",z).on("dragend",w)),m.each((function(r){r.traceSelection=i.select(this),r.pathSelection=i.select(this).selectAll("g.paths").selectAll("path.path"),r.dimensionSelection=i.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),m.exit().remove()}function p(r){return r.key}function I(r){var e=r.parcatsViewModel.dimensions.length,n=r.parcatsViewModel.dimensions[e-1].model.dimensionInd;return r.model.dimensionInd===n}function y(r,e){return r.model.rawColor>e.model.rawColor?1:r.model.rawColor"),B=i.mouse(l)[0];o.loneHover({trace:m,x:v-I.left+y.left,y:x-I.top+y.top,text:M,color:r.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:G,idealAlign:B1&&m.displayInd===l.dimensions.length-1?(a=d.left,t="left"):(a=d.left+d.width,t="right");var y=s.model.count,f=s.model.categoryLabel,g=y/s.parcatsViewModel.model.count,_={countLabel:y,categoryLabel:f,probabilityLabel:g.toFixed(3)},h=[];-1!==s.parcatsViewModel.hoverinfoItems.indexOf("count")&&h.push(["Count:",_.countLabel].join(" ")),-1!==s.parcatsViewModel.hoverinfoItems.indexOf("probability")&&h.push(["P("+_.categoryLabel+"):",_.probabilityLabel].join(" "));var v=h.join("
");return{trace:p,x:o*(a-e.left),y:c*(I-e.top),text:v,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:t,hovertemplate:p.hovertemplate,hovertemplateLabels:_,eventData:[{data:p._input,fullData:p,count:y,category:f,probability:g}]}}function B(r){if(!r.parcatsViewModel.dragDimension&&-1===r.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(i.mouse(this)[1]<-1)return;var e,n=r.parcatsViewModel.graphDiv,a=n._fullLayout,t=a._paperdiv.node().getBoundingClientRect(),u=r.parcatsViewModel.hoveron,d=this;"color"===u?(function(r){var e=i.select(r).datum(),n=S(e);P(n),n.each((function(){c.raiseToTop(this)})),i.select(r.parentNode).selectAll("rect.bandrect").filter((function(r){return r.color===e.color})).each((function(){c.raiseToTop(this),i.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(d),b(d,"plotly_hover",i.event)):(function(r){i.select(r.parentNode).selectAll("rect.bandrect").each((function(r){var e=S(r);P(e),e.each((function(){c.raiseToTop(this)}))})),i.select(r.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(d),A(d,"plotly_hover",i.event)),-1===r.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===u?e=M(n,t,d):"color"===u?e=function(r,e,n){r._fullLayout._calcInverseTransform(r);var a,t,o=r._fullLayout._invScaleX,c=r._fullLayout._invScaleY,u=n.getBoundingClientRect(),d=i.select(n).datum(),l=d.categoryViewModel,m=l.parcatsViewModel,p=m.model.dimensions[l.model.dimensionInd],I=m.trace,y=u.y+u.height/2;m.dimensions.length>1&&p.displayInd===m.dimensions.length-1?(a=u.left,t="left"):(a=u.left+u.width,t="right");var f=l.model.categoryLabel,g=d.parcatsViewModel.model.count,_=0;d.categoryViewModel.bands.forEach((function(r){r.color===d.color&&(_+=r.count)}));var h=l.model.count,v=0;m.pathSelection.each((function(r){r.model.color===d.color&&(v+=r.model.count)}));var x=_/g,P=_/v,G=_/h,C={countLabel:_,categoryLabel:f,probabilityLabel:x.toFixed(3)},S=[];-1!==l.parcatsViewModel.hoverinfoItems.indexOf("count")&&S.push(["Count:",C.countLabel].join(" ")),-1!==l.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(S.push("P(color \u2229 "+f+"): "+C.probabilityLabel),S.push("P("+f+" | color): "+P.toFixed(3)),S.push("P(color | "+f+"): "+G.toFixed(3)));var A=S.join("
"),b=s.mostReadable(d.color,["black","white"]);return{trace:I,x:o*(a-e.left),y:c*(y-e.top),text:A,color:d.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:b,fontSize:10,idealAlign:t,hovertemplate:I.hovertemplate,hovertemplateLabels:C,eventData:[{data:I._input,fullData:I,category:f,count:g,probability:x,categorycount:h,colorcount:v,bandcolorcount:_}]}}(n,t,d):"dimension"===u&&(e=function(r,e,n){var a=[];return i.select(n.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){a.push(M(r,e,this))})),a}(n,t,d)),e&&o.loneHover(e,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:n}))}}function k(r){var e=r.parcatsViewModel;e.dragDimension||(x(e.pathSelection),G(e.dimensionSelection.selectAll("g.category")),C(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(y),-1!==e.hoverinfoItems.indexOf("skip"))||("color"===r.parcatsViewModel.hoveron?b(this,"plotly_unhover",i.event):A(this,"plotly_unhover",i.event))}function F(r){"fixed"!==r.parcatsViewModel.arrangement&&(r.dragDimensionDisplayInd=r.model.displayInd,r.initialDragDimensionDisplayInds=r.parcatsViewModel.model.dimensions.map((function(r){return r.displayInd})),r.dragHasMoved=!1,r.dragCategoryDisplayInd=null,i.select(this).selectAll("g.category").select("rect.catrect").each((function(e){var n=i.mouse(this)[0],a=i.mouse(this)[1];-2<=n&&n<=e.width+2&&-2<=a&&a<=e.height+2&&(r.dragCategoryDisplayInd=e.model.displayInd,r.initialDragCategoryDisplayInds=r.model.categories.map((function(r){return r.displayInd})),e.model.dragY=e.y,c.raiseToTop(this.parentNode),i.select(this.parentNode).selectAll("rect.bandrect").each((function(e){e.yl.y+l.height/2&&(o.model.displayInd=l.model.displayInd,l.model.displayInd=u),r.dragCategoryDisplayInd=o.model.displayInd}if(null===r.dragCategoryDisplayInd||"freeform"===r.parcatsViewModel.arrangement){t.model.dragX=i.event.x;var m=r.parcatsViewModel.dimensions[n],p=r.parcatsViewModel.dimensions[a];void 0!==m&&t.model.dragXp.x&&(t.model.displayInd=p.model.displayInd,p.model.displayInd=r.dragDimensionDisplayInd),r.dragDimensionDisplayInd=t.model.displayInd}U(r.parcatsViewModel),J(r.parcatsViewModel),N(r.parcatsViewModel),E(r.parcatsViewModel)}}function w(r){if("fixed"!==r.parcatsViewModel.arrangement&&null!==r.dragDimensionDisplayInd){i.select(this).selectAll("text").attr("font-weight","normal");var e={},n=R(r.parcatsViewModel),a=r.parcatsViewModel.model.dimensions.map((function(r){return r.displayInd})),o=r.initialDragDimensionDisplayInds.some((function(r,e){return r!==a[e]}));o&&a.forEach((function(n,i){var a=r.parcatsViewModel.model.dimensions[i].containerInd;e["dimensions["+a+"].displayindex"]=n}));var c=!1;if(null!==r.dragCategoryDisplayInd){var u=r.model.categories.map((function(r){return r.displayInd}));if(c=r.initialDragCategoryDisplayInds.some((function(r,e){return r!==u[e]}))){var d=r.model.categories.slice().sort((function(r,e){return r.displayInd-e.displayInd})),s=d.map((function(r){return r.categoryValue})),l=d.map((function(r){return r.categoryLabel}));e["dimensions["+r.model.containerInd+"].categoryarray"]=[s],e["dimensions["+r.model.containerInd+"].ticktext"]=[l],e["dimensions["+r.model.containerInd+"].categoryorder"]="array"}}-1===r.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!r.dragHasMoved&&r.potentialClickBand&&("color"===r.parcatsViewModel.hoveron?b(r.potentialClickBand,"plotly_click",i.event.sourceEvent):A(r.potentialClickBand,"plotly_click",i.event.sourceEvent)),r.model.dragX=null,null!==r.dragCategoryDisplayInd&&(r.parcatsViewModel.dimensions[r.dragDimensionDisplayInd].categories[r.dragCategoryDisplayInd].model.dragY=null,r.dragCategoryDisplayInd=null),r.dragDimensionDisplayInd=null,r.parcatsViewModel.dragDimension=null,r.dragHasMoved=null,r.potentialClickBand=null,U(r.parcatsViewModel),J(r.parcatsViewModel),i.transition().duration(300).ease("cubic-in-out").each((function(){N(r.parcatsViewModel,!0),E(r.parcatsViewModel,!0)})).each("end",(function(){(o||c)&&t.restyle(r.parcatsViewModel.graphDiv,e,[n])}))}}function R(r){for(var e,n=r.graphDiv._fullData,i=0;i=0;c--)s+="C"+d[c]+","+(e[c+1]+i)+" "+u[c]+","+(e[c]+i)+" "+(r[c]+n[c])+","+(e[c]+i),s+="l-"+n[c]+",0 ";return s+="Z"}function J(r){var e=r.dimensions,n=r.model,i=e.map((function(r){return r.categories.map((function(r){return r.y}))})),a=r.model.dimensions.map((function(r){return r.categories.map((function(r){return r.displayInd}))})),t=r.model.dimensions.map((function(r){return r.displayInd})),o=r.dimensions.map((function(r){return r.model.dimensionInd})),c=e.map((function(r){return r.x})),u=e.map((function(r){return r.width})),d=[];for(var s in n.paths)n.paths.hasOwnProperty(s)&&d.push(n.paths[s]);function l(r){var e=r.categoryInds.map((function(r,e){return a[e][r]}));return o.map((function(r){return e[r]}))}d.sort((function(e,n){var i=l(e),a=l(n);return"backward"===r.sortpaths&&(i.reverse(),a.reverse()),i.push(e.valueInds[0]),a.push(n.valueInds[0]),r.bundlecolors&&(i.unshift(e.rawColor),a.unshift(n.rawColor)),ia?1:0}));for(var m=new Array(d.length),p=e[0].model.count,I=e[0].categories.map((function(r){return r.height})).reduce((function(r,e){return r+e})),y=0;y0?I*(g.count/p):0;for(var _,h=new Array(i.length),v=0;v1?(r.width-80-16)/(i-1):0)*a;var t,o,c,u,d,s=[],l=r.model.maxCats,m=e.categories.length,p=e.count,I=r.height-8*(l-1),y=8*(l-m)/2,f=e.categories.map((function(r){return{displayInd:r.displayInd,categoryInd:r.categoryInd}}));for(f.sort((function(r,e){return r.displayInd-e.displayInd})),d=0;d0?o.count/p*I:0,c={key:o.valueInds[0],model:o,width:16,height:t,y:null!==o.dragY?o.dragY:y,bands:[],parcatsViewModel:r},y=y+t+8,s.push(c);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:n,y:0,width:16,model:e,categories:s,parcatsViewModel:r,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}r.exports=function(r,e,n,i){m(n,r,i,e)}},60268:function(r,e,n){"use strict";var i=n(51036);r.exports=function(r,e,n,a){var t=r._fullLayout,o=t._paper,c=t._size;i(r,o,e,{width:c.w,height:c.h,margin:{t:c.t,r:c.r,b:c.b,l:c.l}},n,a)}},82296:function(r,e,n){"use strict";var i=n(49084),a=n(94724),t=n(25376),o=n(86968).u,c=n(92880).extendFlat,u=n(31780).templatedArray;r.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:t({editType:"plot"}),tickfont:t({autoShadowDflt:!0,editType:"plot"}),rangefont:t({editType:"plot"}),dimensions:u("dimension",{label:{valType:"string",editType:"plot"},tickvals:c({},a.tickvals,{editType:"plot"}),ticktext:c({},a.ticktext,{editType:"plot"}),tickformat:c({},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:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:c({editType:"calc"},i("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(r,e,n){"use strict";var i=n(30140),a=n(33428),t=n(71688).keyFun,o=n(71688).repeat,c=n(3400).sorterAsc,u=n(3400).strTranslate,d=i.bar.snapRatio;function s(r,e){return r*(1-d)+e*d}var l=i.bar.snapClose;function m(r,e){return r*(1-l)+e*l}function p(r,e,n,i){if(function(r,e){for(var n=0;n=e[n][0]&&r<=e[n][1])return!0;return!1}(n,i))return n;var a=r?-1:1,t=0,o=e.length-1;if(a<0){var c=t;t=o,o=c}for(var u=e[t],d=u,l=t;a*le){m=n;break}}if(t=s,isNaN(t)&&(t=isNaN(l)||isNaN(m)?isNaN(l)?m:l:e-d[l][1]r[1]+n||e=.9*r[1]+.1*r[0]?"n":e<=.9*r[0]+.1*r[1]?"s":"ns"}(I,e);y&&(o.interval=u[t],o.intervalPix=I,o.region=y)}}if(r.ordinal&&!o.region){var f=r.unitTickvals,_=r.unitToPaddedPx.invert(e);for(n=0;n=h[0]&&_<=h[1]){o.clickableOrdinalRange=h;break}}}return o}function P(r,e){a.event.sourceEvent.stopPropagation();var n=e.height-a.mouse(r)[1]-2*i.verticalPadding,t=e.brush.svgBrush;t.wasDragged=!0,t._dragging=!0,t.grabbingBar?t.newExtent=[n-t.grabPoint,n+t.barLength-t.grabPoint].map(e.unitToPaddedPx.invert):t.newExtent=[t.startExtent,e.unitToPaddedPx.invert(n)].sort(c),e.brush.filterSpecified=!0,t.extent=t.stayingIntervals.concat([t.newExtent]),t.brushCallback(e),v(r.parentNode)}function G(r,e){var n=x(e,e.height-a.mouse(r)[1]-2*i.verticalPadding),t="crosshair";n.clickableOrdinalRange?t="pointer":n.region&&(t=n.region+"-resize"),a.select(document.body).style("cursor",t)}function C(r){r.on("mousemove",(function(r){a.event.preventDefault(),r.parent.inBrushDrag||G(this,r)})).on("mouseleave",(function(r){r.parent.inBrushDrag||_()})).call(a.behavior.drag().on("dragstart",(function(r){!function(r,e){a.event.sourceEvent.stopPropagation();var n=e.height-a.mouse(r)[1]-2*i.verticalPadding,t=e.unitToPaddedPx.invert(n),o=e.brush,c=x(e,n),u=c.interval,d=o.svgBrush;if(d.wasDragged=!1,d.grabbingBar="ns"===c.region,d.grabbingBar){var s=u.map(e.unitToPaddedPx);d.grabPoint=n-s[0]-i.verticalPadding,d.barLength=s[1]-s[0]}d.clickableOrdinalRange=c.clickableOrdinalRange,d.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],u&&(d.stayingIntervals=d.stayingIntervals.filter((function(r){return r[0]!==u[0]&&r[1]!==u[1]}))),d.startExtent=c.region?u["s"===c.region?1:0]:t,e.parent.inBrushDrag=!0,d.brushStartCallback()}(this,r)})).on("drag",(function(r){P(this,r)})).on("dragend",(function(r){!function(r,e){var n=e.brush,i=n.filter,t=n.svgBrush;t._dragging||(G(r,e),P(r,e),e.brush.svgBrush.wasDragged=!1),t._dragging=!1,a.event.sourceEvent.stopPropagation();var o=t.grabbingBar;if(t.grabbingBar=!1,t.grabLocation=void 0,e.parent.inBrushDrag=!1,_(),!t.wasDragged)return t.wasDragged=void 0,t.clickableOrdinalRange?n.filterSpecified&&e.multiselect?t.extent.push(t.clickableOrdinalRange):(t.extent=[t.clickableOrdinalRange],n.filterSpecified=!0):o?(t.extent=t.stayingIntervals,0===t.extent.length&&A(n)):A(n),t.brushCallback(e),v(r.parentNode),void t.brushEndCallback(n.filterSpecified?i.getConsolidated():[]);var c=function(){i.set(i.getConsolidated())};if(e.ordinal){var u=e.unitTickvals;u[u.length-1]t.newExtent[0];t.extent=t.stayingIntervals.concat(d?[t.newExtent]:[]),t.extent.length||A(n),t.brushCallback(e),d?v(r.parentNode,c):(c(),v(r.parentNode))}else c();t.brushEndCallback(n.filterSpecified?i.getConsolidated():[])}(this,r)})))}function S(r,e){return r[0]-e[0]}function A(r){r.filterSpecified=!1,r.svgBrush.extent=[[-1/0,1/0]]}function b(r){for(var e,n=r.slice(),i=[],a=n.shift();a;){for(e=a.slice();(a=n.shift())&&a[0]<=e[1];)e[1]=Math.max(e[1],a[1]);i.push(e)}return 1===i.length&&i[0][0]>i[0][1]&&(i=[]),i}r.exports={makeBrush:function(r,e,n,i,a,t){var o,u=function(){var r,e,n=[];return{set:function(i){1===(n=i.map((function(r){return r.slice().sort(c)})).sort(S)).length&&n[0][0]===-1/0&&n[0][1]===1/0&&(n=[[0,-1]]),r=b(n),e=n.reduce((function(r,e){return[Math.min(r[0],e[0]),Math.max(r[1],e[1])]}),[1/0,-1/0])},get:function(){return n.slice()},getConsolidated:function(){return r},getBounds:function(){return e}}}();return u.set(n),{filter:u,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:i,brushCallback:(o=a,function(r){var e=r.brush,n=function(r){return r.svgBrush.extent.map((function(r){return r.slice()}))}(e),i=n.slice();e.filter.set(i),o()}),brushEndCallback:t}}},ensureAxisBrush:function(r,e,n){var a=r.selectAll("."+i.cn.axisBrush).data(o,t);a.enter().append("g").classed(i.cn.axisBrush,!0),function(r,e,n){var a=n._context.staticPlot,t=r.selectAll(".background").data(o);t.enter().append("rect").classed("background",!0).call(I).call(y).style("pointer-events",a?"none":"auto").attr("transform",u(0,i.verticalPadding)),t.call(C).attr("height",(function(r){return r.height-i.verticalPadding}));var c=r.selectAll(".highlight-shadow").data(o);c.enter().append("line").classed("highlight-shadow",!0).attr("x",-i.bar.width/2).attr("stroke-width",i.bar.width+i.bar.strokeWidth).attr("stroke",e).attr("opacity",i.bar.strokeOpacity).attr("stroke-linecap","butt"),c.attr("y1",(function(r){return r.height})).call(h);var d=r.selectAll(".highlight").data(o);d.enter().append("line").classed("highlight",!0).attr("x",-i.bar.width/2).attr("stroke-width",i.bar.width-i.bar.strokeWidth).attr("stroke",i.bar.fillColor).attr("opacity",i.bar.fillOpacity).attr("stroke-linecap","butt"),d.attr("y1",(function(r){return r.height})).call(h)}(a,e,n)},cleanRanges:function(r,e){if(Array.isArray(r[0])?(r=r.map((function(r){return r.sort(c)})),r=e.multiselect?b(r.sort(S)):[r[0]]):r=[r.sort(c)],e.tickvals){var n=e.tickvals.slice().sort(c);if(!(r=r.map((function(r){var e=[p(0,n,r[0],[]),p(1,n,r[1],[])];if(e[1]>e[0])return e})).filter((function(r){return r}))).length)return}return r.length>1?r:r[0]}}},61664:function(r,e,n){"use strict";r.exports={attributes:n(82296),supplyDefaults:n(60664),calc:n(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:n(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(r,e,n){"use strict";var i=n(33428),a=n(84888)._M,t=n(24196),o=n(9616);e.name="parcoords",e.plot=function(r){var e=a(r.calcdata,"parcoords")[0];e.length&&t(r,e)},e.clean=function(r,e,n,i){var a=i._has&&i._has("parcoords"),t=e._has&&e._has("parcoords");a&&!t&&(i._paperdiv.selectAll(".parcoords").remove(),i._glimages.selectAll("*").remove())},e.toSVG=function(r){var e=r._fullLayout._glimages,n=i.select(r).selectAll(".svg-container");n.filter((function(r,e){return e===n.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var r=this,n=r.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})})),window.setTimeout((function(){i.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},95044:function(r,e,n){"use strict";var i=n(3400).isArrayOrTypedArray,a=n(8932),t=n(71688).wrap;r.exports=function(r,e){var n,o;return a.hasColorscale(e,"line")&&i(e.line.color)?(n=e.line.color,o=a.extractOpts(e.line).colorscale,a.calc(r,e,{vals:n,containerStr:"line",cLetter:"c"})):(n=function(r){for(var e=new Array(r),n=0;nl&&(i.log("parcoords traces support up to "+l+" dimensions at the moment"),I.splice(l));var y=c(r,e,{name:"dimensions",layout:u,handleItemDefaults:p}),f=function(r,e,n,o,c){var u=c("line.color",n);if(a(r,"line")&&i.isArrayOrTypedArray(u)){if(u.length)return c("line.colorscale"),t(r,e,o,c,{prefix:"line.",cLetter:"c"}),u.length;e.line.color=n}return 1/0}(r,e,n,u,s);o(e,u,s),Array.isArray(y)&&y.length||(e.visible=!1),m(e,y,"values",f);var g=i.extendFlat({},u.font,{size:Math.round(u.font.size/1.2)});i.coerceFont(s,"labelfont",g),i.coerceFont(s,"tickfont",g,{autoShadowDflt:!0}),i.coerceFont(s,"rangefont",g),s("labelangle"),s("labelside"),s("unselected.line.color"),s("unselected.line.opacity")}},95724:function(r,e,n){"use strict";var i=n(3400).isTypedArray;e.convertTypedArray=function(r){return i(r)?Array.prototype.slice.call(r):r},e.isOrdinal=function(r){return!!r.tickvals},e.isVisible=function(r){return r.visible||!("visible"in r)}},29928:function(r,e,n){"use strict";var i=n(61664);i.plot=n(24196),r.exports=i},51352:function(r,e,n){"use strict";var i=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join("\n"),a=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join("\n"),t=n(30140).maxDimensionCount,o=n(3400),c=1e-6,u=2048,d=new Uint8Array(4),s=new Uint8Array(4),l={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function m(r,e,n,i,a){var t=r._gl;t.enable(t.SCISSOR_TEST),t.scissor(e,n,i,a),r.clear({color:[0,0,0,0],depth:1})}function p(r,e,n,i,a,t){var o=t.key;n.drawCompleted||(function(r){r.read({x:0,y:0,width:1,height:1,data:d})}(r),n.drawCompleted=!0),function c(u){var d=Math.min(i,a-u*i);0===u&&(window.cancelAnimationFrame(n.currentRafs[o]),delete n.currentRafs[o],m(r,t.scissorX,t.scissorY,t.scissorWidth,t.viewBoxSize[1])),n.clearOnly||(t.count=2*d,t.offset=2*u*i,e(t),u*i+d>>8*e)%256/255}function f(r,e,n){for(var i=new Array(8*e),a=0,t=0;ts&&(s=r[a].dim1.canvasX,o=a);0===c&&m(S,0,0,n.canvasWidth,n.canvasHeight);var l=function(r){var e,n,i,a=[[],[]];for(i=0;i<64;i++){var t=!r&&ic._length&&(M=M.slice(0,c._length));var k,F=c.tickvals;function z(r,e){return{val:r,text:k[e]}}function w(r,e){return r.val-e.val}if(t(F)&&F.length){a.isTypedArray(F)&&(F=Array.from(F)),k=c.ticktext,t(k)&&k.length?k.length>F.length?k=k.slice(0,F.length):F.length>k.length&&(F=F.slice(0,k.length)):k=F.map(o(c.tickformat));for(var R=1;R=n||u>=a)return;var d=r.lineLayer.readPixel(c,a-1-u),s=0!==d[3],l=s?d[2]+256*(d[1]+256*d[0]):null,m={x:c,y:u,clientX:e.clientX,clientY:e.clientY,dataIndex:r.model.key,curveNumber:l};l!==T&&(s?t.hover(m):t.unhover&&t.unhover(m),T=l)}})),M.style("opacity",(function(r){return r.pick?0:1})),p.style("background","rgba(255, 255, 255, 0)");var D=p.selectAll("."+h.cn.parcoords).data(b,y);D.exit().remove(),D.enter().append("g").classed(h.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),D.attr("transform",(function(r){return s(r.model.translateX,r.model.translateY)}));var J=D.selectAll("."+h.cn.parcoordsControlView).data(f,y);J.enter().append("g").classed(h.cn.parcoordsControlView,!0),J.attr("transform",(function(r){return s(r.model.pad.l,r.model.pad.t)}));var U=J.selectAll("."+h.cn.yAxis).data((function(r){return r.dimensions}),y);U.enter().append("g").classed(h.cn.yAxis,!0),J.each((function(r){R(U,r,P)})),M.each((function(r){if(r.viewModel){!r.lineLayer||t?r.lineLayer=x(this,r):r.lineLayer.update(r),(r.key||0===r.key)&&(r.viewModel[r.key]=r.lineLayer);var e=!r.context||t;r.lineLayer.render(r.viewModel.panels,e)}})),U.attr("transform",(function(r){return s(r.xScale(r.xIndex),0)})),U.call(i.behavior.drag().origin((function(r){return r})).on("drag",(function(r){var e=r.parent;A.linePickActive(!1),r.x=Math.max(-h.overdrag,Math.min(r.model.width+h.overdrag,i.event.x)),r.canvasX=r.x*r.model.canvasPixelRatio,U.sort((function(r,e){return r.x-e.x})).each((function(e,n){e.xIndex=n,e.x=r===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),R(U,e,P),U.filter((function(e){return 0!==Math.abs(r.xIndex-e.xIndex)})).attr("transform",(function(r){return s(r.xScale(r.xIndex),0)})),i.select(this).attr("transform",s(r.x,0)),U.each((function(n,i,a){a===r.parent.key&&(e.dimensions[i]=n)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!B(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on("dragend",(function(r){var e=r.parent;r.x=r.xScale(r.xIndex),r.canvasX=r.x*r.model.canvasPixelRatio,R(U,e,P),i.select(this).attr("transform",(function(r){return s(r.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!B(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),A.linePickActive(!0),t&&t.axesMoved&&t.axesMoved(e.key,e.dimensions.map((function(r){return r.crossfilterDimensionIndex})))}))),U.exit().remove();var H=U.selectAll("."+h.cn.axisOverlays).data(f,y);H.enter().append("g").classed(h.cn.axisOverlays,!0),H.selectAll("."+h.cn.axis).remove();var L=H.selectAll("."+h.cn.axis).data(f,y);L.enter().append("g").classed(h.cn.axis,!0),L.each((function(r){var e=r.model.height/r.model.tickDistance,n=r.domainScale,a=n.domain();i.select(this).call(i.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,r.tickFormat).tickValues(r.ordinal?a:null).tickFormat((function(e){return _.isOrdinal(r)?e:E(r.model.dimensions[r.visibleIndex],e)})).scale(n)),m.font(L.selectAll("text"),r.model.tickFont)})),L.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),L.selectAll("text").style("cursor","default");var O=H.selectAll("."+h.cn.axisHeading).data(f,y);O.enter().append("g").classed(h.cn.axisHeading,!0);var K=O.selectAll("."+h.cn.axisTitle).data(f,y);K.enter().append("text").classed(h.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),K.text((function(r){return r.label})).each((function(e){var n=i.select(this);m.font(n,e.model.labelFont),l.convertToTspans(n,r)})).attr("transform",(function(r){var e=w(r.model.labelAngle,r.model.labelSide),n=h.axisTitleOffset;return(e.dir>0?"":s(0,2*n+r.model.height))+d(e.degrees)+s(-n*e.dx,-n*e.dy)})).attr("text-anchor",(function(r){var e=w(r.model.labelAngle,r.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"}));var V=H.selectAll("."+h.cn.axisExtent).data(f,y);V.enter().append("g").classed(h.cn.axisExtent,!0);var j=V.selectAll("."+h.cn.axisExtentTop).data(f,y);j.enter().append("g").classed(h.cn.axisExtentTop,!0),j.attr("transform",s(0,-h.axisExtentOffset));var W=j.selectAll("."+h.cn.axisExtentTopText).data(f,y);W.enter().append("text").classed(h.cn.axisExtentTopText,!0).call(z),W.text((function(r){return N(r,!0)})).each((function(r){m.font(i.select(this),r.model.rangeFont)}));var Z=V.selectAll("."+h.cn.axisExtentBottom).data(f,y);Z.enter().append("g").classed(h.cn.axisExtentBottom,!0),Z.attr("transform",(function(r){return s(0,r.model.height+h.axisExtentOffset)}));var q=Z.selectAll("."+h.cn.axisExtentBottomText).data(f,y);q.enter().append("text").classed(h.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(z),q.text((function(r){return N(r,!1)})).each((function(r){m.font(i.select(this),r.model.rangeFont)})),v.ensureAxisBrush(H,C,r)}},24196:function(r,e,n){"use strict";var i=n(36336),a=n(5048),t=n(95724).isVisible,o={};function c(r,e,n){var i=e.indexOf(n),a=r.indexOf(i);return-1===a&&(a+=e.length),a}(r.exports=function(r,e){var n=r._fullLayout;if(a(r,[],o)){var u={},d={},s={},l={},m=n._size;e.forEach((function(e,n){var i=e[0].trace;s[n]=i.index;var a=l[n]=i._fullInput.index;u[n]=r.data[a].dimensions,d[n]=r.data[a].dimensions.slice()})),i(r,e,{width:m.w,height:m.h,margin:{t:m.t,r:m.r,b:m.b,l:m.l}},{filterChanged:function(e,i,a){var t=d[e][i],o=a.map((function(r){return r.slice()})),c="dimensions["+i+"].constraintrange",u=n._tracePreGUI[r._fullData[s[e]]._fullInput.uid];if(void 0===u[c]){var m=t.constraintrange;u[c]=m||null}var p=r._fullData[s[e]].dimensions[i];o.length?(1===o.length&&(o=o[0]),t.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete t.constraintrange,delete p.constraintrange,o=null);var I={};I[c]=o,r.emit("plotly_restyle",[I,[l[e]]])},hover:function(e){r.emit("plotly_hover",e)},unhover:function(e){r.emit("plotly_unhover",e)},axesMoved:function(e,n){var i=function(r,e){return function(n,i){return c(r,e,n)-c(r,e,i)}}(n,d[e].filter(t));u[e].sort(i),d[e].filter((function(r){return!t(r)})).sort((function(r){return d[e].indexOf(r)})).forEach((function(r){u[e].splice(u[e].indexOf(r),1),u[e].splice(d[e].indexOf(r),0,r)})),r.emit("plotly_restyle",[{dimensions:[u[e]]},[l[e]]])}})}}).reglPrecompiled=o},74996:function(r,e,n){"use strict";var i=n(45464),a=n(86968).u,t=n(25376),o=n(22548),c=n(21776).Ks,u=n(21776).Gw,d=n(92880).extendFlat,s=n(98192).c,l=t({editType:"plot",arrayOk:!0,colorEditType:"plot"});r.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"},pattern:s,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:d({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:c({},{keys:["label","color","value","percent","text"]}),texttemplate:u({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:d({},l,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:d({},l,{}),outsidetextfont:d({},l,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:d({},l,{}),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:"angle",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:d({},l,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(r,e,n){"use strict";var i=n(7316);e.name="pie",e.plot=function(r,n,a,t){i.plotBasePlot(e.name,r,n,a,t)},e.clean=function(r,n,a,t){i.cleanBasePlot(e.name,r,n,a,t)}},45768:function(r,e,n){"use strict";var i=n(38248),a=n(49760),t=n(76308),o={};function c(r){return function(e,n){return!!e&&!!(e=a(e)).isValid()&&(e=t.addOpacity(e,e.getAlpha()),r[n]||(r[n]=e),e)}}function u(r,e){var n,i=JSON.stringify(r),t=e[i];if(!t){for(t=r.slice(),n=0;n=0})),("funnelarea"===e.type?g:e.sort)&&t.sort((function(r,e){return e.v-r.v})),t[0]&&(t[0].vTotal=f),t},crossTraceCalc:function(r,e){var n=(e||{}).type;n||(n="pie");var i=r._fullLayout,a=r.calcdata,t=i[n+"colorway"],c=i["_"+n+"colormap"];i["extend"+n+"colors"]&&(t=u(t,o));for(var d=0,s=0;s0){c=!0;break}}c||(o=0)}return{hasLabels:n,hasValues:t,len:o}}function s(r,e,n,i,a){i("marker.line.width")&&i("marker.line.color",a?void 0:n.paper_bgcolor);var t=i("marker.colors");u(i,"marker.pattern",t),r.marker&&!e.marker.pattern.fgcolor&&(e.marker.pattern.fgcolor=r.marker.colors),e.marker.pattern.bgcolor||(e.marker.pattern.bgcolor=n.paper_bgcolor)}r.exports={handleLabelsAndValues:d,handleMarkerDefaults:s,supplyDefaults:function(r,e,n,i){function u(n,i){return a.coerce(r,e,t,n,i)}var l=d(u("labels"),u("values")),m=l.len;if(e._hasLabels=l.hasLabels,e._hasValues=l.hasValues,!e._hasLabels&&e._hasValues&&(u("label0"),u("dlabel")),m){e._length=m,s(r,e,i,u,!0),u("scalegroup");var p,I=u("text"),y=u("texttemplate");if(y||(p=u("textinfo",a.isArrayOrTypedArray(I)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),y||p&&"none"!==p){var f=u("textposition");c(r,e,i,u,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(f)||"auto"===f||"outside"===f)&&u("automargin"),("inside"===f||"auto"===f||Array.isArray(f))&&u("insidetextorientation")}else"none"===p&&u("textposition","none");o(e,i,u);var g=u("hole");if(u("title.text")){var _=u("title.position",g?"middle center":"top center");g||"middle center"!==_||(e.title.position="top center"),a.coerceFont(u,"title.font",i.font)}u("sort"),u("direction"),u("rotation"),u("pull")}else e.visible=!1}}},53644:function(r,e,n){"use strict";var i=n(10624).appendArrayMultiPointValues;r.exports=function(r,e){var n={curveNumber:e.index,pointNumbers:r.pts,data:e._input,fullData:e,label:r.label,color:r.color,value:r.v,percent:r.percent,text:r.text,bbox:r.bbox,v:r.v};return 1===r.pts.length&&(n.pointNumber=n.i=r.pts[0]),i(n,e,r.pts),"funnelarea"===e.type&&(delete n.v,delete n.i),n}},21552:function(r,e,n){"use strict";var i=n(43616),a=n(76308);r.exports=function(r,e,n,t){var o=n.marker.pattern;o&&o.shape?i.pointStyle(r,n,t,e):a.fill(r,e.color)}},69656:function(r,e,n){"use strict";var i=n(3400);function a(r){return-1!==r.indexOf("e")?r.replace(/[.]?0+e/,"e"):-1!==r.indexOf(".")?r.replace(/[.]?0+$/,""):r}e.formatPiePercent=function(r,e){var n=a((100*r).toPrecision(3));return i.numSeparate(n,e)+"%"},e.formatPieValue=function(r,e){var n=a(r.toPrecision(10));return i.numSeparate(n,e)},e.getFirstFilled=function(r,e){if(i.isArrayOrTypedArray(r))for(var n=0;n"),name:l.hovertemplate||-1!==m.indexOf("name")?l.name:void 0,idealAlign:r.pxmid[0]<0?"left":"right",color:f.castOption(x.bgcolor,r.pts)||r.color,borderColor:f.castOption(x.bordercolor,r.pts),fontFamily:f.castOption(P.family,r.pts),fontSize:f.castOption(P.size,r.pts),fontColor:f.castOption(P.color,r.pts),nameLength:f.castOption(x.namelength,r.pts),textAlign:f.castOption(x.align,r.pts),hovertemplate:f.castOption(l.hovertemplate,r.pts),hovertemplateLabels:r,eventData:[g(r,l)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:e,inOut_bbox:G}),r.bbox=G[0],d._hasHoverLabel=!0}d._hasHoverEvent=!0,e.emit("plotly_hover",{points:[g(r,l)],event:i.event})}})),r.on("mouseout",(function(r){var n=e._fullLayout,a=e._fullData[d.index],o=i.select(this).datum();d._hasHoverEvent&&(r.originalEvent=i.event,e.emit("plotly_unhover",{points:[g(o,a)],event:i.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(t.loneUnhover(n._hoverlayer.node()),d._hasHoverLabel=!1)})),r.on("click",(function(r){var n=e._fullLayout,a=e._fullData[d.index];e._dragging||!1===n.hovermode||(e._hoverdata=[g(r,a)],t.click(e,i.event))}))}function v(r,e,n){var i=f.castOption(r.insidetextfont.color,e.pts);!i&&r._input.textfont&&(i=f.castOption(r._input.textfont.color,e.pts));var a=f.castOption(r.insidetextfont.family,e.pts)||f.castOption(r.textfont.family,e.pts)||n.family,t=f.castOption(r.insidetextfont.size,e.pts)||f.castOption(r.textfont.size,e.pts)||n.size,c=f.castOption(r.insidetextfont.weight,e.pts)||f.castOption(r.textfont.weight,e.pts)||n.weight,u=f.castOption(r.insidetextfont.style,e.pts)||f.castOption(r.textfont.style,e.pts)||n.style,d=f.castOption(r.insidetextfont.variant,e.pts)||f.castOption(r.textfont.variant,e.pts)||n.variant,s=f.castOption(r.insidetextfont.textcase,e.pts)||f.castOption(r.textfont.textcase,e.pts)||n.textcase,l=f.castOption(r.insidetextfont.lineposition,e.pts)||f.castOption(r.textfont.lineposition,e.pts)||n.lineposition,m=f.castOption(r.insidetextfont.shadow,e.pts)||f.castOption(r.textfont.shadow,e.pts)||n.shadow;return{color:i||o.contrast(e.color),family:a,size:t,weight:c,style:u,variant:d,textcase:s,lineposition:l,shadow:m}}function x(r,e){for(var n,i,a=0;ae&&e>i||n=-4;f-=2)g(Math.PI*f,"tan");for(f=4;f>=-4;f-=2)g(Math.PI*(f+1),"tan")}if(l||p){for(f=4;f>=-4;f-=2)g(Math.PI*(f+1.5),"rad");for(f=4;f>=-4;f-=2)g(Math.PI*(f+.5),"rad")}}if(c||I||l){var _=Math.sqrt(r.width*r.width+r.height*r.height);if((t={scale:a*i*2/_,rCenter:1-a,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,t.scale>=1)return t;y.push(t)}(I||p)&&((t=G(r,i,o,u,d)).textPosAngle=(e.startangle+e.stopangle)/2,y.push(t)),(I||m)&&((t=C(r,i,o,u,d)).textPosAngle=(e.startangle+e.stopangle)/2,y.push(t));for(var h=0,v=0,x=0;x=1)break}return y[h]}function G(r,e,n,i,a){e=Math.max(0,e-2*y);var t=r.width/r.height,o=b(t,i,e,n);return{scale:2*o/r.height,rCenter:S(t,o/e),rotate:A(a)}}function C(r,e,n,i,a){e=Math.max(0,e-2*y);var t=r.height/r.width,o=b(t,i,e,n);return{scale:2*o/r.width,rCenter:S(t,o/e),rotate:A(a+Math.PI/2)}}function S(r,e){return Math.cos(e)-r*e}function A(r){return(180/Math.PI*r+720)%180-90}function b(r,e,n,i){var a=r+1/(2*Math.tan(e));return n*Math.min(1/(Math.sqrt(a*a+.5)+a),i/(Math.sqrt(r*r+i/2)+r))}function M(r,e){return r.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(r.halfangle)),r.ring/2):1}function B(r,e){var n=e.pxmid[0],i=e.pxmid[1],a=r.width/2,t=r.height/2;return n<0&&(a*=-1),i<0&&(t*=-1),{scale:1,rCenter:1,rotate:0,x:a+Math.abs(t)*(a>0?1:-1)/2,y:t/(1+n*n/(i*i)),outside:!0}}function k(r,e){var n,i,a,t=r.trace,o={x:r.cx,y:r.cy},c={tx:0,ty:0};c.ty+=t.title.font.size,a=z(t),-1!==t.title.position.indexOf("top")?(o.y-=(1+a)*r.r,c.ty-=r.titleBox.height):-1!==t.title.position.indexOf("bottom")&&(o.y+=(1+a)*r.r);var u,d,s=(u=r.r,d=r.trace.aspectratio,u/(void 0===d?1:d)),l=e.w*(t.domain.x[1]-t.domain.x[0])/2;return-1!==t.title.position.indexOf("left")?(l+=s,o.x-=(1+a)*s,c.tx+=r.titleBox.width/2):-1!==t.title.position.indexOf("center")?l*=2:-1!==t.title.position.indexOf("right")&&(l+=s,o.x+=(1+a)*s,c.tx-=r.titleBox.width/2),n=l/r.titleBox.width,i=F(r,e)/r.titleBox.height,{x:o.x,y:o.y,scale:Math.min(n,i),tx:c.tx,ty:c.ty}}function F(r,e){var n=r.trace,i=e.h*(n.domain.y[1]-n.domain.y[0]);return Math.min(r.titleBox.height,i/2)}function z(r){var e,n=r.pull;if(!n)return 0;if(u.isArrayOrTypedArray(n))for(n=0,e=0;en&&(n=r.pull[e]);return n}function w(r,e){for(var n=[],i=0;i1?s=(d=n.r)/a.aspectratio:d=(s=n.r)*a.aspectratio,u=(d*=(1+a.baseratio)/2)*s}o=Math.min(o,u/n.vTotal)}for(i=0;i")}if(t){var h=u.castOption(a,e.i,"texttemplate");if(h){var v=function(r){return{label:r.label,value:r.v,valueLabel:f.formatPieValue(r.v,i.separators),percent:r.v/n.vTotal,percentLabel:f.formatPiePercent(r.v/n.vTotal,i.separators),color:r.color,text:r.text,customdata:u.castOption(a,r.i,"customdata")}}(e),x=f.getFirstFilled(a.text,e.pts);(_(x)||""===x)&&(v.text=x),e.text=u.texttemplateString(h,v,r._fullLayout._d3locale,v,a._meta||{})}else e.text=""}}function N(r,e){var n=r.rotate*Math.PI/180,i=Math.cos(n),a=Math.sin(n),t=(e.left+e.right)/2,o=(e.top+e.bottom)/2;r.textX=t*i-o*a,r.textY=t*a+o*i,r.noCenter=!0}r.exports={plot:function(r,e){var n=r._context.staticPlot,t=r._fullLayout,m=t._size;I("pie",t),x(e,r),w(e,m);var y=u.makeTraceGroups(t._pielayer,e,"trace").each((function(e){var I=i.select(this),y=e[0],g=y.trace;!function(r){var e,n,i,a=r[0],t=a.r,o=a.trace,c=f.getRotationAngle(o.rotation),u=2*Math.PI/a.vTotal,d="px0",s="px1";if("counterclockwise"===o.direction){for(e=0;ea.vTotal/2?1:0,n.halfangle=Math.PI*Math.min(n.v/a.vTotal,.5),n.ring=1-o.hole,n.rInscribed=M(n,a))}(e),I.attr("stroke-linejoin","round"),I.each((function(){var _=i.select(this).selectAll("g.slice").data(e);_.enter().append("g").classed("slice",!0),_.exit().remove();var x=[[[],[]],[[],[]]],G=!1;_.each((function(a,o){if(a.hidden)i.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=g.index,x[a.pxmid[1]<0?0:1][a.pxmid[0]<0?0:1].push(a);var d=y.cx,s=y.cy,m=i.select(this),I=m.selectAll("path.surface").data([a]);if(I.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),m.call(h,r,e),g.pull){var _=+f.castOption(g.pull,a.pts)||0;_>0&&(d+=_*a.pxmid[0],s+=_*a.pxmid[1])}a.cxFinal=d,a.cyFinal=s;var C=g.hole;if(a.v===y.vTotal){var S="M"+(d+a.px0[0])+","+(s+a.px0[1])+F(a.px0,a.pxmid,!0,1)+F(a.pxmid,a.px0,!0,1)+"Z";C?I.attr("d","M"+(d+C*a.px0[0])+","+(s+C*a.px0[1])+F(a.px0,a.pxmid,!1,C)+F(a.pxmid,a.px0,!1,C)+"Z"+S):I.attr("d",S)}else{var A=F(a.px0,a.px1,!0,1);if(C){var b=1-C;I.attr("d","M"+(d+C*a.px1[0])+","+(s+C*a.px1[1])+F(a.px1,a.px0,!1,C)+"l"+b*a.px0[0]+","+b*a.px0[1]+A+"Z")}else I.attr("d","M"+d+","+s+"l"+a.px0[0]+","+a.px0[1]+A+"Z")}E(r,a,y);var M=f.castOption(g.textposition,a.pts),k=m.selectAll("g.slicetext").data(a.text&&"none"!==M?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each((function(){var n=u.ensureSingle(i.select(this),"text","",(function(r){r.attr("data-notex",1)})),m=u.ensureUniformFontSize(r,"outside"===M?function(r,e,n){var i=f.castOption(r.outsidetextfont.color,e.pts)||f.castOption(r.textfont.color,e.pts)||n.color,a=f.castOption(r.outsidetextfont.family,e.pts)||f.castOption(r.textfont.family,e.pts)||n.family,t=f.castOption(r.outsidetextfont.size,e.pts)||f.castOption(r.textfont.size,e.pts)||n.size,o=f.castOption(r.outsidetextfont.weight,e.pts)||f.castOption(r.textfont.weight,e.pts)||n.weight,c=f.castOption(r.outsidetextfont.style,e.pts)||f.castOption(r.textfont.style,e.pts)||n.style,u=f.castOption(r.outsidetextfont.variant,e.pts)||f.castOption(r.textfont.variant,e.pts)||n.variant,d=f.castOption(r.outsidetextfont.textcase,e.pts)||f.castOption(r.textfont.textcase,e.pts)||n.textcase,s=f.castOption(r.outsidetextfont.lineposition,e.pts)||f.castOption(r.textfont.lineposition,e.pts)||n.lineposition,l=f.castOption(r.outsidetextfont.shadow,e.pts)||f.castOption(r.textfont.shadow,e.pts)||n.shadow;return{color:i,family:a,size:t,weight:o,style:c,variant:u,textcase:d,lineposition:s,shadow:l}}(g,a,t.font):v(g,a,t.font));n.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(c.font,m).call(l.convertToTspans,r);var I,_=c.bBox(n.node());if("outside"===M)I=B(_,a);else if(I=P(_,a,y),"auto"===M&&I.scale<1){var h=u.ensureUniformFontSize(r,g.outsidetextfont);n.call(c.font,h),I=B(_=c.bBox(n.node()),a)}var x=I.textPosAngle,C=void 0===x?a.pxmid:R(y.r,x);if(I.targetX=d+C[0]*I.rCenter+(I.x||0),I.targetY=s+C[1]*I.rCenter+(I.y||0),N(I,_),I.outside){var S=I.targetY;a.yLabelMin=S-_.height/2,a.yLabelMid=S,a.yLabelMax=S+_.height/2,a.labelExtraX=0,a.labelExtraY=0,G=!0}I.fontSize=m.size,p(g.type,I,t),e[o].transform=I,u.setTransormAndDisplay(n,I)}))}function F(r,e,n,i){var t=i*(e[0]-r[0]),o=i*(e[1]-r[1]);return"a"+i*y.r+","+i*y.r+" 0 "+a.largeArc+(n?" 1 ":" 0 ")+t+","+o}}));var C=i.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);if(C.enter().append("g").classed("titletext",!0),C.exit().remove(),C.each((function(){var e,n=u.ensureSingle(i.select(this),"text","",(function(r){r.attr("data-notex",1)})),a=g.title.text;g._meta&&(a=u.templateString(a,g._meta)),n.text(a).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(c.font,g.title.font).call(l.convertToTspans,r),e="middle center"===g.title.position?function(r){var e=Math.sqrt(r.titleBox.width*r.titleBox.width+r.titleBox.height*r.titleBox.height);return{x:r.cx,y:r.cy,scale:r.trace.hole*r.r*2/e,tx:0,ty:-r.titleBox.height/2+r.trace.title.font.size}}(y):k(y,m),n.attr("transform",s(e.x,e.y)+d(Math.min(1,e.scale))+s(e.tx,e.ty))})),G&&function(r,e){var n,i,a,t,o,c,d,s,l,m,p,I,y;function g(r,e){return r.pxmid[1]-e.pxmid[1]}function _(r,e){return e.pxmid[1]-r.pxmid[1]}function h(r,n){n||(n={});var a,s,l,p,I=n.labelExtraY+(i?n.yLabelMax:n.yLabelMin),y=i?r.yLabelMin:r.yLabelMax,g=i?r.yLabelMax:r.yLabelMin,_=r.cyFinal+o(r.px0[1],r.px1[1]),h=I-y;if(h*d>0&&(r.labelExtraY=h),u.isArrayOrTypedArray(e.pull))for(s=0;s=(f.castOption(e.pull,l.pts)||0)||((r.pxmid[1]-l.pxmid[1])*d>0?(h=l.cyFinal+o(l.px0[1],l.px1[1])-y-r.labelExtraY)*d>0&&(r.labelExtraY+=h):(g+r.labelExtraY-_)*d>0&&(a=3*c*Math.abs(s-m.indexOf(r)),(p=l.cxFinal+t(l.px0[0],l.px1[0])+a-(r.cxFinal+r.pxmid[0])-r.labelExtraX)*c>0&&(r.labelExtraX+=p)))}for(i=0;i<2;i++)for(a=i?g:_,o=i?Math.max:Math.min,d=i?1:-1,n=0;n<2;n++){for(t=n?Math.max:Math.min,c=n?1:-1,(s=r[i][n]).sort(a),l=r[1-i][n],m=l.concat(s),I=[],p=0;pMath.abs(l)?c+="l"+l*r.pxmid[0]/r.pxmid[1]+","+l+"H"+(t+r.labelExtraX+d):c+="l"+r.labelExtraX+","+s+"v"+(l-s)+"h"+d}else c+="V"+(r.yLabelMid+r.labelExtraY)+"h"+d;u.ensureSingle(n,"path","textline").call(o.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:c,fill:"none"})}else n.select("path.textline").remove()}))}(_,g),G&&g.automargin){var S=c.bBox(I.node()),A=g.domain,b=m.w*(A.x[1]-A.x[0]),M=m.h*(A.y[1]-A.y[0]),F=(.5*b-y.r)/m.w,z=(.5*M-y.r)/m.h;a.autoMargin(r,"pie."+g.uid+".automargin",{xl:A.x[0]-F,xr:A.x[1]+F,yb:A.y[0]-z,yt:A.y[1]+z,l:Math.max(y.cx-y.r-S.left,0),r:Math.max(S.right-(y.cx+y.r),0),b:Math.max(S.bottom-(y.cy+y.r),0),t:Math.max(y.cy-y.r-S.top,0),pad:5})}}))}));setTimeout((function(){y.selectAll("tspan").each((function(){var r=i.select(this);r.attr("dy")&&r.attr("dy",r.attr("dy"))}))}),0)},formatSliceLabel:E,transformInsideText:P,determineInsideTextFont:v,positionTitleOutside:k,prerenderTitles:x,layoutAreas:w,attachFxHandlers:h,computeTransform:N}},22152:function(r,e,n){"use strict";var i=n(33428),a=n(10528),t=n(82744).resizeText;r.exports=function(r){var e=r._fullLayout._pielayer.selectAll(".trace");t(r,e,"pie"),e.each((function(e){var n=e[0].trace,t=i.select(this);t.style({opacity:n.opacity}),t.selectAll("path.surface").each((function(e){i.select(this).call(a,e,n,r)}))}))}},10528:function(r,e,n){"use strict";var i=n(76308),a=n(69656).castOption,t=n(21552);r.exports=function(r,e,n,o){var c=n.marker.line,u=a(c.color,e.pts)||i.defaultLine,d=a(c.width,e.pts)||0;r.call(t,e,n,o).style("stroke-width",d).call(i.stroke,u)}},35484:function(r,e,n){"use strict";var i=n(52904);r.exports={x:i.x,y:i.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:i.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}},11072:function(r,e,n){"use strict";var i=n(67792).gl_pointcloud2d,a=n(3400).isArrayOrTypedArray,t=n(43080),o=n(19280).findExtremes,c=n(44928);function u(r,e){this.scene=r,this.uid=e,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=i(r.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var d=u.prototype;d.handlePick=function(r){var e=this.idToIndex[r.pointId];return{trace:this,dataCoord:r.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:a(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},d.update=function(r){this.index=r.index,this.textLabels=r.text,this.name=r.name,this.hoverinfo=r.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(r),this.color=c(r,{})},d.updateFast=function(r){var e,n,i,a,c,u,d=this.xData=this.pickXData=r.x,s=this.yData=this.pickYData=r.y,l=this.pickXYData=r.xy,m=r.xbounds&&r.ybounds,p=r.indices,I=this.bounds;if(l){if(i=l,e=l.length>>>1,m)I[0]=r.xbounds[0],I[2]=r.xbounds[1],I[1]=r.ybounds[0],I[3]=r.ybounds[1];else for(u=0;uI[2]&&(I[2]=a),cI[3]&&(I[3]=c);if(p)n=p;else for(n=new Int32Array(e),u=0;uI[2]&&(I[2]=a),cI[3]&&(I[3]=c);this.idToIndex=n,this.pointcloudOptions.idToIndex=n,this.pointcloudOptions.positions=i;var y=t(r.marker.color),f=t(r.marker.border.color),g=r.opacity*r.marker.opacity;y[3]*=g,this.pointcloudOptions.color=y;var _=r.marker.blend;null===_&&(_=d.length<100||s.length<100),this.pointcloudOptions.blend=_,f[3]*=g,this.pointcloudOptions.borderColor=f;var h=r.marker.sizemin,v=Math.max(r.marker.sizemax,r.marker.sizemin);this.pointcloudOptions.sizeMin=h,this.pointcloudOptions.sizeMax=v,this.pointcloudOptions.areaRatio=r.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var x=this.scene.xaxis,P=this.scene.yaxis,G=v/2||.5;r._extremes[x._id]=o(x,[I[0],I[2]],{ppad:G}),r._extremes[P._id]=o(P,[I[1],I[3]],{ppad:G})},d.dispose=function(){this.pointcloud.dispose()},r.exports=function(r,e){var n=new u(r,e.uid);return n.update(e),n}},41904:function(r,e,n){"use strict";var i=n(3400),a=n(35484);r.exports=function(r,e,n){function t(n,t){return i.coerce(r,e,a,n,t)}t("x"),t("y"),t("xbounds"),t("ybounds"),r.xy&&r.xy instanceof Float32Array&&(e.xy=r.xy),r.indices&&r.indices instanceof Int32Array&&(e.indices=r.indices),t("text"),t("marker.color",n),t("marker.opacity"),t("marker.blend"),t("marker.sizemin"),t("marker.sizemax"),t("marker.border.color",n),t("marker.border.arearatio"),e._length=null}},156:function(r,e,n){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" "),r.exports={attributes:n(35484),supplyDefaults:n(41904),calc:n(41484),plot:n(11072),moduleType:"trace",name:"pointcloud",basePlotModule:n(39952),categories:["gl","gl2d","showLegend"],meta:{}}},41440:function(r,e,n){"use strict";var i=n(25376),a=n(45464),t=n(22548),o=n(55756),c=n(86968).u,u=n(21776).Ks,d=n(49084),s=n(31780).templatedArray,l=n(29736).descriptionOnlyNumbers,m=n(92880).extendFlat,p=n(67824).overrideAll;(r.exports=p({hoverinfo:m({},a.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:c({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:l("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:i({autoShadowDflt:!0}),customdata:void 0,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},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:t.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:u({},{keys:["value","label"]}),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:t.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:u({},{keys:["value","label"]}),colorscales:s("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:m(d().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},10760:function(r,e,n){"use strict";var i=n(67824).overrideAll,a=n(84888)._M,t=n(59596),o=n(65460),c=n(93972),u=n(86476),d=n(22676).prepSelect,s=n(3400),l=n(24040),m="sankey";function p(r,e){var n=r._fullData[e],i=r._fullLayout,a=i.dragmode,t="pan"===i.dragmode?"move":"crosshair",o=n._bgRect;if(o&&"pan"!==a&&"zoom"!==a){c(o,t);var m={_id:"x",c2p:s.identity,_offset:n._sankey.translateX,_length:n._sankey.width},p={_id:"y",c2p:s.identity,_offset:n._sankey.translateY,_length:n._sankey.height},I={gd:r,element:o.node(),plotinfo:{id:e,xaxis:m,yaxis:p,fillRangeItems:s.noop},subplot:e,xaxes:[m],yaxes:[p],doneFnCompleted:function(n){var i,a=r._fullData[e],t=a.node.groups.slice(),o=[];function c(r){for(var e=a._sankey.graph.nodes,n=0;nh&&(h=t.source[e]),t.target[e]>h&&(h=t.target[e]);var v,x=h+1;r.node._count=x;var P=r.node.groups,G={};for(e=0;e0&&c(B,x)&&c(k,x)&&(!G.hasOwnProperty(B)||!G.hasOwnProperty(k)||G[B]!==G[k])){G.hasOwnProperty(k)&&(k=G[k]),G.hasOwnProperty(B)&&(B=G[B]),k=+k,p[B=+B]=p[k]=!0;var F="";t.label&&t.label[e]&&(F=t.label[e]);var z=null;F&&I.hasOwnProperty(F)&&(z=I[F]),d.push({pointNumber:e,label:F,color:s?t.color[e]:t.color,hovercolor:l?t.hovercolor[e]:t.hovercolor,customdata:m?t.customdata[e]:t.customdata,concentrationscale:z,source:B,target:k,value:+M}),b.source.push(B),b.target.push(k)}}var w=x+P.length,R=o(n.color),E=o(n.customdata),N=[];for(e=0;ex-1,childrenNodes:[],pointNumber:e,label:T,color:R?n.color[e]:n.color,customdata:E?n.customdata[e]:n.customdata})}var D=!1;return function(r,e,n){for(var t=a.init2dArray(r,0),o=0;o1}))}(w,b.source,b.target)&&(D=!0),{circular:D,links:d,nodes:N,groups:P,groupLookup:G}}r.exports=function(r,e){var n=d(e);return t({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}},11820:function(r){"use strict";r.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",nodeLabel:"node-label"}}},47140:function(r,e,n){"use strict";var i=n(3400),a=n(41440),t=n(76308),o=n(49760),c=n(86968).Q,u=n(16132),d=n(31780),s=n(51272);function l(r,e){function n(n,t){return i.coerce(r,e,a.link.colorscales,n,t)}n("label"),n("cmin"),n("cmax"),n("colorscale")}r.exports=function(r,e,n,m){function p(n,t){return i.coerce(r,e,a,n,t)}var I=i.extendDeep(m.hoverlabel,r.hoverlabel),y=r.node,f=d.newContainer(e,"node");function g(r,e){return i.coerce(y,f,a.node,r,e)}g("label"),g("groups"),g("x"),g("y"),g("pad"),g("thickness"),g("line.color"),g("line.width"),g("hoverinfo",r.hoverinfo),u(y,f,g,I),g("hovertemplate"),g("align");var _=m.colorway;g("color",f.label.map((function(r,e){return t.addOpacity(function(r){return _[r%_.length]}(e),.8)}))),g("customdata");var h=r.link||{},v=d.newContainer(e,"link");function x(r,e){return i.coerce(h,v,a.link,r,e)}x("label"),x("arrowlen"),x("source"),x("target"),x("value"),x("line.color"),x("line.width"),x("hoverinfo",r.hoverinfo),u(h,v,x,I),x("hovertemplate");var P,G=o(m.paper_bgcolor).getLuminance()<.333,C=x("color",G?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)");function S(r){var e=o(r);if(!e.isValid())return r;var n=e.getAlpha();return n<=.8?e.setAlpha(n+.2):e=G?e.brighten():e.darken(),e.toRgbString()}x("hovercolor",Array.isArray(C)?C.map(S):S(C)),x("customdata"),s(h,v,{name:"colorscales",handleItemDefaults:l}),c(e,m,p),p("orientation"),p("valueformat"),p("valuesuffix"),f.x.length&&f.y.length&&(P="freeform"),p("arrangement",P),i.coerceFont(p,"textfont",m.font,{autoShadowDflt:!0}),e._length=null}},45499:function(r,e,n){"use strict";r.exports={attributes:n(41440),supplyDefaults:n(47140),calc:n(48068),plot:n(59596),moduleType:"trace",name:"sankey",basePlotModule:n(10760),selectPoints:n(81128),categories:["noOpacity"],meta:{}}},59596:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=a.numberFormat,o=n(83248),c=n(93024),u=n(76308),d=n(11820).cn,s=a._;function l(r){return""!==r}function m(r,e){return r.filter((function(r){return r.key===e.traceId}))}function p(r,e){i.select(r).select("path").style("fill-opacity",e),i.select(r).select("rect").style("fill-opacity",e)}function I(r){i.select(r).select("text.name").style("fill","black")}function y(r){return function(e){return-1!==r.node.sourceLinks.indexOf(e.link)||-1!==r.node.targetLinks.indexOf(e.link)}}function f(r){return function(e){return-1!==e.node.sourceLinks.indexOf(r.link)||-1!==e.node.targetLinks.indexOf(r.link)}}function g(r,e,n){e&&n&&m(n,e).selectAll("."+d.sankeyLink).filter(y(e)).call(h.bind(0,e,n,!1))}function _(r,e,n){e&&n&&m(n,e).selectAll("."+d.sankeyLink).filter(y(e)).call(v.bind(0,e,n,!1))}function h(r,e,n,i){i.style("fill",(function(r){if(!r.link.concentrationscale)return r.tinyColorHoverHue})).style("fill-opacity",(function(r){if(!r.link.concentrationscale)return r.tinyColorHoverAlpha})),i.each((function(n){var i=n.link.label;""!==i&&m(e,r).selectAll("."+d.sankeyLink).filter((function(r){return r.link.label===i})).style("fill",(function(r){if(!r.link.concentrationscale)return r.tinyColorHoverHue})).style("fill-opacity",(function(r){if(!r.link.concentrationscale)return r.tinyColorHoverAlpha}))})),n&&m(e,r).selectAll("."+d.sankeyNode).filter(f(r)).call(g)}function v(r,e,n,i){i.style("fill",(function(r){return r.tinyColorHue})).style("fill-opacity",(function(r){return r.tinyColorAlpha})),i.each((function(n){var i=n.link.label;""!==i&&m(e,r).selectAll("."+d.sankeyLink).filter((function(r){return r.link.label===i})).style("fill",(function(r){return r.tinyColorHue})).style("fill-opacity",(function(r){return r.tinyColorAlpha}))})),n&&m(e,r).selectAll(d.sankeyNode).filter(f(r)).call(_)}function x(r,e){var n=r.hoverlabel||{},i=a.nestedProperty(n,e).get();return!Array.isArray(i)&&i}r.exports=function(r,e){for(var n=r._fullLayout,a=n._paper,m=n._size,y=0;y"),color:x(o,"bgcolor")||u.addOpacity(y.color,1),borderColor:x(o,"bordercolor"),fontFamily:x(o,"font.family"),fontSize:x(o,"font.size"),fontColor:x(o,"font.color"),fontWeight:x(o,"font.weight"),fontStyle:x(o,"font.style"),fontVariant:x(o,"font.variant"),fontTextcase:x(o,"font.textcase"),fontLineposition:x(o,"font.lineposition"),fontShadow:x(o,"font.shadow"),nameLength:x(o,"namelength"),textAlign:x(o,"align"),idealAlign:i.event.x"),color:x(o,"bgcolor")||a.tinyColorHue,borderColor:x(o,"bordercolor"),fontFamily:x(o,"font.family"),fontSize:x(o,"font.size"),fontColor:x(o,"font.color"),fontWeight:x(o,"font.weight"),fontStyle:x(o,"font.style"),fontVariant:x(o,"font.variant"),fontTextcase:x(o,"font.textcase"),fontLineposition:x(o,"font.lineposition"),fontShadow:x(o,"font.shadow"),nameLength:x(o,"namelength"),textAlign:x(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:_,eventData:[a.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r});p(P,.85),I(P)}}},unhover:function(e,a,t){!1!==r._fullLayout.hovermode&&(i.select(e).call(_,a,t),"skip"!==a.node.trace.node.hoverinfo&&(a.node.fullData=a.node.trace,r.emit("plotly_unhover",{event:i.event,points:[a.node]})),c.loneUnhover(n._hoverlayer.node()))},select:function(e,n,a){var t=n.node;t.originalEvent=i.event,r._hoverdata=[t],i.select(e).call(_,n,a),c.click(r,{target:!0})}}})}},83248:function(r,e,n){"use strict";var i=n(49812),a=n(67756).Gz,t=n(33428),o=n(26800),c=n(48932),u=n(11820),d=n(49760),s=n(76308),l=n(43616),m=n(3400),p=m.strTranslate,I=m.strRotate,y=n(71688),f=y.keyFun,g=y.repeat,_=y.unwrap,h=n(72736),v=n(24040),x=n(84284),P=x.CAP_SHIFT,G=x.LINE_SPACING;function C(r,e,n){var i,a=_(e),t=a.trace,s=t.domain,l="h"===t.orientation,p=t.node.pad,I=t.node.thickness,y={justify:o.sankeyJustify,left:o.sankeyLeft,right:o.sankeyRight,center:o.sankeyCenter}[t.node.align],f=r.width*(s.x[1]-s.x[0]),g=r.height*(s.y[1]-s.y[0]),h=a._nodes,v=a._links,x=a.circular;(i=x?c.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(u.sankeyIterations).size(l?[f,g]:[g,f]).nodeWidth(I).nodePadding(p).nodeId((function(r){return r.pointNumber})).nodeAlign(y).nodes(h).links(v);var P,G,C,S=i();for(var A in i.nodePadding()=a||(n=a-e.y0)>1e-6&&(e.y0+=n,e.y1+=n),a=e.y1+p}))}(function(r){var e,n,i=r.map((function(r,e){return{x0:r.x0,index:e}})).sort((function(r,e){return r.x0-e.x0})),a=[],t=-1,o=-1/0;for(P=0;Po+I&&(t+=1,e=c.x0),o=c.x0,a[t]||(a[t]=[]),a[t].push(c),n=e-c.x0,c.x0+=n,c.x1+=n}return a}(h=S.nodes)),i.update(S)}return{circular:x,key:n,trace:t,guid:m.randstr(),horizontal:l,width:f,height:g,nodePad:t.node.pad,nodeLineColor:t.node.line.color,nodeLineWidth:t.node.line.width,linkLineColor:t.link.line.color,linkLineWidth:t.link.line.width,linkArrowLength:t.link.arrowlen,valueFormat:t.valueformat,valueSuffix:t.valuesuffix,textFont:t.textfont,translateX:s.x[0]*r.width+r.margin.l,translateY:r.height-s.y[1]*r.height+r.margin.t,dragParallel:l?g:f,dragPerpendicular:l?f:g,arrangement:t.arrangement,sankey:i,graph:S,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function S(r,e,n){var i=d(e.color),a=d(e.hovercolor),t=e.source.label+"|"+e.target.label+"__"+n;return e.trace=r.trace,e.curveNumber=r.trace.index,{circular:r.circular,key:t,traceId:r.key,pointNumber:e.pointNumber,link:e,tinyColorHue:s.tinyRGB(i),tinyColorAlpha:i.getAlpha(),tinyColorHoverHue:s.tinyRGB(a),tinyColorHoverAlpha:a.getAlpha(),linkPath:A,linkLineColor:r.linkLineColor,linkLineWidth:r.linkLineWidth,linkArrowLength:r.linkArrowLength,valueFormat:r.valueFormat,valueSuffix:r.valueSuffix,sankey:r.sankey,parent:r,interactionState:r.interactionState,flow:e.flow}}function A(){return function(r){var e=r.linkArrowLength;if(r.link.circular)return function(r,e){var n=r.width/2,i=r.circularPathData;return"top"===r.circularLinkType?"M "+(i.targetX-e)+" "+(i.targetY+n)+" L"+(i.rightInnerExtent-e)+" "+(i.targetY+n)+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 1 "+(i.rightFullExtent-n-e)+" "+(i.targetY-i.rightSmallArcRadius)+"L"+(i.rightFullExtent-n-e)+" "+i.verticalRightInnerExtent+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 1 "+(i.rightInnerExtent-e)+" "+(i.verticalFullExtent-n)+"L"+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent+"L"+(i.leftFullExtent+n)+" "+(i.sourceY-i.leftSmallArcRadius)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.sourceY+n)+"L"+i.sourceX+" "+(i.sourceY+n)+"L"+i.sourceX+" "+(i.sourceY-n)+"L"+i.leftInnerExtent+" "+(i.sourceY-n)+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 0 "+(i.leftFullExtent-n)+" "+(i.sourceY-i.leftSmallArcRadius)+"L"+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+"L"+(i.rightInnerExtent-e)+" "+(i.verticalFullExtent+n)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 0 "+(i.rightFullExtent+n-e)+" "+i.verticalRightInnerExtent+"L"+(i.rightFullExtent+n-e)+" "+(i.targetY-i.rightSmallArcRadius)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 0 "+(i.rightInnerExtent-e)+" "+(i.targetY-n)+"L"+(i.targetX-e)+" "+(i.targetY-n)+(e>0?"L"+i.targetX+" "+i.targetY:"")+"Z":"M "+(i.targetX-e)+" "+(i.targetY-n)+" L"+(i.rightInnerExtent-e)+" "+(i.targetY-n)+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-e)+" "+(i.targetY+i.rightSmallArcRadius)+"L"+(i.rightFullExtent-n-e)+" "+i.verticalRightInnerExtent+"A"+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-e)+" "+(i.verticalFullExtent+n)+"L"+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent+"L"+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+"A"+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+"L"+i.sourceX+" "+(i.sourceY-n)+"L"+i.sourceX+" "+(i.sourceY+n)+"L"+i.leftInnerExtent+" "+(i.sourceY+n)+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+"L"+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent+"A"+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+"L"+(i.rightInnerExtent-e)+" "+(i.verticalFullExtent-n)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-e)+" "+i.verticalRightInnerExtent+"L"+(i.rightFullExtent+n-e)+" "+(i.targetY+i.rightSmallArcRadius)+"A"+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-e)+" "+(i.targetY+n)+"L"+(i.targetX-e)+" "+(i.targetY+n)+(e>0?"L"+i.targetX+" "+i.targetY:"")+"Z"}(r.link,e);var n=Math.abs((r.link.target.x0-r.link.source.x1)/2);e>n&&(e=n);var i=r.link.source.x1,t=r.link.target.x0-e,o=a(i,t),c=o(.5),u=o(.5),d=r.link.y0-r.link.width/2,s=r.link.y0+r.link.width/2,l=r.link.y1-r.link.width/2,m=r.link.y1+r.link.width/2,p="M"+i+","+d,I="C"+c+","+d+" "+u+","+l+" "+t+","+l,y="C"+u+","+m+" "+c+","+s+" "+i+","+s,f=e>0?"L"+(t+e)+","+(l+r.link.width/2):"";return p+I+(f+="L"+t+","+m)+y+"Z"}}function b(r,e){var n=d(e.color),i=u.nodePadAcross,a=r.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var t=e.dx,o=Math.max(.5,e.dy),c="node_"+e.pointNumber;return e.group&&(c=m.randstr()),e.trace=r.trace,e.curveNumber=r.trace.index,{index:e.pointNumber,key:c,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:r.key,trace:r.trace,node:e,nodePad:r.nodePad,nodeLineColor:r.nodeLineColor,nodeLineWidth:r.nodeLineWidth,textFont:r.textFont,size:r.horizontal?r.height:r.width,visibleWidth:Math.ceil(t),visibleHeight:o,zoneX:-i,zoneY:-a,zoneWidth:t+2*i,zoneHeight:o+2*a,labelY:r.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:r.width,forceLayouts:r.forceLayouts,horizontal:r.horizontal,darkBackground:n.getBrightness()<=128,tinyColorHue:s.tinyRGB(n),tinyColorAlpha:n.getAlpha(),valueFormat:r.valueFormat,valueSuffix:r.valueSuffix,sankey:r.sankey,graph:r.graph,arrangement:r.arrangement,uniqueNodeLabelPathId:[r.guid,r.key,c].join("_"),interactionState:r.interactionState,figure:r}}function M(r){r.attr("transform",(function(r){return p(r.node.x0.toFixed(3),r.node.y0.toFixed(3))}))}function B(r){r.call(M)}function k(r,e){r.call(B),e.attr("d",A())}function F(r){r.attr("width",(function(r){return r.node.x1-r.node.x0})).attr("height",(function(r){return r.visibleHeight}))}function z(r){return r.link.width>1||r.linkLineWidth>0}function w(r){return p(r.translateX,r.translateY)+(r.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function R(r,e,n){r.on(".basic",null).on("mouseover.basic",(function(r){r.interactionState.dragInProgress||r.partOfGroup||(n.hover(this,r,e),r.interactionState.hovered=[this,r])})).on("mousemove.basic",(function(r){r.interactionState.dragInProgress||r.partOfGroup||(n.follow(this,r),r.interactionState.hovered=[this,r])})).on("mouseout.basic",(function(r){r.interactionState.dragInProgress||r.partOfGroup||(n.unhover(this,r,e),r.interactionState.hovered=!1)})).on("click.basic",(function(r){r.interactionState.hovered&&(n.unhover(this,r,e),r.interactionState.hovered=!1),r.interactionState.dragInProgress||r.partOfGroup||n.select(this,r,e)}))}function E(r,e,n,a){var o=t.behavior.drag().origin((function(r){return{x:r.node.x0+r.visibleWidth/2,y:r.node.y0+r.visibleHeight/2}})).on("dragstart",(function(t){if("fixed"!==t.arrangement&&(m.ensureSingle(a._fullLayout._infolayer,"g","dragcover",(function(r){a._fullLayout._dragCover=r})),m.raiseToTop(this),t.interactionState.dragInProgress=t.node,T(t.node),t.interactionState.hovered&&(n.nodeEvents.unhover.apply(0,t.interactionState.hovered),t.interactionState.hovered=!1),"snap"===t.arrangement)){var o=t.traceId+"|"+t.key;t.forceLayouts[o]?t.forceLayouts[o].alpha(1):function(r,e,n,a){!function(r){for(var e=0;e0&&i.forceLayouts[e].alpha(0)}}(0,e,t,n)).stop()}(0,o,t),function(r,e,n,i,a){window.requestAnimationFrame((function t(){var o;for(o=0;o0)window.requestAnimationFrame(t);else{var c=n.node.originalX;n.node.x0=c-n.visibleWidth/2,n.node.x1=c+n.visibleWidth/2,N(n,a)}}))}(r,e,t,o,a)}})).on("drag",(function(n){if("fixed"!==n.arrangement){var i=t.event.x,a=t.event.y;"snap"===n.arrangement?(n.node.x0=i-n.visibleWidth/2,n.node.x1=i+n.visibleWidth/2,n.node.y0=a-n.visibleHeight/2,n.node.y1=a+n.visibleHeight/2):("freeform"===n.arrangement&&(n.node.x0=i-n.visibleWidth/2,n.node.x1=i+n.visibleWidth/2),a=Math.max(0,Math.min(n.size-n.visibleHeight/2,a)),n.node.y0=a-n.visibleHeight/2,n.node.y1=a+n.visibleHeight/2),T(n.node),"snap"!==n.arrangement&&(n.sankey.update(n.graph),k(r.filter(D(n)),e))}})).on("dragend",(function(r){if("fixed"!==r.arrangement){r.interactionState.dragInProgress=!1;for(var e=0;eu&&k[g].gap;)g--;for(h=k[g].s,y=k.length-1;y>g;y--)k[y].s=h;for(;ub[l]&&l=0;l--){var m=r[l];if("scatter"===m.type&&m.xaxis===d.xaxis&&m.yaxis===d.yaxis){m.opacity=void 0;break}}}}}},18800:function(r,e,n){"use strict";var i=n(3400),a=n(24040),t=n(52904),o=n(88200),c=n(43028),u=n(43980),d=n(31147),s=n(43912),l=n(74428),m=n(66828),p=n(11731),I=n(124),y=n(70840),f=n(3400).coercePattern;r.exports=function(r,e,n,g){function _(n,a){return i.coerce(r,e,t,n,a)}var h=u(r,e,g,_);if(h||(e.visible=!1),e.visible){d(r,e,g,_),_("xhoverformat"),_("yhoverformat"),_("zorder");var v=s(r,e,g,_);"group"===g.scattermode&&void 0===e.orientation&&_("orientation","v");var x=!v&&h=Math.min(e,n)&&I<=Math.max(e,n)?0:1/0}var i=Math.max(3,r.mrc||0),a=1-1/i,t=Math.abs(m.c2p(r.x)-I);return t=Math.min(e,n)&&y<=Math.max(e,n)?0:1/0}var i=Math.max(3,r.mrc||0),a=1-1/i,t=Math.abs(p.c2p(r.y)-y);return tn!==(d=a[i][1])>=n&&(o=a[i-1][0],c=a[i][0],d-u&&(t=o+(c-o)*(n-u)/(d-u),l=Math.min(l,t),I=Math.max(I,t)));return{x0:l=Math.max(l,0),x1:I=Math.min(I,m._length),y0:n,y1:n}}(l._polygons);null===z&&(z={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var w=c.defaultLine;return c.opacity(l.fillcolor)?w=l.fillcolor:c.opacity((l.line||{}).color)&&(w=l.line.color),i.extendFlat(r,{distance:r.maxHoverDistance,x0:z.x0,x1:z.x1,y0:z.y0,y1:z.y1,color:w,hovertemplate:!1}),delete r.index,l.text&&!i.isArrayOrTypedArray(l.text)?r.text=String(l.text):r.text=l.name,[r]}}},65875:function(r,e,n){"use strict";var i=n(43028);r.exports={hasLines:i.hasLines,hasMarkers:i.hasMarkers,hasText:i.hasText,isBubble:i.isBubble,attributes:n(52904),layoutAttributes:n(55308),supplyDefaults:n(18800),crossTraceDefaults:n(35036),supplyLayoutDefaults:n(59748),calc:n(16356).calc,crossTraceCalc:n(96664),arraysToCalcdata:n(20148),plot:n(96504),colorbar:n(5528),formatLabels:n(76688),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(98723),selectPoints:n(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:n(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(r){"use strict";r.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(r,e,n){"use strict";var i=n(3400),a=n(55308);r.exports=function(r,e){var n,t,o="group"===e.barmode;"group"===e.scattermode&&(n="scattergap",t=o?e.bargap:.2,i.coerce(r,e,a,n,t))}},66828:function(r,e,n){"use strict";var i=n(3400).isArrayOrTypedArray,a=n(94288).hasColorscale,t=n(27260);r.exports=function(r,e,n,o,c,u){u||(u={});var d=(r.marker||{}).color;d&&d._inputArray&&(d=d._inputArray),c("line.color",n),a(r,"line")?t(r,e,o,c,{prefix:"line.",cLetter:"c"}):c("line.color",!i(d)&&d||n),c("line.width"),u.noDash||c("line.dash"),u.backoff&&c("line.backoff")}},52340:function(r,e,n){"use strict";var i=n(43616),a=n(39032),t=a.BADNUM,o=a.LOG_CLIP,c=o+.5,u=o-.5,d=n(3400),s=d.segmentsIntersect,l=d.constrain,m=n(88200);r.exports=function(r,e){var n,a,o,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b,M=e.trace||{},B=e.xaxis,k=e.yaxis,F="log"===B.type,z="log"===k.type,w=B._length,R=k._length,E=e.backoff,N=M.marker,T=e.connectGaps,D=e.baseTolerance,J=e.shape,U="linear"===J,H=M.fill&&"none"!==M.fill,L=[],O=m.minTolerance,K=r.length,V=new Array(K),j=0;function W(n){var i=r[n];if(!i)return!1;var a=e.linearized?B.l2p(i.x):B.c2p(i.x),o=e.linearized?k.l2p(i.y):k.c2p(i.y);if(a===t){if(F&&(a=B.c2p(i.x,!0)),a===t)return!1;z&&o===t&&(a*=Math.abs(B._m*R*(B._m>0?c:u)/(k._m*w*(k._m>0?c:u)))),a*=1e3}if(o===t){if(z&&(o=k.c2p(i.y,!0)),o===t)return!1;o*=1e3}return[a,o]}function Z(r,e,n,i){var a=n-r,t=i-e,o=.5-r,c=.5-e,u=a*a+t*t,d=a*o+t*c;if(d>0&&dor||r[1]ur)return[l(r[0],tr,or),l(r[1],cr,ur)]}function lr(r,e){return r[0]===e[0]&&(r[0]===tr||r[0]===or)||r[1]===e[1]&&(r[1]===cr||r[1]===ur)||void 0}function mr(r,e,n){return function(i,a){var t=sr(i),o=sr(a),c=[];if(t&&o&&lr(t,o))return c;t&&c.push(t),o&&c.push(o);var u=2*d.constrain((i[r]+a[r])/2,e,n)-((t||i)[r]+(o||a)[r]);return u&&((t&&o?u>0===t[r]>o[r]?t:o:t||o)[r]+=u),c}}function pr(r){var e=r[0],n=r[1],i=e===V[j-1][0],a=n===V[j-1][1];if(!i||!a)if(j>1){var t=e===V[j-2][0],o=n===V[j-2][1];i&&(e===tr||e===or)&&t?o?j--:V[j-1]=r:a&&(n===cr||n===ur)&&o?t?j--:V[j-1]=r:V[j++]=r}else V[j++]=r}function Ir(r){V[j-1][0]!==r[0]&&V[j-1][1]!==r[1]&&pr([$,rr]),pr(r),er=null,$=rr=0}"linear"===J||"spline"===J?ir=function(r,e){for(var n=[],i=0,a=0;a<4;a++){var t=dr[a],o=s(r[0],r[1],e[0],e[1],t[0],t[1],t[2],t[3]);o&&(!i||Math.abs(o.x-n[0][0])>1||Math.abs(o.y-n[0][1])>1)&&(o=[o.x,o.y],i&&Y(o,r)or?or:0,Q=e[1]ur?ur:0,X||Q){if(j)if(er){var i=ir(er,e);i.length>1&&(Ir(i[0]),V[j++]=i[1])}else nr=ir(V[j-1],e)[0],V[j++]=nr;else V[j++]=[X||e[0],Q||e[1]];var a=V[j-1];X&&Q&&(a[0]!==X||a[1]!==Q)?(er&&($!==X&&rr!==Q?pr($&&rr?function(r,e){var n=e[0]-r[0],i=(e[1]-r[1])/n;return(r[1]*e[0]-e[1]*r[0])/n>0?[i>0?tr:or,ur]:[i>0?or:tr,cr]}(er,e):[$||X,rr||Q]):$&&rr&&pr([$,rr])),pr([X,Q])):$-X&&rr-Q&&pr([X||$,Q||rr]),er=e,$=X,rr=Q}else er&&Ir(ir(er,e)[0]),V[j++]=e}for(n=0;nq(y,gr))break;o=y,(P=_[0]*g[0]+_[1]*g[1])>v?(v=P,p=y,f=!1):P=r.length||!y)break;fr(y),a=y}}else fr(p)}er&&pr([$||er[0],rr||er[1]]),L.push(V.slice(0,j))}var _r=J.slice(J.length-1);if(E&&"h"!==_r&&"v"!==_r){for(var hr=!1,vr=-1,xr=[],Pr=0;Pr=0?u=p:(u=p=m,m++),u0?Math.max(n,t):0}}},5528:function(r){"use strict";r.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(r,e,n){"use strict";var i=n(76308),a=n(94288).hasColorscale,t=n(27260),o=n(43028);r.exports=function(r,e,n,c,u,d){var s=o.isBubble(r),l=(r.line||{}).color;d=d||{},l&&(n=l),u("marker.symbol"),u("marker.opacity",s?.7:1),u("marker.size"),d.noAngle||(u("marker.angle"),d.noAngleRef||u("marker.angleref"),d.noStandOff||u("marker.standoff")),u("marker.color",n),a(r,"marker")&&t(r,e,c,u,{prefix:"marker.",cLetter:"c"}),d.noSelect||(u("selected.marker.color"),u("unselected.marker.color"),u("selected.marker.size"),u("unselected.marker.size")),d.noLine||(u("marker.line.color",l&&!Array.isArray(l)&&e.marker.color!==l?l:s?i.background:i.defaultLine),a(r,"marker.line")&&t(r,e,c,u,{prefix:"marker.line.",cLetter:"c"}),u("marker.line.width",s?1:0)),s&&(u("marker.sizeref"),u("marker.sizemin"),u("marker.sizemode")),d.gradient&&"none"!==u("marker.gradient.type")&&u("marker.gradient.color")}},31147:function(r,e,n){"use strict";var i=n(3400).dateTick0,a=n(39032).ONEWEEK;function t(r,e){return i(e,r%a===0?1:0)}r.exports=function(r,e,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",t(o,e.xcalendar)),i("xperiodalignment"))}if(a.y){var c=i("yperiod");c&&(i("yperiod0",t(c,e.ycalendar)),i("yperiodalignment"))}}},96504:function(r,e,n){"use strict";var i=n(33428),a=n(24040),t=n(3400),o=t.ensureSingle,c=t.identity,u=n(43616),d=n(43028),s=n(52340),l=n(14328),m=n(92065).tester;function p(r,e,n,l,p,I,y){var f,g=r._context.staticPlot;!function(r,e,n,a,o){var c=n.xaxis,u=n.yaxis,s=i.extent(t.simpleMap(c.range,c.r2c)),l=i.extent(t.simpleMap(u.range,u.r2c)),m=a[0].trace;if(d.hasMarkers(m)){var p=m.marker.maxdisplayed;if(0!==p){var I=a.filter((function(r){return r.x>=s[0]&&r.x<=s[1]&&r.y>=l[0]&&r.y<=l[1]})),y=Math.ceil(I.length/p),f=0;o.forEach((function(r,n){var i=r[0].trace;d.hasMarkers(i)&&i.marker.maxdisplayed>0&&n0;function h(r){return _?r.transition():r}var v=n.xaxis,x=n.yaxis,P=l[0].trace,G=P.line,C=i.select(I),S=o(C,"g","errorbars"),A=o(C,"g","lines"),b=o(C,"g","points"),M=o(C,"g","text");if(a.getComponentMethod("errorbars","plot")(r,S,n,y),!0===P.visible){var B,k;h(C).style("opacity",P.opacity);var F,z,w=P.fill.charAt(P.fill.length-1);"x"!==w&&"y"!==w&&(w=""),"y"===w?(F=1,z=x.c2p(0,!0)):"x"===w&&(F=0,z=v.c2p(0,!0)),l[0][n.isRangePlot?"nodeRangePlot3":"node3"]=C;var R,E,N="",T=[],D=P._prevtrace,J=null,U=null;D&&(N=D._prevRevpath||"",k=D._nextFill,T=D._ownPolygons,J=D._fillsegments,U=D._fillElement);var H,L,O,K,V,j,W="",Z="",q=[];P._polygons=[];var Y=[],X=[],Q=t.noop;if(B=P._ownFill,d.hasLines(P)||"none"!==P.fill){k&&k.datum(l),-1!==["hv","vh","hvh","vhv"].indexOf(G.shape)?(H=u.steps(G.shape),L=u.steps(G.shape.split("").reverse().join(""))):H=L="spline"===G.shape?function(r){var e=r[r.length-1];return r.length>1&&r[0][0]===e[0]&&r[0][1]===e[1]?u.smoothclosed(r.slice(1),G.smoothing):u.smoothopen(r,G.smoothing)}:function(r){return"M"+r.join("L")},O=function(r){return L(r.reverse())},X=s(l,{xaxis:v,yaxis:x,trace:P,connectGaps:P.connectgaps,baseTolerance:Math.max(G.width||1,3)/4,shape:G.shape,backoff:G.backoff,simplify:G.simplify,fill:P.fill}),Y=new Array(X.length);var $=0;for(f=0;f0,f=l(r,e,n);(s=a.selectAll("g.trace").data(f,(function(r){return r[0].trace.uid}))).enter().append("g").attr("class",(function(r){return"trace scatter trace"+r[0].trace.uid})).style("stroke-miterlimit",2),s.order(),function(r,e,n){e.each((function(e){var a=o(i.select(this),"g","fills");u.setClipUrl(a,n.layerClipId,r);var t=e[0].trace,d=[];t._ownfill&&d.push("_ownFill"),t._nexttrace&&d.push("_nextFill");var s=a.selectAll("g").data(d,c);s.enter().append("g"),s.exit().each((function(r){t[r]=null})).remove(),s.order().each((function(r){t[r]=o(i.select(this),"path","js-fill")}))}))}(r,s,e),y?(d&&(m=d()),i.transition().duration(t.duration).ease(t.easing).each("end",(function(){m&&m()})).each("interrupt",(function(){m&&m()})).each((function(){a.selectAll("g.trace").each((function(n,i){p(r,i,e,n,f,this,t)}))}))):s.each((function(n,i){p(r,i,e,n,f,this,t)})),I&&s.exit().remove(),a.selectAll("path:not([d])").remove()}},91560:function(r,e,n){"use strict";var i=n(43028);r.exports=function(r,e){var n,a,t,o,c=r.cd,u=r.xaxis,d=r.yaxis,s=[],l=c[0].trace;if(!i.hasMarkers(l)&&!i.hasText(l))return[];if(!1===e)for(n=0;n0){var m=a.c2l(s);a._lowerLogErrorBound||(a._lowerLogErrorBound=m),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,m)}}else o[c]=[-u[0]*n,u[1]*n]}return o}r.exports=function(r,e,n){var i=[a(r.x,r.error_x,e[0],n.xaxis),a(r.y,r.error_y,e[1],n.yaxis),a(r.z,r.error_z,e[2],n.zaxis)],t=function(r){for(var e=0;e-1?-1:r.indexOf("right")>-1?1:0}function v(r){return null===r||void 0===r?0:r.indexOf("top")>-1?-1:r.indexOf("bottom")>-1?1:0}function x(r,e){return e(4*r)}function P(r){return p[r]}function G(r,e,n,i,a){var t=null;if(u.isArrayOrTypedArray(r)){t=[];for(var o=0;o=0){var y=function(r,e,n){var i,a=(n+1)%3,t=(n+2)%3,o=[],u=[];for(i=0;i=0&&l("surfacecolor",p||I);for(var y=["x","y","z"],f=0;f<3;++f){var g="projection."+y[f];l(g+".show")&&(l(g+".opacity"),l(g+".scale"))}var _=i.getComponentMethod("errorbars","supplyDefaults");_(r,e,p||I||n,{axis:"z"}),_(r,e,p||I||n,{axis:"y",inherit:"z"}),_(r,e,p||I||n,{axis:"x",inherit:"z"})}else e.visible=!1}},3296:function(r,e,n){"use strict";r.exports={plot:n(41064),attributes:n(91592),markerSymbols:n(87792),supplyDefaults:n(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:n(41484),moduleType:"trace",name:"scatter3d",basePlotModule:n(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(r,e,n){"use strict";var i=n(98304),a=n(52904),t=n(45464),o=n(21776).Ks,c=n(21776).Gw,u=n(49084),d=n(92880).extendFlat,s=a.marker,l=a.line,m=s.line;r.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:d({},a.mode,{dflt:"markers"}),text:d({},a.text,{}),texttemplate:c({editType:"plot"},{keys:["a","b","text"]}),hovertext:d({},a.hovertext,{}),line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:d({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:a.connectgaps,fill:d({},a.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:i(),marker:d({symbol:s.symbol,opacity:s.opacity,maxdisplayed:s.maxdisplayed,angle:s.angle,angleref:s.angleref,standoff:s.standoff,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,line:d({width:m.width,editType:"calc"},u("marker.line")),gradient:s.gradient,editType:"calc"},u("marker")),textfont:a.textfont,textposition:a.textposition,selected:a.selected,unselected:a.unselected,hoverinfo:d({},t.hoverinfo,{flags:["a","b","text","name"]}),hoveron:a.hoveron,hovertemplate:o(),zorder:a.zorder}},48228:function(r,e,n){"use strict";var i=n(38248),a=n(90136),t=n(20148),o=n(4500),c=n(16356).calcMarkerSize,u=n(50948);r.exports=function(r,e){var n=e._carpetTrace=u(r,e);if(n&&n.visible&&"legendonly"!==n.visible){var d;e.xaxis=n.xaxis,e.yaxis=n.yaxis;var s,l,m=e._length,p=new Array(m),I=!1;for(d=0;d")}return o}function _(r,e){var n;n=r.labelprefix&&r.labelprefix.length>0?r.labelprefix.replace(/ = $/,""):r._hovertitle,f.push(n+": "+e.toFixed(3)+r.labelsuffix)}}},4184:function(r,e,n){"use strict";r.exports={attributes:n(90372),supplyDefaults:n(6176),colorbar:n(5528),formatLabels:n(52364),calc:n(48228),plot:n(20036),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(58960),selectPoints:n(91560),eventData:n(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:n(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(r,e,n){"use strict";var i=n(96504),a=n(54460),t=n(43616);r.exports=function(r,e,n,o){var c,u,d,s=n[0][0].carpet,l=a.getFromId(r,s.xaxis||"x"),m=a.getFromId(r,s.yaxis||"y"),p={xaxis:l,yaxis:m,plot:e.plot};for(c=0;c")}function p(r){return r+"\xb0"}}(d,y,r,u[0].t.labels),r.hovertemplate=d.hovertemplate,[r]}}},36952:function(r,e,n){"use strict";r.exports={attributes:n(6096),supplyDefaults:n(86188),colorbar:n(5528),formatLabels:n(56696),calc:n(25212),calcGeoJSON:n(48691).calcGeoJSON,plot:n(48691).plot,style:n(25064),styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(64292),eventData:n(58544),selectPoints:n(8796),moduleType:"trace",name:"scattergeo",basePlotModule:n(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(59972).getTopojsonFeatures,o=n(44808),c=n(27144),u=n(19280).findExtremes,d=n(39032).BADNUM,s=n(16356).calcMarkerSize,l=n(43028),m=n(25064);r.exports={calcGeoJSON:function(r,e){var n,i,o=r[0].trace,l=e[o.geo],m=l._subplot,p=o._length;if(a.isArrayOrTypedArray(o.locations)){var I=o.locationmode,y="geojson-id"===I?c.extractTraceFeature(r):t(o,m.topojson);for(n=0;n=f,P=2*v,G={},C=u.makeCalcdata(e,"x"),S=_.makeCalcdata(e,"y"),A=c(e,u,"x",C),b=c(e,_,"y",S),M=A.vals,B=b.vals;e._x=M,e._y=B,e.xperiodalignment&&(e._origX=C,e._xStarts=A.starts,e._xEnds=A.ends),e.yperiodalignment&&(e._origY=S,e._yStarts=b.starts,e._yEnds=b.ends);var k=new Array(P),F=new Array(v);for(n=0;n1&&a.extendFlat(c.line,p.linePositions(r,n,i)),c.errorX||c.errorY){var u=p.errorBarPositions(r,n,i,t,o);c.errorX&&a.extendFlat(c.errorX,u.x),c.errorY&&a.extendFlat(c.errorY,u.y)}return c.text&&(a.extendFlat(c.text,{positions:i},p.textPosition(r,n,c.text,c.marker)),a.extendFlat(c.textSel,{positions:i},p.textPosition(r,n,c.text,c.markerSel)),a.extendFlat(c.textUnsel,{positions:i},p.textPosition(r,n,c.text,c.markerUnsel))),c}(r,0,e,k,M,B),R=I(r,h);return l(o,e),x?w.marker&&(z=w.marker.sizeAvg||Math.max(w.marker.size,3)):z=d(e,v),s(r,e,u,_,M,B,z),w.errorX&&g(e,u,w.errorX),w.errorY&&g(e,_,w.errorY),w.fill&&!R.fill2d&&(R.fill2d=!0),w.marker&&!R.scatter2d&&(R.scatter2d=!0),w.line&&!R.line2d&&(R.line2d=!0),!w.errorX&&!w.errorY||R.error2d||(R.error2d=!0),w.text&&!R.glText&&(R.glText=!0),w.marker&&(w.marker.snap=v),R.lineOptions.push(w.line),R.errorXOptions.push(w.errorX),R.errorYOptions.push(w.errorY),R.fillOptions.push(w.fill),R.markerOptions.push(w.marker),R.markerSelectedOptions.push(w.markerSel),R.markerUnselectedOptions.push(w.markerUnsel),R.textOptions.push(w.text),R.textSelectedOptions.push(w.textSel),R.textUnselectedOptions.push(w.textUnsel),R.selectBatch.push([]),R.unselectBatch.push([]),G._scene=R,G.index=R.count,G.x=M,G.y=B,G.positions=k,R.count++,[{x:!1,y:!1,t:G,trace:e}]}},67072:function(r){"use strict";r.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]}}},84236:function(r,e,n){"use strict";var i=n(38248),a=n(20472),t=n(72160),o=n(24040),c=n(3400),u=c.isArrayOrTypedArray,d=n(43616),s=n(79811),l=n(33040).formatColor,m=n(43028),p=n(7152),I=n(80088),y=n(67072),f=n(13448).DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},_=n(10624).appendArrayPointValue;function h(r,e){var n,a=r._fullLayout,t=e._length,o=e.textfont,d=e.textposition,s=u(d)?d:[d],l=o.color,m=o.size,p=o.family,I=o.weight,y=o.style,f=o.variant,g={},h=r._context.plotGlPixelRatio,x=e.texttemplate;if(x){g.text=[];var P=a._d3locale,G=Array.isArray(x),C=G?Math.min(x.length,t):t,S=G?function(r){return x[r]}:function(){return x};for(n=0;n500?"bold":"normal":r}function x(r,e){var n,i,a=e._length,o=e.marker,c={},d=u(o.symbol),s=u(o.angle),m=u(o.color),y=u(o.line.color),f=u(o.opacity),g=u(o.size),_=u(o.line.width);if(d||(i=I.isOpenSymbol(o.symbol)),d||m||y||f||s){c.symbols=new Array(a),c.angles=new Array(a),c.colors=new Array(a),c.borderColors=new Array(a);var h=o.symbol,v=o.angle,x=l(o,o.opacity,a),P=l(o.line,o.opacity,a);if(!u(P[0])){var G=P;for(P=Array(a),n=0;ny.TOO_MANY_POINTS||m.hasMarkers(e)?"rect":"round";if(d&&e.connectgaps){var l=i[0],p=i[1];for(a=0;a1?d[a]:d[0]:d,y=u(s)?s.length>1?s[a]:s[0]:s,f=g[I],_=g[y],h=l?l/.8+1:0,v=-_*h-.5*_;o.offset[a]=[f*h/p,v/p]}}return o}}},80220:function(r,e,n){"use strict";var i=n(3400),a=n(24040),t=n(80088),o=n(2876),c=n(88200),u=n(43028),d=n(43980),s=n(31147),l=n(74428),m=n(66828),p=n(70840),I=n(124);r.exports=function(r,e,n,y){function f(n,a){return i.coerce(r,e,o,n,a)}var g=!!r.marker&&t.isOpenSymbol(r.marker.symbol),_=u.isBubble(r),h=d(r,e,y,f);if(h){s(r,e,y,f),f("xhoverformat"),f("yhoverformat");var v=h100},e.isDotSymbol=function(r){return"string"===typeof r?i.DOT_RE.test(r):r>200}},41272:function(r,e,n){"use strict";var i=n(24040),a=n(3400),t=n(44928);function o(r,e,n,o){var c=r.xa,u=r.ya,d=r.distance,s=r.dxy,l=r.index,m={pointNumber:l,x:e[l],y:n[l]};m.tx=a.isArrayOrTypedArray(o.text)?o.text[l]:o.text,m.htx=Array.isArray(o.hovertext)?o.hovertext[l]:o.hovertext,m.data=Array.isArray(o.customdata)?o.customdata[l]:o.customdata,m.tp=Array.isArray(o.textposition)?o.textposition[l]:o.textposition;var p=o.textfont;p&&(m.ts=a.isArrayOrTypedArray(p.size)?p.size[l]:p.size,m.tc=a.isArrayOrTypedArray(p.color)?p.color[l]:p.color,m.tf=Array.isArray(p.family)?p.family[l]:p.family,m.tw=Array.isArray(p.weight)?p.weight[l]:p.weight,m.ty=Array.isArray(p.style)?p.style[l]:p.style,m.tv=Array.isArray(p.variant)?p.variant[l]:p.variant);var I=o.marker;I&&(m.ms=a.isArrayOrTypedArray(I.size)?I.size[l]:I.size,m.mo=a.isArrayOrTypedArray(I.opacity)?I.opacity[l]:I.opacity,m.mx=a.isArrayOrTypedArray(I.symbol)?I.symbol[l]:I.symbol,m.ma=a.isArrayOrTypedArray(I.angle)?I.angle[l]:I.angle,m.mc=a.isArrayOrTypedArray(I.color)?I.color[l]:I.color);var y=I&&I.line;y&&(m.mlc=Array.isArray(y.color)?y.color[l]:y.color,m.mlw=a.isArrayOrTypedArray(y.width)?y.width[l]:y.width);var f=I&&I.gradient;f&&"none"!==f.type&&(m.mgt=Array.isArray(f.type)?f.type[l]:f.type,m.mgc=Array.isArray(f.color)?f.color[l]:f.color);var g=c.c2p(m.x,!0),_=u.c2p(m.y,!0),h=m.mrc||1,v=o.hoverlabel;v&&(m.hbg=Array.isArray(v.bgcolor)?v.bgcolor[l]:v.bgcolor,m.hbc=Array.isArray(v.bordercolor)?v.bordercolor[l]:v.bordercolor,m.hts=a.isArrayOrTypedArray(v.font.size)?v.font.size[l]:v.font.size,m.htc=Array.isArray(v.font.color)?v.font.color[l]:v.font.color,m.htf=Array.isArray(v.font.family)?v.font.family[l]:v.font.family,m.hnl=a.isArrayOrTypedArray(v.namelength)?v.namelength[l]:v.namelength);var x=o.hoverinfo;x&&(m.hi=Array.isArray(x)?x[l]:x);var P=o.hovertemplate;P&&(m.ht=Array.isArray(P)?P[l]:P);var G={};G[r.index]=m;var C=o._origX,S=o._origY,A=a.extendFlat({},r,{color:t(o,m),x0:g-h,x1:g+h,xLabelVal:C?C[l]:m.x,y0:_-h,y1:_+h,yLabelVal:S?S[l]:m.y,cd:G,distance:d,spikeDistance:s,hovertemplate:m.ht});return m.htx?A.text=m.htx:m.tx?A.text=m.tx:o.text&&(A.text=o.text),a.fillText(m,o,A),i.getComponentMethod("errorbars","hoverInfo")(m,o,A),A}r.exports={hoverPoints:function(r,e,n,i){var a,t,c,u,d,s,l,m,p,I,y=r.cd,f=y[0].t,g=y[0].trace,_=r.xa,h=r.ya,v=f.x,x=f.y,P=_.c2p(e),G=h.c2p(n),C=r.distance;if(f.tree){var S=_.p2c(P-C),A=_.p2c(P+C),b=h.p2c(G-C),M=h.p2c(G+C);a="x"===i?f.tree.range(Math.min(S,A),Math.min(h._rl[0],h._rl[1]),Math.max(S,A),Math.max(h._rl[0],h._rl[1])):f.tree.range(Math.min(S,A),Math.min(b,M),Math.max(S,A),Math.max(b,M))}else a=f.ids;var B=C;if("x"===i){var k=!!g.xperiodalignment,F=!!g.yperiodalignment;for(s=0;s=Math.min(z,w)&&P<=Math.max(z,w)?0:1/0}if(l=Math.min(R,E)&&G<=Math.max(R,E)?0:1/0}I=Math.sqrt(l*l+m*m),c=a[s]}}}else for(s=a.length-1;s>-1;s--)u=v[t=a[s]],d=x[t],l=_.c2p(u)-P,m=h.c2p(d)-G,(p=Math.sqrt(l*l+m*m))_.glText.length){var G=x-_.glText.length;for(y=0;yn&&(isNaN(e[i])||isNaN(e[i+1]));)i-=2;r.positions=e.slice(n,i+2)}return r})),_.line2d.update(_.lineOptions)),_.error2d){var S=(_.errorXOptions||[]).concat(_.errorYOptions||[]);_.error2d.update(S)}_.scatter2d&&_.scatter2d.update(_.markerOptions),_.fillOrder=c.repeat(null,x),_.fill2d&&(_.fillOptions=_.fillOptions.map((function(r,e){var i=n[e];if(r&&i&&i[0]&&i[0].trace){var a,t,o=i[0],c=o.trace,u=o.t,d=_.lineOptions[e],s=[];c._ownfill&&s.push(e),c._nexttrace&&s.push(e+1),s.length&&(_.fillOrder[e]=s);var l,m,p=[],I=d&&d.positions||u.positions;if("tozeroy"===c.fill){for(l=0;ll&&isNaN(I[m+1]);)m-=2;0!==I[l+1]&&(p=[I[l],0]),p=p.concat(I.slice(l,m+2)),0!==I[m+1]&&(p=p.concat([I[m],0]))}else if("tozerox"===c.fill){for(l=0;ll&&isNaN(I[m]);)m-=2;0!==I[l]&&(p=[0,I[l+1]]),p=p.concat(I.slice(l,m+2)),0!==I[m]&&(p=p.concat([0,I[m+1]]))}else if("toself"===c.fill||"tonext"===c.fill){for(p=[],a=0,r.splitNull=!0,t=0;t-1;for(y=0;y850?" Black":a>750?" Extra Bold":a>650?" Bold":a>550?" Semi Bold":a>450?" Medium":a>350?" Regular":a>250?" Light":a>150?" Extra Light":" Thin"):"Open Sans"===t.slice(0,2).join(" ")?(c="Open Sans",c+=a>750?" Extrabold":a>650?" Bold":a>550?" Semibold":a>350?" Regular":" Light"):"Klokantech Noto Sans"===t.slice(0,3).join(" ")&&(c="Klokantech Noto Sans","CJK"===t[3]&&(c+=" CJK"),c+=a>500?" Bold":" Regular")),o&&(c+=" Italic"),"Open Sans Regular Italic"===c?c="Open Sans Italic":"Open Sans Regular Bold"===c?c="Open Sans Bold":"Open Sans Regular Bold Italic"===c?c="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===c&&(c="Klokantech Noto Sans Italic"),l(c)||(c=n),c.split(", ")}r.exports=function(r,e){var n,t=e[0].trace,l=!0===t.visible&&0!==t._length,P="none"!==t.fill,G=s.hasLines(t),C=s.hasMarkers(t),S=s.hasText(t),A=C&&"circle"===t.marker.symbol,b=C&&"circle"!==t.marker.symbol,M=t.cluster&&t.cluster.enabled,B=f("fill"),k=f("line"),F=f("circle"),z=f("symbol"),w={fill:B,line:k,circle:F,symbol:z};if(!l)return w;if((P||G)&&(n=o.calcTraceToLineCoords(e)),P&&(B.geojson=o.makePolygon(n),B.layout.visibility="visible",a.extendFlat(B.paint,{"fill-color":t.fillcolor})),G&&(k.geojson=o.makeLine(n),k.layout.visibility="visible",a.extendFlat(k.paint,{"line-width":t.line.width,"line-color":t.line.color,"line-opacity":t.opacity})),A){var R=function(r){var e,n,t,o,s=r[0].trace,l=s.marker,m=s.selectedpoints,p=a.isArrayOrTypedArray(l.color),I=a.isArrayOrTypedArray(l.size),y=a.isArrayOrTypedArray(l.opacity);function f(r){return s.opacity*r}function g(r){return r/2}p&&(n=c.hasColorscale(s,"marker")?c.makeColorScaleFuncFromTrace(l):a.identity),I&&(t=d(s)),y&&(o=function(r){return f(i(r)?+a.constrain(r,0,1):0)});var _,v=[];for(e=0;e")}function s(r){return r+"\xb0"}}r.exports={hoverPoints:function(r,e,n){var o=r.cd,s=o[0].trace,l=r.xa,m=r.ya,p=r.subplot,I=[],y=u+s.uid+"-circle",f=s.cluster&&s.cluster.enabled;if(f){var g=p.map.queryRenderedFeatures(null,{layers:[y]});I=g.map((function(r){return r.id}))}var _=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),h=e-_;if(i.getClosest(o,(function(r){var e=r.lonlat;if(e[0]===c)return 1/0;if(f&&-1===I.indexOf(r.i+1))return 1/0;var i=a.modHalf(e[0],360),t=e[1],o=p.project([i,t]),u=o.x-l.c2p([h,t]),d=o.y-m.c2p([i,n]),s=Math.max(3,r.mrc||0);return Math.max(Math.sqrt(u*u+d*d)-s,1-3/s)}),r),!1!==r.index){var v=o[r.index],x=v.lonlat,P=[a.modHalf(x[0],360)+_,x[1]],G=l.c2p(P),C=m.c2p(P),S=v.mrc||1;r.x0=G-S,r.x1=G+S,r.y0=C-S,r.y1=C+S;var A={};A[s.subplot]={_subplot:p};var b=s._module.formatLabels(v,s,A);return r.lonLabel=b.lonLabel,r.latLabel=b.latLabel,r.color=t(s,v),r.extraText=d(s,v,o[0].t.labels),r.hovertemplate=s.hovertemplate,[r]}},getExtraText:d}},11572:function(r,e,n){"use strict";r.exports={attributes:n(31512),supplyDefaults:n(15752),colorbar:n(5528),formatLabels:n(11960),calc:n(25212),plot:n(9660),hoverPoints:n(63312).hoverPoints,eventData:n(37920),selectPoints:n(404),styleOnSelect:function(r,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:n(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(r,e,n){"use strict";var i=n(3400),a=n(59392),t=n(47552).traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function c(r,e,n,i){this.type="scattermapbox",this.subplot=r,this.uid=e,this.clusterEnabled=n,this.isHidden=i,this.sourceIds={fill:"source-"+e+"-fill",line:"source-"+e+"-line",circle:"source-"+e+"-circle",symbol:"source-"+e+"-symbol",cluster:"source-"+e+"-circle",clusterCount:"source-"+e+"-circle"},this.layerIds={fill:t+e+"-fill",line:t+e+"-line",circle:t+e+"-circle",symbol:t+e+"-symbol",cluster:t+e+"-cluster",clusterCount:t+e+"-cluster-count"},this.below=null}var u=c.prototype;u.addSource=function(r,e,n){var a={type:"geojson",data:e.geojson};n&&n.enabled&&i.extendFlat(a,{cluster:!0,clusterMaxZoom:n.maxzoom});var t=this.subplot.map.getSource(this.sourceIds[r]);t?t.setData(e.geojson):this.subplot.map.addSource(this.sourceIds[r],a)},u.setSourceData=function(r,e){this.subplot.map.getSource(this.sourceIds[r]).setData(e.geojson)},u.addLayer=function(r,e,n){var i={type:e.type,id:this.layerIds[r],source:this.sourceIds[r],layout:e.layout,paint:e.paint};e.filter&&(i.filter=e.filter);for(var a,t=this.layerIds[r],o=this.subplot.getMapLayers(),c=0;c=0;n--){var a=e[n];i.removeLayer(s.layerIds[a])}r||i.removeSource(s.sourceIds.circle)}(r):function(r){for(var e=o.nonCluster,n=e.length-1;n>=0;n--){var a=e[n];i.removeLayer(s.layerIds[a]),r||i.removeSource(s.sourceIds[a])}}(r)}function m(r){u?function(r){r||s.addSource("circle",t.circle,e.cluster);for(var n=o.cluster,i=0;i=0;n--){var i=e[n];r.removeLayer(this.layerIds[i]),r.removeSource(this.sourceIds[i])}},r.exports=function(r,e){var n,i,t,u=e[0].trace,d=u.cluster&&u.cluster.enabled,s=!0!==u.visible,l=new c(r,u.uid,d,s),m=a(r.gd,e),p=l.below=r.belowLookup["trace-"+u.uid];if(d)for(l.addSource("circle",m.circle,u.cluster),n=0;n")}}r.exports={hoverPoints:function(r,e,n,t){var o=i(r,e,n,t);if(o&&!1!==o[0].index){var c=o[0];if(void 0===c.index)return o;var u=r.subplot,d=c.cd[c.index],s=c.trace;if(u.isPtInside(d))return c.xLabelVal=void 0,c.yLabelVal=void 0,a(d,s,u,c),c.hovertemplate=s.hovertemplate,o}},makeHoverPointText:a}},76924:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:n(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:n(8319),supplyDefaults:n(85968).supplyDefaults,colorbar:n(5528),formatLabels:n(22852),calc:n(58320),plot:n(43456),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(8504).hoverPoints,selectPoints:n(91560),meta:{}}},43456:function(r,e,n){"use strict";var i=n(96504),a=n(39032).BADNUM;r.exports=function(r,e,n){for(var t=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,c=e.yaxis,u={xaxis:o,yaxis:c,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},d=e.radialAxis,s=e.angularAxis,l=0;l=d&&(_.marker.cluster=I.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=x),_.line&&x.length>1&&u.extendFlat(_.line,c.linePositions(r,p,x)),_.text&&(u.extendFlat(_.text,{positions:x},c.textPosition(r,p,_.text,_.marker)),u.extendFlat(_.textSel,{positions:x},c.textPosition(r,p,_.text,_.markerSel)),u.extendFlat(_.textUnsel,{positions:x},c.textPosition(r,p,_.text,_.markerUnsel))),_.fill&&!m.fill2d&&(m.fill2d=!0),_.marker&&!m.scatter2d&&(m.scatter2d=!0),_.line&&!m.line2d&&(m.line2d=!0),_.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(_.line),m.fillOptions.push(_.fill),m.markerOptions.push(_.marker),m.markerSelectedOptions.push(_.markerSel),m.markerUnselectedOptions.push(_.markerUnsel),m.textOptions.push(_.text),m.textSelectedOptions.push(_.textSel),m.textUnselectedOptions.push(_.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),I.x=P,I.y=G,I.rawx=P,I.rawy=G,I.r=f,I.theta=g,I.positions=x,I._scene=m,I.index=m.count,m.count++}})),t(r,e,n)}},r.exports.reglPrecompiled={}},69496:function(r,e,n){"use strict";var i=n(21776).Ks,a=n(21776).Gw,t=n(92880).extendFlat,o=n(98304),c=n(52904),u=n(45464),d=c.line;r.exports={mode:c.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:c.text,texttemplate:a({editType:"plot"},{keys:["real","imag","text"]}),hovertext:c.hovertext,line:{color:d.color,width:d.width,dash:d.dash,backoff:d.backoff,shape:t({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:c.connectgaps,marker:c.marker,cliponaxis:t({},c.cliponaxis,{dflt:!1}),textposition:c.textposition,textfont:c.textfont,fill:t({},c.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o(),hoverinfo:t({},u.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:c.hoveron,hovertemplate:i(),selected:c.selected,unselected:c.unselected}},47507:function(r,e,n){"use strict";var i=n(38248),a=n(39032).BADNUM,t=n(90136),o=n(20148),c=n(4500),u=n(16356).calcMarkerSize;r.exports=function(r,e){for(var n=r._fullLayout,d=e.subplot,s=n[d].realaxis,l=n[d].imaginaryaxis,m=s.makeCalcdata(e,"real"),p=l.makeCalcdata(e,"imag"),I=e._length,y=new Array(I),f=0;f")}}r.exports={hoverPoints:function(r,e,n,t){var o=i(r,e,n,t);if(o&&!1!==o[0].index){var c=o[0];if(void 0===c.index)return o;var u=r.subplot,d=c.cd[c.index],s=c.trace;if(u.isPtInside(d))return c.xLabelVal=void 0,c.yLabelVal=void 0,a(d,s,u,c),c.hovertemplate=s.hovertemplate,o}},makeHoverPointText:a}},95443:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"scattersmith",basePlotModule:n(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:n(69496),supplyDefaults:n(76716),colorbar:n(5528),formatLabels:n(49504),calc:n(47507),plot:n(34927),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(25292).hoverPoints,selectPoints:n(91560),meta:{}}},34927:function(r,e,n){"use strict";var i=n(96504),a=n(39032).BADNUM,t=n(36416).smith;r.exports=function(r,e,n){for(var o=e.layers.frontplot.select("g.scatterlayer"),c=e.xaxis,u=e.yaxis,d={xaxis:c,yaxis:u,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=0;s"),o.hovertemplate=m.hovertemplate,t}function h(r,e){g.push(r._hovertitle+": "+e)}}},34864:function(r,e,n){"use strict";r.exports={attributes:n(5896),supplyDefaults:n(84256),colorbar:n(5528),formatLabels:n(90404),calc:n(34335),plot:n(88776),style:n(49224).style,styleOnSelect:n(49224).styleOnSelect,hoverPoints:n(26596),selectPoints:n(91560),eventData:n(97476),moduleType:"trace",name:"scatterternary",basePlotModule:n(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(r,e,n){"use strict";var i=n(96504);r.exports=function(r,e,n){var a=e.plotContainer;a.select(".scatterlayer").selectAll("*").remove();for(var t=e.xaxis,o=e.yaxis,c={xaxis:t,yaxis:o,plot:a,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},u=e.layers.frontplot.select("g.scatterlayer"),d=0;dm?v.sizeAvg||Math.max(v.size,3):t(e,h),p=0;pt&&u||a-1,F=!0;if(o(h)||p.selectedpoints||k){var z=p._length;if(p.selectedpoints){y.selectBatch=p.selectedpoints;var w=p.selectedpoints,R={};for(u=0;u1&&(s=y[_-1],m=f[_-1],I=g[_-1]),e=0;e<_;e++)h=Math.max(h,y[e]),v=Math.min(v,y[e]),x=Math.max(x,f[e]),P=Math.min(P,f[e]),G=Math.max(G,g[e]),C=Math.min(C,g[e]),t||y[e]===d||(t=!0,S+="x"),c||f[e]===l||(c=!0,S+="y"),u||g[e]===p||(u=!0,S+="z");t||(S+="x"),c||(S+="y"),u||(S+="z");var A=o(r._x),b=o(r._y),M=o(r._z);S=(S=(S=S.replace("x",(d>s?"-":"+")+"x")).replace("y",(l>m?"-":"+")+"y")).replace("z",(p>I?"-":"+")+"z");var B=function(){_=0,A=[],b=[],M=[]};(!_||_2?r.slice(1,e-1):2===e?[(r[0]+r[1])/2]:r}function p(r){var e=r.length;return 1===e?[.5,.5]:[r[1]-r[0],r[e-1]-r[e-2]]}function I(r,e){var n=r.fullSceneLayout,a=r.dataScale,s=e._len,l={};function I(r,e){var i=n[e],o=a[d[e]];return t.simpleMap(r,(function(r){return i.d2l(r)*o}))}if(l.vectors=u(I(e._u,"xaxis"),I(e._v,"yaxis"),I(e._w,"zaxis"),s),!s)return{positions:[],cells:[]};var y=I(e._Xs,"xaxis"),f=I(e._Ys,"yaxis"),g=I(e._Zs,"zaxis");if(l.meshgrid=[y,f,g],l.gridFill=e._gridFill,e._slen)l.startingPositions=u(I(e._startsX,"xaxis"),I(e._startsY,"yaxis"),I(e._startsZ,"zaxis"));else{for(var _=f[0],h=m(y),v=m(g),x=new Array(h.length*v.length),P=0,G=0;G=0};_?(n=Math.min(g.length,v.length),u=function(r){return A(g[r])&&b(r)},l=function(r){return String(g[r])}):(n=Math.min(h.length,v.length),u=function(r){return A(h[r])&&b(r)},l=function(r){return String(h[r])}),P&&(n=Math.min(n,x.length));for(var M=0;M1){for(var z=t.randstr(),w=0;w=0){e.i=c.i;var s=n.marker;s.pattern&&s.colors&&s.pattern.shape||(s.color=d,e.color=d),i.pointStyle(r,n,t,e)}else a.fill(r,d)}},45716:function(r,e,n){"use strict";var i=n(33428),a=n(24040),t=n(10624).appendArrayPointValue,o=n(93024),c=n(3400),u=n(95924),d=n(78176),s=n(69656).formatPieValue;function l(r,e,n){for(var i=r.data.data,a={curveNumber:e.index,pointNumber:i.i,data:e._input,fullData:e},o=0;o"),name:S||R("name")?_.name:void 0,color:C("hoverlabel.bgcolor")||h.color,borderColor:C("hoverlabel.bordercolor"),fontFamily:C("hoverlabel.font.family"),fontSize:C("hoverlabel.font.size"),fontColor:C("hoverlabel.font.color"),fontWeight:C("hoverlabel.font.weight"),fontStyle:C("hoverlabel.font.style"),fontVariant:C("hoverlabel.font.variant"),nameLength:C("hoverlabel.namelength"),textAlign:C("hoverlabel.align"),hovertemplate:S,hovertemplateLabels:F,eventData:u};f&&(T.x0=M-a.rInscribed*a.rpx1,T.x1=M+a.rInscribed*a.rpx1,T.idealAlign=a.pxmid[0]<0?"left":"right"),g&&(T.x=M,T.idealAlign=M<0?"left":"right");var D=[];o.loneHover(T,{container:t._hoverlayer.node(),outerContainer:t._paper.node(),gd:n,inOut_bbox:D}),u[0].bbox=D[0],I._hasHoverLabel=!0}if(g){var J=r.select("path.surface");m.styleOne(J,a,_,n,{hovered:!0})}I._hasHoverEvent=!0,n.emit("plotly_hover",{points:u||[l(a,_,m.eventDataKeys)],event:i.event})}})),r.on("mouseout",(function(e){var a=n._fullLayout,t=n._fullData[I.index],c=i.select(this).datum();if(I._hasHoverEvent&&(e.originalEvent=i.event,n.emit("plotly_unhover",{points:[l(c,t,m.eventDataKeys)],event:i.event}),I._hasHoverEvent=!1),I._hasHoverLabel&&(o.loneUnhover(a._hoverlayer.node()),I._hasHoverLabel=!1),g){var u=r.select("path.surface");m.styleOne(u,c,t,n,{hovered:!1})}})),r.on("click",(function(r){var e=n._fullLayout,t=n._fullData[I.index],c=f&&(d.isHierarchyRoot(r)||d.isLeaf(r)),s=d.getPtId(r),p=d.isEntry(r)?d.findEntryWithChild(y,s):d.findEntryWithLevel(y,s),g=d.getPtId(p),_={points:[l(r,t,m.eventDataKeys)],event:i.event};c||(_.nextLevel=g);var h=u.triggerHandler(n,"plotly_"+I.type+"click",_);if(!1!==h&&e.hovermode&&(n._hoverdata=[l(r,t,m.eventDataKeys)],o.click(n,i.event)),!c&&!1!==h&&!n._dragging&&!n._transitioning){a.call("_storeDirectGUIEdit",t,e._tracePreGUI[t.uid],{level:t.level});var v={data:[{level:g}],traces:[I.index]},x={frame:{redraw:!1,duration:m.transitionTime},transition:{duration:m.transitionTime,easing:m.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),a.call("animate",n,v,x)}}))}},78176:function(r,e,n){"use strict";var i=n(3400),a=n(76308),t=n(93972),o=n(69656);function c(r){return r.data.data.pid}e.findEntryWithLevel=function(r,n){var i;return n&&r.eachAfter((function(r){if(e.getPtId(r)===n)return i=r.copy()})),i||r},e.findEntryWithChild=function(r,n){var i;return r.eachAfter((function(r){for(var a=r.children||[],t=0;t0)},e.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},e.isHeader=function(r,n){return!(e.isLeaf(r)||r.depth===n._maxDepth-1)},e.getParent=function(r,n){return e.findEntryWithLevel(r,c(n))},e.listPath=function(r,n){var i=r.parent;if(!i)return[];var a=n?[i.data[n]]:[i];return e.listPath(i,n).concat(a)},e.getPath=function(r){return e.listPath(r,"label").join("/")+"/"},e.formatValue=o.formatPieValue,e.formatPercent=function(r,e){var n=i.formatPercent(r,0);return"0%"===n&&(n=o.formatPiePercent(r,e)),n}},5621:function(r,e,n){"use strict";r.exports={moduleType:"trace",name:"sunburst",basePlotModule:n(54904),categories:[],animatable:!0,attributes:n(424),layoutAttributes:n(84920),supplyDefaults:n(25244),supplyLayoutDefaults:n(28732),calc:n(3776).calc,crossTraceCalc:n(3776).crossTraceCalc,plot:n(96488).plot,style:n(85676).style,colorbar:n(5528),meta:{}}},84920:function(r){"use strict";r.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(r,e,n){"use strict";var i=n(3400),a=n(84920);r.exports=function(r,e){function n(n,t){return i.coerce(r,e,a,n,t)}n("sunburstcolorway",e.colorway),n("extendsunburstcolors")}},96488:function(r,e,n){"use strict";var i=n(33428),a=n(74148),t=n(67756).qy,o=n(43616),c=n(3400),u=n(72736),d=n(82744),s=d.recordMinTextSize,l=d.clearMinTextSize,m=n(37820),p=n(69656).getRotationAngle,I=m.computeTransform,y=m.transformInsideText,f=n(85676).styleOne,g=n(60100).resizeText,_=n(45716),h=n(27328),v=n(78176);function x(r,n,d,l){var m=r._context.staticPlot,g=r._fullLayout,x=!g.uniformtext.mode&&v.hasTransition(l),G=i.select(d).selectAll("g.slice"),C=n[0],S=C.trace,A=C.hierarchy,b=v.findEntryWithLevel(A,S.level),M=v.getMaxDepth(S),B=g._size,k=S.domain,F=B.w*(k.x[1]-k.x[0]),z=B.h*(k.y[1]-k.y[0]),w=.5*Math.min(F,z),R=C.cx=B.l+B.w*(k.x[1]+k.x[0])/2,E=C.cy=B.t+B.h*(1-k.y[0])-z/2;if(!b)return G.remove();var N=null,T={};x&&G.each((function(r){T[v.getPtId(r)]={rpx0:r.rpx0,rpx1:r.rpx1,x0:r.x0,x1:r.x1,transform:r.transform},!N&&v.isEntry(r)&&(N=r)}));var D=function(r){return a.partition().size([2*Math.PI,r.height+1])(r)}(b).descendants(),J=b.height+1,U=0,H=M;C.hasMultipleRoots&&v.isHierarchyRoot(b)&&(D=D.slice(1),J-=1,U=1,H+=1),D=D.filter((function(r){return r.y1<=H}));var L=p(S.rotation);L&&D.forEach((function(r){r.x0+=L,r.x1+=L}));var O=Math.min(J,M),K=function(r){return(r-U)/O*w},V=function(r,e){return[r*Math.cos(e),-r*Math.sin(e)]},j=function(r){return c.pathAnnulus(r.rpx0,r.rpx1,r.x0,r.x1,R,E)},W=function(r){return R+P(r)[0]*(r.transform.rCenter||0)+(r.transform.x||0)},Z=function(r){return E+P(r)[1]*(r.transform.rCenter||0)+(r.transform.y||0)};(G=G.data(D,v.getPtId)).enter().append("g").classed("slice",!0),x?G.exit().transition().each((function(){var r=i.select(this);r.select("path.surface").transition().attrTween("d",(function(r){var e=function(r){var e,n=v.getPtId(r),i=T[n],a=T[v.getPtId(b)];if(a){var o=(r.x1>a.x1?2*Math.PI:0)+L;e=r.rpx1q?2*Math.PI:0)+L;e={x0:a,x1:a}}else e={rpx0:w,rpx1:w},c.extendFlat(e,Q(r));else e={rpx0:0,rpx1:0};else e={x0:L,x1:L};return t(e,i)}(r);return function(r){return j(e(r))}})):l.attr("d",j),d.call(_,b,r,n,{eventDataKeys:h.eventDataKeys,transitionTime:h.CLICK_TRANSITION_TIME,transitionEasing:h.CLICK_TRANSITION_EASING}).call(v.setSliceCursor,r,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:r._transitioning}),l.call(f,a,S,r);var p=c.ensureSingle(d,"g","slicetext"),P=c.ensureSingle(p,"text","",(function(r){r.attr("data-notex",1)})),G=c.ensureUniformFontSize(r,v.determineTextFont(S,a,g.font));P.text(e.formatSliceLabel(a,b,S,n,g)).classed("slicetext",!0).attr("text-anchor","middle").call(o.font,G).call(u.convertToTspans,r);var A=o.bBox(P.node());a.transform=y(A,a,C),a.transform.targetX=W(a),a.transform.targetY=Z(a);var M=function(r,e){var n=r.transform;return I(n,e),n.fontSize=G.size,s(S.type,n,g),c.getTextTransform(n)};x?P.transition().attrTween("transform",(function(r){var e=function(r){var e,n=T[v.getPtId(r)],i=r.transform;if(n)e=n;else if(e={rpx1:r.rpx1,transform:{textPosAngle:i.textPosAngle,scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},N)if(r.parent)if(q){var a=r.x1>q?2*Math.PI:0;e.x0=e.x1=a}else c.extendFlat(e,Q(r));else e.x0=e.x1=L;else e.x0=e.x1=L;var o=t(e.transform.textPosAngle,r.transform.textPosAngle),u=t(e.rpx1,r.rpx1),d=t(e.x0,r.x0),l=t(e.x1,r.x1),m=t(e.transform.scale,i.scale),p=t(e.transform.rotate,i.rotate),I=0===i.rCenter?3:0===e.transform.rCenter?1/3:1,y=t(e.transform.rCenter,i.rCenter),f=function(r){return y(Math.pow(r,I))};return function(r){var e=u(r),n=d(r),a=l(r),t=f(r),c={pxmid:V(e,(n+a)/2),rpx1:e,transform:{textPosAngle:o(r),rCenter:t,x:i.x,y:i.y}};return s(S.type,i,g),{transform:{targetX:W(c),targetY:Z(c),scale:m(r),rotate:p(r),rCenter:t}}}}(r);return function(r){return M(e(r),A)}})):P.attr("transform",M(a,A))}))}function P(r){return e=r.rpx1,n=r.transform.textPosAngle,[e*Math.sin(n),-e*Math.cos(n)];var e,n}e.plot=function(r,e,n,a){var t,o,c=r._fullLayout,u=c._sunburstlayer,d=!n,s=!c.uniformtext.mode&&v.hasTransition(n);l("sunburst",c),(t=u.selectAll("g.trace.sunburst").data(e,(function(r){return r[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),t.order(),s?(a&&(o=a()),i.transition().duration(n.duration).ease(n.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){u.selectAll("g.trace").each((function(e){x(r,e,this,n)}))}))):(t.each((function(e){x(r,e,this,n)})),c.uniformtext.mode&&g(r,c._sunburstlayer.selectAll(".trace"),"sunburst")),d&&t.exit().remove()},e.formatSliceLabel=function(r,e,n,i,a){var t=n.texttemplate,o=n.textinfo;if(!t&&(!o||"none"===o))return"";var u=a.separators,d=i[0],s=r.data.data,l=d.hierarchy,m=v.isHierarchyRoot(r),p=v.getParent(l,r),I=v.getValue(r);if(!t){var y,f=o.split("+"),g=function(r){return-1!==f.indexOf(r)},_=[];if(g("label")&&s.label&&_.push(s.label),s.hasOwnProperty("v")&&g("value")&&_.push(v.formatValue(s.v,u)),!m){g("current path")&&_.push(v.getPath(r.data));var h=0;g("percent parent")&&h++,g("percent entry")&&h++,g("percent root")&&h++;var x=h>1;if(h){var P,G=function(r){y=v.formatPercent(P,u),x&&(y+=" of "+r),_.push(y)};g("percent parent")&&!m&&(P=I/v.getValue(p),G("parent")),g("percent entry")&&(P=I/v.getValue(e),G("entry")),g("percent root")&&(P=I/v.getValue(l),G("root"))}}return g("text")&&(y=c.castOption(n,s.i,"text"),c.isValidTextValue(y)&&_.push(y)),_.join("
")}var C=c.castOption(n,s.i,"texttemplate");if(!C)return"";var S={};s.label&&(S.label=s.label),s.hasOwnProperty("v")&&(S.value=s.v,S.valueLabel=v.formatValue(s.v,u)),S.currentPath=v.getPath(r.data),m||(S.percentParent=I/v.getValue(p),S.percentParentLabel=v.formatPercent(S.percentParent,u),S.parent=v.getPtLabel(p)),S.percentEntry=I/v.getValue(e),S.percentEntryLabel=v.formatPercent(S.percentEntry,u),S.entry=v.getPtLabel(e),S.percentRoot=I/v.getValue(l),S.percentRootLabel=v.formatPercent(S.percentRoot,u),S.root=v.getPtLabel(l),s.hasOwnProperty("color")&&(S.color=s.color);var A=c.castOption(n,s.i,"text");return(c.isValidTextValue(A)||""===A)&&(S.text=A),S.customdata=c.castOption(n,s.i,"customdata"),c.texttemplateString(C,S,a._d3locale,S,n._meta||{})}},85676:function(r,e,n){"use strict";var i=n(33428),a=n(76308),t=n(3400),o=n(82744).resizeText,c=n(60404);function u(r,e,n,i){var o=e.data.data,u=!e.children,d=o.i,s=t.castOption(n,d,"marker.line.color")||a.defaultLine,l=t.castOption(n,d,"marker.line.width")||0;r.call(c,e,n,i).style("stroke-width",l).call(a.stroke,s).style("opacity",u?n.leaf.opacity:null)}r.exports={style:function(r){var e=r._fullLayout._sunburstlayer.selectAll(".trace");o(r,e,"sunburst"),e.each((function(e){var n=i.select(this),a=e[0].trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each((function(e){i.select(this).call(u,e,a,r)}))}))},styleOne:u}},16716:function(r,e,n){"use strict";var i=n(76308),a=n(49084),t=n(29736).axisHoverFormat,o=n(21776).Ks,c=n(45464),u=n(92880).extendFlat,d=n(67824).overrideAll;function s(r){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:i.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:i.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var l=r.exports=d(u({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:o(),xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},a("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:s(),y:s(),z:s()},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},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:u({},a.zauto,{}),zmin:u({},a.zmin,{}),zmax:u({},a.zmax,{})},hoverinfo:u({},c.hoverinfo),showlegend:u({},c.showlegend,{dflt:!1})}),"calc","nested");l.x.editType=l.y.editType=l.z.editType="calc+clearAxisTypes",l.transforms=void 0},56576:function(r,e,n){"use strict";var i=n(47128);r.exports=function(r,e){e.surfacecolor?i(r,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):i(r,e,{vals:e.z,containerStr:"",cLetter:"c"})}},79164:function(r,e,n){"use strict";var i=n(67792).gl_surface3d,a=n(67792).ndarray,t=n(67792).ndarray_linear_interpolate.d2,o=n(70448),c=n(11240),u=n(3400).isArrayOrTypedArray,d=n(33040).parseColorScale,s=n(43080),l=n(8932).extractOpts;function m(r,e,n){this.scene=r,this.uid=n,this.surface=e,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 p=m.prototype;p.getXat=function(r,e,n,i){var a=u(this.data.x)?u(this.data.x[0])?this.data.x[e][r]:this.data.x[r]:r;return void 0===n?a:i.d2l(a,0,n)},p.getYat=function(r,e,n,i){var a=u(this.data.y)?u(this.data.y[0])?this.data.y[e][r]:this.data.y[e]:e;return void 0===n?a:i.d2l(a,0,n)},p.getZat=function(r,e,n,i){var a=this.data.z[e][r];return null===a&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[e][r]),void 0===n?a:i.d2l(a,0,n)},p.handlePick=function(r){if(r.object===this.surface){var e=(r.data.index[0]-1)/this.dataScaleX-1,n=(r.data.index[1]-1)/this.dataScaleY-1,i=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(n),this.data._ylength-1),0);r.index=[i,a],r.traceCoordinate=[this.getXat(i,a),this.getYat(i,a),this.getZat(i,a)],r.dataCoordinate=[this.getXat(i,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(i,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(i,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var t=0;t<3;t++){var o=r.dataCoordinate[t];null!==o&&void 0!==o&&(r.dataCoordinate[t]*=this.scene.dataScale[t])}var c=this.data.hovertext||this.data.text;return u(c)&&c[a]&&void 0!==c[a][i]?r.textLabel=c[a][i]:r.textLabel=c||"",r.data.dataCoordinate=r.dataCoordinate.slice(),this.surface.highlight(r.data),this.scene.glplot.spikes.position=r.dataCoordinate,!0}};var I=[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 y(r,e){if(r0){n=I[i];break}return n}function _(r,e){if(!(r<1||e<1)){for(var n=f(r),i=f(e),a=1,t=0;tx;)n--,n/=g(n),++n1?i:1},p.refineCoords=function(r){for(var e=this.dataScaleX,n=this.dataScaleY,i=r[0].shape[0],t=r[0].shape[1],o=0|Math.floor(r[0].shape[0]*e+1),c=0|Math.floor(r[0].shape[1]*n+1),u=1+i+1,d=1+t+1,s=a(new Float32Array(u*d),[u,d]),l=[1/e,0,0,0,1/n,0,0,0,1],m=0;m0&&null!==this.contourStart[r]&&null!==this.contourEnd[r]&&this.contourEnd[r]>this.contourStart[r]))for(a[r]=!0,e=this.contourStart[r];et&&(this.minValues[e]=t),this.maxValues[e]",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"}}},55992:function(r,e,n){"use strict";var i=n(23536),a=n(92880).extendFlat,t=n(38248),o=n(38116).isTypedArray,c=n(38116).isArrayOrTypedArray;function u(r){if(c(r)){for(var e=0,n=0;n=e||d===r.length-1)&&(i[a]=o,o.key=u++,o.firstRowIndex=c,o.lastRowIndex=d,o={firstRowIndex:null,lastRowIndex:null,rows:[]},a+=t,c=d+1,t=0);return i}r.exports=function(r,e){var n=s(e.cells.values),o=function(r){return r.slice(e.header.values.length,r.length)},y=s(e.header.values);y.length&&!y[0].length&&(y[0]=[""],y=s(y));var f=y.concat(o(n).map((function(){return l((y[0]||[""]).length)}))),g=e.domain,_=Math.floor(r._fullLayout._size.w*(g.x[1]-g.x[0])),h=Math.floor(r._fullLayout._size.h*(g.y[1]-g.y[0])),v=e.header.values.length?f[0].map((function(){return e.header.height})):[i.emptyHeaderHeight],x=n.length?n[0].map((function(){return e.cells.height})):[],P=v.reduce(d,0),G=I(x,h-P+i.uplift),C=p(I(v,P),[]),S=p(G,C),A={},b=e._fullInput.columnorder;c(b)&&(b=Array.from(b)),b=b.concat(o(n.map((function(r,e){return e}))));var M=f.map((function(r,n){var i=c(e.columnwidth)?e.columnwidth[Math.min(n,e.columnwidth.length-1)]:e.columnwidth;return t(i)?Number(i):1})),B=M.reduce(d,0);M=M.map((function(r){return r/B*_}));var k=Math.max(u(e.header.line.width),u(e.cells.line.width)),F={key:e.uid+r._context.staticPlot,translateX:g.x[0]*r._fullLayout._size.w,translateY:r._fullLayout._size.h*(1-g.y[1]),size:r._fullLayout._size,width:_,maxLineWidth:k,height:h,columnOrder:b,groupHeight:h,rowBlocks:S,headerRowBlocks:C,scrollY:0,cells:a({},e.cells,{values:n}),headerCells:a({},e.header,{values:f}),gdColumns:f.map((function(r){return r[0]})),gdColumnsOriginalOrder:f.map((function(r){return r[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:f.map((function(r,e){var n=A[r];return A[r]=(n||0)+1,{key:r+"__"+A[r],label:r,specIndex:e,xIndex:b[e],xScale:m,x:void 0,calcdata:void 0,columnWidth:M[e]}}))};return F.columns.forEach((function(r){r.calcdata=F,r.x=m(r)})),F}},53056:function(r,e,n){"use strict";var i=n(92880).extendFlat;e.splitToPanels=function(r){var e=[0,0],n=i({},r,{key:"header",type:"header",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:r.calcdata.headerCells.values[r.specIndex],rowBlocks:r.calcdata.headerRowBlocks,calcdata:i({},r.calcdata,{cells:r.calcdata.headerCells})});return[i({},r,{key:"cells1",type:"cells",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:r.calcdata.cells.values[r.specIndex],rowBlocks:r.calcdata.rowBlocks}),i({},r,{key:"cells2",type:"cells",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:r.calcdata.cells.values[r.specIndex],rowBlocks:r.calcdata.rowBlocks}),n]},e.splitToCells=function(r){var e=function(r){var e=r.rowBlocks[r.page],n=e?e.rows[0].rowIndex:0,i=e?n+e.rows.length:0;return[n,i]}(r);return(r.values||[]).slice(e[0],e[1]).map((function(n,i){return{keyWithinBlock:i+("string"===typeof n&&n.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:e[0]+i,column:r,calcdata:r.calcdata,page:r.page,rowBlocks:r.rowBlocks,value:n}}))}},53212:function(r,e,n){"use strict";var i=n(3400),a=n(60520),t=n(86968).Q;r.exports=function(r,e,n,o){function c(n,t){return i.coerce(r,e,a,n,t)}t(e,o,c),c("columnwidth"),c("header.values"),c("header.format"),c("header.align"),c("header.prefix"),c("header.suffix"),c("header.height"),c("header.line.width"),c("header.line.color"),c("header.fill.color"),i.coerceFont(c,"header.font",o.font),function(r,e){for(var n=r.columnorder||[],i=r.header.values.length,a=n.slice(0,i),t=a.slice().sort((function(r,e){return r-e})),o=a.map((function(r){return t.indexOf(r)})),c=o.length;c/i),u=!t||c;r.mayHaveMarkup=t&&a.match(/[<&>]/);var d,s="string"===typeof(d=a)&&d.match(i.latexCheck);r.latex=s;var l,m,p=s?"":C(r.calcdata.cells.prefix,e,n)||"",I=s?"":C(r.calcdata.cells.suffix,e,n)||"",y=s?null:C(r.calcdata.cells.format,e,n)||null,f=p+(y?o(y)(r.value):r.value)+I;if(r.wrappingNeeded=!r.wrapped&&!u&&!s&&(l=G(f)),r.cellHeightMayIncrease=c||s||r.mayHaveMarkup||(void 0===l?G(f):l),r.needsConvertToTspans=r.mayHaveMarkup||r.wrappingNeeded||r.latex,r.wrappingNeeded){var g=(" "===i.wrapSplitCharacter?f.replace(/a&&i.push(t),a+=u}return i}(a,u,c);1===d.length&&(d[0]===a.length-1?d.unshift(d[0]-1):d.push(d[0]+1)),d[0]%2&&d.reverse(),e.each((function(r,e){r.page=d[e],r.scrollY=u})),e.attr("transform",(function(r){var e=N(r.rowBlocks,r.page)-r.scrollY;return l(0,e)})),r&&(F(r,n,e,d,i.prevPages,i,0),F(r,n,e,d,i.prevPages,i,1),v(n,r))}}function k(r,e,n,t){return function(o){var c=o.calcdata?o.calcdata:o,u=e.filter((function(r){return c.key===r.key})),d=n||c.scrollbarState.dragMultiplier,s=c.scrollY;c.scrollY=void 0===t?c.scrollY+d*a.event.dy:t;var l=u.selectAll("."+i.cn.yColumn).selectAll("."+i.cn.columnBlock).filter(A);return B(r,l,u),c.scrollY===s}}function F(r,e,n,i,a,t,o){i[o]!==a[o]&&(clearTimeout(t.currentRepaint[o]),t.currentRepaint[o]=setTimeout((function(){var t=n.filter((function(r,e){return e===o&&i[e]!==a[e]}));x(r,e,t,n),a[o]=i[o]})))}function z(r,e,n,t){return function(){var o=a.select(e.parentNode);o.each((function(r){var e=r.fragments;o.selectAll("tspan.line").each((function(r,n){e[n].width=this.getComputedTextLength()}));var n,a,t=e[e.length-1].width,c=e.slice(0,-1),u=[],d=0,s=r.column.columnWidth-2*i.cellPad;for(r.value="";c.length;)d+(a=(n=c.shift()).width+t)>s&&(r.value+=u.join(i.wrapSpacer)+i.lineBreaker,u=[],d=0),u.push(n.text),d+=a;d&&(r.value+=u.join(i.wrapSpacer)),r.wrapped=!0})),o.selectAll("tspan.line").remove(),P(o.select("."+i.cn.cellText),n,r,t),a.select(e.parentNode.parentNode).call(E)}}function w(r,e,n,t,o){return function(){if(!o.settledY){var c=a.select(e.parentNode),u=J(o),d=o.key-u.firstRowIndex,s=u.rows[d].rowHeight,m=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*i.cellPad:s,p=Math.max(m,s);p-u.rows[d].rowHeight&&(u.rows[d].rowHeight=p,r.selectAll("."+i.cn.columnCell).call(E),B(null,r.filter(A),0),v(n,t,!0)),c.attr("transform",(function(){var r=this,e=r.parentNode.getBoundingClientRect(),n=a.select(r.parentNode).select("."+i.cn.cellRect).node().getBoundingClientRect(),t=r.transform.baseVal.consolidate(),c=n.top-e.top+(t?t.matrix.f:i.cellPad);return l(R(o,a.select(r.parentNode).select("."+i.cn.cellTextHolder).node().getBoundingClientRect().width),c)})),o.settledY=!0}}}function R(r,e){switch(r.align){case"left":default:return i.cellPad;case"right":return r.column.columnWidth-(e||0)-i.cellPad;case"center":return(r.column.columnWidth-(e||0))/2}}function E(r){r.attr("transform",(function(r){var e=r.rowBlocks[0].auxiliaryBlocks.reduce((function(r,e){return r+T(e,1/0)}),0),n=T(J(r),r.key);return l(0,n+e)})).selectAll("."+i.cn.cellRect).attr("height",(function(r){return(e=J(r),n=r.key,e.rows[n-e.firstRowIndex]).rowHeight;var e,n}))}function N(r,e){for(var n=0,i=e-1;i>=0;i--)n+=D(r[i]);return n}function T(r,e){for(var n=0,i=0;i","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:s({},c.textfont,{}),editType:"calc"},text:c.text,textinfo:u.textinfo,texttemplate:a({editType:"plot"},{keys:d.eventDataKeys.concat(["label","value"])}),hovertext:c.hovertext,hoverinfo:u.hoverinfo,hovertemplate:i({},{keys:d.eventDataKeys}),textfont:c.textfont,insidetextfont:c.insidetextfont,outsidetextfont:s({},c.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"},sort:c.sort,root:u.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}},79516:function(r,e,n){"use strict";var i=n(7316);e.name="treemap",e.plot=function(r,n,a,t){i.plotBasePlot(e.name,r,n,a,t)},e.clean=function(r,n,a,t){i.cleanBasePlot(e.name,r,n,a,t)}},97840:function(r,e,n){"use strict";var i=n(3776);e.r=function(r,e){return i.calc(r,e)},e.q=function(r){return i._runCrossTraceCalc("treemap",r)}},32984:function(r){"use strict";r.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(r,e,n){"use strict";var i=n(3400),a=n(40516),t=n(76308),o=n(86968).Q,c=n(31508).handleText,u=n(78048).TEXTPAD,d=n(74174).handleMarkerDefaults,s=n(8932),l=s.hasColorscale,m=s.handleDefaults;r.exports=function(r,e,n,s){function p(n,t){return i.coerce(r,e,a,n,t)}var I=p("labels"),y=p("parents");if(I&&I.length&&y&&y.length){var f=p("values");f&&f.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"),e.texttemplate||p("textinfo",i.isArrayOrTypedArray(g)?"text+label":"label"),p("hovertext"),p("hovertemplate");var _=p("pathbar.visible");c(r,e,s,p,"auto",{hasPathbar:_,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var h=-1!==e.textposition.indexOf("bottom");d(r,e,s,p),(e._hasColorscale=l(r,"marker","colors")||(r.marker||{}).coloraxis)?m(r,e,s,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(e.marker.colors||[]).length);var v=2*e.textfont.size;p("marker.pad.t",h?v/4:v),p("marker.pad.l",v/4),p("marker.pad.r",v/4),p("marker.pad.b",h?v:v/4),p("marker.cornerradius"),e._hovered={marker:{line:{width:2,color:t.contrast(s.paper_bgcolor)}}},_&&(p("pathbar.thickness",e.pathbar.textfont.size+2*u),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),o(e,s,p),e._length=null}else e.visible=!1}},95808:function(r,e,n){"use strict";var i=n(33428),a=n(78176),t=n(82744).clearMinTextSize,o=n(60100).resizeText,c=n(52960);r.exports=function(r,e,n,u,d){var s,l,m=d.type,p=d.drawDescendants,I=r._fullLayout,y=I["_"+m+"layer"],f=!n;t(m,I),(s=y.selectAll("g.trace."+m).data(e,(function(r){return r[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(m,!0),s.order(),!I.uniformtext.mode&&a.hasTransition(n)?(u&&(l=u()),i.transition().duration(n.duration).ease(n.easing).each("end",(function(){l&&l()})).each("interrupt",(function(){l&&l()})).each((function(){y.selectAll("g.trace").each((function(e){c(r,e,this,n,p)}))}))):(s.each((function(e){c(r,e,this,n,p)})),I.uniformtext.mode&&o(r,y.selectAll(".trace"),m)),f&&s.exit().remove()}},27336:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(43616),o=n(72736),c=n(13832),u=n(66192).styleOne,d=n(32984),s=n(78176),l=n(45716),m=!0;r.exports=function(r,e,n,p,I){var y=I.barDifY,f=I.width,g=I.height,_=I.viewX,h=I.viewY,v=I.pathSlice,x=I.toMoveInsideSlice,P=I.strTransform,G=I.hasTransition,C=I.handleSlicesExit,S=I.makeUpdateSliceInterpolator,A=I.makeUpdateTextInterpolator,b={},M=r._context.staticPlot,B=r._fullLayout,k=e[0],F=k.trace,z=k.hierarchy,w=f/F._entryDepth,R=s.listPath(n.data,"id"),E=c(z.copy(),[f,g],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(E=E.filter((function(r){var e=R.indexOf(r.data.id);return-1!==e&&(r.x0=w*e,r.x1=w*(e+1),r.y0=y,r.y1=y+g,r.onPathbar=!0,!0)}))).reverse(),(p=p.data(E,s.getPtId)).enter().append("g").classed("pathbar",!0),C(p,m,b,[f,g],v),p.order();var N=p;G&&(N=N.transition().each("end",(function(){var e=i.select(this);s.setSliceCursor(e,r,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(c){c._x0=_(c.x0),c._x1=_(c.x1),c._y0=h(c.y0),c._y1=h(c.y1),c._hoverX=_(c.x1-Math.min(f,g)/2),c._hoverY=h(c.y1-g/2);var p=i.select(this),I=a.ensureSingle(p,"path","surface",(function(r){r.style("pointer-events",M?"none":"all")}));G?I.transition().attrTween("d",(function(r){var e=S(r,m,b,[f,g]);return function(r){return v(e(r))}})):I.attr("d",v),p.call(l,n,r,e,{styleOne:u,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(s.setSliceCursor,r,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:r._transitioning}),I.call(u,c,F,r,{hovered:!1}),c._text=(s.getPtLabel(c)||"").split("
").join(" ")||"";var y=a.ensureSingle(p,"g","slicetext"),C=a.ensureSingle(y,"text","",(function(r){r.attr("data-notex",1)})),k=a.ensureUniformFontSize(r,s.determineTextFont(F,c,B.font,{onPathbar:!0}));C.text(c._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(t.font,k).call(o.convertToTspans,r),c.textBB=t.bBox(C.node()),c.transform=x(c,{fontSize:k.size,onPathbar:!0}),c.transform.fontSize=k.size,G?C.transition().attrTween("transform",(function(r){var e=A(r,m,b,[f,g]);return function(r){return P(e(r))}})):C.attr("transform",P(c))}))}},76477:function(r,e,n){"use strict";var i=n(33428),a=n(3400),t=n(43616),o=n(72736),c=n(13832),u=n(66192).styleOne,d=n(32984),s=n(78176),l=n(45716),m=n(96488).formatSliceLabel,p=!1;r.exports=function(r,e,n,I,y){var f=y.width,g=y.height,_=y.viewX,h=y.viewY,v=y.pathSlice,x=y.toMoveInsideSlice,P=y.strTransform,G=y.hasTransition,C=y.handleSlicesExit,S=y.makeUpdateSliceInterpolator,A=y.makeUpdateTextInterpolator,b=y.prevEntry,M=r._context.staticPlot,B=r._fullLayout,k=e[0].trace,F=-1!==k.textposition.indexOf("left"),z=-1!==k.textposition.indexOf("right"),w=-1!==k.textposition.indexOf("bottom"),R=!w&&!k.marker.pad.t||w&&!k.marker.pad.b,E=c(n,[f,g],{packing:k.tiling.packing,squarifyratio:k.tiling.squarifyratio,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1,pad:{inner:k.tiling.pad,top:k.marker.pad.t,left:k.marker.pad.l,right:k.marker.pad.r,bottom:k.marker.pad.b}}).descendants(),N=1/0,T=-1/0;E.forEach((function(r){var e=r.depth;e>=k._maxDepth?(r.x0=r.x1=(r.x0+r.x1)/2,r.y0=r.y1=(r.y0+r.y1)/2):(N=Math.min(N,e),T=Math.max(T,e))})),I=I.data(E,s.getPtId),k._maxVisibleLayers=isFinite(T)?T-N+1:0,I.enter().append("g").classed("slice",!0),C(I,p,{},[f,g],v),I.order();var D=null;if(G&&b){var J=s.getPtId(b);I.each((function(r){null===D&&s.getPtId(r)===J&&(D={x0:r.x0,x1:r.x1,y0:r.y0,y1:r.y1})}))}var U=function(){return D||{x0:0,x1:f,y0:0,y1:g}},H=I;return G&&(H=H.transition().each("end",(function(){var e=i.select(this);s.setSliceCursor(e,r,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),H.each((function(c){var I=s.isHeader(c,k);c._x0=_(c.x0),c._x1=_(c.x1),c._y0=h(c.y0),c._y1=h(c.y1),c._hoverX=_(c.x1-k.marker.pad.r),c._hoverY=h(w?c.y1-k.marker.pad.b/2:c.y0+k.marker.pad.t/2);var y=i.select(this),C=a.ensureSingle(y,"path","surface",(function(r){r.style("pointer-events",M?"none":"all")}));G?C.transition().attrTween("d",(function(r){var e=S(r,p,U(),[f,g]);return function(r){return v(e(r))}})):C.attr("d",v),y.call(l,n,r,e,{styleOne:u,eventDataKeys:d.eventDataKeys,transitionTime:d.CLICK_TRANSITION_TIME,transitionEasing:d.CLICK_TRANSITION_EASING}).call(s.setSliceCursor,r,{isTransitioning:r._transitioning}),C.call(u,c,k,r,{hovered:!1}),c.x0===c.x1||c.y0===c.y1?c._text="":c._text=I?R?"":s.getPtLabel(c)||"":m(c,n,k,e,B)||"";var b=a.ensureSingle(y,"g","slicetext"),E=a.ensureSingle(b,"text","",(function(r){r.attr("data-notex",1)})),N=a.ensureUniformFontSize(r,s.determineTextFont(k,c,B.font)),T=c._text||" ",D=I&&-1===T.indexOf("
");E.text(T).classed("slicetext",!0).attr("text-anchor",z?"end":F||D?"start":"middle").call(t.font,N).call(o.convertToTspans,r),c.textBB=t.bBox(E.node()),c.transform=x(c,{fontSize:N.size,isHeader:I}),c.transform.fontSize=N.size,G?E.transition().attrTween("transform",(function(r){var e=A(r,p,U(),[f,g]);return function(r){return P(e(r))}})):E.attr("transform",P(c))})),D}},83024:function(r){"use strict";r.exports=function r(e,n,i){var a;i.swapXY&&(a=e.x0,e.x0=e.y0,e.y0=a,a=e.x1,e.x1=e.y1,e.y1=a),i.flipX&&(a=e.x0,e.x0=n[0]-e.x1,e.x1=n[0]-a),i.flipY&&(a=e.y0,e.y0=n[1]-e.y1,e.y1=n[1]-a);var t=e.children;if(t)for(var o=0;o-1?k+w:-(z+w):0,E={x0:F,x1:F,y0:R,y1:R+z},N=function(r,e,n){var i=g.tiling.pad,a=function(r){return r-i<=e.x0},t=function(r){return r+i>=e.x1},o=function(r){return r-i<=e.y0},c=function(r){return r+i>=e.y1};return r.x0===e.x0&&r.x1===e.x1&&r.y0===e.y0&&r.y1===e.y1?{x0:r.x0,x1:r.x1,y0:r.y0,y1:r.y1}:{x0:a(r.x0-i)?0:t(r.x0-i)?n[0]:r.x0,x1:a(r.x1+i)?0:t(r.x1+i)?n[0]:r.x1,y0:o(r.y0-i)?0:c(r.y0-i)?n[1]:r.y0,y1:o(r.y1+i)?0:c(r.y1+i)?n[1]:r.y1}},T=null,D={},J={},U=null,H=function(r,e){return e?D[m(r)]:J[m(r)]},L=function(r,e,n,i){if(e)return D[m(h)]||E;var a=J[g.level]||n;return function(r){return r.data.depth-v.data.depth=(i-=(_?er:er.r)-c)){var p=(n+i)/2;n=p,i=p}var I;or?a<(I=t-(_?er:er.b))&&I"===rr?(u.x-=t,d.x-=t,s.x-=t,l.x-=t):"/"===rr?(s.x-=t,l.x-=t,o.x-=t/2,c.x-=t/2):"\\"===rr?(u.x-=t,d.x-=t,o.x-=t/2,c.x-=t/2):"<"===rr&&(o.x-=t,c.x-=t),$(u),$(l),$(o),$(d),$(s),$(c),"M"+X(u.x,u.y)+"L"+X(d.x,d.y)+"L"+X(c.x,c.y)+"L"+X(s.x,s.y)+"L"+X(l.x,l.y)+"L"+X(o.x,o.y)+"Z"},toMoveInsideSlice:cr,makeUpdateSliceInterpolator:dr,makeUpdateTextInterpolator:sr,handleSlicesExit:lr,hasTransition:S,strTransform:mr}):P.remove()}},66192:function(r,e,n){"use strict";var i=n(33428),a=n(76308),t=n(3400),o=n(78176),c=n(82744).resizeText,u=n(60404);function d(r,e,n,i,c){var d,s,l=(c||{}).hovered,m=e.data.data,p=m.i,I=m.color,y=o.isHierarchyRoot(e),f=1;if(l)d=n._hovered.marker.line.color,s=n._hovered.marker.line.width;else if(y&&I===n.root.color)f=100,d="rgba(0,0,0,0)",s=0;else if(d=t.castOption(n,p,"marker.line.color")||a.defaultLine,s=t.castOption(n,p,"marker.line.width")||0,!n._hasColorscale&&!e.onPathbar){var g=n.marker.depthfade;if(g){var _,h=a.combine(a.addOpacity(n._backgroundColor,.75),I);if(!0===g){var v=o.getMaxDepth(n);_=isFinite(v)?o.isLeaf(e)?0:n._maxVisibleLayers-(e.data.depth-n._entryDepth):e.data.height+1}else _=e.data.depth-n._entryDepth,n._atRootLevel||_++;if(_>0)for(var x=0;x<_;x++){var P=.5*x/_;I=a.combine(a.addOpacity(h,P),I)}}}r.call(u,e,n,i,I).style("stroke-width",s).call(a.stroke,d).style("opacity",f)}r.exports={style:function(r){var e=r._fullLayout._treemaplayer.selectAll(".trace");c(r,e,"treemap"),e.each((function(e){var n=i.select(this),a=e[0].trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each((function(e){i.select(this).call(d,e,a,r,{hovered:!1})}))}))},styleOne:d}},13988:function(r,e,n){"use strict";var i=n(63188),a=n(92880).extendFlat,t=n(29736).axisHoverFormat;r.exports={y:i.y,x:i.x,x0:i.x0,y0:i.y0,xhoverformat:t("x"),yhoverformat:t("y"),name:a({},i.name,{}),orientation:a({},i.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:i.fillcolor,points:a({},i.boxpoints,{}),jitter:a({},i.jitter,{}),pointpos:a({},i.pointpos,{}),width:a({},i.width,{}),marker:i.marker,text:i.text,hovertext:i.hovertext,hovertemplate:i.hovertemplate,quartilemethod:i.quartilemethod,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:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:i.selected,unselected:i.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:i.zorder}},67064:function(r,e,n){"use strict";var i=n(3400),a=n(54460),t=n(62555),o=n(63800),c=n(39032).BADNUM;function u(r,e,n){var a=e.max-e.min;if(!a)return r.bandwidth?r.bandwidth:0;if(r.bandwidth)return Math.max(r.bandwidth,a/1e4);var t=n.length,o=i.stdev(n,t-1,e.mean);return Math.max(function(r,e,n){return 1.059*Math.min(e,n/1.349)*Math.pow(r,-.2)}(t,o,e.q3-e.q1),a/100)}function d(r,e,n,i){var t,o=r.spanmode,u=r.span||[],d=[e.min,e.max],s=[e.min-2*i,e.max+2*i];function l(i){var a=u[i],t="multicategory"===n.type?n.r2c(a):n.d2c(a,0,r[e.valLetter+"calendar"]);return t===c?s[i]:t}var m={type:"linear",range:t="soft"===o?s:"hard"===o?d:[l(0),l(1)]};return a.setConvert(m),m.cleanRange(),t}r.exports=function(r,e){var n=t(r,e);if(n[0].t.empty)return n;for(var c=r._fullLayout,s=a.getFromId(r,e["h"===e.orientation?"xaxis":"yaxis"]),l=1/0,m=-1/0,p=0,I=0,y=0;y0){var v,x,P,G,C,S=r.xa,A=r.ya;"h"===I.orientation?(C=e,v="y",P=A,x="x",G=S):(C=n,v="x",P=S,x="y",G=A);var b=p[r.index];if(C>=b.span[0]&&C<=b.span[1]){var M=a.extendFlat({},r),B=G.c2p(C,!0),k=c.getKdeValue(b,I,C),F=c.getPositionOnKdePath(b,I,B),z=P._offset,w=P._length;M[v+"0"]=F[0],M[v+"1"]=F[1],M[x+"0"]=M[x+"1"]=B,M[x+"Label"]=x+": "+t.hoverLabelText(G,C,I[x+"hoverformat"])+", "+p[0].t.labels.kde+" "+k.toFixed(3);for(var R=0,E=0;E")),s.color=function(r,e){var n=r[e.dir].marker,i=n.color,t=n.line.color,o=n.line.width;return a(i)?i:a(t)&&o?t:void 0}(m,f),[s]}function C(r){return i(y,r,m[I+"hoverformat"])}}},95952:function(r,e,n){"use strict";r.exports={attributes:n(65776),layoutAttributes:n(91352),supplyDefaults:n(24224).supplyDefaults,crossTraceDefaults:n(24224).crossTraceDefaults,supplyLayoutDefaults:n(59464),calc:n(73540),crossTraceCalc:n(50152),plot:n(64488),style:n(12252).style,hoverPoints:n(94196),eventData:n(53256),selectPoints:n(45784),moduleType:"trace",name:"waterfall",basePlotModule:n(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(r){"use strict";r.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"}}},59464:function(r,e,n){"use strict";var i=n(3400),a=n(91352);r.exports=function(r,e,n){var t=!1;function o(n,t){return i.coerce(r,e,a,n,t)}for(var c=0;c0&&(f+=m?"M"+l[0]+","+I[1]+"V"+I[0]:"M"+l[1]+","+I[0]+"H"+l[0]),"between"!==p&&(n.isSum||c path").each((function(r){if(!r.isBlank){var e=c[r.dir].marker;i.select(this).call(t.fill,e.color).call(t.stroke,e.line.color).call(a.dashLine,e.line.dash,e.line.width).style("opacity",c.selectedpoints&&!r.selected?o:1)}})),d(n,c,r),n.selectAll(".lines").each((function(){var r=c.connector.line;a.lineGroupStyle(i.select(this).selectAll("path"),r.width,r.color,r.dash)}))}))}}},84224:function(r,e,n){"use strict";var i=n(54460),a=n(3400),t=n(73060),o=n(60468).W,c=n(39032).BADNUM;e.moduleType="transform",e.name="aggregate";var u=e.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"},d=u.aggregations;function s(r,e,n,t){if(t.enabled){for(var o=t.target,u=a.nestedProperty(e,o),d=u.get(),s=function(r,e){var n=r.func,i=e.d2c,t=e.c2d;switch(n){case"count":return l;case"first":return m;case"last":return p;case"sum":return function(r,e){for(var n=0,a=0;aa&&(a=s,o=d)}}return a?t(o):c};case"rms":return function(r,e){for(var n=0,a=0,o=0;o":return function(r){return p(r)>l};case">=":return function(r){return p(r)>=l};case"[]":return function(r){var e=p(r);return e>=l[0]&&e<=l[1]};case"()":return function(r){var e=p(r);return e>l[0]&&e=l[0]&&el[0]&&e<=l[1]};case"][":return function(r){var e=p(r);return e<=l[0]||e>=l[1]};case")(":return function(r){var e=p(r);return el[1]};case"](":return function(r){var e=p(r);return e<=l[0]||e>l[1]};case")[":return function(r){var e=p(r);return e=l[1]};case"{}":return function(r){return-1!==l.indexOf(p(r))};case"}{":return function(r){return-1===l.indexOf(p(r))}}}(n,t.getDataToCoordFunc(r,e,c,a),m),h={},v={},x=0;I?(f=function(r){h[r.astr]=i.extendDeep([],r.get()),r.set(new Array(l))},g=function(r,e){var n=h[r.astr][e];r.get()[e]=n}):(f=function(r){h[r.astr]=i.extendDeep([],r.get()),r.set([])},g=function(r,e){var n=h[r.astr][e];r.get().push(n)}),C(f);for(var P=o(e.transforms,n),G=0;G1?"%{group} (%{trace})":"%{group}");var u=r.styles,d=o.styles=[];if(u)for(t=0;tp)throw new RangeError('The value "'+r+'" is invalid for option "size"');var e=new Uint8Array(r);return Object.setPrototypeOf(e,y.prototype),e}function y(r,e,n){if("number"===typeof r){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return _(r)}return f(r,e,n)}function f(r,e,n){if("string"===typeof r)return function(r,e){if("string"===typeof e&&""!==e||(e="utf8"),!y.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|P(r,e),i=I(n),a=i.write(r,e);return a!==n&&(i=i.slice(0,a)),i}(r,e);if(ArrayBuffer.isView(r))return function(r){if(nr(r,Uint8Array)){var e=new Uint8Array(r);return v(e.buffer,e.byteOffset,e.byteLength)}return h(r)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+d(r));if(nr(r,ArrayBuffer)||r&&nr(r.buffer,ArrayBuffer))return v(r,e,n);if("undefined"!==typeof SharedArrayBuffer&&(nr(r,SharedArrayBuffer)||r&&nr(r.buffer,SharedArrayBuffer)))return v(r,e,n);if("number"===typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=r.valueOf&&r.valueOf();if(null!=i&&i!==r)return y.from(i,e,n);var a=function(r){if(y.isBuffer(r)){var e=0|x(r.length),n=I(e);return 0===n.length||r.copy(n,0,0,e),n}return void 0!==r.length?"number"!==typeof r.length||ir(r.length)?I(0):h(r):"Buffer"===r.type&&Array.isArray(r.data)?h(r.data):void 0}(r);if(a)return a;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof r[Symbol.toPrimitive])return y.from(r[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+d(r))}function g(r){if("number"!==typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function _(r){return g(r),I(r<0?0:0|x(r))}function h(r){for(var e=r.length<0?0:0|x(r.length),n=I(e),i=0;i=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|r}function P(r,e){if(y.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||nr(r,ArrayBuffer))return r.byteLength;if("string"!==typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+d(r));var n=r.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return $(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return rr(r).length;default:if(a)return i?-1:$(r).length;e=(""+e).toLowerCase(),a=!0}}function G(r,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return T(this,e,n);case"utf8":case"utf-8":return w(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return z(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}function C(r,e,n){var i=r[e];r[e]=r[n],r[n]=i}function S(r,e,n,i,a){if(0===r.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),ir(n=+n)&&(n=a?0:r.length-1),n<0&&(n=r.length+n),n>=r.length){if(a)return-1;n=r.length-1}else if(n<0){if(!a)return-1;n=0}if("string"===typeof e&&(e=y.from(e,i)),y.isBuffer(e))return 0===e.length?-1:A(r,e,n,i,a);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(r,e,n):Uint8Array.prototype.lastIndexOf.call(r,e,n):A(r,[e],n,i,a);throw new TypeError("val must be string, number or Buffer")}function A(r,e,n,i,a){var t,o=1,c=r.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(r.length<2||e.length<2)return-1;o=2,c/=2,u/=2,n/=2}function d(r,e){return 1===o?r[e]:r.readUInt16BE(e*o)}if(a){var s=-1;for(t=n;tc&&(n=c-u),t=n;t>=0;t--){for(var l=!0,m=0;ma&&(i=a):i=a;var t,o=e.length;for(i>o/2&&(i=o/2),t=0;t>8,a=n%256,t.push(a),t.push(i);return t}(e,r.length-n),r,n,i)}function z(r,e,n){return 0===e&&n===r.length?s.fromByteArray(r):s.fromByteArray(r.slice(e,n))}function w(r,e,n){n=Math.min(r.length,n);for(var i=[],a=e;a239?4:t>223?3:t>191?2:1;if(a+c<=n){var u=void 0,d=void 0,s=void 0,l=void 0;switch(c){case 1:t<128&&(o=t);break;case 2:128===(192&(u=r[a+1]))&&(l=(31&t)<<6|63&u)>127&&(o=l);break;case 3:u=r[a+1],d=r[a+2],128===(192&u)&&128===(192&d)&&(l=(15&t)<<12|(63&u)<<6|63&d)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:u=r[a+1],d=r[a+2],s=r[a+3],128===(192&u)&&128===(192&d)&&128===(192&s)&&(l=(15&t)<<18|(63&u)<<12|(63&d)<<6|63&s)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,c=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),a+=c}return function(r){var e=r.length;if(e<=R)return String.fromCharCode.apply(String,r);for(var n="",i=0;ii.length?(y.isBuffer(t)||(t=y.from(t)),t.copy(i,a)):Uint8Array.prototype.set.call(i,t,a);else{if(!y.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,a)}a+=t.length}return i},y.byteLength=P,y.prototype._isBuffer=!0,y.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;en&&(r+=" ... "),""},m&&(y.prototype[m]=y.prototype.inspect),y.prototype.compare=function(r,e,n,i,a){if(nr(r,Uint8Array)&&(r=y.from(r,r.offset,r.byteLength)),!y.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+d(r));if(void 0===e&&(e=0),void 0===n&&(n=r?r.length:0),void 0===i&&(i=0),void 0===a&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(this===r)return 0;for(var t=(a>>>=0)-(i>>>=0),o=(n>>>=0)-(e>>>=0),c=Math.min(t,o),u=this.slice(i,a),s=r.slice(e,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var a=this.length-e;if((void 0===n||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var t=!1;;)switch(i){case"hex":return b(this,r,e,n);case"utf8":case"utf-8":return M(this,r,e,n);case"ascii":case"latin1":case"binary":return B(this,r,e,n);case"base64":return k(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,r,e,n);default:if(t)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),t=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function E(r,e,n){var i="";n=Math.min(r.length,n);for(var a=e;ai)&&(n=i);for(var a="",t=e;tn)throw new RangeError("Trying to access beyond buffer length")}function U(r,e,n,i,a,t){if(!y.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||er.length)throw new RangeError("Index out of range")}function H(r,e,n,i,a){q(e,i,a,r,n,7);var t=Number(e&BigInt(4294967295));r[n++]=t,t>>=8,r[n++]=t,t>>=8,r[n++]=t,t>>=8,r[n++]=t;var o=Number(e>>BigInt(32)&BigInt(4294967295));return r[n++]=o,o>>=8,r[n++]=o,o>>=8,r[n++]=o,o>>=8,r[n++]=o,n}function L(r,e,n,i,a){q(e,i,a,r,n,7);var t=Number(e&BigInt(4294967295));r[n+7]=t,t>>=8,r[n+6]=t,t>>=8,r[n+5]=t,t>>=8,r[n+4]=t;var o=Number(e>>BigInt(32)&BigInt(4294967295));return r[n+3]=o,o>>=8,r[n+2]=o,o>>=8,r[n+1]=o,o>>=8,r[n]=o,n+8}function O(r,e,n,i,a,t){if(n+i>r.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function K(r,e,n,i,a){return e=+e,n>>>=0,a||O(r,0,n,4),l.write(r,e,n,i,23,4),n+4}function V(r,e,n,i,a){return e=+e,n>>>=0,a||O(r,0,n,8),l.write(r,e,n,i,52,8),n+8}y.prototype.slice=function(r,e){var n=this.length;(r=~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r],a=1,t=0;++t>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i},y.prototype.readUint8=y.prototype.readUInt8=function(r,e){return r>>>=0,e||J(r,1,this.length),this[r]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(r,e){return r>>>=0,e||J(r,2,this.length),this[r]|this[r+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(r,e){return r>>>=0,e||J(r,2,this.length),this[r]<<8|this[r+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(r,e){return r>>>=0,e||J(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(r,e){return r>>>=0,e||J(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},y.prototype.readBigUInt64LE=tr((function(r){Y(r>>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=e+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,24),a=this[++r]+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(i)+(BigInt(a)<>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=e*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r],a=this[++r]*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+n;return(BigInt(i)<>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r],a=1,t=0;++t=(a*=128)&&(i-=Math.pow(2,8*e)),i},y.prototype.readIntBE=function(r,e,n){r>>>=0,e>>>=0,n||J(r,e,this.length);for(var i=e,a=1,t=this[r+--i];i>0&&(a*=256);)t+=this[r+--i]*a;return t>=(a*=128)&&(t-=Math.pow(2,8*e)),t},y.prototype.readInt8=function(r,e){return r>>>=0,e||J(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},y.prototype.readInt16LE=function(r,e){r>>>=0,e||J(r,2,this.length);var n=this[r]|this[r+1]<<8;return 32768&n?4294901760|n:n},y.prototype.readInt16BE=function(r,e){r>>>=0,e||J(r,2,this.length);var n=this[r+1]|this[r]<<8;return 32768&n?4294901760|n:n},y.prototype.readInt32LE=function(r,e){return r>>>=0,e||J(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},y.prototype.readInt32BE=function(r,e){return r>>>=0,e||J(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},y.prototype.readBigInt64LE=tr((function(r){Y(r>>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=this[r+4]+this[r+5]*Math.pow(2,8)+this[r+6]*Math.pow(2,16)+(n<<24);return(BigInt(i)<>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=(e<<24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r];return(BigInt(i)<>>=0,e||J(r,4,this.length),l.read(this,r,!0,23,4)},y.prototype.readFloatBE=function(r,e){return r>>>=0,e||J(r,4,this.length),l.read(this,r,!1,23,4)},y.prototype.readDoubleLE=function(r,e){return r>>>=0,e||J(r,8,this.length),l.read(this,r,!0,52,8)},y.prototype.readDoubleBE=function(r,e){return r>>>=0,e||J(r,8,this.length),l.read(this,r,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(r,e,n,i){r=+r,e>>>=0,n>>>=0,i||U(this,r,e,n,Math.pow(2,8*n)-1,0);var a=1,t=0;for(this[e]=255&r;++t>>=0,n>>>=0,i||U(this,r,e,n,Math.pow(2,8*n)-1,0);var a=n-1,t=1;for(this[e+a]=255&r;--a>=0&&(t*=256);)this[e+a]=r/t&255;return e+n},y.prototype.writeUint8=y.prototype.writeUInt8=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,1,255,0),this[e]=255&r,e+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,65535,0),this[e]=255&r,this[e+1]=r>>>8,e+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,65535,0),this[e]=r>>>8,this[e+1]=255&r,e+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,4294967295,0),this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=255&r,e+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,4294967295,0),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r,e+4},y.prototype.writeBigUInt64LE=tr((function(r){return H(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeBigUInt64BE=tr((function(r){return L(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e>>>=0,!i){var a=Math.pow(2,8*n-1);U(this,r,e,n,a-1,-a)}var t=0,o=1,c=0;for(this[e]=255&r;++t>>=0,!i){var a=Math.pow(2,8*n-1);U(this,r,e,n,a-1,-a)}var t=n-1,o=1,c=0;for(this[e+t]=255&r;--t>=0&&(o*=256);)r<0&&0===c&&0!==this[e+t+1]&&(c=1),this[e+t]=(r/o|0)-c&255;return e+n},y.prototype.writeInt8=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,1,127,-128),r<0&&(r=255+r+1),this[e]=255&r,e+1},y.prototype.writeInt16LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,32767,-32768),this[e]=255&r,this[e+1]=r>>>8,e+2},y.prototype.writeInt16BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,32767,-32768),this[e]=r>>>8,this[e+1]=255&r,e+2},y.prototype.writeInt32LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,2147483647,-2147483648),this[e]=255&r,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24,e+4},y.prototype.writeInt32BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r,e+4},y.prototype.writeBigInt64LE=tr((function(r){return H(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeBigInt64BE=tr((function(r){return L(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeFloatLE=function(r,e,n){return K(this,r,e,!0,n)},y.prototype.writeFloatBE=function(r,e,n){return K(this,r,e,!1,n)},y.prototype.writeDoubleLE=function(r,e,n){return V(this,r,e,!0,n)},y.prototype.writeDoubleBE=function(r,e,n){return V(this,r,e,!1,n)},y.prototype.copy=function(r,e,n,i){if(!y.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e>>=0,n=void 0===n?this.length:n>>>0,r||(r=0),"number"===typeof r)for(t=e;t=i+4;n-=3)e="_".concat(r.slice(n-3,n)).concat(e);return"".concat(r.slice(0,n)).concat(e)}function q(r,e,n,i,a,t){if(r>n||r3?0===e||e===BigInt(0)?">= 0".concat(c," and < 2").concat(c," ** ").concat(8*(t+1)).concat(c):">= -(2".concat(c," ** ").concat(8*(t+1)-1).concat(c,") and < 2 ** ")+"".concat(8*(t+1)-1).concat(c):">= ".concat(e).concat(c," and <= ").concat(n).concat(c),new j.ERR_OUT_OF_RANGE("value",o,r)}!function(r,e,n){Y(e,"offset"),void 0!==r[e]&&void 0!==r[e+n]||X(e,r.length-(n+1))}(i,a,t)}function Y(r,e){if("number"!==typeof r)throw new j.ERR_INVALID_ARG_TYPE(e,"number",r)}function X(r,e,n){if(Math.floor(r)!==r)throw Y(r,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",r);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(e),r)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(r){return r?"".concat(r," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(r,e){return'The "'.concat(r,'" argument must be of type number. Received type ').concat(d(e))}),TypeError),W("ERR_OUT_OF_RANGE",(function(r,e,n){var i='The value of "'.concat(r,'" is out of range.'),a=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?a=Z(String(n)):"bigint"===typeof n&&(a=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(a=Z(a)),a+="n"),i+=" It must be ".concat(e,". Received ").concat(a)}),RangeError);var Q=/[^+/0-9A-Za-z-_]/g;function $(r,e){var n;e=e||1/0;for(var i=r.length,a=null,t=[],o=0;o55295&&n<57344){if(!a){if(n>56319){(e-=3)>-1&&t.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&t.push(239,191,189);continue}a=n;continue}if(n<56320){(e-=3)>-1&&t.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(e-=3)>-1&&t.push(239,191,189);if(a=null,n<128){if((e-=1)<0)break;t.push(n)}else if(n<2048){if((e-=2)<0)break;t.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;t.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;t.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return t}function rr(r){return s.toByteArray(function(r){if((r=(r=r.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;r.length%4!==0;)r+="=";return r}(r))}function er(r,e,n,i){var a;for(a=0;a=e.length||a>=r.length);++a)e[a+n]=r[a];return a}function nr(r,e){return r instanceof e||null!=r&&null!=r.constructor&&null!=r.constructor.name&&r.constructor.name===e.name}function ir(r){return r!==r}var ar=function(){for(var r="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var i=16*n,a=0;a<16;++a)e[i+a]=r[n]+r[a];return e}();function tr(r){return"undefined"===typeof BigInt?or:r}function or(){throw new Error("BigInt not supported")}},9216:function(r){"use strict";r.exports=a,r.exports.isMobile=a,r.exports.default=a;var e=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,i=/android|ipad|playbook|silk/i;function a(r){r||(r={});var a=r.ua;if(a||"undefined"===typeof navigator||(a=navigator.userAgent),a&&a.headers&&"string"===typeof a.headers["user-agent"]&&(a=a.headers["user-agent"]),"string"!==typeof a)return!1;var t=e.test(a)&&!n.test(a)||!!r.tablet&&i.test(a);return!t&&r.tablet&&r.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==a.indexOf("Macintosh")&&-1!==a.indexOf("Safari")&&(t=!0),t}},6296:function(r,e,n){"use strict";r.exports=function(r){var e=(r=r||{}).eye||[0,0,1],n=r.center||[0,0,0],c=r.up||[0,1,0],u=r.distanceLimits||[0,1/0],d=r.mode||"turntable",s=i(),l=a(),m=t();return s.setDistanceLimits(u[0],u[1]),s.lookAt(0,e,n,c),l.setDistanceLimits(u[0],u[1]),l.lookAt(0,e,n,c),m.setDistanceLimits(u[0],u[1]),m.lookAt(0,e,n,c),new o({turntable:s,orbit:l,matrix:m},d)};var i=n(7261),a=n(9977),t=n(4192);function o(r,e){this._controllerNames=Object.keys(r),this._controllerList=this._controllerNames.map((function(e){return r[e]})),this._mode=e,this._active=r[e],this._active||(this._mode="turntable",this._active=r.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 c=o.prototype;c.flush=function(r){for(var e=this._controllerList,n=0;n0?o-4:o;for(n=0;n>16&255,d[s++]=e>>8&255,d[s++]=255&e;return 2===u&&(e=i[r.charCodeAt(n)]<<2|i[r.charCodeAt(n+1)]>>4,d[s++]=255&e),1===u&&(e=i[r.charCodeAt(n)]<<10|i[r.charCodeAt(n+1)]<<4|i[r.charCodeAt(n+2)]>>2,d[s++]=e>>8&255,d[s++]=255&e),d},e.fromByteArray=function(r){for(var e,i=r.length,a=i%3,t=[],o=16383,c=0,d=i-a;cd?d:c+o));return 1===a?(e=r[i-1],t.push(n[e>>2]+n[e<<4&63]+"==")):2===a&&(e=(r[i-2]<<8)+r[i-1],t.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),t.join("")};for(var n=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=t[o],i[t.charCodeAt(o)]=o;function c(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=r.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(r,e,i){for(var a,t,o=[],c=e;c>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},3865:function(r,e,n){"use strict";var i=n(869);r.exports=function(r,e){return i(r[0].mul(e[1]).add(e[0].mul(r[1])),r[1].mul(e[1]))}},1318:function(r){"use strict";r.exports=function(r,e){return r[0].mul(e[1]).cmp(e[0].mul(r[1]))}},8697:function(r,e,n){"use strict";var i=n(869);r.exports=function(r,e){return i(r[0].mul(e[1]),r[1].mul(e[0]))}},7842:function(r,e,n){"use strict";var i=n(6330),a=n(1533),t=n(2651),o=n(4387),c=n(869),u=n(8697);r.exports=function r(e,n){if(i(e))return n?u(e,r(n)):[e[0].clone(),e[1].clone()];var d,s,l=0;if(a(e))d=e.clone();else if("string"===typeof e)d=o(e);else{if(0===e)return[t(0),t(1)];if(e===Math.floor(e))d=t(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),l-=256;d=t(e)}}if(i(n))d.mul(n[1]),s=n[0].clone();else if(a(n))s=n.clone();else if("string"===typeof n)s=o(n);else if(n)if(n===Math.floor(n))s=t(n);else{for(;n!==Math.floor(n);)n*=Math.pow(2,256),l+=256;s=t(n)}else s=t(1);return l>0?d=d.ushln(l):l<0&&(s=s.ushln(-l)),c(d,s)}},6330:function(r,e,n){"use strict";var i=n(1533);r.exports=function(r){return Array.isArray(r)&&2===r.length&&i(r[0])&&i(r[1])}},5716:function(r,e,n){"use strict";var i=n(6859);r.exports=function(r){return r.cmp(new i(0))}},1369:function(r,e,n){"use strict";var i=n(5716);r.exports=function(r){var e=r.length,n=r.words,a=0;if(1===e)a=n[0];else if(2===e)a=n[0]+67108864*n[1];else for(var t=0;t20?52:n+32}},1533:function(r,e,n){"use strict";n(6859),r.exports=function(r){return r&&"object"===typeof r&&Boolean(r.words)}},2651:function(r,e,n){"use strict";var i=n(6859),a=n(2361);r.exports=function(r){var e=a.exponent(r);return e<52?new i(r):new i(r*Math.pow(2,52-e)).ushln(e-52)}},869:function(r,e,n){"use strict";var i=n(2651),a=n(5716);r.exports=function(r,e){var n=a(r),t=a(e);if(0===n)return[i(0),i(1)];if(0===t)return[i(0),i(0)];t<0&&(r=r.neg(),e=e.neg());var o=r.gcd(e);return o.cmpn(1)?[r.div(o),e.div(o)]:[r,e]}},4387:function(r,e,n){"use strict";var i=n(6859);r.exports=function(r){return new i(r)}},6504:function(r,e,n){"use strict";var i=n(869);r.exports=function(r,e){return i(r[0].mul(e[0]),r[1].mul(e[1]))}},7721:function(r,e,n){"use strict";var i=n(5716);r.exports=function(r){return i(r[0])*i(r[1])}},5572:function(r,e,n){"use strict";var i=n(869);r.exports=function(r,e){return i(r[0].mul(e[1]).sub(r[1].mul(e[0])),r[1].mul(e[1]))}},946:function(r,e,n){"use strict";var i=n(1369),a=n(4025);r.exports=function(r){var e=r[0],n=r[1];if(0===e.cmpn(0))return 0;var t=e.abs().divmod(n.abs()),o=t.div,c=i(o),u=t.mod,d=e.negative!==n.negative?-1:1;if(0===u.cmpn(0))return d*c;if(c){var s=a(c)+4;return d*(c+(m=i(u.ushln(s).divRound(n)))*Math.pow(2,-s))}var l=n.bitLength()-u.bitLength()+53,m=i(u.ushln(l).divRound(n));return l<1023?d*m*Math.pow(2,-l):d*(m*=Math.pow(2,-1023))*Math.pow(2,1023-l)}},2478:function(r){"use strict";function e(r,e,n,i,a){for(var t=a+1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)>=0?(t=o,a=o-1):i=o+1}return t}function n(r,e,n,i,a){for(var t=a+1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)>0?(t=o,a=o-1):i=o+1}return t}function i(r,e,n,i,a){for(var t=i-1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)<0?(t=o,i=o+1):a=o-1}return t}function a(r,e,n,i,a){for(var t=i-1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)<=0?(t=o,i=o+1):a=o-1}return t}function t(r,e,n,i,a){for(;i<=a;){var t=i+a>>>1,o=r[t],c=void 0!==n?n(o,e):o-e;if(0===c)return t;c<=0?i=t+1:a=t-1}return-1}function o(r,e,n,i,a,t){return"function"===typeof n?t(r,e,n,void 0===i?0:0|i,void 0===a?r.length-1:0|a):t(r,e,void 0,void 0===n?0:0|n,void 0===i?r.length-1:0|i)}r.exports={ge:function(r,n,i,a,t){return o(r,n,i,a,t,e)},gt:function(r,e,i,a,t){return o(r,e,i,a,t,n)},lt:function(r,e,n,a,t){return o(r,e,n,a,t,i)},le:function(r,e,n,i,t){return o(r,e,n,i,t,a)},eq:function(r,e,n,i,a){return o(r,e,n,i,a,t)}}},8828:function(r,e){"use strict";function n(r){var e=32;return(r&=-r)&&e--,65535&r&&(e-=16),16711935&r&&(e-=8),252645135&r&&(e-=4),858993459&r&&(e-=2),1431655765&r&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(r){return(r>0)-(r<0)},e.abs=function(r){var e=r>>31;return(r^e)-e},e.min=function(r,e){return e^(r^e)&-(r65535)<<4,e|=n=((r>>>=e)>255)<<3,e|=n=((r>>>=n)>15)<<2,(e|=n=((r>>>=n)>3)<<1)|(r>>>=n)>>1},e.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},e.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},e.countTrailingZeros=n,e.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,1+(r|=r>>>16)},e.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},e.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);!function(r){for(var e=0;e<256;++e){var n=e,i=e,a=7;for(n>>>=1;n;n>>>=1)i<<=1,i|=1&n,--a;r[e]=i<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},e.interleave2=function(r,e){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(r,e){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>e&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},e.interleave3=function(r,e,n){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(r,e){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>e&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},e.nextCombination=function(r){var e=r|r-1;return e+1|(~e&-~e)-1>>>n(r)+1}},6859:function(r,e,n){!function(r,e){"use strict";function i(r,e){if(!r)throw new Error(e||"Assertion failed")}function a(r,e){r.super_=e;var n=function(){};n.prototype=e.prototype,r.prototype=new n,r.prototype.constructor=r}function t(r,e,n){if(t.isBN(r))return r;this.negative=0,this.words=null,this.length=0,this.red=null,null!==r&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(r||0,e||10,n||"be"))}var o;"object"===typeof r?r.exports=t:e.BN=t,t.BN=t,t.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(7790).Buffer}catch(S){}function c(r,e){var n=r.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(r,e,n){var i=c(r,n);return n-1>=e&&(i|=c(r,n-1)<<4),i}function d(r,e,n,i){for(var a=0,t=Math.min(r.length,n),o=e;o=49?c-49+10:c>=17?c-17+10:c}return a}t.isBN=function(r){return r instanceof t||null!==r&&"object"===typeof r&&r.constructor.wordSize===t.wordSize&&Array.isArray(r.words)},t.max=function(r,e){return r.cmp(e)>0?r:e},t.min=function(r,e){return r.cmp(e)<0?r:e},t.prototype._init=function(r,e,n){if("number"===typeof r)return this._initNumber(r,e,n);if("object"===typeof r)return this._initArray(r,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var a=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a=0;a-=3)o=r[a]|r[a-1]<<8|r[a-2]<<16,this.words[t]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,t++);else if("le"===n)for(a=0,t=0;a>>26-c&67108863,(c+=24)>=26&&(c-=26,t++);return this.strip()},t.prototype._parseHex=function(r,e,n){this.length=Math.ceil((r.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)a=u(r,e,i)<=18?(t-=18,o+=1,this.words[o]|=a>>>26):t+=8;else for(i=(r.length-e)%2===0?e+1:e;i=18?(t-=18,o+=1,this.words[o]|=a>>>26):t+=8;this.strip()},t.prototype._parseBase=function(r,e,n){this.words=[0],this.length=1;for(var i=0,a=1;a<=67108863;a*=e)i++;i--,a=a/e|0;for(var t=r.length-n,o=t%i,c=Math.min(t,t-o)+n,u=0,s=n;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},t.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},t.prototype.inspect=function(){return(this.red?""};var s=["","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"],l=[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],m=[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(r,e,n){n.negative=e.negative^r.negative;var i=r.length+e.length|0;n.length=i,i=i-1|0;var a=0|r.words[0],t=0|e.words[0],o=a*t,c=67108863&o,u=o/67108864|0;n.words[0]=c;for(var d=1;d>>26,l=67108863&u,m=Math.min(d,e.length-1),p=Math.max(0,d-r.length+1);p<=m;p++){var I=d-p|0;s+=(o=(a=0|r.words[I])*(t=0|e.words[p])+l)/67108864|0,l=67108863&o}n.words[d]=0|l,u=0|s}return 0!==u?n.words[d]=0|u:n.length--,n.strip()}t.prototype.toString=function(r,e){var n;if(e=0|e||1,16===(r=r||10)||"hex"===r){n="";for(var a=0,t=0,o=0;o>>24-a&16777215)||o!==this.length-1?s[6-u.length]+u+n:u+n,(a+=2)>=26&&(a-=26,o--)}for(0!==t&&(n=t.toString(16)+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(r===(0|r)&&r>=2&&r<=36){var d=l[r],p=m[r];n="";var I=this.clone();for(I.negative=0;!I.isZero();){var y=I.modn(p).toString(r);n=(I=I.idivn(p)).isZero()?y+n:s[d-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%e!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},t.prototype.toNumber=function(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},t.prototype.toJSON=function(){return this.toString(16)},t.prototype.toBuffer=function(r,e){return i("undefined"!==typeof o),this.toArrayLike(o,r,e)},t.prototype.toArray=function(r,e){return this.toArrayLike(Array,r,e)},t.prototype.toArrayLike=function(r,e,n){var a=this.byteLength(),t=n||Math.max(1,a);i(a<=t,"byte array longer than desired length"),i(t>0,"Requested array length <= 0"),this.strip();var o,c,u="le"===e,d=new r(t),s=this.clone();if(u){for(c=0;!s.isZero();c++)o=s.andln(255),s.iushrn(8),d[c]=o;for(;c=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},t.prototype._zeroBits=function(r){if(0===r)return 26;var e=r,n=0;return 0===(8191&e)&&(n+=13,e>>>=13),0===(127&e)&&(n+=7,e>>>=7),0===(15&e)&&(n+=4,e>>>=4),0===(3&e)&&(n+=2,e>>>=2),0===(1&e)&&n++,n},t.prototype.bitLength=function(){var r=this.words[this.length-1],e=this._countBits(r);return 26*(this.length-1)+e},t.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,e=0;er.length?this.clone().ior(r):r.clone().ior(this)},t.prototype.uor=function(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},t.prototype.iuand=function(r){var e;e=this.length>r.length?r:this;for(var n=0;nr.length?this.clone().iand(r):r.clone().iand(this)},t.prototype.uand=function(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},t.prototype.iuxor=function(r){var e,n;this.length>r.length?(e=this,n=r):(e=r,n=this);for(var i=0;ir.length?this.clone().ixor(r):r.clone().ixor(this)},t.prototype.uxor=function(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},t.prototype.inotn=function(r){i("number"===typeof r&&r>=0);var e=0|Math.ceil(r/26),n=r%26;this._expand(e),n>0&&e--;for(var a=0;a0&&(this.words[a]=~this.words[a]&67108863>>26-n),this.strip()},t.prototype.notn=function(r){return this.clone().inotn(r)},t.prototype.setn=function(r,e){i("number"===typeof r&&r>=0);var n=r/26|0,a=r%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<r.length?(n=this,i=r):(n=r,i=this);for(var a=0,t=0;t>>26;for(;0!==a&&t>>26;if(this.length=n.length,0!==a)this.words[this.length]=a,this.length++;else if(n!==this)for(;tr.length?this.clone().iadd(r):r.clone().iadd(this)},t.prototype.isub=function(r){if(0!==r.negative){r.negative=0;var e=this.iadd(r);return r.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var n,i,a=this.cmp(r);if(0===a)return this.negative=0,this.length=1,this.words[0]=0,this;a>0?(n=this,i=r):(n=r,i=this);for(var t=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==t&&o>26,this.words[o]=67108863&e;if(0===t&&o>>13,p=0|o[1],I=8191&p,y=p>>>13,f=0|o[2],g=8191&f,_=f>>>13,h=0|o[3],v=8191&h,x=h>>>13,P=0|o[4],G=8191&P,C=P>>>13,S=0|o[5],A=8191&S,b=S>>>13,M=0|o[6],B=8191&M,k=M>>>13,F=0|o[7],z=8191&F,w=F>>>13,R=0|o[8],E=8191&R,N=R>>>13,T=0|o[9],D=8191&T,J=T>>>13,U=0|c[0],H=8191&U,L=U>>>13,O=0|c[1],K=8191&O,V=O>>>13,j=0|c[2],W=8191&j,Z=j>>>13,q=0|c[3],Y=8191&q,X=q>>>13,Q=0|c[4],$=8191&Q,rr=Q>>>13,er=0|c[5],nr=8191&er,ir=er>>>13,ar=0|c[6],tr=8191&ar,or=ar>>>13,cr=0|c[7],ur=8191&cr,dr=cr>>>13,sr=0|c[8],lr=8191&sr,mr=sr>>>13,pr=0|c[9],Ir=8191&pr,yr=pr>>>13;n.negative=r.negative^e.negative,n.length=19;var fr=(d+(i=Math.imul(l,H))|0)+((8191&(a=(a=Math.imul(l,L))+Math.imul(m,H)|0))<<13)|0;d=((t=Math.imul(m,L))+(a>>>13)|0)+(fr>>>26)|0,fr&=67108863,i=Math.imul(I,H),a=(a=Math.imul(I,L))+Math.imul(y,H)|0,t=Math.imul(y,L);var gr=(d+(i=i+Math.imul(l,K)|0)|0)+((8191&(a=(a=a+Math.imul(l,V)|0)+Math.imul(m,K)|0))<<13)|0;d=((t=t+Math.imul(m,V)|0)+(a>>>13)|0)+(gr>>>26)|0,gr&=67108863,i=Math.imul(g,H),a=(a=Math.imul(g,L))+Math.imul(_,H)|0,t=Math.imul(_,L),i=i+Math.imul(I,K)|0,a=(a=a+Math.imul(I,V)|0)+Math.imul(y,K)|0,t=t+Math.imul(y,V)|0;var _r=(d+(i=i+Math.imul(l,W)|0)|0)+((8191&(a=(a=a+Math.imul(l,Z)|0)+Math.imul(m,W)|0))<<13)|0;d=((t=t+Math.imul(m,Z)|0)+(a>>>13)|0)+(_r>>>26)|0,_r&=67108863,i=Math.imul(v,H),a=(a=Math.imul(v,L))+Math.imul(x,H)|0,t=Math.imul(x,L),i=i+Math.imul(g,K)|0,a=(a=a+Math.imul(g,V)|0)+Math.imul(_,K)|0,t=t+Math.imul(_,V)|0,i=i+Math.imul(I,W)|0,a=(a=a+Math.imul(I,Z)|0)+Math.imul(y,W)|0,t=t+Math.imul(y,Z)|0;var hr=(d+(i=i+Math.imul(l,Y)|0)|0)+((8191&(a=(a=a+Math.imul(l,X)|0)+Math.imul(m,Y)|0))<<13)|0;d=((t=t+Math.imul(m,X)|0)+(a>>>13)|0)+(hr>>>26)|0,hr&=67108863,i=Math.imul(G,H),a=(a=Math.imul(G,L))+Math.imul(C,H)|0,t=Math.imul(C,L),i=i+Math.imul(v,K)|0,a=(a=a+Math.imul(v,V)|0)+Math.imul(x,K)|0,t=t+Math.imul(x,V)|0,i=i+Math.imul(g,W)|0,a=(a=a+Math.imul(g,Z)|0)+Math.imul(_,W)|0,t=t+Math.imul(_,Z)|0,i=i+Math.imul(I,Y)|0,a=(a=a+Math.imul(I,X)|0)+Math.imul(y,Y)|0,t=t+Math.imul(y,X)|0;var vr=(d+(i=i+Math.imul(l,$)|0)|0)+((8191&(a=(a=a+Math.imul(l,rr)|0)+Math.imul(m,$)|0))<<13)|0;d=((t=t+Math.imul(m,rr)|0)+(a>>>13)|0)+(vr>>>26)|0,vr&=67108863,i=Math.imul(A,H),a=(a=Math.imul(A,L))+Math.imul(b,H)|0,t=Math.imul(b,L),i=i+Math.imul(G,K)|0,a=(a=a+Math.imul(G,V)|0)+Math.imul(C,K)|0,t=t+Math.imul(C,V)|0,i=i+Math.imul(v,W)|0,a=(a=a+Math.imul(v,Z)|0)+Math.imul(x,W)|0,t=t+Math.imul(x,Z)|0,i=i+Math.imul(g,Y)|0,a=(a=a+Math.imul(g,X)|0)+Math.imul(_,Y)|0,t=t+Math.imul(_,X)|0,i=i+Math.imul(I,$)|0,a=(a=a+Math.imul(I,rr)|0)+Math.imul(y,$)|0,t=t+Math.imul(y,rr)|0;var xr=(d+(i=i+Math.imul(l,nr)|0)|0)+((8191&(a=(a=a+Math.imul(l,ir)|0)+Math.imul(m,nr)|0))<<13)|0;d=((t=t+Math.imul(m,ir)|0)+(a>>>13)|0)+(xr>>>26)|0,xr&=67108863,i=Math.imul(B,H),a=(a=Math.imul(B,L))+Math.imul(k,H)|0,t=Math.imul(k,L),i=i+Math.imul(A,K)|0,a=(a=a+Math.imul(A,V)|0)+Math.imul(b,K)|0,t=t+Math.imul(b,V)|0,i=i+Math.imul(G,W)|0,a=(a=a+Math.imul(G,Z)|0)+Math.imul(C,W)|0,t=t+Math.imul(C,Z)|0,i=i+Math.imul(v,Y)|0,a=(a=a+Math.imul(v,X)|0)+Math.imul(x,Y)|0,t=t+Math.imul(x,X)|0,i=i+Math.imul(g,$)|0,a=(a=a+Math.imul(g,rr)|0)+Math.imul(_,$)|0,t=t+Math.imul(_,rr)|0,i=i+Math.imul(I,nr)|0,a=(a=a+Math.imul(I,ir)|0)+Math.imul(y,nr)|0,t=t+Math.imul(y,ir)|0;var Pr=(d+(i=i+Math.imul(l,tr)|0)|0)+((8191&(a=(a=a+Math.imul(l,or)|0)+Math.imul(m,tr)|0))<<13)|0;d=((t=t+Math.imul(m,or)|0)+(a>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,i=Math.imul(z,H),a=(a=Math.imul(z,L))+Math.imul(w,H)|0,t=Math.imul(w,L),i=i+Math.imul(B,K)|0,a=(a=a+Math.imul(B,V)|0)+Math.imul(k,K)|0,t=t+Math.imul(k,V)|0,i=i+Math.imul(A,W)|0,a=(a=a+Math.imul(A,Z)|0)+Math.imul(b,W)|0,t=t+Math.imul(b,Z)|0,i=i+Math.imul(G,Y)|0,a=(a=a+Math.imul(G,X)|0)+Math.imul(C,Y)|0,t=t+Math.imul(C,X)|0,i=i+Math.imul(v,$)|0,a=(a=a+Math.imul(v,rr)|0)+Math.imul(x,$)|0,t=t+Math.imul(x,rr)|0,i=i+Math.imul(g,nr)|0,a=(a=a+Math.imul(g,ir)|0)+Math.imul(_,nr)|0,t=t+Math.imul(_,ir)|0,i=i+Math.imul(I,tr)|0,a=(a=a+Math.imul(I,or)|0)+Math.imul(y,tr)|0,t=t+Math.imul(y,or)|0;var Gr=(d+(i=i+Math.imul(l,ur)|0)|0)+((8191&(a=(a=a+Math.imul(l,dr)|0)+Math.imul(m,ur)|0))<<13)|0;d=((t=t+Math.imul(m,dr)|0)+(a>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,i=Math.imul(E,H),a=(a=Math.imul(E,L))+Math.imul(N,H)|0,t=Math.imul(N,L),i=i+Math.imul(z,K)|0,a=(a=a+Math.imul(z,V)|0)+Math.imul(w,K)|0,t=t+Math.imul(w,V)|0,i=i+Math.imul(B,W)|0,a=(a=a+Math.imul(B,Z)|0)+Math.imul(k,W)|0,t=t+Math.imul(k,Z)|0,i=i+Math.imul(A,Y)|0,a=(a=a+Math.imul(A,X)|0)+Math.imul(b,Y)|0,t=t+Math.imul(b,X)|0,i=i+Math.imul(G,$)|0,a=(a=a+Math.imul(G,rr)|0)+Math.imul(C,$)|0,t=t+Math.imul(C,rr)|0,i=i+Math.imul(v,nr)|0,a=(a=a+Math.imul(v,ir)|0)+Math.imul(x,nr)|0,t=t+Math.imul(x,ir)|0,i=i+Math.imul(g,tr)|0,a=(a=a+Math.imul(g,or)|0)+Math.imul(_,tr)|0,t=t+Math.imul(_,or)|0,i=i+Math.imul(I,ur)|0,a=(a=a+Math.imul(I,dr)|0)+Math.imul(y,ur)|0,t=t+Math.imul(y,dr)|0;var Cr=(d+(i=i+Math.imul(l,lr)|0)|0)+((8191&(a=(a=a+Math.imul(l,mr)|0)+Math.imul(m,lr)|0))<<13)|0;d=((t=t+Math.imul(m,mr)|0)+(a>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,i=Math.imul(D,H),a=(a=Math.imul(D,L))+Math.imul(J,H)|0,t=Math.imul(J,L),i=i+Math.imul(E,K)|0,a=(a=a+Math.imul(E,V)|0)+Math.imul(N,K)|0,t=t+Math.imul(N,V)|0,i=i+Math.imul(z,W)|0,a=(a=a+Math.imul(z,Z)|0)+Math.imul(w,W)|0,t=t+Math.imul(w,Z)|0,i=i+Math.imul(B,Y)|0,a=(a=a+Math.imul(B,X)|0)+Math.imul(k,Y)|0,t=t+Math.imul(k,X)|0,i=i+Math.imul(A,$)|0,a=(a=a+Math.imul(A,rr)|0)+Math.imul(b,$)|0,t=t+Math.imul(b,rr)|0,i=i+Math.imul(G,nr)|0,a=(a=a+Math.imul(G,ir)|0)+Math.imul(C,nr)|0,t=t+Math.imul(C,ir)|0,i=i+Math.imul(v,tr)|0,a=(a=a+Math.imul(v,or)|0)+Math.imul(x,tr)|0,t=t+Math.imul(x,or)|0,i=i+Math.imul(g,ur)|0,a=(a=a+Math.imul(g,dr)|0)+Math.imul(_,ur)|0,t=t+Math.imul(_,dr)|0,i=i+Math.imul(I,lr)|0,a=(a=a+Math.imul(I,mr)|0)+Math.imul(y,lr)|0,t=t+Math.imul(y,mr)|0;var Sr=(d+(i=i+Math.imul(l,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(l,yr)|0)+Math.imul(m,Ir)|0))<<13)|0;d=((t=t+Math.imul(m,yr)|0)+(a>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,i=Math.imul(D,K),a=(a=Math.imul(D,V))+Math.imul(J,K)|0,t=Math.imul(J,V),i=i+Math.imul(E,W)|0,a=(a=a+Math.imul(E,Z)|0)+Math.imul(N,W)|0,t=t+Math.imul(N,Z)|0,i=i+Math.imul(z,Y)|0,a=(a=a+Math.imul(z,X)|0)+Math.imul(w,Y)|0,t=t+Math.imul(w,X)|0,i=i+Math.imul(B,$)|0,a=(a=a+Math.imul(B,rr)|0)+Math.imul(k,$)|0,t=t+Math.imul(k,rr)|0,i=i+Math.imul(A,nr)|0,a=(a=a+Math.imul(A,ir)|0)+Math.imul(b,nr)|0,t=t+Math.imul(b,ir)|0,i=i+Math.imul(G,tr)|0,a=(a=a+Math.imul(G,or)|0)+Math.imul(C,tr)|0,t=t+Math.imul(C,or)|0,i=i+Math.imul(v,ur)|0,a=(a=a+Math.imul(v,dr)|0)+Math.imul(x,ur)|0,t=t+Math.imul(x,dr)|0,i=i+Math.imul(g,lr)|0,a=(a=a+Math.imul(g,mr)|0)+Math.imul(_,lr)|0,t=t+Math.imul(_,mr)|0;var Ar=(d+(i=i+Math.imul(I,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(I,yr)|0)+Math.imul(y,Ir)|0))<<13)|0;d=((t=t+Math.imul(y,yr)|0)+(a>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,i=Math.imul(D,W),a=(a=Math.imul(D,Z))+Math.imul(J,W)|0,t=Math.imul(J,Z),i=i+Math.imul(E,Y)|0,a=(a=a+Math.imul(E,X)|0)+Math.imul(N,Y)|0,t=t+Math.imul(N,X)|0,i=i+Math.imul(z,$)|0,a=(a=a+Math.imul(z,rr)|0)+Math.imul(w,$)|0,t=t+Math.imul(w,rr)|0,i=i+Math.imul(B,nr)|0,a=(a=a+Math.imul(B,ir)|0)+Math.imul(k,nr)|0,t=t+Math.imul(k,ir)|0,i=i+Math.imul(A,tr)|0,a=(a=a+Math.imul(A,or)|0)+Math.imul(b,tr)|0,t=t+Math.imul(b,or)|0,i=i+Math.imul(G,ur)|0,a=(a=a+Math.imul(G,dr)|0)+Math.imul(C,ur)|0,t=t+Math.imul(C,dr)|0,i=i+Math.imul(v,lr)|0,a=(a=a+Math.imul(v,mr)|0)+Math.imul(x,lr)|0,t=t+Math.imul(x,mr)|0;var br=(d+(i=i+Math.imul(g,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(g,yr)|0)+Math.imul(_,Ir)|0))<<13)|0;d=((t=t+Math.imul(_,yr)|0)+(a>>>13)|0)+(br>>>26)|0,br&=67108863,i=Math.imul(D,Y),a=(a=Math.imul(D,X))+Math.imul(J,Y)|0,t=Math.imul(J,X),i=i+Math.imul(E,$)|0,a=(a=a+Math.imul(E,rr)|0)+Math.imul(N,$)|0,t=t+Math.imul(N,rr)|0,i=i+Math.imul(z,nr)|0,a=(a=a+Math.imul(z,ir)|0)+Math.imul(w,nr)|0,t=t+Math.imul(w,ir)|0,i=i+Math.imul(B,tr)|0,a=(a=a+Math.imul(B,or)|0)+Math.imul(k,tr)|0,t=t+Math.imul(k,or)|0,i=i+Math.imul(A,ur)|0,a=(a=a+Math.imul(A,dr)|0)+Math.imul(b,ur)|0,t=t+Math.imul(b,dr)|0,i=i+Math.imul(G,lr)|0,a=(a=a+Math.imul(G,mr)|0)+Math.imul(C,lr)|0,t=t+Math.imul(C,mr)|0;var Mr=(d+(i=i+Math.imul(v,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(v,yr)|0)+Math.imul(x,Ir)|0))<<13)|0;d=((t=t+Math.imul(x,yr)|0)+(a>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,i=Math.imul(D,$),a=(a=Math.imul(D,rr))+Math.imul(J,$)|0,t=Math.imul(J,rr),i=i+Math.imul(E,nr)|0,a=(a=a+Math.imul(E,ir)|0)+Math.imul(N,nr)|0,t=t+Math.imul(N,ir)|0,i=i+Math.imul(z,tr)|0,a=(a=a+Math.imul(z,or)|0)+Math.imul(w,tr)|0,t=t+Math.imul(w,or)|0,i=i+Math.imul(B,ur)|0,a=(a=a+Math.imul(B,dr)|0)+Math.imul(k,ur)|0,t=t+Math.imul(k,dr)|0,i=i+Math.imul(A,lr)|0,a=(a=a+Math.imul(A,mr)|0)+Math.imul(b,lr)|0,t=t+Math.imul(b,mr)|0;var Br=(d+(i=i+Math.imul(G,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(G,yr)|0)+Math.imul(C,Ir)|0))<<13)|0;d=((t=t+Math.imul(C,yr)|0)+(a>>>13)|0)+(Br>>>26)|0,Br&=67108863,i=Math.imul(D,nr),a=(a=Math.imul(D,ir))+Math.imul(J,nr)|0,t=Math.imul(J,ir),i=i+Math.imul(E,tr)|0,a=(a=a+Math.imul(E,or)|0)+Math.imul(N,tr)|0,t=t+Math.imul(N,or)|0,i=i+Math.imul(z,ur)|0,a=(a=a+Math.imul(z,dr)|0)+Math.imul(w,ur)|0,t=t+Math.imul(w,dr)|0,i=i+Math.imul(B,lr)|0,a=(a=a+Math.imul(B,mr)|0)+Math.imul(k,lr)|0,t=t+Math.imul(k,mr)|0;var kr=(d+(i=i+Math.imul(A,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(A,yr)|0)+Math.imul(b,Ir)|0))<<13)|0;d=((t=t+Math.imul(b,yr)|0)+(a>>>13)|0)+(kr>>>26)|0,kr&=67108863,i=Math.imul(D,tr),a=(a=Math.imul(D,or))+Math.imul(J,tr)|0,t=Math.imul(J,or),i=i+Math.imul(E,ur)|0,a=(a=a+Math.imul(E,dr)|0)+Math.imul(N,ur)|0,t=t+Math.imul(N,dr)|0,i=i+Math.imul(z,lr)|0,a=(a=a+Math.imul(z,mr)|0)+Math.imul(w,lr)|0,t=t+Math.imul(w,mr)|0;var Fr=(d+(i=i+Math.imul(B,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(B,yr)|0)+Math.imul(k,Ir)|0))<<13)|0;d=((t=t+Math.imul(k,yr)|0)+(a>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,i=Math.imul(D,ur),a=(a=Math.imul(D,dr))+Math.imul(J,ur)|0,t=Math.imul(J,dr),i=i+Math.imul(E,lr)|0,a=(a=a+Math.imul(E,mr)|0)+Math.imul(N,lr)|0,t=t+Math.imul(N,mr)|0;var zr=(d+(i=i+Math.imul(z,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(z,yr)|0)+Math.imul(w,Ir)|0))<<13)|0;d=((t=t+Math.imul(w,yr)|0)+(a>>>13)|0)+(zr>>>26)|0,zr&=67108863,i=Math.imul(D,lr),a=(a=Math.imul(D,mr))+Math.imul(J,lr)|0,t=Math.imul(J,mr);var wr=(d+(i=i+Math.imul(E,Ir)|0)|0)+((8191&(a=(a=a+Math.imul(E,yr)|0)+Math.imul(N,Ir)|0))<<13)|0;d=((t=t+Math.imul(N,yr)|0)+(a>>>13)|0)+(wr>>>26)|0,wr&=67108863;var Rr=(d+(i=Math.imul(D,Ir))|0)+((8191&(a=(a=Math.imul(D,yr))+Math.imul(J,Ir)|0))<<13)|0;return d=((t=Math.imul(J,yr))+(a>>>13)|0)+(Rr>>>26)|0,Rr&=67108863,u[0]=fr,u[1]=gr,u[2]=_r,u[3]=hr,u[4]=vr,u[5]=xr,u[6]=Pr,u[7]=Gr,u[8]=Cr,u[9]=Sr,u[10]=Ar,u[11]=br,u[12]=Mr,u[13]=Br,u[14]=kr,u[15]=Fr,u[16]=zr,u[17]=wr,u[18]=Rr,0!==d&&(u[19]=d,n.length++),n};function y(r,e,n){return(new f).mulp(r,e,n)}function f(r,e){this.x=r,this.y=e}Math.imul||(I=p),t.prototype.mulTo=function(r,e){var n,i=this.length+r.length;return n=10===this.length&&10===r.length?I(this,r,e):i<63?p(this,r,e):i<1024?function(r,e,n){n.negative=e.negative^r.negative,n.length=r.length+e.length;for(var i=0,a=0,t=0;t>>26)|0)>>>26,o&=67108863}n.words[t]=c,i=o,o=a}return 0!==i?n.words[t]=i:n.length--,n.strip()}(this,r,e):y(this,r,e),n},f.prototype.makeRBT=function(r){for(var e=new Array(r),n=t.prototype._countBits(r)-1,i=0;i>=1;return i},f.prototype.permute=function(r,e,n,i,a,t){for(var o=0;o>>=1)a++;return 1<>>=13,n[2*o+1]=8191&t,t>>>=13;for(o=2*e;o>=26,e+=a/67108864|0,e+=t>>>26,this.words[n]=67108863&t}return 0!==e&&(this.words[n]=e,this.length++),this},t.prototype.muln=function(r){return this.clone().imuln(r)},t.prototype.sqr=function(){return this.mul(this)},t.prototype.isqr=function(){return this.imul(this.clone())},t.prototype.pow=function(r){var e=function(r){for(var e=new Array(r.bitLength()),n=0;n>>a}return e}(r);if(0===e.length)return new t(1);for(var n=this,i=0;i=0);var e,n=r%26,a=(r-n)/26,t=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==a){for(e=this.length-1;e>=0;e--)this.words[e+a]=this.words[e];for(e=0;e=0),a=e?(e-e%26)/26:0;var t=r%26,o=Math.min((r-t)/26,this.length),c=67108863^67108863>>>t<o)for(this.length-=o,d=0;d=0&&(0!==s||d>=a);d--){var l=0|this.words[d];this.words[d]=s<<26-t|l>>>t,s=l&c}return u&&0!==s&&(u.words[u.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},t.prototype.ishrn=function(r,e,n){return i(0===this.negative),this.iushrn(r,e,n)},t.prototype.shln=function(r){return this.clone().ishln(r)},t.prototype.ushln=function(r){return this.clone().iushln(r)},t.prototype.shrn=function(r){return this.clone().ishrn(r)},t.prototype.ushrn=function(r){return this.clone().iushrn(r)},t.prototype.testn=function(r){i("number"===typeof r&&r>=0);var e=r%26,n=(r-e)/26,a=1<=0);var e=r%26,n=(r-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var a=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},t.prototype.isubn=function(r){if(i("number"===typeof r),i(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[a+n]=67108863&t}for(;a>26,this.words[a+n]=67108863&t;if(0===c)return this.strip();for(i(-1===c),c=0,a=0;a>26,this.words[a]=67108863&t;return this.negative=1,this.strip()},t.prototype._wordDiv=function(r,e){var n=(this.length,r.length),i=this.clone(),a=r,o=0|a.words[a.length-1];0!==(n=26-this._countBits(o))&&(a=a.ushln(n),i.iushln(n),o=0|a.words[a.length-1]);var c,u=i.length-a.length;if("mod"!==e){(c=new t(null)).length=u+1,c.words=new Array(c.length);for(var d=0;d=0;l--){var m=67108864*(0|i.words[a.length+l])+(0|i.words[a.length+l-1]);for(m=Math.min(m/o|0,67108863),i._ishlnsubmul(a,m,l);0!==i.negative;)m--,i.negative=0,i._ishlnsubmul(a,1,l),i.isZero()||(i.negative^=1);c&&(c.words[l]=m)}return c&&c.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:c||null,mod:i}},t.prototype.divmod=function(r,e,n){return i(!r.isZero()),this.isZero()?{div:new t(0),mod:new t(0)}:0!==this.negative&&0===r.negative?(c=this.neg().divmod(r,e),"mod"!==e&&(a=c.div.neg()),"div"!==e&&(o=c.mod.neg(),n&&0!==o.negative&&o.iadd(r)),{div:a,mod:o}):0===this.negative&&0!==r.negative?(c=this.divmod(r.neg(),e),"mod"!==e&&(a=c.div.neg()),{div:a,mod:c.mod}):0!==(this.negative&r.negative)?(c=this.neg().divmod(r.neg(),e),"div"!==e&&(o=c.mod.neg(),n&&0!==o.negative&&o.isub(r)),{div:c.div,mod:o}):r.length>this.length||this.cmp(r)<0?{div:new t(0),mod:this}:1===r.length?"div"===e?{div:this.divn(r.words[0]),mod:null}:"mod"===e?{div:null,mod:new t(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new t(this.modn(r.words[0]))}:this._wordDiv(r,e);var a,o,c},t.prototype.div=function(r){return this.divmod(r,"div",!1).div},t.prototype.mod=function(r){return this.divmod(r,"mod",!1).mod},t.prototype.umod=function(r){return this.divmod(r,"mod",!0).mod},t.prototype.divRound=function(r){var e=this.divmod(r);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(r):e.mod,i=r.ushrn(1),a=r.andln(1),t=n.cmp(i);return t<0||1===a&&0===t?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},t.prototype.modn=function(r){i(r<=67108863);for(var e=(1<<26)%r,n=0,a=this.length-1;a>=0;a--)n=(e*n+(0|this.words[a]))%r;return n},t.prototype.idivn=function(r){i(r<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var a=(0|this.words[n])+67108864*e;this.words[n]=a/r|0,e=a%r}return this.strip()},t.prototype.divn=function(r){return this.clone().idivn(r)},t.prototype.egcd=function(r){i(0===r.negative),i(!r.isZero());var e=this,n=r.clone();e=0!==e.negative?e.umod(r):e.clone();for(var a=new t(1),o=new t(0),c=new t(0),u=new t(1),d=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++d;for(var s=n.clone(),l=e.clone();!e.isZero();){for(var m=0,p=1;0===(e.words[0]&p)&&m<26;++m,p<<=1);if(m>0)for(e.iushrn(m);m-- >0;)(a.isOdd()||o.isOdd())&&(a.iadd(s),o.isub(l)),a.iushrn(1),o.iushrn(1);for(var I=0,y=1;0===(n.words[0]&y)&&I<26;++I,y<<=1);if(I>0)for(n.iushrn(I);I-- >0;)(c.isOdd()||u.isOdd())&&(c.iadd(s),u.isub(l)),c.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(c),o.isub(u)):(n.isub(e),c.isub(a),u.isub(o))}return{a:c,b:u,gcd:n.iushln(d)}},t.prototype._invmp=function(r){i(0===r.negative),i(!r.isZero());var e=this,n=r.clone();e=0!==e.negative?e.umod(r):e.clone();for(var a,o=new t(1),c=new t(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var d=0,s=1;0===(e.words[0]&s)&&d<26;++d,s<<=1);if(d>0)for(e.iushrn(d);d-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var l=0,m=1;0===(n.words[0]&m)&&l<26;++l,m<<=1);if(l>0)for(n.iushrn(l);l-- >0;)c.isOdd()&&c.iadd(u),c.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(c)):(n.isub(e),c.isub(o))}return(a=0===e.cmpn(1)?o:c).cmpn(0)<0&&a.iadd(r),a},t.prototype.gcd=function(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var e=this.clone(),n=r.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var a=e.cmp(n);if(a<0){var t=e;e=n,n=t}else if(0===a||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},t.prototype.invm=function(r){return this.egcd(r).a.umod(r)},t.prototype.isEven=function(){return 0===(1&this.words[0])},t.prototype.isOdd=function(){return 1===(1&this.words[0])},t.prototype.andln=function(r){return this.words[0]&r},t.prototype.bincn=function(r){i("number"===typeof r);var e=r%26,n=(r-e)/26,a=1<>>26,c&=67108863,this.words[o]=c}return 0!==t&&(this.words[o]=t,this.length++),this},t.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},t.prototype.cmpn=function(r){var e,n=r<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(r=-r),i(r<=67108863,"Number is too big");var a=0|this.words[0];e=a===r?0:ar.length)return 1;if(this.length=0;n--){var i=0|this.words[n],a=0|r.words[n];if(i!==a){ia&&(e=1);break}}return e},t.prototype.gtn=function(r){return 1===this.cmpn(r)},t.prototype.gt=function(r){return 1===this.cmp(r)},t.prototype.gten=function(r){return this.cmpn(r)>=0},t.prototype.gte=function(r){return this.cmp(r)>=0},t.prototype.ltn=function(r){return-1===this.cmpn(r)},t.prototype.lt=function(r){return-1===this.cmp(r)},t.prototype.lten=function(r){return this.cmpn(r)<=0},t.prototype.lte=function(r){return this.cmp(r)<=0},t.prototype.eqn=function(r){return 0===this.cmpn(r)},t.prototype.eq=function(r){return 0===this.cmp(r)},t.red=function(r){return new G(r)},t.prototype.toRed=function(r){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},t.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},t.prototype._forceRed=function(r){return this.red=r,this},t.prototype.forceRed=function(r){return i(!this.red,"Already a number in reduction context"),this._forceRed(r)},t.prototype.redAdd=function(r){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},t.prototype.redIAdd=function(r){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},t.prototype.redSub=function(r){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},t.prototype.redISub=function(r){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},t.prototype.redShl=function(r){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},t.prototype.redMul=function(r){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},t.prototype.redIMul=function(r){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},t.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},t.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},t.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},t.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},t.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},t.prototype.redPow=function(r){return i(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var g={k256:null,p224:null,p192:null,p25519:null};function _(r,e){this.name=r,this.p=new t(e,16),this.n=this.p.bitLength(),this.k=new t(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function h(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function G(r){if("string"===typeof r){var e=t._prime(r);this.m=e.p,this.prime=e}else i(r.gtn(1),"modulus must be greater than 1"),this.m=r,this.prime=null}function C(r){G.call(this,r),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new t(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)}_.prototype._tmp=function(){var r=new t(null);return r.words=new Array(Math.ceil(this.n/13)),r},_.prototype.ireduce=function(r){var e,n=r;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(r,e){r.iushrn(this.n,0,e)},_.prototype.imulK=function(r){return r.imul(this.k)},a(h,_),h.prototype.split=function(r,e){for(var n=4194303,i=Math.min(r.length,9),a=0;a>>22,t=o}t>>>=22,r.words[a-10]=t,0===t&&r.length>10?r.length-=10:r.length-=9},h.prototype.imulK=function(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var e=0,n=0;n>>=26,r.words[n]=a,e=i}return 0!==e&&(r.words[r.length++]=e),r},t._prime=function(r){if(g[r])return g[r];var e;if("k256"===r)e=new h;else if("p224"===r)e=new v;else if("p192"===r)e=new x;else{if("p25519"!==r)throw new Error("Unknown prime "+r);e=new P}return g[r]=e,e},G.prototype._verify1=function(r){i(0===r.negative,"red works only with positives"),i(r.red,"red works only with red numbers")},G.prototype._verify2=function(r,e){i(0===(r.negative|e.negative),"red works only with positives"),i(r.red&&r.red===e.red,"red works only with red numbers")},G.prototype.imod=function(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},G.prototype.neg=function(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},G.prototype.add=function(r,e){this._verify2(r,e);var n=r.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},G.prototype.iadd=function(r,e){this._verify2(r,e);var n=r.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},G.prototype.sub=function(r,e){this._verify2(r,e);var n=r.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},G.prototype.isub=function(r,e){this._verify2(r,e);var n=r.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},G.prototype.shl=function(r,e){return this._verify1(r),this.imod(r.ushln(e))},G.prototype.imul=function(r,e){return this._verify2(r,e),this.imod(r.imul(e))},G.prototype.mul=function(r,e){return this._verify2(r,e),this.imod(r.mul(e))},G.prototype.isqr=function(r){return this.imul(r,r.clone())},G.prototype.sqr=function(r){return this.mul(r,r)},G.prototype.sqrt=function(r){if(r.isZero())return r.clone();var e=this.m.andln(3);if(i(e%2===1),3===e){var n=this.m.add(new t(1)).iushrn(2);return this.pow(r,n)}for(var a=this.m.subn(1),o=0;!a.isZero()&&0===a.andln(1);)o++,a.iushrn(1);i(!a.isZero());var c=new t(1).toRed(this),u=c.redNeg(),d=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new t(2*s*s).toRed(this);0!==this.pow(s,d).cmp(u);)s.redIAdd(u);for(var l=this.pow(s,a),m=this.pow(r,a.addn(1).iushrn(1)),p=this.pow(r,a),I=o;0!==p.cmp(c);){for(var y=p,f=0;0!==y.cmp(c);f++)y=y.redSqr();i(f=0;i--){for(var d=e.words[i],s=u-1;s>=0;s--){var l=d>>s&1;a!==n[0]&&(a=this.sqr(a)),0!==l||0!==o?(o<<=1,o|=l,(4===++c||0===i&&0===s)&&(a=this.mul(a,n[o]),c=0,o=0)):c=0}u=26}return a},G.prototype.convertTo=function(r){var e=r.umod(this.m);return e===r?e.clone():e},G.prototype.convertFrom=function(r){var e=r.clone();return e.red=null,e},t.mont=function(r){return new C(r)},a(C,G),C.prototype.convertTo=function(r){return this.imod(r.ushln(this.shift))},C.prototype.convertFrom=function(r){var e=this.imod(r.mul(this.rinv));return e.red=null,e},C.prototype.imul=function(r,e){if(r.isZero()||e.isZero())return r.words[0]=0,r.length=1,r;var n=r.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(i).iushrn(this.shift),t=a;return a.cmp(this.m)>=0?t=a.isub(this.m):a.cmpn(0)<0&&(t=a.iadd(this.m)),t._forceRed(this)},C.prototype.mul=function(r,e){if(r.isZero()||e.isZero())return new t(0)._forceRed(this);var n=r.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(i).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)},C.prototype.invm=function(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}}(r=n.nmd(r),this)},6204:function(r){"use strict";r.exports=function(r){var e,n,i,a=r.length,t=0;for(e=0;e>>1;if(!(s<=0)){var l,m=a.mallocDouble(2*s*c),p=a.mallocInt32(c);if((c=u(r,s,m,p))>0){if(1===s&&i)t.init(c),l=t.sweepComplete(s,n,0,c,m,p,0,c,m,p);else{var I=a.mallocDouble(2*s*d),y=a.mallocInt32(d);(d=u(e,s,I,y))>0&&(t.init(c+d),l=1===s?t.sweepBipartite(s,n,0,c,m,p,0,d,I,y):o(s,n,i,c,m,p,d,I,y),a.free(I),a.free(y))}a.free(m),a.free(p)}return l}}}function s(r,e){i.push([r,e])}},2455:function(r,e){"use strict";function n(r){return r?function(r,e,n,i,a,t,o,c,u,d,s){return a-i>u-c?function(r,e,n,i,a,t,o,c,u,d,s){for(var l=2*r,m=i,p=l*i;md-u?i?function(r,e,n,i,a,t,o,c,u,d,s){for(var l=2*r,m=i,p=l*i;m0;){var R=(z-=1)*v,E=P[R],N=P[R+1],T=P[R+2],D=P[R+3],J=P[R+4],U=P[R+5],H=z*x,L=G[H],O=G[H+1],K=1&U,V=!!(16&U),j=s,W=b,Z=B,q=k;if(K&&(j=B,W=k,Z=s,q=b),!(2&U&&N>=(T=f(r,E,N,T,j,W,O)))&&!(4&U&&(N=g(r,E,N,T,j,W,L))>=T)){var Y=T-N,X=J-D;if(V){if(r*Y*(Y+X)=p0)&&!(p1>=hi)"),y=s("lo===p0"),f=s("lo>>1,m=2*r,p=l,I=c[m*l+e];d=h?(p=_,I=h):g>=x?(p=f,I=g):(p=v,I=x):h>=x?(p=_,I=h):x>=g?(p=f,I=g):(p=v,I=x);for(var P=m*(s-1),G=m*p,C=0;Cn&&a[l+e]>d;--s,l-=o){for(var m=l,p=l+o,I=0;Im;++m,u+=c)if(a[u+l]===o)if(s===m)s+=1,d+=c;else{for(var p=0;c>p;++p){var I=a[u+p];a[u+p]=a[d],a[d++]=I}var y=t[m];t[m]=t[s],t[s++]=y}return s},"lom;++m,u+=c)if(a[u+l]p;++p){var I=a[u+p];a[u+p]=a[d],a[d++]=I}var y=t[m];t[m]=t[s],t[s++]=y}return s},"lo<=p0":function(r,e,n,i,a,t,o){for(var c=2*r,u=c*n,d=u,s=n,l=r+e,m=n;i>m;++m,u+=c)if(a[u+l]<=o)if(s===m)s+=1,d+=c;else{for(var p=0;c>p;++p){var I=a[u+p];a[u+p]=a[d],a[d++]=I}var y=t[m];t[m]=t[s],t[s++]=y}return s},"hi<=p0":function(r,e,n,i,a,t,o){for(var c=2*r,u=c*n,d=u,s=n,l=r+e,m=n;i>m;++m,u+=c)if(a[u+l]<=o)if(s===m)s+=1,d+=c;else{for(var p=0;c>p;++p){var I=a[u+p];a[u+p]=a[d],a[d++]=I}var y=t[m];t[m]=t[s],t[s++]=y}return s},"lop;++p,u+=c){var I=a[u+l],y=a[u+m];if(If;++f){var g=a[u+f];a[u+f]=a[d],a[d++]=g}var _=t[p];t[p]=t[s],t[s++]=_}}return s},"lo<=p0&&p0<=hi":function(r,e,n,i,a,t,o){for(var c=2*r,u=c*n,d=u,s=n,l=e,m=r+e,p=n;i>p;++p,u+=c){var I=a[u+l],y=a[u+m];if(I<=o&&o<=y)if(s===p)s+=1,d+=c;else{for(var f=0;c>f;++f){var g=a[u+f];a[u+f]=a[d],a[d++]=g}var _=t[p];t[p]=t[s],t[s++]=_}}return s},"!(lo>=p0)&&!(p1>=hi)":function(r,e,n,i,a,t,o,c){for(var u=2*r,d=u*n,s=d,l=n,m=e,p=r+e,I=n;i>I;++I,d+=u){var y=a[d+m],f=a[d+p];if(!(y>=o)&&!(c>=f))if(l===I)l+=1,s+=u;else{for(var g=0;u>g;++g){var _=a[d+g];a[d+g]=a[s],a[s++]=_}var h=t[I];t[I]=t[l],t[l++]=h}}return l}}},1811:function(r){"use strict";r.exports=function(r,i){i<=4*e?n(0,i-1,r):d(0,i-1,r)};var e=32;function n(r,e,n){for(var i=2*(r+1),a=r+1;a<=e;++a){for(var t=n[i++],o=n[i++],c=a,u=i-2;c-- >r;){var d=n[u-2],s=n[u-1];if(dn[e+1])}function u(r,e,n,i){var a=i[r*=2];return a>1,f=y-m,g=y+m,_=p,h=f,v=y,x=g,P=I,G=r+1,C=s-1,S=0;c(_,h,l)&&(S=_,_=h,h=S),c(x,P,l)&&(S=x,x=P,P=S),c(_,v,l)&&(S=_,_=v,v=S),c(h,v,l)&&(S=h,h=v,v=S),c(_,x,l)&&(S=_,_=x,x=S),c(v,x,l)&&(S=v,v=x,x=S),c(h,P,l)&&(S=h,h=P,P=S),c(h,v,l)&&(S=h,h=v,v=S),c(x,P,l)&&(S=x,x=P,P=S);for(var A=l[2*h],b=l[2*h+1],M=l[2*x],B=l[2*x+1],k=2*_,F=2*v,z=2*P,w=2*p,R=2*y,E=2*I,N=0;N<2;++N){var T=l[k+N],D=l[F+N],J=l[z+N];l[w+N]=T,l[R+N]=D,l[E+N]=J}a(f,r,l),a(g,s,l);for(var U=G;U<=C;++U)if(u(U,A,b,l))U!==G&&i(U,G,l),++G;else if(!u(U,M,B,l))for(;;){if(u(C,M,B,l)){u(C,A,b,l)?(t(U,G,C,l),++G,--C):(i(U,C,l),--C);break}if(--C>>1;t(I,b);var M=0,B=0;for(G=0;G=o)y(s,l,B--,k=k-o|0);else if(k>=0)y(u,d,M--,k);else if(k<=-o){k=-k-o|0;for(var F=0;F>>1;t(I,M);var B=0,k=0,F=0;for(C=0;C>1===I[2*C+3]>>1&&(w=2,C+=1),z<0){for(var R=-(z>>1)-1,E=0;E>1)-1,0===w?y(u,d,B--,R):1===w?y(s,l,k--,R):2===w&&y(m,p,F--,R)}},scanBipartite:function(r,e,n,i,a,c,s,l,m,p,g,_){var h=0,v=2*r,x=e,P=e+r,G=1,C=1;i?C=o:G=o;for(var S=a;S>>1;t(I,B);var k=0;for(S=0;S=o?(z=!i,A-=o):(z=!!i,A-=1),z)f(u,d,k++,A);else{var w=_[A],R=v*A,E=g[R+e+1],N=g[R+e+1+r];r:for(var T=0;T>>1;t(I,G);var C=0;for(h=0;h=o)u[C++]=v-o;else{var A=p[v-=1],b=f*v,M=m[b+e+1],B=m[b+e+1+r];r:for(var k=0;k=0;--k)if(u[k]===v){for(R=k+1;R0;){for(var p=n.pop(),I=(s=-1,l=-1,u=o[c=n.pop()],1);I=0||(e.flip(c,p),a(r,e,n,s,c,l),a(r,e,n,c,l,s),a(r,e,n,l,p,s),a(r,e,n,p,s,l))}}},5023:function(r,e,n){"use strict";var i=n(2478);function a(r,e,n,i,a,t,o){this.cells=r,this.neighbor=e,this.flags=i,this.constraint=n,this.active=a,this.next=t,this.boundary=o}function t(r,e){return r[0]-e[0]||r[1]-e[1]||r[2]-e[2]}r.exports=function(r,e,n){var i=function(r,e){for(var n=r.cells(),i=n.length,o=0;o0||u.length>0;){for(;c.length>0;){var p=c.pop();if(d[p]!==-o){d[p]=o,s[p];for(var I=0;I<3;++I){var y=m[3*p+I];y>=0&&0===d[y]&&(l[3*p+I]?u.push(y):(c.push(y),d[y]=o))}}}var f=u;u=c,c=f,u.length=0,o=-o}var g=function(r,e,n){for(var i=0,a=0;a1&&a(n[m[p-2]],n[m[p-1]],t)>0;)r.push([m[p-1],m[p-2],o]),p-=1;m.length=p,m.push(o);var I=l.upperIds;for(p=I.length;p>1&&a(n[I[p-2]],n[I[p-1]],t)<0;)r.push([I[p-2],I[p-1],o]),p-=1;I.length=p,I.push(o)}}function l(r,e){var n;return(n=r.a[0]y[0]&&a.push(new c(y,I,2,d),new c(I,y,1,d))}a.sort(u);for(var f=a[0].a[0]-(1+Math.abs(a[0].a[0]))*Math.pow(2,-52),g=[new o([f,1],[f,0],-1,[],[],[],[])],_=[],h=(d=0,a.length);d=0}}(),t.removeTriangle=function(r,e,n){var i=this.stars;o(i[r],e,n),o(i[e],n,r),o(i[n],r,e)},t.addTriangle=function(r,e,n){var i=this.stars;i[r].push(e,n),i[e].push(n,r),i[n].push(r,e)},t.opposite=function(r,e){for(var n=this.stars[e],i=1,a=n.length;ie[2]?1:0)}function g(r,e,n){if(0!==r.length){if(e)for(var i=0;i=0;--t){var h=e[s=(b=i[t])[0]],v=h[0],x=h[1],P=r[v],G=r[x];if((P[0]-G[0]||P[1]-G[1])<0){var C=v;v=x,x=C}h[0]=v;var S,A=h[1]=b[1];for(a&&(S=h[2]);t>0&&i[t-1][0]===s;){var b,M=(b=i[--t])[1];a?e.push([A,M,S]):e.push([A,M]),A=M}a?e.push([A,x,S]):e.push([A,x])}return m}(r,e,m,f,n),h=I(r,_);return g(e,h,n),!!h||m.length>0||f.length>0}},3637:function(r,e,n){"use strict";r.exports=function(r,e,n,i){var t=c(e,r),l=c(i,n),m=s(t,l);if(0===o(m))return null;var p=c(r,n),I=s(l,p),y=a(I,m),f=d(t,y);return u(r,f)};var i=n(6504),a=n(8697),t=n(5572),o=n(7721),c=n(544),u=n(2653),d=n(8987);function s(r,e){return t(i(r[0],e[1]),i(r[1],e[0]))}},3642:function(r){r.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]}],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]}]}},6729:function(r,e,n){"use strict";var i=n(3642),a=n(395);function t(r){return[r[0]/255,r[1]/255,r[2]/255,r[3]]}function o(r){for(var e,n="#",i=0;i<3;++i)n+=("00"+(e=(e=r[i]).toString(16))).substr(e.length);return n}function c(r){return"rgba("+r.join(",")+")"}r.exports=function(r){var e,n,u,d,s,l,m,p,I,y;if(r||(r={}),p=(r.nshades||72)-1,m=r.format||"hex",(l=r.colormap)||(l="jet"),"string"===typeof l){if(l=l.toLowerCase(),!i[l])throw Error(l+" not a supported colorscale");s=i[l]}else{if(!Array.isArray(l))throw Error("unsupported colormap option",l);s=l.slice()}if(s.length>p+1)throw new Error(l+" map requires nshades to be at least size "+s.length);I=Array.isArray(r.alpha)?2!==r.alpha.length?[1,1]:r.alpha.slice():"number"===typeof r.alpha?[r.alpha,r.alpha]:[1,1],e=s.map((function(r){return Math.round(r.index*p)})),I[0]=Math.min(Math.max(I[0],0),1),I[1]=Math.min(Math.max(I[1],0),1);var f=s.map((function(r,e){var n=s[e].index,i=s[e].rgb.slice();return 4===i.length&&i[3]>=0&&i[3]<=1||(i[3]=I[0]+(I[1]-I[0])*n),i})),g=[];for(y=0;y0||u(r,e,t)?-1:1:0===c?d>0||u(r,e,n)?1:-1:a(d-c)}var l=i(r,e,n);return l>0?o>0&&i(r,e,t)>0?1:-1:l<0?o>0||i(r,e,t)>0?1:-1:i(r,e,t)>0||u(r,e,n)?1:-1};var i=n(3250),a=n(8572),t=n(9362),o=n(5382),c=n(8210);function u(r,e,n){var i=t(r[0],-e[0]),a=t(r[1],-e[1]),u=t(n[0],-e[0]),d=t(n[1],-e[1]),s=c(o(i,u),o(a,d));return s[s.length-1]>=0}},8572:function(r){"use strict";r.exports=function(r){return r<0?-1:r>0?1:0}},8507:function(r){r.exports=function(r,i){var a=r.length,t=r.length-i.length;if(t)return t;switch(a){case 0:return 0;case 1:return r[0]-i[0];case 2:return r[0]+r[1]-i[0]-i[1]||e(r[0],r[1])-e(i[0],i[1]);case 3:var o=r[0]+r[1],c=i[0]+i[1];if(t=o+r[2]-(c+i[2]))return t;var u=e(r[0],r[1]),d=e(i[0],i[1]);return e(u,r[2])-e(d,i[2])||e(u+r[2],o)-e(d+i[2],c);case 4:var s=r[0],l=r[1],m=r[2],p=r[3],I=i[0],y=i[1],f=i[2],g=i[3];return s+l+m+p-(I+y+f+g)||e(s,l,m,p)-e(I,y,f,g,I)||e(s+l,s+m,s+p,l+m,l+p,m+p)-e(I+y,I+f,I+g,y+f,y+g,f+g)||e(s+l+m,s+l+p,s+m+p,l+m+p)-e(I+y+f,I+y+g,I+f+g,y+f+g);default:for(var _=r.slice().sort(n),h=i.slice().sort(n),v=0;vr[n][0]&&(n=i);return en?[[n],[e]]:[[e]]}},4750:function(r,e,n){"use strict";r.exports=function(r){var e=i(r),n=e.length;if(n<=2)return[];for(var a=new Array(n),t=e[n-1],o=0;o=e[u]&&(c+=1);t[o]=c}}return r}(i(t,!0),n)}};var i=n(8954),a=n(3952)},4769:function(r){"use strict";r.exports=function(r,e,n,i,a,t){var o=a-1,c=a*a,u=o*o,d=(1+2*a)*u,s=a*u,l=c*(3-2*a),m=c*o;if(r.length){t||(t=new Array(r.length));for(var p=r.length-1;p>=0;--p)t[p]=d*r[p]+s*e[p]+l*n[p]+m*i[p];return t}return d*r+s*e+l*n+m*i},r.exports.derivative=function(r,e,n,i,a,t){var o=6*a*a-6*a,c=3*a*a-4*a+1,u=-6*a*a+6*a,d=3*a*a-2*a;if(r.length){t||(t=new Array(r.length));for(var s=r.length-1;s>=0;--s)t[s]=o*r[s]+c*e[s]+u*n[s]+d*i[s];return t}return o*r+c*e+u*n[s]+d*i}},7642:function(r,e,n){"use strict";var i=n(8954),a=n(1682);function t(r,e){this.point=r,this.index=e}function o(r,e){for(var n=r.point,i=e.point,a=n.length,t=0;t=2)return!1;r[n]=i}return!0})):x.filter((function(r){for(var e=0;e<=c;++e){var n=g[r[e]];if(n<0)return!1;r[e]=n}return!0})),1&c)for(s=0;s>>31},r.exports.exponent=function(e){return(r.exports.hi(e)<<1>>>21)-1023},r.exports.fraction=function(e){var n=r.exports.lo(e),i=r.exports.hi(e),a=1048575&i;return 2146435072&i&&(a+=1<<20),[n,a]},r.exports.denormalized=function(e){return!(2146435072&r.exports.hi(e))}},1338:function(r){"use strict";function e(r,n,i){var a=0|r[i];if(a<=0)return[];var t,o=new Array(a);if(i===r.length-1)for(t=0;t0)return function(r,e){var n,i;for(n=new Array(r),i=0;i=n-1){m=u.length-1;var I=r-e[n-1];for(p=0;p=n-1)for(var s=c.length-1,l=(e[n-1],0);l=0;--n)if(r[--e])return!1;return!0},c.jump=function(r){var e=this.lastT(),n=this.dimension;if(!(r0;--l)i.push(t(u[l-1],d[l-1],arguments[l])),a.push(0)}},c.push=function(r){var e=this.lastT(),n=this.dimension;if(!(r1e-6?1/c:0;this._time.push(r);for(var m=n;m>0;--m){var p=t(d[m-1],s[m-1],arguments[m]);i.push(p),a.push((p-i[o++])*l)}}},c.set=function(r){var e=this.dimension;if(!(r0;--u)n.push(t(o[u-1],c[u-1],arguments[u])),i.push(0)}},c.move=function(r){var e=this.lastT(),n=this.dimension;if(!(r<=e||arguments.length!==n+1)){var i=this._state,a=this._velocity,o=i.length-this.dimension,c=this.bounds,u=c[0],d=c[1],s=r-e,l=s>1e-6?1/s:0;this._time.push(r);for(var m=n;m>0;--m){var p=arguments[m];i.push(t(u[m-1],d[m-1],i[o++]+p)),a.push(p*l)}}},c.idle=function(r){var e=this.lastT();if(!(r=0;--l)i.push(t(u[l],d[l],i[o]+s*a[o])),a.push(0),o+=1}}},3840:function(r){"use strict";function e(r,e,n,i,a,t){this._color=r,this.key=e,this.value=n,this.left=i,this.right=a,this._count=t}function n(r){return new e(r._color,r.key,r.value,r.left,r.right,r._count)}function i(r,n){return new e(r,n.key,n.value,n.left,n.right,n._count)}function a(r){r._count=1+(r.left?r.left._count:0)+(r.right?r.right._count:0)}function t(r,e){this._compare=r,this.root=e}r.exports=function(r){return new t(r||p,null)};var o=t.prototype;function c(r,e){var n;return e.left&&(n=c(r,e.left))?n:(n=r(e.key,e.value))||(e.right?c(r,e.right):void 0)}function u(r,e,n,i){if(e(r,i.key)<=0){var a;if(i.left&&(a=u(r,e,n,i.left)))return a;if(a=n(i.key,i.value))return a}if(i.right)return u(r,e,n,i.right)}function d(r,e,n,i,a){var t,o=n(r,a.key),c=n(e,a.key);if(o<=0){if(a.left&&(t=d(r,e,n,i,a.left)))return t;if(c>0&&(t=i(a.key,a.value)))return t}if(c>0&&a.right)return d(r,e,n,i,a.right)}function s(r,e){this.tree=r,this._stack=e}Object.defineProperty(o,"keys",{get:function(){var r=[];return this.forEach((function(e,n){r.push(e)})),r}}),Object.defineProperty(o,"values",{get:function(){var r=[];return this.forEach((function(e,n){r.push(n)})),r}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(r,n){for(var o=this._compare,c=this.root,u=[],d=[];c;){var s=o(r,c.key);u.push(c),d.push(s),c=s<=0?c.left:c.right}u.push(new e(0,r,n,null,null,1));for(var l=u.length-2;l>=0;--l)c=u[l],d[l]<=0?u[l]=new e(c._color,c.key,c.value,u[l+1],c.right,c._count+1):u[l]=new e(c._color,c.key,c.value,c.left,u[l+1],c._count+1);for(l=u.length-1;l>1;--l){var m=u[l-1];if(c=u[l],1===m._color||1===c._color)break;var p=u[l-2];if(p.left===m)if(m.left===c){if(!(I=p.right)||0!==I._color){p._color=0,p.left=m.right,m._color=1,m.right=p,u[l-2]=m,u[l-1]=c,a(p),a(m),l>=3&&((y=u[l-3]).left===p?y.left=m:y.right=m);break}m._color=1,p.right=i(1,I),p._color=0,l-=1}else{if(!(I=p.right)||0!==I._color){m.right=c.left,p._color=0,p.left=c.right,c._color=1,c.left=m,c.right=p,u[l-2]=c,u[l-1]=m,a(p),a(m),a(c),l>=3&&((y=u[l-3]).left===p?y.left=c:y.right=c);break}m._color=1,p.right=i(1,I),p._color=0,l-=1}else if(m.right===c){if(!(I=p.left)||0!==I._color){p._color=0,p.right=m.left,m._color=1,m.left=p,u[l-2]=m,u[l-1]=c,a(p),a(m),l>=3&&((y=u[l-3]).right===p?y.right=m:y.left=m);break}m._color=1,p.left=i(1,I),p._color=0,l-=1}else{var I;if(!(I=p.left)||0!==I._color){var y;m.left=c.right,p._color=0,p.right=c.left,c._color=1,c.right=m,c.left=p,u[l-2]=c,u[l-1]=m,a(p),a(m),a(c),l>=3&&((y=u[l-3]).right===p?y.right=c:y.left=c);break}m._color=1,p.left=i(1,I),p._color=0,l-=1}}return u[0]._color=1,new t(o,u[0])},o.forEach=function(r,e,n){if(this.root)switch(arguments.length){case 1:return c(r,this.root);case 2:return u(e,this._compare,r,this.root);case 3:if(this._compare(e,n)>=0)return;return d(e,n,this._compare,r,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var r=[],e=this.root;e;)r.push(e),e=e.left;return new s(this,r)}}),Object.defineProperty(o,"end",{get:function(){for(var r=[],e=this.root;e;)r.push(e),e=e.right;return new s(this,r)}}),o.at=function(r){if(r<0)return new s(this,[]);for(var e=this.root,n=[];;){if(n.push(e),e.left){if(r=e.right._count)break;e=e.right}return new s(this,[])},o.ge=function(r){for(var e=this._compare,n=this.root,i=[],a=0;n;){var t=e(r,n.key);i.push(n),t<=0&&(a=i.length),n=t<=0?n.left:n.right}return i.length=a,new s(this,i)},o.gt=function(r){for(var e=this._compare,n=this.root,i=[],a=0;n;){var t=e(r,n.key);i.push(n),t<0&&(a=i.length),n=t<0?n.left:n.right}return i.length=a,new s(this,i)},o.lt=function(r){for(var e=this._compare,n=this.root,i=[],a=0;n;){var t=e(r,n.key);i.push(n),t>0&&(a=i.length),n=t<=0?n.left:n.right}return i.length=a,new s(this,i)},o.le=function(r){for(var e=this._compare,n=this.root,i=[],a=0;n;){var t=e(r,n.key);i.push(n),t>=0&&(a=i.length),n=t<0?n.left:n.right}return i.length=a,new s(this,i)},o.find=function(r){for(var e=this._compare,n=this.root,i=[];n;){var a=e(r,n.key);if(i.push(n),0===a)return new s(this,i);n=a<=0?n.left:n.right}return new s(this,[])},o.remove=function(r){var e=this.find(r);return e?e.remove():this},o.get=function(r){for(var e=this._compare,n=this.root;n;){var i=e(r,n.key);if(0===i)return n.value;n=i<=0?n.left:n.right}};var l=s.prototype;function m(r,e){r.key=e.key,r.value=e.value,r.left=e.left,r.right=e.right,r._color=e._color,r._count=e._count}function p(r,e){return re?1:0}Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new s(this.tree,this._stack.slice())},l.remove=function(){var r=this._stack;if(0===r.length)return this.tree;var o=new Array(r.length),c=r[r.length-1];o[o.length-1]=new e(c._color,c.key,c.value,c.left,c.right,c._count);for(var u=r.length-2;u>=0;--u)(c=r[u]).left===r[u+1]?o[u]=new e(c._color,c.key,c.value,o[u+1],c.right,c._count):o[u]=new e(c._color,c.key,c.value,c.left,o[u+1],c._count);if((c=o[o.length-1]).left&&c.right){var d=o.length;for(c=c.left;c.right;)o.push(c),c=c.right;var s=o[d-1];for(o.push(new e(c._color,s.key,s.value,c.left,c.right,c._count)),o[d-1].key=c.key,o[d-1].value=c.value,u=o.length-2;u>=d;--u)c=o[u],o[u]=new e(c._color,c.key,c.value,c.left,o[u+1],c._count);o[d-1].left=o[d]}if(0===(c=o[o.length-1])._color){var l=o[o.length-2];for(l.left===c?l.left=null:l.right===c&&(l.right=null),o.pop(),u=0;u=0;--u){if(e=r[u],0===u)return void(e._color=1);if((t=r[u-1]).left===e){if((o=t.right).right&&0===o.right._color)return c=(o=t.right=n(o)).right=n(o.right),t.right=o.left,o.left=t,o.right=c,o._color=t._color,e._color=1,t._color=1,c._color=1,a(t),a(o),u>1&&((d=r[u-2]).left===t?d.left=o:d.right=o),void(r[u-1]=o);if(o.left&&0===o.left._color)return c=(o=t.right=n(o)).left=n(o.left),t.right=c.left,o.left=c.right,c.left=t,c.right=o,c._color=t._color,t._color=1,o._color=1,e._color=1,a(t),a(o),a(c),u>1&&((d=r[u-2]).left===t?d.left=c:d.right=c),void(r[u-1]=c);if(1===o._color){if(0===t._color)return t._color=1,void(t.right=i(0,o));t.right=i(0,o);continue}o=n(o),t.right=o.left,o.left=t,o._color=t._color,t._color=0,a(t),a(o),u>1&&((d=r[u-2]).left===t?d.left=o:d.right=o),r[u-1]=o,r[u]=t,u+11&&((d=r[u-2]).right===t?d.right=o:d.left=o),void(r[u-1]=o);if(o.right&&0===o.right._color)return c=(o=t.left=n(o)).right=n(o.right),t.left=c.right,o.right=c.left,c.right=t,c.left=o,c._color=t._color,t._color=1,o._color=1,e._color=1,a(t),a(o),a(c),u>1&&((d=r[u-2]).right===t?d.right=c:d.left=c),void(r[u-1]=c);if(1===o._color){if(0===t._color)return t._color=1,void(t.left=i(0,o));t.left=i(0,o);continue}var d;o=n(o),t.left=o.right,o.right=t,o._color=t._color,t._color=0,a(t),a(o),u>1&&((d=r[u-2]).right===t?d.right=o:d.left=o),r[u-1]=o,r[u]=t,u+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var r=0,e=this._stack;if(0===e.length){var n=this.tree.root;return n?n._count:0}e[e.length-1].left&&(r=e[e.length-1].left._count);for(var i=e.length-2;i>=0;--i)e[i+1]===e[i].right&&(++r,e[i].left&&(r+=e[i].left._count));return r},enumerable:!0}),l.next=function(){var r=this._stack;if(0!==r.length){var e=r[r.length-1];if(e.right)for(e=e.right;e;)r.push(e),e=e.left;else for(r.pop();r.length>0&&r[r.length-1].right===e;)e=r[r.length-1],r.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var r=this._stack;if(0===r.length)return!1;if(r[r.length-1].right)return!0;for(var e=r.length-1;e>0;--e)if(r[e-1].left===r[e])return!0;return!1}}),l.update=function(r){var n=this._stack;if(0===n.length)throw new Error("Can't update empty node!");var i=new Array(n.length),a=n[n.length-1];i[i.length-1]=new e(a._color,a.key,r,a.left,a.right,a._count);for(var o=n.length-2;o>=0;--o)(a=n[o]).left===n[o+1]?i[o]=new e(a._color,a.key,a.value,i[o+1],a.right,a._count):i[o]=new e(a._color,a.key,a.value,a.left,i[o+1],a._count);return new t(this.tree._compare,i[0])},l.prev=function(){var r=this._stack;if(0!==r.length){var e=r[r.length-1];if(e.left)for(e=e.left;e;)r.push(e),e=e.right;else for(r.pop();r.length>0&&r[r.length-1].left===e;)e=r[r.length-1],r.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var r=this._stack;if(0===r.length)return!1;if(r[r.length-1].left)return!0;for(var e=r.length-1;e>0;--e)if(r[e-1].right===r[e])return!0;return!1}})},3837:function(r,e,n){"use strict";r.exports=function(r,e){var n=new p(r);return n.update(e),n};var i=n(4935),a=n(501),t=n(5304),o=n(6429),c=n(6444),u=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,s=DataView;function l(r){return Array.isArray(r)||function(r){return d.isView(r)&&!(r instanceof s)}(r)}function m(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function p(r){this.gl=r,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.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],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","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],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=t(r)}var I=p.prototype;function y(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}I.update=function(r){function e(e,n,i){if(i in r){var a,t=r[i],o=this[i];(e?l(t)&&l(t[0]):l(t))?this[i]=a=[n(t[0]),n(t[1]),n(t[2])]:this[i]=a=[n(t),n(t),n(t)];for(var c=0;c<3;++c)if(a[c]!==o[c])return!0}return!1}r=r||{};var n,t=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),u=e.bind(this,!1,String),d=e.bind(this,!0,(function(r){if(l(r)){if(3===r.length)return[+r[0],+r[1],+r[2],1];if(4===r.length)return[+r[0],+r[1],+r[2],+r[3]]}return[0,0,0,1]})),s=!1,m=!1;if("bounds"in r)for(var p=r.bounds,I=0;I<2;++I)for(var y=0;y<3;++y)p[I][y]!==this.bounds[I][y]&&(m=!0),this.bounds[I][y]=p[I][y];if("ticks"in r)for(n=r.ticks,s=!0,this.autoTicks=!1,I=0;I<3;++I)this.tickSpacing[I]=0;else t("tickSpacing")&&(this.autoTicks=!0,m=!0);if(this._firstInit&&("ticks"in r||"tickSpacing"in r||(this.autoTicks=!0),m=!0,s=!0,this._firstInit=!1),m&&this.autoTicks&&(n=c.create(this.bounds,this.tickSpacing),s=!0),s){for(I=0;I<3;++I)n[I].sort((function(r,e){return r.x-e.x}));c.equal(n,this.ticks)?s=!1:this.ticks=n}o("tickEnable"),u("tickFont")&&(s=!0),u("tickFontStyle")&&(s=!0),u("tickFontWeight")&&(s=!0),u("tickFontVariant")&&(s=!0),t("tickSize"),t("tickAngle"),t("tickPad"),d("tickColor");var f=u("labels");u("labelFont")&&(f=!0),u("labelFontStyle")&&(f=!0),u("labelFontWeight")&&(f=!0),u("labelFontVariant")&&(f=!0),o("labelEnable"),t("labelSize"),t("labelPad"),d("labelColor"),o("lineEnable"),o("lineMirror"),t("lineWidth"),d("lineColor"),o("lineTickEnable"),o("lineTickMirror"),t("lineTickLength"),t("lineTickWidth"),d("lineTickColor"),o("gridEnable"),t("gridWidth"),d("gridColor"),o("zeroEnable"),d("zeroLineColor"),t("zeroLineWidth"),o("backgroundEnable"),d("backgroundColor");var g=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],_=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(f||s)&&this._text.update(this.bounds,this.labels,g,this.ticks,_):this._text=i(this.gl,this.bounds,this.labels,g,this.ticks,_),this._lines&&s&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};var f=[new y,new y,new y];function g(r,e,n,i,a){for(var t=r.primalOffset,o=r.primalMinor,c=r.mirrorOffset,u=r.mirrorMinor,d=i[e],s=0;s<3;++s)if(e!==s){var l=t,m=c,p=o,I=u;d&1<0?(p[s]=-1,I[s]=0):(p[s]=0,I[s]=1)}}var _=[0,0,0],h={model:u,view:u,projection:u,_ortho:!1};I.isOpaque=function(){return!0},I.isTransparent=function(){return!1},I.drawTransparent=function(r){};var v=[0,0,0],x=[0,0,0],P=[0,0,0];I.draw=function(r){r=r||h;for(var e=this.gl,n=r.model||u,i=r.view||u,a=r.projection||u,t=this.bounds,c=r._ortho||!1,d=o(n,i,a,t,c),s=d.cubeEdges,l=d.axis,p=i[12],I=i[13],y=i[14],G=i[15],C=(c?2:1)*this.pixelRatio*(a[3]*p+a[7]*I+a[11]*y+a[15]*G)/e.drawingBufferHeight,S=0;S<3;++S)this.lastCubeProps.cubeEdges[S]=s[S],this.lastCubeProps.axis[S]=l[S];var A=f;for(S=0;S<3;++S)g(f[S],S,this.bounds,s,l);e=this.gl;var b,M,B,k=_;for(S=0;S<3;++S)this.backgroundEnable[S]?k[S]=l[S]:k[S]=0;for(this._background.draw(n,i,a,t,k,this.backgroundColor),this._lines.bind(n,i,a,this),S=0;S<3;++S){var F=[0,0,0];l[S]>0?F[S]=t[1][S]:F[S]=t[0][S];for(var z=0;z<2;++z){var w=(S+1+z)%3,R=(S+1+(1^z))%3;this.gridEnable[w]&&this._lines.drawGrid(w,R,this.bounds,F,this.gridColor[w],this.gridWidth[w]*this.pixelRatio)}for(z=0;z<2;++z)w=(S+1+z)%3,R=(S+1+(1^z))%3,this.zeroEnable[R]&&Math.min(t[0][R],t[1][R])<=0&&Math.max(t[0][R],t[1][R])>=0&&this._lines.drawZero(w,R,this.bounds,F,this.zeroLineColor[R],this.zeroLineWidth[R]*this.pixelRatio)}for(S=0;S<3;++S){this.lineEnable[S]&&this._lines.drawAxisLine(S,this.bounds,A[S].primalOffset,this.lineColor[S],this.lineWidth[S]*this.pixelRatio),this.lineMirror[S]&&this._lines.drawAxisLine(S,this.bounds,A[S].mirrorOffset,this.lineColor[S],this.lineWidth[S]*this.pixelRatio);var E=m(v,A[S].primalMinor),N=m(x,A[S].mirrorMinor),T=this.lineTickLength;for(z=0;z<3;++z){var D=C/n[5*z];E[z]*=T[z]*D,N[z]*=T[z]*D}this.lineTickEnable[S]&&this._lines.drawAxisTicks(S,A[S].primalOffset,E,this.lineTickColor[S],this.lineTickWidth[S]*this.pixelRatio),this.lineTickMirror[S]&&this._lines.drawAxisTicks(S,A[S].mirrorOffset,N,this.lineTickColor[S],this.lineTickWidth[S]*this.pixelRatio)}function J(r){(B=[0,0,0])[r]=1}function U(r,e,n){var i=(r+1)%3,a=(r+2)%3,t=e[i],o=e[a],c=n[i],u=n[a];t>0&&u>0||t>0&&u<0||t<0&&u>0||t<0&&u<0?J(i):(o>0&&c>0||o>0&&c<0||o<0&&c>0||o<0&&c<0)&&J(a)}for(this._lines.unbind(),this._text.bind(n,i,a,this.pixelRatio),S=0;S<3;++S){var H=A[S].primalMinor,L=A[S].mirrorMinor,O=m(P,A[S].primalOffset);for(z=0;z<3;++z)this.lineTickEnable[S]&&(O[z]+=C*H[z]*Math.max(this.lineTickLength[z],0)/n[5*z]);var K=[0,0,0];if(K[S]=1,this.tickEnable[S]){for(-3600===this.tickAngle[S]?(this.tickAngle[S]=0,this.tickAlign[S]="auto"):this.tickAlign[S]=-1,M=1,"auto"===(b=[this.tickAlign[S],.5,M])[0]?b[0]=0:b[0]=parseInt(""+b[0]),B=[0,0,0],U(S,H,L),z=0;z<3;++z)O[z]+=C*H[z]*this.tickPad[z]/n[5*z];this._text.drawTicks(S,this.tickSize[S],this.tickAngle[S],O,this.tickColor[S],K,B,b)}if(this.labelEnable[S]){for(M=0,B=[0,0,0],this.labels[S].length>4&&(J(S),M=1),"auto"===(b=[this.labelAlign[S],.5,M])[0]?b[0]=0:b[0]=parseInt(""+b[0]),z=0;z<3;++z)O[z]+=C*H[z]*this.labelPad[z]/n[5*z];O[S]+=.5*(t[0][S]+t[1][S]),this._text.drawLabel(S,this.labelSize[S],this.labelAngle[S],O,this.labelColor[S],[0,0,0],B,b)}}this._text.unbind()},I.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(r,e,n){"use strict";r.exports=function(r){for(var e=[],n=[],c=0,u=0;u<3;++u)for(var d=(u+1)%3,s=(u+2)%3,l=[0,0,0],m=[0,0,0],p=-1;p<=1;p+=2){n.push(c,c+2,c+1,c+1,c+2,c+3),l[u]=p,m[u]=p;for(var I=-1;I<=1;I+=2){l[d]=I;for(var y=-1;y<=1;y+=2)l[s]=y,e.push(l[0],l[1],l[2],m[0],m[1],m[2]),c+=1}var f=d;d=s,s=f}var g=i(r,new Float32Array(e)),_=i(r,new Uint16Array(n),r.ELEMENT_ARRAY_BUFFER),h=a(r,[{buffer:g,type:r.FLOAT,size:3,offset:0,stride:24},{buffer:g,type:r.FLOAT,size:3,offset:12,stride:24}],_),v=t(r);return v.attributes.position.location=0,v.attributes.normal.location=1,new o(r,g,h,v)};var i=n(2762),a=n(8116),t=n(1879).bg;function o(r,e,n,i){this.gl=r,this.buffer=e,this.vao=n,this.shader=i}var c=o.prototype;c.draw=function(r,e,n,i,a,t){for(var o=!1,c=0;c<3;++c)o=o||a[c];if(o){var u=this.gl;u.enable(u.POLYGON_OFFSET_FILL),u.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:r,view:e,projection:n,bounds:i,enable:a,colors:t},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),u.disable(u.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(r,e,n){"use strict";r.exports=function(r,e,n,t,p){a(c,e,r),a(c,n,c);for(var _=0,h=0;h<2;++h){s[2]=t[h][2];for(var v=0;v<2;++v){s[1]=t[v][1];for(var x=0;x<2;++x)s[0]=t[x][0],m(u[_],s,c),_+=1}}var P=-1;for(h=0;h<8;++h){for(var G=u[h][3],C=0;C<3;++C)d[h][C]=u[h][C]/G;p&&(d[h][2]*=-1),G<0&&(P<0||d[h][2]M&&(P|=1<M&&(P|=1<d[h][1])&&(N=h);var T=-1;for(h=0;h<3;++h)(J=N^1<d[D][0]&&(D=J))}var U=y;U[0]=U[1]=U[2]=0,U[i.log2(T^N)]=N&T,U[i.log2(N^D)]=N&D;var H=7^D;H===P||H===E?(H=7^T,U[i.log2(D^H)]=H&D):U[i.log2(T^H)]=H&T;var L=f,O=P;for(S=0;S<3;++S)L[S]=O&1< 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}\n"]),u=i(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.Q=function(r){return a(r,c,u,null,[{name:"position",type:"vec3"}])};var d=i(["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}\n"]),s=i(["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}"]);e.bg=function(r){return a(r,d,s,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(r,e,n){"use strict";r.exports=function(r,e,n,i,o,u){var d=a(r),l=t(r,[{buffer:d,size:3}]),m=c(r);m.attributes.position.location=0;var p=new s(r,m,d,l);return p.update(e,n,i,o,u),p};var a=n(2762),t=n(8116),o=n(4359),c=n(1879).Q,u=window||i.global||{},d=u.__TEXT_CACHE||{};function s(r,e,n,i){this.gl=r,this.shader=e,this.buffer=n,this.vao=i,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}u.__TEXT_CACHE={};var l=s.prototype,m=[0,0];l.bind=function(r,e,n,i){this.vao.bind(),this.shader.bind();var a=this.shader.uniforms;a.model=r,a.view=e,a.projection=n,a.pixelScale=i,m[0]=this.gl.drawingBufferWidth,m[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=m},l.unbind=function(){this.vao.unbind()},l.update=function(r,e,n,i,a){var t=[];function c(r,e,n,i,a,c){var u=[n.style,n.weight,n.variant,n.family].join("_"),s=d[u];s||(s=d[u]={});var l=s[e];l||(l=s[e]=function(r,e){try{return o(r,e)}catch(n){return console.warn('error vectorizing text:"'+r+'" error:',n),{cells:[],positions:[]}}}(e,{triangles:!0,font:n.family,fontStyle:n.style,fontWeight:n.weight,fontVariant:n.variant,textAlign:"center",textBaseline:"middle",lineSpacing:a,styletags:c}));for(var m=(i||12)/12,p=l.positions,I=l.cells,y=0,f=I.length;y=0;--_){var h=p[g[_]];t.push(m*h[0],-m*h[1],r)}}for(var u=[0,0,0],s=[0,0,0],l=[0,0,0],m=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},I=0;I<3;++I){l[I]=t.length/3|0,c(.5*(r[0][I]+r[1][I]),e[I],n[I],12,1.25,p),m[I]=(t.length/3|0)-l[I],u[I]=t.length/3|0;for(var y=0;y=0&&(a=n.length-i-1);var t=Math.pow(10,a),o=Math.round(r*e*t),c=o+"";if(c.indexOf("e")>=0)return c;var u=o/t,d=o%t;o<0?(u=0|-Math.ceil(u),d=0|-d):(u=0|Math.floor(u),d|=0);var s=""+u;if(o<0&&(s="-"+s),a){for(var l=""+d;l.length=r[0][a];--o)t.push({x:o*e[a],text:n(e[a],o)});i.push(t)}return i},e.equal=function(r,e){for(var n=0;n<3;++n){if(r[n].length!==e[n].length)return!1;for(var i=0;in)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return r.bufferSubData(e,t,a),n}function s(r,e){for(var n=i.malloc(r.length,e),a=r.length,t=0;t=0;--i){if(e[i]!==n)return!1;n*=r[i]}return!0}(r.shape,r.stride))0===r.offset&&r.data.length===r.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,r.data,e):this.length=d(this.gl,this.type,this.length,this.usage,r.data.subarray(r.offset,r.shape[0]),e);else{var c=i.malloc(r.size,n),u=t(c,r.shape);a.assign(u,r),this.length=d(this.gl,this.type,this.length,this.usage,e<0?c:c.subarray(0,r.size),e),i.free(c)}}else if(Array.isArray(r)){var l;l=this.type===this.gl.ELEMENT_ARRAY_BUFFER?s(r,"uint16"):s(r,"float32"),this.length=d(this.gl,this.type,this.length,this.usage,e<0?l:l.subarray(0,r.length),e),i.free(l)}else if("object"===typeof r&&"number"===typeof r.length)this.length=d(this.gl,this.type,this.length,this.usage,r,e);else{if("number"!==typeof r&&void 0!==r)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(r|=0)<=0&&(r=1),this.gl.bufferData(this.type,0|r,this.usage),this.length=r}},r.exports=function(r,e,n,i){if(n=n||r.ARRAY_BUFFER,i=i||r.DYNAMIC_DRAW,n!==r.ARRAY_BUFFER&&n!==r.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(i!==r.DYNAMIC_DRAW&&i!==r.STATIC_DRAW&&i!==r.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=r.createBuffer(),t=new c(r,n,a,0,i);return t.update(e),t}},6405:function(r,e,n){"use strict";var i=n(2931);r.exports=function(r,e){var n=r.positions,a=r.vectors,t={positions:[],vertexIntensity:[],vertexIntensityBounds:r.vertexIntensityBounds,vectors:[],cells:[],coneOffset:r.coneOffset,colormap:r.colormap};if(0===r.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),t;for(var o=0,c=1/0,u=-1/0,d=1/0,s=-1/0,l=1/0,m=-1/0,p=null,I=null,y=[],f=1/0,g=!1,_="raw"===r.coneSizemode,h=0;ho&&(o=i.length(x)),h&&!_){var P=2*i.distance(p,v)/(i.length(I)+i.length(x));P?(f=Math.min(f,P),g=!1):g=!0}g||(p=v,I=x),y.push(x)}var G=[c,d,l],C=[u,s,m];e&&(e[0]=G,e[1]=C),0===o&&(o=1);var S=1/o;isFinite(f)||(f=1),t.vectorScale=f;var A=r.coneSize||(_?1:.5);r.absoluteConeSize&&(A=r.absoluteConeSize*S),t.coneScale=A,h=0;for(var b=0;h=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(r){this.pickId=r},p.update=function(r){r=r||{};var e=this.gl;this.dirty=!0,"lightPosition"in r&&(this.lightPosition=r.lightPosition),"opacity"in r&&(this.opacity=r.opacity),"ambient"in r&&(this.ambientLight=r.ambient),"diffuse"in r&&(this.diffuseLight=r.diffuse),"specular"in r&&(this.specularLight=r.specular),"roughness"in r&&(this.roughness=r.roughness),"fresnel"in r&&(this.fresnel=r.fresnel),void 0!==r.tubeScale&&(this.tubeScale=r.tubeScale),void 0!==r.vectorScale&&(this.vectorScale=r.vectorScale),void 0!==r.coneScale&&(this.coneScale=r.coneScale),void 0!==r.coneOffset&&(this.coneOffset=r.coneOffset),r.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(r){for(var e=s({colormap:r,nshades:256,format:"rgba"}),n=new Uint8Array(1024),i=0;i<256;++i){for(var a=e[i],t=0;t<3;++t)n[4*i+t]=a[t];n[4*i+3]=255*a[3]}return d(n,[256,256,4],[4,0,1])}(r.colormap)),this.texture.generateMipmap());var n=r.cells,i=r.positions,a=r.vectors;if(i&&n&&a){var t=[],o=[],c=[],u=[],l=[];this.cells=n,this.positions=i,this.vectors=a;var m=r.meshColor||[1,1,1,1],p=r.vertexIntensity,I=1/0,y=-1/0;if(p)if(r.vertexIntensityBounds)I=+r.vertexIntensityBounds[0],y=+r.vertexIntensityBounds[1];else for(var f=0;f0){var y=this.triShader;y.bind(),y.uniforms=d,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(r){r=r||{};for(var e=this.gl,n=r.model||l,i=r.view||l,a=r.projection||l,t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)t[0][o]=Math.max(t[0][o],this.clipBounds[0][o]),t[1][o]=Math.min(t[1][o],this.clipBounds[1][o]);this._model=[].slice.call(n),this._view=[].slice.call(i),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var c={model:n,view:i,projection:a,clipBounds:t,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},u=this.pickShader;u.bind(),u.uniforms=c,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(r){if(!r)return null;if(r.id!==this.pickId)return null;var e=r.value[0]+256*r.value[1]+65536*r.value[2],n=this.cells[e],i=this.positions[n[1]].slice(0,3),a={position:i,dataCoordinate:i,index:Math.floor(n[1]/48)};return"cone"===this.traceType?a.index=Math.floor(n[1]/48):"streamtube"===this.traceType&&(a.intensity=this.intensity[n[1]],a.velocity=this.vectors[n[1]].slice(0,3),a.divergence=this.vectors[n[1]][3],a.index=e),a},p.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()},r.exports=function(r,e,n){var c=n.shaders;1===arguments.length&&(r=(e=r).gl);var u=function(r,e){var n=i(r,e.meshShader.vertex,e.meshShader.fragment,null,e.meshShader.attributes);return n.attributes.position.location=0,n.attributes.color.location=2,n.attributes.uv.location=3,n.attributes.vector.location=4,n}(r,c),s=function(r,e){var n=i(r,e.pickShader.vertex,e.pickShader.fragment,null,e.pickShader.attributes);return n.attributes.position.location=0,n.attributes.id.location=1,n.attributes.vector.location=4,n}(r,c),l=o(r,d(new Uint8Array([255,255,255,255]),[1,1,4]));l.generateMipmap(),l.minFilter=r.LINEAR_MIPMAP_LINEAR,l.magFilter=r.LINEAR;var p=a(r),I=a(r),y=a(r),f=a(r),g=a(r),_=new m(r,l,u,s,p,I,g,y,f,t(r,[{buffer:p,type:r.FLOAT,size:4},{buffer:g,type:r.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:y,type:r.FLOAT,size:4},{buffer:f,type:r.FLOAT,size:2},{buffer:I,type:r.FLOAT,size:4}]),n.traceType||"cone");return _.update(e),_}},614:function(r,e,n){var i=n(3236),a=i(["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"]),t=i(["#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=i(["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"]),c=i(["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}"]);e.meshShader={vertex:a,fragment:t,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(r){r.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"}},5171:function(r,e,n){var i=n(737);r.exports=function(r){return i[r]}},9165:function(r,e,n){"use strict";r.exports=function(r){var e=r.gl,n=i(e),o=a(e,[{buffer:n,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:n,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:n,type:e.FLOAT,size:3,offset:28,stride:40}]),u=t(e);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.offset.location=2;var d=new c(e,n,o,u);return d.update(r),d};var i=n(2762),a=n(8116),t=n(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(r,e,n,i){this.gl=r,this.shader=i,this.buffer=e,this.vao=n,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 u=c.prototype;function d(r,e){for(var n=0;n<3;++n)r[0][n]=Math.min(r[0][n],e[n]),r[1][n]=Math.max(r[1][n],e[n])}u.isOpaque=function(){return!this.hasAlpha},u.isTransparent=function(){return this.hasAlpha},u.drawTransparent=u.draw=function(r){var e=this.gl,n=this.shader.uniforms;this.shader.bind();var i=n.view=r.view||o,a=n.projection=r.projection||o;n.model=r.model||o,n.clipBounds=this.clipBounds,n.opacity=this.opacity;var t=i[12],c=i[13],u=i[14],d=i[15],s=(r._ortho?2:1)*this.pixelRatio*(a[3]*t+a[7]*c+a[11]*u+a[15]*d)/e.drawingBufferHeight;this.vao.bind();for(var l=0;l<3;++l)e.lineWidth(this.lineWidth[l]*this.pixelRatio),n.capSize=this.capSize[l]*s,this.lineCount[l]&&e.drawArrays(e.LINES,this.lineOffset[l],this.lineCount[l]);this.vao.unbind()};var s=function(){for(var r=new Array(3),e=0;e<3;++e){for(var n=[],i=1;i<=2;++i)for(var a=-1;a<=1;a+=2){var t=[0,0,0];t[(i+e)%3]=a,n.push(t)}r[e]=n}return r}();function l(r,e,n,i){for(var a=s[i],t=0;t0&&((p=s.slice())[c]+=I[1][c],a.push(s[0],s[1],s[2],y[0],y[1],y[2],y[3],0,0,0,p[0],p[1],p[2],y[0],y[1],y[2],y[3],0,0,0),d(this.bounds,p),o+=2+l(a,p,y,c))}this.lineCount[c]=o-this.lineOffset[c]}this.buffer.update(a)}},u.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(r,e,n){"use strict";var i=n(3236),a=n(9405),t=i(["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=i(["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}"]);r.exports=function(r){return a(r,t,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(r,e,n){"use strict";var i=n(7766);r.exports=function(r,e,n,i){a||(a=r.FRAMEBUFFER_UNSUPPORTED,t=r.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=r.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,c=r.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var d=r.getExtension("WEBGL_draw_buffers");if(!u&&d&&function(r,e){var n=r.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);u=new Array(n+1);for(var i=0;i<=n;++i){for(var a=new Array(n),t=0;ts||n<0||n>s)throw new Error("gl-fbo: Parameters are too large for FBO");var l=1;if("color"in(i=i||{})){if((l=Math.max(0|i.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(l>1){if(!d)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(l>r.getParameter(d.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+l+" draw buffers")}}var m=r.UNSIGNED_BYTE,p=r.getExtension("OES_texture_float");if(i.float&&l>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");m=r.FLOAT}else i.preferFloat&&l>0&&p&&(m=r.FLOAT);var y=!0;"depth"in i&&(y=!!i.depth);var f=!1;return"stencil"in i&&(f=!!i.stencil),new I(r,e,n,m,l,y,f,d)};var a,t,o,c,u=null;function d(r){return[r.getParameter(r.FRAMEBUFFER_BINDING),r.getParameter(r.RENDERBUFFER_BINDING),r.getParameter(r.TEXTURE_BINDING_2D)]}function s(r,e){r.bindFramebuffer(r.FRAMEBUFFER,e[0]),r.bindRenderbuffer(r.RENDERBUFFER,e[1]),r.bindTexture(r.TEXTURE_2D,e[2])}function l(r){switch(r){case a:throw new Error("gl-fbo: Framebuffer unsupported");case t:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case c:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function m(r,e,n,a,t,o){if(!a)return null;var c=i(r,e,n,t,a);return c.magFilter=r.NEAREST,c.minFilter=r.NEAREST,c.mipSamples=1,c.bind(),r.framebufferTexture2D(r.FRAMEBUFFER,o,r.TEXTURE_2D,c.handle,0),c}function p(r,e,n,i,a){var t=r.createRenderbuffer();return r.bindRenderbuffer(r.RENDERBUFFER,t),r.renderbufferStorage(r.RENDERBUFFER,i,e,n),r.framebufferRenderbuffer(r.FRAMEBUFFER,a,r.RENDERBUFFER,t),t}function I(r,e,n,i,a,t,o,c){this.gl=r,this._shape=[0|e,0|n],this._destroyed=!1,this._ext=c,this.color=new Array(a);for(var I=0;I1&&c.drawBuffersWEBGL(u[o]);var _=n.getExtension("WEBGL_depth_texture");_?I?r.depth=m(n,a,t,_.UNSIGNED_INT_24_8_WEBGL,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):y&&(r.depth=m(n,a,t,n.UNSIGNED_SHORT,n.DEPTH_COMPONENT,n.DEPTH_ATTACHMENT)):y&&I?r._depth_rb=p(n,a,t,n.DEPTH_STENCIL,n.DEPTH_STENCIL_ATTACHMENT):y?r._depth_rb=p(n,a,t,n.DEPTH_COMPONENT16,n.DEPTH_ATTACHMENT):I&&(r._depth_rb=p(n,a,t,n.STENCIL_INDEX,n.STENCIL_ATTACHMENT));var h=n.checkFramebufferStatus(n.FRAMEBUFFER);if(h!==n.FRAMEBUFFER_COMPLETE){for(r._destroyed=!0,n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteFramebuffer(r.handle),r.handle=null,r.depth&&(r.depth.dispose(),r.depth=null),r._depth_rb&&(n.deleteRenderbuffer(r._depth_rb),r._depth_rb=null),g=0;ga||n<0||n>a)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");r._shape[0]=e,r._shape[1]=n;for(var t=d(i),o=0;o>8*p&255;this.pickOffset=n,a.bind();var I=a.uniforms;I.viewTransform=r,I.pickOffset=e,I.shape=this.shape;var y=a.attributes;return this.positionBuffer.bind(),y.position.pointer(),this.weightBuffer.bind(),y.weight.pointer(c.UNSIGNED_BYTE,!1),this.idBuffer.bind(),y.pickId.pointer(c.UNSIGNED_BYTE,!1),c.drawArrays(c.TRIANGLES,0,o),n+this.shape[0]*this.shape[1]}}}(),s.pick=function(r,e,n){var i=this.pickOffset,a=this.shape[0]*this.shape[1];if(n=i+a)return null;var t=n-i,o=this.xData,c=this.yData;return{object:this,pointId:t,dataCoord:[o[t%this.shape[0]],c[t/this.shape[0]|0]]}},s.update=function(r){var e=(r=r||{}).shape||[0,0],n=r.x||a(e[0]),o=r.y||a(e[1]),c=r.z||new Float32Array(e[0]*e[1]),u=!1!==r.zsmooth;this.xData=n,this.yData=o;var d,s,m,p,I=r.colorLevels||[0],y=r.colorValues||[0,0,0,1],f=I.length,g=this.bounds;u?(d=g[0]=n[0],s=g[1]=o[0],m=g[2]=n[n.length-1],p=g[3]=o[o.length-1]):(d=g[0]=n[0]+(n[1]-n[0])/2,s=g[1]=o[0]+(o[1]-o[0])/2,m=g[2]=n[n.length-1]+(n[n.length-1]-n[n.length-2])/2,p=g[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var _=1/(m-d),h=1/(p-s),v=e[0],x=e[1];this.shape=[v,x];var P=(u?(v-1)*(x-1):v*x)*(l.length>>>1);this.numVertices=P;for(var G=t.mallocUint8(4*P),C=t.mallocFloat32(2*P),S=t.mallocUint8(2*P),A=t.mallocUint32(P),b=0,M=u?v-1:v,B=u?x-1:x,k=0;k 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"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n 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 vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n 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 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, packFloat(pixelArcLength).xyz);\n}"]),u=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(r){return a(r,t,o,null,u)},e.createPickShader=function(r){return a(r,t,c,null,u)}},5714:function(r,e,n){"use strict";r.exports=function(r){var e=r.gl||r.scene&&r.scene.gl,n=l(e);n.attributes.position.location=0,n.attributes.nextPosition.location=1,n.attributes.arcLength.location=2,n.attributes.lineWidth.location=3,n.attributes.color.location=4;var o=m(e);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 c=i(e),u=a(e,[{buffer:c,size:3,offset:0,stride:48},{buffer:c,size:3,offset:12,stride:48},{buffer:c,size:1,offset:24,stride:48},{buffer:c,size:1,offset:28,stride:48},{buffer:c,size:4,offset:32,stride:48}]),s=d(new Array(1024),[256,1,4]),p=0;p<1024;++p)s.data[p]=255;var I=t(e,s);I.wrap=e.REPEAT;var y=new g(e,n,o,c,u,I);return y.update(r),y};var i=n(2762),a=n(8116),t=n(7766),o=new Uint8Array(4),c=new Float32Array(o.buffer),u=n(2478),d=n(9618),s=n(7319),l=s.createShader,m=s.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(r,e){for(var n=0,i=0;i<3;++i){var a=r[i]-e[i];n+=a*a}return Math.sqrt(n)}function y(r){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],n=0;n<3;++n)e[0][n]=Math.max(r[0][n],e[0][n]),e[1][n]=Math.min(r[1][n],e[1][n]);return e}function f(r,e,n,i){this.arcLength=r,this.position=e,this.index=n,this.dataCoordinate=i}function g(r,e,n,i,a,t){this.gl=r,this.shader=e,this.pickShader=n,this.buffer=i,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=t,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var _=g.prototype;_.isTransparent=function(){return this.hasAlpha},_.isOpaque=function(){return!this.hasAlpha},_.pickSlots=1,_.setPickBase=function(r){this.pickId=r},_.drawTransparent=_.draw=function(r){if(this.vertexCount){var e=this.gl,n=this.shader,i=this.vao;n.bind(),n.uniforms={model:r.model||p,view:r.view||p,projection:r.projection||p,clipBounds:y(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},i.bind(),i.draw(e.TRIANGLE_STRIP,this.vertexCount),i.unbind()}},_.drawPick=function(r){if(this.vertexCount){var e=this.gl,n=this.pickShader,i=this.vao;n.bind(),n.uniforms={model:r.model||p,view:r.view||p,projection:r.projection||p,pickId:this.pickId,clipBounds:y(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},i.bind(),i.draw(e.TRIANGLE_STRIP,this.vertexCount),i.unbind()}},_.update=function(r){var e,n;this.dirty=!0;var i=!!r.connectGaps;"dashScale"in r&&(this.dashScale=r.dashScale),this.hasAlpha=!1,"opacity"in r&&(this.opacity=+r.opacity,this.opacity<1&&(this.hasAlpha=!0));var a=[],t=[],o=[],c=0,s=0,l=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],m=r.position||r.positions;if(m){var p=r.color||r.colors||[0,0,0,1],y=r.lineWidth||1,f=!1;r:for(e=1;e0){for(var P=0;P<24;++P)a.push(a[a.length-12]);s+=2,f=!0}continue r}l[0][n]=Math.min(l[0][n],v[n],x[n]),l[1][n]=Math.max(l[1][n],v[n],x[n])}Array.isArray(p[0])?(g=p.length>e-1?p[e-1]:p.length>0?p[p.length-1]:[0,0,0,1],_=p.length>e?p[e]:p.length>0?p[p.length-1]:[0,0,0,1]):g=_=p,3===g.length&&(g=[g[0],g[1],g[2],1]),3===_.length&&(_=[_[0],_[1],_[2],1]),!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0),h=Array.isArray(y)?y.length>e-1?y[e-1]:y.length>0?y[y.length-1]:[0,0,0,1]:y;var G=c;if(c+=I(v,x),f){for(n=0;n<2;++n)a.push(v[0],v[1],v[2],x[0],x[1],x[2],G,h,g[0],g[1],g[2],g[3]);s+=2,f=!1}a.push(v[0],v[1],v[2],x[0],x[1],x[2],G,h,g[0],g[1],g[2],g[3],v[0],v[1],v[2],x[0],x[1],x[2],G,-h,g[0],g[1],g[2],g[3],x[0],x[1],x[2],v[0],v[1],v[2],c,-h,_[0],_[1],_[2],_[3],x[0],x[1],x[2],v[0],v[1],v[2],c,h,_[0],_[1],_[2],_[3]),s+=4}}if(this.buffer.update(a),t.push(c),o.push(m[m.length-1].slice()),this.bounds=l,this.vertexCount=s,this.points=o,this.arcLength=t,"dashes"in r){var C=r.dashes.slice();for(C.unshift(0),e=1;e1.0001)return null;g+=f[l]}return Math.abs(g-1)>.001?null:[m,c(r,f),f]}},840:function(r,e,n){var i=n(3236),a=i(["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"]),t=i(["#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=i(["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}"]),c=i(["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}"]),u=i(["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}"]),d=i(["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}"]),s=i(["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}"]),l=i(["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}"]),m=i(["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}"]),p=i(["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}"]),I=i(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:a,fragment:t,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:u,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:s,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:m,fragment:l,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:p,fragment:I,attributes:[{name:"position",type:"vec3"}]}},7201:function(r,e,n){"use strict";var i=n(9405),a=n(2762),t=n(8116),o=n(7766),c=n(8406),u=n(6760),d=n(7608),s=n(9618),l=n(6729),m=n(7765),p=n(1888),I=n(840),y=n(7626),f=I.meshShader,g=I.wireShader,_=I.pointShader,h=I.pickShader,v=I.pointPickShader,x=I.contourShader,P=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function G(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,G,C,S,A,b){this.gl=r,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=n,this.lineShader=i,this.pointShader=a,this.pickShader=t,this.pointPickShader=o,this.contourShader=c,this.trianglePositions=u,this.triangleColors=s,this.triangleNormals=m,this.triangleUVs=l,this.triangleIds=d,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=I,this.edgeColors=f,this.edgeUVs=g,this.edgeIds=y,this.edgeVAO=_,this.edgeCount=0,this.pointPositions=h,this.pointColors=x,this.pointUVs=G,this.pointSizes=C,this.pointIds=v,this.pointVAO=S,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=b,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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=P,this._view=P,this._projection=P,this._resolution=[1,1]}var C=G.prototype;function S(r,e){if(!e)return 1;if(!e.length)return 1;for(var n=0;nr&&n>0){var i=(e[n][0]-r)/(e[n][0]-e[n-1][0]);return e[n][1]*(1-i)+i*e[n-1][1]}}return 1}function A(r){var e=i(r,_.vertex,_.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function b(r){var e=i(r,h.vertex,h.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function M(r){var e=i(r,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function B(r){var e=i(r,x.vertex,x.fragment);return e.attributes.position.location=0,e}C.isOpaque=function(){return!this.hasAlpha},C.isTransparent=function(){return this.hasAlpha},C.pickSlots=1,C.setPickBase=function(r){this.pickId=r},C.highlight=function(r){if(r&&this.contourEnable){for(var e=m(this.cells,this.intensity,r.intensity),n=e.cells,i=e.vertexIds,a=e.vertexWeights,t=n.length,o=p.mallocFloat32(6*t),c=0,u=0;u0&&((l=this.triShader).bind(),l.uniforms=c,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((l=this.lineShader).bind(),l.uniforms=c,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((l=this.pointShader).bind(),l.uniforms=c,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((l=this.contourShader).bind(),l.uniforms=c,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},C.drawPick=function(r){r=r||{};for(var e=this.gl,n=r.model||P,i=r.view||P,a=r.projection||P,t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)t[0][o]=Math.max(t[0][o],this.clipBounds[0][o]),t[1][o]=Math.min(t[1][o],this.clipBounds[1][o]);this._model=[].slice.call(n),this._view=[].slice.call(i),this._projection=[].slice.call(a),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var c,u={model:n,view:i,projection:a,clipBounds:t,pickId:this.pickId/255};(c=this.pickShader).bind(),c.uniforms=u,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((c=this.pointPickShader).bind(),c.uniforms=u,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},C.pick=function(r){if(!r)return null;if(r.id!==this.pickId)return null;for(var e=r.value[0]+256*r.value[1]+65536*r.value[2],n=this.cells[e],i=this.positions,a=new Array(n.length),t=0;tu[C]&&(t.uniforms.dataAxis=r,t.uniforms.screenOffset=e,t.uniforms.color=f[i],t.uniforms.angle=g[i],d.drawArrays(d.TRIANGLES,u[C],u[S]-u[C]))),_[i]&&G&&(e[1^i]-=A*p*h[i],t.uniforms.dataAxis=n,t.uniforms.screenOffset=e,t.uniforms.color=v[i],t.uniforms.angle=x[i],d.drawArrays(d.TRIANGLES,P,G)),e[1^i]=A*s[2+(1^i)]-1,I[i+2]&&(e[1^i]+=A*p*y[i+2],Cu[C]&&(t.uniforms.dataAxis=r,t.uniforms.screenOffset=e,t.uniforms.color=f[i+2],t.uniforms.angle=g[i+2],d.drawArrays(d.TRIANGLES,u[C],u[S]-u[C]))),_[i+2]&&G&&(e[1^i]+=A*p*h[i+2],t.uniforms.dataAxis=n,t.uniforms.screenOffset=e,t.uniforms.color=v[i+2],t.uniforms.angle=x[i+2],d.drawArrays(d.TRIANGLES,P,G))}}(),d.drawTitle=function(){var r=[0,0],e=[0,0];return function(){var n=this.plot,i=this.shader,a=n.gl,t=n.screenBox,o=n.titleCenter,c=n.titleAngle,u=n.titleColor,d=n.pixelRatio;if(this.titleCount){for(var s=0;s<2;++s)e[s]=2*(o[s]*d-t[s])/(t[2+s]-t[s])-1;i.bind(),i.uniforms.dataAxis=r,i.uniforms.screenOffset=e,i.uniforms.angle=c,i.uniforms.color=u,a.drawArrays(a.TRIANGLES,this.titleOffset,this.titleCount)}}}(),d.bind=function(){var r=[0,0],e=[0,0],n=[0,0];return function(){var i=this.plot,a=this.shader,t=i._tickBounds,o=i.dataBox,c=i.screenBox,u=i.viewBox;a.bind();for(var d=0;d<2;++d){var s=t[d],l=t[d+2]-s,m=.5*(o[d+2]+o[d]),p=o[d+2]-o[d],I=u[d],y=u[d+2]-I,f=c[d],g=c[d+2]-f;e[d]=2*l/p*y/g,r[d]=2*(s-m)/p*y/g}n[1]=2*i.pixelRatio/(c[3]-c[1]),n[0]=n[1]*(c[3]-c[1])/(c[2]-c[0]),a.uniforms.dataScale=e,a.uniforms.dataShift=r,a.uniforms.textScale=n,this.vbo.bind(),a.attributes.textCoordinate.pointer()}}(),d.update=function(r){var e,n,i,a,o,c=[],u=r.ticks,d=r.bounds;for(o=0;o<2;++o){var s=[Math.floor(c.length/3)],l=[-1/0],m=u[o];for(e=0;e=0){var y=e[I]-i[I]*(e[I+2]-e[I])/(i[I+2]-i[I]);0===I?o.drawLine(y,e[1],y,e[3],p[I],m[I]):o.drawLine(e[0],y,e[2],y,p[I],m[I])}}for(I=0;I=0;--r)this.objects[r].dispose();for(this.objects.length=0,r=this.overlays.length-1;r>=0;--r)this.overlays[r].dispose();this.overlays.length=0,this.gl=null},d.addObject=function(r){this.objects.indexOf(r)<0&&(this.objects.push(r),this.setDirty())},d.removeObject=function(r){for(var e=this.objects,n=0;nMath.abs(e))d.rotate(t,0,0,-r*n*Math.PI*I.rotateSpeed/window.innerWidth);else if(!I._ortho){var o=-I.zoomSpeed*a*e/window.innerHeight*(t-d.lastT())/20;d.pan(t,0,0,l*(Math.exp(o)-1))}}}),!0)},I.enableMouseListeners(),I};var i=n(3025),a=n(6296),t=n(351),o=n(8512),c=n(24),u=n(7520)},799:function(r,e,n){var i=n(3236),a=n(9405),t=i(["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=i(["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}"]);r.exports=function(r){return a(r,t,o,null,[{name:"position",type:"vec2"}])}},4100:function(r,e,n){"use strict";var i=n(4437),a=n(3837),t=n(5445),o=n(4449),c=n(3589),u=n(2260),d=n(7169),s=n(351),l=n(4772),m=n(4040),p=n(799),I=n(9216)({tablet:!0,featureDetect:!0});function y(){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 f(r){var e=Math.round(Math.log(Math.abs(r))/Math.log(10));if(e<0){var n=Math.round(Math.pow(10,-e));return Math.ceil(r*n)/n}return e>0?(n=Math.round(Math.pow(10,e)),Math.ceil(r/n)*n):Math.ceil(r)}function g(r){return"boolean"!==typeof r||r}r.exports={createScene:function(r){(r=r||{}).camera=r.camera||{};var e=r.canvas;e||(e=document.createElement("canvas"),r.container?r.container.appendChild(e):document.body.appendChild(e));var n=r.gl;if(n||(r.glOptions&&(I=!!r.glOptions.preserveDrawingBuffer),n=function(r,e){var n=null;try{(n=r.getContext("webgl",e))||(n=r.getContext("experimental-webgl",e))}catch(i){return null}return n}(e,r.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:I})),!n)throw new Error("webgl not supported");var _=r.bounds||[[-10,-10,-10],[10,10,10]],h=new y,v=u(n,n.drawingBufferWidth,n.drawingBufferHeight,{preferFloat:!I}),x=p(n),P=r.cameraObject&&!0===r.cameraObject._ortho||r.camera.projection&&"orthographic"===r.camera.projection.type||!1,G={eye:r.camera.eye||[2,0,0],center:r.camera.center||[0,0,0],up:r.camera.up||[0,1,0],zoomMin:r.camera.zoomMax||.1,zoomMax:r.camera.zoomMin||100,mode:r.camera.mode||"turntable",_ortho:P},C=r.axes||{},S=a(n,C);S.enable=!C.disable;var A=r.spikes||{},b=o(n,A),M=[],B=[],k=[],F=[],z=!0,w=!0,R=new Array(16),E=new Array(16),N={view:null,projection:R,model:E,_ortho:!1},T=(w=!0,[n.drawingBufferWidth,n.drawingBufferHeight]),D=r.cameraObject||i(e,G),J={gl:n,contextLost:!1,pixelRatio:r.pixelRatio||1,canvas:e,selection:h,camera:D,axes:S,axesPixels:null,spikes:b,bounds:_,objects:M,shape:T,aspect:r.aspectRatio||[1,1,1],pickRadius:r.pickRadius||10,zNear:r.zNear||.01,zFar:r.zFar||1e3,fovy:r.fovy||Math.PI/4,clearColor:r.clearColor||[0,0,0,0],autoResize:g(r.autoResize),autoBounds:g(r.autoBounds),autoScale:!!r.autoScale,autoCenter:g(r.autoCenter),clipToBounds:g(r.clipToBounds),snapToData:!!r.snapToData,onselect:r.onselect||null,onrender:r.onrender||null,onclick:r.onclick||null,cameraParams:N,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(r){this.aspect[0]=r.x,this.aspect[1]=r.y,this.aspect[2]=r.z,w=!0},setBounds:function(r,e){this.bounds[0][r]=e.min,this.bounds[1][r]=e.max},setClearColor:function(r){this.clearColor=r},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},U=[n.drawingBufferWidth/J.pixelRatio|0,n.drawingBufferHeight/J.pixelRatio|0];function H(){if(!J._stopped&&J.autoResize){var r=e.parentNode,n=1,i=1;r&&r!==document.body?(n=r.clientWidth,i=r.clientHeight):(n=window.innerWidth,i=window.innerHeight);var a=0|Math.ceil(n*J.pixelRatio),t=0|Math.ceil(i*J.pixelRatio);if(a!==e.width||t!==e.height){e.width=a,e.height=t;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=n+"px",o.height=i+"px",z=!0}}}function L(){for(var r=M.length,e=F.length,i=0;i0&&0===k[e-1];)k.pop(),F.pop().dispose()}function O(){if(J.contextLost)return!0;n.isContextLost()&&(J.contextLost=!0,J.mouseListener.enabled=!1,J.selection.object=null,J.oncontextloss&&J.oncontextloss())}J.autoResize&&H(),window.addEventListener("resize",H),J.update=function(r){J._stopped||(r=r||{},z=!0,w=!0)},J.add=function(r){J._stopped||(r.axes=S,M.push(r),B.push(-1),z=!0,w=!0,L())},J.remove=function(r){if(!J._stopped){var e=M.indexOf(r);e<0||(M.splice(e,1),B.pop(),z=!0,w=!0,L())}},J.dispose=function(){if(!J._stopped&&(J._stopped=!0,window.removeEventListener("resize",H),e.removeEventListener("webglcontextlost",O),J.mouseListener.enabled=!1,!J.contextLost)){S.dispose(),b.dispose();for(var r=0;rh.distance)continue;for(var d=0;d 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"]),e.pickVertex=i(["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"]),e.pickFragment=i(["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"])},4696:function(r,e,n){"use strict";var i=n(9405),a=n(2762),t=n(1888),o=n(6640);function c(r,e,n,i,a){this.plot=r,this.offsetBuffer=e,this.pickBuffer=n,this.shader=i,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}r.exports=function(r,e){var n=r.gl,t=a(n),u=a(n),d=i(n,o.pointVertex,o.pointFragment),s=i(n,o.pickVertex,o.pickFragment),l=new c(r,t,u,d,s);return l.update(e),r.addObject(l),l};var u=c.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(r){var e;function n(e,n){return e in r?r[e]:n}r=r||{},this.sizeMin=n("sizeMin",.5),this.sizeMax=n("sizeMax",20),this.color=n("color",[1,0,0,1]).slice(),this.areaRatio=n("areaRatio",1),this.borderColor=n("borderColor",[0,0,0,1]).slice(),this.blend=n("blend",!1);var i=r.positions.length>>>1,a=r.positions instanceof Float32Array,o=r.idToIndex instanceof Int32Array&&r.idToIndex.length>=i,c=r.positions,u=a?c:t.mallocFloat32(c.length),d=o?r.idToIndex:t.mallocInt32(i);if(a||u.set(c),!o)for(u.set(c),e=0;e>>1;for(n=0;n=e[0]&&t<=e[2]&&o>=e[1]&&o<=e[3]&&i++}return i}(this.points,o),s=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(d,.33333)));r[0]=2/c,r[4]=2/u,r[6]=-2*o[0]/c-1,r[7]=-2*o[1]/u-1,this.offsetBuffer.bind(),a.bind(),a.attributes.position.pointer(),a.uniforms.matrix=r,a.uniforms.color=this.color,a.uniforms.borderColor=this.borderColor,a.uniforms.pointCloud=s<5,a.uniforms.pointSize=s,a.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),i&&(e[0]=255&n,e[1]=n>>8&255,e[2]=n>>16&255,e[3]=n>>24&255,this.pickBuffer.bind(),a.attributes.pickId.pointer(t.UNSIGNED_BYTE),a.uniforms.pickOffset=e,this.pickOffset=n);var l=t.getParameter(t.BLEND),m=t.getParameter(t.DITHER);return l&&!this.blend&&t.disable(t.BLEND),m&&t.disable(t.DITHER),t.drawArrays(t.POINTS,0,this.pointCount),l&&!this.blend&&t.enable(t.BLEND),m&&t.enable(t.DITHER),n+this.pointCount}}(),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(r,e,n){var i=this.pickOffset,a=this.pointCount;if(n=i+a)return null;var t=n-i,o=this.points;return{object:this,pointId:t,dataCoord:[o[2*t],o[2*t+1]]}}},783:function(r){r.exports=function(r,e,n,i){var a,t,o,c,u,d=e[0],s=e[1],l=e[2],m=e[3],p=n[0],I=n[1],y=n[2],f=n[3];return(t=d*p+s*I+l*y+m*f)<0&&(t=-t,p=-p,I=-I,y=-y,f=-f),1-t>1e-6?(a=Math.acos(t),o=Math.sin(a),c=Math.sin((1-i)*a)/o,u=Math.sin(i*a)/o):(c=1-i,u=i),r[0]=c*d+u*p,r[1]=c*s+u*I,r[2]=c*l+u*y,r[3]=c*m+u*f,r}},5964:function(r){"use strict";r.exports=function(r){return r||0===r?r.toString():""}},9366:function(r,e,n){"use strict";var i=n(4359);r.exports=function(r,e,n){var t=[e.style,e.weight,e.variant,e.family].join("_"),o=a[t];if(o||(o=a[t]={}),r in o)return o[r];var c={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e.family,fontStyle:e.style,fontWeight:e.weight,fontVariant:e.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},u=i(r,c);c.triangles=!1;var d,s,l=i(r,c);if(n&&1!==n){for(d=0;d 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}"]),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\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"]),u=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"]),d=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}"]),s=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],l={vertex:t,fragment:u,attributes:s},m={vertex:o,fragment:u,attributes:s},p={vertex:c,fragment:u,attributes:s},I={vertex:t,fragment:d,attributes:s},y={vertex:o,fragment:d,attributes:s},f={vertex:c,fragment:d,attributes:s};function g(r,e){var n=i(r,e),a=n.attributes;return a.position.location=0,a.color.location=1,a.glyph.location=2,a.id.location=3,n}e.createPerspective=function(r){return g(r,l)},e.createOrtho=function(r){return g(r,m)},e.createProject=function(r){return g(r,p)},e.createPickPerspective=function(r){return g(r,I)},e.createPickOrtho=function(r){return g(r,y)},e.createPickProject=function(r){return g(r,f)}},8418:function(r,e,n){"use strict";var i=n(5219),a=n(2762),t=n(8116),o=n(1888),c=n(6760),u=n(1283),d=n(9366),s=n(5964),l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],m=ArrayBuffer,p=DataView;function I(r){return Array.isArray(r)||function(r){return m.isView(r)&&!(r instanceof p)}(r)}function y(r,e){var n=r[0],i=r[1],a=r[2],t=r[3];return r[0]=e[0]*n+e[4]*i+e[8]*a+e[12]*t,r[1]=e[1]*n+e[5]*i+e[9]*a+e[13]*t,r[2]=e[2]*n+e[6]*i+e[10]*a+e[14]*t,r[3]=e[3]*n+e[7]*i+e[11]*a+e[15]*t,r}function f(r,e,n,i){return y(i,i),y(i,i),y(i,i)}function g(r,e){this.index=r,this.dataCoordinate=this.position=e}function _(r){return!0===r||r>1?1:r}function h(r,e,n,i,a,t,o,c,u,d,s,l){this.gl=r,this.pixelRatio=1,this.shader=e,this.orthoShader=n,this.projectShader=i,this.pointBuffer=a,this.colorBuffer=t,this.glyphBuffer=o,this.idBuffer=c,this.vao=u,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=d,this.pickOrthoShader=s,this.pickProjectShader=l,this.points=[],this._selectResult=new g(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}r.exports=function(r){var e=r.gl,n=u.createPerspective(e),i=u.createOrtho(e),o=u.createProject(e),c=u.createPickPerspective(e),d=u.createPickOrtho(e),s=u.createPickProject(e),l=a(e),m=a(e),p=a(e),I=a(e),y=t(e,[{buffer:l,size:3,type:e.FLOAT},{buffer:m,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:I,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),f=new h(e,n,i,o,l,m,p,I,y,c,d,s);return f.update(r),f};var v=h.prototype;v.pickSlots=1,v.setPickBase=function(r){this.pickId=r},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var r=0;r<3;++r)if(this.axesProject[r]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var r=0;r<3;++r)if(this.axesProject[r]&&!this.projectHasAlpha)return!0;return!1};var x=[0,0],P=[0,0,0],G=[0,0,0],C=[0,0,0,1],S=[0,0,0,1],A=l.slice(),b=[0,0,0],M=[[0,0,0],[0,0,0]];function B(r){return r[0]=r[1]=r[2]=0,r}function k(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=1,r}function F(r,e,n,i){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[n]=i,r}function z(r,e,n,i){var a,t=e.axesProject,o=e.gl,u=r.uniforms,d=n.model||l,s=n.view||l,m=n.projection||l,p=e.axesBounds,I=function(r){for(var e=M,n=0;n<2;++n)for(var i=0;i<3;++i)e[n][i]=Math.max(Math.min(r[n][i],1e8),-1e8);return e}(e.clipBounds);a=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],x[0]=2/o.drawingBufferWidth,x[1]=2/o.drawingBufferHeight,r.bind(),u.view=s,u.projection=m,u.screenSize=x,u.highlightId=e.highlightId,u.highlightScale=e.highlightScale,u.clipBounds=I,u.pickGroup=e.pickId/255,u.pixelRatio=i;for(var y=0;y<3;++y)if(t[y]){u.scale=e.projectScale[y],u.opacity=e.projectOpacity[y];for(var g=A,_=0;_<16;++_)g[_]=0;for(_=0;_<4;++_)g[5*_]=1;g[5*y]=0,a[y]<0?g[12+y]=p[0][y]:g[12+y]=p[1][y],c(g,d,g),u.model=g;var h=(y+1)%3,v=(y+2)%3,z=B(P),w=B(G);z[h]=1,w[v]=1;var R=f(0,0,0,k(C,z)),E=f(0,0,0,k(S,w));if(Math.abs(R[1])>Math.abs(E[1])){var N=R;R=E,E=N,N=z,z=w,w=N;var T=h;h=v,v=T}R[0]<0&&(z[h]=-1),E[1]>0&&(w[v]=-1);var D=0,J=0;for(_=0;_<4;++_)D+=Math.pow(d[4*h+_],2),J+=Math.pow(d[4*v+_],2);z[h]/=Math.sqrt(D),w[v]/=Math.sqrt(J),u.axes[0]=z,u.axes[1]=w,u.fragClipBounds[0]=F(b,I[0],y,-1e8),u.fragClipBounds[1]=F(b,I[1],y,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*i),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var w=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function R(r,e,n,i,a,t,o){var c=n.gl;if((t===n.projectHasAlpha||o)&&z(e,n,i,a),t===n.hasAlpha||o){r.bind();var u=r.uniforms;u.model=i.model||l,u.view=i.view||l,u.projection=i.projection||l,x[0]=2/c.drawingBufferWidth,x[1]=2/c.drawingBufferHeight,u.screenSize=x,u.highlightId=n.highlightId,u.highlightScale=n.highlightScale,u.fragClipBounds=w,u.clipBounds=n.axes.bounds,u.opacity=n.opacity,u.pickGroup=n.pickId/255,u.pixelRatio=a,n.vao.bind(),n.vao.draw(c.TRIANGLES,n.vertexCount),n.lineWidth>0&&(c.lineWidth(n.lineWidth*a),n.vao.draw(c.LINES,n.lineVertexCount,n.vertexCount)),n.vao.unbind()}}function E(r,e,n,a){var t;t=I(r)?e=this.pointCount||e<0)return null;var n=this.points[e],i=this._selectResult;i.index=e;for(var a=0;a<3;++a)i.position[a]=i.dataCoordinate[a]=n[a];return i},v.highlight=function(r){if(r){var e=r.index,n=255&e,i=e>>8&255,a=e>>16&255;this.highlightId=[n/255,i/255,a/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(r){if("perspective"in(r=r||{})&&(this.useOrtho=!r.perspective),"orthographic"in r&&(this.useOrtho=!!r.orthographic),"lineWidth"in r&&(this.lineWidth=r.lineWidth),"project"in r)if(I(r.project))this.axesProject=r.project;else{var e=!!r.project;this.axesProject=[e,e,e]}if("projectScale"in r)if(I(r.projectScale))this.projectScale=r.projectScale.slice();else{var n=+r.projectScale;this.projectScale=[n,n,n]}if(this.projectHasAlpha=!1,"projectOpacity"in r){I(r.projectOpacity)?this.projectOpacity=r.projectOpacity.slice():(n=+r.projectOpacity,this.projectOpacity=[n,n,n]);for(var i=0;i<3;++i)this.projectOpacity[i]=_(this.projectOpacity[i]),this.projectOpacity[i]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in r&&(this.opacity=_(r.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var a,t,c=r.position,u={family:r.font||"normal",style:r.fontStyle||"normal",weight:r.fontWeight||"normal",variant:r.fontVariant||"normal"},d=r.alignment||[0,0];if(2===d.length)a=d[0],t=d[1];else for(a=[],t=[],i=0;i0){var w=0,R=v,N=[0,0,0,1],T=[0,0,0,1],D=I(p)&&I(p[0]),J=I(g)&&I(g[0]);r:for(i=0;i0?1-b[0][0]:W<0?1+b[1][0]:1,Z*=Z>0?1-b[0][1]:Z<0?1+b[1][1]:1],Y=S.cells||[],X=S.positions||[];for(C=0;C0){var g=n*s;o.drawBox(l-g,m-g,p+g,m+g,t),o.drawBox(l-g,I-g,p+g,I+g,t),o.drawBox(l-g,m-g,l+g,I+g,t),o.drawBox(p-g,m-g,p+g,I+g,t)}}}},c.update=function(r){r=r||{},this.innerFill=!!r.innerFill,this.outerFill=!!r.outerFill,this.innerColor=(r.innerColor||[0,0,0,.5]).slice(),this.outerColor=(r.outerColor||[0,0,0,.5]).slice(),this.borderColor=(r.borderColor||[0,0,0,1]).slice(),this.borderWidth=r.borderWidth||0,this.selectBox=(r.selectBox||this.selectBox).slice()},c.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},3589:function(r,e,n){"use strict";r.exports=function(r,e){var n=e[0],t=e[1],o=i(r,n,t,{}),c=a.mallocUint8(n*t*4);return new u(r,o,c)};var i=n(2260),a=n(1888),t=n(9618),o=n(8828).nextPow2;function c(r,e,n,i,a){this.coord=[r,e],this.id=n,this.value=i,this.distance=a}function u(r,e,n){this.gl=r,this.fbo=e,this.buffer=n,this._readTimeout=null;var i=this;this._readCallback=function(){i.gl&&(e.bind(),r.readPixels(0,0,e.shape[0],e.shape[1],r.RGBA,r.UNSIGNED_BYTE,i.buffer),i._readTimeout=null)}}var d=u.prototype;Object.defineProperty(d,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(r){if(this.gl){this.fbo.shape=r;var e=this.fbo.shape[0],n=this.fbo.shape[1];if(n*e*4>this.buffer.length){a.free(this.buffer);for(var i=this.buffer=a.mallocUint8(o(n*e*4)),t=0;tn)for(r=n;re)for(r=e;r=0){for(var G=0|P.type.charAt(P.type.length-1),C=new Array(G),S=0;S=0;)A+=1;x[_]=A}var b=new Array(n.length);function M(){m.program=o.program(p,m._vref,m._fref,v,x);for(var r=0;r=0){if((I=m.charCodeAt(m.length-1)-48)<2||I>4)throw new i("","Invalid data type for attribute "+l+": "+m);c(r,e,p[0],a,I,t,l)}else{if(!(m.indexOf("mat")>=0))throw new i("","Unknown data type for attribute "+l+": "+m);var I;if((I=m.charCodeAt(m.length-1)-48)<2||I>4)throw new i("","Invalid data type for attribute "+l+": "+m);u(r,e,p,a,I,t,l)}}}return t};var i=n(8866);function a(r,e,n,i,a,t){this._gl=r,this._wrapper=e,this._index=n,this._locations=i,this._dimension=a,this._constFunc=t}var t=a.prototype;t.pointer=function(r,e,n,i){var a=this,t=a._gl,o=a._locations[a._index];t.vertexAttribPointer(o,a._dimension,r||t.FLOAT,!!e,n||0,i||0),t.enableVertexAttribArray(o)},t.set=function(r,e,n,i){return this._constFunc(this._locations[this._index],r,e,n,i)},Object.defineProperty(t,"location",{get:function(){return this._locations[this._index]},set:function(r){return r!==this._locations[this._index]&&(this._locations[this._index]=0|r,this._wrapper.program=null),0|r}});var o=[function(r,e,n){return void 0===n.length?r.vertexAttrib1f(e,n):r.vertexAttrib1fv(e,n)},function(r,e,n,i){return void 0===n.length?r.vertexAttrib2f(e,n,i):r.vertexAttrib2fv(e,n)},function(r,e,n,i,a){return void 0===n.length?r.vertexAttrib3f(e,n,i,a):r.vertexAttrib3fv(e,n)},function(r,e,n,i,a,t){return void 0===n.length?r.vertexAttrib4f(e,n,i,a,t):r.vertexAttrib4fv(e,n)}];function c(r,e,n,i,t,c,u){var d=o[t],s=new a(r,e,n,i,t,d);Object.defineProperty(c,u,{set:function(e){return r.disableVertexAttribArray(i[n]),d(r,i[n],e),e},get:function(){return s},enumerable:!0})}function u(r,e,n,i,a,t,o){for(var u=new Array(a),d=new Array(a),s=0;s4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+_);r["uniformMatrix"+g+"fv"](c[l],!1,m);break}throw new a("","Unknown uniform data type for "+name+": "+_)}if((g=_.charCodeAt(_.length-1)-48)<2||g>4)throw new a("","Invalid data type");switch(_.charAt(0)){case"b":case"i":r["uniform"+g+"iv"](c[l],m);break;case"v":r["uniform"+g+"fv"](c[l],m);break;default:throw new a("","Unrecognized data type for vector "+name+": "+_)}}}}}}function d(r,e){if("object"!==typeof e)return[[r,e]];var n=[];for(var i in e){var a=e[i],t=r;parseInt(i)+""===i?t+="["+i+"]":t+="."+i,"object"===typeof a?n.push.apply(n,d(t,a)):n.push([t,a])}return n}function s(r,e,i){if("object"===typeof i){var d=l(i);Object.defineProperty(r,e,{get:t(d),set:u(i),enumerable:!0,configurable:!1})}else c[i]?Object.defineProperty(r,e,{get:(s=i,function(r,e,n){return r.getUniform(e.program,n[s])}),set:u(i),enumerable:!0,configurable:!1}):r[e]=function(r){switch(r){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=r.indexOf("vec");if(0<=e&&e<=1&&r.length===4+e){if((n=r.charCodeAt(r.length-1)-48)<2||n>4)throw new a("","Invalid data type");return"b"===r.charAt(0)?o(n,!1):o(n,0)}if(0===r.indexOf("mat")&&4===r.length){var n;if((n=r.charCodeAt(r.length-1)-48)<2||n>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+r);return o(n*n,0)}throw new a("","Unknown uniform data type for "+name+": "+r)}}(n[i].type);var s}function l(r){var e;if(Array.isArray(r)){e=new Array(r.length);for(var n=0;n1){c[0]in t||(t[c[0]]=[]),t=t[c[0]];for(var u=1;u1)for(var u=0;u 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"]),t=i(["#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=i(["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"]),c=i(["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}"]);e.meshShader={vertex:a,fragment:t,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(r,e,n){"use strict";var i=n(2931),a=n(9970),t=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(r,e,n,t){for(var o=0,c=0;c0)for(G=0;G<8;G++){var C=(G+1)%8;d.push(m[G],p[G],p[C],p[C],m[C],m[G]),l.push(_,g,g,g,_,_),I.push(y,f,f,f,y,y);var S=d.length;s.push([S-6,S-5,S-4],[S-3,S-2,S-1])}var A=m;m=p,p=A;var b=_;_=g,g=b;var M=y;y=f,f=M}return{positions:d,cells:s,vectors:l,vertexIntensity:I}}(r,n,t,o)})),l=[],m=[],p=[],I=[];for(c=0;ce)return n-1}return n},u=function(r,e,n){return rn?n:r},d=function(r){var e=1/0;r.sort((function(r,e){return r-e}));for(var n=r.length,i=1;il-1||_>m-1||h>p-1)return i.create();var v,x,P,G,C,S,A=t[0][I],b=t[0][g],M=t[1][y],B=t[1][_],k=t[2][f],F=(o-A)/(b-A),z=(d-M)/(B-M),w=(s-k)/(t[2][h]-k);switch(isFinite(F)||(F=.5),isFinite(z)||(z=.5),isFinite(w)||(w=.5),n.reversedX&&(I=l-1-I,g=l-1-g),n.reversedY&&(y=m-1-y,_=m-1-_),n.reversedZ&&(f=p-1-f,h=p-1-h),n.filled){case 5:C=f,S=h,P=y*p,G=_*p,v=I*p*m,x=g*p*m;break;case 4:C=f,S=h,v=I*p,x=g*p,P=y*p*l,G=_*p*l;break;case 3:P=y,G=_,C=f*m,S=h*m,v=I*m*p,x=g*m*p;break;case 2:P=y,G=_,v=I*m,x=g*m,C=f*m*l,S=h*m*l;break;case 1:v=I,x=g,C=f*l,S=h*l,P=y*l*p,G=_*l*p;break;default:v=I,x=g,P=y*l,G=_*l,C=f*l*m,S=h*l*m}var R=a[v+P+C],E=a[v+P+S],N=a[v+G+C],T=a[v+G+S],D=a[x+P+C],J=a[x+P+S],U=a[x+G+C],H=a[x+G+S],L=i.create(),O=i.create(),K=i.create(),V=i.create();i.lerp(L,R,D,F),i.lerp(O,E,J,F),i.lerp(K,N,U,F),i.lerp(V,T,H,F);var j=i.create(),W=i.create();i.lerp(j,L,K,z),i.lerp(W,O,V,z);var Z=i.create();return i.lerp(Z,j,W,w),Z}(e,r,p)},y=r.getDivergence||function(r,e){var n=i.create(),a=1e-4;i.add(n,r,[a,0,0]);var t=I(n);i.subtract(t,t,e),i.scale(t,t,1/a),i.add(n,r,[0,a,0]);var o=I(n);i.subtract(o,o,e),i.scale(o,o,1/a),i.add(n,r,[0,0,a]);var c=I(n);return i.subtract(c,c,e),i.scale(c,c,1/a),i.add(n,t,o),i.add(n,n,c),n},f=[],g=e[0][0],_=e[0][1],h=e[0][2],v=e[1][0],x=e[1][1],P=e[1][2],G=function(r){var e=r[0],n=r[1],i=r[2];return!(ev||n<_||n>x||iP)},C=10*i.distance(e[0],e[1])/a,S=C*C,A=1,b=0,M=n.length;M>1&&(A=function(r){for(var e=[],n=[],i=[],a={},t={},o={},c=r.length,u=0;ub&&(b=T),E.push(T),f.push({points:F,velocities:z,divergences:E});for(var D=0;D<100*a&&F.lengthS&&i.scale(J,J,C/Math.sqrt(U)),i.add(J,J,k),w=I(J),i.squaredDistance(R,J)-S>-1e-4*S&&(F.push(J),R=J,z.push(w),N=y(J,w),T=i.length(N),isFinite(T)&&T>b&&(b=T),E.push(T)),k=J}}var H=o(f,r.colormap,b,A);return l?H.tubeScale=l:(0===b&&(b=1),H.tubeScale=.5*s*A/b),H};var s=n(6740),l=n(6405).createMesh;r.exports.createTubeMesh=function(r,e){return l(r,e,{shaders:s,traceType:"streamtube"})}},990:function(r,e,n){var i=n(9405),a=n(3236),t=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 mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 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 (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) 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 \u2014 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"]),c=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 mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 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"]),u=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"]);e.createShader=function(r){var e=i(r,t,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(r){var e=i(r,t,u,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(r){var e=i(r,c,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(r){var e=i(r,c,u,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},9499:function(r,e,n){"use strict";r.exports=function(r){var e=r.gl,n=_(e),i=v(e),c=h(e),u=x(e),d=a(e),s=t(e,[{buffer:d,size:4,stride:P,offset:0},{buffer:d,size:3,stride:P,offset:16},{buffer:d,size:3,stride:P,offset:28}]),l=a(e),m=t(e,[{buffer:l,size:4,stride:20,offset:0},{buffer:l,size:1,stride:20,offset:16}]),p=a(e),I=t(e,[{buffer:p,size:2,type:e.FLOAT}]),y=o(e,1,b,e.RGBA,e.UNSIGNED_BYTE);y.minFilter=e.LINEAR,y.magFilter=e.LINEAR;var f=new M(e,[0,0],[[0,0,0],[0,0,0]],n,i,d,s,y,c,u,l,m,p,I,[0,0,0]),g={levels:[[],[],[]]};for(var G in r)g[G]=r[G];return g.colormap=g.colormap||"jet",f.update(g),f};var i=n(8828),a=n(2762),t=n(8116),o=n(7766),c=n(1888),u=n(6729),d=n(5298),s=n(9994),l=n(9618),m=n(3711),p=n(6760),I=n(7608),y=n(2478),f=n(6199),g=n(990),_=g.createShader,h=g.createContourShader,v=g.createPickShader,x=g.createPickContourShader,P=40,G=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],C=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],S=[[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 A(r,e,n,i,a){this.position=r,this.index=e,this.uv=n,this.level=i,this.dataCoordinate=a}!function(){for(var r=0;r<3;++r){var e=S[r],n=(r+2)%3;e[(r+1)%3+0]=1,e[n+3]=1,e[r+6]=1}}();var b=256;function M(r,e,n,i,a,t,o,u,d,s,m,p,I,y,f){this.gl=r,this.shape=e,this.bounds=n,this.objectOffset=f,this.intensityBounds=[],this._shader=i,this._pickShader=a,this._coordinateBuffer=t,this._vao=o,this._colorMap=u,this._contourShader=d,this._contourPickShader=s,this._contourBuffer=m,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new A([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=I,this._dynamicVAO=y,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=[l(c.mallocFloat(1024),[0,0]),l(c.mallocFloat(1024),[0,0]),l(c.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 B=M.prototype;B.genColormap=function(r,e){var n=!1,i=s([u({colormap:r,nshades:b,format:"rgba"}).map((function(r,i){var a=e?function(r,e){if(!e)return 1;if(!e.length)return 1;for(var n=0;nr&&n>0){var i=(e[n][0]-r)/(e[n][0]-e[n-1][0]);return e[n][1]*(1-i)+i*e[n-1][1]}}return 1}(i/255,e):r[3];return a<1&&(n=!0),[r[0],r[1],r[2],255*a]}))]);return d.divseq(i,255),this.hasAlphaScale=n,i},B.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},B.isOpaque=function(){return!this.isTransparent()},B.pickSlots=1,B.setPickBase=function(r){this.pickId=r};var k=[0,0,0],F={showSurface:!1,showContour:!1,projections:[G.slice(),G.slice(),G.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function z(r,e){var n,i,a,t=e.axes&&e.axes.lastCubeProps.axis||k,o=e.showSurface,c=e.showContour;for(n=0;n<3;++n)for(o=o||e.surfaceProject[n],i=0;i<3;++i)c=c||e.contourProject[n][i];for(n=0;n<3;++n){var u=F.projections[n];for(i=0;i<16;++i)u[i]=0;for(i=0;i<4;++i)u[5*i]=1;u[5*n]=0,u[12+n]=e.axesBounds[+(t[n]>0)][n],p(u,r.model,u);var d=F.clipBounds[n];for(a=0;a<2;++a)for(i=0;i<3;++i)d[a][i]=r.clipBounds[a][i];d[0][n]=-1e8,d[1][n]=1e8}return F.showSurface=o,F.showContour=c,F}var w={model:G,view:G,projection:G,inverseModel:G.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},R=G.slice(),E=[1,0,0,0,1,0,0,0,1];function N(r,e){r=r||{};var n=this.gl;n.disable(n.CULL_FACE),this._colorMap.bind(0);var i=w;i.model=r.model||G,i.view=r.view||G,i.projection=r.projection||G,i.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],i.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],i.objectOffset=this.objectOffset,i.contourColor=this.contourColor[0],i.inverseModel=I(i.inverseModel,i.model);for(var a=0;a<2;++a)for(var t=i.clipBounds[a],o=0;o<3;++o)t[o]=Math.min(Math.max(this.clipBounds[a][o],-1e8),1e8);i.kambient=this.ambientLight,i.kdiffuse=this.diffuseLight,i.kspecular=this.specularLight,i.roughness=this.roughness,i.fresnel=this.fresnel,i.opacity=this.opacity,i.height=0,i.permutation=E,i.vertexColor=this.vertexColor;var c=R;for(p(c,i.view,i.model),p(c,i.projection,c),I(c,c),a=0;a<3;++a)i.eyePosition[a]=c[12+a]/c[15];var u=c[15];for(a=0;a<3;++a)u+=this.lightPosition[a]*c[4*a+3];for(a=0;a<3;++a){var d=c[12+a];for(o=0;o<3;++o)d+=c[4*o+a]*this.lightPosition[o];i.lightPosition[a]=d/u}var s=z(i,this);if(s.showSurface){for(this._shader.bind(),this._shader.uniforms=i,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(n.TRIANGLES,this._vertexCount),a=0;a<3;++a)this.surfaceProject[a]&&this.vertexCount&&(this._shader.uniforms.model=s.projections[a],this._shader.uniforms.clipBounds=s.clipBounds[a],this._vao.draw(n.TRIANGLES,this._vertexCount));this._vao.unbind()}if(s.showContour){var l=this._contourShader;i.kambient=1,i.kdiffuse=0,i.kspecular=0,i.opacity=1,l.bind(),l.uniforms=i;var m=this._contourVAO;for(m.bind(),a=0;a<3;++a)for(l.uniforms.permutation=S[a],n.lineWidth(this.contourWidth[a]*this.pixelRatio),o=0;o>4)/16)/255,a=Math.floor(i),t=i-a,o=e[1]*(r.value[1]+(15&r.value[2])/16)/255,c=Math.floor(o),u=o-c;a+=1,c+=1;var d=n.position;d[0]=d[1]=d[2]=0;for(var s=0;s<2;++s)for(var l=s?t:1-t,m=0;m<2;++m)for(var p=a+s,I=c+m,f=l*(m?u:1-u),g=0;g<3;++g)d[g]+=this._field[g].get(p,I)*f;for(var _=this._pickResult.level,h=0;h<3;++h)if(_[h]=y.le(this.contourLevels[h],d[h]),_[h]<0)this.contourLevels[h].length>0&&(_[h]=0);else if(_[h]Math.abs(x-d[h])&&(_[h]+=1)}for(n.index[0]=t<.5?a:a+1,n.index[1]=u<.5?c:c+1,n.uv[0]=i/e[0],n.uv[1]=o/e[1],g=0;g<3;++g)n.dataCoordinate[g]=this._field[g].get(n.index[0],n.index[1]);return n},B.padField=function(r,e){var n=e.shape.slice(),i=r.shape.slice();d.assign(r.lo(1,1).hi(n[0],n[1]),e),d.assign(r.lo(1).hi(n[0],1),e.hi(n[0],1)),d.assign(r.lo(1,i[1]-1).hi(n[0],1),e.lo(0,n[1]-1).hi(n[0],1)),d.assign(r.lo(0,1).hi(1,n[1]),e.hi(1)),d.assign(r.lo(i[0]-1,1).hi(1,n[1]),e.lo(n[0]-1)),r.set(0,0,e.get(0,0)),r.set(0,i[1]-1,e.get(0,n[1]-1)),r.set(i[0]-1,0,e.get(n[0]-1,0)),r.set(i[0]-1,i[1]-1,e.get(n[0]-1,n[1]-1))},B.update=function(r){r=r||{},this.objectOffset=r.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in r&&(this.contourWidth=D(r.contourWidth,Number)),"showContour"in r&&(this.showContour=D(r.showContour,Boolean)),"showSurface"in r&&(this.showSurface=!!r.showSurface),"contourTint"in r&&(this.contourTint=D(r.contourTint,Boolean)),"contourColor"in r&&(this.contourColor=U(r.contourColor)),"contourProject"in r&&(this.contourProject=D(r.contourProject,(function(r){return D(r,Boolean)}))),"surfaceProject"in r&&(this.surfaceProject=r.surfaceProject),"dynamicColor"in r&&(this.dynamicColor=U(r.dynamicColor)),"dynamicTint"in r&&(this.dynamicTint=D(r.dynamicTint,Number)),"dynamicWidth"in r&&(this.dynamicWidth=D(r.dynamicWidth,Number)),"opacity"in r&&(this.opacity=r.opacity),"opacityscale"in r&&(this.opacityscale=r.opacityscale),"colorBounds"in r&&(this.colorBounds=r.colorBounds),"vertexColor"in r&&(this.vertexColor=r.vertexColor?1:0),"colormap"in r&&this._colorMap.setPixels(this.genColormap(r.colormap,this.opacityscale));var e=r.field||r.coords&&r.coords[2]||null,n=!1;if(e||(e=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 r||"coords"in r){var a=(e.shape[0]+2)*(e.shape[1]+2);a>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(i.nextPow2(a))),this._field[2]=l(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var t=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(c.freeFloat(this._field[o].data),this._field[o].data=c.mallocFloat(this._field[2].size)),this._field[o]=l(this._field[o].data,[t[0]+2,t[1]+2]);if(r.coords){var u=r.coords;if(!Array.isArray(u)||3!==u.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var d=u[o];for(g=0;g<2;++g)if(d.shape[g]!==t[g])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],d)}}else if(r.ticks){var s=r.ticks;if(!Array.isArray(s)||2!==s.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=s[o];if((Array.isArray(p)||p.length)&&(p=l(p)),p.shape[0]!==t[o])throw new Error("gl-surface: invalid tick length");var I=l(p.data,t);I.stride[o]=p.stride[0],I.stride[1^o]=0,this.padField(this._field[o],I)}}else{for(o=0;o<2;++o){var y=[0,0];y[o]=1,this._field[o]=l(this._field[o].data,[t[0]+2,t[1]+2],y,0)}this._field[0].set(0,0,0);for(var g=0;g0){for(var hr=0;hr<5;++hr)Q.pop();H-=1}continue r}Q.push(ir[0],ir[1],or[0],or[1],ir[2]),H+=1}}nr.push(H)}this._contourOffsets[$]=er,this._contourCounts[$]=nr}var vr=c.mallocFloat(Q.length);for(o=0;oc||o[1]<0||o[1]>c)throw new Error("gl-texture2d: Invalid texture size");var u=I(o,e.stride.slice()),d=0;"float32"===n?d=r.FLOAT:"float64"===n?(d=r.FLOAT,u=!1,n="float32"):"uint8"===n?d=r.UNSIGNED_BYTE:(d=r.UNSIGNED_BYTE,u=!1,n="uint8");var l,p,f=0;if(2===o.length)f=r.LUMINANCE,o=[o[0],o[1],1],e=i(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])f=r.ALPHA;else if(2===o[2])f=r.LUMINANCE_ALPHA;else if(3===o[2])f=r.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=r.RGBA}}d!==r.FLOAT||r.getExtension("OES_texture_float")||(d=r.UNSIGNED_BYTE,u=!1);var g=e.size;if(u)l=0===e.offset&&e.data.length===g?e.data:e.data.subarray(e.offset,e.offset+g);else{var _=[o[2],o[2]*o[0],1];p=t.malloc(g,n);var h=i(p,o,_,0);"float32"!==n&&"float64"!==n||d!==r.UNSIGNED_BYTE?a.assign(h,e):s(h,e),l=p.subarray(0,g)}var v=y(r);return r.texImage2D(r.TEXTURE_2D,0,f,o[0],o[1],0,f,d,l),u||t.free(p),new m(r,v,o[0],o[1],f,d)}(r,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,c=null,u=null;function d(r){return"undefined"!=typeof HTMLCanvasElement&&r instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&r instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&r instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&r instanceof ImageData}var s=function(r,e){a.muls(r,e,255)};function l(r,e,n){var i=r.gl,a=i.getParameter(i.MAX_TEXTURE_SIZE);if(e<0||e>a||n<0||n>a)throw new Error("gl-texture2d: Invalid texture size");return r._shape=[e,n],r.bind(),i.texImage2D(i.TEXTURE_2D,0,r.format,e,n,0,r.format,r.type,null),r._mipLevels=[0],r}function m(r,e,n,i,a,t){this.gl=r,this.handle=e,this.format=a,this.type=t,this._shape=[n,i],this._mipLevels=[0],this._magFilter=r.NEAREST,this._minFilter=r.NEAREST,this._wrapS=r.CLAMP_TO_EDGE,this._wrapT=r.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,c=[this._wrapS,this._wrapT];Object.defineProperties(c,[{get:function(){return o._wrapS},set:function(r){return o.wrapS=r}},{get:function(){return o._wrapT},set:function(r){return o.wrapT=r}}]),this._wrapVector=c;var u=[this._shape[0],this._shape[1]];Object.defineProperties(u,[{get:function(){return o._shape[0]},set:function(r){return o.width=r}},{get:function(){return o._shape[1]},set:function(r){return o.height=r}}]),this._shapeVector=u}var p=m.prototype;function I(r,e){return 3===r.length?1===e[2]&&e[1]===r[0]*r[2]&&e[0]===r[2]:1===e[0]&&e[1]===r[0]}function y(r){var e=r.createTexture();return r.bindTexture(r.TEXTURE_2D,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e}function f(r,e,n,i,a){var t=r.getParameter(r.MAX_TEXTURE_SIZE);if(e<0||e>t||n<0||n>t)throw new Error("gl-texture2d: Invalid texture shape");if(a===r.FLOAT&&!r.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=y(r);return r.texImage2D(r.TEXTURE_2D,0,i,e,n,0,i,a,null),new m(r,o,e,n,i,a)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(r){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(r)>=0&&(e.getExtension("OES_texture_float_linear")||(r=e.NEAREST)),c.indexOf(r)<0)throw new Error("gl-texture2d: Unknown filter mode "+r);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r),this._minFilter=r}},magFilter:{get:function(){return this._magFilter},set:function(r){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(r)>=0&&(e.getExtension("OES_texture_float_linear")||(r=e.NEAREST)),c.indexOf(r)<0)throw new Error("gl-texture2d: Unknown filter mode "+r);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,r),this._magFilter=r}},mipSamples:{get:function(){return this._anisoSamples},set:function(r){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(r,1),e!==this._anisoSamples){var n=this.gl.getExtension("EXT_texture_filter_anisotropic");n&&this.gl.texParameterf(this.gl.TEXTURE_2D,n.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(r){if(this.bind(),u.indexOf(r)<0)throw new Error("gl-texture2d: Unknown wrap mode "+r);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,r),this._wrapS=r}},wrapT:{get:function(){return this._wrapT},set:function(r){if(this.bind(),u.indexOf(r)<0)throw new Error("gl-texture2d: Unknown wrap mode "+r);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,r),this._wrapT=r}},wrap:{get:function(){return this._wrapVector},set:function(r){if(Array.isArray(r)||(r=[r,r]),2!==r.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(u.indexOf(r[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+r);this._wrapS=r[0],this._wrapT=r[1];var n=this.gl;return this.bind(),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,this._wrapS),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,this._wrapT),r}},shape:{get:function(){return this._shapeVector},set:function(r){if(Array.isArray(r)){if(2!==r.length)throw new Error("gl-texture2d: Invalid texture shape")}else r=[0|r,0|r];return l(this,0|r[0],0|r[1]),[0|r[0],0|r[1]]}},width:{get:function(){return this._shape[0]},set:function(r){return l(this,r|=0,this._shape[1]),r}},height:{get:function(){return this._shape[1]},set:function(r){return r|=0,l(this,this._shape[0],r),r}}}),p.bind=function(r){var e=this.gl;return void 0!==r&&e.activeTexture(e.TEXTURE0+(0|r)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==r?0|r:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var r=Math.min(this._shape[0],this._shape[1]),e=0;r>0;++e,r>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},p.setPixels=function(r,e,n,o){var c=this.gl;this.bind(),Array.isArray(e)?(o=n,n=0|e[1],e=0|e[0]):(e=e||0,n=n||0),o=o||0;var u=d(r)?r:r.raw;if(u)this._mipLevels.indexOf(o)<0?(c.texImage2D(c.TEXTURE_2D,0,this.format,this.format,this.type,u),this._mipLevels.push(o)):c.texSubImage2D(c.TEXTURE_2D,o,e,n,this.format,this.type,u);else{if(!(r.shape&&r.stride&&r.data))throw new Error("gl-texture2d: Unsupported data type");if(r.shape.length<2||e+r.shape[1]>this._shape[1]>>>o||n+r.shape[0]>this._shape[0]>>>o||e<0||n<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(r,e,n,o,c,u,d,l){var m=l.dtype,p=l.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var y=0,f=0,g=I(p,l.stride.slice());if("float32"===m?y=r.FLOAT:"float64"===m?(y=r.FLOAT,g=!1,m="float32"):"uint8"===m?y=r.UNSIGNED_BYTE:(y=r.UNSIGNED_BYTE,g=!1,m="uint8"),2===p.length)f=r.LUMINANCE,p=[p[0],p[1],1],l=i(l.data,p,[l.stride[0],l.stride[1],1],l.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])f=r.ALPHA;else if(2===p[2])f=r.LUMINANCE_ALPHA;else if(3===p[2])f=r.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");f=r.RGBA}p[2]}if(f!==r.LUMINANCE&&f!==r.ALPHA||c!==r.LUMINANCE&&c!==r.ALPHA||(f=c),f!==c)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var _=l.size,h=d.indexOf(o)<0;if(h&&d.push(o),y===u&&g)0===l.offset&&l.data.length===_?h?r.texImage2D(r.TEXTURE_2D,o,c,p[0],p[1],0,c,u,l.data):r.texSubImage2D(r.TEXTURE_2D,o,e,n,p[0],p[1],c,u,l.data):h?r.texImage2D(r.TEXTURE_2D,o,c,p[0],p[1],0,c,u,l.data.subarray(l.offset,l.offset+_)):r.texSubImage2D(r.TEXTURE_2D,o,e,n,p[0],p[1],c,u,l.data.subarray(l.offset,l.offset+_));else{var v;v=u===r.FLOAT?t.mallocFloat32(_):t.mallocUint8(_);var x=i(v,p,[p[2],p[2]*p[0],1]);y===r.FLOAT&&u===r.UNSIGNED_BYTE?s(x,l):a.assign(x,l),h?r.texImage2D(r.TEXTURE_2D,o,c,p[0],p[1],0,c,u,v.subarray(0,_)):r.texSubImage2D(r.TEXTURE_2D,o,e,n,p[0],p[1],c,u,v.subarray(0,_)),u===r.FLOAT?t.freeFloat32(v):t.freeUint8(v)}}(c,e,n,o,this.format,this.type,this._mipLevels,r)}}},1433:function(r){"use strict";r.exports=function(r,e,n){e?e.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var i=0|r.getParameter(r.MAX_VERTEX_ATTRIBS);if(n){if(n.length>i)throw new Error("gl-vao: Too many vertex attributes");for(var a=0;a1?0:Math.acos(c)};var i=n(2825),a=n(3536),t=n(244)},9226:function(r){r.exports=function(r,e){return r[0]=Math.ceil(e[0]),r[1]=Math.ceil(e[1]),r[2]=Math.ceil(e[2]),r}},3126:function(r){r.exports=function(r){var e=new Float32Array(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}},3990:function(r){r.exports=function(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}},1091:function(r){r.exports=function(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},5911:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[0],c=n[1],u=n[2];return r[0]=a*u-t*c,r[1]=t*o-i*u,r[2]=i*c-a*o,r}},5455:function(r,e,n){r.exports=n(7056)},7056:function(r){r.exports=function(r,e){var n=e[0]-r[0],i=e[1]-r[1],a=e[2]-r[2];return Math.sqrt(n*n+i*i+a*a)}},4008:function(r,e,n){r.exports=n(6690)},6690:function(r){r.exports=function(r,e,n){return r[0]=e[0]/n[0],r[1]=e[1]/n[1],r[2]=e[2]/n[2],r}},244:function(r){r.exports=function(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}},2613:function(r){r.exports=1e-6},9922:function(r,e,n){r.exports=function(r,e){var n=r[0],a=r[1],t=r[2],o=e[0],c=e[1],u=e[2];return Math.abs(n-o)<=i*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(a-c)<=i*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(t-u)<=i*Math.max(1,Math.abs(t),Math.abs(u))};var i=n(2613)},9265:function(r){r.exports=function(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}},2681:function(r){r.exports=function(r,e){return r[0]=Math.floor(e[0]),r[1]=Math.floor(e[1]),r[2]=Math.floor(e[2]),r}},5137:function(r,e,n){r.exports=function(r,e,n,a,t,o){var c,u;for(e||(e=3),n||(n=0),u=a?Math.min(a*e+n,r.length):r.length,c=n;c0&&(t=1/Math.sqrt(t),r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t),r}},7636:function(r){r.exports=function(r,e){e=e||1;var n=2*Math.random()*Math.PI,i=2*Math.random()-1,a=Math.sqrt(1-i*i)*e;return r[0]=Math.cos(n)*a,r[1]=Math.sin(n)*a,r[2]=i*e,r}},6894:function(r){r.exports=function(r,e,n,i){var a=n[1],t=n[2],o=e[1]-a,c=e[2]-t,u=Math.sin(i),d=Math.cos(i);return r[0]=e[0],r[1]=a+o*d-c*u,r[2]=t+o*u+c*d,r}},109:function(r){r.exports=function(r,e,n,i){var a=n[0],t=n[2],o=e[0]-a,c=e[2]-t,u=Math.sin(i),d=Math.cos(i);return r[0]=a+c*u+o*d,r[1]=e[1],r[2]=t+c*d-o*u,r}},8692:function(r){r.exports=function(r,e,n,i){var a=n[0],t=n[1],o=e[0]-a,c=e[1]-t,u=Math.sin(i),d=Math.cos(i);return r[0]=a+o*d-c*u,r[1]=t+o*u+c*d,r[2]=e[2],r}},2447:function(r){r.exports=function(r,e){return r[0]=Math.round(e[0]),r[1]=Math.round(e[1]),r[2]=Math.round(e[2]),r}},6621:function(r){r.exports=function(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r}},8489:function(r){r.exports=function(r,e,n,i){return r[0]=e[0]+n[0]*i,r[1]=e[1]+n[1]*i,r[2]=e[2]+n[2]*i,r}},1463:function(r){r.exports=function(r,e,n,i){return r[0]=e,r[1]=n,r[2]=i,r}},6141:function(r,e,n){r.exports=n(2953)},5486:function(r,e,n){r.exports=n(3066)},2953:function(r){r.exports=function(r,e){var n=e[0]-r[0],i=e[1]-r[1],a=e[2]-r[2];return n*n+i*i+a*a}},3066:function(r){r.exports=function(r){var e=r[0],n=r[1],i=r[2];return e*e+n*n+i*i}},2229:function(r,e,n){r.exports=n(6843)},6843:function(r){r.exports=function(r,e,n){return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],r}},492:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2];return r[0]=i*n[0]+a*n[3]+t*n[6],r[1]=i*n[1]+a*n[4]+t*n[7],r[2]=i*n[2]+a*n[5]+t*n[8],r}},5673:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[3]*i+n[7]*a+n[11]*t+n[15];return o=o||1,r[0]=(n[0]*i+n[4]*a+n[8]*t+n[12])/o,r[1]=(n[1]*i+n[5]*a+n[9]*t+n[13])/o,r[2]=(n[2]*i+n[6]*a+n[10]*t+n[14])/o,r}},264:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[0],c=n[1],u=n[2],d=n[3],s=d*i+c*t-u*a,l=d*a+u*i-o*t,m=d*t+o*a-c*i,p=-o*i-c*a-u*t;return r[0]=s*d+p*-o+l*-u-m*-c,r[1]=l*d+p*-c+m*-o-s*-u,r[2]=m*d+p*-u+s*-c-l*-o,r}},4361:function(r){r.exports=function(r,e,n){return r[0]=e[0]+n[0],r[1]=e[1]+n[1],r[2]=e[2]+n[2],r[3]=e[3]+n[3],r}},2335:function(r){r.exports=function(r){var e=new Float32Array(4);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e}},2933:function(r){r.exports=function(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}},7536:function(r){r.exports=function(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},4691:function(r){r.exports=function(r,e){var n=e[0]-r[0],i=e[1]-r[1],a=e[2]-r[2],t=e[3]-r[3];return Math.sqrt(n*n+i*i+a*a+t*t)}},1373:function(r){r.exports=function(r,e,n){return r[0]=e[0]/n[0],r[1]=e[1]/n[1],r[2]=e[2]/n[2],r[3]=e[3]/n[3],r}},3750:function(r){r.exports=function(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]}},3390:function(r){r.exports=function(r,e,n,i){var a=new Float32Array(4);return a[0]=r,a[1]=e,a[2]=n,a[3]=i,a}},9970:function(r,e,n){r.exports={create:n(7536),clone:n(2335),fromValues:n(3390),copy:n(2933),set:n(4578),add:n(4361),subtract:n(6860),multiply:n(3576),divide:n(1373),min:n(2334),max:n(160),scale:n(9288),scaleAndAdd:n(4844),distance:n(4691),squaredDistance:n(7960),length:n(6808),squaredLength:n(483),negate:n(1498),inverse:n(4494),normalize:n(5177),dot:n(3750),lerp:n(2573),random:n(9131),transformMat4:n(5352),transformQuat:n(4041)}},4494:function(r){r.exports=function(r,e){return r[0]=1/e[0],r[1]=1/e[1],r[2]=1/e[2],r[3]=1/e[3],r}},6808:function(r){r.exports=function(r){var e=r[0],n=r[1],i=r[2],a=r[3];return Math.sqrt(e*e+n*n+i*i+a*a)}},2573:function(r){r.exports=function(r,e,n,i){var a=e[0],t=e[1],o=e[2],c=e[3];return r[0]=a+i*(n[0]-a),r[1]=t+i*(n[1]-t),r[2]=o+i*(n[2]-o),r[3]=c+i*(n[3]-c),r}},160:function(r){r.exports=function(r,e,n){return r[0]=Math.max(e[0],n[0]),r[1]=Math.max(e[1],n[1]),r[2]=Math.max(e[2],n[2]),r[3]=Math.max(e[3],n[3]),r}},2334:function(r){r.exports=function(r,e,n){return r[0]=Math.min(e[0],n[0]),r[1]=Math.min(e[1],n[1]),r[2]=Math.min(e[2],n[2]),r[3]=Math.min(e[3],n[3]),r}},3576:function(r){r.exports=function(r,e,n){return r[0]=e[0]*n[0],r[1]=e[1]*n[1],r[2]=e[2]*n[2],r[3]=e[3]*n[3],r}},1498:function(r){r.exports=function(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=-e[3],r}},5177:function(r){r.exports=function(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=n*n+i*i+a*a+t*t;return o>0&&(o=1/Math.sqrt(o),r[0]=n*o,r[1]=i*o,r[2]=a*o,r[3]=t*o),r}},9131:function(r,e,n){var i=n(5177),a=n(9288);r.exports=function(r,e){return e=e||1,r[0]=Math.random(),r[1]=Math.random(),r[2]=Math.random(),r[3]=Math.random(),i(r,r),a(r,r,e),r}},9288:function(r){r.exports=function(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r}},4844:function(r){r.exports=function(r,e,n,i){return r[0]=e[0]+n[0]*i,r[1]=e[1]+n[1]*i,r[2]=e[2]+n[2]*i,r[3]=e[3]+n[3]*i,r}},4578:function(r){r.exports=function(r,e,n,i,a){return r[0]=e,r[1]=n,r[2]=i,r[3]=a,r}},7960:function(r){r.exports=function(r,e){var n=e[0]-r[0],i=e[1]-r[1],a=e[2]-r[2],t=e[3]-r[3];return n*n+i*i+a*a+t*t}},483:function(r){r.exports=function(r){var e=r[0],n=r[1],i=r[2],a=r[3];return e*e+n*n+i*i+a*a}},6860:function(r){r.exports=function(r,e,n){return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],r[3]=e[3]-n[3],r}},5352:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3];return r[0]=n[0]*i+n[4]*a+n[8]*t+n[12]*o,r[1]=n[1]*i+n[5]*a+n[9]*t+n[13]*o,r[2]=n[2]*i+n[6]*a+n[10]*t+n[14]*o,r[3]=n[3]*i+n[7]*a+n[11]*t+n[15]*o,r}},4041:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[0],c=n[1],u=n[2],d=n[3],s=d*i+c*t-u*a,l=d*a+u*i-o*t,m=d*t+o*a-c*i,p=-o*i-c*a-u*t;return r[0]=s*d+p*-o+l*-u-m*-c,r[1]=l*d+p*-c+m*-o-s*-u,r[2]=m*d+p*-u+s*-c-l*-o,r[3]=e[3],r}},1848:function(r,e,n){var i=n(4905),a=n(6468);r.exports=function(r){for(var e=Array.isArray(r)?r:i(r),n=0;n0)continue;n=r.slice(0,1).join("")}return J(n),F+=n.length,(b=b.slice(n.length)).length}}function W(){return/[^a-fA-F0-9]/.test(e)?(J(b.join("")),A=u,C):(b.push(e),n=e,C+1)}function Z(){return"."===e||/[eE]/.test(e)?(b.push(e),A=y,n=e,C+1):"x"===e&&1===b.length&&"0"===b[0]?(A=x,b.push(e),n=e,C+1):/[^\d]/.test(e)?(J(b.join("")),A=u,C):(b.push(e),n=e,C+1)}function q(){return"f"===e&&(b.push(e),n=e,C+=1),/[eE]/.test(e)?(b.push(e),n=e,C+1):("-"!==e&&"+"!==e||!/[eE]/.test(n))&&/[^\d]/.test(e)?(J(b.join("")),A=u,C):(b.push(e),n=e,C+1)}function Y(){if(/[^\d\w_]/.test(e)){var r=b.join("");return A=D[r]?_:T[r]?g:f,J(b.join("")),A=u,C}return b.push(e),n=e,C+1}};var i=n(620),a=n(7827),t=n(6852),o=n(7932),c=n(3508),u=999,d=9999,s=0,l=1,m=2,p=3,I=4,y=5,f=6,g=7,_=8,h=9,v=10,x=11,P=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(r,e,n){var i=n(6852);i=i.slice().filter((function(r){return!/^(gl\_|texture)/.test(r)})),r.exports=i.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"])},6852:function(r){r.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"]},7932:function(r,e,n){var i=n(620);r.exports=i.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])},620:function(r){r.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]},7827:function(r){r.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(r,e,n){var i=n(5874);r.exports=function(r,e){var n=i(e),a=[];return a=(a=a.concat(n(r))).concat(n(null))}},3236:function(r){r.exports=function(r){"string"===typeof r&&(r=[r]);for(var e=[].slice.call(arguments,1),n=[],i=0;i>1,s=-7,l=n?a-1:0,m=n?-1:1,p=r[e+l];for(l+=m,t=p&(1<<-s)-1,p>>=-s,s+=c;s>0;t=256*t+r[e+l],l+=m,s-=8);for(o=t&(1<<-s)-1,t>>=-s,s+=i;s>0;o=256*o+r[e+l],l+=m,s-=8);if(0===t)t=1-d;else{if(t===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),t-=d}return(p?-1:1)*o*Math.pow(2,t-i)},e.write=function(r,e,n,i,a,t){var o,c,u,d=8*t-a-1,s=(1<>1,m=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:t-1,I=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=s):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+l>=1?m/u:m*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=s?(c=0,o=s):o+l>=1?(c=(e*u-1)*Math.pow(2,a),o+=l):(c=e*Math.pow(2,l-1)*Math.pow(2,a),o=0));a>=8;r[n+p]=255&c,p+=I,c/=256,a-=8);for(o=o<0;r[n+p]=255&o,p+=I,o/=256,d-=8);r[n+p-I]|=128*y}},8954:function(r,e,n){"use strict";r.exports=function(r,e){var n=r.length;if(0===n)throw new Error("Must have at least d+1 points");var a=r[0].length;if(n<=a)throw new Error("Must input at least d+1 points");var o=r.slice(0,a+1),c=i.apply(void 0,o);if(0===c)throw new Error("Input not in general position");for(var u=new Array(a+1),s=0;s<=a;++s)u[s]=s;c<0&&(u[0]=1,u[1]=0);var l=new t(u,new Array(a+1),!1),m=l.adjacent,p=new Array(a+2);for(s=0;s<=a;++s){for(var I=u.slice(),y=0;y<=a;++y)y===s&&(I[y]=-1);var f=I[0];I[0]=I[1],I[1]=f;var g=new t(I,new Array(a+1),!0);m[s]=g,p[s]=g}for(p[a+1]=l,s=0;s<=a;++s){I=m[s].vertices;var _=m[s].adjacent;for(y=0;y<=a;++y){var h=I[y];if(h<0)_[y]=l;else for(var v=0;v<=a;++v)m[v].vertices.indexOf(h)<0&&(_[y]=m[v])}}var x=new d(a,o,p),P=!!e;for(s=a+1;s0;)for(var c=(r=o.pop()).adjacent,u=0;u<=n;++u){var d=c[u];if(d.boundary&&!(d.lastVisited<=-i)){for(var s=d.vertices,l=0;l<=n;++l){var m=s[l];a[l]=m<0?e:t[m]}var p=this.orient();if(p>0)return d;d.lastVisited=-i,0===p&&o.push(d)}}return null},s.walk=function(r,e){var n=this.vertices.length-1,i=this.dimension,a=this.vertices,t=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,c=this.interior[o];r:for(;!c.boundary;){for(var u=c.vertices,d=c.adjacent,s=0;s<=i;++s)t[s]=a[u[s]];for(c.lastVisited=n,s=0;s<=i;++s){var l=d[s];if(!(l.lastVisited>=n)){var m=t[s];t[s]=r;var p=this.orient();if(t[s]=m,p<0){c=l;continue r}l.boundary?l.lastVisited=-n:l.lastVisited=n}}return}return c},s.addPeaks=function(r,e){var n=this.vertices.length-1,i=this.dimension,a=this.vertices,u=this.tuple,d=this.interior,s=this.simplices,l=[e];e.lastVisited=n,e.vertices[e.vertices.indexOf(-1)]=n,e.boundary=!1,d.push(e);for(var m=[];l.length>0;){var p=(e=l.pop()).vertices,I=e.adjacent,y=p.indexOf(n);if(!(y<0))for(var f=0;f<=i;++f)if(f!==y){var g=I[f];if(g.boundary&&!(g.lastVisited>=n)){var _=g.vertices;if(g.lastVisited!==-n){for(var h=0,v=0;v<=i;++v)_[v]<0?(h=v,u[v]=r):u[v]=a[_[v]];if(this.orient()>0){_[h]=n,g.boundary=!1,d.push(g),l.push(g),g.lastVisited=n;continue}g.lastVisited=-n}var x=g.adjacent,P=p.slice(),G=I.slice(),C=new t(P,G,!0);s.push(C);var S=x.indexOf(e);if(!(S<0))for(x[S]=C,G[y]=g,P[f]=-1,G[f]=e,I[f]=C,C.flip(),v=0;v<=i;++v){var A=P[v];if(!(A<0||A===n)){for(var b=new Array(i-1),M=0,B=0;B<=i;++B){var k=P[B];k<0||B===v||(b[M++]=k)}m.push(new o(b,C,v))}}}}}for(m.sort(c),f=0;f+1=0?o[u++]=c[s]:d=1&s;if(d===(1&r)){var l=o[0];o[0]=o[1],o[1]=l}e.push(o)}}return e}},3352:function(r,e,n){"use strict";var i=n(2478);function a(r,e,n,i,a){this.mid=r,this.left=e,this.right=n,this.leftPoints=i,this.rightPoints=a,this.count=(e?e.count:0)+(n?n.count:0)+i.length}r.exports=function(r){return r&&0!==r.length?new g(f(r)):new g(null)};var t=a.prototype;function o(r,e){r.mid=e.mid,r.left=e.left,r.right=e.right,r.leftPoints=e.leftPoints,r.rightPoints=e.rightPoints,r.count=e.count}function c(r,e){var n=f(e);r.mid=n.mid,r.left=n.left,r.right=n.right,r.leftPoints=n.leftPoints,r.rightPoints=n.rightPoints,r.count=n.count}function u(r,e){var n=r.intervals([]);n.push(e),c(r,n)}function d(r,e){var n=r.intervals([]),i=n.indexOf(e);return i<0?0:(n.splice(i,1),c(r,n),1)}function s(r,e,n){for(var i=0;i=0&&r[i][1]>=e;--i){var a=n(r[i]);if(a)return a}}function m(r,e){for(var n=0;n>1],t=[],o=[],c=[];for(n=0;n3*(e+1)?u(this,r):this.left.insert(r):this.left=f([r]);else if(r[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?u(this,r):this.right.insert(r):this.right=f([r]);else{var n=i.ge(this.leftPoints,r,I),a=i.ge(this.rightPoints,r,y);this.leftPoints.splice(n,0,r),this.rightPoints.splice(a,0,r)}},t.remove=function(r){var e=this.count-this.leftPoints;if(r[1]3*(e-1)?d(this,r):2===(c=this.left.remove(r))?(this.left=null,this.count-=1,1):(1===c&&(this.count-=1),c):0;if(r[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?d(this,r):2===(c=this.right.remove(r))?(this.right=null,this.count-=1,1):(1===c&&(this.count-=1),c):0;if(1===this.count)return this.leftPoints[0]===r?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===r){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var t=this.left,c=this.right;n.count-=a.count,n.right=a.left,a.left=t,a.right=c}o(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(t=i.ge(this.leftPoints,r,I);tthis.mid?this.right&&(n=this.right.queryPoint(r,e))?n:l(this.rightPoints,r,e):m(this.leftPoints,e);var n},t.queryInterval=function(r,e,n){var i;return rthis.mid&&this.right&&(i=this.right.queryInterval(r,e,n))?i:ethis.mid?l(this.rightPoints,r,n):m(this.leftPoints,n)};var _=g.prototype;_.insert=function(r){this.root?this.root.insert(r):this.root=new a(r[0],null,null,[r],[r])},_.remove=function(r){if(this.root){var e=this.root.remove(r);return 2===e&&(this.root=null),0!==e}return!1},_.queryPoint=function(r,e){if(this.root)return this.root.queryPoint(r,e)},_.queryInterval=function(r,e,n){if(r<=e&&this.root)return this.root.queryInterval(r,e,n)},Object.defineProperty(_,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(_,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},7762:function(r){"use strict";r.exports=function(r){for(var e=new Array(r),n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},395:function(r){r.exports=function(r,e,n){return r*(1-n)+e*n}},2652:function(r,e,n){var i=n(4335),a=n(6864),t=n(1903),o=n(9921),c=n(7608),u=n(5665),d={length:n(1387),normalize:n(3536),dot:n(244),cross:n(5911)},s=a(),l=a(),m=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],I=[0,0,0];function y(r,e,n,i,a){r[0]=e[0]*i+n[0]*a,r[1]=e[1]*i+n[1]*a,r[2]=e[2]*i+n[2]*a}r.exports=function(r,e,n,a,f,g){if(e||(e=[0,0,0]),n||(n=[0,0,0]),a||(a=[0,0,0]),f||(f=[0,0,0,1]),g||(g=[0,0,0,1]),!i(s,r))return!1;if(t(l,s),l[3]=0,l[7]=0,l[11]=0,l[15]=1,Math.abs(o(l)<1e-8))return!1;var _,h,v=s[3],x=s[7],P=s[11],G=s[12],C=s[13],S=s[14],A=s[15];if(0!==v||0!==x||0!==P){if(m[0]=v,m[1]=x,m[2]=P,m[3]=A,!c(l,l))return!1;u(l,l),function(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3];r[0]=n[0]*i+n[4]*a+n[8]*t+n[12]*o,r[1]=n[1]*i+n[5]*a+n[9]*t+n[13]*o,r[2]=n[2]*i+n[6]*a+n[10]*t+n[14]*o,r[3]=n[3]*i+n[7]*a+n[11]*t+n[15]*o}(f,m,l)}else f[0]=f[1]=f[2]=0,f[3]=1;if(e[0]=G,e[1]=C,e[2]=S,h=s,(_=p)[0][0]=h[0],_[0][1]=h[1],_[0][2]=h[2],_[1][0]=h[4],_[1][1]=h[5],_[1][2]=h[6],_[2][0]=h[8],_[2][1]=h[9],_[2][2]=h[10],n[0]=d.length(p[0]),d.normalize(p[0],p[0]),a[0]=d.dot(p[0],p[1]),y(p[1],p[1],p[0],1,-a[0]),n[1]=d.length(p[1]),d.normalize(p[1],p[1]),a[0]/=n[1],a[1]=d.dot(p[0],p[2]),y(p[2],p[2],p[0],1,-a[1]),a[2]=d.dot(p[1],p[2]),y(p[2],p[2],p[1],1,-a[2]),n[2]=d.length(p[2]),d.normalize(p[2],p[2]),a[1]/=n[2],a[2]/=n[2],d.cross(I,p[1],p[2]),d.dot(p[0],I)<0)for(var b=0;b<3;b++)n[b]*=-1,p[b][0]*=-1,p[b][1]*=-1,p[b][2]*=-1;return g[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),g[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),g[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),g[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(g[0]=-g[0]),p[0][2]>p[2][0]&&(g[1]=-g[1]),p[1][0]>p[0][1]&&(g[2]=-g[2]),!0}},4335:function(r){r.exports=function(r,e){var n=e[15];if(0===n)return!1;for(var i=1/n,a=0;a<16;a++)r[a]=e[a]*i;return!0}},7442:function(r,e,n){var i=n(6658),a=n(7182),t=n(2652),o=n(9921),c=n(8648),u=l(),d=l(),s=l();function l(){return{translate:m(),scale:m(1),skew:m(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function m(r){return[r||0,r||0,r||0]}r.exports=function(r,e,n,l){if(0===o(e)||0===o(n))return!1;var m=t(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),p=t(n,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!(!m||!p)&&(i(s.translate,u.translate,d.translate,l),i(s.skew,u.skew,d.skew,l),i(s.scale,u.scale,d.scale,l),i(s.perspective,u.perspective,d.perspective,l),c(s.quaternion,u.quaternion,d.quaternion,l),a(r,s.translate,s.scale,s.skew,s.perspective,s.quaternion),!0)}},7182:function(r,e,n){var i={identity:n(7894),translate:n(7656),multiply:n(6760),create:n(6864),scale:n(2504),fromRotationTranslation:n(6743)},a=(i.create(),i.create());r.exports=function(r,e,n,t,o,c){return i.identity(r),i.fromRotationTranslation(r,c,e),r[3]=o[0],r[7]=o[1],r[11]=o[2],r[15]=o[3],i.identity(a),0!==t[2]&&(a[9]=t[2],i.multiply(r,r,a)),0!==t[1]&&(a[9]=0,a[8]=t[1],i.multiply(r,r,a)),0!==t[0]&&(a[8]=0,a[4]=t[0],i.multiply(r,r,a)),i.scale(r,r,n),r}},4192:function(r,e,n){"use strict";var i=n(2478),a=n(7442),t=n(7608),o=n(5567),c=n(2408),u=n(7089),d=n(6582),s=n(7656),l=(n(2504),n(3536)),m=[0,0,0];function p(r){this._components=r.slice(),this._time=[0],this.prevMatrix=r.slice(),this.nextMatrix=r.slice(),this.computedMatrix=r.slice(),this.computedInverse=r.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]}r.exports=function(r){return new p((r=r||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var I=p.prototype;I.recalcMatrix=function(r){var e=this._time,n=i.le(e,r),o=this.computedMatrix;if(!(n<0)){var c=this._components;if(n===e.length-1)for(var u=16*n,d=0;d<16;++d)o[d]=c[u++];else{var s=e[n+1]-e[n],m=(u=16*n,this.prevMatrix),p=!0;for(d=0;d<16;++d)m[d]=c[u++];var I=this.nextMatrix;for(d=0;d<16;++d)I[d]=c[u++],p=p&&m[d]===I[d];if(s<1e-6||p)for(d=0;d<16;++d)o[d]=m[d];else a(o,m,I,(r-e[n])/s)}var y=this.computedUp;y[0]=o[1],y[1]=o[5],y[2]=o[9],l(y,y);var f=this.computedInverse;t(f,o);var g=this.computedEye,_=f[15];g[0]=f[12]/_,g[1]=f[13]/_,g[2]=f[14]/_;var h=this.computedCenter,v=Math.exp(this.computedRadius[0]);for(d=0;d<3;++d)h[d]=g[d]-o[2+4*d]*v}},I.idle=function(r){if(!(r1&&i(r[o[s-2]],r[o[s-1]],d)<=0;)s-=1,o.pop();for(o.push(u),s=c.length;s>1&&i(r[c[s-2]],r[c[s-1]],d)>=0;)s-=1,c.pop();c.push(u)}n=new Array(c.length+o.length-2);for(var l=0,m=(a=0,o.length);a0;--p)n[l++]=c[p];return n};var i=n(3250)[3]},351:function(r,e,n){"use strict";r.exports=function(r,e){e||(e=r,r=window);var n=0,a=0,t=0,o={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function u(r){var e=!1;return"altKey"in r&&(e=e||r.altKey!==o.alt,o.alt=!!r.altKey),"shiftKey"in r&&(e=e||r.shiftKey!==o.shift,o.shift=!!r.shiftKey),"ctrlKey"in r&&(e=e||r.ctrlKey!==o.control,o.control=!!r.ctrlKey),"metaKey"in r&&(e=e||r.metaKey!==o.meta,o.meta=!!r.metaKey),e}function d(r,c){var d=i.x(c),s=i.y(c);"buttons"in c&&(r=0|c.buttons),(r!==n||d!==a||s!==t||u(c))&&(n=0|r,a=d||0,t=s||0,e&&e(n,a,t,o))}function s(r){d(0,r)}function l(){(n||a||t||o.shift||o.alt||o.meta||o.control)&&(a=t=0,n=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function m(r){u(r)&&e&&e(n,a,t,o)}function p(r){0===i.buttons(r)?d(0,r):d(n,r)}function I(r){d(n|i.buttons(r),r)}function y(r){d(n&~i.buttons(r),r)}function f(){c||(c=!0,r.addEventListener("mousemove",p),r.addEventListener("mousedown",I),r.addEventListener("mouseup",y),r.addEventListener("mouseleave",s),r.addEventListener("mouseenter",s),r.addEventListener("mouseout",s),r.addEventListener("mouseover",s),r.addEventListener("blur",l),r.addEventListener("keyup",m),r.addEventListener("keydown",m),r.addEventListener("keypress",m),r!==window&&(window.addEventListener("blur",l),window.addEventListener("keyup",m),window.addEventListener("keydown",m),window.addEventListener("keypress",m)))}f();var g={element:r};return Object.defineProperties(g,{enabled:{get:function(){return c},set:function(e){e?f():c&&(c=!1,r.removeEventListener("mousemove",p),r.removeEventListener("mousedown",I),r.removeEventListener("mouseup",y),r.removeEventListener("mouseleave",s),r.removeEventListener("mouseenter",s),r.removeEventListener("mouseout",s),r.removeEventListener("mouseover",s),r.removeEventListener("blur",l),r.removeEventListener("keyup",m),r.removeEventListener("keydown",m),r.removeEventListener("keypress",m),r!==window&&(window.removeEventListener("blur",l),window.removeEventListener("keyup",m),window.removeEventListener("keydown",m),window.removeEventListener("keypress",m)))},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return t},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),g};var i=n(4687)},24:function(r){var e={left:0,top:0};r.exports=function(r,n,i){n=n||r.currentTarget||r.srcElement,Array.isArray(i)||(i=[0,0]);var a,t=r.clientX||0,o=r.clientY||0,c=(a=n)===window||a===document||a===document.body?e:a.getBoundingClientRect();return i[0]=t-c.left,i[1]=o-c.top,i}},4687:function(r,e){"use strict";function n(r){return r.target||r.srcElement||window}e.buttons=function(r){if("object"===typeof r){if("buttons"in r)return r.buttons;if("which"in r){if(2===(e=r.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0"),"function"!==typeof r.vertex&&e("Must specify vertex creation function"),"function"!==typeof r.cell&&e("Must specify cell creation function"),"function"!==typeof r.phase&&e("Must specify phase function");for(var c=r.getters||[],u=new Array(t),d=0;d=0?u[d]=!0:u[d]=!1;return function(r,e,n,t,o,c){var u=[c,o].join(",");return(0,a[u])(r,e,n,i.mallocUint32,i.freeUint32)}(r.vertex,r.cell,r.phase,0,n,u)};var a={"false,0,1":function(r,e,n,i,a){return function(t,o,c,u){var d,s=0|t.shape[0],l=0|t.shape[1],m=t.data,p=0|t.offset,I=0|t.stride[0],y=0|t.stride[1],f=p,g=0|-I,_=0,h=0|-y,v=0,x=-I-y|0,P=0,G=0|I,C=y-I*s|0,S=0,A=0,b=0,M=2*s|0,B=i(M),k=i(M),F=0,z=0,w=-1,R=-1,E=0,N=0|-s,T=0|s,D=0,J=-s-1|0,U=s-1|0,H=0,L=0,O=0;for(S=0;S0){if(A=1,B[F++]=n(m[f],o,c,u),f+=G,s>0)for(S=1,d=m[f],z=B[F]=n(d,o,c,u),E=B[F+w],D=B[F+N],H=B[F+J],z===E&&z===D&&z===H||(_=m[f+g],v=m[f+h],P=m[f+x],r(S,A,d,_,v,P,z,E,D,H,o,c,u),L=k[F]=b++),F+=1,f+=G,S=2;S0)for(S=1,d=m[f],z=B[F]=n(d,o,c,u),E=B[F+w],D=B[F+N],H=B[F+J],z===E&&z===D&&z===H||(_=m[f+g],v=m[f+h],P=m[f+x],r(S,A,d,_,v,P,z,E,D,H,o,c,u),L=k[F]=b++,H!==D&&e(k[F+N],L,v,P,D,H,o,c,u)),F+=1,f+=G,S=2;S0){if(S=1,B[F++]=n(m[f],o,c,u),f+=G,l>0)for(A=1,d=m[f],z=B[F]=n(d,o,c,u),D=B[F+N],E=B[F+w],H=B[F+J],z===D&&z===E&&z===H||(_=m[f+g],v=m[f+h],P=m[f+x],r(S,A,d,_,v,P,z,D,E,H,o,c,u),L=k[F]=b++),F+=1,f+=G,A=2;A0)for(A=1,d=m[f],z=B[F]=n(d,o,c,u),D=B[F+N],E=B[F+w],H=B[F+J],z===D&&z===E&&z===H||(_=m[f+g],v=m[f+h],P=m[f+x],r(S,A,d,_,v,P,z,D,E,H,o,c,u),L=k[F]=b++,H!==D&&e(k[F+N],L,P,_,H,D,o,c,u)),F+=1,f+=G,A=2;A2&&t[1]>2&&i(a.pick(-1,-1).lo(1,1).hi(t[0]-2,t[1]-2),r.pick(-1,-1,0).lo(1,1).hi(t[0]-2,t[1]-2),r.pick(-1,-1,1).lo(1,1).hi(t[0]-2,t[1]-2)),t[1]>2&&(n(a.pick(0,-1).lo(1).hi(t[1]-2),r.pick(0,-1,1).lo(1).hi(t[1]-2)),e(r.pick(0,-1,0).lo(1).hi(t[1]-2))),t[1]>2&&(n(a.pick(t[0]-1,-1).lo(1).hi(t[1]-2),r.pick(t[0]-1,-1,1).lo(1).hi(t[1]-2)),e(r.pick(t[0]-1,-1,0).lo(1).hi(t[1]-2))),t[0]>2&&(n(a.pick(-1,0).lo(1).hi(t[0]-2),r.pick(-1,0,0).lo(1).hi(t[0]-2)),e(r.pick(-1,0,1).lo(1).hi(t[0]-2))),t[0]>2&&(n(a.pick(-1,t[1]-1).lo(1).hi(t[0]-2),r.pick(-1,t[1]-1,0).lo(1).hi(t[0]-2)),e(r.pick(-1,t[1]-1,1).lo(1).hi(t[0]-2))),r.set(0,0,0,0),r.set(0,0,1,0),r.set(t[0]-1,0,0,0),r.set(t[0]-1,0,1,0),r.set(0,t[1]-1,0,0),r.set(0,t[1]-1,1,0),r.set(t[0]-1,t[1]-1,0,0),r.set(t[0]-1,t[1]-1,1,0),r}}r.exports=function(r,e,n){return Array.isArray(n)||(n=i(e.dimension,"string"===typeof n?n:"clamp")),0===e.size?r:0===e.dimension?(r.set(0),r):function(r){var e=r.join();if(t=s[e])return t;for(var n=r.length,i=[l,m],a=1;a<=n;++a)i.push(p(a));var t=I.apply(void 0,i);return s[e]=t,t}(n)(r,e)}},4317:function(r){"use strict";function e(r,e){var n=Math.floor(e),i=e-n,a=0<=n&&n0;){h<64?(u=h,h=0):(u=64,h-=64);for(var v=0|r[1];v>0;){v<64?(d=v,v=0):(d=64,v-=64),i=g+h*l+v*m,o=_+h*I+v*y;var x=0,P=0,G=0,C=p,S=l-s*p,A=m-u*l,b=f,M=I-s*f,B=y-u*I;for(G=0;G0;){y<64?(u=y,y=0):(u=64,y-=64);for(var f=0|r[0];f>0;){f<64?(c=f,f=0):(c=64,f-=64),i=p+y*s+f*d,o=I+y*m+f*l;var g=0,_=0,h=s,v=d-u*s,x=m,P=l-u*m;for(_=0;_0;){_<64?(d=_,_=0):(d=64,_-=64);for(var h=0|r[0];h>0;){h<64?(c=h,h=0):(c=64,h-=64);for(var v=0|r[1];v>0;){v<64?(u=v,v=0):(u=64,v-=64),i=f+_*m+h*s+v*l,o=g+_*y+h*p+v*I;var x=0,P=0,G=0,C=m,S=s-d*m,A=l-c*s,b=y,M=p-d*y,B=I-c*p;for(G=0;Gn;){g=0,_=y-o;e:for(f=0;fv)break e;_+=l,g+=m}for(g=y,_=y-o,f=0;f>1,K=O-U,V=O+U,j=H,W=K,Z=O,q=V,Y=L,X=a+1,Q=t-1,$=!0,rr=0,er=0,nr=0,ir=l,ar=e(ir),tr=e(ir);S=u*j,A=u*W,J=c;r:for(C=0;C0){f=j,j=W,W=f;break r}if(nr<0)break r;J+=p}S=u*q,A=u*Y,J=c;r:for(C=0;C0){f=q,q=Y,Y=f;break r}if(nr<0)break r;J+=p}S=u*j,A=u*Z,J=c;r:for(C=0;C0){f=j,j=Z,Z=f;break r}if(nr<0)break r;J+=p}S=u*W,A=u*Z,J=c;r:for(C=0;C0){f=W,W=Z,Z=f;break r}if(nr<0)break r;J+=p}S=u*j,A=u*q,J=c;r:for(C=0;C0){f=j,j=q,q=f;break r}if(nr<0)break r;J+=p}S=u*Z,A=u*q,J=c;r:for(C=0;C0){f=Z,Z=q,q=f;break r}if(nr<0)break r;J+=p}S=u*W,A=u*Y,J=c;r:for(C=0;C0){f=W,W=Y,Y=f;break r}if(nr<0)break r;J+=p}S=u*W,A=u*Z,J=c;r:for(C=0;C0){f=W,W=Z,Z=f;break r}if(nr<0)break r;J+=p}S=u*q,A=u*Y,J=c;r:for(C=0;C0){f=q,q=Y,Y=f;break r}if(nr<0)break r;J+=p}for(S=u*j,A=u*W,b=u*Z,M=u*q,B=u*Y,k=u*H,F=u*O,z=u*L,D=0,J=c,C=0;C0)){if(nr<0){for(S=u*v,A=u*X,b=u*Q,J=c,C=0;C0)for(;;){for(x=c+Q*u,D=0,C=0;C0)){for(x=c+Q*u,D=0,C=0;CL){r:for(;;){for(x=c+X*u,D=0,J=c,C=0;C1&&i?c(n,i[0],i[1]):c(n)}(r,e,u);return i(u,d)}},446:function(r,e,n){"use strict";var i=n(7640),a={};r.exports=function(r){var e=r.order,n=r.dtype,t=[e,n].join(":"),o=a[t];return o||(a[t]=o=i(e,n)),o(r),r}},9618:function(r,e,n){var i=n(7163),a="undefined"!==typeof Float64Array;function t(r,e){return r[0]-e[0]}function o(){var r,e=this.stride,n=new Array(e.length);for(r=0;r=0&&(e+=t*(n=0|r),a-=n),new i(this.data,a,t,e)},a.step=function(r){var e=this.shape[0],n=this.stride[0],a=this.offset,t=0,o=Math.ceil;return"number"===typeof r&&((t=0|r)<0?(a+=n*(e-1),e=o(-e/t)):e=o(e/t),n*=t),new i(this.data,e,n,a)},a.transpose=function(r){r=void 0===r?0:0|r;var e=this.shape,n=this.stride;return new i(this.data,e[r],n[r],this.offset)},a.pick=function(r){var n=[],i=[],a=this.offset;return"number"===typeof r&&r>=0?a=a+this.stride[0]*r|0:(n.push(this.shape[0]),i.push(this.stride[0])),(0,e[n.length+1])(this.data,n,i,a)},function(r,e,n,a){return new i(r,e[0],n[0],a)}},2:function(r,e,n){function i(r,e,n,i,a,t){this.data=r,this.shape=[e,n],this.stride=[i,a],this.offset=0|t}var a=i.prototype;return a.dtype=r,a.dimension=2,Object.defineProperty(a,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(a,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),a.set=function(e,n,i){return"generic"===r?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*n]=i},a.get=function(e,n){return"generic"===r?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*n]},a.index=function(r,e){return this.offset+this.stride[0]*r+this.stride[1]*e},a.hi=function(r,e){return new i(this.data,"number"!==typeof r||r<0?this.shape[0]:0|r,"number"!==typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},a.lo=function(r,e){var n=this.offset,a=0,t=this.shape[0],o=this.shape[1],c=this.stride[0],u=this.stride[1];return"number"===typeof r&&r>=0&&(n+=c*(a=0|r),t-=a),"number"===typeof e&&e>=0&&(n+=u*(a=0|e),o-=a),new i(this.data,t,o,c,u,n)},a.step=function(r,e){var n=this.shape[0],a=this.shape[1],t=this.stride[0],o=this.stride[1],c=this.offset,u=0,d=Math.ceil;return"number"===typeof r&&((u=0|r)<0?(c+=t*(n-1),n=d(-n/u)):n=d(n/u),t*=u),"number"===typeof e&&((u=0|e)<0?(c+=o*(a-1),a=d(-a/u)):a=d(a/u),o*=u),new i(this.data,n,a,t,o,c)},a.transpose=function(r,e){r=void 0===r?0:0|r,e=void 0===e?1:0|e;var n=this.shape,a=this.stride;return new i(this.data,n[r],n[e],a[r],a[e],this.offset)},a.pick=function(r,n){var i=[],a=[],t=this.offset;return"number"===typeof r&&r>=0?t=t+this.stride[0]*r|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"===typeof n&&n>=0?t=t+this.stride[1]*n|0:(i.push(this.shape[1]),a.push(this.stride[1])),(0,e[i.length+1])(this.data,i,a,t)},function(r,e,n,a){return new i(r,e[0],e[1],n[0],n[1],a)}},3:function(r,e,n){function i(r,e,n,i,a,t,o,c){this.data=r,this.shape=[e,n,i],this.stride=[a,t,o],this.offset=0|c}var a=i.prototype;return a.dtype=r,a.dimension=3,Object.defineProperty(a,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(a,"order",{get:function(){var r=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),n=Math.abs(this.stride[2]);return r>e?e>n?[2,1,0]:r>n?[1,2,0]:[1,0,2]:r>n?[2,0,1]:n>e?[0,1,2]:[0,2,1]}}),a.set=function(e,n,i,a){return"generic"===r?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i]=a},a.get=function(e,n,i){return"generic"===r?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i]},a.index=function(r,e,n){return this.offset+this.stride[0]*r+this.stride[1]*e+this.stride[2]*n},a.hi=function(r,e,n){return new i(this.data,"number"!==typeof r||r<0?this.shape[0]:0|r,"number"!==typeof e||e<0?this.shape[1]:0|e,"number"!==typeof n||n<0?this.shape[2]:0|n,this.stride[0],this.stride[1],this.stride[2],this.offset)},a.lo=function(r,e,n){var a=this.offset,t=0,o=this.shape[0],c=this.shape[1],u=this.shape[2],d=this.stride[0],s=this.stride[1],l=this.stride[2];return"number"===typeof r&&r>=0&&(a+=d*(t=0|r),o-=t),"number"===typeof e&&e>=0&&(a+=s*(t=0|e),c-=t),"number"===typeof n&&n>=0&&(a+=l*(t=0|n),u-=t),new i(this.data,o,c,u,d,s,l,a)},a.step=function(r,e,n){var a=this.shape[0],t=this.shape[1],o=this.shape[2],c=this.stride[0],u=this.stride[1],d=this.stride[2],s=this.offset,l=0,m=Math.ceil;return"number"===typeof r&&((l=0|r)<0?(s+=c*(a-1),a=m(-a/l)):a=m(a/l),c*=l),"number"===typeof e&&((l=0|e)<0?(s+=u*(t-1),t=m(-t/l)):t=m(t/l),u*=l),"number"===typeof n&&((l=0|n)<0?(s+=d*(o-1),o=m(-o/l)):o=m(o/l),d*=l),new i(this.data,a,t,o,c,u,d,s)},a.transpose=function(r,e,n){r=void 0===r?0:0|r,e=void 0===e?1:0|e,n=void 0===n?2:0|n;var a=this.shape,t=this.stride;return new i(this.data,a[r],a[e],a[n],t[r],t[e],t[n],this.offset)},a.pick=function(r,n,i){var a=[],t=[],o=this.offset;return"number"===typeof r&&r>=0?o=o+this.stride[0]*r|0:(a.push(this.shape[0]),t.push(this.stride[0])),"number"===typeof n&&n>=0?o=o+this.stride[1]*n|0:(a.push(this.shape[1]),t.push(this.stride[1])),"number"===typeof i&&i>=0?o=o+this.stride[2]*i|0:(a.push(this.shape[2]),t.push(this.stride[2])),(0,e[a.length+1])(this.data,a,t,o)},function(r,e,n,a){return new i(r,e[0],e[1],e[2],n[0],n[1],n[2],a)}},4:function(r,e,n){function i(r,e,n,i,a,t,o,c,u,d){this.data=r,this.shape=[e,n,i,a],this.stride=[t,o,c,u],this.offset=0|d}var a=i.prototype;return a.dtype=r,a.dimension=4,Object.defineProperty(a,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(a,"order",{get:n}),a.set=function(e,n,i,a,t){return"generic"===r?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a,t):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a]=t},a.get=function(e,n,i,a){return"generic"===r?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a]},a.index=function(r,e,n,i){return this.offset+this.stride[0]*r+this.stride[1]*e+this.stride[2]*n+this.stride[3]*i},a.hi=function(r,e,n,a){return new i(this.data,"number"!==typeof r||r<0?this.shape[0]:0|r,"number"!==typeof e||e<0?this.shape[1]:0|e,"number"!==typeof n||n<0?this.shape[2]:0|n,"number"!==typeof a||a<0?this.shape[3]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},a.lo=function(r,e,n,a){var t=this.offset,o=0,c=this.shape[0],u=this.shape[1],d=this.shape[2],s=this.shape[3],l=this.stride[0],m=this.stride[1],p=this.stride[2],I=this.stride[3];return"number"===typeof r&&r>=0&&(t+=l*(o=0|r),c-=o),"number"===typeof e&&e>=0&&(t+=m*(o=0|e),u-=o),"number"===typeof n&&n>=0&&(t+=p*(o=0|n),d-=o),"number"===typeof a&&a>=0&&(t+=I*(o=0|a),s-=o),new i(this.data,c,u,d,s,l,m,p,I,t)},a.step=function(r,e,n,a){var t=this.shape[0],o=this.shape[1],c=this.shape[2],u=this.shape[3],d=this.stride[0],s=this.stride[1],l=this.stride[2],m=this.stride[3],p=this.offset,I=0,y=Math.ceil;return"number"===typeof r&&((I=0|r)<0?(p+=d*(t-1),t=y(-t/I)):t=y(t/I),d*=I),"number"===typeof e&&((I=0|e)<0?(p+=s*(o-1),o=y(-o/I)):o=y(o/I),s*=I),"number"===typeof n&&((I=0|n)<0?(p+=l*(c-1),c=y(-c/I)):c=y(c/I),l*=I),"number"===typeof a&&((I=0|a)<0?(p+=m*(u-1),u=y(-u/I)):u=y(u/I),m*=I),new i(this.data,t,o,c,u,d,s,l,m,p)},a.transpose=function(r,e,n,a){r=void 0===r?0:0|r,e=void 0===e?1:0|e,n=void 0===n?2:0|n,a=void 0===a?3:0|a;var t=this.shape,o=this.stride;return new i(this.data,t[r],t[e],t[n],t[a],o[r],o[e],o[n],o[a],this.offset)},a.pick=function(r,n,i,a){var t=[],o=[],c=this.offset;return"number"===typeof r&&r>=0?c=c+this.stride[0]*r|0:(t.push(this.shape[0]),o.push(this.stride[0])),"number"===typeof n&&n>=0?c=c+this.stride[1]*n|0:(t.push(this.shape[1]),o.push(this.stride[1])),"number"===typeof i&&i>=0?c=c+this.stride[2]*i|0:(t.push(this.shape[2]),o.push(this.stride[2])),"number"===typeof a&&a>=0?c=c+this.stride[3]*a|0:(t.push(this.shape[3]),o.push(this.stride[3])),(0,e[t.length+1])(this.data,t,o,c)},function(r,e,n,a){return new i(r,e[0],e[1],e[2],e[3],n[0],n[1],n[2],n[3],a)}},5:function(r,e,n){function i(r,e,n,i,a,t,o,c,u,d,s,l){this.data=r,this.shape=[e,n,i,a,t],this.stride=[o,c,u,d,s],this.offset=0|l}var a=i.prototype;return a.dtype=r,a.dimension=5,Object.defineProperty(a,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(a,"order",{get:n}),a.set=function(e,n,i,a,t,o){return"generic"===r?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a+this.stride[4]*t,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a+this.stride[4]*t]=o},a.get=function(e,n,i,a,t){return"generic"===r?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a+this.stride[4]*t):this.data[this.offset+this.stride[0]*e+this.stride[1]*n+this.stride[2]*i+this.stride[3]*a+this.stride[4]*t]},a.index=function(r,e,n,i,a){return this.offset+this.stride[0]*r+this.stride[1]*e+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a},a.hi=function(r,e,n,a,t){return new i(this.data,"number"!==typeof r||r<0?this.shape[0]:0|r,"number"!==typeof e||e<0?this.shape[1]:0|e,"number"!==typeof n||n<0?this.shape[2]:0|n,"number"!==typeof a||a<0?this.shape[3]:0|a,"number"!==typeof t||t<0?this.shape[4]:0|t,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},a.lo=function(r,e,n,a,t){var o=this.offset,c=0,u=this.shape[0],d=this.shape[1],s=this.shape[2],l=this.shape[3],m=this.shape[4],p=this.stride[0],I=this.stride[1],y=this.stride[2],f=this.stride[3],g=this.stride[4];return"number"===typeof r&&r>=0&&(o+=p*(c=0|r),u-=c),"number"===typeof e&&e>=0&&(o+=I*(c=0|e),d-=c),"number"===typeof n&&n>=0&&(o+=y*(c=0|n),s-=c),"number"===typeof a&&a>=0&&(o+=f*(c=0|a),l-=c),"number"===typeof t&&t>=0&&(o+=g*(c=0|t),m-=c),new i(this.data,u,d,s,l,m,p,I,y,f,g,o)},a.step=function(r,e,n,a,t){var o=this.shape[0],c=this.shape[1],u=this.shape[2],d=this.shape[3],s=this.shape[4],l=this.stride[0],m=this.stride[1],p=this.stride[2],I=this.stride[3],y=this.stride[4],f=this.offset,g=0,_=Math.ceil;return"number"===typeof r&&((g=0|r)<0?(f+=l*(o-1),o=_(-o/g)):o=_(o/g),l*=g),"number"===typeof e&&((g=0|e)<0?(f+=m*(c-1),c=_(-c/g)):c=_(c/g),m*=g),"number"===typeof n&&((g=0|n)<0?(f+=p*(u-1),u=_(-u/g)):u=_(u/g),p*=g),"number"===typeof a&&((g=0|a)<0?(f+=I*(d-1),d=_(-d/g)):d=_(d/g),I*=g),"number"===typeof t&&((g=0|t)<0?(f+=y*(s-1),s=_(-s/g)):s=_(s/g),y*=g),new i(this.data,o,c,u,d,s,l,m,p,I,y,f)},a.transpose=function(r,e,n,a,t){r=void 0===r?0:0|r,e=void 0===e?1:0|e,n=void 0===n?2:0|n,a=void 0===a?3:0|a,t=void 0===t?4:0|t;var o=this.shape,c=this.stride;return new i(this.data,o[r],o[e],o[n],o[a],o[t],c[r],c[e],c[n],c[a],c[t],this.offset)},a.pick=function(r,n,i,a,t){var o=[],c=[],u=this.offset;return"number"===typeof r&&r>=0?u=u+this.stride[0]*r|0:(o.push(this.shape[0]),c.push(this.stride[0])),"number"===typeof n&&n>=0?u=u+this.stride[1]*n|0:(o.push(this.shape[1]),c.push(this.stride[1])),"number"===typeof i&&i>=0?u=u+this.stride[2]*i|0:(o.push(this.shape[2]),c.push(this.stride[2])),"number"===typeof a&&a>=0?u=u+this.stride[3]*a|0:(o.push(this.shape[3]),c.push(this.stride[3])),"number"===typeof t&&t>=0?u=u+this.stride[4]*t|0:(o.push(this.shape[4]),c.push(this.stride[4])),(0,e[o.length+1])(this.data,o,c,u)},function(r,e,n,a){return new i(r,e[0],e[1],e[2],e[3],e[4],n[0],n[1],n[2],n[3],n[4],a)}}};function u(r,e){var n=-1===e?"T":String(e),i=c[n];return-1===e?i(r):0===e?i(r,d[r][0]):i(r,d[r],o)}var d={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};r.exports=function(r,e,n,t){if(void 0===r)return(0,d.array[0])([]);"number"===typeof r&&(r=[r]),void 0===e&&(e=[r.length]);var o=e.length;if(void 0===n){n=new Array(o);for(var c=o-1,s=1;c>=0;--c)n[c]=s,s*=e[c]}if(void 0===t)for(t=0,c=0;c>>0;r.exports=function(r,e){if(isNaN(r)||isNaN(e))return NaN;if(r===e)return r;if(0===r)return e<0?-a:a;var n=i.hi(r),o=i.lo(r);return e>r===r>0?o===t?(n+=1,o=0):o+=1:0===o?(o=t,n-=1):o-=1,i.pack(o,n)}},8406:function(r,e){e.vertexNormals=function(r,e,n){for(var i=e.length,a=new Array(i),t=void 0===n?1e-6:n,o=0;ot){var v=a[d],x=1/Math.sqrt(f*_);for(h=0;h<3;++h){var P=(h+1)%3,G=(h+2)%3;v[h]+=x*(g[P]*y[G]-g[G]*y[P])}}}for(o=0;ot)for(x=1/Math.sqrt(C),h=0;h<3;++h)v[h]*=x;else for(h=0;h<3;++h)v[h]=0}return a},e.faceNormals=function(r,e,n){for(var i=r.length,a=new Array(i),t=void 0===n?1e-6:n,o=0;ot?1/Math.sqrt(p):0,d=0;d<3;++d)m[d]*=p;a[o]=m}return a}},4081:function(r){"use strict";r.exports=function(r,e,n,i,a,t,o,c,u,d){var s=e+t+d;if(l>0){var l=Math.sqrt(s+1);r[0]=.5*(o-u)/l,r[1]=.5*(c-i)/l,r[2]=.5*(n-t)/l,r[3]=.5*l}else{var m=Math.max(e,t,d);l=Math.sqrt(2*m-s+1),e>=m?(r[0]=.5*l,r[1]=.5*(a+n)/l,r[2]=.5*(c+i)/l,r[3]=.5*(o-u)/l):t>=m?(r[0]=.5*(n+a)/l,r[1]=.5*l,r[2]=.5*(u+o)/l,r[3]=.5*(c-i)/l):(r[0]=.5*(i+c)/l,r[1]=.5*(o+u)/l,r[2]=.5*l,r[3]=.5*(n-a)/l)}return r}},9977:function(r,e,n){"use strict";r.exports=function(r){var e=(r=r||{}).center||[0,0,0],n=r.rotation||[0,0,0,1],i=r.radius||1;e=[].slice.call(e,0,3),s(n=[].slice.call(n,0,4),n);var a=new l(n,e,Math.log(i));return a.setDistanceLimits(r.zoomMin,r.zoomMax),("eye"in r||"up"in r)&&a.lookAt(0,r.eye,r.center,r.up),a};var i=n(9215),a=n(6582),t=n(7399),o=n(7608),c=n(4081);function u(r,e,n){return Math.sqrt(Math.pow(r,2)+Math.pow(e,2)+Math.pow(n,2))}function d(r,e,n,i){return Math.sqrt(Math.pow(r,2)+Math.pow(e,2)+Math.pow(n,2)+Math.pow(i,2))}function s(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=d(n,i,a,t);o>1e-6?(r[0]=n/o,r[1]=i/o,r[2]=a/o,r[3]=t/o):(r[0]=r[1]=r[2]=0,r[3]=1)}function l(r,e,n){this.radius=i([n]),this.center=i(e),this.rotation=i(r),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 m=l.prototype;m.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},m.recalcMatrix=function(r){this.radius.curve(r),this.center.curve(r),this.rotation.curve(r);var e=this.computedRotation;s(e,e);var n=this.computedMatrix;t(n,e);var i=this.computedCenter,a=this.computedEye,o=this.computedUp,c=Math.exp(this.computedRadius[0]);a[0]=i[0]+c*n[2],a[1]=i[1]+c*n[6],a[2]=i[2]+c*n[10],o[0]=n[1],o[1]=n[5],o[2]=n[9];for(var u=0;u<3;++u){for(var d=0,l=0;l<3;++l)d+=n[u+4*l]*a[l];n[12+u]=-d}},m.getMatrix=function(r,e){this.recalcMatrix(r);var n=this.computedMatrix;if(e){for(var i=0;i<16;++i)e[i]=n[i];return e}return n},m.idle=function(r){this.center.idle(r),this.radius.idle(r),this.rotation.idle(r)},m.flush=function(r){this.center.flush(r),this.radius.flush(r),this.rotation.flush(r)},m.pan=function(r,e,n,i){e=e||0,n=n||0,i=i||0,this.recalcMatrix(r);var a=this.computedMatrix,t=a[1],o=a[5],c=a[9],d=u(t,o,c);t/=d,o/=d,c/=d;var s=a[0],l=a[4],m=a[8],p=s*t+l*o+m*c,I=u(s-=t*p,l-=o*p,m-=c*p);s/=I,l/=I,m/=I;var y=a[2],f=a[6],g=a[10],_=y*t+f*o+g*c,h=y*s+f*l+g*m,v=u(y-=_*t+h*s,f-=_*o+h*l,g-=_*c+h*m);y/=v,f/=v,g/=v;var x=s*e+t*n,P=l*e+o*n,G=m*e+c*n;this.center.move(r,x,P,G);var C=Math.exp(this.computedRadius[0]);C=Math.max(1e-4,C+i),this.radius.set(r,Math.log(C))},m.rotate=function(r,e,n,i){this.recalcMatrix(r),e=e||0,n=n||0;var a=this.computedMatrix,t=a[0],o=a[4],c=a[8],s=a[1],l=a[5],m=a[9],p=a[2],I=a[6],y=a[10],f=e*t+n*s,g=e*o+n*l,_=e*c+n*m,h=-(I*_-y*g),v=-(y*f-p*_),x=-(p*g-I*f),P=Math.sqrt(Math.max(0,1-Math.pow(h,2)-Math.pow(v,2)-Math.pow(x,2))),G=d(h,v,x,P);G>1e-6?(h/=G,v/=G,x/=G,P/=G):(h=v=x=0,P=1);var C=this.computedRotation,S=C[0],A=C[1],b=C[2],M=C[3],B=S*P+M*h+A*x-b*v,k=A*P+M*v+b*h-S*x,F=b*P+M*x+S*v-A*h,z=M*P-S*h-A*v-b*x;if(i){h=p,v=I,x=y;var w=Math.sin(i)/u(h,v,x);h*=w,v*=w,x*=w,z=z*(P=Math.cos(e))-(B=B*P+z*h+k*x-F*v)*h-(k=k*P+z*v+F*h-B*x)*v-(F=F*P+z*x+B*v-k*h)*x}var R=d(B,k,F,z);R>1e-6?(B/=R,k/=R,F/=R,z/=R):(B=k=F=0,z=1),this.rotation.set(r,B,k,F,z)},m.lookAt=function(r,e,n,i){this.recalcMatrix(r),n=n||this.computedCenter,e=e||this.computedEye,i=i||this.computedUp;var t=this.computedMatrix;a(t,e,n,i);var o=this.computedRotation;c(o,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),s(o,o),this.rotation.set(r,o[0],o[1],o[2],o[3]);for(var u=0,d=0;d<3;++d)u+=Math.pow(n[d]-e[d],2);this.radius.set(r,.5*Math.log(Math.max(u,1e-6))),this.center.set(r,n[0],n[1],n[2])},m.translate=function(r,e,n,i){this.center.move(r,e||0,n||0,i||0)},m.setMatrix=function(r,e){var n=this.computedRotation;c(n,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),s(n,n),this.rotation.set(r,n[0],n[1],n[2],n[3]);var i=this.computedMatrix;o(i,e);var a=i[15];if(Math.abs(a)>1e-6){var t=i[12]/a,u=i[13]/a,d=i[14]/a;this.recalcMatrix(r);var l=Math.exp(this.computedRadius[0]);this.center.set(r,t-i[2]*l,u-i[6]*l,d-i[10]*l),this.radius.idle(r)}else this.center.idle(r),this.radius.idle(r)},m.setDistance=function(r,e){e>0&&this.radius.set(r,Math.log(e))},m.setDistanceLimits=function(r,e){r=r>0?Math.log(r):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,r),this.radius.bounds[0][0]=r,this.radius.bounds[1][0]=e},m.getDistanceLimits=function(r){var e=this.radius.bounds;return r?(r[0]=Math.exp(e[0][0]),r[1]=Math.exp(e[1][0]),r):[Math.exp(e[0][0]),Math.exp(e[1][0])]},m.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]}},m.fromJSON=function(r){var e=this.lastT(),n=r.center;n&&this.center.set(e,n[0],n[1],n[2]);var i=r.rotation;i&&this.rotation.set(e,i[0],i[1],i[2],i[3]);var a=r.distance;a&&a>0&&this.radius.set(e,Math.log(a)),this.setDistanceLimits(r.zoomMin,r.zoomMax)}},1371:function(r,e,n){"use strict";var i=n(3233);r.exports=function(r,e,n){return i(n="undefined"!==typeof n?n+"":" ",e)+r}},3202:function(r){r.exports=function(r,e){e||(e=[0,""]),r=String(r);var n=parseFloat(r,10);return e[0]=n,e[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},3088:function(r,e,n){"use strict";r.exports=function(r,e){for(var n=0|e.length,a=r.length,t=[new Array(n),new Array(n)],o=0;o0){o=t[s][n][0],u=s;break}c=o[1^u];for(var l=0;l<2;++l)for(var m=t[l][n],p=0;p0&&(o=I,c=y,u=l)}return a||o&&d(o,u),c}function l(r,n){var a=t[n][r][0],o=[r];d(a,n);for(var c=a[1^n];;){for(;c!==r;)o.push(c),c=s(o[o.length-2],c,!1);if(t[0][r].length+t[1][r].length===0)break;var u=o[o.length-1],l=r,m=o[1],p=s(u,l,!0);if(i(e[u],e[l],e[m],e[p])<0)break;o.push(r),c=s(u,l)}return o}function m(r,e){return e[1]===e[e.length-1]}for(o=0;o0;){t[0][o].length;var y=l(o,p);m(0,y)?I.push.apply(I,y):(I.length>0&&u.push(I),I=y)}I.length>0&&u.push(I)}return u};var i=n(3140)},5609:function(r,e,n){"use strict";r.exports=function(r,e){for(var n=i(r,e.length),a=new Array(e.length),t=new Array(e.length),o=[],c=0;c0;){a[p=o.pop()]=!1;var d=n[p];for(c=0;c0}))).length,f=new Array(y),g=new Array(y);for(p=0;p0;){var D=N.pop(),J=M[D];u(J,(function(r,e){return r-e}));var U,H=J.length,L=T[D];for(0===L&&(U=[O=I[D]]),p=0;p=0||(T[K]=1^L,N.push(K),0===L&&(E(O=I[K])||(O.reverse(),U.push(O))))}0===L&&n.push(U)}return n};var i=n(3134),a=n(3088),t=n(5085),o=n(5250),c=n(8210),u=n(1682),d=n(5609);function s(r,e){for(var n=new Array(r),i=0;i0&&e[a]===n[0]))return 1;t=r[a-1]}for(var c=1;t;){var u=t.key,d=i(n,u[0],u[1]);if(u[0][0]0))return 0;c=-1,t=t.right}else if(d>0)t=t.left;else{if(!(d<0))return 0;c=1,t=t.right}}return c}}(g.slabs,g.coordinates);return 0===t.length?_:function(r,e){return function(n){return r(n[0],n[1])?0:e(n)}}(u(t),_)};var i=n(3250)[3],a=n(4209),t=n(3352),o=n(2478);function c(){return!0}function u(r){for(var e={},n=0;n=d?(C=1,_=d+2*m+I):_=m*(C=-m/d)+I):(C=0,p>=0?(S=0,_=I):-p>=l?(S=1,_=l+2*p+I):_=p*(S=-p/l)+I);else if(S<0)S=0,m>=0?(C=0,_=I):-m>=d?(C=1,_=d+2*m+I):_=m*(C=-m/d)+I;else{var A=1/G;_=(C*=A)*(d*C+s*(S*=A)+2*m)+S*(s*C+l*S+2*p)+I}else C<0?(v=l+p)>(h=s+m)?(x=v-h)>=(P=d-2*s+l)?(C=1,S=0,_=d+2*m+I):_=(C=x/P)*(d*C+s*(S=1-C)+2*m)+S*(s*C+l*S+2*p)+I:(C=0,v<=0?(S=1,_=l+2*p+I):p>=0?(S=0,_=I):_=p*(S=-p/l)+I):S<0?(v=d+m)>(h=s+p)?(x=v-h)>=(P=d-2*s+l)?(S=1,C=0,_=l+2*p+I):_=(C=1-(S=x/P))*(d*C+s*S+2*m)+S*(s*C+l*S+2*p)+I:(S=0,v<=0?(C=1,_=d+2*m+I):m>=0?(C=0,_=I):_=m*(C=-m/d)+I):(x=l+p-s-m)<=0?(C=0,S=1,_=l+2*p+I):x>=(P=d-2*s+l)?(C=1,S=0,_=d+2*m+I):_=(C=x/P)*(d*C+s*(S=1-C)+2*m)+S*(s*C+l*S+2*p)+I;var b=1-C-S;for(u=0;u0){var d=r[n-1];if(0===i(c,d)&&t(d)!==u){n-=1;continue}}r[n++]=c}}return r.length=n,r}},3233:function(r){"use strict";var e,n="";r.exports=function(r,i){if("string"!==typeof r)throw new TypeError("expected a string");if(1===i)return r;if(2===i)return r+r;var a=r.length*i;if(e!==r||"undefined"===typeof e)e=r,n="";else if(n.length>=a)return n.substr(0,a);for(;a>n.length&&i>1;)1&i&&(n+=r),i>>=1,r+=r;return n=(n+=r).substr(0,a)}},3025:function(r,e,n){r.exports=n.g.performance&&n.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(r){"use strict";r.exports=function(r){for(var e=r.length,n=r[r.length-1],i=e,a=e-2;a>=0;--a){var t=n;(u=(c=r[a])-((n=t+c)-t))&&(r[--i]=n,n=u)}var o=0;for(a=i;a0){if(t<=0)return o;i=a+t}else{if(!(a<0))return o;if(t>=0)return o;i=-(a+t)}var c=33306690738754716e-32*i;return o>=c||o<=-c?o:l(r,e,n)},function(r,e,n,i){var a=r[0]-i[0],t=e[0]-i[0],o=n[0]-i[0],c=r[1]-i[1],u=e[1]-i[1],d=n[1]-i[1],s=r[2]-i[2],l=e[2]-i[2],p=n[2]-i[2],I=t*d,y=o*u,f=o*c,g=a*d,_=a*u,h=t*c,v=s*(I-y)+l*(f-g)+p*(_-h),x=7771561172376103e-31*((Math.abs(I)+Math.abs(y))*Math.abs(s)+(Math.abs(f)+Math.abs(g))*Math.abs(l)+(Math.abs(_)+Math.abs(h))*Math.abs(p));return v>x||-v>x?v:m(r,e,n,i)}];function I(r){var e=p[r.length];return e||(e=p[r.length]=s(r.length)),e.apply(void 0,r)}function y(r,e,n,i,a,t,o){return function(e,n,c,u,d){switch(arguments.length){case 0:case 1:return 0;case 2:return i(e,n);case 3:return a(e,n,c);case 4:return t(e,n,c,u);case 5:return o(e,n,c,u,d)}for(var s=new Array(arguments.length),l=0;l0&&o>0||t<0&&o<0)return!1;var c=i(n,r,e),u=i(a,r,e);return!(c>0&&u>0||c<0&&u<0)&&(0!==t||0!==o||0!==c||0!==u||function(r,e,n,i){for(var a=0;a<2;++a){var t=r[a],o=e[a],c=Math.min(t,o),u=Math.max(t,o),d=n[a],s=i[a],l=Math.min(d,s);if(Math.max(d,s)=i?(a=l,(u+=1)=i?(a=l,(u+=1)>1,d=e[2*u+1];if(d===t)return u;t>1,d=e[2*u+1];if(d===t)return u;t>1,d=e[2*u+1];if(d===t)return u;t0)-(r<0)},e.abs=function(r){var e=r>>31;return(r^e)-e},e.min=function(r,e){return e^(r^e)&-(r65535)<<4,e|=n=((r>>>=e)>255)<<3,e|=n=((r>>>=n)>15)<<2,(e|=n=((r>>>=n)>3)<<1)|(r>>>=n)>>1},e.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},e.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},e.countTrailingZeros=n,e.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,1+(r|=r>>>16)},e.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},e.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);!function(r){for(var e=0;e<256;++e){var n=e,i=e,a=7;for(n>>>=1;n;n>>>=1)i<<=1,i|=1&n,--a;r[e]=i<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},e.interleave2=function(r,e){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(r,e){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>e&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},e.interleave3=function(r,e,n){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(r,e){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>e&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},e.nextCombination=function(r){var e=r|r-1;return e+1|(~e&-~e)-1>>>n(r)+1}},2014:function(r,e,n){"use strict";var i=n(3105),a=n(4623);function t(r,e){var n=r.length,i=r.length-e.length,a=Math.min;if(i)return i;switch(n){case 0:return 0;case 1:return r[0]-e[0];case 2:return(c=r[0]+r[1]-e[0]-e[1])||a(r[0],r[1])-a(e[0],e[1]);case 3:var t=r[0]+r[1],o=e[0]+e[1];if(c=t+r[2]-(o+e[2]))return c;var c,u=a(r[0],r[1]),d=a(e[0],e[1]);return(c=a(u,r[2])-a(d,e[2]))||a(u+r[2],t)-a(d+e[2],o);default:var s=r.slice(0);s.sort();var l=e.slice(0);l.sort();for(var m=0;m>1,c=t(r[o],e);c<=0?(0===c&&(a=o),n=o+1):c>0&&(i=o-1)}return a}function s(r,e){for(var n=new Array(r.length),a=0,o=n.length;a=r.length||0!==t(r[f],c)););}return n}function l(r,e){if(e<0)return[];for(var n=[],a=(1<>>s&1&&d.push(a[s]);e.push(d)}return c(e)},e.skeleton=l,e.boundary=function(r){for(var e=[],n=0,i=r.length;n>1:(r>>1)-1}function h(r){for(var e=g(r);;){var n=e,i=2*r+1,a=2*(r+1),t=r;if(i0;){var n=_(r);if(!(n>=0&&e0){var r=C[0];return f(0,A-1),A-=1,h(0),r}return-1}function P(r,e){var n=C[r];return d[n]===e?r:(d[n]=-1/0,v(r),x(),d[n]=e,v((A+=1)-1))}function G(r){if(!s[r]){s[r]=!0;var e=c[r],n=u[r];c[n]>=0&&(c[n]=e),u[e]>=0&&(u[e]=n),S[e]>=0&&P(S[e],y(e)),S[n]>=0&&P(S[n],y(n))}}var C=[],S=new Array(t);for(l=0;l>1;l>=0;--l)h(l);for(;;){var b=x();if(b<0||d[b]>n)break;G(b)}var M=[];for(l=0;l=0&&n>=0&&e!==n){var i=S[e],a=S[n];i!==a&&k.push([i,a])}})),a.unique(a.normalize(k)),{positions:M,edges:k}};var i=n(3250),a=n(2014)},1303:function(r,e,n){"use strict";r.exports=function(r,e){var n,t,o,c;if(e[0][0]e[1][0]))return a(e,r);n=e[1],t=e[0]}if(r[0][0]r[1][0]))return-a(r,e);o=r[1],c=r[0]}var u=i(n,t,c),d=i(n,t,o);if(u<0){if(d<=0)return u}else if(u>0){if(d>=0)return u}else if(d)return d;if(u=i(c,o,t),d=i(c,o,n),u<0){if(d<=0)return u}else if(u>0){if(d>=0)return u}else if(d)return d;return t[0]-c[0]};var i=n(3250);function a(r,e){var n,a,t,o;if(e[0][0]e[1][0])){var c=Math.min(r[0][1],r[1][1]),u=Math.max(r[0][1],r[1][1]),d=Math.min(e[0][1],e[1][1]),s=Math.max(e[0][1],e[1][1]);return us?c-s:u-s}n=e[1],a=e[0]}r[0][1]0)if(e[0]!==o[1][0])n=r,r=r.right;else{if(u=d(r.right,e))return u;r=r.left}else{if(e[0]!==o[1][0])return r;var u;if(u=d(r.right,e))return u;r=r.left}}return n}function s(r,e,n,i){this.y=r,this.index=e,this.start=n,this.closed=i}function l(r,e,n,i){this.x=r,this.segment=e,this.create=n,this.index=i}c.prototype.castUp=function(r){var e=i.le(this.coordinates,r[0]);if(e<0)return-1;this.slabs[e];var n=d(this.slabs[e],r),a=-1;if(n&&(a=n.value),this.coordinates[e]===r[0]){var c=null;if(n&&(c=n.key),e>0){var s=d(this.slabs[e-1],r);s&&(c?o(s.key,c)>0&&(c=s.key,a=s.value):(a=s.value,c=s.key))}var l=this.horizontal[e];if(l.length>0){var m=i.ge(l,r[1],u);if(m=l.length)return a;p=l[m]}}if(p.start)if(c){var I=t(c[0],c[1],[r[0],p.y]);c[0][0]>c[1][0]&&(I=-I),I>0&&(a=p.index)}else a=p.index;else p.y!==r[1]&&(a=p.index)}}}return a}},5202:function(r,e,n){"use strict";var i=n(1944),a=n(8210);function t(r,e){var n=a(i(r,e),[e[e.length-1]]);return n[n.length-1]}function o(r,e,n,i){var a=-e/(i-e);a<0?a=0:a>1&&(a=1);for(var t=1-a,o=r.length,c=new Array(o),u=0;u0||a>0&&s<0){var l=o(c,s,u,a);n.push(l),i.push(l.slice())}s<0?i.push(u.slice()):s>0?n.push(u.slice()):(n.push(u.slice()),i.push(u.slice())),a=s}return{positive:n,negative:i}},r.exports.positive=function(r,e){for(var n=[],i=t(r[r.length-1],e),a=r[r.length-1],c=r[0],u=0;u0||i>0&&d<0)&&n.push(o(a,d,c,i)),d>=0&&n.push(c.slice()),i=d}return n},r.exports.negative=function(r,e){for(var n=[],i=t(r[r.length-1],e),a=r[r.length-1],c=r[0],u=0;u0||i>0&&d<0)&&n.push(o(a,d,c,i)),d<=0&&n.push(c.slice()),i=d}return n}},3387:function(r,e,n){var i;!function(){"use strict";var a={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,e){var n,i,o,c,u,d,s,l,m,p=1,I=r.length,y="";for(i=0;i=0),c.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,c.width?parseInt(c.width):0);break;case"e":n=c.precision?parseFloat(n).toExponential(c.precision):parseFloat(n).toExponential();break;case"f":n=c.precision?parseFloat(n).toFixed(c.precision):parseFloat(n);break;case"g":n=c.precision?String(Number(n.toPrecision(c.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=c.precision?n.substring(0,c.precision):n;break;case"t":n=String(!!n),n=c.precision?n.substring(0,c.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=c.precision?n.substring(0,c.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=c.precision?n.substring(0,c.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}a.json.test(c.type)?y+=n:(!a.number.test(c.type)||l&&!c.sign?m="":(m=l?"+":"-",n=n.toString().replace(a.sign,"")),d=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",s=c.width-(m+n).length,u=c.width&&s>0?d.repeat(s):"",y+=c.align?m+n+u:"0"===d?m+u+n:u+m+n)}return y}(function(r){if(c[r])return c[r];for(var e,n=r,i=[],t=0;n;){if(null!==(e=a.text.exec(n)))i.push(e[0]);else if(null!==(e=a.modulo.exec(n)))i.push("%");else{if(null===(e=a.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){t|=1;var o=[],u=e[2],d=[];if(null===(d=a.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(d[1]);""!==(u=u.substring(d[0].length));)if(null!==(d=a.key_access.exec(u)))o.push(d[1]);else{if(null===(d=a.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(d[1])}e[2]=o}else t|=2;if(3===t)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}n=n.substring(e[0].length)}return c[r]=i}(r),arguments)}function o(r,e){return t.apply(null,[r].concat(e||[]))}var c=Object.create(null);e.sprintf=t,e.vsprintf=o,"undefined"!==typeof window&&(window.sprintf=t,window.vsprintf=o,void 0===(i=function(){return{sprintf:t,vsprintf:o}}.call(e,n,e,r))||(r.exports=i))}()},3711:function(r,e,n){"use strict";r.exports=function(r,e){if(r.dimension<=0)return{positions:[],cells:[]};if(1===r.dimension)return function(r,e){for(var n=a(r,e),i=n.length,t=new Array(i),o=new Array(i),c=0;ci|0},vertex:function(r,e,n,i,a,t,o,c,u,d,s,l,m){var p=(0|o)+(c<<1)+(u<<2)+(d<<3)|0;if(0!==p&&15!==p)switch(p){case 0:case 15:s.push([r-.5,e-.5]);break;case 1:s.push([r-.25-.25*(i+n-2*m)/(n-i),e-.25-.25*(a+n-2*m)/(n-a)]);break;case 2:s.push([r-.75-.25*(-i-n+2*m)/(i-n),e-.25-.25*(t+i-2*m)/(i-t)]);break;case 3:s.push([r-.5,e-.5-.5*(a+n+t+i-4*m)/(n-a+i-t)]);break;case 4:s.push([r-.25-.25*(t+a-2*m)/(a-t),e-.75-.25*(-a-n+2*m)/(a-n)]);break;case 5:s.push([r-.5-.5*(i+n+t+a-4*m)/(n-i+a-t),e-.5]);break;case 6:s.push([r-.5-.25*(-i-n+t+a)/(i-n+a-t),e-.5-.25*(-a-n+t+i)/(a-n+i-t)]);break;case 7:s.push([r-.75-.25*(t+a-2*m)/(a-t),e-.75-.25*(t+i-2*m)/(i-t)]);break;case 8:s.push([r-.75-.25*(-t-a+2*m)/(t-a),e-.75-.25*(-t-i+2*m)/(t-i)]);break;case 9:s.push([r-.5-.25*(i+n+-t-a)/(n-i+t-a),e-.5-.25*(a+n+-t-i)/(n-a+t-i)]);break;case 10:s.push([r-.5-.5*(-i-n-t-a+4*m)/(i-n+t-a),e-.5]);break;case 11:s.push([r-.25-.25*(-t-a+2*m)/(t-a),e-.75-.25*(a+n-2*m)/(n-a)]);break;case 12:s.push([r-.5,e-.5-.5*(-a-n-t-i+4*m)/(a-n+t-i)]);break;case 13:s.push([r-.75-.25*(i+n-2*m)/(n-i),e-.25-.25*(-t-i+2*m)/(t-i)]);break;case 14:s.push([r-.25-.25*(-i-n+2*m)/(i-n),e-.25-.25*(-a-n+2*m)/(a-n)])}},cell:function(r,e,n,i,a,t,o,c,u){a?c.push([r,e]):c.push([e,r])}});return function(r,e){var n=[],a=[];return i(r,n,a,e),{positions:n,cells:a}}}},o={}},529:function(r,e,n){"use strict";r.exports=function r(e,n,i){var t=(i=i||{}).fontStyle||"normal",c=i.fontWeight||"normal",u=i.fontVariant||"normal",d=[t,c,u,e].join("_"),s=o[d];s||(s=o[d]={" ":{data:new Float32Array(0),shape:.2}});var l=s[n];if(!l)if(n.length<=1||!/\d/.test(n))l=s[n]=function(r){for(var e=r.cells,n=r.positions,i=new Float32Array(6*e.length),a=0,t=0,o=0;o0&&(y+=.02);var g=new Float32Array(I),_=0,h=-.5*y;for(f=0;fMath.max(n,i)?a[2]=1:n>Math.max(e,i)?a[0]=1:a[1]=1;for(var t=0,o=0,u=0;u<3;++u)t+=r[u]*r[u],o+=a[u]*r[u];for(u=0;u<3;++u)a[u]-=o/t*r[u];return c(a,a),a}function m(r,e,n,a,t,o,c,u){this.center=i(n),this.up=i(a),this.right=i(t),this.radius=i([o]),this.angle=i([c,u]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(r,e),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 d=0;d<16;++d)this.computedMatrix[d]=.5;this.recalcMatrix(0)}var p=m.prototype;p.setDistanceLimits=function(r,e){r=r>0?Math.log(r):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,r),this.radius.bounds[0][0]=r,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(r){var e=this.radius.bounds[0];return r?(r[0]=Math.exp(e[0][0]),r[1]=Math.exp(e[1][0]),r):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(r){this.center.curve(r),this.up.curve(r),this.right.curve(r),this.radius.curve(r),this.angle.curve(r);for(var e=this.computedUp,n=this.computedRight,i=0,a=0,t=0;t<3;++t)a+=e[t]*n[t],i+=e[t]*e[t];var u=Math.sqrt(i),s=0;for(t=0;t<3;++t)n[t]-=e[t]*a/i,s+=n[t]*n[t],e[t]/=u;var l=Math.sqrt(s);for(t=0;t<3;++t)n[t]/=l;var m=this.computedToward;o(m,e,n),c(m,m);var p=Math.exp(this.computedRadius[0]),I=this.computedAngle[0],y=this.computedAngle[1],f=Math.cos(I),g=Math.sin(I),_=Math.cos(y),h=Math.sin(y),v=this.computedCenter,x=f*_,P=g*_,G=h,C=-f*h,S=-g*h,A=_,b=this.computedEye,M=this.computedMatrix;for(t=0;t<3;++t){var B=x*n[t]+P*m[t]+G*e[t];M[4*t+1]=C*n[t]+S*m[t]+A*e[t],M[4*t+2]=B,M[4*t+3]=0}var k=M[1],F=M[5],z=M[9],w=M[2],R=M[6],E=M[10],N=F*E-z*R,T=z*w-k*E,D=k*R-F*w,J=d(N,T,D);for(N/=J,T/=J,D/=J,M[0]=N,M[4]=T,M[8]=D,t=0;t<3;++t)b[t]=v[t]+M[2+4*t]*p;for(t=0;t<3;++t){s=0;for(var U=0;U<3;++U)s+=M[t+4*U]*b[U];M[12+t]=-s}M[15]=1},p.getMatrix=function(r,e){this.recalcMatrix(r);var n=this.computedMatrix;if(e){for(var i=0;i<16;++i)e[i]=n[i];return e}return n};var I=[0,0,0];p.rotate=function(r,e,n,i){if(this.angle.move(r,e,n),i){this.recalcMatrix(r);var a=this.computedMatrix;I[0]=a[2],I[1]=a[6],I[2]=a[10];for(var o=this.computedUp,c=this.computedRight,u=this.computedToward,d=0;d<3;++d)a[4*d]=o[d],a[4*d+1]=c[d],a[4*d+2]=u[d];for(t(a,a,i,I),d=0;d<3;++d)o[d]=a[4*d],c[d]=a[4*d+1];this.up.set(r,o[0],o[1],o[2]),this.right.set(r,c[0],c[1],c[2])}},p.pan=function(r,e,n,i){e=e||0,n=n||0,i=i||0,this.recalcMatrix(r);var a=this.computedMatrix,t=(Math.exp(this.computedRadius[0]),a[1]),o=a[5],c=a[9],u=d(t,o,c);t/=u,o/=u,c/=u;var s=a[0],l=a[4],m=a[8],p=s*t+l*o+m*c,I=d(s-=t*p,l-=o*p,m-=c*p),y=(s/=I)*e+t*n,f=(l/=I)*e+o*n,g=(m/=I)*e+c*n;this.center.move(r,y,f,g);var _=Math.exp(this.computedRadius[0]);_=Math.max(1e-4,_+i),this.radius.set(r,Math.log(_))},p.translate=function(r,e,n,i){this.center.move(r,e||0,n||0,i||0)},p.setMatrix=function(r,e,n,i){var t=1;"number"===typeof n&&(t=0|n),(t<0||t>3)&&(t=1);var o=(t+2)%3;e||(this.recalcMatrix(r),e=this.computedMatrix);var c=e[t],u=e[t+4],l=e[t+8];if(i){var m=Math.abs(c),p=Math.abs(u),I=Math.abs(l),y=Math.max(m,p,I);m===y?(c=c<0?-1:1,u=l=0):I===y?(l=l<0?-1:1,c=u=0):(u=u<0?-1:1,c=l=0)}else{var f=d(c,u,l);c/=f,u/=f,l/=f}var g,_,h=e[o],v=e[o+4],x=e[o+8],P=h*c+v*u+x*l,G=d(h-=c*P,v-=u*P,x-=l*P),C=u*(x/=G)-l*(v/=G),S=l*(h/=G)-c*x,A=c*v-u*h,b=d(C,S,A);if(C/=b,S/=b,A/=b,this.center.jump(r,K,V,j),this.radius.idle(r),this.up.jump(r,c,u,l),this.right.jump(r,h,v,x),2===t){var M=e[1],B=e[5],k=e[9],F=M*h+B*v+k*x,z=M*C+B*S+k*A;g=N<0?-Math.PI/2:Math.PI/2,_=Math.atan2(z,F)}else{var w=e[2],R=e[6],E=e[10],N=w*c+R*u+E*l,T=w*h+R*v+E*x,D=w*C+R*S+E*A;g=Math.asin(s(N)),_=Math.atan2(D,T)}this.angle.jump(r,_,g),this.recalcMatrix(r);var J=e[2],U=e[6],H=e[10],L=this.computedMatrix;a(L,e);var O=L[15],K=L[12]/O,V=L[13]/O,j=L[14]/O,W=Math.exp(this.computedRadius[0]);this.center.jump(r,K-J*W,V-U*W,j-H*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(r){this.center.idle(r),this.up.idle(r),this.right.idle(r),this.radius.idle(r),this.angle.idle(r)},p.flush=function(r){this.center.flush(r),this.up.flush(r),this.right.flush(r),this.radius.flush(r),this.angle.flush(r)},p.setDistance=function(r,e){e>0&&this.radius.set(r,Math.log(e))},p.lookAt=function(r,e,n,i){this.recalcMatrix(r),e=e||this.computedEye,n=n||this.computedCenter;var a=(i=i||this.computedUp)[0],t=i[1],o=i[2],c=d(a,t,o);if(!(c<1e-6)){a/=c,t/=c,o/=c;var u=e[0]-n[0],l=e[1]-n[1],m=e[2]-n[2],p=d(u,l,m);if(!(p<1e-6)){u/=p,l/=p,m/=p;var I=this.computedRight,y=I[0],f=I[1],g=I[2],_=a*y+t*f+o*g,h=d(y-=_*a,f-=_*t,g-=_*o);if(!(h<.01&&(h=d(y=t*m-o*l,f=o*u-a*m,g=a*l-t*u))<1e-6)){y/=h,f/=h,g/=h,this.up.set(r,a,t,o),this.right.set(r,y,f,g),this.center.set(r,n[0],n[1],n[2]),this.radius.set(r,Math.log(p));var v=t*g-o*f,x=o*y-a*g,P=a*f-t*y,G=d(v,x,P),C=a*u+t*l+o*m,S=y*u+f*l+g*m,A=(v/=G)*u+(x/=G)*l+(P/=G)*m,b=Math.asin(s(C)),M=Math.atan2(A,S),B=this.angle._state,k=B[B.length-1],F=B[B.length-2];k%=2*Math.PI;var z=Math.abs(k+2*Math.PI-M),w=Math.abs(k-M),R=Math.abs(k-2*Math.PI-M);z0?n.pop():new ArrayBuffer(r)}function I(r){return new Uint8Array(p(r),0,r)}function y(r){return new Uint16Array(p(2*r),0,r)}function f(r){return new Uint32Array(p(4*r),0,r)}function g(r){return new Int8Array(p(r),0,r)}function _(r){return new Int16Array(p(2*r),0,r)}function h(r){return new Int32Array(p(4*r),0,r)}function v(r){return new Float32Array(p(4*r),0,r)}function x(r){return new Float64Array(p(8*r),0,r)}function P(r){return o?new Uint8ClampedArray(p(r),0,r):I(r)}function G(r){return c?new BigUint64Array(p(8*r),0,r):null}function C(r){return u?new BigInt64Array(p(8*r),0,r):null}function S(r){return new DataView(p(r),0,r)}function A(r){r=i.nextPow2(r);var e=i.log2(r),n=l[e];return n.length>0?n.pop():new t(r)}e.free=function(r){if(t.isBuffer(r))l[i.log2(r.length)].push(r);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(r)&&(r=r.buffer),!r)return;var e=r.length||r.byteLength,n=0|i.log2(e);s[n].push(r)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(r){m(r.buffer)},e.freeArrayBuffer=m,e.freeBuffer=function(r){l[i.log2(r.length)].push(r)},e.malloc=function(r,e){if(void 0===e||"arraybuffer"===e)return p(r);switch(e){case"uint8":return I(r);case"uint16":return y(r);case"uint32":return f(r);case"int8":return g(r);case"int16":return _(r);case"int32":return h(r);case"float":case"float32":return v(r);case"double":case"float64":return x(r);case"uint8_clamped":return P(r);case"bigint64":return C(r);case"biguint64":return G(r);case"buffer":return A(r);case"data":case"dataview":return S(r);default:return null}return null},e.mallocArrayBuffer=p,e.mallocUint8=I,e.mallocUint16=y,e.mallocUint32=f,e.mallocInt8=g,e.mallocInt16=_,e.mallocInt32=h,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=P,e.mallocBigUint64=G,e.mallocBigInt64=C,e.mallocDataView=S,e.mallocBuffer=A,e.clearCache=function(){for(var r=0;r<32;++r)d.UINT8[r].length=0,d.UINT16[r].length=0,d.UINT32[r].length=0,d.INT8[r].length=0,d.INT16[r].length=0,d.INT32[r].length=0,d.FLOAT[r].length=0,d.DOUBLE[r].length=0,d.BIGUINT64[r].length=0,d.BIGINT64[r].length=0,d.UINT8C[r].length=0,s[r].length=0,l[r].length=0}},1755:function(r){"use strict";function e(r){this.roots=new Array(r),this.ranks=new Array(r);for(var e=0;e0&&(t=i.size),i.lineSpacing&&i.lineSpacing>0&&(o=i.lineSpacing),i.styletags&&i.styletags.breaklines&&(c.breaklines=!!i.styletags.breaklines),i.styletags&&i.styletags.bolds&&(c.bolds=!!i.styletags.bolds),i.styletags&&i.styletags.italics&&(c.italics=!!i.styletags.italics),i.styletags&&i.styletags.subscripts&&(c.subscripts=!!i.styletags.subscripts),i.styletags&&i.styletags.superscripts&&(c.superscripts=!!i.styletags.superscripts)),n.font=[i.fontStyle,i.fontVariant,i.fontWeight,t+"px",i.font].filter((function(r){return r})).join(" "),n.textAlign="start",n.textBaseline="alphabetic",n.direction="ltr",P(function(r,e,n,i,t,o){n=n.replace(/\n/g,""),n=!0===o.breaklines?n.replace(/\/g,"\n"):n.replace(/\/g," ");var c="",u=[];for(G=0;G-1?parseInt(r[1+a]):0,u=t>-1?parseInt(n[1+t]):0;c!==u&&(i=i.replace(T(),"?px "),A*=Math.pow(.75,u-c),i=i.replace("?px ",T())),S+=.25*B*(u-c)}if(!0===o.superscripts){var d=r.indexOf(I),l=n.indexOf(I),p=d>-1?parseInt(r[1+d]):0,y=l>-1?parseInt(n[1+l]):0;p!==y&&(i=i.replace(T(),"?px "),A*=Math.pow(.75,y-p),i=i.replace("?px ",T())),S-=.25*B*(y-p)}if(!0===o.bolds){var f=r.indexOf(s)>-1,_=n.indexOf(s)>-1;!f&&_&&(i=h?i.replace("italic ","italic bold "):"bold "+i),f&&!_&&(i=i.replace("bold ",""))}if(!0===o.italics){var h=r.indexOf(m)>-1,v=n.indexOf(m)>-1;!h&&v&&(i="italic "+i),h&&!v&&(i=i.replace("italic ",""))}e.font=i}for(P=0;P",t="",o=a.length,c=t.length,u=e[0]===I||e[0]===g,d=0,s=-c;d>-1&&-1!==(d=n.indexOf(a,d))&&-1!==(s=n.indexOf(t,d+o))&&!(s<=d);){for(var l=d;l=s)i[l]=null,n=n.substr(0,l)+" "+n.substr(l+1);else if(null!==i[l]){var m=i[l].indexOf(e[0]);-1===m?i[l]+=e:u&&(i[l]=i[l].substr(0,m+1)+(1+parseInt(i[l][m+1]))+i[l].substr(m+2))}var p=d+o,y=n.substr(p,s-p).indexOf(a);d=-1!==y?y:s+c}return i}function v(r,e){var n=i(r,128);return e?t(n.cells,n.positions,.25):{edges:n.cells,positions:n.positions}}function x(r,e,n,i){var a=v(r,i),t=function(r,e,n){for(var i=e.textAlign||"start",a=e.textBaseline||"alphabetic",t=[1<<30,1<<30],o=[0,0],c=r.length,u=0;u=0?e[t]:a}))},has___:{value:h((function(e){var i=_(e);return i?n in i:r.indexOf(e)>=0}))},set___:{value:h((function(i,a){var t,o=_(i);return o?o[n]=a:(t=r.indexOf(i))>=0?e[t]=a:(t=r.length,e[t]=a,r[t]=i),this}))},delete___:{value:h((function(i){var a,t,o=_(i);return o?n in o&&delete o[n]:!((a=r.indexOf(i))<0)&&(t=r.length-1,r[a]=void 0,e[a]=e[t],r[a]=r[t],r.length=t,e.length=t,!0)}))}})};y.prototype=Object.create(Object.prototype,{get:{value:function(r,e){return this.get___(r,e)},writable:!0,configurable:!0},has:{value:function(r){return this.has___(r)},writable:!0,configurable:!0},set:{value:function(r,e){return this.set___(r,e)},writable:!0,configurable:!0},delete:{value:function(r){return this.delete___(r)},writable:!0,configurable:!0}}),"function"===typeof n?function(){function i(){this instanceof y||v();var r,i=new n,a=void 0,t=!1;return r=e?function(r,e){return i.set(r,e),i.has(r)||(a||(a=new y),a.set(r,e)),this}:function(r,e){if(t)try{i.set(r,e)}catch(n){a||(a=new y),a.set___(r,e)}else i.set(r,e);return this},Object.create(y.prototype,{get___:{value:h((function(r,e){return a?i.has(r)?i.get(r):a.get___(r,e):i.get(r,e)}))},has___:{value:h((function(r){return i.has(r)||!!a&&a.has___(r)}))},set___:{value:h(r)},delete___:{value:h((function(r){var e=!!i.delete(r);return a&&a.delete___(r)||e}))},permitHostObjects___:{value:h((function(r){if(r!==f)throw new Error("bogus call to permitHostObjects___");t=!0}))}})}e&&"undefined"!==typeof Proxy&&(Proxy=void 0),i.prototype=y.prototype,r.exports=i,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!==typeof Proxy&&(Proxy=void 0),r.exports=y)}function f(r){r.permitHostObjects___&&r.permitHostObjects___(f)}function g(r){return!(r.substr(0,8)==u&&"___"===r.substr(r.length-3))}function _(r){if(r!==Object(r))throw new TypeError("Not an object: "+r);var e=r[d];if(e&&e.key===r)return e;if(c(r)){e={key:r};try{return o(r,d,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(n){return}}}function h(r){return r.prototype=null,Object.freeze(r)}function v(){p||"undefined"===typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(r,e,n){var i=n(8284);r.exports=function(){var r={};return function(e){if(("object"!==typeof e||null===e)&&"function"!==typeof e)throw new Error("Weakmap-shim: Key must be object");var n=e.valueOf(r);return n&&n.identity===r?n:i(e,r)}}},8284:function(r){r.exports=function(r,e){var n={identity:e},i=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(r){return r!==e?i.apply(this,arguments):n},writable:!0}),n}},606:function(r,e,n){var i=n(236);r.exports=function(){var r=i();return{get:function(e,n){var i=r(e);return i.hasOwnProperty("value")?i.value:n},set:function(e,n){return r(e).value=n,this},has:function(e){return"value"in r(e)},delete:function(e){return delete r(e).value}}}},3349:function(r){"use strict";var e=function(){return function(r,e,n,i,a,t){var o=r[0],c=n[0],u=[0],d=c;i|=0;var s=0,l=c;for(s=0;s=0!==p>=0&&a.push(u[0]+.5+.5*(m+p)/(m-p)),i+=l,++u[0]}}};r.exports=function(r){return n={funcName:r.funcName},function(r){var e={};return function(n,i,a){var t=n.dtype,o=n.order,c=[t,o.join()].join(),u=e[c];return u||(e[c]=u=r([t,o])),u(n.shape.slice(0),n.data,n.stride,0|n.offset,i,a)}}(e.bind(void 0,n));var n}({funcName:"zeroCrossings"})},781:function(r,e,n){"use strict";r.exports=function(r,e){var n=[];return e=+e||0,i(r.hi(r.shape[0]-1),n,e),n};var i=n(3349)},7790:function(){}},n={};function a(r){var i=n[r];if(void 0!==i)return i.exports;var t=n[r]={id:r,loaded:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.loaded=!0,t.exports}a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"===typeof window)return window}}(),a.nmd=function(r){return r.paths=[],r.children||(r.children=[]),r};var t=a(1964);r.exports=t}()},33576:function(r,e,n){"use strict";function i(r,e){for(var n=0;np)throw new RangeError('The value "'+r+'" is invalid for option "size"');var e=new Uint8Array(r);return Object.setPrototypeOf(e,y.prototype),e}function y(r,e,n){if("number"===typeof r){if("string"===typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return _(r)}return f(r,e,n)}function f(r,e,n){if("string"===typeof r)return function(r,e){if("string"===typeof e&&""!==e||(e="utf8"),!y.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|P(r,e),i=I(n),a=i.write(r,e);return a!==n&&(i=i.slice(0,a)),i}(r,e);if(ArrayBuffer.isView(r))return function(r){if(nr(r,Uint8Array)){var e=new Uint8Array(r);return v(e.buffer,e.byteOffset,e.byteLength)}return h(r)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+d(r));if(nr(r,ArrayBuffer)||r&&nr(r.buffer,ArrayBuffer))return v(r,e,n);if("undefined"!==typeof SharedArrayBuffer&&(nr(r,SharedArrayBuffer)||r&&nr(r.buffer,SharedArrayBuffer)))return v(r,e,n);if("number"===typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=r.valueOf&&r.valueOf();if(null!=i&&i!==r)return y.from(i,e,n);var a=function(r){if(y.isBuffer(r)){var e=0|x(r.length),n=I(e);return 0===n.length||r.copy(n,0,0,e),n}return void 0!==r.length?"number"!==typeof r.length||ir(r.length)?I(0):h(r):"Buffer"===r.type&&Array.isArray(r.data)?h(r.data):void 0}(r);if(a)return a;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof r[Symbol.toPrimitive])return y.from(r[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+d(r))}function g(r){if("number"!==typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function _(r){return g(r),I(r<0?0:0|x(r))}function h(r){for(var e=r.length<0?0:0|x(r.length),n=I(e),i=0;i=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|r}function P(r,e){if(y.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||nr(r,ArrayBuffer))return r.byteLength;if("string"!==typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+d(r));var n=r.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return $(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return rr(r).length;default:if(a)return i?-1:$(r).length;e=(""+e).toLowerCase(),a=!0}}function G(r,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return T(this,e,n);case"utf8":case"utf-8":return w(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return z(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}function C(r,e,n){var i=r[e];r[e]=r[n],r[n]=i}function S(r,e,n,i,a){if(0===r.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),ir(n=+n)&&(n=a?0:r.length-1),n<0&&(n=r.length+n),n>=r.length){if(a)return-1;n=r.length-1}else if(n<0){if(!a)return-1;n=0}if("string"===typeof e&&(e=y.from(e,i)),y.isBuffer(e))return 0===e.length?-1:A(r,e,n,i,a);if("number"===typeof e)return e&=255,"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(r,e,n):Uint8Array.prototype.lastIndexOf.call(r,e,n):A(r,[e],n,i,a);throw new TypeError("val must be string, number or Buffer")}function A(r,e,n,i,a){var t,o=1,c=r.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(r.length<2||e.length<2)return-1;o=2,c/=2,u/=2,n/=2}function d(r,e){return 1===o?r[e]:r.readUInt16BE(e*o)}if(a){var s=-1;for(t=n;tc&&(n=c-u),t=n;t>=0;t--){for(var l=!0,m=0;ma&&(i=a):i=a;var t,o=e.length;for(i>o/2&&(i=o/2),t=0;t>8,a=n%256,t.push(a),t.push(i);return t}(e,r.length-n),r,n,i)}function z(r,e,n){return 0===e&&n===r.length?s.fromByteArray(r):s.fromByteArray(r.slice(e,n))}function w(r,e,n){n=Math.min(r.length,n);for(var i=[],a=e;a239?4:t>223?3:t>191?2:1;if(a+c<=n){var u=void 0,d=void 0,s=void 0,l=void 0;switch(c){case 1:t<128&&(o=t);break;case 2:128===(192&(u=r[a+1]))&&(l=(31&t)<<6|63&u)>127&&(o=l);break;case 3:u=r[a+1],d=r[a+2],128===(192&u)&&128===(192&d)&&(l=(15&t)<<12|(63&u)<<6|63&d)>2047&&(l<55296||l>57343)&&(o=l);break;case 4:u=r[a+1],d=r[a+2],s=r[a+3],128===(192&u)&&128===(192&d)&&128===(192&s)&&(l=(15&t)<<18|(63&u)<<12|(63&d)<<6|63&s)>65535&&l<1114112&&(o=l)}}null===o?(o=65533,c=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),a+=c}return function(r){var e=r.length;if(e<=R)return String.fromCharCode.apply(String,r);for(var n="",i=0;ii.length?(y.isBuffer(t)||(t=y.from(t)),t.copy(i,a)):Uint8Array.prototype.set.call(i,t,a);else{if(!y.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,a)}a+=t.length}return i},y.byteLength=P,y.prototype._isBuffer=!0,y.prototype.swap16=function(){var r=this.length;if(r%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;en&&(r+=" ... "),""},m&&(y.prototype[m]=y.prototype.inspect),y.prototype.compare=function(r,e,n,i,a){if(nr(r,Uint8Array)&&(r=y.from(r,r.offset,r.byteLength)),!y.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+d(r));if(void 0===e&&(e=0),void 0===n&&(n=r?r.length:0),void 0===i&&(i=0),void 0===a&&(a=this.length),e<0||n>r.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&e>=n)return 0;if(i>=a)return-1;if(e>=n)return 1;if(this===r)return 0;for(var t=(a>>>=0)-(i>>>=0),o=(n>>>=0)-(e>>>=0),c=Math.min(t,o),u=this.slice(i,a),s=r.slice(e,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var a=this.length-e;if((void 0===n||n>a)&&(n=a),r.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var t=!1;;)switch(i){case"hex":return b(this,r,e,n);case"utf8":case"utf-8":return M(this,r,e,n);case"ascii":case"latin1":case"binary":return B(this,r,e,n);case"base64":return k(this,r,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,r,e,n);default:if(t)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),t=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function E(r,e,n){var i="";n=Math.min(r.length,n);for(var a=e;ai)&&(n=i);for(var a="",t=e;tn)throw new RangeError("Trying to access beyond buffer length")}function U(r,e,n,i,a,t){if(!y.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||er.length)throw new RangeError("Index out of range")}function H(r,e,n,i,a){q(e,i,a,r,n,7);var t=Number(e&BigInt(4294967295));r[n++]=t,t>>=8,r[n++]=t,t>>=8,r[n++]=t,t>>=8,r[n++]=t;var o=Number(e>>BigInt(32)&BigInt(4294967295));return r[n++]=o,o>>=8,r[n++]=o,o>>=8,r[n++]=o,o>>=8,r[n++]=o,n}function L(r,e,n,i,a){q(e,i,a,r,n,7);var t=Number(e&BigInt(4294967295));r[n+7]=t,t>>=8,r[n+6]=t,t>>=8,r[n+5]=t,t>>=8,r[n+4]=t;var o=Number(e>>BigInt(32)&BigInt(4294967295));return r[n+3]=o,o>>=8,r[n+2]=o,o>>=8,r[n+1]=o,o>>=8,r[n]=o,n+8}function O(r,e,n,i,a,t){if(n+i>r.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function K(r,e,n,i,a){return e=+e,n>>>=0,a||O(r,0,n,4),l.write(r,e,n,i,23,4),n+4}function V(r,e,n,i,a){return e=+e,n>>>=0,a||O(r,0,n,8),l.write(r,e,n,i,52,8),n+8}y.prototype.slice=function(r,e){var n=this.length;(r=~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r],a=1,t=0;++t>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r+--e],a=1;e>0&&(a*=256);)i+=this[r+--e]*a;return i},y.prototype.readUint8=y.prototype.readUInt8=function(r,e){return r>>>=0,e||J(r,1,this.length),this[r]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(r,e){return r>>>=0,e||J(r,2,this.length),this[r]|this[r+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(r,e){return r>>>=0,e||J(r,2,this.length),this[r]<<8|this[r+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(r,e){return r>>>=0,e||J(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(r,e){return r>>>=0,e||J(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},y.prototype.readBigUInt64LE=tr((function(r){Y(r>>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=e+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,24),a=this[++r]+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(i)+(BigInt(a)<>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=e*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r],a=this[++r]*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+n;return(BigInt(i)<>>=0,e>>>=0,n||J(r,e,this.length);for(var i=this[r],a=1,t=0;++t=(a*=128)&&(i-=Math.pow(2,8*e)),i},y.prototype.readIntBE=function(r,e,n){r>>>=0,e>>>=0,n||J(r,e,this.length);for(var i=e,a=1,t=this[r+--i];i>0&&(a*=256);)t+=this[r+--i]*a;return t>=(a*=128)&&(t-=Math.pow(2,8*e)),t},y.prototype.readInt8=function(r,e){return r>>>=0,e||J(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},y.prototype.readInt16LE=function(r,e){r>>>=0,e||J(r,2,this.length);var n=this[r]|this[r+1]<<8;return 32768&n?4294901760|n:n},y.prototype.readInt16BE=function(r,e){r>>>=0,e||J(r,2,this.length);var n=this[r+1]|this[r]<<8;return 32768&n?4294901760|n:n},y.prototype.readInt32LE=function(r,e){return r>>>=0,e||J(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},y.prototype.readInt32BE=function(r,e){return r>>>=0,e||J(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},y.prototype.readBigInt64LE=tr((function(r){Y(r>>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=this[r+4]+this[r+5]*Math.pow(2,8)+this[r+6]*Math.pow(2,16)+(n<<24);return(BigInt(i)<>>=0,"offset");var e=this[r],n=this[r+7];void 0!==e&&void 0!==n||X(r,this.length-8);var i=(e<<24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r];return(BigInt(i)<>>=0,e||J(r,4,this.length),l.read(this,r,!0,23,4)},y.prototype.readFloatBE=function(r,e){return r>>>=0,e||J(r,4,this.length),l.read(this,r,!1,23,4)},y.prototype.readDoubleLE=function(r,e){return r>>>=0,e||J(r,8,this.length),l.read(this,r,!0,52,8)},y.prototype.readDoubleBE=function(r,e){return r>>>=0,e||J(r,8,this.length),l.read(this,r,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(r,e,n,i){r=+r,e>>>=0,n>>>=0,i||U(this,r,e,n,Math.pow(2,8*n)-1,0);var a=1,t=0;for(this[e]=255&r;++t>>=0,n>>>=0,i||U(this,r,e,n,Math.pow(2,8*n)-1,0);var a=n-1,t=1;for(this[e+a]=255&r;--a>=0&&(t*=256);)this[e+a]=r/t&255;return e+n},y.prototype.writeUint8=y.prototype.writeUInt8=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,1,255,0),this[e]=255&r,e+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,65535,0),this[e]=255&r,this[e+1]=r>>>8,e+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,65535,0),this[e]=r>>>8,this[e+1]=255&r,e+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,4294967295,0),this[e+3]=r>>>24,this[e+2]=r>>>16,this[e+1]=r>>>8,this[e]=255&r,e+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,4294967295,0),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r,e+4},y.prototype.writeBigUInt64LE=tr((function(r){return H(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeBigUInt64BE=tr((function(r){return L(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),y.prototype.writeIntLE=function(r,e,n,i){if(r=+r,e>>>=0,!i){var a=Math.pow(2,8*n-1);U(this,r,e,n,a-1,-a)}var t=0,o=1,c=0;for(this[e]=255&r;++t>>=0,!i){var a=Math.pow(2,8*n-1);U(this,r,e,n,a-1,-a)}var t=n-1,o=1,c=0;for(this[e+t]=255&r;--t>=0&&(o*=256);)r<0&&0===c&&0!==this[e+t+1]&&(c=1),this[e+t]=(r/o|0)-c&255;return e+n},y.prototype.writeInt8=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,1,127,-128),r<0&&(r=255+r+1),this[e]=255&r,e+1},y.prototype.writeInt16LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,32767,-32768),this[e]=255&r,this[e+1]=r>>>8,e+2},y.prototype.writeInt16BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,2,32767,-32768),this[e]=r>>>8,this[e+1]=255&r,e+2},y.prototype.writeInt32LE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,2147483647,-2147483648),this[e]=255&r,this[e+1]=r>>>8,this[e+2]=r>>>16,this[e+3]=r>>>24,e+4},y.prototype.writeInt32BE=function(r,e,n){return r=+r,e>>>=0,n||U(this,r,e,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[e]=r>>>24,this[e+1]=r>>>16,this[e+2]=r>>>8,this[e+3]=255&r,e+4},y.prototype.writeBigInt64LE=tr((function(r){return H(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeBigInt64BE=tr((function(r){return L(this,r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),y.prototype.writeFloatLE=function(r,e,n){return K(this,r,e,!0,n)},y.prototype.writeFloatBE=function(r,e,n){return K(this,r,e,!1,n)},y.prototype.writeDoubleLE=function(r,e,n){return V(this,r,e,!0,n)},y.prototype.writeDoubleBE=function(r,e,n){return V(this,r,e,!1,n)},y.prototype.copy=function(r,e,n,i){if(!y.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=r.length&&(e=r.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),r.length-e>>=0,n=void 0===n?this.length:n>>>0,r||(r=0),"number"===typeof r)for(t=e;t=i+4;n-=3)e="_".concat(r.slice(n-3,n)).concat(e);return"".concat(r.slice(0,n)).concat(e)}function q(r,e,n,i,a,t){if(r>n||r3?0===e||e===BigInt(0)?">= 0".concat(c," and < 2").concat(c," ** ").concat(8*(t+1)).concat(c):">= -(2".concat(c," ** ").concat(8*(t+1)-1).concat(c,") and < 2 ** ")+"".concat(8*(t+1)-1).concat(c):">= ".concat(e).concat(c," and <= ").concat(n).concat(c),new j.ERR_OUT_OF_RANGE("value",o,r)}!function(r,e,n){Y(e,"offset"),void 0!==r[e]&&void 0!==r[e+n]||X(e,r.length-(n+1))}(i,a,t)}function Y(r,e){if("number"!==typeof r)throw new j.ERR_INVALID_ARG_TYPE(e,"number",r)}function X(r,e,n){if(Math.floor(r)!==r)throw Y(r,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",r);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(e),r)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(r){return r?"".concat(r," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(r,e){return'The "'.concat(r,'" argument must be of type number. Received type ').concat(d(e))}),TypeError),W("ERR_OUT_OF_RANGE",(function(r,e,n){var i='The value of "'.concat(r,'" is out of range.'),a=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?a=Z(String(n)):"bigint"===typeof n&&(a=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(a=Z(a)),a+="n"),i+=" It must be ".concat(e,". Received ").concat(a)}),RangeError);var Q=/[^+/0-9A-Za-z-_]/g;function $(r,e){var n;e=e||1/0;for(var i=r.length,a=null,t=[],o=0;o55295&&n<57344){if(!a){if(n>56319){(e-=3)>-1&&t.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&t.push(239,191,189);continue}a=n;continue}if(n<56320){(e-=3)>-1&&t.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(e-=3)>-1&&t.push(239,191,189);if(a=null,n<128){if((e-=1)<0)break;t.push(n)}else if(n<2048){if((e-=2)<0)break;t.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;t.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;t.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return t}function rr(r){return s.toByteArray(function(r){if((r=(r=r.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;r.length%4!==0;)r+="=";return r}(r))}function er(r,e,n,i){var a;for(a=0;a=e.length||a>=r.length);++a)e[a+n]=r[a];return a}function nr(r,e){return r instanceof e||null!=r&&null!=r.constructor&&null!=r.constructor.name&&r.constructor.name===e.name}function ir(r){return r!==r}var ar=function(){for(var r="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var i=16*n,a=0;a<16;++a)e[i+a]=r[n]+r[a];return e}();function tr(r){return"undefined"===typeof BigInt?or:r}function or(){throw new Error("BigInt not supported")}},25928:function(r){"use strict";r.exports=a,r.exports.isMobile=a,r.exports.default=a;var e=/(android|bb\d+|meego).+mobile|armv7l|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|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,i=/android|ipad|playbook|silk/i;function a(r){r||(r={});var a=r.ua;if(a||"undefined"===typeof navigator||(a=navigator.userAgent),a&&a.headers&&"string"===typeof a.headers["user-agent"]&&(a=a.headers["user-agent"]),"string"!==typeof a)return!1;var t=e.test(a)&&!n.test(a)||!!r.tablet&&i.test(a);return!t&&r.tablet&&r.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==a.indexOf("Macintosh")&&-1!==a.indexOf("Safari")&&(t=!0),t}},48932:function(r,e,n){"use strict";n.r(e),n.d(e,{sankeyCenter:function(){return m},sankeyCircular:function(){return k},sankeyJustify:function(){return l},sankeyLeft:function(){return d},sankeyRight:function(){return s}});var i=n(84706),a=n(34712),t=n(10132),o=n(6688),c=n.n(o);function u(r){return r.target.depth}function d(r){return r.depth}function s(r,e){return e-1-r.height}function l(r,e){return r.sourceLinks.length?r.depth:e-1}function m(r){return r.targetLinks.length?r.depth:r.sourceLinks.length?(0,i.SY)(r.sourceLinks,u)-1:0}function p(r){return function(){return r}}var I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"===typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function y(r,e){return g(r.source,e.source)||r.index-e.index}function f(r,e){return g(r.target,e.target)||r.index-e.index}function g(r,e){return r.partOfCycle===e.partOfCycle?r.y0-e.y0:"top"===r.circularLinkType||"bottom"===e.circularLinkType?-1:1}function _(r){return r.value}function h(r){return(r.y0+r.y1)/2}function v(r){return h(r.source)}function x(r){return h(r.target)}function P(r){return r.index}function G(r){return r.nodes}function C(r){return r.links}function S(r,e){var n=r.get(e);if(!n)throw new Error("missing: "+e);return n}function A(r,e){return e(r)}var b=25,M=10,B=.3;function k(){var r,e,n=0,t=0,o=1,u=1,d=24,s=P,m=l,A=G,k=C,z=32,R=2,E=null;function T(){var l={nodes:A.apply(null,arguments),links:k.apply(null,arguments)};!function(r){r.nodes.forEach((function(r,e){r.index=e,r.sourceLinks=[],r.targetLinks=[]}));var e=(0,a.kH)(r.nodes,s);r.links.forEach((function(r,n){r.index=n;var i=r.source,a=r.target;"object"!==("undefined"===typeof i?"undefined":I(i))&&(i=r.source=S(e,i)),"object"!==("undefined"===typeof a?"undefined":I(a))&&(a=r.target=S(e,a)),i.sourceLinks.push(r),a.targetLinks.push(r)}))}(l),function(r,e,n){var i=0;if(null===n){for(var a=[],t=0;t0;--I)f(p*=.99,l),P();function y(a){if(e){var s=1/0;m.forEach((function(r){var n=u*e/(r.length+1);s=n0?e+b+M:e,bottom:n=n>0?n+b+M:n,left:t=t>0?t+b+M:t,right:a=a>0?a+b+M:a}}(c),I=function(r,e){var a=(0,i.kv)(r.nodes,(function(r){return r.column})),c=o-n,s=u-t,l=c+e.right+e.left,m=s+e.top+e.bottom,p=c/l,I=s/m;return n=n*p+e.left,o=0==e.right?o:o*p,t=t*I+e.top,u*=I,r.nodes.forEach((function(r){r.x0=n+r.column*((o-n-d)/a),r.x1=r.x0+d})),I}(c,p);l*=I,c.links.forEach((function(r){r.width=r.value*l})),m.forEach((function(r){var e=r.length;r.forEach((function(r,n){r.depth==m.length-1&&1==e||0==r.depth&&1==e?(r.y0=u/2-r.value*l,r.y1=r.y0+r.value*l):r.partOfCycle?0==w(r,a)?(r.y0=u/2+n,r.y1=r.y0+r.value*l):"top"==r.circularLinkType?(r.y0=t+n,r.y1=r.y0+r.value*l):(r.y0=u-r.value*l-n,r.y1=r.y0+r.value*l):0==p.top||0==p.bottom?(r.y0=(u-t)/e*n,r.y1=r.y0+r.value*l):(r.y0=(u-t)/2-e/2+n,r.y1=r.y0+r.value*l)}))}))}function f(r,e){var n=m.length;m.forEach((function(a){var t=a.length,o=a[0].depth;a.forEach((function(a){var c;if(a.sourceLinks.length||a.targetLinks.length)if(a.partOfCycle&&w(a,e)>0);else if(0==o&&1==t)c=a.y1-a.y0,a.y0=u/2-c/2,a.y1=u/2+c/2;else if(o==n-1&&1==t)c=a.y1-a.y0,a.y0=u/2-c/2,a.y1=u/2+c/2;else{var d=(0,i.mo)(a.sourceLinks,x),s=(0,i.mo)(a.targetLinks,v),l=((d&&s?(d+s)/2:d||s)-h(a))*r;a.y0+=l,a.y1+=l}}))}))}function P(){m.forEach((function(e){var n,i,a,o=t,c=e.length;for(e.sort(g),a=0;a0&&(n.y0+=i,n.y1+=i),o=n.y1+r;if((i=o-r-u)>0)for(o=n.y0-=i,n.y1-=i,a=c-2;a>=0;--a)(i=(n=e[a]).y1+r-o)>0&&(n.y0-=i,n.y1-=i),o=n.y0}))}}(l,z,s),D(l);for(var p=0;p<4;p++)Z(l,u,s),q(l,0,s),j(l,t,u,s),Z(l,u,s),q(l,0,s);return function(r,e,n){var a=r.nodes,t=r.links,o=!1,c=!1;if(t.forEach((function(r){"top"==r.circularLinkType?o=!0:"bottom"==r.circularLinkType&&(c=!0)})),0==o||0==c){var u=(0,i.SY)(a,(function(r){return r.y0})),d=(n-e)/((0,i.kv)(a,(function(r){return r.y1}))-u);a.forEach((function(r){var e=(r.y1-r.y0)*d;r.y0=(r.y0-u)*d,r.y1=r.y0+e})),t.forEach((function(r){r.y0=(r.y0-u)*d,r.y1=(r.y1-u)*d,r.width=r.width*d}))}}(l,t,u),N(l,R,u,s),l}function D(r){r.nodes.forEach((function(r){r.sourceLinks.sort(f),r.targetLinks.sort(y)})),r.nodes.forEach((function(r){var e=r.y0,n=e,i=r.y1,a=i;r.sourceLinks.forEach((function(r){r.circular?(r.y0=i-r.width/2,i-=r.width):(r.y0=e+r.width/2,e+=r.width)})),r.targetLinks.forEach((function(r){r.circular?(r.y1=a-r.width/2,a-=r.width):(r.y1=n+r.width/2,n+=r.width)}))}))}return T.nodeId=function(r){return arguments.length?(s="function"===typeof r?r:p(r),T):s},T.nodeAlign=function(r){return arguments.length?(m="function"===typeof r?r:p(r),T):m},T.nodeWidth=function(r){return arguments.length?(d=+r,T):d},T.nodePadding=function(e){return arguments.length?(r=+e,T):r},T.nodes=function(r){return arguments.length?(A="function"===typeof r?r:p(r),T):A},T.links=function(r){return arguments.length?(k="function"===typeof r?r:p(r),T):k},T.size=function(r){return arguments.length?(n=t=0,o=+r[0],u=+r[1],T):[o-n,u-t]},T.extent=function(r){return arguments.length?(n=+r[0][0],o=+r[1][0],t=+r[0][1],u=+r[1][1],T):[[n,t],[o,u]]},T.iterations=function(r){return arguments.length?(z=+r,T):z},T.circularLinkGap=function(r){return arguments.length?(R=+r,T):R},T.nodePaddingRatio=function(r){return arguments.length?(e=+r,T):e},T.sortNodes=function(r){return arguments.length?(E=r,T):E},T.update=function(r){return F(r,s),D(r),r.links.forEach((function(r){r.circular&&(r.circularLinkType=r.y0+r.y11||a>1)}function E(r,e,n){return r.sort(T),r.forEach((function(i,a){var t,o,c=0;if(Q(i,n)&&R(i))i.circularPathData.verticalBuffer=c+i.width/2;else{for(var u=0;uo.source.column)){var d=r[u].circularPathData.verticalBuffer+r[u].width/2+e;c=d>c?d:c}i.circularPathData.verticalBuffer=c+i.width/2}})),r}function N(r,e,n,a){var o=(0,i.SY)(r.links,(function(r){return r.source.y0}));r.links.forEach((function(r){r.circular&&(r.circularPathData={})})),E(r.links.filter((function(r){return"top"==r.circularLinkType})),e,a),E(r.links.filter((function(r){return"bottom"==r.circularLinkType})),e,a),r.links.forEach((function(i){if(i.circular){if(i.circularPathData.arcRadius=i.width+M,i.circularPathData.leftNodeBuffer=5,i.circularPathData.rightNodeBuffer=5,i.circularPathData.sourceWidth=i.source.x1-i.source.x0,i.circularPathData.sourceX=i.source.x0+i.circularPathData.sourceWidth,i.circularPathData.targetX=i.target.x0,i.circularPathData.sourceY=i.y0,i.circularPathData.targetY=i.y1,Q(i,a)&&R(i))i.circularPathData.leftSmallArcRadius=M+i.width/2,i.circularPathData.leftLargeArcRadius=M+i.width/2,i.circularPathData.rightSmallArcRadius=M+i.width/2,i.circularPathData.rightLargeArcRadius=M+i.width/2,"bottom"==i.circularLinkType?(i.circularPathData.verticalFullExtent=i.source.y1+b+i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.rightLargeArcRadius):(i.circularPathData.verticalFullExtent=i.source.y0-b-i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.rightLargeArcRadius);else{var c=i.source.column,u=i.circularLinkType,d=r.links.filter((function(r){return r.source.column==c&&r.circularLinkType==u}));"bottom"==i.circularLinkType?d.sort(J):d.sort(D);var s=0;d.forEach((function(r,n){r.circularLinkID==i.circularLinkID&&(i.circularPathData.leftSmallArcRadius=M+i.width/2+s,i.circularPathData.leftLargeArcRadius=M+i.width/2+n*e+s),s+=r.width})),c=i.target.column,d=r.links.filter((function(r){return r.target.column==c&&r.circularLinkType==u})),"bottom"==i.circularLinkType?d.sort(H):d.sort(U),s=0,d.forEach((function(r,n){r.circularLinkID==i.circularLinkID&&(i.circularPathData.rightSmallArcRadius=M+i.width/2+s,i.circularPathData.rightLargeArcRadius=M+i.width/2+n*e+s),s+=r.width})),"bottom"==i.circularLinkType?(i.circularPathData.verticalFullExtent=Math.max(n,i.source.y1,i.target.y1)+b+i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent-i.circularPathData.rightLargeArcRadius):(i.circularPathData.verticalFullExtent=o-b-i.circularPathData.verticalBuffer,i.circularPathData.verticalLeftInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.leftLargeArcRadius,i.circularPathData.verticalRightInnerExtent=i.circularPathData.verticalFullExtent+i.circularPathData.rightLargeArcRadius)}i.circularPathData.leftInnerExtent=i.circularPathData.sourceX+i.circularPathData.leftNodeBuffer,i.circularPathData.rightInnerExtent=i.circularPathData.targetX-i.circularPathData.rightNodeBuffer,i.circularPathData.leftFullExtent=i.circularPathData.sourceX+i.circularPathData.leftLargeArcRadius+i.circularPathData.leftNodeBuffer,i.circularPathData.rightFullExtent=i.circularPathData.targetX-i.circularPathData.rightLargeArcRadius-i.circularPathData.rightNodeBuffer}if(i.circular)i.path=function(r){return"top"==r.circularLinkType?"M"+r.circularPathData.sourceX+" "+r.circularPathData.sourceY+" L"+r.circularPathData.leftInnerExtent+" "+r.circularPathData.sourceY+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftSmallArcRadius+" 0 0 0 "+r.circularPathData.leftFullExtent+" "+(r.circularPathData.sourceY-r.circularPathData.leftSmallArcRadius)+" L"+r.circularPathData.leftFullExtent+" "+r.circularPathData.verticalLeftInnerExtent+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftLargeArcRadius+" 0 0 0 "+r.circularPathData.leftInnerExtent+" "+r.circularPathData.verticalFullExtent+" L"+r.circularPathData.rightInnerExtent+" "+r.circularPathData.verticalFullExtent+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightLargeArcRadius+" 0 0 0 "+r.circularPathData.rightFullExtent+" "+r.circularPathData.verticalRightInnerExtent+" L"+r.circularPathData.rightFullExtent+" "+(r.circularPathData.targetY-r.circularPathData.rightSmallArcRadius)+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightSmallArcRadius+" 0 0 0 "+r.circularPathData.rightInnerExtent+" "+r.circularPathData.targetY+" L"+r.circularPathData.targetX+" "+r.circularPathData.targetY:"M"+r.circularPathData.sourceX+" "+r.circularPathData.sourceY+" L"+r.circularPathData.leftInnerExtent+" "+r.circularPathData.sourceY+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftSmallArcRadius+" 0 0 1 "+r.circularPathData.leftFullExtent+" "+(r.circularPathData.sourceY+r.circularPathData.leftSmallArcRadius)+" L"+r.circularPathData.leftFullExtent+" "+r.circularPathData.verticalLeftInnerExtent+" A"+r.circularPathData.leftLargeArcRadius+" "+r.circularPathData.leftLargeArcRadius+" 0 0 1 "+r.circularPathData.leftInnerExtent+" "+r.circularPathData.verticalFullExtent+" L"+r.circularPathData.rightInnerExtent+" "+r.circularPathData.verticalFullExtent+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightLargeArcRadius+" 0 0 1 "+r.circularPathData.rightFullExtent+" "+r.circularPathData.verticalRightInnerExtent+" L"+r.circularPathData.rightFullExtent+" "+(r.circularPathData.targetY+r.circularPathData.rightSmallArcRadius)+" A"+r.circularPathData.rightLargeArcRadius+" "+r.circularPathData.rightSmallArcRadius+" 0 0 1 "+r.circularPathData.rightInnerExtent+" "+r.circularPathData.targetY+" L"+r.circularPathData.targetX+" "+r.circularPathData.targetY}(i);else{var l=(0,t.ak)().source((function(r){return[r.source.x0+(r.source.x1-r.source.x0),r.y0]})).target((function(r){return[r.target.x0,r.y1]}));i.path=l(i)}}))}function T(r,e){return L(r)==L(e)?"bottom"==r.circularLinkType?J(r,e):D(r,e):L(e)-L(r)}function D(r,e){return r.y0-e.y0}function J(r,e){return e.y0-r.y0}function U(r,e){return r.y1-e.y1}function H(r,e){return e.y1-r.y1}function L(r){return r.target.column-r.source.column}function O(r){return r.target.x0-r.source.x1}function K(r,e){var n=z(r),i=O(e)/Math.tan(n);return"up"==X(r)?r.y1+i:r.y1-i}function V(r,e){var n=z(r),i=O(e)/Math.tan(n);return"up"==X(r)?r.y1-i:r.y1+i}function j(r,e,n,i){r.links.forEach((function(a){if(!a.circular&&a.target.column-a.source.column>1){var t=a.source.column+1,o=a.target.column-1,c=1,u=o-t+1;for(c=1;t<=o;t++,c++)r.nodes.forEach((function(o){if(o.column==t){var d,s=c/(u+1),l=Math.pow(1-s,3),m=3*s*Math.pow(1-s,2),p=3*Math.pow(s,2)*(1-s),I=Math.pow(s,3),y=l*a.y0+m*a.y0+p*a.y1+I*a.y1,f=y-a.width/2,g=y+a.width/2;f>o.y0&&ft.y0&&a.y0t.y0&&a.y1t.y1)&&W(r,d,e,n)}))):(g>o.y0&&go.y1)&&(d=g-o.y0+10,o=W(o,d,e,n),r.nodes.forEach((function(r){A(r,i)!=A(o,i)&&r.column==o.column&&r.y0o.y1&&W(r,d,e,n)})))}}))}}))}function W(r,e,n,i){return r.y0+e>=n&&r.y1+e<=i&&(r.y0=r.y0+e,r.y1=r.y1+e,r.targetLinks.forEach((function(r){r.y1=r.y1+e})),r.sourceLinks.forEach((function(r){r.y0=r.y0+e}))),r}function Z(r,e,n,i){r.nodes.forEach((function(a){i&&a.y+(a.y1-a.y0)>e&&(a.y=a.y-(a.y+(a.y1-a.y0)-e));var t=r.links.filter((function(r){return A(r.source,n)==A(a,n)})),o=t.length;o>1&&t.sort((function(r,e){if(!r.circular&&!e.circular){if(r.target.column==e.target.column)return r.y1-e.y1;if(!Y(r,e))return r.y1-e.y1;if(r.target.column>e.target.column){var n=V(e,r);return r.y1-n}if(e.target.column>r.target.column)return V(r,e)-e.y1}return r.circular&&!e.circular?"top"==r.circularLinkType?-1:1:e.circular&&!r.circular?"top"==e.circularLinkType?1:-1:r.circular&&e.circular?r.circularLinkType===e.circularLinkType&&"top"==r.circularLinkType?r.target.column===e.target.column?r.target.y1-e.target.y1:e.target.column-r.target.column:r.circularLinkType===e.circularLinkType&&"bottom"==r.circularLinkType?r.target.column===e.target.column?e.target.y1-r.target.y1:r.target.column-e.target.column:"top"==r.circularLinkType?-1:1:void 0}));var c=a.y0;t.forEach((function(r){r.y0=c+r.width/2,c+=r.width})),t.forEach((function(r,e){if("bottom"==r.circularLinkType){for(var n=e+1,i=0;n1&&i.sort((function(r,e){if(!r.circular&&!e.circular){if(r.source.column==e.source.column)return r.y0-e.y0;if(!Y(r,e))return r.y0-e.y0;if(e.source.column0?"up":"down"}function Q(r,e){return A(r.source,e)==A(r.target,e)}},26800:function(r,e,n){"use strict";n.r(e),n.d(e,{sankey:function(){return P},sankeyCenter:function(){return d},sankeyJustify:function(){return u},sankeyLeft:function(){return o},sankeyLinkHorizontal:function(){return A},sankeyRight:function(){return c}});var i=n(84706),a=n(34712);function t(r){return r.target.depth}function o(r){return r.depth}function c(r,e){return e-1-r.height}function u(r,e){return r.sourceLinks.length?r.depth:e-1}function d(r){return r.targetLinks.length?r.depth:r.sourceLinks.length?(0,i.SY)(r.sourceLinks,t)-1:0}function s(r){return function(){return r}}function l(r,e){return p(r.source,e.source)||r.index-e.index}function m(r,e){return p(r.target,e.target)||r.index-e.index}function p(r,e){return r.y0-e.y0}function I(r){return r.value}function y(r){return(r.y0+r.y1)/2}function f(r){return y(r.source)*r.value}function g(r){return y(r.target)*r.value}function _(r){return r.index}function h(r){return r.nodes}function v(r){return r.links}function x(r,e){var n=r.get(e);if(!n)throw new Error("missing: "+e);return n}function P(){var r=0,e=0,n=1,t=1,o=24,c=8,d=_,P=u,G=h,C=v,S=32,A=2/3;function b(){var u={nodes:G.apply(null,arguments),links:C.apply(null,arguments)};return function(r){r.nodes.forEach((function(r,e){r.index=e,r.sourceLinks=[],r.targetLinks=[]}));var e=(0,a.kH)(r.nodes,d);r.links.forEach((function(r,n){r.index=n;var i=r.source,a=r.target;"object"!==typeof i&&(i=r.source=x(e,i)),"object"!==typeof a&&(a=r.target=x(e,a)),i.sourceLinks.push(r),a.targetLinks.push(r)}))}(u),function(r){r.nodes.forEach((function(r){r.value=Math.max((0,i.oh)(r.sourceLinks,I),(0,i.oh)(r.targetLinks,I))}))}(u),function(e){var i,a,t;for(i=e.nodes,a=[],t=0;i.length;++t,i=a,a=[])i.forEach((function(r){r.depth=t,r.sourceLinks.forEach((function(r){a.indexOf(r.target)<0&&a.push(r.target)}))}));for(i=e.nodes,a=[],t=0;i.length;++t,i=a,a=[])i.forEach((function(r){r.height=t,r.targetLinks.forEach((function(r){a.indexOf(r.source)<0&&a.push(r.source)}))}));var c=(n-r-o)/(t-1);e.nodes.forEach((function(e){e.x1=(e.x0=r+Math.max(0,Math.min(t-1,Math.floor(P.call(null,e,t))))*c)+o}))}(u),function(r){var n=(0,a.UJ)().key((function(r){return r.x0})).sortKeys(i.XE).entries(r.nodes).map((function(r){return r.values}));d(),m();for(var o=1,u=S;u>0;--u)l(o*=.99),m(),s(o),m();function d(){var a=(0,i.kv)(n,(function(r){return r.length})),o=A*(t-e)/(a-1);c>o&&(c=o);var u=(0,i.SY)(n,(function(r){return(t-e-(r.length-1)*c)/(0,i.oh)(r,I)}));n.forEach((function(r){r.forEach((function(r,e){r.y1=(r.y0=e)+r.value*u}))})),r.links.forEach((function(r){r.width=r.value*u}))}function s(r){n.forEach((function(e){e.forEach((function(e){if(e.targetLinks.length){var n=((0,i.oh)(e.targetLinks,f)/(0,i.oh)(e.targetLinks,I)-y(e))*r;e.y0+=n,e.y1+=n}}))}))}function l(r){n.slice().reverse().forEach((function(e){e.forEach((function(e){if(e.sourceLinks.length){var n=((0,i.oh)(e.sourceLinks,g)/(0,i.oh)(e.sourceLinks,I)-y(e))*r;e.y0+=n,e.y1+=n}}))}))}function m(){n.forEach((function(r){var n,i,a,o=e,u=r.length;for(r.sort(p),a=0;a0&&(n.y0+=i,n.y1+=i),o=n.y1+c;if((i=o-c-t)>0)for(o=n.y0-=i,n.y1-=i,a=u-2;a>=0;--a)(i=(n=r[a]).y1+c-o)>0&&(n.y0-=i,n.y1-=i),o=n.y0}))}}(u),M(u),u}function M(r){r.nodes.forEach((function(r){r.sourceLinks.sort(m),r.targetLinks.sort(l)})),r.nodes.forEach((function(r){var e=r.y0,n=e;r.sourceLinks.forEach((function(r){r.y0=e+r.width/2,e+=r.width})),r.targetLinks.forEach((function(r){r.y1=n+r.width/2,n+=r.width}))}))}return b.update=function(r){return M(r),r},b.nodeId=function(r){return arguments.length?(d="function"===typeof r?r:s(r),b):d},b.nodeAlign=function(r){return arguments.length?(P="function"===typeof r?r:s(r),b):P},b.nodeWidth=function(r){return arguments.length?(o=+r,b):o},b.nodePadding=function(r){return arguments.length?(c=+r,b):c},b.nodes=function(r){return arguments.length?(G="function"===typeof r?r:s(r),b):G},b.links=function(r){return arguments.length?(C="function"===typeof r?r:s(r),b):C},b.size=function(i){return arguments.length?(r=e=0,n=+i[0],t=+i[1],b):[n-r,t-e]},b.extent=function(i){return arguments.length?(r=+i[0][0],n=+i[1][0],e=+i[0][1],t=+i[1][1],b):[[r,e],[n,t]]},b.iterations=function(r){return arguments.length?(S=+r,b):S},b}var G=n(10132);function C(r){return[r.source.x1,r.y0]}function S(r){return[r.target.x0,r.y1]}function A(){return(0,G.ak)().source(C).target(S)}},33428:function(r,e,n){var i,a;(function(){var t={version:"3.8.2"},o=[].slice,c=function(r){return o.call(r)},u=self.document;function d(r){return r&&(r.ownerDocument||r.document||r).documentElement}function s(r){return r&&(r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView)}if(u)try{c(u.documentElement.childNodes)[0].nodeType}catch(gt){c=function(r){for(var e=r.length,n=new Array(e);e--;)n[e]=r[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),u)try{u.createElement("DIV").style.setProperty("opacity",0,"")}catch(_t){var l=this.Element.prototype,m=l.setAttribute,p=l.setAttributeNS,I=this.CSSStyleDeclaration.prototype,y=I.setProperty;l.setAttribute=function(r,e){m.call(this,r,e+"")},l.setAttributeNS=function(r,e,n){p.call(this,r,e,n+"")},I.setProperty=function(r,e,n){y.call(this,r,e+"",n)}}function f(r,e){return re?1:r>=e?0:NaN}function g(r){return null===r?NaN:+r}function _(r){return!isNaN(r)}function h(r){return{left:function(e,n,i,a){for(arguments.length<3&&(i=0),arguments.length<4&&(a=e.length);i>>1;r(e[t],n)<0?i=t+1:a=t}return i},right:function(e,n,i,a){for(arguments.length<3&&(i=0),arguments.length<4&&(a=e.length);i>>1;r(e[t],n)>0?a=t:i=t+1}return i}}}t.ascending=f,t.descending=function(r,e){return er?1:e>=r?0:NaN},t.min=function(r,e){var n,i,a=-1,t=r.length;if(1===arguments.length){for(;++a=i){n=i;break}for(;++ai&&(n=i)}else{for(;++a=i){n=i;break}for(;++ai&&(n=i)}return n},t.max=function(r,e){var n,i,a=-1,t=r.length;if(1===arguments.length){for(;++a=i){n=i;break}for(;++an&&(n=i)}else{for(;++a=i){n=i;break}for(;++an&&(n=i)}return n},t.extent=function(r,e){var n,i,a,t=-1,o=r.length;if(1===arguments.length){for(;++t=i){n=a=i;break}for(;++ti&&(n=i),a=i){n=a=i;break}for(;++ti&&(n=i),a1)return o/(u-1)},t.deviation=function(){var r=t.variance.apply(this,arguments);return r?Math.sqrt(r):r};var v=h(f);function x(r){return r.length}t.bisectLeft=v.left,t.bisect=t.bisectRight=v.right,t.bisector=function(r){return h(1===r.length?function(e,n){return f(r(e),n)}:r)},t.shuffle=function(r,e,n){(t=arguments.length)<3&&(n=r.length,t<2&&(e=0));for(var i,a,t=n-e;t;)a=Math.random()*t--|0,i=r[t+e],r[t+e]=r[a+e],r[a+e]=i;return r},t.permute=function(r,e){for(var n=e.length,i=new Array(n);n--;)i[n]=r[e[n]];return i},t.pairs=function(r){for(var e=0,n=r.length-1,i=r[0],a=new Array(n<0?0:n);e=0;)for(e=(i=r[a]).length;--e>=0;)n[--o]=i[e];return n};var P=Math.abs;function G(r,e){for(var n in e)Object.defineProperty(r.prototype,n,{value:e[n],enumerable:!1})}function C(){this._=Object.create(null)}t.range=function(r,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=r,r=0)),(e-r)/n===1/0)throw new Error("infinite range");var i,a=[],t=function(r){for(var e=1;r*e%1;)e*=10;return e}(P(n)),o=-1;if(r*=t,e*=t,(n*=t)<0)for(;(i=r+n*++o)>e;)a.push(i/t);else for(;(i=r+n*++o)=i.length)return e?e.call(n,t):r?t.sort(r):t;for(var u,d,s,l,m=-1,p=t.length,I=i[c++],y=new C;++m=i.length)return r;var n=[],t=a[e++];return r.forEach((function(r,i){n.push({key:r,values:c(i,e)})})),t?n.sort((function(r,e){return t(r.key,e.key)})):n}return n.map=function(r,e){return o(e,r,0)},n.entries=function(r){return c(o(t.map,r,0),0)},n.key=function(r){return i.push(r),n},n.sortKeys=function(r){return a[i.length-1]=r,n},n.sortValues=function(e){return r=e,n},n.rollup=function(r){return e=r,n},n},t.set=function(r){var e=new R;if(r)for(var n=0,i=r.length;n=0&&(i=r.slice(n+1),r=r.slice(0,n)),r)return arguments.length<2?this[r].on(i):this[r].on(i,e);if(2===arguments.length){if(null==e)for(r in this)this.hasOwnProperty(r)&&this[r].on(i,null);return this}},t.event=null,t.requote=function(r){return r.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,j={}.__proto__?function(r,e){r.__proto__=e}:function(r,e){for(var n in e)r[n]=e[n]};function W(r){return j(r,X),r}var Z=function(r,e){return e.querySelector(r)},q=function(r,e){return e.querySelectorAll(r)},Y=function(r,e){var n=r.matches||r[T(r,"matchesSelector")];return Y=function(r,e){return n.call(r,e)},Y(r,e)};"function"===typeof Sizzle&&(Z=function(r,e){return Sizzle(r,e)[0]||null},q=Sizzle,Y=Sizzle.matchesSelector),t.selection=function(){return t.select(u.documentElement)};var X=t.selection.prototype=[];function Q(r){return"function"===typeof r?r:function(){return Z(r,this)}}function $(r){return"function"===typeof r?r:function(){return q(r,this)}}X.select=function(r){var e,n,i,a,t=[];r=Q(r);for(var o=-1,c=this.length;++o=0&&"xmlns"!==(n=r.slice(0,e))&&(r=r.slice(e+1)),er.hasOwnProperty(n)?{space:er[n],local:r}:r}},X.attr=function(r,e){if(arguments.length<2){if("string"===typeof r){var n=this.node();return(r=t.ns.qualify(r)).local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}for(e in r)this.each(nr(e,r[e]));return this}return this.each(nr(r,e))},X.classed=function(r,e){if(arguments.length<2){if("string"===typeof r){var n=this.node(),i=(r=tr(r)).length,a=-1;if(e=n.classList){for(;++a=0;)(n=i[a])&&(t&&t!==n.nextSibling&&t.parentNode.insertBefore(n,t),t=n);return this},X.sort=function(r){r=Ir.apply(this,arguments);for(var e=-1,n=this.length;++e0&&(r=r.slice(0,a));var u=hr.get(r);function d(){var e=this[i];e&&(this.removeEventListener(r,e,e.$),delete this[i])}return u&&(r=u,o=xr),a?e?function(){var a=o(e,c(arguments));d.call(this),this.addEventListener(r,this[i]=a,a.$=n),a._=e}:d:e?J:function(){var e,n=new RegExp("^__on([^.]+)"+t.requote(r)+"$");for(var i in this)if(e=i.match(n)){var a=this[i];this.removeEventListener(e[1],a,a.$),delete this[i]}}}t.selection.enter=fr,t.selection.enter.prototype=gr,gr.append=X.append,gr.empty=X.empty,gr.node=X.node,gr.call=X.call,gr.size=X.size,gr.select=function(r){for(var e,n,i,a,t,o=[],c=-1,u=this.length;++c=e&&(e=a+1);!(o=c[e])&&++e1?wr:r<-1?-wr:Math.asin(r)}function Tr(r){return((r=Math.exp(r))+1/r)/2}var Dr=Math.SQRT2;t.interpolateZoom=function(r,e){var n,i,a=r[0],t=r[1],o=r[2],c=e[0],u=e[1],d=e[2],s=c-a,l=u-t,m=s*s+l*l;if(m0&&(r=r.transition().duration(y)),r.call(P.event)}function b(){c&&c.domain(o.range().map((function(r){return(r-m.x)/m.k})).map(o.invert)),l&&l.domain(d.range().map((function(r){return(r-m.y)/m.k})).map(d.invert))}function M(r){f++||r({type:"zoomstart"})}function B(r){b(),r({type:"zoom",scale:m.k,translate:[m.x,m.y]})}function k(r){--f||(r({type:"zoomend"}),e=null)}function F(){var r=this,e=x.of(r,arguments),n=0,i=t.select(s(r)).on(_,(function(){n=1,S(t.mouse(r),a),B(e)})).on(h,(function(){i.on(_,null).on(h,null),o(n),k(e)})),a=G(t.mouse(r)),o=Cr(r);Qa.call(r),M(e)}function z(){var r,e=this,n=x.of(e,arguments),i={},o=0,c=".zoom-"+t.event.changedTouches[0].identifier,u="touchmove"+c,d="touchend"+c,s=[],l=t.select(e),p=Cr(e);function I(){var n=t.touches(e);return r=m.k,n.forEach((function(r){r.identifier in i&&(i[r.identifier]=G(r))})),n}function y(){var r=t.event.target;t.select(r).on(u,f).on(d,_),s.push(r);for(var n=t.event.changedTouches,c=0,l=n.length;c1){g=p[0];var h=p[1],v=g[0]-h[0],x=g[1]-h[1];o=v*v+x*x}}function f(){var c,u,d,s,l=t.touches(e);Qa.call(e);for(var m=0,p=l.length;m360?r-=360:r<0&&(r+=360),r<60?i+(a-i)*r/60:r<180?a:r<240?i+(a-i)*(240-r)/60:i}(r))}return r=isNaN(r)?0:(r%=360)<0?r+360:r,e=isNaN(e)||e<0?0:e>1?1:e,i=2*(n=n<0?0:n>1?1:n)-(a=n<=.5?n*(1+e):n+e-n*e),new oe(t(r+120),t(r),t(r-120))}function jr(r,e,n){return this instanceof jr?(this.h=+r,this.c=+e,void(this.l=+n)):arguments.length<2?r instanceof jr?new jr(r.h,r.c,r.l):ne(r instanceof qr?r.l:(r=pe((r=t.rgb(r)).r,r.g,r.b)).l,r.a,r.b):new jr(r,e,n)}Kr.brighter=function(r){return r=Math.pow(.7,arguments.length?r:1),new Or(this.h,this.s,this.l/r)},Kr.darker=function(r){return r=Math.pow(.7,arguments.length?r:1),new Or(this.h,this.s,r*this.l)},Kr.rgb=function(){return Vr(this.h,this.s,this.l)},t.hcl=jr;var Wr=jr.prototype=new Lr;function Zr(r,e,n){return isNaN(r)&&(r=0),isNaN(e)&&(e=0),new qr(n,Math.cos(r*=Rr)*e,Math.sin(r)*e)}function qr(r,e,n){return this instanceof qr?(this.l=+r,this.a=+e,void(this.b=+n)):arguments.length<2?r instanceof qr?new qr(r.l,r.a,r.b):r instanceof jr?Zr(r.h,r.c,r.l):pe((r=oe(r)).r,r.g,r.b):new qr(r,e,n)}Wr.brighter=function(r){return new jr(this.h,this.c,Math.min(100,this.l+Yr*(arguments.length?r:1)))},Wr.darker=function(r){return new jr(this.h,this.c,Math.max(0,this.l-Yr*(arguments.length?r:1)))},Wr.rgb=function(){return Zr(this.h,this.c,this.l).rgb()},t.lab=qr;var Yr=18,Xr=.95047,Qr=1,$r=1.08883,re=qr.prototype=new Lr;function ee(r,e,n){var i=(r+16)/116,a=i+e/500,t=i-n/200;return new oe(te(3.2404542*(a=ie(a)*Xr)-1.5371385*(i=ie(i)*Qr)-.4985314*(t=ie(t)*$r)),te(-.969266*a+1.8760108*i+.041556*t),te(.0556434*a-.2040259*i+1.0572252*t))}function ne(r,e,n){return r>0?new jr(Math.atan2(n,e)*Er,Math.sqrt(e*e+n*n),r):new jr(NaN,NaN,r)}function ie(r){return r>.206893034?r*r*r:(r-4/29)/7.787037}function ae(r){return r>.008856?Math.pow(r,1/3):7.787037*r+4/29}function te(r){return Math.round(255*(r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055))}function oe(r,e,n){return this instanceof oe?(this.r=~~r,this.g=~~e,void(this.b=~~n)):arguments.length<2?r instanceof oe?new oe(r.r,r.g,r.b):le(""+r,oe,Vr):new oe(r,e,n)}function ce(r){return new oe(r>>16,r>>8&255,255&r)}function ue(r){return ce(r)+""}re.brighter=function(r){return new qr(Math.min(100,this.l+Yr*(arguments.length?r:1)),this.a,this.b)},re.darker=function(r){return new qr(Math.max(0,this.l-Yr*(arguments.length?r:1)),this.a,this.b)},re.rgb=function(){return ee(this.l,this.a,this.b)},t.rgb=oe;var de=oe.prototype=new Lr;function se(r){return r<16?"0"+Math.max(0,r).toString(16):Math.min(255,r).toString(16)}function le(r,e,n){var i,a,t,o=0,c=0,u=0;if(i=/([a-z]+)\((.*)\)/.exec(r=r.toLowerCase()))switch(a=i[2].split(","),i[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(ye(a[0]),ye(a[1]),ye(a[2]))}return(t=fe.get(r))?e(t.r,t.g,t.b):(null==r||"#"!==r.charAt(0)||isNaN(t=parseInt(r.slice(1),16))||(4===r.length?(o=(3840&t)>>4,o|=o>>4,c=240&t,c|=c>>4,u=15&t,u|=u<<4):7===r.length&&(o=(16711680&t)>>16,c=(65280&t)>>8,u=255&t)),e(o,c,u))}function me(r,e,n){var i,a,t=Math.min(r/=255,e/=255,n/=255),o=Math.max(r,e,n),c=o-t,u=(o+t)/2;return c?(a=u<.5?c/(o+t):c/(2-o-t),i=r==o?(e-n)/c+(e0&&u<1?0:i),new Or(i,a,u)}function pe(r,e,n){var i=ae((.4124564*(r=Ie(r))+.3575761*(e=Ie(e))+.1804375*(n=Ie(n)))/Xr),a=ae((.2126729*r+.7151522*e+.072175*n)/Qr);return qr(116*a-16,500*(i-a),200*(a-ae((.0193339*r+.119192*e+.9503041*n)/$r)))}function Ie(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function ye(r){var e=parseFloat(r);return"%"===r.charAt(r.length-1)?Math.round(2.55*e):e}de.brighter=function(r){r=Math.pow(.7,arguments.length?r:1);var e=this.r,n=this.g,i=this.b,a=30;return e||n||i?(e&&e=200&&e<300||304===e){try{r=n.call(a,d)}catch(gt){return void o.error.call(a,gt)}o.load.call(a,r)}else o.error.call(a,d)}return self.XDomainRequest&&!("withCredentials"in d)&&/^(http(s)?:)?\/\//.test(r)&&(d=new XDomainRequest),"onload"in d?d.onload=d.onerror=l:d.onreadystatechange=function(){d.readyState>3&&l()},d.onprogress=function(r){var e=t.event;t.event=r;try{o.progress.call(a,d)}finally{t.event=e}},a.header=function(r,e){return r=(r+"").toLowerCase(),arguments.length<2?u[r]:(null==e?delete u[r]:u[r]=e+"",a)},a.mimeType=function(r){return arguments.length?(e=null==r?null:r+"",a):e},a.responseType=function(r){return arguments.length?(s=r,a):s},a.response=function(r){return n=r,a},["get","post"].forEach((function(r){a[r]=function(){return a.send.apply(a,[r].concat(c(arguments)))}})),a.send=function(n,i,t){if(2===arguments.length&&"function"===typeof i&&(t=i,i=null),d.open(n,r,!0),null==e||"accept"in u||(u.accept=e+",*/*"),d.setRequestHeader)for(var c in u)d.setRequestHeader(c,u[c]);return null!=e&&d.overrideMimeType&&d.overrideMimeType(e),null!=s&&(d.responseType=s),null!=t&&a.on("error",t).on("load",(function(r){t(null,r)})),o.beforesend.call(a,d),d.send(null==i?null:i),a},a.abort=function(){return d.abort(),a},t.rebind(a,o,"on"),null==i?a:a.get(function(r){return 1===r.length?function(e,n){r(null==e?n:null)}:r}(i))}fe.forEach((function(r,e){fe.set(r,ce(e))})),t.functor=ge,t.xhr=_e(E),t.dsv=function(r,e){var n=new RegExp('["'+r+"\n]"),i=r.charCodeAt(0);function a(r,n,i){arguments.length<3&&(i=n,n=null);var a=he(r,e,null==n?t:o(n),i);return a.row=function(r){return arguments.length?a.response(null==(n=r)?t:o(r)):n},a}function t(r){return a.parse(r.responseText)}function o(r){return function(e){return a.parse(e.responseText,r)}}function c(e){return e.map(u).join(r)}function u(r){return n.test(r)?'"'+r.replace(/\"/g,'""')+'"':r}return a.parse=function(r,e){var n;return a.parseRows(r,(function(r,i){if(n)return n(r,i-1);var a=function(e){for(var n={},i=r.length,a=0;a=u)return o;if(a)return a=!1,t;var e=d;if(34===r.charCodeAt(e)){for(var n=e;n++24?(isFinite(e)&&(clearTimeout(Ge),Ge=setTimeout(Ae,e)),Pe=0):(Pe=1,Ce(Ae))}function be(){for(var r=Date.now(),e=ve;e;)r>=e.t&&e.c(r-e.t)&&(e.c=null),e=e.n;return r}function Me(){for(var r,e=ve,n=1/0;e;)e.c?(e.t1&&(e=r[t[o-2]],n=r[t[o-1]],i=r[c],(n[0]-e[0])*(i[1]-e[1])-(n[1]-e[1])*(i[0]-e[0])<=0);)--o;t[o++]=c}return t.slice(0,o)}function ze(r,e){return r[0]-e[0]||r[1]-e[1]}t.timer=function(){Se.apply(this,arguments)},t.timer.flush=function(){be(),Me()},t.round=function(r,e){return e?Math.round(r*(e=Math.pow(10,e)))/e:Math.round(r)},t.geom={},t.geom.hull=function(r){var e=Be,n=ke;if(arguments.length)return i(r);function i(r){if(r.length<3)return[];var i,a=ge(e),t=ge(n),o=r.length,c=[],u=[];for(i=0;i=0;--i)p.push(r[c[d[i]][2]]);for(i=+l;iMr)c=c.L;else{if(!((a=t-Ye(c,o))>Mr)){i>-Mr?(e=c.P,n=c):a>-Mr?(e=c,n=c.N):e=n=c;break}if(!c.R){e=c;break}c=c.R}var u=Ve(r);if(Je.insert(e,u),e||n){if(e===n)return en(e),n=Ve(e.site),Je.insert(u,n),u.edge=n.edge=tn(e.site,u.site),rn(e),void rn(n);if(n){en(e),en(n);var d=e.site,s=d.x,l=d.y,m=r.x-s,p=r.y-l,I=n.site,y=I.x-s,f=I.y-l,g=2*(m*f-p*y),_=m*m+p*p,h=y*y+f*f,v={x:(f*_-p*h)/g+s,y:(m*h-y*_)/g+l};cn(n.edge,d,I,v),u.edge=tn(d,r,null,v),n.edge=tn(r,I,null,v),rn(e),rn(n)}else u.edge=tn(e.site,u.site)}}function qe(r,e){var n=r.site,i=n.x,a=n.y,t=a-e;if(!t)return i;var o=r.P;if(!o)return-1/0;var c=(n=o.site).x,u=n.y,d=u-e;if(!d)return c;var s=c-i,l=1/t-1/d,m=s/d;return l?(-m+Math.sqrt(m*m-2*l*(s*s/(-2*d)-u+d/2+a-t/2)))/l+i:(i+c)/2}function Ye(r,e){var n=r.N;if(n)return qe(n,e);var i=r.site;return i.y===e?i.x:1/0}function Xe(r){this.site=r,this.edges=[]}function Qe(r,e){return e.angle-r.angle}function $e(){sn(this),this.x=this.y=this.arc=this.site=this.cy=null}function rn(r){var e=r.P,n=r.N;if(e&&n){var i=e.site,a=r.site,t=n.site;if(i!==t){var o=a.x,c=a.y,u=i.x-o,d=i.y-c,s=t.x-o,l=2*(u*(f=t.y-c)-d*s);if(!(l>=-Br)){var m=u*u+d*d,p=s*s+f*f,I=(f*m-d*p)/l,y=(u*p-s*m)/l,f=y+c,g=Oe.pop()||new $e;g.arc=r,g.site=a,g.x=I+o,g.y=f+Math.sqrt(I*I+y*y),g.cy=f,r.circle=g;for(var _=null,h=He._;h;)if(g.y=c)return;if(m>I){if(t){if(t.y>=d)return}else t={x:f,y:u};n={x:f,y:d}}else{if(t){if(t.y1)if(m>I){if(t){if(t.y>=d)return}else t={x:(u-a)/i,y:u};n={x:(d-a)/i,y:d}}else{if(t){if(t.y=c)return}else t={x:o,y:i*o+a};n={x:c,y:i*c+a}}else{if(t){if(t.x0)){if(e/=m,m<0){if(e0){if(e>l)return;e>s&&(s=e)}if(e=a-u,m||!(e<0)){if(e/=m,m<0){if(e>l)return;e>s&&(s=e)}else if(m>0){if(e0)){if(e/=p,p<0){if(e0){if(e>l)return;e>s&&(s=e)}if(e=t-d,p||!(e<0)){if(e/=p,p<0){if(e>l)return;e>s&&(s=e)}else if(p>0){if(e0&&(r.a={x:u+s*m,y:d+s*p}),l<1&&(r.b={x:u+l*m,y:d+l*p}),r}}}}}),u=o.length;u--;)(!nn(e=o[u],r)||!c(e)||P(e.a.x-e.b.x)Mr||P(a-n)>Mr)&&(c.splice(o,0,new un(on(t.site,s,P(i-l)Mr?{x:l,y:P(e-l)Mr?{x:P(n-I)Mr?{x:m,y:P(e-m)Mr?{x:P(n-p)=n&&d.x<=a&&d.y>=i&&d.y<=o?[[n,o],[a,o],[a,i],[n,i]]:[]).point=r[c]})),e}function c(r){return r.map((function(r,e){return{x:Math.round(i(r,e)/Mr)*Mr,y:Math.round(a(r,e)/Mr)*Mr,i:e}}))}return o.links=function(r){return In(c(r)).edges.filter((function(r){return r.l&&r.r})).map((function(e){return{source:r[e.l.i],target:r[e.r.i]}}))},o.triangles=function(r){var e=[];return In(c(r)).cells.forEach((function(n,i){for(var a,t,o,c,u=n.site,d=n.edges.sort(Qe),s=-1,l=d.length,m=d[l-1].edge,p=m.l===u?m.r:m.l;++st&&(a=e.slice(t,a),c[o]?c[o]+=a:c[++o]=a),(n=n[0])===(i=i[0])?c[o]?c[o]+=i:c[++o]=i:(c[++o]=null,u.push({i:o,x:Pn(n,i)})),t=Sn.lastIndex;return ty&&(y=u.x),u.y>f&&(f=u.y),d.push(u.x),s.push(u.y);else for(l=0;ly&&(y=h),v>f&&(f=v),d.push(h),s.push(v)}var x=y-p,G=f-I;function C(r,e,n,i,a,t,o,c){if(!isNaN(n)&&!isNaN(i))if(r.leaf){var u=r.x,d=r.y;if(null!=u)if(P(u-n)+P(d-i)<.01)S(r,e,n,i,a,t,o,c);else{var s=r.point;r.x=r.y=r.point=null,S(r,s,u,d,a,t,o,c),S(r,e,n,i,a,t,o,c)}else r.x=n,r.y=i,r.point=e}else S(r,e,n,i,a,t,o,c)}function S(r,e,n,i,a,t,o,c){var u=.5*(a+o),d=.5*(t+c),s=n>=u,l=i>=d,m=l<<1|s;r.leaf=!1,s?a=u:o=u,l?t=d:c=d,C(r=r.nodes[m]||(r.nodes[m]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,n,i,a,t,o,c)}x>G?f=I+x:y=p+G;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(r){C(A,r,+g(r,++l),+_(r,l),p,I,y,f)},visit:function(r){hn(r,A,p,I,y,f)},find:function(r){return function(r,e,n,i,a,t,o){var c,u=1/0;return function r(d,s,l,m,p){if(!(s>t||l>o||m=x)<<1|e>=v,G=P+4;P=0&&!(n=t.interpolators[i](r,e)););return n}function bn(r,e){var n,i=[],a=[],t=r.length,o=e.length,c=Math.min(r.length,e.length);for(n=0;n=1)return 1;var e=r*r,n=e*r;return 4*(r<.5?n:3*(r-e)+n-.75)}function Nn(r){return 1-Math.cos(r*wr)}function Tn(r){return Math.pow(2,10*(r-1))}function Dn(r){return 1-Math.sqrt(1-r*r)}function Jn(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375}function Un(r,e){return e-=r,function(n){return Math.round(r+e*n)}}function Hn(r){var e,n,i,a=[r.a,r.b],t=[r.c,r.d],o=On(a),c=Ln(a,t),u=On(((e=t)[0]+=(i=-c)*(n=a)[0],e[1]+=i*n[1],e))||0;a[0]*t[1]=0?r.slice(0,n):r,a=n>=0?r.slice(n+1):"in";return i=Bn.get(i)||Mn,a=kn.get(a)||E,e=a(i.apply(null,o.call(arguments,1))),function(r){return r<=0?0:r>=1?1:e(r)}},t.interpolateHcl=function(r,e){r=t.hcl(r),e=t.hcl(e);var n=r.h,i=r.c,a=r.l,o=e.h-n,c=e.c-i,u=e.l-a;return isNaN(c)&&(c=0,i=isNaN(i)?e.c:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(r){return Zr(n+o*r,i+c*r,a+u*r)+""}},t.interpolateHsl=function(r,e){r=t.hsl(r),e=t.hsl(e);var n=r.h,i=r.s,a=r.l,o=e.h-n,c=e.s-i,u=e.l-a;return isNaN(c)&&(c=0,i=isNaN(i)?e.s:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(r){return Vr(n+o*r,i+c*r,a+u*r)+""}},t.interpolateLab=function(r,e){r=t.lab(r),e=t.lab(e);var n=r.l,i=r.a,a=r.b,o=e.l-n,c=e.a-i,u=e.b-a;return function(r){return ee(n+o*r,i+c*r,a+u*r)+""}},t.interpolateRound=Un,t.transform=function(r){var e=u.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(r){if(null!=r){e.setAttribute("transform",r);var n=e.transform.baseVal.consolidate()}return new Hn(n?n.matrix:Kn)})(r)},Hn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Kn={a:1,b:0,c:0,d:1,e:0,f:0};function Vn(r){return r.length?r.pop()+",":""}function jn(r,e){var n=[],i=[];return r=t.transform(r),e=t.transform(e),function(r,e,n,i){if(r[0]!==e[0]||r[1]!==e[1]){var a=n.push("translate(",null,",",null,")");i.push({i:a-4,x:Pn(r[0],e[0])},{i:a-2,x:Pn(r[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(r.translate,e.translate,n,i),function(r,e,n,i){r!==e?(r-e>180?e+=360:e-r>180&&(r+=360),i.push({i:n.push(Vn(n)+"rotate(",null,")")-2,x:Pn(r,e)})):e&&n.push(Vn(n)+"rotate("+e+")")}(r.rotate,e.rotate,n,i),function(r,e,n,i){r!==e?i.push({i:n.push(Vn(n)+"skewX(",null,")")-2,x:Pn(r,e)}):e&&n.push(Vn(n)+"skewX("+e+")")}(r.skew,e.skew,n,i),function(r,e,n,i){if(r[0]!==e[0]||r[1]!==e[1]){var a=n.push(Vn(n)+"scale(",null,",",null,")");i.push({i:a-4,x:Pn(r[0],e[0])},{i:a-2,x:Pn(r[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(Vn(n)+"scale("+e+")")}(r.scale,e.scale,n,i),r=e=null,function(r){for(var e,a=-1,t=i.length;++a0?n=e:(r.c=null,r.t=NaN,r=null,u.end({type:"end",alpha:n=0})):e>0&&(u.start({type:"start",alpha:n=e}),r=Se(c.tick)),c):n},c.start=function(){var r,e,n,t=g.length,u=_.length,s=d[0],I=d[1];for(r=0;r=0;)n.push(a[i])}function ci(r,e){for(var n=[r],i=[];null!=(r=n.pop());)if(i.push(r),(t=r.children)&&(a=t.length))for(var a,t,o=-1;++o=0;)o.push(s=d[u]),s.parent=t,s.depth=t.depth+1;n&&(t.value=0),t.children=d}else n&&(t.value=+n.call(i,t,t.depth)||0),delete t.children;return ci(a,(function(e){var i,a;r&&(i=e.children)&&i.sort(r),n&&(a=e.parent)&&(a.value+=e.value)})),c}return i.sort=function(e){return arguments.length?(r=e,i):r},i.children=function(r){return arguments.length?(e=r,i):e},i.value=function(r){return arguments.length?(n=r,i):n},i.revalue=function(r){return n&&(oi(r,(function(r){r.children&&(r.value=0)})),ci(r,(function(r){var e;r.children||(r.value=+n.call(i,r,r.depth)||0),(e=r.parent)&&(e.value+=r.value)}))),r},i},t.layout.partition=function(){var r=t.layout.hierarchy(),e=[1,1];function n(r,e,i,a){var t=r.children;if(r.x=e,r.y=r.depth*a,r.dx=i,r.dy=a,t&&(o=t.length)){var o,c,u,d=-1;for(i=r.value?i/r.value:0;++dc&&(c=i),o.push(i)}for(n=0;na&&(i=n,a=e);return i}function xi(r){return r.reduce(Pi,0)}function Pi(r,e){return r+e[1]}function Gi(r,e){return Ci(r,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ci(r,e){for(var n=-1,i=+r[0],a=(r[1]-i)/e,t=[];++n<=e;)t[n]=a*n+i;return t}function Si(r){return[t.min(r),t.max(r)]}function Ai(r,e){return r.value-e.value}function bi(r,e){var n=r._pack_next;r._pack_next=e,e._pack_prev=r,e._pack_next=n,n._pack_prev=e}function Mi(r,e){r._pack_next=e,e._pack_prev=r}function Bi(r,e){var n=e.x-r.x,i=e.y-r.y,a=r.r+e.r;return.999*a*a>n*n+i*i}function ki(r){if((e=r.children)&&(u=e.length)){var e,n,i,a,t,o,c,u,d=1/0,s=-1/0,l=1/0,m=-1/0;if(e.forEach(Fi),(n=e[0]).x=-n.r,n.y=0,h(n),u>1&&((i=e[1]).x=i.r,i.y=0,h(i),u>2))for(Ri(n,i,a=e[2]),h(a),bi(n,a),n._pack_prev=a,bi(a,i),i=n._pack_next,t=3;t0)for(o=-1;++o=l[0]&&u<=l[1]&&((c=d[t.bisect(m,u,1,I)-1]).y+=y,c.push(a[o]));return d}return a.value=function(r){return arguments.length?(e=r,a):e},a.range=function(r){return arguments.length?(n=ge(r),a):n},a.bins=function(r){return arguments.length?(i="number"===typeof r?function(e){return Ci(e,r)}:ge(r),a):i},a.frequency=function(e){return arguments.length?(r=!!e,a):r},a},t.layout.pack=function(){var r,e=t.layout.hierarchy().sort(Ai),n=0,i=[1,1];function a(a,t){var o=e.call(this,a,t),c=o[0],u=i[0],d=i[1],s=null==r?Math.sqrt:"function"===typeof r?r:function(){return r};if(c.x=c.y=0,ci(c,(function(r){r.r=+s(r.value)})),ci(c,ki),n){var l=n*(r?1:Math.max(2*c.r/u,2*c.r/d))/2;ci(c,(function(r){r.r+=l})),ci(c,ki),ci(c,(function(r){r.r-=l}))}return wi(c,u/2,d/2,r?1:1/Math.max(2*c.r/u,2*c.r/d)),o}return a.size=function(r){return arguments.length?(i=r,a):i},a.radius=function(e){return arguments.length?(r=null==e||"function"===typeof e?e:+e,a):r},a.padding=function(r){return arguments.length?(n=+r,a):n},ti(a,e)},t.layout.tree=function(){var r=t.layout.hierarchy().sort(null).value(null),e=Ei,n=[1,1],i=null;function a(a,t){var d=r.call(this,a,t),s=d[0],l=function(r){for(var e,n={A:null,children:[r]},i=[n];null!=(e=i.pop());)for(var a,t=e.children,o=0,c=t.length;op.x&&(p=r),r.depth>I.depth&&(I=r)}));var y=e(m,p)/2-m.x,f=n[0]/(p.x+e(p,m)/2+y),g=n[1]/(I.depth||1);oi(s,(function(r){r.x=(r.x+y)*f,r.y=r.depth*g}))}return d}function o(r){var n=r.children,i=r.parent.children,a=r.i?i[r.i-1]:null;if(n.length){!function(r){for(var e,n=0,i=0,a=r.children,t=a.length;--t>=0;)(e=a[t]).z+=n,e.m+=n,n+=e.s+(i+=e.c)}(r);var t=(n[0].z+n[n.length-1].z)/2;a?(r.z=a.z+e(r._,a._),r.m=r.z-t):r.z=t}else a&&(r.z=a.z+e(r._,a._));r.parent.A=function(r,n,i){if(n){for(var a,t=r,o=r,c=n,u=t.parent.children[0],d=t.m,s=o.m,l=c.m,m=u.m;c=Ti(c),t=Ni(t),c&&t;)u=Ni(u),(o=Ti(o)).a=r,(a=c.z+l-t.z-d+e(c._,t._))>0&&(Di(Ji(c,r,i),r,a),d+=a,s+=a),l+=c.m,d+=t.m,m+=u.m,s+=o.m;c&&!Ti(o)&&(o.t=c,o.m+=l-s),t&&!Ni(u)&&(u.t=t,u.m+=d-m,i=r)}return i}(r,a,r.parent.A||i[0])}function c(r){r._.x=r.z+r.parent.m,r.m+=r.parent.m}function u(r){r.x*=n[0],r.y=r.depth*n[1]}return a.separation=function(r){return arguments.length?(e=r,a):e},a.size=function(r){return arguments.length?(i=null==(n=r)?u:null,a):i?null:n},a.nodeSize=function(r){return arguments.length?(i=null==(n=r)?null:u,a):i?n:null},ti(a,r)},t.layout.cluster=function(){var r=t.layout.hierarchy().sort(null).value(null),e=Ei,n=[1,1],i=!1;function a(a,o){var c,u=r.call(this,a,o),d=u[0],s=0;ci(d,(function(r){var n=r.children;n&&n.length?(r.x=function(r){return r.reduce((function(r,e){return r+e.x}),0)/r.length}(n),r.y=function(r){return 1+t.max(r,(function(r){return r.y}))}(n)):(r.x=c?s+=e(r,c):0,r.y=0,c=r)}));var l=Ui(d),m=Hi(d),p=l.x-e(l,m)/2,I=m.x+e(m,l)/2;return ci(d,i?function(r){r.x=(r.x-d.x)*n[0],r.y=(d.y-r.y)*n[1]}:function(r){r.x=(r.x-p)/(I-p)*n[0],r.y=(1-(d.y?r.y/d.y:1))*n[1]}),u}return a.separation=function(r){return arguments.length?(e=r,a):e},a.size=function(r){return arguments.length?(i=null==(n=r),a):i?null:n},a.nodeSize=function(r){return arguments.length?(i=null!=(n=r),a):i?n:null},ti(a,r)},t.layout.treemap=function(){var r,e=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=Li,c=!1,u="squarify",d=.5*(1+Math.sqrt(5));function s(r,e){for(var n,i,a=-1,t=r.length;++a0;)c.push(n=d[a-1]),c.area+=n.area,"squarify"!==u||(i=p(c,y))<=m?(d.pop(),m=i):(c.area-=c.pop().area,I(c,y,t,!1),y=Math.min(t.dx,t.dy),c.length=c.area=0,m=1/0);c.length&&(I(c,y,t,!0),c.length=c.area=0),e.forEach(l)}}function m(r){var e=r.children;if(e&&e.length){var n,i=o(r),a=e.slice(),t=[];for(s(a,i.dx*i.dy/r.value),t.area=0;n=a.pop();)t.push(n),t.area+=n.area,null!=n.z&&(I(t,n.z?i.dx:i.dy,i,!a.length),t.length=t.area=0);e.forEach(m)}}function p(r,e){for(var n,i=r.area,a=0,t=1/0,o=-1,c=r.length;++oa&&(a=n));return e*=e,(i*=i)?Math.max(e*a*d/i,i/(e*t*d)):1/0}function I(r,e,i,a){var t,o=-1,c=r.length,u=i.x,d=i.y,s=e?n(r.area/e):0;if(e==i.dx){for((a||s>i.dy)&&(s=i.dy);++oi.dx)&&(s=i.dx);++o1);return r+e*n*Math.sqrt(-2*Math.log(a)/a)}},logNormal:function(){var r=t.random.normal.apply(t,arguments);return function(){return Math.exp(r())}},bates:function(r){var e=t.random.irwinHall(r);return function(){return e()/r}},irwinHall:function(r){return function(){for(var e=0,n=0;n2?Yi:ji,u=i?Zn:Wn;return a=o(r,e,u,n),t=o(e,r,u,An),c}function c(r){return a(r)}return c.invert=function(r){return t(r)},c.domain=function(e){return arguments.length?(r=e.map(Number),o()):r},c.range=function(r){return arguments.length?(e=r,o()):e},c.rangeRound=function(r){return c.range(r).interpolate(Un)},c.clamp=function(r){return arguments.length?(i=r,o()):i},c.interpolate=function(r){return arguments.length?(n=r,o()):n},c.ticks=function(e){return ea(r,e)},c.tickFormat=function(e,n){return d3_scale_linearTickFormat(r,e,n)},c.nice=function(e){return $i(r,e),o()},c.copy=function(){return Xi(r,e,n,i)},o()}function Qi(r,e){return t.rebind(r,e,"range","rangeRound","interpolate","clamp")}function $i(r,e){return Wi(r,Zi(ra(r,e)[2])),Wi(r,Zi(ra(r,e)[2])),r}function ra(r,e){null==e&&(e=10);var n=Ki(r),i=n[1]-n[0],a=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),t=e/i*a;return t<=.15?a*=10:t<=.35?a*=5:t<=.75&&(a*=2),n[0]=Math.ceil(n[0]/a)*a,n[1]=Math.floor(n[1]/a)*a+.5*a,n[2]=a,n}function ea(r,e){return t.range.apply(t,ra(r,e))}function na(r,e,n,i){function a(r){return(n?Math.log(r<0?0:r):-Math.log(r>0?0:-r))/Math.log(e)}function t(r){return n?Math.pow(e,r):-Math.pow(e,-r)}function o(e){return r(a(e))}return o.invert=function(e){return t(r.invert(e))},o.domain=function(e){return arguments.length?(n=e[0]>=0,r.domain((i=e.map(Number)).map(a)),o):i},o.base=function(n){return arguments.length?(e=+n,r.domain(i.map(a)),o):e},o.nice=function(){var e=Wi(i.map(a),n?Math:ia);return r.domain(e),i=e.map(t),o},o.ticks=function(){var r=Ki(i),o=[],c=r[0],u=r[1],d=Math.floor(a(c)),s=Math.ceil(a(u)),l=e%1?2:e;if(isFinite(s-d)){if(n){for(;d0;m--)o.push(t(d)*m);for(d=0;o[d]u;s--);o=o.slice(d,s)}return o},o.copy=function(){return na(r.copy(),e,n,i)},Qi(o,r)}t.scale.linear=function(){return Xi([0,1],[0,1],An,!1)},t.scale.log=function(){return na(t.scale.linear().domain([0,1]),10,!0,[1,10])};var ia={floor:function(r){return-Math.ceil(-r)},ceil:function(r){return-Math.floor(-r)}};function aa(r,e,n){var i=ta(e),a=ta(1/e);function t(e){return r(i(e))}return t.invert=function(e){return a(r.invert(e))},t.domain=function(e){return arguments.length?(r.domain((n=e.map(Number)).map(i)),t):n},t.ticks=function(r){return ea(n,r)},t.tickFormat=function(r,e){return d3_scale_linearTickFormat(n,r,e)},t.nice=function(r){return t.domain($i(n,r))},t.exponent=function(o){return arguments.length?(i=ta(e=o),a=ta(1/e),r.domain(n.map(i)),t):e},t.copy=function(){return aa(r.copy(),e,n)},Qi(t,r)}function ta(r){return function(e){return e<0?-Math.pow(-e,r):Math.pow(e,r)}}function oa(r,e){var n,i,a;function o(a){return i[((n.get(a)||("range"===e.t?n.set(a,r.push(a)):NaN))-1)%i.length]}function c(e,n){return t.range(r.length).map((function(r){return e+n*r}))}return o.domain=function(i){if(!arguments.length)return r;r=[],n=new C;for(var a,t=-1,c=i.length;++t0?n[i-1]:r[0],il?0:1;if(d=zr)return u(d,p)+(c?u(c,1-p):"")+"Z";var I,y,f,g,_,h,v,x,P,G,C,S,A=0,b=0,M=[];if((g=(+o.apply(this,arguments)||0)/2)&&(f=i===fa?Math.sqrt(c*c+d*d):+i.apply(this,arguments),p||(b*=-1),d&&(b=Nr(f/d*Math.sin(g))),c&&(A=Nr(f/c*Math.sin(g)))),d){_=d*Math.cos(s+b),h=d*Math.sin(s+b),v=d*Math.cos(l-b),x=d*Math.sin(l-b);var B=Math.abs(l-s-2*b)<=kr?0:1;if(b&&Pa(_,h,v,x)===p^B){var k=(s+l)/2;_=d*Math.cos(k),h=d*Math.sin(k),v=x=null}}else _=h=0;if(c){P=c*Math.cos(l-A),G=c*Math.sin(l-A),C=c*Math.cos(s+A),S=c*Math.sin(s+A);var F=Math.abs(s-l+2*A)<=kr?0:1;if(A&&Pa(P,G,C,S)===1-p^F){var z=(s+l)/2;P=c*Math.cos(z),G=c*Math.sin(z),C=S=null}}else P=G=0;if(m>Mr&&(I=Math.min(Math.abs(d-c)/2,+n.apply(this,arguments)))>.001){y=c0?0:1}function Ga(r,e,n,i,a){var t=r[0]-e[0],o=r[1]-e[1],c=(a?i:-i)/Math.sqrt(t*t+o*o),u=c*o,d=-c*t,s=r[0]+u,l=r[1]+d,m=e[0]+u,p=e[1]+d,I=(s+m)/2,y=(l+p)/2,f=m-s,g=p-l,_=f*f+g*g,h=n-i,v=s*p-m*l,x=(g<0?-1:1)*Math.sqrt(Math.max(0,h*h*_-v*v)),P=(v*g-f*x)/_,G=(-v*f-g*x)/_,C=(v*g+f*x)/_,S=(-v*f+g*x)/_,A=P-I,b=G-y,M=C-I,B=S-y;return A*A+b*b>M*M+B*B&&(P=C,G=S),[[P-u,G-d],[P*n/h,G*n/h]]}function Ca(){return!0}function Sa(r){var e=Be,n=ke,i=Ca,a=ba,t=a.key,o=.7;function c(t){var c,u=[],d=[],s=-1,l=t.length,m=ge(e),p=ge(n);function I(){u.push("M",a(r(d),o))}for(;++s1&&a.push("H",i[0]),a.join("")},"step-before":Ba,"step-after":ka,basis:wa,"basis-open":function(r){if(r.length<4)return ba(r);for(var e,n=[],i=-1,a=r.length,t=[0],o=[0];++i<3;)e=r[i],t.push(e[0]),o.push(e[1]);for(n.push(Ra(Ta,t)+","+Ra(Ta,o)),--i;++i9&&(a=3*e/Math.sqrt(a),o[c]=a*n,o[c+1]=a*i);for(c=-1;++c<=u;)a=(r[Math.min(u,c+1)][0]-r[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),t.push([a||0,o[c]*a||0]);return t}(r))}});function ba(r){return r.length>1?r.join("L"):r+"Z"}function Ma(r){return r.join("L")+"Z"}function Ba(r){for(var e=0,n=r.length,i=r[0],a=[i[0],",",i[1]];++e1){c=e[1],t=r[u],u++,i+="C"+(a[0]+o[0])+","+(a[1]+o[1])+","+(t[0]-c[0])+","+(t[1]-c[1])+","+t[0]+","+t[1];for(var d=2;dkr)+",1 "+e}function u(r,e,n,i){return"Q 0,0 "+i}return t.radius=function(r){return arguments.length?(n=ge(r),t):n},t.source=function(e){return arguments.length?(r=ge(e),t):r},t.target=function(r){return arguments.length?(e=ge(r),t):e},t.startAngle=function(r){return arguments.length?(i=ge(r),t):i},t.endAngle=function(r){return arguments.length?(a=ge(r),t):a},t},t.svg.diagonal=function(){var r=La,e=Oa,n=Va;function i(i,a){var t=r.call(this,i,a),o=e.call(this,i,a),c=(t.y+o.y)/2,u=[t,{x:t.x,y:c},{x:o.x,y:c},o];return"M"+(u=u.map(n))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}return i.source=function(e){return arguments.length?(r=ge(e),i):r},i.target=function(r){return arguments.length?(e=ge(r),i):e},i.projection=function(r){return arguments.length?(n=r,i):n},i},t.svg.diagonal.radial=function(){var r=t.svg.diagonal(),e=Va,n=r.projection;return r.projection=function(r){return arguments.length?n(function(r){return function(){var e=r.apply(this,arguments),n=e[0],i=e[1]-wr;return[n*Math.cos(i),n*Math.sin(i)]}}(e=r)):e},r},t.svg.symbol=function(){var r=Wa,e=ja;function n(n,i){return(qa.get(r.call(this,n,i))||Za)(e.call(this,n,i))}return n.type=function(e){return arguments.length?(r=ge(e),n):r},n.size=function(r){return arguments.length?(e=ge(r),n):e},n};var qa=t.map({circle:Za,cross:function(r){var e=Math.sqrt(r/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(r){var e=Math.sqrt(r/(2*Xa)),n=e*Xa;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(r){var e=Math.sqrt(r)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(r){var e=Math.sqrt(r/Ya),n=e*Ya/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(r){var e=Math.sqrt(r/Ya),n=e*Ya/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});t.svg.symbolTypes=qa.keys();var Ya=Math.sqrt(3),Xa=Math.tan(30*Rr);X.transition=function(r){for(var e,n,i=et||++at,a=ct(r),t=[],o=nt||{time:Date.now(),ease:En,delay:0,duration:250},c=-1,u=this.length;++c0;)d[--m].call(r,o);if(t>=1)return l.event&&l.event.end.call(r,r.__data__,e),--s.count?delete s[i]:delete r[n],1}l||(t=a.time,o=Se((function(r){var e=l.delay;if(o.t=e+t,e<=r)return m(r-e);o.c=m}),0,t),l=s[i]={tween:new C,time:t,timer:o,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++s.count)}it.call=X.call,it.empty=X.empty,it.node=X.node,it.size=X.size,t.transition=function(r,e){return r&&r.transition?et?r.transition(e):r:t.selection().transition(r)},t.transition.prototype=it,it.select=function(r){var e,n,i,a=this.id,t=this.namespace,o=[];r=Q(r);for(var c=-1,u=this.length;++crect,.s>rect").attr("width",o[1]-o[0])}function y(r){r.select(".extent").attr("y",c[0]),r.selectAll(".extent,.e>rect,.w>rect").attr("height",c[1]-c[0])}function f(){var l,f,g=this,_=t.select(t.event.target),h=n.of(g,arguments),v=t.select(g),x=_.datum(),P=!/^(n|s)$/.test(x)&&i,G=!/^(e|w)$/.test(x)&&a,C=_.classed("extent"),S=Cr(g),A=t.mouse(g),b=t.select(s(g)).on("keydown.brush",(function(){32==t.event.keyCode&&(C||(l=null,A[0]-=o[1],A[1]-=c[1],C=2),L())})).on("keyup.brush",(function(){32==t.event.keyCode&&2==C&&(A[0]+=o[1],A[1]+=c[1],C=0,L())}));if(t.event.changedTouches?b.on("touchmove.brush",k).on("touchend.brush",z):b.on("mousemove.brush",k).on("mouseup.brush",z),v.interrupt().selectAll("*").interrupt(),C)A[0]=o[0]-A[0],A[1]=c[0]-A[1];else if(x){var M=+/w$/.test(x),B=+/^n/.test(x);f=[o[1-M]-A[0],c[1-B]-A[1]],A[0]=o[M],A[1]=c[B]}else t.event.altKey&&(l=A.slice());function k(){var r=t.mouse(g),e=!1;f&&(r[0]+=f[0],r[1]+=f[1]),C||(t.event.altKey?(l||(l=[(o[0]+o[1])/2,(c[0]+c[1])/2]),A[0]=o[+(r[0](i=1))return i;for(;nt?n=a:i=a,a=.5*(i-n)+n}return a},a.prototype.solve=function(r,e){return this.sampleCurveY(this.solveCurveX(r,e))};var t=o;function o(r,e){this.x=r,this.y=e}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(r){return this.clone()._add(r)},sub:function(r){return this.clone()._sub(r)},multByPoint:function(r){return this.clone()._multByPoint(r)},divByPoint:function(r){return this.clone()._divByPoint(r)},mult:function(r){return this.clone()._mult(r)},div:function(r){return this.clone()._div(r)},rotate:function(r){return this.clone()._rotate(r)},rotateAround:function(r,e){return this.clone()._rotateAround(r,e)},matMult:function(r){return this.clone()._matMult(r)},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(r){return this.x===r.x&&this.y===r.y},dist:function(r){return Math.sqrt(this.distSqr(r))},distSqr:function(r){var e=r.x-this.x,n=r.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith:function(r){return this.angleWithSep(r.x,r.y)},angleWithSep:function(r,e){return Math.atan2(this.x*e-this.y*r,this.x*r+this.y*e)},_matMult:function(r){var e=r[0]*this.x+r[1]*this.y,n=r[2]*this.x+r[3]*this.y;return this.x=e,this.y=n,this},_add:function(r){return this.x+=r.x,this.y+=r.y,this},_sub:function(r){return this.x-=r.x,this.y-=r.y,this},_mult:function(r){return this.x*=r,this.y*=r,this},_div:function(r){return this.x/=r,this.y/=r,this},_multByPoint:function(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint:function(r){return this.x/=r.x,this.y/=r.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var r=this.y;return this.y=this.x,this.x=-r,this},_rotate:function(r){var e=Math.cos(r),n=Math.sin(r),i=e*this.x-n*this.y,a=n*this.x+e*this.y;return this.x=i,this.y=a,this},_rotateAround:function(r,e){var n=Math.cos(r),i=Math.sin(r),a=e.x+n*(this.x-e.x)-i*(this.y-e.y),t=e.y+i*(this.x-e.x)+n*(this.y-e.y);return this.x=a,this.y=t,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(r){return r instanceof o?r:Array.isArray(r)?new o(r[0],r[1]):r};var c="undefined"!==typeof self?self:{};function u(r,e){if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(var n=0;n=1)return 1;var e=r*r,n=e*r;return 4*(r<.5?n:3*(r-e)+n-.75)}function l(r,e,n,a){var t=new i(r,e,n,a);return function(r){return t.solve(r)}}var m=l(.25,.1,.25,1);function p(r,e,n){return Math.min(n,Math.max(e,r))}function I(r,e,n){var i=n-e,a=((r-e)%i+i)%i+e;return a===e?n:a}function y(r,e,n){if(!r.length)return n(null,[]);var i=r.length,a=new Array(r.length),t=null;r.forEach((function(r,o){e(r,(function(r,e){r&&(t=r),a[o]=e,0===--i&&n(t,a)}))}))}function f(r){var e=[];for(var n in r)e.push(r[n]);return e}function g(r,e){var n=[];for(var i in r)i in e||n.push(i);return n}function _(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var i=0,a=e;i>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,r)}return r()}function G(r){return r<=1?1:Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function C(r){return!!r&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(r)}function S(r,e){r.forEach((function(r){e[r]&&(e[r]=e[r].bind(e))}))}function A(r,e){return-1!==r.indexOf(e,r.length-e.length)}function b(r,e,n){var i={};for(var a in r)i[a]=e.call(n||this,r[a],a,r);return i}function M(r,e,n){var i={};for(var a in r)e.call(n||this,r[a],a,r)&&(i[a]=r[a]);return i}function B(r){return Array.isArray(r)?r.map(B):"object"===typeof r&&r?b(r,B):r}function k(r,e){for(var n=0;n=0)return!0;return!1}var F={};function z(r){F[r]||("undefined"!==typeof console&&console.warn(r),F[r]=!0)}function w(r,e,n){return(n.y-r.y)*(e.x-r.x)>(e.y-r.y)*(n.x-r.x)}function R(r){for(var e=0,n=0,i=r.length,a=i-1,t=void 0,o=void 0;n@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,n={};if(r.replace(e,(function(r,e,i,a){var t=i||a;return n[e]=!t||t.toLowerCase(),""})),n["max-age"]){var i=parseInt(n["max-age"],10);isNaN(i)?delete n["max-age"]:n["max-age"]=i}return n}var D=null;function J(r){if(null==D){var e=r.navigator?r.navigator.userAgent:null;D=!!r.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return D}function U(r){try{var e=c[r];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(n){return!1}}function H(r){return c.btoa(encodeURIComponent(r).replace(/%([0-9A-F]{2})/g,(function(r,e){return String.fromCharCode(Number("0x"+e))})))}function L(r){return decodeURIComponent(c.atob(r).split("").map((function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)})).join(""))}var O,K,V,j,W=c.performance&&c.performance.now?c.performance.now.bind(c.performance):Date.now.bind(Date),Z=c.requestAnimationFrame||c.mozRequestAnimationFrame||c.webkitRequestAnimationFrame||c.msRequestAnimationFrame,q=c.cancelAnimationFrame||c.mozCancelAnimationFrame||c.webkitCancelAnimationFrame||c.msCancelAnimationFrame,Y={now:W,frame:function(r){var e=Z(r);return{cancel:function(){return q(e)}}},getImageData:function(r,e){void 0===e&&(e=0);var n=c.document.createElement("canvas"),i=n.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return n.width=r.width,n.height=r.height,i.drawImage(r,0,0,r.width,r.height),i.getImageData(-e,-e,r.width+2*e,r.height+2*e)},resolveURL:function(r){return O||(O=c.document.createElement("a")),O.href=r,O.href},hardwareConcurrency:c.navigator&&c.navigator.hardwareConcurrency||4,get devicePixelRatio(){return c.devicePixelRatio},get prefersReducedMotion(){return!!c.matchMedia&&(null==K&&(K=c.matchMedia("(prefers-reduced-motion: reduce)")),K.matches)}},X={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},Q={supported:!1,testSupport:er},$=!1,rr=!1;function er(r){!$&&j&&(rr?nr(r):V=r)}function nr(r){var e=r.createTexture();r.bindTexture(r.TEXTURE_2D,e);try{if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,j),r.isContextLost())return;Q.supported=!0}catch(n){}r.deleteTexture(e),$=!0}c.document&&((j=c.document.createElement("img")).onload=function(){V&&nr(V),V=null,rr=!0},j.onerror=function(){$=!0,V=null},j.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ir="01";function ar(){for(var r="1",e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n="",i=0;i<10;i++)n+=e[Math.floor(62*Math.random())];var a=432e5;return{token:[r,ir,n].join(""),tokenExpiresAt:Date.now()+a}}var tr=function(r,e){this._transformRequestFn=r,this._customAccessToken=e,this._createSkuToken()};function or(r){return 0===r.indexOf("mapbox:")}tr.prototype._createSkuToken=function(){var r=ar();this._skuToken=r.token,this._skuTokenExpiresAt=r.tokenExpiresAt},tr.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},tr.prototype.transformRequest=function(r,e){return this._transformRequestFn&&this._transformRequestFn(r,e)||{url:r}},tr.prototype.normalizeStyleURL=function(r,e){if(!or(r))return r;var n=mr(r);return n.path="/styles/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},tr.prototype.normalizeGlyphsURL=function(r,e){if(!or(r))return r;var n=mr(r);return n.path="/fonts/v1"+n.path,this._makeAPIURL(n,this._customAccessToken||e)},tr.prototype.normalizeSourceURL=function(r,e){if(!or(r))return r;var n=mr(r);return n.path="/v4/"+n.authority+".json",n.params.push("secure"),this._makeAPIURL(n,this._customAccessToken||e)},tr.prototype.normalizeSpriteURL=function(r,e,n,i){var a=mr(r);return or(r)?(a.path="/styles/v1"+a.path+"/sprite"+e+n,this._makeAPIURL(a,this._customAccessToken||i)):(a.path+=""+e+n,pr(a))},tr.prototype.normalizeTileURL=function(r,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),r&&!or(r))return r;var n=mr(r),i=/(\.(png|jpg)\d*)(?=$)/,a=/^.+\/v4\//,t=Y.devicePixelRatio>=2||512===e?"@2x":"",o=Q.supported?".webp":"$1";n.path=n.path.replace(i,""+t+o),n.path=n.path.replace(a,"/"),n.path="/v4"+n.path;var c=this._customAccessToken||sr(n.params)||X.ACCESS_TOKEN;return X.REQUIRE_ACCESS_TOKEN&&c&&this._skuToken&&n.params.push("sku="+this._skuToken),this._makeAPIURL(n,c)},tr.prototype.canonicalizeTileURL=function(r,e){var n="/v4/",i=/\.[\w]+$/,a=mr(r);if(!a.path.match(/(^\/v4\/)/)||!a.path.match(i))return r;var t="mapbox://tiles/";t+=a.path.replace(n,"");var o=a.params;return e&&(o=o.filter((function(r){return!r.match(/^access_token=/)}))),o.length&&(t+="?"+o.join("&")),t},tr.prototype.canonicalizeTileset=function(r,e){for(var n=!!e&&or(e),i=[],a=0,t=r.tiles||[];a=0&&r.params.splice(a,1)}if("/"!==i.path&&(r.path=""+i.path+r.path),!X.REQUIRE_ACCESS_TOKEN)return pr(r);if(!(e=e||X.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+n);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+n);return r.params=r.params.filter((function(r){return-1===r.indexOf("access_token")})),r.params.push("access_token="+e),pr(r)};var cr=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ur(r){return cr.test(r)}function dr(r){return r.indexOf("sku=")>0&&ur(r)}function sr(r){for(var e=0,n=r;e=1&&c.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(i){z("Unable to write to LocalStorage")}},fr.prototype.processRequests=function(r){},fr.prototype.postEvent=function(r,e,i,a){var t=this;if(X.EVENTS_URL){var o=mr(X.EVENTS_URL);o.params.push("access_token="+(a||X.ACCESS_TOKEN||""));var c={event:this.type,created:new Date(r).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:n,skuId:ir,userId:this.anonId},u=e?_(c,e):c,d={url:pr(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([u])};this.pendingRequest=Xr(d,(function(r){t.pendingRequest=null,i(r),t.saveEventData(),t.processRequests(a)}))}},fr.prototype.queueRequest=function(r,e){this.queue.push(r),this.processRequests(e)};var gr,_r,hr=function(r){function e(){r.call(this,"map.load"),this.success={},this.skuToken=""}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(r,e,n,i){this.skuToken=n,(X.EVENTS_URL&&i||X.ACCESS_TOKEN&&Array.isArray(r)&&r.some((function(r){return or(r)||ur(r)})))&&this.queueRequest({id:e,timestamp:Date.now()},i)},e.prototype.processRequests=function(r){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var n=this.queue.shift(),i=n.id,a=n.timestamp;i&&this.success[i]||(this.anonId||this.fetchEventData(),C(this.anonId)||(this.anonId=P()),this.postEvent(a,{skuToken:this.skuToken},(function(r){r||i&&(e.success[i]=!0)}),r))}},e}(fr),vr=function(r){function e(e){r.call(this,"appUserTurnstile"),this._customAccessToken=e}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(r,e){X.EVENTS_URL&&X.ACCESS_TOKEN&&Array.isArray(r)&&r.some((function(r){return or(r)||ur(r)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(r){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var n=yr(X.ACCESS_TOKEN),i=n?n.u:X.ACCESS_TOKEN,a=i!==this.eventData.tokenU;C(this.anonId)||(this.anonId=P(),a=!0);var t=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),c=new Date(t),u=(t-this.eventData.lastSuccess)/864e5;a=a||u>=1||u<-1||o.getDate()!==c.getDate()}else a=!0;if(!a)return this.processRequests();this.postEvent(t,{"enabled.telemetry":!1},(function(r){r||(e.eventData.lastSuccess=t,e.eventData.tokenU=i)}),r)}},e}(fr),xr=new vr,Pr=xr.postTurnstileEvent.bind(xr),Gr=new hr,Cr=Gr.postMapLoadEvent.bind(Gr),Sr="mapbox-tiles",Ar=500,br=50,Mr=42e4;function Br(){c.caches&&!gr&&(gr=c.caches.open(Sr))}function kr(r,e){if(void 0===_r)try{new Response(new ReadableStream),_r=!0}catch(n){_r=!1}_r?e(r.body):r.blob().then(e)}function Fr(r,e,n){if(Br(),gr){var i={status:e.status,statusText:e.statusText,headers:new c.Headers};e.headers.forEach((function(r,e){return i.headers.set(e,r)}));var a=T(e.headers.get("Cache-Control")||"");a["no-store"]||(a["max-age"]&&i.headers.set("Expires",new Date(n+1e3*a["max-age"]).toUTCString()),new Date(i.headers.get("Expires")).getTime()-nDate.now()&&!n["no-cache"]}var Er,Nr=1/0;function Tr(r){++Nr>br&&(r.getActor().send("enforceCacheSizeLimit",Ar),Nr=0)}function Dr(r){Br(),gr&&gr.then((function(e){e.keys().then((function(n){for(var i=0;i=200&&n.status<300||0===n.status)&&null!==n.response){var i=n.response;if("json"===r.type)try{i=JSON.parse(n.response)}catch(a){return e(a)}e(null,i,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else e(new Or(n.statusText,n.status,r.url))},n.send(r.body),{cancel:function(){return n.abort()}}}var Zr=function(r,e){if(!Vr(r.url)){if(c.fetch&&c.Request&&c.AbortController&&c.Request.prototype.hasOwnProperty("signal"))return jr(r,e);if(N()&&self.worker&&self.worker.actor){var n=!0;return self.worker.actor.send("getResource",r,e,void 0,n)}}return Wr(r,e)},qr=function(r,e){return Zr(_(r,{type:"json"}),e)},Yr=function(r,e){return Zr(_(r,{type:"arrayBuffer"}),e)},Xr=function(r,e){return Zr(_(r,{method:"POST"}),e)};function Qr(r){var e=c.document.createElement("a");return e.href=r,e.protocol===c.document.location.protocol&&e.host===c.document.location.host}var $r,re,ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ne(r,e,n,i){var a=new c.Image,t=c.URL;a.onload=function(){e(null,a),t.revokeObjectURL(a.src),a.onload=null,c.requestAnimationFrame((function(){a.src=ee}))},a.onerror=function(){return e(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 o=new c.Blob([new Uint8Array(r)],{type:"image/png"});a.cacheControl=n,a.expires=i,a.src=r.byteLength?t.createObjectURL(o):ee}function ie(r,e){var n=new c.Blob([new Uint8Array(r)],{type:"image/png"});c.createImageBitmap(n).then((function(r){e(null,r)})).catch((function(r){e(new Error("Could not load image because of "+r.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))}))}$r=[],re=0;var ae=function(r,e){if(Q.supported&&(r.headers||(r.headers={}),r.headers.accept="image/webp,*/*"),re>=X.MAX_PARALLEL_IMAGE_REQUESTS){var n={requestParameters:r,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return $r.push(n),n}re++;var i=!1,a=function(){if(!i)for(i=!0,re--;$r.length&&re0||this._oneTimeListeners&&this._oneTimeListeners[r]&&this._oneTimeListeners[r].length>0||this._eventedParent&&this._eventedParent.listens(r)},se.prototype.setEventedParent=function(r,e){return this._eventedParent=r,this._eventedParentData=e,this};var le={$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"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},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:"resolvedImage",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"}],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":{},within:{}}},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:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},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:"resolvedImage",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:"resolvedImage",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:"resolvedImage",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:"resolvedImage",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"}},promoteId:{"*":{type:"string"}}},me=function(r,e,n,i){this.message=(r?r+": ":"")+n,i&&(this.identifier=i),null!==e&&void 0!==e&&e.__line__&&(this.line=e.__line__)};function pe(r){var e=r.key,n=r.value;return n?[new me(e,n,"constants have been deprecated as of v8")]:[]}function Ie(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];for(var i=0,a=e;i":"value"===r.itemType.kind?"array":"array<"+e+">"}return r.kind}var ze=[he,ve,xe,Pe,Ge,Me,Ce,ke(Se),Be];function we(r,e){if("error"===e.kind)return null;if("array"===r.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!we(r.itemType,e.itemType))&&("number"!==typeof r.N||r.N===e.N))return null}else{if(r.kind===e.kind)return null;if("value"===r.kind)for(var n=0,i=ze;n255?255:r}function a(r){return r<0?0:r>1?1:r}function t(r){return"%"===r[r.length-1]?i(parseFloat(r)/100*255):i(parseInt(r))}function o(r){return"%"===r[r.length-1]?a(parseFloat(r)/100):a(parseFloat(r))}function c(r,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?r+(e-r)*n*6:2*n<1?e:3*n<2?r+(e-r)*(2/3-n)*6:r}function u(r){var e,a=r.replace(/ /g,"").toLowerCase();if(a in n)return n[a].slice();if("#"===a[0])return 4===a.length?(e=parseInt(a.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===a.length&&(e=parseInt(a.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=a.indexOf("("),d=a.indexOf(")");if(-1!==u&&d+1===a.length){var s=a.substr(0,u),l=a.substr(u+1,d-(u+1)).split(","),m=1;switch(s){case"rgba":if(4!==l.length)return null;m=o(l.pop());case"rgb":return 3!==l.length?null:[t(l[0]),t(l[1]),t(l[2]),m];case"hsla":if(4!==l.length)return null;m=o(l.pop());case"hsl":if(3!==l.length)return null;var p=(parseFloat(l[0])%360+360)%360/360,I=o(l[1]),y=o(l[2]),f=y<=.5?y*(I+1):y+I-y*I,g=2*y-f;return[i(255*c(g,f,p+1/3)),i(255*c(g,f,p)),i(255*c(g,f,p-1/3)),m];default:return null}}return null}try{e.parseCSSColor=u}catch(d){}})),Te=Ne.parseCSSColor,De=function(r,e,n,i){void 0===i&&(i=1),this.r=r,this.g=e,this.b=n,this.a=i};De.parse=function(r){if(r){if(r instanceof De)return r;if("string"===typeof r){var e=Te(r);if(e)return new De(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},De.prototype.toString=function(){var r=this.toArray(),e=r[0],n=r[1],i=r[2],a=r[3];return"rgba("+Math.round(e)+","+Math.round(n)+","+Math.round(i)+","+a+")"},De.prototype.toArray=function(){var r=this,e=r.r,n=r.g,i=r.b,a=r.a;return 0===a?[0,0,0,0]:[255*e/a,255*n/a,255*i/a,a]},De.black=new De(0,0,0,1),De.white=new De(1,1,1,1),De.transparent=new De(0,0,0,0),De.red=new De(1,0,0,1);var Je=function(r,e,n){this.sensitivity=r?e?"variant":"case":e?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Je.prototype.compare=function(r,e){return this.collator.compare(r,e)},Je.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Ue=function(r,e,n,i,a){this.text=r,this.image=e,this.scale=n,this.fontStack=i,this.textColor=a},He=function(r){this.sections=r};He.fromString=function(r){return new He([new Ue(r,null,null,null,null)])},He.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(r){return 0!==r.text.length||r.image&&0!==r.image.name.length}))},He.factory=function(r){return r instanceof He?r:He.fromString(r)},He.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(r){return r.text})).join("")},He.prototype.serialize=function(){for(var r=["format"],e=0,n=this.sections;e=0&&r<=255&&"number"===typeof e&&e>=0&&e<=255&&"number"===typeof n&&n>=0&&n<=255?"undefined"===typeof i||"number"===typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[r,e,n,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"===typeof i?[r,e,n,i]:[r,e,n]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Ke(r){if(null===r)return!0;if("string"===typeof r)return!0;if("boolean"===typeof r)return!0;if("number"===typeof r)return!0;if(r instanceof De)return!0;if(r instanceof Je)return!0;if(r instanceof He)return!0;if(r instanceof Le)return!0;if(Array.isArray(r)){for(var e=0,n=r;e2){var c=r[1];if("string"!==typeof c||!(c in qe)||"object"===c)return e.error('The item type argument of "array" must be one of string, number, boolean',1);t=qe[c],i++}else t=Se;if(r.length>3){if(null!==r[2]&&("number"!==typeof r[2]||r[2]<0||r[2]!==Math.floor(r[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=r[2],i++}n=ke(t,o)}else n=qe[a];for(var u=[];i1)&&e.push(i)}}return e.concat(this.args.map((function(r){return r.serialize()})))};var Xe=function(r){this.type=Me,this.sections=r};Xe.parse=function(r,e){if(r.length<2)return e.error("Expected at least one argument.");var n=r[1];if(!Array.isArray(n)&&"object"===typeof n)return e.error("First argument must be an image or text section.");for(var i=[],a=!1,t=1;t<=r.length-1;++t){var o=r[t];if(a&&"object"===typeof o&&!Array.isArray(o)){a=!1;var c=null;if(o["font-scale"]&&!(c=e.parse(o["font-scale"],1,ve)))return null;var u=null;if(o["text-font"]&&!(u=e.parse(o["text-font"],1,ke(xe))))return null;var d=null;if(o["text-color"]&&!(d=e.parse(o["text-color"],1,Ge)))return null;var s=i[i.length-1];s.scale=c,s.font=u,s.textColor=d}else{var l=e.parse(r[t],1,Se);if(!l)return null;var m=l.type.kind;if("string"!==m&&"value"!==m&&"null"!==m&&"resolvedImage"!==m)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,i.push({content:l,scale:null,font:null,textColor:null})}}return new Xe(i)},Xe.prototype.evaluate=function(r){var e=function(e){var n=e.content.evaluate(r);return Ve(n)===Be?new Ue("",n,null,null,null):new Ue(je(n),null,e.scale?e.scale.evaluate(r):null,e.font?e.font.evaluate(r).join(","):null,e.textColor?e.textColor.evaluate(r):null)};return new He(this.sections.map(e))},Xe.prototype.eachChild=function(r){for(var e=0,n=this.sections;e-1),n},Qe.prototype.eachChild=function(r){r(this.input)},Qe.prototype.outputDefined=function(){return!1},Qe.prototype.serialize=function(){return["image",this.input.serialize()]};var $e={"to-boolean":Pe,"to-color":Ge,"to-number":ve,"to-string":xe},rn=function(r,e){this.type=r,this.args=e};rn.parse=function(r,e){if(r.length<2)return e.error("Expected at least one argument.");var n=r[0];if(("to-boolean"===n||"to-string"===n)&&2!==r.length)return e.error("Expected one argument.");for(var i=$e[n],a=[],t=1;t4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":Oe(e[0],e[1],e[2],e[3])))return new De(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Ze(n||"Could not parse color from value '"+("string"===typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var o=null,c=0,u=this.args;c=e[2])&&!(r[1]<=e[1])&&!(r[3]>=e[3])}function mn(r,e){var n=dn(r[0]),i=sn(r[1]),a=Math.pow(2,e.z);return[Math.round(n*a*cn),Math.round(i*a*cn)]}function pn(r,e,n){var i=r[0]-e[0],a=r[1]-e[1],t=r[0]-n[0],o=r[1]-n[1];return i*o-t*a===0&&i*t<=0&&a*o<=0}function In(r,e,n){return e[1]>r[1]!==n[1]>r[1]&&r[0]<(n[0]-e[0])*(r[1]-e[1])/(n[1]-e[1])+e[0]}function yn(r,e){for(var n=!1,i=0,a=e.length;i0&&l<0||s<0&&l>0}function hn(r,e,n,i){var a=[e[0]-r[0],e[1]-r[1]];return 0!==gn([i[0]-n[0],i[1]-n[1]],a)&&!(!_n(r,e,n,i)||!_n(n,i,r,e))}function vn(r,e,n){for(var i=0,a=n;in[2]){var a=.5*i,t=r[0]-n[0]>a?-i:n[0]-r[0]>a?i:0;0===t&&(t=r[0]-n[2]>a?-i:n[2]-r[0]>a?i:0),r[0]+=t}un(e,r)}function An(r){r[0]=r[1]=1/0,r[2]=r[3]=-1/0}function bn(r,e,n,i){for(var a=Math.pow(2,i.z)*cn,t=[i.x*cn,i.y*cn],o=[],c=0,u=r;c=0)return!1;var n=!0;return r.eachChild((function(r){n&&!Rn(r,e)&&(n=!1)})),n}Fn.parse=function(r,e){if(2!==r.length)return e.error("'within' expression requires exactly one argument, but found "+(r.length-1)+" instead.");if(Ke(r[1])){var n=r[1];if("FeatureCollection"===n.type)for(var i=0;ie))throw new Ze("Input is not a number.");o=c-1}return 0}Nn.prototype.parse=function(r,e,n,i,a){return void 0===a&&(a={}),e?this.concat(e,n,i)._parse(r,a):this._parse(r,a)},Nn.prototype._parse=function(r,e){function n(r,e,n){return"assert"===n?new Ye(e,[r]):"coerce"===n?new rn(e,[r]):r}if(null!==r&&"string"!==typeof r&&"boolean"!==typeof r&&"number"!==typeof r||(r=["literal",r]),Array.isArray(r)){if(0===r.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var i=r[0];if("string"!==typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var a=this.registry[i];if(a){var t=a.parse(r,this);if(!t)return null;if(this.expectedType){var o=this.expectedType,c=t.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==c.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==c.kind&&"string"!==c.kind){if(this.checkSubtype(o,c))return null}else t=n(t,o,e.typeAnnotation||"coerce");else t=n(t,o,e.typeAnnotation||"assert")}if(!(t instanceof We)&&"resolvedImage"!==t.type.kind&&Tn(t)){var u=new nn;try{t=new We(t.type,t.evaluate(u))}catch(d){return this.error(d.message),null}}return t}return this.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0)}return"undefined"===typeof r?this.error("'undefined' value invalid. Use null instead."):"object"===typeof r?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof r+" instead.")},Nn.prototype.concat=function(r,e,n){var i="number"===typeof r?this.path.concat(r):this.path,a=n?this.scope.concat(n):this.scope;return new Nn(this.registry,i,e||null,a,this.errors)},Nn.prototype.error=function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];var i=""+this.key+e.map((function(r){return"["+r+"]"})).join("");this.errors.push(new ge(i,r))},Nn.prototype.checkSubtype=function(r,e){var n=we(r,e);return n&&this.error(n),n};var Jn=function(r,e,n){this.type=r,this.input=e,this.labels=[],this.outputs=[];for(var i=0,a=n;i=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var s=e.parse(c,d,a);if(!s)return null;a=a||s.type,i.push([o,s])}return new Jn(a,n,i)},Jn.prototype.evaluate=function(r){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(r);var i=this.input.evaluate(r);if(i<=e[0])return n[0].evaluate(r);var a=e.length;return i>=e[a-1]?n[a-1].evaluate(r):n[Dn(e,i)].evaluate(r)},Jn.prototype.eachChild=function(r){r(this.input);for(var e=0,n=this.outputs;e0&&r.push(this.labels[e]),r.push(this.outputs[e].serialize());return r};var On=Object.freeze({__proto__:null,number:Un,color:Hn,array:Ln}),Kn=.95047,Vn=1,jn=1.08883,Wn=4/29,Zn=6/29,qn=3*Zn*Zn,Yn=Zn*Zn*Zn,Xn=Math.PI/180,Qn=180/Math.PI;function $n(r){return r>Yn?Math.pow(r,1/3):r/qn+Wn}function ri(r){return r>Zn?r*r*r:qn*(r-Wn)}function ei(r){return 255*(r<=.0031308?12.92*r:1.055*Math.pow(r,1/2.4)-.055)}function ni(r){return(r/=255)<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function ii(r){var e=ni(r.r),n=ni(r.g),i=ni(r.b),a=$n((.4124564*e+.3575761*n+.1804375*i)/Kn),t=$n((.2126729*e+.7151522*n+.072175*i)/Vn);return{l:116*t-16,a:500*(a-t),b:200*(t-$n((.0193339*e+.119192*n+.9503041*i)/jn)),alpha:r.a}}function ai(r){var e=(r.l+16)/116,n=isNaN(r.a)?e:e+r.a/500,i=isNaN(r.b)?e:e-r.b/200;return e=Vn*ri(e),n=Kn*ri(n),i=jn*ri(i),new De(ei(3.2404542*n-1.5371385*e-.4985314*i),ei(-.969266*n+1.8760108*e+.041556*i),ei(.0556434*n-.2040259*e+1.0572252*i),r.alpha)}function ti(r,e,n){return{l:Un(r.l,e.l,n),a:Un(r.a,e.a,n),b:Un(r.b,e.b,n),alpha:Un(r.alpha,e.alpha,n)}}function oi(r){var e=ii(r),n=e.l,i=e.a,a=e.b,t=Math.atan2(a,i)*Qn;return{h:t<0?t+360:t,c:Math.sqrt(i*i+a*a),l:n,alpha:r.a}}function ci(r){var e=r.h*Xn,n=r.c;return ai({l:r.l,a:Math.cos(e)*n,b:Math.sin(e)*n,alpha:r.alpha})}function ui(r,e,n){var i=e-r;return r+n*(i>180||i<-180?i-360*Math.round(i/360):i)}function di(r,e,n){return{h:ui(r.h,e.h,n),c:Un(r.c,e.c,n),l:Un(r.l,e.l,n),alpha:Un(r.alpha,e.alpha,n)}}var si={forward:ii,reverse:ai,interpolate:ti},li={forward:oi,reverse:ci,interpolate:di},mi=Object.freeze({__proto__:null,lab:si,hcl:li}),pi=function(r,e,n,i,a){this.type=r,this.operator=e,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];for(var t=0,o=a;t1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:c}}if(r.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(r.length-1)+".");if((r.length-1)%2!==0)return e.error("Expected an even number of arguments.");if(!(a=e.parse(a,2,ve)))return null;var u=[],d=null;"interpolate-hcl"===n||"interpolate-lab"===n?d=Ge:e.expectedType&&"value"!==e.expectedType.kind&&(d=e.expectedType);for(var s=0;s=l)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var y=e.parse(m,I,d);if(!y)return null;d=d||y.type,u.push([l,y])}return"number"===d.kind||"color"===d.kind||"array"===d.kind&&"number"===d.itemType.kind&&"number"===typeof d.N?new pi(d,n,i,a,u):e.error("Type "+Fe(d)+" is not interpolatable.")},pi.prototype.evaluate=function(r){var e=this.labels,n=this.outputs;if(1===e.length)return n[0].evaluate(r);var i=this.input.evaluate(r);if(i<=e[0])return n[0].evaluate(r);var a=e.length;if(i>=e[a-1])return n[a-1].evaluate(r);var t=Dn(e,i),o=e[t],c=e[t+1],u=pi.interpolationFactor(this.interpolation,i,o,c),d=n[t].evaluate(r),s=n[t+1].evaluate(r);return"interpolate"===this.operator?On[this.type.kind.toLowerCase()](d,s,u):"interpolate-hcl"===this.operator?li.reverse(li.interpolate(li.forward(d),li.forward(s),u)):si.reverse(si.interpolate(si.forward(d),si.forward(s),u))},pi.prototype.eachChild=function(r){r(this.input);for(var e=0,n=this.outputs;e=n.length)throw new Ze("Array index out of bounds: "+e+" > "+(n.length-1)+".");if(e!==Math.floor(e))throw new Ze("Array index must be an integer, but found "+e+" instead.");return n[e]},gi.prototype.eachChild=function(r){r(this.index),r(this.input)},gi.prototype.outputDefined=function(){return!1},gi.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _i=function(r,e){this.type=Pe,this.needle=r,this.haystack=e};_i.parse=function(r,e){if(3!==r.length)return e.error("Expected 2 arguments, but found "+(r.length-1)+" instead.");var n=e.parse(r[1],1,Se),i=e.parse(r[2],2,Se);return n&&i?Re(n.type,[Pe,xe,ve,he,Se])?new _i(n,i):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Fe(n.type)+" instead"):null},_i.prototype.evaluate=function(r){var e=this.needle.evaluate(r),n=this.haystack.evaluate(r);if(!n)return!1;if(!Ee(e,["boolean","string","number","null"]))throw new Ze("Expected first argument to be of type boolean, string, number or null, but found "+Fe(Ve(e))+" instead.");if(!Ee(n,["string","array"]))throw new Ze("Expected second argument to be of type array or string, but found "+Fe(Ve(n))+" instead.");return n.indexOf(e)>=0},_i.prototype.eachChild=function(r){r(this.needle),r(this.haystack)},_i.prototype.outputDefined=function(){return!0},_i.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var hi=function(r,e,n){this.type=ve,this.needle=r,this.haystack=e,this.fromIndex=n};hi.parse=function(r,e){if(r.length<=2||r.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(r.length-1)+" instead.");var n=e.parse(r[1],1,Se),i=e.parse(r[2],2,Se);if(!n||!i)return null;if(!Re(n.type,[Pe,xe,ve,he,Se]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Fe(n.type)+" instead");if(4===r.length){var a=e.parse(r[3],3,ve);return a?new hi(n,i,a):null}return new hi(n,i)},hi.prototype.evaluate=function(r){var e=this.needle.evaluate(r),n=this.haystack.evaluate(r);if(!Ee(e,["boolean","string","number","null"]))throw new Ze("Expected first argument to be of type boolean, string, number or null, but found "+Fe(Ve(e))+" instead.");if(!Ee(n,["string","array"]))throw new Ze("Expected second argument to be of type array or string, but found "+Fe(Ve(n))+" instead.");if(this.fromIndex){var i=this.fromIndex.evaluate(r);return n.indexOf(e,i)}return n.indexOf(e)},hi.prototype.eachChild=function(r){r(this.needle),r(this.haystack),this.fromIndex&&r(this.fromIndex)},hi.prototype.outputDefined=function(){return!1},hi.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var r=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),r]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var vi=function(r,e,n,i,a,t){this.inputType=r,this.type=e,this.input=n,this.cases=i,this.outputs=a,this.otherwise=t};vi.parse=function(r,e){if(r.length<5)return e.error("Expected at least 4 arguments, but found only "+(r.length-1)+".");if(r.length%2!==1)return e.error("Expected an even number of arguments.");var n,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var a={},t=[],o=2;oNumber.MAX_SAFE_INTEGER)return d.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"===typeof m&&Math.floor(m)!==m)return d.error("Numeric branch labels must be integer values.");if(n){if(d.checkSubtype(n,Ve(m)))return null}else n=Ve(m);if("undefined"!==typeof a[String(m)])return d.error("Branch labels must be unique.");a[String(m)]=t.length}var p=e.parse(u,o,i);if(!p)return null;i=i||p.type,t.push(p)}var I=e.parse(r[1],1,Se);if(!I)return null;var y=e.parse(r[r.length-1],r.length-1,i);return y?"value"!==I.type.kind&&e.concat(1).checkSubtype(n,I.type)?null:new vi(n,i,I,a,t,y):null},vi.prototype.evaluate=function(r){var e=this.input.evaluate(r);return(Ve(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(r)},vi.prototype.eachChild=function(r){r(this.input),this.outputs.forEach(r),r(this.otherwise)},vi.prototype.outputDefined=function(){return this.outputs.every((function(r){return r.outputDefined()}))&&this.otherwise.outputDefined()},vi.prototype.serialize=function(){for(var r=this,e=["match",this.input.serialize()],n=[],i={},a=0,t=Object.keys(this.cases).sort();an}function Mi(r,e,n){return e<=n}function Bi(r,e,n){return e>=n}function ki(r,e,n,i){return 0===i.compare(e,n)}function Fi(r,e,n,i){return!ki(r,e,n,i)}function zi(r,e,n,i){return i.compare(e,n)<0}function wi(r,e,n,i){return i.compare(e,n)>0}function Ri(r,e,n,i){return i.compare(e,n)<=0}function Ei(r,e,n,i){return i.compare(e,n)>=0}function Ni(r,e,n){var i="=="!==r&&"!="!==r;return function(){function a(r,e,n){this.type=Pe,this.lhs=r,this.rhs=e,this.collator=n,this.hasUntypedArgument="value"===r.type.kind||"value"===e.type.kind}return a.parse=function(r,e){if(3!==r.length&&4!==r.length)return e.error("Expected two or three arguments.");var n=r[0],t=e.parse(r[1],1,Se);if(!t)return null;if(!Gi(n,t.type))return e.concat(1).error('"'+n+"\" comparisons are not supported for type '"+Fe(t.type)+"'.");var o=e.parse(r[2],2,Se);if(!o)return null;if(!Gi(n,o.type))return e.concat(2).error('"'+n+"\" comparisons are not supported for type '"+Fe(o.type)+"'.");if(t.type.kind!==o.type.kind&&"value"!==t.type.kind&&"value"!==o.type.kind)return e.error("Cannot compare types '"+Fe(t.type)+"' and '"+Fe(o.type)+"'.");i&&("value"===t.type.kind&&"value"!==o.type.kind?t=new Ye(o.type,[t]):"value"!==t.type.kind&&"value"===o.type.kind&&(o=new Ye(t.type,[o])));var c=null;if(4===r.length){if("string"!==t.type.kind&&"string"!==o.type.kind&&"value"!==t.type.kind&&"value"!==o.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(c=e.parse(r[3],3,be)))return null}return new a(t,o,c)},a.prototype.evaluate=function(a){var t=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){var c=Ve(t),u=Ve(o);if(c.kind!==u.kind||"string"!==c.kind&&"number"!==c.kind)throw new Ze('Expected arguments for "'+r+'" to be (string, string) or (number, number), but found ('+c.kind+", "+u.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var d=Ve(t),s=Ve(o);if("string"!==d.kind||"string"!==s.kind)return e(a,t,o)}return this.collator?n(a,t,o,this.collator.evaluate(a)):e(a,t,o)},a.prototype.eachChild=function(r){r(this.lhs),r(this.rhs),this.collator&&r(this.collator)},a.prototype.outputDefined=function(){return!0},a.prototype.serialize=function(){var e=[r];return this.eachChild((function(r){e.push(r.serialize())})),e},a}()}Pi.parse=function(r,e){if(r.length<=2||r.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(r.length-1)+" instead.");var n=e.parse(r[1],1,Se),i=e.parse(r[2],2,ve);if(!n||!i)return null;if(!Re(n.type,[ke(Se),xe,Se]))return e.error("Expected first argument to be of type array or string, but found "+Fe(n.type)+" instead");if(4===r.length){var a=e.parse(r[3],3,ve);return a?new Pi(n.type,n,i,a):null}return new Pi(n.type,n,i)},Pi.prototype.evaluate=function(r){var e=this.input.evaluate(r),n=this.beginIndex.evaluate(r);if(!Ee(e,["string","array"]))throw new Ze("Expected first argument to be of type array or string, but found "+Fe(Ve(e))+" instead.");if(this.endIndex){var i=this.endIndex.evaluate(r);return e.slice(n,i)}return e.slice(n)},Pi.prototype.eachChild=function(r){r(this.input),r(this.beginIndex),this.endIndex&&r(this.endIndex)},Pi.prototype.outputDefined=function(){return!1},Pi.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var r=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),r]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Ti=Ni("==",Ci,ki),Di=Ni("!=",Si,Fi),Ji=Ni("<",Ai,zi),Ui=Ni(">",bi,wi),Hi=Ni("<=",Mi,Ri),Li=Ni(">=",Bi,Ei),Oi=function(r,e,n,i,a){this.type=xe,this.number=r,this.locale=e,this.currency=n,this.minFractionDigits=i,this.maxFractionDigits=a};Oi.parse=function(r,e){if(3!==r.length)return e.error("Expected two arguments.");var n=e.parse(r[1],1,ve);if(!n)return null;var i=r[2];if("object"!==typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var a=null;if(i.locale&&!(a=e.parse(i.locale,1,xe)))return null;var t=null;if(i.currency&&!(t=e.parse(i.currency,1,xe)))return null;var o=null;if(i["min-fraction-digits"]&&!(o=e.parse(i["min-fraction-digits"],1,ve)))return null;var c=null;return i["max-fraction-digits"]&&!(c=e.parse(i["max-fraction-digits"],1,ve))?null:new Oi(n,a,t,o,c)},Oi.prototype.evaluate=function(r){return new Intl.NumberFormat(this.locale?this.locale.evaluate(r):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(r):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(r):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(r):void 0}).format(this.number.evaluate(r))},Oi.prototype.eachChild=function(r){r(this.number),this.locale&&r(this.locale),this.currency&&r(this.currency),this.minFractionDigits&&r(this.minFractionDigits),this.maxFractionDigits&&r(this.maxFractionDigits)},Oi.prototype.outputDefined=function(){return!1},Oi.prototype.serialize=function(){var r={};return this.locale&&(r.locale=this.locale.serialize()),this.currency&&(r.currency=this.currency.serialize()),this.minFractionDigits&&(r["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(r["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),r]};var Ki=function(r){this.type=ve,this.input=r};Ki.parse=function(r,e){if(2!==r.length)return e.error("Expected 1 argument, but found "+(r.length-1)+" instead.");var n=e.parse(r[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?e.error("Expected argument of type string or array, but found "+Fe(n.type)+" instead."):new Ki(n):null},Ki.prototype.evaluate=function(r){var e=this.input.evaluate(r);if("string"===typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Ze("Expected value to be of type string or array, but found "+Fe(Ve(e))+" instead.")},Ki.prototype.eachChild=function(r){r(this.input)},Ki.prototype.outputDefined=function(){return!1},Ki.prototype.serialize=function(){var r=["length"];return this.eachChild((function(e){r.push(e.serialize())})),r};var Vi={"==":Ti,"!=":Di,">":Ui,"<":Ji,">=":Li,"<=":Hi,array:Ye,at:gi,boolean:Ye,case:xi,coalesce:yi,collator:on,format:Xe,image:Qe,in:_i,"index-of":hi,interpolate:pi,"interpolate-hcl":pi,"interpolate-lab":pi,length:Ki,let:fi,literal:We,match:vi,number:Ye,"number-format":Oi,object:Ye,slice:Pi,step:Jn,string:Ye,"to-boolean":rn,"to-color":rn,"to-number":rn,"to-string":rn,var:En,within:Fn};function ji(r,e){var n=e[0],i=e[1],a=e[2],t=e[3];n=n.evaluate(r),i=i.evaluate(r),a=a.evaluate(r);var o=t?t.evaluate(r):1,c=Oe(n,i,a,o);if(c)throw new Ze(c);return new De(n/255*o,i/255*o,a/255*o,o)}function Wi(r,e){return r in e}function Zi(r,e){var n=e[r];return"undefined"===typeof n?null:n}function qi(r,e,n,i){for(;n<=i;){var a=n+i>>1;if(e[a]===r)return!0;e[a]>r?i=a-1:n=a+1}return!1}function Yi(r){return{type:r}}function Xi(r){return{result:"success",value:r}}function Qi(r){return{result:"error",value:r}}function $i(r){return"data-driven"===r["property-type"]||"cross-faded-data-driven"===r["property-type"]}function ra(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function ea(r){return!!r.expression&&r.expression.interpolated}function na(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":null===r?"null":typeof r}function ia(r){return"object"===typeof r&&null!==r&&!Array.isArray(r)}function aa(r){return r}function ta(r,e){var n,i,a,t="color"===e.type,o=r.stops&&"object"===typeof r.stops[0][0],c=o||void 0!==r.property,u=o||!c,d=r.type||(ea(e)?"exponential":"interval");if(t&&((r=Ie({},r)).stops&&(r.stops=r.stops.map((function(r){return[r[0],De.parse(r[1])]}))),r.default?r.default=De.parse(r.default):r.default=De.parse(e.default)),r.colorSpace&&"rgb"!==r.colorSpace&&!mi[r.colorSpace])throw new Error("Unknown color space: "+r.colorSpace);if("exponential"===d)n=da;else if("interval"===d)n=ua;else if("categorical"===d){n=ca,i=Object.create(null);for(var s=0,l=r.stops;s=r.stops[i-1][0])return r.stops[i-1][1];var a=Dn(r.stops.map((function(r){return r[0]})),n);return r.stops[a][1]}function da(r,e,n){var i=void 0!==r.base?r.base:1;if("number"!==na(n))return oa(r.default,e.default);var a=r.stops.length;if(1===a)return r.stops[0][1];if(n<=r.stops[0][0])return r.stops[0][1];if(n>=r.stops[a-1][0])return r.stops[a-1][1];var t=Dn(r.stops.map((function(r){return r[0]})),n),o=la(n,i,r.stops[t][0],r.stops[t+1][0]),c=r.stops[t][1],u=r.stops[t+1][1],d=On[e.type]||aa;if(r.colorSpace&&"rgb"!==r.colorSpace){var s=mi[r.colorSpace];d=function(r,e){return s.reverse(s.interpolate(s.forward(r),s.forward(e),o))}}return"function"===typeof c.evaluate?{evaluate:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=c.evaluate.apply(void 0,r),i=u.evaluate.apply(void 0,r);if(void 0!==n&&void 0!==i)return d(n,i,o)}}:d(c,u,o)}function sa(r,e,n){return"color"===e.type?n=De.parse(n):"formatted"===e.type?n=He.fromString(n.toString()):"resolvedImage"===e.type?n=Le.fromString(n.toString()):na(n)===e.type||"enum"===e.type&&e.values[n]||(n=void 0),oa(n,r.default,e.default)}function la(r,e,n,i){var a=i-n,t=r-n;return 0===a?0:1===e?t/a:(Math.pow(e,t)-1)/(Math.pow(e,a)-1)}an.register(Vi,{error:[Ae,[xe],function(r,e){var n=e[0];throw new Ze(n.evaluate(r))}],typeof:[xe,[Se],function(r,e){return Fe(Ve(e[0].evaluate(r)))}],"to-rgba":[ke(ve,4),[Ge],function(r,e){return e[0].evaluate(r).toArray()}],rgb:[Ge,[ve,ve,ve],ji],rgba:[Ge,[ve,ve,ve,ve],ji],has:{type:Pe,overloads:[[[xe],function(r,e){return Wi(e[0].evaluate(r),r.properties())}],[[xe,Ce],function(r,e){var n=e[0],i=e[1];return Wi(n.evaluate(r),i.evaluate(r))}]]},get:{type:Se,overloads:[[[xe],function(r,e){return Zi(e[0].evaluate(r),r.properties())}],[[xe,Ce],function(r,e){var n=e[0],i=e[1];return Zi(n.evaluate(r),i.evaluate(r))}]]},"feature-state":[Se,[xe],function(r,e){return Zi(e[0].evaluate(r),r.featureState||{})}],properties:[Ce,[],function(r){return r.properties()}],"geometry-type":[xe,[],function(r){return r.geometryType()}],id:[Se,[],function(r){return r.id()}],zoom:[ve,[],function(r){return r.globals.zoom}],"heatmap-density":[ve,[],function(r){return r.globals.heatmapDensity||0}],"line-progress":[ve,[],function(r){return r.globals.lineProgress||0}],accumulated:[Se,[],function(r){return void 0===r.globals.accumulated?null:r.globals.accumulated}],"+":[ve,Yi(ve),function(r,e){for(var n=0,i=0,a=e;i":[Pe,[xe,Se],function(r,e){var n=e[0],i=e[1],a=r.properties()[n.value],t=i.value;return typeof a===typeof t&&a>t}],"filter-id->":[Pe,[Se],function(r,e){var n=e[0],i=r.id(),a=n.value;return typeof i===typeof a&&i>a}],"filter-<=":[Pe,[xe,Se],function(r,e){var n=e[0],i=e[1],a=r.properties()[n.value],t=i.value;return typeof a===typeof t&&a<=t}],"filter-id-<=":[Pe,[Se],function(r,e){var n=e[0],i=r.id(),a=n.value;return typeof i===typeof a&&i<=a}],"filter->=":[Pe,[xe,Se],function(r,e){var n=e[0],i=e[1],a=r.properties()[n.value],t=i.value;return typeof a===typeof t&&a>=t}],"filter-id->=":[Pe,[Se],function(r,e){var n=e[0],i=r.id(),a=n.value;return typeof i===typeof a&&i>=a}],"filter-has":[Pe,[Se],function(r,e){return e[0].value in r.properties()}],"filter-has-id":[Pe,[],function(r){return null!==r.id()&&void 0!==r.id()}],"filter-type-in":[Pe,[ke(xe)],function(r,e){return e[0].value.indexOf(r.geometryType())>=0}],"filter-id-in":[Pe,[ke(Se)],function(r,e){return e[0].value.indexOf(r.id())>=0}],"filter-in-small":[Pe,[xe,ke(Se)],function(r,e){var n=e[0];return e[1].value.indexOf(r.properties()[n.value])>=0}],"filter-in-large":[Pe,[xe,ke(Se)],function(r,e){var n=e[0],i=e[1];return qi(r.properties()[n.value],i.value,0,i.value.length-1)}],all:{type:Pe,overloads:[[[Pe,Pe],function(r,e){var n=e[0],i=e[1];return n.evaluate(r)&&i.evaluate(r)}],[Yi(Pe),function(r,e){for(var n=0,i=e;n0&&"string"===typeof r[0]&&r[0]in Vi}function Ia(r,e){var n=new Nn(Vi,[],e?xa(e):void 0),i=n.parse(r,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?Xi(new ma(i,e)):Qi(n.errors)}ma.prototype.evaluateWithoutErrorHandling=function(r,e,n,i,a,t){return this._evaluator.globals=r,this._evaluator.feature=e,this._evaluator.featureState=n,this._evaluator.canonical=i,this._evaluator.availableImages=a||null,this._evaluator.formattedSection=t,this.expression.evaluate(this._evaluator)},ma.prototype.evaluate=function(r,e,n,i,a,t){this._evaluator.globals=r,this._evaluator.feature=e||null,this._evaluator.featureState=n||null,this._evaluator.canonical=i,this._evaluator.availableImages=a||null,this._evaluator.formattedSection=t||null;try{var o=this.expression.evaluate(this._evaluator);if(null===o||void 0===o||"number"===typeof o&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new Ze("Expected value to be one of "+Object.keys(this._enumValues).map((function(r){return JSON.stringify(r)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(c){return this._warningHistory[c.message]||(this._warningHistory[c.message]=!0,"undefined"!==typeof console&&console.warn(c.message)),this._defaultValue}};var ya=function(r,e){this.kind=r,this._styleExpression=e,this.isStateDependent="constant"!==r&&!wn(e.expression)};ya.prototype.evaluateWithoutErrorHandling=function(r,e,n,i,a,t){return this._styleExpression.evaluateWithoutErrorHandling(r,e,n,i,a,t)},ya.prototype.evaluate=function(r,e,n,i,a,t){return this._styleExpression.evaluate(r,e,n,i,a,t)};var fa=function(r,e,n,i){this.kind=r,this.zoomStops=n,this._styleExpression=e,this.isStateDependent="camera"!==r&&!wn(e.expression),this.interpolationType=i};function ga(r,e){if("error"===(r=Ia(r,e)).result)return r;var n=r.value.expression,i=zn(n);if(!i&&!$i(e))return Qi([new ge("","data expressions not supported")]);var a=Rn(n,["zoom"]);if(!a&&!ra(e))return Qi([new ge("","zoom expressions not supported")]);var t=va(n);if(!t&&!a)return Qi([new ge("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(t instanceof ge)return Qi([t]);if(t instanceof pi&&!ea(e))return Qi([new ge("",'"interpolate" expressions cannot be used with this property')]);if(!t)return Xi(new ya(i?"constant":"source",r.value));var o=t instanceof pi?t.interpolation:void 0;return Xi(new fa(i?"camera":"composite",r.value,t.labels,o))}fa.prototype.evaluateWithoutErrorHandling=function(r,e,n,i,a,t){return this._styleExpression.evaluateWithoutErrorHandling(r,e,n,i,a,t)},fa.prototype.evaluate=function(r,e,n,i,a,t){return this._styleExpression.evaluate(r,e,n,i,a,t)},fa.prototype.interpolationFactor=function(r,e,n){return this.interpolationType?pi.interpolationFactor(this.interpolationType,r,e,n):0};var _a=function(r,e){this._parameters=r,this._specification=e,Ie(this,ta(this._parameters,this._specification))};function ha(r,e){if(ia(r))return new _a(r,e);if(pa(r)){var n=ga(r,e);if("error"===n.result)throw new Error(n.value.map((function(r){return r.key+": "+r.message})).join(", "));return n.value}var i=r;return"string"===typeof r&&"color"===e.type&&(i=De.parse(r)),{kind:"constant",evaluate:function(){return i}}}function va(r){var e=null;if(r instanceof fi)e=va(r.result);else if(r instanceof yi)for(var n=0,i=r.args;ni.maximum?[new me(e,n,n+" is greater than the maximum value "+i.maximum)]:[]}function Aa(r){var e,n,i,a=r.valueSpec,t=ye(r.value.type),o={},c="categorical"!==t&&void 0===r.value.property,u=!c,d="array"===na(r.value.stops)&&"array"===na(r.value.stops[0])&&"object"===na(r.value.stops[0][0]),s=Ga({key:r.key,value:r.value,valueSpec:r.styleSpec.function,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:l,default:I}});return"identity"===t&&c&&s.push(new me(r.key,r.value,'missing required property "property"')),"identity"===t||r.value.stops||s.push(new me(r.key,r.value,'missing required property "stops"')),"exponential"===t&&r.valueSpec.expression&&!ea(r.valueSpec)&&s.push(new me(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(u&&!$i(r.valueSpec)?s.push(new me(r.key,r.value,"property functions not supported")):c&&!ra(r.valueSpec)&&s.push(new me(r.key,r.value,"zoom functions not supported"))),"categorical"!==t&&!d||void 0!==r.value.property||s.push(new me(r.key,r.value,'"property" property is required')),s;function l(r){if("identity"===t)return[new me(r.key,r.value,'identity function may not have a "stops" property')];var e=[],n=r.value;return e=e.concat(Ca({key:r.key,value:n,valueSpec:r.valueSpec,style:r.style,styleSpec:r.styleSpec,arrayElementValidator:m})),"array"===na(n)&&0===n.length&&e.push(new me(r.key,n,"array must have at least one stop")),e}function m(r){var e=[],t=r.value,c=r.key;if("array"!==na(t))return[new me(c,t,"array expected, "+na(t)+" found")];if(2!==t.length)return[new me(c,t,"array length 2 expected, length "+t.length+" found")];if(d){if("object"!==na(t[0]))return[new me(c,t,"object expected, "+na(t[0])+" found")];if(void 0===t[0].zoom)return[new me(c,t,"object stop key must have zoom")];if(void 0===t[0].value)return[new me(c,t,"object stop key must have value")];if(i&&i>ye(t[0].zoom))return[new me(c,t[0].zoom,"stop zoom values must appear in ascending order")];ye(t[0].zoom)!==i&&(i=ye(t[0].zoom),n=void 0,o={}),e=e.concat(Ga({key:c+"[0]",value:t[0],valueSpec:{zoom:{}},style:r.style,styleSpec:r.styleSpec,objectElementValidators:{zoom:Sa,value:p}}))}else e=e.concat(p({key:c+"[0]",value:t[0],valueSpec:{},style:r.style,styleSpec:r.styleSpec},t));return pa(fe(t[1]))?e.concat([new me(c+"[1]",t[1],"expressions are not allowed in function stops.")]):e.concat(nt({key:c+"[1]",value:t[1],valueSpec:a,style:r.style,styleSpec:r.styleSpec}))}function p(r,i){var c=na(r.value),u=ye(r.value),d=null!==r.value?r.value:i;if(e){if(c!==e)return[new me(r.key,d,c+" stop domain type must match previous stop domain type "+e)]}else e=c;if("number"!==c&&"string"!==c&&"boolean"!==c)return[new me(r.key,d,"stop domain value must be a number, string, or boolean")];if("number"!==c&&"categorical"!==t){var s="number expected, "+c+" found";return $i(a)&&void 0===t&&(s+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new me(r.key,d,s)]}return"categorical"!==t||"number"!==c||isFinite(u)&&Math.floor(u)===u?"categorical"!==t&&"number"===c&&void 0!==n&&u=2&&"$id"!==r[1]&&"$type"!==r[1];case"in":return r.length>=3&&("string"!==typeof r[1]||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==r.length||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(var e=0,n=r.slice(1);ee?1:0}function Ea(r){if(!Array.isArray(r))return!1;if("within"===r[0])return!0;for(var e=1;e"===e||"<="===e||">="===e?Ta(r[1],r[2],e):"any"===e?Da(r.slice(1)):"all"===e?["all"].concat(r.slice(1).map(Na)):"none"===e?["all"].concat(r.slice(1).map(Na).map(Ha)):"in"===e?Ja(r[1],r.slice(2)):"!in"===e?Ha(Ja(r[1],r.slice(2))):"has"===e?Ua(r[1]):"!has"===e?Ha(Ua(r[1])):"within"!==e||r}function Ta(r,e,n){switch(r){case"$type":return["filter-type-"+n,e];case"$id":return["filter-id-"+n,e];default:return["filter-"+n,r,e]}}function Da(r){return["any"].concat(r.map(Na))}function Ja(r,e){if(0===e.length)return!1;switch(r){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(r){return typeof r!==typeof e[0]}))?["filter-in-large",r,["literal",e.sort(Ra)]]:["filter-in-small",r,["literal",e]]}}function Ua(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function Ha(r){return["!",r]}function La(r){return Fa(fe(r.value))?ba(Ie({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Oa(r)}function Oa(r){var e=r.value,n=r.key;if("array"!==na(e))return[new me(n,e,"array expected, "+na(e)+" found")];var i,a=r.styleSpec,t=[];if(e.length<1)return[new me(n,e,"filter array must have at least 1 element")];switch(t=t.concat(ka({key:n+"[0]",value:e[0],valueSpec:a.filter_operator,style:r.style,styleSpec:r.styleSpec})),ye(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===ye(e[1])&&t.push(new me(n,e,'"$type" cannot be use with operator "'+e[0]+'"'));case"==":case"!=":3!==e.length&&t.push(new me(n,e,'filter array for operator "'+e[0]+'" must have 3 elements'));case"in":case"!in":e.length>=2&&"string"!==(i=na(e[1]))&&t.push(new me(n+"[1]",e[1],"string expected, "+i+" found"));for(var o=2;o=s[p+0]&&i>=s[p+1])?(o[m]=!0,t.push(d[m])):o[m]=!1}}},It.prototype._forEachCell=function(r,e,n,i,a,t,o,c){for(var u=this._convertToCellCoord(r),d=this._convertToCellCoord(e),s=this._convertToCellCoord(n),l=this._convertToCellCoord(i),m=u;m<=s;m++)for(var p=d;p<=l;p++){var I=this.d*p+m;if((!c||c(this._convertFromCellCoord(m),this._convertFromCellCoord(p),this._convertFromCellCoord(m+1),this._convertFromCellCoord(p+1)))&&a.call(this,r,e,n,i,I,t,o,c))return}},It.prototype._convertFromCellCoord=function(r){return(r-this.padding)/this.scale},It.prototype._convertToCellCoord=function(r){return Math.max(0,Math.min(this.d-1,Math.floor(r*this.scale)+this.padding))},It.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var r=this.cells,e=pt+this.cells.length+1+1,n=0,i=0;i=0)){var l=r[s];d[s]=gt[u].shallow.indexOf(s)>=0?l:Pt(l,e)}r instanceof Error&&(d.message=r.message)}if(d.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(d.$name=u),d}throw new Error("can't serialize object of type "+typeof r)}function Gt(r){if(null===r||void 0===r||"boolean"===typeof r||"number"===typeof r||"string"===typeof r||r instanceof Boolean||r instanceof Number||r instanceof String||r instanceof Date||r instanceof RegExp||vt(r)||xt(r)||ArrayBuffer.isView(r)||r instanceof yt)return r;if(Array.isArray(r))return r.map(Gt);if("object"===typeof r){var e=r.$name||"Object",n=gt[e].klass;if(!n)throw new Error("can't deserialize unregistered class "+e);if(n.deserialize)return n.deserialize(r);for(var i=Object.create(n.prototype),a=0,t=Object.keys(r);a=0?c:Gt(c)}}return i}throw new Error("can't deserialize object of type "+typeof r)}var Ct=function(){this.first=!0};Ct.prototype.update=function(r,e){var n=Math.floor(r);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=r,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=e):this.lastFloorZoom=128&&r<=255},Arabic:function(r){return r>=1536&&r<=1791},"Arabic Supplement":function(r){return r>=1872&&r<=1919},"Arabic Extended-A":function(r){return r>=2208&&r<=2303},"Hangul Jamo":function(r){return r>=4352&&r<=4607},"Unified Canadian Aboriginal Syllabics":function(r){return r>=5120&&r<=5759},Khmer:function(r){return r>=6016&&r<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(r){return r>=6320&&r<=6399},"General Punctuation":function(r){return r>=8192&&r<=8303},"Letterlike Symbols":function(r){return r>=8448&&r<=8527},"Number Forms":function(r){return r>=8528&&r<=8591},"Miscellaneous Technical":function(r){return r>=8960&&r<=9215},"Control Pictures":function(r){return r>=9216&&r<=9279},"Optical Character Recognition":function(r){return r>=9280&&r<=9311},"Enclosed Alphanumerics":function(r){return r>=9312&&r<=9471},"Geometric Shapes":function(r){return r>=9632&&r<=9727},"Miscellaneous Symbols":function(r){return r>=9728&&r<=9983},"Miscellaneous Symbols and Arrows":function(r){return r>=11008&&r<=11263},"CJK Radicals Supplement":function(r){return r>=11904&&r<=12031},"Kangxi Radicals":function(r){return r>=12032&&r<=12255},"Ideographic Description Characters":function(r){return r>=12272&&r<=12287},"CJK Symbols and Punctuation":function(r){return r>=12288&&r<=12351},Hiragana:function(r){return r>=12352&&r<=12447},Katakana:function(r){return r>=12448&&r<=12543},Bopomofo:function(r){return r>=12544&&r<=12591},"Hangul Compatibility Jamo":function(r){return r>=12592&&r<=12687},Kanbun:function(r){return r>=12688&&r<=12703},"Bopomofo Extended":function(r){return r>=12704&&r<=12735},"CJK Strokes":function(r){return r>=12736&&r<=12783},"Katakana Phonetic Extensions":function(r){return r>=12784&&r<=12799},"Enclosed CJK Letters and Months":function(r){return r>=12800&&r<=13055},"CJK Compatibility":function(r){return r>=13056&&r<=13311},"CJK Unified Ideographs Extension A":function(r){return r>=13312&&r<=19903},"Yijing Hexagram Symbols":function(r){return r>=19904&&r<=19967},"CJK Unified Ideographs":function(r){return r>=19968&&r<=40959},"Yi Syllables":function(r){return r>=40960&&r<=42127},"Yi Radicals":function(r){return r>=42128&&r<=42191},"Hangul Jamo Extended-A":function(r){return r>=43360&&r<=43391},"Hangul Syllables":function(r){return r>=44032&&r<=55215},"Hangul Jamo Extended-B":function(r){return r>=55216&&r<=55295},"Private Use Area":function(r){return r>=57344&&r<=63743},"CJK Compatibility Ideographs":function(r){return r>=63744&&r<=64255},"Arabic Presentation Forms-A":function(r){return r>=64336&&r<=65023},"Vertical Forms":function(r){return r>=65040&&r<=65055},"CJK Compatibility Forms":function(r){return r>=65072&&r<=65103},"Small Form Variants":function(r){return r>=65104&&r<=65135},"Arabic Presentation Forms-B":function(r){return r>=65136&&r<=65279},"Halfwidth and Fullwidth Forms":function(r){return r>=65280&&r<=65519}};function At(r){for(var e=0,n=r;e=65097&&r<=65103)||!!St["CJK Compatibility Ideographs"](r)||!!St["CJK Compatibility"](r)||!!St["CJK Radicals Supplement"](r)||!!St["CJK Strokes"](r)||!(!St["CJK Symbols and Punctuation"](r)||r>=12296&&r<=12305||r>=12308&&r<=12319||12336===r)||!!St["CJK Unified Ideographs Extension A"](r)||!!St["CJK Unified Ideographs"](r)||!!St["Enclosed CJK Letters and Months"](r)||!!St["Hangul Compatibility Jamo"](r)||!!St["Hangul Jamo Extended-A"](r)||!!St["Hangul Jamo Extended-B"](r)||!!St["Hangul Jamo"](r)||!!St["Hangul Syllables"](r)||!!St.Hiragana(r)||!!St["Ideographic Description Characters"](r)||!!St.Kanbun(r)||!!St["Kangxi Radicals"](r)||!!St["Katakana Phonetic Extensions"](r)||!(!St.Katakana(r)||12540===r)||!(!St["Halfwidth and Fullwidth Forms"](r)||65288===r||65289===r||65293===r||r>=65306&&r<=65310||65339===r||65341===r||65343===r||r>=65371&&r<=65503||65507===r||r>=65512&&r<=65519)||!(!St["Small Form Variants"](r)||r>=65112&&r<=65118||r>=65123&&r<=65126)||!!St["Unified Canadian Aboriginal Syllabics"](r)||!!St["Unified Canadian Aboriginal Syllabics Extended"](r)||!!St["Vertical Forms"](r)||!!St["Yijing Hexagram Symbols"](r)||!!St["Yi Syllables"](r)||!!St["Yi Radicals"](r))}function Ft(r){return!(!St["Latin-1 Supplement"](r)||167!==r&&169!==r&&174!==r&&177!==r&&188!==r&&189!==r&&190!==r&&215!==r&&247!==r)||!(!St["General Punctuation"](r)||8214!==r&&8224!==r&&8225!==r&&8240!==r&&8241!==r&&8251!==r&&8252!==r&&8258!==r&&8263!==r&&8264!==r&&8265!==r&&8273!==r)||!!St["Letterlike Symbols"](r)||!!St["Number Forms"](r)||!(!St["Miscellaneous Technical"](r)||!(r>=8960&&r<=8967||r>=8972&&r<=8991||r>=8996&&r<=9e3||9003===r||r>=9085&&r<=9114||r>=9150&&r<=9165||9167===r||r>=9169&&r<=9179||r>=9186&&r<=9215))||!(!St["Control Pictures"](r)||9251===r)||!!St["Optical Character Recognition"](r)||!!St["Enclosed Alphanumerics"](r)||!!St["Geometric Shapes"](r)||!(!St["Miscellaneous Symbols"](r)||r>=9754&&r<=9759)||!(!St["Miscellaneous Symbols and Arrows"](r)||!(r>=11026&&r<=11055||r>=11088&&r<=11097||r>=11192&&r<=11243))||!!St["CJK Symbols and Punctuation"](r)||!!St.Katakana(r)||!!St["Private Use Area"](r)||!!St["CJK Compatibility Forms"](r)||!!St["Small Form Variants"](r)||!!St["Halfwidth and Fullwidth Forms"](r)||8734===r||8756===r||8757===r||r>=9984&&r<=10087||r>=10102&&r<=10131||65532===r||65533===r}function zt(r){return!(kt(r)||Ft(r))}function wt(r){return St.Arabic(r)||St["Arabic Supplement"](r)||St["Arabic Extended-A"](r)||St["Arabic Presentation Forms-A"](r)||St["Arabic Presentation Forms-B"](r)}function Rt(r){return r>=1424&&r<=2303||St["Arabic Presentation Forms-A"](r)||St["Arabic Presentation Forms-B"](r)}function Et(r,e){return!(!e&&Rt(r))&&!(r>=2304&&r<=3583||r>=3840&&r<=4255||St.Khmer(r))}function Nt(r){for(var e=0,n=r;e-1&&(Ut=Dt.error),Jt&&Jt(r)};function Ot(){Kt.fire(new ue("pluginStateChange",{pluginStatus:Ut,pluginURL:Ht}))}var Kt=new se,Vt=function(){return Ut},jt=function(r){return r({pluginStatus:Ut,pluginURL:Ht}),Kt.on("pluginStateChange",r),r},Wt=function(r,e,n){if(void 0===n&&(n=!1),Ut===Dt.deferred||Ut===Dt.loading||Ut===Dt.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ht=Y.resolveURL(r),Ut=Dt.deferred,Jt=e,Ot(),n||Zt()},Zt=function(){if(Ut!==Dt.deferred||!Ht)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ut=Dt.loading,Ot(),Ht&&Yr({url:Ht},(function(r){r?Lt(r):(Ut=Dt.loaded,Ot())}))},qt={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ut===Dt.loaded||null!=qt.applyArabicShaping},isLoading:function(){return Ut===Dt.loading},setState:function(r){Ut=r.pluginStatus,Ht=r.pluginURL},isParsed:function(){return null!=qt.applyArabicShaping&&null!=qt.processBidirectionalText&&null!=qt.processStyledBidirectionalText},getPluginURL:function(){return Ht}},Yt=function(){qt.isLoading()||qt.isLoaded()||"deferred"!==Vt()||Zt()},Xt=function(r,e){this.zoom=r,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ct,this.transition={})};Xt.prototype.isSupportedScript=function(r){return Tt(r,qt.isLoaded())},Xt.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Xt.prototype.getCrossfadeParameters=function(){var r=this.zoom,e=r-Math.floor(r),n=this.crossFadingFactor();return r>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*e}};var Qt=function(r,e){this.property=r,this.value=e,this.expression=ha(void 0===e?r.specification.default:e,r.specification)};Qt.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Qt.prototype.possiblyEvaluate=function(r,e,n){return this.property.possiblyEvaluate(this,r,e,n)};var $t=function(r){this.property=r,this.value=new Qt(r,void 0)};$t.prototype.transitioned=function(r,e){return new eo(this.property,this.value,e,_({},r.transition,this.transition),r.now)},$t.prototype.untransitioned=function(){return new eo(this.property,this.value,null,{},0)};var ro=function(r){this._properties=r,this._values=Object.create(r.defaultTransitionablePropertyValues)};ro.prototype.getValue=function(r){return B(this._values[r].value.value)},ro.prototype.setValue=function(r,e){this._values.hasOwnProperty(r)||(this._values[r]=new $t(this._values[r].property)),this._values[r].value=new Qt(this._values[r].property,null===e?void 0:B(e))},ro.prototype.getTransition=function(r){return B(this._values[r].transition)},ro.prototype.setTransition=function(r,e){this._values.hasOwnProperty(r)||(this._values[r]=new $t(this._values[r].property)),this._values[r].transition=B(e)||void 0},ro.prototype.serialize=function(){for(var r={},e=0,n=Object.keys(this._values);ethis.end)return this.prior=null,a;if(this.value.isDataDriven())return this.prior=null,a;if(ii.zoomHistory.lastIntegerZoom?{from:r,to:e}:{from:n,to:e}},e.prototype.interpolate=function(r){return r},e}(co),so=function(r){this.specification=r};so.prototype.possiblyEvaluate=function(r,e,n,i){if(void 0!==r.value){if("constant"===r.expression.kind){var a=r.expression.evaluate(e,null,{},n,i);return this._calculate(a,a,a,e)}return this._calculate(r.expression.evaluate(new Xt(Math.floor(e.zoom-1),e)),r.expression.evaluate(new Xt(Math.floor(e.zoom),e)),r.expression.evaluate(new Xt(Math.floor(e.zoom+1),e)),e)}},so.prototype._calculate=function(r,e,n,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:r,to:e}:{from:n,to:e}},so.prototype.interpolate=function(r){return r};var lo=function(r){this.specification=r};lo.prototype.possiblyEvaluate=function(r,e,n,i){return!!r.expression.evaluate(e,null,{},n,i)},lo.prototype.interpolate=function(){return!1};var mo=function(r){for(var e in this.properties=r,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],r){var n=r[e];n.specification.overridable&&this.overridableProperties.push(e);var i=this.defaultPropertyValues[e]=new Qt(n,void 0),a=this.defaultTransitionablePropertyValues[e]=new $t(n);this.defaultTransitioningPropertyValues[e]=a.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};_t("DataDrivenProperty",co),_t("DataConstantProperty",oo),_t("CrossFadedDataDrivenProperty",uo),_t("CrossFadedProperty",so),_t("ColorRampProperty",lo);var po="-transition",Io=function(r){function e(e,n){if(r.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),n.layout&&(this._unevaluatedLayout=new io(n.layout)),n.paint)){for(var i in this._transitionablePaint=new ro(n.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var a in e.layout)this.setLayoutProperty(a,e.layout[a],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new to(n.paint)}}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(r){return"visibility"===r?this.visibility:this._unevaluatedLayout.getValue(r)},e.prototype.setLayoutProperty=function(r,e,n){if(void 0===n&&(n={}),null!==e&&void 0!==e){var i="layers."+this.id+".layout."+r;if(this._validate(st,i,r,e,n))return}"visibility"!==r?this._unevaluatedLayout.setValue(r,e):this.visibility=e},e.prototype.getPaintProperty=function(r){return A(r,po)?this._transitionablePaint.getTransition(r.slice(0,-po.length)):this._transitionablePaint.getValue(r)},e.prototype.setPaintProperty=function(r,e,n){if(void 0===n&&(n={}),null!==e&&void 0!==e){var i="layers."+this.id+".paint."+r;if(this._validate(dt,i,r,e,n))return!1}if(A(r,po))return this._transitionablePaint.setTransition(r.slice(0,-po.length),e||void 0),!1;var a=this._transitionablePaint._values[r],t="cross-faded-data-driven"===a.property.specification["property-type"],o=a.value.isDataDriven(),c=a.value;this._transitionablePaint.setValue(r,e),this._handleSpecialPaintPropertyUpdate(r);var u=this._transitionablePaint._values[r].value;return u.isDataDriven()||o||t||this._handleOverridablePaintPropertyUpdate(r,c,u)},e.prototype._handleSpecialPaintPropertyUpdate=function(r){},e.prototype._handleOverridablePaintPropertyUpdate=function(r,e,n){return!1},e.prototype.isHidden=function(r){return!!(this.minzoom&&r=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(r){this._transitioningPaint=this._transitionablePaint.transitioned(r,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(r,e){r.getCrossfadeParameters&&(this._crossfadeParameters=r.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(r,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(r,void 0,e)},e.prototype.serialize=function(){var r={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&&(r.layout=r.layout||{},r.layout.visibility=this.visibility),M(r,(function(r,e){return void 0!==r&&!("layout"===e&&!Object.keys(r).length)&&!("paint"===e&&!Object.keys(r).length)}))},e.prototype._validate=function(r,e,n,i,a){return void 0===a&&(a={}),(!a||!1!==a.validate)&<(this,r.call(ct,{key:e,layerType:this.type,objectKey:n,value:i,styleSpec:le,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var r in this.paint._values){var e=this.paint.get(r);if(e instanceof ao&&$i(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(se),yo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},fo=function(r,e){this._structArray=r,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},go=128,_o=5,ho=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function vo(r,e){void 0===e&&(e=1);var n=0,i=0;return{members:r.map((function(r){var a=xo(r.type),t=n=Po(n,Math.max(e,a)),o=r.components||1;return i=Math.max(i,a),n+=a*o,{name:r.name,type:r.type,components:o,offset:t}})),size:Po(n,Math.max(i,e)),alignment:e}}function xo(r){return yo[r].BYTES_PER_ELEMENT}function Po(r,e){return Math.ceil(r/e)*e}ho.serialize=function(r,e){return r._trim(),e&&(r.isTransferred=!0,e.push(r.arrayBuffer)),{length:r.length,arrayBuffer:r.arrayBuffer}},ho.deserialize=function(r){var e=Object.create(this.prototype);return e.arrayBuffer=r.arrayBuffer,e.length=r.length,e.capacity=r.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},ho.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ho.prototype.clear=function(){this.length=0},ho.prototype.resize=function(r){this.reserve(r),this.length=r},ho.prototype.reserve=function(r){if(r>this.capacity){this.capacity=Math.max(r,Math.floor(this.capacity*_o),go),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},ho.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Go=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e){var n=this.length;return this.resize(n+1),this.emplace(n,r,e)},e.prototype.emplace=function(r,e,n){var i=2*r;return this.int16[i+0]=e,this.int16[i+1]=n,r},e}(ho);Go.prototype.bytesPerElement=4,_t("StructArrayLayout2i4",Go);var Co=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,r,e,n,i)},e.prototype.emplace=function(r,e,n,i,a){var t=4*r;return this.int16[t+0]=e,this.int16[t+1]=n,this.int16[t+2]=i,this.int16[t+3]=a,r},e}(ho);Co.prototype.bytesPerElement=8,_t("StructArrayLayout4i8",Co);var So=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t){var o=this.length;return this.resize(o+1),this.emplace(o,r,e,n,i,a,t)},e.prototype.emplace=function(r,e,n,i,a,t,o){var c=6*r;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=i,this.int16[c+3]=a,this.int16[c+4]=t,this.int16[c+5]=o,r},e}(ho);So.prototype.bytesPerElement=12,_t("StructArrayLayout2i4i12",So);var Ao=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t){var o=this.length;return this.resize(o+1),this.emplace(o,r,e,n,i,a,t)},e.prototype.emplace=function(r,e,n,i,a,t,o){var c=4*r,u=8*r;return this.int16[c+0]=e,this.int16[c+1]=n,this.uint8[u+4]=i,this.uint8[u+5]=a,this.uint8[u+6]=t,this.uint8[u+7]=o,r},e}(ho);Ao.prototype.bytesPerElement=8,_t("StructArrayLayout2i4ub8",Ao);var bo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e){var n=this.length;return this.resize(n+1),this.emplace(n,r,e)},e.prototype.emplace=function(r,e,n){var i=2*r;return this.float32[i+0]=e,this.float32[i+1]=n,r},e}(ho);bo.prototype.bytesPerElement=8,_t("StructArrayLayout2f8",bo);var Mo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u,d){var s=this.length;return this.resize(s+1),this.emplace(s,r,e,n,i,a,t,o,c,u,d)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d,s){var l=10*r;return this.uint16[l+0]=e,this.uint16[l+1]=n,this.uint16[l+2]=i,this.uint16[l+3]=a,this.uint16[l+4]=t,this.uint16[l+5]=o,this.uint16[l+6]=c,this.uint16[l+7]=u,this.uint16[l+8]=d,this.uint16[l+9]=s,r},e}(ho);Mo.prototype.bytesPerElement=20,_t("StructArrayLayout10ui20",Mo);var Bo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u,d,s,l){var m=this.length;return this.resize(m+1),this.emplace(m,r,e,n,i,a,t,o,c,u,d,s,l)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d,s,l,m){var p=12*r;return this.int16[p+0]=e,this.int16[p+1]=n,this.int16[p+2]=i,this.int16[p+3]=a,this.uint16[p+4]=t,this.uint16[p+5]=o,this.uint16[p+6]=c,this.uint16[p+7]=u,this.int16[p+8]=d,this.int16[p+9]=s,this.int16[p+10]=l,this.int16[p+11]=m,r},e}(ho);Bo.prototype.bytesPerElement=24,_t("StructArrayLayout4i4ui4i24",Bo);var ko=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,r,e,n)},e.prototype.emplace=function(r,e,n,i){var a=3*r;return this.float32[a+0]=e,this.float32[a+1]=n,this.float32[a+2]=i,r},e}(ho);ko.prototype.bytesPerElement=12,_t("StructArrayLayout3f12",ko);var Fo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r){var e=this.length;return this.resize(e+1),this.emplace(e,r)},e.prototype.emplace=function(r,e){var n=1*r;return this.uint32[n+0]=e,r},e}(ho);Fo.prototype.bytesPerElement=4,_t("StructArrayLayout1ul4",Fo);var zo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u){var d=this.length;return this.resize(d+1),this.emplace(d,r,e,n,i,a,t,o,c,u)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d){var s=10*r,l=5*r;return this.int16[s+0]=e,this.int16[s+1]=n,this.int16[s+2]=i,this.int16[s+3]=a,this.int16[s+4]=t,this.int16[s+5]=o,this.uint32[l+3]=c,this.uint16[s+8]=u,this.uint16[s+9]=d,r},e}(ho);zo.prototype.bytesPerElement=20,_t("StructArrayLayout6i1ul2ui20",zo);var wo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a,t){var o=this.length;return this.resize(o+1),this.emplace(o,r,e,n,i,a,t)},e.prototype.emplace=function(r,e,n,i,a,t,o){var c=6*r;return this.int16[c+0]=e,this.int16[c+1]=n,this.int16[c+2]=i,this.int16[c+3]=a,this.int16[c+4]=t,this.int16[c+5]=o,r},e}(ho);wo.prototype.bytesPerElement=12,_t("StructArrayLayout2i2i2i12",wo);var Ro=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i,a){var t=this.length;return this.resize(t+1),this.emplace(t,r,e,n,i,a)},e.prototype.emplace=function(r,e,n,i,a,t){var o=4*r,c=8*r;return this.float32[o+0]=e,this.float32[o+1]=n,this.float32[o+2]=i,this.int16[c+6]=a,this.int16[c+7]=t,r},e}(ho);Ro.prototype.bytesPerElement=16,_t("StructArrayLayout2f1f2i16",Ro);var Eo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,r,e,n,i)},e.prototype.emplace=function(r,e,n,i,a){var t=12*r,o=3*r;return this.uint8[t+0]=e,this.uint8[t+1]=n,this.float32[o+1]=i,this.float32[o+2]=a,r},e}(ho);Eo.prototype.bytesPerElement=12,_t("StructArrayLayout2ub2f12",Eo);var No=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,r,e,n)},e.prototype.emplace=function(r,e,n,i){var a=3*r;return this.uint16[a+0]=e,this.uint16[a+1]=n,this.uint16[a+2]=i,r},e}(ho);No.prototype.bytesPerElement=6,_t("StructArrayLayout3ui6",No);var To=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f){var g=this.length;return this.resize(g+1),this.emplace(g,r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g){var _=24*r,h=12*r,v=48*r;return this.int16[_+0]=e,this.int16[_+1]=n,this.uint16[_+2]=i,this.uint16[_+3]=a,this.uint32[h+2]=t,this.uint32[h+3]=o,this.uint32[h+4]=c,this.uint16[_+10]=u,this.uint16[_+11]=d,this.uint16[_+12]=s,this.float32[h+7]=l,this.float32[h+8]=m,this.uint8[v+36]=p,this.uint8[v+37]=I,this.uint8[v+38]=y,this.uint32[h+10]=f,this.int16[_+22]=g,r},e}(ho);To.prototype.bytesPerElement=48,_t("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",To);var Do=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b){var M=this.length;return this.resize(M+1),this.emplace(M,r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b)},e.prototype.emplace=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b,M){var B=34*r,k=17*r;return this.int16[B+0]=e,this.int16[B+1]=n,this.int16[B+2]=i,this.int16[B+3]=a,this.int16[B+4]=t,this.int16[B+5]=o,this.int16[B+6]=c,this.int16[B+7]=u,this.uint16[B+8]=d,this.uint16[B+9]=s,this.uint16[B+10]=l,this.uint16[B+11]=m,this.uint16[B+12]=p,this.uint16[B+13]=I,this.uint16[B+14]=y,this.uint16[B+15]=f,this.uint16[B+16]=g,this.uint16[B+17]=_,this.uint16[B+18]=h,this.uint16[B+19]=v,this.uint16[B+20]=x,this.uint16[B+21]=P,this.uint16[B+22]=G,this.uint32[k+12]=C,this.float32[k+13]=S,this.float32[k+14]=A,this.float32[k+15]=b,this.float32[k+16]=M,r},e}(ho);Do.prototype.bytesPerElement=68,_t("StructArrayLayout8i15ui1ul4f68",Do);var Jo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r){var e=this.length;return this.resize(e+1),this.emplace(e,r)},e.prototype.emplace=function(r,e){var n=1*r;return this.float32[n+0]=e,r},e}(ho);Jo.prototype.bytesPerElement=4,_t("StructArrayLayout1f4",Jo);var Uo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,r,e,n)},e.prototype.emplace=function(r,e,n,i){var a=3*r;return this.int16[a+0]=e,this.int16[a+1]=n,this.int16[a+2]=i,r},e}(ho);Uo.prototype.bytesPerElement=6,_t("StructArrayLayout3i6",Uo);var Ho=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n){var i=this.length;return this.resize(i+1),this.emplace(i,r,e,n)},e.prototype.emplace=function(r,e,n,i){var a=2*r,t=4*r;return this.uint32[a+0]=e,this.uint16[t+2]=n,this.uint16[t+3]=i,r},e}(ho);Ho.prototype.bytesPerElement=8,_t("StructArrayLayout1ul2ui8",Ho);var Lo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e){var n=this.length;return this.resize(n+1),this.emplace(n,r,e)},e.prototype.emplace=function(r,e,n){var i=2*r;return this.uint16[i+0]=e,this.uint16[i+1]=n,r},e}(ho);Lo.prototype.bytesPerElement=4,_t("StructArrayLayout2ui4",Lo);var Oo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r){var e=this.length;return this.resize(e+1),this.emplace(e,r)},e.prototype.emplace=function(r,e){var n=1*r;return this.uint16[n+0]=e,r},e}(ho);Oo.prototype.bytesPerElement=2,_t("StructArrayLayout1ui2",Oo);var Ko=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(r,e,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,r,e,n,i)},e.prototype.emplace=function(r,e,n,i,a){var t=4*r;return this.float32[t+0]=e,this.float32[t+1]=n,this.float32[t+2]=i,this.float32[t+3]=a,r},e}(ho);Ko.prototype.bytesPerElement=16,_t("StructArrayLayout4f16",Ko);var Vo=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var n={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},anchorPoint:{configurable:!0}};return n.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},n.x1.get=function(){return this._structArray.int16[this._pos2+2]},n.y1.get=function(){return this._structArray.int16[this._pos2+3]},n.x2.get=function(){return this._structArray.int16[this._pos2+4]},n.y2.get=function(){return this._structArray.int16[this._pos2+5]},n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.anchorPoint.get=function(){return new t(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,n),e}(fo);Vo.prototype.size=20;var jo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return new Vo(this,r)},e}(zo);_t("CollisionBoxArray",jo);var Wo=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var n={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},associatedIconIndex:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},n.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},n.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},n.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},n.segment.get=function(){return this._structArray.uint16[this._pos2+10]},n.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},n.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},n.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},n.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},n.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},n.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},n.placedOrientation.set=function(r){this._structArray.uint8[this._pos1+37]=r},n.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},n.hidden.set=function(r){this._structArray.uint8[this._pos1+38]=r},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},n.crossTileID.set=function(r){this._structArray.uint32[this._pos4+10]=r},n.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,n),e}(fo);Wo.prototype.size=48;var Zo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return new Wo(this,r)},e}(To);_t("PlacedSymbolArray",Zo);var qo=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var n={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return n.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},n.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},n.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},n.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},n.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},n.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},n.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},n.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},n.key.get=function(){return this._structArray.uint16[this._pos2+8]},n.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},n.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},n.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},n.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},n.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},n.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},n.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},n.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},n.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},n.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},n.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},n.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},n.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},n.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},n.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},n.crossTileID.set=function(r){this._structArray.uint32[this._pos4+12]=r},n.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},n.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},n.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},n.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,n),e}(fo);qo.prototype.size=68;var Yo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return new qo(this,r)},e}(Do);_t("SymbolInstanceArray",Yo);var Xo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(r){return this.float32[1*r+0]},e}(Jo);_t("GlyphOffsetArray",Xo);var Qo=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.getx=function(r){return this.int16[3*r+0]},e.prototype.gety=function(r){return this.int16[3*r+1]},e.prototype.gettileUnitDistanceFromAnchor=function(r){return this.int16[3*r+2]},e}(Uo);_t("SymbolLineVertexArray",Qo);var $o=function(r){function e(){r.apply(this,arguments)}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var n={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return n.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},n.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},n.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,n),e}(fo);$o.prototype.size=8;var rc=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.get=function(r){return new $o(this,r)},e}(Ho);_t("FeatureIndexArray",rc);var ec=vo([{name:"a_pos",components:2,type:"Int16"}],4).members,nc=function(r){void 0===r&&(r=[]),this.segments=r};function ic(r,e){return 256*(r=p(Math.floor(r),0,255))+(e=p(Math.floor(e),0,255))}nc.prototype.prepareSegment=function(r,e,n,i){var a=this.segments[this.segments.length-1];return r>nc.MAX_VERTEX_ARRAY_LENGTH&&z("Max vertices per segment is "+nc.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+r),(!a||a.vertexLength+r>nc.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==i)&&(a={vertexOffset:e.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==i&&(a.sortKey=i),this.segments.push(a)),a},nc.prototype.get=function(){return this.segments},nc.prototype.destroy=function(){for(var r=0,e=this.segments;r>>16)*o&65535)<<16)&4294967295)<<15|u>>>17))*c+(((u>>>16)*c&65535)<<16)&4294967295)<<13|a>>>19))+((5*(a>>>16)&65535)<<16)&4294967295))+((58964+(t>>>16)&65535)<<16);switch(u=0,n){case 3:u^=(255&r.charCodeAt(d+2))<<16;case 2:u^=(255&r.charCodeAt(d+1))<<8;case 1:a^=u=(65535&(u=(u=(65535&(u^=255&r.charCodeAt(d)))*o+(((u>>>16)*o&65535)<<16)&4294967295)<<15|u>>>17))*c+(((u>>>16)*c&65535)<<16)&4294967295}return a^=r.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}r.exports=e})),oc=e((function(r){function e(r,e){for(var n,i=r.length,a=e^i,t=0;i>=4;)n=1540483477*(65535&(n=255&r.charCodeAt(t)|(255&r.charCodeAt(++t))<<8|(255&r.charCodeAt(++t))<<16|(255&r.charCodeAt(++t))<<24))+((1540483477*(n>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),i-=4,++t;switch(i){case 3:a^=(255&r.charCodeAt(t+2))<<16;case 2:a^=(255&r.charCodeAt(t+1))<<8;case 1:a=1540483477*(65535&(a^=255&r.charCodeAt(t)))+((1540483477*(a>>>16)&65535)<<16)}return a=1540483477*(65535&(a^=a>>>13))+((1540483477*(a>>>16)&65535)<<16),(a^=a>>>15)>>>0}r.exports=e})),cc=tc,uc=tc,dc=oc;cc.murmur3=uc,cc.murmur2=dc;var sc=function(){this.ids=[],this.positions=[],this.indexed=!1};sc.prototype.add=function(r,e,n,i){this.ids.push(mc(r)),this.positions.push(e,n,i)},sc.prototype.getPositions=function(r){for(var e=mc(r),n=0,i=this.ids.length-1;n>1;this.ids[a]>=e?i=a:n=a+1}for(var t=[];this.ids[n]===e;){var o=this.positions[3*n],c=this.positions[3*n+1],u=this.positions[3*n+2];t.push({index:o,start:c,end:u}),n++}return t},sc.serialize=function(r,e){var n=new Float64Array(r.ids),i=new Uint32Array(r.positions);return pc(n,i,0,n.length-1),e&&e.push(n.buffer,i.buffer),{ids:n,positions:i}},sc.deserialize=function(r){var e=new sc;return e.ids=r.ids,e.positions=r.positions,e.indexed=!0,e};var lc=Math.pow(2,53)-1;function mc(r){var e=+r;return!isNaN(e)&&e<=lc?e:cc(String(r))}function pc(r,e,n,i){for(;n>1],t=n-1,o=i+1;;){do{t++}while(r[t]a);if(t>=o)break;Ic(r,t,o),Ic(e,3*t,3*o),Ic(e,3*t+1,3*o+1),Ic(e,3*t+2,3*o+2)}o-no.x+1||uo.y+1)&&z("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return n}function Uc(r,e){return{type:r.type,id:r.id,properties:r.properties,geometry:e?Jc(r):[]}}function Hc(r,e,n,i,a){r.emplaceBack(2*e+(i+1)/2,2*n+(a+1)/2)}var Lc=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map((function(r){return r.id})),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new Go,this.indexArray=new No,this.segments=new nc,this.programConfigurations=new Fc(r.layers,r.zoom),this.stateDependentLayerIds=this.layers.filter((function(r){return r.isStateDependent()})).map((function(r){return r.id}))};function Oc(r,e){for(var n=0;n=3)for(var t=0;t1){if(Zc(r,e))return!0;for(var i=0;i1?r.distSqr(n):r.distSqr(n.sub(e)._mult(a)._add(e))}function Qc(r,e){for(var n,i,a,t=!1,o=0;oe.y!==a.y>e.y&&e.x<(a.x-i.x)*(e.y-i.y)/(a.y-i.y)+i.x&&(t=!t);return t}function $c(r,e){for(var n=!1,i=0,a=r.length-1;ie.y!==o.y>e.y&&e.x<(o.x-t.x)*(e.y-t.y)/(o.y-t.y)+t.x&&(n=!n)}return n}function ru(r,e,n,i,a){for(var o=0,c=r;o=u.x&&a>=u.y)return!0}var d=[new t(e,n),new t(e,a),new t(i,a),new t(i,n)];if(r.length>2)for(var s=0,l=d;sa.x&&e.x>a.x||r.ya.y&&e.y>a.y)return!1;var t=w(r,e,n[0]);return t!==w(r,e,n[1])||t!==w(r,e,n[2])||t!==w(r,e,n[3])}function nu(r,e,n){var i=e.paint.get(r).value;return"constant"===i.kind?i.value:n.programConfigurations.get(e.id).getMaxValue(r)}function iu(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function au(r,e,n,i,a){if(!e[0]&&!e[1])return r;var o=t.convert(e)._mult(a);"viewport"===n&&o._rotate(-i);for(var c=[],u=0;u=Ec||s<0||s>=Ec)){var l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,r.sortKey),m=l.vertexLength;Hc(this.layoutVertexArray,d,s,-1,-1),Hc(this.layoutVertexArray,d,s,1,-1),Hc(this.layoutVertexArray,d,s,1,1),Hc(this.layoutVertexArray,d,s,-1,1),this.indexArray.emplaceBack(m,m+1,m+2),this.indexArray.emplaceBack(m,m+3,m+2),l.vertexLength+=4,l.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,r,n,{},i)},_t("CircleBucket",Lc,{omit:["layers"]});var tu=new mo({"circle-sort-key":new co(le.layout_circle["circle-sort-key"])}),ou={paint:new mo({"circle-radius":new co(le.paint_circle["circle-radius"]),"circle-color":new co(le.paint_circle["circle-color"]),"circle-blur":new co(le.paint_circle["circle-blur"]),"circle-opacity":new co(le.paint_circle["circle-opacity"]),"circle-translate":new oo(le.paint_circle["circle-translate"]),"circle-translate-anchor":new oo(le.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new oo(le.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new oo(le.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new co(le.paint_circle["circle-stroke-width"]),"circle-stroke-color":new co(le.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new co(le.paint_circle["circle-stroke-opacity"])}),layout:tu},cu="undefined"!==typeof Float32Array?Float32Array:Array;function uu(){var r=new cu(4);return cu!=Float32Array&&(r[1]=0,r[2]=0),r[0]=1,r[3]=1,r}function du(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3],c=Math.sin(n),u=Math.cos(n);return r[0]=i*u+t*c,r[1]=a*u+o*c,r[2]=i*-c+t*u,r[3]=a*-c+o*u,r}function su(){var r=new cu(9);return cu!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function lu(r,e){var n=Math.sin(e),i=Math.cos(e);return r[0]=i,r[1]=n,r[2]=0,r[3]=-n,r[4]=i,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function mu(){var r=new cu(16);return cu!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r}function pu(r){var e=new cu(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}function Iu(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function yu(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=e[4],c=e[5],u=e[6],d=e[7],s=e[8],l=e[9],m=e[10],p=e[11],I=e[12],y=e[13],f=e[14],g=e[15],_=n*c-i*o,h=n*u-a*o,v=n*d-t*o,x=i*u-a*c,P=i*d-t*c,G=a*d-t*u,C=s*y-l*I,S=s*f-m*I,A=s*g-p*I,b=l*f-m*y,M=l*g-p*y,B=m*g-p*f,k=_*B-h*M+v*b+x*A-P*S+G*C;return k?(k=1/k,r[0]=(c*B-u*M+d*b)*k,r[1]=(a*M-i*B-t*b)*k,r[2]=(y*G-f*P+g*x)*k,r[3]=(m*P-l*G-p*x)*k,r[4]=(u*A-o*B-d*S)*k,r[5]=(n*B-a*A+t*S)*k,r[6]=(f*v-I*G-g*h)*k,r[7]=(s*G-m*v+p*h)*k,r[8]=(o*M-c*A+d*C)*k,r[9]=(i*A-n*M-t*C)*k,r[10]=(I*P-y*v+g*_)*k,r[11]=(l*v-s*P-p*_)*k,r[12]=(c*S-o*b-u*C)*k,r[13]=(n*b-i*S+a*C)*k,r[14]=(y*h-I*x-f*_)*k,r[15]=(s*x-l*h+m*_)*k,r):null}function fu(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3],c=e[4],u=e[5],d=e[6],s=e[7],l=e[8],m=e[9],p=e[10],I=e[11],y=e[12],f=e[13],g=e[14],_=e[15],h=n[0],v=n[1],x=n[2],P=n[3];return r[0]=h*i+v*c+x*l+P*y,r[1]=h*a+v*u+x*m+P*f,r[2]=h*t+v*d+x*p+P*g,r[3]=h*o+v*s+x*I+P*_,h=n[4],v=n[5],x=n[6],P=n[7],r[4]=h*i+v*c+x*l+P*y,r[5]=h*a+v*u+x*m+P*f,r[6]=h*t+v*d+x*p+P*g,r[7]=h*o+v*s+x*I+P*_,h=n[8],v=n[9],x=n[10],P=n[11],r[8]=h*i+v*c+x*l+P*y,r[9]=h*a+v*u+x*m+P*f,r[10]=h*t+v*d+x*p+P*g,r[11]=h*o+v*s+x*I+P*_,h=n[12],v=n[13],x=n[14],P=n[15],r[12]=h*i+v*c+x*l+P*y,r[13]=h*a+v*u+x*m+P*f,r[14]=h*t+v*d+x*p+P*g,r[15]=h*o+v*s+x*I+P*_,r}function gu(r,e,n){var i,a,t,o,c,u,d,s,l,m,p,I,y=n[0],f=n[1],g=n[2];return e===r?(r[12]=e[0]*y+e[4]*f+e[8]*g+e[12],r[13]=e[1]*y+e[5]*f+e[9]*g+e[13],r[14]=e[2]*y+e[6]*f+e[10]*g+e[14],r[15]=e[3]*y+e[7]*f+e[11]*g+e[15]):(i=e[0],a=e[1],t=e[2],o=e[3],c=e[4],u=e[5],d=e[6],s=e[7],l=e[8],m=e[9],p=e[10],I=e[11],r[0]=i,r[1]=a,r[2]=t,r[3]=o,r[4]=c,r[5]=u,r[6]=d,r[7]=s,r[8]=l,r[9]=m,r[10]=p,r[11]=I,r[12]=i*y+c*f+l*g+e[12],r[13]=a*y+u*f+m*g+e[13],r[14]=t*y+d*f+p*g+e[14],r[15]=o*y+s*f+I*g+e[15]),r}function _u(r,e,n){var i=n[0],a=n[1],t=n[2];return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r[3]=e[3]*i,r[4]=e[4]*a,r[5]=e[5]*a,r[6]=e[6]*a,r[7]=e[7]*a,r[8]=e[8]*t,r[9]=e[9]*t,r[10]=e[10]*t,r[11]=e[11]*t,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function hu(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[4],o=e[5],c=e[6],u=e[7],d=e[8],s=e[9],l=e[10],m=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=t*a+d*i,r[5]=o*a+s*i,r[6]=c*a+l*i,r[7]=u*a+m*i,r[8]=d*a-t*i,r[9]=s*a-o*i,r[10]=l*a-c*i,r[11]=m*a-u*i,r}function vu(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[0],o=e[1],c=e[2],u=e[3],d=e[4],s=e[5],l=e[6],m=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=t*a+d*i,r[1]=o*a+s*i,r[2]=c*a+l*i,r[3]=u*a+m*i,r[4]=d*a-t*i,r[5]=s*a-o*i,r[6]=l*a-c*i,r[7]=m*a-u*i,r}function xu(r,e,n,i,a){var t,o=1/Math.tan(e/2);return r[0]=o/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=-1,r[12]=0,r[13]=0,r[15]=0,null!=a&&a!==1/0?(t=1/(i-a),r[10]=(a+i)*t,r[14]=2*a*i*t):(r[10]=-1,r[14]=-2*i),r}function Pu(r,e,n,i,a,t,o){var c=1/(e-n),u=1/(i-a),d=1/(t-o);return r[0]=-2*c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*u,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*d,r[11]=0,r[12]=(e+n)*c,r[13]=(a+i)*u,r[14]=(o+t)*d,r[15]=1,r}Math.hypot||(Math.hypot=function(){for(var r=arguments,e=0,n=arguments.length;n--;)e+=r[n]*r[n];return Math.sqrt(e)});var Gu=fu;function Cu(){var r=new cu(3);return cu!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Su(r){var e=new cu(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function Au(r,e,n){return r[0]=e[0]+n[0],r[1]=e[1]+n[1],r[2]=e[2]+n[2],r}function bu(r,e,n){return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],r}function Mu(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r}function Bu(r,e){var n=e[0],i=e[1],a=e[2],t=n*n+i*i+a*a;return t>0&&(t=1/Math.sqrt(t)),r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t,r}function ku(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Fu(r,e,n){var i=e[0],a=e[1],t=e[2],o=n[0],c=n[1],u=n[2];return r[0]=a*u-t*c,r[1]=t*o-i*u,r[2]=i*c-a*o,r}function zu(r,e,n){var i=e[0],a=e[1],t=e[2];return r[0]=i*n[0]+a*n[3]+t*n[6],r[1]=i*n[1]+a*n[4]+t*n[7],r[2]=i*n[2]+a*n[5]+t*n[8],r}var wu=bu;function Ru(){var r=new cu(4);return cu!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function Eu(r,e,n){return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r}function Nu(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]}function Tu(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3];return r[0]=n[0]*i+n[4]*a+n[8]*t+n[12]*o,r[1]=n[1]*i+n[5]*a+n[9]*t+n[13]*o,r[2]=n[2]*i+n[6]*a+n[10]*t+n[14]*o,r[3]=n[3]*i+n[7]*a+n[11]*t+n[15]*o,r}function Du(){var r=new cu(2);return cu!=Float32Array&&(r[0]=0,r[1]=0),r}function Ju(r){var e=r[0],n=r[1];return e*e+n*n}Cu(),Ru();var Uu=Ju,Hu=(Du(),function(r){function e(e){r.call(this,e,ou)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(r){return new Lc(r)},e.prototype.queryRadius=function(r){var e=r;return nu("circle-radius",this,e)+nu("circle-stroke-width",this,e)+iu(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(r,e,n,i,a,t,o,c){for(var u=au(r,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),t.angle,o),d=this.paint.get("circle-radius").evaluate(e,n)+this.paint.get("circle-stroke-width").evaluate(e,n),s="map"===this.paint.get("circle-pitch-alignment"),l=s?u:Ou(u,c),m=s?d*o:d,p=0,I=i;pr.width||a.height>r.height||n.x>r.width-a.width||n.y>r.height-a.height)throw new RangeError("out of range source coordinates for image copy");if(a.width>e.width||a.height>e.height||i.x>e.width-a.width||i.y>e.height-a.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=r.data,c=e.data,u=0;u80*n){i=t=r[0],a=o=r[1];for(var I=n;It&&(t=c),u>o&&(o=u);d=0!==(d=Math.max(t-i,o-a))?1/d:0}return cd(m,p,n,i,a,d),p}function td(r,e,n,i,a){var t,o;if(a===Ed(r,e,n,i)>0)for(t=e;t=e;t-=i)o=zd(t,r[t],r[t+1],o);return o&&Cd(o,o.next)&&(wd(o),o=o.next),o}function od(r,e){if(!r)return r;e||(e=r);var n,i=r;do{if(n=!1,i.steiner||!Cd(i,i.next)&&0!==Gd(i.prev,i,i.next))i=i.next;else{if(wd(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function cd(r,e,n,i,a,t,o){if(r){!o&&t&&gd(r,i,a,t);for(var c,u,d=r;r.prev!==r.next;)if(c=r.prev,u=r.next,t?dd(r,i,a,t):ud(r))e.push(c.i/n),e.push(r.i/n),e.push(u.i/n),wd(r),r=u.next,d=u.next;else if((r=u)===d){o?1===o?cd(r=sd(od(r),e,n),e,n,i,a,t,2):2===o&&ld(r,e,n,i,a,t):cd(od(r),e,n,i,a,t,1);break}}}function ud(r){var e=r.prev,n=r,i=r.next;if(Gd(e,n,i)>=0)return!1;for(var a=r.next.next;a!==r.prev;){if(xd(e.x,e.y,n.x,n.y,i.x,i.y,a.x,a.y)&&Gd(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function dd(r,e,n,i){var a=r.prev,t=r,o=r.next;if(Gd(a,t,o)>=0)return!1;for(var c=a.xt.x?a.x>o.x?a.x:o.x:t.x>o.x?t.x:o.x,s=a.y>t.y?a.y>o.y?a.y:o.y:t.y>o.y?t.y:o.y,l=hd(c,u,e,n,i),m=hd(d,s,e,n,i),p=r.prevZ,I=r.nextZ;p&&p.z>=l&&I&&I.z<=m;){if(p!==r.prev&&p!==r.next&&xd(a.x,a.y,t.x,t.y,o.x,o.y,p.x,p.y)&&Gd(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,I!==r.prev&&I!==r.next&&xd(a.x,a.y,t.x,t.y,o.x,o.y,I.x,I.y)&&Gd(I.prev,I,I.next)>=0)return!1;I=I.nextZ}for(;p&&p.z>=l;){if(p!==r.prev&&p!==r.next&&xd(a.x,a.y,t.x,t.y,o.x,o.y,p.x,p.y)&&Gd(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;I&&I.z<=m;){if(I!==r.prev&&I!==r.next&&xd(a.x,a.y,t.x,t.y,o.x,o.y,I.x,I.y)&&Gd(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function sd(r,e,n){var i=r;do{var a=i.prev,t=i.next.next;!Cd(a,t)&&Sd(a,i,i.next,t)&&Bd(a,t)&&Bd(t,a)&&(e.push(a.i/n),e.push(i.i/n),e.push(t.i/n),wd(i),wd(i.next),i=r=t),i=i.next}while(i!==r);return od(i)}function ld(r,e,n,i,a,t){var o=r;do{for(var c=o.next.next;c!==o.prev;){if(o.i!==c.i&&Pd(o,c)){var u=Fd(o,c);return o=od(o,o.next),u=od(u,u.next),cd(o,e,n,i,a,t),void cd(u,e,n,i,a,t)}c=c.next}o=o.next}while(o!==r)}function md(r,e,n,i){var a,t,o,c=[];for(a=0,t=e.length;a=i.next.y&&i.next.y!==i.y){var c=i.x+(t-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(c<=a&&c>o){if(o=c,c===a){if(t===i.y)return i;if(t===i.next.y)return i.next}n=i.x=i.x&&i.x>=s&&a!==i.x&&xd(tn.x||i.x===n.x&&fd(n,i)))&&(n=i,m=u)),i=i.next}while(i!==d);return n}function fd(r,e){return Gd(r.prev,r,e.prev)<0&&Gd(e.next,r,r.next)<0}function gd(r,e,n,i){var a=r;do{null===a.z&&(a.z=hd(a.x,a.y,e,n,i)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==r);a.prevZ.nextZ=null,a.prevZ=null,_d(a)}function _d(r){var e,n,i,a,t,o,c,u,d=1;do{for(n=r,r=null,t=null,o=0;n;){for(o++,i=n,c=0,e=0;e0||u>0&&i;)0!==c&&(0===u||!i||n.z<=i.z)?(a=n,n=n.nextZ,c--):(a=i,i=i.nextZ,u--),t?t.nextZ=a:r=a,a.prevZ=t,t=a;n=i}t.nextZ=null,d*=2}while(o>1);return r}function hd(r,e,n,i,a){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-n)*a)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*a)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function vd(r){var e=r,n=r;do{(e.x=0&&(r-o)*(i-c)-(n-o)*(e-c)>=0&&(n-o)*(t-c)-(a-o)*(i-c)>=0}function Pd(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!Md(r,e)&&(Bd(r,e)&&Bd(e,r)&&kd(r,e)&&(Gd(r.prev,r,e.prev)||Gd(r,e.prev,e))||Cd(r,e)&&Gd(r.prev,r,r.next)>0&&Gd(e.prev,e,e.next)>0)}function Gd(r,e,n){return(e.y-r.y)*(n.x-e.x)-(e.x-r.x)*(n.y-e.y)}function Cd(r,e){return r.x===e.x&&r.y===e.y}function Sd(r,e,n,i){var a=bd(Gd(r,e,n)),t=bd(Gd(r,e,i)),o=bd(Gd(n,i,r)),c=bd(Gd(n,i,e));return a!==t&&o!==c||!(0!==a||!Ad(r,n,e))||!(0!==t||!Ad(r,i,e))||!(0!==o||!Ad(n,r,i))||!(0!==c||!Ad(n,e,i))}function Ad(r,e,n){return e.x<=Math.max(r.x,n.x)&&e.x>=Math.min(r.x,n.x)&&e.y<=Math.max(r.y,n.y)&&e.y>=Math.min(r.y,n.y)}function bd(r){return r>0?1:r<0?-1:0}function Md(r,e){var n=r;do{if(n.i!==r.i&&n.next.i!==r.i&&n.i!==e.i&&n.next.i!==e.i&&Sd(n,n.next,r,e))return!0;n=n.next}while(n!==r);return!1}function Bd(r,e){return Gd(r.prev,r,r.next)<0?Gd(r,e,r.next)>=0&&Gd(r,r.prev,e)>=0:Gd(r,e,r.prev)<0||Gd(r,r.next,e)<0}function kd(r,e){var n=r,i=!1,a=(r.x+e.x)/2,t=(r.y+e.y)/2;do{n.y>t!==n.next.y>t&&n.next.y!==n.y&&a<(n.next.x-n.x)*(t-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==r);return i}function Fd(r,e){var n=new Rd(r.i,r.x,r.y),i=new Rd(e.i,e.x,e.y),a=r.next,t=e.prev;return r.next=e,e.prev=r,n.next=a,a.prev=n,i.next=n,n.prev=i,t.next=i,i.prev=t,i}function zd(r,e,n,i){var a=new Rd(r,e,n);return i?(a.next=i.next,a.prev=i,i.next.prev=a,i.next=a):(a.prev=a,a.next=a),a}function wd(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Rd(r,e,n){this.i=r,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ed(r,e,n,i){for(var a=0,t=e,o=n-i;tn;){if(i-n>600){var t=i-n+1,o=e-n+1,c=Math.log(t),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(t-u)/t)*(o-t/2<0?-1:1);Td(r,e,Math.max(n,Math.floor(e-o*u/t+d)),Math.min(i,Math.floor(e+(t-o)*u/t+d)),a)}var s=r[e],l=n,m=i;for(Dd(r,n,e),a(r[i],s)>0&&Dd(r,n,i);l0;)m--}0===a(r[n],s)?Dd(r,n,m):Dd(r,++m,i),m<=e&&(n=m+1),e<=m&&(i=m-1)}}function Dd(r,e,n){var i=r[e];r[e]=r[n],r[n]=i}function Jd(r,e){return re?1:0}function Ud(r,e){var n=r.length;if(n<=1)return[r];for(var i,a,t=[],o=0;o1)for(var u=0;u0&&(i+=r[a-1].length,n.holes.push(i))}return n},nd.default=id;var Kd=500,Vd=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map((function(r){return r.id})),this.index=r.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Go,this.indexArray=new No,this.indexArray2=new Lo,this.programConfigurations=new Fc(r.layers,r.zoom),this.segments=new nc,this.segments2=new nc,this.stateDependentLayerIds=this.layers.filter((function(r){return r.isStateDependent()})).map((function(r){return r.id}))};Vd.prototype.populate=function(r,e,n){this.hasPattern=Ld("fill",this.layers,e);for(var i=this.layers[0].layout.get("fill-sort-key"),a=[],t=0,o=r;t>3}if(a--,1===i||2===i)o+=r.readSVarint(),c+=r.readSVarint(),1===i&&(e&&u.push(e),e=[]),e.push(new t(o,c));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&u.push(e),u},Xd.prototype.bbox=function(){var r=this._pbf;r.pos=this._geometry;for(var e=r.readVarint()+r.pos,n=1,i=0,a=0,t=0,o=1/0,c=-1/0,u=1/0,d=-1/0;r.pos>3}if(i--,1===n||2===n)(a+=r.readSVarint())c&&(c=a),(t+=r.readSVarint())d&&(d=t);else if(7!==n)throw new Error("unknown command "+n)}return[o,u,c,d]},Xd.prototype.toGeoJSON=function(r,e,n){var i,a,t=this.extent*Math.pow(2,n),o=this.extent*r,c=this.extent*e,u=this.loadGeometry(),d=Xd.types[this.type];function s(r){for(var e=0;e>3;e=1===i?r.readString():2===i?r.readFloat():3===i?r.readDouble():4===i?r.readVarint64():5===i?r.readVarint():6===i?r.readSVarint():7===i?r.readBoolean():null}return e}function os(r,e){this.layers=r.readFields(cs,{},e)}function cs(r,e,n){if(3===r){var i=new ns(n,n.readVarint()+n.pos);i.length&&(e[i.name]=i)}}is.prototype.feature=function(r){if(r<0||r>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[r];var e=this._pbf.readVarint()+this._pbf.pos;return new Yd(this._pbf,e,this.extent,this._keys,this._values)};var us={VectorTile:os,VectorTileFeature:Yd,VectorTileLayer:ns},ds=us.VectorTileFeature.types,ss=500,ls=Math.pow(2,13);function ms(r,e,n,i,a,t,o,c){r.emplaceBack(e,n,2*Math.floor(i*ls)+o,a*ls*2,t*ls*2,Math.round(c))}var ps=function(r){this.zoom=r.zoom,this.overscaling=r.overscaling,this.layers=r.layers,this.layerIds=this.layers.map((function(r){return r.id})),this.index=r.index,this.hasPattern=!1,this.layoutVertexArray=new So,this.indexArray=new No,this.programConfigurations=new Fc(r.layers,r.zoom),this.segments=new nc,this.stateDependentLayerIds=this.layers.filter((function(r){return r.isStateDependent()})).map((function(r){return r.id}))};function Is(r,e){return r.x===e.x&&(r.x<0||r.x>Ec)||r.y===e.y&&(r.y<0||r.y>Ec)}function ys(r){return r.every((function(r){return r.x<0}))||r.every((function(r){return r.x>Ec}))||r.every((function(r){return r.y<0}))||r.every((function(r){return r.y>Ec}))}ps.prototype.populate=function(r,e,n){this.features=[],this.hasPattern=Ld("fill-extrusion",this.layers,e);for(var i=0,a=r;i=1){var _=I[f-1];if(!Is(g,_)){l.vertexLength+4>nc.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var h=g.sub(_)._perp()._unit(),v=_.dist(g);y+v>32768&&(y=0),ms(this.layoutVertexArray,g.x,g.y,h.x,h.y,0,0,y),ms(this.layoutVertexArray,g.x,g.y,h.x,h.y,0,1,y),y+=v,ms(this.layoutVertexArray,_.x,_.y,h.x,h.y,0,0,y),ms(this.layoutVertexArray,_.x,_.y,h.x,h.y,0,1,y);var x=l.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),l.vertexLength+=4,l.primitiveLength+=2}}}}if(l.vertexLength+u>nc.MAX_VERTEX_ARRAY_LENGTH&&(l=this.segments.prepareSegment(u,this.layoutVertexArray,this.indexArray)),"Polygon"===ds[r.type]){for(var P=[],G=[],C=l.vertexLength,S=0,A=c;S=2&&r[u-1].equals(r[u-2]);)u--;for(var d=0;d0;if(G&&g>d){var S=s.dist(p);if(S>2*l){var A=s.sub(s.sub(p)._mult(l/S)._round());this.updateDistance(p,A),this.addCurrentVertex(A,y,0,0,m),p=A}}var b=p&&I,M=b?n:c?"butt":i;if(b&&"round"===M&&(xa&&(M="bevel"),"bevel"===M&&(x>2&&(M="flipbevel"),x100)_=f.mult(-1);else{var B=x*y.add(f).mag()/y.sub(f).mag();_._perp()._mult(B*(C?-1:1))}this.addCurrentVertex(s,_,0,0,m),this.addCurrentVertex(s,_.mult(-1),0,0,m)}else if("bevel"===M||"fakeround"===M){var k=-Math.sqrt(x*x-1),F=C?k:0,z=C?0:k;if(p&&this.addCurrentVertex(s,y,F,z,m),"fakeround"===M)for(var w=Math.round(180*P/Math.PI/Bs),R=1;R2*l){var U=s.add(I.sub(s)._mult(l/J)._round());this.updateDistance(s,U),this.addCurrentVertex(U,f,0,0,m),s=U}}}}},ws.prototype.addCurrentVertex=function(r,e,n,i,a,t){void 0===t&&(t=!1);var o=e.x+e.y*n,c=e.y-e.x*n,u=-e.x+e.y*i,d=-e.y-e.x*i;this.addHalfVertex(r,o,c,t,!1,n,a),this.addHalfVertex(r,u,d,t,!0,-i,a),this.distance>zs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(r,e,n,i,a,t))},ws.prototype.addHalfVertex=function(r,e,n,i,a,t,o){var c=r.x,u=r.y,d=(this.lineClips?this.scaledDistance*(zs-1):this.scaledDistance)*Fs;if(this.layoutVertexArray.emplaceBack((c<<1)+(i?1:0),(u<<1)+(a?1:0),Math.round(As*e)+128,Math.round(As*n)+128,1+(0===t?0:t<0?-1:1)|(63&d)<<2,d>>6),this.lineClips){var s=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(s,this.lineClipsArray.length)}var l=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),o.primitiveLength++),a?this.e2=l:this.e1=l},ws.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},ws.prototype.updateDistance=function(r,e){this.distance+=r.dist(e),this.updateScaledDistance()},_t("LineBucket",ws,{omit:["layers","patternFeatures"]});var Rs=new mo({"line-cap":new oo(le.layout_line["line-cap"]),"line-join":new co(le.layout_line["line-join"]),"line-miter-limit":new oo(le.layout_line["line-miter-limit"]),"line-round-limit":new oo(le.layout_line["line-round-limit"]),"line-sort-key":new co(le.layout_line["line-sort-key"])}),Es={paint:new mo({"line-opacity":new co(le.paint_line["line-opacity"]),"line-color":new co(le.paint_line["line-color"]),"line-translate":new oo(le.paint_line["line-translate"]),"line-translate-anchor":new oo(le.paint_line["line-translate-anchor"]),"line-width":new co(le.paint_line["line-width"]),"line-gap-width":new co(le.paint_line["line-gap-width"]),"line-offset":new co(le.paint_line["line-offset"]),"line-blur":new co(le.paint_line["line-blur"]),"line-dasharray":new so(le.paint_line["line-dasharray"]),"line-pattern":new uo(le.paint_line["line-pattern"]),"line-gradient":new lo(le.paint_line["line-gradient"])}),layout:Rs},Ns=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,n){return n=new Xt(Math.floor(n.zoom),{now:n.now,fadeDuration:n.fadeDuration,zoomHistory:n.zoomHistory,transition:n.transition}),r.prototype.possiblyEvaluate.call(this,e,n)},e.prototype.evaluate=function(e,n,i,a){return n=_({},n,{zoom:Math.floor(n.zoom)}),r.prototype.evaluate.call(this,e,n,i,a)},e}(co),Ts=new Ns(Es.paint.properties["line-width"].specification);Ts.useIntegerZoom=!0;var Ds=function(r){function e(e){r.call(this,e,Es),this.gradientVersion=0}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(r){if("line-gradient"===r){var e=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=e._styleExpression.expression instanceof Jn,this.gradientVersion=(this.gradientVersion+1)%d}},e.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},e.prototype.recalculate=function(e,n){r.prototype.recalculate.call(this,e,n),this.paint._values["line-floorwidth"]=Ts.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(r){return new ws(r)},e.prototype.queryRadius=function(r){var e=r,n=Js(nu("line-width",this,e),nu("line-gap-width",this,e)),i=nu("line-offset",this,e);return n/2+Math.abs(i)+iu(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(r,e,n,i,a,t,o){var c=au(r,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),t.angle,o),u=o/2*Js(this.paint.get("line-width").evaluate(e,n),this.paint.get("line-gap-width").evaluate(e,n)),d=this.paint.get("line-offset").evaluate(e,n);return d&&(i=Us(i,d*o)),jc(c,i,u)},e.prototype.isTileClipped=function(){return!0},e}(Io);function Js(r,e){return e>0?e+2*r:r}function Us(r,e){for(var n=[],i=new t(0,0),a=0;a":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};function Ys(r){for(var e="",n=0;n>1,s=-7,l=n?a-1:0,m=n?-1:1,p=r[e+l];for(l+=m,t=p&(1<<-s)-1,p>>=-s,s+=c;s>0;t=256*t+r[e+l],l+=m,s-=8);for(o=t&(1<<-s)-1,t>>=-s,s+=i;s>0;o=256*o+r[e+l],l+=m,s-=8);if(0===t)t=1-d;else{if(t===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),t-=d}return(p?-1:1)*o*Math.pow(2,t-i)},write:function(r,e,n,i,a,t){var o,c,u,d=8*t-a-1,s=(1<>1,m=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:t-1,I=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=s):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+l>=1?m/u:m*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=s?(c=0,o=s):o+l>=1?(c=(e*u-1)*Math.pow(2,a),o+=l):(c=e*Math.pow(2,l-1)*Math.pow(2,a),o=0));a>=8;r[n+p]=255&c,p+=I,c/=256,a-=8);for(o=o<0;r[n+p]=255&o,p+=I,o/=256,d-=8);r[n+p-I]|=128*y}},$s=rl;function rl(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}rl.Varint=0,rl.Fixed64=1,rl.Bytes=2,rl.Fixed32=5;var el=4294967296,nl=1/el,il=12,al="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function tl(r,e,n){var i,a,t=n.buf;if(i=(112&(a=t[n.pos++]))>>4,a<128)return cl(r,i,e);if(i|=(127&(a=t[n.pos++]))<<3,a<128)return cl(r,i,e);if(i|=(127&(a=t[n.pos++]))<<10,a<128)return cl(r,i,e);if(i|=(127&(a=t[n.pos++]))<<17,a<128)return cl(r,i,e);if(i|=(127&(a=t[n.pos++]))<<24,a<128)return cl(r,i,e);if(i|=(1&(a=t[n.pos++]))<<31,a<128)return cl(r,i,e);throw new Error("Expected varint not more than 10 bytes")}function ol(r){return r.type===rl.Bytes?r.readVarint()+r.pos:r.pos+1}function cl(r,e,n){return n?4294967296*e+(r>>>0):4294967296*(e>>>0)+(r>>>0)}function ul(r,e){var n,i;if(r>=0?(n=r%4294967296|0,i=r/4294967296|0):(i=~(-r/4294967296),4294967295^(n=~(-r%4294967296))?n=n+1|0:(n=0,i=i+1|0)),r>=0x10000000000000000||r<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),dl(n,i,e),sl(i,e)}function dl(r,e,n){n.buf[n.pos++]=127&r|128,r>>>=7,n.buf[n.pos++]=127&r|128,r>>>=7,n.buf[n.pos++]=127&r|128,r>>>=7,n.buf[n.pos++]=127&r|128,r>>>=7,n.buf[n.pos]=127&r}function sl(r,e){var n=(7&r)<<4;e.buf[e.pos++]|=n|((r>>>=3)?128:0),r&&(e.buf[e.pos++]=127&r|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=127&r|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=127&r|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=127&r|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=127&r)))))}function ll(r,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var a=n.pos-1;a>=r;a--)n.buf[a+i]=n.buf[a]}function ml(r,e){for(var n=0;n>>8,r[n+2]=e>>>16,r[n+3]=e>>>24}function Gl(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+(r[e+3]<<24)}function Cl(r,e,n){for(var i="",a=e;a239?4:u>223?3:u>191?2:1;if(a+s>n)break;1===s?u<128&&(d=u):2===s?128===(192&(t=r[a+1]))&&(d=(31&u)<<6|63&t)<=127&&(d=null):3===s?(t=r[a+1],o=r[a+2],128===(192&t)&&128===(192&o)&&((d=(15&u)<<12|(63&t)<<6|63&o)<=2047||d>=55296&&d<=57343)&&(d=null)):4===s&&(t=r[a+1],o=r[a+2],c=r[a+3],128===(192&t)&&128===(192&o)&&128===(192&c)&&((d=(15&u)<<18|(63&t)<<12|(63&o)<<6|63&c)<=65535||d>=1114112)&&(d=null)),null===d?(d=65533,s=1):d>65535&&(d-=65536,i+=String.fromCharCode(d>>>10&1023|55296),d=56320|1023&d),i+=String.fromCharCode(d),a+=s}return i}function Sl(r,e,n){return al.decode(r.subarray(e,n))}function Al(r,e,n){for(var i,a,t=0;t55295&&i<57344){if(!a){i>56319||t+1===e.length?(r[n++]=239,r[n++]=191,r[n++]=189):a=i;continue}if(i<56320){r[n++]=239,r[n++]=191,r[n++]=189,a=i;continue}i=a-55296<<10|i-56320|65536,a=null}else a&&(r[n++]=239,r[n++]=191,r[n++]=189,a=null);i<128?r[n++]=i:(i<2048?r[n++]=i>>6|192:(i<65536?r[n++]=i>>12|224:(r[n++]=i>>18|240,r[n++]=i>>12&63|128),r[n++]=i>>6&63|128),r[n++]=63&i|128)}return n}rl.prototype={destroy:function(){this.buf=null},readFields:function(r,e,n){for(n=n||this.length;this.pos>3,t=this.pos;this.type=7&i,r(a,e,this),this.pos===t&&this.skip(i)}return e},readMessage:function(r,e){return this.readFields(r,e,this.readVarint()+this.pos)},readFixed32:function(){var r=xl(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=Gl(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=xl(this.buf,this.pos)+xl(this.buf,this.pos+4)*el;return this.pos+=8,r},readSFixed64:function(){var r=xl(this.buf,this.pos)+Gl(this.buf,this.pos+4)*el;return this.pos+=8,r},readFloat:function(){var r=Qs.read(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=Qs.read(this.buf,this.pos,!0,52,8);return this.pos+=8,r},readVarint:function(r){var e,n,i=this.buf;return e=127&(n=i[this.pos++]),n<128?e:(e|=(127&(n=i[this.pos++]))<<7,n<128?e:(e|=(127&(n=i[this.pos++]))<<14,n<128?e:(e|=(127&(n=i[this.pos++]))<<21,n<128?e:tl(e|=(15&(n=i[this.pos]))<<28,r,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var r=this.readVarint();return r%2===1?(r+1)/-2:r/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var r=this.readVarint()+this.pos,e=this.pos;return this.pos=r,r-e>=il&&al?Sl(this.buf,e,r):Cl(this.buf,e,r)},readBytes:function(){var r=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,r);return this.pos=r,e},readPackedVarint:function(r,e){if(this.type!==rl.Bytes)return r.push(this.readVarint(e));var n=ol(this);for(r=r||[];this.pos127;);else if(e===rl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===rl.Fixed32)this.pos+=4;else{if(e!==rl.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(r,e){this.writeVarint(r<<3|e)},realloc:function(r){for(var e=this.length||16;e268435455||r<0?ul(r,this):(this.realloc(4),this.buf[this.pos++]=127&r|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=127&(r>>>=7)|(r>127?128:0),r<=127||(this.buf[this.pos++]=r>>>7&127))))},writeSVarint:function(r){this.writeVarint(r<0?2*-r-1:2*r)},writeBoolean:function(r){this.writeVarint(Boolean(r))},writeString:function(r){r=String(r),this.realloc(4*r.length),this.pos++;var e=this.pos;this.pos=Al(this.buf,r,this.pos);var n=this.pos-e;n>=128&&ll(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(r){this.realloc(4),Qs.write(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),Qs.write(this.buf,r,this.pos,!0,52,8),this.pos+=8},writeBytes:function(r){var e=r.length;this.writeVarint(e),this.realloc(e);for(var n=0;n=128&&ll(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(r,e,n){this.writeTag(r,rl.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(r,e){e.length&&this.writeMessage(r,ml,e)},writePackedSVarint:function(r,e){e.length&&this.writeMessage(r,pl,e)},writePackedBoolean:function(r,e){e.length&&this.writeMessage(r,fl,e)},writePackedFloat:function(r,e){e.length&&this.writeMessage(r,Il,e)},writePackedDouble:function(r,e){e.length&&this.writeMessage(r,yl,e)},writePackedFixed32:function(r,e){e.length&&this.writeMessage(r,gl,e)},writePackedSFixed32:function(r,e){e.length&&this.writeMessage(r,_l,e)},writePackedFixed64:function(r,e){e.length&&this.writeMessage(r,hl,e)},writePackedSFixed64:function(r,e){e.length&&this.writeMessage(r,vl,e)},writeBytesField:function(r,e){this.writeTag(r,rl.Bytes),this.writeBytes(e)},writeFixed32Field:function(r,e){this.writeTag(r,rl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(r,e){this.writeTag(r,rl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(r,e){this.writeTag(r,rl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(r,e){this.writeTag(r,rl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(r,e){this.writeTag(r,rl.Varint),this.writeVarint(e)},writeSVarintField:function(r,e){this.writeTag(r,rl.Varint),this.writeSVarint(e)},writeStringField:function(r,e){this.writeTag(r,rl.Bytes),this.writeString(e)},writeFloatField:function(r,e){this.writeTag(r,rl.Fixed32),this.writeFloat(e)},writeDoubleField:function(r,e){this.writeTag(r,rl.Fixed64),this.writeDouble(e)},writeBooleanField:function(r,e){this.writeVarintField(r,Boolean(e))}};var bl=3;function Ml(r,e,n){1===r&&n.readMessage(Bl,e)}function Bl(r,e,n){if(3===r){var i=n.readMessage(kl,{}),a=i.id,t=i.bitmap,o=i.width,c=i.height,u=i.left,d=i.top,s=i.advance;e.push({id:a,bitmap:new Zu({width:o+2*bl,height:c+2*bl},t),metrics:{width:o,height:c,left:u,top:d,advance:s}})}}function kl(r,e,n){1===r?e.id=n.readVarint():2===r?e.bitmap=n.readBytes():3===r?e.width=n.readVarint():4===r?e.height=n.readVarint():5===r?e.left=n.readSVarint():6===r?e.top=n.readSVarint():7===r&&(e.advance=n.readVarint())}function Fl(r){return new $s(r).readFields(Ml,[])}var zl=bl;function wl(r){for(var e=0,n=0,i=0,a=r;i=0;m--){var p=o[m];if(!(l.w>p.w||l.h>p.h)){if(l.x=p.x,l.y=p.y,u=Math.max(u,l.y+l.h),c=Math.max(c,l.x+l.w),l.w===p.w&&l.h===p.h){var I=o.pop();m=0&&i>=r&&Wl[this.text.charCodeAt(i)];i--)n--;this.text=this.text.substring(r,n),this.sectionIndex=this.sectionIndex.slice(r,n)},Kl.prototype.substring=function(r,e){var n=new Kl;return n.text=this.text.substring(r,e),n.sectionIndex=this.sectionIndex.slice(r,e),n.sections=this.sections,n},Kl.prototype.toString=function(){return this.text},Kl.prototype.getMaxScale=function(){var r=this;return this.sectionIndex.reduce((function(e,n){return Math.max(e,r.sections[n].scale)}),0)},Kl.prototype.addTextSection=function(r,e){this.text+=r.text,this.sections.push(Ol.forText(r.scale,r.fontStack||e));for(var n=this.sections.length-1,i=0;i=Ll?null:++this.imageSectionID:(this.imageSectionID=Hl,this.imageSectionID)};var Wl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Zl={};function ql(r,e,n,i,a,t){if(e.imageName){var o=i[e.imageName];return o?o.displaySize[0]*e.scale*Xs/t+a:0}var c=n[e.fontStack],u=c&&c[r];return u?u.metrics.advance*e.scale+a:0}function Yl(r,e,n,i,a,t){for(var o=0,c=0;c=0,s=0,l=0;l0&&D>S&&(S=D)}else{var J=n[b.fontStack],U=J&&J[B];if(U&&U.rect)z=U.rect,F=U.metrics;else{var H=e[b.fontStack],L=H&&H[B];if(!L)continue;F=L.metrics}k=(x-b.scale)*Xs}E?(r.verticalizable=!0,C.push({glyph:B,imageName:w,x:m,y:p+k,vertical:E,scale:b.scale,fontStack:b.fontStack,sectionIndex:M,metrics:F,rect:z}),m+=R*b.scale+d):(C.push({glyph:B,imageName:w,x:m,y:p+k,vertical:E,scale:b.scale,fontStack:b.fontStack,sectionIndex:M,metrics:F,rect:z}),m+=F.advance*b.scale+d)}if(0!==C.length){var O=m-d;I=Math.max(O,I),am(C,0,C.length-1,f,S)}m=0;var K=t*x+S;G.lineOffset=Math.max(S,P),p+=K,y=Math.max(K,y),++g}else p+=t,++g}var V=p-Jl,j=nm(o),W=j.horizontalAlign,Z=j.verticalAlign;tm(r.positionedLines,f,W,Z,I,y,t,V,a.length),r.top+=-Z*V,r.bottom=r.top+V,r.left+=-W*I,r.right=r.left+I}function am(r,e,n,i,a){if(i||a)for(var t=r[n],o=t.metrics.advance*t.scale,c=(r[n].x+o)*i,u=e;u<=n;u++)r[u].x-=c,r[u].y+=a}function tm(r,e,n,i,a,t,o,c,u){var d=(e-n)*a,s=0;s=t!==o?-c*i-Jl:(-i*u+.5)*o;for(var l=0,m=r;l-n/2;){if(--o<0)return!1;c-=r[o].dist(t),t=r[o]}c+=r[o].dist(r[o+1]),o++;for(var u=[],d=0;ci;)d-=u.shift().angleDelta;if(d>a)return!1;o++,c+=l.dist(m)}return!0}function ym(r){for(var e=0,n=0;nd){var I=(d-u)/p,y=Un(l.x,m.x,I),f=Un(l.y,m.y,I),g=new um(y,f,m.angleTo(l),s);return g._round(),!o||Im(r,g,c,o,e)?g:void 0}u+=p}}function hm(r,e,n,i,a,t,o,c,u){var d=fm(i,t,o),s=gm(i,a),l=s*o,m=0===r[0].x||r[0].x===u||0===r[0].y||r[0].y===u;return e-l=0&&v=0&&x=0&&m+d<=s){var P=new um(v,x,_,I);P._round(),i&&!Im(r,P,t,i,a)||p.push(P)}}l+=g}return c||p.length||o||(p=vm(r,l/2,n,i,a,t,o,!0,u)),p}function xm(r,e,n,i,a){for(var o=[],c=0;c=i&&m.x>=i||(l.x>=i?l=new t(i,l.y+(m.y-l.y)*((i-l.x)/(m.x-l.x)))._round():m.x>=i&&(m=new t(i,l.y+(m.y-l.y)*((i-l.x)/(m.x-l.x)))._round()),l.y>=a&&m.y>=a||(l.y>=a?l=new t(l.x+(m.x-l.x)*((a-l.y)/(m.y-l.y)),a)._round():m.y>=a&&(m=new t(l.x+(m.x-l.x)*((a-l.y)/(m.y-l.y)),a)._round()),d&&l.equals(d[d.length-1])||(d=[l],o.push(d)),d.push(m)))))}return o}var Pm=Rl;function Gm(r,e,n,i){var a=[],o=r.image,c=o.pixelRatio,u=o.paddedRect.w-2*Pm,d=o.paddedRect.h-2*Pm,s=r.right-r.left,l=r.bottom-r.top,m=o.stretchX||[[0,u]],p=o.stretchY||[[0,d]],I=function(r,e){return r+e[1]-e[0]},y=m.reduce(I,0),f=p.reduce(I,0),g=u-y,_=d-f,h=0,v=y,x=0,P=f,G=0,C=g,S=0,A=_;if(o.content&&i){var b=o.content;h=Cm(m,0,b[0]),x=Cm(p,0,b[1]),v=Cm(m,b[0],b[2]),P=Cm(p,b[1],b[3]),G=b[0]-h,S=b[1]-x,C=b[2]-b[0]-v,A=b[3]-b[1]-P}var M=function(i,a,u,d){var m=Am(i.stretch-h,v,s,r.left),p=bm(i.fixed-G,C,i.stretch,y),I=Am(a.stretch-x,P,l,r.top),g=bm(a.fixed-S,A,a.stretch,f),_=Am(u.stretch-h,v,s,r.left),b=bm(u.fixed-G,C,u.stretch,y),M=Am(d.stretch-x,P,l,r.top),B=bm(d.fixed-S,A,d.stretch,f),k=new t(m,I),F=new t(_,I),z=new t(_,M),w=new t(m,M),R=new t(p/c,g/c),E=new t(b/c,B/c),N=e*Math.PI/180;if(N){var T=Math.sin(N),D=Math.cos(N),J=[D,-T,T,D];k._matMult(J),F._matMult(J),w._matMult(J),z._matMult(J)}var U=i.stretch+i.fixed,H=u.stretch+u.fixed,L=a.stretch+a.fixed,O=d.stretch+d.fixed;return{tl:k,tr:F,bl:w,br:z,tex:{x:o.paddedRect.x+Pm+U,y:o.paddedRect.y+Pm+L,w:H-U,h:O-L},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:R,pixelOffsetBR:E,minFontScaleX:C/c/s,minFontScaleY:A/c/l,isSDF:n}};if(i&&(o.stretchX||o.stretchY))for(var B=Sm(m,g,y),k=Sm(p,_,f),F=0;F0&&(I=Math.max(10,I),this.circleDiameter=I)}else{var y=o.top*c-u,f=o.bottom*c+u,g=o.left*c-u,_=o.right*c+u,h=o.collisionPadding;if(h&&(g-=h[0]*c,y-=h[1]*c,_+=h[2]*c,f+=h[3]*c),s){var v=new t(g,y),x=new t(_,y),P=new t(g,f),G=new t(_,f),C=s*Math.PI/180;v._rotate(C),x._rotate(C),P._rotate(C),G._rotate(C),g=Math.min(v.x,x.x,P.x,G.x),_=Math.max(v.x,x.x,P.x,G.x),y=Math.min(v.y,x.y,P.y,G.y),f=Math.max(v.y,x.y,P.y,G.y)}r.emplaceBack(e.x,e.y,g,y,_,f,n,i,a)}this.boxEndIndex=r.length},km=function(r,e){if(void 0===r&&(r=[]),void 0===e&&(e=Fm),this.data=r,this.length=this.data.length,this.compare=e,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)};function Fm(r,e){return re?1:0}function zm(r,e,n){void 0===e&&(e=1),void 0===n&&(n=!1);for(var i=1/0,a=1/0,o=-1/0,c=-1/0,u=r[0],d=0;do)&&(o=s.x),(!d||s.y>c)&&(c=s.y)}var l=o-i,m=c-a,p=Math.min(l,m),I=p/2,y=new km([],wm);if(0===p)return new t(i,a);for(var f=i;f_.d||!_.d)&&(_=v,n&&console.log("found best %d after %d probes",Math.round(1e4*v.d)/1e4,h)),v.max-_.d<=e||(I=v.h/2,y.push(new Rm(v.p.x-I,v.p.y-I,I,r)),y.push(new Rm(v.p.x+I,v.p.y-I,I,r)),y.push(new Rm(v.p.x-I,v.p.y+I,I,r)),y.push(new Rm(v.p.x+I,v.p.y+I,I,r)),h+=4)}return n&&(console.log("num probes: "+h),console.log("best distance: "+_.d)),_.p}function wm(r,e){return e.max-r.max}function Rm(r,e,n,i){this.p=new t(r,e),this.h=n,this.d=Em(this.p,i),this.max=this.d+this.h*Math.SQRT2}function Em(r,e){for(var n=!1,i=1/0,a=0;ar.y!==s.y>r.y&&r.x<(s.x-d.x)*(r.y-d.y)/(s.y-d.y)+d.x&&(n=!n),i=Math.min(i,Xc(r,d,s))}return(n?1:-1)*Math.sqrt(i)}function Nm(r){for(var e=0,n=0,i=0,a=r[0],t=0,o=a.length,c=o-1;t0&&(this.data[0]=e,this._down(0)),r}},km.prototype.peek=function(){return this.data[0]},km.prototype._up=function(r){for(var e=this,n=e.data,i=e.compare,a=n[r];r>0;){var t=r-1>>1,o=n[t];if(i(a,o)>=0)break;n[r]=o,r=t}n[r]=a},km.prototype._down=function(r){for(var e=this,n=e.data,i=e.compare,a=this.length>>1,t=n[r];r=0)break;n[r]=c,r=o}n[r]=t};var Tm=7,Dm=Number.POSITIVE_INFINITY;function Jm(r,e){function n(r,e){var n=0,i=0;e<0&&(e=0);var a=e/Math.sqrt(2);switch(r){case"top-right":case"top-left":i=a-Tm;break;case"bottom-right":case"bottom-left":i=-a+Tm;break;case"bottom":i=-e+Tm;break;case"top":i=e-Tm}switch(r){case"top-right":case"bottom-right":n=-a;break;case"top-left":case"bottom-left":n=a;break;case"left":n=e;break;case"right":n=-e}return[n,i]}function i(r,e,n){var i=0,a=0;switch(e=Math.abs(e),n=Math.abs(n),r){case"top-right":case"top-left":case"top":a=n-Tm;break;case"bottom-right":case"bottom-left":case"bottom":a=-n+Tm}switch(r){case"top-right":case"bottom-right":case"right":i=-e;break;case"top-left":case"bottom-left":case"left":i=e}return[i,a]}return e[1]!==Dm?i(r,e[0],e[1]):n(r,e[0])}function Um(r,e,n,i,a,t,o){r.createArrays();var c=512*r.overscaling;r.tilePixelRatio=Ec/c,r.compareText={},r.iconsNeedLinear=!1;var u=r.layers[0].layout,d=r.layers[0]._unevaluatedLayout._values,s={};if("composite"===r.textSizeData.kind){var l=r.textSizeData,m=l.minZoom,p=l.maxZoom;s.compositeTextSizes=[d["text-size"].possiblyEvaluate(new Xt(m),o),d["text-size"].possiblyEvaluate(new Xt(p),o)]}if("composite"===r.iconSizeData.kind){var I=r.iconSizeData,y=I.minZoom,f=I.maxZoom;s.compositeIconSizes=[d["icon-size"].possiblyEvaluate(new Xt(y),o),d["icon-size"].possiblyEvaluate(new Xt(f),o)]}s.layoutTextSize=d["text-size"].possiblyEvaluate(new Xt(r.zoom+1),o),s.layoutIconSize=d["icon-size"].possiblyEvaluate(new Xt(r.zoom+1),o),s.textMaxSize=d["text-size"].possiblyEvaluate(new Xt(18));for(var g=u.get("text-line-height")*Xs,_="map"===u.get("text-rotation-alignment")&&"point"!==u.get("symbol-placement"),h=u.get("text-keep-upright"),v=u.get("text-size"),x=function(){var t=G[P],c=u.get("text-font").evaluate(t,{},o).join(","),d=v.evaluate(t,{},o),l=s.layoutTextSize.evaluate(t,{},o),m=s.layoutIconSize.evaluate(t,{},o),p={horizontal:{},vertical:void 0},I=t.text,y=[0,0];if(I){var f=I.toString(),x=u.get("text-letter-spacing").evaluate(t,{},o)*Xs,C=bt(f)?x:0,S=u.get("text-anchor").evaluate(t,{},o),A=u.get("text-variable-anchor");if(!A){var b=u.get("text-radial-offset").evaluate(t,{},o);y=b?Jm(S,[b*Xs,Dm]):u.get("text-offset").evaluate(t,{},o).map((function(r){return r*Xs}))}var M=_?"center":u.get("text-justify").evaluate(t,{},o),B=u.get("symbol-placement"),k="point"===B?u.get("text-max-width").evaluate(t,{},o)*Xs:0,F=function(){r.allowVerticalPlacement&&At(f)&&(p.vertical=jl(I,e,n,a,c,k,g,S,"left",C,y,Dl.vertical,!0,B,l,d))};if(!_&&A){for(var w="auto"===M?A.map((function(r){return Hm(r)})):[M],R=!1,E=0;E=Ec||l.y<0||l.y>=Ec||Wm(r,l,c,n,i,a,m,r.layers[0],r.collisionBoxArray,e.index,e.sourceLayerIndex,r.index,_,P,S,u,v,G,A,I,e,t,d,s,o)};if("line"===b)for(var F=0,z=xm(e.geometry,0,0,Ec,Ec);F1){var U=_m(J,C,n.vertical||y,i,f,h);U&&k(J,U)}}else if("Polygon"===e.type)for(var H=0,L=Ud(e.geometry,0);HKm&&z(r.layerIds[0]+': Value for "text-size" is >= '+Om+'. Reduce your "text-size".'):"composite"===f.kind&&((g=[dm*p.compositeTextSizes[0].evaluate(o,{},I),dm*p.compositeTextSizes[1].evaluate(o,{},I)])[0]>Km||g[1]>Km)&&z(r.layerIds[0]+': Value for "text-size" is >= '+Om+'. Reduce your "text-size".'),r.addSymbols(r.text,y,g,c,t,o,d,e,u.lineStartIndex,u.lineLength,m,I);for(var _=0,h=s;_Km&&z(r.layerIds[0]+': Value for "icon-size" is >= '+Om+'. Reduce your "icon-size".'):"composite"===Z.kind&&((q=[dm*x.compositeIconSizes[0].evaluate(v,{},G),dm*x.compositeIconSizes[1].evaluate(v,{},G)])[0]>Km||q[1]>Km)&&z(r.layerIds[0]+': Value for "icon-size" is >= '+Om+'. Reduce your "icon-size".'),r.addSymbols(r.icon,j,q,h,_,v,!1,e,k.lineStartIndex,k.lineLength,-1,G),N=r.icon.placedSymbolArray.length-1,W&&(w=4*W.length,r.addSymbols(r.icon,W,q,h,_,v,Dl.vertical,e,k.lineStartIndex,k.lineLength,-1,G),T=r.icon.placedSymbolArray.length-1)}for(var Y in i.horizontal){var X=i.horizontal[Y];if(!A){J=cc(X.text);var Q=c.layout.get("text-rotate").evaluate(v,{},G);A=new Bm(u,e,d,s,l,X,m,p,I,Q)}var $=1===X.positionedLines.length;if(R+=Vm(r,e,X,t,c,I,v,y,k,i.vertical?Dl.horizontal:Dl.horizontalOnly,$?Object.keys(i.horizontal):[Y],D,N,x,G),$)break}i.vertical&&(E+=Vm(r,e,i.vertical,t,c,I,v,y,k,Dl.vertical,["vertical"],D,T,x,G));var rr=A?A.boxStartIndex:r.collisionBoxArray.length,er=A?A.boxEndIndex:r.collisionBoxArray.length,nr=M?M.boxStartIndex:r.collisionBoxArray.length,ir=M?M.boxEndIndex:r.collisionBoxArray.length,ar=b?b.boxStartIndex:r.collisionBoxArray.length,tr=b?b.boxEndIndex:r.collisionBoxArray.length,or=B?B.boxStartIndex:r.collisionBoxArray.length,cr=B?B.boxEndIndex:r.collisionBoxArray.length,ur=-1,dr=function(r,e){return r&&r.circleDiameter?Math.max(r.circleDiameter,e):e};ur=dr(A,ur),ur=dr(M,ur),ur=dr(b,ur);var sr=(ur=dr(B,ur))>-1?1:0;sr&&(ur*=C/Xs),r.glyphOffsetArray.length>=np.MAX_GLYPHS&&z("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==v.sortKey&&r.addToSortKeyRanges(r.symbolInstances.length,v.sortKey),r.symbolInstances.emplaceBack(e.x,e.y,D.right>=0?D.right:-1,D.center>=0?D.center:-1,D.left>=0?D.left:-1,D.vertical||-1,N,T,J,rr,er,nr,ir,ar,tr,or,cr,d,R,E,F,w,sr,0,m,U,H,ur)}function Zm(r,e,n,i){var a=r.compareText;if(e in a){for(var t=a[e],o=t.length-1;o>=0;o--)if(i.dist(t[o])0)&&("constant"!==t.value.kind||t.value.value.length>0),d="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,s=a.get("symbol-sort-key");if(this.features=[],u||d){for(var l=e.iconDependencies,m=e.glyphDependencies,p=e.availableImages,I=new Xt(this.zoom),y=0,f=r;y=0;for(var w=0,R=C.sections;w=0;c--)t[c]={x:e[c].x,y:e[c].y,tileUnitDistanceFromAnchor:a},c>0&&(a+=e[c-1].dist(e[c]));for(var u=0;u0},np.prototype.hasIconData=function(){return this.icon.segments.get().length>0},np.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},np.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},np.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},np.prototype.addIndicesForPlacedSymbol=function(r,e){for(var n=r.placedSymbolArray.get(e),i=n.vertexStartIndex+4*n.numGlyphs,a=n.vertexStartIndex;a1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(r),this.sortedAngle=r,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var n=0,i=this.symbolInstanceIndexes;n=0&&i.indexOf(r)===n&&e.addIndicesForPlacedSymbol(e.text,r)})),t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},_t("SymbolBucket",np,{omit:["layers","collisionBoxArray","features","compareText"]}),np.MAX_GLYPHS=65535,np.addDynamicAttributes=Qm;var ap=new mo({"symbol-placement":new oo(le.layout_symbol["symbol-placement"]),"symbol-spacing":new oo(le.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new oo(le.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new co(le.layout_symbol["symbol-sort-key"]),"symbol-z-order":new oo(le.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new oo(le.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new oo(le.layout_symbol["icon-ignore-placement"]),"icon-optional":new oo(le.layout_symbol["icon-optional"]),"icon-rotation-alignment":new oo(le.layout_symbol["icon-rotation-alignment"]),"icon-size":new co(le.layout_symbol["icon-size"]),"icon-text-fit":new oo(le.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new oo(le.layout_symbol["icon-text-fit-padding"]),"icon-image":new co(le.layout_symbol["icon-image"]),"icon-rotate":new co(le.layout_symbol["icon-rotate"]),"icon-padding":new oo(le.layout_symbol["icon-padding"]),"icon-keep-upright":new oo(le.layout_symbol["icon-keep-upright"]),"icon-offset":new co(le.layout_symbol["icon-offset"]),"icon-anchor":new co(le.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new oo(le.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new oo(le.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new oo(le.layout_symbol["text-rotation-alignment"]),"text-field":new co(le.layout_symbol["text-field"]),"text-font":new co(le.layout_symbol["text-font"]),"text-size":new co(le.layout_symbol["text-size"]),"text-max-width":new co(le.layout_symbol["text-max-width"]),"text-line-height":new oo(le.layout_symbol["text-line-height"]),"text-letter-spacing":new co(le.layout_symbol["text-letter-spacing"]),"text-justify":new co(le.layout_symbol["text-justify"]),"text-radial-offset":new co(le.layout_symbol["text-radial-offset"]),"text-variable-anchor":new oo(le.layout_symbol["text-variable-anchor"]),"text-anchor":new co(le.layout_symbol["text-anchor"]),"text-max-angle":new oo(le.layout_symbol["text-max-angle"]),"text-writing-mode":new oo(le.layout_symbol["text-writing-mode"]),"text-rotate":new co(le.layout_symbol["text-rotate"]),"text-padding":new oo(le.layout_symbol["text-padding"]),"text-keep-upright":new oo(le.layout_symbol["text-keep-upright"]),"text-transform":new co(le.layout_symbol["text-transform"]),"text-offset":new co(le.layout_symbol["text-offset"]),"text-allow-overlap":new oo(le.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new oo(le.layout_symbol["text-ignore-placement"]),"text-optional":new oo(le.layout_symbol["text-optional"])}),tp={paint:new mo({"icon-opacity":new co(le.paint_symbol["icon-opacity"]),"icon-color":new co(le.paint_symbol["icon-color"]),"icon-halo-color":new co(le.paint_symbol["icon-halo-color"]),"icon-halo-width":new co(le.paint_symbol["icon-halo-width"]),"icon-halo-blur":new co(le.paint_symbol["icon-halo-blur"]),"icon-translate":new oo(le.paint_symbol["icon-translate"]),"icon-translate-anchor":new oo(le.paint_symbol["icon-translate-anchor"]),"text-opacity":new co(le.paint_symbol["text-opacity"]),"text-color":new co(le.paint_symbol["text-color"],{runtimeType:Ge,getOverride:function(r){return r.textColor},hasOverride:function(r){return!!r.textColor}}),"text-halo-color":new co(le.paint_symbol["text-halo-color"]),"text-halo-width":new co(le.paint_symbol["text-halo-width"]),"text-halo-blur":new co(le.paint_symbol["text-halo-blur"]),"text-translate":new oo(le.paint_symbol["text-translate"]),"text-translate-anchor":new oo(le.paint_symbol["text-translate-anchor"])}),layout:ap},op=function(r){this.type=r.property.overrides?r.property.overrides.runtimeType:he,this.defaultValue=r};op.prototype.evaluate=function(r){if(r.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(r.formattedSection))return e.getOverride(r.formattedSection)}return r.feature&&r.featureState?this.defaultValue.evaluate(r.feature,r.featureState):this.defaultValue.property.specification.default},op.prototype.eachChild=function(r){this.defaultValue.isConstant()||r(this.defaultValue.value._styleExpression.expression)},op.prototype.outputDefined=function(){return!1},op.prototype.serialize=function(){return null},_t("FormatSectionOverride",op,{omit:["defaultValue"]});var cp=function(r){function e(e){r.call(this,e,tp)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,n){if(r.prototype.recalculate.call(this,e,n),"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 i=this.layout.get("text-writing-mode");if(i){for(var a=[],t=0,o=i;t",targetMapId:i,sourceMapId:t.mapId})}}},Gp.prototype.receive=function(r){var e=r.data,n=e.id;if(n&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[n];var i=this.cancelCallbacks[n];delete this.cancelCallbacks[n],i&&i()}else N()||e.mustQueue?(this.tasks[n]=e,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,e)},Gp.prototype.process=function(){if(this.taskQueue.length){var r=this.taskQueue.shift(),e=this.tasks[r];delete this.tasks[r],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(r,e)}},Gp.prototype.processTask=function(r,e){var n=this;if(""===e.type){var i=this.callbacks[r];delete this.callbacks[r],i&&(e.error?i(Gt(e.error)):i(null,Gt(e.data)))}else{var a=!1,t=J(this.globalScope)?void 0:[],o=e.hasCallback?function(e,i){a=!0,delete n.cancelCallbacks[r],n.target.postMessage({id:r,type:"",sourceMapId:n.mapId,error:e?Pt(e):null,data:Pt(i,t)},t)}:function(r){a=!0},c=null,u=Gt(e.data);if(this.parent[e.type])c=this.parent[e.type](e.sourceMapId,u,o);else if(this.parent.getWorkerSource){var d=e.type.split(".");c=this.parent.getWorkerSource(e.sourceMapId,d[0],u.source)[d[1]](u,o)}else o(new Error("Could not find function "+e.type));!a&&c&&c.cancel&&(this.cancelCallbacks[r]=c.cancel)}},Gp.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Ap=function(r,e){r&&(e?this.setSouthWest(r).setNorthEast(e):4===r.length?this.setSouthWest([r[0],r[1]]).setNorthEast([r[2],r[3]]):this.setSouthWest(r[0]).setNorthEast(r[1]))};Ap.prototype.setNorthEast=function(r){return this._ne=r instanceof Mp?new Mp(r.lng,r.lat):Mp.convert(r),this},Ap.prototype.setSouthWest=function(r){return this._sw=r instanceof Mp?new Mp(r.lng,r.lat):Mp.convert(r),this},Ap.prototype.extend=function(r){var e,n,i=this._sw,a=this._ne;if(r instanceof Mp)e=r,n=r;else{if(!(r instanceof Ap)){if(Array.isArray(r)){if(4===r.length||r.every(Array.isArray)){var t=r;return this.extend(Ap.convert(t))}var o=r;return this.extend(Mp.convert(o))}return this}if(e=r._sw,n=r._ne,!e||!n)return this}return i||a?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),a.lng=Math.max(n.lng,a.lng),a.lat=Math.max(n.lat,a.lat)):(this._sw=new Mp(e.lng,e.lat),this._ne=new Mp(n.lng,n.lat)),this},Ap.prototype.getCenter=function(){return new Mp((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Ap.prototype.getSouthWest=function(){return this._sw},Ap.prototype.getNorthEast=function(){return this._ne},Ap.prototype.getNorthWest=function(){return new Mp(this.getWest(),this.getNorth())},Ap.prototype.getSouthEast=function(){return new Mp(this.getEast(),this.getSouth())},Ap.prototype.getWest=function(){return this._sw.lng},Ap.prototype.getSouth=function(){return this._sw.lat},Ap.prototype.getEast=function(){return this._ne.lng},Ap.prototype.getNorth=function(){return this._ne.lat},Ap.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Ap.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Ap.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Ap.prototype.contains=function(r){var e=Mp.convert(r),n=e.lng,i=e.lat,a=this._sw.lat<=i&&i<=this._ne.lat,t=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(t=this._sw.lng>=n&&n>=this._ne.lng),a&&t},Ap.convert=function(r){return!r||r instanceof Ap?r:new Ap(r)};var bp=6371008.8,Mp=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid LngLat object: ("+r+", "+e+")");if(this.lng=+r,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Mp.prototype.wrap=function(){return new Mp(I(this.lng,-180,180),this.lat)},Mp.prototype.toArray=function(){return[this.lng,this.lat]},Mp.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Mp.prototype.distanceTo=function(r){var e=Math.PI/180,n=this.lat*e,i=r.lat*e,a=Math.sin(n)*Math.sin(i)+Math.cos(n)*Math.cos(i)*Math.cos((r.lng-this.lng)*e);return bp*Math.acos(Math.min(a,1))},Mp.prototype.toBounds=function(r){void 0===r&&(r=0);var e=360*r/40075017,n=e/Math.cos(Math.PI/180*this.lat);return new Ap(new Mp(this.lng-n,this.lat-e),new Mp(this.lng+n,this.lat+e))},Mp.convert=function(r){if(r instanceof Mp)return r;if(Array.isArray(r)&&(2===r.length||3===r.length))return new Mp(Number(r[0]),Number(r[1]));if(!Array.isArray(r)&&"object"===typeof r&&null!==r)return new Mp(Number("lng"in r?r.lng:r.lon),Number(r.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Bp=2*Math.PI*bp;function kp(r){return Bp*Math.cos(r*Math.PI/180)}function Fp(r){return(180+r)/360}function zp(r){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360}function wp(r,e){return r/kp(e)}function Rp(r){return 360*r-180}function Ep(r){var e=180-360*r;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Np(r,e){return r*kp(Ep(e))}function Tp(r){return 1/Math.cos(r*Math.PI/180)}var Dp=function(r,e,n){void 0===n&&(n=0),this.x=+r,this.y=+e,this.z=+n};Dp.fromLngLat=function(r,e){void 0===e&&(e=0);var n=Mp.convert(r);return new Dp(Fp(n.lng),zp(n.lat),wp(e,n.lat))},Dp.prototype.toLngLat=function(){return new Mp(Rp(this.x),Ep(this.y))},Dp.prototype.toAltitude=function(){return Np(this.z,this.y)},Dp.prototype.meterInMercatorCoordinateUnits=function(){return 1/Bp*Tp(Ep(this.y))};var Jp=function(r,e,n){this.z=r,this.x=e,this.y=n,this.key=Lp(0,r,r,e,n)};Jp.prototype.equals=function(r){return this.z===r.z&&this.x===r.x&&this.y===r.y},Jp.prototype.url=function(r,e){var n=Cp(this.x,this.y,this.z),i=Op(this.z,this.x,this.y);return r[(this.x+this.y)%r.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"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",i).replace("{bbox-epsg-3857}",n)},Jp.prototype.getTilePoint=function(r){var e=Math.pow(2,this.z);return new t((r.x*e-this.x)*Ec,(r.y*e-this.y)*Ec)},Jp.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Up=function(r,e){this.wrap=r,this.canonical=e,this.key=Lp(r,e.z,e.z,e.x,e.y)},Hp=function(r,e,n,i,a){this.overscaledZ=r,this.wrap=e,this.canonical=new Jp(n,+i,+a),this.key=Lp(e,r,n,i,a)};function Lp(r,e,n,i,a){(r*=2)<0&&(r=-1*r-1);var t=1<0;t--)a+=(e&(i=1<this.canonical.z?new Hp(r,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Hp(r,this.wrap,r,this.canonical.x>>e,this.canonical.y>>e)},Hp.prototype.calculateScaledKey=function(r,e){var n=this.canonical.z-r;return r>this.canonical.z?Lp(this.wrap*+e,r,this.canonical.z,this.canonical.x,this.canonical.y):Lp(this.wrap*+e,r,r,this.canonical.x>>n,this.canonical.y>>n)},Hp.prototype.isChildOf=function(r){if(r.wrap!==this.wrap)return!1;var e=this.canonical.z-r.canonical.z;return 0===r.overscaledZ||r.overscaledZ>e&&r.canonical.y===this.canonical.y>>e},Hp.prototype.children=function(r){if(this.overscaledZ>=r)return[new Hp(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,n=2*this.canonical.x,i=2*this.canonical.y;return[new Hp(e,this.wrap,e,n,i),new Hp(e,this.wrap,e,n+1,i),new Hp(e,this.wrap,e,n,i+1),new Hp(e,this.wrap,e,n+1,i+1)]},Hp.prototype.isLessThan=function(r){return this.wrapr.wrap)&&(this.overscaledZr.overscaledZ)&&(this.canonical.xr.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(r+1)},Kp.prototype._unpackMapbox=function(r,e,n){return(256*r*256+256*e+n)/10-1e4},Kp.prototype._unpackTerrarium=function(r,e,n){return 256*r+e+n/256-32768},Kp.prototype.getPixels=function(){return new qu({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Kp.prototype.backfillBorder=function(r,e,n){if(this.dim!==r.dim)throw new Error("dem dimension mismatch");var i=e*this.dim,a=e*this.dim+this.dim,t=n*this.dim,o=n*this.dim+this.dim;switch(e){case-1:i=a-1;break;case 1:a=i+1}switch(n){case-1:t=o-1;break;case 1:o=t+1}for(var c=-e*this.dim,u=-n*this.dim,d=t;d=0&&s[3]>=0&&c.insert(o,s[0],s[1],s[2],s[3])}},Yp.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new us.VectorTile(new $s(this.rawTileData)).layers,this.sourceLayerCoder=new jp(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Yp.prototype.query=function(r,e,n,i){var a=this;this.loadVTLayers();for(var t=r.params||{},o=Ec/r.tileSize/r.scale,c=wa(t.filter),u=r.queryGeometry,d=r.queryPadding*o,s=Qp(u),l=this.grid.query(s.minX-d,s.minY-d,s.maxX+d,s.maxY+d),m=Qp(r.cameraQueryGeometry),p=0,I=this.grid3D.query(m.minX-d,m.minY-d,m.maxX+d,m.maxY+d,(function(e,n,i,a){return ru(r.cameraQueryGeometry,e-d,n-d,i+d,a+d)}));pi)a=!1;else if(e)if(this.expirationTime=M.maxzoom||"none"!==M.visibility&&(u(b,this.zoom,i),(y[M.id]=M.createBucket({index:s.bucketLayerIDs.length,layers:b,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:v,sourceID:this.source})).populate(x,f,this.tileID.canonical),s.bucketLayerIDs.push(b.map((function(r){return r.id}))))}}}var B=r.mapObject(f.glyphDependencies,(function(r){return Object.keys(r).map(Number)}));Object.keys(B).length?a.send("getGlyphs",{uid:this.uid,stacks:B},(function(r,e){l||(l=r,m=e,z.call(c))})):m={};var k=Object.keys(f.iconDependencies);k.length?a.send("getImages",{icons:k,source:this.source,tileID:this.tileID,type:"icons"},(function(r,e){l||(l=r,p=e,z.call(c))})):p={};var F=Object.keys(f.patternDependencies);function z(){if(l)return t(l);if(m&&p&&I){var e=new o(m),n=new r.ImageAtlas(p,I);for(var a in y){var c=y[a];c instanceof r.SymbolBucket?(u(c.layers,this.zoom,i),r.performSymbolLayout(c,m,e.positions,p,n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):c.hasPattern&&(c instanceof r.LineBucket||c instanceof r.FillBucket||c instanceof r.FillExtrusionBucket)&&(u(c.layers,this.zoom,i),c.addFeatures(f,this.tileID.canonical,n.patternPositions))}this.status="done",t(null,{buckets:r.values(y).filter((function(r){return!r.isEmpty()})),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:n,glyphMap:this.returnDependencies?m:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}F.length?a.send("getImages",{icons:F,source:this.source,tileID:this.tileID,type:"patterns"},(function(r,e){l||(l=r,I=e,z.call(c))})):I={},z.call(this)};var s=function(r,e,n,i){this.actor=r,this.layerIndex=e,this.availableImages=n,this.loadVectorData=i||d,this.loading={},this.loaded={}};s.prototype.loadTile=function(e,n){var i=this,a=e.uid;this.loading||(this.loading={});var t=!!(e&&e.request&&e.request.collectResourceTiming)&&new r.RequestPerformance(e.request),o=this.loading[a]=new c(e);o.abort=this.loadVectorData(e,(function(e,c){if(delete i.loading[a],e||!c)return o.status="done",i.loaded[a]=o,n(e);var u=c.rawData,d={};c.expires&&(d.expires=c.expires),c.cacheControl&&(d.cacheControl=c.cacheControl);var s={};if(t){var l=t.finish();l&&(s.resourceTiming=JSON.parse(JSON.stringify(l)))}o.vectorTile=c.vectorTile,o.parse(c.vectorTile,i.layerIndex,i.availableImages,i.actor,(function(e,i){if(e||!i)return n(e);n(null,r.extend({rawTileData:u.slice(0)},i,d,s))})),i.loaded=i.loaded||{},i.loaded[a]=o}))},s.prototype.reloadTile=function(r,e){var n=this,i=this.loaded,a=r.uid,t=this;if(i&&i[a]){var o=i[a];o.showCollisionBoxes=r.showCollisionBoxes;var c=function(r,i){var a=o.reloadCallback;a&&(delete o.reloadCallback,o.parse(o.vectorTile,t.layerIndex,n.availableImages,t.actor,a)),e(r,i)};"parsing"===o.status?o.reloadCallback=c:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,c):c())}},s.prototype.abortTile=function(r,e){var n=this.loading,i=r.uid;n&&n[i]&&n[i].abort&&(n[i].abort(),delete n[i]),e()},s.prototype.removeTile=function(r,e){var n=this.loaded,i=r.uid;n&&n[i]&&delete n[i],e()};var l=r.window.ImageBitmap,m=function(){this.loaded={}};m.prototype.loadTile=function(e,n){var i=e.uid,a=e.encoding,t=e.rawImageData,o=l&&t instanceof l?this.getImageData(t):t,c=new r.DEMData(i,o,a);this.loaded=this.loaded||{},this.loaded[i]=c,n(null,c)},m.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var n=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new r.RGBAImage({width:n.width,height:n.height},n.data)},m.prototype.removeTile=function(r){var e=this.loaded,n=r.uid;e&&e[n]&&delete e[n]};var p=I;function I(r,e){var n,i=r&&r.type;if("FeatureCollection"===i)for(n=0;n=0!==!!e&&r.reverse()}var g=r.vectorTile.VectorTileFeature.prototype.toGeoJSON,_=function(e){this._feature=e,this.extent=r.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};_.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],n=0,i=this._feature.geometry;n>31}function N(r,e){for(var n=r.loadGeometry(),i=r.type,a=0,t=0,o=n.length,c=0;c>1;J(r,e,o,i,a,t%2),D(r,e,n,i,o-1,t+1),D(r,e,n,o+1,a,t+1)}}function J(r,e,n,i,a,t){for(;a>i;){if(a-i>600){var o=a-i+1,c=n-i+1,u=Math.log(o),d=.5*Math.exp(2*u/3),s=.5*Math.sqrt(u*d*(o-d)/o)*(c-o/2<0?-1:1);J(r,e,n,Math.max(i,Math.floor(n-c*d/o+s)),Math.min(a,Math.floor(n+(o-c)*d/o+s)),t)}var l=e[2*n+t],m=i,p=a;for(U(r,e,i,n),e[2*a+t]>l&&U(r,e,i,a);ml;)p--}e[2*i+t]===l?U(r,e,i,p):U(r,e,++p,a),p<=n&&(i=p+1),n<=p&&(a=p-1)}}function U(r,e,n,i){H(r,n,i),H(e,2*n,2*i),H(e,2*n+1,2*i+1)}function H(r,e,n){var i=r[e];r[e]=r[n],r[n]=i}function L(r,e,n,i,a,t,o){for(var c,u,d=[0,r.length-1,0],s=[];d.length;){var l=d.pop(),m=d.pop(),p=d.pop();if(m-p<=o)for(var I=p;I<=m;I++)c=e[2*I],u=e[2*I+1],c>=n&&c<=a&&u>=i&&u<=t&&s.push(r[I]);else{var y=Math.floor((p+m)/2);c=e[2*y],u=e[2*y+1],c>=n&&c<=a&&u>=i&&u<=t&&s.push(r[y]);var f=(l+1)%2;(0===l?n<=c:i<=u)&&(d.push(p),d.push(y-1),d.push(f)),(0===l?a>=c:t>=u)&&(d.push(y+1),d.push(m),d.push(f))}}return s}function O(r,e,n,i,a,t){for(var o=[0,r.length-1,0],c=[],u=a*a;o.length;){var d=o.pop(),s=o.pop(),l=o.pop();if(s-l<=t)for(var m=l;m<=s;m++)K(e[2*m],e[2*m+1],n,i)<=u&&c.push(r[m]);else{var p=Math.floor((l+s)/2),I=e[2*p],y=e[2*p+1];K(I,y,n,i)<=u&&c.push(r[p]);var f=(d+1)%2;(0===d?n-a<=I:i-a<=y)&&(o.push(l),o.push(p-1),o.push(f)),(0===d?n+a>=I:i+a>=y)&&(o.push(p+1),o.push(s),o.push(f))}}return c}function K(r,e,n,i){var a=r-n,t=e-i;return a*a+t*t}C.fromVectorTileJs=S,C.fromGeojsonVt=A,C.GeoJSONWrapper=b;var V=function(r){return r[0]},j=function(r){return r[1]},W=function(r,e,n,i,a){void 0===e&&(e=V),void 0===n&&(n=j),void 0===i&&(i=64),void 0===a&&(a=Float64Array),this.nodeSize=i,this.points=r;for(var t=r.length<65536?Uint16Array:Uint32Array,o=this.ids=new t(r.length),c=this.coords=new a(2*r.length),u=0;u=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return ar(ar({},r.properties),{cluster:!0,cluster_id:r.id,point_count:e,point_count_abbreviated:n})}function rr(r){return r/360+.5}function er(r){var e=Math.sin(r*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function nr(r){return 360*(r-.5)}function ir(r){var e=(180-360*r)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function ar(r,e){for(var n in e)r[n]=e[n];return r}function tr(r){return r.x}function or(r){return r.y}function cr(r,e,n,i){for(var a,t=i,o=n-e>>1,c=n-e,u=r[e],d=r[e+1],s=r[n],l=r[n+1],m=e+3;mt)a=m,t=p;else if(p===t){var I=Math.abs(m-o);Ii&&(a-e>3&&cr(r,e,a,i),r[a+2]=t,n-a>3&&cr(r,a,n,i))}function ur(r,e,n,i,a,t){var o=a-n,c=t-i;if(0!==o||0!==c){var u=((r-n)*o+(e-i)*c)/(o*o+c*c);u>1?(n=a,i=t):u>0&&(n+=o*u,i+=c*u)}return(o=r-n)*o+(c=e-i)*c}function dr(r,e,n,i){var a={id:"undefined"===typeof r?null:r,type:e,geometry:n,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return sr(a),a}function sr(r){var e=r.geometry,n=r.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)lr(r,e);else if("Polygon"===n||"MultiLineString"===n)for(var i=0;i0&&(o+=i?(a*d-u*t)/2:Math.sqrt(Math.pow(u-a,2)+Math.pow(d-t,2))),a=u,t=d}var s=e.length-3;e[2]=1,cr(e,0,s,n),e[s+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function fr(r,e,n,i){for(var a=0;a1?1:n}function hr(r,e,n,i,a,t,o,c){if(i/=e,t>=(n/=e)&&o=i)return null;for(var u=[],d=0;d=n&&I=i)){var y=[];if("Point"===m||"MultiPoint"===m)vr(l,y,n,i,a);else if("LineString"===m)xr(l,y,n,i,a,!1,c.lineMetrics);else if("MultiLineString"===m)Gr(l,y,n,i,a,!1);else if("Polygon"===m)Gr(l,y,n,i,a,!0);else if("MultiPolygon"===m)for(var f=0;f=n&&o<=i&&(e.push(r[t]),e.push(r[t+1]),e.push(r[t+2]))}}function xr(r,e,n,i,a,t,o){for(var c,u,d=Pr(r),s=0===a?Sr:Ar,l=r.start,m=0;mn&&(u=s(d,p,I,f,g,n),o&&(d.start=l+c*u)):_>i?h=n&&(u=s(d,p,I,f,g,n),v=!0),h>i&&_<=i&&(u=s(d,p,I,f,g,i),v=!0),!t&&v&&(o&&(d.end=l+c*u),e.push(d),d=Pr(r)),o&&(l+=c)}var x=r.length-3;p=r[x],I=r[x+1],y=r[x+2],(_=0===a?p:I)>=n&&_<=i&&Cr(d,p,I,y),x=d.length-3,t&&x>=3&&(d[x]!==d[0]||d[x+1]!==d[1])&&Cr(d,d[0],d[1],d[2]),d.length&&e.push(d)}function Pr(r){var e=[];return e.size=r.size,e.start=r.start,e.end=r.end,e}function Gr(r,e,n,i,a,t){for(var o=0;oo.maxX&&(o.maxX=s),l>o.maxY&&(o.maxY=l)}return o}function wr(r,e,n,i){var a=e.geometry,t=e.type,o=[];if("Point"===t||"MultiPoint"===t)for(var c=0;c0&&e.size<(a?o:i))n.numPoints+=e.length/3;else{for(var c=[],u=0;uo)&&(n.numSimplified++,c.push(e[u]),c.push(e[u+1])),n.numPoints++;a&&Er(c,t),r.push(c)}}function Er(r,e){for(var n=0,i=0,a=r.length,t=a-2;i0===e)for(i=0,a=r.length;i
24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=mr(r,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=br(i,e)).length&&this.splitTile(i,0,0,0),n&&(i.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 Dr(r,e,n){return 32*((1<=i;d--){var s=+Date.now();c=this._cluster(c,d),this.trees[d]=new W(c,tr,or,t,Float32Array),n&&console.log("z%d: %d clusters in %dms",d,c.length,+Date.now()-s)}return n&&console.timeEnd("total time"),this},q.prototype.getClusters=function(r,e){var n=((r[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,r[1])),a=180===r[2]?180:((r[2]+180)%360+360)%360-180,t=Math.max(-90,Math.min(90,r[3]));if(r[2]-r[0]>=360)n=-180,a=180;else if(n>a){var o=this.getClusters([n,i,180,t],e),c=this.getClusters([-180,i,a,t],e);return o.concat(c)}for(var u=this.trees[this._limitZoom(e)],d=[],s=0,l=u.range(rr(n),er(t),rr(a),er(i));se&&(I+=_.numPoints||1)}if(I>=c){for(var h=s.x*p,v=s.y*p,x=o&&p>1?this._map(s,!0):null,P=(d<<5)+(e+1)+this.points.length,G=0,C=m;G1)for(var M=0,B=m;M>5},q.prototype._getOriginZoom=function(r){return(r-this.points.length)%32},q.prototype._map=function(r,e){if(r.numPoints)return e?ar({},r.properties):r.properties;var n=this.points[r.index].properties,i=this.options.map(n);return e&&i===n?ar({},i):i},Tr.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Tr.prototype.splitTile=function(r,e,n,i,a,t,o){for(var c=[r,e,n,i],u=this.options,d=u.debug;c.length;){i=c.pop(),n=c.pop(),e=c.pop(),r=c.pop();var s=1<1&&console.time("creation"),m=this.tiles[l]=zr(r,e,n,i,u),this.tileCoords.push({z:e,x:n,y:i}),d)){d>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,i,m.numFeatures,m.numPoints,m.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(m.source=r,a){if(e===u.maxZoom||e===a)continue;var I=1<1&&console.time("clipping");var y,f,g,_,h,v,x=.5*u.buffer/u.extent,P=.5-x,G=.5+x,C=1+x;y=f=g=_=null,h=hr(r,s,n-x,n+G,0,m.minX,m.maxX,u),v=hr(r,s,n+P,n+C,0,m.minX,m.maxX,u),r=null,h&&(y=hr(h,s,i-x,i+G,1,m.minY,m.maxY,u),f=hr(h,s,i+P,i+C,1,m.minY,m.maxY,u),h=null),v&&(g=hr(v,s,i-x,i+G,1,m.minY,m.maxY,u),_=hr(v,s,i+P,i+C,1,m.minY,m.maxY,u),v=null),d>1&&console.timeEnd("clipping"),c.push(y||[],e+1,2*n,2*i),c.push(f||[],e+1,2*n,2*i+1),c.push(g||[],e+1,2*n+1,2*i),c.push(_||[],e+1,2*n+1,2*i+1)}}},Tr.prototype.getTile=function(r,e,n){var i=this.options,a=i.extent,t=i.debug;if(r<0||r>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",r,e,n);for(var u,d=r,s=e,l=n;!u&&d>0;)d--,s=Math.floor(s/2),l=Math.floor(l/2),u=this.tiles[Dr(d,s,l)];return u&&u.source?(t>1&&console.log("found parent tile z%d-%d-%d",d,s,l),t>1&&console.time("drilling down"),this.splitTile(u.source,d,s,l,r,e,n),t>1&&console.timeEnd("drilling down"),this.tiles[c]?kr(this.tiles[c],a):null):null};var Hr=function(e){function n(r,n,i,a){e.call(this,r,n,i,Ur),a&&(this.loadGeoJSON=a)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.loadData=function(r,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=r,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},n.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var n=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var a=!!(i&&i.request&&i.request.collectResourceTiming)&&new r.RequestPerformance(i.request);this.loadGeoJSON(i,(function(t,o){if(t||!o)return n(t);if("object"!==typeof o)return n(new Error("Input data given to '"+i.source+"' is not a valid GeoJSON object."));p(o,!0);try{if(i.filter){var c=r.createExpression(i.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===c.result)throw new Error(c.value.map((function(r){return r.key+": "+r.message})).join(", "));var u=o.features.filter((function(r){return c.value.evaluate({zoom:0},r)}));o={type:"FeatureCollection",features:u}}e._geoJSONIndex=i.cluster?new q(Lr(i)).load(o.features):Nr(o,i.geojsonVtOptions)}catch(t){return n(t)}e.loaded={};var d={};if(a){var s=a.finish();s&&(d.resourceTiming={},d.resourceTiming[i.source]=JSON.parse(JSON.stringify(s)))}n(null,d)}))}},n.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},n.prototype.reloadTile=function(r,n){var i=this.loaded,a=r.uid;return i&&i[a]?e.prototype.reloadTile.call(this,r,n):this.loadTile(r,n)},n.prototype.loadGeoJSON=function(e,n){if(e.request)r.getJSON(e.request,n);else{if("string"!==typeof e.data)return n(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."));try{return n(null,JSON.parse(e.data))}catch(i){return n(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."))}}},n.prototype.removeSource=function(r,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},n.prototype.getClusterExpansionZoom=function(r,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(r.clusterId))}catch(n){e(n)}},n.prototype.getClusterChildren=function(r,e){try{e(null,this._geoJSONIndex.getChildren(r.clusterId))}catch(n){e(n)}},n.prototype.getClusterLeaves=function(r,e){try{e(null,this._geoJSONIndex.getLeaves(r.clusterId,r.limit,r.offset))}catch(n){e(n)}},n}(s);function Lr(e){var n=e.superclusterOptions,i=e.clusterProperties;if(!i||!n)return n;for(var a={},t={},o={accumulated:null,zoom:0},c={properties:null},u=Object.keys(i),d=0,s=u;d1?"@2x":"",u=r.getJSON(n.transformRequest(n.normalizeSpriteURL(e,c,".json"),r.ResourceType.SpriteJSON),(function(r,e){u=null,o||(o=r,a=e,s())})),d=r.getImage(n.transformRequest(n.normalizeSpriteURL(e,c,".png"),r.ResourceType.SpriteImage),(function(r,e){d=null,o||(o=r,t=e,s())}));function s(){if(o)i(o);else if(a&&t){var e=r.browser.getImageData(t),n={};for(var c in a){var u=a[c],d=u.width,s=u.height,l=u.x,m=u.y,p=u.sdf,I=u.pixelRatio,y=u.stretchX,f=u.stretchY,g=u.content,_=new r.RGBAImage({width:d,height:s});r.RGBAImage.copy(e,_,{x:l,y:m},{x:0,y:0},{width:d,height:s}),n[c]={data:_,pixelRatio:I,sdf:p,stretchX:y,stretchY:f,content:g}}i(null,n)}}return{cancel:function(){u&&(u.cancel(),u=null),d&&(d.cancel(),d=null)}}}function m(r){var e=r.userImage;return!!(e&&e.render&&e.render())&&(r.data.replace(new Uint8Array(e.data.buffer)),!0)}n.suppressClick=function(){r.window.addEventListener("click",s,!0),r.window.setTimeout((function(){r.window.removeEventListener("click",s,!0)}),0)},n.mousePos=function(e,n){var i=e.getBoundingClientRect();return new r.Point(n.clientX-i.left-e.clientLeft,n.clientY-i.top-e.clientTop)},n.touchPos=function(e,n){for(var i=e.getBoundingClientRect(),a=[],t=0;t=0?0:e.button},n.remove=function(r){r.parentNode&&r.parentNode.removeChild(r)};var p=1,I=function(e){function n(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new r.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.isLoaded=function(){return this.loaded},n.prototype.setLoaded=function(r){if(this.loaded!==r&&(this.loaded=r,r)){for(var e=0,n=this.requestors;e=0?1.2:1))}function v(r,e,n,i,a,t,o){for(var c=0;c65535)e(new Error("glyphs > 65535 not supported"));else if(t.ranges[c])e(null,{stack:n,id:a,glyph:o});else{var u=t.requests[c];u||(u=t.requests[c]=[],P.loadGlyphRange(n,c,i.url,i.requestManager,(function(r,e){if(e){for(var n in e)i._doesCharSupportLocalGlyph(+n)||(t.glyphs[+n]=e[+n]);t.ranges[c]=!0}for(var a=0,o=u;a1&&(u=r[++c]);var s=Math.abs(d-u.left),l=Math.abs(d-u.right),m=Math.min(s,l),p=void 0,I=a/n*(i+1);if(u.isDash){var y=i-Math.abs(I);p=Math.sqrt(m*m+y*y)}else p=i-Math.sqrt(m*m+I*I);this.data[o+d]=Math.max(0,Math.min(255,p+128))}},b.prototype.addRegularDash=function(r){for(var e=r.length-1;e>=0;--e){var n=r[e],i=r[e+1];n.zeroLength?r.splice(e,1):i&&i.isDash===n.isDash&&(i.left=n.left,r.splice(e,1))}var a=r[0],t=r[r.length-1];a.isDash===t.isDash&&(a.left=t.left-this.width,t.right=a.right+this.width);for(var o=this.width*this.nextRow,c=0,u=r[c],d=0;d1&&(u=r[++c]);var s=Math.abs(d-u.left),l=Math.abs(d-u.right),m=Math.min(s,l),p=u.isDash?m:-m;this.data[o+d]=Math.max(0,Math.min(255,p+128))}},b.prototype.addDash=function(e,n){var i=n?7:0,a=2*i+1;if(this.nextRow+a>this.height)return r.warnOnce("LineAtlas out of space"),null;for(var t=0,o=0;o=i.minX&&e.x=i.minY&&e.y0&&(u[new r.OverscaledTileID(e.overscaledZ,t,n.z,a,n.y-1).key]={backfilled:!1},u[new r.OverscaledTileID(e.overscaledZ,e.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},u[new r.OverscaledTileID(e.overscaledZ,c,n.z,o,n.y-1).key]={backfilled:!1}),n.y+10&&(i.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new r.Event("data",i))}}))},n.prototype.onAdd=function(r){this.map=r,this.load()},n.prototype.setData=function(e){var n=this;return this._data=e,this.fire(new r.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)n.fire(new r.ErrorEvent(e));else{var i={dataType:"source",sourceDataType:"content"};n._collectResourceTiming&&n._resourceTiming&&n._resourceTiming.length>0&&(i.resourceTiming=n._resourceTiming,n._resourceTiming=[]),n.fire(new r.Event("data",i))}})),this},n.prototype.getClusterExpansionZoom=function(r,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:r,source:this.id},e),this},n.prototype.getClusterChildren=function(r,e){return this.actor.send("geojson.getClusterChildren",{clusterId:r,source:this.id},e),this},n.prototype.getClusterLeaves=function(r,e,n,i){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:r,limit:e,offset:n},i),this},n.prototype._updateWorkerData=function(e){var n=this;this._loaded=!1;var i=r.extend({},this.workerOptions),a=this._data;"string"===typeof a?(i.request=this.map._requestManager.transformRequest(r.browser.resolveURL(a),r.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(a),this.actor.send(this.type+".loadData",i,(function(r,a){n._removed||a&&a.abandoned||(n._loaded=!0,a&&a.resourceTiming&&a.resourceTiming[n.id]&&(n._resourceTiming=a.resourceTiming[n.id].slice(0)),n.actor.send(n.type+".coalesce",{source:i.source},null),e(r))}))},n.prototype.loaded=function(){return this._loaded},n.prototype.loadTile=function(e,n){var i=this,a=e.actor?"reloadTile":"loadTile";e.actor=this.actor;var t={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:r.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(a,t,(function(r,t){return delete e.request,e.unloadVectorData(),e.aborted?n(null):r?n(r):(e.loadVectorData(t,i.map.painter,"reloadTile"===a),n(null))}))},n.prototype.abortTile=function(r){r.request&&(r.request.cancel(),delete r.request),r.aborted=!0},n.prototype.unloadTile=function(r){r.unloadVectorData(),this.actor.send("removeTile",{uid:r.uid,type:this.type,source:this.id})},n.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},n.prototype.serialize=function(){return r.extend({},this._options,{type:this.type,data:this._data})},n.prototype.hasTransition=function(){return!1},n}(r.Evented),E=r.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),N=function(e){function n(r,n,i,a){e.call(this),this.id=r,this.dispatcher=i,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(a),this.options=n}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(e,n){var i=this;this._loaded=!1,this.fire(new r.Event("dataloading",{dataType:"source"})),this.url=this.options.url,r.getImage(this.map._requestManager.transformRequest(this.url,r.ResourceType.Image),(function(a,t){i._loaded=!0,a?i.fire(new r.ErrorEvent(a)):t&&(i.image=t,e&&(i.coordinates=e),n&&n(),i._finishLoading())}))},n.prototype.loaded=function(){return this._loaded},n.prototype.updateImage=function(r){var e=this;return this.image&&r.url?(this.options.url=r.url,this.load(r.coordinates,(function(){e.texture=null})),this):this},n.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new r.Event("data",{dataType:"source",sourceDataType:"metadata"})))},n.prototype.onAdd=function(r){this.map=r,this.load()},n.prototype.setCoordinates=function(e){var n=this;this.coordinates=e;var i=e.map(r.MercatorCoordinate.fromLngLat);this.tileID=T(i),this.minzoom=this.maxzoom=this.tileID.z;var a=i.map((function(r){return n.tileID.getTilePoint(r)._round()}));return this._boundsArray=new r.StructArrayLayout4i8,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,r.EXTENT,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,r.EXTENT),this._boundsArray.emplaceBack(a[2].x,a[2].y,r.EXTENT,r.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new r.Event("data",{dataType:"source",sourceDataType:"content"})),this},n.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,n=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=r.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new r.Texture(e,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},n.prototype.loadTile=function(r,e){this.tileID&&this.tileID.equals(r.tileID.canonical)?(this.tiles[String(r.tileID.wrap)]=r,r.buckets={},e(null)):(r.state="errored",e(null))},n.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return!1},n}(r.Evented);function T(e){for(var n=1/0,i=1/0,a=-1/0,t=-1/0,o=0,c=e;on.end(0)?this.fire(new r.ErrorEvent(new r.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+n.start(0)+" and "+n.end(0)+"-second mark."))):this.video.currentTime=e}},n.prototype.getVideo=function(){return this.video},n.prototype.onAdd=function(r){this.map||(this.map=r,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},n.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,n=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=r.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new r.Texture(e,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE)),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this.video&&!this.video.paused},n}(N),J=function(e){function n(n,i,a,t){e.call(this,n,i,a,t),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some((function(r){return!Array.isArray(r)||2!==r.length||r.some((function(r){return"number"!==typeof r}))}))||this.fire(new r.ErrorEvent(new r.ValidationError("sources."+n,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new r.ErrorEvent(new r.ValidationError("sources."+n,null,'missing required property "coordinates"'))),i.animate&&"boolean"!==typeof i.animate&&this.fire(new r.ErrorEvent(new r.ValidationError("sources."+n,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"===typeof i.canvas||i.canvas instanceof r.window.HTMLCanvasElement||this.fire(new r.ErrorEvent(new r.ValidationError("sources."+n,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 r.ErrorEvent(new r.ValidationError("sources."+n,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof r.window.HTMLCanvasElement?this.options.canvas:r.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new r.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())},n.prototype.getCanvas=function(){return this.canvas},n.prototype.onAdd=function(r){this.map=r,this.load(),this.canvas&&this.animate&&this.play()},n.prototype.onRemove=function(){this.pause()},n.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var n=this.map.painter.context,i=n.gl;for(var a in this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,E.members)),this.boundsSegments||(this.boundsSegments=r.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new r.Texture(n,this.canvas,i.RGBA,{premultiply:!0}),this.tiles){var t=this.tiles[a];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture)}}},n.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},n.prototype.hasTransition=function(){return this._playing},n.prototype._hasInvalidDimensions=function(){for(var r=0,e=[this.canvas.width,this.canvas.height];rthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},X.prototype.has=function(r){return r.wrapped().key in this.data},X.prototype.getAndRemove=function(r){return this.has(r)?this._getAndRemoveByKey(r.wrapped().key):null},X.prototype._getAndRemoveByKey=function(r){var e=this.data[r].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[r].length&&delete this.data[r],this.order.splice(this.order.indexOf(r),1),e.value},X.prototype.getByKey=function(r){var e=this.data[r];return e?e[0].value:null},X.prototype.get=function(r){return this.has(r)?this.data[r.wrapped().key][0].value:null},X.prototype.remove=function(r,e){if(!this.has(r))return this;var n=r.wrapped().key,i=void 0===e?0:this.data[n].indexOf(e),a=this.data[n][i];return this.data[n].splice(i,1),a.timeout&&clearTimeout(a.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(a.value),this.order.splice(this.order.indexOf(n),1),this},X.prototype.setMaxSize=function(r){for(this.max=r;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},X.prototype.filter=function(r){var e=[];for(var n in this.data)for(var i=0,a=this.data[n];i1||(Math.abs(n)>1&&(1===Math.abs(n+a)?n+=a:1===Math.abs(n-a)&&(n-=a)),e.dem&&r.dem&&(r.dem.backfillBorder(e.dem,n,i),r.neighboringTiles&&r.neighboringTiles[t]&&(r.neighboringTiles[t].backfilled=!0)))}},n.prototype.getTile=function(r){return this.getTileByID(r.key)},n.prototype.getTileByID=function(r){return this._tiles[r]},n.prototype._retainLoadedChildren=function(r,e,n,i){for(var a in this._tiles){var t=this._tiles[a];if(!(i[a]||!t.hasData()||t.tileID.overscaledZ<=e||t.tileID.overscaledZ>n)){for(var o=t.tileID;t&&t.tileID.overscaledZ>e+1;){var c=t.tileID.scaledTo(t.tileID.overscaledZ-1);(t=this._tiles[c.key])&&t.hasData()&&(o=c)}for(var u=o;u.overscaledZ>e;)if(r[(u=u.scaledTo(u.overscaledZ-1)).key]){i[o.key]=o;break}}}},n.prototype.findLoadedParent=function(r,e){if(r.key in this._loadedParentTiles){var n=this._loadedParentTiles[r.key];return n&&n.tileID.overscaledZ>=e?n:null}for(var i=r.overscaledZ-1;i>=e;i--){var a=r.scaledTo(i),t=this._getLoadedTile(a);if(t)return t}},n.prototype._getLoadedTile=function(r){var e=this._tiles[r.key];return e&&e.hasData()?e:this._cache.getByKey(r.wrapped().key)},n.prototype.updateCacheSize=function(r){var e=(Math.ceil(r.width/this._source.tileSize)+1)*(Math.ceil(r.height/this._source.tileSize)+1),n=5,i=Math.floor(e*n),a="number"===typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(a)},n.prototype.handleWrapJump=function(r){var e=(r-(void 0===this._prevLng?r:this._prevLng))/360,n=Math.round(e);if(this._prevLng=r,n){var i={};for(var a in this._tiles){var t=this._tiles[a];t.tileID=t.tileID.unwrapTo(t.tileID.wrap+n),i[t.tileID.key]=t}for(var o in this._tiles=i,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var c in this._tiles){var u=this._tiles[c];this._setTileReloadTimer(c,u)}}},n.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var a;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?a=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new r.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(a=e.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(r){return i._source.hasTile(r)})))):a=[];var t=e.coveringZoomLevel(this._source),o=Math.max(t-n.maxOverzooming,this._source.minzoom),c=Math.max(t+n.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(a,t);if(Qr(this._source.type)){for(var d={},s={},l=0,m=Object.keys(u);lthis._source.maxzoom){var f=I.children(this._source.maxzoom)[0],g=this.getTile(f);if(g&&g.hasData()){i[f.key]=f;continue}}else{var _=I.children(this._source.maxzoom);if(i[_[0].key]&&i[_[1].key]&&i[_[2].key]&&i[_[3].key])continue}for(var h=y.wasRequested(),v=I.overscaledZ-1;v>=t;--v){var x=I.scaledTo(v);if(a[x.key])break;if(a[x.key]=!0,!(y=this.getTile(x))&&h&&(y=this._addTile(x)),y&&(i[x.key]=x,h=y.wasRequested(),y.hasData()))break}}}return i},n.prototype._updateLoadedParentTileCache=function(){for(var r in this._loadedParentTiles={},this._tiles){for(var e=[],n=void 0,i=this._tiles[r].tileID;i.overscaledZ>0;){if(i.key in this._loadedParentTiles){n=this._loadedParentTiles[i.key];break}e.push(i.key);var a=i.scaledTo(i.overscaledZ-1);if(n=this._getLoadedTile(a))break;i=a}for(var t=0,o=e;t0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},n.prototype.clearTiles=function(){for(var r in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(r);this._cache.reset()},n.prototype.tilesIn=function(e,n,i){var a=this,t=[],o=this.transform;if(!o)return t;for(var c=i?o.getCameraQueryGeometry(e):e,u=e.map((function(r){return o.pointCoordinate(r)})),d=c.map((function(r){return o.pointCoordinate(r)})),s=this.getIds(),l=1/0,m=1/0,p=-1/0,I=-1/0,y=0,f=d;y=0&&g[1].y+f>=0){var _=u.map((function(r){return c.getTilePoint(r)})),h=d.map((function(r){return c.getTilePoint(r)}));t.push({tile:i,tileID:c,queryGeometry:_,cameraQueryGeometry:h,scale:y})}}},h=0;h=r.browser.now())return!0}return!1},n.prototype.setFeatureState=function(r,e,n){r=r||"_geojsonTileLayer",this._state.updateState(r,e,n)},n.prototype.removeFeatureState=function(r,e,n){r=r||"_geojsonTileLayer",this._state.removeFeatureState(r,e,n)},n.prototype.getFeatureState=function(r,e){return r=r||"_geojsonTileLayer",this._state.getState(r,e)},n.prototype.setDependencies=function(r,e,n){var i=this._tiles[r];i&&i.setDependencies(e,n)},n.prototype.reloadTilesForDependencies=function(r,e){for(var n in this._tiles)this._tiles[n].hasDependency(r,e)&&this._reloadTile(n,"reloading");this._cache.filter((function(n){return!n.hasDependency(r,e)}))},n}(r.Evented);function Xr(r,e){var n=Math.abs(2*r.wrap)-+(r.wrap<0),i=Math.abs(2*e.wrap)-+(e.wrap<0);return r.overscaledZ-e.overscaledZ||i-n||e.canonical.y-r.canonical.y||e.canonical.x-r.canonical.x}function Qr(r){return"raster"===r||"image"===r||"video"===r}function $r(){return new r.window.Worker(Ic.workerUrl)}Yr.maxOverzooming=10,Yr.maxUnderzooming=3;var re="mapboxgl_preloaded_worker_pool",ee=function(){this.active={}};ee.prototype.acquire=function(r){if(!this.workers)for(this.workers=[];this.workers.length0?(a-o)/c:0;return this.points[t].mult(1-u).add(this.points[n].mult(u))};var Pe=function(r,e,n){var i=this.boxCells=[],a=this.circleCells=[];this.xCellCount=Math.ceil(r/n),this.yCellCount=Math.ceil(e/n);for(var t=0;t=-e[0]&&n<=e[0]&&i>=-e[1]&&i<=e[1]}function Me(e,n,i,a,t,o,c,u){var d=a?e.textSizeData:e.iconSizeData,s=r.evaluateSizeForZoom(d,i.transform.zoom),l=[256/i.width*2+1,256/i.height*2+1],m=a?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;m.clear();for(var p=e.lineVertexArray,I=a?e.text.placedSymbolArray:e.icon.placedSymbolArray,y=i.transform.width/i.transform.height,f=!1,g=0;gMath.abs(i.x-n.x)*a?{useVertical:!0}:(e===r.WritingMode.vertical?n.yi.x)?{needsFlipping:!0}:null}function Fe(e,n,i,a,t,o,c,u,d,s,l,m,p,I){var y,f=n/24,g=e.lineOffsetX*f,_=e.lineOffsetY*f;if(e.numGlyphs>1){var h=e.glyphStartIndex+e.numGlyphs,v=e.lineStartIndex,x=e.lineStartIndex+e.lineLength,P=Be(f,u,g,_,i,l,m,e,d,o,p);if(!P)return{notEnoughRoom:!0};var G=Se(P.first.point,c).point,C=Se(P.last.point,c).point;if(a&&!i){var S=ke(e.writingMode,G,C,I);if(S)return S}y=[P.first];for(var A=e.glyphStartIndex+1;A0?k.point:ze(m,B,b,1,t),z=ke(e.writingMode,b,F,I);if(z)return z}var w=we(f*u.getoffsetX(e.glyphStartIndex),g,_,i,l,m,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,d,o,p);if(!w)return{notEnoughRoom:!0};y=[w]}for(var R=0,E=y;R0?1:-1,y=0;a&&(I*=-1,y=Math.PI),I<0&&(y+=Math.PI);for(var f=I>0?u+c:u+c+1,g=t,_=t,h=0,v=0,x=Math.abs(p),P=[];h+v<=x;){if((f+=I)=d)return null;if(_=g,P.push(g),void 0===(g=m[f])){var G=new r.Point(s.getx(f),s.gety(f)),C=Se(G,l);if(C.signedDistanceFromCamera>0)g=m[f]=C.point;else{var S=f-I;g=ze(0===h?o:new r.Point(s.getx(S),s.gety(S)),G,_,x-h+1,l)}}h+=v,v=_.dist(g)}var A=(x-h)/v,b=g.sub(_),M=b.mult(A)._add(_);M._add(b._unit()._perp()._mult(i*I));var B=y+Math.atan2(g.y-_.y,g.x-_.x);return P.push(M),{point:M,angle:B,path:P}}Pe.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Pe.prototype.insert=function(r,e,n,i,a){this._forEachCell(e,n,i,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(r),this.bboxes.push(e),this.bboxes.push(n),this.bboxes.push(i),this.bboxes.push(a)},Pe.prototype.insertCircle=function(r,e,n,i){this._forEachCell(e-i,n-i,e+i,n+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(r),this.circles.push(e),this.circles.push(n),this.circles.push(i)},Pe.prototype._insertBoxCell=function(r,e,n,i,a,t){this.boxCells[a].push(t)},Pe.prototype._insertCircleCell=function(r,e,n,i,a,t){this.circleCells[a].push(t)},Pe.prototype._query=function(r,e,n,i,a,t){if(n<0||r>this.width||i<0||e>this.height)return!a&&[];var o=[];if(r<=0&&e<=0&&this.width<=n&&this.height<=i){if(a)return!0;for(var c=0;c0:o},Pe.prototype._queryCircle=function(r,e,n,i,a){var t=r-n,o=r+n,c=e-n,u=e+n;if(o<0||t>this.width||u<0||c>this.height)return!i&&[];var d=[],s={hitTest:i,circle:{x:r,y:e,radius:n},seenUids:{box:{},circle:{}}};return this._forEachCell(t,c,o,u,this._queryCellCircle,d,s,a),i?d.length>0:d},Pe.prototype.query=function(r,e,n,i,a){return this._query(r,e,n,i,!1,a)},Pe.prototype.hitTest=function(r,e,n,i,a){return this._query(r,e,n,i,!0,a)},Pe.prototype.hitTestCircle=function(r,e,n,i){return this._queryCircle(r,e,n,!0,i)},Pe.prototype._queryCell=function(r,e,n,i,a,t,o,c){var u=o.seenUids,d=this.boxCells[a];if(null!==d)for(var s=this.bboxes,l=0,m=d;l=s[I+0]&&i>=s[I+1]&&(!c||c(this.boxKeys[p]))){if(o.hitTest)return t.push(!0),!0;t.push({key:this.boxKeys[p],x1:s[I],y1:s[I+1],x2:s[I+2],y2:s[I+3]})}}}var y=this.circleCells[a];if(null!==y)for(var f=this.circles,g=0,_=y;g<_.length;g+=1){var h=_[g];if(!u.circle[h]){u.circle[h]=!0;var v=3*h;if(this._circleAndRectCollide(f[v],f[v+1],f[v+2],r,e,n,i)&&(!c||c(this.circleKeys[h]))){if(o.hitTest)return t.push(!0),!0;var x=f[v],P=f[v+1],G=f[v+2];t.push({key:this.circleKeys[h],x1:x-G,y1:P-G,x2:x+G,y2:P+G})}}}},Pe.prototype._queryCellCircle=function(r,e,n,i,a,t,o,c){var u=o.circle,d=o.seenUids,s=this.boxCells[a];if(null!==s)for(var l=this.bboxes,m=0,p=s;mo*o+c*c},Pe.prototype._circleAndRectCollide=function(r,e,n,i,a,t,o){var c=(t-i)/2,u=Math.abs(r-(i+c));if(u>c+n)return!1;var d=(o-a)/2,s=Math.abs(e-(a+d));if(s>d+n)return!1;if(u<=c||s<=d)return!0;var l=u-c,m=s-d;return l*l+m*m<=n*n};var Re=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ee(r,e){for(var n=0;n=1;z--)F.push(B.path[z]);for(var w=1;w0){for(var T=F[0].clone(),D=F[0].clone(),J=1;J=A.x&&D.x<=b.x&&T.y>=A.y&&D.y<=b.y?[F]:D.xb.x||D.yb.y?[]:r.clipLine([F],A.x,A.y,b.x,b.y)}for(var U=0,H=N;U=this.screenRightBoundary||ithis.screenBottomBoundary},De.prototype.isInsideGrid=function(r,e,n,i){return n>=0&&r=0&&e0?(this.prevPlacement&&this.prevPlacement.variableOffsets[l.crossTileID]&&this.prevPlacement.placements[l.crossTileID]&&this.prevPlacement.placements[l.crossTileID].text&&(y=this.prevPlacement.variableOffsets[l.crossTileID].anchor),this.variableOffsets[l.crossTileID]={textOffset:f,width:n,height:i,anchor:r,textBoxScale:a,prevAnchor:y},this.markUsedJustification(m,r,l,p),m.allowVerticalPlacement&&(this.markUsedOrientation(m,p,l),this.placedOrientations[l.crossTileID]=p),{shift:g,placedGlyphBoxes:_}):void 0},Ze.prototype.placeLayerBucketPart=function(e,n,i){var a=this,t=e.parameters,o=t.bucket,c=t.layout,u=t.posMatrix,d=t.textLabelPlaneMatrix,s=t.labelToScreenMatrix,l=t.textPixelRatio,m=t.holdingForFade,p=t.collisionBoxArray,I=t.partiallyEvaluatedTextSize,y=t.collisionGroup,f=c.get("text-optional"),g=c.get("icon-optional"),_=c.get("text-allow-overlap"),h=c.get("icon-allow-overlap"),v="map"===c.get("text-rotation-alignment"),x="map"===c.get("text-pitch-alignment"),P="none"!==c.get("icon-text-fit"),G="viewport-y"===c.get("symbol-z-order"),C=_&&(h||!o.hasIconData()||g),S=h&&(_||!o.hasTextData()||f);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var A=function(e,t){if(!n[e.crossTileID])if(m)a.placements[e.crossTileID]=new Le(!1,!1,!1);else{var p=!1,G=!1,A=!0,b=null,M={box:null,offscreen:null},B={box:null,offscreen:null},k=null,F=null,z=null,w=0,R=0,E=0;t.textFeatureIndex?w=t.textFeatureIndex:e.useRuntimeCollisionCircles&&(w=e.featureIndex),t.verticalTextFeatureIndex&&(R=t.verticalTextFeatureIndex);var N=t.textBox;if(N){var T=function(n){var i=r.WritingMode.horizontal;if(o.allowVerticalPlacement&&!n&&a.prevPlacement){var t=a.prevPlacement.placedOrientations[e.crossTileID];t&&(a.placedOrientations[e.crossTileID]=t,i=t,a.markUsedOrientation(o,i,e))}return i},D=function(n,i){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&t.verticalTextBox)for(var a=0,c=o.writingModes;a0&&(J=J.filter((function(r){return r!==U.anchor}))).unshift(U.anchor)}var H=function(r,n,i){for(var t=r.x2-r.x1,c=r.y2-r.y1,d=e.textBoxScale,s=P&&!h?n:null,m={box:[],offscreen:!1},I=_?2*J.length:J.length,f=0;f=J.length,C=a.attemptAnchorPlacement(g,r,t,c,d,v,x,l,u,y,G,e,o,i,s);if(C&&(m=C.placedGlyphBoxes)&&m.box&&m.box.length){p=!0,b=C.shift;break}}return m};D((function(){return H(N,t.iconBox,r.WritingMode.horizontal)}),(function(){var n=t.verticalTextBox,i=M&&M.box&&M.box.length;return o.allowVerticalPlacement&&!i&&e.numVerticalGlyphVertices>0&&n?H(n,t.verticalIconBox,r.WritingMode.vertical):{box:null,offscreen:null}})),M&&(p=M.box,A=M.offscreen);var L=T(M&&M.box);if(!p&&a.prevPlacement){var O=a.prevPlacement.variableOffsets[e.crossTileID];O&&(a.variableOffsets[e.crossTileID]=O,a.markUsedJustification(o,O.anchor,e,L))}}else{var K=function(r,n){var i=a.collisionIndex.placeCollisionBox(r,_,l,u,y.predicate);return i&&i.box&&i.box.length&&(a.markUsedOrientation(o,n,e),a.placedOrientations[e.crossTileID]=n),i};D((function(){return K(N,r.WritingMode.horizontal)}),(function(){var n=t.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&n?K(n,r.WritingMode.vertical):{box:null,offscreen:null}})),T(M&&M.box&&M.box.length)}}if(p=(k=M)&&k.box&&k.box.length>0,A=k&&k.offscreen,e.useRuntimeCollisionCircles){var V=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),j=r.evaluateSizeForFeature(o.textSizeData,I,V),W=c.get("text-padding"),Z=e.collisionCircleDiameter;F=a.collisionIndex.placeCollisionCircles(_,V,o.lineVertexArray,o.glyphOffsetArray,j,u,d,s,i,x,y.predicate,Z,W),p=_||F.circles.length>0&&!F.collisionDetected,A=A&&F.offscreen}if(t.iconFeatureIndex&&(E=t.iconFeatureIndex),t.iconBox){var q=function(r){var e=P&&b?We(r,b.x,b.y,v,x,a.transform.angle):r;return a.collisionIndex.placeCollisionBox(e,h,l,u,y.predicate)};G=B&&B.box&&B.box.length&&t.verticalIconBox?(z=q(t.verticalIconBox)).box.length>0:(z=q(t.iconBox)).box.length>0,A=A&&z.offscreen}var Y=f||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,X=g||0===e.numIconVertices;if(Y||X?X?Y||(G=G&&p):p=G&&p:G=p=G&&p,p&&k&&k.box&&(B&&B.box&&R?a.collisionIndex.insertCollisionBox(k.box,c.get("text-ignore-placement"),o.bucketInstanceId,R,y.ID):a.collisionIndex.insertCollisionBox(k.box,c.get("text-ignore-placement"),o.bucketInstanceId,w,y.ID)),G&&z&&a.collisionIndex.insertCollisionBox(z.box,c.get("icon-ignore-placement"),o.bucketInstanceId,E,y.ID),F&&(p&&a.collisionIndex.insertCollisionCircles(F.circles,c.get("text-ignore-placement"),o.bucketInstanceId,w,y.ID),i)){var Q=o.bucketInstanceId,$=a.collisionCircleArrays[Q];void 0===$&&($=a.collisionCircleArrays[Q]=new Oe);for(var rr=0;rr=0;--M){var B=b[M];A(o.symbolInstances.get(B),o.collisionArrays[B])}else for(var k=e.symbolInstanceStart;k=0&&(e.text.placedSymbolArray.get(d).crossTileID=t>=0&&d!==t?0:i.crossTileID)}},Ze.prototype.markUsedOrientation=function(e,n,i){for(var a=n===r.WritingMode.horizontal||n===r.WritingMode.horizontalOnly?n:0,t=n===r.WritingMode.vertical?n:0,o=0,c=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];o0||u>0,h=t.numIconVertices>0,v=a.placedOrientations[t.crossTileID],x=v===r.WritingMode.vertical,P=v===r.WritingMode.horizontal||v===r.WritingMode.horizontalOnly;if(_){var G=an(g.text),C=x?tn:G;I(e.text,c,C);var S=P?tn:G;I(e.text,u,S);var A=g.text.isHidden();[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex].forEach((function(r){r>=0&&(e.text.placedSymbolArray.get(r).hidden=A||x?1:0)})),t.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(t.verticalPlacedTextSymbolIndex).hidden=A||P?1:0);var b=a.variableOffsets[t.crossTileID];b&&a.markUsedJustification(e,b.anchor,t,v);var M=a.placedOrientations[t.crossTileID];M&&(a.markUsedJustification(e,"left",t,M),a.markUsedOrientation(e,M,t))}if(h){var B=an(g.icon),k=!(m&&t.verticalPlacedIconSymbolIndex&&x);if(t.placedIconSymbolIndex>=0){var F=k?B:tn;I(e.icon,t.numIconVertices,F),e.icon.placedSymbolArray.get(t.placedIconSymbolIndex).hidden=g.icon.isHidden()}if(t.verticalPlacedIconSymbolIndex>=0){var z=k?tn:B;I(e.icon,t.numVerticalIconVertices,z),e.icon.placedSymbolArray.get(t.verticalPlacedIconSymbolIndex).hidden=g.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var w=e.collisionArrays[i];if(w){var R=new r.Point(0,0);if(w.textBox||w.verticalTextBox){var E=!0;if(d){var N=a.variableOffsets[y];N?(R=je(N.anchor,N.width,N.height,N.textOffset,N.textBoxScale),s&&R._rotate(l?a.transform.angle:-a.transform.angle)):E=!1}w.textBox&&qe(e.textCollisionBox.collisionVertexArray,g.text.placed,!E||x,R.x,R.y),w.verticalTextBox&&qe(e.textCollisionBox.collisionVertexArray,g.text.placed,!E||P,R.x,R.y)}var T=Boolean(!P&&w.verticalIconBox);w.iconBox&&qe(e.iconCollisionBox.collisionVertexArray,g.icon.placed,T,m?R.x:0,m?R.y:0),w.verticalIconBox&&qe(e.iconCollisionBox.collisionVertexArray,g.icon.placed,!T,m?R.x:0,m?R.y:0)}}},f=0;fr},Ze.prototype.setStale=function(){this.stale=!0};var Ye=Math.pow(2,25),Xe=Math.pow(2,24),Qe=Math.pow(2,17),$e=Math.pow(2,16),rn=Math.pow(2,9),en=Math.pow(2,8),nn=Math.pow(2,1);function an(r){if(0===r.opacity&&!r.placed)return 0;if(1===r.opacity&&r.placed)return 4294967295;var e=r.placed?1:0,n=Math.floor(127*r.opacity);return n*Ye+e*Xe+n*Qe+e*$e+n*rn+e*en+n*nn+e}var tn=0,on=function(r){this._sortAcrossTiles="viewport-y"!==r.layout.get("symbol-z-order")&&void 0!==r.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};on.prototype.continuePlacement=function(r,e,n,i,a){for(var t=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var c=n[e[this._currentPlacementIndex]],u=this.placement.collisionIndex.transform.zoom;if("symbol"===c.type&&(!c.minzoom||c.minzoom<=u)&&(!c.maxzoom||c.maxzoom>u)){if(this._inProgressLayer||(this._inProgressLayer=new on(c)),this._inProgressLayer.continuePlacement(i[c.source],this.placement,this._showCollisionBoxes,c,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},cn.prototype.commit=function(r){return this.placement.commit(r),this.placement};var un=512/r.EXTENT/2,dn=function(r,e,n){this.tileID=r,this.indexedSymbolInstances={},this.bucketInstanceId=n;for(var i=0;ir.overscaledZ)for(var c in o){var u=o[c];u.tileID.isChildOf(r)&&u.findMatches(e.symbolInstances,r,a)}else{var d=o[r.scaledTo(Number(t)).key];d&&d.findMatches(e.symbolInstances,r,a)}}for(var s=0;s0)throw new Error("Unimplemented: "+a.map((function(r){return r.command})).join(", ")+".");return i.forEach((function(r){"setTransition"!==r.command&&n[r.command].apply(n,r.args)})),this.stylesheet=e,!0},n.prototype.addImage=function(e,n){if(this.getImage(e))return this.fire(new r.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,n),this._afterImageUpdated(e)},n.prototype.updateImage=function(r,e){this.imageManager.updateImage(r,e)},n.prototype.getImage=function(r){return this.imageManager.getImage(r)},n.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new r.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._afterImageUpdated(e)},n.prototype._afterImageUpdated=function(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new r.Event("data",{dataType:"style"}))},n.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},n.prototype.addSource=function(e,n,i){var a=this;if(void 0===i&&(i={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!n.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(n).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(n.type)>=0)||!this._validate(r.validateStyle.source,"sources."+e,n,null,i)){this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);var t=this.sourceCaches[e]=new Yr(e,n,this.dispatcher);t.style=this,t.setEventedParent(this,(function(){return{isSourceLoaded:a.loaded(),source:t.serialize(),sourceId:e}})),t.onAdd(this.map),this._changed=!0}},n.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var n in this._layers)if(this._layers[n].source===e)return this.fire(new r.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+n+'" is using it.')));var i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new r.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},n.prototype.setGeoJSONSourceData=function(r,e){this._checkLoaded(),this.sourceCaches[r].getSource().setData(e),this._changed=!0},n.prototype.getSource=function(r){return this.sourceCaches[r]&&this.sourceCaches[r].getSource()},n.prototype.addLayer=function(e,n,i){void 0===i&&(i={}),this._checkLoaded();var a=e.id;if(this.getLayer(a))this.fire(new r.ErrorEvent(new Error('Layer with id "'+a+'" already exists on this map')));else{var t;if("custom"===e.type){if(pn(this,r.validateCustomStyleLayer(e)))return;t=r.createStyleLayer(e)}else{if("object"===typeof e.source&&(this.addSource(a,e.source),e=r.clone$1(e),e=r.extend(e,{source:a})),this._validate(r.validateStyle.layer,"layers."+a,e,{arrayIndex:-1},i))return;t=r.createStyleLayer(e),this._validateLayer(t),t.setEventedParent(this,{layer:{id:a}}),this._serializedLayers[t.id]=t.serialize()}var o=n?this._order.indexOf(n):this._order.length;if(n&&-1===o)this.fire(new r.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.')));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=t,this._removedLayers[a]&&t.source&&"custom"!==t.type){var c=this._removedLayers[a];delete this._removedLayers[a],c.type!==t.type?this._updatedSources[t.source]="clear":(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause())}this._updateLayer(t),t.onAdd&&t.onAdd(this.map)}}},n.prototype.moveLayer=function(e,n){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==n){var i=this._order.indexOf(e);this._order.splice(i,1);var a=n?this._order.indexOf(n):this._order.length;n&&-1===a?this.fire(new r.ErrorEvent(new Error('Layer with id "'+n+'" does not exist on this map.'))):(this._order.splice(a,0,e),this._layerOrderChanged=!0)}}else this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},n.prototype.removeLayer=function(e){this._checkLoaded();var n=this._layers[e];if(n){n.setEventedParent(null);var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=n,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],n.onRemove&&n.onRemove(this.map)}else this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},n.prototype.getLayer=function(r){return this._layers[r]},n.prototype.hasLayer=function(r){return r in this._layers},n.prototype.setLayerZoomRange=function(e,n,i){this._checkLoaded();var a=this.getLayer(e);a?a.minzoom===n&&a.maxzoom===i||(null!=n&&(a.minzoom=n),null!=i&&(a.maxzoom=i),this._updateLayer(a)):this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},n.prototype.setFilter=function(e,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);if(a){if(!r.deepEqual(a.filter,n))return null===n||void 0===n?(a.filter=void 0,void this._updateLayer(a)):void(this._validate(r.validateStyle.filter,"layers."+a.id+".filter",n,null,i)||(a.filter=r.clone$1(n),this._updateLayer(a)))}else this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},n.prototype.getFilter=function(e){return r.clone$1(this.getLayer(e).filter)},n.prototype.setLayoutProperty=function(e,n,i,a){void 0===a&&(a={}),this._checkLoaded();var t=this.getLayer(e);t?r.deepEqual(t.getLayoutProperty(n),i)||(t.setLayoutProperty(n,i,a),this._updateLayer(t)):this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getLayoutProperty=function(e,n){var i=this.getLayer(e);if(i)return i.getLayoutProperty(n);this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},n.prototype.setPaintProperty=function(e,n,i,a){void 0===a&&(a={}),this._checkLoaded();var t=this.getLayer(e);t?r.deepEqual(t.getPaintProperty(n),i)||(t.setPaintProperty(n,i,a)&&this._updateLayer(t),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new r.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},n.prototype.getPaintProperty=function(r,e){return this.getLayer(r).getPaintProperty(e)},n.prototype.setFeatureState=function(e,n){this._checkLoaded();var i=e.source,a=e.sourceLayer,t=this.sourceCaches[i];if(void 0!==t){var o=t.getSource().type;"geojson"===o&&a?this.fire(new r.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||a?(void 0===e.id&&this.fire(new r.ErrorEvent(new Error("The feature id parameter must be provided."))),t.setFeatureState(a,e.id,n)):this.fire(new r.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new r.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},n.prototype.removeFeatureState=function(e,n){this._checkLoaded();var i=e.source,a=this.sourceCaches[i];if(void 0!==a){var t=a.getSource().type,o="vector"===t?e.sourceLayer:void 0;"vector"!==t||o?n&&"string"!==typeof e.id&&"number"!==typeof e.id?this.fire(new r.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):a.removeFeatureState(o,e.id,n):this.fire(new r.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new r.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},n.prototype.getFeatureState=function(e){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){if("vector"!==a.getSource().type||i)return void 0===e.id&&this.fire(new r.ErrorEvent(new Error("The feature id parameter must be provided."))),a.getFeatureState(i,e.id);this.fire(new r.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new r.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},n.prototype.getTransition=function(){return r.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},n.prototype.serialize=function(){return r.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:r.mapObject(this.sourceCaches,(function(r){return r.serialize()})),layers:this._serializeLayers(this._order)},(function(r){return void 0!==r}))},n.prototype._updateLayer=function(r){this._updatedLayers[r.id]=!0,r.source&&!this._updatedSources[r.source]&&"raster"!==this.sourceCaches[r.source].getSource().type&&(this._updatedSources[r.source]="reload",this.sourceCaches[r.source].pause()),this._changed=!0},n.prototype._flattenAndSortRenderedFeatures=function(r){for(var e=this,n=function(r){return"fill-extrusion"===e._layers[r].type},i={},a=[],t=this._order.length-1;t>=0;t--){var o=this._order[t];if(n(o)){i[o]=t;for(var c=0,u=r;c=0;I--){var y=this._order[I];if(n(y))for(var f=a.length-1;f>=0;f--){var g=a[f].feature;if(i[g.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",zn="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;}",wn="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",Rn="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",En="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",Nn="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",Tn="#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}",Dn="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);}",Jn="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}",Un="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;}",Hn="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}",Ln="uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 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\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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 tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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;}",On="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}",Kn="uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 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\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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 tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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);}",Vn="varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",jn="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;}",Wn="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\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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}",Zn="uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 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\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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 tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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;}",qn="#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 vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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}",Yn="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;}",Xn="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}",Qn="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;}",$n="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}",ri="\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);}",ei="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 vec2 v_uv;\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,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}",ni="\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);}",ii="uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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 pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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 tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;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 aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;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*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));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}",ai="\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;varying float v_width;\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 float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_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 lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_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);v_width=floorwidth;}",ti="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}",oi="\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);}",ci="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}",ui="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;}",di="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}",si="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;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;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;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_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} 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*max(a_minFontScale,fontScale)+a_pxoffset/16.0),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));}",li="#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}",mi="const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;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;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;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_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} 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+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;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=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}",pi="#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 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 fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;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}",Ii="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;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 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;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;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_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} 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=size/24.0;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 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.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}",yi=Hi("#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;}"),fi=Hi(hn,vn),gi=Hi(xn,Pn),_i=Hi(Gn,Cn),hi=Hi(Sn,An),vi=Hi(bn,Mn),xi=Hi(Bn,kn),Pi=Hi(Fn,zn),Gi=Hi(wn,Rn),Ci=Hi(En,Nn),Si=Hi(Tn,Dn),Ai=Hi(Jn,Un),bi=Hi(Hn,Ln),Mi=Hi(On,Kn),Bi=Hi(Vn,jn),ki=Hi(Wn,Zn),Fi=Hi(qn,Yn),zi=Hi(Xn,Qn),wi=Hi($n,ri),Ri=Hi(ei,ni),Ei=Hi(ii,ai),Ni=Hi(ti,oi),Ti=Hi(ci,ui),Di=Hi(di,si),Ji=Hi(li,mi),Ui=Hi(pi,Ii);function Hi(r,e){var n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i=e.match(/attribute ([\w]+) ([\w]+)/g),a=r.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),t=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=t?t.concat(a):a,c={};return{fragmentSource:r=r.replace(n,(function(r,e,n,i,a){return c[a]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nvarying "+n+" "+i+" "+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n"})),vertexSource:e=e.replace(n,(function(r,e,n,i,a){var t="float"===i?"vec2":"vec4",o=a.match(/color/)?"color":t;return c[a]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+n+" "+t+" a_"+a+";\nvarying "+n+" "+i+" "+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = a_"+a+";\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = unpack_mix_"+o+"(a_"+a+", u_"+a+"_t);\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+n+" "+t+" a_"+a+";\n#else\nuniform "+n+" "+i+" u_"+a+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = a_"+a+";\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+n+" "+i+" "+a+" = unpack_mix_"+o+"(a_"+a+", u_"+a+"_t);\n#else\n "+n+" "+i+" "+a+" = u_"+a+";\n#endif\n"})),staticAttributes:i,staticUniforms:o}}var Li=Object.freeze({__proto__:null,prelude:yi,background:fi,backgroundPattern:gi,circle:_i,clippingMask:hi,heatmap:vi,heatmapTexture:xi,collisionBox:Pi,collisionCircle:Gi,debug:Ci,fill:Si,fillOutline:Ai,fillOutlinePattern:bi,fillPattern:Mi,fillExtrusion:Bi,fillExtrusionPattern:ki,hillshadePrepare:Fi,hillshade:zi,line:wi,lineGradient:Ri,linePattern:Ei,lineSDF:Ni,raster:Ti,symbolIcon:Di,symbolSDF:Ji,symbolTextAndIcon:Ui}),Oi=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function Ki(r){for(var e=[],n=0;n>16,c>>16],u_pixel_coord_lower:[65535&o,65535&c]}}function Wi(r,e,n,i){var a=n.imageManager.getPattern(r.from.toString()),t=n.imageManager.getPattern(r.to.toString()),o=n.imageManager.getPixelSize(),c=o.width,u=o.height,d=Math.pow(2,i.tileID.overscaledZ),s=i.tileSize*Math.pow(2,n.transform.tileZoom)/d,l=s*(i.tileID.canonical.x+i.tileID.wrap*d),m=s*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:t.tl,u_pattern_br_b:t.br,u_texsize:[c,u],u_mix:e.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:t.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/Je(i,1,n.transform.tileZoom),u_pixel_coord_upper:[l>>16,m>>16],u_pixel_coord_lower:[65535&l,65535&m]}}Vi.prototype.draw=function(r,e,n,i,a,t,o,c,u,d,s,l,m,p,I,y){var f,g=r.gl;if(!this.failedToCreate){for(var _ in r.program.set(this.program),r.setDepthMode(n),r.setStencilMode(i),r.setColorMode(a),r.setCullFace(t),this.fixedUniforms)this.fixedUniforms[_].set(o[_]);p&&p.setUniforms(r,this.binderUniforms,l,{zoom:m});for(var h=(f={},f[g.LINES]=2,f[g.TRIANGLES]=3,f[g.LINE_STRIP]=1,f)[e],v=0,x=s.get();v0?1/(1-r):1+r}function ha(r){return r>0?1-1/(1.001-r):-r}var va,xa=function(r,e,n,i,a,t,o,c,u,d){var s=a.transform;return{u_is_size_zoom_constant:+("constant"===r||"source"===r),u_is_size_feature_constant:+("constant"===r||"camera"===r),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:s.cameraToCenterDistance,u_pitch:s.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:s.width/s.height,u_fade_change:a.options.fadeDuration?a.symbolFadeChange:1,u_matrix:t,u_label_plane_matrix:o,u_coord_matrix:c,u_is_text:+u,u_pitch_with_map:+i,u_texsize:d,u_texture:0}},Pa=function(e,n,i,a,t,o,c,u,d,s,l){var m=t.transform;return r.extend(xa(e,n,i,a,t,o,c,u,d,s),{u_gamma_scale:a?Math.cos(m._pitch)*m.cameraToCenterDistance:1,u_device_pixel_ratio:r.browser.devicePixelRatio,u_is_halo:+l})},Ga=function(e,n,i,a,t,o,c,u,d,s){return r.extend(Pa(e,n,i,a,t,o,c,u,!0,d,!0),{u_texsize_icon:s,u_texture_icon:1})},Ca=function(r,e,n){return{u_matrix:r,u_opacity:e,u_color:n}},Sa=function(e,n,i,a,t,o){return r.extend(Wi(a,o,i,t),{u_matrix:e,u_opacity:n})},Aa={fillExtrusion:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_lightpos:new r.Uniform3f(e,n.u_lightpos),u_lightintensity:new r.Uniform1f(e,n.u_lightintensity),u_lightcolor:new r.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new r.Uniform1f(e,n.u_vertical_gradient),u_opacity:new r.Uniform1f(e,n.u_opacity)}},fillExtrusionPattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_lightpos:new r.Uniform3f(e,n.u_lightpos),u_lightintensity:new r.Uniform1f(e,n.u_lightintensity),u_lightcolor:new r.Uniform3f(e,n.u_lightcolor),u_vertical_gradient:new r.Uniform1f(e,n.u_vertical_gradient),u_height_factor:new r.Uniform1f(e,n.u_height_factor),u_image:new r.Uniform1i(e,n.u_image),u_texsize:new r.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new r.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new r.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new r.Uniform3f(e,n.u_scale),u_fade:new r.Uniform1f(e,n.u_fade),u_opacity:new r.Uniform1f(e,n.u_opacity)}},fill:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix)}},fillPattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_image:new r.Uniform1i(e,n.u_image),u_texsize:new r.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new r.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new r.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new r.Uniform3f(e,n.u_scale),u_fade:new r.Uniform1f(e,n.u_fade)}},fillOutline:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_world:new r.Uniform2f(e,n.u_world)}},fillOutlinePattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_world:new r.Uniform2f(e,n.u_world),u_image:new r.Uniform1i(e,n.u_image),u_texsize:new r.Uniform2f(e,n.u_texsize),u_pixel_coord_upper:new r.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new r.Uniform2f(e,n.u_pixel_coord_lower),u_scale:new r.Uniform3f(e,n.u_scale),u_fade:new r.Uniform1f(e,n.u_fade)}},circle:function(e,n){return{u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_scale_with_map:new r.Uniform1i(e,n.u_scale_with_map),u_pitch_with_map:new r.Uniform1i(e,n.u_pitch_with_map),u_extrude_scale:new r.Uniform2f(e,n.u_extrude_scale),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_matrix:new r.UniformMatrix4f(e,n.u_matrix)}},collisionBox:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_pixels_to_tile_units:new r.Uniform1f(e,n.u_pixels_to_tile_units),u_extrude_scale:new r.Uniform2f(e,n.u_extrude_scale),u_overscale_factor:new r.Uniform1f(e,n.u_overscale_factor)}},collisionCircle:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_inv_matrix:new r.UniformMatrix4f(e,n.u_inv_matrix),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_viewport_size:new r.Uniform2f(e,n.u_viewport_size)}},debug:function(e,n){return{u_color:new r.UniformColor(e,n.u_color),u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_overlay:new r.Uniform1i(e,n.u_overlay),u_overlay_scale:new r.Uniform1f(e,n.u_overlay_scale)}},clippingMask:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix)}},heatmap:function(e,n){return{u_extrude_scale:new r.Uniform1f(e,n.u_extrude_scale),u_intensity:new r.Uniform1f(e,n.u_intensity),u_matrix:new r.UniformMatrix4f(e,n.u_matrix)}},heatmapTexture:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_world:new r.Uniform2f(e,n.u_world),u_image:new r.Uniform1i(e,n.u_image),u_color_ramp:new r.Uniform1i(e,n.u_color_ramp),u_opacity:new r.Uniform1f(e,n.u_opacity)}},hillshade:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_image:new r.Uniform1i(e,n.u_image),u_latrange:new r.Uniform2f(e,n.u_latrange),u_light:new r.Uniform2f(e,n.u_light),u_shadow:new r.UniformColor(e,n.u_shadow),u_highlight:new r.UniformColor(e,n.u_highlight),u_accent:new r.UniformColor(e,n.u_accent)}},hillshadePrepare:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_image:new r.Uniform1i(e,n.u_image),u_dimension:new r.Uniform2f(e,n.u_dimension),u_zoom:new r.Uniform1f(e,n.u_zoom),u_unpack:new r.Uniform4f(e,n.u_unpack)}},line:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_ratio:new r.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new r.Uniform2f(e,n.u_units_to_pixels)}},lineGradient:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_ratio:new r.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new r.Uniform2f(e,n.u_units_to_pixels),u_image:new r.Uniform1i(e,n.u_image),u_image_height:new r.Uniform1f(e,n.u_image_height)}},linePattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_texsize:new r.Uniform2f(e,n.u_texsize),u_ratio:new r.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_image:new r.Uniform1i(e,n.u_image),u_units_to_pixels:new r.Uniform2f(e,n.u_units_to_pixels),u_scale:new r.Uniform3f(e,n.u_scale),u_fade:new r.Uniform1f(e,n.u_fade)}},lineSDF:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_ratio:new r.Uniform1f(e,n.u_ratio),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_units_to_pixels:new r.Uniform2f(e,n.u_units_to_pixels),u_patternscale_a:new r.Uniform2f(e,n.u_patternscale_a),u_patternscale_b:new r.Uniform2f(e,n.u_patternscale_b),u_sdfgamma:new r.Uniform1f(e,n.u_sdfgamma),u_image:new r.Uniform1i(e,n.u_image),u_tex_y_a:new r.Uniform1f(e,n.u_tex_y_a),u_tex_y_b:new r.Uniform1f(e,n.u_tex_y_b),u_mix:new r.Uniform1f(e,n.u_mix)}},raster:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_tl_parent:new r.Uniform2f(e,n.u_tl_parent),u_scale_parent:new r.Uniform1f(e,n.u_scale_parent),u_buffer_scale:new r.Uniform1f(e,n.u_buffer_scale),u_fade_t:new r.Uniform1f(e,n.u_fade_t),u_opacity:new r.Uniform1f(e,n.u_opacity),u_image0:new r.Uniform1i(e,n.u_image0),u_image1:new r.Uniform1i(e,n.u_image1),u_brightness_low:new r.Uniform1f(e,n.u_brightness_low),u_brightness_high:new r.Uniform1f(e,n.u_brightness_high),u_saturation_factor:new r.Uniform1f(e,n.u_saturation_factor),u_contrast_factor:new r.Uniform1f(e,n.u_contrast_factor),u_spin_weights:new r.Uniform3f(e,n.u_spin_weights)}},symbolIcon:function(e,n){return{u_is_size_zoom_constant:new r.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new r.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new r.Uniform1f(e,n.u_size_t),u_size:new r.Uniform1f(e,n.u_size),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new r.Uniform1f(e,n.u_pitch),u_rotate_symbol:new r.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new r.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new r.Uniform1f(e,n.u_fade_change),u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new r.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new r.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new r.Uniform1i(e,n.u_is_text),u_pitch_with_map:new r.Uniform1i(e,n.u_pitch_with_map),u_texsize:new r.Uniform2f(e,n.u_texsize),u_texture:new r.Uniform1i(e,n.u_texture)}},symbolSDF:function(e,n){return{u_is_size_zoom_constant:new r.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new r.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new r.Uniform1f(e,n.u_size_t),u_size:new r.Uniform1f(e,n.u_size),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new r.Uniform1f(e,n.u_pitch),u_rotate_symbol:new r.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new r.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new r.Uniform1f(e,n.u_fade_change),u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new r.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new r.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new r.Uniform1i(e,n.u_is_text),u_pitch_with_map:new r.Uniform1i(e,n.u_pitch_with_map),u_texsize:new r.Uniform2f(e,n.u_texsize),u_texture:new r.Uniform1i(e,n.u_texture),u_gamma_scale:new r.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new r.Uniform1i(e,n.u_is_halo)}},symbolTextAndIcon:function(e,n){return{u_is_size_zoom_constant:new r.Uniform1i(e,n.u_is_size_zoom_constant),u_is_size_feature_constant:new r.Uniform1i(e,n.u_is_size_feature_constant),u_size_t:new r.Uniform1f(e,n.u_size_t),u_size:new r.Uniform1f(e,n.u_size),u_camera_to_center_distance:new r.Uniform1f(e,n.u_camera_to_center_distance),u_pitch:new r.Uniform1f(e,n.u_pitch),u_rotate_symbol:new r.Uniform1i(e,n.u_rotate_symbol),u_aspect_ratio:new r.Uniform1f(e,n.u_aspect_ratio),u_fade_change:new r.Uniform1f(e,n.u_fade_change),u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_label_plane_matrix:new r.UniformMatrix4f(e,n.u_label_plane_matrix),u_coord_matrix:new r.UniformMatrix4f(e,n.u_coord_matrix),u_is_text:new r.Uniform1i(e,n.u_is_text),u_pitch_with_map:new r.Uniform1i(e,n.u_pitch_with_map),u_texsize:new r.Uniform2f(e,n.u_texsize),u_texsize_icon:new r.Uniform2f(e,n.u_texsize_icon),u_texture:new r.Uniform1i(e,n.u_texture),u_texture_icon:new r.Uniform1i(e,n.u_texture_icon),u_gamma_scale:new r.Uniform1f(e,n.u_gamma_scale),u_device_pixel_ratio:new r.Uniform1f(e,n.u_device_pixel_ratio),u_is_halo:new r.Uniform1i(e,n.u_is_halo)}},background:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_opacity:new r.Uniform1f(e,n.u_opacity),u_color:new r.UniformColor(e,n.u_color)}},backgroundPattern:function(e,n){return{u_matrix:new r.UniformMatrix4f(e,n.u_matrix),u_opacity:new r.Uniform1f(e,n.u_opacity),u_image:new r.Uniform1i(e,n.u_image),u_pattern_tl_a:new r.Uniform2f(e,n.u_pattern_tl_a),u_pattern_br_a:new r.Uniform2f(e,n.u_pattern_br_a),u_pattern_tl_b:new r.Uniform2f(e,n.u_pattern_tl_b),u_pattern_br_b:new r.Uniform2f(e,n.u_pattern_br_b),u_texsize:new r.Uniform2f(e,n.u_texsize),u_mix:new r.Uniform1f(e,n.u_mix),u_pattern_size_a:new r.Uniform2f(e,n.u_pattern_size_a),u_pattern_size_b:new r.Uniform2f(e,n.u_pattern_size_b),u_scale_a:new r.Uniform1f(e,n.u_scale_a),u_scale_b:new r.Uniform1f(e,n.u_scale_b),u_pixel_coord_upper:new r.Uniform2f(e,n.u_pixel_coord_upper),u_pixel_coord_lower:new r.Uniform2f(e,n.u_pixel_coord_lower),u_tile_units_to_pixels:new r.Uniform1f(e,n.u_tile_units_to_pixels)}}};function ba(e,n,i,a,t,o,c){for(var u=e.context,d=u.gl,s=e.useProgram("collisionBox"),l=[],m=0,p=0,I=0;I0){var x=r.create(),P=_;r.mul(x,g.placementInvProjMatrix,e.transform.glCoordMatrix),r.mul(x,x,g.placementViewportMatrix),l.push({circleArray:v,circleOffset:p,transform:P,invTransform:x}),p=m+=v.length/4}h&&s.draw(u,d.LINES,Dr.disabled,Hr.disabled,e.colorModeForRenderPass(),Zr.disabled,ea(_,e.transform,f),i.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,e.transform.zoom,null,null,h.collisionVertexBuffer)}}if(c&&l.length){var G=e.useProgram("collisionCircle"),C=new r.StructArrayLayout2f1f2i16;C.resize(4*m),C._trim();for(var S=0,A=0,b=l;A=0&&(y[g.associatedIconIndex]={shiftedAnchor:b,angle:M})}else Ee(g.numGlyphs,p)}if(l){I.clear();for(var k=e.icon.placedSymbolArray,F=0;F0){var c=r.browser.now(),u=(c-e.timeAdded)/o,d=n?(c-n.timeAdded)/o:-1,s=i.getSource(),l=t.coveringZoomLevel({tileSize:s.tileSize,roundZoom:s.roundZoom}),m=!n||Math.abs(n.tileID.overscaledZ-l)>Math.abs(e.tileID.overscaledZ-l),p=m&&e.refreshedUponExpiration?1:r.clamp(m?u:1-d,0,1);return e.refreshedUponExpiration&&u>=1&&(e.refreshedUponExpiration=!1),n?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}function Qa(r,e,n){var i=n.paint.get("background-color"),a=n.paint.get("background-opacity");if(0!==a){var t=r.context,o=t.gl,c=r.transform,u=c.tileSize,d=n.paint.get("background-pattern");if(!r.isPatternMissing(d)){var s=!d&&1===i.a&&1===a&&r.opaquePassEnabledForLayer()?"opaque":"translucent";if(r.renderPass===s){var l=Hr.disabled,m=r.depthModeForSublayer(0,"opaque"===s?Dr.ReadWrite:Dr.ReadOnly),p=r.colorModeForRenderPass(),I=r.useProgram(d?"backgroundPattern":"background"),y=c.coveringTiles({tileSize:u});d&&(t.activeTexture.set(o.TEXTURE0),r.imageManager.bind(r.context));for(var f=n.getCrossfadeParameters(),g=0,_=y;g<_.length;g+=1){var h=_[g],v=r.transform.calculatePosMatrix(h.toUnwrapped()),x=d?Sa(v,a,r,d,{tileID:h,tileSize:u},f):Ca(v,a,i);I.draw(t,o.TRIANGLES,m,l,p,Zr.disabled,x,n.id,r.tileExtentBuffer,r.quadTriangleIndexBuffer,r.tileExtentSegments)}}}}}var $a=new r.Color(1,0,0,1),rt=new r.Color(0,1,0,1),et=new r.Color(0,0,1,1),nt=new r.Color(1,0,1,1),it=new r.Color(0,1,1,1);function at(r){var e=r.transform.padding,n=3;ot(r,r.transform.height-(e.top||0),n,$a),ot(r,e.bottom||0,n,rt),ct(r,e.left||0,n,et),ct(r,r.transform.width-(e.right||0),n,nt);var i=r.transform.centerPoint;tt(r,i.x,r.transform.height-i.y,it)}function tt(r,e,n,i){var a=20,t=2;ut(r,e-t/2,n-a/2,t,a,i),ut(r,e-a/2,n-t/2,a,t,i)}function ot(r,e,n,i){ut(r,0,e+n/2,r.transform.width,n,i)}function ct(r,e,n,i){ut(r,e-n/2,0,n,r.transform.height,i)}function ut(e,n,i,a,t,o){var c=e.context,u=c.gl;u.enable(u.SCISSOR_TEST),u.scissor(n*r.browser.devicePixelRatio,i*r.browser.devicePixelRatio,a*r.browser.devicePixelRatio,t*r.browser.devicePixelRatio),c.clear({color:o}),u.disable(u.SCISSOR_TEST)}function dt(r,e,n){for(var i=0;i "+i.overscaledZ),lt(e,g+" "+I+"kb"),c.draw(a,t.TRIANGLES,u,d,Vr.alphaBlended,Zr.disabled,ia(o,r.Color.transparent,f),l,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}function lt(r,e){r.initDebugOverlayCanvas();var n=r.debugOverlayCanvas,i=r.context.gl,a=r.debugOverlayCanvas.getContext("2d");a.clearRect(0,0,n.width,n.height),a.shadowColor="white",a.shadowBlur=2,a.lineWidth=1.5,a.strokeStyle="white",a.textBaseline="top",a.font="bold 36px Open Sans, sans-serif",a.fillText(e,5,5),a.strokeText(e,5,5),r.debugOverlayTexture.update(n),r.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}function mt(r,e,n){var i=r.context,a=n.implementation;if("offscreen"===r.renderPass){var t=a.prerender;t&&(r.setCustomLayerDefaults(),i.setColorMode(r.colorModeForRenderPass()),t.call(a,i.gl,r.transform.customLayerMatrix()),i.setDirty(),r.setBaseState())}else if("translucent"===r.renderPass){r.setCustomLayerDefaults(),i.setColorMode(r.colorModeForRenderPass()),i.setStencilMode(Hr.disabled);var o="3d"===a.renderingMode?new Dr(r.context.gl.LEQUAL,Dr.ReadWrite,r.depthRangeFor3D):r.depthModeForSublayer(0,Dr.ReadOnly);i.setDepthMode(o),a.render(i.gl,r.transform.customLayerMatrix()),i.setDirty(),r.setBaseState(),i.bindFramebuffer.set(null)}}var pt={symbol:ka,circle:Ta,heatmap:Da,line:La,fill:Oa,"fill-extrusion":Va,hillshade:Wa,raster:Ya,background:Qa,debug:dt,custom:mt},It=function(r,e){this.context=new qr(r),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=Yr.maxUnderzooming+Yr.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new mn,this.gpuTimers={}};It.prototype.resize=function(e,n){if(this.width=e*r.browser.devicePixelRatio,this.height=n*r.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,a=this.style._order;i256&&this.clearStencil(),n.setColorMode(Vr.disabled),n.setDepthMode(Dr.disabled);var a=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var t=0,o=e;t256&&this.clearStencil();var r=this.nextStencilID++,e=this.context.gl;return new Hr({func:e.NOTEQUAL,mask:255},r,255,e.KEEP,e.KEEP,e.REPLACE)},It.prototype.stencilModeForClipping=function(r){var e=this.context.gl;return new Hr({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[r.key],0,e.KEEP,e.KEEP,e.REPLACE)},It.prototype.stencilConfigForOverlap=function(r){var e,n=this.context.gl,i=r.sort((function(r,e){return e.overscaledZ-r.overscaledZ})),a=i[i.length-1].overscaledZ,t=i[0].overscaledZ-a+1;if(t>1){this.currentStencilSource=void 0,this.nextStencilID+t>256&&this.clearStencil();for(var o={},c=0;c=0;this.currentLayer--){var P=this.style._layers[a[this.currentLayer]],G=t[P.source],C=s[P.source];this._renderTileClippingMasks(P,C),this.renderLayer(this,G,P,C)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},It.prototype.isPatternMissing=function(r){if(!r)return!1;if(!r.from||!r.to)return!0;var e=this.imageManager.getPattern(r.from.toString()),n=this.imageManager.getPattern(r.to.toString());return!e||!n},It.prototype.useProgram=function(r,e){this.cache=this.cache||{};var n=""+r+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[n]||(this.cache[n]=new Vi(this.context,r,Li[r],e,Aa[r],this._showOverdrawInspector)),this.cache[n]},It.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()},It.prototype.setBaseState=function(){var r=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(r.FUNC_ADD)},It.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=r.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new r.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},It.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var yt=function(r,e){this.points=r,this.planes=e};yt.fromInvProjectionMatrix=function(e,n,i){var a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],t=Math.pow(2,i),o=a.map((function(n){return r.transformMat4([],n,e)})).map((function(e){return r.scale$1([],e,1/e[3]/n*t)})),c=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var n=r.sub([],o[e[0]],o[e[1]]),i=r.sub([],o[e[2]],o[e[1]]),a=r.normalize([],r.cross([],n,i)),t=-r.dot(a,o[e[1]]);return a.concat(t)}));return new yt(o,c)};var ft=function(e,n){this.min=e,this.max=n,this.center=r.scale$2([],r.add([],this.min,this.max),.5)};ft.prototype.quadrant=function(e){for(var n=[e%2===0,e<2],i=r.clone$2(this.min),a=r.clone$2(this.max),t=0;t=0;if(0===o)return 0;o!==n.length&&(i=!1)}if(i)return 2;for(var u=0;u<3;u++){for(var d=Number.MAX_VALUE,s=-Number.MAX_VALUE,l=0;lthis.max[u]-this.min[u])return 0}return 1};var gt=function(r,e,n,i){if(void 0===r&&(r=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),isNaN(r)||r<0||isNaN(e)||e<0||isNaN(n)||n<0||isNaN(i)||i<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=r,this.bottom=e,this.left=n,this.right=i};gt.prototype.interpolate=function(e,n,i){return null!=n.top&&null!=e.top&&(this.top=r.number(e.top,n.top,i)),null!=n.bottom&&null!=e.bottom&&(this.bottom=r.number(e.bottom,n.bottom,i)),null!=n.left&&null!=e.left&&(this.left=r.number(e.left,n.left,i)),null!=n.right&&null!=e.right&&(this.right=r.number(e.right,n.right,i)),this},gt.prototype.getCenter=function(e,n){var i=r.clamp((this.left+e-this.right)/2,0,e),a=r.clamp((this.top+n-this.bottom)/2,0,n);return new r.Point(i,a)},gt.prototype.equals=function(r){return this.top===r.top&&this.bottom===r.bottom&&this.left===r.left&&this.right===r.right},gt.prototype.clone=function(){return new gt(this.top,this.bottom,this.left,this.right)},gt.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var _t=function(e,n,i,a,t){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===t||t,this._minZoom=e||0,this._maxZoom=n||22,this._minPitch=void 0===i||null===i?0:i,this._maxPitch=void 0===a||null===a?60:a,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new gt,this._posMatrixCache={},this._alignedPosMatrixCache={}},ht={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};function vt(r,e){var n=!1,i=null,a=function(){i=null,n&&(r(),i=setTimeout(a,e),n=!1)};return function(){return n=!0,i||a(),i}}_t.prototype.clone=function(){var r=new _t(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return r.tileSize=this.tileSize,r.latRange=this.latRange,r.width=this.width,r.height=this.height,r._center=this._center,r.zoom=this.zoom,r.angle=this.angle,r._fov=this._fov,r._pitch=this._pitch,r._unmodified=this._unmodified,r._edgeInsets=this._edgeInsets.clone(),r._calcMatrices(),r},ht.minZoom.get=function(){return this._minZoom},ht.minZoom.set=function(r){this._minZoom!==r&&(this._minZoom=r,this.zoom=Math.max(this.zoom,r))},ht.maxZoom.get=function(){return this._maxZoom},ht.maxZoom.set=function(r){this._maxZoom!==r&&(this._maxZoom=r,this.zoom=Math.min(this.zoom,r))},ht.minPitch.get=function(){return this._minPitch},ht.minPitch.set=function(r){this._minPitch!==r&&(this._minPitch=r,this.pitch=Math.max(this.pitch,r))},ht.maxPitch.get=function(){return this._maxPitch},ht.maxPitch.set=function(r){this._maxPitch!==r&&(this._maxPitch=r,this.pitch=Math.min(this.pitch,r))},ht.renderWorldCopies.get=function(){return this._renderWorldCopies},ht.renderWorldCopies.set=function(r){void 0===r?r=!0:null===r&&(r=!1),this._renderWorldCopies=r},ht.worldSize.get=function(){return this.tileSize*this.scale},ht.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},ht.size.get=function(){return new r.Point(this.width,this.height)},ht.bearing.get=function(){return-this.angle/Math.PI*180},ht.bearing.set=function(e){var n=-r.wrap(e,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=r.create$2(),r.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},ht.pitch.get=function(){return this._pitch/Math.PI*180},ht.pitch.set=function(e){var n=r.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())},ht.fov.get=function(){return this._fov/Math.PI*180},ht.fov.set=function(r){r=Math.max(.01,Math.min(60,r)),this._fov!==r&&(this._unmodified=!1,this._fov=r/180*Math.PI,this._calcMatrices())},ht.zoom.get=function(){return this._zoom},ht.zoom.set=function(r){var e=Math.min(Math.max(r,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},ht.center.get=function(){return this._center},ht.center.set=function(r){r.lat===this._center.lat&&r.lng===this._center.lng||(this._unmodified=!1,this._center=r,this._constrain(),this._calcMatrices())},ht.padding.get=function(){return this._edgeInsets.toJSON()},ht.padding.set=function(r){this._edgeInsets.equals(r)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,r,1),this._calcMatrices())},ht.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},_t.prototype.isPaddingEqual=function(r){return this._edgeInsets.equals(r)},_t.prototype.interpolatePadding=function(r,e,n){this._unmodified=!1,this._edgeInsets.interpolate(r,e,n),this._constrain(),this._calcMatrices()},_t.prototype.coveringZoomLevel=function(r){var e=(r.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/r.tileSize));return Math.max(0,e)},_t.prototype.getVisibleUnwrappedCoordinates=function(e){var n=[new r.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new r.Point(0,0)),a=this.pointCoordinate(new r.Point(this.width,0)),t=this.pointCoordinate(new r.Point(this.width,this.height)),o=this.pointCoordinate(new r.Point(0,this.height)),c=Math.floor(Math.min(i.x,a.x,t.x,o.x)),u=Math.floor(Math.max(i.x,a.x,t.x,o.x)),d=1,s=c-d;s<=u+d;s++)0!==s&&n.push(new r.UnwrappedTileID(s,e));return n},_t.prototype.coveringTiles=function(e){var n=this.coveringZoomLevel(e),i=n;if(void 0!==e.minzoom&&ne.maxzoom&&(n=e.maxzoom);var a=r.MercatorCoordinate.fromLngLat(this.center),t=Math.pow(2,n),o=[t*a.x,t*a.y,0],c=yt.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,n),u=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(u=n);var d=3,s=function(r){return{aabb:new ft([r*t,0,0],[(r+1)*t,t,0]),zoom:0,x:0,y:0,wrap:r,fullyVisible:!1}},l=[],m=[],p=n,I=e.reparseOverscaled?i:n;if(this._renderWorldCopies)for(var y=1;y<=3;y++)l.push(s(-y)),l.push(s(y));for(l.push(s(0));l.length>0;){var f=l.pop(),g=f.x,_=f.y,h=f.fullyVisible;if(!h){var v=f.aabb.intersects(c);if(0===v)continue;h=2===v}var x=f.aabb.distanceX(o),P=f.aabb.distanceY(o),G=Math.max(Math.abs(x),Math.abs(P)),C=d+(1<C&&f.zoom>=u)m.push({tileID:new r.OverscaledTileID(f.zoom===p?I:f.zoom,f.wrap,f.zoom,g,_),distanceSq:r.sqrLen([o[0]-.5-g,o[1]-.5-_])});else for(var S=0;S<4;S++){var A=(g<<1)+S%2,b=(_<<1)+(S>>1);l.push({aabb:f.aabb.quadrant(S),zoom:f.zoom+1,x:A,y:b,wrap:f.wrap,fullyVisible:h})}}return m.sort((function(r,e){return r.distanceSq-e.distanceSq})).map((function(r){return r.tileID}))},_t.prototype.resize=function(r,e){this.width=r,this.height=e,this.pixelsToGLUnits=[2/r,-2/e],this._constrain(),this._calcMatrices()},ht.unmodified.get=function(){return this._unmodified},_t.prototype.zoomScale=function(r){return Math.pow(2,r)},_t.prototype.scaleZoom=function(r){return Math.log(r)/Math.LN2},_t.prototype.project=function(e){var n=r.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new r.Point(r.mercatorXfromLng(e.lng)*this.worldSize,r.mercatorYfromLat(n)*this.worldSize)},_t.prototype.unproject=function(e){return new r.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},ht.point.get=function(){return this.project(this.center)},_t.prototype.setLocationAtPoint=function(e,n){var i=this.pointCoordinate(n),a=this.pointCoordinate(this.centerPoint),t=this.locationCoordinate(e),o=new r.MercatorCoordinate(t.x-(i.x-a.x),t.y-(i.y-a.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},_t.prototype.locationPoint=function(r){return this.coordinatePoint(this.locationCoordinate(r))},_t.prototype.pointLocation=function(r){return this.coordinateLocation(this.pointCoordinate(r))},_t.prototype.locationCoordinate=function(e){return r.MercatorCoordinate.fromLngLat(e)},_t.prototype.coordinateLocation=function(r){return r.toLngLat()},_t.prototype.pointCoordinate=function(e){var n=0,i=[e.x,e.y,0,1],a=[e.x,e.y,1,1];r.transformMat4(i,i,this.pixelMatrixInverse),r.transformMat4(a,a,this.pixelMatrixInverse);var t=i[3],o=a[3],c=i[0]/t,u=a[0]/o,d=i[1]/t,s=a[1]/o,l=i[2]/t,m=a[2]/o,p=l===m?0:(n-l)/(m-l);return new r.MercatorCoordinate(r.number(c,u,p)/this.worldSize,r.number(d,s,p)/this.worldSize)},_t.prototype.coordinatePoint=function(e){var n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return r.transformMat4(n,n,this.pixelMatrix),new r.Point(n[0]/n[3],n[1]/n[3])},_t.prototype.getBounds=function(){return(new r.LngLatBounds).extend(this.pointLocation(new r.Point(0,0))).extend(this.pointLocation(new r.Point(this.width,0))).extend(this.pointLocation(new r.Point(this.width,this.height))).extend(this.pointLocation(new r.Point(0,this.height)))},_t.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new r.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},_t.prototype.setMaxBounds=function(r){r?(this.lngRange=[r.getWest(),r.getEast()],this.latRange=[r.getSouth(),r.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},_t.prototype.calculatePosMatrix=function(e,n){void 0===n&&(n=!1);var i=e.key,a=n?this._alignedPosMatrixCache:this._posMatrixCache;if(a[i])return a[i];var t=e.canonical,o=this.worldSize/this.zoomScale(t.z),c=t.x+Math.pow(2,t.z)*e.wrap,u=r.identity(new Float64Array(16));return r.translate(u,u,[c*o,t.y*o,0]),r.scale(u,u,[o/r.EXTENT,o/r.EXTENT,1]),r.multiply(u,n?this.alignedProjMatrix:this.projMatrix,u),a[i]=new Float32Array(u),a[i]},_t.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},_t.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,n,i,a,t=-90,o=90,c=-180,u=180,d=this.size,s=this._unmodified;if(this.latRange){var l=this.latRange;t=r.mercatorYfromLat(l[1])*this.worldSize,e=(o=r.mercatorYfromLat(l[0])*this.worldSize)-to&&(a=o-f)}if(this.lngRange){var g=p.x,_=d.x/2;g-_u&&(i=u-_)}void 0===i&&void 0===a||(this.center=this.unproject(new r.Point(void 0!==i?i:p.x,void 0!==a?a:p.y))),this._unmodified=s,this._constraining=!1}},_t.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,n=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var i=Math.PI/2+this._pitch,a=this._fov*(.5+n.y/this.height),t=Math.sin(a)*this.cameraToCenterDistance/Math.sin(r.clamp(Math.PI-i-a,.01,Math.PI-.01)),o=this.point,c=o.x,u=o.y,d=1.01*(Math.cos(Math.PI/2-this._pitch)*t+this.cameraToCenterDistance),s=this.height/50,l=new Float64Array(16);r.perspective(l,this._fov,this.width/this.height,s,d),l[8]=2*-n.x/this.width,l[9]=2*n.y/this.height,r.scale(l,l,[1,-1,1]),r.translate(l,l,[0,0,-this.cameraToCenterDistance]),r.rotateX(l,l,this._pitch),r.rotateZ(l,l,this.angle),r.translate(l,l,[-c,-u,0]),this.mercatorMatrix=r.scale([],l,[this.worldSize,this.worldSize,this.worldSize]),r.scale(l,l,[1,1,r.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l,this.invProjMatrix=r.invert([],this.projMatrix);var m=this.width%2/2,p=this.height%2/2,I=Math.cos(this.angle),y=Math.sin(this.angle),f=c-Math.round(c)+I*m+y*p,g=u-Math.round(u)+I*p+y*m,_=new Float64Array(l);if(r.translate(_,_,[f>.5?f-1:f,g>.5?g-1:g,0]),this.alignedProjMatrix=_,l=r.create(),r.scale(l,l,[this.width/2,-this.height/2,1]),r.translate(l,l,[1,-1,0]),this.labelPlaneMatrix=l,l=r.create(),r.scale(l,l,[1,-1,1]),r.translate(l,l,[-1,-1,0]),r.scale(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=r.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(l=r.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this._posMatrixCache={},this._alignedPosMatrixCache={}}},_t.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new r.Point(0,0)),n=[e.x*this.worldSize,e.y*this.worldSize,0,1];return r.transformMat4(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance},_t.prototype.getCameraPoint=function(){var e=this._pitch,n=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.Point(0,n))},_t.prototype.getCameraQueryGeometry=function(e){var n=this.getCameraPoint();if(1===e.length)return[e[0],n];for(var i=n.x,a=n.y,t=n.x,o=n.y,c=0,u=e;c=3&&!r.some((function(r){return isNaN(r)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(r[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+r[2],+r[1]],zoom:+r[0],bearing:e,pitch:+(r[4]||0)}),!0}return!1},xt.prototype._updateHashUnthrottled=function(){var e=r.window.location.href.replace(/(#.+)?$/,this.getHashString());try{r.window.history.replaceState(r.window.history.state,null,e)}catch(n){}};var Pt={linearity:.3,easing:r.bezier(0,0,.3,1)},Gt=r.extend({deceleration:2500,maxSpeed:1400},Pt),Ct=r.extend({deceleration:20,maxSpeed:1400},Pt),St=r.extend({deceleration:1e3,maxSpeed:360},Pt),At=r.extend({deceleration:1e3,maxSpeed:90},Pt),bt=function(r){this._map=r,this.clear()};function Mt(r,e){(!r.duration||r.duration0&&n-e[0].time>i;)e.shift()},bt.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var n={zoom:0,bearing:0,pitch:0,pan:new r.Point(0,0),pinchAround:void 0,around:void 0},i=0,a=this._inertiaBuffer;i=this._clickTolerance||this._map.fire(new kt(r.type,this._map,r))},wt.prototype.dblclick=function(r){return this._firePreventable(new kt(r.type,this._map,r))},wt.prototype.mouseover=function(r){this._map.fire(new kt(r.type,this._map,r))},wt.prototype.mouseout=function(r){this._map.fire(new kt(r.type,this._map,r))},wt.prototype.touchstart=function(r){return this._firePreventable(new Ft(r.type,this._map,r))},wt.prototype.touchmove=function(r){this._map.fire(new Ft(r.type,this._map,r))},wt.prototype.touchend=function(r){this._map.fire(new Ft(r.type,this._map,r))},wt.prototype.touchcancel=function(r){this._map.fire(new Ft(r.type,this._map,r))},wt.prototype._firePreventable=function(r){if(this._map.fire(r),r.defaultPrevented)return{}},wt.prototype.isEnabled=function(){return!0},wt.prototype.isActive=function(){return!1},wt.prototype.enable=function(){},wt.prototype.disable=function(){};var Rt=function(r){this._map=r};Rt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Rt.prototype.mousemove=function(r){this._map.fire(new kt(r.type,this._map,r))},Rt.prototype.mousedown=function(){this._delayContextMenu=!0},Rt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new kt("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Rt.prototype.contextmenu=function(r){this._delayContextMenu?this._contextMenuEvent=r:this._map.fire(new kt(r.type,this._map,r)),this._map.listens("contextmenu")&&r.preventDefault()},Rt.prototype.isEnabled=function(){return!0},Rt.prototype.isActive=function(){return!1},Rt.prototype.enable=function(){},Rt.prototype.disable=function(){};var Et=function(r,e){this._map=r,this._el=r.getCanvasContainer(),this._container=r.getContainer(),this._clickTolerance=e.clickTolerance||1};function Nt(r,e){for(var n={},i=0;ithis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=r.timeStamp),n.length===this.numTouches&&(this.centroid=Tt(e),this.touches=Nt(n,e)))},Ht.prototype.touchmove=function(r,e,n){if(!this.aborted&&this.centroid){var i=Nt(n,e);for(var a in this.touches){var t=this.touches[a],o=i[a];(!o||o.dist(t)>Ut)&&(this.aborted=!0)}}},Ht.prototype.touchend=function(r,e,n){if((!this.centroid||r.timeStamp-this.startTime>Jt)&&(this.aborted=!0),0===n.length){var i=!this.aborted&&this.centroid;if(this.reset(),i)return i}};var Lt=function(r){this.singleTap=new Ht(r),this.numTaps=r.numTaps,this.reset()};Lt.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Lt.prototype.touchstart=function(r,e,n){this.singleTap.touchstart(r,e,n)},Lt.prototype.touchmove=function(r,e,n){this.singleTap.touchmove(r,e,n)},Lt.prototype.touchend=function(r,e,n){var i=this.singleTap.touchend(r,e,n);if(i){var a=r.timeStamp-this.lastTime0&&(this._active=!0);var a=Nt(i,n),t=new r.Point(0,0),o=new r.Point(0,0),c=0;for(var u in a){var d=a[u],s=this._touches[u];s&&(t._add(d),o._add(d.sub(s)),c++,a[u]=d)}if(this._touches=a,!(cMath.abs(r.x)}var uo=100,so=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.reset=function(){r.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(r){this._lastPoints=r,co(r[0].sub(r[1]))&&(this._valid=!1)},e.prototype._move=function(r,e,n){var i=r[0].sub(this._lastPoints[0]),a=r[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(i,a,n.timeStamp),this._valid)return this._lastPoints=r,this._active=!0,{pitchDelta:(i.y+a.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(r,e,n){if(void 0!==this._valid)return this._valid;var i=2,a=r.mag()>=i,t=e.mag()>=i;if(a||t){if(!a||!t)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove0===e.y>0;return co(r)&&co(e)&&o}},e}($t),lo={panStep:100,bearingStep:15,pitchStep:10},mo=function(){var r=lo;this._panStep=r.panStep,this._bearingStep=r.bearingStep,this._pitchStep=r.pitchStep,this._rotationDisabled=!1};function po(r){return r*(2-r)}mo.prototype.reset=function(){this._active=!1},mo.prototype.keydown=function(r){var e=this;if(!(r.altKey||r.ctrlKey||r.metaKey)){var n=0,i=0,a=0,t=0,o=0;switch(r.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:r.shiftKey?i=-1:(r.preventDefault(),t=-1);break;case 39:r.shiftKey?i=1:(r.preventDefault(),t=1);break;case 38:r.shiftKey?a=1:(r.preventDefault(),o=-1);break;case 40:r.shiftKey?a=-1:(r.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(i=0,a=0),{cameraAnimation:function(c){var u=c.getZoom();c.easeTo({duration:300,easeId:"keyboardHandler",easing:po,zoom:n?Math.round(u)+n*(r.shiftKey?2:1):u,bearing:c.getBearing()+i*e._bearingStep,pitch:c.getPitch()+a*e._pitchStep,offset:[-t*e._panStep,-o*e._panStep],center:c.getCenter()},{originalEvent:r})}}}},mo.prototype.enable=function(){this._enabled=!0},mo.prototype.disable=function(){this._enabled=!1,this.reset()},mo.prototype.isEnabled=function(){return this._enabled},mo.prototype.isActive=function(){return this._active},mo.prototype.disableRotation=function(){this._rotationDisabled=!0},mo.prototype.enableRotation=function(){this._rotationDisabled=!1};var Io=4.000244140625,yo=.01,fo=1/450,go=2,_o=function(e,n){this._map=e,this._el=e.getCanvasContainer(),this._handler=n,this._delta=0,this._defaultZoomRate=yo,this._wheelZoomRate=fo,r.bindAll(["_onTimeout"],this)};_o.prototype.setZoomRate=function(r){this._defaultZoomRate=r},_o.prototype.setWheelZoomRate=function(r){this._wheelZoomRate=r},_o.prototype.isEnabled=function(){return!!this._enabled},_o.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},_o.prototype.isZooming=function(){return!!this._zooming},_o.prototype.enable=function(r){this.isEnabled()||(this._enabled=!0,this._aroundCenter=r&&"center"===r.around)},_o.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},_o.prototype.wheel=function(e){if(this.isEnabled()){var n=e.deltaMode===r.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=r.browser.now(),a=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==n&&n%Io===0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":a>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(a*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),e.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=e,this._delta-=n,this._active||this._start(e)),e.preventDefault()}},_o.prototype._onTimeout=function(r){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(r)},_o.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var i=n.mousePos(this._el,e);this._around=r.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},_o.prototype.renderFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var n=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>Io?this._wheelZoomRate:this._defaultZoomRate,a=go/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==a&&(a=1/a);var t="number"===typeof this._targetZoom?n.zoomScale(this._targetZoom):n.scale;this._targetZoom=Math.min(n.maxZoom,Math.max(n.minZoom,n.scaleZoom(t*a))),"wheel"===this._type&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,c="number"===typeof this._targetZoom?this._targetZoom:n.zoom,u=this._startZoom,d=this._easing,s=!1;if("wheel"===this._type&&u&&d){var l=Math.min((r.browser.now()-this._lastWheelEventTime)/200,1),m=d(l);o=r.number(u,c,m),l<1?this._frameId||(this._frameId=!0):s=!0}else o=c,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!s,zoomDelta:o-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},_o.prototype._smoothOutEasing=function(e){var n=r.ease;if(this._prevEase){var i=this._prevEase,a=(r.browser.now()-i.start)/i.duration,t=i.easing(a+.01)-i.easing(a),o=.27/Math.sqrt(t*t+1e-4)*.01,c=Math.sqrt(.0729-o*o);n=r.bezier(o,c,.25,1)}return this._prevEase={start:r.browser.now(),duration:e,easing:n},n},_o.prototype.reset=function(){this._active=!1};var ho=function(r,e){this._clickZoom=r,this._tapZoom=e};ho.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ho.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ho.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ho.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var vo=function(){this.reset()};vo.prototype.reset=function(){this._active=!1},vo.prototype.dblclick=function(r,e){return r.preventDefault(),{cameraAnimation:function(n){n.easeTo({duration:300,zoom:n.getZoom()+(r.shiftKey?-1:1),around:n.unproject(e)},{originalEvent:r})}}},vo.prototype.enable=function(){this._enabled=!0},vo.prototype.disable=function(){this._enabled=!1,this.reset()},vo.prototype.isEnabled=function(){return this._enabled},vo.prototype.isActive=function(){return this._active};var xo=function(){this._tap=new Lt({numTouches:1,numTaps:1}),this.reset()};xo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},xo.prototype.touchstart=function(r,e,n){this._swipePoint||(this._tapTime&&r.timeStamp-this._tapTime>Dt&&this.reset(),this._tapTime?n.length>0&&(this._swipePoint=e[0],this._swipeTouch=n[0].identifier):this._tap.touchstart(r,e,n))},xo.prototype.touchmove=function(r,e,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;var i=e[0],a=i.y-this._swipePoint.y;return this._swipePoint=i,r.preventDefault(),this._active=!0,{zoomDelta:a/128}}}else this._tap.touchmove(r,e,n)},xo.prototype.touchend=function(r,e,n){this._tapTime?this._swipePoint&&0===n.length&&this.reset():this._tap.touchend(r,e,n)&&(this._tapTime=r.timeStamp)},xo.prototype.touchcancel=function(){this.reset()},xo.prototype.enable=function(){this._enabled=!0},xo.prototype.disable=function(){this._enabled=!1,this.reset()},xo.prototype.isEnabled=function(){return this._enabled},xo.prototype.isActive=function(){return this._active};var Po=function(r,e,n){this._el=r,this._mousePan=e,this._touchPan=n};Po.prototype.enable=function(r){this._inertiaOptions=r||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Po.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Po.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Po.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Go=function(r,e,n){this._pitchWithRotate=r.pitchWithRotate,this._mouseRotate=e,this._mousePitch=n};Go.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Go.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Go.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Go.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Co=function(r,e,n,i){this._el=r,this._touchZoom=e,this._touchRotate=n,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0};Co.prototype.enable=function(r){this._touchZoom.enable(r),this._rotationDisabled||this._touchRotate.enable(r),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Co.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Co.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Co.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Co.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Co.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var So=function(r){return r.zoom||r.drag||r.pitch||r.rotate},Ao=function(r){function e(){r.apply(this,arguments)}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e}(r.Event);function bo(r){return r.panDelta&&r.panDelta.mag()||r.zoomDelta||r.bearingDelta||r.pitchDelta}var Mo=function(e,i){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new bt(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i),r.bindAll(["handleEvent","handleWindowEvent"],this);var a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[r.window.document,"mousemove",{capture:!0}],[r.window.document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[r.window,"blur",void 0]];for(var t=0,o=this._listeners;tt?Math.min(2,x):Math.max(.5,x),P=Math.pow(f,1-e),G=a.unproject(h.add(v.mult(e*P)).mult(y));a.setLocationAtPoint(a.renderWorldCopies?G.wrap():G,I)}i._fireMoveEvents(n)}),(function(r){i._afterEase(n,r)}),e),this},n.prototype._prepareEase=function(e,n,i){void 0===i&&(i={}),this._moving=!0,n||i.moving||this.fire(new r.Event("movestart",e)),this._zooming&&!i.zooming&&this.fire(new r.Event("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new r.Event("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new r.Event("pitchstart",e))},n.prototype._fireMoveEvents=function(e){this.fire(new r.Event("move",e)),this._zooming&&this.fire(new r.Event("zoom",e)),this._rotating&&this.fire(new r.Event("rotate",e)),this._pitching&&this.fire(new r.Event("pitch",e))},n.prototype._afterEase=function(e,n){if(!this._easeId||!n||this._easeId!==n){delete this._easeId;var i=this._zooming,a=this._rotating,t=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,i&&this.fire(new r.Event("zoomend",e)),a&&this.fire(new r.Event("rotateend",e)),t&&this.fire(new r.Event("pitchend",e)),this.fire(new r.Event("moveend",e))}},n.prototype.flyTo=function(e,n){var i=this;if(!e.essential&&r.browser.prefersReducedMotion){var a=r.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(a,n)}this.stop(),e=r.extend({offset:[0,0],speed:1.2,curve:1.42,easing:r.ease},e);var t=this.transform,o=this.getZoom(),c=this.getBearing(),u=this.getPitch(),d=this.getPadding(),s="zoom"in e?r.clamp(+e.zoom,t.minZoom,t.maxZoom):o,l="bearing"in e?this._normalizeBearing(e.bearing,c):c,m="pitch"in e?+e.pitch:u,p="padding"in e?e.padding:t.padding,I=t.zoomScale(s-o),y=r.Point.convert(e.offset),f=t.centerPoint.add(y),g=t.pointLocation(f),_=r.LngLat.convert(e.center||g);this._normalizeCenter(_);var h=t.project(g),v=t.project(_).sub(h),x=e.curve,P=Math.max(t.width,t.height),G=P/I,C=v.mag();if("minZoom"in e){var S=r.clamp(Math.min(e.minZoom,o,s),t.minZoom,t.maxZoom),A=P/t.zoomScale(S-o);x=Math.sqrt(A/C*2)}var b=x*x;function M(r){var e=(G*G-P*P+(r?-1:1)*b*b*C*C)/(2*(r?G:P)*b*C);return Math.log(Math.sqrt(e*e+1)-e)}function B(r){return(Math.exp(r)-Math.exp(-r))/2}function k(r){return(Math.exp(r)+Math.exp(-r))/2}function F(r){return B(r)/k(r)}var z=M(0),w=function(r){return k(z)/k(z+x*r)},R=function(r){return P*((k(z)*F(z+x*r)-B(z))/b)/C},E=(M(1)-z)/x;if(Math.abs(C)<1e-6||!isFinite(E)){if(Math.abs(P-G)<1e-6)return this.easeTo(e,n);var N=Ge.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=c!==l,this._pitching=m!==u,this._padding=!t.isPaddingEqual(p),this._prepareEase(n,!1),this._ease((function(e){var a=e*E,I=1/w(a);t.zoom=1===e?s:o+t.scaleZoom(I),i._rotating&&(t.bearing=r.number(c,l,e)),i._pitching&&(t.pitch=r.number(u,m,e)),i._padding&&(t.interpolatePadding(d,p,e),f=t.centerPoint.add(y));var g=1===e?_:t.unproject(h.add(v.mult(R(a))).mult(I));t.setLocationAtPoint(t.renderWorldCopies?g.wrap():g,f),i._fireMoveEvents(n)}),(function(){return i._afterEase(n)}),e),this},n.prototype.isEasing=function(){return!!this._easeFrameId},n.prototype.stop=function(){return this._stop()},n.prototype._stop=function(r,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var n=this._onEaseEnd;delete this._onEaseEnd,n.call(this,e)}if(!r){var i=this.handlers;i&&i.stop(!1)}return this},n.prototype._ease=function(e,n,i){!1===i.animate||0===i.duration?(e(1),n()):(this._easeStart=r.browser.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},n.prototype._renderFrameCallback=function(){var e=Math.min((r.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},n.prototype._normalizeBearing=function(e,n){e=r.wrap(e,-180,180);var i=Math.abs(e-n);return Math.abs(e-360-n)180?-360:n<-180?360:0}},n}(r.Evented),ko=function(e){void 0===e&&(e={}),this.options=e,r.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};ko.prototype.getDefaultPosition=function(){return"bottom-right"},ko.prototype.onAdd=function(r){var e=this.options&&this.options.compact;return this._map=r,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=n.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),e&&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===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},ko.prototype.onRemove=function(){n.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,this._attribHTML=void 0},ko.prototype._setElementTitle=function(r,e){var n=this._map._getUIString("AttributionControl."+e);r.title=n,r.setAttribute("aria-label",n)},ko.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},ko.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var n=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||r.config.ACCESS_TOKEN}];if(e){var i=n.reduce((function(r,e,i){return e.value&&(r+=e.key+"="+e.value+(i=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,r.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},ko.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Fo=function(){r.bindAll(["_updateLogo"],this),r.bindAll(["_updateCompact"],this)};Fo.prototype.onAdd=function(r){this._map=r,this._container=n.create("div","mapboxgl-ctrl");var e=n.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Fo.prototype.onRemove=function(){n.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Fo.prototype.getDefaultPosition=function(){return"bottom-left"},Fo.prototype._updateLogo=function(r){r&&"metadata"!==r.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Fo.prototype._logoRequired=function(){if(this._map.style){var r=this._map.style.sourceCaches;for(var e in r)if(r[e].getSource().mapbox_logo)return!0;return!1}},Fo.prototype._updateCompact=function(){var r=this._container.children;if(r.length){var e=r[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var zo=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};zo.prototype.add=function(r){var e=++this._id;return this._queue.push({callback:r,id:e,cancelled:!1}),e},zo.prototype.remove=function(r){for(var e=this._currentlyRunning,n=0,i=e?this._queue.concat(e):this._queue;ne.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitchUo)throw new Error("maxPitch must be less than or equal to "+Uo);var a=new _t(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(i.call(this,a,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new zo,this._controls=[],this._mapId=r.uniqueId(),this._locale=r.extend({},wo,e.locale),this._clickTolerance=e.clickTolerance,this._requestManager=new r.RequestManager(e.transformRequest,e.accessToken),"string"===typeof e.container){if(this._container=r.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Eo))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),r.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return n._update(!1)})),this.on("moveend",(function(){return n._update(!1)})),this.on("zoom",(function(){return n._update(!0)})),"undefined"!==typeof r.window&&(r.window.addEventListener("online",this._onWindowOnline,!1),r.window.addEventListener("resize",this._onWindowResize,!1),r.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Mo(this,e);var t="string"===typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new xt(t).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,r.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new ko({customAttribution:e.customAttribution})),this.addControl(new Fo,e.logoPosition),this.on("style.load",(function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)})),this.on("data",(function(e){n._update("style"===e.dataType),n.fire(new r.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){n.fire(new r.Event(e.dataType+"dataloading",e))}))}i&&(a.__proto__=i),a.prototype=Object.create(i&&i.prototype),a.prototype.constructor=a;var t={showTileBoundaries:{configurable:!0},showPadding:{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(e,n){if(void 0===n&&(n=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new r.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var i=e.onAdd(this);this._controls.push(e);var a=this._controlPositions[n];return-1!==n.indexOf("bottom")?a.insertBefore(i,a.firstChild):a.appendChild(i),this},a.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new r.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var n=this._controls.indexOf(e);return n>-1&&this._controls.splice(n,1),e.onRemove(this),this},a.prototype.hasControl=function(r){return this._controls.indexOf(r)>-1},a.prototype.resize=function(e){var n=this._containerDimensions(),i=n[0],a=n[1];this._resizeCanvas(i,a),this.transform.resize(i,a),this.painter.resize(i,a);var t=!this._moving;return t&&(this.stop(),this.fire(new r.Event("movestart",e)).fire(new r.Event("move",e))),this.fire(new r.Event("resize",e)),t&&this.fire(new r.Event("moveend",e)),this},a.prototype.getBounds=function(){return this.transform.getBounds()},a.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},a.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(r.LngLatBounds.convert(e)),this._update()},a.prototype.setMinZoom=function(r){if((r=null===r||void 0===r?To:r)>=To&&r<=this.transform.maxZoom)return this.transform.minZoom=r,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=r,this._update(),this.getZoom()>r&&this.setZoom(r),this;throw new Error("maxZoom must be greater than the current minZoom")},a.prototype.getMaxZoom=function(){return this.transform.maxZoom},a.prototype.setMinPitch=function(r){if((r=null===r||void 0===r?Jo:r)=Jo&&r<=this.transform.maxPitch)return this.transform.minPitch=r,this._update(),this.getPitch()Uo)throw new Error("maxPitch must be less than or equal to "+Uo);if(r>=this.transform.minPitch)return this.transform.maxPitch=r,this._update(),this.getPitch()>r&&this.setPitch(r),this;throw new Error("maxPitch must be greater than the current minPitch")},a.prototype.getMaxPitch=function(){return this.transform.maxPitch},a.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},a.prototype.setRenderWorldCopies=function(r){return this.transform.renderWorldCopies=r,this._update()},a.prototype.project=function(e){return this.transform.locationPoint(r.LngLat.convert(e))},a.prototype.unproject=function(e){return this.transform.pointLocation(r.Point.convert(e))},a.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},a.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},a.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},a.prototype._createDelegatedListener=function(r,e,n){var i,a=this;if("mouseenter"===r||"mouseover"===r){var t=!1,o=function(i){var o=a.getLayer(e)?a.queryRenderedFeatures(i.point,{layers:[e]}):[];o.length?t||(t=!0,n.call(a,new kt(r,a,i.originalEvent,{features:o}))):t=!1};return{layer:e,listener:n,delegates:{mousemove:o,mouseout:function(){t=!1}}}}if("mouseleave"===r||"mouseout"===r){var c=!1,u=function(i){(a.getLayer(e)?a.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?c=!0:c&&(c=!1,n.call(a,new kt(r,a,i.originalEvent)))},d=function(e){c&&(c=!1,n.call(a,new kt(r,a,e.originalEvent)))};return{layer:e,listener:n,delegates:{mousemove:u,mouseout:d}}}var s=function(r){var i=a.getLayer(e)?a.queryRenderedFeatures(r.point,{layers:[e]}):[];i.length&&(r.features=i,n.call(a,r),delete r.features)};return{layer:e,listener:n,delegates:(i={},i[r]=s,i)}},a.prototype.on=function(r,e,n){if(void 0===n)return i.prototype.on.call(this,r,e);var a=this._createDelegatedListener(r,e,n);for(var t in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[r]=this._delegatedListeners[r]||[],this._delegatedListeners[r].push(a),a.delegates)this.on(t,a.delegates[t]);return this},a.prototype.once=function(r,e,n){if(void 0===n)return i.prototype.once.call(this,r,e);var a=this._createDelegatedListener(r,e,n);for(var t in a.delegates)this.once(t,a.delegates[t]);return this},a.prototype.off=function(r,e,n){var a=this;if(void 0===n)return i.prototype.off.call(this,r,e);var t=function(i){for(var t=i[r],o=0;o180;){var c=i.locationPoint(e);if(c.x>=0&&c.y>=0&&c.x<=i.width&&c.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e}jo.prototype.down=function(r,e){this.mouseRotate.mousedown(r,e),this.mousePitch&&this.mousePitch.mousedown(r,e),n.disableDrag()},jo.prototype.move=function(r,e){var n=this.map,i=this.mouseRotate.mousemoveWindow(r,e);if(i&&i.bearingDelta&&n.setBearing(n.getBearing()+i.bearingDelta),this.mousePitch){var a=this.mousePitch.mousemoveWindow(r,e);a&&a.pitchDelta&&n.setPitch(n.getPitch()+a.pitchDelta)}},jo.prototype.off=function(){var r=this.element;n.removeEventListener(r,"mousedown",this.mousedown),n.removeEventListener(r,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(r,"touchmove",this.touchmove),n.removeEventListener(r,"touchend",this.touchend),n.removeEventListener(r,"touchcancel",this.reset),this.offTemp()},jo.prototype.offTemp=function(){n.enableDrag(),n.removeEventListener(r.window,"mousemove",this.mousemove),n.removeEventListener(r.window,"mouseup",this.mouseup)},jo.prototype.mousedown=function(e){this.down(r.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),n.mousePos(this.element,e)),n.addEventListener(r.window,"mousemove",this.mousemove),n.addEventListener(r.window,"mouseup",this.mouseup)},jo.prototype.mousemove=function(r){this.move(r,n.mousePos(this.element,r))},jo.prototype.mouseup=function(r){this.mouseRotate.mouseupWindow(r),this.mousePitch&&this.mousePitch.mouseupWindow(r),this.offTemp()},jo.prototype.touchstart=function(r){1!==r.targetTouches.length?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,r.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return r.preventDefault()}},this._startPos))},jo.prototype.touchmove=function(r){1!==r.targetTouches.length?this.reset():(this._lastPos=n.touchPos(this.element,r.targetTouches)[0],this.move({preventDefault:function(){return r.preventDefault()}},this._lastPos))},jo.prototype.touchend=function(r){0===r.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=n}this._isDragging&&(this._pos=e.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 r.Event("dragstart"))),this.fire(new r.Event("drag")))},i.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new r.Event("dragend")),this._state="inactive"},i.prototype._addDragHandler=function(r){this._element.contains(r.originalEvent.target)&&(r.preventDefault(),this._positionDelta=r.point.sub(this._pos).add(this._offset),this._pointerdownPos=r.point,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))},i.prototype.setDraggable=function(r){return this._draggable=!!r,this._map&&(r?(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},i.prototype.isDraggable=function(){return this._draggable},i.prototype.setRotation=function(r){return this._rotation=r||0,this._update(),this},i.prototype.getRotation=function(){return this._rotation},i.prototype.setRotationAlignment=function(r){return this._rotationAlignment=r||"auto",this._update(),this},i.prototype.getRotationAlignment=function(){return this._rotationAlignment},i.prototype.setPitchAlignment=function(r){return this._pitchAlignment=r&&"auto"!==r?r:this._rotationAlignment,this._update(),this},i.prototype.getPitchAlignment=function(){return this._pitchAlignment},i}(r.Evented),Qo={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};function $o(e){void 0!==Yo?e(Yo):void 0!==r.window.navigator.permissions?r.window.navigator.permissions.query({name:"geolocation"}).then((function(r){Yo="denied"!==r.state,e(Yo)})):(Yo=!!r.window.navigator.geolocation,e(Yo))}var rc=0,ec=!1,nc=function(e){function i(n){e.call(this),this.options=r.extend({},Qo,n),r.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(r){return this._map=r,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),$o(this._setupUI),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(r.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,rc=0,ec=!1},i.prototype._isOutOfMapMaxBounds=function(r){var e=this._map.getMaxBounds(),n=r.coords;return e&&(n.longitudee.getEast()||n.latitudee.getNorth())},i.prototype._setErrorState=function(){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")}},i.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new r.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,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(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new r.Event("geolocate",e)),this._finish()}},i.prototype._updateCamera=function(e){var n=new r.LngLat(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,a=this._map.getBearing(),t=r.extend({bearing:a},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(i),t,{geolocateSource:!0})},i.prototype._updateMarker=function(e){if(e){var n=new r.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},i.prototype._updateCircleRadius=function(){var r=this._map._container.clientHeight/2,e=this._map.unproject([0,r]),n=this._map.unproject([1,r]),i=e.distanceTo(n),a=Math.ceil(2*this._accuracy/i);this._circleElement.style.width=a+"px",this._circleElement.style.height=a+"px"},i.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},i.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.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"),this._geolocateButton.disabled=!0;var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ec)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new r.Event("error",e)),this._finish()}},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;if(this._container.addEventListener("contextmenu",(function(r){return r.preventDefault()})),this._geolocateButton=n.create("button","mapboxgl-ctrl-geolocate",this._container),n.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){r.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}else{var t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Xo(this._dotElement),this._circleElement=n.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Xo({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){var n=e.originalEvent&&"resize"===e.originalEvent.type;e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||n||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new r.Event("trackuserlocationend")))}))},i.prototype.trigger=function(){if(!this._setup)return r.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 r.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":rc--,ec=!1,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 r.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 r.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")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++rc>1?(e={maximumAge:6e5,timeout:0},ec=!0):(e=this.options.positionOptions,ec=!1),this._geolocationWatchID=r.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else r.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){r.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)},i}(r.Evented),ic={maxWidth:100,unit:"metric"},ac=function(e){this.options=r.extend({},ic,e),r.bindAll(["_onMove","setUnit"],this)};function tc(r,e,n){var i=n&&n.maxWidth||100,a=r._container.clientHeight/2,t=r.unproject([0,a]),o=r.unproject([i,a]),c=t.distanceTo(o);if(n&&"imperial"===n.unit){var u=3.2808*c;u>5280?oc(e,i,u/5280,r._getUIString("ScaleControl.Miles")):oc(e,i,u,r._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?oc(e,i,c/1852,r._getUIString("ScaleControl.NauticalMiles")):c>=1e3?oc(e,i,c/1e3,r._getUIString("ScaleControl.Kilometers")):oc(e,i,c,r._getUIString("ScaleControl.Meters"))}function oc(r,e,n,i){var a=uc(n),t=a/n;r.style.width=e*t+"px",r.innerHTML=a+" "+i}function cc(r){var e=Math.pow(10,Math.ceil(-Math.log(r)/Math.LN10));return Math.round(r*e)/e}function uc(r){var e=Math.pow(10,(""+Math.floor(r)).length-1),n=r/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:cc(n))}ac.prototype.getDefaultPosition=function(){return"bottom-left"},ac.prototype._onMove=function(){tc(this._map,this._container,this.options)},ac.prototype.onAdd=function(r){return this._map=r,this._container=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",r.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ac.prototype.onRemove=function(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ac.prototype.setUnit=function(r){this.options.unit=r,tc(this._map,this._container,this.options)};var dc=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof r.window.HTMLElement?this._container=e.container:r.warnOnce("Full screen control 'container' must be a DOM element.")),r.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in r.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in r.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in r.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in r.window.document&&(this._fullscreenchange="MSFullscreenChange")};dc.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",r.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},dc.prototype.onRemove=function(){n.remove(this._controlContainer),this._map=null,r.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},dc.prototype._checkFullscreenSupport=function(){return!!(r.window.document.fullscreenEnabled||r.window.document.mozFullScreenEnabled||r.window.document.msFullscreenEnabled||r.window.document.webkitFullscreenEnabled)},dc.prototype._setupUI=function(){var e=this._fullscreenButton=n.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);n.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),r.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},dc.prototype._updateTitle=function(){var r=this._getTitle();this._fullscreenButton.setAttribute("aria-label",r),this._fullscreenButton.title=r},dc.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},dc.prototype._isFullscreen=function(){return this._fullscreen},dc.prototype._changeIcon=function(){(r.window.document.fullscreenElement||r.window.document.mozFullScreenElement||r.window.document.webkitFullscreenElement||r.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},dc.prototype._onClickFullscreen=function(){this._isFullscreen()?r.window.document.exitFullscreen?r.window.document.exitFullscreen():r.window.document.mozCancelFullScreen?r.window.document.mozCancelFullScreen():r.window.document.msExitFullscreen?r.window.document.msExitFullscreen():r.window.document.webkitCancelFullScreen&&r.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 sc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},lc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),mc=function(e){function i(n){e.call(this),this.options=r.extend(Object.create(sc),n),r.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&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 r.Event("open")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new r.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=r.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},i.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},i.prototype.getElement=function(){return this._container},i.prototype.setText=function(e){return this.setDOMContent(r.window.document.createTextNode(e))},i.prototype.setHTML=function(e){var n,i=r.window.document.createDocumentFragment(),a=r.window.document.createElement("body");for(a.innerHTML=e;n=a.firstChild;)i.appendChild(n);return this.setDOMContent(i)},i.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},i.prototype.setMaxWidth=function(r){return this.options.maxWidth=r,this._update(),this},i.prototype.setDOMContent=function(r){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(r),this._createCloseButton(),this._update(),this._focusFirstElement(),this},i.prototype.addClassName=function(r){this._container&&this._container.classList.add(r)},i.prototype.removeClassName=function(r){this._container&&this._container.classList.remove(r)},i.prototype.setOffset=function(r){return this.options.offset=r,this._update(),this},i.prototype.toggleClassName=function(r){if(this._container)return this._container.classList.toggle(r)},i.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=n.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},i.prototype._onMouseUp=function(r){this._update(r.point)},i.prototype._onMouseMove=function(r){this._update(r.point)},i.prototype._onDrag=function(r){this._update(r.point)},i.prototype._update=function(r){var e=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=n.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=n.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(r){return e._container.classList.add(r)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),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=Wo(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||r)){var a=this._pos=this._trackPointer&&r?r:this._map.project(this._lngLat),t=this.options.anchor,o=pc(this.options.offset);if(!t){var c,u=this._container.offsetWidth,d=this._container.offsetHeight;c=a.y+o.bottom.ythis._map.transform.height-d?["bottom"]:[],a.xthis._map.transform.width-u/2&&c.push("right"),t=0===c.length?"bottom":c.join("-")}var s=a.add(o[t]).round();n.setTransform(this._container,Zo[t]+" translate("+s.x+"px,"+s.y+"px)"),qo(this._container,t,"popup")}},i.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var r=this._container.querySelector(lc);r&&r.focus()}},i.prototype._onClose=function(){this.remove()},i}(r.Evented);function pc(e){if(e){if("number"===typeof e){var n=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{center:new r.Point(0,0),top:new r.Point(0,e),"top-left":new r.Point(n,n),"top-right":new r.Point(-n,n),bottom:new r.Point(0,-e),"bottom-left":new r.Point(n,-n),"bottom-right":new r.Point(-n,-n),left:new r.Point(e,0),right:new r.Point(-e,0)}}if(e instanceof r.Point||Array.isArray(e)){var i=r.Point.convert(e);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:r.Point.convert(e.center||[0,0]),top:r.Point.convert(e.top||[0,0]),"top-left":r.Point.convert(e["top-left"]||[0,0]),"top-right":r.Point.convert(e["top-right"]||[0,0]),bottom:r.Point.convert(e.bottom||[0,0]),"bottom-left":r.Point.convert(e["bottom-left"]||[0,0]),"bottom-right":r.Point.convert(e["bottom-right"]||[0,0]),left:r.Point.convert(e.left||[0,0]),right:r.Point.convert(e.right||[0,0])}}return pc(new r.Point(0,0))}var Ic={version:r.version,supported:e,setRTLTextPlugin:r.setRTLTextPlugin,getRTLTextPluginStatus:r.getRTLTextPluginStatus,Map:Lo,NavigationControl:Vo,GeolocateControl:nc,AttributionControl:ko,ScaleControl:ac,FullscreenControl:dc,Popup:mc,Marker:Xo,Style:gn,LngLat:r.LngLat,LngLatBounds:r.LngLatBounds,Point:r.Point,MercatorCoordinate:r.MercatorCoordinate,Evented:r.Evented,config:r.config,prewarm:te,clearPrewarmedResources:oe,get accessToken(){return r.config.ACCESS_TOKEN},set accessToken(e){r.config.ACCESS_TOKEN=e},get baseApiUrl(){return r.config.API_URL},set baseApiUrl(e){r.config.API_URL=e},get workerCount(){return ee.workerCount},set workerCount(r){ee.workerCount=r},get maxParallelImageRequests(){return r.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){r.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){r.clearTileCache(e)},workerUrl:""};return Ic})),n}()},3108:function(r,e,n){"use strict";r.exports=n(26099)},26099:function(r,e,n){"use strict";var i=n(64928),a=n(32420),t=n(51160),o=n(76752),c=n(55616),u=n(31264),d=n(47520),s=n(18400),l=n(72512),m=n(76244);function p(r,e){for(var n=e[0],i=e[1],t=1/(e[2]-n),o=1/(e[3]-i),c=new Array(r.length),u=0,d=r.length/2;u>>1;e.dtype||(e.dtype="array"),"string"===typeof e.dtype?I=new(l(e.dtype))(f):e.dtype&&(I=e.dtype,Array.isArray(I)&&(I.length=f));for(var g=0;gn||c>1073741824){for(var m=0;mn+a||A>i+a||b=k)&&o!==c){var u=_[t];void 0===c&&(c=u.length);for(var d=o;d=f&&l<=P&&m>=g&&m<=G&&F.push(s)}var p=h[t],I=p[4*o+0],y=p[4*o+1],v=p[4*o+2],x=p[4*o+3],C=function(r,e){for(var n=null,i=0;null===n;)if(n=r[4*e+i],++i>r.length)return null;return n}(p,o+1),M=.5*a,z=t+1;e(n,i,M,z,I,y||v||x||C),e(n,i+M,M,z,y,v||x||C),e(n+M,i,M,z,v,x||C),e(n+M,i+M,M,z,x,C)}}(0,0,1,0,0,1),F},I;function M(r,e,n){for(var i=1,a=.5,t=.5,o=.5,c=0;c0){e+=Math.abs(o(r[0]));for(var n=1;n2){for(u=0;u=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(r*n)/n},e.radiansToLength=s,e.lengthToRadians=l,e.lengthToDegrees=function(r,e){return m(l(r,e))},e.bearingToAzimuth=function(r){var e=r%360;return e<0&&(e+=360),e},e.radiansToDegrees=m,e.degreesToRadians=function(r){return r%360*Math.PI/180},e.convertLength=function(r,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(r>=0))throw new Error("length must be a positive number");return s(l(r,e),n)},e.convertArea=function(r,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(r>=0))throw new Error("area must be a positive number");var a=e.areaFactors[n];if(!a)throw new Error("invalid original units");var t=e.areaFactors[i];if(!t)throw new Error("invalid final units");return r/a*t},e.isNumber=p,e.isObject=function(r){return!!r&&r.constructor===Object},e.validateBBox=function(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(4!==r.length&&6!==r.length)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach((function(r){if(!p(r))throw new Error("bbox must only contain numbers")}))},e.validateId=function(r){if(!r)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof r))throw new Error("id must be a number or a string")}},3256:function(r,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(46284);function a(r,e,n){if(null!==r)for(var i,t,o,c,u,d,s,l,m=0,p=0,I=r.type,y="FeatureCollection"===I,f="Feature"===I,g=y?r.features.length:1,_=0;_d||p>s||I>l)return u=a,d=n,s=p,l=I,void(o=0);var y=i.lineString([u,a],r.properties);if(!1===e(y,n,t,I,o))return!1;o++,u=a}))&&void 0}}}))}function s(r,e){if(!r)throw new Error("geojson is required");u(r,(function(r,n,a){if(null!==r.geometry){var t=r.geometry.type,o=r.geometry.coordinates;switch(t){case"LineString":if(!1===e(r,n,a,0,0))return!1;break;case"Polygon":for(var c=0;cr[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(r*n)/n},e.radiansToLength=s,e.lengthToRadians=l,e.lengthToDegrees=function(r,e){return m(l(r,e))},e.bearingToAzimuth=function(r){var e=r%360;return e<0&&(e+=360),e},e.radiansToDegrees=m,e.degreesToRadians=function(r){return r%360*Math.PI/180},e.convertLength=function(r,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(r>=0))throw new Error("length must be a positive number");return s(l(r,e),n)},e.convertArea=function(r,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(r>=0))throw new Error("area must be a positive number");var a=e.areaFactors[n];if(!a)throw new Error("invalid original units");var t=e.areaFactors[i];if(!t)throw new Error("invalid final units");return r/a*t},e.isNumber=p,e.isObject=function(r){return!!r&&r.constructor===Object},e.validateBBox=function(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(4!==r.length&&6!==r.length)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach((function(r){if(!p(r))throw new Error("bbox must only contain numbers")}))},e.validateId=function(r){if(!r)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof r))throw new Error("id must be a number or a string")}},84880:function(r,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(76796);function a(r,e,n){if(null!==r)for(var i,t,o,c,u,d,s,l,m=0,p=0,I=r.type,y="FeatureCollection"===I,f="Feature"===I,g=y?r.features.length:1,_=0;_d||p>s||I>l)return u=a,d=n,s=p,l=I,void(o=0);var y=i.lineString([u,a],r.properties);if(!1===e(y,n,t,I,o))return!1;o++,u=a}))&&void 0}}}))}function s(r,e){if(!r)throw new Error("geojson is required");u(r,(function(r,n,a){if(null!==r.geometry){var t=r.geometry.type,o=r.geometry.coordinates;switch(t){case"LineString":if(!1===e(r,n,a,0,0))return!1;break;case"Polygon":for(var c=0;c=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(r*n)/n},e.radiansToLength=s,e.lengthToRadians=l,e.lengthToDegrees=function(r,e){return m(l(r,e))},e.bearingToAzimuth=function(r){var e=r%360;return e<0&&(e+=360),e},e.radiansToDegrees=m,e.degreesToRadians=function(r){return r%360*Math.PI/180},e.convertLength=function(r,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(r>=0))throw new Error("length must be a positive number");return s(l(r,e),n)},e.convertArea=function(r,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(r>=0))throw new Error("area must be a positive number");var a=e.areaFactors[n];if(!a)throw new Error("invalid original units");var t=e.areaFactors[i];if(!t)throw new Error("invalid final units");return r/a*t},e.isNumber=p,e.isObject=function(r){return!!r&&r.constructor===Object},e.validateBBox=function(r){if(!r)throw new Error("bbox is required");if(!Array.isArray(r))throw new Error("bbox must be an Array");if(4!==r.length&&6!==r.length)throw new Error("bbox must be an Array of 4 or 6 numbers");r.forEach((function(r){if(!p(r))throw new Error("bbox must only contain numbers")}))},e.validateId=function(r){if(!r)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof r))throw new Error("id must be a number or a string")},e.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},e.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},e.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},e.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},e.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},e.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},e.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},43752:function(r,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(49840);function a(r,e,n){if(null!==r)for(var i,t,o,c,u,d,s,l,m=0,p=0,I=r.type,y="FeatureCollection"===I,f="Feature"===I,g=y?r.features.length:1,_=0;_d||p>s||I>l)return u=a,d=n,s=p,l=I,void(o=0);var y=i.lineString([u,a],r.properties);if(!1===e(y,n,t,I,o))return!1;o++,u=a}))&&void 0}}}))}function s(r,e){if(!r)throw new Error("geojson is required");u(r,(function(r,n,a){if(null!==r.geometry){var t=r.geometry.type,o=r.geometry.coordinates;switch(t){case"LineString":if(!1===e(r,n,a,0,0))return!1;break;case"Polygon":for(var c=0;ca&&(a=r[o]),r[o]1?n-1:0),a=1;a1?n-1:0),a=1;a1?n-1:0),a=1;a1?n-1:0),a=1;ar.length)&&(n=r.length),r.substring(n-e.length,n)===e}var f="",g="",_="",h="",v={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(r){var e=Object.keys(r),n=Object.create(Object.getPrototypeOf(r));return e.forEach((function(e){n[e]=r[e]})),Object.defineProperty(n,"message",{value:r.message}),n}function P(r){return p(r,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function G(r,e,n){var a="",t="",o=0,c="",u=!1,d=P(r),s=d.split("\n"),l=P(e).split("\n"),p=0,I="";if("strictEqual"===n&&"object"===m(r)&&"object"===m(e)&&null!==r&&null!==e&&(n="strictEqualObject"),1===s.length&&1===l.length&&s[0]!==l[0]){var x=s[0].length+l[0].length;if(x<=10){if(("object"!==m(r)||null===r)&&("object"!==m(e)||null===e)&&(0!==r||0!==e))return"".concat(v[n],"\n\n")+"".concat(s[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==n&&x<(i.stderr&&i.stderr.isTTY?i.stderr.columns:80)){for(;s[0][p]===l[0][p];)p++;p>2&&(I="\n ".concat(function(r,e){if(e=Math.floor(e),0==r.length||0==e)return"";var n=r.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)r+=r,e--;return r+r.substring(0,n-r.length)}(" ",p),"^"),p=0)}}for(var G=s[s.length-1],C=l[l.length-1];G===C&&(p++<2?c="\n ".concat(G).concat(c):a=G,s.pop(),l.pop(),0!==s.length&&0!==l.length);)G=s[s.length-1],C=l[l.length-1];var S=Math.max(s.length,l.length);if(0===S){var A=d.split("\n");if(A.length>30)for(A[26]="".concat(f,"...").concat(h);A.length>27;)A.pop();return"".concat(v.notIdentical,"\n\n").concat(A.join("\n"),"\n")}p>3&&(c="\n".concat(f,"...").concat(h).concat(c),u=!0),""!==a&&(c="\n ".concat(a).concat(c),a="");var b=0,M=v[n]+"\n".concat(g,"+ actual").concat(h," ").concat(_,"- expected").concat(h),B=" ".concat(f,"...").concat(h," Lines skipped");for(p=0;p1&&p>2&&(k>4?(t+="\n".concat(f,"...").concat(h),u=!0):k>3&&(t+="\n ".concat(l[p-2]),b++),t+="\n ".concat(l[p-1]),b++),o=p,a+="\n".concat(_,"-").concat(h," ").concat(l[p]),b++;else if(l.length1&&p>2&&(k>4?(t+="\n".concat(f,"...").concat(h),u=!0):k>3&&(t+="\n ".concat(s[p-2]),b++),t+="\n ".concat(s[p-1]),b++),o=p,t+="\n".concat(g,"+").concat(h," ").concat(s[p]),b++;else{var F=l[p],z=s[p],w=z!==F&&(!y(z,",")||z.slice(0,-1)!==F);w&&y(F,",")&&F.slice(0,-1)===z&&(w=!1,z+=","),w?(k>1&&p>2&&(k>4?(t+="\n".concat(f,"...").concat(h),u=!0):k>3&&(t+="\n ".concat(s[p-2]),b++),t+="\n ".concat(s[p-1]),b++),o=p,t+="\n".concat(g,"+").concat(h," ").concat(z),a+="\n".concat(_,"-").concat(h," ").concat(F),b+=2):(t+=a,a="",1!==k&&0!==p||(t+="\n ".concat(z),b++))}if(b>20&&p30)for(C[26]="".concat(f,"...").concat(h);C.length>27;)C.pop();n=1===C.length?o(this,l(e).call(this,"".concat(y," ").concat(C[0]))):o(this,l(e).call(this,"".concat(y,"\n\n").concat(C.join("\n"),"\n")))}else{var S=P(d),A="",b=v[t];"notDeepEqual"===t||"notEqual"===t?(S="".concat(v[t],"\n\n").concat(S)).length>1024&&(S="".concat(S.slice(0,1021),"...")):(A="".concat(P(s)),S.length>512&&(S="".concat(S.slice(0,509),"...")),A.length>512&&(A="".concat(A.slice(0,509),"...")),"deepEqual"===t||"equal"===t?S="".concat(b,"\n\n").concat(S,"\n\nshould equal\n\n"):A=" ".concat(t," ").concat(A)),n=o(this,l(e).call(this,"".concat(S).concat(A)))}return Error.stackTraceLimit=p,n.generatedMessage=!a,Object.defineProperty(c(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=d,n.expected=s,n.operator=t,Error.captureStackTrace&&Error.captureStackTrace(c(n),u),n.stack,n.name="AssertionError",o(n)}var n,u,d;return function(r,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&s(r,e)}(e,r),n=e,u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(r,e){return p(this,function(r){for(var e=1;e2?"one of ".concat(e," ").concat(r.slice(0,n-1).join(", "),", or ")+r[n-1]:2===n?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(r,e,a){var t,o,u,d;if(void 0===c&&(c=n(45408)),c("string"===typeof r,"'name' must be a string"),"string"===typeof e&&(o="not ",e.substr(!u||u<0?0:+u,o.length)===o)?(t="must not be",e=e.replace(/^not /,"")):t="must be",function(r,e,n){return(void 0===n||n>r.length)&&(n=r.length),r.substring(n-e.length,n)===e}(r," argument"))d="The ".concat(r," ").concat(t," ").concat(l(e,"type"));else{var s=function(r,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>r.length)&&-1!==r.indexOf(e,n)}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(s," ").concat(t," ").concat(l(e,"type"))}return d+=". Received type ".concat(i(a))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(r,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=n(35840));var a=u.inspect(e);return a.length>128&&(a="".concat(a.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(a)}),TypeError,RangeError),s("ERR_INVALID_RETURN_VALUE",(function(r,e,n){var a;return a=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(i(n)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(a,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),i=0;i0,"At least one arg needs to be specified");var a="The ",t=e.length;switch(e=e.map((function(r){return'"'.concat(r,'"')})),t){case 1:a+="".concat(e[0]," argument");break;case 2:a+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:a+=e.slice(0,t-1).join(", "),a+=", and ".concat(e[t-1]," arguments")}return"".concat(a," must be specified")}),TypeError),r.exports.codes=d},25116:function(r,e,n){"use strict";function i(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=[],i=!0,a=!1,t=void 0;try{for(var o,c=r[Symbol.iterator]();!(i=(o=c.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(u){a=!0,t=u}finally{try{i||null==c.return||c.return()}finally{if(a)throw t}}return n}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(r){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"===typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},a(r)}var t=void 0!==/a/g.flags,o=function(r){var e=[];return r.forEach((function(r){return e.push(r)})),e},c=function(r){var e=[];return r.forEach((function(r,n){return e.push([n,r])})),e},u=Object.is?Object.is:n(39896),d=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},s=Number.isNaN?Number.isNaN:n(1560);function l(r){return r.call.bind(r)}var m=l(Object.prototype.hasOwnProperty),p=l(Object.prototype.propertyIsEnumerable),I=l(Object.prototype.toString),y=n(35840).types,f=y.isAnyArrayBuffer,g=y.isArrayBufferView,_=y.isDate,h=y.isMap,v=y.isRegExp,x=y.isSet,P=y.isNativeError,G=y.isBoxedPrimitive,C=y.isNumberObject,S=y.isStringObject,A=y.isBooleanObject,b=y.isBigIntObject,M=y.isSymbolObject,B=y.isFloat32Array,k=y.isFloat64Array;function F(r){if(0===r.length||r.length>10)return!0;for(var e=0;e57)return!0}return 10===r.length&&r>=Math.pow(2,32)}function z(r){return Object.keys(r).filter(F).concat(d(r).filter(Object.prototype.propertyIsEnumerable.bind(r)))}function w(r,e){if(r===e)return 0;for(var n=r.length,i=e.length,a=0,t=Math.min(n,i);a>2],t+=i[(3&n[e])<<4|n[e+1]>>4],t+=i[(15&n[e+1])<<2|n[e+2]>>6],t+=i[63&n[e+2]];return a%3===2?t=t.substring(0,t.length-1)+"=":a%3===1&&(t=t.substring(0,t.length-2)+"=="),t},c=function(r){var e,n,i,t,o,c=.75*r.length,u=r.length,d=0;"="===r[r.length-1]&&(c--,"="===r[r.length-2]&&c--);var s=new ArrayBuffer(c),l=new Uint8Array(s);for(e=0;e>4,l[d++]=(15&i)<<4|t>>2,l[d++]=(3&t)<<6|63&o;return s}},59968:function(r,e){"use strict";e.byteLength=function(r){var e=c(r),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(r){var e,n,t=c(r),o=t[0],u=t[1],d=new a(function(r,e,n){return 3*(e+n)/4-n}(0,o,u)),s=0,l=u>0?o-4:o;for(n=0;n>16&255,d[s++]=e>>8&255,d[s++]=255&e;return 2===u&&(e=i[r.charCodeAt(n)]<<2|i[r.charCodeAt(n+1)]>>4,d[s++]=255&e),1===u&&(e=i[r.charCodeAt(n)]<<10|i[r.charCodeAt(n+1)]<<4|i[r.charCodeAt(n+2)]>>2,d[s++]=e>>8&255,d[s++]=255&e),d},e.fromByteArray=function(r){for(var e,i=r.length,a=i%3,t=[],o=16383,c=0,d=i-a;cd?d:c+o));return 1===a?(e=r[i-1],t.push(n[e>>2]+n[e<<4&63]+"==")):2===a&&(e=(r[i-2]<<8)+r[i-1],t.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),t.join("")};for(var n=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=t[o],i[t.charCodeAt(o)]=o;function c(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=r.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(r,e,i){for(var a,t,o=[],c=e;c>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},64928:function(r){"use strict";function e(r,e,n,i,a){for(var t=a+1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)>=0?(t=o,a=o-1):i=o+1}return t}function n(r,e,n,i,a){for(var t=a+1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)>0?(t=o,a=o-1):i=o+1}return t}function i(r,e,n,i,a){for(var t=i-1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)<0?(t=o,i=o+1):a=o-1}return t}function a(r,e,n,i,a){for(var t=i-1;i<=a;){var o=i+a>>>1,c=r[o];(void 0!==n?n(c,e):c-e)<=0?(t=o,i=o+1):a=o-1}return t}function t(r,e,n,i,a){for(;i<=a;){var t=i+a>>>1,o=r[t],c=void 0!==n?n(o,e):o-e;if(0===c)return t;c<=0?i=t+1:a=t-1}return-1}function o(r,e,n,i,a,t){return"function"===typeof n?t(r,e,n,void 0===i?0:0|i,void 0===a?r.length-1:0|a):t(r,e,void 0,void 0===n?0:0|n,void 0===i?r.length-1:0|i)}r.exports={ge:function(r,n,i,a,t){return o(r,n,i,a,t,e)},gt:function(r,e,i,a,t){return o(r,e,i,a,t,n)},lt:function(r,e,n,a,t){return o(r,e,n,a,t,i)},le:function(r,e,n,i,t){return o(r,e,n,i,t,a)},eq:function(r,e,n,i,a){return o(r,e,n,i,a,t)}}},308:function(r,e){"use strict";function n(r){var e=32;return(r&=-r)&&e--,65535&r&&(e-=16),16711935&r&&(e-=8),252645135&r&&(e-=4),858993459&r&&(e-=2),1431655765&r&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(r){return(r>0)-(r<0)},e.abs=function(r){var e=r>>31;return(r^e)-e},e.min=function(r,e){return e^(r^e)&-(r65535)<<4,e|=n=((r>>>=e)>255)<<3,e|=n=((r>>>=n)>15)<<2,(e|=n=((r>>>=n)>3)<<1)|(r>>>=n)>>1},e.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},e.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},e.countTrailingZeros=n,e.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,1+(r|=r>>>16)},e.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},e.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);!function(r){for(var e=0;e<256;++e){var n=e,i=e,a=7;for(n>>>=1;n;n>>>=1)i<<=1,i|=1&n,--a;r[e]=i<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},e.interleave2=function(r,e){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(r,e){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>e&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},e.interleave3=function(r,e,n){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(r,e){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>e&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},e.nextCombination=function(r){var e=r|r-1;return e+1|(~e&-~e)-1>>>n(r)+1}},29620:function(r,e,n){"use strict";var i=n(32420);r.exports=function(r,e){e||(e={});var n,o,c,u,d,s,l,m,p,I,y,f=null==e.cutoff?.25:e.cutoff,g=null==e.radius?8:e.radius,_=e.channel||0;if(ArrayBuffer.isView(r)||Array.isArray(r)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");n=e.width,o=e.height,u=r,s=e.stride?e.stride:Math.floor(r.length/n/o)}else window.HTMLCanvasElement&&r instanceof window.HTMLCanvasElement?(l=(m=r).getContext("2d"),n=m.width,o=m.height,u=(p=l.getImageData(0,0,n,o)).data,s=4):window.CanvasRenderingContext2D&&r instanceof window.CanvasRenderingContext2D?(l=r,n=(m=r.canvas).width,o=m.height,u=(p=l.getImageData(0,0,n,o)).data,s=4):window.ImageData&&r instanceof window.ImageData&&(p=r,n=r.width,o=r.height,u=p.data,s=4);if(c=Math.max(n,o),window.Uint8ClampedArray&&u instanceof window.Uint8ClampedArray||window.Uint8Array&&u instanceof window.Uint8Array)for(d=u,u=Array(n*o),I=0,y=d.length;I-1?a(n):n}},57916:function(r,e,n){"use strict";var i=n(8844),a=n(53664),t=n(14500),o=a("%TypeError%"),c=a("%Function.prototype.apply%"),u=a("%Function.prototype.call%"),d=a("%Reflect.apply%",!0)||i.call(u,c),s=a("%Object.defineProperty%",!0),l=a("%Math.max%");if(s)try{s({},"a",{value:1})}catch(p){s=null}r.exports=function(r){if("function"!==typeof r)throw new o("a function is required");var e=d(i,u,arguments);return t(e,1+l(0,r.length-(arguments.length-1)),!0)};var m=function(){return d(i,c,arguments)};s?s(r.exports,"apply",{value:m}):r.exports.apply=m},32420:function(r){r.exports=function(r,e,n){return en?n:r:re?e:r}},3808:function(r,e,n){"use strict";var i=n(32420);function a(r,e){null==e&&(e=!0);var n=r[0],a=r[1],t=r[2],o=r[3];return null==o&&(o=e?1:255),e&&(n*=255,a*=255,t*=255,o*=255),16777216*(n=255&i(n,0,255))+((a=255&i(a,0,255))<<16)+((t=255&i(t,0,255))<<8)+(o=255&i(o,0,255))}r.exports=a,r.exports.to=a,r.exports.from=function(r,e){var n=(r=+r)>>>24,i=(16711680&r)>>>16,a=(65280&r)>>>8,t=255&r;return!1===e?[n,i,a,t]:[n/255,i/255,a/255,t/255]}},17592:function(r){"use strict";r.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]}},72160:function(r,e,n){"use strict";var i=n(96824),a=n(32420),t=n(72512);r.exports=function(r,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var n=new(t(e))(4),o="uint8"!==e&&"uint8_clamped"!==e;return r.length&&"string"!==typeof r||((r=i(r))[0]/=255,r[1]/=255,r[2]/=255),function(r){return r instanceof Uint8Array||r instanceof Uint8ClampedArray||!!(Array.isArray(r)&&(r[0]>1||0===r[0])&&(r[1]>1||0===r[1])&&(r[2]>1||0===r[2])&&(!r[3]||r[3]>1))}(r)?(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=null!=r[3]?r[3]:255,o&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(o?(n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=null!=r[3]?r[3]:1):(n[0]=a(Math.floor(255*r[0]),0,255),n[1]=a(Math.floor(255*r[1]),0,255),n[2]=a(Math.floor(255*r[2]),0,255),n[3]=null==r[3]?255:a(Math.floor(255*r[3]),0,255)),n)}},96824:function(r,e,n){"use strict";var i=n(95532),a=n(53576),t=n(32420);r.exports=function(r){var e,n=i(r);return n.space?((e=Array(3))[0]=t(n.values[0],0,255),e[1]=t(n.values[1],0,255),e[2]=t(n.values[2],0,255),"h"===n.space[0]&&(e=a.rgb(e)),e.push(t(n.alpha,0,1)),e):[]}},95532:function(r,e,n){"use strict";var i=n(17592);r.exports=function(r){var e,n,t=[],o=1;if("string"===typeof r)if(r=r.toLowerCase(),i[r])t=i[r].slice(),n="rgb";else if("transparent"===r)o=0,n="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(r)){var c=r.slice(1);o=1,(s=c.length)<=4?(t=[parseInt(c[0]+c[0],16),parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16)],4===s&&(o=parseInt(c[3]+c[3],16)/255)):(t=[parseInt(c[0]+c[1],16),parseInt(c[2]+c[3],16),parseInt(c[4]+c[5],16)],8===s&&(o=parseInt(c[6]+c[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),n="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(r)){var u=e[1],d="rgb"===u;n=c=u.replace(/a$/,"");var s="cmyk"===c?4:"gray"===c?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(r,e){if(/%$/.test(r))return e===s?parseFloat(r)/100:"rgb"===c?255*parseFloat(r)/100:parseFloat(r);if("h"===c[e]){if(/deg$/.test(r))return parseFloat(r);if(void 0!==a[r])return a[r]}return parseFloat(r)})),u===c&&t.push(1),o=d||void 0===t[s]?1:t[s],t=t.slice(0,s)}else r.length>10&&/[0-9](?:\s|\/)/.test(r)&&(t=r.match(/([0-9]+)/g).map((function(r){return parseFloat(r)})),n=r.match(/([a-z])/gi).join("").toLowerCase());else isNaN(r)?Array.isArray(r)||r.length?(t=[r[0],r[1],r[2]],n="rgb",o=4===r.length?r[3]:1):r instanceof Object&&(null!=r.r||null!=r.red||null!=r.R?(n="rgb",t=[r.r||r.red||r.R||0,r.g||r.green||r.G||0,r.b||r.blue||r.B||0]):(n="hsl",t=[r.h||r.hue||r.H||0,r.s||r.saturation||r.S||0,r.l||r.lightness||r.L||r.b||r.brightness]),o=r.a||r.alpha||r.opacity||1,null!=r.opacity&&(o/=100)):(n="rgb",t=[r>>>16,(65280&r)>>>8,255&r]);return{space:n,values:t,alpha:o}};var a={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},53576:function(r,e,n){"use strict";var i=n(19336);r.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(r){var e,n,i,a,t,o=r[0]/360,c=r[1]/100,u=r[2]/100;if(0===c)return[t=255*u,t,t];e=2*u-(n=u<.5?u*(1+c):u+c-u*c),a=[0,0,0];for(var d=0;d<3;d++)(i=o+1/3*-(d-1))<0?i++:i>1&&i--,t=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[d]=255*t;return a}},i.hsl=function(r){var e,n,i=r[0]/255,a=r[1]/255,t=r[2]/255,o=Math.min(i,a,t),c=Math.max(i,a,t),u=c-o;return c===o?e=0:i===c?e=(a-t)/u:a===c?e=2+(t-i)/u:t===c&&(e=4+(i-a)/u),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+c)/2,[e,100*(c===o?0:n<=.5?u/(c+o):u/(2-c-o)),100*n]}},19336:function(r){"use strict";r.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(r){r.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|\xe7)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|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)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|\xe3)o.?tom(e|\xe9)",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"}},42771:function(r,e,n){"use strict";r.exports={parse:n(46416),stringify:n(49395)}},8744:function(r,e,n){"use strict";var i=n(30584);r.exports={isSize:function(r){return/^[\d\.]/.test(r)||-1!==r.indexOf("/")||-1!==i.indexOf(r)}}},46416:function(r,e,n){"use strict";var i=n(92384),a=n(68194),t=n(3748),o=n(2904),c=n(47916),u=n(7294),d=n(39956),s=n(8744).isSize;r.exports=m;var l=m.cache={};function m(r){if("string"!==typeof r)throw new Error("Font argument must be a string.");if(l[r])return l[r];if(""===r)throw new Error("Cannot parse an empty string.");if(-1!==t.indexOf(r))return l[r]={system:r};for(var e,n={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},m=d(r,/\s+/);e=m.shift();){if(-1!==a.indexOf(e))return["style","variant","weight","stretch"].forEach((function(r){n[r]=e})),l[r]=n;if(-1===c.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===u.indexOf(e)){if(-1===o.indexOf(e)){if(s(e)){var I=d(e,"/");if(n.size=I[0],null!=I[1]?n.lineHeight=p(I[1]):"/"===m[0]&&(m.shift(),n.lineHeight=p(m.shift())),!m.length)throw new Error("Missing required font-family.");return n.family=d(m.join(" "),/\s*,\s*/).map(i),l[r]=n}throw new Error("Unknown or unsupported font token: "+e)}n.weight=e}else n.stretch=e;else n.variant=e;else n.style=e}throw new Error("Missing required font-size.")}function p(r){var e=parseFloat(r);return e.toString()===r?e:r}},49395:function(r,e,n){"use strict";var i=n(55616),a=n(8744).isSize,t=y(n(68194)),o=y(n(3748)),c=y(n(2904)),u=y(n(47916)),d=y(n(7294)),s={normal:1,"small-caps":1},l={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},m="1rem",p="serif";function I(r,e){if(r&&!e[r]&&!t[r])throw Error("Unknown keyword `"+r+"`");return r}function y(r){for(var e={},n=0;ne?1:r>=e?0:NaN}n.d(e,{XE:function(){return i},kv:function(){return o},mo:function(){return u},Uf:function(){return d},SY:function(){return s},ik:function(){return l},oh:function(){return m}});var a=function(r){var e;return 1===r.length&&(e=r,r=function(r,n){return i(e(r),n)}),{left:function(e,n,i,a){for(null==i&&(i=0),null==a&&(a=e.length);i>>1;r(e[t],n)<0?i=t+1:a=t}return i},right:function(e,n,i,a){for(null==i&&(i=0),null==a&&(a=e.length);i>>1;r(e[t],n)>0?a=t:i=t+1}return i}}}(i),t=(a.right,a.left,Array.prototype);function o(r,e){var n,i,a=r.length,t=-1;if(null==e){for(;++t=n)for(i=n;++ti&&(i=n)}else for(;++t=n)for(i=n;++ti&&(i=n);return i}function c(r){return null===r?NaN:+r}function u(r,e){var n,i=r.length,a=i,t=-1,o=0;if(null==e)for(;++t=0;)for(e=(i=r[a]).length;--e>=0;)n[--o]=i[e];return n}function s(r,e){var n,i,a=r.length,t=-1;if(null==e){for(;++t=n)for(i=n;++tn&&(i=n)}else for(;++t=n)for(i=n;++tn&&(i=n);return i}function l(r,e,n){r=+r,e=+e,n=(a=arguments.length)<2?(e=r,r=0,1):a<3?1:+n;for(var i=-1,a=0|Math.max(0,Math.ceil((e-r)/n)),t=new Array(a);++i=i.length)return null!=r&&n.sort(r),null!=e?e(n):n;for(var d,s,l,m=-1,p=n.length,I=i[a++],y=o(),f=c();++mi.length)return r;var t,o=a[n-1];return null!=e&&n>=i.length?t=r.entries():(t=[],r.each((function(r,e){t.push({key:e,values:c(r,n)})}))),null!=o?t.sort((function(r,e){return o(r.key,e.key)})):t}return n={object:function(r){return t(r,0,u,d)},map:function(r){return t(r,0,s,l)},entries:function(r){return c(t(r,0,s,l),0)},key:function(r){return i.push(r),n},sortKeys:function(r){return a[i.length-1]=r,n},sortValues:function(e){return r=e,n},rollup:function(r){return e=r,n}}}function u(){return{}}function d(r,e,n){r[e]=n}function s(){return o()}function l(r,e,n){r.set(e,n)}function m(){}var p=o.prototype;m.prototype=function(r,e){var n=new m;if(r instanceof m)r.each((function(r){n.add(r)}));else if(r){var i=-1,a=r.length;if(null==e)for(;++i=(t=(y+g)/2))?y=t:g=t,(s=n>=(o=(f+_)/2))?f=o:_=o,a=p,!(p=p[l=s<<1|d]))return a[l]=I,r;if(c=+r._x.call(null,p.data),u=+r._y.call(null,p.data),e===c&&n===u)return I.next=p,a?a[l]=I:r._root=I,r;do{a=a?a[l]=new Array(4):r._root=new Array(4),(d=e>=(t=(y+g)/2))?y=t:g=t,(s=n>=(o=(f+_)/2))?f=o:_=o}while((l=s<<1|d)===(m=(u>=o)<<1|c>=t));return a[m]=p,a[l]=I,r}function c(r,e,n,i,a){this.node=r,this.x0=e,this.y0=n,this.x1=i,this.y1=a}function u(r){return r[0]}function d(r){return r[1]}function s(r,e,n){var i=new l(null==e?u:e,null==n?d:n,NaN,NaN,NaN,NaN);return null==r?i:i.addAll(r)}function l(r,e,n,i,a,t){this._x=r,this._y=e,this._x0=n,this._y0=i,this._x1=a,this._y1=t,this._root=void 0}function m(r){for(var e={data:r.data},n=e;r=r.next;)n=n.next={data:r.data};return e}n.r(e),n.d(e,{forceCenter:function(){return i},forceCollide:function(){return f},forceLink:function(){return v},forceManyBody:function(){return Y},forceRadial:function(){return X},forceSimulation:function(){return q},forceX:function(){return Q},forceY:function(){return $}});var p=s.prototype=l.prototype;function I(r){return r.x+r.vx}function y(r){return r.y+r.vy}function f(r){var e,n,i=1,o=1;function c(){for(var r,a,c,d,l,m,p,f=e.length,g=0;gd+I||al+I||oc.index){var y=d-u.x-u.vx,f=l-u.y-u.vy,g=y*y+f*f;gr.r&&(r.r=r[e].r)}function d(){if(e){var i,a,t=e.length;for(n=new Array(t),i=0;il&&(l=i),am&&(m=a));if(d>l||s>m)return this;for(this.cover(d,s).cover(l,m),n=0;nr||r>=a||i>e||e>=t;)switch(c=(ep||(t=d.y0)>I||(o=d.x1)=_)<<1|r>=g)&&(d=y[y.length-1],y[y.length-1]=y[y.length-1-s],y[y.length-1-s]=d)}else{var h=r-+this._x.call(null,f.data),v=e-+this._y.call(null,f.data),x=h*h+v*v;if(x=(c=(I+f)/2))?I=c:f=c,(s=o>=(u=(y+g)/2))?y=u:g=u,e=p,!(p=p[l=s<<1|d]))return this;if(!p.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,m=l)}for(;p.data!==r;)if(i=p,!(p=p.next))return this;return(a=p.next)&&delete p.next,i?(a?i.next=a:delete i.next,this):e?(a?e[l]=a:delete e[l],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[m]=p:this._root=p),this):(this._root=a,this)},p.removeAll=function(r){for(var e=0,n=r.length;e=0&&(e=r.slice(n+1),r=r.slice(0,n)),r&&!i.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:e}}))),o=-1,c=t.length;if(!(arguments.length<2)){if(null!=e&&"function"!==typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var n,i,a=new Array(n),t=0;t=0&&e._call.call(null,r),e=e._next;--B}()}finally{B=0,function(){for(var r,e,n=A,i=1/0;n;)n._call?(i>n._time&&(i=n._time),r=n,n=n._next):(e=n._next,n._next=null,n=r?r._next=e:A=e);b=r,K(i)}(),R=0}}function O(){var r=N.now(),e=r-w;e>z&&(E-=e,w=r)}function K(r){B||(k&&(k=clearTimeout(k)),r-R>24?(r<1/0&&(k=setTimeout(L,r-N.now()-E)),F&&(F=clearInterval(F))):(F||(w=N.now(),F=setInterval(O,z)),B=1,T(L)))}function V(r){return r.x}function j(r){return r.y}U.prototype=H.prototype={constructor:U,restart:function(r,e,n){if("function"!==typeof r)throw new TypeError("callback is not a function");n=(null==n?D():+n)+(null==e?0:+e),this._next||b===this||(b?b._next=this:A=this,b=this),this._call=r,this._time=n,K()},stop:function(){this._call&&(this._call=null,this._time=1/0,K())}};var W=10,Z=Math.PI*(3-Math.sqrt(5));function q(r){var e,n=1,i=.001,a=1-Math.pow(i,1/300),t=0,o=.6,c=(0,g.kH)(),u=H(s),d=M("tick","end");function s(){l(),d.call("tick",e),n1?(null==n?c.remove(r):c.set(r,p(n)),e):c.get(r)},find:function(e,n,i){var a,t,o,c,u,d=0,s=r.length;for(null==i?i=1/0:i*=i,d=0;d1?(d.on(r,n),e):d.on(r)}}}function Y(){var r,e,n,i,o=a(-30),c=1,u=1/0,d=.81;function l(i){var a,t=r.length,o=s(r,V,j).visitAfter(p);for(n=i,a=0;a=u)){(r.data!==e||r.next)&&(0===l&&(I+=(l=t())*l),0===m&&(I+=(m=t())*m),I1?i[0]+i.slice(2):i,+r.slice(n+1)]}n.d(e,{E9:function(){return m},SO:function(){return y}});var a,t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(r){if(!(e=t.exec(r)))throw new Error("invalid format: "+r);var e;return new c({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function c(r){this.fill=void 0===r.fill?" ":r.fill+"",this.align=void 0===r.align?">":r.align+"",this.sign=void 0===r.sign?"-":r.sign+"",this.symbol=void 0===r.symbol?"":r.symbol+"",this.zero=!!r.zero,this.width=void 0===r.width?void 0:+r.width,this.comma=!!r.comma,this.precision=void 0===r.precision?void 0:+r.precision,this.trim=!!r.trim,this.type=void 0===r.type?"":r.type+""}function u(r,e){var n=i(r,e);if(!n)return r+"";var a=n[0],t=n[1];return t<0?"0."+new Array(-t).join("0")+a:a.length>t+1?a.slice(0,t+1)+"."+a.slice(t+1):a+new Array(t-a.length+2).join("0")}o.prototype=c.prototype,c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var d={"%":function(r,e){return(100*r).toFixed(e)},b:function(r){return Math.round(r).toString(2)},c:function(r){return r+""},d:function(r){return Math.abs(r=Math.round(r))>=1e21?r.toLocaleString("en").replace(/,/g,""):r.toString(10)},e:function(r,e){return r.toExponential(e)},f:function(r,e){return r.toFixed(e)},g:function(r,e){return r.toPrecision(e)},o:function(r){return Math.round(r).toString(8)},p:function(r,e){return u(100*r,e)},r:u,s:function(r,e){var n=i(r,e);if(!n)return r+"";var t=n[0],o=n[1],c=o-(a=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,u=t.length;return c===u?t:c>u?t+new Array(c-u+1).join("0"):c>0?t.slice(0,c)+"."+t.slice(c):"0."+new Array(1-c).join("0")+i(r,Math.max(0,e+c-1))[0]},X:function(r){return Math.round(r).toString(16).toUpperCase()},x:function(r){return Math.round(r).toString(16)}};function s(r){return r}var l,m,p=Array.prototype.map,I=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function y(r){var e,n,t=void 0===r.grouping||void 0===r.thousands?s:(e=p.call(r.grouping,Number),n=r.thousands+"",function(r,i){for(var a=r.length,t=[],o=0,c=e[0],u=0;a>0&&c>0&&(u+c+1>i&&(c=Math.max(1,i-u)),t.push(r.substring(a-=c,a+c)),!((u+=c+1)>i));)c=e[o=(o+1)%e.length];return t.reverse().join(n)}),c=void 0===r.currency?"":r.currency[0]+"",u=void 0===r.currency?"":r.currency[1]+"",l=void 0===r.decimal?".":r.decimal+"",m=void 0===r.numerals?s:function(r){return function(e){return e.replace(/[0-9]/g,(function(e){return r[+e]}))}}(p.call(r.numerals,String)),y=void 0===r.percent?"%":r.percent+"",f=void 0===r.minus?"-":r.minus+"",g=void 0===r.nan?"NaN":r.nan+"";function _(r){var e=(r=o(r)).fill,n=r.align,i=r.sign,s=r.symbol,p=r.zero,_=r.width,h=r.comma,v=r.precision,x=r.trim,P=r.type;"n"===P?(h=!0,P="g"):d[P]||(void 0===v&&(v=12),x=!0,P="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var G="$"===s?c:"#"===s&&/[boxX]/.test(P)?"0"+P.toLowerCase():"",C="$"===s?u:/[%p]/.test(P)?y:"",S=d[P],A=/[defgprs%]/.test(P);function b(r){var o,c,u,d=G,s=C;if("c"===P)s=S(r)+s,r="";else{var y=(r=+r)<0||1/r<0;if(r=isNaN(r)?g:S(Math.abs(r),v),x&&(r=function(r){r:for(var e,n=r.length,i=1,a=-1;i0&&(a=0)}return a>0?r.slice(0,a)+r.slice(e+1):r}(r)),y&&0===+r&&"+"!==i&&(y=!1),d=(y?"("===i?i:f:"-"===i||"("===i?"":i)+d,s=("s"===P?I[8+a/3]:"")+s+(y&&"("===i?")":""),A)for(o=-1,c=r.length;++o(u=r.charCodeAt(o))||u>57){s=(46===u?l+r.slice(o+1):r.slice(o))+s,r=r.slice(0,o);break}}h&&!p&&(r=t(r,1/0));var b=d.length+r.length+s.length,M=b<_?new Array(_-b+1).join(e):"";switch(h&&p&&(r=t(M+r,M.length?_-s.length:1/0),M=""),n){case"<":r=d+r+s+M;break;case"=":r=d+M+r+s;break;case"^":r=M.slice(0,b=M.length>>1)+d+r+s+M.slice(b);break;default:r=M+d+r+s}return m(r)}return v=void 0===v?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),b.toString=function(){return r+""},b}return{format:_,formatPrefix:function(r,e){var n,a=_(((r=o(r)).type="f",r)),t=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=i(Math.abs(n)))?n[1]:NaN)/3)))),c=Math.pow(10,-t),u=I[8+t/3];return function(r){return a(c*r)+u}}}}l=y({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),m=l.format,l.formatPrefix},87108:function(r,e,n){"use strict";n.r(e),n.d(e,{geoAiry:function(){return E},geoAiryRaw:function(){return R},geoAitoff:function(){return T},geoAitoffRaw:function(){return N},geoArmadillo:function(){return J},geoArmadilloRaw:function(){return D},geoAugust:function(){return H},geoAugustRaw:function(){return U},geoBaker:function(){return V},geoBakerRaw:function(){return K},geoBerghaus:function(){return Z},geoBerghausRaw:function(){return W},geoBertin1953:function(){return nr},geoBertin1953Raw:function(){return er},geoBoggs:function(){return sr},geoBoggsRaw:function(){return dr},geoBonne:function(){return yr},geoBonneRaw:function(){return Ir},geoBottomley:function(){return gr},geoBottomleyRaw:function(){return fr},geoBromley:function(){return hr},geoBromleyRaw:function(){return _r},geoChamberlin:function(){return Mr},geoChamberlinAfrica:function(){return br},geoChamberlinRaw:function(){return Sr},geoCollignon:function(){return kr},geoCollignonRaw:function(){return Br},geoCraig:function(){return zr},geoCraigRaw:function(){return Fr},geoCraster:function(){return Er},geoCrasterRaw:function(){return Rr},geoCylindricalEqualArea:function(){return Tr},geoCylindricalEqualAreaRaw:function(){return Nr},geoCylindricalStereographic:function(){return Jr},geoCylindricalStereographicRaw:function(){return Dr},geoEckert1:function(){return Hr},geoEckert1Raw:function(){return Ur},geoEckert2:function(){return Or},geoEckert2Raw:function(){return Lr},geoEckert3:function(){return Vr},geoEckert3Raw:function(){return Kr},geoEckert4:function(){return Wr},geoEckert4Raw:function(){return jr},geoEckert5:function(){return qr},geoEckert5Raw:function(){return Zr},geoEckert6:function(){return Xr},geoEckert6Raw:function(){return Yr},geoEisenlohr:function(){return re},geoEisenlohrRaw:function(){return $r},geoFahey:function(){return ie},geoFaheyRaw:function(){return ne},geoFoucaut:function(){return te},geoFoucautRaw:function(){return ae},geoFoucautSinusoidal:function(){return ce},geoFoucautSinusoidalRaw:function(){return oe},geoGilbert:function(){return me},geoGingery:function(){return fe},geoGingeryRaw:function(){return pe},geoGinzburg4:function(){return he},geoGinzburg4Raw:function(){return _e},geoGinzburg5:function(){return xe},geoGinzburg5Raw:function(){return ve},geoGinzburg6:function(){return Ge},geoGinzburg6Raw:function(){return Pe},geoGinzburg8:function(){return Se},geoGinzburg8Raw:function(){return Ce},geoGinzburg9:function(){return be},geoGinzburg9Raw:function(){return Ae},geoGringorten:function(){return ke},geoGringortenQuincuncial:function(){return ta},geoGringortenRaw:function(){return Be},geoGuyou:function(){return Re},geoGuyouRaw:function(){return we},geoHammer:function(){return Q},geoHammerRaw:function(){return Y},geoHammerRetroazimuthal:function(){return De},geoHammerRetroazimuthalRaw:function(){return Ne},geoHealpix:function(){return We},geoHealpixRaw:function(){return Oe},geoHill:function(){return qe},geoHillRaw:function(){return Ze},geoHomolosine:function(){return en},geoHomolosineRaw:function(){return rn},geoHufnagel:function(){return an},geoHufnagelRaw:function(){return nn},geoHyperelliptical:function(){return un},geoHyperellipticalRaw:function(){return cn},geoInterrupt:function(){return ln},geoInterruptedBoggs:function(){return pn},geoInterruptedHomolosine:function(){return yn},geoInterruptedMollweide:function(){return gn},geoInterruptedMollweideHemispheres:function(){return hn},geoInterruptedQuarticAuthalic:function(){return li},geoInterruptedSinuMollweide:function(){return xn},geoInterruptedSinusoidal:function(){return Gn},geoKavrayskiy7:function(){return Sn},geoKavrayskiy7Raw:function(){return Cn},geoLagrange:function(){return bn},geoLagrangeRaw:function(){return An},geoLarrivee:function(){return kn},geoLarriveeRaw:function(){return Bn},geoLaskowski:function(){return zn},geoLaskowskiRaw:function(){return Fn},geoLittrow:function(){return Rn},geoLittrowRaw:function(){return wn},geoLoximuthal:function(){return Nn},geoLoximuthalRaw:function(){return En},geoMiller:function(){return Dn},geoMillerRaw:function(){return Tn},geoModifiedStereographic:function(){return Yn},geoModifiedStereographicAlaska:function(){return Vn},geoModifiedStereographicGs48:function(){return jn},geoModifiedStereographicGs50:function(){return Wn},geoModifiedStereographicLee:function(){return qn},geoModifiedStereographicMiller:function(){return Zn},geoModifiedStereographicRaw:function(){return Jn},geoMollweide:function(){return or},geoMollweideRaw:function(){return tr},geoMtFlatPolarParabolic:function(){return ri},geoMtFlatPolarParabolicRaw:function(){return $n},geoMtFlatPolarQuartic:function(){return ni},geoMtFlatPolarQuarticRaw:function(){return ei},geoMtFlatPolarSinusoidal:function(){return ai},geoMtFlatPolarSinusoidalRaw:function(){return ii},geoNaturalEarth:function(){return ti.c},geoNaturalEarth2:function(){return ci},geoNaturalEarth2Raw:function(){return oi},geoNaturalEarthRaw:function(){return ti.g},geoNellHammer:function(){return di},geoNellHammerRaw:function(){return ui},geoNicolosi:function(){return pi},geoNicolosiRaw:function(){return mi},geoPatterson:function(){return Ci},geoPattersonRaw:function(){return Gi},geoPeirceQuincuncial:function(){return oa},geoPierceQuincuncial:function(){return oa},geoPolyconic:function(){return Ai},geoPolyconicRaw:function(){return Si},geoPolyhedral:function(){return wi},geoPolyhedralButterfly:function(){return Ui},geoPolyhedralCollignon:function(){return Oi},geoPolyhedralWaterman:function(){return Ki},geoProject:function(){return qi},geoQuantize:function(){return ca},geoQuincuncial:function(){return aa},geoRectangularPolyconic:function(){return da},geoRectangularPolyconicRaw:function(){return ua},geoRobinson:function(){return ma},geoRobinsonRaw:function(){return la},geoSatellite:function(){return Ia},geoSatelliteRaw:function(){return pa},geoSinuMollweide:function(){return $e},geoSinuMollweideRaw:function(){return Qe},geoSinusoidal:function(){return pr},geoSinusoidalRaw:function(){return mr},geoStitch:function(){return wa},geoTimes:function(){return Ea},geoTimesRaw:function(){return Ra},geoTwoPointAzimuthal:function(){return Ja},geoTwoPointAzimuthalRaw:function(){return Ta},geoTwoPointAzimuthalUsa:function(){return Da},geoTwoPointEquidistant:function(){return La},geoTwoPointEquidistantRaw:function(){return Ua},geoTwoPointEquidistantUsa:function(){return Ha},geoVanDerGrinten:function(){return Ka},geoVanDerGrinten2:function(){return ja},geoVanDerGrinten2Raw:function(){return Va},geoVanDerGrinten3:function(){return Za},geoVanDerGrinten3Raw:function(){return Wa},geoVanDerGrinten4:function(){return Ya},geoVanDerGrinten4Raw:function(){return qa},geoVanDerGrintenRaw:function(){return Oa},geoWagner:function(){return Qa},geoWagner4:function(){return it},geoWagner4Raw:function(){return nt},geoWagner6:function(){return tt},geoWagner6Raw:function(){return at},geoWagner7:function(){return $a},geoWagnerRaw:function(){return Xa},geoWiechel:function(){return ct},geoWiechelRaw:function(){return ot},geoWinkel3:function(){return dt},geoWinkel3Raw:function(){return ut}});var i=n(87952),a=Math.abs,t=Math.atan,o=Math.atan2,c=(Math.ceil,Math.cos),u=Math.exp,d=Math.floor,s=Math.log,l=Math.max,m=Math.min,p=Math.pow,I=Math.round,y=Math.sign||function(r){return r>0?1:r<0?-1:0},f=Math.sin,g=Math.tan,_=1e-6,h=1e-12,v=Math.PI,x=v/2,P=v/4,G=Math.SQRT1_2,C=F(2),S=F(v),A=2*v,b=180/v,M=v/180;function B(r){return r>1?x:r<-1?-x:Math.asin(r)}function k(r){return r>1?0:r<-1?v:Math.acos(r)}function F(r){return r>0?Math.sqrt(r):0}function z(r){return(u(r)-u(-r))/2}function w(r){return(u(r)+u(-r))/2}function R(r){var e=g(r/2),n=2*s(c(r/2))/(e*e);function i(r,e){var i=c(r),a=c(e),t=f(e),o=a*i,u=-((1-o?s((1+o)/2)/(1-o):-.5)+n/(1+o));return[u*a*f(r),u*t]}return i.invert=function(e,i){var t,u=F(e*e+i*i),d=-r/2,l=50;if(!u)return[0,0];do{var m=d/2,p=c(m),I=f(m),y=I/p,g=-s(a(p));d-=t=(2/y*g-n*y-u)/(-g/(I*I)+1-n/(2*p*p))*(p<0?.7:1)}while(a(t)>_&&--l>0);var h=f(d);return[o(e*h,u*c(d)),B(i*h/u)]},i}function E(){var r=x,e=(0,i.U)(R),n=e(r);return n.radius=function(n){return arguments.length?e(r=n*M):r*b},n.scale(179.976).clipAngle(147)}function N(r,e){var n=c(e),i=function(r){return r?r/Math.sin(r):1}(k(n*c(r/=2)));return[2*n*f(r)*i,f(e)*i]}function T(){return(0,i.c)(N).scale(152.63)}function D(r){var e=f(r),n=c(r),i=r>=0?1:-1,t=g(i*r),u=(1+e-n)/2;function d(r,a){var d=c(a),s=c(r/=2);return[(1+d)*f(r),(i*a>-o(s,t)-.001?0:10*-i)+u+f(a)*n-(1+d)*e*s]}return d.invert=function(r,d){var s=0,l=0,m=50;do{var p=c(s),I=f(s),y=c(l),g=f(l),h=1+y,v=h*I-r,x=u+g*n-h*e*p-d,P=h*p/2,G=-I*g,C=e*h*I/2,S=n*y+e*p*g,A=G*C-S*P,b=(x*G-v*S)/A/2,M=(v*C-x*P)/A;a(M)>2&&(M/=2),s-=b,l-=M}while((a(b)>_||a(M)>_)&&--m>0);return i*l>-o(c(s),t)-.001?[2*s,l]:null},d}function J(){var r=20*M,e=r>=0?1:-1,n=g(e*r),a=(0,i.U)(D),t=a(r),u=t.stream;return t.parallel=function(i){return arguments.length?(n=g((e=(r=i*M)>=0?1:-1)*r),a(r)):r*b},t.stream=function(i){var a=t.rotate(),d=u(i),s=(t.rotate([0,0]),u(i)),l=t.precision();return t.rotate(a),d.sphere=function(){s.polygonStart(),s.lineStart();for(var i=-180*e;e*i<180;i+=90*e)s.point(i,90*e);if(r)for(;e*(i-=3*e*l)>=-180;)s.point(i,e*-o(c(i*M/2),n)*b);s.lineEnd(),s.polygonEnd()},d},t.scale(218.695).center([0,28.0974])}function U(r,e){var n=g(e/2),i=F(1-n*n),a=1+i*c(r/=2),t=f(r)*i/a,o=n/a,u=t*t,d=o*o;return[4/3*t*(3+u-3*d),4/3*o*(3+3*u-d)]}function H(){return(0,i.c)(U).scale(66.1603)}N.invert=function(r,e){if(!(r*r+4*e*e>v*v+_)){var n=r,i=e,t=25;do{var o,u=f(n),d=f(n/2),s=c(n/2),l=f(i),m=c(i),p=f(2*i),I=l*l,y=m*m,g=d*d,h=1-y*s*s,x=h?k(m*s)*F(o=1/h):o=0,P=2*x*m*d-r,G=x*l-e,C=o*(y*g+x*m*s*I),S=o*(.5*u*p-2*x*l*d),A=.25*o*(p*d-x*l*y*u),b=o*(I*s+x*g*m),M=S*A-b*C;if(!M)break;var B=(G*S-P*b)/M,z=(P*A-G*C)/M;n-=B,i-=z}while((a(B)>_||a(z)>_)&&--t>0);return[n,i]}},U.invert=function(r,e){if(e*=3/8,!(r*=3/8)&&a(e)>1)return null;var n=1+r*r+e*e,i=F((n-F(n*n-4*e*e))/2),t=B(i)/3,u=i?function(r){return s(r+F(r*r-1))}(a(e/i))/3:function(r){return s(r+F(r*r+1))}(a(r))/3,d=c(t),l=w(u),m=l*l-d*d;return[2*y(r)*o(z(u)*d,.25-m),2*y(e)*o(l*f(t),.25+m)]};var L=F(8),O=s(1+C);function K(r,e){var n=a(e);return nh&&--d>0);return[r/(c(o)*(L-1/f(o))),y(e)*o]};var j=n(69020);function W(r){var e=2*v/r;function n(r,n){var i=(0,j.O)(r,n);if(a(r)>x){var t=o(i[1],i[0]),u=F(i[0]*i[0]+i[1]*i[1]),d=e*I((t-x)/e)+x,s=o(f(t-=d),2-c(t));t=d+B(v/u*f(s))-s,i[0]=u*c(t),i[1]=u*f(t)}return i}return n.invert=function(r,n){var i=F(r*r+n*n);if(i>x){var a=o(n,r),u=e*I((a-x)/e)+x,d=a>u?-1:1,s=i*c(u-a),l=1/g(d*k((s-v)/F(v*(v-2*s)+i*i)));a=u+2*t((l+d*F(l*l-3))/3),r=i*c(a),n=i*f(a)}return j.O.invert(r,n)},n}function Z(){var r=5,e=(0,i.U)(W),n=e(r),a=n.stream,t=.01,u=-c(t*M),d=f(t*M);return n.lobes=function(n){return arguments.length?e(r=+n):r},n.stream=function(e){var i=n.rotate(),s=a(e),l=(n.rotate([0,0]),a(e));return n.rotate(i),s.sphere=function(){l.polygonStart(),l.lineStart();for(var e=0,n=360/r,i=2*v/r,a=90-180/r,s=x;e0&&a(i)>_);return c<0?NaN:n}function rr(r,e,n){return void 0===e&&(e=40),void 0===n&&(n=h),function(i,t,o,c){var u,d,s;o=void 0===o?0:+o,c=void 0===c?0:+c;for(var l=0;lu)o-=d/=2,c-=s/=2;else{u=y;var f=(o>0?-1:1)*n,g=(c>0?-1:1)*n,_=r(o+f,c),h=r(o,c+g),v=(_[0]-m[0])/f,x=(_[1]-m[1])/f,P=(h[0]-m[0])/g,G=(h[1]-m[1])/g,C=G*v-x*P,S=(a(C)<.5?.5:1)/C;if(o+=d=(I*P-p*G)*S,c+=s=(p*x-I*v)*S,a(d)0&&(a[1]*=1+t/1.5*a[0]*a[0]),a}return e.invert=rr(e),e}function nr(){return(0,i.c)(er()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function ir(r,e){var n,i=r*f(e),t=30;do{e-=n=(e+f(e)-i)/(1+c(e))}while(a(n)>_&&--t>0);return e/2}function ar(r,e,n){function i(i,a){return[r*i*c(a=ir(n,a)),e*f(a)]}return i.invert=function(i,a){return a=B(a/e),[i/(r*c(a)),B((2*a+f(2*a))/n)]},i}X.invert=function(r,e){var n=2*B(e/2);return[r*c(n/2)/c(n),n]};var tr=ar(C/x,C,v);function or(){return(0,i.c)(tr).scale(169.529)}var cr=2.00276,ur=1.11072;function dr(r,e){var n=ir(v,e);return[cr*r/(1/c(e)+ur/c(n)),(e+C*f(n))/cr]}function sr(){return(0,i.c)(dr).scale(160.857)}function lr(r){var e=0,n=(0,i.U)(r),a=n(e);return a.parallel=function(r){return arguments.length?n(e=r*M):e*b},a}function mr(r,e){return[r*c(e),e]}function pr(){return(0,i.c)(mr).scale(152.63)}function Ir(r){if(!r)return mr;var e=1/g(r);function n(n,i){var a=e+r-i,t=a?n*c(i)/a:a;return[a*f(t),e-a*c(t)]}return n.invert=function(n,i){var a=F(n*n+(i=e-i)*i),t=e+r-a;return[a/c(t)*o(n,i),t]},n}function yr(){return lr(Ir).scale(123.082).center([0,26.1441]).parallel(45)}function fr(r){function e(e,n){var i=x-n,a=i?e*r*f(i)/i:i;return[i*f(a)/r,x-i*c(a)]}return e.invert=function(e,n){var i=e*r,a=x-n,t=F(i*i+a*a),c=o(i,a);return[(t?t/f(t):1)*c/r,x-t]},e}function gr(){var r=.5,e=(0,i.U)(fr),n=e(r);return n.fraction=function(n){return arguments.length?e(r=+n):r},n.scale(158.837)}dr.invert=function(r,e){var n,i,t=cr*e,o=e<0?-P:P,u=25;do{i=t-C*f(o),o-=n=(f(2*o)+2*o-v*f(i))/(2*c(2*o)+2+v*c(i)*C*c(o))}while(a(n)>_&&--u>0);return i=t-C*f(o),[r*(1/c(i)+ur/c(o))/cr,i]},mr.invert=function(r,e){return[r/c(e),e]};var _r=ar(1,4/v,v);function hr(){return(0,i.c)(_r).scale(152.63)}var vr=n(24052),xr=n(92992);function Pr(r,e,n,i,t,u){var d,s=c(u);if(a(r)>1||a(u)>1)d=k(n*t+e*i*s);else{var l=f(r/2),m=f(u/2);d=2*B(F(l*l+e*i*m*m))}return a(d)>_?[d,o(i*f(u),e*t-n*i*s)]:[0,0]}function Gr(r,e,n){return k((r*r+e*e-n*n)/(2*r*e))}function Cr(r){return r-2*v*d((r+v)/(2*v))}function Sr(r,e,n){for(var i,a=[[r[0],r[1],f(r[1]),c(r[1])],[e[0],e[1],f(e[1]),c(e[1])],[n[0],n[1],f(n[1]),c(n[1])]],t=a[2],o=0;o<3;++o,t=i)i=a[o],t.v=Pr(i[1]-t[1],t[3],t[2],i[3],i[2],i[0]-t[0]),t.point=[0,0];var u=Gr(a[0].v[0],a[2].v[0],a[1].v[0]),d=Gr(a[0].v[0],a[1].v[0],a[2].v[0]),s=v-u;a[2].point[1]=0,a[0].point[0]=-(a[1].point[0]=a[0].v[0]/2);var l=[a[2].point[0]=a[0].point[0]+a[2].v[0]*c(u),2*(a[0].point[1]=a[1].point[1]=a[2].v[0]*f(u))];return function(r,e){var n,i=f(e),t=c(e),o=new Array(3);for(n=0;n<3;++n){var u=a[n];if(o[n]=Pr(e-u[1],u[3],u[2],t,i,r-u[0]),!o[n][0])return u.point;o[n][1]=Cr(o[n][1]-u.v[1])}var m=l.slice();for(n=0;n<3;++n){var p=2==n?0:n+1,I=Gr(a[n].v[0],o[n][0],o[p][0]);o[n][1]<0&&(I=-I),n?1==n?(I=d-I,m[0]-=o[n][0]*c(I),m[1]-=o[n][0]*f(I)):(I=s-I,m[0]+=o[n][0]*c(I),m[1]+=o[n][0]*f(I)):(m[0]+=o[n][0]*c(I),m[1]-=o[n][0]*f(I))}return m[0]/=3,m[1]/=3,m}}function Ar(r){return r[0]*=M,r[1]*=M,r}function br(){return Mr([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Mr(r,e,n){var a=(0,vr.c)({type:"MultiPoint",coordinates:[r,e,n]}),t=[-a[0],-a[1]],o=(0,xr.c)(t),c=Sr(Ar(o(r)),Ar(o(e)),Ar(o(n)));c.invert=rr(c);var u=(0,i.c)(c).rotate(t),d=u.center;return delete u.rotate,u.center=function(r){return arguments.length?d(o(r)):o.invert(d())},u.clipAngle(90)}function Br(r,e){var n=F(1-f(e));return[2/S*r*n,S*(1-n)]}function kr(){return(0,i.c)(Br).scale(95.6464).center([0,30])}function Fr(r){var e=g(r);function n(r,n){return[r,(r?r/f(r):1)*(f(n)*c(r)-e*c(n))]}return n.invert=e?function(r,n){r&&(n*=f(r)/r);var i=c(r);return[r,2*o(F(i*i+e*e-n*n)-i,e-n)]}:function(r,e){return[r,B(r?e*g(r)/r:e)]},n}function zr(){return lr(Fr).scale(249.828).clipAngle(90)}Br.invert=function(r,e){var n=(n=e/S-1)*n;return[n>0?r*F(v/n)/2:0,B(1-n)]};var wr=F(3);function Rr(r,e){return[wr*r*(2*c(2*e/3)-1)/S,wr*S*f(e/3)]}function Er(){return(0,i.c)(Rr).scale(156.19)}function Nr(r){var e=c(r);function n(r,n){return[r*e,f(n)/e]}return n.invert=function(r,n){return[r/e,B(n*e)]},n}function Tr(){return lr(Nr).parallel(38.58).scale(195.044)}function Dr(r){var e=c(r);function n(r,n){return[r*e,(1+e)*g(n/2)]}return n.invert=function(r,n){return[r/e,2*t(n/(1+e))]},n}function Jr(){return lr(Dr).scale(124.75)}function Ur(r,e){var n=F(8/(3*v));return[n*r*(1-a(e)/v),n*e]}function Hr(){return(0,i.c)(Ur).scale(165.664)}function Lr(r,e){var n=F(4-3*f(a(e)));return[2/F(6*v)*r*n,y(e)*F(2*v/3)*(2-n)]}function Or(){return(0,i.c)(Lr).scale(165.664)}function Kr(r,e){var n=F(v*(4+v));return[2/n*r*(1+F(1-4*e*e/(v*v))),4/n*e]}function Vr(){return(0,i.c)(Kr).scale(180.739)}function jr(r,e){var n=(2+x)*f(e);e/=2;for(var i=0,t=1/0;i<10&&a(t)>_;i++){var o=c(e);e-=t=(e+f(e)*(o+2)-n)/(2*o*(1+o))}return[2/F(v*(4+v))*r*(1+c(e)),2*F(v/(4+v))*f(e)]}function Wr(){return(0,i.c)(jr).scale(180.739)}function Zr(r,e){return[r*(1+c(e))/F(2+v),2*e/F(2+v)]}function qr(){return(0,i.c)(Zr).scale(173.044)}function Yr(r,e){for(var n=(1+x)*f(e),i=0,t=1/0;i<10&&a(t)>_;i++)e-=t=(e+f(e)-n)/(1+c(e));return n=F(2+v),[r*(1+c(e))/n,2*e/n]}function Xr(){return(0,i.c)(Yr).scale(173.044)}Rr.invert=function(r,e){var n=3*B(e/(wr*S));return[S*r/(wr*(2*c(2*n/3)-1)),n]},Ur.invert=function(r,e){var n=F(8/(3*v)),i=e/n;return[r/(n*(1-a(i)/v)),i]},Lr.invert=function(r,e){var n=2-a(e)/F(2*v/3);return[r*F(6*v)/(2*n),y(e)*B((4-n*n)/3)]},Kr.invert=function(r,e){var n=F(v*(4+v))/2;return[r*n/(1+F(1-e*e*(4+v)/(4*v))),e*n/2]},jr.invert=function(r,e){var n=e*F((4+v)/v)/2,i=B(n),a=c(i);return[r/(2/F(v*(4+v))*(1+a)),B((i+n*(a+2))/(2+x))]},Zr.invert=function(r,e){var n=F(2+v),i=e*n/2;return[n*r/(1+c(i)),i]},Yr.invert=function(r,e){var n=1+x,i=F(n/2);return[2*r*i/(1+c(e*=i)),B((e+f(e))/n)]};var Qr=3+2*C;function $r(r,e){var n=f(r/=2),i=c(r),a=F(c(e)),o=c(e/=2),u=f(e)/(o+C*i*a),d=F(2/(1+u*u)),l=F((C*o+(i+n)*a)/(C*o+(i-n)*a));return[Qr*(d*(l-1/l)-2*s(l)),Qr*(d*u*(l+1/l)-2*t(u))]}function re(){return(0,i.c)($r).scale(62.5271)}$r.invert=function(r,e){if(!(n=U.invert(r/1.2,1.065*e)))return null;var n,i=n[0],o=n[1],u=20;r/=Qr,e/=Qr;do{var d=i/2,p=o/2,I=f(d),y=c(d),g=f(p),h=c(p),v=c(o),P=F(v),S=g/(h+C*y*P),A=S*S,b=F(2/(1+A)),M=(C*h+(y+I)*P)/(C*h+(y-I)*P),B=F(M),k=B-1/B,z=B+1/B,w=b*k-2*s(B)-r,R=b*S*z-2*t(S)-e,E=g&&G*P*I*A/g,N=(C*y*h+P)/(2*(h+C*y*P)*(h+C*y*P)*P),T=-.5*S*b*b*b,D=T*E,J=T*N,H=(H=2*h+C*P*(y-I))*H*B,L=(C*y*h*P+v)/H,O=-C*I*g/(P*H),K=k*D-2*L/B+b*(L+L/M),V=k*J-2*O/B+b*(O+O/M),j=S*z*D-2*E/(1+A)+b*z*E+b*S*(L-L/M),W=S*z*J-2*N/(1+A)+b*z*N+b*S*(O-O/M),Z=V*j-W*K;if(!Z)break;var q=(R*V-w*W)/Z,Y=(w*j-R*K)/Z;i-=q,o=l(-x,m(x,o-Y))}while((a(q)>_||a(Y)>_)&&--u>0);return a(a(o)-x)<_?[0,o]:u&&[i,o]};var ee=c(35*M);function ne(r,e){var n=g(e/2);return[r*ee*F(1-n*n),(1+ee)*n]}function ie(){return(0,i.c)(ne).scale(137.152)}function ae(r,e){var n=e/2,i=c(n);return[2*r/S*c(e)*i*i,S*g(n)]}function te(){return(0,i.c)(ae).scale(135.264)}function oe(r){var e=1-r,n=a(v,0)[0]-a(-v,0)[0],i=F(2*(a(0,x)[1]-a(0,-x)[1])/n);function a(n,i){var a=c(i),t=f(i);return[a/(e+r*a)*n,e*i+r*t]}function t(r,e){var n=a(r,e);return[n[0]*i,n[1]/i]}function o(r){return t(0,r)[1]}return t.invert=function(n,a){var t=$(o,a);return[n/i*(r+e/c(t)),t]},t}function ce(){var r=.5,e=(0,i.U)(oe),n=e(r);return n.alpha=function(n){return arguments.length?e(r=+n):r},n.scale(168.725)}ne.invert=function(r,e){var n=e/(1+ee);return[r&&r/(ee*F(1-n*n)),2*t(n)]},ae.invert=function(r,e){var n=t(e/S),i=c(n),a=2*n;return[r*S/2/(c(a)*i*i),a]};var ue=n(4888),de=n(69604);function se(r){return[r[0]/2,B(g(r[1]/2*M))*b]}function le(r){return[2*r[0],2*t(f(r[1]*M))*b]}function me(r){null==r&&(r=ue.c);var e=r(),n=(0,de.c)().scale(b).precision(0).clipAngle(null).translate([0,0]);function i(r){return e(se(r))}function a(r){i[r]=function(){return arguments.length?(e[r].apply(e,arguments),i):e[r]()}}return e.invert&&(i.invert=function(r){return le(e.invert(r))}),i.stream=function(r){var i=e.stream(r),a=n.stream({point:function(r,e){i.point(r/2,B(g(-e/2*M))*b)},lineStart:function(){i.lineStart()},lineEnd:function(){i.lineEnd()},polygonStart:function(){i.polygonStart()},polygonEnd:function(){i.polygonEnd()}});return a.sphere=i.sphere,a},i.rotate=function(r){return arguments.length?(n.rotate(r),i):n.rotate()},i.center=function(r){return arguments.length?(e.center(se(r)),i):le(e.center())},a("angle"),a("clipAngle"),a("clipExtent"),a("fitExtent"),a("fitHeight"),a("fitSize"),a("fitWidth"),a("scale"),a("translate"),a("precision"),i.scale(249.5)}function pe(r,e){var n=2*v/e,i=r*r;function t(e,t){var u=(0,j.O)(e,t),d=u[0],s=u[1],l=d*d+s*s;if(l>i){var m=F(l),p=o(s,d),y=n*I(p/n),g=p-y,h=r*c(g),P=(r*f(g)-g*f(h))/(x-h),G=Ie(g,P),C=(v-r)/ye(G,h,v);d=m;var S,A=50;do{d-=S=(r+ye(G,h,d)*C-m)/(G(d)*C)}while(a(S)>_&&--A>0);s=g*f(d),di){var d=F(u),s=o(t,e),l=n*I(s/n),m=s-l;e=d*c(m),t=d*f(m);for(var p=e-x,y=f(e),g=t/y,_=e_||a(p)>_)&&--g>0);return[I,y]},s}var _e=ge(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function he(){return(0,i.c)(_e).scale(149.995)}var ve=ge(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function xe(){return(0,i.c)(ve).scale(153.93)}var Pe=ge(5/6*v,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Ge(){return(0,i.c)(Pe).scale(130.945)}function Ce(r,e){var n=r*r,i=e*e;return[r*(1-.162388*i)*(.87-952426e-9*n*n),e*(1+i/12)]}function Se(){return(0,i.c)(Ce).scale(131.747)}Ce.invert=function(r,e){var n,i=r,t=e,o=50;do{var c=t*t;t-=n=(t*(1+c/12)-e)/(1+c/4)}while(a(n)>_&&--o>0);o=50,r/=1-.162388*c;do{var u=(u=i*i)*u;i-=n=(i*(.87-952426e-9*u)-r)/(.87-.00476213*u)}while(a(n)>_&&--o>0);return[i,t]};var Ae=ge(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function be(){return(0,i.c)(Ae).scale(131.087)}function Me(r){var e=r(x,0)[0]-r(-x,0)[0];function n(n,i){var a=n>0?-.5:.5,t=r(n+a*v,i);return t[0]-=a*e,t}return r.invert&&(n.invert=function(n,i){var a=n>0?-.5:.5,t=r.invert(n+a*e,i),o=t[0]-a*v;return o<-v?o+=2*v:o>v&&(o-=2*v),t[0]=o,t}),n}function Be(r,e){var n=y(r),i=y(e),t=c(e),u=c(r)*t,d=f(r)*t,s=f(i*e);r=a(o(d,s)),e=B(u),a(r-x)>_&&(r%=x);var l=function(r,e){if(e===x)return[0,0];var n,i,t=f(e),o=t*t,u=o*o,d=1+u,s=1+3*u,l=1-u,m=B(1/F(d)),p=l+o*d*m,I=(1-t)/p,y=F(I),g=I*d,h=F(g),P=y*l;if(0===r)return[0,-(P+o*h)];var G,C=c(e),S=1/C,A=2*t*C,b=(-3*o+m*s)*A,M=(-p*C-(1-t)*b)/(p*p),k=o*d*M+I*s*A,z=-S*A,w=-S*k,R=-2*S*(l*(.5*M/y)-2*o*y*A),E=4*r/v;if(r>.222*v||e.175*v){if(n=(P+o*F(g*(1+u)-P*P))/(1+u),r>v/4)return[n,n];var N=n,T=.5*n;n=.5*(T+N),i=50;do{var D=n*(R+z*F(g-n*n))+w*B(n/h)-E;if(!D)break;D<0?T=n:N=n,n=.5*(T+N)}while(a(N-T)>_&&--i>0)}else{n=_,i=25;do{var J=n*n,U=F(g-J),H=R+z*U,L=n*H+w*B(n/h)-E;n-=G=U?L/(H+(w-z*J)/U):0}while(a(G)>_&&--i>0)}return[n,-P-o*F(g-n*n)]}(r>v/4?x-r:r,e);return r>v/4&&(s=l[0],l[0]=-l[1],l[1]=-s),l[0]*=n,l[1]*=-i,l}function ke(){return(0,i.c)(Me(Be)).scale(239.75)}function Fe(r,e){var n,i,o,d,s,l;if(e<_)return[(d=f(r))-(n=e*(r-d*(i=c(r)))/4)*i,i+n*d,1-e*d*d/2,r-n];if(e>=1-_)return n=(1-e)/4,o=1/(i=w(r)),[(d=((l=u(2*(l=r)))-1)/(l+1))+n*((s=i*z(r))-r)/(i*i),o-n*d*o*(s-r),o+n*d*o*(s+r),2*t(u(r))-x+n*(s-r)/i];var m=[1,0,0,0,0,0,0,0,0],p=[F(e),0,0,0,0,0,0,0,0],I=0;for(i=F(1-e),s=1;a(p[I]/m[I])>_&&I<8;)n=m[I++],p[I]=(n-i)/2,m[I]=(n+i)/2,i=F(n*i),s*=2;o=s*m[I]*r;do{o=(B(d=p[I]*f(i=o)/m[I])+o)/2}while(--I);return[f(o),d=c(o),d/c(o-i),o]}function ze(r,e){if(!e)return r;if(1===e)return s(g(r/2+P));for(var n=1,i=F(1-e),o=F(e),c=0;a(o)>_;c++){if(r%v){var u=t(i*g(r)/n);u<0&&(u+=v),r+=u+~~(r/v)*v}else r+=r;o=(n+i)/2,i=F(n*i),o=((n=o)-i)/2}return r/(p(2,c)*n)}function we(r,e){var n=(C-1)/(C+1),i=F(1-n*n),d=ze(x,i*i),l=s(g(v/4+a(e)/2)),m=u(-1*l)/F(n),p=function(r,e){var n=r*r,i=e+1,a=1-n-e*e;return[.5*((r>=0?x:-x)-o(a,2*r)),-.25*s(a*a+4*n)+.5*s(i*i+n)]}(m*c(-1*r),m*f(-1*r)),I=function(r,e,n){var i=a(r),o=z(a(e));if(i){var c=1/f(i),u=1/(g(i)*g(i)),d=-(u+n*(o*o*c*c)-1+n),s=(-d+F(d*d-(n-1)*u*4))/2;return[ze(t(1/F(s)),n)*y(r),ze(t(F((s/u-1)/n)),1-n)*y(e)]}return[0,ze(t(o),1-n)*y(e)]}(p[0],p[1],i*i);return[-I[1],(e>=0?1:-1)*(.5*d-I[0])]}function Re(){return(0,i.c)(Me(we)).scale(151.496)}Be.invert=function(r,e){a(r)>1&&(r=2*y(r)-r),a(e)>1&&(e=2*y(e)-e);var n=y(r),i=y(e),t=-n*r,u=-i*e,d=u/t<1,s=function(r,e){for(var n=0,i=1,t=.5,o=50;;){var u=t*t,d=F(t),s=B(1/F(1+u)),l=1-u+t*(1+u)*s,m=(1-d)/l,p=F(m),I=m*(1+u),y=p*(1-u),f=F(I-r*r),g=e+y+t*f;if(a(i-n)0?n=t:i=t,t=.5*(n+i)}if(!o)return null;var _=B(d),x=c(_),P=1/x,G=2*d*x,C=(-l*x-(-3*t+s*(1+3*u))*G*(1-d))/(l*l),S=.5*C/p,A=(1-u)*S-2*t*p*G;return[v/4*(r*(-2*P*A+-P*G*f)+-P*(t*(1+u)*C+m*(1+3*u)*G)*B(r/F(I))),_]}(d?u:t,d?t:u),l=s[0],m=s[1],p=c(m);return d&&(l=-x-l),[n*(o(f(l)*p,-f(m))+v),i*B(c(l)*p)]},we.invert=function(r,e){var n=(C-1)/(C+1),i=F(1-n*n),a=function(r,e,n){var i,a,t;return r?(i=Fe(r,n),e?(t=(a=Fe(e,1-n))[1]*a[1]+n*i[0]*i[0]*a[0]*a[0],[[i[0]*a[2]/t,i[1]*i[2]*a[0]*a[1]/t],[i[1]*a[1]/t,-i[0]*i[2]*a[0]*a[2]/t],[i[2]*a[1]*a[2]/t,-n*i[0]*i[1]*a[0]/t]]):[[i[0],0],[i[1],0],[i[2],0]]):[[0,(a=Fe(e,1-n))[0]/a[1]],[1/a[1],0],[a[2]/a[1],0]]}(.5*ze(x,i*i)-e,-r,i*i),c=function(r,e){var n=e[0]*e[0]+e[1]*e[1];return[(r[0]*e[0]+r[1]*e[1])/n,(r[1]*e[0]-r[0]*e[1])/n]}(a[0],a[1]);return[o(c[1],c[0])/-1,2*t(u(-.5*s(n*c[0]*c[0]+n*c[1]*c[1])))-x]};var Ee=n(61780);function Ne(r){var e=f(r),n=c(r),i=Te(r);function t(r,t){var o=i(r,t);r=o[0],t=o[1];var u=f(t),d=c(t),s=c(r),l=k(e*u+n*d*s),m=f(l),p=a(m)>_?l/m:1;return[p*n*f(r),(a(r)>x?p:-p)*(e*d-n*u*s)]}return i.invert=Te(-r),t.invert=function(r,n){var a=F(r*r+n*n),t=-f(a),u=c(a),d=a*u,s=-n*t,l=a*e,m=F(d*d+s*s-l*l),p=o(d*l+s*m,s*l-d*m),I=(a>x?-1:1)*o(r*t,a*c(p)*u+n*f(p)*t);return i.invert(I,p)},t}function Te(r){var e=f(r),n=c(r);return function(r,i){var a=c(i),t=c(r)*a,u=f(r)*a,d=f(i);return[o(u,t*n-d*e),B(d*n+t*e)]}}function De(){var r=0,e=(0,i.U)(Ne),n=e(r),a=n.rotate,t=n.stream,o=(0,Ee.c)();return n.parallel=function(i){if(!arguments.length)return r*b;var a=n.rotate();return e(r=i*M).rotate(a)},n.rotate=function(e){return arguments.length?(a.call(n,[e[0],e[1]-r*b]),o.center([-e[0],-e[1]]),n):((e=a.call(n))[1]+=r*b,e)},n.stream=function(r){return(r=t(r)).sphere=function(){r.polygonStart();var e,n=o.radius(89.99)().coordinates[0],i=n.length-1,a=-1;for(r.lineStart();++a=0;)r.point((e=n[a])[0],e[1]);r.lineEnd(),r.polygonEnd()},r},n.scale(79.4187).parallel(45).clipAngle(179.999)}var Je=n(84706),Ue=n(16016),He=B(1-1/3)*b,Le=Nr(0);function Oe(r){var e=He*M,n=Br(v,e)[0]-Br(-v,e)[0],i=Le(0,e)[1],t=Br(0,e)[1],o=S-t,c=A/r,u=4/A,s=i+o*o*4/A;function p(p,I){var y,f=a(I);if(f>e){var g=m(r-1,l(0,d((p+v)/c)));(y=Br(p+=v*(r-1)/r-g*c,f))[0]=y[0]*A/n-A*(r-1)/(2*r)+g*A/r,y[1]=i+4*(y[1]-t)*o/A,I<0&&(y[1]=-y[1])}else y=Le(p,I);return y[0]*=u,y[1]/=s,y}return p.invert=function(e,p){e/=u;var I=a(p*=s);if(I>i){var y=m(r-1,l(0,d((e+v)/c)));e=(e+v*(r-1)/r-y*c)*n/A;var f=Br.invert(e,.25*(I-i)*A/o+t);return f[0]-=v*(r-1)/r-y*c,p<0&&(f[1]=-f[1]),f}return Le.invert(e,p)},p}function Ke(r,e){return[r,1&e?90-_:He]}function Ve(r,e){return[r,1&e?-90+_:-He]}function je(r){return[r[0]*(1-_),r[1]]}function We(){var r=4,e=(0,i.U)(Oe),n=e(r),a=n.stream;return n.lobes=function(n){return arguments.length?e(r=+n):r},n.stream=function(e){var i=n.rotate(),t=a(e),o=(n.rotate([0,0]),a(e));return n.rotate(i),t.sphere=function(){(0,Ue.c)(function(r){var e=[].concat((0,Je.ik)(-180,180+r/2,r).map(Ke),(0,Je.ik)(180,-180-r/2,-r).map(Ve));return{type:"Polygon",coordinates:[180===r?e.map(je):e]}}(180/r),o)},t},n.scale(239.75)}function Ze(r){var e,n=1+r,i=B(f(1/n)),t=2*F(v/(e=v+4*i*n)),u=.5*t*(n+F(r*(2+r))),d=r*r,s=n*n;function l(l,m){var p,I,y=1-f(m);if(y&&y<2){var g,_=x-m,P=25;do{var G=f(_),C=c(_),S=i+o(G,n-C),A=1+s-2*n*C;_-=g=(_-d*i-n*G+A*S-.5*y*e)/(2*n*G*S)}while(a(g)>h&&--P>0);p=t*F(A),I=l*S/v}else p=t*(r+y),I=l*i/v;return[p*f(I),u-p*c(I)]}return l.invert=function(r,a){var c=r*r+(a-=u)*a,l=(1+s-c/(t*t))/(2*n),m=k(l),p=f(m),I=i+o(p,n-l);return[B(r/F(c))*v/I,B(1-2*(m-d*i-n*p+(1+s-2*n*l)*I)/e)]},l}function qe(){var r=1,e=(0,i.U)(Ze),n=e(r);return n.ratio=function(n){return arguments.length?e(r=+n):r},n.scale(167.774).center([0,18.67])}var Ye=.7109889596207567,Xe=.0528035274542;function Qe(r,e){return e>-Ye?((r=tr(r,e))[1]+=Xe,r):mr(r,e)}function $e(){return(0,i.c)(Qe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function rn(r,e){return a(e)>Ye?((r=tr(r,e))[1]-=e>0?Xe:-Xe,r):mr(r,e)}function en(){return(0,i.c)(rn).scale(152.63)}function nn(r,e,n,i){var a=F(4*v/(2*n+(1+r-e/2)*f(2*n)+(r+e)/2*f(4*n)+e/2*f(6*n))),t=F(i*f(n)*F((1+r*c(2*n)+e*c(4*n))/(1+r+e))),o=n*d(1);function u(n){return F(1+r*c(2*n)+e*c(4*n))}function d(i){var a=i*n;return(2*a+(1+r-e/2)*f(2*a)+(r+e)/2*f(4*a)+e/2*f(6*a))/n}function s(r){return u(r)*f(r)}var l=function(r,e){var i=n*$(d,o*f(e)/n,e/v);isNaN(i)&&(i=n*y(e));var s=a*u(i);return[s*t*r/v*c(i),s/t*f(i)]};return l.invert=function(r,e){var i=$(s,e*t/a);return[r*v/(c(i)*a*t*u(i)),B(n*d(i/n)/o)]},0===n&&(a=F(i/v),(l=function(r,e){return[r*a,f(e)/a]}).invert=function(r,e){return[r/a,B(e*a)]}),l}function an(){var r=1,e=0,n=45*M,a=2,t=(0,i.U)(nn),o=t(r,e,n,a);return o.a=function(i){return arguments.length?t(r=+i,e,n,a):r},o.b=function(i){return arguments.length?t(r,e=+i,n,a):e},o.psiMax=function(i){return arguments.length?t(r,e,n=+i*M,a):n*b},o.ratio=function(i){return arguments.length?t(r,e,n,a=+i):a},o.scale(180.739)}function tn(r,e,n,i,a,t,o,c,u,d,s){if(s.nanEncountered)return NaN;var l,m,p,I,y,f,g,_,h,v;if(m=r(e+.25*(l=n-e)),p=r(n-.25*l),isNaN(m))s.nanEncountered=!0;else{if(!isNaN(p))return v=((f=(I=l*(i+4*m+a)/12)+(y=l*(a+4*p+t)/12))-o)/15,d>u?(s.maxDepthCount++,f+v):Math.abs(v)r?n=i:e=i,i=e+n>>1}while(i>e);var a=d[i+1]-d[i];return a&&(a=(r-d[i+1])/a),(i+1+a)/c}var m=2*l(1)/v*o/n,I=function(r,e){var n=l(a(f(e))),t=i(n)*r;return n/=m,[t,e>=0?n:-n]};return I.invert=function(r,e){var n;return a(e*=m)<1&&(n=y(e)*B(t(a(e))*o)),[r/i(a(e)),n]},I}function un(){var r=0,e=2.5,n=1.183136,a=(0,i.U)(cn),t=a(r,e,n);return t.alpha=function(i){return arguments.length?a(r=+i,e,n):r},t.k=function(i){return arguments.length?a(r,e=+i,n):e},t.gamma=function(i){return arguments.length?a(r,e,n=+i):n},t.scale(152.63)}function dn(r,e){return a(r[0]-e[0])<_&&a(r[1]-e[1])<_}function sn(r,e){for(var n,i,a,t=-1,o=r.length,c=r[0],u=[];++tt[o][2][0];++o);var u=r(n-t[o][1][0],i);return u[0]+=r(t[o][1][0],a*i>a*t[o][0][1]?t[o][0][1]:i)[0],u}n?o.invert=n(o):r.invert&&(o.invert=function(n,i){for(var a=t[+(i<0)],c=e[+(i<0)],u=0,d=a.length;u=0;--c)n=(e=r[1][c])[0][0],i=e[0][1],a=e[1][1],t=e[2][0],o=e[2][1],u.push(sn([[t-_,o-_],[t-_,a+_],[n+_,a+_],[n+_,i-_]],30));return{type:"Polygon",coordinates:[(0,Je.Uf)(u)]}}(n),e=n.map((function(r){return r.map((function(r){return[[r[0][0]*M,r[0][1]*M],[r[1][0]*M,r[1][1]*M],[r[2][0]*M,r[2][1]*M]]}))})),t=e.map((function(e){return e.map((function(e){var n,i=r(e[0][0],e[0][1])[0],a=r(e[2][0],e[2][1])[0],t=r(e[1][0],e[0][1])[1],o=r(e[1][0],e[1][1])[1];return t>o&&(n=t,t=o,o=n),[[i,t],[a,o]]}))})),c):e.map((function(r){return r.map((function(r){return[[r[0][0]*b,r[0][1]*b],[r[1][0]*b,r[1][1]*b],[r[2][0]*b,r[2][1]*b]]}))}))},null!=e&&c.lobes(e),c}Qe.invert=function(r,e){return e>-Ye?tr.invert(r,e-Xe):mr.invert(r,e)},rn.invert=function(r,e){return a(e)>Ye?tr.invert(r,e+(e>0?Xe:-Xe)):mr.invert(r,e)};var mn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function pn(){return ln(dr,mn).scale(160.857)}var In=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function yn(){return ln(rn,In).scale(152.63)}var fn=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function gn(){return ln(tr,fn).scale(169.529)}var _n=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function hn(){return ln(tr,_n).scale(169.529).rotate([20,0])}var vn=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function xn(){return ln(Qe,vn,rr).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Pn=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Gn(){return ln(mr,Pn).scale(152.63).rotate([-20,0])}function Cn(r,e){return[3/A*r*F(v*v/3-e*e),e]}function Sn(){return(0,i.c)(Cn).scale(158.837)}function An(r){function e(e,n){if(a(a(n)-x)<_)return[0,n<0?-2:2];var i=f(n),t=p((1+i)/(1-i),r/2),o=.5*(t+1/t)+c(e*=r);return[2*f(e)/o,(t-1/t)/o]}return e.invert=function(e,n){var i=a(n);if(a(i-2)<_)return e?null:[0,y(n)*x];if(i>2)return null;var t=(e/=2)*e,c=(n/=2)*n,u=2*n/(1+t+c);return u=p((1+u)/(1-u),1/r),[o(2*e,1-t-c)/r,B((u-1)/(u+1))]},e}function bn(){var r=.5,e=(0,i.U)(An),n=e(r);return n.spacing=function(n){return arguments.length?e(r=+n):r},n.scale(124.75)}Cn.invert=function(r,e){return[A/3*r/F(v*v/3-e*e),e]};var Mn=v/C;function Bn(r,e){return[r*(1+F(c(e)))/2,e/(c(e/2)*c(r/6))]}function kn(){return(0,i.c)(Bn).scale(97.2672)}function Fn(r,e){var n=r*r,i=e*e;return[r*(.975534+i*(-.0143059*n-.119161+-.0547009*i)),e*(1.00384+n*(.0802894+-.02855*i+199025e-9*n)+i*(.0998909+-.0491032*i))]}function zn(){return(0,i.c)(Fn).scale(139.98)}function wn(r,e){return[f(r)/c(e),g(e)*c(r)]}function Rn(){return(0,i.c)(wn).scale(144.049).clipAngle(89.999)}function En(r){var e=c(r),n=g(P+r/2);function i(i,t){var o=t-r,c=a(o)<_?i*e:a(c=P+t/2)<_||a(a(c)-x)<_?0:i*o/s(g(c)/n);return[c,o]}return i.invert=function(i,t){var o,c=t+r;return[a(t)<_?i/e:a(o=P+c/2)<_||a(a(o)-x)<_?0:i*s(g(o)/n)/t,c]},i}function Nn(){return lr(En).parallel(40).scale(158.837)}function Tn(r,e){return[r,1.25*s(g(P+.4*e))]}function Dn(){return(0,i.c)(Tn).scale(108.318)}function Jn(r){var e=r.length-1;function n(n,i){for(var a,t=c(i),o=2/(1+t*c(n)),u=o*t*f(n),d=o*f(i),s=e,l=r[s],m=l[0],p=l[1];--s>=0;)m=(l=r[s])[0]+u*(a=m)-d*p,p=l[1]+u*p+d*a;return[m=u*(a=m)-d*p,p=u*p+d*a]}return n.invert=function(n,i){var u=20,d=n,s=i;do{for(var l,m=e,p=r[m],I=p[0],y=p[1],g=0,h=0;--m>=0;)g=I+d*(l=g)-s*h,h=y+d*h+s*l,I=(p=r[m])[0]+d*(l=I)-s*y,y=p[1]+d*y+s*l;var v,x,P=(g=I+d*(l=g)-s*h)*g+(h=y+d*h+s*l)*h;d-=v=((I=d*(l=I)-s*y-n)*g+(y=d*y+s*l-i)*h)/P,s-=x=(y*g-I*h)/P}while(a(v)+a(x)>_*_&&--u>0);if(u){var G=F(d*d+s*s),C=2*t(.5*G),S=f(C);return[o(d*S,G*c(C)),G?B(s*S/G):0]}},n}Bn.invert=function(r,e){var n=a(r),i=a(e),t=_,o=x;i_||a(h)>_)&&--t>0);return t&&[n,i]},wn.invert=function(r,e){var n=r*r,i=e*e+1,a=n+i,t=r?G*F((a-F(a*a-4*n))/n):1/F(i);return[B(r*t),y(e)*k(t)]},Tn.invert=function(r,e){return[r,2.5*t(u(.8*e))-.625*v]};var Un=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Hn=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ln=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],On=[[.9245,0],[0,0],[.01943,0]],Kn=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Vn(){return Yn(Un,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function jn(){return Yn(Hn,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Wn(){return Yn(Ln,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Zn(){return Yn(On,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function qn(){return Yn(Kn,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Yn(r,e){var n=(0,i.c)(Jn(r)).rotate(e).clipAngle(90),a=(0,xr.c)(e),t=n.center;return delete n.rotate,n.center=function(r){return arguments.length?t(a(r)):a.invert(t())},n}var Xn=F(6),Qn=F(7);function $n(r,e){var n=B(7*f(e)/(3*Xn));return[Xn*r*(2*c(2*n/3)-1)/Qn,9*f(n/3)/Qn]}function ri(){return(0,i.c)($n).scale(164.859)}function ei(r,e){for(var n,i=(1+G)*f(e),t=e,o=0;o<25&&(t-=n=(f(t/2)+f(t)-i)/(.5*c(t/2)+c(t)),!(a(n)<_));o++);return[r*(1+2*c(t)/c(t/2))/(3*C),2*F(3)*f(t/2)/F(2+C)]}function ni(){return(0,i.c)(ei).scale(188.209)}function ii(r,e){for(var n,i=F(6/(4+v)),t=(1+v/4)*f(e),o=e/2,u=0;u<25&&(o-=n=(o/2+f(o)-t)/(.5+c(o)),!(a(n)<_));u++);return[i*(.5+c(o))*r/1.5,i*o]}function ai(){return(0,i.c)(ii).scale(166.518)}$n.invert=function(r,e){var n=3*B(e*Qn/9);return[r*Qn/(Xn*(2*c(2*n/3)-1)),B(3*f(n)*Xn/7)]},ei.invert=function(r,e){var n=e*F(2+C)/(2*F(3)),i=2*B(n);return[3*C*r/(1+2*c(i)/c(i/2)),B((n+f(i))/(1+G))]},ii.invert=function(r,e){var n=F(6/(4+v)),i=e/n;return a(a(i)-x)<_&&(i=i<0?-x:x),[1.5*r/(n*(.5+c(i))),B((i/2+f(i))/(1+v/4))]};var ti=n(47984);function oi(r,e){var n=e*e,i=n*n,a=n*i;return[r*(.84719-.13063*n+a*a*(.05494*n-.04515-.02326*i+.00331*a)),e*(1.01183+i*i*(.01926*n-.02625-.00396*i))]}function ci(){return(0,i.c)(oi).scale(175.295)}function ui(r,e){return[r*(1+c(e))/2,2*(e-g(e/2))]}function di(){return(0,i.c)(ui).scale(152.63)}oi.invert=function(r,e){var n,i,t,o,c=e,u=25;do{c-=n=(c*(1.01183+(t=(i=c*c)*i)*t*(.01926*i-.02625-.00396*t))-e)/(1.01183+t*t*(.21186*i-.23625+-.05148*t))}while(a(n)>h&&--u>0);return[r/(.84719-.13063*(i=c*c)+(o=i*(t=i*i))*o*(.05494*i-.04515-.02326*t+.00331*o)),c]},ui.invert=function(r,e){for(var n=e/2,i=0,t=1/0;i<10&&a(t)>_;++i){var o=c(e/2);e-=t=(e-g(e/2)-n)/(1-.5/(o*o))}return[2*r/(1+c(e)),e]};var si=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function li(){return ln(Y(1/0),si).rotate([20,0]).scale(152.63)}function mi(r,e){var n=f(e),i=c(e),t=y(r);if(0===r||a(e)===x)return[0,e];if(0===e)return[r,0];if(a(r)===x)return[r*i,x*n];var o=v/(2*r)-2*r/v,u=2*e/v,d=(1-u*u)/(n-u),s=o*o,l=d*d,m=1+s/l,p=1+l/s,I=(o*n/d-o/2)/m,g=(l*n/s+d/2)/p,_=g*g-(l*n*n/s+d*n-1)/p;return[x*(I+F(I*I+i*i/m)*t),x*(g+F(_<0?0:_)*y(-e*o)*t)]}function pi(){return(0,i.c)(mi).scale(127.267)}mi.invert=function(r,e){var n=(r/=x)*r,i=n+(e/=x)*e,a=v*v;return[r?(i-1+F((1-i)*(1-i)+4*n))/(2*r)*x:0,$((function(r){return i*(v*f(r)-2*r)*v+4*r*r*(e-f(r))+2*v*r-a*e}),0)]};var Ii=1.0148,yi=.23185,fi=-.14499,gi=.02406,_i=Ii,hi=5*yi,vi=7*fi,xi=9*gi,Pi=1.790857183;function Gi(r,e){var n=e*e;return[r,e*(Ii+n*n*(yi+n*(fi+gi*n)))]}function Ci(){return(0,i.c)(Gi).scale(139.319)}function Si(r,e){if(a(e)<_)return[r,0];var n=g(e),i=r*f(e);return[f(i)/n,e+(1-c(i))/n]}function Ai(){return(0,i.c)(Si).scale(103.74)}Gi.invert=function(r,e){e>Pi?e=Pi:e<-1.790857183&&(e=-1.790857183);var n,i=e;do{var t=i*i;i-=n=(i*(Ii+t*t*(yi+t*(fi+gi*t)))-e)/(_i+t*t*(hi+t*(vi+xi*t)))}while(a(n)>_);return[r,i]},Si.invert=function(r,e){if(a(e)<_)return[r,0];var n,i=r*r+e*e,t=.5*e,o=10;do{var u=g(t),d=1/c(t),s=i-2*e*t+t*t;t-=n=(u*s+2*(t-e))/(2+s*d*d+2*(t-e)*u)}while(a(n)>_&&--o>0);return u=g(t),[(a(e)=0;)if(i=e[c],n[0]===i[0]&&n[1]===i[1]){if(t)return[t,n];t=n}}}(e.face,n.face),a=Bi(i.map(n.project),i.map(e.project));e.transform=n.transform?ki(n.transform,a):a;for(var t=n.edges,o=0,c=t.length;o0?[-e[0],0]:[180-e[0],180])};var e=Ji.map((function(e){return{face:e,project:r(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(r,n){var i=e[r];i&&(i.children||(i.children=[])).push(e[n])})),wi(e[0],(function(r,n){return e[r<-v/2?n<0?6:4:r<0?n<0?2:0:ri^p>i&&n<(m-d)*(i-s)/(p-s)+d&&(a=!a)}return a}(r[0],n))return r.push(e),!0}))||r.push([e])})),ra=[],r.length?r.length>1?{type:"MultiPolygon",coordinates:r}:{type:"Polygon",coordinates:r[0]}:null}};function aa(r){var e=r(x,0)[0]-r(-x,0)[0];function n(n,i){var t=a(n)0?n-v:n+v,i),c=(o[0]-o[1])*G,u=(o[0]+o[1])*G;if(t)return[c,u];var d=e*G,s=c>0^u>0?-1:1;return[s*c-y(u)*d,s*u-y(c)*d]}return r.invert&&(n.invert=function(n,i){var t=(n+i)*G,o=(i-n)*G,c=a(t)<.5*e&&a(o)<.5*e;if(!c){var u=e*G,d=t>0^o>0?-1:1,s=-d*n+(o>0?1:-1)*u,l=-d*i+(t>0?1:-1)*u;t=(-s-l)*G,o=(s-l)*G}var m=r.invert(t,o);return c||(m[0]+=t>0?v:-v),m}),(0,i.c)(n).rotate([-90,-90,45]).clipAngle(179.999)}function ta(){return aa(Be).scale(176.423)}function oa(){return aa(we).scale(111.48)}function ca(r,e){if(!(0<=(e=+e)&&e<=20))throw new Error("invalid digits");function n(r){var n=r.length,i=2,a=new Array(n);for(a[0]=+r[0].toFixed(e),a[1]=+r[1].toFixed(e);i2||t[0]!=e[0]||t[1]!=e[1])&&(i.push(t),e=t)}return 1===i.length&&r.length>1&&i.push(n(r[r.length-1])),i}function t(r){return r.map(a)}function o(r){if(null==r)return r;var e;switch(r.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:r.geometries.map(o)};break;case"Point":e={type:"Point",coordinates:n(r.coordinates)};break;case"MultiPoint":e={type:r.type,coordinates:i(r.coordinates)};break;case"LineString":e={type:r.type,coordinates:a(r.coordinates)};break;case"MultiLineString":case"Polygon":e={type:r.type,coordinates:t(r.coordinates)};break;case"MultiPolygon":e={type:"MultiPolygon",coordinates:r.coordinates.map(t)};break;default:return r}return null!=r.bbox&&(e.bbox=r.bbox),e}function c(r){var e={type:"Feature",properties:r.properties,geometry:o(r.geometry)};return null!=r.id&&(e.id=r.id),null!=r.bbox&&(e.bbox=r.bbox),e}if(null!=r)switch(r.type){case"Feature":return c(r);case"FeatureCollection":var u={type:"FeatureCollection",features:r.features.map(c)};return null!=r.bbox&&(u.bbox=r.bbox),u;default:return o(r)}return r}function ua(r){var e=f(r);function n(n,i){var a=e?g(n*e/2)/e:n/2;if(!i)return[2*a,-r];var o=2*t(a*f(i)),u=1/g(i);return[f(o)*u,i+(1-c(o))*u-r]}return n.invert=function(n,i){if(a(i+=r)<_)return[e?2*t(e*n/2)/e:n,0];var o,u=n*n+i*i,d=0,s=10;do{var l=g(d),m=1/c(d),p=u-2*i*d+d*d;d-=o=(l*p+2*(d-i))/(2+p*m*m+2*(d-i)*l)}while(a(o)>_&&--s>0);var I=n*(l=g(d)),y=g(a(i)0?x:-x)*(l+o*(I-u)/2+o*o*(I-2*l+u)/2)]}function ma(){return(0,i.c)(la).scale(152.63)}function pa(r,e){var n=function(r){function e(e,n){var i=c(n),a=(r-1)/(r-i*c(e));return[a*i*f(e),a*f(n)]}return e.invert=function(e,n){var i=e*e+n*n,a=F(i),t=(r-F(1-i*(r+1)/(r-1)))/((r-1)/a+a/(r-1));return[o(e*t,a*F(1-t*t)),a?B(n*t/a):0]},e}(r);if(!e)return n;var i=c(e),a=f(e);function t(e,t){var o=n(e,t),c=o[1],u=c*a/(r-1)+i;return[o[0]*i/u,c/u]}return t.invert=function(e,t){var o=(r-1)/(r-1-t*a);return n.invert(o*e,o*t*i)},t}function Ia(){var r=2,e=0,n=(0,i.U)(pa),a=n(r,e);return a.distance=function(i){return arguments.length?n(r=+i,e):r},a.tilt=function(i){return arguments.length?n(r,e=i*M):e*b},a.scale(432.147).clipAngle(k(1/r)*b-1e-6)}sa.forEach((function(r){r[1]*=1.0144})),la.invert=function(r,e){var n=e/x,i=90*n,t=m(18,a(i/5)),o=l(0,d(t));do{var c=sa[o][1],u=sa[o+1][1],s=sa[m(19,o+2)][1],p=s-c,I=s-2*u+c,y=2*(a(n)-u)/p,f=I/p,g=y*(1-f*y*(1-2*f*y));if(g>=0||1===o){i=(e>=0?5:-5)*(g+t);var _,v=50;do{g=(t=m(18,a(i)/5))-(o=d(t)),c=sa[o][1],u=sa[o+1][1],s=sa[m(19,o+2)][1],i-=(_=(e>=0?x:-x)*(u+g*(s-c)/2+g*g*(s-2*u+c)/2)-e)*b}while(a(_)>h&&--v>0);break}}while(--o>=0);var P=sa[o][0],G=sa[o+1][0],C=sa[m(19,o+2)][0];return[r/(G+g*(C-P)/2+g*g*(C-2*G+P)/2),i*M]};var ya=1e-4,fa=1e4,ga=-180,_a=ga+ya,ha=180,va=ha-ya,xa=-90,Pa=xa+ya,Ga=90,Ca=Ga-ya;function Sa(r){return r.length>0}function Aa(r){return r===xa||r===Ga?[0,r]:[ga,(e=r,Math.floor(e*fa)/fa)];var e}function ba(r){var e=r[0],n=r[1],i=!1;return e<=_a?(e=ga,i=!0):e>=va&&(e=ha,i=!0),n<=Pa?(n=xa,i=!0):n>=Ca&&(n=Ga,i=!0),i?[e,n]:r}function Ma(r){return r.map(ba)}function Ba(r,e,n){for(var i=0,a=r.length;i=va||s<=Pa||s>=Ca){t[o]=ba(u);for(var l=o+1;l_a&&pPa&&I=c)break;n.push({index:-1,polygon:e,ring:t=t.slice(l-1)}),t[0]=Aa(t[0][1]),o=-1,c=t.length}}}}function ka(r){var e,n,i,a,t,o,c=r.length,u={},d={};for(e=0;e0?v-u:u)*b],s=(0,i.c)(r(c)).rotate(d),l=(0,xr.c)(d),m=s.center;return delete s.rotate,s.center=function(r){return arguments.length?m(l(r)):l.invert(m())},s.clipAngle(90)}function Ta(r){var e=c(r);function n(r,n){var i=(0,Ti.Y)(r,n);return i[0]*=e,i}return n.invert=function(r,n){return Ti.Y.invert(r/e,n)},n}function Da(){return Ja([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Ja(r,e){return Na(Ta,r,e)}function Ua(r){if(!(r*=2))return j.O;var e=-r/2,n=-e,i=r*r,a=g(n),t=.5/f(n);function u(a,t){var o=k(c(t)*c(a-e)),u=k(c(t)*c(a-n));return[((o*=o)-(u*=u))/(2*r),(t<0?-1:1)*F(4*i*u-(i-o+u)*(i-o+u))/(2*r)]}return u.invert=function(r,i){var u,d,s=i*i,l=c(F(s+(u=r+e)*u)),m=c(F(s+(u=r+n)*u));return[o(d=l-m,u=(l+m)*a),(i<0?-1:1)*k(F(u*u+d*d)*t)]},u}function Ha(){return La([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function La(r,e){return Na(Ua,r,e)}function Oa(r,e){if(a(e)<_)return[r,0];var n=a(e/x),i=B(n);if(a(r)<_||a(a(e)-x)<_)return[0,y(e)*v*g(i/2)];var t=c(i),o=a(v/r-r/v)/2,u=o*o,d=t/(n+t-1),s=d*(2/n-1),l=s*s,m=l+u,p=d-l,I=u+d;return[y(r)*v*(o*p+F(u*p*p-m*(d*d-l)))/m,y(e)*v*(s*I-o*F((u+1)*m-I*I))/m]}function Ka(){return(0,i.c)(Oa).scale(79.4183)}function Va(r,e){if(a(e)<_)return[r,0];var n=a(e/x),i=B(n);if(a(r)<_||a(a(e)-x)<_)return[0,y(e)*v*g(i/2)];var t=c(i),o=a(v/r-r/v)/2,u=o*o,d=t*(F(1+u)-o*t)/(1+u*n*n);return[y(r)*v*d,y(e)*v*F(1-d*(2*o+d))]}function ja(){return(0,i.c)(Va).scale(79.4183)}function Wa(r,e){if(a(e)<_)return[r,0];var n=e/x,i=B(n);if(a(r)<_||a(a(e)-x)<_)return[0,v*g(i/2)];var t=(v/r-r/v)/2,o=n/(1+c(i));return[v*(y(r)*F(t*t+1-o*o)-t),v*o]}function Za(){return(0,i.c)(Wa).scale(79.4183)}function qa(r,e){if(!e)return[r,0];var n=a(e);if(!r||n===x)return[0,e];var i=n/x,t=i*i,o=(8*i-t*(t+2)-5)/(2*t*(i-1)),c=o*o,u=i*o,d=t+c+2*u,s=i+3*o,l=r/x,m=l+1/l,p=y(a(r)-x)*F(m*m-4),I=p*p,f=(p*(d+c-1)+2*F(d*(t+c*I-1)+(1-t)*(t*(s*s+4*c)+12*u*c+4*c*c)))/(4*d+I);return[y(r)*x*f,y(e)*x*F(1+p*a(f)-f*f)]}function Ya(){return(0,i.c)(qa).scale(127.16)}function Xa(r,e,n,i){var a=v/3;r=l(r,_),e=l(e,_),r=m(r,x),e=m(e,v-_),n=l(n,0),n=m(n,100-_);var t=(i=l(i,_))/100,u=k((n/100+1)*c(a))/a,d=f(r)/f(u*x),s=e/v,p=F(t*f(r/2)/f(e/2));return function(r,e,n,i,a){function t(t,o){var u=n*f(i*o),d=F(1-u*u),s=F(2/(1+d*c(t*=a)));return[r*d*s*f(t),e*u*s]}return t.invert=function(t,c){var u=t/r,d=c/e,s=F(u*u+d*d),l=2*B(s/2);return[o(t*g(l),r*s)/a,s&&B(c*f(l)/(e*n*s))/i]},t}(p/F(s*d*u),1/(p*F(s*d*u)),d,u,s)}function Qa(){var r=65*M,e=60*M,n=20,a=200,t=(0,i.U)(Xa),o=t(r,e,n,a);return o.poleline=function(i){return arguments.length?t(r=+i*M,e,n,a):r*b},o.parallels=function(i){return arguments.length?t(r,e=+i*M,n,a):e*b},o.inflation=function(i){return arguments.length?t(r,e,n=+i,a):n},o.ratio=function(i){return arguments.length?t(r,e,n,a=+i):a},o.scale(163.775)}function $a(){return Qa().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}Ra.invert=function(r,e){var n=e/1.70711,i=f(P*n);return[r/(.74482-.34588*i*i),2*t(n)]},Oa.invert=function(r,e){if(a(e)<_)return[r,0];if(a(r)<_)return[0,x*f(2*t(e/v))];var n=(r/=v)*r,i=(e/=v)*e,o=n+i,u=o*o,d=-a(e)*(1+o),s=d-2*i+n,l=-2*d+1+2*i+u,m=i/l+(2*s*s*s/(l*l*l)-9*d*s/(l*l))/27,p=(d-s*s/(3*l))/l,I=2*F(-p/3),g=k(3*m/(p*I))/3;return[v*(o-1+F(1+2*(n-i)+u))/(2*r),y(e)*v*(-I*c(g+v/3)-s/(3*l))]},Va.invert=function(r,e){if(!r)return[0,x*f(2*t(e/v))];var n=a(r/v),i=(1-n*n-(e/=v)*e)/(2*n),c=F(i*i+1);return[y(r)*v*(c-i),y(e)*x*f(2*o(F((1-2*i*n)*(i+c)-n),F(c+i+n)))]},Wa.invert=function(r,e){if(!e)return[r,0];var n=e/v,i=(v*v*(1-n*n)-r*r)/(2*v*r);return[r?v*(y(r)*F(i*i+1)-i):0,x*f(2*t(n))]},qa.invert=function(r,e){var n;if(!r||!e)return[r,e];e/=v;var i=y(r)*r/x,t=(i*i-1+4*e*e)/a(i),o=t*t,c=2*e,u=50;do{var d=c*c,s=(8*c-d*(d+2)-5)/(2*d*(c-1)),l=(3*c-d*c-10)/(2*d*c),m=s*s,p=c*s,I=c+s,f=I*I,g=c+3*s,h=-2*I*(4*p*m+(1-4*d+3*d*d)*(1+l)+m*(14*d-6-o+(8*d-8-2*o)*l)+p*(12*d-8+(10*d-10-o)*l)),P=F(f*(d+m*o-1)+(1-d)*(d*(g*g+4*m)+m*(12*p+4*m)));c-=n=(t*(f+m-1)+2*P-i*(4*f+o))/(t*(2*s*l+2*I*(1+l))+h/P-8*I*(t*(-1+m+f)+2*P)*(1+l)/(o+4*f))}while(n>_&&--u>0);return[y(r)*(F(t*t+4)+t)*v/4,x*c]};var rt=4*v+3*F(3),et=2*F(2*v*F(3)/rt),nt=ar(et*F(3)/v,et,rt/6);function it(){return(0,i.c)(nt).scale(176.84)}function at(r,e){return[r*F(1-3*e*e/(v*v)),e]}function tt(){return(0,i.c)(at).scale(152.63)}function ot(r,e){var n=c(e),i=c(r)*n,a=1-i,t=c(r=o(f(r)*n,-f(e))),u=f(r);return[u*(n=F(1-i*i))-t*a,-t*n-u*a]}function ct(){return(0,i.c)(ot).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function ut(r,e){var n=N(r,e);return[(n[0]+r/x)/2,(n[1]+e)/2]}function dt(){return(0,i.c)(ut).scale(158.837)}at.invert=function(r,e){return[r/F(1-3*e*e/(v*v)),e]},ot.invert=function(r,e){var n=(r*r+e*e)/-2,i=F(-n*(2+n)),a=e*n+r*i,t=r*n-e*i,c=F(t*t+a*a);return[o(i*a,c*(1+n)),c?-B(i*t/c):0]},ut.invert=function(r,e){var n=r,i=e,t=25;do{var o,u=c(i),d=f(i),s=f(2*i),l=d*d,m=u*u,p=f(n),I=c(n/2),y=f(n/2),g=y*y,h=1-m*I*I,v=h?k(u*I)*F(o=1/h):o=0,P=.5*(2*v*u*y+n/x)-r,G=.5*(v*d+i)-e,C=.5*o*(m*g+v*u*I*l)+.5/x,S=o*(p*s/4-v*d*y),A=.125*o*(s*y-v*d*m*p),b=.5*o*(l*I+v*g*u)+.5,M=S*A-b*C,B=(G*S-P*b)/M,z=(P*A-G*C)/M;n-=B,i-=z}while((a(B)>_||a(z)>_)&&--t>0);return[n,i]}},88728:function(r,e,n){"use strict";function i(){return new a}function a(){this.reset()}n.d(e,{c:function(){return i}}),a.prototype={constructor:a,reset:function(){this.s=this.t=0},add:function(r){o(t,r,this.t),o(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new a;function o(r,e,n){var i=r.s=e+n,a=i-e,t=i-a;r.t=e-t+(n-a)}},95384:function(r,e,n){"use strict";n.d(e,{cp:function(){return h},mQ:function(){return m},oB:function(){return I}});var i,a,t,o,c,u=n(88728),d=n(64528),s=n(70932),l=n(16016),m=(0,u.c)(),p=(0,u.c)(),I={point:s.c,lineStart:s.c,lineEnd:s.c,polygonStart:function(){m.reset(),I.lineStart=y,I.lineEnd=f},polygonEnd:function(){var r=+m;p.add(r<0?d.kD+r:r),this.lineStart=this.lineEnd=this.point=s.c},sphere:function(){p.add(d.kD)}};function y(){I.point=g}function f(){_(i,a)}function g(r,e){I.point=_,i=r,a=e,r*=d.qw,e*=d.qw,t=r,o=(0,d.W8)(e=e/2+d.wL),c=(0,d.g$)(e)}function _(r,e){r*=d.qw,e=(e*=d.qw)/2+d.wL;var n=r-t,i=n>=0?1:-1,a=i*n,u=(0,d.W8)(e),s=(0,d.g$)(e),l=c*s,p=o*u+l*(0,d.W8)(a),I=l*i*(0,d.g$)(a);m.add((0,d.WE)(I,p)),t=r,o=u,c=s}function h(r){return p.reset(),(0,l.c)(r,I),2*p}},13696:function(r,e,n){"use strict";n.d(e,{c:function(){return k}});var i,a,t,o,c,u,d,s,l,m,p=n(88728),I=n(95384),y=n(84220),f=n(64528),g=n(16016),_=(0,p.c)(),h={point:v,lineStart:P,lineEnd:G,polygonStart:function(){h.point=C,h.lineStart=S,h.lineEnd=A,_.reset(),I.oB.polygonStart()},polygonEnd:function(){I.oB.polygonEnd(),h.point=v,h.lineStart=P,h.lineEnd=G,I.mQ<0?(i=-(t=180),a=-(o=90)):_>f.Gg?o=90:_<-f.Gg&&(a=-90),m[0]=i,m[1]=t},sphere:function(){i=-(t=180),a=-(o=90)}};function v(r,e){l.push(m=[i=r,t=r]),eo&&(o=e)}function x(r,e){var n=(0,y.ux)([r*f.qw,e*f.qw]);if(s){var u=(0,y.CW)(s,n),d=[u[1],-u[0],0],p=(0,y.CW)(d,u);(0,y.cJ)(p),p=(0,y.G)(p);var I,g=r-c,_=g>0?1:-1,h=p[0]*f.oh*_,v=(0,f.a2)(g)>180;v^(_*co&&(o=I):v^(_*c<(h=(h+360)%360-180)&&h<_*r)?(I=-p[1]*f.oh)o&&(o=e)),v?rb(i,t)&&(t=r):b(r,t)>b(i,t)&&(i=r):t>=i?(rt&&(t=r)):r>c?b(i,r)>b(i,t)&&(t=r):b(r,t)>b(i,t)&&(i=r)}else l.push(m=[i=r,t=r]);eo&&(o=e),s=n,c=r}function P(){h.point=x}function G(){m[0]=i,m[1]=t,h.point=v,s=null}function C(r,e){if(s){var n=r-c;_.add((0,f.a2)(n)>180?n+(n>0?360:-360):n)}else u=r,d=e;I.oB.point(r,e),x(r,e)}function S(){I.oB.lineStart()}function A(){C(u,d),I.oB.lineEnd(),(0,f.a2)(_)>f.Gg&&(i=-(t=180)),m[0]=i,m[1]=t,s=null}function b(r,e){return(e-=r)<0?e+360:e}function M(r,e){return r[0]-e[0]}function B(r,e){return r[0]<=r[1]?r[0]<=e&&e<=r[1]:eb(c[0],c[1])&&(c[1]=u[1]),b(u[0],c[1])>b(c[0],c[1])&&(c[0]=u[0])):d.push(c=u);for(s=-1/0,e=0,c=d[n=d.length-1];e<=n;c=u,++e)u=d[e],(p=b(c[1],u[0]))>s&&(s=p,i=u[0],t=c[1])}return l=m=null,i===1/0||a===1/0?[[NaN,NaN],[NaN,NaN]]:[[i,a],[t,o]]}},84220:function(r,e,n){"use strict";n.d(e,{CW:function(){return c},Ez:function(){return o},G:function(){return a},cJ:function(){return s},mg:function(){return u},ux:function(){return t},wx:function(){return d}});var i=n(64528);function a(r){return[(0,i.WE)(r[1],r[0]),(0,i.qR)(r[2])]}function t(r){var e=r[0],n=r[1],a=(0,i.W8)(n);return[a*(0,i.W8)(e),a*(0,i.g$)(e),(0,i.g$)(n)]}function o(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function c(r,e){return[r[1]*e[2]-r[2]*e[1],r[2]*e[0]-r[0]*e[2],r[0]*e[1]-r[1]*e[0]]}function u(r,e){r[0]+=e[0],r[1]+=e[1],r[2]+=e[2]}function d(r,e){return[r[0]*e,r[1]*e,r[2]*e]}function s(r){var e=(0,i._I)(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=e,r[1]/=e,r[2]/=e}},24052:function(r,e,n){"use strict";n.d(e,{c:function(){return w}});var i,a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h=n(64528),v=n(70932),x=n(16016),P={sphere:v.c,point:G,lineStart:S,lineEnd:M,polygonStart:function(){P.lineStart=B,P.lineEnd=k},polygonEnd:function(){P.lineStart=S,P.lineEnd=M}};function G(r,e){r*=h.qw,e*=h.qw;var n=(0,h.W8)(e);C(n*(0,h.W8)(r),n*(0,h.g$)(r),(0,h.g$)(e))}function C(r,e,n){++i,t+=(r-t)/i,o+=(e-o)/i,c+=(n-c)/i}function S(){P.point=A}function A(r,e){r*=h.qw,e*=h.qw;var n=(0,h.W8)(e);f=n*(0,h.W8)(r),g=n*(0,h.g$)(r),_=(0,h.g$)(e),P.point=b,C(f,g,_)}function b(r,e){r*=h.qw,e*=h.qw;var n=(0,h.W8)(e),i=n*(0,h.W8)(r),t=n*(0,h.g$)(r),o=(0,h.g$)(e),c=(0,h.WE)((0,h._I)((c=g*o-_*t)*c+(c=_*i-f*o)*c+(c=f*t-g*i)*c),f*i+g*t+_*o);a+=c,u+=c*(f+(f=i)),d+=c*(g+(g=t)),s+=c*(_+(_=o)),C(f,g,_)}function M(){P.point=G}function B(){P.point=F}function k(){z(I,y),P.point=G}function F(r,e){I=r,y=e,r*=h.qw,e*=h.qw,P.point=z;var n=(0,h.W8)(e);f=n*(0,h.W8)(r),g=n*(0,h.g$)(r),_=(0,h.g$)(e),C(f,g,_)}function z(r,e){r*=h.qw,e*=h.qw;var n=(0,h.W8)(e),i=n*(0,h.W8)(r),t=n*(0,h.g$)(r),o=(0,h.g$)(e),c=g*o-_*t,I=_*i-f*o,y=f*t-g*i,v=(0,h._I)(c*c+I*I+y*y),x=(0,h.qR)(v),P=v&&-x/v;l+=P*c,m+=P*I,p+=P*y,a+=x,u+=x*(f+(f=i)),d+=x*(g+(g=t)),s+=x*(_+(_=o)),C(f,g,_)}function w(r){i=a=t=o=c=u=d=s=l=m=p=0,(0,x.c)(r,P);var e=l,n=m,I=p,y=e*e+n*n+I*I;return y0?oc)&&(o+=a*t.kD));for(var m,p=o;a>0?p>c:p0?a.pi:-a.pi,d=(0,a.a2)(o-n);(0,a.a2)(d-a.pi)0?a.or:-a.or),r.point(t,i),r.lineEnd(),r.lineStart(),r.point(u,i),r.point(o,i),e=0):t!==u&&d>=a.pi&&((0,a.a2)(n-t)a.Gg?(0,a.MQ)(((0,a.g$)(e)*(o=(0,a.W8)(i))*(0,a.g$)(n)-(0,a.g$)(i)*(t=(0,a.W8)(e))*(0,a.g$)(r))/(t*o*c)):(e+i)/2}(n,i,o,c),r.point(t,i),r.lineEnd(),r.lineStart(),r.point(u,i),e=0),r.point(n=o,i=c),t=u},lineEnd:function(){r.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(r,e,n,i){var t;if(null==r)t=n*a.or,i.point(-a.pi,t),i.point(0,t),i.point(a.pi,t),i.point(a.pi,0),i.point(a.pi,-t),i.point(0,-t),i.point(-a.pi,-t),i.point(-a.pi,0),i.point(-a.pi,t);else if((0,a.a2)(r[0]-e[0])>a.Gg){var o=r[0]1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],r=null,n}}}},2728:function(r,e,n){"use strict";n.d(e,{c:function(){return u}});var i=n(84220),a=n(61780),t=n(64528),o=n(41860),c=n(14229);function u(r){var e=(0,t.W8)(r),n=6*t.qw,u=e>0,d=(0,t.a2)(e)>t.Gg;function s(r,n){return(0,t.W8)(r)*(0,t.W8)(n)>e}function l(r,n,a){var o=(0,i.ux)(r),c=(0,i.ux)(n),u=[1,0,0],d=(0,i.CW)(o,c),s=(0,i.Ez)(d,d),l=d[0],m=s-l*l;if(!m)return!a&&r;var p=e*s/m,I=-e*l/m,y=(0,i.CW)(u,d),f=(0,i.wx)(u,p),g=(0,i.wx)(d,I);(0,i.mg)(f,g);var _=y,h=(0,i.Ez)(f,_),v=(0,i.Ez)(_,_),x=h*h-v*((0,i.Ez)(f,f)-1);if(!(x<0)){var P=(0,t._I)(x),G=(0,i.wx)(_,(-h-P)/v);if((0,i.mg)(G,f),G=(0,i.G)(G),!a)return G;var C,S=r[0],A=n[0],b=r[1],M=n[1];A0^G[1]<((0,t.a2)(G[0]-S)t.pi^(S<=G[0]&&G[0]<=A)){var F=(0,i.wx)(_,(-h+P)/v);return(0,i.mg)(F,f),[G,(0,i.G)(F)]}}}function m(e,n){var i=u?r:t.pi-r,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return(0,c.c)(s,(function(r){var e,n,i,a,c;return{lineStart:function(){a=i=!1,c=1},point:function(p,I){var y,f=[p,I],g=s(p,I),_=u?g?0:m(p,I):g?m(p+(p<0?t.pi:-t.pi),I):0;if(!e&&(a=i=g)&&r.lineStart(),g!==i&&(!(y=l(e,f))||(0,o.c)(e,y)||(0,o.c)(f,y))&&(f[2]=1),g!==i)c=0,g?(r.lineStart(),y=l(f,e),r.point(y[0],y[1])):(y=l(e,f),r.point(y[0],y[1],2),r.lineEnd()),e=y;else if(d&&e&&u^g){var h;_&n||!(h=l(f,e,!0))||(c=0,u?(r.lineStart(),r.point(h[0][0],h[0][1]),r.point(h[1][0],h[1][1]),r.lineEnd()):(r.point(h[1][0],h[1][1]),r.lineEnd(),r.lineStart(),r.point(h[0][0],h[0][1],3)))}!g||e&&(0,o.c)(e,f)||r.point(f[0],f[1]),e=f,i=g,n=_},lineEnd:function(){i&&r.lineEnd(),e=null},clean:function(){return c|(a&&i)<<1}}}),(function(e,i,t,o){(0,a.Q)(o,r,n,t,e,i)}),u?[0,-r]:[-t.pi,r-t.pi])}},14229:function(r,e,n){"use strict";n.d(e,{c:function(){return u}});var i=n(97208),a=n(32232),t=n(64528),o=n(58196),c=n(84706);function u(r,e,n,t){return function(u){var l,m,p,I=e(u),y=(0,i.c)(),f=e(y),g=!1,_={point:h,lineStart:x,lineEnd:P,polygonStart:function(){_.point=G,_.lineStart=C,_.lineEnd=S,m=[],l=[]},polygonEnd:function(){_.point=h,_.lineStart=x,_.lineEnd=P,m=(0,c.Uf)(m);var r=(0,o.c)(l,t);m.length?(g||(u.polygonStart(),g=!0),(0,a.c)(m,s,r,n,u)):r&&(g||(u.polygonStart(),g=!0),u.lineStart(),n(null,null,1,u),u.lineEnd()),g&&(u.polygonEnd(),g=!1),m=l=null},sphere:function(){u.polygonStart(),u.lineStart(),n(null,null,1,u),u.lineEnd(),u.polygonEnd()}};function h(e,n){r(e,n)&&u.point(e,n)}function v(r,e){I.point(r,e)}function x(){_.point=v,I.lineStart()}function P(){_.point=h,I.lineEnd()}function G(r,e){p.push([r,e]),f.point(r,e)}function C(){f.lineStart(),p=[]}function S(){G(p[0][0],p[0][1]),f.lineEnd();var r,e,n,i,a=f.clean(),t=y.result(),o=t.length;if(p.pop(),l.push(p),p=null,o)if(1&a){if((e=(n=t[0]).length-1)>0){for(g||(u.polygonStart(),g=!0),u.lineStart(),r=0;r1&&2&a&&t.push(t.pop().concat(t.shift())),m.push(t.filter(d))}return _}}function d(r){return r.length>1}function s(r,e){return((r=r.x)[0]<0?r[1]-t.or-t.Gg:t.or-r[1])-((e=e.x)[0]<0?e[1]-t.or-t.Gg:t.or-e[1])}},21676:function(r,e,n){"use strict";n.d(e,{c:function(){return d}});var i=n(64528),a=n(97208),t=n(32232),o=n(84706),c=1e9,u=-c;function d(r,e,n,d){function s(i,a){return r<=i&&i<=n&&e<=a&&a<=d}function l(i,a,t,o){var c=0,u=0;if(null==i||(c=m(i,t))!==(u=m(a,t))||I(i,a)<0^t>0)do{o.point(0===c||3===c?r:n,c>1?d:e)}while((c=(c+t+4)%4)!==u);else o.point(a[0],a[1])}function m(a,t){return(0,i.a2)(a[0]-r)0?0:3:(0,i.a2)(a[0]-n)0?2:1:(0,i.a2)(a[1]-e)0?1:0:t>0?3:2}function p(r,e){return I(r.x,e.x)}function I(r,e){var n=m(r,1),i=m(e,1);return n!==i?n-i:0===n?e[1]-r[1]:1===n?r[0]-e[0]:2===n?r[1]-e[1]:e[0]-r[0]}return function(i){var m,I,y,f,g,_,h,v,x,P,G,C=i,S=(0,a.c)(),A={point:b,lineStart:function(){A.point=M,I&&I.push(y=[]),P=!0,x=!1,h=v=NaN},lineEnd:function(){m&&(M(f,g),_&&x&&S.rejoin(),m.push(S.result())),A.point=b,x&&C.lineEnd()},polygonStart:function(){C=S,m=[],I=[],G=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=I.length;nd&&(l-a)*(d-t)>(m-t)*(r-a)&&++e:m<=d&&(l-a)*(d-t)<(m-t)*(r-a)&&--e;return e}(),n=G&&e,a=(m=(0,o.Uf)(m)).length;(n||a)&&(i.polygonStart(),n&&(i.lineStart(),l(null,null,1,i),i.lineEnd()),a&&(0,t.c)(m,p,e,l,i),i.polygonEnd()),C=i,m=I=y=null}};function b(r,e){s(r,e)&&C.point(r,e)}function M(i,a){var t=s(i,a);if(I&&y.push([i,a]),P)f=i,g=a,_=t,P=!1,t&&(C.lineStart(),C.point(i,a));else if(t&&x)C.point(i,a);else{var o=[h=Math.max(u,Math.min(c,h)),v=Math.max(u,Math.min(c,v))],l=[i=Math.max(u,Math.min(c,i)),a=Math.max(u,Math.min(c,a))];!function(r,e,n,i,a,t){var o,c=r[0],u=r[1],d=0,s=1,l=e[0]-c,m=e[1]-u;if(o=n-c,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>d&&(d=o)}if(o=a-c,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>d&&(d=o)}else if(l>0){if(o0)){if(o/=m,m<0){if(o0){if(o>s)return;o>d&&(d=o)}if(o=t-u,m||!(o<0)){if(o/=m,m<0){if(o>s)return;o>d&&(d=o)}else if(m>0){if(o0&&(r[0]=c+d*l,r[1]=u+d*m),s<1&&(e[0]=c+s*l,e[1]=u+s*m),!0}}}}}(o,l,r,e,n,d)?t&&(C.lineStart(),C.point(i,a),G=!1):(x||(C.lineStart(),C.point(o[0],o[1])),C.point(l[0],l[1]),t||C.lineEnd(),G=!1)}h=i,v=a,x=t}return A}}},32232:function(r,e,n){"use strict";n.d(e,{c:function(){return o}});var i=n(41860),a=n(64528);function t(r,e,n,i){this.x=r,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function o(r,e,n,o,u){var d,s,l=[],m=[];if(r.forEach((function(r){if(!((e=r.length-1)<=0)){var e,n,o=r[0],c=r[e];if((0,i.c)(o,c)){if(!o[2]&&!c[2]){for(u.lineStart(),d=0;d=0;--d)u.point((I=p[d])[0],I[1]);else o(f.x,f.p.x,-1,u);f=f.p}p=(f=f.o).z,g=!g}while(!f.v);u.lineEnd()}}}function c(r){if(e=r.length){for(var e,n,i=0,a=r[0];++i0&&(a=b(r[t],r[t-1]))>0&&n<=a&&i<=a&&(n+i-a)*(1-Math.pow((n-i)/a,2))f.Gg})).map(u)).concat((0,T.ik)((0,f.Km)(t/p)*p,a,p).filter((function(r){return(0,f.a2)(r%y)>f.Gg})).map(d))}return _.lines=function(){return h().map((function(r){return{type:"LineString",coordinates:r}}))},_.outline=function(){return{type:"Polygon",coordinates:[s(i).concat(l(o).slice(1),s(n).reverse().slice(1),l(c).reverse().slice(1))]}},_.extent=function(r){return arguments.length?_.extentMajor(r).extentMinor(r):_.extentMinor()},_.extentMajor=function(r){return arguments.length?(i=+r[0][0],n=+r[1][0],c=+r[0][1],o=+r[1][1],i>n&&(r=i,i=n,n=r),c>o&&(r=c,c=o,o=r),_.precision(g)):[[i,c],[n,o]]},_.extentMinor=function(n){return arguments.length?(e=+n[0][0],r=+n[1][0],t=+n[0][1],a=+n[1][1],e>r&&(n=e,e=r,r=n),t>a&&(n=t,t=a,a=n),_.precision(g)):[[e,t],[r,a]]},_.step=function(r){return arguments.length?_.stepMajor(r).stepMinor(r):_.stepMinor()},_.stepMajor=function(r){return arguments.length?(I=+r[0],y=+r[1],_):[I,y]},_.stepMinor=function(r){return arguments.length?(m=+r[0],p=+r[1],_):[m,p]},_.precision=function(m){return arguments.length?(g=+m,u=D(t,a,90),d=J(e,r,g),s=D(c,o,90),l=J(i,n,g),_):g},_.extentMajor([[-180,-90+f.Gg],[180,90-f.Gg]]).extentMinor([[-180,-80-f.Gg],[180,80+f.Gg]])}function H(){return U()()}var L,O,K,V,j=n(27284),W=n(7376),Z=(0,y.c)(),q=(0,y.c)(),Y={point:g.c,lineStart:g.c,lineEnd:g.c,polygonStart:function(){Y.lineStart=X,Y.lineEnd=rr},polygonEnd:function(){Y.lineStart=Y.lineEnd=Y.point=g.c,Z.add((0,f.a2)(q)),q.reset()},result:function(){var r=Z/2;return Z.reset(),r}};function X(){Y.point=Q}function Q(r,e){Y.point=$,L=K=r,O=V=e}function $(r,e){q.add(V*r-K*e),K=r,V=e}function rr(){$(L,O)}var er,nr,ir,ar,tr=Y,or=n(73784),cr=0,ur=0,dr=0,sr=0,lr=0,mr=0,pr=0,Ir=0,yr=0,fr={point:gr,lineStart:_r,lineEnd:xr,polygonStart:function(){fr.lineStart=Pr,fr.lineEnd=Gr},polygonEnd:function(){fr.point=gr,fr.lineStart=_r,fr.lineEnd=xr},result:function(){var r=yr?[pr/yr,Ir/yr]:mr?[sr/mr,lr/mr]:dr?[cr/dr,ur/dr]:[NaN,NaN];return cr=ur=dr=sr=lr=mr=pr=Ir=yr=0,r}};function gr(r,e){cr+=r,ur+=e,++dr}function _r(){fr.point=hr}function hr(r,e){fr.point=vr,gr(ir=r,ar=e)}function vr(r,e){var n=r-ir,i=e-ar,a=(0,f._I)(n*n+i*i);sr+=a*(ir+r)/2,lr+=a*(ar+e)/2,mr+=a,gr(ir=r,ar=e)}function xr(){fr.point=gr}function Pr(){fr.point=Cr}function Gr(){Sr(er,nr)}function Cr(r,e){fr.point=Sr,gr(er=ir=r,nr=ar=e)}function Sr(r,e){var n=r-ir,i=e-ar,a=(0,f._I)(n*n+i*i);sr+=a*(ir+r)/2,lr+=a*(ar+e)/2,mr+=a,pr+=(a=ar*r-ir*e)*(ir+r),Ir+=a*(ar+e),yr+=3*a,gr(ir=r,ar=e)}var Ar=fr;function br(r){this._context=r}br.prototype={_radius:4.5,pointRadius:function(r){return this._radius=r,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(r,e){switch(this._point){case 0:this._context.moveTo(r,e),this._point=1;break;case 1:this._context.lineTo(r,e);break;default:this._context.moveTo(r+this._radius,e),this._context.arc(r,e,this._radius,0,f.kD)}},result:g.c};var Mr,Br,kr,Fr,zr,wr=(0,y.c)(),Rr={point:g.c,lineStart:function(){Rr.point=Er},lineEnd:function(){Mr&&Nr(Br,kr),Rr.point=g.c},polygonStart:function(){Mr=!0},polygonEnd:function(){Mr=null},result:function(){var r=+wr;return wr.reset(),r}};function Er(r,e){Rr.point=Nr,Br=Fr=r,kr=zr=e}function Nr(r,e){Fr-=r,zr-=e,wr.add((0,f._I)(Fr*Fr+zr*zr)),Fr=r,zr=e}var Tr=Rr;function Dr(){this._string=[]}function Jr(r){return"m0,"+r+"a"+r+","+r+" 0 1,1 0,"+-2*r+"a"+r+","+r+" 0 1,1 0,"+2*r+"z"}function Ur(r,e){var n,i,a=4.5;function t(r){return r&&("function"===typeof a&&i.pointRadius(+a.apply(this,arguments)),(0,_.c)(r,n(i))),i.result()}return t.area=function(r){return(0,_.c)(r,n(tr)),tr.result()},t.measure=function(r){return(0,_.c)(r,n(Tr)),Tr.result()},t.bounds=function(r){return(0,_.c)(r,n(or.c)),or.c.result()},t.centroid=function(r){return(0,_.c)(r,n(Ar)),Ar.result()},t.projection=function(e){return arguments.length?(n=null==e?(r=null,W.c):(r=e).stream,t):r},t.context=function(r){return arguments.length?(i=null==r?(e=null,new Dr):new br(e=r),"function"!==typeof a&&i.pointRadius(a),t):e},t.pointRadius=function(r){return arguments.length?(a="function"===typeof r?r:(i.pointRadius(+r),+r),t):a},t.projection(r).context(e)}Dr.prototype={_radius:4.5,_circle:Jr(4.5),pointRadius:function(r){return(r=+r)!==this._radius&&(this._radius=r,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(r,e){switch(this._point){case 0:this._string.push("M",r,",",e),this._point=1;break;case 1:this._string.push("L",r,",",e);break;default:null==this._circle&&(this._circle=Jr(this._radius)),this._string.push("M",r,",",e,this._circle)}},result:function(){if(this._string.length){var r=this._string.join("");return this._string=[],r}return null}};var Hr=n(87952);function Lr(r){var e=0,n=f.pi/3,i=(0,Hr.U)(r),a=i(e,n);return a.parallels=function(r){return arguments.length?i(e=r[0]*f.qw,n=r[1]*f.qw):[e*f.oh,n*f.oh]},a}function Or(r,e){var n=(0,f.g$)(r),i=(n+(0,f.g$)(e))/2;if((0,f.a2)(i)=.12&&a<.234&&i>=-.425&&i<-.214?c:a>=.166&&a<.234&&i>=-.214&&i<-.115?u:o).invert(r)},s.stream=function(n){return r&&e===n?r:r=function(r){var e=r.length;return{point:function(n,i){for(var a=-1;++a0?e<-f.or+f.Gg&&(e=-f.or+f.Gg):e>f.or-f.Gg&&(e=f.or-f.Gg);var n=a/(0,f.g3)(re(e),i);return[n*(0,f.g$)(i*r),a-n*(0,f.W8)(i*r)]}return t.invert=function(r,e){var n=a-e,t=(0,f.kq)(i)*(0,f._I)(r*r+n*n),o=(0,f.WE)(r,(0,f.a2)(n))*(0,f.kq)(n);return n*i<0&&(o-=f.pi*(0,f.kq)(r)*(0,f.kq)(n)),[o/i,2*(0,f.MQ)((0,f.g3)(a/t,1/i))-f.or]},t}function ne(){return Lr(ee).scale(109.5).parallels([30,30])}Xr.invert=function(r,e){return[r,2*(0,f.MQ)((0,f.oN)(e))-f.or]};var ie=n(69604);function ae(r,e){var n=(0,f.W8)(r),i=r===e?(0,f.g$)(r):(n-(0,f.W8)(e))/(e-r),a=n/i+r;if((0,f.a2)(i)2?r[2]+90:90]):[(r=n())[0],r[1],r[2]-90]},n([0,0,90]).scale(159.155)}he.invert=(0,_e.g)((function(r){return 2*(0,f.MQ)(r)})),xe.invert=function(r,e){return[-e,2*(0,f.MQ)((0,f.oN)(r))-f.or]}},27284:function(r,e,n){"use strict";n.d(e,{c:function(){return a}});var i=n(64528);function a(r,e){var n=r[0]*i.qw,a=r[1]*i.qw,t=e[0]*i.qw,o=e[1]*i.qw,c=(0,i.W8)(a),u=(0,i.g$)(a),d=(0,i.W8)(o),s=(0,i.g$)(o),l=c*(0,i.W8)(n),m=c*(0,i.g$)(n),p=d*(0,i.W8)(t),I=d*(0,i.g$)(t),y=2*(0,i.qR)((0,i._I)((0,i.SD)(o-a)+c*d*(0,i.SD)(t-n))),f=(0,i.g$)(y),g=y?function(r){var e=(0,i.g$)(r*=y)/f,n=(0,i.g$)(y-r)/f,a=n*l+e*p,t=n*m+e*I,o=n*u+e*s;return[(0,i.WE)(t,a)*i.oh,(0,i.WE)(o,(0,i._I)(a*a+t*t))*i.oh]}:function(){return[n*i.oh,a*i.oh]};return g.distance=y,g}},64528:function(r,e,n){"use strict";n.d(e,{Gg:function(){return i},Km:function(){return y},MQ:function(){return m},SD:function(){return S},W8:function(){return I},WE:function(){return p},Yz:function(){return g},_I:function(){return x},a2:function(){return l},a6:function(){return P},a8:function(){return a},g$:function(){return h},g3:function(){return _},kD:function(){return u},kq:function(){return v},mE:function(){return G},oN:function(){return f},oh:function(){return d},or:function(){return o},pi:function(){return t},qR:function(){return C},qw:function(){return s},wL:function(){return c}});var i=1e-6,a=1e-12,t=Math.PI,o=t/2,c=t/4,u=2*t,d=180/t,s=t/180,l=Math.abs,m=Math.atan,p=Math.atan2,I=Math.cos,y=Math.ceil,f=Math.exp,g=(Math.floor,Math.log),_=Math.pow,h=Math.sin,v=Math.sign||function(r){return r>0?1:r<0?-1:0},x=Math.sqrt,P=Math.tan;function G(r){return r>1?0:r<-1?t:Math.acos(r)}function C(r){return r>1?o:r<-1?-o:Math.asin(r)}function S(r){return(r=h(r/2))*r}},70932:function(r,e,n){"use strict";function i(){}n.d(e,{c:function(){return i}})},73784:function(r,e,n){"use strict";var i=n(70932),a=1/0,t=a,o=-a,c=o,u={point:function(r,e){ro&&(o=r),ec&&(c=e)},lineStart:i.c,lineEnd:i.c,polygonStart:i.c,polygonEnd:i.c,result:function(){var r=[[a,t],[o,c]];return o=c=-(t=a=1/0),r}};e.c=u},41860:function(r,e,n){"use strict";n.d(e,{c:function(){return a}});var i=n(64528);function a(r,e){return(0,i.a2)(r[0]-e[0])=0?1:-1,B=M*b,k=B>t.pi,F=h*S;if(o.add((0,t.WE)(F*M*(0,t.g$)(B),v*A+F*(0,t.W8)(B))),s+=k?b+M*t.kD:b,k^g>=n^G>=n){var z=(0,a.CW)((0,a.ux)(f),(0,a.ux)(P));(0,a.cJ)(z);var w=(0,a.CW)(d,z);(0,a.cJ)(w);var R=(k^b>=0?-1:1)*(0,t.qR)(w[2]);(i>R||i===R&&(z[0]||z[1]))&&(l+=k^b>=0?1:-1)}}return(s<-t.Gg||s4*e&&g--){var P=o+p,G=c+y,C=d+f,S=(0,u._I)(P*P+G*G+C*C),A=(0,u.qR)(C/=S),b=(0,u.a2)((0,u.a2)(C)-1)e||(0,u.a2)((h*F+v*z)/x-.5)>.3||o*p+c*y+d*f2?r[2]%360*u.qw:0,L()):[B*u.oh,k*u.oh,F*u.oh]},U.angle=function(r){return arguments.length?(z=r%360*u.qw,L()):z*u.oh},U.reflectX=function(r){return arguments.length?(w=r?-1:1,L()):w<0},U.reflectY=function(r){return arguments.length?(R=r?-1:1,L()):R<0},U.precision=function(r){return arguments.length?(h=y(v,J=r*r),O()):(0,u._I)(J)},U.fitExtent=function(r,e){return(0,l.QX)(U,r,e)},U.fitSize=function(r,e){return(0,l.UV)(U,r,e)},U.fitWidth=function(r,e){return(0,l.Qx)(U,r,e)},U.fitHeight=function(r,e){return(0,l.OW)(U,r,e)},function(){return e=r.apply(this,arguments),U.invert=e.invert&&H,L()}}},47984:function(r,e,n){"use strict";n.d(e,{c:function(){return o},g:function(){return t}});var i=n(87952),a=n(64528);function t(r,e){var n=e*e,i=n*n;return[r*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),e*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function o(){return(0,i.c)(t).scale(175.295)}t.invert=function(r,e){var n,i=e,t=25;do{var o=i*i,c=o*o;i-=n=(i*(1.007226+o*(.015085+c*(.028874*o-.044475-.005916*c)))-e)/(1.007226+o*(.045255+c*(.259866*o-.311325-.005916*11*c)))}while((0,a.a2)(n)>a.Gg&&--t>0);return[r/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]}},4888:function(r,e,n){"use strict";n.d(e,{c:function(){return c},t:function(){return o}});var i=n(64528),a=n(62280),t=n(87952);function o(r,e){return[(0,i.W8)(e)*(0,i.g$)(r),(0,i.g$)(e)]}function c(){return(0,t.c)(o).scale(249.5).clipAngle(90+i.Gg)}o.invert=(0,a.g)(i.qR)},92992:function(r,e,n){"use strict";n.d(e,{O:function(){return o},c:function(){return s}});var i=n(68120),a=n(64528);function t(r,e){return[(0,a.a2)(r)>a.pi?r+Math.round(-r/a.kD)*a.kD:r,e]}function o(r,e,n){return(r%=a.kD)?e||n?(0,i.c)(u(r),d(e,n)):u(r):e||n?d(e,n):t}function c(r){return function(e,n){return[(e+=r)>a.pi?e-a.kD:e<-a.pi?e+a.kD:e,n]}}function u(r){var e=c(r);return e.invert=c(-r),e}function d(r,e){var n=(0,a.W8)(r),i=(0,a.g$)(r),t=(0,a.W8)(e),o=(0,a.g$)(e);function c(r,e){var c=(0,a.W8)(e),u=(0,a.W8)(r)*c,d=(0,a.g$)(r)*c,s=(0,a.g$)(e),l=s*n+u*i;return[(0,a.WE)(d*t-l*o,u*n-s*i),(0,a.qR)(l*t+d*o)]}return c.invert=function(r,e){var c=(0,a.W8)(e),u=(0,a.W8)(r)*c,d=(0,a.g$)(r)*c,s=(0,a.g$)(e),l=s*t-d*o;return[(0,a.WE)(d*t+s*o,u*n+l*i),(0,a.qR)(l*n-u*i)]},c}function s(r){function e(e){return(e=r(e[0]*a.qw,e[1]*a.qw))[0]*=a.oh,e[1]*=a.oh,e}return r=o(r[0]*a.qw,r[1]*a.qw,r.length>2?r[2]*a.qw:0),e.invert=function(e){return(e=r.invert(e[0]*a.qw,e[1]*a.qw))[0]*=a.oh,e[1]*=a.oh,e},e}t.invert=t},16016:function(r,e,n){"use strict";function i(r,e){r&&t.hasOwnProperty(r.type)&&t[r.type](r,e)}n.d(e,{c:function(){return u}});var a={Feature:function(r,e){i(r.geometry,e)},FeatureCollection:function(r,e){for(var n=r.features,a=-1,t=n.length;++a=0;)e+=n[i].value;else e=1;r.value=e}function u(r,e){var n,i,a,t,o,c=new m(r),u=+r.value&&(c.value=r.value),s=[c];for(null==e&&(e=d);n=s.pop();)if(u&&(n.value=+n.data.value),(a=e(n.data))&&(o=a.length))for(n.children=new Array(o),t=o-1;t>=0;--t)s.push(i=n.children[t]=new m(a[t])),i.parent=n,i.depth=n.depth+1;return c.eachBefore(l)}function d(r){return r.children}function s(r){r.data=r.data.data}function l(r){var e=0;do{r.height=e}while((r=r.parent)&&r.height<++e)}function m(r){this.data=r,this.depth=this.height=0,this.parent=null}n.r(e),n.d(e,{cluster:function(){return o},hierarchy:function(){return u},pack:function(){return z},packEnclose:function(){return I},packSiblings:function(){return b},partition:function(){return D},stratify:function(){return K},tree:function(){return X},treemap:function(){return nr},treemapBinary:function(){return ir},treemapDice:function(){return T},treemapResquarify:function(){return tr},treemapSlice:function(){return Q},treemapSliceDice:function(){return ar},treemapSquarify:function(){return er}}),m.prototype=u.prototype={constructor:m,count:function(){return this.eachAfter(c)},each:function(r){var e,n,i,a,t=this,o=[t];do{for(e=o.reverse(),o=[];t=e.pop();)if(r(t),n=t.children)for(i=0,a=n.length;i=0;--n)a.push(e[n]);return this},sum:function(r){return this.eachAfter((function(e){for(var n=+r(e.data)||0,i=e.children,a=i&&i.length;--a>=0;)n+=i[a].value;e.value=n}))},sort:function(r){return this.eachBefore((function(e){e.children&&e.children.sort(r)}))},path:function(r){for(var e=this,n=function(r,e){if(r===e)return r;var n=r.ancestors(),i=e.ancestors(),a=null;for(r=n.pop(),e=i.pop();r===e;)a=r,r=n.pop(),e=i.pop();return a}(e,r),i=[e];e!==n;)e=e.parent,i.push(e);for(var a=i.length;r!==n;)i.splice(a,0,r),r=r.parent;return i},ancestors:function(){for(var r=this,e=[r];r=r.parent;)e.push(r);return e},descendants:function(){var r=[];return this.each((function(e){r.push(e)})),r},leaves:function(){var r=[];return this.eachBefore((function(e){e.children||r.push(e)})),r},links:function(){var r=this,e=[];return r.each((function(n){n!==r&&e.push({source:n.parent,target:n})})),e},copy:function(){return u(this).eachBefore(s)}};var p=Array.prototype.slice;function I(r){for(var e,n,i=0,a=(r=function(r){for(var e,n,i=r.length;i;)n=Math.random()*i--|0,e=r[i],r[i]=r[n],r[n]=e;return r}(p.call(r))).length,t=[];i0&&n*n>i*i+a*a}function _(r,e){for(var n=0;n(o*=o)?(i=(d+o-a)/(2*d),t=Math.sqrt(Math.max(0,o/d-i*i)),n.x=r.x-i*c-t*u,n.y=r.y-i*u+t*c):(i=(d+a-o)/(2*d),t=Math.sqrt(Math.max(0,a/d-i*i)),n.x=e.x+i*c-t*u,n.y=e.y+i*u+t*c)):(n.x=e.x+n.r,n.y=e.y)}function G(r,e){var n=r.r+e.r-1e-6,i=e.x-r.x,a=e.y-r.y;return n>0&&n*n>i*i+a*a}function C(r){var e=r._,n=r.next._,i=e.r+n.r,a=(e.x*n.r+n.x*e.r)/i,t=(e.y*n.r+n.y*e.r)/i;return a*a+t*t}function S(r){this._=r,this.next=null,this.previous=null}function A(r){if(!(a=r.length))return 0;var e,n,i,a,t,o,c,u,d,s,l;if((e=r[0]).x=0,e.y=0,!(a>1))return e.r;if(n=r[1],e.x=-n.r,n.x=e.r,n.y=0,!(a>2))return e.r+n.r;P(n,e,i=r[2]),e=new S(e),n=new S(n),i=new S(i),e.next=i.previous=n,n.next=e.previous=i,i.next=n.previous=e;r:for(c=3;c0)throw new Error("cycle");return t}return n.id=function(e){return arguments.length?(r=M(e),n):r},n.parentId=function(r){return arguments.length?(e=M(r),n):e},n}function V(r,e){return r.parent===e.parent?1:2}function j(r){var e=r.children;return e?e[0]:r.t}function W(r){var e=r.children;return e?e[e.length-1]:r.t}function Z(r,e,n){var i=n/(e.i-r.i);e.c-=i,e.s+=n,r.c+=i,e.z+=n,e.m+=n}function q(r,e,n){return r.a.parent===e.parent?r.a:n}function Y(r,e){this._=r,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=e}function X(){var r=V,e=1,n=1,i=null;function a(a){var u=function(r){for(var e,n,i,a,t,o=new Y(r,0),c=[o];e=c.pop();)if(i=e._.children)for(e.children=new Array(t=i.length),a=t-1;a>=0;--a)c.push(n=e.children[a]=new Y(i[a],a)),n.parent=e;return(o.parent=new Y(null,0)).children=[o],o}(a);if(u.eachAfter(t),u.parent.m=-u.z,u.eachBefore(o),i)a.eachBefore(c);else{var d=a,s=a,l=a;a.eachBefore((function(r){r.xs.x&&(s=r),r.depth>l.depth&&(l=r)}));var m=d===s?1:r(d,s)/2,p=m-d.x,I=e/(s.x+m+p),y=n/(l.depth||1);a.eachBefore((function(r){r.x=(r.x+p)*I,r.y=r.depth*y}))}return a}function t(e){var n=e.children,i=e.parent.children,a=e.i?i[e.i-1]:null;if(n){!function(r){for(var e,n=0,i=0,a=r.children,t=a.length;--t>=0;)(e=a[t]).z+=n,e.m+=n,n+=e.s+(i+=e.c)}(e);var t=(n[0].z+n[n.length-1].z)/2;a?(e.z=a.z+r(e._,a._),e.m=e.z-t):e.z=t}else a&&(e.z=a.z+r(e._,a._));e.parent.A=function(e,n,i){if(n){for(var a,t=e,o=e,c=n,u=t.parent.children[0],d=t.m,s=o.m,l=c.m,m=u.m;c=W(c),t=j(t),c&&t;)u=j(u),(o=W(o)).a=e,(a=c.z+l-t.z-d+r(c._,t._))>0&&(Z(q(c,e,i),e,a),d+=a,s+=a),l+=c.m,d+=t.m,m+=u.m,s+=o.m;c&&!W(o)&&(o.t=c,o.m+=l-s),t&&!j(u)&&(u.t=t,u.m+=d-m,i=e)}return i}(e,a,e.parent.A||i[0])}function o(r){r._.x=r.z+r.parent.m,r.m+=r.parent.m}function c(r){r.x*=e,r.y=r.depth*n}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(r){return arguments.length?(i=!1,e=+r[0],n=+r[1],a):i?null:[e,n]},a.nodeSize=function(r){return arguments.length?(i=!0,e=+r[0],n=+r[1],a):i?[e,n]:null},a}function Q(r,e,n,i,a){for(var t,o=r.children,c=-1,u=o.length,d=r.value&&(a-n)/r.value;++cm&&(m=c),f=s*s*y,(p=Math.max(m/f,f/l))>I){s-=c;break}I=p}g.push(o={value:s,dice:u1?e:1)},n}($);function nr(){var r=er,e=!1,n=1,i=1,a=[0],t=B,o=B,c=B,u=B,d=B;function s(r){return r.x0=r.y0=0,r.x1=n,r.y1=i,r.eachBefore(l),a=[0],e&&r.eachBefore(N),r}function l(e){var n=a[e.depth],i=e.x0+n,s=e.y0+n,l=e.x1-n,m=e.y1-n;l=n-1){var s=c[e];return s.x0=a,s.y0=t,s.x1=o,void(s.y1=u)}for(var l=d[e],m=i/2+l,p=e+1,I=n-1;p>>1;d[y]u-t){var _=(a*g+o*f)/i;r(e,p,f,a,t,_,u),r(p,n,g,_,t,o,u)}else{var h=(t*g+u*f)/i;r(e,p,f,a,t,o,h),r(p,n,g,a,h,o,u)}}(0,u,r.value,e,n,i,a)}function ar(r,e,n,i,a){(1&r.depth?Q:T)(r,e,n,i,a)}var tr=function r(e){function n(r,n,i,a,t){if((o=r._squarify)&&o.ratio===e)for(var o,c,u,d,s,l=-1,m=o.length,p=r.value;++l1?e:1)},n}($)},10132:function(r,e,n){"use strict";n.d(e,{ak:function(){return _}});var i=Math.PI,a=2*i,t=1e-6,o=a-t;function c(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function u(){return new c}c.prototype=u.prototype={constructor:c,moveTo:function(r,e){this._+="M"+(this._x0=this._x1=+r)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(r,e){this._+="L"+(this._x1=+r)+","+(this._y1=+e)},quadraticCurveTo:function(r,e,n,i){this._+="Q"+ +r+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(r,e,n,i,a,t){this._+="C"+ +r+","+ +e+","+ +n+","+ +i+","+(this._x1=+a)+","+(this._y1=+t)},arcTo:function(r,e,n,a,o){r=+r,e=+e,n=+n,a=+a,o=+o;var c=this._x1,u=this._y1,d=n-r,s=a-e,l=c-r,m=u-e,p=l*l+m*m;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=r)+","+(this._y1=e);else if(p>t)if(Math.abs(m*d-s*l)>t&&o){var I=n-c,y=a-u,f=d*d+s*s,g=I*I+y*y,_=Math.sqrt(f),h=Math.sqrt(p),v=o*Math.tan((i-Math.acos((f+p-g)/(2*_*h)))/2),x=v/h,P=v/_;Math.abs(x-1)>t&&(this._+="L"+(r+x*l)+","+(e+x*m)),this._+="A"+o+","+o+",0,0,"+ +(m*I>l*y)+","+(this._x1=r+P*d)+","+(this._y1=e+P*s)}else this._+="L"+(this._x1=r)+","+(this._y1=e)},arc:function(r,e,n,c,u,d){r=+r,e=+e,d=!!d;var s=(n=+n)*Math.cos(c),l=n*Math.sin(c),m=r+s,p=e+l,I=1^d,y=d?c-u:u-c;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+m+","+p:(Math.abs(this._x1-m)>t||Math.abs(this._y1-p)>t)&&(this._+="L"+m+","+p),n&&(y<0&&(y=y%a+a),y>o?this._+="A"+n+","+n+",0,1,"+I+","+(r-s)+","+(e-l)+"A"+n+","+n+",0,1,"+I+","+(this._x1=m)+","+(this._y1=p):y>t&&(this._+="A"+n+","+n+",0,"+ +(y>=i)+","+I+","+(this._x1=r+n*Math.cos(u))+","+(this._y1=e+n*Math.sin(u))))},rect:function(r,e,n,i){this._+="M"+(this._x0=this._x1=+r)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var d=u,s=Array.prototype.slice;function l(r){return function(){return r}}function m(r){return r[0]}function p(r){return r[1]}function I(r){return r.source}function y(r){return r.target}function f(r){var e=I,n=y,i=m,a=p,t=null;function o(){var o,c=s.call(arguments),u=e.apply(this,c),l=n.apply(this,c);if(t||(t=o=d()),r(t,+i.apply(this,(c[0]=u,c)),+a.apply(this,c),+i.apply(this,(c[0]=l,c)),+a.apply(this,c)),o)return t=null,o+""||null}return o.source=function(r){return arguments.length?(e=r,o):e},o.target=function(r){return arguments.length?(n=r,o):n},o.x=function(r){return arguments.length?(i="function"===typeof r?r:l(+r),o):i},o.y=function(r){return arguments.length?(a="function"===typeof r?r:l(+r),o):a},o.context=function(r){return arguments.length?(t=null==r?null:r,o):t},o}function g(r,e,n,i,a){r.moveTo(e,n),r.bezierCurveTo(e=(e+i)/2,n,e,a,i,a)}function _(){return f(g)}},94336:function(r,e,n){"use strict";n.d(e,{Yn:function(){return I},m_:function(){return m},E9:function(){return y}});var i=n(8208),a=n(58931),t=n(46192),o=n(68936),c=n(32171),u=n(53528);function d(r){if(0<=r.y&&r.y<100){var e=new Date(-1,r.m,r.d,r.H,r.M,r.S,r.L);return e.setFullYear(r.y),e}return new Date(r.y,r.m,r.d,r.H,r.M,r.S,r.L)}function s(r){if(0<=r.y&&r.y<100){var e=new Date(Date.UTC(-1,r.m,r.d,r.H,r.M,r.S,r.L));return e.setUTCFullYear(r.y),e}return new Date(Date.UTC(r.y,r.m,r.d,r.H,r.M,r.S,r.L))}function l(r,e,n){return{y:r,m:e,d:n,H:0,M:0,S:0,L:0}}function m(r){var e=r.dateTime,n=r.date,c=r.time,u=r.periods,m=r.days,p=r.shortDays,I=r.months,y=r.shortMonths,g=P(u),_=G(u),h=P(m),v=G(m),x=P(p),br=G(p),Mr=P(I),Br=G(I),kr=P(y),Fr=G(y),zr={a:function(r){return p[r.getDay()]},A:function(r){return m[r.getDay()]},b:function(r){return y[r.getMonth()]},B:function(r){return I[r.getMonth()]},c:null,d:K,e:K,f:q,H:V,I:j,j:W,L:Z,m:Y,M:X,p:function(r){return u[+(r.getHours()>=12)]},q:function(r){return 1+~~(r.getMonth()/3)},Q:Sr,s:Ar,S:Q,u:$,U:rr,V:er,w:nr,W:ir,x:null,X:null,y:ar,Y:tr,Z:or,"%":Cr},wr={a:function(r){return p[r.getUTCDay()]},A:function(r){return m[r.getUTCDay()]},b:function(r){return y[r.getUTCMonth()]},B:function(r){return I[r.getUTCMonth()]},c:null,d:cr,e:cr,f:mr,H:ur,I:dr,j:sr,L:lr,m:pr,M:Ir,p:function(r){return u[+(r.getUTCHours()>=12)]},q:function(r){return 1+~~(r.getUTCMonth()/3)},Q:Sr,s:Ar,S:yr,u:fr,U:gr,V:_r,w:hr,W:vr,x:null,X:null,y:xr,Y:Pr,Z:Gr,"%":Cr},Rr={a:function(r,e,n){var i=x.exec(e.slice(n));return i?(r.w=br[i[0].toLowerCase()],n+i[0].length):-1},A:function(r,e,n){var i=h.exec(e.slice(n));return i?(r.w=v[i[0].toLowerCase()],n+i[0].length):-1},b:function(r,e,n){var i=kr.exec(e.slice(n));return i?(r.m=Fr[i[0].toLowerCase()],n+i[0].length):-1},B:function(r,e,n){var i=Mr.exec(e.slice(n));return i?(r.m=Br[i[0].toLowerCase()],n+i[0].length):-1},c:function(r,n,i){return Tr(r,e,n,i)},d:R,e:R,f:U,H:N,I:N,j:E,L:J,m:w,M:T,p:function(r,e,n){var i=g.exec(e.slice(n));return i?(r.p=_[i[0].toLowerCase()],n+i[0].length):-1},q:z,Q:L,s:O,S:D,u:S,U:A,V:b,w:C,W:M,x:function(r,e,i){return Tr(r,n,e,i)},X:function(r,e,n){return Tr(r,c,e,n)},y:k,Y:B,Z:F,"%":H};function Er(r,e){return function(n){var i,a,t,o=[],c=-1,u=0,d=r.length;for(n instanceof Date||(n=new Date(+n));++c53)return null;"w"in m||(m.w=1),"Z"in m?(u=(c=s(l(m.y,0,1))).getUTCDay(),c=u>4||0===u?i.ot.ceil(c):(0,i.ot)(c),c=a.c.offset(c,7*(m.V-1)),m.y=c.getUTCFullYear(),m.m=c.getUTCMonth(),m.d=c.getUTCDate()+(m.w+6)%7):(u=(c=d(l(m.y,0,1))).getDay(),c=u>4||0===u?t.qT.ceil(c):(0,t.qT)(c),c=o.c.offset(c,7*(m.V-1)),m.y=c.getFullYear(),m.m=c.getMonth(),m.d=c.getDate()+(m.w+6)%7)}else("W"in m||"U"in m)&&("w"in m||(m.w="u"in m?m.u%7:"W"in m?1:0),u="Z"in m?s(l(m.y,0,1)).getUTCDay():d(l(m.y,0,1)).getDay(),m.m=0,m.d="W"in m?(m.w+6)%7+7*m.W-(u+5)%7:m.w+7*m.U-(u+6)%7);return"Z"in m?(m.H+=m.Z/100|0,m.M+=m.Z%100,s(m)):d(m)}}function Tr(r,e,n,i){for(var a,t,o=0,c=e.length,u=n.length;o=u)return-1;if(37===(a=e.charCodeAt(o++))){if(a=e.charAt(o++),!(t=Rr[a in f?e.charAt(o++):a])||(i=t(r,n,i))<0)return-1}else if(a!=n.charCodeAt(i++))return-1}return i}return zr.x=Er(n,zr),zr.X=Er(c,zr),zr.c=Er(e,zr),wr.x=Er(n,wr),wr.X=Er(c,wr),wr.c=Er(e,wr),{format:function(r){var e=Er(r+="",zr);return e.toString=function(){return r},e},parse:function(r){var e=Nr(r+="",!1);return e.toString=function(){return r},e},utcFormat:function(r){var e=Er(r+="",wr);return e.toString=function(){return r},e},utcParse:function(r){var e=Nr(r+="",!0);return e.toString=function(){return r},e}}}var p,I,y,f={"-":"",_:" ",0:"0"},g=/^\s*\d+/,_=/^%/,h=/[\\^$*+?|[\]().{}]/g;function v(r,e,n){var i=r<0?"-":"",a=(i?-r:r)+"",t=a.length;return i+(t68?1900:2e3),n+i[0].length):-1}function F(r,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(r.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function z(r,e,n){var i=g.exec(e.slice(n,n+1));return i?(r.q=3*i[0]-3,n+i[0].length):-1}function w(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.m=i[0]-1,n+i[0].length):-1}function R(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.d=+i[0],n+i[0].length):-1}function E(r,e,n){var i=g.exec(e.slice(n,n+3));return i?(r.m=0,r.d=+i[0],n+i[0].length):-1}function N(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.H=+i[0],n+i[0].length):-1}function T(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.M=+i[0],n+i[0].length):-1}function D(r,e,n){var i=g.exec(e.slice(n,n+2));return i?(r.S=+i[0],n+i[0].length):-1}function J(r,e,n){var i=g.exec(e.slice(n,n+3));return i?(r.L=+i[0],n+i[0].length):-1}function U(r,e,n){var i=g.exec(e.slice(n,n+6));return i?(r.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function H(r,e,n){var i=_.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function L(r,e,n){var i=g.exec(e.slice(n));return i?(r.Q=+i[0],n+i[0].length):-1}function O(r,e,n){var i=g.exec(e.slice(n));return i?(r.s=+i[0],n+i[0].length):-1}function K(r,e){return v(r.getDate(),e,2)}function V(r,e){return v(r.getHours(),e,2)}function j(r,e){return v(r.getHours()%12||12,e,2)}function W(r,e){return v(1+o.c.count((0,c.c)(r),r),e,3)}function Z(r,e){return v(r.getMilliseconds(),e,3)}function q(r,e){return Z(r,e)+"000"}function Y(r,e){return v(r.getMonth()+1,e,2)}function X(r,e){return v(r.getMinutes(),e,2)}function Q(r,e){return v(r.getSeconds(),e,2)}function $(r){var e=r.getDay();return 0===e?7:e}function rr(r,e){return v(t.uU.count((0,c.c)(r)-1,r),e,2)}function er(r,e){var n=r.getDay();return r=n>=4||0===n?(0,t.kD)(r):t.kD.ceil(r),v(t.kD.count((0,c.c)(r),r)+(4===(0,c.c)(r).getDay()),e,2)}function nr(r){return r.getDay()}function ir(r,e){return v(t.qT.count((0,c.c)(r)-1,r),e,2)}function ar(r,e){return v(r.getFullYear()%100,e,2)}function tr(r,e){return v(r.getFullYear()%1e4,e,4)}function or(r){var e=r.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+v(e/60|0,"0",2)+v(e%60,"0",2)}function cr(r,e){return v(r.getUTCDate(),e,2)}function ur(r,e){return v(r.getUTCHours(),e,2)}function dr(r,e){return v(r.getUTCHours()%12||12,e,2)}function sr(r,e){return v(1+a.c.count((0,u.c)(r),r),e,3)}function lr(r,e){return v(r.getUTCMilliseconds(),e,3)}function mr(r,e){return lr(r,e)+"000"}function pr(r,e){return v(r.getUTCMonth()+1,e,2)}function Ir(r,e){return v(r.getUTCMinutes(),e,2)}function yr(r,e){return v(r.getUTCSeconds(),e,2)}function fr(r){var e=r.getUTCDay();return 0===e?7:e}function gr(r,e){return v(i.EV.count((0,u.c)(r)-1,r),e,2)}function _r(r,e){var n=r.getUTCDay();return r=n>=4||0===n?(0,i.yA)(r):i.yA.ceil(r),v(i.yA.count((0,u.c)(r),r)+(4===(0,u.c)(r).getUTCDay()),e,2)}function hr(r){return r.getUTCDay()}function vr(r,e){return v(i.ot.count((0,u.c)(r)-1,r),e,2)}function xr(r,e){return v(r.getUTCFullYear()%100,e,2)}function Pr(r,e){return v(r.getUTCFullYear()%1e4,e,4)}function Gr(){return"+0000"}function Cr(){return"%"}function Sr(r){return+r}function Ar(r){return Math.floor(+r/1e3)}p=m({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]}),I=p.format,p.parse,y=p.utcFormat,p.utcParse},68936:function(r,e,n){"use strict";n.d(e,{m:function(){return o}});var i=n(81628),a=n(69792),t=(0,i.c)((function(r){r.setHours(0,0,0,0)}),(function(r,e){r.setDate(r.getDate()+e)}),(function(r,e){return(e-r-(e.getTimezoneOffset()-r.getTimezoneOffset())*a.iy)/a.SK}),(function(r){return r.getDate()-1}));e.c=t;var o=t.range},69792:function(r,e,n){"use strict";n.d(e,{KK:function(){return c},SK:function(){return o},cg:function(){return t},iy:function(){return a},yc:function(){return i}});var i=1e3,a=6e4,t=36e5,o=864e5,c=6048e5},73220:function(r,e,n){"use strict";n.r(e),n.d(e,{timeDay:function(){return g.c},timeDays:function(){return g.m},timeFriday:function(){return _.iB},timeFridays:function(){return _.sJ},timeHour:function(){return y},timeHours:function(){return f},timeInterval:function(){return i.c},timeMillisecond:function(){return t},timeMilliseconds:function(){return o},timeMinute:function(){return m},timeMinutes:function(){return p},timeMonday:function(){return _.qT},timeMondays:function(){return _.QP},timeMonth:function(){return v},timeMonths:function(){return x},timeSaturday:function(){return _.Wc},timeSaturdays:function(){return _.aI},timeSecond:function(){return d},timeSeconds:function(){return s},timeSunday:function(){return _.uU},timeSundays:function(){return _.Ab},timeThursday:function(){return _.kD},timeThursdays:function(){return _.eC},timeTuesday:function(){return _.Mf},timeTuesdays:function(){return _.Oc},timeWednesday:function(){return _.eg},timeWednesdays:function(){return _.sn},timeWeek:function(){return _.uU},timeWeeks:function(){return _.Ab},timeYear:function(){return P.c},timeYears:function(){return P.Q},utcDay:function(){return B.c},utcDays:function(){return B.o},utcFriday:function(){return k.od},utcFridays:function(){return k.iG},utcHour:function(){return b},utcHours:function(){return M},utcMillisecond:function(){return t},utcMilliseconds:function(){return o},utcMinute:function(){return C},utcMinutes:function(){return S},utcMonday:function(){return k.ot},utcMondays:function(){return k.iO},utcMonth:function(){return z},utcMonths:function(){return w},utcSaturday:function(){return k.Ad},utcSaturdays:function(){return k.K8},utcSecond:function(){return d},utcSeconds:function(){return s},utcSunday:function(){return k.EV},utcSundays:function(){return k.Wq},utcThursday:function(){return k.yA},utcThursdays:function(){return k.ob},utcTuesday:function(){return k.sG},utcTuesdays:function(){return k.kl},utcWednesday:function(){return k._6},utcWednesdays:function(){return k.W_},utcWeek:function(){return k.EV},utcWeeks:function(){return k.Wq},utcYear:function(){return R.c},utcYears:function(){return R.i}});var i=n(81628),a=(0,i.c)((function(){}),(function(r,e){r.setTime(+r+e)}),(function(r,e){return e-r}));a.every=function(r){return r=Math.floor(r),isFinite(r)&&r>0?r>1?(0,i.c)((function(e){e.setTime(Math.floor(e/r)*r)}),(function(e,n){e.setTime(+e+n*r)}),(function(e,n){return(n-e)/r})):a:null};var t=a,o=a.range,c=n(69792),u=(0,i.c)((function(r){r.setTime(r-r.getMilliseconds())}),(function(r,e){r.setTime(+r+e*c.yc)}),(function(r,e){return(e-r)/c.yc}),(function(r){return r.getUTCSeconds()})),d=u,s=u.range,l=(0,i.c)((function(r){r.setTime(r-r.getMilliseconds()-r.getSeconds()*c.yc)}),(function(r,e){r.setTime(+r+e*c.iy)}),(function(r,e){return(e-r)/c.iy}),(function(r){return r.getMinutes()})),m=l,p=l.range,I=(0,i.c)((function(r){r.setTime(r-r.getMilliseconds()-r.getSeconds()*c.yc-r.getMinutes()*c.iy)}),(function(r,e){r.setTime(+r+e*c.cg)}),(function(r,e){return(e-r)/c.cg}),(function(r){return r.getHours()})),y=I,f=I.range,g=n(68936),_=n(46192),h=(0,i.c)((function(r){r.setDate(1),r.setHours(0,0,0,0)}),(function(r,e){r.setMonth(r.getMonth()+e)}),(function(r,e){return e.getMonth()-r.getMonth()+12*(e.getFullYear()-r.getFullYear())}),(function(r){return r.getMonth()})),v=h,x=h.range,P=n(32171),G=(0,i.c)((function(r){r.setUTCSeconds(0,0)}),(function(r,e){r.setTime(+r+e*c.iy)}),(function(r,e){return(e-r)/c.iy}),(function(r){return r.getUTCMinutes()})),C=G,S=G.range,A=(0,i.c)((function(r){r.setUTCMinutes(0,0,0)}),(function(r,e){r.setTime(+r+e*c.cg)}),(function(r,e){return(e-r)/c.cg}),(function(r){return r.getUTCHours()})),b=A,M=A.range,B=n(58931),k=n(8208),F=(0,i.c)((function(r){r.setUTCDate(1),r.setUTCHours(0,0,0,0)}),(function(r,e){r.setUTCMonth(r.getUTCMonth()+e)}),(function(r,e){return e.getUTCMonth()-r.getUTCMonth()+12*(e.getUTCFullYear()-r.getUTCFullYear())}),(function(r){return r.getUTCMonth()})),z=F,w=F.range,R=n(53528)},81628:function(r,e,n){"use strict";n.d(e,{c:function(){return t}});var i=new Date,a=new Date;function t(r,e,n,o){function c(e){return r(e=0===arguments.length?new Date:new Date(+e)),e}return c.floor=function(e){return r(e=new Date(+e)),e},c.ceil=function(n){return r(n=new Date(n-1)),e(n,1),r(n),n},c.round=function(r){var e=c(r),n=c.ceil(r);return r-e0))return o;do{o.push(t=new Date(+n)),e(n,a),r(n)}while(t=e)for(;r(e),!n(e);)e.setTime(e-1)}),(function(r,i){if(r>=r)if(i<0)for(;++i<=0;)for(;e(r,-1),!n(r););else for(;--i>=0;)for(;e(r,1),!n(r););}))},n&&(c.count=function(e,t){return i.setTime(+e),a.setTime(+t),r(i),r(a),Math.floor(n(i,a))},c.every=function(r){return r=Math.floor(r),isFinite(r)&&r>0?r>1?c.filter(o?function(e){return o(e)%r===0}:function(e){return c.count(0,e)%r===0}):c:null}),c}},58931:function(r,e,n){"use strict";n.d(e,{o:function(){return o}});var i=n(81628),a=n(69792),t=(0,i.c)((function(r){r.setUTCHours(0,0,0,0)}),(function(r,e){r.setUTCDate(r.getUTCDate()+e)}),(function(r,e){return(e-r)/a.SK}),(function(r){return r.getUTCDate()-1}));e.c=t;var o=t.range},8208:function(r,e,n){"use strict";n.d(e,{Ad:function(){return m},EV:function(){return o},K8:function(){return h},W_:function(){return f},Wq:function(){return p},_6:function(){return d},iG:function(){return _},iO:function(){return I},kl:function(){return y},ob:function(){return g},od:function(){return l},ot:function(){return c},sG:function(){return u},yA:function(){return s}});var i=n(81628),a=n(69792);function t(r){return(0,i.c)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-r)%7),e.setUTCHours(0,0,0,0)}),(function(r,e){r.setUTCDate(r.getUTCDate()+7*e)}),(function(r,e){return(e-r)/a.KK}))}var o=t(0),c=t(1),u=t(2),d=t(3),s=t(4),l=t(5),m=t(6),p=o.range,I=c.range,y=u.range,f=d.range,g=s.range,_=l.range,h=m.range},53528:function(r,e,n){"use strict";n.d(e,{i:function(){return t}});var i=n(81628),a=(0,i.c)((function(r){r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)}),(function(r,e){r.setUTCFullYear(r.getUTCFullYear()+e)}),(function(r,e){return e.getUTCFullYear()-r.getUTCFullYear()}),(function(r){return r.getUTCFullYear()}));a.every=function(r){return isFinite(r=Math.floor(r))&&r>0?(0,i.c)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/r)*r),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*r)})):null},e.c=a;var t=a.range},46192:function(r,e,n){"use strict";n.d(e,{Ab:function(){return p},Mf:function(){return u},Oc:function(){return y},QP:function(){return I},Wc:function(){return m},aI:function(){return h},eC:function(){return g},eg:function(){return d},iB:function(){return l},kD:function(){return s},qT:function(){return c},sJ:function(){return _},sn:function(){return f},uU:function(){return o}});var i=n(81628),a=n(69792);function t(r){return(0,i.c)((function(e){e.setDate(e.getDate()-(e.getDay()+7-r)%7),e.setHours(0,0,0,0)}),(function(r,e){r.setDate(r.getDate()+7*e)}),(function(r,e){return(e-r-(e.getTimezoneOffset()-r.getTimezoneOffset())*a.iy)/a.KK}))}var o=t(0),c=t(1),u=t(2),d=t(3),s=t(4),l=t(5),m=t(6),p=o.range,I=c.range,y=u.range,f=d.range,g=s.range,_=l.range,h=m.range},32171:function(r,e,n){"use strict";n.d(e,{Q:function(){return t}});var i=n(81628),a=(0,i.c)((function(r){r.setMonth(0,1),r.setHours(0,0,0,0)}),(function(r,e){r.setFullYear(r.getFullYear()+e)}),(function(r,e){return e.getFullYear()-r.getFullYear()}),(function(r){return r.getFullYear()}));a.every=function(r){return isFinite(r=Math.floor(r))&&r>0?(0,i.c)((function(e){e.setFullYear(Math.floor(e.getFullYear()/r)*r),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*r)})):null},e.c=a;var t=a.range},64348:function(r,e,n){"use strict";var i=n(39640)(),a=n(53664),t=i&&a("%Object.defineProperty%",!0);if(t)try{t({},"a",{value:1})}catch(d){t=!1}var o=a("%SyntaxError%"),c=a("%TypeError%"),u=n(2304);r.exports=function(r,e,n){if(!r||"object"!==typeof r&&"function"!==typeof r)throw new c("`obj` must be an object or a function`");if("string"!==typeof e&&"symbol"!==typeof e)throw new c("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new c("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new c("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,s=arguments.length>6&&arguments[6],l=!!u&&u(r,e);if(t)t(r,e,{configurable:null===d&&l?l.configurable:!d,enumerable:null===i&&l?l.enumerable:!i,value:n,writable:null===a&&l?l.writable:!a});else{if(!s&&(i||a||d))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");r[e]=n}}},81288:function(r,e,n){"use strict";var i=n(41820),a="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),t=Object.prototype.toString,o=Array.prototype.concat,c=Object.defineProperty,u=n(39640)(),d=c&&u,s=function(r,e,n,i){if(e in r)if(!0===i){if(r[e]===n)return}else if("function"!==typeof(a=i)||"[object Function]"!==t.call(a)||!i())return;var a;d?c(r,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):r[e]=n},l=function(r,e){var n=arguments.length>2?arguments[2]:{},t=i(e);a&&(t=o.call(t,Object.getOwnPropertySymbols(e)));for(var c=0;cc*u){var p=(m-l)/c;o[s]=1e3*p}}return o}function a(r){for(var e=[],n=r[0];n<=r[1];n++)for(var i=String.fromCharCode(n),a=r[0];a0)return function(r,e){var n,i;for(n=new Array(r),i=0;i80*t){o=u=r[0],c=l=r[1];for(var v=t;vu&&(u=m),I>l&&(l=I);y=0!==(y=Math.max(u-o,l-c))?1/y:0}return a(_,h,t,o,c,y),h}function n(r,e,n,i,a){var t,o;if(a===A(r,e,n,i)>0)for(t=e;t=e;t-=i)o=G(t,r[t],r[t+1],o);return o&&g(o,o.next)&&(C(o),o=o.next),o}function i(r,e){if(!r)return r;e||(e=r);var n,i=r;do{if(n=!1,i.steiner||!g(i,i.next)&&0!==f(i.prev,i,i.next))i=i.next;else{if(C(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function a(r,e,n,d,s,l,p){if(r){!p&&l&&function(r,e,n,i){var a=r;do{null===a.z&&(a.z=m(a.x,a.y,e,n,i)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==r);a.prevZ.nextZ=null,a.prevZ=null,function(r){var e,n,i,a,t,o,c,u,d=1;do{for(n=r,r=null,t=null,o=0;n;){for(o++,i=n,c=0,e=0;e0||u>0&&i;)0!==c&&(0===u||!i||n.z<=i.z)?(a=n,n=n.nextZ,c--):(a=i,i=i.nextZ,u--),t?t.nextZ=a:r=a,a.prevZ=t,t=a;n=i}t.nextZ=null,d*=2}while(o>1)}(a)}(r,d,s,l);for(var I,y,f=r;r.prev!==r.next;)if(I=r.prev,y=r.next,l?o(r,d,s,l):t(r))e.push(I.i/n),e.push(r.i/n),e.push(y.i/n),C(r),r=y.next,f=y.next;else if((r=y)===f){p?1===p?a(r=c(i(r),e,n),e,n,d,s,l,2):2===p&&u(r,e,n,d,s,l):a(i(r),e,n,d,s,l,1);break}}}function t(r){var e=r.prev,n=r,i=r.next;if(f(e,n,i)>=0)return!1;for(var a=r.next.next;a!==r.prev;){if(I(e.x,e.y,n.x,n.y,i.x,i.y,a.x,a.y)&&f(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function o(r,e,n,i){var a=r.prev,t=r,o=r.next;if(f(a,t,o)>=0)return!1;for(var c=a.xt.x?a.x>o.x?a.x:o.x:t.x>o.x?t.x:o.x,s=a.y>t.y?a.y>o.y?a.y:o.y:t.y>o.y?t.y:o.y,l=m(c,u,e,n,i),p=m(d,s,e,n,i),y=r.prevZ,g=r.nextZ;y&&y.z>=l&&g&&g.z<=p;){if(y!==r.prev&&y!==r.next&&I(a.x,a.y,t.x,t.y,o.x,o.y,y.x,y.y)&&f(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,g!==r.prev&&g!==r.next&&I(a.x,a.y,t.x,t.y,o.x,o.y,g.x,g.y)&&f(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;y&&y.z>=l;){if(y!==r.prev&&y!==r.next&&I(a.x,a.y,t.x,t.y,o.x,o.y,y.x,y.y)&&f(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;g&&g.z<=p;){if(g!==r.prev&&g!==r.next&&I(a.x,a.y,t.x,t.y,o.x,o.y,g.x,g.y)&&f(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(r,e,n){var a=r;do{var t=a.prev,o=a.next.next;!g(t,o)&&_(t,a,a.next,o)&&x(t,o)&&x(o,t)&&(e.push(t.i/n),e.push(a.i/n),e.push(o.i/n),C(a),C(a.next),a=r=o),a=a.next}while(a!==r);return i(a)}function u(r,e,n,t,o,c){var u=r;do{for(var d=u.next.next;d!==u.prev;){if(u.i!==d.i&&y(u,d)){var s=P(u,d);return u=i(u,u.next),s=i(s,s.next),a(u,e,n,t,o,c),void a(s,e,n,t,o,c)}d=d.next}u=u.next}while(u!==r)}function d(r,e){return r.x-e.x}function s(r,e){if(e=function(r,e){var n,i=e,a=r.x,t=r.y,o=-1/0;do{if(t<=i.y&&t>=i.next.y&&i.next.y!==i.y){var c=i.x+(t-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(c<=a&&c>o){if(o=c,c===a){if(t===i.y)return i;if(t===i.next.y)return i.next}n=i.x=i.x&&i.x>=s&&a!==i.x&&I(tn.x||i.x===n.x&&l(n,i)))&&(n=i,p=u)),i=i.next}while(i!==d);return n}(r,e),e){var n=P(e,r);i(e,e.next),i(n,n.next)}}function l(r,e){return f(r.prev,r,e.prev)<0&&f(e.next,r,r.next)<0}function m(r,e,n,i,a){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r=32767*(r-n)*a)|r<<8))|r<<4))|r<<2))|r<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*a)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(r){var e=r,n=r;do{(e.x=0&&(r-o)*(i-c)-(n-o)*(e-c)>=0&&(n-o)*(t-c)-(a-o)*(i-c)>=0}function y(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!function(r,e){var n=r;do{if(n.i!==r.i&&n.next.i!==r.i&&n.i!==e.i&&n.next.i!==e.i&&_(n,n.next,r,e))return!0;n=n.next}while(n!==r);return!1}(r,e)&&(x(r,e)&&x(e,r)&&function(r,e){var n=r,i=!1,a=(r.x+e.x)/2,t=(r.y+e.y)/2;do{n.y>t!==n.next.y>t&&n.next.y!==n.y&&a<(n.next.x-n.x)*(t-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==r);return i}(r,e)&&(f(r.prev,r,e.prev)||f(r,e.prev,e))||g(r,e)&&f(r.prev,r,r.next)>0&&f(e.prev,e,e.next)>0)}function f(r,e,n){return(e.y-r.y)*(n.x-e.x)-(e.x-r.x)*(n.y-e.y)}function g(r,e){return r.x===e.x&&r.y===e.y}function _(r,e,n,i){var a=v(f(r,e,n)),t=v(f(r,e,i)),o=v(f(n,i,r)),c=v(f(n,i,e));return a!==t&&o!==c||!(0!==a||!h(r,n,e))||!(0!==t||!h(r,i,e))||!(0!==o||!h(n,r,i))||!(0!==c||!h(n,e,i))}function h(r,e,n){return e.x<=Math.max(r.x,n.x)&&e.x>=Math.min(r.x,n.x)&&e.y<=Math.max(r.y,n.y)&&e.y>=Math.min(r.y,n.y)}function v(r){return r>0?1:r<0?-1:0}function x(r,e){return f(r.prev,r,r.next)<0?f(r,e,r.next)>=0&&f(r,r.prev,e)>=0:f(r,e,r.prev)<0||f(r,r.next,e)<0}function P(r,e){var n=new S(r.i,r.x,r.y),i=new S(e.i,e.x,e.y),a=r.next,t=e.prev;return r.next=e,e.prev=r,n.next=a,a.prev=n,i.next=n,n.prev=i,t.next=i,i.prev=t,i}function G(r,e,n,i){var a=new S(r,e,n);return i?(a.next=i.next,a.prev=i,i.next.prev=a,i.next=a):(a.prev=a,a.next=a),a}function C(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function S(r,e,n){this.i=r,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(r,e,n,i){for(var a=0,t=e,o=n-i;t0&&(i+=r[a-1].length,n.holes.push(i))}return n}},6688:function(r,e,n){var i=n(78484);r.exports=function(r,e){var n,a=[],t=[],o=[],c={},u=[];function d(r){o[r]=!1,c.hasOwnProperty(r)&&Object.keys(c[r]).forEach((function(e){delete c[r][e],o[e]&&d(e)}))}function s(r){var e,i,a=!1;for(t.push(r),o[r]=!0,e=0;e=e}))}(e);for(var n,a=i(r).components.filter((function(r){return r.length>1})),t=1/0,o=0;o=55296&&_<=56319&&(P+=r[++n]),P=G?m.call(G,C,P,y):P,e?(p.value=P,I(f,y,p)):f[y]=P,++y;g=y}if(void 0===g)for(g=o(r.length),e&&(f=new e(g)),n=0;n0?1:-1}},96936:function(r,e,n){"use strict";var i=n(85608),a=Math.abs,t=Math.floor;r.exports=function(r){return isNaN(r)?0:0!==(r=Number(r))&&isFinite(r)?i(r)*t(a(r)):r}},81304:function(r,e,n){"use strict";var i=n(96936),a=Math.max;r.exports=function(r){return a(0,i(r))}},14428:function(r,e,n){"use strict";var i=n(34044),a=n(9252),t=Function.prototype.bind,o=Function.prototype.call,c=Object.keys,u=Object.prototype.propertyIsEnumerable;r.exports=function(r,e){return function(n,d){var s,l=arguments[2],m=arguments[3];return n=Object(a(n)),i(d),s=c(n),m&&s.sort("function"===typeof m?t.call(m,n):void 0),"function"!==typeof r&&(r=s[r]),o.call(r,s,(function(r,i){return u.call(n,r)?o.call(d,l,n[r],r,n,i):e}))}}},38452:function(r,e,n){"use strict";r.exports=n(96276)()?Object.assign:n(81892)},96276:function(r){"use strict";r.exports=function(){var r,e=Object.assign;return"function"===typeof e&&(e(r={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}},81892:function(r,e,n){"use strict";var i=n(54768),a=n(9252),t=Math.max;r.exports=function(r,e){var n,o,c,u=t(arguments.length,2);for(r=Object(a(r)),c=function(i){try{r[i]=e[i]}catch(a){n||(n=a)}},o=1;o-1}},29768:function(r){"use strict";var e=Object.prototype.toString,n=e.call("");r.exports=function(r){return"string"===typeof r||r&&"object"===typeof r&&(r instanceof String||e.call(r)===n)||!1}},82252:function(r){"use strict";var e=Object.create(null),n=Math.random;r.exports=function(){var r;do{r=n().toString(36).slice(2)}while(e[r]);return r}},52104:function(r,e,n){"use strict";var i,a=n(69932),t=n(71056),o=n(21092),c=n(92664),u=n(85512),d=Object.defineProperty;i=r.exports=function(r,e){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");u.call(this,r),e=e?t.call(e,"key+value")?"key+value":t.call(e,"key")?"key":"value":"value",d(this,"__kind__",o("",e))},a&&a(i,u),delete i.prototype.constructor,i.prototype=Object.create(u.prototype,{_resolve:o((function(r){return"value"===this.__kind__?this.__list__[r]:"key+value"===this.__kind__?[r,this.__list__[r]]:r}))}),d(i.prototype,c.toStringTag,o("c","Array Iterator"))},76024:function(r,e,n){"use strict";var i=n(60948),a=n(34044),t=n(29768),o=n(76252),c=Array.isArray,u=Function.prototype.call,d=Array.prototype.some;r.exports=function(r,e){var n,s,l,m,p,I,y,f,g=arguments[2];if(c(r)||i(r)?n="array":t(r)?n="string":r=o(r),a(e),l=function(){m=!0},"array"!==n)if("string"!==n)for(s=r.next();!s.done;){if(u.call(e,g,s.value,l),m)return;s=r.next()}else for(I=r.length,p=0;p=55296&&f<=56319&&(y+=r[++p]),u.call(e,g,y,l),!m);++p);else d.call(r,(function(r){return u.call(e,g,r,l),m}))}},76252:function(r,e,n){"use strict";var i=n(60948),a=n(29768),t=n(52104),o=n(80940),c=n(52891),u=n(92664).iterator;r.exports=function(r){return"function"===typeof c(r)[u]?r[u]():i(r)?new t(r):a(r)?new o(r):new t(r)}},85512:function(r,e,n){"use strict";var i,a=n(41476),t=n(38452),o=n(34044),c=n(9252),u=n(21092),d=n(27940),s=n(92664),l=Object.defineProperty,m=Object.defineProperties;r.exports=i=function(r,e){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");m(this,{__list__:u("w",c(r)),__context__:u("w",e),__nextIndex__:u("w",0)}),e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete i.prototype.constructor,m(i.prototype,t({_next:u((function(){var r;if(this.__list__)return this.__redo__&&void 0!==(r=this.__redo__.shift())?r:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,n){e>=r&&(this.__redo__[n]=++e)}),this),this.__redo__.push(r)):l(this,"__redo__",u("c",[r])))})),_onDelete:u((function(r){var e;r>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(r))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,n){e>r&&(this.__redo__[n]=--e)}),this)))})),_onClear:u((function(){this.__redo__&&a.call(this.__redo__),this.__nextIndex__=0}))}))),l(i.prototype,s.iterator,u((function(){return this})))},76368:function(r,e,n){"use strict";var i=n(60948),a=n(42584),t=n(29768),o=n(92664).iterator,c=Array.isArray;r.exports=function(r){return!!a(r)&&(!!c(r)||!!t(r)||!!i(r)||"function"===typeof r[o])}},80940:function(r,e,n){"use strict";var i,a=n(69932),t=n(21092),o=n(92664),c=n(85512),u=Object.defineProperty;i=r.exports=function(r){if(!(this instanceof i))throw new TypeError("Constructor requires 'new'");r=String(r),c.call(this,r),u(this,"__length__",t("",r.length))},a&&a(i,c),delete i.prototype.constructor,i.prototype=Object.create(c.prototype,{_next:t((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?n+this.__list__[this.__nextIndex__++]:n}))}),u(i.prototype,o.toStringTag,t("c","String Iterator"))},52891:function(r,e,n){"use strict";var i=n(76368);r.exports=function(r){if(!i(r))throw new TypeError(r+" is not iterable");return r}},60964:function(r){"use strict";function e(r,e){if(void 0===r||null===r)throw new TypeError("Cannot convert first argument to object");for(var n=Object(r),i=1;i0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=r,s.type=e,s.count=o.length,d=s,console&&console.warn&&console.warn(d)}return r}function s(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(r,e,n){var i={fired:!1,wrapFn:void 0,target:r,type:e,listener:n},a=s.bind(i);return a.listener=n,i.wrapFn=a,a}function m(r,e,n){var i=r._events;if(void 0===i)return[];var a=i[e];return void 0===a?[]:"function"===typeof a?n?[a.listener||a]:[a]:n?function(r){for(var e=new Array(r.length),n=0;n0&&(o=e[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var u=t[r];if(void 0===u)return!1;if("function"===typeof u)i(u,this,e);else{var d=u.length,s=I(u,d);for(n=0;n=0;t--)if(n[t]===e||n[t].listener===e){o=n[t].listener,a=t;break}if(a<0)return this;0===a?n.shift():function(r,e){for(;e+1=0;i--)this.removeListener(r,e[i]);return this},t.prototype.listeners=function(r){return m(this,r,!0)},t.prototype.rawListeners=function(r){return m(this,r,!1)},t.listenerCount=function(r,e){return"function"===typeof r.listenerCount?r.listenerCount(e):p.call(r,e)},t.prototype.listenerCount=p,t.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},39072:function(r){var e=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};r.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(r){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},12296:function(r,e,n){"use strict";r.exports=n(45072)()?globalThis:n(39072)},45072:function(r){"use strict";r.exports=function(){return"object"===typeof globalThis&&!!globalThis&&globalThis.Array===Array}},38248:function(r,e,n){"use strict";var i=n(94576);r.exports=function(r){var e=typeof r;if("string"===e){var n=r;if(0===(r=+r)&&i(n))return!1}else if("number"!==e)return!1;return r-r<1}},47520:function(r,e,n){var i=n(72512);r.exports=function(r,e,n){if(!r)throw new TypeError("must specify data as first parameter");if(n=0|+(n||0),Array.isArray(r)&&r[0]&&"number"===typeof r[0][0]){var a,t,o,c,u=r[0].length,d=r.length*u;e&&"string"!==typeof e||(e=new(i(e||"float32"))(d+n));var s=e.length-n;if(d!==s)throw new Error("source length "+d+" ("+u+"x"+r.length+") does not match destination length "+s);for(a=0,o=n;ae[0]-o[0]/2&&(m=o[0]/2,p+=o[1]);return n}},71920:function(r){"use strict";function e(r,t){t||(t={}),("string"===typeof r||Array.isArray(r))&&(t.family=r);var o=Array.isArray(t.family)?t.family.join(", "):t.family;if(!o)throw Error("`family` must be defined");var c=t.size||t.fontSize||t.em||48,u=t.weight||t.fontWeight||"",d=(r=[t.style||t.fontStyle||"",u,c].join(" ")+"px "+o,t.origin||"top");if(e.cache[o]&&c<=e.cache[o].em)return n(e.cache[o],d);var s=t.canvas||e.canvas,l=s.getContext("2d"),m={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"},p=Math.ceil(1.5*c);s.height=p,s.width=.5*p,l.font=r;var I="H",y={top:0};l.clearRect(0,0,p,p),l.textBaseline="top",l.fillStyle="black",l.fillText(I,0,0);var f=i(l.getImageData(0,0,p,p));l.clearRect(0,0,p,p),l.textBaseline="bottom",l.fillText(I,0,p);var g=i(l.getImageData(0,0,p,p));y.lineHeight=y.bottom=p-g+f,l.clearRect(0,0,p,p),l.textBaseline="alphabetic",l.fillText(I,0,p);var _=p-i(l.getImageData(0,0,p,p))-1+f;y.baseline=y.alphabetic=_,l.clearRect(0,0,p,p),l.textBaseline="middle",l.fillText(I,0,.5*p);var h=i(l.getImageData(0,0,p,p));y.median=y.middle=p-h-1+f-.5*p,l.clearRect(0,0,p,p),l.textBaseline="hanging",l.fillText(I,0,.5*p);var v=i(l.getImageData(0,0,p,p));y.hanging=p-v-1+f-.5*p,l.clearRect(0,0,p,p),l.textBaseline="ideographic",l.fillText(I,0,p);var x=i(l.getImageData(0,0,p,p));if(y.ideographic=p-x-1+f,m.upper&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.upper,0,0),y.upper=i(l.getImageData(0,0,p,p)),y.capHeight=y.baseline-y.upper),m.lower&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.lower,0,0),y.lower=i(l.getImageData(0,0,p,p)),y.xHeight=y.baseline-y.lower),m.tittle&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.tittle,0,0),y.tittle=i(l.getImageData(0,0,p,p))),m.ascent&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.ascent,0,0),y.ascent=i(l.getImageData(0,0,p,p))),m.descent&&(l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.descent,0,0),y.descent=a(l.getImageData(0,0,p,p))),m.overshoot){l.clearRect(0,0,p,p),l.textBaseline="top",l.fillText(m.overshoot,0,0);var P=a(l.getImageData(0,0,p,p));y.overshoot=P-_}for(var G in y)y[G]/=c;return y.em=c,e.cache[o]=y,n(y,d)}function n(r,e){var n={};for(var i in"string"===typeof e&&(e=r[e]),r)"em"!==i&&(n[i]=r[i]-e);return n}function i(r){for(var e=r.height,n=r.data,i=3;i0;i-=4)if(0!==n[i])return Math.floor(.25*(i-3)/e)}r.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},46492:function(r,e,n){"use strict";var i=n(90720),a=Object.prototype.toString,t=Object.prototype.hasOwnProperty;r.exports=function(r,e,n){if(!i(e))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=n),"[object Array]"===a.call(r)?function(r,e,n){for(var i=0,a=r.length;i1&&"boolean"!==typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,r))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(r){var e=S(r,0,1),n=S(r,-1);if("%"===e&&"%"!==n)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new a("invalid intrinsic syntax, expected opening `%`");var i=[];return C(r,b,(function(r,e,n,a){i[i.length]=n?C(a,M,"$1"):e||r})),i}(r),i=n.length>0?n[0]:"",t=B("%"+i+"%",e),c=t.name,d=t.value,s=!1,l=t.alias;l&&(i=l[0],G(n,P([0,1],l)));for(var m=1,p=!0;m=n.length){var _=u(d,I);d=(p=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:d[I]}else p=x(d,I),d=d[I];p&&!s&&(f[c]=d)}}return d}},12408:function(r){r.exports=function(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=e[4],c=e[5],u=e[6],d=e[7],s=e[8],l=e[9],m=e[10],p=e[11],I=e[12],y=e[13],f=e[14],g=e[15];return r[0]=c*(m*g-p*f)-l*(u*g-d*f)+y*(u*p-d*m),r[1]=-(i*(m*g-p*f)-l*(a*g-t*f)+y*(a*p-t*m)),r[2]=i*(u*g-d*f)-c*(a*g-t*f)+y*(a*d-t*u),r[3]=-(i*(u*p-d*m)-c*(a*p-t*m)+l*(a*d-t*u)),r[4]=-(o*(m*g-p*f)-s*(u*g-d*f)+I*(u*p-d*m)),r[5]=n*(m*g-p*f)-s*(a*g-t*f)+I*(a*p-t*m),r[6]=-(n*(u*g-d*f)-o*(a*g-t*f)+I*(a*d-t*u)),r[7]=n*(u*p-d*m)-o*(a*p-t*m)+s*(a*d-t*u),r[8]=o*(l*g-p*y)-s*(c*g-d*y)+I*(c*p-d*l),r[9]=-(n*(l*g-p*y)-s*(i*g-t*y)+I*(i*p-t*l)),r[10]=n*(c*g-d*y)-o*(i*g-t*y)+I*(i*d-t*c),r[11]=-(n*(c*p-d*l)-o*(i*p-t*l)+s*(i*d-t*c)),r[12]=-(o*(l*f-m*y)-s*(c*f-u*y)+I*(c*m-u*l)),r[13]=n*(l*f-m*y)-s*(i*f-a*y)+I*(i*m-a*l),r[14]=-(n*(c*f-u*y)-o*(i*f-a*y)+I*(i*u-a*c)),r[15]=n*(c*m-u*l)-o*(i*m-a*l)+s*(i*u-a*c),r}},76860:function(r){r.exports=function(r){var e=new Float32Array(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}},64492:function(r){r.exports=function(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}},54212:function(r){r.exports=function(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},70800:function(r){r.exports=function(r){var e=r[0],n=r[1],i=r[2],a=r[3],t=r[4],o=r[5],c=r[6],u=r[7],d=r[8],s=r[9],l=r[10],m=r[11],p=r[12],I=r[13],y=r[14],f=r[15];return(e*o-n*t)*(l*f-m*y)-(e*c-i*t)*(s*f-m*I)+(e*u-a*t)*(s*y-l*I)+(n*c-i*o)*(d*f-m*p)-(n*u-a*o)*(d*y-l*p)+(i*u-a*c)*(d*I-s*p)}},61784:function(r){r.exports=function(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=n+n,c=i+i,u=a+a,d=n*o,s=i*o,l=i*c,m=a*o,p=a*c,I=a*u,y=t*o,f=t*c,g=t*u;return r[0]=1-l-I,r[1]=s+g,r[2]=m-f,r[3]=0,r[4]=s-g,r[5]=1-d-I,r[6]=p+y,r[7]=0,r[8]=m+f,r[9]=p-y,r[10]=1-d-l,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},91616:function(r){r.exports=function(r,e,n){var i,a,t,o=n[0],c=n[1],u=n[2],d=Math.sqrt(o*o+c*c+u*u);return Math.abs(d)<1e-6?null:(o*=d=1/d,c*=d,u*=d,i=Math.sin(e),a=Math.cos(e),t=1-a,r[0]=o*o*t+a,r[1]=c*o*t+u*i,r[2]=u*o*t-c*i,r[3]=0,r[4]=o*c*t-u*i,r[5]=c*c*t+a,r[6]=u*c*t+o*i,r[7]=0,r[8]=o*u*t+c*i,r[9]=c*u*t-o*i,r[10]=u*u*t+a,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r)}},51944:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3],c=i+i,u=a+a,d=t+t,s=i*c,l=i*u,m=i*d,p=a*u,I=a*d,y=t*d,f=o*c,g=o*u,_=o*d;return r[0]=1-(p+y),r[1]=l+_,r[2]=m-g,r[3]=0,r[4]=l-_,r[5]=1-(s+y),r[6]=I+f,r[7]=0,r[8]=m+g,r[9]=I-f,r[10]=1-(s+p),r[11]=0,r[12]=n[0],r[13]=n[1],r[14]=n[2],r[15]=1,r}},69444:function(r){r.exports=function(r,e){return r[0]=e[0],r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=e[1],r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=e[2],r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},48268:function(r){r.exports=function(r,e){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=e[0],r[13]=e[1],r[14]=e[2],r[15]=1,r}},21856:function(r){r.exports=function(r,e){var n=Math.sin(e),i=Math.cos(e);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=i,r[6]=n,r[7]=0,r[8]=0,r[9]=-n,r[10]=i,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},79216:function(r){r.exports=function(r,e){var n=Math.sin(e),i=Math.cos(e);return r[0]=i,r[1]=0,r[2]=-n,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=n,r[9]=0,r[10]=i,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},57736:function(r){r.exports=function(r,e){var n=Math.sin(e),i=Math.cos(e);return r[0]=i,r[1]=n,r[2]=0,r[3]=0,r[4]=-n,r[5]=i,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},38848:function(r){r.exports=function(r,e,n,i,a,t,o){var c=1/(n-e),u=1/(a-i),d=1/(t-o);return r[0]=2*t*c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=2*t*u,r[6]=0,r[7]=0,r[8]=(n+e)*c,r[9]=(a+i)*u,r[10]=(o+t)*d,r[11]=-1,r[12]=0,r[13]=0,r[14]=o*t*2*d,r[15]=0,r}},36635:function(r){r.exports=function(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},36524:function(r,e,n){r.exports={create:n(54212),clone:n(76860),copy:n(64492),identity:n(36635),transpose:n(86520),invert:n(4308),adjoint:n(12408),determinant:n(70800),multiply:n(80944),translate:n(35176),scale:n(68152),rotate:n(30016),rotateX:n(15456),rotateY:n(64840),rotateZ:n(4192),fromRotation:n(91616),fromRotationTranslation:n(51944),fromScaling:n(69444),fromTranslation:n(48268),fromXRotation:n(21856),fromYRotation:n(79216),fromZRotation:n(57736),fromQuat:n(61784),frustum:n(38848),perspective:n(51296),perspectiveFromFieldOfView:n(63688),ortho:n(97688),lookAt:n(56508),str:n(89412)}},4308:function(r){r.exports=function(r,e){var n=e[0],i=e[1],a=e[2],t=e[3],o=e[4],c=e[5],u=e[6],d=e[7],s=e[8],l=e[9],m=e[10],p=e[11],I=e[12],y=e[13],f=e[14],g=e[15],_=n*c-i*o,h=n*u-a*o,v=n*d-t*o,x=i*u-a*c,P=i*d-t*c,G=a*d-t*u,C=s*y-l*I,S=s*f-m*I,A=s*g-p*I,b=l*f-m*y,M=l*g-p*y,B=m*g-p*f,k=_*B-h*M+v*b+x*A-P*S+G*C;return k?(k=1/k,r[0]=(c*B-u*M+d*b)*k,r[1]=(a*M-i*B-t*b)*k,r[2]=(y*G-f*P+g*x)*k,r[3]=(m*P-l*G-p*x)*k,r[4]=(u*A-o*B-d*S)*k,r[5]=(n*B-a*A+t*S)*k,r[6]=(f*v-I*G-g*h)*k,r[7]=(s*G-m*v+p*h)*k,r[8]=(o*M-c*A+d*C)*k,r[9]=(i*A-n*M-t*C)*k,r[10]=(I*P-y*v+g*_)*k,r[11]=(l*v-s*P-p*_)*k,r[12]=(c*S-o*b-u*C)*k,r[13]=(n*b-i*S+a*C)*k,r[14]=(y*h-I*x-f*_)*k,r[15]=(s*x-l*h+m*_)*k,r):null}},56508:function(r,e,n){var i=n(36635);r.exports=function(r,e,n,a){var t,o,c,u,d,s,l,m,p,I,y=e[0],f=e[1],g=e[2],_=a[0],h=a[1],v=a[2],x=n[0],P=n[1],G=n[2];return Math.abs(y-x)<1e-6&&Math.abs(f-P)<1e-6&&Math.abs(g-G)<1e-6?i(r):(l=y-x,m=f-P,p=g-G,I=1/Math.sqrt(l*l+m*m+p*p),t=h*(p*=I)-v*(m*=I),o=v*(l*=I)-_*p,c=_*m-h*l,(I=Math.sqrt(t*t+o*o+c*c))?(t*=I=1/I,o*=I,c*=I):(t=0,o=0,c=0),u=m*c-p*o,d=p*t-l*c,s=l*o-m*t,(I=Math.sqrt(u*u+d*d+s*s))?(u*=I=1/I,d*=I,s*=I):(u=0,d=0,s=0),r[0]=t,r[1]=u,r[2]=l,r[3]=0,r[4]=o,r[5]=d,r[6]=m,r[7]=0,r[8]=c,r[9]=s,r[10]=p,r[11]=0,r[12]=-(t*y+o*f+c*g),r[13]=-(u*y+d*f+s*g),r[14]=-(l*y+m*f+p*g),r[15]=1,r)}},80944:function(r){r.exports=function(r,e,n){var i=e[0],a=e[1],t=e[2],o=e[3],c=e[4],u=e[5],d=e[6],s=e[7],l=e[8],m=e[9],p=e[10],I=e[11],y=e[12],f=e[13],g=e[14],_=e[15],h=n[0],v=n[1],x=n[2],P=n[3];return r[0]=h*i+v*c+x*l+P*y,r[1]=h*a+v*u+x*m+P*f,r[2]=h*t+v*d+x*p+P*g,r[3]=h*o+v*s+x*I+P*_,h=n[4],v=n[5],x=n[6],P=n[7],r[4]=h*i+v*c+x*l+P*y,r[5]=h*a+v*u+x*m+P*f,r[6]=h*t+v*d+x*p+P*g,r[7]=h*o+v*s+x*I+P*_,h=n[8],v=n[9],x=n[10],P=n[11],r[8]=h*i+v*c+x*l+P*y,r[9]=h*a+v*u+x*m+P*f,r[10]=h*t+v*d+x*p+P*g,r[11]=h*o+v*s+x*I+P*_,h=n[12],v=n[13],x=n[14],P=n[15],r[12]=h*i+v*c+x*l+P*y,r[13]=h*a+v*u+x*m+P*f,r[14]=h*t+v*d+x*p+P*g,r[15]=h*o+v*s+x*I+P*_,r}},97688:function(r){r.exports=function(r,e,n,i,a,t,o){var c=1/(e-n),u=1/(i-a),d=1/(t-o);return r[0]=-2*c,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*u,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*d,r[11]=0,r[12]=(e+n)*c,r[13]=(a+i)*u,r[14]=(o+t)*d,r[15]=1,r}},51296:function(r){r.exports=function(r,e,n,i,a){var t=1/Math.tan(e/2),o=1/(i-a);return r[0]=t/n,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=t,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(a+i)*o,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*a*i*o,r[15]=0,r}},63688:function(r){r.exports=function(r,e,n,i){var a=Math.tan(e.upDegrees*Math.PI/180),t=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),c=Math.tan(e.rightDegrees*Math.PI/180),u=2/(o+c),d=2/(a+t);return r[0]=u,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=d,r[6]=0,r[7]=0,r[8]=-(o-c)*u*.5,r[9]=(a-t)*d*.5,r[10]=i/(n-i),r[11]=-1,r[12]=0,r[13]=0,r[14]=i*n/(n-i),r[15]=0,r}},30016:function(r){r.exports=function(r,e,n,i){var a,t,o,c,u,d,s,l,m,p,I,y,f,g,_,h,v,x,P,G,C,S,A,b,M=i[0],B=i[1],k=i[2],F=Math.sqrt(M*M+B*B+k*k);return Math.abs(F)<1e-6?null:(M*=F=1/F,B*=F,k*=F,a=Math.sin(n),t=Math.cos(n),o=1-t,c=e[0],u=e[1],d=e[2],s=e[3],l=e[4],m=e[5],p=e[6],I=e[7],y=e[8],f=e[9],g=e[10],_=e[11],h=M*M*o+t,v=B*M*o+k*a,x=k*M*o-B*a,P=M*B*o-k*a,G=B*B*o+t,C=k*B*o+M*a,S=M*k*o+B*a,A=B*k*o-M*a,b=k*k*o+t,r[0]=c*h+l*v+y*x,r[1]=u*h+m*v+f*x,r[2]=d*h+p*v+g*x,r[3]=s*h+I*v+_*x,r[4]=c*P+l*G+y*C,r[5]=u*P+m*G+f*C,r[6]=d*P+p*G+g*C,r[7]=s*P+I*G+_*C,r[8]=c*S+l*A+y*b,r[9]=u*S+m*A+f*b,r[10]=d*S+p*A+g*b,r[11]=s*S+I*A+_*b,e!==r&&(r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r)}},15456:function(r){r.exports=function(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[4],o=e[5],c=e[6],u=e[7],d=e[8],s=e[9],l=e[10],m=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=t*a+d*i,r[5]=o*a+s*i,r[6]=c*a+l*i,r[7]=u*a+m*i,r[8]=d*a-t*i,r[9]=s*a-o*i,r[10]=l*a-c*i,r[11]=m*a-u*i,r}},64840:function(r){r.exports=function(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[0],o=e[1],c=e[2],u=e[3],d=e[8],s=e[9],l=e[10],m=e[11];return e!==r&&(r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=t*a-d*i,r[1]=o*a-s*i,r[2]=c*a-l*i,r[3]=u*a-m*i,r[8]=t*i+d*a,r[9]=o*i+s*a,r[10]=c*i+l*a,r[11]=u*i+m*a,r}},4192:function(r){r.exports=function(r,e,n){var i=Math.sin(n),a=Math.cos(n),t=e[0],o=e[1],c=e[2],u=e[3],d=e[4],s=e[5],l=e[6],m=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=t*a+d*i,r[1]=o*a+s*i,r[2]=c*a+l*i,r[3]=u*a+m*i,r[4]=d*a-t*i,r[5]=s*a-o*i,r[6]=l*a-c*i,r[7]=m*a-u*i,r}},68152:function(r){r.exports=function(r,e,n){var i=n[0],a=n[1],t=n[2];return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r[3]=e[3]*i,r[4]=e[4]*a,r[5]=e[5]*a,r[6]=e[6]*a,r[7]=e[7]*a,r[8]=e[8]*t,r[9]=e[9]*t,r[10]=e[10]*t,r[11]=e[11]*t,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}},89412:function(r){r.exports=function(r){return"mat4("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+", "+r[6]+", "+r[7]+", "+r[8]+", "+r[9]+", "+r[10]+", "+r[11]+", "+r[12]+", "+r[13]+", "+r[14]+", "+r[15]+")"}},35176:function(r){r.exports=function(r,e,n){var i,a,t,o,c,u,d,s,l,m,p,I,y=n[0],f=n[1],g=n[2];return e===r?(r[12]=e[0]*y+e[4]*f+e[8]*g+e[12],r[13]=e[1]*y+e[5]*f+e[9]*g+e[13],r[14]=e[2]*y+e[6]*f+e[10]*g+e[14],r[15]=e[3]*y+e[7]*f+e[11]*g+e[15]):(i=e[0],a=e[1],t=e[2],o=e[3],c=e[4],u=e[5],d=e[6],s=e[7],l=e[8],m=e[9],p=e[10],I=e[11],r[0]=i,r[1]=a,r[2]=t,r[3]=o,r[4]=c,r[5]=u,r[6]=d,r[7]=s,r[8]=l,r[9]=m,r[10]=p,r[11]=I,r[12]=i*y+c*f+l*g+e[12],r[13]=a*y+u*f+m*g+e[13],r[14]=t*y+d*f+p*g+e[14],r[15]=o*y+s*f+I*g+e[15]),r}},86520:function(r){r.exports=function(r,e){if(r===e){var n=e[1],i=e[2],a=e[3],t=e[6],o=e[7],c=e[11];r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=n,r[6]=e[9],r[7]=e[13],r[8]=i,r[9]=t,r[11]=e[14],r[12]=a,r[13]=o,r[14]=c}else r[0]=e[0],r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=e[1],r[5]=e[5],r[6]=e[9],r[7]=e[13],r[8]=e[2],r[9]=e[6],r[10]=e[10],r[11]=e[14],r[12]=e[3],r[13]=e[7],r[14]=e[11],r[15]=e[15];return r}},23352:function(r,e,n){"use strict";var i=n(42771),a=n(55616),t=n(28624),o=n(55212),c=n(60463),u=n(72160),d=n(33888),s=n(14144),l=n(51160),m=n(58908),p=n(65819),I=n(23464),y=n(63768),f=n(50896),g=n(71920),_=n(47520),h=n(308).nextPow2,v=new c,x=!1;if(document.body){var P=document.body.appendChild(document.createElement("div"));P.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(P).fontStretch&&(x=!0),document.body.removeChild(P)}var G=function(r){!function(r){return"function"===typeof r&&r._gl&&r.prop&&r.texture&&r.buffer}(r)?this.gl=o(r):(r={regl:r},this.gl=r.regl._gl),this.shader=v.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=r.regl||t({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(),v.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(m(r)?r:{})};G.prototype.createShader=function(){var r=this.regl,e=r({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:r.prop("count"),offset:r.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:r.this("sizeBuffer")},width:{offset:0,stride:8,buffer:r.this("sizeBuffer")},char:r.this("charBuffer"),position:r.this("position")},uniforms:{atlasSize:function(r,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(r,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(r,e){return e.atlas.texture},charStep:function(r,e){return e.atlas.step},em:function(r,e){return e.atlas.em},color:r.prop("color"),opacity:r.prop("opacity"),viewport:r.this("viewportArray"),scale:r.this("scale"),align:r.prop("align"),baseline:r.prop("baseline"),translate:r.this("translate"),positionOffset:r.prop("positionOffset")},primitive:"points",viewport:r.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\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\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\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 float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\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:r,draw:e,atlas:{}}},G.prototype.update=function(r){var e=this;if("string"===typeof r)r={text:r};else if(!r)return;null!=(r=a(r,{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(r.opacity)?this.opacity=r.opacity.map((function(r){return parseFloat(r)})):this.opacity=parseFloat(r.opacity)),null!=r.viewport&&(this.viewport=l(r.viewport),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!=r.kerning&&(this.kerning=r.kerning),null!=r.offset&&("number"===typeof r.offset&&(r.offset=[r.offset,0]),this.positionOffset=_(r.offset)),r.direction&&(this.direction=r.direction),r.range&&(this.range=r.range,this.scale=[1/(r.range[2]-r.range[0]),1/(r.range[3]-r.range[1])],this.translate=[-r.range[0],-r.range[1]]),r.scale&&(this.scale=r.scale),r.translate&&(this.translate=r.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||r.font||(r.font=G.baseFontSize+"px sans-serif");var n,t=!1,o=!1;if(r.font&&(Array.isArray(r.font)?r.font:[r.font]).forEach((function(r,n){if("string"===typeof r)try{r=i.parse(r)}catch(_){r=i.parse(G.baseFontSize+"px "+r)}else{var a=r.style,c=r.weight,u=r.stretch,d=r.variant;r=i.parse(i.stringify(r)),a&&(r.style=a),c&&(r.weight=c),u&&(r.stretch=u),d&&(r.variant=d)}var s=i.stringify({size:G.baseFontSize,family:r.family,stretch:x?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style}),l=p(r.size),m=Math.round(l[0]*I(l[1]));if(m!==e.fontSize[n]&&(o=!0,e.fontSize[n]=m),(!e.font[n]||s!=e.font[n].baseString)&&(t=!0,e.font[n]=G.fonts[s],!e.font[n])){var y=r.family.join(", "),f=[r.style];r.style!=r.variant&&f.push(r.variant),r.variant!=r.weight&&f.push(r.weight),x&&r.weight!=r.stretch&&f.push(r.stretch),e.font[n]={baseString:s,family:y,weight:r.weight,stretch:r.stretch,style:r.style,variant:r.variant,width:{},kerning:{},metrics:g(y,{origin:"top",fontSize:G.baseFontSize,fontStyle:f.join(" ")})},G.fonts[s]=e.font[n]}})),(t||o)&&this.font.forEach((function(n,a){var t=i.stringify({size:e.fontSize[a],family:n.family,stretch:x?n.stretch:void 0,variant:n.variant,weight:n.weight,style:n.style});if(e.fontAtlas[a]=e.shader.atlas[t],!e.fontAtlas[a]){var o=n.metrics;e.shader.atlas[t]=e.fontAtlas[a]={fontString:t,step:2*Math.ceil(e.fontSize[a]*o.bottom*.5),em:e.fontSize[a],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==r.text&&(r.text=e.text)})),"string"===typeof r.text&&r.position&&r.position.length>2){for(var c=Array(.5*r.position.length),m=0;m2){for(var P=!r.position[0].length,C=s.mallocFloat(2*this.count),S=0,A=0;S1?e.align[n]:e.align[0]:e.align;if("number"===typeof i)return i;switch(i){case"right":case"end":return-r;case"center":case"centre":case"middle":return.5*-r}return 0}))),null==this.baseline&&null==r.baseline&&(r.baseline=0),null!=r.baseline&&(this.baseline=r.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(r,n){var i=(e.font[n]||e.font[0]).metrics,a=0;return a+=.5*i.bottom,a+="number"===typeof r?r-i.baseline:-i[r],a*=-1}))),null!=r.color)if(r.color||(r.color="transparent"),"string"!==typeof r.color&&isNaN(r.color)){var K;if("number"===typeof r.color[0]&&r.color.length>this.counts.length){var V=r.color.length;K=s.mallocUint8(V);for(var j=(r.color.subarray||r.color.slice).bind(r.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var Y=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(Y);for(var X=0;X1?this.counts[X]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[X]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*X,4*X+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[X]:this.opacity,baseline:null!=this.baselineOffset[X]?this.baselineOffset[X]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[X]?this.alignOffset[X]:this.alignOffset[0]:0,atlas:this.fontAtlas[X]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*X,2*X+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=[]},G.prototype.destroy=function(){},G.prototype.kerning=!0,G.prototype.position={constant:new Float32Array(2)},G.prototype.translate=null,G.prototype.scale=null,G.prototype.font=null,G.prototype.text="",G.prototype.positionOffset=[0,0],G.prototype.opacity=1,G.prototype.color=new Uint8Array([0,0,0,255]),G.prototype.alignOffset=[0,0],G.maxAtlasSize=1024,G.atlasCanvas=document.createElement("canvas"),G.atlasContext=G.atlasCanvas.getContext("2d",{alpha:!1}),G.baseFontSize=64,G.fonts={},r.exports=G},55212:function(r,e,n){"use strict";var i=n(55616);function a(r){if(r.container)if(r.container==document.body)document.body.style.width||(r.canvas.width=r.width||r.pixelRatio*n.g.innerWidth),document.body.style.height||(r.canvas.height=r.height||r.pixelRatio*n.g.innerHeight);else{var e=r.container.getBoundingClientRect();r.canvas.width=r.width||e.right-e.left,r.canvas.height=r.height||e.bottom-e.top}}function t(r){return"function"===typeof r.getContext&&"width"in r&&"height"in r}function o(){var r=document.createElement("canvas");return r.style.position="absolute",r.style.top=0,r.style.left=0,r}r.exports=function(r){var e;if(r?"string"===typeof r&&(r={container:r}):r={},(r=t(r)||"string"===typeof(e=r).nodeName&&"function"===typeof e.appendChild&&"function"===typeof e.getBoundingClientRect?{container:r}:function(r){return"function"===typeof r.drawArrays||"function"===typeof r.drawElements}(r)?{gl:r}:i(r,{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||(r.pixelRatio=n.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if("string"===typeof r.container){var c=document.querySelector(r.container);if(!c)throw Error("Element "+r.container+" is not found");r.container=c}t(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=o(),r.container.appendChild(r.canvas),a(r))}else if(!r.canvas){if("undefined"===typeof document)throw Error("Not DOM environment. Use headless-gl.");r.container=document.body||document.documentElement,r.canvas=o(),r.container.appendChild(r.canvas),a(r)}return r.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(n){try{r.gl=r.canvas.getContext(n,r.attrs)}catch(e){}return r.gl})),r.gl}},26444:function(r){r.exports=function(r){"string"===typeof r&&(r=[r]);for(var e=[].slice.call(arguments,1),n=[],i=0;i>1,s=-7,l=n?a-1:0,m=n?-1:1,p=r[e+l];for(l+=m,t=p&(1<<-s)-1,p>>=-s,s+=c;s>0;t=256*t+r[e+l],l+=m,s-=8);for(o=t&(1<<-s)-1,t>>=-s,s+=i;s>0;o=256*o+r[e+l],l+=m,s-=8);if(0===t)t=1-d;else{if(t===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),t-=d}return(p?-1:1)*o*Math.pow(2,t-i)},e.write=function(r,e,n,i,a,t){var o,c,u,d=8*t-a-1,s=(1<>1,m=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:t-1,I=i?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=s):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+l>=1?m/u:m*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=s?(c=0,o=s):o+l>=1?(c=(e*u-1)*Math.pow(2,a),o+=l):(c=e*Math.pow(2,l-1)*Math.pow(2,a),o=0));a>=8;r[n+p]=255&c,p+=I,c/=256,a-=8);for(o=o<0;r[n+p]=255&o,p+=I,o/=256,d-=8);r[n+p-I]|=128*y}},6768:function(r){"function"===typeof Object.create?r.exports=function(r,e){e&&(r.super_=e,r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:r.exports=function(r,e){if(e){r.super_=e;var n=function(){};n.prototype=e.prototype,r.prototype=new n,r.prototype.constructor=r}}},91148:function(r,e,n){"use strict";var i=n(46672)(),a=n(99676)("Object.prototype.toString"),t=function(r){return!(i&&r&&"object"===typeof r&&Symbol.toStringTag in r)&&"[object Arguments]"===a(r)},o=function(r){return!!t(r)||null!==r&&"object"===typeof r&&"number"===typeof r.length&&r.length>=0&&"[object Array]"!==a(r)&&"[object Function]"===a(r.callee)},c=function(){return t(arguments)}();t.isLegacyArguments=o,r.exports=c?t:o},24200:function(r){r.exports=!0},90720:function(r){"use strict";var e,n,i=Function.prototype.toString,a="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof a&&"function"===typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw n}}),n={},a((function(){throw 42}),null,e)}catch(p){p!==n&&(a=null)}else a=null;var t=/^\s*class\b/,o=function(r){try{var e=i.call(r);return t.test(e)}catch(n){return!1}},c=function(r){try{return!o(r)&&(i.call(r),!0)}catch(e){return!1}},u=Object.prototype.toString,d="function"===typeof Symbol&&!!Symbol.toStringTag,s=!(0 in[,]),l=function(){return!1};if("object"===typeof document){var m=document.all;u.call(m)===u.call(document.all)&&(l=function(r){if((s||!r)&&("undefined"===typeof r||"object"===typeof r))try{var e=u.call(r);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==r("")}catch(n){}return!1})}r.exports=a?function(r){if(l(r))return!0;if(!r)return!1;if("function"!==typeof r&&"object"!==typeof r)return!1;try{a(r,null,e)}catch(i){if(i!==n)return!1}return!o(r)&&c(r)}:function(r){if(l(r))return!0;if(!r)return!1;if("function"!==typeof r&&"object"!==typeof r)return!1;if(d)return c(r);if(o(r))return!1;var e=u.call(r);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&c(r)}},84420:function(r,e,n){"use strict";var i,a=Object.prototype.toString,t=Function.prototype.toString,o=/^\s*(?:function)?\*/,c=n(46672)(),u=Object.getPrototypeOf;r.exports=function(r){if("function"!==typeof r)return!1;if(o.test(t.call(r)))return!0;if(!c)return"[object GeneratorFunction]"===a.call(r);if(!u)return!1;if("undefined"===typeof i){var e=function(){if(!c)return!1;try{return Function("return function*() {}")()}catch(r){}}();i=!!e&&u(e)}return u(r)===i}},96604:function(r){"use strict";r.exports="undefined"!==typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(r){"use strict";r.exports=function(r){return r!==r}},1560:function(r,e,n){"use strict";var i=n(57916),a=n(81288),t=n(85992),o=n(57740),c=n(59736),u=i(o(),Number);a(u,{getPolyfill:o,implementation:t,shim:c}),r.exports=u},57740:function(r,e,n){"use strict";var i=n(85992);r.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:i}},59736:function(r,e,n){"use strict";var i=n(81288),a=n(57740);r.exports=function(){var r=a();return i(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r}},18400:function(r){"use strict";r.exports=function(r){var e=typeof r;return null!==r&&("object"===e||"function"===e)}},58908:function(r){"use strict";var e=Object.prototype.toString;r.exports=function(r){var n;return"[object Object]"===e.call(r)&&(null===(n=Object.getPrototypeOf(r))||n===Object.getPrototypeOf({}))}},94576:function(r){"use strict";r.exports=function(r){for(var e,n=r.length,i=0;i13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},53520:function(r){"use strict";r.exports=function(r){return"string"===typeof r&&(r=r.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(r)&&/[\dz]$/i.test(r)&&r.length>4))}},7728:function(r,e,n){"use strict";var i=n(46492),a=n(63436),t=n(99676),o=t("Object.prototype.toString"),c=n(46672)(),u=n(2304),d="undefined"===typeof globalThis?n.g:globalThis,s=a(),l=t("Array.prototype.indexOf",!0)||function(r,e){for(var n=0;n-1}return!!u&&function(r){var e=!1;return i(p,(function(n,i){if(!e)try{e=n.call(r)===i}catch(a){}})),e}(r)}},76244:function(r){"use strict";r.exports=Math.log2||function(r){return Math.log(r)*Math.LOG2E}},62644:function(r,e,n){"use strict";r.exports=function(r,e){e||(e=r,r=window);var n=0,a=0,t=0,o={shift:!1,alt:!1,control:!1,meta:!1},c=!1;function u(r){var e=!1;return"altKey"in r&&(e=e||r.altKey!==o.alt,o.alt=!!r.altKey),"shiftKey"in r&&(e=e||r.shiftKey!==o.shift,o.shift=!!r.shiftKey),"ctrlKey"in r&&(e=e||r.ctrlKey!==o.control,o.control=!!r.ctrlKey),"metaKey"in r&&(e=e||r.metaKey!==o.meta,o.meta=!!r.metaKey),e}function d(r,c){var d=i.x(c),s=i.y(c);"buttons"in c&&(r=0|c.buttons),(r!==n||d!==a||s!==t||u(c))&&(n=0|r,a=d||0,t=s||0,e&&e(n,a,t,o))}function s(r){d(0,r)}function l(){(n||a||t||o.shift||o.alt||o.meta||o.control)&&(a=t=0,n=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function m(r){u(r)&&e&&e(n,a,t,o)}function p(r){0===i.buttons(r)?d(0,r):d(n,r)}function I(r){d(n|i.buttons(r),r)}function y(r){d(n&~i.buttons(r),r)}function f(){c||(c=!0,r.addEventListener("mousemove",p),r.addEventListener("mousedown",I),r.addEventListener("mouseup",y),r.addEventListener("mouseleave",s),r.addEventListener("mouseenter",s),r.addEventListener("mouseout",s),r.addEventListener("mouseover",s),r.addEventListener("blur",l),r.addEventListener("keyup",m),r.addEventListener("keydown",m),r.addEventListener("keypress",m),r!==window&&(window.addEventListener("blur",l),window.addEventListener("keyup",m),window.addEventListener("keydown",m),window.addEventListener("keypress",m)))}f();var g={element:r};return Object.defineProperties(g,{enabled:{get:function(){return c},set:function(e){e?f():c&&(c=!1,r.removeEventListener("mousemove",p),r.removeEventListener("mousedown",I),r.removeEventListener("mouseup",y),r.removeEventListener("mouseleave",s),r.removeEventListener("mouseenter",s),r.removeEventListener("mouseout",s),r.removeEventListener("mouseover",s),r.removeEventListener("blur",l),r.removeEventListener("keyup",m),r.removeEventListener("keydown",m),r.removeEventListener("keypress",m),r!==window&&(window.removeEventListener("blur",l),window.removeEventListener("keyup",m),window.removeEventListener("keydown",m),window.removeEventListener("keypress",m)))},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return t},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),g};var i=n(93784)},29128:function(r){var e={left:0,top:0};r.exports=function(r,n,i){n=n||r.currentTarget||r.srcElement,Array.isArray(i)||(i=[0,0]);var a,t=r.clientX||0,o=r.clientY||0,c=(a=n)===window||a===document||a===document.body?e:a.getBoundingClientRect();return i[0]=t-c.left,i[1]=o-c.top,i}},93784:function(r,e){"use strict";function n(r){return r.target||r.srcElement||window}e.buttons=function(r){if("object"===typeof r){if("buttons"in r)return r.buttons;if("which"in r){if(2===(e=r.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<0&&t(c,n))}catch(f){s.call(new m(n),f)}}}function s(r){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=r,e.state=2,e.chain.length>0&&t(c,e))}function l(r,e,n,i){for(var a=0;a1&&(a*=g=Math.sqrt(g),c*=g);var _=a*a,h=c*c,v=(d==s?-1:1)*Math.sqrt(Math.abs((_*h-_*f*f-h*y*y)/(_*f*f+h*y*y)));v==1/0&&(v=1);var x=v*a*f/c+(r+l)/2,P=v*-c*y/a+(i+m)/2,G=Math.asin(((i-P)/c).toFixed(9)),C=Math.asin(((m-P)/c).toFixed(9));(G=rC&&(G-=2*e),!s&&C>G&&(C-=2*e)}if(Math.abs(C-G)>n){var S=C,A=l,b=m;C=G+n*(s&&C>G?1:-1);var M=t(l=x+a*Math.cos(C),m=P+c*Math.sin(C),a,c,u,0,s,A,b,[C,S,x,P])}var B=Math.tan((C-G)/4),k=4/3*a*B,F=4/3*c*B,z=[2*r-(r+k*Math.sin(G)),2*i-(i-F*Math.cos(G)),l+k*Math.sin(C),m-F*Math.cos(C),l,m];if(p)return z;M&&(z=z.concat(M));for(var w=0;w7&&(n.push(g.splice(0,7)),g.unshift("C"));break;case"S":var h=p,v=I;"C"!=e&&"S"!=e||(h+=h-o,v+=v-u),g=["C",h,v,g[1],g[2],g[3],g[4]];break;case"T":"Q"==e||"T"==e?(l=2*p-l,m=2*I-m):(l=p,m=I),g=a(p,I,l,m,g[1],g[2]);break;case"Q":l=g[1],m=g[2],g=a(p,I,g[1],g[2],g[3],g[4]);break;case"L":g=i(p,I,g[1],g[2]);break;case"H":g=i(p,I,g[1],I);break;case"V":g=i(p,I,p,g[1]);break;case"Z":g=i(p,I,d,s)}e=_,p=g[g.length-2],I=g[g.length-1],g.length>4?(o=g[g.length-4],u=g[g.length-3]):(o=p,u=I),n.push(g)}return n}},50896:function(r){"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;r.exports=function(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de","5"===Object.getOwnPropertyNames(r)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(r){return e[r]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(r){i[r]=r})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(a){return!1}}()?Object.assign:function(r,a){for(var t,o,c=function(r){if(null===r||void 0===r)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}(r),u=1;u0&&!a.call(r,0))for(var y=0;y0)for(var f=0;f=0&&"[object Function]"===e.call(r.callee)),i}},32868:function(r){"use strict";function e(r,e){if("string"!==typeof r)return[r];var n=[r];"string"===typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var i=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],a=e.escape||"___",t=!!e.flat;i.forEach((function(r){var e=new RegExp(["\\",r[0],"[^\\",r[0],"\\",r[1],"]*\\",r[1]].join("")),i=[];function t(e,t,o){var c=n.push(e.slice(r[0].length,-r[1].length))-1;return i.push(c),a+c+a}n.forEach((function(r,i){for(var a,o=0;r!=a;)if(a=r,r=r.replace(e,t),o++>1e4)throw Error("References have circular dependency. Please, check them.");n[i]=r})),i=i.reverse(),n=n.map((function(e){return i.forEach((function(n){e=e.replace(new RegExp("(\\"+a+n+"\\"+a+")","g"),r[0]+"$1"+r[1])})),e}))}));var o=new RegExp("\\"+a+"([0-9]+)\\"+a);return t?n:function r(e,n,i){for(var a,t=[],c=0;a=o.exec(e);){if(c++>1e4)throw Error("Circular references in parenthesis");t.push(e.slice(0,a.index)),t.push(r(n[a[1]],n)),e=e.slice(a.index+a[0].length)}return t.push(e),t}(n[0],n)}function n(r,e){if(e&&e.flat){var n,i=e&&e.escape||"___",a=r[0];if(!a)return"";for(var t=new RegExp("\\"+i+"([0-9]+)\\"+i),o=0;a!=n;){if(o++>1e4)throw Error("Circular references in "+r);n=a,a=a.replace(t,c)}return a}return r.reduce((function r(e,n){return Array.isArray(n)&&(n=n.reduce(r,"")),e+n}),"");function c(e,n){if(null==r[n])throw Error("Reference "+n+"is undefined");return r[n]}}function i(r,i){return Array.isArray(r)?n(r,i):e(r,i)}i.parse=e,i.stringify=n,r.exports=i},51160:function(r,e,n){"use strict";var i=n(55616);r.exports=function(r){var e;return arguments.length>1&&(r=arguments),"string"===typeof r?r=r.split(/\s/).map(parseFloat):"number"===typeof r&&(r=[r]),r.length&&"number"===typeof r[0]?e=1===r.length?{width:r[0],height:r[0],x:0,y:0}:2===r.length?{width:r[0],height:r[1],x:0,y:0}:{x:r[0],y:r[1],width:r[2]-r[0]||0,height:r[3]-r[1]||0}:r&&(e={x:(r=i(r,{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"})).left||0,y:r.top||0},null==r.width?r.right?e.width=r.right-e.x:e.width=0:e.width=r.width,null==r.height?r.bottom?e.height=r.bottom-e.y:e.height=0:e.height=r.height),e}},21984:function(r){r.exports=function(r){var a=[];return r.replace(n,(function(r,n,t){var o=n.toLowerCase();for(t=function(r){var e=r.match(i);return e?e.map(Number):[]}(t),"m"==o&&t.length>2&&(a.push([n].concat(t.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(t.length==e[o])return t.unshift(n),a.push(t);if(t.lengtht!==p>t&&a<(m-s)*(t-l)/(p-l)+s&&(o=!o)}return o}},14756:function(r,e,n){var i,a=n(7688),t=n(28648),o=n(72200),c=n(11403),u=n(82368),d=n(17792),s=!1,l=t();function m(r,e,n){var a=i.segments(r),t=i.segments(e),o=n(i.combine(a,t));return i.polygon(o)}i={buildLog:function(r){return!0===r?s=a():!1===r&&(s=!1),!1!==s&&s.list},epsilon:function(r){return l.epsilon(r)},segments:function(r){var e=o(!0,l,s);return r.regions.forEach(e.addRegion),{segments:e.calculate(r.inverted),inverted:r.inverted}},combine:function(r,e){return{combined:o(!1,l,s).calculate(r.segments,r.inverted,e.segments,e.inverted),inverted1:r.inverted,inverted2:e.inverted}},selectUnion:function(r){return{segments:u.union(r.combined,s),inverted:r.inverted1||r.inverted2}},selectIntersect:function(r){return{segments:u.intersect(r.combined,s),inverted:r.inverted1&&r.inverted2}},selectDifference:function(r){return{segments:u.difference(r.combined,s),inverted:r.inverted1&&!r.inverted2}},selectDifferenceRev:function(r){return{segments:u.differenceRev(r.combined,s),inverted:!r.inverted1&&r.inverted2}},selectXor:function(r){return{segments:u.xor(r.combined,s),inverted:r.inverted1!==r.inverted2}},polygon:function(r){return{regions:c(r.segments,l,s),inverted:r.inverted}},polygonFromGeoJSON:function(r){return d.toPolygon(i,r)},polygonToGeoJSON:function(r){return d.fromPolygon(i,l,r)},union:function(r,e){return m(r,e,i.selectUnion)},intersect:function(r,e){return m(r,e,i.selectIntersect)},difference:function(r,e){return m(r,e,i.selectDifference)},differenceRev:function(r,e){return m(r,e,i.selectDifferenceRev)},xor:function(r,e){return m(r,e,i.selectXor)}},"object"===typeof window&&(window.PolyBool=i),r.exports=i},7688:function(r){r.exports=function(){var r,e=0,n=!1;function i(e,n){return r.list.push({type:e,data:n?JSON.parse(JSON.stringify(n)):void 0}),r}return r={list:[],segmentId:function(){return e++},checkIntersection:function(r,e){return i("check",{seg1:r,seg2:e})},segmentChop:function(r,e){return i("div_seg",{seg:r,pt:e}),i("chop",{seg:r,pt:e})},statusRemove:function(r){return i("pop_seg",{seg:r})},segmentUpdate:function(r){return i("seg_update",{seg:r})},segmentNew:function(r,e){return i("new_seg",{seg:r,primary:e})},segmentRemove:function(r){return i("rem_seg",{seg:r})},tempStatus:function(r,e,n){return i("temp_status",{seg:r,above:e,below:n})},rewind:function(r){return i("rewind",{seg:r})},status:function(r,e,n){return i("status",{seg:r,above:e,below:n})},vert:function(e){return e===n?r:(n=e,i("vert",{x:e}))},log:function(r){return"string"!==typeof r&&(r=JSON.stringify(r,!1," ")),i("log",{txt:r})},reset:function(){return i("reset")},selected:function(r){return i("selected",{segs:r})},chainStart:function(r){return i("chain_start",{seg:r})},chainRemoveHead:function(r,e){return i("chain_rem_head",{index:r,pt:e})},chainRemoveTail:function(r,e){return i("chain_rem_tail",{index:r,pt:e})},chainNew:function(r,e){return i("chain_new",{pt1:r,pt2:e})},chainMatch:function(r){return i("chain_match",{index:r})},chainClose:function(r){return i("chain_close",{index:r})},chainAddHead:function(r,e){return i("chain_add_head",{index:r,pt:e})},chainAddTail:function(r,e){return i("chain_add_tail",{index:r,pt:e})},chainConnect:function(r,e){return i("chain_con",{index1:r,index2:e})},chainReverse:function(r){return i("chain_rev",{index:r})},chainJoin:function(r,e){return i("chain_join",{index1:r,index2:e})},done:function(){return i("done")}}}},28648:function(r){r.exports=function(r){"number"!==typeof r&&(r=1e-10);var e={epsilon:function(e){return"number"===typeof e&&(r=e),r},pointAboveOrOnLine:function(e,n,i){var a=n[0],t=n[1],o=i[0],c=i[1],u=e[0];return(o-a)*(e[1]-t)-(c-t)*(u-a)>=-r},pointBetween:function(e,n,i){var a=e[1]-n[1],t=i[0]-n[0],o=e[0]-n[0],c=i[1]-n[1],u=o*t+a*c;return!(u-r)},pointsSameX:function(e,n){return Math.abs(e[0]-n[0])r!=o-a>r&&(t-d)*(a-s)/(o-s)+d-i>r&&(c=!c),t=d,o=s}return c}};return e}},17792:function(r){var e={toPolygon:function(r,e){function n(e){if(e.length<=0)return r.segments({inverted:!1,regions:[]});function n(e){var n=e.slice(0,e.length-1);return r.segments({inverted:!1,regions:[n]})}for(var i=n(e[0]),a=1;a0}))}function s(r,i){var a=r.seg,t=i.seg,o=a.start,c=a.end,d=t.start,s=t.end;n&&n.checkIntersection(a,t);var l=e.linesIntersect(o,c,d,s);if(!1===l){if(!e.pointsCollinear(o,c,d))return!1;if(e.pointsSame(o,s)||e.pointsSame(c,d))return!1;var m=e.pointsSame(o,d),p=e.pointsSame(c,s);if(m&&p)return i;var I=!m&&e.pointBetween(o,d,s),y=!p&&e.pointBetween(c,d,s);if(m)return y?u(i,c):u(r,s),i;I&&(p||(y?u(i,c):u(r,s)),u(i,o))}else 0===l.alongA&&(-1===l.alongB?u(r,d):0===l.alongB?u(r,l.pt):1===l.alongB&&u(r,s)),0===l.alongB&&(-1===l.alongA?u(i,o):0===l.alongA?u(i,l.pt):1===l.alongA&&u(i,c));return!1}for(var l=[];!t.isEmpty();){var m=t.getHead();if(n&&n.vert(m.pt[0]),m.isStart){n&&n.segmentNew(m.seg,m.primary);var p=d(m),I=p.before?p.before.ev:null,y=p.after?p.after.ev:null;function f(){if(I){var r=s(m,I);if(r)return r}return!!y&&s(m,y)}n&&n.tempStatus(m.seg,!!I&&I.seg,!!y&&y.seg);var g,_,h=f();if(h)r?(_=null===m.seg.myFill.below||m.seg.myFill.above!==m.seg.myFill.below)&&(h.seg.myFill.above=!h.seg.myFill.above):h.seg.otherFill=m.seg.myFill,n&&n.segmentUpdate(h.seg),m.other.remove(),m.remove();if(t.getHead()!==m){n&&n.rewind(m.seg);continue}r?(_=null===m.seg.myFill.below||m.seg.myFill.above!==m.seg.myFill.below,m.seg.myFill.below=y?y.seg.myFill.above:a,m.seg.myFill.above=_?!m.seg.myFill.below:m.seg.myFill.below):null===m.seg.otherFill&&(g=y?m.primary===y.primary?y.seg.otherFill.above:y.seg.myFill.above:m.primary?o:a,m.seg.otherFill={above:g,below:g}),n&&n.status(m.seg,!!I&&I.seg,!!y&&y.seg),m.other.status=p.insert(i.node({ev:m}))}else{var v=m.status;if(null===v)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(c.exists(v.prev)&&c.exists(v.next)&&s(v.prev.ev,v.next.ev),n&&n.statusRemove(v.ev.seg),v.remove(),!m.primary){var x=m.seg.myFill;m.seg.myFill=m.seg.otherFill,m.seg.otherFill=x}l.push(m.seg)}t.getHead().remove()}return n&&n.done(),l}return r?{addRegion:function(r){for(var i,a,t,o=r[r.length-1],u=0;u0&&!this.aborted;){var n=this.ifds_to_read.shift();n.offset&&this.scan_ifd(n.id,n.offset,r)}},i.prototype.read_uint16=function(r){var n=this.input;if(r+2>n.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?256*n[r]+n[r+1]:n[r]+256*n[r+1]},i.prototype.read_uint32=function(r){var n=this.input;if(r+4>n.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?16777216*n[r]+65536*n[r+1]+256*n[r+2]+n[r+3]:n[r]+256*n[r+1]+65536*n[r+2]+16777216*n[r+3]},i.prototype.is_subifd_link=function(r,e){return 0===r&&34665===e||0===r&&34853===e||34665===r&&40965===e},i.prototype.exif_format_length=function(r){switch(r){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(r,e){var n;switch(r){case 1:case 2:return n=this.input[e];case 6:return(n=this.input[e])|33554430*(128&n);case 3:return n=this.read_uint16(e);case 8:return(n=this.read_uint16(e))|131070*(32768&n);case 4:return n=this.read_uint32(e);case 9:return 0|(n=this.read_uint32(e));default:return null}},i.prototype.scan_ifd=function(r,i,a){var t=this.read_uint16(i);i+=2;for(var o=0;othis.input.length)throw e("unexpected EOF","EBADDATA");for(var I=[],y=m,f=0;f0&&(this.ifds_to_read.push({id:c,offset:I[0]}),p=!0),!1===a({is_big_endian:this.big_endian,ifd:r,tag:c,format:u,count:d,entry_offset:i+this.start,data_length:l,data_offset:m+this.start,value:I,is_subifd_link:p}))return void(this.aborted=!0);i+=12}0===r&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},r.exports.ExifParser=i,r.exports.get_orientation=function(r){var e=0;try{return new i(r,0,r.length).each((function(r){if(0===r.ifd&&274===r.tag&&Array.isArray(r.value))return e=r.value[0],!1})),e}catch(n){return-1}}},44600:function(r,e,n){"use strict";var i=n(9696).eW,a=n(9696).eI;function t(r,e){if(r.length<4+e)return null;var n=a(r,e);return r.length>4&15,a=15&r[4],t=r[5]>>4&15,o=i(r,6),u=8,d=0;de.width||r.width===e.width&&r.height>e.height?r:e})),n=r.reduce((function(r,e){return r.height>e.height||r.height===e.height&&r.width>e.width?r:e}));return e.width>n.height||e.width===n.height&&e.height>n.width?e:n}(e.sizes),i=1;e.transforms.forEach((function(r){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},n={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===r.type&&(i=0===r.value?n[i]:e[i=e[i=n[i]]]),"irot"===r.type)for(var a=0;a1&&(m.variants=l.variants),l.orientation&&(m.orientation=l.orientation),l.exif_location&&l.exif_location.offset+l.exif_location.length<=r.length){var p=t(r,l.exif_location.offset),I=r.slice(l.exif_location.offset+p+4,l.exif_location.offset+l.exif_location.length),y=c.get_orientation(I);y>0&&(m.orientation=y)}return m}}}}}}},38728:function(r,e,n){"use strict";var i=n(9696).wR,a=n(9696).gS,t=n(9696).Bz,o=i("BM");r.exports=function(r){if(!(r.length<26)&&a(r,0,o))return{width:t(r,18),height:t(r,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(r,e,n){"use strict";var i=n(9696).wR,a=n(9696).gS,t=n(9696).Bz,o=i("GIF87a"),c=i("GIF89a");r.exports=function(r){if(!(r.length<10)&&(a(r,0,o)||a(r,0,c)))return{width:t(r,6),height:t(r,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(r,e,n){"use strict";var i=n(9696).Bz;r.exports=function(r){var e=i(r,0),n=i(r,2),a=i(r,4);if(0===e&&1===n&&a){for(var t=[],o={width:0,height:0},c=0;co.width||d>o.height)&&(o=s)}return{width:o.width,height:o.height,variants:t,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(r,e,n){"use strict";var i=n(9696).eW,a=n(9696).wR,t=n(9696).gS,o=n(11688),c=a("Exif\0\0");r.exports=function(r){if(!(r.length<2)&&255===r[0]&&216===r[1]&&255===r[2])for(var e=2;;){for(;;){if(r.length-e<2)return;if(255===r[e++])break}for(var n,a,u=r[e++];255===u;)u=r[e++];if(208<=u&&u<=217||1===u)n=0;else{if(!(192<=u&&u<=254))return;if(r.length-e<2)return;n=i(r,e)-2,e+=2}if(217===u||218===u)return;if(225===u&&n>=10&&t(r,e,c)&&(a=o.get_orientation(r.slice(e+6,e+n))),n>=5&&192<=u&&u<=207&&196!==u&&200!==u&&204!==u){if(r.length-e0&&(d.orientation=a),d}e+=n}}},37276:function(r,e,n){"use strict";var i=n(9696).wR,a=n(9696).gS,t=n(9696).eI,o=i("\x89PNG\r\n\x1a\n"),c=i("IHDR");r.exports=function(r){if(!(r.length<24)&&a(r,0,o)&&a(r,12,c))return{width:t(r,16),height:t(r,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},90328:function(r,e,n){"use strict";var i=n(9696).wR,a=n(9696).gS,t=n(9696).eI,o=i("8BPS\0\x01");r.exports=function(r){if(!(r.length<22)&&a(r,0,o))return{width:t(r,18),height:t(r,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},16024:function(r){"use strict";function e(r){return"number"===typeof r&&isFinite(r)&&r>0}var n=/<[-_.:a-zA-Z0-9][^>]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,a=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(r){return c.test(r)?r.match(c)[0]:"px"}r.exports=function(r){if(function(r){var e,n=0,i=r.length;for(239===r[0]&&187===r[1]&&191===r[2]&&(n=3);n>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function m(r,e){return{width:1+(r[e+6]<<16|r[e+5]<<8|r[e+4]),height:1+(r[e+9]<r.length)){for(;e+8=10?n=n||s(r,e+8):"VP8L"===p&&I>=9?n=n||l(r,e+8):"VP8X"===p&&I>=10?n=n||m(r,e+8):"EXIF"===p&&(i=c.get_orientation(r.slice(e+8,e+8+I)),e=1/0),e+=8+I}else e++;if(n)return i>0&&(n.orientation=i),n}}}},87480:function(r,e,n){"use strict";r.exports={avif:n(40528),bmp:n(38728),gif:n(5588),ico:n(41924),jpeg:n(87968),png:n(37276),psd:n(90328),svg:n(16024),tiff:n(98792),webp:n(20704)}},19480:function(r,e,n){"use strict";var i=n(87480);r.exports=function(r){return function(r){for(var e=Object.keys(i),n=0;n1)for(var n=1;n1&&(r.scaleRatio=[r.scale[0]*r.viewport.width,r.scale[1]*r.viewport.height],n(r),r.after&&r.after(r))}function G(r){if(r){null!=r.length?"number"===typeof r[0]&&(r=[{positions:r}]):Array.isArray(r)||(r=[r]);var e=0,n=0;if(v.groups=h=r.map((function(r,d){var s=h[d];return r?("function"===typeof r?r={after:r}:"number"===typeof r[0]&&(r={positions:r}),r=o(r,{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"}),s||(h[d]=s={id:d,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},r=c({},_,r)),t(s,r,[{lineWidth:function(r){return.5*+r},capSize:function(r){return.5*+r},opacity:parseFloat,errors:function(r){return r=u(r),n+=r.length,r},positions:function(r,n){return r=u(r,"float64"),n.count=Math.floor(r.length/2),n.bounds=i(r,2),n.offset=e,e+=n.count,r}},{color:function(r,e){var n=e.count;if(r||(r="transparent"),!Array.isArray(r)||"number"===typeof r[0]){var i=r;r=Array(n);for(var t=0;t 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:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\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) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:n,divisor:0,stride:8,offset:0},lineTop:{buffer:n,divisor:0,stride:8,offset:4},aColor:{buffer:r.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:r.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:r.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:r.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:r.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:r.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},i))}catch(o){e=a}return{fill:r({primitive:"triangle",elements:function(r,e){return e.triangles},offset:0,vert:"\nprecision highp float;\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:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:r.prop("scale"),color:r.prop("fill"),scaleFract:r.prop("scaleFract"),translateFract:r.prop("translateFract"),translate:r.prop("translate"),opacity:r.prop("opacity"),pixelRatio:r.context("pixelRatio"),id:r.prop("id"),viewport:function(r,e){return[e.viewport.x,e.viewport.y,r.viewportWidth,r.viewportHeight]}},attributes:{position:{buffer:r.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:r.prop("positionFractBuffer"),stride:8,offset:8}},blend:i.blend,depth:{enable:!1},scissor:i.scissor,stencil:i.stencil,viewport:i.viewport}),rect:a,miter:e}},f.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},f.prototype.render=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];e.length&&(r=this).update.apply(r,e),this.draw()},f.prototype.draw=function(){for(var r=this,e=[],n=arguments.length;n--;)e[n]=arguments[n];return(e.length?e:this.passes).forEach((function(e,n){var i;if(e&&Array.isArray(e))return(i=r).draw.apply(i,e);"number"===typeof e&&(e=r.passes[e]),e&&e.count>1&&e.opacity&&(r.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&r.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>f.precisionThreshold||e.scale[1]*e.viewport.height>f.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=f.maxPoints)?r.shaders.rect(e):r.shaders.miter(e)))})),this},f.prototype.update=function(r){var e=this;if(r){null!=r.length?"number"===typeof r[0]&&(r=[{positions:r}]):Array.isArray(r)||(r=[r]);var n=this.regl,s=this.gl;if(r.forEach((function(r,p){var g=e.passes[p];if(void 0!==r)if(null!==r){if("number"===typeof r[0]&&(r={positions:r}),r=o(r,{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",splitNull:"splitNull"}),g||(e.passes[p]=g={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:n.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:n.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:n.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},r=t({},f.defaults,r)),null!=r.thickness&&(g.thickness=parseFloat(r.thickness)),null!=r.opacity&&(g.opacity=parseFloat(r.opacity)),null!=r.miterLimit&&(g.miterLimit=parseFloat(r.miterLimit)),null!=r.overlay&&(g.overlay=!!r.overlay,p=E}));(z=z.slice(0,N)).push(E)}for(var T=function(r){var e=C.slice(2*R,2*z[r]).concat(E?C.slice(2*E):[]),n=(g.hole||[]).map((function(e){return e-E+(z[r]-R)})),i=u(e,n);i=i.map((function(e){return e+R+(e+Rr.length)&&(e=r.length);for(var n=0,i=new Array(e);n 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"]),d.vert=m(["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\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\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) * pointSizeScale;\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&&(d.frag=d.frag.replace("smoothstep","smoothStep"),u.frag=u.frag.replace("smoothstep","smoothStep")),this.drawCircle=r(d)}v.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},v.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},v.prototype.draw=function(){for(var r=this,e=arguments.length,n=new Array(e),i=0;ii)?e.tree=s(r,{bounds:l}):i&&i.length&&(e.tree=i),e.tree){var m={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(m):e.elements=o.elements(m)}var p=g.float32(r);return a({data:p,usage:"dynamic"}),t({data:g.fract32(r,p),usage:"dynamic"}),c({data:new Uint8Array(d),type:"uint8",usage:"stream"}),r}},{marker:function(e,n,i){var a=n.activation;if(a.forEach((function(r){return r&&r.destroy&&r.destroy()})),a.length=0,e&&"number"!==typeof e[0]){for(var t=[],c=0,u=Math.min(e.length,n.count);c=0)return t;if(r instanceof Uint8Array||r instanceof Uint8ClampedArray)e=r;else{e=new Uint8Array(r.length);for(var o=0,c=r.length;o4*i&&(this.tooManyColors=!0),this.updatePalette(n),1===a.length?a[0]:a},v.prototype.updatePalette=function(r){if(!this.tooManyColors){var e=this.maxColors,n=this.paletteTexture,i=Math.ceil(.25*r.length/e);if(i>1)for(var a=.25*(r=r.slice()).length%e;a2?(c[0],c[2],i=c[1],a=c[3]):c.length?(i=c[0],a=c[1]):(c.x,i=c.y,c.x,c.width,a=c.y+c.height),u.length>2?(t=u[0],o=u[2],u[1],u[3]):u.length?(t=u[0],o=u[1]):(t=u.x,u.y,o=u.x+u.width,u.y,u.height),[t,i,o,a]}function p(r){if("number"===typeof r)return[r,r,r,r];if(2===r.length)return[r[0],r[1],r[0],r[1]];var e=u(r);return[e.x,e.y,e.x+e.width,e.y+e.height]}r.exports=s,s.prototype.render=function(){for(var r,e=this,n=[],i=arguments.length;i--;)n[i]=arguments[i];return n.length&&(r=this).update.apply(r,n),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){e.draw(),e.dirty=!0,e.planned=null}))):(this.draw(),this.dirty=!0,o((function(){e.dirty=!1}))),this)},s.prototype.update=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];if(e.length){for(var i=0;iC))&&(c.lower||!(G>>=e))<<3,(e|=n=(15<(r>>>=n))<<2)|(n=(3<(r>>>=n))<<1)|r>>>n>>1}function p(){function r(r){r:{for(var e=16;268435456>=e;e*=16)if(r<=e){r=e;break r}r=0}return 0<(e=n[m(r)>>2]).length?e.pop():new ArrayBuffer(r)}function e(r){n[m(r.byteLength)>>2].push(r)}var n=l(8,(function(){return[]}));return{alloc:r,free:e,allocType:function(e,n){var i=null;switch(e){case 5120:i=new Int8Array(r(n),0,n);break;case 5121:i=new Uint8Array(r(n),0,n);break;case 5122:i=new Int16Array(r(2*n),0,n);break;case 5123:i=new Uint16Array(r(2*n),0,n);break;case 5124:i=new Int32Array(r(4*n),0,n);break;case 5125:i=new Uint32Array(r(4*n),0,n);break;case 5126:i=new Float32Array(r(4*n),0,n);break;default:return null}return i.length!==n?i.subarray(0,n):i},freeType:function(r){e(r.buffer)}}}function I(r){return!!r&&"object"===typeof r&&Array.isArray(r.shape)&&Array.isArray(r.stride)&&"number"===typeof r.offset&&r.shape.length===r.stride.length&&(Array.isArray(r.data)||or(r.data))}function y(r,e,n,i,a,t){for(var o=0;o(a=c)&&(a=i.buffer.byteLength,5123===s?a>>=1:5125===s&&(a>>=2)),i.vertCount=a,a=o,0>o&&(a=4,1===(o=i.buffer.dimension)&&(a=0),2===o&&(a=1),3===o&&(a=4)),i.primType=a}function o(r){i.elementsCount--,delete c[r.id],r.buffer.destroy(),r.buffer=null}var c={},u=0,d={uint8:5121,uint16:5123};e.oes_element_index_uint&&(d.uint32=5125),a.prototype.bind=function(){this.buffer.bind()};var s=[];return{create:function(r,e){function c(r){if(r)if("number"===typeof r)u(r),s.primType=4,s.vertCount=0|r,s.type=5121;else{var e=null,n=35044,i=-1,a=-1,o=0,l=0;Array.isArray(r)||or(r)||I(r)?e=r:("data"in r&&(e=r.data),"usage"in r&&(n=lr[r.usage]),"primitive"in r&&(i=yr[r.primitive]),"count"in r&&(a=0|r.count),"type"in r&&(l=d[r.type]),"length"in r?o=0|r.length:(o=a,5123===l||5122===l?o*=2:5125!==l&&5124!==l||(o*=4))),t(s,e,n,i,a,o,l)}else u(),s.primType=4,s.vertCount=0,s.type=5121;return c}var u=n.create(null,34963,!0),s=new a(u._buffer);return i.elementsCount++,c(r),c._reglType="elements",c._elements=s,c.subdata=function(r,e){return u.subdata(r,e),c},c.destroy=function(){o(s)},c},createStream:function(r){var e=s.pop();return e||(e=new a(n.create(null,34963,!0,!1)._buffer)),t(e,r,35040,-1,-1,0,0),e},destroyStream:function(r){s.push(r)},getElements:function(r){return"function"===typeof r&&r._elements instanceof a?r._elements:null},clear:function(){cr(c).forEach(o)}}}function P(r){for(var e=ar.allocType(5123,r.length),n=0;n>>31<<15,a=(t<<1>>>24)-127,t=t>>13&1023;e[n]=-24>a?i:-14>a?i+(t+1024>>-14-a):15>=a,n.height>>=a,m(n,i[a]),r.mipmask|=1<e;++e)r.images[e]=null;return r}function C(r){for(var e=r.images,n=0;ne){for(var n=0;n=--this.refCount&&T(this)}}),o.profile&&(t.getTotalTextureSize=function(){var r=0;return Object.keys(tr).forEach((function(e){r+=tr[e].stats.size})),r}),{create2D:function(e,n){function i(r,e){var n=a.texInfo;F.call(n);var t=x();return"number"===typeof r?_(t,0|r,"number"===typeof e?0|e:0|r):r?(z(n,r),h(t,r)):_(t,1,1),n.genMipmaps&&(t.mipmask=(t.width<<1)-1),a.mipmask=t.mipmask,u(a,t),a.internalformat=t.internalformat,i.width=t.width,i.height=t.height,E(a),v(t,3553),w(n,3553),N(),C(t),o.profile&&(a.stats.size=k(a.internalformat,a.type,t.width,t.height,n.genMipmaps,!1)),i.format=Z[a.internalformat],i.type=q[a.type],i.mag=Y[n.magFilter],i.min=X[n.minFilter],i.wrapS=Q[n.wrapS],i.wrapT=Q[n.wrapT],i}var a=new R(3553);return tr[a.id]=a,t.textureCount++,i(e,n),i.subimage=function(r,e,n,t){e|=0,n|=0,t|=0;var o=y();return u(o,a),o.width=0,o.height=0,m(o,r),o.width=o.width||(a.width>>t)-e,o.height=o.height||(a.height>>t)-n,E(a),p(o,3553,e,n,t),N(),f(o),i},i.resize=function(e,n){var t=0|e,c=0|n||t;if(t===a.width&&c===a.height)return i;i.width=a.width=t,i.height=a.height=c,E(a);for(var u=0;a.mipmask>>u;++u){var d=t>>u,s=c>>u;if(!d||!s)break;r.texImage2D(3553,u,a.format,d,s,0,a.format,a.type,null)}return N(),o.profile&&(a.stats.size=k(a.internalformat,a.type,t,c,!1,!1)),i},i._reglType="texture2d",i._texture=a,o.profile&&(i.stats=a.stats),i.destroy=function(){a.decRef()},i},createCube:function(e,n,i,a,c,s){function l(r,e,n,i,a,t){var c,s=I.texInfo;for(F.call(s),c=0;6>c;++c)g[c]=x();if("number"!==typeof r&&r){if("object"===typeof r)if(e)h(g[0],r),h(g[1],e),h(g[2],n),h(g[3],i),h(g[4],a),h(g[5],t);else if(z(s,r),d(I,r),"faces"in r)for(r=r.faces,c=0;6>c;++c)u(g[c],I),h(g[c],r[c]);else for(c=0;6>c;++c)h(g[c],r)}else for(r=0|r||1,c=0;6>c;++c)_(g[c],r,r);for(u(I,g[0]),I.mipmask=s.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,I.internalformat=g[0].internalformat,l.width=g[0].width,l.height=g[0].height,E(I),c=0;6>c;++c)v(g[c],34069+c);for(w(s,34067),N(),o.profile&&(I.stats.size=k(I.internalformat,I.type,l.width,l.height,s.genMipmaps,!0)),l.format=Z[I.internalformat],l.type=q[I.type],l.mag=Y[s.magFilter],l.min=X[s.minFilter],l.wrapS=Q[s.wrapS],l.wrapT=Q[s.wrapT],c=0;6>c;++c)C(g[c]);return l}var I=new R(34067);tr[I.id]=I,t.cubeCount++;var g=Array(6);return l(e,n,i,a,c,s),l.subimage=function(r,e,n,i,a){n|=0,i|=0,a|=0;var t=y();return u(t,I),t.width=0,t.height=0,m(t,e),t.width=t.width||(I.width>>a)-n,t.height=t.height||(I.height>>a)-i,E(I),p(t,34069+r,n,i,a),N(),f(t),l},l.resize=function(e){if((e|=0)!==I.width){l.width=I.width=e,l.height=I.height=e,E(I);for(var n=0;6>n;++n)for(var i=0;I.mipmask>>i;++i)r.texImage2D(34069+n,i,I.format,e>>i,e>>i,0,I.format,I.type,null);return N(),o.profile&&(I.stats.size=k(I.internalformat,I.type,l.width,l.height,!1,!0)),l}},l._reglType="textureCube",l._texture=I,o.profile&&(l.stats=I.stats),l.destroy=function(){I.decRef()},l},clear:function(){for(var e=0;en;++n)if(0!==(e.mipmask&1<>n,e.height>>n,0,e.internalformat,e.type,null);else for(var i=0;6>i;++i)r.texImage2D(34069+i,n,e.internalformat,e.width>>n,e.height>>n,0,e.internalformat,e.type,null);w(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ea;++a){for(d=0;dr;++r)n[r].resize(i);return e.width=e.height=i,e},_reglType:"framebufferCube",destroy:function(){n.forEach((function(r){r.destroy()}))}})},clear:function(){cr(C).forEach(f)},restore:function(){h.cur=null,h.next=null,h.dirty=!0,cr(C).forEach((function(e){e.framebuffer=r.createFramebuffer(),g(e)}))}})}function w(){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 R(r,e,n,i,a,t,o){function c(r){if(r!==g.currentVAO){var n=e.oes_vertex_array_object;r?n.bindVertexArrayOES(r.vao):n.bindVertexArrayOES(null),g.currentVAO=r}}function u(n){if(n!==g.currentVAO){if(n)n.bindAttrs();else{for(var i=e.angle_instanced_arrays,a=0;a=l.byteLength?u.subdata(l):(u.destroy(),n.buffers[c]=null)),n.buffers[c]||(u=n.buffers[c]=a.create(d,34962,!1,!0)),s.buffer=a.getBuffer(u),s.size=0|s.buffer.dimension,s.normalized=!1,s.type=s.buffer.dtype,s.offset=0,s.stride=0,s.divisor=0,s.state=1,r[c]=1):a.getBuffer(d)?(s.buffer=a.getBuffer(d),s.size=0|s.buffer.dimension,s.normalized=!1,s.type=s.buffer.dtype,s.offset=0,s.stride=0,s.divisor=0,s.state=1):a.getBuffer(d.buffer)?(s.buffer=a.getBuffer(d.buffer),s.size=0|(+d.size||s.buffer.dimension),s.normalized=!!d.normalized||!1,s.type="type"in d?sr[d.type]:s.buffer.dtype,s.offset=0|(d.offset||0),s.stride=0|(d.stride||0),s.divisor=0|(d.divisor||0),s.state=1):"x"in d&&(s.x=+d.x||0,s.y=+d.y||0,s.z=+d.z||0,s.w=+d.w||0,s.state=2)}for(u=0;ur&&(r=e.stats.uniformsCount)})),r},n.getMaxAttributesCount=function(){var r=0;return m.forEach((function(e){e.stats.attributesCount>r&&(r=e.stats.attributesCount)})),r}),{clear:function(){var e=r.deleteShader.bind(r);cr(d).forEach(e),d={},cr(s).forEach(e),s={},m.forEach((function(e){r.deleteProgram(e.program)})),m.length=0,l={},n.shaderCount=0},program:function(e,i,a,t){var o=l[i];o||(o=l[i]={});var p=o[e];if(p&&(p.refCount++,!t))return p;var I=new c(i,e);return n.shaderCount++,u(I,a,t),p||(o[e]=I),m.push(I),$(I,{destroy:function(){if(I.refCount--,0>=I.refCount){r.deleteProgram(I.program);var e=m.indexOf(I);m.splice(e,1),n.shaderCount--}0>=o[I.vertId].refCount&&(r.deleteShader(s[I.vertId]),delete s[I.vertId],delete l[I.fragId][I.vertId]),Object.keys(l[I.fragId]).length||(r.deleteShader(d[I.fragId]),delete d[I.fragId],delete l[I.fragId])}})},restore:function(){d={},s={};for(var r=0;r>2),n=0;n>5]|=(255&r.charCodeAt(n/8))<<24-n%32;var i,a,t,o,c,u,d,s,l,m,p,I=8*r.length;for(r=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],n=Array(64),e[I>>5]|=128<<24-I%32,e[15+(I+64>>9<<4)]=I,s=0;sl;l++){var y;16>l?n[l]=e[l+s]:(m=l,p=H(p=U(p=n[l-2],17)^U(p,19)^p>>>10,n[l-7]),y=U(y=n[l-15],7)^U(y,18)^y>>>3,n[m]=H(H(p,y),n[l-16])),m=H(H(H(H(d,m=U(m=o,6)^U(m,11)^U(m,25)),o&c^~o&u),Rr[l]),n[l]),p=H(d=U(d=I,2)^U(d,13)^U(d,22),I&i^I&a^i&a),d=u,u=c,c=o,o=H(t,m),t=a,a=i,i=I,I=H(m,p)}r[0]=H(I,r[0]),r[1]=H(i,r[1]),r[2]=H(a,r[2]),r[3]=H(t,r[3]),r[4]=H(o,r[4]),r[5]=H(c,r[5]),r[6]=H(u,r[6]),r[7]=H(d,r[7])}for(e="",n=0;n<32*r.length;n+=8)e+=String.fromCharCode(r[n>>5]>>>24-n%32&255);return e}function D(r){for(var e,n="",i=0;i>>4&15)+"0123456789abcdef".charAt(15&e);return n}function J(r){for(var e,n,i="",a=-1;++a=e&&56320<=n&&57343>=n&&(e=65536+((1023&e)<<10)+(1023&n),a++),127>=e?i+=String.fromCharCode(e):2047>=e?i+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?i+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(i+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return i}function U(r,e){return r>>>e|r<<32-e}function H(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function L(r){return Array.prototype.slice.call(r)}function O(r){return L(r).join("")}function K(r){function e(){var r=[],e=[];return $((function(){r.push.apply(r,L(arguments))}),{def:function(){var n="v"+a++;return e.push(n),0"+e+"?"+a+".constant["+e+"]:0;"})).join(""),"}}else{","if(",c,"(",a,".buffer)){",s,"=",t,".createStream(",34962,",",a,".buffer);","}else{",s,"=",t,".getBuffer(",a,".buffer);","}",l,'="type" in ',a,"?",o.glTypes,"[",a,".type]:",s,".dtype;",u.normalized,"=!!",a,".normalized;"),i("size"),i("offset"),i("stride"),i("divisor"),n("}}"),n.exit("if(",u.isStream,"){",t,".destroyStream(",s,");","}"),u}))})),o}function F(r){var e=r.static,n=r.dynamic,i={};return Object.keys(e).forEach((function(r){var n=e[r];i[r]=q((function(r,e){return"number"===typeof n||"boolean"===typeof n?""+n:r.link(n)}))})),Object.keys(n).forEach((function(r){var e=n[r];i[r]=Y(e,(function(r,n){return r.invoke(n,e)}))})),i}function z(r,e,i,a,t){function o(r){var e=u[r];e&&(l[r]=e)}var c=S(r,e),u=C(r,p=P(r,t),t),s=b(r,t),l=M(r,t),m=A(r,t,c);o("viewport"),o(g("scissor.box"));var p,I=0>1)",c],");")}function e(){n(u,".drawArraysInstancedANGLE(",[I,y,f,c],");")}p&&"null"!==p?_?r():(n("if(",p,"){"),r(),n("}else{"),e(),n("}")):e()}function o(){function r(){n(s+".drawElements("+[I,f,g,y+"<<(("+g+"-5121)>>1)"]+");")}function e(){n(s+".drawArrays("+[I,y,f]+");")}p&&"null"!==p?_?r():(n("if(",p,"){"),r(),n("}else{"),e(),n("}")):e()}var c,u,d=r.shared,s=d.gl,l=d.draw,m=i.draw,p=function(){var a=m.elements,t=e;return a?((a.contextDep&&i.contextDynamic||a.propDep)&&(t=n),a=a.append(r,t),m.elementsActive&&t("if("+a+")"+s+".bindBuffer(34963,"+a+".buffer.buffer);")):(a=t.def(),t(a,"=",l,".","elements",";","if(",a,"){",s,".bindBuffer(",34963,",",a,".buffer.buffer);}","else if(",d.vao,".currentVAO){",a,"=",r.shared.elements+".getElements("+d.vao,".currentVAO.elements);",lr?"":"if("+a+")"+s+".bindBuffer(34963,"+a+".buffer.buffer);","}")),a}(),I=a("primitive"),y=a("offset"),f=function(){var a=m.count,t=e;return a?((a.contextDep&&i.contextDynamic||a.propDep)&&(t=n),a=a.append(r,t)):a=t.def(l,".","count"),a}();if("number"===typeof f){if(0===f)return}else n("if(",f,"){"),n.exit("}");ur&&(c=a("instances"),u=r.instancing);var g=p+".type",_=m.elements&&Z(m.elements)&&!m.vaoActive;ur&&("number"!==typeof c||0<=c)?"string"===typeof c?(n("if(",c,">0){"),t(),n("}else if(",c,"<0){"),o(),n("}")):t():o()}function L(r,e,n,i,a){return a=(e=v()).proc("body",a),ur&&(e.instancing=a.def(e.shared.extensions,".angle_instanced_arrays")),r(e,a,n,i),e.compile().body}function O(r,e,n,i){T(r,e),n.useVAO?n.drawVAO?e(r.shared.vao,".setVAO(",n.drawVAO.append(r,e),");"):e(r.shared.vao,".setVAO(",r.shared.vao,".targetVAO);"):(e(r.shared.vao,".setVAO(null);"),J(r,e,n,i.attributes,(function(){return!0}))),U(r,e,n,i.uniforms,(function(){return!0}),!1),H(r,e,e,n)}function X(r,e){var n=r.proc("draw",1);T(r,n),w(r,n,e.context),R(r,n,e.framebuffer),E(r,n,e),N(r,n,e.state),D(r,n,e,!1,!0);var i=e.shader.progVar.append(r,n);if(n(r.shared.gl,".useProgram(",i,".program);"),e.shader.program)O(r,n,e,e.shader.program);else{n(r.shared.vao,".setVAO(null);");var a=r.global.def("{}"),t=n.def(i,".id"),o=n.def(a,"[",t,"]");n(r.cond(o).then(o,".call(this,a0);").else(o,"=",a,"[",t,"]=",r.link((function(n){return L(O,r,e,n,1)})),"(",i,");",o,".call(this,a0);"))}0=--this.refCount&&o(this)},a.profile&&(i.getTotalRenderbufferSize=function(){var r=0;return Object.keys(s).forEach((function(e){r+=s[e].stats.size})),r}),{create:function(e,n){function o(e,n){var i=0,t=0,s=32854;if("object"===typeof e&&e?("shape"in e?(i=0|(t=e.shape)[0],t=0|t[1]):("radius"in e&&(i=t=0|e.radius),"width"in e&&(i=0|e.width),"height"in e&&(t=0|e.height)),"format"in e&&(s=c[e.format])):"number"===typeof e?(i=0|e,t="number"===typeof n?0|n:i):e||(i=t=1),i!==d.width||t!==d.height||s!==d.format)return o.width=d.width=i,o.height=d.height=t,d.format=s,r.bindRenderbuffer(36161,d.renderbuffer),r.renderbufferStorage(36161,s,i,t),a.profile&&(d.stats.size=kr[d.format]*d.width*d.height),o.format=u[d.format],o}var d=new t(r.createRenderbuffer());return s[d.id]=d,i.renderbufferCount++,o(e,n),o.resize=function(e,n){var i=0|e,t=0|n||i;return i===d.width&&t===d.height||(o.width=d.width=i,o.height=d.height=t,r.bindRenderbuffer(36161,d.renderbuffer),r.renderbufferStorage(36161,d.format,i,t),a.profile&&(d.stats.size=kr[d.format]*d.width*d.height)),o},o._reglType="renderbuffer",o._renderbuffer=d,a.profile&&(o.stats=d.stats),o.destroy=function(){d.decRef()},o},clear:function(){cr(s).forEach(o)},restore:function(){cr(s).forEach((function(e){e.renderbuffer=r.createRenderbuffer(),r.bindRenderbuffer(36161,e.renderbuffer),r.renderbufferStorage(36161,e.format,e.width,e.height)})),r.bindRenderbuffer(36161,null)}}},zr=[];zr[6408]=4,zr[6407]=3;var wr=[];wr[5121]=1,wr[5126]=4,wr[36193]=2;var Rr=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Er=["x","y","z","w"],Nr="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Tr={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},Dr={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},Jr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ur={cw:2304,ccw:2305},Hr=new W(!1,!1,!1,(function(){})),Lr=function(r,e){function n(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function i(r,e,i){var a=o.pop()||new n;a.startQueryIndex=r,a.endQueryIndex=e,a.sum=0,a.stats=i,c.push(a)}if(!e.ext_disjoint_timer_query)return null;var a=[],t=[],o=[],c=[],u=[],d=[];return{beginQuery:function(r){var n=a.pop()||e.ext_disjoint_timer_query.createQueryEXT();e.ext_disjoint_timer_query.beginQueryEXT(35007,n),t.push(n),i(t.length-1,t.length,r)},endQuery:function(){e.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:i,update:function(){var r,n;if(0!==(r=t.length)){d.length=Math.max(d.length,r+1),u.length=Math.max(u.length,r+1),u[0]=0;var i=d[0]=0;for(n=r=0;n=j.length&&i()}var n=Q(j,r);j[n]=e}}}function m(){var r=K.viewport,e=K.scissor_box;r[0]=r[1]=e[0]=e[1]=0,B.viewportWidth=B.framebufferWidth=B.drawingBufferWidth=r[2]=e[2]=f.drawingBufferWidth,B.viewportHeight=B.framebufferHeight=B.drawingBufferHeight=r[3]=e[3]=f.drawingBufferHeight}function p(){B.tick+=1,B.time=y(),m(),O.procs.poll()}function I(){U.refresh(),m(),O.procs.refresh(),S&&S.update()}function y(){return(ir()-A)/1e3}if(!(r=d(r)))return null;var f=r.gl,g=f.getContextAttributes();f.isContextLost();var _=s(f,r);if(!_)return null;var h=a(),P={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},G=r.cachedCode||{},C=_.extensions,S=Lr(f,C),A=ir(),b=f.drawingBufferWidth,M=f.drawingBufferHeight,B={tick:0,time:0,viewportWidth:b,viewportHeight:M,framebufferWidth:b,framebufferHeight:M,drawingBufferWidth:b,drawingBufferHeight:M,pixelRatio:r.pixelRatio},k=(b={elements:null,primitive:4,count:-1,offset:0,instances:-1},tr(f,C)),w=v(f,P,r,(function(r){return D.destroyBuffer(r)})),T=x(f,C,w,P),D=R(f,C,k,P,w,T,b),J=E(f,h,P,r),U=F(f,C,k,(function(){O.procs.poll()}),B,P,r),H=Fr(f,C,k,P,r),L=z(f,C,k,U,H,P),O=X(f,h,C,k,w,T,U,L,{},D,J,b,B,S,G,r),K=(h=N(f,L,O.procs.poll,B,g,C,k),O.next),V=f.canvas,j=[],W=[],Z=[],q=[r.onDestroy],Y=null;V&&(V.addEventListener("webglcontextlost",t,!1),V.addEventListener("webglcontextrestored",o,!1));var rr=L.setFBO=c({framebuffer:er.define.call(null,1,"framebuffer")});return I(),g=$(c,{clear:function(r){if("framebuffer"in r)if(r.framebuffer&&"framebufferCube"===r.framebuffer_reglType)for(var e=0;6>e;++e)rr($({framebuffer:r.framebuffer.faces[e]},r),u);else rr(r,u);else u(null,r)},prop:er.define.bind(null,1),context:er.define.bind(null,2),this:er.define.bind(null,3),draw:c({}),buffer:function(r){return w.create(r,34962,!1,!1)},elements:function(r){return T.create(r,!1)},texture:U.create2D,cube:U.createCube,renderbuffer:H.create,framebuffer:L.create,framebufferCube:L.createCube,vao:D.createVAO,attributes:g,frame:l,on:function(r,e){var n;switch(r){case"frame":return l(e);case"lost":n=W;break;case"restore":n=Z;break;case"destroy":n=q}return n.push(e),{cancel:function(){for(var r=0;r4294967295||u(e)!==e)throw new c("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,d=!0;if("length"in r&&o){var s=o(r,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(d=!1)}return(i||d||!n)&&(t?a(r,"length",e,!0,!0):a(r,"length",e)),r}},29936:function(r,e,n){r.exports=a;var i=n(61252).EventEmitter;function a(){i.call(this)}n(6768)(a,i),a.Readable=n(12348),a.Writable=n(11288),a.Duplex=n(15316),a.Transform=n(22477),a.PassThrough=n(27136),a.finished=n(15932),a.pipeline=n(38180),a.Stream=a,a.prototype.pipe=function(r,e){var n=this;function a(e){r.writable&&!1===r.write(e)&&n.pause&&n.pause()}function t(){n.readable&&n.resume&&n.resume()}n.on("data",a),r.on("drain",t),r._isStdio||e&&!1===e.end||(n.on("end",c),n.on("close",u));var o=!1;function c(){o||(o=!0,r.end())}function u(){o||(o=!0,"function"===typeof r.destroy&&r.destroy())}function d(r){if(s(),0===i.listenerCount(this,"error"))throw r}function s(){n.removeListener("data",a),r.removeListener("drain",t),n.removeListener("end",c),n.removeListener("close",u),n.removeListener("error",d),r.removeListener("error",d),n.removeListener("end",s),n.removeListener("close",s),r.removeListener("close",s)}return n.on("error",d),r.on("error",d),n.on("end",s),n.on("close",s),r.on("close",s),r.emit("pipe",n),r}},92784:function(r){"use strict";var e={};function n(r,n,i){i||(i=Error);var a=function(r){var e,i;function a(e,i,a){return r.call(this,function(r,e,i){return"string"===typeof n?n:n(r,e,i)}(e,i,a))||this}return i=r,(e=a).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,a}(i);a.prototype.name=i.name,a.prototype.code=r,e[r]=a}function i(r,e){if(Array.isArray(r)){var n=r.length;return r=r.map((function(r){return String(r)})),n>2?"one of ".concat(e," ").concat(r.slice(0,n-1).join(", "),", or ")+r[n-1]:2===n?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}n("ERR_INVALID_OPT_VALUE",(function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(r,e,n){var a,t,o,c;if("string"===typeof e&&(t="not ",e.substr(!o||o<0?0:+o,t.length)===t)?(a="must not be",e=e.replace(/^not /,"")):a="must be",function(r,e,n){return(void 0===n||n>r.length)&&(n=r.length),r.substring(n-e.length,n)===e}(r," argument"))c="The ".concat(r," ").concat(a," ").concat(i(e,"type"));else{var u=function(r,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>r.length)&&-1!==r.indexOf(e,n)}(r,".")?"property":"argument";c='The "'.concat(r,'" ').concat(u," ").concat(a," ").concat(i(e,"type"))}return c+=". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(r){return"The "+r+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(r){return"Cannot call "+r+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(r){return"Unknown encoding: "+r}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r.exports.i=e},15316:function(r,e,n){"use strict";var i=n(4168),a=Object.keys||function(r){var e=[];for(var n in r)e.push(n);return e};r.exports=s;var t=n(12348),o=n(11288);n(6768)(s,t);for(var c=a(o.prototype),u=0;u0)if("string"===typeof e||c.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(r){return u.from(r)}(e)),i)c.endEmitted?P(r,new x):b(r,c,e,!0);else if(c.ended)P(r,new h);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!n?(e=c.decoder.write(e),c.objectMode||0!==e.length?b(r,c,e,!1):z(r,c)):b(r,c,e,!1)}else i||(c.reading=!1,z(r,c));return!c.ended&&(c.lengthe.highWaterMark&&(e.highWaterMark=function(r){return r>=M?r=M:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r}(r)),r<=e.length?r:e.ended?e.length:(e.needReadable=!0,0))}function k(r){var e=r._readableState;t("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(t("emitReadable",e.flowing),e.emittedReadable=!0,a.nextTick(F,r))}function F(r){var e=r._readableState;t("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(r.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,T(r)}function z(r,e){e.readingMore||(e.readingMore=!0,a.nextTick(w,r,e))}function w(r,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:r.listenerCount("data")>0&&r.resume()}function E(r){t("readable nexttick read 0"),r.read(0)}function N(r,e){t("resume",e.reading),e.reading||r.read(0),e.resumeScheduled=!1,r.emit("resume"),T(r),e.flowing&&!e.reading&&r.read(0)}function T(r){var e=r._readableState;for(t("flow",e.flowing);e.flowing&&null!==r.read(););}function D(r,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!r||r>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(r,e.decoder),n);var n}function J(r){var e=r._readableState;t("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,a.nextTick(U,e,r))}function U(r,e){if(t("endReadableNT",r.endEmitted,r.length),!r.endEmitted&&0===r.length&&(r.endEmitted=!0,e.readable=!1,e.emit("end"),r.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function H(r,e){for(var n=0,i=r.length;n=e.highWaterMark:e.length>0)||e.ended))return t("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?J(this):k(this),null;if(0===(r=B(r,e))&&e.ended)return 0===e.length&&J(this),null;var i,a=e.needReadable;return t("need readable",a),(0===e.length||e.length-r0?D(r,e):null)?(e.needReadable=e.length<=e.highWaterMark,r=0):(e.length-=r,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==r&&e.ended&&J(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(r){P(this,new v("_read()"))},S.prototype.pipe=function(r,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=r;break;case 1:i.pipes=[i.pipes,r];break;default:i.pipes.push(r)}i.pipesCount+=1,t("pipe count=%d opts=%j",i.pipesCount,e);var c=e&&!1===e.end||r===a.stdout||r===a.stderr?f:d;function u(e,a){t("onunpipe"),e===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,t("cleanup"),r.removeListener("close",I),r.removeListener("finish",y),r.removeListener("drain",s),r.removeListener("error",p),r.removeListener("unpipe",u),n.removeListener("end",d),n.removeListener("end",f),n.removeListener("data",m),l=!0,!i.awaitDrain||r._writableState&&!r._writableState.needDrain||s())}function d(){t("onend"),r.end()}i.endEmitted?a.nextTick(c):n.once("end",c),r.on("unpipe",u);var s=function(r){return function(){var e=r._readableState;t("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(r,"data")&&(e.flowing=!0,T(r))}}(n);r.on("drain",s);var l=!1;function m(e){t("ondata");var a=r.write(e);t("dest.write",a),!1===a&&((1===i.pipesCount&&i.pipes===r||i.pipesCount>1&&-1!==H(i.pipes,r))&&!l&&(t("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){t("onerror",e),f(),r.removeListener("error",p),0===o(r,"error")&&P(r,e)}function I(){r.removeListener("finish",y),f()}function y(){t("onfinish"),r.removeListener("close",I),f()}function f(){t("unpipe"),n.unpipe(r)}return n.on("data",m),function(r,e,n){if("function"===typeof r.prependListener)return r.prependListener(e,n);r._events&&r._events[e]?Array.isArray(r._events[e])?r._events[e].unshift(n):r._events[e]=[n,r._events[e]]:r.on(e,n)}(r,"error",p),r.once("close",I),r.once("finish",y),r.emit("pipe",n),i.flowing||(t("pipe resume"),n.resume()),r},S.prototype.unpipe=function(r){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return r&&r!==e.pipes||(r||(r=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,r&&r.emit("unpipe",this,n)),this;if(!r){var i=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var t=0;t0,!1!==i.flowing&&this.resume()):"readable"===r&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,t("on readable",i.length,i.reading),i.length?k(this):i.reading||a.nextTick(E,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(r,e){var n=c.prototype.removeListener.call(this,r,e);return"readable"===r&&a.nextTick(R,this),n},S.prototype.removeAllListeners=function(r){var e=c.prototype.removeAllListeners.apply(this,arguments);return"readable"!==r&&void 0!==r||a.nextTick(R,this),e},S.prototype.resume=function(){var r=this._readableState;return r.flowing||(t("resume"),r.flowing=!r.readableListening,function(r,e){e.resumeScheduled||(e.resumeScheduled=!0,a.nextTick(N,r,e))}(this,r)),r.paused=!1,this},S.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(r){var e=this,n=this._readableState,i=!1;for(var a in r.on("end",(function(){if(t("wrapped end"),n.decoder&&!n.ended){var r=n.decoder.end();r&&r.length&&e.push(r)}e.push(null)})),r.on("data",(function(a){t("wrapped data"),n.decoder&&(a=n.decoder.write(a)),(!n.objectMode||null!==a&&void 0!==a)&&(n.objectMode||a&&a.length)&&(e.push(a)||(i=!0,r.pause()))})),r)void 0===this[a]&&"function"===typeof r[a]&&(this[a]=function(e){return function(){return r[e].apply(r,arguments)}}(a));for(var o=0;o-1))throw new x(r);return this._writableState.defaultEncoding=r,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(r,e,n){n(new y("_write()"))},S.prototype._writev=null,S.prototype.end=function(r,e,n){var i=this._writableState;return"function"===typeof r?(n=r,r=null,e=null):"function"===typeof e&&(n=e,e=null),null!==r&&void 0!==r&&this.write(r,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(r,e,n){e.ending=!0,F(r,e),n&&(e.finished?a.nextTick(n):r.once("finish",n)),e.ended=!0,r.writable=!1}(this,i,n),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(r){this._writableState&&(this._writableState.destroyed=r)}}),S.prototype.destroy=l.destroy,S.prototype._undestroy=l.undestroy,S.prototype._destroy=function(r,e){e(r)}},60328:function(r,e,n){"use strict";var i,a=n(4168);function t(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}var o=n(15932),c=Symbol("lastResolve"),u=Symbol("lastReject"),d=Symbol("error"),s=Symbol("ended"),l=Symbol("lastPromise"),m=Symbol("handlePromise"),p=Symbol("stream");function I(r,e){return{value:r,done:e}}function y(r){var e=r[c];if(null!==e){var n=r[p].read();null!==n&&(r[l]=null,r[c]=null,r[u]=null,e(I(n,!1)))}}function f(r){a.nextTick(y,r)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((t(i={get stream(){return this[p]},next:function(){var r=this,e=this[d];if(null!==e)return Promise.reject(e);if(this[s])return Promise.resolve(I(void 0,!0));if(this[p].destroyed)return new Promise((function(e,n){a.nextTick((function(){r[d]?n(r[d]):e(I(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(r,e){return function(n,i){r.then((function(){e[s]?n(I(void 0,!0)):e[m](n,i)}),i)}}(i,this));else{var t=this[p].read();if(null!==t)return Promise.resolve(I(t,!1));n=new Promise(this[m])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),t(i,"return",(function(){var r=this;return new Promise((function(e,n){r[p].destroy(null,(function(r){r?n(r):e(I(void 0,!0))}))}))})),i),g);r.exports=function(r){var e,n=Object.create(_,(t(e={},p,{value:r,writable:!0}),t(e,c,{value:null,writable:!0}),t(e,u,{value:null,writable:!0}),t(e,d,{value:null,writable:!0}),t(e,s,{value:r._readableState.endEmitted,writable:!0}),t(e,m,{value:function(r,e){var i=n[p].read();i?(n[l]=null,n[c]=null,n[u]=null,r(I(i,!1))):(n[c]=r,n[u]=e)},writable:!0}),e));return n[l]=null,o(r,(function(r){if(r&&"ERR_STREAM_PREMATURE_CLOSE"!==r.code){var e=n[u];return null!==e&&(n[l]=null,n[c]=null,n[u]=null,e(r)),void(n[d]=r)}var i=n[c];null!==i&&(n[l]=null,n[c]=null,n[u]=null,i(I(void 0,!0))),n[s]=!0})),r.on("readable",f.bind(null,n)),n}},47264:function(r,e,n){"use strict";function i(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,i)}return n}function a(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function t(r,e){for(var n=0;n0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(r){var e={data:r,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var r=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=r+e.data;return n}},{key:"concat",value:function(r){if(0===this.length)return o.alloc(0);for(var e,n,i,a=o.allocUnsafe(r>>>0),t=this.head,c=0;t;)e=t.data,n=a,i=c,o.prototype.copy.call(e,n,i),c+=t.data.length,t=t.next;return a}},{key:"consume",value:function(r,e){var n;return ra.length?a.length:r;if(t===a.length?i+=a:i+=a.slice(0,r),0===(r-=t)){t===a.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=a.slice(t));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(r){var e=o.allocUnsafe(r),n=this.head,i=1;for(n.data.copy(e),r-=n.data.length;n=n.next;){var a=n.data,t=r>a.length?a.length:r;if(a.copy(e,e.length-r,0,t),0===(r-=t)){t===a.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(t));break}++i}return this.length-=i,e}},{key:u,value:function(r,e){return c(this,function(r){for(var e=1;e0,(function(r){s||(s=r),r&&m.forEach(u),t||(m.forEach(u),l(s))}))}));return e.reduce(d)}},24888:function(r,e,n){"use strict";var i=n(92784).i.ERR_INVALID_OPT_VALUE;r.exports={getHighWaterMark:function(r,e,n,a){var t=function(r,e,n){return null!=r.highWaterMark?r.highWaterMark:e?r[n]:null}(e,a,n);if(null!=t){if(!isFinite(t)||Math.floor(t)!==t||t<0)throw new i(a?n:"highWaterMark",t);return Math.floor(t)}return r.objectMode?16:16384}}},4776:function(r,e,n){r.exports=n(61252).EventEmitter},86032:function(r,e,n){"use strict";var i=n(30456).Buffer,a=i.isEncoding||function(r){switch((r=""+r)&&r.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(r){var e;switch(this.encoding=function(r){var e=function(r){if(!r)return"utf8";for(var e;;)switch(r){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return r;default:if(e)return;r=(""+r).toLowerCase(),e=!0}}(r);if("string"!==typeof e&&(i.isEncoding===a||!a(r)))throw new Error("Unknown encoding: "+r);return e||r}(r),this.encoding){case"utf16le":this.text=u,this.end=d,e=4;break;case"utf8":this.fillLast=c,e=4;break;case"base64":this.text=s,this.end=l,e=3;break;default:return this.write=m,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function o(r){return r<=127?0:r>>5===6?2:r>>4===14?3:r>>3===30?4:r>>6===2?-1:-2}function c(r){var e=this.lastTotal-this.lastNeed,n=function(r,e,n){if(128!==(192&e[0]))return r.lastNeed=0,"\ufffd";if(r.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return r.lastNeed=1,"\ufffd";if(r.lastNeed>2&&e.length>2&&128!==(192&e[2]))return r.lastNeed=2,"\ufffd"}}(this,r);return void 0!==n?n:this.lastNeed<=r.length?(r.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(r.copy(this.lastChar,e,0,r.length),void(this.lastNeed-=r.length))}function u(r,e){if((r.length-e)%2===0){var n=r.toString("utf16le",e);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=r[r.length-1],r.toString("utf16le",e,r.length-1)}function d(r){var e=r&&r.length?this.write(r):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function s(r,e){var n=(r.length-e)%3;return 0===n?r.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=r[r.length-1]:(this.lastChar[0]=r[r.length-2],this.lastChar[1]=r[r.length-1]),r.toString("base64",e,r.length-n))}function l(r){var e=r&&r.length?this.write(r):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function m(r){return r.toString(this.encoding)}function p(r){return r&&r.length?this.write(r):""}e.o=t,t.prototype.write=function(r){if(0===r.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(r)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(a>0&&(r.lastNeed=a-1),a):--i=0?(a>0&&(r.lastNeed=a-2),a):--i=0?(a>0&&(2===a?a=0:r.lastNeed=a-3),a):0}(this,r,e);if(!this.lastNeed)return r.toString("utf8",e);this.lastTotal=n;var i=r.length-(n-this.lastNeed);return r.copy(this.lastChar,0,i),r.toString("utf8",e,i)},t.prototype.fillLast=function(r){if(this.lastNeed<=r.length)return r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);r.copy(this.lastChar,this.lastTotal-this.lastNeed,0,r.length),this.lastNeed-=r.length}},55619:function(r,e,n){var i=n(45408),a=n(86844)("stream-parser");r.exports=function(r){var e=r&&"function"==typeof r._transform,n=r&&"function"==typeof r._write;if(!e&&!n)throw new Error("must pass a Writable or Transform stream in");a("extending Parser into stream"),r._bytes=s,r._skipBytes=l,e&&(r._passthrough=m),e?r._transform=I:r._write=p};var t=-1,o=0,c=1,u=2;function d(r){a("initializing parser stream"),r._parserBytesLeft=0,r._parserBuffers=[],r._parserBuffered=0,r._parserState=t,r._parserCallback=null,"function"==typeof r.push&&(r._parserOutput=r.push.bind(r)),r._parserInit=!0}function s(r,e){i(!this._parserCallback,'there is already a "callback" set!'),i(isFinite(r)&&r>0,'can only buffer a finite number of bytes > 0, got "'+r+'"'),this._parserInit||d(this),a("buffering %o bytes",r),this._parserBytesLeft=r,this._parserCallback=e,this._parserState=o}function l(r,e){i(!this._parserCallback,'there is already a "callback" set!'),i(r>0,'can only skip > 0 bytes, got "'+r+'"'),this._parserInit||d(this),a("skipping %o bytes",r),this._parserBytesLeft=r,this._parserCallback=e,this._parserState=c}function m(r,e){i(!this._parserCallback,'There is already a "callback" set!'),i(r>0,'can only pass through > 0 bytes, got "'+r+'"'),this._parserInit||d(this),a("passing through %o bytes",r),this._parserBytesLeft=r,this._parserCallback=e,this._parserState=u}function p(r,e,n){this._parserInit||d(this),a("write(%o bytes)",r.length),"function"==typeof e&&(n=e),f(this,r,null,n)}function I(r,e,n){this._parserInit||d(this),a("transform(%o bytes)",r.length),"function"!=typeof e&&(e=this._parserOutput),f(this,r,e,n)}function y(r,e,n,i){if(r._parserBytesLeft-=e.length,a("%o bytes left for stream piece",r._parserBytesLeft),r._parserState===o?(r._parserBuffers.push(e),r._parserBuffered+=e.length):r._parserState===u&&n(e),0!==r._parserBytesLeft)return i;var c=r._parserCallback;if(c&&r._parserState===o&&r._parserBuffers.length>1&&(e=Buffer.concat(r._parserBuffers,r._parserBuffered)),r._parserState!==o&&(e=null),r._parserCallback=null,r._parserBuffered=0,r._parserState=t,r._parserBuffers.splice(0),c){var d=[];e&&d.push(e),n&&d.push(n);var s=c.length>d.length;s&&d.push(g(i));var l=c.apply(r,d);if(!s||i===l)return i}}var f=g((function r(e,n,i,a){return e._parserBytesLeft<=0?a(new Error("got data but not currently parsing anything")):n.length<=e._parserBytesLeft?function(){return y(e,n,i,a)}:function(){var t=n.slice(0,e._parserBytesLeft);return y(e,t,i,(function(o){return o?a(o):n.length>t.length?function(){return r(e,n.slice(t.length),i,a)}:void 0}))}}));function g(r){return function(){for(var e=r.apply(this,arguments);"function"==typeof e;)e=e();return e}}},86844:function(r,e,n){var i=n(4168);function a(){var r;try{r=e.storage.debug}catch(n){}return!r&&"undefined"!==typeof i&&"env"in i&&(r=i.env.DEBUG),r}(e=r.exports=n(89416)).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(r){var n=this.useColors;if(r[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+r[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var i="color: "+this.color;r.splice(1,0,i,"color: inherit");var a=0,t=0;r[0].replace(/%[a-zA-Z%]/g,(function(r){"%%"!==r&&(a++,"%c"===r&&(t=a))})),r.splice(t,0,i)}},e.save=function(r){try{null==r?e.storage.removeItem("debug"):e.storage.debug=r}catch(n){}},e.load=a,e.useColors=function(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(r){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(a())},89416:function(r,e,n){var i;function a(r){function n(){if(n.enabled){var r=n,a=+new Date,t=a-(i||a);r.diff=t,r.prev=i,r.curr=a,i=a;for(var o=new Array(arguments.length),c=0;c0)return function(r){if(!((r=String(r)).length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(o){var c=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*t;case"days":case"day":case"d":return c*a;case"hours":case"hour":case"hrs":case"hr":case"h":return c*i;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}}}(r);if("number"===d&&!1===isNaN(r))return c.long?o(u=r,a,"day")||o(u,i,"hour")||o(u,n,"minute")||o(u,e,"second")||u+" ms":function(r){return r>=a?Math.round(r/a)+"d":r>=i?Math.round(r/i)+"h":r>=n?Math.round(r/n)+"m":r>=e?Math.round(r/e)+"s":r+"ms"}(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))}},39956:function(r,e,n){"use strict";var i=n(32868);r.exports=function(r,e,n){if(null==r)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");n?("string"===typeof n||Array.isArray(n))&&(n={ignore:n}):n={},null==n.escape&&(n.escape=!0),null==n.ignore?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201c\u201d","\xab\xbb"]:("string"===typeof n.ignore&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map((function(r){return 1===r.length&&(r+=r),r})));var a=i.parse(r,{flat:!0,brackets:n.ignore}),t=a[0].split(e);if(n.escape){for(var o=[],c=0;c0;){e=d[d.length-1];var p=r[e];if(t[e]=0&&c[e].push(o[y])}t[e]=I}else{if(i[e]===n[e]){var f=[],g=[],_=0;for(I=u.length-1;I>=0;--I){var h=u[I];if(a[h]=!1,f.push(h),g.push(c[h]),_+=c[h].length,o[h]=l.length,h===e){u.length=I;break}}l.push(f);var v=new Array(_);for(I=0;I1&&(a=1),a<-1&&(a=-1),(r*i-e*n<0?-1:1)*Math.acos(a)};e.default=function(r){var e=r.px,n=r.py,u=r.cx,d=r.cy,s=r.rx,l=r.ry,m=r.xAxisRotation,p=void 0===m?0:m,I=r.largeArcFlag,y=void 0===I?0:I,f=r.sweepFlag,g=void 0===f?0:f,_=[];if(0===s||0===l)return[];var h=Math.sin(p*a/360),v=Math.cos(p*a/360),x=v*(e-u)/2+h*(n-d)/2,P=-h*(e-u)/2+v*(n-d)/2;if(0===x&&0===P)return[];s=Math.abs(s),l=Math.abs(l);var G=Math.pow(x,2)/Math.pow(s,2)+Math.pow(P,2)/Math.pow(l,2);G>1&&(s*=Math.sqrt(G),l*=Math.sqrt(G));var C=function(r,e,n,i,t,o,u,d,s,l,m,p){var I=Math.pow(t,2),y=Math.pow(o,2),f=Math.pow(m,2),g=Math.pow(p,2),_=I*y-I*g-y*f;_<0&&(_=0),_/=I*g+y*f;var h=(_=Math.sqrt(_)*(u===d?-1:1))*t/o*p,v=_*-o/t*m,x=l*h-s*v+(r+n)/2,P=s*h+l*v+(e+i)/2,G=(m-h)/t,C=(p-v)/o,S=(-m-h)/t,A=(-p-v)/o,b=c(1,0,G,C),M=c(G,C,S,A);return 0===d&&M>0&&(M-=a),1===d&&M<0&&(M+=a),[x,P,b,M]}(e,n,u,d,s,l,y,g,h,v,x,P),S=i(C,4),A=S[0],b=S[1],M=S[2],B=S[3],k=Math.abs(B)/(a/4);Math.abs(1-k)<1e-7&&(k=1);var F=Math.max(Math.ceil(k),1);B/=F;for(var z=0;ze[2]&&(e[2]=d[s+0]),d[s+1]>e[3]&&(e[3]=d[s+1]);return e}},41976:function(r,e,n){"use strict";r.exports=function(r){for(var e,n=[],o=0,c=0,u=0,d=0,s=null,l=null,m=0,p=0,I=0,y=r.length;I4?(o=f[f.length-4],c=f[f.length-3]):(o=m,c=p),n.push(f)}return n};var i=n(92848);function a(r,e,n,i){return["C",r,e,n,i,n,i]}function t(r,e,n,i,a,t){return["C",r/3+2/3*n,e/3+2/3*i,a/3+2/3*n,t/3+2/3*i,a,t]}},20472:function(r,e,n){"use strict";var i,a=n(74840),t=n(21984),o=n(22235),c=n(53520),u=n(29620),d=document.createElement("canvas"),s=d.getContext("2d");r.exports=function(r,e){if(!c(r))throw Error("Argument should be valid svg path string");var n,l;e||(e={}),e.shape?(n=e.shape[0],l=e.shape[1]):(n=d.width=e.w||e.width||200,l=d.height=e.h||e.height||200);var m=Math.min(n,l),p=e.stroke||0,I=e.viewbox||e.viewBox||a(r),y=[n/(I[2]-I[0]),l/(I[3]-I[1])],f=Math.min(y[0]||0,y[1]||0)/2;if(s.fillStyle="black",s.fillRect(0,0,n,l),s.fillStyle="white",p&&("number"!=typeof p&&(p=1),s.strokeStyle=p>0?"white":"black",s.lineWidth=Math.abs(p)),s.translate(.5*n,.5*l),s.scale(f,f),function(){if(null!=i)return i;var r=document.createElement("canvas").getContext("2d");if(r.canvas.width=r.canvas.height=1,!window.Path2D)return i=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");r.fillStyle="black",r.fill(e);var n=r.getImageData(0,0,1,1);return i=n&&n.data&&255===n.data[3]}()){var g=new Path2D(r);s.fill(g),p&&s.stroke(g)}else{var _=t(r);o(s,_),s.fill(),p&&s.stroke()}return s.setTransform(1,0,0,1,0,0),u(s,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*m})}},49760:function(r,e,n){var i;!function(a){var t=/^\s+/,o=/\s+$/,c=0,u=a.round,d=a.min,s=a.max,l=a.random;function m(r,e){if(e=e||{},(r=r||"")instanceof m)return r;if(!(this instanceof m))return new m(r,e);var n=function(r){var e,n,i,c={r:0,g:0,b:0},u=1,l=null,m=null,p=null,I=!1,y=!1;return"string"==typeof r&&(r=function(r){r=r.replace(t,"").replace(o,"").toLowerCase();var e,n=!1;if(k[r])r=k[r],n=!0;else if("transparent"==r)return{r:0,g:0,b:0,a:0,format:"name"};return(e=U.rgb.exec(r))?{r:e[1],g:e[2],b:e[3]}:(e=U.rgba.exec(r))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=U.hsl.exec(r))?{h:e[1],s:e[2],l:e[3]}:(e=U.hsla.exec(r))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=U.hsv.exec(r))?{h:e[1],s:e[2],v:e[3]}:(e=U.hsva.exec(r))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=U.hex8.exec(r))?{r:E(e[1]),g:E(e[2]),b:E(e[3]),a:J(e[4]),format:n?"name":"hex8"}:(e=U.hex6.exec(r))?{r:E(e[1]),g:E(e[2]),b:E(e[3]),format:n?"name":"hex"}:(e=U.hex4.exec(r))?{r:E(e[1]+""+e[1]),g:E(e[2]+""+e[2]),b:E(e[3]+""+e[3]),a:J(e[4]+""+e[4]),format:n?"name":"hex8"}:!!(e=U.hex3.exec(r))&&{r:E(e[1]+""+e[1]),g:E(e[2]+""+e[2]),b:E(e[3]+""+e[3]),format:n?"name":"hex"}}(r)),"object"==typeof r&&(H(r.r)&&H(r.g)&&H(r.b)?(e=r.r,n=r.g,i=r.b,c={r:255*w(e,255),g:255*w(n,255),b:255*w(i,255)},I=!0,y="%"===String(r.r).substr(-1)?"prgb":"rgb"):H(r.h)&&H(r.s)&&H(r.v)?(l=T(r.s),m=T(r.v),c=function(r,e,n){r=6*w(r,360),e=w(e,100),n=w(n,100);var i=a.floor(r),t=r-i,o=n*(1-e),c=n*(1-t*e),u=n*(1-(1-t)*e),d=i%6,s=[n,c,o,o,u,n][d],l=[u,n,n,c,o,o][d],m=[o,o,u,n,n,c][d];return{r:255*s,g:255*l,b:255*m}}(r.h,l,m),I=!0,y="hsv"):H(r.h)&&H(r.s)&&H(r.l)&&(l=T(r.s),p=T(r.l),c=function(r,e,n){var i,a,t;function o(r,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?r+6*(e-r)*n:n<.5?e:n<2/3?r+(e-r)*(2/3-n)*6:r}if(r=w(r,360),e=w(e,100),n=w(n,100),0===e)i=a=t=n;else{var c=n<.5?n*(1+e):n+e-n*e,u=2*n-c;i=o(u,c,r+1/3),a=o(u,c,r),t=o(u,c,r-1/3)}return{r:255*i,g:255*a,b:255*t}}(r.h,l,p),I=!0,y="hsl"),r.hasOwnProperty("a")&&(u=r.a)),u=z(u),{ok:I,format:r.format||y,r:d(255,s(c.r,0)),g:d(255,s(c.g,0)),b:d(255,s(c.b,0)),a:u}}(r);this._originalInput=r,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=u(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=u(this._r)),this._g<1&&(this._g=u(this._g)),this._b<1&&(this._b=u(this._b)),this._ok=n.ok,this._tc_id=c++}function p(r,e,n){r=w(r,255),e=w(e,255),n=w(n,255);var i,a,t=s(r,e,n),o=d(r,e,n),c=(t+o)/2;if(t==o)i=a=0;else{var u=t-o;switch(a=c>.5?u/(2-t-o):u/(t+o),t){case r:i=(e-n)/u+(e>1)+720)%360;--e;)i.h=(i.h+a)%360,t.push(m(i));return t}function B(r,e){e=e||6;for(var n=m(r).toHsv(),i=n.h,a=n.s,t=n.v,o=[],c=1/e;e--;)o.push(m({h:i,s:a,v:t})),t=(t+c)%1;return o}m.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 r=this.toRgb();return(299*r.r+587*r.g+114*r.b)/1e3},getLuminance:function(){var r,e,n,i=this.toRgb();return r=i.r/255,e=i.g/255,n=i.b/255,.2126*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:a.pow((n+.055)/1.055,2.4))},setAlpha:function(r){return this._a=z(r),this._roundA=u(100*this._a)/100,this},toHsv:function(){var r=I(this._r,this._g,this._b);return{h:360*r.h,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=I(this._r,this._g,this._b),e=u(360*r.h),n=u(100*r.s),i=u(100*r.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var r=p(this._r,this._g,this._b);return{h:360*r.h,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=p(this._r,this._g,this._b),e=u(360*r.h),n=u(100*r.s),i=u(100*r.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(r){return y(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return function(r,e,n,i,a){var t=[N(u(r).toString(16)),N(u(e).toString(16)),N(u(n).toString(16)),N(D(i))];return a&&t[0].charAt(0)==t[0].charAt(1)&&t[1].charAt(0)==t[1].charAt(1)&&t[2].charAt(0)==t[2].charAt(1)&&t[3].charAt(0)==t[3].charAt(1)?t[0].charAt(0)+t[1].charAt(0)+t[2].charAt(0)+t[3].charAt(0):t.join("")}(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:u(this._r),g:u(this._g),b:u(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+u(this._r)+", "+u(this._g)+", "+u(this._b)+")":"rgba("+u(this._r)+", "+u(this._g)+", "+u(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:u(100*w(this._r,255))+"%",g:u(100*w(this._g,255))+"%",b:u(100*w(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+u(100*w(this._r,255))+"%, "+u(100*w(this._g,255))+"%, "+u(100*w(this._b,255))+"%)":"rgba("+u(100*w(this._r,255))+"%, "+u(100*w(this._g,255))+"%, "+u(100*w(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(F[y(this._r,this._g,this._b,!0)]||!1)},toFilter:function(r){var e="#"+f(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(r){var a=m(r);n="#"+f(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(r){var e=!!r;r=r||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==r&&"hex6"!==r&&"hex3"!==r&&"hex4"!==r&&"hex8"!==r&&"name"!==r?("rgb"===r&&(n=this.toRgbString()),"prgb"===r&&(n=this.toPercentageRgbString()),"hex"!==r&&"hex6"!==r||(n=this.toHexString()),"hex3"===r&&(n=this.toHexString(!0)),"hex4"===r&&(n=this.toHex8String(!0)),"hex8"===r&&(n=this.toHex8String()),"name"===r&&(n=this.toName()),"hsl"===r&&(n=this.toHslString()),"hsv"===r&&(n=this.toHsvString()),n||this.toHexString()):"name"===r&&0===this._a?this.toName():this.toRgbString()},clone:function(){return m(this.toString())},_applyModification:function(r,e){var n=r.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(P,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(G,arguments)},_applyCombination:function(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(b,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},m.fromRatio=function(r,e){if("object"==typeof r){var n={};for(var i in r)r.hasOwnProperty(i)&&(n[i]="a"===i?r[i]:T(r[i]));r=n}return m(r,e)},m.equals=function(r,e){return!(!r||!e)&&m(r).toRgbString()==m(e).toRgbString()},m.random=function(){return m.fromRatio({r:l(),g:l(),b:l()})},m.mix=function(r,e,n){n=0===n?0:n||50;var i=m(r).toRgb(),a=m(e).toRgb(),t=n/100;return m({r:(a.r-i.r)*t+i.r,g:(a.g-i.g)*t+i.g,b:(a.b-i.b)*t+i.b,a:(a.a-i.a)*t+i.a})},m.readability=function(r,e){var n=m(r),i=m(e);return(a.max(n.getLuminance(),i.getLuminance())+.05)/(a.min(n.getLuminance(),i.getLuminance())+.05)},m.isReadable=function(r,e,n){var i,a,t=m.readability(r,e);switch(a=!1,(i=function(r){var e,n;return e=((r=r||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(r.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA"),"small"!==n&&"large"!==n&&(n="small"),{level:e,size:n}}(n)).level+i.size){case"AAsmall":case"AAAlarge":a=t>=4.5;break;case"AAlarge":a=t>=3;break;case"AAAsmall":a=t>=7}return a},m.mostReadable=function(r,e,n){var i,a,t,o,c=null,u=0;a=(n=n||{}).includeFallbackColors,t=n.level,o=n.size;for(var d=0;du&&(u=i,c=m(e[d]));return m.isReadable(r,c,{level:t,size:o})||!a?c:(n.includeFallbackColors=!1,m.mostReadable(r,["#fff","#000"],n))};var k=m.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"},F=m.hexNames=function(r){var e={};for(var n in r)r.hasOwnProperty(n)&&(e[r[n]]=n);return e}(k);function z(r){return r=parseFloat(r),(isNaN(r)||r<0||r>1)&&(r=1),r}function w(r,e){(function(r){return"string"==typeof r&&-1!=r.indexOf(".")&&1===parseFloat(r)})(r)&&(r="100%");var n=function(r){return"string"===typeof r&&-1!=r.indexOf("%")}(r);return r=d(e,s(0,parseFloat(r))),n&&(r=parseInt(r*e,10)/100),a.abs(r-e)<1e-6?1:r%e/parseFloat(e)}function R(r){return d(1,s(0,r))}function E(r){return parseInt(r,16)}function N(r){return 1==r.length?"0"+r:""+r}function T(r){return r<=1&&(r=100*r+"%"),r}function D(r){return a.round(255*parseFloat(r)).toString(16)}function J(r){return E(r)/255}var U=function(){var r="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+n),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 H(r){return!!U.CSS_UNIT.exec(r)}r.exports?r.exports=m:void 0===(i=function(){return m}.call(e,n,e,r))||(r.exports=i)}(Math)},37816:function(r){"use strict";r.exports=n,r.exports.float32=r.exports.float=n,r.exports.fract32=r.exports.fract=function(r,e){if(r.length){if(r instanceof Float32Array)return new Float32Array(r.length);e instanceof Float32Array||(e=n(r));for(var i=0,a=e.length;i":(e.length>100&&(e=e.slice(0,99)+"\u2026"),e=e.replace(a,(function(r){switch(r){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},7328:function(r,e,n){"use strict";var i=n(81680),a={object:!0,function:!0,undefined:!0};r.exports=function(r){return!!i(r)&&hasOwnProperty.call(a,typeof r)}},87396:function(r,e,n){"use strict";var i=n(57980),a=n(85488);r.exports=function(r){return a(r)?r:i(r,"%v is not a plain function",arguments[1])}},85488:function(r,e,n){"use strict";var i=n(73384),a=/^\s*class[\s{/}]/,t=Function.prototype.toString;r.exports=function(r){return!!i(r)&&!a.test(t.call(r))}},54612:function(r,e,n){"use strict";var i=n(7328);r.exports=function(r){if(!i(r))return!1;try{return!!r.constructor&&r.constructor.prototype===r}catch(e){return!1}}},33940:function(r,e,n){"use strict";var i=n(81680),a=n(7328),t=Object.prototype.toString;r.exports=function(r){if(!i(r))return null;if(a(r)){var e=r.toString;if("function"!==typeof e)return null;if(e===t)return null}try{return""+r}catch(n){return null}}},18496:function(r,e,n){"use strict";var i=n(57980),a=n(81680);r.exports=function(r){return a(r)?r:i(r,"Cannot use %v",arguments[1])}},81680:function(r){"use strict";r.exports=function(r){return void 0!==r&&null!==r}},14144:function(r,e,n){"use strict";var i=n(308),a=n(10352),t=n(33576).Buffer;n.g.__TYPEDARRAY_POOL||(n.g.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),BIGUINT64:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),BIGINT64:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var o="undefined"!==typeof Uint8ClampedArray,c="undefined"!==typeof BigUint64Array,u="undefined"!==typeof BigInt64Array,d=n.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=a([32,0])),d.BIGUINT64||(d.BIGUINT64=a([32,0])),d.BIGINT64||(d.BIGINT64=a([32,0])),d.BUFFER||(d.BUFFER=a([32,0]));var s=d.DATA,l=d.BUFFER;function m(r){if(r){var e=r.length||r.byteLength,n=i.log2(e);s[n].push(r)}}function p(r){r=i.nextPow2(r);var e=i.log2(r),n=s[e];return n.length>0?n.pop():new ArrayBuffer(r)}function I(r){return new Uint8Array(p(r),0,r)}function y(r){return new Uint16Array(p(2*r),0,r)}function f(r){return new Uint32Array(p(4*r),0,r)}function g(r){return new Int8Array(p(r),0,r)}function _(r){return new Int16Array(p(2*r),0,r)}function h(r){return new Int32Array(p(4*r),0,r)}function v(r){return new Float32Array(p(4*r),0,r)}function x(r){return new Float64Array(p(8*r),0,r)}function P(r){return o?new Uint8ClampedArray(p(r),0,r):I(r)}function G(r){return c?new BigUint64Array(p(8*r),0,r):null}function C(r){return u?new BigInt64Array(p(8*r),0,r):null}function S(r){return new DataView(p(r),0,r)}function A(r){r=i.nextPow2(r);var e=i.log2(r),n=l[e];return n.length>0?n.pop():new t(r)}e.free=function(r){if(t.isBuffer(r))l[i.log2(r.length)].push(r);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(r)&&(r=r.buffer),!r)return;var e=r.length||r.byteLength,n=0|i.log2(e);s[n].push(r)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(r){m(r.buffer)},e.freeArrayBuffer=m,e.freeBuffer=function(r){l[i.log2(r.length)].push(r)},e.malloc=function(r,e){if(void 0===e||"arraybuffer"===e)return p(r);switch(e){case"uint8":return I(r);case"uint16":return y(r);case"uint32":return f(r);case"int8":return g(r);case"int16":return _(r);case"int32":return h(r);case"float":case"float32":return v(r);case"double":case"float64":return x(r);case"uint8_clamped":return P(r);case"bigint64":return C(r);case"biguint64":return G(r);case"buffer":return A(r);case"data":case"dataview":return S(r);default:return null}return null},e.mallocArrayBuffer=p,e.mallocUint8=I,e.mallocUint16=y,e.mallocUint32=f,e.mallocInt8=g,e.mallocInt16=_,e.mallocInt32=h,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=P,e.mallocBigUint64=G,e.mallocBigInt64=C,e.mallocDataView=S,e.mallocBuffer=A,e.clearCache=function(){for(var r=0;r<32;++r)d.UINT8[r].length=0,d.UINT16[r].length=0,d.UINT32[r].length=0,d.INT8[r].length=0,d.INT16[r].length=0,d.INT32[r].length=0,d.FLOAT[r].length=0,d.DOUBLE[r].length=0,d.BIGUINT64[r].length=0,d.BIGINT64[r].length=0,d.UINT8C[r].length=0,s[r].length=0,l[r].length=0}},92384:function(r){var e=/[\'\"]/;r.exports=function(r){return r?(e.test(r.charAt(0))&&(r=r.substr(1)),e.test(r.charAt(r.length-1))&&(r=r.substr(0,r.length-1)),r):""}},45223:function(r){"use strict";r.exports=function(r,e,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i=a)return r;switch(r){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return r}})),c=i[n];n=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),f(n)?i.showHidden=n:n&&e._extend(i,n),v(i.showHidden)&&(i.showHidden=!1),v(i.depth)&&(i.depth=2),v(i.colors)&&(i.colors=!1),v(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=s),m(i,r,i.depth)}function s(r,e){var n=d.styles[e];return n?"\x1b["+d.colors[n][0]+"m"+r+"\x1b["+d.colors[n][1]+"m":r}function l(r,e){return r}function m(r,n,i){if(r.customInspect&&n&&S(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var a=n.inspect(i,r);return h(a)||(a=m(r,a,i)),a}var t=function(r,e){if(v(e))return r.stylize("undefined","undefined");if(h(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(n,"string")}return _(e)?r.stylize(""+e,"number"):f(e)?r.stylize(""+e,"boolean"):g(e)?r.stylize("null","null"):void 0}(r,n);if(t)return t;var o=Object.keys(n),c=function(r){var e={};return r.forEach((function(r,n){e[r]=!0})),e}(o);if(r.showHidden&&(o=Object.getOwnPropertyNames(n)),C(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(n);if(0===o.length){if(S(n)){var u=n.name?": "+n.name:"";return r.stylize("[Function"+u+"]","special")}if(x(n))return r.stylize(RegExp.prototype.toString.call(n),"regexp");if(G(n))return r.stylize(Date.prototype.toString.call(n),"date");if(C(n))return p(n)}var d,s="",l=!1,P=["{","}"];return y(n)&&(l=!0,P=["[","]"]),S(n)&&(s=" [Function"+(n.name?": "+n.name:"")+"]"),x(n)&&(s=" "+RegExp.prototype.toString.call(n)),G(n)&&(s=" "+Date.prototype.toUTCString.call(n)),C(n)&&(s=" "+p(n)),0!==o.length||l&&0!=n.length?i<0?x(n)?r.stylize(RegExp.prototype.toString.call(n),"regexp"):r.stylize("[Object]","special"):(r.seen.push(n),d=l?function(r,e,n,i,a){for(var t=[],o=0,c=e.length;o60?n[0]+(""===e?"":e+"\n ")+" "+r.join(",\n ")+" "+n[1]:n[0]+e+" "+r.join(", ")+" "+n[1]}(d,s,P)):P[0]+s+P[1]}function p(r){return"["+Error.prototype.toString.call(r)+"]"}function I(r,e,n,i,a,t){var o,c,u;if((u=Object.getOwnPropertyDescriptor(e,a)||{value:e[a]}).get?c=u.set?r.stylize("[Getter/Setter]","special"):r.stylize("[Getter]","special"):u.set&&(c=r.stylize("[Setter]","special")),B(i,a)||(o="["+a+"]"),c||(r.seen.indexOf(u.value)<0?(c=g(n)?m(r,u.value,null):m(r,u.value,n-1)).indexOf("\n")>-1&&(c=t?c.split("\n").map((function(r){return" "+r})).join("\n").slice(2):"\n"+c.split("\n").map((function(r){return" "+r})).join("\n")):c=r.stylize("[Circular]","special")),v(o)){if(t&&a.match(/^\d+$/))return c;(o=JSON.stringify(""+a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=r.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=r.stylize(o,"string"))}return o+": "+c}function y(r){return Array.isArray(r)}function f(r){return"boolean"===typeof r}function g(r){return null===r}function _(r){return"number"===typeof r}function h(r){return"string"===typeof r}function v(r){return void 0===r}function x(r){return P(r)&&"[object RegExp]"===A(r)}function P(r){return"object"===typeof r&&null!==r}function G(r){return P(r)&&"[object Date]"===A(r)}function C(r){return P(r)&&("[object Error]"===A(r)||r instanceof Error)}function S(r){return"function"===typeof r}function A(r){return Object.prototype.toString.call(r)}function b(r){return r<10?"0"+r.toString(10):r.toString(10)}e.debuglog=function(r){if(r=r.toUpperCase(),!o[r])if(c.test(r)){var n=i.pid;o[r]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,i)}}else o[r]=function(){};return o[r]},e.inspect=d,d.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]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=n(41088),e.isArray=y,e.isBoolean=f,e.isNull=g,e.isNullOrUndefined=function(r){return null==r},e.isNumber=_,e.isString=h,e.isSymbol=function(r){return"symbol"===typeof r},e.isUndefined=v,e.isRegExp=x,e.types.isRegExp=x,e.isObject=P,e.isDate=G,e.types.isDate=G,e.isError=C,e.types.isNativeError=C,e.isFunction=S,e.isPrimitive=function(r){return null===r||"boolean"===typeof r||"number"===typeof r||"string"===typeof r||"symbol"===typeof r||"undefined"===typeof r},e.isBuffer=n(75272);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(r,e){return Object.prototype.hasOwnProperty.call(r,e)}e.log=function(){console.log("%s - %s",function(){var r=new Date,e=[b(r.getHours()),b(r.getMinutes()),b(r.getSeconds())].join(":");return[r.getDate(),M[r.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=n(6768),e._extend=function(r,e){if(!e||!P(e))return r;for(var n=Object.keys(e),i=n.length;i--;)r[n[i]]=e[n[i]];return r};var k="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function F(r,e){if(!r){var n=new Error("Promise was rejected with a falsy value");n.reason=r,r=n}return e(r)}e.promisify=function(r){if("function"!==typeof r)throw new TypeError('The "original" argument must be of type Function');if(k&&r[k]){var e;if("function"!==typeof(e=r[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,i=new Promise((function(r,i){e=r,n=i})),a=[],t=0;t-1?e:"Object"===e&&function(r){var e=!1;return i(y,(function(n,i){if(!e)try{n(r),e=m(i,1)}catch(a){}})),e}(r)}return c?function(r){var e=!1;return i(y,(function(n,i){if(!e)try{"$"+n(r)===i&&(e=m(i,1))}catch(a){}})),e}(r):null}},67020:function(r,e,n){var i=n(38700),a=n(50896),t=i.instance();function o(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}o.prototype=new i.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(r,e){if("string"===typeof r){var n=r.match(u);return n?n[0]:""}var i=this._validateYear(r),a=r.month(),t=""+this.toChineseMonth(i,a);return e&&t.length<2&&(t="0"+t),this.isIntercalaryMonth(i,a)&&(t+="i"),t},monthNames:function(r){if("string"===typeof r){var e=r.match(d);return e?e[0]:""}var n=this._validateYear(r),i=r.month(),a=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(n,i)-1];return this.isIntercalaryMonth(n,i)&&(a="\u95f0"+a),a},monthNamesShort:function(r){if("string"===typeof r){var e=r.match(s);return e?e[0]:""}var n=this._validateYear(r),i=r.month(),a=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(n,i)-1];return this.isIntercalaryMonth(n,i)&&(a="\u95f0"+a),a},parseMonth:function(r,e){r=this._validateYear(r);var n,i=parseInt(e);if(isNaN(i))"\u95f0"===e[0]&&(n=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),i=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var a=e[e.length-1];n="i"===a||"I"===a}return this.toMonthIndex(r,i,n)},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(r,e){if(r.year&&(r=r.year()),"number"!==typeof r||r<1888||r>2111)throw e.replace(/\{0\}/,this.local.name);return r},toMonthIndex:function(r,e,n){var a=this.intercalaryMonth(r);if(n&&e!==a||e<1||e>12)throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?!n&&e<=a?e-1:e:e-1},toChineseMonth:function(r,e){r.year&&(e=(r=r.year()).month());var n=this.intercalaryMonth(r);if(e<0||e>(n?12:11))throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?e>13},isIntercalaryMonth:function(r,e){r.year&&(e=(r=r.year()).month());var n=this.intercalaryMonth(r);return!!n&&n===e},leapYear:function(r){return 0!==this.intercalaryMonth(r)},weekOfYear:function(r,e,n){var a,o=this._validateYear(r,i.local.invalidyear),c=m[o-m[0]],u=c>>9&4095,d=c>>5&15,s=31&c;(a=t.newDate(u,d,s)).add(4-(a.dayOfWeek()||7),"d");var l=this.toJD(r,e,n)-a.toJD();return 1+Math.floor(l/7)},monthsInYear:function(r){return this.leapYear(r)?13:12},daysInMonth:function(r,e){r.year&&(e=r.month(),r=r.year()),r=this._validateYear(r);var n=l[r-l[0]];if(e>(n>>13?12:11))throw i.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-e?30:29},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,c,n,i.local.invalidDate);r=this._validateYear(a.year()),e=a.month(),n=a.day();var o=this.isIntercalaryMonth(r,e),c=this.toChineseMonth(r,e),u=function(r,e,n,i,a){var t,o,c;if("object"===typeof r)o=r,t=e||{};else{var u;if(!("number"===typeof r&&r>=1888&&r<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"===typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"===typeof n&&n>=1&&n<=30))throw new Error("Lunar day outside range 1 - 30");"object"===typeof i?(u=!1,t=i):(u=!!i,t=a||{}),o={year:r,month:e,day:n,isIntercalary:u}}c=o.day-1;var d,s=l[o.year-l[0]],p=s>>13;d=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var I=0;I>9&4095,(y>>5&15)-1,(31&y)+c);return t.year=f.getFullYear(),t.month=1+f.getMonth(),t.day=f.getDate(),t}(r,c,n,o);return t.toJD(u.year,u.month,u.day)},fromJD:function(r){var e=t.fromJD(r),n=function(r,e,n,i){var a,t;if("object"===typeof r)a=r,t=e||{};else{if(!("number"===typeof r&&r>=1888&&r<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"===typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"===typeof n&&n>=1&&n<=31))throw new Error("Solar day outside range 1 - 31");a={year:r,month:e,day:n},t=i||{}}var o=m[a.year-m[0]],c=a.year<<9|a.month<<5|a.day;t.year=c>=o?a.year:a.year-1,o=m[t.year-m[0]];var u,d=new Date(o>>9&4095,(o>>5&15)-1,31&o),s=new Date(a.year,a.month-1,a.day);u=Math.round((s-d)/864e5);var p,I=l[t.year-l[0]];for(p=0;p<13;p++){var y=I&1<<12-p?30:29;if(u>13;return!f||p=2&&i<=6},extraInfo:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return{century:o[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=a.year()+(a.year()<0?1:0),e=a.month(),(n=a.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(r-1)+this.jdEpoch-1},fromJD:function(r){r=Math.floor(r+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(r/400)+1;r-=400*(e-1),r+=r>15?16:0;var n=Math.floor(r/32)+1,i=r-32*(n-1)+1;return this.newDate(e<=0?e-1:e,n,i)}});var o={20:"Fruitbat",21:"Anchovy"};i.calendars.discworld=t},65168:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return(r=e.year()+(e.year()<0?1:0))%4===3||r%4===-1},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear),13},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return(r=a.year())<0&&r++,a.day()+30*(a.month()-1)+365*(r-1)+Math.floor(r/4)+this.jdEpoch-1},fromJD:function(r){var e=Math.floor(r)+.5-this.jdEpoch,n=Math.floor((e-Math.floor((e+366)/1461))/365)+1;n<=0&&n--,e=Math.floor(r)+.5-this.newDate(n,1,1).toJD();var i=Math.floor(e/30)+1,a=e-30*(i-1)+1;return this.newDate(n,i,a)}}),i.calendars.ethiopian=t},2084:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}function o(r,e){return r-e*Math.floor(r/e)}t.prototype=new i.baseCalendar,a(t.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(r){return o(7*(r=r<0?r+1:r)+1,19)<7},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear),this._leapYear(r.year?r.year():r)?13:12},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(r){return r=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear).year(),this.toJD(-1===r?1:r+1,7,1)-this.toJD(r,7,1)},daysInMonth:function(r,e){return r.year&&(e=r.month(),r=r.year()),this._validate(r,e,this.minDay,i.local.invalidMonth),12===e&&this.leapYear(r)||8===e&&5===o(this.daysInYear(r),10)?30:9===e&&3===o(this.daysInYear(r),10)?29:this.daysPerMonth[e-1]},weekDay:function(r,e,n){return 6!==this.dayOfWeek(r,e,n)},extraInfo:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return{yearType:(this.leapYear(a)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(a)%10-3]}},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);r=a.year(),e=a.month(),n=a.day();var t=r<=0?r+1:r,o=this.jdEpoch+this._delay1(t)+this._delay2(t)+n+1;if(e<7){for(var c=7;c<=this.monthsInYear(r);c++)o+=this.daysInMonth(r,c);for(c=1;c=this.toJD(-1===e?1:e+1,7,1);)e++;for(var n=rthis.toJD(e,n,this.daysInMonth(e,n));)n++;var i=r-this.toJD(e,n,1)+1;return this.newDate(e,n,i)}}),i.calendars.hebrew=t},26368:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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\u012bs","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(r){return(11*this._validate(r,this.minMonth,this.minDay,i.local.invalidYear).year()+14)%30<11},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(r){return this.leapYear(r)?355:354},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return 5!==this.dayOfWeek(r,e,n)},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=a.year(),e=a.month(),r=r<=0?r+1:r,(n=a.day())+Math.ceil(29.5*(e-1))+354*(r-1)+Math.floor((3+11*r)/30)+this.jdEpoch-1},fromJD:function(r){r=Math.floor(r)+.5;var e=Math.floor((30*(r-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var n=Math.min(12,Math.ceil((r-29-this.toJD(e,1,1))/29.5)+1),i=r-this.toJD(e,n,1)+1;return this.newDate(e,n,i)}}),i.calendars.islamic=t},24747:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return(r=e.year()<0?e.year()+1:e.year())%4===0},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=a.year(),e=a.month(),n=a.day(),r<0&&r++,e<=2&&(r--,e+=12),Math.floor(365.25*(r+4716))+Math.floor(30.6001*(e+1))+n-1524.5},fromJD:function(r){var e=Math.floor(r+.5)+1524,n=Math.floor((e-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((e-i)/30.6001),t=a-Math.floor(a<14?1:13),o=n-Math.floor(t>2?4716:4715),c=e-i-Math.floor(30.6001*a);return o<=0&&o--,this.newDate(o,t,c)}}),i.calendars.julian=t},65616:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}function o(r,e){return r-e*Math.floor(r/e)}function c(r,e){return o(r-1,e)+1}t.prototype=new i.baseCalendar,a(t.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(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear),!1},formatYear:function(r){r=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear).year();var e=Math.floor(r/400);return r%=400,r+=r<0?400:0,e+"."+Math.floor(r/20)+"."+r%20},forYear:function(r){if((r=r.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,n=0;n19||n>0&&i<0)throw"Invalid Mayan year";e=20*e+i}return e},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear),18},weekOfYear:function(r,e,n){return this._validate(r,e,n,i.local.invalidDate),0},daysInYear:function(r){return this._validate(r,this.minMonth,this.minDay,i.local.invalidYear),360},daysInMonth:function(r,e){return this._validate(r,e,this.minDay,i.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(r,e,n){return this._validate(r,e,n,i.local.invalidDate).day()},weekDay:function(r,e,n){return this._validate(r,e,n,i.local.invalidDate),!0},extraInfo:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate).toJD(),t=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[t[0]-1],haabMonth:t[0],haabDay:t[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(r){var e=o(8+(r-=this.jdEpoch)+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(r){return[c(20+(r-=this.jdEpoch),20),c(r+4,13)]},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return a.day()+20*a.month()+360*a.year()+this.jdEpoch},fromJD:function(r){r=Math.floor(r)+.5-this.jdEpoch;var e=Math.floor(r/360);r%=360,r+=r<0?360:0;var n=Math.floor(r/20),i=r%20;return this.newDate(e,n,i)}}),i.calendars.mayan=t},30632:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar;var o=i.instance("gregorian");a(t.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear||i.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidMonth);(r=a.year())<0&&r++;for(var t=a.day(),c=1;c=this.toJD(e+1,1,1);)e++;for(var n=r-Math.floor(this.toJD(e,1,1)+.5)+1,i=1;n>this.daysInMonth(e,i);)n-=this.daysInMonth(e,i),i++;return this.newDate(e,i,n)}}),i.calendars.nanakshahi=t},73040:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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(r){return this.daysInYear(r)!==this.daysPerYear},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(r){if(r=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear).year(),"undefined"===typeof this.NEPALI_CALENDAR_DATA[r])return this.daysPerYear;for(var e=0,n=this.minMonth;n<=12;n++)e+=this.NEPALI_CALENDAR_DATA[r][n];return e},daysInMonth:function(r,e){return r.year&&(e=r.month(),r=r.year()),this._validate(r,e,this.minDay,i.local.invalidMonth),"undefined"===typeof this.NEPALI_CALENDAR_DATA[r]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[r][e]},weekDay:function(r,e,n){return 6!==this.dayOfWeek(r,e,n)},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);r=a.year(),e=a.month(),n=a.day();var t=i.instance(),o=0,c=e,u=r;this._createMissingCalendarData(r);var d=r-(c>9||9===c&&n>=this.NEPALI_CALENDAR_DATA[u][0]?56:57);for(9!==e&&(o=n,c--);9!==c;)c<=0&&(c=12,u--),o+=this.NEPALI_CALENDAR_DATA[u][c],c--;return 9===e?(o+=n-this.NEPALI_CALENDAR_DATA[u][0])<0&&(o+=t.daysInYear(d)):o+=this.NEPALI_CALENDAR_DATA[u][9]-this.NEPALI_CALENDAR_DATA[u][0],t.newDate(d,1,1).add(o,"d").toJD()},fromJD:function(r){var e=i.instance().fromJD(r),n=e.year(),a=e.dayOfYear(),t=n+56;this._createMissingCalendarData(t);for(var o=9,c=this.NEPALI_CALENDAR_DATA[t][0],u=this.NEPALI_CALENDAR_DATA[t][o]-c+1;a>u;)++o>12&&(o=1,t++),u+=this.NEPALI_CALENDAR_DATA[t][o];var d=this.NEPALI_CALENDAR_DATA[t][o]-(u-a);return this.newDate(t,o,d)},_createMissingCalendarData:function(r){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var n=r-1;n0?474:473))%2820+474+38)%2816<682},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-(i.dayOfWeek()+1)%7,"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return 5!==this.dayOfWeek(r,e,n)},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);r=a.year(),e=a.month(),n=a.day();var t=r-(r>=0?474:473),c=474+o(t,2820);return n+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*c-110)/2816)+365*(c-1)+1029983*Math.floor(t/2820)+this.jdEpoch-1},fromJD:function(r){var e=(r=Math.floor(r)+.5)-this.toJD(475,1,1),n=Math.floor(e/1029983),i=o(e,1029983),a=2820;if(1029982!==i){var t=Math.floor(i/366),c=o(i,366);a=Math.floor((2134*t+2816*c+2815)/1028522)+t+1}var u=a+2820*n+474;u=u<=0?u-1:u;var d=r-this.toJD(u,1,1)+1,s=d<=186?Math.ceil(d/31):Math.ceil((d-6)/30),l=r-this.toJD(u,s,1)+1;return this.newDate(u,s,l)}}),i.calendars.persian=t,i.calendars.jalali=t},51456:function(r,e,n){var i=n(38700),a=n(50896),t=i.instance();function o(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}o.prototype=new i.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return r=this._t2gYear(e.year()),t.leapYear(r)},weekOfYear:function(r,e,n){var a=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return r=this._t2gYear(a.year()),t.weekOfYear(r,a.month(),a.day())},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=this._t2gYear(a.year()),t.toJD(r,a.month(),a.day())},fromJD:function(r){var e=t.fromJD(r),n=this._g2tYear(e.year());return this.newDate(n,e.month(),e.day())},_t2gYear:function(r){return r+this.yearsOffset+(r>=-this.yearsOffset&&r<=-1?1:0)},_g2tYear:function(r){return r-this.yearsOffset-(r>=1&&r<=this.yearsOffset?1:0)}}),i.calendars.taiwan=o},4592:function(r,e,n){var i=n(38700),a=n(50896),t=i.instance();function o(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}o.prototype=new i.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(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return r=this._t2gYear(e.year()),t.leapYear(r)},weekOfYear:function(r,e,n){var a=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return r=this._t2gYear(a.year()),t.weekOfYear(r,a.month(),a.day())},daysInMonth:function(r,e){var n=this._validate(r,e,this.minDay,i.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(r,e,n){return(this.dayOfWeek(r,e,n)||7)<6},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate);return r=this._t2gYear(a.year()),t.toJD(r,a.month(),a.day())},fromJD:function(r){var e=t.fromJD(r),n=this._g2tYear(e.year());return this.newDate(n,e.month(),e.day())},_t2gYear:function(r){return r-this.yearsOffset-(r>=1&&r<=this.yearsOffset?1:0)},_g2tYear:function(r){return r+this.yearsOffset+(r>=-this.yearsOffset&&r<=-1?1:0)}}),i.calendars.thai=o},45348:function(r,e,n){var i=n(38700),a=n(50896);function t(r){this.local=this.regionalOptions[r||""]||this.regionalOptions[""]}t.prototype=new i.baseCalendar,a(t.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\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,i.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(r,e,n){var i=this.newDate(r,e,n);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(r){for(var e=0,n=1;n<=12;n++)e+=this.daysInMonth(r,n);return e},daysInMonth:function(r,e){for(var n=this._validate(r,e,this.minDay,i.local.invalidMonth).toJD()-24e5+.5,a=0,t=0;tn)return o[a]-o[a-1];a++}return 30},weekDay:function(r,e,n){return 5!==this.dayOfWeek(r,e,n)},toJD:function(r,e,n){var a=this._validate(r,e,n,i.local.invalidDate),t=12*(a.year()-1)+a.month()-15292;return a.day()+o[t-1]-1+24e5-.5},fromJD:function(r){for(var e=r-24e5+.5,n=0,i=0;ie);i++)n++;var a=n+15292,t=Math.floor((a-1)/12),c=t+1,u=a-12*t,d=e-o[n-1]+1;return this.newDate(c,u,d)},isValid:function(r,e,n){var a=i.baseCalendar.prototype.isValid.apply(this,arguments);return a&&(a=(r=null!=r.year?r.year:r)>=1276&&r<=1500),a},_validate:function(r,e,n,a){var t=i.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw a.replace(/\{0\}/,this.local.name);return t}}),i.calendars.ummalqura=t;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]},38700:function(r,e,n){var i=n(50896);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 t(r,e,n,i){if(this._calendar=r,this._year=e,this._month=n,this._day=i,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(d.local.invalidDate||d.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(r,e){return"000000".substring(0,e-(r=""+r).length)+r}function c(){this.shortYearCutoff="+10"}function u(r){this.local=this.regionalOptions[r]||this.regionalOptions[""]}i(a.prototype,{instance:function(r,e){r=(r||"gregorian").toLowerCase(),e=e||"";var n=this._localCals[r+"-"+e];if(!n&&this.calendars[r]&&(n=new this.calendars[r](e),this._localCals[r+"-"+e]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return n},newDate:function(r,e,n,i,a){return(i=(null!=r&&r.year?r.calendar():"string"===typeof i?this.instance(i,a):i)||this.instance()).newDate(r,e,n)},substituteDigits:function(r){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return r[e]}))}},substituteChineseDigits:function(r,e){return function(n){for(var i="",a=0;n>0;){var t=n%10;i=(0===t?"":r[t]+e[a])+i,a++,n=Math.floor(n/10)}return 0===i.indexOf(r[1]+e[1])&&(i=i.substr(1)),i||r[0]}}}),i(t.prototype,{newDate:function(r,e,n){return this._calendar.newDate(null==r?this:r,e,n)},year:function(r){return 0===arguments.length?this._year:this.set(r,"y")},month:function(r){return 0===arguments.length?this._month:this.set(r,"m")},day:function(r){return 0===arguments.length?this._day:this.set(r,"d")},date:function(r,e,n){if(!this._calendar.isValid(r,e,n))throw(d.local.invalidDate||d.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=e,this._day=n,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(r,e){return this._calendar.add(this,r,e)},set:function(r,e){return this._calendar.set(this,r,e)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(d.local.differentCalendars||d.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var e=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),i(c.prototype,{_validateLevel:0,newDate:function(r,e,n){return null==r?this.today():(r.year&&(this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate),n=r.day(),e=r.month(),r=r.year()),new t(this,r,e,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){return this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear),12},monthOfYear:function(r,e){var n=this._validate(r,e,this.minDay,d.local.invalidMonth||d.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(r,e){var n=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,n,this.minDay,d.local.invalidMonth||d.regionalOptions[""].invalidMonth),n},daysInYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,d.local.invalidYear||d.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(r,e,n){var i=this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,e,n){var i=this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(r,e,n){return this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate),{}},add:function(r,e,n){return this._validate(r,this.minMonth,this.minDay,d.local.invalidDate||d.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,e,n),e,n)},_add:function(r,e,n){if(this._validateLevel++,"d"===n||"w"===n){var i=r.toJD()+e*("w"===n?this.daysInWeek():1),a=r.calendar().fromJD(i);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var t=r.year()+("y"===n?e:0),o=r.monthOfYear()+("m"===n?e:0);a=r.day(),"y"===n?(r.month()!==this.fromMonthOfYear(t,o)&&(o=this.newDate(t,r.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(t)),a=Math.min(a,this.daysInMonth(t,this.fromMonthOfYear(t,o)))):"m"===n&&(function(r){for(;oe-1+r.minMonth;)t++,o-=e,e=r.monthsInYear(t)}(this),a=Math.min(a,this.daysInMonth(t,this.fromMonthOfYear(t,o))));var c=[t,this.fromMonthOfYear(t,o),a];return this._validateLevel--,c}catch(u){throw this._validateLevel--,u}},_correctAdd:function(r,e,n,i){if(!this.hasYearZero&&("y"===i||"m"===i)&&(0===e[0]||r.year()>0!==e[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"]}[i],t=n<0?-1:1;e=this._add(r,n*a[0]+t*a[1],a[2])}return r.date(e[0],e[1],e[2])},set:function(r,e,n){this._validate(r,this.minMonth,this.minDay,d.local.invalidDate||d.regionalOptions[""].invalidDate);var i="y"===n?e:r.year(),a="m"===n?e:r.month(),t="d"===n?e:r.day();return"y"!==n&&"m"!==n||(t=Math.min(t,this.daysInMonth(i,a))),r.date(i,a,t)},isValid:function(r,e,n){this._validateLevel++;var i=this.hasYearZero||0!==r;if(i){var a=this.newDate(r,e,this.minDay);i=e>=this.minMonth&&e-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),d=a-(u>2.5?4716:4715);return d<=0&&d--,this.newDate(d,u,c)},toJSDate:function(r,e,n){var i=this._validate(r,e,n,d.local.invalidDate||d.regionalOptions[""].invalidDate),a=new Date(i.year(),i.month()-1,i.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(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var d=r.exports=new a;d.cdate=t,d.baseCalendar=c,d.calendars.gregorian=u},15168:function(r,e,n){var i=n(50896),a=n(38700);i(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[""],i(a.cdate.prototype,{formatDate:function(r,e){return"string"!==typeof r&&(e=r,r=""),this._calendar.formatDate(r||"",this,e)}}),i(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(r,e,n){if("string"!==typeof r&&(n=e,e=r,r=""),!e)return"";if(e.calendar()!==this)throw a.local.invalidFormat||a.regionalOptions[""].invalidFormat;r=r||this.local.dateFormat;for(var i,t,o,c,u=(n=n||{}).dayNamesShort||this.local.dayNamesShort,d=n.dayNames||this.local.dayNames,s=n.monthNumbers||this.local.monthNumbers,l=n.monthNamesShort||this.local.monthNamesShort,m=n.monthNames||this.local.monthNames,p=(n.calculateWeek||this.local.calculateWeek,function(e,n){for(var i=1;P+i1}),I=function(r,e,n,i){var a=""+e;if(p(r,i))for(;a.length1},h=function(r,n){var i=_(r,n),t=[2,3,i?4:2,i?4:2,10,11,20]["oyYJ@!".indexOf(r)+1],o=new RegExp("^-?\\d{1,"+t+"}"),c=e.substring(S).match(o);if(!c)throw(a.local.missingNumberAt||a.regionalOptions[""].missingNumberAt).replace(/\{0\}/,S);return S+=c[0].length,parseInt(c[0],10)},v=this,x=function(){if("function"===typeof u){_("m");var r=u.call(v,e.substring(S));return S+=r.length,r}return h("m")},P=function(r,n,i,t){for(var o=_(r,t)?i:n,c=0;c-1){p=1,I=y;for(var M=this.daysInMonth(m,p);I>M;M=this.daysInMonth(m,p))p++,I-=M}return l>-1?this.fromJD(l):this.newDate(m,p,I)},determineDate:function(r,e,n,i,a){n&&"object"!==typeof n&&(a=i,i=n,n=null),"string"!==typeof i&&(a=i,i="");var t=this;return e=e?e.newDate():null,r=null==r?e:"string"===typeof r?function(r){try{return t.parseDate(i,r,a)}catch(u){}for(var e=((r=r.toLowerCase()).match(/^c/)&&n?n.newDate():null)||t.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=o.exec(r);c;)e.add(parseInt(c[1],10),c[2]||"d"),c=o.exec(r);return e}(r):"number"===typeof r?isNaN(r)||r===1/0||r===-1/0?e:t.today().add(r,"d"):t.newDate(r)}})},21576:function(){},19768:function(){},63436:function(r,e,n){"use strict";var i=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],a="undefined"===typeof globalThis?n.g:globalThis;r.exports=function(){for(var r=[],e=0;e>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?G(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?G(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=m.exec(r))?new S(e[1],e[2],e[3],1):(e=p.exec(r))?new S(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=I.exec(r))?G(e[1],e[2],e[3],e[4]):(e=y.exec(r))?G(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=f.exec(r))?F(e[1],e[2]/100,e[3]/100,1):(e=g.exec(r))?F(e[1],e[2]/100,e[3]/100,e[4]):_.hasOwnProperty(r)?P(_[r]):"transparent"===r?new S(NaN,NaN,NaN,0):null}function P(r){return new S(r>>16&255,r>>8&255,255&r,1)}function G(r,e,n,i){return i<=0&&(r=e=n=NaN),new S(r,e,n,i)}function C(r,e,n,i){return 1===arguments.length?((a=r)instanceof t||(a=x(a)),a?new S((a=a.rgb()).r,a.g,a.b,a.opacity):new S):new S(r,e,n,null==i?1:i);var a}function S(r,e,n,i){this.r=+r,this.g=+e,this.b=+n,this.opacity=+i}function A(){return"#".concat(k(this.r)).concat(k(this.g)).concat(k(this.b))}function b(){var r=M(this.opacity);return"".concat(1===r?"rgb(":"rgba(").concat(B(this.r),", ").concat(B(this.g),", ").concat(B(this.b)).concat(1===r?")":", ".concat(r,")"))}function M(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function B(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function k(r){return((r=B(r))<16?"0":"")+r.toString(16)}function F(r,e,n,i){return i<=0?r=e=n=NaN:n<=0||n>=1?r=e=NaN:e<=0&&(r=NaN),new w(r,e,n,i)}function z(r){if(r instanceof w)return new w(r.h,r.s,r.l,r.opacity);if(r instanceof t||(r=x(r)),!r)return new w;if(r instanceof w)return r;var e=(r=r.rgb()).r/255,n=r.g/255,i=r.b/255,a=Math.min(e,n,i),o=Math.max(e,n,i),c=NaN,u=o-a,d=(o+a)/2;return u?(c=e===o?(n-i)/u+6*(n0&&d<1?0:c,new w(c,u,d,r.opacity)}function w(r,e,n,i){this.h=+r,this.s=+e,this.l=+n,this.opacity=+i}function R(r){return(r=(r||0)%360)<0?r+360:r}function E(r){return Math.max(0,Math.min(1,r||0))}function N(r,e,n){return 255*(r<60?e+(n-e)*r/60:r<180?n:r<240?e+(n-e)*(240-r)/60:e)}function T(r,e,n,i,a){var t=r*r,o=t*r;return((1-3*r+3*t-o)*e+(4-6*t+3*o)*n+(1+3*r+3*t-3*o)*i+o*a)/6}i(t,x,{copy:function(r){return Object.assign(new this.constructor,this,r)},displayable:function(){return this.rgb().displayable()},hex:h,formatHex:h,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return z(this).formatHsl()},formatRgb:v,toString:v}),i(S,C,a(t,{brighter:function(r){return r=null==r?c:Math.pow(c,r),new S(this.r*r,this.g*r,this.b*r,this.opacity)},darker:function(r){return r=null==r?o:Math.pow(o,r),new S(this.r*r,this.g*r,this.b*r,this.opacity)},rgb:function(){return this},clamp:function(){return new S(B(this.r),B(this.g),B(this.b),M(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A,formatHex:A,formatHex8:function(){return"#".concat(k(this.r)).concat(k(this.g)).concat(k(this.b)).concat(k(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:b,toString:b})),i(w,(function(r,e,n,i){return 1===arguments.length?z(r):new w(r,e,n,null==i?1:i)}),a(t,{brighter:function(r){return r=null==r?c:Math.pow(c,r),new w(this.h,this.s,this.l*r,this.opacity)},darker:function(r){return r=null==r?o:Math.pow(o,r),new w(this.h,this.s,this.l*r,this.opacity)},rgb:function(){var r=this.h%360+360*(this.h<0),e=isNaN(r)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,a=2*n-i;return new S(N(r>=240?r-240:r+120,a,i),N(r,a,i),N(r<120?r+240:r-120,a,i),this.opacity)},clamp:function(){return new w(R(this.h),E(this.s),E(this.l),M(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},formatHsl:function(){var r=M(this.opacity);return"".concat(1===r?"hsl(":"hsla(").concat(R(this.h),", ").concat(100*E(this.s),"%, ").concat(100*E(this.l),"%").concat(1===r?")":", ".concat(r,")"))}}));var D=function(r){return function(){return r}};function J(r,e){return function(n){return r+n*e}}function U(r){return 1===(r=+r)?H:function(e,n){return n-e?function(r,e,n){return r=Math.pow(r,n),e=Math.pow(e,n)-r,n=1/n,function(i){return Math.pow(r+i*e,n)}}(e,n,r):D(isNaN(e)?n:e)}}function H(r,e){var n=e-r;return n?J(r,n):D(isNaN(r)?e:r)}var L=function r(e){var n=U(e);function i(r,e){var i=n((r=C(r)).r,(e=C(e)).r),a=n(r.g,e.g),t=n(r.b,e.b),o=H(r.opacity,e.opacity);return function(e){return r.r=i(e),r.g=a(e),r.b=t(e),r.opacity=o(e),r+""}}return i.gamma=r,i}(1);function O(r){return function(e){var n,i,a=e.length,t=new Array(a),o=new Array(a),c=new Array(a);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),a=r[i],t=r[i+1],o=i>0?r[i-1]:2*a-t,c=it&&(a=e.slice(t,a),c[o]?c[o]+=a:c[++o]=a),(n=n[0])===(i=i[0])?c[o]?c[o]+=i:c[++o]=i:(c[++o]=null,u.push({i:o,x:j(n,i)})),t=Y.lastIndex;return t{"use strict";var i=n(3218);function a(){}function t(){}t.resetWarningCache=a,r.exports=function(){function r(r,e,n,a,t,o){if(o!==i){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function e(){return r}r.isRequired=r;var n={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:e,element:r,elementType:r,instanceOf:e,node:r,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:t,resetWarningCache:a};return n.PropTypes=n,n}},5173:(r,e,n)=>{r.exports=n(1497)()},3218:r=>{"use strict";r.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2730:(r,e,n)=>{"use strict";var i=n(5043),a=n(8853);function t(r){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+r,n=1;n